bootstrap.min.js 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. /*!
  2. * Bootstrap v3.3.6 (http://getbootstrap.com)
  3. * Copyright 2011-2015 Twitter, Inc.
  4. * Licensed under the MIT license
  5. */
  6. if ("undefined" == typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");
  7. +function (a) {
  8. "use strict";
  9. var b = a.fn.jquery.split(" ")[0].split(".");
  10. if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")
  11. }(jQuery), +function (a) {
  12. "use strict";
  13. function b() {
  14. var a = document.createElement("bootstrap"), b = {
  15. WebkitTransition: "webkitTransitionEnd",
  16. MozTransition: "transitionend",
  17. OTransition: "oTransitionEnd otransitionend",
  18. transition: "transitionend"
  19. };
  20. for (var c in b)if (void 0 !== a.style[c])return {end: b[c]};
  21. return !1
  22. }
  23. a.fn.emulateTransitionEnd = function (b) {
  24. var c = !1, d = this;
  25. a(this).one("bsTransitionEnd", function () {
  26. c = !0
  27. });
  28. var e = function () {
  29. c || a(d).trigger(a.support.transition.end)
  30. };
  31. return setTimeout(e, b), this
  32. }, a(function () {
  33. a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {
  34. bindType: a.support.transition.end,
  35. delegateType: a.support.transition.end,
  36. handle: function (b) {
  37. return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
  38. }
  39. })
  40. })
  41. }(jQuery), +function (a) {
  42. "use strict";
  43. function b(b) {
  44. return this.each(function () {
  45. var c = a(this), e = c.data("bs.alert");
  46. e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)
  47. })
  48. }
  49. var c = '[data-dismiss="alert"]', d = function (b) {
  50. a(b).on("click", c, this.close)
  51. };
  52. d.VERSION = "3.3.6", d.TRANSITION_DURATION = 150, d.prototype.close = function (b) {
  53. function c() {
  54. g.detach().trigger("closed.bs.alert").remove()
  55. }
  56. var e = a(this), f = e.attr("data-target");
  57. f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));
  58. var g = a(f);
  59. b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c())
  60. };
  61. var e = a.fn.alert;
  62. a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function () {
  63. return a.fn.alert = e, this
  64. }, a(document).on("click.bs.alert.data-api", c, d.prototype.close)
  65. }(jQuery), +function (a) {
  66. "use strict";
  67. function b(b) {
  68. return this.each(function () {
  69. var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b;
  70. e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)
  71. })
  72. }
  73. var c = function (b, d) {
  74. this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1
  75. };
  76. c.VERSION = "3.3.6", c.DEFAULTS = {loadingText: "loading..."}, c.prototype.setState = function (b) {
  77. var c = "disabled", d = this.$element, e = d.is("input") ? "val" : "html", f = d.data();
  78. b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function () {
  79. d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c))
  80. }, this), 0)
  81. }, c.prototype.toggle = function () {
  82. var a = !0, b = this.$element.closest('[data-toggle="buttons"]');
  83. if (b.length) {
  84. var c = this.$element.find("input");
  85. "radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change")
  86. } else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
  87. };
  88. var d = a.fn.button;
  89. a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function () {
  90. return a.fn.button = d, this
  91. }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (c) {
  92. var d = a(c.target);
  93. d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault()
  94. }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (b) {
  95. a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
  96. })
  97. }(jQuery), +function (a) {
  98. "use strict";
  99. function b(b) {
  100. return this.each(function () {
  101. var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b), g = "string" == typeof b ? b : f.slide;
  102. e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
  103. })
  104. }
  105. var c = function (b, c) {
  106. this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
  107. };
  108. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 600, c.DEFAULTS = {
  109. interval: 5e3,
  110. pause: "hover",
  111. wrap: !0,
  112. keyboard: !0
  113. }, c.prototype.keydown = function (a) {
  114. if (!/input|textarea/i.test(a.target.tagName)) {
  115. switch (a.which) {
  116. case 37:
  117. this.prev();
  118. break;
  119. case 39:
  120. this.next();
  121. break;
  122. default:
  123. return
  124. }
  125. a.preventDefault()
  126. }
  127. }, c.prototype.cycle = function (b) {
  128. return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this
  129. }, c.prototype.getItemIndex = function (a) {
  130. return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)
  131. }, c.prototype.getItemForDirection = function (a, b) {
  132. var c = this.getItemIndex(b), d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1;
  133. if (d && !this.options.wrap)return b;
  134. var e = "prev" == a ? -1 : 1, f = (c + e) % this.$items.length;
  135. return this.$items.eq(f)
  136. }, c.prototype.to = function (a) {
  137. var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active"));
  138. return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function () {
  139. b.to(a)
  140. }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))
  141. }, c.prototype.pause = function (b) {
  142. return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
  143. }, c.prototype.next = function () {
  144. return this.sliding ? void 0 : this.slide("next")
  145. }, c.prototype.prev = function () {
  146. return this.sliding ? void 0 : this.slide("prev")
  147. }, c.prototype.slide = function (b, d) {
  148. var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval, h = "next" == b ? "left" : "right", i = this;
  149. if (f.hasClass("active"))return this.sliding = !1;
  150. var j = f[0], k = a.Event("slide.bs.carousel", {relatedTarget: j, direction: h});
  151. if (this.$element.trigger(k), !k.isDefaultPrevented()) {
  152. if (this.sliding = !0, g && this.pause(), this.$indicators.length) {
  153. this.$indicators.find(".active").removeClass("active");
  154. var l = a(this.$indicators.children()[this.getItemIndex(f)]);
  155. l && l.addClass("active")
  156. }
  157. var m = a.Event("slid.bs.carousel", {relatedTarget: j, direction: h});
  158. return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function () {
  159. f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function () {
  160. i.$element.trigger(m)
  161. }, 0)
  162. }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this
  163. }
  164. };
  165. var d = a.fn.carousel;
  166. a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function () {
  167. return a.fn.carousel = d, this
  168. };
  169. var e = function (c) {
  170. var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
  171. if (f.hasClass("carousel")) {
  172. var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to");
  173. h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()
  174. }
  175. };
  176. a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function () {
  177. a('[data-ride="carousel"]').each(function () {
  178. var c = a(this);
  179. b.call(c, c.data())
  180. })
  181. })
  182. }(jQuery), +function (a) {
  183. "use strict";
  184. function b(b) {
  185. var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");
  186. return a(d)
  187. }
  188. function c(b) {
  189. return this.each(function () {
  190. var c = a(this), e = c.data("bs.collapse"), f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);
  191. !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()
  192. })
  193. }
  194. var d = function (b, c) {
  195. this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
  196. };
  197. d.VERSION = "3.3.6", d.TRANSITION_DURATION = 350, d.DEFAULTS = {toggle: !0}, d.prototype.dimension = function () {
  198. var a = this.$element.hasClass("width");
  199. return a ? "width" : "height"
  200. }, d.prototype.show = function () {
  201. if (!this.transitioning && !this.$element.hasClass("in")) {
  202. var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
  203. if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
  204. var f = a.Event("show.bs.collapse");
  205. if (this.$element.trigger(f), !f.isDefaultPrevented()) {
  206. e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));
  207. var g = this.dimension();
  208. this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
  209. var h = function () {
  210. this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
  211. };
  212. if (!a.support.transition)return h.call(this);
  213. var i = a.camelCase(["scroll", g].join("-"));
  214. this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])
  215. }
  216. }
  217. }
  218. }, d.prototype.hide = function () {
  219. if (!this.transitioning && this.$element.hasClass("in")) {
  220. var b = a.Event("hide.bs.collapse");
  221. if (this.$element.trigger(b), !b.isDefaultPrevented()) {
  222. var c = this.dimension();
  223. this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
  224. var e = function () {
  225. this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
  226. };
  227. return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)
  228. }
  229. }
  230. }, d.prototype.toggle = function () {
  231. this[this.$element.hasClass("in") ? "hide" : "show"]()
  232. }, d.prototype.getParent = function () {
  233. return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (c, d) {
  234. var e = a(d);
  235. this.addAriaAndCollapsedClass(b(e), e)
  236. }, this)).end()
  237. }, d.prototype.addAriaAndCollapsedClass = function (a, b) {
  238. var c = a.hasClass("in");
  239. a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)
  240. };
  241. var e = a.fn.collapse;
  242. a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function () {
  243. return a.fn.collapse = e, this
  244. }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (d) {
  245. var e = a(this);
  246. e.attr("data-target") || d.preventDefault();
  247. var f = b(e), g = f.data("bs.collapse"), h = g ? "toggle" : e.data();
  248. c.call(f, h)
  249. })
  250. }(jQuery), +function (a) {
  251. "use strict";
  252. function b(b) {
  253. var c = b.attr("data-target");
  254. c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));
  255. var d = c && a(c);
  256. return d && d.length ? d : b.parent()
  257. }
  258. function c(c) {
  259. c && 3 === c.which || (a(e).remove(), a(f).each(function () {
  260. var d = a(this), e = b(d), f = {relatedTarget: this};
  261. e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f)))))
  262. }))
  263. }
  264. function d(b) {
  265. return this.each(function () {
  266. var c = a(this), d = c.data("bs.dropdown");
  267. d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)
  268. })
  269. }
  270. var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function (b) {
  271. a(b).on("click.bs.dropdown", this.toggle)
  272. };
  273. g.VERSION = "3.3.6", g.prototype.toggle = function (d) {
  274. var e = a(this);
  275. if (!e.is(".disabled, :disabled")) {
  276. var f = b(e), g = f.hasClass("open");
  277. if (c(), !g) {
  278. "ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c);
  279. var h = {relatedTarget: this};
  280. if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented())return;
  281. e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h))
  282. }
  283. return !1
  284. }
  285. }, g.prototype.keydown = function (c) {
  286. if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {
  287. var d = a(this);
  288. if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) {
  289. var e = b(d), g = e.hasClass("open");
  290. if (!g && 27 != c.which || g && 27 == c.which)return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click");
  291. var h = " li:not(.disabled):visible a", i = e.find(".dropdown-menu" + h);
  292. if (i.length) {
  293. var j = i.index(c.target);
  294. 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")
  295. }
  296. }
  297. }
  298. };
  299. var h = a.fn.dropdown;
  300. a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function () {
  301. return a.fn.dropdown = h, this
  302. }, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function (a) {
  303. a.stopPropagation()
  304. }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown)
  305. }(jQuery), +function (a) {
  306. "use strict";
  307. function b(b, d) {
  308. return this.each(function () {
  309. var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);
  310. f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)
  311. })
  312. }
  313. var c = function (b, c) {
  314. this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () {
  315. this.$element.trigger("loaded.bs.modal")
  316. }, this))
  317. };
  318. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {
  319. backdrop: !0,
  320. keyboard: !0,
  321. show: !0
  322. }, c.prototype.toggle = function (a) {
  323. return this.isShown ? this.hide() : this.show(a)
  324. }, c.prototype.show = function (b) {
  325. var d = this, e = a.Event("show.bs.modal", {relatedTarget: b});
  326. this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function () {
  327. d.$element.one("mouseup.dismiss.bs.modal", function (b) {
  328. a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)
  329. })
  330. }), this.backdrop(function () {
  331. var e = a.support.transition && d.$element.hasClass("fade");
  332. d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus();
  333. var f = a.Event("shown.bs.modal", {relatedTarget: b});
  334. e ? d.$dialog.one("bsTransitionEnd", function () {
  335. d.$element.trigger("focus").trigger(f)
  336. }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
  337. }))
  338. }, c.prototype.hide = function (b) {
  339. b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
  340. }, c.prototype.enforceFocus = function () {
  341. a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
  342. this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
  343. }, this))
  344. }, c.prototype.escape = function () {
  345. this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function (a) {
  346. 27 == a.which && this.hide()
  347. }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
  348. }, c.prototype.resize = function () {
  349. this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
  350. }, c.prototype.hideModal = function () {
  351. var a = this;
  352. this.$element.hide(), this.backdrop(function () {
  353. a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")
  354. })
  355. }, c.prototype.removeBackdrop = function () {
  356. this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
  357. }, c.prototype.backdrop = function (b) {
  358. var d = this, e = this.$element.hasClass("fade") ? "fade" : "";
  359. if (this.isShown && this.options.backdrop) {
  360. var f = a.support.transition && e;
  361. if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function (a) {
  362. return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
  363. }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b)return;
  364. f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
  365. } else if (!this.isShown && this.$backdrop) {
  366. this.$backdrop.removeClass("in");
  367. var g = function () {
  368. d.removeBackdrop(), b && b()
  369. };
  370. a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
  371. } else b && b()
  372. }, c.prototype.handleUpdate = function () {
  373. this.adjustDialog()
  374. }, c.prototype.adjustDialog = function () {
  375. var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
  376. this.$element.css({
  377. paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",
  378. paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""
  379. })
  380. }, c.prototype.resetAdjustments = function () {
  381. this.$element.css({paddingLeft: "", paddingRight: ""})
  382. }, c.prototype.checkScrollbar = function () {
  383. var a = window.innerWidth;
  384. if (!a) {
  385. var b = document.documentElement.getBoundingClientRect();
  386. a = b.right - Math.abs(b.left)
  387. }
  388. this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar()
  389. }, c.prototype.setScrollbar = function () {
  390. var a = parseInt(this.$body.css("padding-right") || 0, 10);
  391. this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
  392. }, c.prototype.resetScrollbar = function () {
  393. this.$body.css("padding-right", this.originalBodyPad)
  394. }, c.prototype.measureScrollbar = function () {
  395. var a = document.createElement("div");
  396. a.className = "modal-scrollbar-measure", this.$body.append(a);
  397. var b = a.offsetWidth - a.clientWidth;
  398. return this.$body[0].removeChild(a), b
  399. };
  400. var d = a.fn.modal;
  401. a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function () {
  402. return a.fn.modal = d, this
  403. }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (c) {
  404. var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")), g = f.data("bs.modal") ? "toggle" : a.extend({remote: !/#/.test(e) && e}, f.data(), d.data());
  405. d.is("a") && c.preventDefault(), f.one("show.bs.modal", function (a) {
  406. a.isDefaultPrevented() || f.one("hidden.bs.modal", function () {
  407. d.is(":visible") && d.trigger("focus")
  408. })
  409. }), b.call(f, g, this)
  410. })
  411. }(jQuery), +function (a) {
  412. "use strict";
  413. function b(b) {
  414. return this.each(function () {
  415. var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b;
  416. (e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())
  417. })
  418. }
  419. var c = function (a, b) {
  420. this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b)
  421. };
  422. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.DEFAULTS = {
  423. animation: !0,
  424. placement: "top",
  425. selector: !1,
  426. template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
  427. trigger: "hover focus",
  428. title: "",
  429. delay: 0,
  430. html: !1,
  431. container: !1,
  432. viewport: {selector: "body", padding: 0}
  433. }, c.prototype.init = function (b, c, d) {
  434. if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {
  435. click: !1,
  436. hover: !1,
  437. focus: !1
  438. }, this.$element[0] instanceof document.constructor && !this.options.selector)throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
  439. for (var e = this.options.trigger.split(" "), f = e.length; f--;) {
  440. var g = e[f];
  441. if ("click" == g)this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this)); else if ("manual" != g) {
  442. var h = "hover" == g ? "mouseenter" : "focusin", i = "hover" == g ? "mouseleave" : "focusout";
  443. this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
  444. }
  445. }
  446. this.options.selector ? this._options = a.extend({}, this.options, {
  447. trigger: "manual",
  448. selector: ""
  449. }) : this.fixTitle()
  450. }, c.prototype.getDefaults = function () {
  451. return c.DEFAULTS
  452. }, c.prototype.getOptions = function (b) {
  453. return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {
  454. show: b.delay,
  455. hide: b.delay
  456. }), b
  457. }, c.prototype.getDelegateOptions = function () {
  458. var b = {}, c = this.getDefaults();
  459. return this._options && a.each(this._options, function (a, d) {
  460. c[a] != d && (b[a] = d)
  461. }), b
  462. }, c.prototype.enter = function (b) {
  463. var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
  464. return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void(c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function () {
  465. "in" == c.hoverState && c.show()
  466. }, c.options.delay.show)) : c.show())
  467. }, c.prototype.isInStateTrue = function () {
  468. for (var a in this.inState)if (this.inState[a])return !0;
  469. return !1
  470. }, c.prototype.leave = function (b) {
  471. var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
  472. return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function () {
  473. "out" == c.hoverState && c.hide()
  474. }, c.options.delay.hide)) : c.hide())
  475. }, c.prototype.show = function () {
  476. var b = a.Event("show.bs." + this.type);
  477. if (this.hasContent() && this.enabled) {
  478. this.$element.trigger(b);
  479. var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
  480. if (b.isDefaultPrevented() || !d)return;
  481. var e = this, f = this.tip(), g = this.getUID(this.type);
  482. this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
  483. var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement, i = /\s?auto?\s?/i, j = i.test(h);
  484. j && (h = h.replace(i, "") || "top"), f.detach().css({
  485. top: 0,
  486. left: 0,
  487. display: "block"
  488. }).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
  489. var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight;
  490. if (j) {
  491. var n = h, o = this.getPosition(this.$viewport);
  492. h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h)
  493. }
  494. var p = this.getCalculatedOffset(h, k, l, m);
  495. this.applyPlacement(p, h);
  496. var q = function () {
  497. var a = e.hoverState;
  498. e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)
  499. };
  500. a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q()
  501. }
  502. }, c.prototype.applyPlacement = function (b, c) {
  503. var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10);
  504. isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({
  505. using: function (a) {
  506. d.css({top: Math.round(a.top), left: Math.round(a.left)})
  507. }
  508. }, b), 0), d.addClass("in");
  509. var i = d[0].offsetWidth, j = d[0].offsetHeight;
  510. "top" == c && j != f && (b.top = b.top + f - j);
  511. var k = this.getViewportAdjustedDelta(c, b, i, j);
  512. k.left ? b.left += k.left : b.top += k.top;
  513. var l = /top|bottom/.test(c), m = l ? 2 * k.left - e + i : 2 * k.top - f + j, n = l ? "offsetWidth" : "offsetHeight";
  514. d.offset(b), this.replaceArrow(m, d[0][n], l)
  515. }, c.prototype.replaceArrow = function (a, b, c) {
  516. this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")
  517. }, c.prototype.setContent = function () {
  518. var a = this.tip(), b = this.getTitle();
  519. a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
  520. }, c.prototype.hide = function (b) {
  521. function d() {
  522. "in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()
  523. }
  524. var e = this, f = a(this.$tip), g = a.Event("hide.bs." + this.type);
  525. return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this)
  526. }, c.prototype.fixTitle = function () {
  527. var a = this.$element;
  528. (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
  529. }, c.prototype.hasContent = function () {
  530. return this.getTitle()
  531. }, c.prototype.getPosition = function (b) {
  532. b = b || this.$element;
  533. var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect();
  534. null == e.width && (e = a.extend({}, e, {width: e.right - e.left, height: e.bottom - e.top}));
  535. var f = d ? {
  536. top: 0,
  537. left: 0
  538. } : b.offset(), g = {scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()}, h = d ? {
  539. width: a(window).width(),
  540. height: a(window).height()
  541. } : null;
  542. return a.extend({}, e, g, h, f)
  543. }, c.prototype.getCalculatedOffset = function (a, b, c, d) {
  544. return "bottom" == a ? {
  545. top: b.top + b.height,
  546. left: b.left + b.width / 2 - c / 2
  547. } : "top" == a ? {
  548. top: b.top - d,
  549. left: b.left + b.width / 2 - c / 2
  550. } : "left" == a ? {top: b.top + b.height / 2 - d / 2, left: b.left - c} : {
  551. top: b.top + b.height / 2 - d / 2,
  552. left: b.left + b.width
  553. }
  554. }, c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
  555. var e = {top: 0, left: 0};
  556. if (!this.$viewport)return e;
  557. var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport);
  558. if (/right|left/.test(a)) {
  559. var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d;
  560. h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)
  561. } else {
  562. var j = b.left - f, k = b.left + f + c;
  563. j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k)
  564. }
  565. return e
  566. }, c.prototype.getTitle = function () {
  567. var a, b = this.$element, c = this.options;
  568. return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
  569. }, c.prototype.getUID = function (a) {
  570. do a += ~~(1e6 * Math.random()); while (document.getElementById(a));
  571. return a
  572. }, c.prototype.tip = function () {
  573. if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length))throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
  574. return this.$tip
  575. }, c.prototype.arrow = function () {
  576. return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
  577. }, c.prototype.enable = function () {
  578. this.enabled = !0
  579. }, c.prototype.disable = function () {
  580. this.enabled = !1
  581. }, c.prototype.toggleEnabled = function () {
  582. this.enabled = !this.enabled
  583. }, c.prototype.toggle = function (b) {
  584. var c = this;
  585. b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
  586. }, c.prototype.destroy = function () {
  587. var a = this;
  588. clearTimeout(this.timeout), this.hide(function () {
  589. a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null
  590. })
  591. };
  592. var d = a.fn.tooltip;
  593. a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function () {
  594. return a.fn.tooltip = d, this
  595. }
  596. }(jQuery), +function (a) {
  597. "use strict";
  598. function b(b) {
  599. return this.each(function () {
  600. var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b;
  601. (e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())
  602. })
  603. }
  604. var c = function (a, b) {
  605. this.init("popover", a, b)
  606. };
  607. if (!a.fn.tooltip)throw new Error("Popover requires tooltip.js");
  608. c.VERSION = "3.3.6", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
  609. placement: "right",
  610. trigger: "click",
  611. content: "",
  612. template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
  613. }), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () {
  614. return c.DEFAULTS
  615. }, c.prototype.setContent = function () {
  616. var a = this.tip(), b = this.getTitle(), c = this.getContent();
  617. a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()
  618. }, c.prototype.hasContent = function () {
  619. return this.getTitle() || this.getContent()
  620. }, c.prototype.getContent = function () {
  621. var a = this.$element, b = this.options;
  622. return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)
  623. }, c.prototype.arrow = function () {
  624. return this.$arrow = this.$arrow || this.tip().find(".arrow")
  625. };
  626. var d = a.fn.popover;
  627. a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function () {
  628. return a.fn.popover = d, this
  629. }
  630. }(jQuery), +function (a) {
  631. "use strict";
  632. function b(c, d) {
  633. this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process()
  634. }
  635. function c(c) {
  636. return this.each(function () {
  637. var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c;
  638. e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()
  639. })
  640. }
  641. b.VERSION = "3.3.6", b.DEFAULTS = {offset: 10}, b.prototype.getScrollHeight = function () {
  642. return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
  643. }, b.prototype.refresh = function () {
  644. var b = this, c = "offset", d = 0;
  645. this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function () {
  646. var b = a(this), e = b.data("target") || b.attr("href"), f = /^#./.test(e) && a(e);
  647. return f && f.length && f.is(":visible") && [[f[c]().top + d, e]] || null
  648. }).sort(function (a, b) {
  649. return a[0] - b[0]
  650. }).each(function () {
  651. b.offsets.push(this[0]), b.targets.push(this[1])
  652. })
  653. }, b.prototype.process = function () {
  654. var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(), d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets, g = this.activeTarget;
  655. if (this.scrollHeight != c && this.refresh(), b >= d)return g != (a = f[f.length - 1]) && this.activate(a);
  656. if (g && b < e[0])return this.activeTarget = null, this.clear();
  657. for (a = e.length; a--;)g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a])
  658. }, b.prototype.activate = function (b) {
  659. this.activeTarget = b, this.clear();
  660. var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]', d = a(c).parents("li").addClass("active");
  661. d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")
  662. }, b.prototype.clear = function () {
  663. a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
  664. };
  665. var d = a.fn.scrollspy;
  666. a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () {
  667. return a.fn.scrollspy = d, this
  668. }, a(window).on("load.bs.scrollspy.data-api", function () {
  669. a('[data-spy="scroll"]').each(function () {
  670. var b = a(this);
  671. c.call(b, b.data())
  672. })
  673. })
  674. }(jQuery), +function (a) {
  675. "use strict";
  676. function b(b) {
  677. return this.each(function () {
  678. var d = a(this), e = d.data("bs.tab");
  679. e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()
  680. })
  681. }
  682. var c = function (b) {
  683. this.element = a(b)
  684. };
  685. c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.prototype.show = function () {
  686. var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target");
  687. if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
  688. var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", {relatedTarget: b[0]}), g = a.Event("show.bs.tab", {relatedTarget: e[0]});
  689. if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
  690. var h = a(d);
  691. this.activate(b.closest("li"), c), this.activate(h, h.parent(), function () {
  692. e.trigger({type: "hidden.bs.tab", relatedTarget: b[0]}), b.trigger({
  693. type: "shown.bs.tab",
  694. relatedTarget: e[0]
  695. })
  696. })
  697. }
  698. }
  699. }, c.prototype.activate = function (b, d, e) {
  700. function f() {
  701. g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()
  702. }
  703. var g = d.find("> .active"), h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);
  704. g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")
  705. };
  706. var d = a.fn.tab;
  707. a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function () {
  708. return a.fn.tab = d, this
  709. };
  710. var e = function (c) {
  711. c.preventDefault(), b.call(a(this), "show")
  712. };
  713. a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
  714. }(jQuery), +function (a) {
  715. "use strict";
  716. function b(b) {
  717. return this.each(function () {
  718. var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b;
  719. e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()
  720. })
  721. }
  722. var c = function (b, d) {
  723. this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
  724. };
  725. c.VERSION = "3.3.6", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {
  726. offset: 0,
  727. target: window
  728. }, c.prototype.getState = function (a, b, c, d) {
  729. var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height();
  730. if (null != c && "top" == this.affixed)return c > e ? "top" : !1;
  731. if ("bottom" == this.affixed)return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";
  732. var h = null == this.affixed, i = h ? e : f.top, j = h ? g : b;
  733. return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1
  734. }, c.prototype.getPinnedOffset = function () {
  735. if (this.pinnedOffset)return this.pinnedOffset;
  736. this.$element.removeClass(c.RESET).addClass("affix");
  737. var a = this.$target.scrollTop(), b = this.$element.offset();
  738. return this.pinnedOffset = b.top - a
  739. }, c.prototype.checkPositionWithEventLoop = function () {
  740. setTimeout(a.proxy(this.checkPosition, this), 1)
  741. }, c.prototype.checkPosition = function () {
  742. if (this.$element.is(":visible")) {
  743. var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = Math.max(a(document).height(), a(document.body).height());
  744. "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
  745. var h = this.getState(g, b, e, f);
  746. if (this.affixed != h) {
  747. null != this.unpin && this.$element.css("top", "");
  748. var i = "affix" + (h ? "-" + h : ""), j = a.Event(i + ".bs.affix");
  749. if (this.$element.trigger(j), j.isDefaultPrevented())return;
  750. this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")
  751. }
  752. "bottom" == h && this.$element.offset({top: g - b - f})
  753. }
  754. };
  755. var d = a.fn.affix;
  756. a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function () {
  757. return a.fn.affix = d, this
  758. }, a(window).on("load", function () {
  759. a('[data-spy="affix"]').each(function () {
  760. var c = a(this), d = c.data();
  761. d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)
  762. })
  763. })
  764. }(jQuery);