1 line
31 KiB
JavaScript
1 line
31 KiB
JavaScript
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(o){"use strict";o.fn.emulateTransitionEnd=function(t){var e=!1,i=this;o(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||o(i).trigger(o.support.transition.end)},t),this},o(function(){o.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}(),o.support.transition&&(o.event.special.bsTransitionEnd={bindType:o.support.transition.end,delegateType:o.support.transition.end,handle:function(t){if(o(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(n){"use strict";function o(t){n(t).on("click",e,this.close)}var e='[data-dismiss="alert"]';o.VERSION="3.2.0",o.prototype.close=function(t){var e=n(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,""));var o=n(i);function s(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.hasClass("alert")?e:e.parent()),o.trigger(t=n.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),n.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",s).emulateTransitionEnd(150):s())};var t=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var t=n(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new o(this)),"string"==typeof i&&e[i].call(t)})},n.fn.alert.Constructor=o,n.fn.alert.noConflict=function(){return n.fn.alert=t,this},n(document).on("click.bs.alert.data-api",e,o.prototype.close)}(jQuery),function(n){"use strict";var s=function(t,e){this.$element=n(t),this.options=n.extend({},s.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=n(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new s(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}s.VERSION="3.2.0",s.DEFAULTS={loadingText:"loading..."},s.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",s=i.data();t+="Text",null==s.resetText&&i.data("resetText",i[o]()),i[o](null==s[t]?this.options[t]:s[t]),setTimeout(n.proxy(function(){"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e))},this),0)},s.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var t=n.fn.button;n.fn.button=i,n.fn.button.Constructor=s,n.fn.button.noConflict=function(){return n.fn.button=t,this},n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=n(t.target);e.hasClass("btn")||(e=e.closest(".btn")),i.call(e,"toggle"),t.preventDefault()})}(jQuery),function(d){"use strict";function n(t,e){this.$element=d(t).on("keydown.bs.carousel",d.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",d.proxy(this.pause,this)).on("mouseleave.bs.carousel",d.proxy(this.cycle,this))}function r(s){return this.each(function(){var t=d(this),e=t.data("bs.carousel"),i=d.extend({},n.DEFAULTS,t.data(),"object"==typeof s&&s),o="string"==typeof s?s:i.slide;e||t.data("bs.carousel",e=new n(this,i)),"number"==typeof s?e.to(s):o?e[o]():i.interval&&e.pause().cycle()})}n.VERSION="3.2.0",n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},n.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(d.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",d(this.$items[t]))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&d.support.transition&&(this.$element.trigger(d.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||i[t](),s=this.interval,n="next"==t?"left":"right",r="next"==t?"first":"last",a=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[r]()}if(o.hasClass("active"))return this.sliding=!1;var l=o[0],h=d.Event("slide.bs.carousel",{relatedTarget:l,direction:n});if(this.$element.trigger(h),!h.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=d(this.$indicators.children()[this.getItemIndex(o)]);p&&p.addClass("active")}var c=d.Event("slid.bs.carousel",{relatedTarget:l,direction:n});return d.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),o[0].offsetWidth,i.addClass(n),o.addClass(n),i.one("bsTransitionEnd",function(){o.removeClass([t,n].join(" ")).addClass("active"),i.removeClass(["active",n].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(1e3*i.css("transition-duration").slice(0,-1))):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(c)),s&&this.cycle(),this}};var t=d.fn.carousel;d.fn.carousel=r,d.fn.carousel.Constructor=n,d.fn.carousel.noConflict=function(){return d.fn.carousel=t,this},d(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var e,i=d(this),o=d(i.attr("data-target")||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var s=d.extend({},o.data(),i.data()),n=i.attr("data-slide-to");n&&(s.interval=!1),r.call(o,s),n&&o.data("bs.carousel").to(n),t.preventDefault()}}),d(window).on("load",function(){d('[data-ride="carousel"]').each(function(){var t=d(this);r.call(t,t.data())})})}(jQuery),function(h){"use strict";var s=function(t,e){this.$element=h(t),this.options=h.extend({},s.DEFAULTS,e),this.transitioning=null,this.options.parent&&(this.$parent=h(this.options.parent)),this.options.toggle&&this.toggle()};function p(o){return this.each(function(){var t=h(this),e=t.data("bs.collapse"),i=h.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&"show"==o&&(o=!o),e||t.data("bs.collapse",e=new s(this,i)),"string"==typeof o&&e[o]()})}s.VERSION="3.2.0",s.DEFAULTS={toggle:!0},s.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},s.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=h.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.$parent&&this.$parent.find("> .panel > .in");if(e&&e.length){var i=e.data("bs.collapse");if(i&&i.transitioning)return;p.call(e,"hide"),i||e.data("bs.collapse",null)}var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!h.support.transition)return s.call(this);var n=h.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",h.proxy(s,this)).emulateTransitionEnd(350)[o](this.$element[0][n])}}},s.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=h.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!h.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",h.proxy(i,this)).emulateTransitionEnd(350)}}},s.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var t=h.fn.collapse;h.fn.collapse=p,h.fn.collapse.Constructor=s,h.fn.collapse.noConflict=function(){return h.fn.collapse=t,this},h(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e,i=h(this),o=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),s=h(o),n=s.data("bs.collapse"),r=n?"toggle":i.data(),a=i.attr("data-parent"),l=a&&h(a);n&&n.transitioning||(l&&l.find('[data-toggle="collapse"][data-parent="'+a+'"]').not(i).addClass("collapsed"),i[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),p.call(s,r)})}(jQuery),function(a){"use strict";function o(t){a(t).on("click.bs.dropdown",this.toggle)}var l='[data-toggle="dropdown"]';function n(i){i&&3===i.which||(a(".dropdown-backdrop").remove(),a(l).each(function(){var t=h(a(this)),e={relatedTarget:this};t.hasClass("open")&&(t.trigger(i=a.Event("hide.bs.dropdown",e)),i.isDefaultPrevented()||t.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function h(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i=e&&a(e);return i&&i.length?i:t.parent()}o.VERSION="3.2.0",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=h(e),o=i.hasClass("open");if(n(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",n);var s={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",s)),t.isDefaultPrevented())return;e.trigger("focus"),i.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},o.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=h(e),o=i.hasClass("open");if(!o||o&&27==t.keyCode)return 27==t.which&&i.find(l).trigger("focus"),e.trigger("click");var s=" li:not(.divider):visible a",n=i.find('[role="menu"]'+s+', [role="listbox"]'+s);if(n.length){var r=n.index(n.filter(":focus"));38==t.keyCode&&0<r&&r--,40==t.keyCode&&r<n.length-1&&r++,~r||(r=0),n.eq(r).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",l,o.prototype.toggle).on("keydown.bs.dropdown.data-api",l+', [role="menu"], [role="listbox"]',o.prototype.keydown)}(jQuery),function(n){"use strict";function r(t,e){this.options=e,this.$body=n(document.body),this.$element=n(t),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))}function a(o,s){return this.each(function(){var t=n(this),e=t.data("bs.modal"),i=n.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new r(this,i)),"string"==typeof o?e[o](s):i.show&&e.show(s)})}r.VERSION="3.2.0",r.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},r.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},r.prototype.show=function(i){var o=this,t=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.backdrop(function(){var t=n.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),t&&o.$element[0].offsetWidth,o.$element.addClass("in").attr("aria-hidden",!1),o.enforceFocus();var e=n.Event("shown.bs.modal",{relatedTarget:i});t?o.$element.find(".modal-dialog").one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(300):o.$element.trigger("focus").trigger(e)}))},r.prototype.hide=function(t){t&&t.preventDefault(),t=n.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},r.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},r.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",n.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},r.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden.bs.modal")})},r.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},r.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=n.support.transition&&i;if(this.$backdrop=n('<div class="modal-backdrop '+i+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(150):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){e.removeBackdrop(),t&&t()};n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(150):s()}else t&&t()},r.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},r.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},r.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},r.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=n.fn.modal;n.fn.modal=a,n.fn.modal.Constructor=r,n.fn.modal.noConflict=function(){return n.fn.modal=t,this},n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=n(this),i=e.attr("href"),o=n(e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),s=o.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(i)&&i},o.data(),e.data());e.is("a")&&t.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),a.call(o,s,this)})}(jQuery),function(v){"use strict";function s(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)}s.VERSION="3.2.0",s.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},s.prototype.init=function(t,e,i){this.enabled=!0,this.type=t,this.$element=v(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&v(this.options.viewport.selector||this.options.viewport);for(var o=this.options.trigger.split(" "),s=o.length;s--;){var n=o[s];if("click"==n)this.$element.on("click."+this.type,this.options.selector,v.proxy(this.toggle,this));else if("manual"!=n){var r="hover"==n?"mouseenter":"focusin",a="hover"==n?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,v.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,v.proxy(this.leave,this))}}this.options.selector?this._options=v.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(t){return(t=v.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},s.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&v.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},s.prototype.enter=function(t){var e=t instanceof this.constructor?t:v(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),v(t.currentTarget).data("bs."+this.type,e)),clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)},s.prototype.leave=function(t){var e=t instanceof this.constructor?t:v(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),v(t.currentTarget).data("bs."+this.type,e)),clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)},s.prototype.show=function(){var t=v.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=v.contains(document.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var n="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,a=r.test(n);a&&(n=n.replace(r,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(n).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var l=this.getPosition(),h=o[0].offsetWidth,p=o[0].offsetHeight;if(a){var c=n,d=this.$element.parent(),f=this.getPosition(d);n="bottom"==n&&l.top+l.height+p-f.scroll>f.height?"top":"top"==n&&l.top-f.scroll-p<0?"bottom":"right"==n&&l.right+h>f.width?"left":"left"==n&&l.left-h<f.left?"right":n,o.removeClass(c).addClass(n)}var u=this.getCalculatedOffset(n,l,h,p);this.applyPlacement(u,n);var g=function(){i.$element.trigger("shown.bs."+i.type),i.hoverState=null};v.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",g).emulateTransitionEnd(150):g()}},s.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,s=i[0].offsetHeight,n=parseInt(i.css("margin-top"),10),r=parseInt(i.css("margin-left"),10);isNaN(n)&&(n=0),isNaN(r)&&(r=0),t.top=t.top+n,t.left=t.left+r,v.offset.setOffset(i[0],v.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var a=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=s&&(t.top=t.top+s-l);var h=this.getViewportAdjustedDelta(e,t,a,l);h.left?t.left+=h.left:t.top+=h.top;var p=h.left?2*h.left-o+a:2*h.top-s+l,c=h.left?"left":"top",d=h.left?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][d],c)},s.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},s.prototype.hide=function(){var t=this,e=this.tip(),i=v.Event("hide.bs."+this.type);function o(){"in"!=t.hoverState&&e.detach(),t.$element.trigger("hidden.bs."+t.type)}if(this.$element.removeAttr("aria-describedby"),this.$element.trigger(i),!i.isDefaultPrevented())return e.removeClass("in"),v.support.transition&&this.$tip.hasClass("fade")?e.one("bsTransitionEnd",o).emulateTransitionEnd(150):o(),this.hoverState=null,this},s.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},s.prototype.hasContent=function(){return this.getTitle()},s.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName;return v.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():null,{scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop(),width:i?v(window).width():t.outerWidth(),height:i?v(window).height():t.outerHeight()},i?{top:0,left:0}:t.offset())},s.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},s.prototype.getViewportAdjustedDelta=function(t,e,i,o){var s={top:0,left:0};if(!this.$viewport)return s;var n=this.options.viewport&&this.options.viewport.padding||0,r=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-n-r.scroll,l=e.top+n-r.scroll+o;a<r.top?s.top=r.top-a:l>r.top+r.height&&(s.top=r.top+r.height-l)}else{var h=e.left-n,p=e.left+n+i;h<r.left?s.left=r.left-h:p>r.width&&(s.left=r.left+r.width-p)}return s},s.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},s.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},s.prototype.tip=function(){return this.$tip=this.$tip||v(this.options.template)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},s.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.prototype.toggle=function(t){var e=this;t&&((e=v(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),v(t.currentTarget).data("bs."+this.type,e))),e.tip().hasClass("in")?e.leave(e):e.enter(e)},s.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var t=v.fn.tooltip;v.fn.tooltip=function(o){return this.each(function(){var t=v(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;(e||"destroy"!=o)&&(e||t.data("bs.tooltip",e=new s(this,i)),"string"==typeof o&&e[o]())})},v.fn.tooltip.Constructor=s,v.fn.tooltip.noConflict=function(){return v.fn.tooltip=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.init("popover",t,e)}if(!s.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.2.0",n.DEFAULTS=s.extend({},s.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((n.prototype=s.extend({},s.fn.tooltip.Constructor.prototype)).constructor=n).prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").empty()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},n.prototype.tip=function(){return this.$tip||(this.$tip=s(this.options.template)),this.$tip};var t=s.fn.popover;s.fn.popover=function(o){return this.each(function(){var t=s(this),e=t.data("bs.popover"),i="object"==typeof o&&o;(e||"destroy"!=o)&&(e||t.data("bs.popover",e=new n(this,i)),"string"==typeof o&&e[o]())})},s.fn.popover.Constructor=n,s.fn.popover.noConflict=function(){return s.fn.popover=t,this}}(jQuery),function(n){"use strict";function s(t,e){var i=n.proxy(this.process,this);this.$body=n("body"),this.$scrollElement=n(t).is("body")?n(window):n(t),this.options=n.extend({},s.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",i),this.refresh(),this.process()}function e(o){return this.each(function(){var t=n(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new s(this,i)),"string"==typeof o&&e[o]()})}s.VERSION="3.2.0",s.DEFAULTS={offset:10},s.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},s.prototype.refresh=function(){var o="offset",s=0;n.isWindow(this.$scrollElement[0])||(o="position",s=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var t=this;this.$body.find(this.selector).map(function(){var t=n(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&n(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+s,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},s.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),s=this.offsets,n=this.targets,r=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return r!=(t=n[n.length-1])&&this.activate(t);if(r&&e<=s[0])return r!=(t=n[0])&&this.activate(t);for(t=s.length;t--;)r!=n[t]&&e>=s[t]&&(!s[t+1]||e<=s[t+1])&&this.activate(n[t])},s.prototype.activate=function(t){this.activeTarget=t,n(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var t=n.fn.scrollspy;n.fn.scrollspy=e,n.fn.scrollspy.Constructor=s,n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=t,this},n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";function o(t){this.element=r(t)}function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new o(this)),"string"==typeof i&&e[i]()})}o.VERSION="3.2.0",o.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a")[0],s=r.Event("show.bs.tab",{relatedTarget:o});if(t.trigger(s),!s.isDefaultPrevented()){var n=r(i);this.activate(t.closest("li"),e),this.activate(n,n.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:o})})}}},o.prototype.activate=function(t,e,i){var o=e.find("> .active"),s=i&&r.support.transition&&o.hasClass("fade");function n(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}s?o.one("bsTransitionEnd",n).emulateTransitionEnd(150):n(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=o,r.fn.tab.noConflict=function(){return r.fn.tab=t,this},r(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e.call(r(this),"show")})}(jQuery),function(h){"use strict";var p=function(t,e){this.options=h.extend({},p.DEFAULTS,e),this.$target=h(this.options.target).on("scroll.bs.affix.data-api",h.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",h.proxy(this.checkPositionWithEventLoop,this)),this.$element=h(t),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=h(this),e=t.data("bs.affix"),i="object"==typeof o&&o;e||t.data("bs.affix",e=new p(this,i)),"string"==typeof o&&e[o]()})}p.VERSION="3.2.0",p.RESET="affix affix-top affix-bottom",p.DEFAULTS={offset:0,target:window},p.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(p.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},p.prototype.checkPositionWithEventLoop=function(){setTimeout(h.proxy(this.checkPosition,this),1)},p.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=h(document).height(),e=this.$target.scrollTop(),i=this.$element.offset(),o=this.options.offset,s=o.top,n=o.bottom;"object"!=typeof o&&(n=s=o),"function"==typeof s&&(s=o.top(this.$element)),"function"==typeof n&&(n=o.bottom(this.$element));var r=!(null!=this.unpin&&e+this.unpin<=i.top)&&(null!=n&&i.top+this.$element.height()>=t-n?"bottom":null!=s&&e<=s&&"top");if(this.affixed!==r){null!=this.unpin&&this.$element.css("top","");var a="affix"+(r?"-"+r:""),l=h.Event(a+".bs.affix");this.$element.trigger(l),l.isDefaultPrevented()||(this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(p.RESET).addClass(a).trigger(h.Event(a.replace("affix","affixed"))),"bottom"==r&&this.$element.offset({top:t-this.$element.height()-n}))}}};var t=h.fn.affix;h.fn.affix=i,h.fn.affix.Constructor=p,h.fn.affix.noConflict=function(){return h.fn.affix=t,this},h(window).on("load",function(){h(".article__toc").animate({left:h(".site").outerWidth()+h(".site").offset().left+"px"},600),h('[data-spy="affix"]').each(function(){var t=h(this),e=t.data();e.offset=e.offset||{},e.offsetBottom&&(e.offset.bottom=e.offsetBottom),e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery); |