Advertisement
kosx

Fly

Jan 7th, 2021
1,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function(t) {
  2.     "use strict";
  3.     var e = function(o, i) {
  4.         this.$element = t(o),
  5.         this.options = t.extend({}, e.DEFAULTS, i),
  6.         this.isLoading = !1
  7.     };
  8.     e.DEFAULTS = {
  9.         loadingText: "loading..."
  10.     },
  11.     e.prototype.setState = function(e) {
  12.         var o = "disabled"
  13.           , i = this.$element
  14.           , n = i.is("input") ? "val" : "html"
  15.           , s = i.data();
  16.         e += "Text",
  17.         s.resetText || i.data("resetText", i[n]()),
  18.         i[n](s[e] || this.options[e]),
  19.         setTimeout(t.proxy(function() {
  20.             "loadingText" == e ? (this.isLoading = !0,
  21.             i.addClass(o).attr(o, o)) : this.isLoading && (this.isLoading = !1,
  22.             i.removeClass(o).removeAttr(o))
  23.         }, this), 0)
  24.     }
  25.     ,
  26.     e.prototype.toggle = function() {
  27.         var t = !0
  28.           , e = this.$element.closest('[data-toggle="buttons"]');
  29.         if (e.length) {
  30.             var o = this.$element.find("input");
  31.             "radio" == o.prop("type") && (o.prop("checked") && this.$element.hasClass("active") ? t = !1 : e.find(".active").removeClass("active")),
  32.             t && o.prop("checked", !this.$element.hasClass("active")).trigger("change")
  33.         }
  34.         t && this.$element.toggleClass("active")
  35.     }
  36.     ;
  37.     var o = t.fn.button;
  38.     t.fn.button = function(o) {
  39.         return this.each(function() {
  40.             var i = t(this)
  41.               , n = i.data("bs.button")
  42.               , s = "object" == typeof o && o;
  43.             n || i.data("bs.button", n = new e(this,s)),
  44.             "toggle" == o ? n.toggle() : o && n.setState(o)
  45.         })
  46.     }
  47.     ,
  48.     t.fn.button.Constructor = e,
  49.     t.fn.button.noConflict = function() {
  50.         return t.fn.button = o,
  51.         this
  52.     }
  53.     ,
  54.     t(document).on("click.bs.button.data-api", "[data-toggle^=button]", function(e) {
  55.         var o = t(e.target);
  56.         o.hasClass("btn") || (o = o.closest(".btn")),
  57.         o.button("toggle"),
  58.         e.preventDefault()
  59.     })
  60. }(jQuery),
  61. function(t) {
  62.     "use strict";
  63.     var e = function(o, i) {
  64.         this.$element = t(o),
  65.         this.options = t.extend({}, e.DEFAULTS, i),
  66.         this.transitioning = null,
  67.         this.options.parent && (this.$parent = t(this.options.parent)),
  68.         this.options.toggle && this.toggle()
  69.     };
  70.     e.DEFAULTS = {
  71.         toggle: !0
  72.     },
  73.     e.prototype.dimension = function() {
  74.         var t = this.$element.hasClass("width");
  75.         return t ? "width" : "height"
  76.     }
  77.     ,
  78.     e.prototype.show = function() {
  79.         if (!this.transitioning && !this.$element.hasClass("in")) {
  80.             var e = t.Event("show.bs.collapse");
  81.             if (this.$element.trigger(e),
  82.             !e.isDefaultPrevented()) {
  83.                 var o = this.$parent && this.$parent.find("> .panel > .in");
  84.                 if (o && o.length) {
  85.                     var i = o.data("bs.collapse");
  86.                     if (i && i.transitioning)
  87.                         return;
  88.                     o.collapse("hide"),
  89.                     i || o.data("bs.collapse", null)
  90.                 }
  91.                 var n = this.dimension();
  92.                 this.$element.removeClass("collapse").addClass("collapsing")[n](0),
  93.                 this.transitioning = 1;
  94.                 var s = function() {
  95.                     this.$element.removeClass("collapsing").addClass("collapse in")[n]("auto"),
  96.                     this.transitioning = 0,
  97.                     this.$element.trigger("shown.bs.collapse")
  98.                 };
  99.                 if (!t.support.transition)
  100.                     return s.call(this);
  101.                 var a = t.camelCase(["scroll", n].join("-"));
  102.                 this.$element.one(t.support.transition.end, t.proxy(s, this)).emulateTransitionEnd(350)[n](this.$element[0][a])
  103.             }
  104.         }
  105.     }
  106.     ,
  107.     e.prototype.hide = function() {
  108.         if (!this.transitioning && this.$element.hasClass("in")) {
  109.             var e = t.Event("hide.bs.collapse");
  110.             if (this.$element.trigger(e),
  111.             !e.isDefaultPrevented()) {
  112.                 var o = this.dimension();
  113.                 this.$element[o](this.$element[o]())[0].offsetHeight,
  114.                 this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),
  115.                 this.transitioning = 1;
  116.                 var i = function() {
  117.                     this.transitioning = 0,
  118.                     this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")
  119.                 };
  120.                 if (!t.support.transition)
  121.                     return i.call(this);
  122.                 this.$element[o](0).one(t.support.transition.end, t.proxy(i, this)).emulateTransitionEnd(350)
  123.             }
  124.         }
  125.     }
  126.     ,
  127.     e.prototype.toggle = function() {
  128.         this[this.$element.hasClass("in") ? "hide" : "show"]()
  129.     }
  130.     ;
  131.     var o = t.fn.collapse;
  132.     t.fn.collapse = function(o) {
  133.         return this.each(function() {
  134.             var i = t(this)
  135.               , n = i.data("bs.collapse")
  136.               , s = t.extend({}, e.DEFAULTS, i.data(), "object" == typeof o && o);
  137.             !n && s.toggle && "show" == o && (o = !o),
  138.             n || i.data("bs.collapse", n = new e(this,s)),
  139.             "string" == typeof o && n[o]()
  140.         })
  141.     }
  142.     ,
  143.     t.fn.collapse.Constructor = e,
  144.     t.fn.collapse.noConflict = function() {
  145.         return t.fn.collapse = o,
  146.         this
  147.     }
  148.     ,
  149.     t(document).on("click.bs.collapse.data-api", "[data-toggle=collapse]", function(e) {
  150.         var o, i = t(this), n = i.attr("data-target") || e.preventDefault() || (o = i.attr("href")) && o.replace(/.*(?=#[^\s]+$)/, ""), s = t(n), a = s.data("bs.collapse"), r = a ? "toggle" : i.data(), l = i.attr("data-parent"), p = l && t(l);
  151.         a && a.transitioning || (p && p.find('[data-toggle=collapse][data-parent="' + l + '"]').not(i).addClass("collapsed"),
  152.         i[s.hasClass("in") ? "addClass" : "removeClass"]("collapsed")),
  153.         s.collapse(r)
  154.     })
  155. }(jQuery),
  156. function(t) {
  157.     "use strict";
  158.     var e = ".dropdown-backdrop"
  159.       , o = "[data-toggle=dropdown]"
  160.       , i = function(e) {
  161.         t(e).on("click.bs.dropdown", this.toggle)
  162.     };
  163.     function n(i) {
  164.         t(e).remove(),
  165.         t(o).each(function() {
  166.             var e = s(t(this))
  167.               , o = {
  168.                 relatedTarget: this,
  169.                 triggerTarget: null != i && i.currentTarget
  170.             };
  171.             e.hasClass("open") && (e.trigger(i = t.Event("hide.bs.dropdown", o)),
  172.             i.isDefaultPrevented() || e.removeClass("open").removeClass("active").trigger("hidden.bs.dropdown", o))
  173.         })
  174.     }
  175.     function s(e) {
  176.         var o = e.attr("data-target");
  177.         o || (o = e.attr("href"),
  178.         o = o && /#[A-Za-z]/.test(o) && o.replace(/.*(?=#[^\s]*$)/, ""));
  179.         var i = o && t(o);
  180.         return i && i.length ? i : e.parent()
  181.     }
  182.     i.prototype.toggle = function(e) {
  183.         var o = t(this);
  184.         if (!o.is(".disabled, :disabled")) {
  185.             var i = s(o)
  186.               , a = i.hasClass("open");
  187.             if (n(e),
  188.             !a) {
  189.                 "ontouchstart"in document.documentElement && !i.closest(".navbar-nav").length && t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click", n);
  190.                 var r = {
  191.                     relatedTarget: this
  192.                 };
  193.                 if (i.trigger(e = t.Event("show.bs.dropdown", r)),
  194.                 e.isDefaultPrevented())
  195.                     return;
  196.                 i.toggleClass("open").trigger("shown.bs.dropdown", r),
  197.                 o.focus()
  198.             }
  199.             return !1
  200.         }
  201.     }
  202.     ,
  203.     i.prototype.keydown = function(e) {
  204.         if (/(38|40|27)/.test(e.keyCode)) {
  205.             var i = t(this);
  206.             if (e.preventDefault(),
  207.             e.stopPropagation(),
  208.             !i.is(".disabled, :disabled")) {
  209.                 var n = s(i)
  210.                   , a = n.hasClass("open");
  211.                 if (!a || a && 27 == e.keyCode)
  212.                     return 27 == e.which && n.find(o).focus(),
  213.                     i.click();
  214.                 var r = " li:not(.divider):visible a"
  215.                   , l = n.find("[role=menu]" + r + ", [role=listbox]" + r);
  216.                 if (l.length) {
  217.                     var p = l.index(l.filter(":focus"));
  218.                     38 == e.keyCode && p > 0 && p--,
  219.                     40 == e.keyCode && p < l.length - 1 && p++,
  220.                     ~p || (p = 0),
  221.                     l.eq(p).focus()
  222.                 }
  223.             }
  224.         }
  225.     }
  226.     ;
  227.     var a = t.fn.dropdown;
  228.     t.fn.dropdown = function(e) {
  229.         return this.each(function() {
  230.             var o = t(this)
  231.               , n = o.data("bs.dropdown");
  232.             n || o.data("bs.dropdown", n = new i(this)),
  233.             "string" == typeof e && n[e].call(o)
  234.         })
  235.     }
  236.     ,
  237.     t.fn.dropdown.Constructor = i,
  238.     t.fn.dropdown.noConflict = function() {
  239.         return t.fn.dropdown = a,
  240.         this
  241.     }
  242.     ,
  243.     t(document).on("click.bs.dropdown.data-api", n).on("click.bs.dropdown.data-api", ".dropdown form", function(t) {
  244.         t.stopPropagation()
  245.     }).on("click.bs.dropdown.data-api", o, i.prototype.toggle).on("keydown.bs.dropdown.data-api", o + ", [role=menu], [role=listbox]", i.prototype.keydown)
  246. }(jQuery),
  247. function(t) {
  248.     "use strict";
  249.     var e = function(t, e) {
  250.         this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null,
  251.         this.init("tooltip", t, e)
  252.     };
  253.     e.DEFAULTS = {
  254.         animation: !0,
  255.         placement: "top",
  256.         selector: !1,
  257.         template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
  258.         trigger: "hover focus",
  259.         title: "",
  260.         delay: 0,
  261.         html: !1,
  262.         container: !1
  263.     },
  264.     e.prototype.init = function(e, o, i) {
  265.         this.enabled = !0,
  266.         this.type = e,
  267.         this.$element = t(o),
  268.         this.options = this.getOptions(i);
  269.         for (var n = this.options.trigger.split(" "), s = n.length; s--; ) {
  270.             var a = n[s];
  271.             if ("click" == a)
  272.                 this.$element.on("click." + this.type, this.options.selector, t.proxy(this.toggle, this));
  273.             else if ("manual" != a) {
  274.                 var r = "hover" == a ? "mouseenter" : "focusin"
  275.                   , l = "hover" == a ? "mouseleave" : "focusout";
  276.                 this.$element.on(r + "." + this.type, this.options.selector, t.proxy(this.enter, this)),
  277.                 this.$element.on(l + "." + this.type, this.options.selector, t.proxy(this.leave, this))
  278.             }
  279.         }
  280.         this.options.selector ? this._options = t.extend({}, this.options, {
  281.             trigger: "manual",
  282.             selector: ""
  283.         }) : this.fixTitle()
  284.     }
  285.     ,
  286.     e.prototype.getDefaults = function() {
  287.         return e.DEFAULTS
  288.     }
  289.     ,
  290.     e.prototype.getOptions = function(e) {
  291.         return e = t.extend({}, this.getDefaults(), this.$element.data(), e),
  292.         e.delay && "number" == typeof e.delay && (e.delay = {
  293.             show: e.delay,
  294.             hide: e.delay
  295.         }),
  296.         e
  297.     }
  298.     ,
  299.     e.prototype.getDelegateOptions = function() {
  300.         var e = {}
  301.           , o = this.getDefaults();
  302.         return this._options && t.each(this._options, function(t, i) {
  303.             o[t] != i && (e[t] = i)
  304.         }),
  305.         e
  306.     }
  307.     ,
  308.     e.prototype.enter = function(e) {
  309.         var o = e instanceof this.constructor ? e : t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
  310.         if (clearTimeout(o.timeout),
  311.         o.hoverState = "in",
  312.         !o.options.delay || !o.options.delay.show)
  313.             return o.show();
  314.         o.timeout = setTimeout(function() {
  315.             "in" == o.hoverState && o.show()
  316.         }, o.options.delay.show)
  317.     }
  318.     ,
  319.     e.prototype.leave = function(e) {
  320.         var o = e instanceof this.constructor ? e : t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type);
  321.         if (clearTimeout(o.timeout),
  322.         o.hoverState = "out",
  323.         !o.options.delay || !o.options.delay.hide)
  324.             return o.hide();
  325.         o.timeout = setTimeout(function() {
  326.             "out" == o.hoverState && o.hide()
  327.         }, o.options.delay.hide)
  328.     }
  329.     ,
  330.     e.prototype.show = function() {
  331.         var e = t.Event("show.bs." + this.type);
  332.         if (this.hasContent() && this.enabled) {
  333.             if (this.$element.trigger(e),
  334.             e.isDefaultPrevented())
  335.                 return;
  336.             var o = this
  337.               , i = this.tip();
  338.             this.setContent(),
  339.             this.options.animation && i.addClass("fade");
  340.             var n = "function" == typeof this.options.placement ? this.options.placement.call(this, i[0], this.$element[0]) : this.options.placement
  341.               , s = /\s?auto?\s?/i
  342.               , a = s.test(n);
  343.             a && (n = n.replace(s, "") || "top"),
  344.             i.detach().css({
  345.                 top: 0,
  346.                 left: 0,
  347.                 display: "block"
  348.             }).addClass(n),
  349.             this.options.container ? i.appendTo(this.options.container) : i.insertAfter(this.$element);
  350.             var r = this.getPosition()
  351.               , l = i[0].offsetWidth
  352.               , p = i[0].offsetHeight;
  353.             if (a) {
  354.                 var h = this.$element.parent()
  355.                   , d = n
  356.                   , c = document.documentElement.scrollTop || document.body.scrollTop
  357.                   , f = "body" == this.options.container ? window.innerWidth : h.outerWidth()
  358.                   , u = "body" == this.options.container ? window.innerHeight : h.outerHeight()
  359.                   , g = "body" == this.options.container ? 0 : h.offset().left;
  360.                 n = "bottom" == n && r.top + r.height + p - c > u ? "top" : "top" == n && r.top - c - p < 0 ? "bottom" : "right" == n && r.right + l > f ? "left" : "left" == n && r.left - l < g ? "right" : n,
  361.                 i.removeClass(d).addClass(n)
  362.             }
  363.             var v = this.getCalculatedOffset(n, r, l, p);
  364.             this.applyPlacement(v, n),
  365.             this.hoverState = null;
  366.             var m = function() {
  367.                 o.$element.trigger("shown.bs." + o.type)
  368.             };
  369.             t.support.transition && this.$tip.hasClass("fade") ? i.one(t.support.transition.end, m).emulateTransitionEnd(150) : m()
  370.         }
  371.     }
  372.     ,
  373.     e.prototype.applyPlacement = function(e, o) {
  374.         var i, n = this.tip(), s = n[0].offsetWidth, a = n[0].offsetHeight, r = parseInt(n.css("margin-top"), 10), l = parseInt(n.css("margin-left"), 10);
  375.         isNaN(r) && (r = 0),
  376.         isNaN(l) && (l = 0),
  377.         e.top = e.top + r,
  378.         e.left = e.left + l,
  379.         t.offset.setOffset(n[0], t.extend({
  380.             using: function(t) {
  381.                 n.css({
  382.                     top: Math.round(t.top),
  383.                     left: Math.round(t.left)
  384.                 })
  385.             }
  386.         }, e), 0),
  387.         n.addClass("in");
  388.         var p = n[0].offsetWidth
  389.           , h = n[0].offsetHeight;
  390.         if ("top" == o && h != a && (i = !0,
  391.         e.top = e.top + a - h),
  392.         /bottom|top/.test(o)) {
  393.             var d = 0;
  394.             e.left < 0 && (d = -2 * e.left,
  395.             e.left = 0,
  396.             n.offset(e),
  397.             p = n[0].offsetWidth,
  398.             h = n[0].offsetHeight),
  399.             this.replaceArrow(d - s + p, p, "left")
  400.         } else
  401.             this.replaceArrow(h - a, h, "top");
  402.         i && n.offset(e)
  403.     }
  404.     ,
  405.     e.prototype.replaceArrow = function(t, e, o) {
  406.         this.arrow().css(o, t ? 50 * (1 - t / e) + "%" : "")
  407.     }
  408.     ,
  409.     e.prototype.setContent = function() {
  410.         var t = this.tip()
  411.           , e = this.getTitle();
  412.         t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e),
  413.         t.removeClass("fade in top bottom left right")
  414.     }
  415.     ,
  416.     e.prototype.hide = function() {
  417.         var e = this
  418.           , o = this.tip()
  419.           , i = t.Event("hide.bs." + this.type);
  420.         function n() {
  421.             "in" != e.hoverState && o.detach(),
  422.             e.$element.trigger("hidden.bs." + e.type)
  423.         }
  424.         if (this.$element.trigger(i),
  425.         !i.isDefaultPrevented())
  426.             return o.removeClass("in"),
  427.             t.support.transition && this.$tip.hasClass("fade") ? o.one(t.support.transition.end, n).emulateTransitionEnd(150) : n(),
  428.             this.hoverState = null,
  429.             this
  430.     }
  431.     ,
  432.     e.prototype.fixTitle = function() {
  433.         var t = this.$element;
  434.         (t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "")
  435.     }
  436.     ,
  437.     e.prototype.hasContent = function() {
  438.         return this.getTitle()
  439.     }
  440.     ,
  441.     e.prototype.getPosition = function() {
  442.         var e = this.$element[0];
  443.         return t.extend({}, "function" == typeof e.getBoundingClientRect ? e.getBoundingClientRect() : {
  444.             width: e.offsetWidth,
  445.             height: e.offsetHeight
  446.         }, this.$element.offset())
  447.     }
  448.     ,
  449.     e.prototype.getCalculatedOffset = function(t, e, o, i) {
  450.         return "bottom" == t ? {
  451.             top: e.top + e.height,
  452.             left: e.left + e.width / 2 - o / 2
  453.         } : "top" == t ? {
  454.             top: e.top - i,
  455.             left: e.left + e.width / 2 - o / 2
  456.         } : "left" == t ? {
  457.             top: e.top + e.height / 2 - i / 2,
  458.             left: e.left - o
  459.         } : {
  460.             top: e.top + e.height / 2 - i / 2,
  461.             left: e.left + e.width
  462.         }
  463.     }
  464.     ,
  465.     e.prototype.getTitle = function() {
  466.         var t, e = this.$element, o = this.options;
  467.         return t = e.attr("data-original-title") || ("function" == typeof o.title ? o.title.call(e[0]) : o.title),
  468.         t
  469.     }
  470.     ,
  471.     e.prototype.tip = function() {
  472.         return this.$tip = this.$tip || t(this.options.template)
  473.     }
  474.     ,
  475.     e.prototype.arrow = function() {
  476.         return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
  477.     }
  478.     ,
  479.     e.prototype.validate = function() {
  480.         this.$element[0].parentNode || (this.hide(),
  481.         this.$element = null,
  482.         this.options = null)
  483.     }
  484.     ,
  485.     e.prototype.enable = function() {
  486.         this.enabled = !0
  487.     }
  488.     ,
  489.     e.prototype.disable = function() {
  490.         this.enabled = !1
  491.     }
  492.     ,
  493.     e.prototype.toggleEnabled = function() {
  494.         this.enabled = !this.enabled
  495.     }
  496.     ,
  497.     e.prototype.toggle = function(e) {
  498.         var o = e ? t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs." + this.type) : this;
  499.         o.tip().hasClass("in") ? o.leave(o) : o.enter(o)
  500.     }
  501.     ,
  502.     e.prototype.destroy = function() {
  503.         clearTimeout(this.timeout),
  504.         this.hide().$element.off("." + this.type).removeData("bs." + this.type)
  505.     }
  506.     ;
  507.     var o = t.fn.tooltip;
  508.     t.fn.tooltip = function(o) {
  509.         return this.each(function() {
  510.             var i = t(this)
  511.               , n = i.data("bs.tooltip")
  512.               , s = "object" == typeof o && o;
  513.             (n || "destroy" != o) && (n || i.data("bs.tooltip", n = new e(this,s)),
  514.             "string" == typeof o && n[o]())
  515.         })
  516.     }
  517.     ,
  518.     t.fn.tooltip.Constructor = e,
  519.     t.fn.tooltip.noConflict = function() {
  520.         return t.fn.tooltip = o,
  521.         this
  522.     }
  523. }(jQuery),
  524. function(t) {
  525.     "use strict";
  526.     var e = function(t, e) {
  527.         this.init("popover", t, e)
  528.     };
  529.     if (!t.fn.tooltip)
  530.         throw new Error("Popover requires tooltip.js");
  531.     e.DEFAULTS = t.extend({}, t.fn.tooltip.Constructor.DEFAULTS, {
  532.         placement: "right",
  533.         trigger: "click",
  534.         content: "",
  535.         template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
  536.     }),
  537.     e.prototype = t.extend({}, t.fn.tooltip.Constructor.prototype),
  538.     e.prototype.constructor = e,
  539.     e.prototype.getDefaults = function() {
  540.         return e.DEFAULTS
  541.     }
  542.     ,
  543.     e.prototype.setContent = function() {
  544.         var t = this.tip()
  545.           , e = this.getTitle()
  546.           , o = this.getContent();
  547.         t.find(".popover-title")[this.options.html ? "html" : "text"](e),
  548.         t.find(".popover-content")[this.options.html ? "string" == typeof o ? "html" : "append" : "text"](o),
  549.         t.removeClass("fade top bottom left right in"),
  550.         t.find(".popover-title").html() || t.find(".popover-title").hide()
  551.     }
  552.     ,
  553.     e.prototype.hasContent = function() {
  554.         return this.getTitle() || this.getContent()
  555.     }
  556.     ,
  557.     e.prototype.getContent = function() {
  558.         var t = this.$element
  559.           , e = this.options;
  560.         return t.attr("data-content") || ("function" == typeof e.content ? e.content.call(t[0]) : e.content)
  561.     }
  562.     ,
  563.     e.prototype.arrow = function() {
  564.         return this.$arrow = this.$arrow || this.tip().find(".arrow")
  565.     }
  566.     ,
  567.     e.prototype.tip = function() {
  568.         return this.$tip || (this.$tip = t(this.options.template)),
  569.         this.$tip
  570.     }
  571.     ;
  572.     var o = t.fn.popover;
  573.     t.fn.popover = function(o) {
  574.         return this.each(function() {
  575.             var i = t(this)
  576.               , n = i.data("bs.popover")
  577.               , s = "object" == typeof o && o;
  578.             (n || "destroy" != o) && (n || i.data("bs.popover", n = new e(this,s)),
  579.             "string" == typeof o && n[o]())
  580.         })
  581.     }
  582.     ,
  583.     t.fn.popover.Constructor = e,
  584.     t.fn.popover.noConflict = function() {
  585.         return t.fn.popover = o,
  586.         this
  587.     }
  588. }(jQuery),
  589. function(t) {
  590.     "use strict";
  591.     var e = function(e) {
  592.         this.element = t(e)
  593.     };
  594.     e.prototype.show = function() {
  595.         var e = this.element
  596.           , o = e.closest("ul:not(.dropdown-menu)")
  597.           , i = e.data("target");
  598.         if (i || (i = e.attr("href"),
  599.         i = i && i.replace(/.*(?=#[^\s]*$)/, "")),
  600.         !e.parent("li").hasClass("active")) {
  601.             var n = o.find(".active:last a")[0]
  602.               , s = t.Event("show.bs.tab", {
  603.                 relatedTarget: n
  604.             });
  605.             if (e.trigger(s),
  606.             !s.isDefaultPrevented()) {
  607.                 var a = t(i);
  608.                 this.activate(e.parent("li"), o),
  609.                 this.activate(a, a.parent(), function() {
  610.                     e.trigger({
  611.                         type: "shown.bs.tab",
  612.                         relatedTarget: n
  613.                     })
  614.                 })
  615.             }
  616.         }
  617.     }
  618.     ,
  619.     e.prototype.activate = function(e, o, i) {
  620.         var n = o.find("> .active")
  621.           , s = i && t.support.transition && n.hasClass("fade");
  622.         function a() {
  623.             n.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),
  624.             e.addClass("active"),
  625.             s ? (e[0].offsetWidth,
  626.             e.addClass("in")) : e.removeClass("fade"),
  627.             e.parent(".dropdown-menu") && e.closest("li.dropdown").addClass("active"),
  628.             i && i()
  629.         }
  630.         s ? n.one(t.support.transition.end, a).emulateTransitionEnd(150) : a(),
  631.         n.removeClass("in")
  632.     }
  633.     ;
  634.     var o = t.fn.tab;
  635.     t.fn.tab = function(o) {
  636.         return this.each(function() {
  637.             var i = t(this)
  638.               , n = i.data("bs.tab");
  639.             n || i.data("bs.tab", n = new e(this)),
  640.             "string" == typeof o && n[o]()
  641.         })
  642.     }
  643.     ,
  644.     t.fn.tab.Constructor = e,
  645.     t.fn.tab.noConflict = function() {
  646.         return t.fn.tab = o,
  647.         this
  648.     }
  649.     ,
  650.     t(document).on("click.bs.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function(e) {
  651.         e.preventDefault(),
  652.         t(this).tab("show")
  653.     })
  654. }(jQuery);
  655.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement