From 4cdfd234be350e4da622e9c0c9b6de68407cf80c Mon Sep 17 00:00:00 2001 From: thednp Date: Sat, 1 Jun 2019 12:03:08 +0300 Subject: [PATCH] Adding a more consistent control over show/hide timing, attempting to fix https://github.com/thednp/bootstrap.native/issues/281 --- dist/bootstrap-native-v4.js | 134 ++++++++++++++++---------------- dist/bootstrap-native-v4.min.js | 2 +- dist/bootstrap-native.js | 131 ++++++++++++++++--------------- dist/bootstrap-native.min.js | 2 +- 4 files changed, 140 insertions(+), 129 deletions(-) diff --git a/dist/bootstrap-native-v4.js b/dist/bootstrap-native-v4.js index 2defa6c1..506a9fff 100644 --- a/dist/bootstrap-native-v4.js +++ b/dist/bootstrap-native-v4.js @@ -1026,6 +1026,7 @@ modalTrigger = 'modalTrigger', paddingRight = 'paddingRight', modalBackdropString = 'modal-backdrop', + isAnimating = 'isAnimating', // determine modal, triggering element btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'), checkModal = queryElement( btnCheck ), @@ -1044,9 +1045,12 @@ this[animation] = hasClass(modal, 'fade') ? true : false; this[content] = options[content]; // JavaScript only + // set an initial state of the modal + modal[isAnimating] = false; + // bind, constants, event targets and other vars var self = this, relatedTarget = null, - bodyIsOverflowing, scrollBarWidth, overlay, overlayDelay, + bodyIsOverflowing, scrollBarWidth, overlay, overlayDelay, modalTimer, // also find fixed-top / fixed-bottom items fixedItems = getElementsByClassName(HTML,fixedTop).concat(getElementsByClassName(HTML,fixedBottom)), @@ -1109,34 +1113,15 @@ DOC[body].removeChild(overlay); overlay = null; } }, - keydownHandlerToggle = function() { - if (hasClass(modal,showClass)) { - on(DOC, keydownEvent, keyHandler); - } else { - off(DOC, keydownEvent, keyHandler); - } - }, - resizeHandlerToggle = function() { - if (hasClass(modal,showClass)) { - on(globalObject, resizeEvent, self.update); - } else { - off(globalObject, resizeEvent, self.update); - } - }, - dismissHandlerToggle = function() { - if (hasClass(modal,showClass)) { - on(modal, clickEvent, dismissHandler); - } else { - off(modal, clickEvent, dismissHandler); - } - }, // triggers triggerShow = function() { - resizeHandlerToggle(); - dismissHandlerToggle(); - keydownHandlerToggle(); setFocus(modal); + modal[isAnimating] = false; bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget); + + on(globalObject, resizeEvent, self.update); + on(modal, clickEvent, dismissHandler); + on(DOC, keydownEvent, keyHandler); }, triggerHide = function() { modal[style].display = ''; @@ -1150,14 +1135,17 @@ overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay)) : removeOverlay(); - resizeHandlerToggle(); - dismissHandlerToggle(); - keydownHandlerToggle(); + off(globalObject, resizeEvent, self.update); + off(modal, clickEvent, dismissHandler); + off(DOC, keydownEvent, keyHandler); } }()); + modal[isAnimating] = false; }, // handlers clickHandler = function(e) { + if ( modal[isAnimating] ) return; + var clickTarget = e[target]; clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode]; if ( clickTarget === element && !hasClass(modal,showClass) ) { @@ -1168,18 +1156,22 @@ } }, keyHandler = function(e) { - if (self[keyboard] && e.which == 27 && hasClass(modal,showClass)) { + if ( modal[isAnimating] ) return; + + if (self[keyboard] && e.which == 27 && hasClass(modal,showClass) ) { self.hide(); } }, dismissHandler = function(e) { + if ( modal[isAnimating] ) return; var clickTarget = e[target]; - if ( hasClass(modal,showClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component + + if ( hasClass(modal,showClass) && ( clickTarget[parentNode][getAttribute](dataDismiss) === component || clickTarget[getAttribute](dataDismiss) === component - || (clickTarget === modal && self[backdrop] !== staticString) ) ) { + || clickTarget === modal && self[backdrop] !== staticString ) ) { self.hide(); relatedTarget = null; - e[preventDefault](); } + e[preventDefault](); }; // public methods @@ -1187,49 +1179,61 @@ if ( hasClass(modal,showClass) ) {this.hide();} else {this.show();} }; this.show = function() { - bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget); - - // we elegantly hide any opened modal - var currentOpen = getElementsByClassName(DOC,component+' '+showClass)[0]; - if (currentOpen && currentOpen !== modal) { - modalTrigger in currentOpen && currentOpen[modalTrigger][stringModal].hide(); - stringModal in currentOpen && currentOpen[stringModal].hide(); - } + if ( hasClass(modal,showClass) || modal[isAnimating] ) {return} + + clearTimeout(modalTimer); + modalTimer = setTimeout(function(){ + modal[isAnimating] = true; + bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget); + + // we elegantly hide any opened modal + var currentOpen = getElementsByClassName(DOC,component+' '+showClass)[0]; + if (currentOpen && currentOpen !== modal) { + modalTrigger in currentOpen && currentOpen[modalTrigger][stringModal].hide(); + stringModal in currentOpen && currentOpen[stringModal].hide(); + } - if ( this[backdrop] ) { - !modalOverlay && createOverlay(); - } + if ( self[backdrop] ) { + !modalOverlay && !overlay && createOverlay(); + } - if ( overlay && modalOverlay && !hasClass(overlay,showClass)) { - overlay[offsetWidth]; // force reflow to enable trasition - overlayDelay = getTransitionDurationFromElement(overlay); - addClass(overlay, showClass); - } + if ( overlay && !hasClass(overlay,showClass) ) { + overlay[offsetWidth]; // force reflow to enable trasition + overlayDelay = getTransitionDurationFromElement(overlay); + addClass(overlay, showClass); + } - setTimeout( function() { - modal[style].display = 'block'; + setTimeout( function() { + modal[style].display = 'block'; - checkScrollbar(); - setScrollbar(); + checkScrollbar(); + setScrollbar(); - addClass(DOC[body],component+'-open'); - addClass(modal,showClass); - modal[setAttribute](ariaHidden, false); + addClass(DOC[body],component+'-open'); + addClass(modal,showClass); + modal[setAttribute](ariaHidden, false); - hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow(); - }, supportTransitions && overlay && overlayDelay ? overlayDelay : 0); + hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow(); + }, supportTransitions && overlay && overlayDelay ? overlayDelay : 1); + },1); }; this.hide = function() { - bootstrapCustomEvent.call(modal, hideEvent, component); - overlay = queryElement('.'+modalBackdropString); - overlayDelay = overlay && getTransitionDurationFromElement(overlay); + if ( modal[isAnimating] || !hasClass(modal,showClass) ) {return} - removeClass(modal,showClass); - modal[setAttribute](ariaHidden, true); + clearTimeout(modalTimer); + modalTimer = setTimeout(function(){ + modal[isAnimating] = true; + bootstrapCustomEvent.call(modal, hideEvent, component); + overlay = queryElement('.'+modalBackdropString); + overlayDelay = overlay && getTransitionDurationFromElement(overlay); + + removeClass(modal,showClass); + modal[setAttribute](ariaHidden, true); - setTimeout(function(){ - hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide(); - }, supportTransitions && overlay && overlayDelay ? overlayDelay : 1); + setTimeout(function(){ + hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide(); + }, supportTransitions && overlay && overlayDelay ? overlayDelay : 2); + },2) }; this.setContent = function( content ) { queryElement('.'+component+'-content',modal)[innerHTML] = content; diff --git a/dist/bootstrap-native-v4.min.js b/dist/bootstrap-native-v4.min.js index e40ba99e..8e168739 100644 --- a/dist/bootstrap-native-v4.min.js +++ b/dist/bootstrap-native-v4.min.js @@ -1,2 +1,2 @@ // Native Javascript for Bootstrap 4 v2.0.27 | © dnp_theme | MIT-License -!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var i=e();t.Alert=i.Alert,t.Button=i.Button,t.Carousel=i.Carousel,t.Collapse=i.Collapse,t.Dropdown=i.Dropdown,t.Modal=i.Modal,t.Popover=i.Popover,t.ScrollSpy=i.ScrollSpy,t.Tab=i.Tab,t.Toast=i.Toast,t.Tooltip=i.Tooltip}}(this,function(){"use strict";var t="undefined"!=typeof global?global:this||window,e=document,i=e.documentElement,n="body",o=t.BSN={},a=o.supports=[],l="data-toggle",r="delay",s="target",c="animation",d="getAttribute",u="setAttribute",h="parentNode",f="length",p="Transition",g="Webkit",m="style",v="push",w="active",b="left",T="top",y="onmouseleave"in e?["mouseenter","mouseleave"]:["mouseover","mouseout"],k=/\b(top|bottom|left|right)+/,C=0,x=g+p in i[m]||p.toLowerCase()in i[m],A=g+p in i[m]?g.toLowerCase()+p+"End":p.toLowerCase()+"end",E=g+"Duration"in i[m]?g.toLowerCase()+p+"Duration":p.toLowerCase()+"Duration",L={start:"touchstart",end:"touchend",move:"touchmove"},N=function(t){t.focus?t.focus():t.setActive()},I=function(t,e){t.classList.add(e)},D=function(t,e){t.classList.remove(e)},H=function(t,e){return t.classList.contains(e)},B=function(t,e){return[].slice.call(t.getElementsByClassName(e))},M=function(t,i){var n=i||e;return"object"==typeof t?t:n.querySelector(t)},S=function(t,i){var n=i.charAt(0),o=i.substr(1);if("."===n){for(;t&&t!==e;t=t[h])if(null!==M(i,t[h])&&H(t,o))return t}else if("#"===n)for(;t&&t!==e;t=t[h])if(t.id===o)return t;return!1},W=function(t,e,i,n){n=n||!1,t.addEventListener(e,i,n)},R=function(t,e,i,n){n=n||!1,t.removeEventListener(e,i,n)},P=function(t,e,i,n){W(t,e,function o(a){i(a),R(t,e,o,n)})},z=function(e){var i=x?t.getComputedStyle(e)[E]:0;return i=parseFloat(i),i="number"!=typeof i||isNaN(i)?0:1e3*i},O=function(t,e){var i=0;z(t)?P(t,A,function(t){!i&&e(t),i=1}):setTimeout(function(){!i&&e(),i=1},17)},X=function(t,e,i){var n=new CustomEvent(t+".bs."+e);n.relatedTarget=i,this.dispatchEvent(n)},j=function(){return{y:t.pageYOffset||i.scrollTop,x:t.pageXOffset||i.scrollLeft}},U=function(t,o,a,l){var r,s,c,d,u,h,f={w:o.offsetWidth,h:o.offsetHeight},p=i.clientWidth||e[n].clientWidth,g=i.clientHeight||e[n].clientHeight,v=t.getBoundingClientRect(),w=l===e[n]?j():{x:l.offsetLeft+l.scrollLeft,y:l.offsetTop+l.scrollTop},y={w:v.right-v[b],h:v.bottom-v[T]},C=H(o,"popover"),x=M(".arrow",o),A=v[T]+y.h/2-f.h/2<0,E=v[b]+y.w/2-f.w/2<0,L=v[b]+f.w/2+y.w/2>=p,N=v[T]+f.h/2+y.h/2>=g,I=v[T]-f.h<0,D=v[b]-f.w<0,B=v[T]+f.h+y.h>=g,S=v[b]+f.w+y.w>=p;a=(a===b||"right"===a)&&D&&S?T:a,a=a===T&&I?"bottom":a,a="bottom"===a&&B?T:a,a=a===b&&D?"right":a,a="right"===a&&S?b:a,-1===o.className.indexOf(a)&&(o.className=o.className.replace(k,a)),u=x.offsetWidth,h=x.offsetHeight,a===b||"right"===a?(s=a===b?v[b]+w.x-f.w-(C?u:0):v[b]+w.x+y.w,A?(r=v[T]+w.y,c=y.h/2-u):N?(r=v[T]+w.y-f.h+y.h,c=f.h-y.h/2-u):(r=v[T]+w.y-f.h/2+y.h/2,c=f.h/2-(C?.9*h:h/2))):a!==T&&"bottom"!==a||(r=a===T?v[T]+w.y-f.h-(C?h:0):v[T]+w.y+y.h,E?(s=0,d=v[b]+y.w/2-u):L?(s=p-1.01*f.w,d=f.w-(p-v[b])+y.w/2-u/2):(s=v[b]+w.x-f.w/2+y.w/2,d=f.w/2-u/2)),o[m][T]=r+"px",o[m][b]=s+"px",c&&(x[m][T]=c+"px"),d&&(x[m][b]=d+"px")};o.version="2.0.27";var q=function(t){t=M(t);var e=this,i=S(t,".alert"),n=function(){H(i,"fade")?O(i,a):a()},o=function(n){i=S(n[s],".alert"),(t=M('[data-dismiss="alert"]',i))&&i&&(t===n[s]||t.contains(n[s]))&&e.close()},a=function(){X.call(i,"closed","alert"),R(t,"click",o),i[h].removeChild(i)};this.close=function(){i&&t&&H(i,"show")&&(X.call(i,"close","alert"),D(i,"show"),i&&n())},"Alert"in t||W(t,"click",o),t.Alert=e};a[v](["Alert",q,'[data-dismiss="alert"]']);var F=function(t){t=M(t);var i=!1,n="checked",o=function(t){32===(t.which||t.keyCode)&&t[s]===e.activeElement&&l(t)},a=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},l=function(e){var o="LABEL"===e[s].tagName?e[s]:"LABEL"===e[s][h].tagName?e[s][h]:null;if(o){var a=e[s],l=B(a[h],"btn"),r=o.getElementsByTagName("INPUT")[0];if(r){if("checkbox"===r.type&&(r[n]?(D(o,w),r[d](n),r.removeAttribute(n),r[n]=!1):(I(o,w),r[d](n),r[u](n,n),r[n]=!0),i||(i=!0,X.call(r,"change","button"),X.call(t,"change","button"))),"radio"===r.type&&!i&&!r[n]){I(o,w),r[u](n,n),r[n]=!0,X.call(r,"change","button"),X.call(t,"change","button"),i=!0;for(var c=0,p=l[f];c1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(v&&!m&&(A=C||parseInt(t.touches[0].pageX),v)){if((!n.contains(t[s])||!n.contains(t.relatedTarget))&&Math.abs(k-A)<75)return!1;Ck&&p--,v=!1,h.slideTo(p),K(R)}},$=function(){var e=n.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return e[T]<=o&&e.bottom>=0},_=function(t){for(var e=0,i=U[f];et||o===N-1&&0===t)&&(S=h.direction="right"),t<0?t=N-1:t>=N&&(t=0),p=t,i=S===b?"next":"prev",X.call(n,"slide","carousel",E[t]),m=!0,clearInterval(g),g=null,_(t),x&&H(n,"slide")?(I(E[t],"carousel-item-"+i),E[t].offsetWidth,I(E[t],"carousel-item-"+S),I(E[o],"carousel-item-"+S),O(E[t],function(a){var l=a&&a[s]!==E[t]?1e3*a.elapsedTime+100:20;m&&setTimeout(function(){m=!1,I(E[t],w),D(E[o],w),D(E[t],"carousel-item-"+i),D(E[t],"carousel-item-"+S),D(E[o],"carousel-item-"+S),X.call(n,"slid","carousel",E[t]),e.hidden||!h.interval||H(n,"paused")||h.cycle()},l)})):(I(E[t],w),E[t].offsetWidth,D(E[o],w),setTimeout(function(){m=!1,h.interval&&!H(n,"paused")&&h.cycle(),X.call(n,"slid","carousel",E[t])},100)))}},this.getActiveIndex=function(){return E.indexOf(B(n,"carousel-item active")[0])||0},"Carousel"in n||(h.pause&&h.interval&&(W(n,y[0],q),W(n,y[1],F),W(n,L.start,q),W(n,L.end,F)),E[f]>1&&W(n,L.start,Q),z&&W(z,"click",G),P&&W(P,"click",G),j&&W(j,"click",Y),!0===h.keyboard&&W(t,"keydown",J)),h.getActiveIndex()<0&&(E[f]&&I(E[0],w),U[f]&&_(0)),h.interval&&h.cycle(),n.Carousel=h}};a[v](["Carousel",Y,'[data-ride="carousel"]']);var G=function(t,e){t=M(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[d]("data-parent"),s=function(t,e){X.call(t,"show","collapse"),t.isAnimating=!0,I(t,"collapsing"),D(t,"collapse"),t[m].height=t.scrollHeight+"px",O(t,function(){t.isAnimating=!1,t[u]("aria-expanded","true"),e[u]("aria-expanded","true"),D(t,"collapsing"),I(t,"collapse"),I(t,"show"),t[m].height="",X.call(t,"shown","collapse")})},c=function(t,e){X.call(t,"hide","collapse"),t.isAnimating=!0,t[m].height=t.scrollHeight+"px",D(t,"collapse"),D(t,"show"),I(t,"collapsing"),t.offsetWidth,t[m].height="0px",O(t,function(){t.isAnimating=!1,t[u]("aria-expanded","false"),e[u]("aria-expanded","false"),D(t,"collapsing"),I(t,"collapse"),t[m].height="",X.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),H(a,"show")?l.hide():l.show()},this.hide=function(){a.isAnimating||(c(a,t),I(t,"collapsed"))},this.show=function(){o&&(i=M(".collapse.show",o),n=i&&(M('[data-target="#'+i.id+'"]',o)||M('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(c(i,n),I(n,"collapsed")),s(a,t),D(t,"collapsed"))},"Collapse"in t||W(t,"click",l.toggle),a=function(){var e=t.href&&t[d]("href"),i=t[d]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&M(n)}(),a.isAnimating=!1,o=M(e.parent)||r&&S(t,r),t.Collapse=l};a[v](["Collapse",G,'[data-toggle="collapse"]']);var J=function(t,i){t=M(t),this.persist=!0===i||"true"===t[d]("data-persist")||!1;var n=this,o=t[h],a=null,r=M(".dropdown-menu",o),c=function(){for(var t=r.children,e=[],i=0;i1?s-1:0:40===o&&s×',w=M(o.container),b=M(g),k=S(i,".modal"),C=S(i,".fixed-top"),x=S(i,".fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[c]=o[c]&&"fade"!==o[c]?o[c]:l||"fade",this.placement=o.placement?o.placement:h||T,this[r]=parseInt(o[r]||p)||200,this.dismissible=!(!o.dismissible&&"true"!==f),this.container=w||(b||(C||(x||(k||e[n]))));var A=this,E=i[d]("data-title")||null,L=i[d]("data-content")||null;if(L||this.template){var N=null,B=0,P=this.placement,z=function(t){null!==N&&t[s]===M(".close",N)&&A.hide()},j=function(){A.container.removeChild(N),B=null,N=null},q=function(){E=o.title||i[d]("data-title")||null,L=o.content||i[d]("data-content")||null,N=e.createElement("div");var t=e.createElement("div");if(t[u]("class","arrow"),N.appendChild(t),null!==L&&null===A.template){if(N[u]("role","tooltip"),null!==E){var n=e.createElement("h3");n[u]("class","popover-header"),n.innerHTML=A.dismissible?E+v:E,N.appendChild(n)}var a=e.createElement("div");a[u]("class","popover-body"),a.innerHTML=A.dismissible&&null===E?L+v:L,N.appendChild(a)}else{var l=e.createElement("div");l.innerHTML=A.template,N.innerHTML=l.firstChild.innerHTML}A.container.appendChild(N),N[m].display="block",N[u]("class","popover bs-popover-"+P+" "+A[c])},F=function(){!H(N,"show")&&I(N,"show")},Y=function(){U(i,N,P,A.container)},G=function(n){"click"!=A.trigger&&"focus"!=A.trigger||!A.dismissible&&n(i,"blur",A.hide),A.dismissible&&n(e,"click",z),n(t,"resize",A.hide)},J=function(){G(W),X.call(i,"shown","popover")},K=function(){G(R),j(),X.call(i,"hidden","popover")};this.toggle=function(){null===N?A.show():A.hide()},this.show=function(){clearTimeout(B),B=setTimeout(function(){null===N&&(P=A.placement,q(),Y(),F(),X.call(i,"show","popover"),A[c]?O(N,J):J())},20)},this.hide=function(){clearTimeout(B),B=setTimeout(function(){N&&null!==N&&H(N,"show")&&(X.call(i,"hide","popover"),D(N,"show"),A[c]?O(N,K):K())},A[r])},"Popover"in i||("hover"===A.trigger?(W(i,y[0],A.show),A.dismissible||W(i,y[1],A.hide)):"click"!=A.trigger&&"focus"!=A.trigger||W(i,A.trigger,A.toggle)),i.Popover=A}};a[v](["Popover",Q,'[data-toggle="popover"]']);var V=function(e,i){e=M(e);var n=M(e[d]("data-target")),o=e[d]("data-offset");if(i=i||{},i[s]||n){for(var a,l=this,r=i[s]&&M(i[s])||n,c=r&&r.getElementsByTagName("A"),u=parseInt(i.offset||o)||10,p=[],g=[],m=e.offsetHeight=c&&d>a;if(!s&&f)H(i,w)||(I(i,w),l&&!H(l,w)&&I(l,w),X.call(e,"activate","scrollspy",p[t]));else if(f){if(!f&&!s||s&&f)return}else H(i,w)&&(D(i,w),l&&H(l,w)&&!B(i[h],w).length&&D(l,w))},E=function(){a=b?j().y:e.scrollTop;for(var t=0,i=p[f];t1&&(t=e[e[f]-1]):t=e[0],t},E=function(){return M(A()[d]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget,!g.isAnimating&&!H(n,w)&&p.show()};this.show=function(){n=n||t,l=M(n[d]("href")),o=A(),a=E(),g.isAnimating=!0,D(o,w),o[u]("aria-selected","false"),I(n,w),n[u]("aria-selected","true"),T&&(H(t[h],"dropdown-menu")?H(T,w)||I(T,w):H(T,w)&&D(T,w)),X.call(o,"hide","tab",n),H(a,"fade")?(D(a,"show"),O(a,C)):C()},"Tab"in t||W(t,"click",L),p.height&&(v=E()[h]),t.Tab=p}};a[v](["Tab",Z,'[data-toggle="tab"]']);var $=function(t,e){t=M(t),e=e||{};var i=t[d]("data-animation"),n=t[d]("data-autohide"),o=t[d]("data-delay");this.animation=!1===e.animation||"false"===i?0:1,this.autohide=!1===e.autohide||"false"===n?0:1,this[r]=parseInt(e[r]||o)||500;var a=this,l=0,s=S(t,".toast"),c=function(){D(s,"showing"),I(s,"show"),X.call(s,"shown","toast"),a.autohide&&a.hide()},u=function(){I(s,"hide"),X.call(s,"hidden","toast")},h=function(){D(s,"show"),a.animation?O(s,u):u()},f=function(){clearTimeout(l),l=null,I(s,"hide"),R(t,"click",a.hide),t.Toast=null,t=null,s=null};this.show=function(){s&&(X.call(s,"show","toast"),a.animation&&I(s,"fade"),D(s,"hide"),I(s,"showing"),a.animation?O(s,c):c())},this.hide=function(t){s&&H(s,"show")&&(X.call(s,"hide","toast"),t?h():l=setTimeout(h,a[r]))},this.dispose=function(){s&&H(s,"show")&&(D(s,"show"),a.animation?O(s,f):f())},"Toast"in t||W(t,"click",a.hide),t.Toast=a};a[v](["Toast",$,'[data-dismiss="toast"]']);var _=function(i,o){i=M(i),o=o||{};var a=i[d]("data-animation"),l=i[d]("data-placement"),s=i[d]("data-delay"),h=i[d]("data-container"),f=M(o.container),p=M(h),g=S(i,".modal"),m=S(i,".fixed-top"),v=S(i,".fixed-bottom");this[c]=o[c]&&"fade"!==o[c]?o[c]:a||"fade",this.placement=o.placement?o.placement:l||T,this[r]=parseInt(o[r]||s)||200,this.container=f||(p||(m||(v||(g||e[n]))));var w=this,b=0,k=this.placement,C=null,x=i[d]("title")||i[d]("data-title")||i[d]("data-original-title");if(x&&""!=x){var A=function(){w.container.removeChild(C),C=null,b=null},E=function(){if(!(x=i[d]("title")||i[d]("data-title")||i[d]("data-original-title"))||""==x)return!1;C=e.createElement("div"),C[u]("role","tooltip");var t=e.createElement("div");t[u]("class","arrow"),C.appendChild(t);var n=e.createElement("div");n[u]("class","tooltip-inner"),C.appendChild(n),n.innerHTML=x,w.container.appendChild(C),C[u]("class","tooltip bs-tooltip-"+k+" "+w[c])},L=function(){U(i,C,k,w.container)},N=function(){!H(C,"show")&&I(C,"show")},B=function(){W(t,"resize",w.hide),X.call(i,"shown","tooltip")},P=function(){R(t,"resize",w.hide),A(),X.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(b),b=setTimeout(function(){if(null===C){if(k=w.placement,0==E())return;L(),N(),X.call(i,"show","tooltip"),w[c]?O(C,B):B()}},20)},this.hide=function(){clearTimeout(b),b=setTimeout(function(){C&&H(C,"show")&&(X.call(i,"hide","tooltip"),D(C,"show"),w[c]?O(C,P):P())},w[r])},this.toggle=function(){C?w.hide():w.show()},"Tooltip"in i||(i[u]("data-original-title",x),i.removeAttribute("title"),W(i,y[0],w.show),W(i,y[1],w.hide)),i.Tooltip=w}};a[v](["Tooltip",_,'[data-toggle="tooltip"]']);var tt=function(t,e){for(var i=0,n=e[f];i=p,N=v[T]+f.h/2+y.h/2>=m,I=v[T]-f.h<0,D=v[b]-f.w<0,B=v[T]+f.h+y.h>=m,S=v[b]+f.w+y.w>=p;a=(a===b||"right"===a)&&D&&S?T:a,a=a===T&&I?"bottom":a,a="bottom"===a&&B?T:a,a=a===b&&D?"right":a,a="right"===a&&S?b:a,-1===o.className.indexOf(a)&&(o.className=o.className.replace(k,a)),u=C.offsetWidth,h=C.offsetHeight,a===b||"right"===a?(s=a===b?v[b]+w.x-f.w-(A?u:0):v[b]+w.x+y.w,x?(r=v[T]+w.y,c=y.h/2-u):N?(r=v[T]+w.y-f.h+y.h,c=f.h-y.h/2-u):(r=v[T]+w.y-f.h/2+y.h/2,c=f.h/2-(A?.9*h:h/2))):a!==T&&"bottom"!==a||(r=a===T?v[T]+w.y-f.h-(A?h:0):v[T]+w.y+y.h,E?(s=0,d=v[b]+y.w/2-u):L?(s=p-1.01*f.w,d=f.w-(p-v[b])+y.w/2-u/2):(s=v[b]+w.x-f.w/2+y.w/2,d=f.w/2-u/2)),o[g][T]=r+"px",o[g][b]=s+"px",c&&(C[g][T]=c+"px"),d&&(C[g][b]=d+"px")};o.version="2.0.27";var q=function(t){t=M(t);var e=this,i=S(t,".alert"),n=function(){H(i,"fade")?O(i,a):a()},o=function(n){i=S(n[s],".alert"),(t=M('[data-dismiss="alert"]',i))&&i&&(t===n[s]||t.contains(n[s]))&&e.close()},a=function(){X.call(i,"closed","alert"),R(t,"click",o),i[h].removeChild(i)};this.close=function(){i&&t&&H(i,"show")&&(X.call(i,"close","alert"),D(i,"show"),i&&n())},"Alert"in t||W(t,"click",o),t.Alert=e};a[v](["Alert",q,'[data-dismiss="alert"]']);var F=function(t){t=M(t);var i=!1,n="checked",o=function(t){32===(t.which||t.keyCode)&&t[s]===e.activeElement&&l(t)},a=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},l=function(e){var o="LABEL"===e[s].tagName?e[s]:"LABEL"===e[s][h].tagName?e[s][h]:null;if(o){var a=e[s],l=B(a[h],"btn"),r=o.getElementsByTagName("INPUT")[0];if(r){if("checkbox"===r.type&&(r[n]?(D(o,w),r[d](n),r.removeAttribute(n),r[n]=!1):(I(o,w),r[d](n),r[u](n,n),r[n]=!0),i||(i=!0,X.call(r,"change","button"),X.call(t,"change","button"))),"radio"===r.type&&!i&&!r[n]){I(o,w),r[u](n,n),r[n]=!0,X.call(r,"change","button"),X.call(t,"change","button"),i=!0;for(var c=0,p=l[f];c1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(v&&!g&&(x=A||parseInt(t.touches[0].pageX),v)){if((!n.contains(t[s])||!n.contains(t.relatedTarget))&&Math.abs(k-x)<75)return!1;Ak&&p--,v=!1,h.slideTo(p),K(R)}},$=function(){var e=n.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return e[T]<=o&&e.bottom>=0},_=function(t){for(var e=0,i=U[f];et||o===N-1&&0===t)&&(S=h.direction="right"),t<0?t=N-1:t>=N&&(t=0),p=t,i=S===b?"next":"prev",X.call(n,"slide","carousel",E[t]),g=!0,clearInterval(m),m=null,_(t),C&&H(n,"slide")?(I(E[t],"carousel-item-"+i),E[t].offsetWidth,I(E[t],"carousel-item-"+S),I(E[o],"carousel-item-"+S),O(E[t],function(a){var l=a&&a[s]!==E[t]?1e3*a.elapsedTime+100:20;g&&setTimeout(function(){g=!1,I(E[t],w),D(E[o],w),D(E[t],"carousel-item-"+i),D(E[t],"carousel-item-"+S),D(E[o],"carousel-item-"+S),X.call(n,"slid","carousel",E[t]),e.hidden||!h.interval||H(n,"paused")||h.cycle()},l)})):(I(E[t],w),E[t].offsetWidth,D(E[o],w),setTimeout(function(){g=!1,h.interval&&!H(n,"paused")&&h.cycle(),X.call(n,"slid","carousel",E[t])},100)))}},this.getActiveIndex=function(){return E.indexOf(B(n,"carousel-item active")[0])||0},"Carousel"in n||(h.pause&&h.interval&&(W(n,y[0],q),W(n,y[1],F),W(n,L.start,q),W(n,L.end,F)),E[f]>1&&W(n,L.start,Q),z&&W(z,"click",G),P&&W(P,"click",G),j&&W(j,"click",Y),!0===h.keyboard&&W(t,"keydown",J)),h.getActiveIndex()<0&&(E[f]&&I(E[0],w),U[f]&&_(0)),h.interval&&h.cycle(),n.Carousel=h}};a[v](["Carousel",Y,'[data-ride="carousel"]']);var G=function(t,e){t=M(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[d]("data-parent"),s=function(t,e){X.call(t,"show","collapse"),t.isAnimating=!0,I(t,"collapsing"),D(t,"collapse"),t[g].height=t.scrollHeight+"px",O(t,function(){t.isAnimating=!1,t[u]("aria-expanded","true"),e[u]("aria-expanded","true"),D(t,"collapsing"),I(t,"collapse"),I(t,"show"),t[g].height="",X.call(t,"shown","collapse")})},c=function(t,e){X.call(t,"hide","collapse"),t.isAnimating=!0,t[g].height=t.scrollHeight+"px",D(t,"collapse"),D(t,"show"),I(t,"collapsing"),t.offsetWidth,t[g].height="0px",O(t,function(){t.isAnimating=!1,t[u]("aria-expanded","false"),e[u]("aria-expanded","false"),D(t,"collapsing"),I(t,"collapse"),t[g].height="",X.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),H(a,"show")?l.hide():l.show()},this.hide=function(){a.isAnimating||(c(a,t),I(t,"collapsed"))},this.show=function(){o&&(i=M(".collapse.show",o),n=i&&(M('[data-target="#'+i.id+'"]',o)||M('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(c(i,n),I(n,"collapsed")),s(a,t),D(t,"collapsed"))},"Collapse"in t||W(t,"click",l.toggle),a=function(){var e=t.href&&t[d]("href"),i=t[d]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&M(n)}(),a.isAnimating=!1,o=M(e.parent)||r&&S(t,r),t.Collapse=l};a[v](["Collapse",G,'[data-toggle="collapse"]']);var J=function(t,i){t=M(t),this.persist=!0===i||"true"===t[d]("data-persist")||!1;var n=this,o=t[h],a=null,r=M(".dropdown-menu",o),c=function(){for(var t=r.children,e=[],i=0;i1?s-1:0:40===o&&s×',w=M(o.container),b=M(m),k=S(i,".modal"),A=S(i,".fixed-top"),C=S(i,".fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[c]=o[c]&&"fade"!==o[c]?o[c]:l||"fade",this.placement=o.placement?o.placement:h||T,this[r]=parseInt(o[r]||p)||200,this.dismissible=!(!o.dismissible&&"true"!==f),this.container=w||(b||(A||(C||(k||e[n]))));var x=this,E=i[d]("data-title")||null,L=i[d]("data-content")||null;if(L||this.template){var N=null,B=0,P=this.placement,z=function(t){null!==N&&t[s]===M(".close",N)&&x.hide()},j=function(){x.container.removeChild(N),B=null,N=null},q=function(){E=o.title||i[d]("data-title")||null,L=o.content||i[d]("data-content")||null,N=e.createElement("div");var t=e.createElement("div");if(t[u]("class","arrow"),N.appendChild(t),null!==L&&null===x.template){if(N[u]("role","tooltip"),null!==E){var n=e.createElement("h3");n[u]("class","popover-header"),n.innerHTML=x.dismissible?E+v:E,N.appendChild(n)}var a=e.createElement("div");a[u]("class","popover-body"),a.innerHTML=x.dismissible&&null===E?L+v:L,N.appendChild(a)}else{var l=e.createElement("div");l.innerHTML=x.template,N.innerHTML=l.firstChild.innerHTML}x.container.appendChild(N),N[g].display="block",N[u]("class","popover bs-popover-"+P+" "+x[c])},F=function(){!H(N,"show")&&I(N,"show")},Y=function(){U(i,N,P,x.container)},G=function(n){"click"!=x.trigger&&"focus"!=x.trigger||!x.dismissible&&n(i,"blur",x.hide),x.dismissible&&n(e,"click",z),n(t,"resize",x.hide)},J=function(){G(W),X.call(i,"shown","popover")},K=function(){G(R),j(),X.call(i,"hidden","popover")};this.toggle=function(){null===N?x.show():x.hide()},this.show=function(){clearTimeout(B),B=setTimeout(function(){null===N&&(P=x.placement,q(),Y(),F(),X.call(i,"show","popover"),x[c]?O(N,J):J())},20)},this.hide=function(){clearTimeout(B),B=setTimeout(function(){N&&null!==N&&H(N,"show")&&(X.call(i,"hide","popover"),D(N,"show"),x[c]?O(N,K):K())},x[r])},"Popover"in i||("hover"===x.trigger?(W(i,y[0],x.show),x.dismissible||W(i,y[1],x.hide)):"click"!=x.trigger&&"focus"!=x.trigger||W(i,x.trigger,x.toggle)),i.Popover=x}};a[v](["Popover",Q,'[data-toggle="popover"]']);var V=function(e,i){e=M(e);var n=M(e[d]("data-target")),o=e[d]("data-offset");if(i=i||{},i[s]||n){for(var a,l=this,r=i[s]&&M(i[s])||n,c=r&&r.getElementsByTagName("A"),u=parseInt(i.offset||o)||10,p=[],m=[],g=e.offsetHeight=c&&d>a;if(!s&&f)H(i,w)||(I(i,w),l&&!H(l,w)&&I(l,w),X.call(e,"activate","scrollspy",p[t]));else if(f){if(!f&&!s||s&&f)return}else H(i,w)&&(D(i,w),l&&H(l,w)&&!B(i[h],w).length&&D(l,w))},E=function(){a=b?j().y:e.scrollTop;for(var t=0,i=p[f];t1&&(t=e[e[f]-1]):t=e[0],t},E=function(){return M(x()[d]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget,!m.isAnimating&&!H(n,w)&&p.show()};this.show=function(){n=n||t,l=M(n[d]("href")),o=x(),a=E(),m.isAnimating=!0,D(o,w),o[u]("aria-selected","false"),I(n,w),n[u]("aria-selected","true"),T&&(H(t[h],"dropdown-menu")?H(T,w)||I(T,w):H(T,w)&&D(T,w)),X.call(o,"hide","tab",n),H(a,"fade")?(D(a,"show"),O(a,A)):A()},"Tab"in t||W(t,"click",L),p.height&&(v=E()[h]),t.Tab=p}};a[v](["Tab",Z,'[data-toggle="tab"]']);var $=function(t,e){t=M(t),e=e||{};var i=t[d]("data-animation"),n=t[d]("data-autohide"),o=t[d]("data-delay");this.animation=!1===e.animation||"false"===i?0:1,this.autohide=!1===e.autohide||"false"===n?0:1,this[r]=parseInt(e[r]||o)||500;var a=this,l=0,s=S(t,".toast"),c=function(){D(s,"showing"),I(s,"show"),X.call(s,"shown","toast"),a.autohide&&a.hide()},u=function(){I(s,"hide"),X.call(s,"hidden","toast")},h=function(){D(s,"show"),a.animation?O(s,u):u()},f=function(){clearTimeout(l),l=null,I(s,"hide"),R(t,"click",a.hide),t.Toast=null,t=null,s=null};this.show=function(){s&&(X.call(s,"show","toast"),a.animation&&I(s,"fade"),D(s,"hide"),I(s,"showing"),a.animation?O(s,c):c())},this.hide=function(t){s&&H(s,"show")&&(X.call(s,"hide","toast"),t?h():l=setTimeout(h,a[r]))},this.dispose=function(){s&&H(s,"show")&&(D(s,"show"),a.animation?O(s,f):f())},"Toast"in t||W(t,"click",a.hide),t.Toast=a};a[v](["Toast",$,'[data-dismiss="toast"]']);var _=function(i,o){i=M(i),o=o||{};var a=i[d]("data-animation"),l=i[d]("data-placement"),s=i[d]("data-delay"),h=i[d]("data-container"),f=M(o.container),p=M(h),m=S(i,".modal"),g=S(i,".fixed-top"),v=S(i,".fixed-bottom");this[c]=o[c]&&"fade"!==o[c]?o[c]:a||"fade",this.placement=o.placement?o.placement:l||T,this[r]=parseInt(o[r]||s)||200,this.container=f||(p||(g||(v||(m||e[n]))));var w=this,b=0,k=this.placement,A=null,C=i[d]("title")||i[d]("data-title")||i[d]("data-original-title");if(C&&""!=C){var x=function(){w.container.removeChild(A),A=null,b=null},E=function(){if(!(C=i[d]("title")||i[d]("data-title")||i[d]("data-original-title"))||""==C)return!1;A=e.createElement("div"),A[u]("role","tooltip");var t=e.createElement("div");t[u]("class","arrow"),A.appendChild(t);var n=e.createElement("div");n[u]("class","tooltip-inner"),A.appendChild(n),n.innerHTML=C,w.container.appendChild(A),A[u]("class","tooltip bs-tooltip-"+k+" "+w[c])},L=function(){U(i,A,k,w.container)},N=function(){!H(A,"show")&&I(A,"show")},B=function(){W(t,"resize",w.hide),X.call(i,"shown","tooltip")},P=function(){R(t,"resize",w.hide),x(),X.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(b),b=setTimeout(function(){if(null===A){if(k=w.placement,0==E())return;L(),N(),X.call(i,"show","tooltip"),w[c]?O(A,B):B()}},20)},this.hide=function(){clearTimeout(b),b=setTimeout(function(){A&&H(A,"show")&&(X.call(i,"hide","tooltip"),D(A,"show"),w[c]?O(A,P):P())},w[r])},this.toggle=function(){A?w.hide():w.show()},"Tooltip"in i||(i[u]("data-original-title",C),i.removeAttribute("title"),W(i,y[0],w.show),W(i,y[1],w.hide)),i.Tooltip=w}};a[v](["Tooltip",_,'[data-toggle="tooltip"]']);var tt=function(t,e){for(var i=0,n=e[f];i=u,A=p[y]+f.h/2+v.h/2>=h,I=p[y]-f.h<0,L=p[b]-f.w<0,B=p[y]+f.h+v.h>=h,H=p[b]+f.w+v.w>=u;a=(a===b||"right"===a)&&L&&H?y:a,a=a===y&&I?"bottom":a,a="bottom"===a&&B?y:a,a=a===b&&L?"right":a,a="right"===a&&H?b:a,a===b||"right"===a?(c=a===b?p[b]+m.x-f.w:p[b]+m.x+v.w,T?(r=p[y]+m.y,s=v.h/2):A?(r=p[y]+m.y-f.h+v.h,s=f.h-v.h/2):r=p[y]+m.y-f.h/2+v.h/2):a!==y&&"bottom"!==a||(r=a===y?p[y]+m.y-f.h:p[y]+m.y+v.h,k?(c=0,d=p[b]+v.w/2):C?(c=u-1.01*f.w,d=f.w-(u-p[b])+v.w/2):c=p[b]+m.x-f.w/2+v.w/2),o[g][y]=r+"px",o[g][b]=c+"px",s&&(w[g][y]=s+"px"),d&&(w[g][b]=d+"px"),-1===o.className.indexOf(a)&&(o.className=o.className.replace(x,a))};o.version="2.0.27";var Y=function(o,a){o=R(o),a=a||{};var l=o[s]("data-target"),c=o[s]("data-offset-top"),d=o[s]("data-offset-bottom"),f="affix",u="function";if(this[r]=a[r]?R(a[r]):R(l)||null,this.offsetTop=a.offsetTop?a.offsetTop:parseInt(c)||0,this.offsetBottom=a.offsetBottom?a.offsetBottom:parseInt(d)||0,this[r]||this.offsetTop||this.offsetBottom){var h,p,g,m,v,b,T=this,x=!1,k=!1,C=function(){return Math.max(e[n].scrollHeight,e[n].offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},A=function(){return null!==T[r]?T[r].getBoundingClientRect()[y]+m:T.offsetTop?parseInt(typeof T.offsetTop===u?T.offsetTop():T.offsetTop||0):void 0},I=function(){if(T.offsetBottom)return g-o.offsetHeight-parseInt(typeof T.offsetBottom===u?T.offsetBottom():T.offsetBottom||0)},L=function(){g=C(),m=parseInt(U().y,0),h=A(),p=I(),v=parseInt(h)-m<0&&m>parseInt(h),b=parseInt(p)-m<0&&m>parseInt(p)},B=function(){x||M(o,f)||(q.call(o,f,f),q.call(o,"affix-top",f),E(o,f),x=!0,q.call(o,"affixed",f),q.call(o,"affixed-top",f))},H=function(){x&&M(o,f)&&(N(o,f),x=!1)},D=function(){k||M(o,"affix-bottom")||(q.call(o,f,f),q.call(o,"affix-bottom",f),E(o,"affix-bottom"),k=!0,q.call(o,"affixed",f),q.call(o,"affixed-bottom",f))},S=function(){k&&M(o,"affix-bottom")&&(N(o,"affix-bottom"),k=!1)},W=function(){b?(v&&H(),D()):(S(),v?B():H())};this.update=function(){L(),W()},"Affix"in o||(P(t,"scroll",T.update),!w&&P(t,"resize",T.update)),o.Affix=T,T.update()}};a[m](["Affix",Y,'[data-spy="affix"]']);var G=function(t){t=R(t);var e=this,i=W(t,".alert"),n=function(){M(i,"fade")?j(i,a):a()},o=function(n){i=W(n[r],".alert"),(t=R('[data-dismiss="alert"]',i))&&i&&(t===n[r]||t.contains(n[r]))&&e.close()},a=function(){q.call(i,"closed","alert"),z(t,"click",o),i[f].removeChild(i)};this.close=function(){i&&t&&M(i,"in")&&(q.call(i,"close","alert"),N(i,"in"),i&&n())},"Alert"in t||P(t,"click",o),t.Alert=e};a[m](["Alert",G,'[data-dismiss="alert"]']);var J=function(t,i){t=R(t),i=i||null;var n=!1,o="checked",a=function(t){32===(t.which||t.keyCode)&&t[r]===e.activeElement&&c(t)},l=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},c=function(e){var i="LABEL"===e[r].tagName?e[r]:"LABEL"===e[r][f].tagName?e[r][f]:null;if(i){var a=e[r],l=S(a[f],"btn"),c=i.getElementsByTagName("INPUT")[0];if(c){if("checkbox"===c.type&&(c[o]?(N(i,v),c[s](o),c.removeAttribute(o),c[o]=!1):(E(i,v),c[s](o),c[d](o,o),c[o]=!0),n||(n=!0,q.call(c,"change","button"),q.call(t,"change","button"))),"radio"===c.type&&!n&&!c[o]){E(i,v),c[d](o,o),c[o]=!0,q.call(c,"change","button"),q.call(t,"change","button"),n=!0;for(var h=0,p=l[u];h1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(m&&!g&&(k=x||parseInt(t.touches[0].pageX),m)){if((!e.contains(t[r])||!e.contains(t.relatedTarget))&&Math.abs(w-k)<75)return!1;xw&&h--,m=!1,f.slideTo(h),K(z)}},$=function(){var n=e.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return n[y]<=o&&n.bottom>=0},_=function(t){for(var e=0,i=X[u];et||n===I-1&&0===t)&&(L=f.direction="right"),t<0?t=I-1:t>=I&&(t=0),h=t,i=L===b?"next":"prev",q.call(e,"slide","carousel",C[t]),g=!0,clearInterval(p),p=null,_(t),A&&M(e,"slide")?(E(C[t],i),C[t].offsetWidth,E(C[t],L),E(C[n],L),j(C[t],function(o){var a=o&&o[r]!==C[t]?1e3*o.elapsedTime+100:20;g&&setTimeout(function(){g=!1,E(C[t],v),N(C[n],v),N(C[t],i),N(C[t],L),N(C[n],L),q.call(e,"slid","carousel",C[t]),f.interval&&!M(e,"paused")&&f.cycle()},a)})):(E(C[t],v),C[t].offsetWidth,N(C[n],v),setTimeout(function(){g=!1,f.interval&&!M(e,"paused")&&f.cycle(),q.call(e,"slid","carousel",C[t])},100)))}},this.getActiveIndex=function(){return C.indexOf(S(e,"item active")[0])||0},"Carousel"in e||(f.pause&&f.interval&&(P(e,T[0],U),P(e,T[1],F),P(e,B.start,U),P(e,B.end,F)),C[u]>1&&P(e,B.start,Q),W&&P(W,"click",G),D&&P(D,"click",G),O&&P(O,"click",Y),f.keyboard&&P(t,"keydown",J)),f.getActiveIndex()<0&&(C[u]&&E(C[0],v),X[u]&&_(0)),f.interval&&f.cycle(),e.Carousel=f}};a[m](["Carousel",K,'[data-ride="carousel"]']);var Q=function(t,e){t=R(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[s]("data-parent"),c=function(t,e){q.call(t,"show","collapse"),t.isAnimating=!0,E(t,"collapsing"),N(t,"collapse"),t[g].height=t.scrollHeight+"px",j(t,function(){t.isAnimating=!1,t[d]("aria-expanded","true"),e[d]("aria-expanded","true"),N(t,"collapsing"),E(t,"collapse"),E(t,"in"),t[g].height="",q.call(t,"shown","collapse")})},f=function(t,e){q.call(t,"hide","collapse"),t.isAnimating=!0,t[g].height=t.scrollHeight+"px",N(t,"collapse"),N(t,"in"),E(t,"collapsing"),t.offsetWidth,t[g].height="0px",j(t,function(){t.isAnimating=!1,t[d]("aria-expanded","false"),e[d]("aria-expanded","false"),N(t,"collapsing"),E(t,"collapse"),t[g].height="",q.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),M(a,"in")?l.hide():l.show()},this.hide=function(){a.isAnimating||(f(a,t),E(t,"collapsed"))},this.show=function(){o&&(i=R(".collapse.in",o),n=i&&(R('[data-target="#'+i.id+'"]',o)||R('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(f(i,n),E(n,"collapsed")),c(a,t),N(t,"collapsed"))},"Collapse"in t||P(t,"click",l.toggle),a=function(){var e=t.href&&t[s]("href"),i=t[s]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&R(n)}(),a.isAnimating=!1,o=R(e.parent)||r&&W(t,r),t.Collapse=l};a[m](["Collapse",Q,'[data-toggle="collapse"]']);var V=function(t,i){t=R(t),this.persist=!0===i||"true"===t[s]("data-persist")||!1;var n=this,o=t[f],a="open",c=null,h=R(".dropdown-menu",o),p=function(){for(var t=h.children,e=[],i=0;i1?r-1:0:40===o&&r×',v=R(o.container),b=R(p),x=W(i,".modal"),k=W(i,"."+C),A=W(i,".navbar-fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[c]=o[c]&&"fade"!==o[c]?o[c]:l||"fade",this.placement=o.placement?o.placement:f||y,this.delay=parseInt(o.delay||h)||200,this.dismissible=!(!o.dismissible&&"true"!==u),this.container=v||(b||(k||(A||(x||e[n]))));var I=this,L=o.title||i[s]("data-title")||null,B=o.content||i[s]("data-content")||null;if(B||this.template){var H=null,D=0,S=this.placement,O=function(t){null!==H&&t[r]===R(".close",H)&&I.hide()},X=function(){I.container.removeChild(H),D=null,H=null},U=function(){if(L=i[s]("data-title"),B=i[s]("data-content"),H=e.createElement("div"),null!==B&&null===I.template){if(H[d]("role","tooltip"),null!==L){var t=e.createElement("h3");t[d]("class","popover-title"),t.innerHTML=I.dismissible?L+m:L,H.appendChild(t)}var n=e.createElement("div"),o=e.createElement("div");n[d]("class","arrow"),o[d]("class","popover-content"),H.appendChild(n),H.appendChild(o),o.innerHTML=I.dismissible&&null===L?B+m:B}else{var a=e.createElement("div");a.innerHTML=I.template,H.innerHTML=a.firstChild.innerHTML}I.container.appendChild(H),H[g].display="block",H[d]("class","popover "+S+" "+I[c])},Y=function(){!M(H,"in")&&E(H,"in")},G=function(){F(i,H,S,I.container)},J=function(n){"click"!=I.trigger&&"focus"!=I.trigger||!I.dismissible&&n(i,"blur",I.hide),I.dismissible&&n(e,"click",O),!w&&n(t,"resize",I.hide)},K=function(){J(P),q.call(i,"shown","popover")},Q=function(){J(z),X(),q.call(i,"hidden","popover")};this.toggle=function(){null===H?I.show():I.hide()},this.show=function(){clearTimeout(D),D=setTimeout(function(){null===H&&(S=I.placement,U(),G(),Y(),q.call(i,"show","popover"),I[c]?j(H,K):K())},20)},this.hide=function(){clearTimeout(D),D=setTimeout(function(){H&&null!==H&&M(H,"in")&&(q.call(i,"hide","popover"),N(H,"in"),I[c]?j(H,Q):Q())},I.delay)},"Popover"in i||("hover"===I.trigger?(P(i,T[0],I.show),I.dismissible||P(i,T[1],I.hide)):"click"!=I.trigger&&"focus"!=I.trigger||P(i,I.trigger,I.toggle)),i.Popover=I}};a[m](["Popover",$,'[data-toggle="popover"]']);var _=function(e,i){e=R(e);var n=R(e[s]("data-target")),o=e[s]("data-offset");if(i=i||{},i[r]||n){for(var a,l=this,c=i[r]&&R(i[r])||n,d=c&&c.getElementsByTagName("A"),h=parseInt(i.offset||o)||10,p=[],g=[],b=e.offsetHeight=c&&s>a;if(!r&&d)"LI"!==i.tagName||M(i,v)||(E(i,v),o&&!M(o,v)&&E(o,v),q.call(e,"activate","scrollspy",p[t]));else if(d){if(!d&&!r||r&&d)return}else"LI"===i.tagName&&M(i,v)&&(N(i,v),o&&M(o,v)&&!S(i[f],v).length&&N(o,v))},L=function(){a=T?U().y:e.scrollTop;for(var t=0,i=p[u];t1&&(t=e[e[u]-1]):t=e[0],t.getElementsByTagName("A")[0]},I=function(){return R(C()[s]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget||this,!m.isAnimating&&!M(n[f],v)&&p.show()};this.show=function(){n=n||t,l=R(n[s]("href")),o=C(),a=I(),m.isAnimating=!0,N(o[f],v),o[d]("aria-expanded","false"),E(n[f],v),n[d]("aria-expanded","true"),w&&(M(t[f][f],"dropdown-menu")?M(w,v)||E(w,v):M(w,v)&&N(w,v)),q.call(o,"hide","tab",n),M(a,"fade")?(N(a,"in"),j(a,k)):k()},"Tab"in t||P(t,"click",L),p.height&&(y=I()[f]),t.Tab=p}};a[m](["Tab",tt,'[data-toggle="tab"]']);var et=function(i,o){i=R(i),o=o||{};var a=i[s]("data-animation"),l=i[s]("data-placement"),r=i[s]("data-delay"),f=i[s]("data-container"),u=R(o.container),h=R(f),p=W(i,".modal"),g=W(i,"."+C),m=W(i,".navbar-fixed-bottom");this[c]=o[c]&&"fade"!==o[c]?o[c]:a||"fade",this.placement=o.placement?o.placement:l||y,this.delay=parseInt(o.delay||r)||200,this.container=u||(h||(g||(m||(p||e[n]))));var v=this,b=0,x=this.placement,k=null,A=i[s]("title")||i[s]("data-title")||i[s]("data-original-title");if(A&&""!=A){var I=function(){v.container.removeChild(k),k=null,b=null},L=function(){if(!(A=i[s]("title")||i[s]("data-title")||i[s]("data-original-title"))||""==A)return!1;k=e.createElement("div"),k[d]("role","tooltip");var t=e.createElement("div"),n=e.createElement("div");t[d]("class","tooltip-arrow"),n[d]("class","tooltip-inner"),k.appendChild(t),k.appendChild(n),n.innerHTML=A,v.container.appendChild(k),k[d]("class","tooltip "+x+" "+v[c])},B=function(){F(i,k,x,v.container)},H=function(){!M(k,"in")&&E(k,"in")},D=function(){q.call(i,"shown","tooltip"),!w&&P(t,"resize",v.hide)},S=function(){!w&&z(t,"resize",v.hide),I(),q.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(b),b=setTimeout(function(){if(null===k){if(x=v.placement,0==L())return;B(),H(),q.call(i,"show","tooltip"),v[c]?j(k,D):D()}},20)},this.hide=function(){clearTimeout(b),b=setTimeout(function(){k&&M(k,"in")&&(q.call(i,"hide","tooltip"),N(k,"in"),v[c]?j(k,S):S())},v.delay)},this.toggle=function(){k?v.hide():v.show()},"Tooltip"in i||(i[d]("data-original-title",A),i.removeAttribute("title"),P(i,T[0],v.show),P(i,T[1],v.hide)),i.Tooltip=v}};a[m](["Tooltip",et,'[data-toggle="tooltip"]']);var it=function(t,e){for(var i=0,n=e[u];i=u,C=p[y]+f.h/2+v.h/2>=h,I=p[y]-f.h<0,L=p[b]-f.w<0,B=p[y]+f.h+v.h>=h,H=p[b]+f.w+v.w>=u;o=(o===b||"right"===o)&&L&&H?y:o,o=o===y&&I?"bottom":o,o="bottom"===o&&B?y:o,o=o===b&&L?"right":o,o="right"===o&&H?b:o,o===b||"right"===o?(c=o===b?p[b]+m.x-f.w:p[b]+m.x+v.w,w?(r=p[y]+m.y,s=v.h/2):C?(r=p[y]+m.y-f.h+v.h,s=f.h-v.h/2):r=p[y]+m.y-f.h/2+v.h/2):o!==y&&"bottom"!==o||(r=o===y?p[y]+m.y-f.h:p[y]+m.y+v.h,k?(c=0,d=p[b]+v.w/2):A?(c=u-1.01*f.w,d=f.w-(u-p[b])+v.w/2):c=p[b]+m.x-f.w/2+v.w/2),a[g][y]=r+"px",a[g][b]=c+"px",s&&(T[g][y]=s+"px"),d&&(T[g][b]=d+"px"),-1===a.className.indexOf(o)&&(a.className=a.className.replace(x,o))};a.version="2.0.27";var Y=function(a,o){a=R(a),o=o||{};var l=a[s]("data-target"),c=a[s]("data-offset-top"),d=a[s]("data-offset-bottom"),f="affix",u="function";if(this[r]=o[r]?R(o[r]):R(l)||null,this.offsetTop=o.offsetTop?o.offsetTop:parseInt(c)||0,this.offsetBottom=o.offsetBottom?o.offsetBottom:parseInt(d)||0,this[r]||this.offsetTop||this.offsetBottom){var h,p,g,m,v,b,w=this,x=!1,k=!1,A=function(){return Math.max(e[n].scrollHeight,e[n].offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},C=function(){return null!==w[r]?w[r].getBoundingClientRect()[y]+m:w.offsetTop?parseInt(typeof w.offsetTop===u?w.offsetTop():w.offsetTop||0):void 0},I=function(){if(w.offsetBottom)return g-a.offsetHeight-parseInt(typeof w.offsetBottom===u?w.offsetBottom():w.offsetBottom||0)},L=function(){g=A(),m=parseInt(U().y,0),h=C(),p=I(),v=parseInt(h)-m<0&&m>parseInt(h),b=parseInt(p)-m<0&&m>parseInt(p)},B=function(){x||M(a,f)||(q.call(a,f,f),q.call(a,"affix-top",f),E(a,f),x=!0,q.call(a,"affixed",f),q.call(a,"affixed-top",f))},H=function(){x&&M(a,f)&&(N(a,f),x=!1)},D=function(){k||M(a,"affix-bottom")||(q.call(a,f,f),q.call(a,"affix-bottom",f),E(a,"affix-bottom"),k=!0,q.call(a,"affixed",f),q.call(a,"affixed-bottom",f))},S=function(){k&&M(a,"affix-bottom")&&(N(a,"affix-bottom"),k=!1)},W=function(){b?(v&&H(),D()):(S(),v?B():H())};this.update=function(){L(),W()},"Affix"in a||(P(t,"scroll",w.update),!T&&P(t,"resize",w.update)),a.Affix=w,w.update()}};o[m](["Affix",Y,'[data-spy="affix"]']);var G=function(t){t=R(t);var e=this,i=W(t,".alert"),n=function(){M(i,"fade")?j(i,o):o()},a=function(n){i=W(n[r],".alert"),(t=R('[data-dismiss="alert"]',i))&&i&&(t===n[r]||t.contains(n[r]))&&e.close()},o=function(){q.call(i,"closed","alert"),z(t,"click",a),i[f].removeChild(i)};this.close=function(){i&&t&&M(i,"in")&&(q.call(i,"close","alert"),N(i,"in"),i&&n())},"Alert"in t||P(t,"click",a),t.Alert=e};o[m](["Alert",G,'[data-dismiss="alert"]']);var J=function(t,i){t=R(t),i=i||null;var n=!1,a="checked",o=function(t){32===(t.which||t.keyCode)&&t[r]===e.activeElement&&c(t)},l=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},c=function(e){var i="LABEL"===e[r].tagName?e[r]:"LABEL"===e[r][f].tagName?e[r][f]:null;if(i){var o=e[r],l=S(o[f],"btn"),c=i.getElementsByTagName("INPUT")[0];if(c){if("checkbox"===c.type&&(c[a]?(N(i,v),c[s](a),c.removeAttribute(a),c[a]=!1):(E(i,v),c[s](a),c[d](a,a),c[a]=!0),n||(n=!0,q.call(c,"change","button"),q.call(t,"change","button"))),"radio"===c.type&&!n&&!c[a]){E(i,v),c[d](a,a),c[a]=!0,q.call(c,"change","button"),q.call(t,"change","button"),n=!0;for(var h=0,p=l[u];h1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(m&&!g&&(k=x||parseInt(t.touches[0].pageX),m)){if((!e.contains(t[r])||!e.contains(t.relatedTarget))&&Math.abs(T-k)<75)return!1;xT&&h--,m=!1,f.slideTo(h),K(z)}},$=function(){var n=e.getBoundingClientRect(),a=t.innerHeight||i.clientHeight;return n[y]<=a&&n.bottom>=0},_=function(t){for(var e=0,i=X[u];et||n===I-1&&0===t)&&(L=f.direction="right"),t<0?t=I-1:t>=I&&(t=0),h=t,i=L===b?"next":"prev",q.call(e,"slide","carousel",A[t]),g=!0,clearInterval(p),p=null,_(t),C&&M(e,"slide")?(E(A[t],i),A[t].offsetWidth,E(A[t],L),E(A[n],L),j(A[t],function(a){var o=a&&a[r]!==A[t]?1e3*a.elapsedTime+100:20;g&&setTimeout(function(){g=!1,E(A[t],v),N(A[n],v),N(A[t],i),N(A[t],L),N(A[n],L),q.call(e,"slid","carousel",A[t]),f.interval&&!M(e,"paused")&&f.cycle()},o)})):(E(A[t],v),A[t].offsetWidth,N(A[n],v),setTimeout(function(){g=!1,f.interval&&!M(e,"paused")&&f.cycle(),q.call(e,"slid","carousel",A[t])},100)))}},this.getActiveIndex=function(){return A.indexOf(S(e,"item active")[0])||0},"Carousel"in e||(f.pause&&f.interval&&(P(e,w[0],U),P(e,w[1],F),P(e,B.start,U),P(e,B.end,F)),A[u]>1&&P(e,B.start,Q),W&&P(W,"click",G),D&&P(D,"click",G),O&&P(O,"click",Y),f.keyboard&&P(t,"keydown",J)),f.getActiveIndex()<0&&(A[u]&&E(A[0],v),X[u]&&_(0)),f.interval&&f.cycle(),e.Carousel=f}};o[m](["Carousel",K,'[data-ride="carousel"]']);var Q=function(t,e){t=R(t),e=e||{};var i,n,a=null,o=null,l=this,r=t[s]("data-parent"),c=function(t,e){q.call(t,"show","collapse"),t.isAnimating=!0,E(t,"collapsing"),N(t,"collapse"),t[g].height=t.scrollHeight+"px",j(t,function(){t.isAnimating=!1,t[d]("aria-expanded","true"),e[d]("aria-expanded","true"),N(t,"collapsing"),E(t,"collapse"),E(t,"in"),t[g].height="",q.call(t,"shown","collapse")})},f=function(t,e){q.call(t,"hide","collapse"),t.isAnimating=!0,t[g].height=t.scrollHeight+"px",N(t,"collapse"),N(t,"in"),E(t,"collapsing"),t.offsetWidth,t[g].height="0px",j(t,function(){t.isAnimating=!1,t[d]("aria-expanded","false"),e[d]("aria-expanded","false"),N(t,"collapsing"),E(t,"collapse"),t[g].height="",q.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),M(o,"in")?l.hide():l.show()},this.hide=function(){o.isAnimating||(f(o,t),E(t,"collapsed"))},this.show=function(){a&&(i=R(".collapse.in",a),n=i&&(R('[data-target="#'+i.id+'"]',a)||R('[href="#'+i.id+'"]',a))),(!o.isAnimating||i&&!i.isAnimating)&&(n&&i!==o&&(f(i,n),E(n,"collapsed")),c(o,t),N(t,"collapsed"))},"Collapse"in t||P(t,"click",l.toggle),o=function(){var e=t.href&&t[s]("href"),i=t[s]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&R(n)}(),o.isAnimating=!1,a=R(e.parent)||r&&W(t,r),t.Collapse=l};o[m](["Collapse",Q,'[data-toggle="collapse"]']);var V=function(t,i){t=R(t),this.persist=!0===i||"true"===t[s]("data-persist")||!1;var n=this,a=t[f],o="open",c=null,h=R(".dropdown-menu",a),p=function(){for(var t=h.children,e=[],i=0;i1?r-1:0:40===a&&r×',v=R(a.container),b=R(p),x=W(i,".modal"),k=W(i,"."+A),C=W(i,".navbar-fixed-bottom");this.template=a.template?a.template:null,this.trigger=a.trigger?a.trigger:o||"hover",this[c]=a[c]&&"fade"!==a[c]?a[c]:l||"fade",this.placement=a.placement?a.placement:f||y,this.delay=parseInt(a.delay||h)||200,this.dismissible=!(!a.dismissible&&"true"!==u),this.container=v||(b||(k||(C||(x||e[n]))));var I=this,L=a.title||i[s]("data-title")||null,B=a.content||i[s]("data-content")||null;if(B||this.template){var H=null,D=0,S=this.placement,O=function(t){null!==H&&t[r]===R(".close",H)&&I.hide()},X=function(){I.container.removeChild(H),D=null,H=null},U=function(){if(L=i[s]("data-title"),B=i[s]("data-content"),H=e.createElement("div"),null!==B&&null===I.template){if(H[d]("role","tooltip"),null!==L){var t=e.createElement("h3");t[d]("class","popover-title"),t.innerHTML=I.dismissible?L+m:L,H.appendChild(t)}var n=e.createElement("div"),a=e.createElement("div");n[d]("class","arrow"),a[d]("class","popover-content"),H.appendChild(n),H.appendChild(a),a.innerHTML=I.dismissible&&null===L?B+m:B}else{var o=e.createElement("div");o.innerHTML=I.template,H.innerHTML=o.firstChild.innerHTML}I.container.appendChild(H),H[g].display="block",H[d]("class","popover "+S+" "+I[c])},Y=function(){!M(H,"in")&&E(H,"in")},G=function(){F(i,H,S,I.container)},J=function(n){"click"!=I.trigger&&"focus"!=I.trigger||!I.dismissible&&n(i,"blur",I.hide),I.dismissible&&n(e,"click",O),!T&&n(t,"resize",I.hide)},K=function(){J(P),q.call(i,"shown","popover")},Q=function(){J(z),X(),q.call(i,"hidden","popover")};this.toggle=function(){null===H?I.show():I.hide()},this.show=function(){clearTimeout(D),D=setTimeout(function(){null===H&&(S=I.placement,U(),G(),Y(),q.call(i,"show","popover"),I[c]?j(H,K):K())},20)},this.hide=function(){clearTimeout(D),D=setTimeout(function(){H&&null!==H&&M(H,"in")&&(q.call(i,"hide","popover"),N(H,"in"),I[c]?j(H,Q):Q())},I.delay)},"Popover"in i||("hover"===I.trigger?(P(i,w[0],I.show),I.dismissible||P(i,w[1],I.hide)):"click"!=I.trigger&&"focus"!=I.trigger||P(i,I.trigger,I.toggle)),i.Popover=I}};o[m](["Popover",$,'[data-toggle="popover"]']);var _=function(e,i){e=R(e);var n=R(e[s]("data-target")),a=e[s]("data-offset");if(i=i||{},i[r]||n){for(var o,l=this,c=i[r]&&R(i[r])||n,d=c&&c.getElementsByTagName("A"),h=parseInt(i.offset||a)||10,p=[],g=[],b=e.offsetHeight=c&&s>o;if(!r&&d)"LI"!==i.tagName||M(i,v)||(E(i,v),a&&!M(a,v)&&E(a,v),q.call(e,"activate","scrollspy",p[t]));else if(d){if(!d&&!r||r&&d)return}else"LI"===i.tagName&&M(i,v)&&(N(i,v),a&&M(a,v)&&!S(i[f],v).length&&N(a,v))},L=function(){o=w?U().y:e.scrollTop;for(var t=0,i=p[u];t1&&(t=e[e[u]-1]):t=e[0],t.getElementsByTagName("A")[0]},I=function(){return R(A()[s]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget||this,!m.isAnimating&&!M(n[f],v)&&p.show()};this.show=function(){n=n||t,l=R(n[s]("href")),a=A(),o=I(),m.isAnimating=!0,N(a[f],v),a[d]("aria-expanded","false"),E(n[f],v),n[d]("aria-expanded","true"),T&&(M(t[f][f],"dropdown-menu")?M(T,v)||E(T,v):M(T,v)&&N(T,v)),q.call(a,"hide","tab",n),M(o,"fade")?(N(o,"in"),j(o,k)):k()},"Tab"in t||P(t,"click",L),p.height&&(y=I()[f]),t.Tab=p}};o[m](["Tab",tt,'[data-toggle="tab"]']);var et=function(i,a){i=R(i),a=a||{};var o=i[s]("data-animation"),l=i[s]("data-placement"),r=i[s]("data-delay"),f=i[s]("data-container"),u=R(a.container),h=R(f),p=W(i,".modal"),g=W(i,"."+A),m=W(i,".navbar-fixed-bottom");this[c]=a[c]&&"fade"!==a[c]?a[c]:o||"fade",this.placement=a.placement?a.placement:l||y,this.delay=parseInt(a.delay||r)||200,this.container=u||(h||(g||(m||(p||e[n]))));var v=this,b=0,x=this.placement,k=null,C=i[s]("title")||i[s]("data-title")||i[s]("data-original-title");if(C&&""!=C){var I=function(){v.container.removeChild(k),k=null,b=null},L=function(){if(!(C=i[s]("title")||i[s]("data-title")||i[s]("data-original-title"))||""==C)return!1;k=e.createElement("div"),k[d]("role","tooltip");var t=e.createElement("div"),n=e.createElement("div");t[d]("class","tooltip-arrow"),n[d]("class","tooltip-inner"),k.appendChild(t),k.appendChild(n),n.innerHTML=C,v.container.appendChild(k),k[d]("class","tooltip "+x+" "+v[c])},B=function(){F(i,k,x,v.container)},H=function(){!M(k,"in")&&E(k,"in")},D=function(){q.call(i,"shown","tooltip"),!T&&P(t,"resize",v.hide)},S=function(){!T&&z(t,"resize",v.hide),I(),q.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(b),b=setTimeout(function(){if(null===k){if(x=v.placement,0==L())return;B(),H(),q.call(i,"show","tooltip"),v[c]?j(k,D):D()}},20)},this.hide=function(){clearTimeout(b),b=setTimeout(function(){k&&M(k,"in")&&(q.call(i,"hide","tooltip"),N(k,"in"),v[c]?j(k,S):S())},v.delay)},this.toggle=function(){k?v.hide():v.show()},"Tooltip"in i||(i[d]("data-original-title",C),i.removeAttribute("title"),P(i,w[0],v.show),P(i,w[1],v.hide)),i.Tooltip=v}};o[m](["Tooltip",et,'[data-toggle="tooltip"]']);var it=function(t,e){for(var i=0,n=e[u];i