mirror of
https://github.com/YunoHost-Apps/webtrees_ynh.git
synced 2024-09-03 18:26:37 +02:00
1 line
No EOL
36 KiB
JavaScript
1 line
No EOL
36 KiB
JavaScript
if("undefined"==typeof jQuery){throw Error("Bootstrap's JavaScript requires jQuery")}+function(a){a=a.fn.jquery.split(" ")[0].split(".");if(2>a[0]&&9>a[1]||1==a[0]&&9==a[1]&&1>a[2]||2<a[0]){throw Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}}(jQuery);+function(b){function a(){var f=document.createElement("bootstrap"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},e;for(e in d){if(void 0!==f.style[e]){return{end:d[e]}}}return !1}b.fn.emulateTransitionEnd=function(f){var c=!1,d=this;b(this).one("bsTransitionEnd",function(){c=!0});return setTimeout(function(){c||b(d).trigger(b.support.transition.end)},f),this};b(function(){b.support.transition=a();b.support.transition&&(b.event.special.bsTransitionEnd={bindType:b.support.transition.end,delegateType:b.support.transition.end,handle:function(c){return b(c.target).is(this)?c.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);+function(f){var b=function(c){f(c).on("click",'[data-dismiss="alert"]',this.close)};b.VERSION="3.3.6";b.TRANSITION_DURATION=150;b.prototype.close=function(c){function d(){e.detach().trigger("closed.bs.alert").remove()}var i=f(this),j=i.attr("data-target");j||(j=i.attr("href"),j=j&&j.replace(/.*(?=#[^\s]*$)/,""));var e=f(j);c&&c.preventDefault();e.length||(e=i.closest(".alert"));e.trigger(c=f.Event("close.bs.alert"));c.isDefaultPrevented()||(e.removeClass("in"),f.support.transition&&e.hasClass("fade")?e.one("bsTransitionEnd",d).emulateTransitionEnd(b.TRANSITION_DURATION):d())};var a=f.fn.alert;f.fn.alert=function(c){return this.each(function(){var d=f(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new b(this));"string"==typeof c&&e[c].call(d)})};f.fn.alert.Constructor=b;f.fn.alert.noConflict=function(){return f.fn.alert=a,this};f(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',b.prototype.close)}(jQuery);+function(h){function g(b){return this.each(function(){var e=h(this),c=e.data("bs.button"),d="object"==typeof b&&b;c||e.data("bs.button",c=new f(this,d));"toggle"==b?c.toggle():b&&c.setState(b)})}var f=function(b,c){this.$element=h(b);this.options=h.extend({},f.DEFAULTS,c);this.isLoading=!1};f.VERSION="3.3.6";f.DEFAULTS={loadingText:"loading..."};f.prototype.setState=function(d){var i=this.$element,c=i.is("input")?"val":"html",e=i.data();d+="Text";null==e.resetText&&i.data("resetText",i[c]());setTimeout(h.proxy(function(){i[c](null==e[d]?this.options[d]:e[d]);"loadingText"==d?(this.isLoading=!0,i.addClass("disabled").attr("disabled","disabled")):this.isLoading&&(this.isLoading=!1,i.removeClass("disabled").removeAttr("disabled"))},this),0)};f.prototype.toggle=function(){var b=!0,d=this.$element.closest('[data-toggle="buttons"]');if(d.length){var e=this.$element.find("input");"radio"==e.prop("type")?(e.prop("checked")&&(b=!1),d.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==e.prop("type")&&(e.prop("checked")!==this.$element.hasClass("active")&&(b=!1),this.$element.toggleClass("active"));e.prop("checked",this.$element.hasClass("active"));b&&e.trigger("change")}else{this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")}};var a=h.fn.button;h.fn.button=g;h.fn.button.Constructor=f;h.fn.button.noConflict=function(){return h.fn.button=a,this};h(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(b){var c=h(b.target);c.hasClass("btn")||(c=c.closest(".btn"));g.call(c,"toggle");h(b.target).is('input[type="radio"]')||h(b.target).is('input[type="checkbox"]')||b.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){h(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery);+function(j){function i(b){return this.each(function(){var a=j(this),e=a.data("bs.carousel"),c=j.extend({},h.DEFAULTS,a.data(),"object"==typeof b&&b),l="string"==typeof b?b:c.slide;e||a.data("bs.carousel",e=new h(this,c));"number"==typeof b?e.to(b):l?e[l]():c.interval&&e.pause().cycle()})}var h=function(d,c){this.$element=j(d);this.$indicators=this.$element.find(".carousel-indicators");this.options=c;this.$items=this.$active=this.interval=this.sliding=this.paused=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",j.proxy(this.keydown,this));"hover"!=this.options.pause||"ontouchstart" in document.documentElement||this.$element.on("mouseenter.bs.carousel",j.proxy(this.pause,this)).on("mouseleave.bs.carousel",j.proxy(this.cycle,this))};h.VERSION="3.3.6";h.TRANSITION_DURATION=600;h.DEFAULTS={interval:5000,pause:"hover",wrap:!0,keyboard:!0};h.prototype.keydown=function(b){if(!/input|textarea/i.test(b.target.tagName)){switch(b.which){case 37:this.prev();break;case 39:this.next();break;default:return}b.preventDefault()}};h.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(j.proxy(this.next,this),this.options.interval)),this};h.prototype.getItemIndex=function(b){return this.$items=b.parent().children(".item"),this.$items.index(b||this.$active)};h.prototype.getItemForDirection=function(e,k){var d=this.getItemIndex(k);return("prev"==e&&0===d||"next"==e&&d==this.$items.length-1)&&!this.options.wrap?k:this.$items.eq((d+("prev"==e?-1:1))%this.$items.length)};h.prototype.to=function(e){var k=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){k.to(e)}):d==e?this.pause().cycle():this.slide(e>d?"next":"prev",this.$items.eq(e))};h.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&j.support.transition&&(this.$element.trigger(j.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};h.prototype.next=function(){return this.sliding?void 0:this.slide("next")};h.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")};h.prototype.slide=function(x,w){var u=this.$element.find(".item.active"),t=w||this.getItemForDirection(x,u),v=this.interval,s="next"==x?"left":"right",o=this;if(t.hasClass("active")){return this.sliding=!1}var e=t[0],m=j.Event("slide.bs.carousel",{relatedTarget:e,direction:s});if(this.$element.trigger(m),!m.isDefaultPrevented()){if(this.sliding=!0,v&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active"),(m=j(this.$indicators.children()[this.getItemIndex(t)]))&&m.addClass("active")}var c=j.Event("slid.bs.carousel",{relatedTarget:e,direction:s});return j.support.transition&&this.$element.hasClass("slide")?(t.addClass(x),t[0].offsetWidth,u.addClass(s),t.addClass(s),u.one("bsTransitionEnd",function(){t.removeClass([x,s].join(" ")).addClass("active");u.removeClass(["active",s].join(" "));o.sliding=!1;setTimeout(function(){o.$element.trigger(c)},0)}).emulateTransitionEnd(h.TRANSITION_DURATION)):(u.removeClass("active"),t.addClass("active"),this.sliding=!1,this.$element.trigger(c)),v&&this.cycle(),this}};var f=j.fn.carousel;j.fn.carousel=i;j.fn.carousel.Constructor=h;j.fn.carousel.noConflict=function(){return j.fn.carousel=f,this};var g=function(d){var c,l=j(this),e=j(l.attr("data-target")||(c=l.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""));e.hasClass("carousel")&&(c=j.extend({},e.data(),l.data()),(l=l.attr("data-slide-to"))&&(c.interval=!1),i.call(e,c),l&&e.data("bs.carousel").to(l),d.preventDefault())};j(document).on("click.bs.carousel.data-api","[data-slide]",g).on("click.bs.carousel.data-api","[data-slide-to]",g);j(window).on("load",function(){j('[data-ride="carousel"]').each(function(){var b=j(this);i.call(b,b.data())})})}(jQuery);+function(j){function i(d){var c;d=d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return j(d)}function h(b){return this.each(function(){var d=j(this),c=d.data("bs.collapse"),a=j.extend({},f.DEFAULTS,d.data(),"object"==typeof b&&b);!c&&a.toggle&&/show|hide/.test(b)&&(a.toggle=!1);c||d.data("bs.collapse",c=new f(this,a));"string"==typeof b&&c[b]()})}var f=function(b,c){this.$element=j(b);this.options=j.extend({},f.DEFAULTS,c);this.$trigger=j('[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()};f.VERSION="3.3.6";f.TRANSITION_DURATION=350;f.DEFAULTS={toggle:!0};f.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"};f.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var d=j.Event("show.bs.collapse");if(this.$element.trigger(d),!d.isDefaultPrevented()){e&&e.length&&(h.call(e,"hide"),b||e.data("bs.collapse",null));var c=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[c](0).attr("aria-expanded",!0);this.$trigger.removeClass("collapsed").attr("aria-expanded",!0);this.transitioning=1;b=function(){this.$element.removeClass("collapsing").addClass("collapse in")[c]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!j.support.transition){return b.call(this)}e=j.camelCase(["scroll",c].join("-"));this.$element.one("bsTransitionEnd",j.proxy(b,this)).emulateTransitionEnd(f.TRANSITION_DURATION)[c](this.$element[0][e])}}}};f.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=j.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){b=this.dimension();this.$element[b](this.$element[b]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1);this.$trigger.addClass("collapsed").attr("aria-expanded",!1);this.transitioning=1;var c=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return j.support.transition?void this.$element[b](0).one("bsTransitionEnd",j.proxy(c,this)).emulateTransitionEnd(f.TRANSITION_DURATION):c.call(this)}}};f.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};f.prototype.getParent=function(){return j(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(j.proxy(function(d,c){var e=j(c);this.addAriaAndCollapsedClass(i(e),e)},this)).end()};f.prototype.addAriaAndCollapsedClass=function(e,k){var d=e.hasClass("in");e.attr("aria-expanded",d);k.toggleClass("collapsed",!d).attr("aria-expanded",d)};var g=j.fn.collapse;j.fn.collapse=h;j.fn.collapse.Constructor=f;j.fn.collapse.noConflict=function(){return j.fn.collapse=g,this};j(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var c=j(this);c.attr("data-target")||d.preventDefault();d=i(c);c=d.data("bs.collapse")?"toggle":c.data();h.call(d,c)})}(jQuery);+function(n){function m(d){var c=d.attr("data-target");c||(c=d.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));return(c=c&&n(c))&&c.length?c:d.parent()}function l(a){a&&3===a.which||(n(h).remove(),n(i).each(function(){var d=n(this),c=m(d),e={relatedTarget:this};c.hasClass("open")&&(a&&"click"==a.type&&/input|textarea/i.test(a.target.tagName)&&n.contains(c[0],a.target)||(c.trigger(a=n.Event("hide.bs.dropdown",e)),a.isDefaultPrevented()||(d.attr("aria-expanded","false"),c.removeClass("open").trigger(n.Event("hidden.bs.dropdown",e)))))}))}var h=".dropdown-backdrop",i='[data-toggle="dropdown"]',j=function(b){n(b).on("click.bs.dropdown",this.toggle)};j.VERSION="3.3.6";j.prototype.toggle=function(d){var c=n(this);if(!c.is(".disabled, :disabled")){var e=m(c),o=e.hasClass("open");if(l(),!o){"ontouchstart" in document.documentElement&&!e.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",l);o={relatedTarget:this};if(e.trigger(d=n.Event("show.bs.dropdown",o)),d.isDefaultPrevented()){return}c.trigger("focus").attr("aria-expanded","true");e.toggleClass("open").trigger(n.Event("shown.bs.dropdown",o))}return !1}};j.prototype.keydown=function(a){if(/(38|40|27|32)/.test(a.which)&&!/input|textarea/i.test(a.target.tagName)){var c=n(this);if(a.preventDefault(),a.stopPropagation(),!c.is(".disabled, :disabled")){var d=m(c),o=d.hasClass("open");if(!o&&27!=a.which||o&&27==a.which){return 27==a.which&&d.find(i).trigger("focus"),c.trigger("click")}c=d.find(".dropdown-menu li:not(.disabled):visible a");c.length&&(d=c.index(a.target),38==a.which&&0<d&&d--,40==a.which&&d<c.length-1&&d++,~d||(d=0),c.eq(d).trigger("focus"))}}};var k=n.fn.dropdown;n.fn.dropdown=function(b){return this.each(function(){var a=n(this),c=a.data("bs.dropdown");c||a.data("bs.dropdown",c=new j(this));"string"==typeof b&&c[b].call(a)})};n.fn.dropdown.Constructor=j;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=k,this};n(document).on("click.bs.dropdown.data-api",l).on("click.bs.dropdown.data-api",".dropdown form",function(b){b.stopPropagation()}).on("click.bs.dropdown.data-api",i,j.prototype.toggle).on("keydown.bs.dropdown.data-api",i,j.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",j.prototype.keydown)}(jQuery);+function(h){function g(d,c){return this.each(function(){var e=h(this),b=e.data("bs.modal"),i=h.extend({},f.DEFAULTS,e.data(),"object"==typeof d&&d);b||e.data("bs.modal",b=new f(this,i));"string"==typeof d?b[d](c):i.show&&b.show(c)})}var f=function(d,c){this.options=c;this.$body=h(document.body);this.$element=h(d);this.$dialog=this.$element.find(".modal-dialog");this.originalBodyPad=this.isShown=this.$backdrop=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,h.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};f.VERSION="3.3.6";f.TRANSITION_DURATION=300;f.BACKDROP_TRANSITION_DURATION=150;f.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};f.prototype.toggle=function(b){return this.isShown?this.hide():this.show(b)};f.prototype.show=function(d){var c=this,e=h.Event("show.bs.modal",{relatedTarget:d});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"]',h.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){c.$element.one("mouseup.dismiss.bs.modal",function(b){h(b.target).is(c.$element)&&(c.ignoreBackdropClick=!0)})}),this.backdrop(function(){var b=h.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(c.$body);c.$element.show().scrollTop(0);c.adjustDialog();b&&c.$element[0].offsetWidth;c.$element.addClass("in");c.enforceFocus();var i=h.Event("shown.bs.modal",{relatedTarget:d});b?c.$dialog.one("bsTransitionEnd",function(){c.$element.trigger("focus").trigger(i)}).emulateTransitionEnd(f.TRANSITION_DURATION):c.$element.trigger("focus").trigger(i)}))};f.prototype.hide=function(b){b&&b.preventDefault();b=h.Event("hide.bs.modal");this.$element.trigger(b);this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),h(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"),h.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",h.proxy(this.hideModal,this)).emulateTransitionEnd(f.TRANSITION_DURATION):this.hideModal())};f.prototype.enforceFocus=function(){h(document).off("focusin.bs.modal").on("focusin.bs.modal",h.proxy(function(b){this.$element[0]===b.target||this.$element.has(b.target).length||this.$element.trigger("focus")},this))};f.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",h.proxy(function(b){27==b.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};f.prototype.resize=function(){this.isShown?h(window).on("resize.bs.modal",h.proxy(this.handleUpdate,this)):h(window).off("resize.bs.modal")};f.prototype.hideModal=function(){var b=this;this.$element.hide();this.backdrop(function(){b.$body.removeClass("modal-open");b.resetAdjustments();b.resetScrollbar();b.$element.trigger("hidden.bs.modal")})};f.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};f.prototype.backdrop=function(d){var c=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=h.support.transition&&i;if(this.$backdrop=h(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",h.proxy(function(b){return this.ignoreBackdropClick?void (this.ignoreBackdropClick=!1):void (b.target===b.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),d){e?this.$backdrop.one("bsTransitionEnd",d).emulateTransitionEnd(f.BACKDROP_TRANSITION_DURATION):d()}}else{!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),i=function(){c.removeBackdrop();d&&d()},h.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(f.BACKDROP_TRANSITION_DURATION):i()):d&&d()}};f.prototype.handleUpdate=function(){this.adjustDialog()};f.prototype.adjustDialog=function(){var b=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&b?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!b?this.scrollbarWidth:""})};f.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};f.prototype.checkScrollbar=function(){var b=window.innerWidth;b||(b=document.documentElement.getBoundingClientRect(),b=b.right-Math.abs(b.left));this.bodyIsOverflowing=document.body.clientWidth<b;this.scrollbarWidth=this.measureScrollbar()};f.prototype.setScrollbar=function(){var b=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",b+this.scrollbarWidth)};f.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};f.prototype.measureScrollbar=function(){var d=document.createElement("div");d.className="modal-scrollbar-measure";this.$body.append(d);var c=d.offsetWidth-d.clientWidth;return this.$body[0].removeChild(d),c};var a=h.fn.modal;h.fn.modal=g;h.fn.modal.Constructor=f;h.fn.modal.noConflict=function(){return h.fn.modal=a,this};h(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(d){var c=h(this),i=c.attr("href"),e=h(c.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),i=e.data("bs.modal")?"toggle":h.extend({remote:!/#/.test(i)&&i},e.data(),c.data());c.is("a")&&d.preventDefault();e.one("show.bs.modal",function(b){b.isDefaultPrevented()||e.one("hidden.bs.modal",function(){c.is(":visible")&&c.trigger("focus")})});g.call(e,i,this)})}(jQuery);+function(f){var b=function(c,d){this.inState=this.$element=this.hoverState=this.timeout=this.enabled=this.options=this.type=null;this.init("tooltip",c,d)};b.VERSION="3.3.6";b.TRANSITION_DURATION=150;b.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}};b.prototype.init=function(c,d,e){if(this.enabled=!0,this.type=c,this.$element=f(d),this.options=this.getOptions(e),this.$viewport=this.options.viewport&&f(f.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0] instanceof document.constructor&&!this.options.selector){throw Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!")}c=this.options.trigger.split(" ");for(d=c.length;d--;){if(e=c[d],"click"==e){this.$element.on("click."+this.type,this.options.selector,f.proxy(this.toggle,this))}else{if("manual"!=e){var h="hover"==e?"mouseleave":"focusout";this.$element.on(("hover"==e?"mouseenter":"focusin")+"."+this.type,this.options.selector,f.proxy(this.enter,this));this.$element.on(h+"."+this.type,this.options.selector,f.proxy(this.leave,this))}}}this.options.selector?this._options=f.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};b.prototype.getDefaults=function(){return b.DEFAULTS};b.prototype.getOptions=function(c){return c=f.extend({},this.getDefaults(),this.$element.data(),c),c.delay&&"number"==typeof c.delay&&(c.delay={show:c.delay,hide:c.delay}),c};b.prototype.getDelegateOptions=function(){var c={},d=this.getDefaults();return this._options&&f.each(this._options,function(g,e){d[g]!=e&&(c[g]=e)}),c};b.prototype.enter=function(c){var d=c instanceof this.constructor?c:f(c.currentTarget).data("bs."+this.type);return d||(d=new this.constructor(c.currentTarget,this.getDelegateOptions()),f(c.currentTarget).data("bs."+this.type,d)),c instanceof f.Event&&(d.inState["focusin"==c.type?"focus":"hover"]=!0),d.tip().hasClass("in")||"in"==d.hoverState?void (d.hoverState="in"):(clearTimeout(d.timeout),d.hoverState="in",d.options.delay&&d.options.delay.show?void (d.timeout=setTimeout(function(){"in"==d.hoverState&&d.show()},d.options.delay.show)):d.show())};b.prototype.isInStateTrue=function(){for(var c in this.inState){if(this.inState[c]){return !0}}return !1};b.prototype.leave=function(c){var d=c instanceof this.constructor?c:f(c.currentTarget).data("bs."+this.type);return d||(d=new this.constructor(c.currentTarget,this.getDelegateOptions()),f(c.currentTarget).data("bs."+this.type,d)),c instanceof f.Event&&(d.inState["focusout"==c.type?"focus":"hover"]=!1),d.isInStateTrue()?void 0:(clearTimeout(d.timeout),d.hoverState="out",d.options.delay&&d.options.delay.hide?void (d.timeout=setTimeout(function(){"out"==d.hoverState&&d.hide()},d.options.delay.hide)):d.hide())};b.prototype.show=function(){var d=f.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(d);var j=f.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(!d.isDefaultPrevented()&&j){var n=this,d=this.tip(),j=this.getUID(this.type);this.setContent();d.attr("id",j);this.$element.attr("aria-describedby",j);this.options.animation&&d.addClass("fade");var j="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,o=/\s?auto?\s?/i,k=o.test(j);k&&(j=j.replace(o,"")||"top");d.detach().css({top:0,left:0,display:"block"}).addClass(j).data("bs."+this.type,this);this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var o=this.getPosition(),p=d[0].offsetWidth,c=d[0].offsetHeight;if(k){var k=j,i=this.getPosition(this.$viewport),j="bottom"==j&&o.bottom+c>i.bottom?"top":"top"==j&&o.top-c<i.top?"bottom":"right"==j&&o.right+p>i.width?"left":"left"==j&&o.left-p<i.left?"right":j;d.removeClass(k).addClass(j)}o=this.getCalculatedOffset(j,o,p,c);this.applyPlacement(o,j);j=function(){var e=n.hoverState;n.$element.trigger("shown.bs."+n.type);n.hoverState=null;"out"==e&&n.leave(n)};f.support.transition&&this.$tip.hasClass("fade")?d.one("bsTransitionEnd",j).emulateTransitionEnd(b.TRANSITION_DURATION):j()}}};b.prototype.applyPlacement=function(q,r){var k=this.tip(),m=k[0].offsetWidth,j=k[0].offsetHeight,p=parseInt(k.css("margin-top"),10),o=parseInt(k.css("margin-left"),10);isNaN(p)&&(p=0);isNaN(o)&&(o=0);q.top+=p;q.left+=o;f.offset.setOffset(k[0],f.extend({using:function(d){k.css({top:Math.round(d.top),left:Math.round(d.left)})}},q),0);k.addClass("in");var o=k[0].offsetWidth,i=k[0].offsetHeight;"top"==r&&i!=j&&(q.top=q.top+j-i);var c=this.getViewportAdjustedDelta(r,q,o,i);c.left?q.left+=c.left:q.top+=c.top;m=(p=/top|bottom/.test(r))?2*c.left-m+o:2*c.top-j+i;j=p?"offsetWidth":"offsetHeight";k.offset(q);this.replaceArrow(m,k[0][j],p)};b.prototype.replaceArrow=function(d,e,g){this.arrow().css(g?"left":"top",50*(1-d/e)+"%").css(g?"top":"left","")};b.prototype.setContent=function(){var c=this.tip(),d=this.getTitle();c.find(".tooltip-inner")[this.options.html?"html":"text"](d);c.removeClass("fade in top bottom left right")};b.prototype.hide=function(c){function d(){"in"!=i.hoverState&&j.detach();i.$element.removeAttr("aria-describedby").trigger("hidden.bs."+i.type);c&&c()}var i=this,j=f(this.$tip),e=f.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(j.removeClass("in"),f.support.transition&&j.hasClass("fade")?j.one("bsTransitionEnd",d).emulateTransitionEnd(b.TRANSITION_DURATION):d(),this.hoverState=null,this)};b.prototype.fixTitle=function(){var c=this.$element;(c.attr("title")||"string"!=typeof c.attr("data-original-title"))&&c.attr("data-original-title",c.attr("title")||"").attr("title","")};b.prototype.hasContent=function(){return this.getTitle()};b.prototype.getPosition=function(c){c=c||this.$element;var d=c[0],e="BODY"==d.tagName,d=d.getBoundingClientRect();null==d.width&&(d=f.extend({},d,{width:d.right-d.left,height:d.bottom-d.top}));var h=e?{top:0,left:0}:c.offset();c={scroll:e?document.documentElement.scrollTop||document.body.scrollTop:c.scrollTop()};e=e?{width:f(window).width(),height:f(window).height()}:null;return f.extend({},d,c,e,h)};b.prototype.getCalculatedOffset=function(d,e,h,g){return"bottom"==d?{top:e.top+e.height,left:e.left+e.width/2-h/2}:"top"==d?{top:e.top-g,left:e.left+e.width/2-h/2}:"left"==d?{top:e.top+e.height/2-g/2,left:e.left-h}:{top:e.top+e.height/2-g/2,left:e.left+e.width}};b.prototype.getViewportAdjustedDelta=function(g,i,n,k){var j={top:0,left:0};if(!this.$viewport){return j}var m=this.options.viewport&&this.options.viewport.padding||0,l=this.getPosition(this.$viewport);/right|left/.test(g)?(n=i.top-m-l.scroll,i=i.top+m-l.scroll+k,n<l.top?j.top=l.top-n:i>l.top+l.height&&(j.top=l.top+l.height-i)):(k=i.left-m,i=i.left+m+n,k<l.left?j.left=l.left-k:i>l.right&&(j.left=l.left+l.width-i));return j};b.prototype.getTitle=function(){var c=this.$element,d=this.options;return c.attr("data-original-title")||("function"==typeof d.title?d.title.call(c[0]):d.title)};b.prototype.getUID=function(c){do{c+=~~(1000000*Math.random())}while(document.getElementById(c));return c};b.prototype.tip=function(){if(!this.$tip&&(this.$tip=f(this.options.template),1!=this.$tip.length)){throw Error(this.type+" `template` option must consist of exactly 1 top-level element!")}return this.$tip};b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};b.prototype.enable=function(){this.enabled=!0};b.prototype.disable=function(){this.enabled=!1};b.prototype.toggleEnabled=function(){this.enabled=!this.enabled};b.prototype.toggle=function(c){var d=this;c&&(d=f(c.currentTarget).data("bs."+this.type),d||(d=new this.constructor(c.currentTarget,this.getDelegateOptions()),f(c.currentTarget).data("bs."+this.type,d)));c?(d.inState.click=!d.inState.click,d.isInStateTrue()?d.enter(d):d.leave(d)):d.tip().hasClass("in")?d.leave(d):d.enter(d)};b.prototype.destroy=function(){var c=this;clearTimeout(this.timeout);this.hide(function(){c.$element.off("."+c.type).removeData("bs."+c.type);c.$tip&&c.$tip.detach();c.$tip=null;c.$arrow=null;c.$viewport=null})};var a=f.fn.tooltip;f.fn.tooltip=function(c){return this.each(function(){var d=f(this),e=d.data("bs.tooltip"),h="object"==typeof c&&c;!e&&/destroy|hide/.test(c)||(e||d.data("bs.tooltip",e=new b(this,h)),"string"!=typeof c||e[c]())})};f.fn.tooltip.Constructor=b;f.fn.tooltip.noConflict=function(){return f.fn.tooltip=a,this}}(jQuery);+function(f){var b=function(c,d){this.init("popover",c,d)};if(!f.fn.tooltip){throw Error("Popover requires tooltip.js")}b.VERSION="3.3.6";b.DEFAULTS=f.extend({},f.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>'});b.prototype=f.extend({},f.fn.tooltip.Constructor.prototype);b.prototype.constructor=b;b.prototype.getDefaults=function(){return b.DEFAULTS};b.prototype.setContent=function(){var d=this.tip(),e=this.getTitle(),g=this.getContent();d.find(".popover-title")[this.options.html?"html":"text"](e);d.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof g?"html":"append":"text"](g);d.removeClass("fade top bottom left right in");d.find(".popover-title").html()||d.find(".popover-title").hide()};b.prototype.hasContent=function(){return this.getTitle()||this.getContent()};b.prototype.getContent=function(){var c=this.$element,d=this.options;return c.attr("data-content")||("function"==typeof d.content?d.content.call(c[0]):d.content)};b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var a=f.fn.popover;f.fn.popover=function(c){return this.each(function(){var d=f(this),e=d.data("bs.popover"),h="object"==typeof c&&c;!e&&/destroy|hide/.test(c)||(e||d.data("bs.popover",e=new b(this,h)),"string"!=typeof c||e[c]())})};f.fn.popover.Constructor=b;f.fn.popover.noConflict=function(){return f.fn.popover=a,this}}(jQuery);+function(h){function g(d,c){this.$body=h(document.body);this.$scrollElement=h(h(d).is(document.body)?window:d);this.options=h.extend({},g.DEFAULTS,c);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",h.proxy(this.process,this));this.refresh();this.process()}function f(b){return this.each(function(){var c=h(this),d=c.data("bs.scrollspy"),i="object"==typeof b&&b;d||c.data("bs.scrollspy",d=new g(this,i));"string"==typeof b&&d[b]()})}g.VERSION="3.3.6";g.DEFAULTS={offset:10};g.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};g.prototype.refresh=function(){var d=this,c="offset",e=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();h.isWindow(this.$scrollElement[0])||(c="position",e=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var b=h(this),b=b.data("target")||b.attr("href"),i=/^#./.test(b)&&h(b);return i&&i.length&&i.is(":visible")&&[[i[c]().top+e,b]]||null}).sort(function(j,i){return j[0]-i[0]}).each(function(){d.offsets.push(this[0]);d.targets.push(this[1])})};g.prototype.process=function(){var n,j=this.$scrollElement.scrollTop()+this.options.offset,q=this.getScrollHeight(),o=this.options.offset+q-this.$scrollElement.height(),p=this.offsets,i=this.targets,k=this.activeTarget;if(this.scrollHeight!=q&&this.refresh(),j>=o){return k!=(n=i[i.length-1])&&this.activate(n)}if(k&&j<p[0]){return this.activeTarget=null,this.clear()}for(n=p.length;n--;){k!=i[n]&&j>=p[n]&&(void 0===p[n+1]||j<p[n+1])&&this.activate(i[n])}};g.prototype.activate=function(b){this.activeTarget=b;this.clear();b=h(this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]').parents("li").addClass("active");b.parent(".dropdown-menu").length&&(b=b.closest("li.dropdown").addClass("active"));b.trigger("activate.bs.scrollspy")};g.prototype.clear=function(){h(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var a=h.fn.scrollspy;h.fn.scrollspy=f;h.fn.scrollspy.Constructor=g;h.fn.scrollspy.noConflict=function(){return h.fn.scrollspy=a,this};h(window).on("load.bs.scrollspy.data-api",function(){h('[data-spy="scroll"]').each(function(){var b=h(this);f.call(b,b.data())})})}(jQuery);+function(j){function i(b){return this.each(function(){var a=j(this),c=a.data("bs.tab");c||a.data("bs.tab",c=new h(this));"string"==typeof b&&c[b]()})}var h=function(b){this.element=j(b)};h.VERSION="3.3.6";h.TRANSITION_DURATION=150;h.prototype.show=function(){var o=this.element,k=o.closest("ul:not(.dropdown-menu)"),p=o.data("target");if(p||(p=o.attr("href"),p=p&&p.replace(/.*(?=#[^\s]*$)/,"")),!o.parent("li").hasClass("active")){var q=k.find(".active:last a"),c=j.Event("hide.bs.tab",{relatedTarget:o[0]}),n=j.Event("show.bs.tab",{relatedTarget:q[0]});(q.trigger(c),o.trigger(n),n.isDefaultPrevented()||c.isDefaultPrevented())||(p=j(p),this.activate(o.closest("li"),k),this.activate(p,p.parent(),function(){q.trigger({type:"hidden.bs.tab",relatedTarget:o[0]});o.trigger({type:"shown.bs.tab",relatedTarget:q[0]})}))}};h.prototype.activate=function(o,e,q){function p(){c.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);o.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);n?(o[0].offsetWidth,o.addClass("in")):o.removeClass("fade");o.parent(".dropdown-menu").length&&o.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);q&&q()}var c=e.find("> .active"),n=q&&j.support.transition&&(c.length&&c.hasClass("fade")||!!e.find("> .fade").length);c.length&&n?c.one("bsTransitionEnd",p).emulateTransitionEnd(h.TRANSITION_DURATION):p();c.removeClass("in")};var f=j.fn.tab;j.fn.tab=i;j.fn.tab.Constructor=h;j.fn.tab.noConflict=function(){return j.fn.tab=f,this};var g=function(b){b.preventDefault();i.call(j(this),"show")};j(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',g).on("click.bs.tab.data-api",'[data-toggle="pill"]',g)}(jQuery);+function(h){function g(b){return this.each(function(){var c=h(this),e=c.data("bs.affix"),i="object"==typeof b&&b;e||c.data("bs.affix",e=new f(this,i));"string"==typeof b&&e[b]()})}var f=function(d,c){this.options=h.extend({},f.DEFAULTS,c);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(d);this.pinnedOffset=this.unpin=this.affixed=null;this.checkPosition()};f.VERSION="3.3.6";f.RESET="affix affix-top affix-bottom";f.DEFAULTS={offset:0,target:window};f.prototype.getState=function(o,j,s,p){var q=this.$target.scrollTop(),i=this.$element.offset(),k=this.$target.height();if(null!=s&&"top"==this.affixed){return s>q?"top":!1}if("bottom"==this.affixed){return null!=s?q+this.unpin<=i.top?!1:"bottom":o-p>=q+k?!1:"bottom"}var r=null==this.affixed,i=r?q:i.top;return null!=s&&s>=q?"top":null!=p&&i+(r?k:j)>=o-p?"bottom":!1};f.prototype.getPinnedOffset=function(){if(this.pinnedOffset){return this.pinnedOffset}this.$element.removeClass(f.RESET).addClass("affix");var b=this.$target.scrollTop();return this.pinnedOffset=this.$element.offset().top-b};f.prototype.checkPositionWithEventLoop=function(){setTimeout(h.proxy(this.checkPosition,this),1)};f.prototype.checkPosition=function(){if(this.$element.is(":visible")){var i=this.$element.height(),e=this.options.offset,n=e.top,l=e.bottom,j=Math.max(h(document).height(),h(document.body).height());"object"!=typeof e&&(l=n=e);"function"==typeof n&&(n=e.top(this.$element));"function"==typeof l&&(l=e.bottom(this.$element));e=this.getState(j,i,n,l);if(this.affixed!=e){null!=this.unpin&&this.$element.css("top","");var n="affix"+(e?"-"+e:""),c=h.Event(n+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented()){return}this.affixed=e;this.unpin="bottom"==e?this.getPinnedOffset():null;this.$element.removeClass(f.RESET).addClass(n).trigger(n.replace("affix","affixed")+".bs.affix")}"bottom"==e&&this.$element.offset({top:j-i-l})}};var a=h.fn.affix;h.fn.affix=g;h.fn.affix.Constructor=f;h.fn.affix.noConflict=function(){return h.fn.affix=a,this};h(window).on("load",function(){h('[data-spy="affix"]').each(function(){var d=h(this),c=d.data();c.offset=c.offset||{};null!=c.offsetBottom&&(c.offset.bottom=c.offsetBottom);null!=c.offsetTop&&(c.offset.top=c.offsetTop);g.call(d,c)})})}(jQuery); |