healthchecks_healthchecks/static/js/bootstrap-native.min.js

3 lines
22 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Native Javascript for Bootstrap 3 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.Affix=i.Affix,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.Tooltip=i.Tooltip}}(this,function(){"use strict";var t="undefined"!=typeof global?global:this||window,e=document,i=e.documentElement,n="body",a=t.BSN={},o=a.supports=[],l="data-toggle",r="target",s="animation",c="onmouseleave"in e?["mouseenter","mouseleave"]:["mouseover","mouseout"],d={start:"touchstart",end:"touchend",move:"touchmove"},f="getAttribute",u="setAttribute",h="parentNode",p="length",g="Transition",m="Webkit",v="style",b="push",y="active",T="left",w="top",x=!("opacity"in i[v]),k=/\b(top|bottom|left|right)+/,A=0,C="navbar-fixed-top",I=m+g in i[v]||g.toLowerCase()in i[v],L=m+g in i[v]?m.toLowerCase()+g+"End":g.toLowerCase()+"end",B=m+"Duration"in i[v]?m.toLowerCase()+g+"Duration":g.toLowerCase()+"Duration",H=function(t){t.focus?t.focus():t.setActive()},E=function(t,e){t.classList.add(e)},N=function(t,e){t.classList.remove(e)},M=function(t,e){return t.classList.contains(e)},D=function(t){for(var e=[],i=0,n=t[p];i<n;i++)e[b](t[i]);return e},S=function(t,e){return D(t[x?"querySelectorAll":"getElementsByClassName"](x?"."+e.replace(/\s(?=[a-z])/g,"."):e))},R=function(t,i){var n=i||e;return"object"==typeof t?t:n.querySelector(t)},W=function(t,i){var n=i.charAt(0),a=i.substr(1);if("."===n){for(;t&&t!==e;t=t[h])if(null!==R(i,t[h])&&M(t,a))return t}else if("#"===n)for(;t&&t!==e;t=t[h])if(t.id===a)return t;return!1},P=function(t,e,i,n){n=n||!1,t.addEventListener(e,i,n)},z=function(t,e,i,n){n=n||!1,t.removeEventListener(e,i,n)},O=function(t,e,i,n){P(t,e,function a(o){i(o),z(t,e,a,n)},n)},X=function(){var e=!1;try{var i=Object.defineProperty({},"passive",{get:function(){e=!0}});O(t,"testPassive",null,i)}catch(t){}return e}(),j=!!X&&{passive:!0},q=function(e){var i=I?t.getComputedStyle(e)[B]:0;return i=parseFloat(i),i="number"!=typeof i||isNaN(i)?0:1e3*i},U=function(t,e){var i=0;q(t)?O(t,L,function(t){!i&&e(t),i=1}):setTimeout(function(){!i&&e(),i=1},17)},Y=function(t,e,i){var n=new CustomEvent(t+".bs."+e);n.relatedTarget=i,this.dispatchEvent(n)},$=function(){return{y:t.pageYOffset||i.scrollTop,x:t.pageXOffset||i.scrollLeft}},F=function(t,a,o,l){var r,s,c,d,f={w:a.offsetWidth,h:a.offsetHeight},u=i.clientWidth||e[n].clientWidth,h=i.clientHeight||e[n].clientHeight,p=t.getBoundingClientRect(),g=l===e[n]?$():{x:l.offsetLeft+l.scrollLeft,y:l.offsetTop+l.scrollTop},m={w:p.right-p[T],h:p.bottom-p[w]},b=R('[class*="arrow"]',a),y=p[w]+m.h/2-f.h/2<0,x=p[T]+m.w/2-f.w/2<0,A=p[T]+f.w/2+m.w/2>=u,C=p[w]+f.h/2+m.h/2>=h,I=p[w]-f.h<0,L=p[T]-f.w<0,B=p[w]+f.h+m.h>=h,H=p[T]+f.w+m.w>=u;o=(o===T||"right"===o)&&L&&H?w:o,o=o===w&&I?"bottom":o,o="bottom"===o&&B?w:o,o=o===T&&L?"right":o,o="right"===o&&H?T:o,o===T||"right"===o?(s=o===T?p[T]+g.x-f.w:p[T]+g.x+m.w,y?(r=p[w]+g.y,c=m.h/2):C?(r=p[w]+g.y-f.h+m.h,c=f.h-m.h/2):r=p[w]+g.y-f.h/2+m.h/2):o!==w&&"bottom"!==o||(r=o===w?p[w]+g.y-f.h:p[w]+g.y+m.h,x?(s=0,d=p[T]+m.w/2):A?(s=u-1.01*f.w,d=f.w-(u-p[T])+m.w/2):s=p[T]+g.x-f.w/2+m.w/2),a[v][w]=r+"px",a[v][T]=s+"px",c&&(b[v][w]=c+"px"),d&&(b[v][T]=d+"px"),-1===a.className.indexOf(o)&&(a.className=a.className.replace(k,o))};a.version="2.0.27";var G=function(a,o){a=R(a),o=o||{};var l=a[f]("data-target"),s=a[f]("data-offset-top"),c=a[f]("data-offset-bottom"),d="affix",u="function";if(this[r]=o[r]?R(o[r]):R(l)||null,this.offsetTop=o.offsetTop?o.offsetTop:parseInt(s)||0,this.offsetBottom=o.offsetBottom?o.offsetBottom:parseInt(c)||0,this[r]||this.offsetTop||this.offsetBottom){var h,p,g,m,v,b,y=this,T=!1,k=!1,A=function(){return Math.max(e[n].scrollHeight,e[n].offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},C=function(){return null!==y[r]?y[r].getBoundingClientRect()[w]+m:y.offsetTop?parseInt(typeof y.offsetTop===u?y.offsetTop():y.offsetTop||0):void 0},I=function(){if(y.offsetBottom)return g-a.offsetHeight-parseInt(typeof y.offsetBottom===u?y.offsetBottom():y.offsetBottom||0)},L=function(){g=A(),m=parseInt($().y,0),h=C(),p=I(),v=parseInt(h)-m<0&&m>parseInt(h),b=parseInt(p)-m<0&&m>parseInt(p)},B=function(){T||M(a,d)||(Y.call(a,d,d),Y.call(a,"affix-top",d),E(a,d),T=!0,Y.call(a,"affixed",d),Y.call(a,"affixed-top",d))},H=function(){T&&M(a,d)&&(N(a,d),T=!1)},D=function(){k||M(a,"affix-bottom")||(Y.call(a,d,d),Y.call(a,"affix-bottom",d),E(a,"affix-bottom"),k=!0,Y.call(a,"affixed",d),Y.call(a,"affixed-bottom",d))},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",y.update,j),!x&&P(t,"resize",y.update,j)),a.Affix=y,y.update()}};o[b](["Affix",G,'[data-spy="affix"]']);var J=function(t){t=R(t);var e=this,i=W(t,".alert"),n=function(){M(i,"fade")?U(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(){Y.call(i,"closed","alert"),z(t,"click",a),i[h].removeChild(i)};this.close=function(){i&&t&&M(i,"in")&&(Y.call(i,"close","alert"),N(i,"in"),i&&n())},"Alert"in t||P(t,"click",a),t.Alert=e};o[b](["Alert",J,'[data-dismiss="alert"]']);var K=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&&s(t)},l=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},s=function(e){var i="LABEL"===e[r].tagName?e[r]:"LABEL"===e[r][h].tagName?e[r][h]:null;if(i){var o=S(i[h],"btn"),l=i.getElementsByTagName("INPUT")[0];if(l){if("checkbox"===l.type&&(l[a]?(N(i,y),l[f](a),l.removeAttribute(a),l[a]=!1):(E(i,y),l[f](a),l[u](a,a),l[a]=!0),n||(n=!0,Y.call(l,"change","button"),Y.call(t,"change","button"))),"radio"===l.type&&!n&&(!l[a]||0===e.screenX&&0==e.screenY)){E(i,y),l[u](a,a),l[a]=!0,Y.call(l,"change","button"),Y.call(t,"change","button"),n=!0;for(var s=0,c=o[p];s<c;s++){var d=o[s],g=d.getElementsByTagName("INPUT")[0];d!==i&&M(d,y)&&(N(d,y),g.removeAttribute(a),g[a]=!1,Y.call(g,"change","button"))}}setTimeout(function(){n=!1},50)}}};if(M(t,"btn"))null!==i&&("reset"!==i?function(){i&&"reset"!==i&&("loading"===i&&(E(t,"disabled"),t[u]("disabled","disabled"),t[u]("data-original-text",t.innerHTML.trim())),t.innerHTML=t[f]("data-"+i+"-text"))}():function(){t[f]("data-original-text")&&((M(t,"disabled")||"disabled"===t[f]("disabled"))&&(N(t,"disabled"),t.removeAttribute("disabled")),t.innerHTML=t[f]("data-original-text"))}());else{"Button"in t||(P(t,"click",s),P(t,"keyup",o),P(t,"keydown",l));for(var c=S(t,"btn"),d=c[p],g=0;g<d;g++)!M(c[g],y)&&R("input",c[g])[f](a)&&E(c[g],y);t.Button=this}};o[b](["Button",K,'[data-toggle="buttons"]']);var Q=function(e,n){e=R(e),n=n||{};var a=e[f]("data-interval"),o=n.interval,l="false"===a?0:parseInt(a),s="hover"===e[f]("data-pause")||!1,u="true"===e[f]("data-keyboard")||!1;this.keyboard=!0===n.keyboard||u,this.pause=!("hover"!==n.pause&&!s)&&"hover",this.interval="number"==typeof o?o:!1===o||0===l||!1===l?0:isNaN(l)?5e3:l;var h=this,g=e.index=0,m=e.timer=0,v=!1,b=!1,x=null,k=null,A=null,C=S(e,"item"),L=C[p],B=this.direction=T,H=S(e,"carousel-control"),D=H[0],W=H[1],O=R(".carousel-indicators",e),X=O&&O.getElementsByTagName("LI")||[];if(!(L<2)){var q=function(){!1===h.interval||M(e,"paused")||(E(e,"paused"),!v&&(clearInterval(m),m=null))},$=function(){!1!==h.interval&&M(e,"paused")&&(N(e,"paused"),!v&&(clearInterval(m),m=null),!v&&h.cycle())},F=function(t){if(t.preventDefault(),!v){var e=t[r];if(!e||M(e,y)||!e[f]("data-slide-to"))return!1;g=parseInt(e[f]("data-slide-to"),10),h.slideTo(g)}},G=function(t){if(t.preventDefault(),!v){var e=t.currentTarget||t.srcElement;e===W?g++:e===D&&g--,h.slideTo(g)}},J=function(t){if(!v){switch(t.which){case 39:g++;break;case 37:g--;break;default:return}h.slideTo(g)}},K=function(t){t(e,d.move,V,j),t(e,d.end,Z,j)},Q=function(t){b||(x=parseInt(t.touches[0].pageX),e.contains(t[r])&&(b=!0,K(P)))},V=function(t){return b?(k=parseInt(t.touches[0].pageX),"touchmove"===t.type&&t.touches[p]>1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(b&&!v&&(A=k||parseInt(t.touches[0].pageX),b)){if((!e.contains(t[r])||!e.contains(t.relatedTarget))&&Math.abs(x-A)<75)return!1;k<x?g++:k>x&&g--,b=!1,h.slideTo(g),K(z)}},_=function(){var n=e.getBoundingClientRect(),a=t.innerHeight||i.clientHeight;return n[w]<=a&&n.bottom>=0},tt=function(t){for(var e=0,i=X[p];e<i;e++)N(X[e],y);X[t]&&E(X[t],y)};this.cycle=function(){m&&(clearInterval(m),m=null),m=setInterval(function(){_()&&(g++,h.slideTo(g))},this.interval)},this.slideTo=function(t){if(!v){var i,n=this.getActiveIndex();n!==t&&(n<t||0===n&&t===L-1?B=h.direction=T:(n>t||n===L-1&&0===t)&&(B=h.direction="right"),t<0?t=L-1:t>=L&&(t=0),g=t,i=B===T?"next":"prev",Y.call(e,"slide","carousel",C[t]),v=!0,clearInterval(m),m=null,tt(t),I&&M(e,"slide")?(E(C[t],i),C[t].offsetWidth,E(C[t],B),E(C[n],B),U(C[t],function(a){var o=a&&a[r]!==C[t]?1e3*a.elapsedTime+100:20;v&&setTimeout(function(){v=!1,E(C[t],y),N(C[n],y),N(C[t],i),N(C[t],B),N(C[n],B),Y.call(e,"slid","carousel",C[t]),h.interval&&!M(e,"paused")&&h.cycle()},o)})):(E(C[t],y),C[t].offsetWidth,N(C[n],y),setTimeout(function(){v=!1,h.interval&&!M(e,"paused")&&h.cycle(),Y.call(e,"slid","carousel",C[t])},100)))}},this.getActiveIndex=function(){return C.indexOf(S(e,"item active")[0])||0},"Carousel"in e||(h.pause&&h.interval&&(P(e,c[0],q),P(e,c[1],$),P(e,d.start,q,j),P(e,d.end,$,j)),C[p]>1&&P(e,d.start,Q,j),W&&P(W,"click",G),D&&P(D,"click",G),O&&P(O,"click",F),h.keyboard&&P(t,"keydown",J)),h.getActiveIndex()<0&&(C[p]&&E(C[0],y),X[p]&&tt(0)),h.interval&&h.cycle(),e.Carousel=h}};o[b](["Carousel",Q,'[data-ride="carousel"]']);var V=function(t,e){t=R(t),e=e||{};var i,n,a=null,o=null,l=this,r=t[f]("data-parent"),s=function(t,e){Y.call(t,"show","collapse"),t.isAnimating=!0,E(t,"collapsing"),N(t,"collapse"),t[v].height=t.scrollHeight+"px",U(t,function(){t.isAnimating=!1,t[u]("aria-expanded","true"),e[u]("aria-expanded","true"),N(t,"collapsing"),E(t,"collapse"),E(t,"in"),t[v].height="",Y.call(t,"shown","collapse")})},c=function(t,e){Y.call(t,"hide","collapse"),t.isAnimating=!0,t[v].height=t.scrollHeight+"px",N(t,"collapse"),N(t,"in"),E(t,"collapsing"),t.offsetWidth,t[v].height="0px",U(t,function(){t.isAnimating=!1,t[u]("aria-expanded","false"),e[u]("aria-expanded","false"),N(t,"collapsing"),E(t,"collapse"),t[v].height="",Y.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),M(o,"in")?l.hide():l.show()},this.hide=function(){o.isAnimating||(c(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&&(c(i,n),E(n,"collapsed")),s(o,t),N(t,"collapsed"))},"Collapse"in t||P(t,"click",l.toggle),o=function(){var e=t.href&&t[f]("href"),i=t[f]("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[b](["Collapse",V,'[data-toggle="collapse"]']);var Z=function(t,i){t=R(t),this.persist=!0===i||"true"===t[f]("data-persist")||!1;var n=this,a=t[h],o="open",s=null,c=R(".dropdown-menu",a),d=function(){for(var t=c.children,e=[],i=0;i<t[p];i++)t[i].children[p]&&"A"===t[i].children[0].tagName&&e[b](t[i]);return e}(),g=function(t){(t.href&&"#"===t.href.slice(-1)||t[h]&&t[h].href&&"#"===t[h].href.slice(-1))&&this.preventDefault()},m=function(){var i=t[o]?P:z;i(e,"click",v),i(e,"keydown",T),i(e,"keyup",w),i(e,"focus",v,!0)},v=function(e){var i=e[r],a=i&&(i[f](l)||i[h]&&f in i[h]&&i[h][f](l));("focus"!==e.type||i!==t&&i!==c&&!c.contains(i))&&(i!==c&&!c.contains(i)||!n.persist&&!a)&&(s=i===t||t.contains(i)?t:null,k(),g.call(e,i))},y=function(e){s=t,x(),g.call(e,e[r])},T=function(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()},w=function(i){var a=i.which||i.keyCode,l=e.activeElement,r=d.indexOf(l[h]),f=l===t,u=c.contains(l),g=l[h][h]===c;g&&(r=f?0:38===a?r>1?r-1:0:40===a&&r<d[p]-1?r+1:r,d[r]&&H(d[r].children[0])),(d[p]&&g||!d[p]&&(u||f)||!u)&&t[o]&&27===a&&(n.toggle(),s=null)},x=function(){Y.call(a,"show","dropdown",s),E(a,o),t[u]("aria-expanded",!0),Y.call(a,"shown","dropdown",s),t[o]=!0,z(t,"click",y),setTimeout(function(){H(c.getElementsByTagName("INPUT")[0]||t),m()},1)},k=function(){Y.call(a,"hide","dropdown",s),N(a,o),t[u]("aria-expanded",!1),Y.call(a,"hidden","dropdown",s),t[o]=!1,m(),H(t),setTimeout(function(){P(t,"click",y)},1)};t[o]=!1,this.toggle=function(){M(a,o)&&t[o]?k():x()},"Dropdown"in t||(!1 in c&&c[u]("tabindex","0"),P(t,"click",y)),t.Dropdown=n};o[b](["Dropdown",Z,'[data-toggle="dropdown"]']);var _=function(a,o){a=R(a);var l=a[f]("data-target")||a[f]("href"),c=R(l),d=M(a,"modal")?a:c;if(M(a,"modal")&&(a=null),d){o=o||{},this.keyboard=!1!==o.keyboard&&"false"!==d[f]("data-keyboard"),this.backdrop="static"!==o.backdrop&&"static"!==d[f]("data-backdrop")||"static",this.backdrop=!1!==o.backdrop&&"false"!==d[f]("data-backdrop")&&this.backdrop,this[s]=!!M(d,"fade"),this.content=o.content,d.isAnimating=!1;var g,m,b,y,w,x=this,k=null,L=S(i,C).concat(S(i,"navbar-fixed-bottom")),B=function(){var e=i.getBoundingClientRect();return t.innerWidth||e.right-Math.abs(e[T])},D=function(){var i,a=e[n].currentStyle||t.getComputedStyle(e[n]),o=parseInt(a.paddingRight,10);if(g&&(e[n][v].paddingRight=o+m+"px",d[v].paddingRight=m+"px",L[p]))for(var l=0;l<L[p];l++)i=(L[l].currentStyle||t.getComputedStyle(L[l])).paddingRight,L[l][v].paddingRight=parseInt(i)+m+"px"},W=function(){if(e[n][v].paddingRight="",d[v].paddingRight="",L[p])for(var t=0;t<L[p];t++)L[t][v].paddingRight=""},O=function(){var t,i=e.createElement("div");return i.className="modal-scrollbar-measure",e[n].appendChild(i),t=i.offsetWidth-i.clientWidth,e[n].removeChild(i),t},X=function(){g=e[n].clientWidth<B(),m=O()},$=function(){var t=e.createElement("div");b=R(".modal-backdrop"),null===b&&(t[u]("class","modal-backdrop"+(x[s]?" fade":"")),b=t,e[n].appendChild(b)),A=1},F=function(){(b=R(".modal-backdrop"))&&null!==b&&"object"==typeof b&&(A=0,e[n].removeChild(b),b=null)},G=function(){H(d),d.isAnimating=!1,Y.call(d,"shown","modal",k),P(t,"resize",x.update,j),P(d,"click",V),P(e,"keydown",Q)},J=function(){d[v].display="",a&&H(a),Y.call(d,"hidden","modal"),function(){S(e,"modal in")[0]||(W(),N(e[n],"modal-open"),b&&M(b,"fade")?(N(b,"in"),U(b,F)):F(),z(t,"resize",x.update,j),z(d,"click",V),z(e,"keydown",Q))}(),d.isAnimating=!1},K=function(t){if(!d.isAnimating){var e=t[r];e=e.hasAttribute("data-target")||e.hasAttribute("href")?e:e[h],e!==a||M(d,"in")||(d.modalTrigger=a,k=a,x.show(),t.preventDefault())}},Q=function(t){if(!d.isAnimating){var e=t.which||t.keyCode;x.keyboard&&27==e&&M(d,"in")&&x.hide()}},V=function(t){if(!d.isAnimating){var e=t[r];M(d,"in")&&("modal"===e[h][f]("data-dismiss")||"modal"===e[f]("data-dismiss")||e===d&&"static"!==x.backdrop)&&(x.hide(),k=null,t.preventDefault())}};this.toggle=function(){M(d,"in")?this.hide():this.show()},this.show=function(){M(d,"in")||d.isAnimating||(clearTimeout(w),w=setTimeout(function(){d.isAnimating=!0,Y.call(d,"show","modal",k);var t=S(e,"modal in")[0];t&&t!==d&&("modalTrigger"in t&&t.modalTrigger.Modal.hide(),"Modal"in t&&t.Modal.hide()),x.backdrop&&!A&&!b&&$(),b&&!M(b,"in")&&(b.offsetWidth,y=q(b),E(b,"in")),setTimeout(function(){d[v].display="block",X(),D(),E(e[n],"modal-open"),E(d,"in"),d[u]("aria-hidden",!1),M(d,"fade")?U(d,G):G()},I&&b&&y?y:1)},1))},this.hide=function(){!d.isAnimating&&M(d,"in")&&(clearTimeout(w),w=setTimeout(function(){d.isAnimating=!0,Y.call(d,"hide","modal"),b=R(".modal-backdrop"),y=b&&q(b),N(d,"in"),d[u]("aria-hidden",!0),setTimeout(function(){M(d,"fade")?U(d,J):J()},I&&b&&y?y:2)},2))},this.setContent=function(t){R(".modal-content",d).innerHTML=t},this.update=function(){M(d,"in")&&(X(),D())},!a||"Modal"in a||P(a,"click",K),x.content&&x.setContent(x.content),a?(a.Modal=x,d.modalTrigger=a):d.Modal=x}};o[b](["Modal",_,'[data-toggle="modal"]']);var tt=function(i,a){i=R(i),a=a||{};var o=i[f]("data-trigger"),l=i[f]("data-animation"),d=i[f]("data-placement"),h=i[f]("data-dismissible"),p=i[f]("data-delay"),g=i[f]("data-container"),m='<button type="button" class="close">×</button>',b=R(a.container),y=R(g),T=W(i,".modal"),k=W(i,"."+C),A=W(i,".navbar-fixed-bottom");this.template=a.template?a.template:null,this.trigger=a.trigger?a.trigger:o||"hover",this[s]=a[s]&&"fade"!==a[s]?a[s]:l||"fade",this.placement=a.placement?a.placement:d||w,this.delay=parseInt(a.delay||p)||200,this.dismissible=!(!a.dismissible&&"true"!==h),this.container=b||(y||(k||(A||(T||e[n]))));var I=this,L=a.title||i[f]("data-title")||null,B=a.content||i[f]("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},q=function(){if(L=a.title||i[f]("data-title"),B=a.content||i[f]("data-content"),B=B?B.replace(/^\s+|\s+$/g,""):null,H=e.createElement("div"),null!==B&&null===I.template){if(H[u]("role","tooltip"),null!==L){var t=e.createElement("h3");t[u]("class","popover-title"),t.innerHTML=I.dismissible?L+m:L,H.appendChild(t)}var n=e.createElement("div"),o=e.createElement("div");n[u]("class","arrow"),o[u]("class","popover-content"),H.appendChild(n),H.appendChild(o),o.innerHTML=I.dismissible&&null===L?B+m:B}else{var l=e.createElement("div");I.template=I.template.replace(/^\s+|\s+$/g,""),l.innerHTML=I.template,H.innerHTML=l.firstChild.innerHTML}I.container.appendChild(H),H[v].display="block",H[u]("class","popover "+S+" "+I[s])},$=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),!x&&n(t,"resize",I.hide,j)},K=function(){J(P),Y.call(i,"shown","popover")},Q=function(){J(z),X(),Y.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,q(),G(),$(),Y.call(i,"show","popover"),I[s]?U(H,K):K())},20)},this.hide=function(){clearTimeout(D),D=setTimeout(function(){H&&null!==H&&M(H,"in")&&(Y.call(i,"hide","popover"),N(H,"in"),I[s]?U(H,Q):Q())},I.delay)},"Popover"in i||("hover"===I.trigger?(P(i,c[0],I.show),I.dismissible||P(i,c[1],I.hide)):"click"!=I.trigger&&"focus"!=I.trigger||P(i,I.trigger,I.toggle)),i.Popover=I}};o[b](["Popover",tt,'[data-toggle="popover"]']);var et=function(e,i){e=R(e);var n=R(e[f]("data-target")),a=e[f]("data-offset");if(i=i||{},i[r]||n){for(var o,l=this,s=i[r]&&R(i[r])||n,c=s&&s.getElementsByTagName("A"),d=parseInt(i.offset||a)||10,u=[],g=[],m=e.offsetHeight<e.scrollHeight?e:t,v=m===t,T=0,k=c[p];T<k;T++){var A=c[T][f]("href"),C=A&&"#"===A.charAt(0)&&"#"!==A.slice(-1)&&R(A);C&&(u[b](c[T]),g[b](C))}var I=function(t){var i=u[t][h],n=g[t],a=W(i,".dropdown"),l=v&&n.getBoundingClientRect(),r=M(i,y)||!1,s=(v?l[w]+o:n.offsetTop)-d,c=v?l.bottom+o-d:g[t+1]?g[t+1].offsetTop-d:e.scrollHeight,f=o>=s&&c>o;if(!r&&f)"LI"!==i.tagName||M(i,y)||(E(i,y),a&&!M(a,y)&&E(a,y),Y.call(e,"activate","scrollspy",u[t]));else if(f){if(!f&&!r||r&&f)return}else"LI"===i.tagName&&M(i,y)&&(N(i,y),a&&M(a,y)&&!S(i[h],y).length&&N(a,y))},L=function(){o=v?$().y:e.scrollTop;for(var t=0,i=u[p];t<i;t++)I(t)};this.refresh=function(){L()},"ScrollSpy"in e||(P(m,"scroll",l.refresh,j),!x&&P(t,"resize",l.refresh,j)),l.refresh(),e.ScrollSpy=l}};o[b](["ScrollSpy",et,'[data-spy="scroll"]']);var it=function(t,e){t=R(t);var i=t[f]("data-height");e=e||{},this.height=!!I&&(e.height||"true"===i);var n,a,o,l,r,s,c,d=this,g=W(t,".nav"),m=!1,b=g&&R(".dropdown",g),w=function(){m[v].height="",N(m,"collapsing"),g.isAnimating=!1},x=function(){m?s?w():setTimeout(function(){m[v].height=c+"px",m.offsetWidth,U(m,w)},50):g.isAnimating=!1,Y.call(n,"shown","tab",a)},k=function(){m&&(o[v].float=T,l[v].float=T,r=o.scrollHeight),E(l,y),Y.call(n,"show","tab",a),N(o,y),Y.call(a,"hidden","tab",n),m&&(c=l.scrollHeight,s=c===r,E(m,"collapsing"),m[v].height=r+"px",m.offsetHeight,o[v].float="",l[v].float=""),M(l,"fade")?setTimeout(function(){E(l,"in"),U(l,x)},20):x()};if(g){g.isAnimating=!1;var A=function(){var t,e=S(g,y);return 1!==e[p]||M(e[0],"dropdown")?e[p]>1&&(t=e[e[p]-1]):t=e[0],t.getElementsByTagName("A")[0]},C=function(){return R(A()[f]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget||this,!g.isAnimating&&!M(n[h],y)&&d.show()};this.show=function(){n=n||t,l=R(n[f]("href")),a=A(),o=C(),g.isAnimating=!0,N(a[h],y),a[u]("aria-expanded","false"),E(n[h],y),n[u]("aria-expanded","true"),b&&(M(t[h][h],"dropdown-menu")?M(b,y)||E(b,y):M(b,y)&&N(b,y)),Y.call(a,"hide","tab",n),M(o,"fade")?(N(o,"in"),U(o,k)):k()},"Tab"in t||P(t,"click",L),d.height&&(m=C()[h]),t.Tab=d}};o[b](["Tab",it,'[data-toggle="tab"]']);var nt=function(i,a){i=R(i),a=a||{};var o=i[f]("data-animation"),l=i[f]("data-placement"),r=i[f]("data-delay"),d=i[f]("data-container"),h=R(a.container),p=R(d),g=W(i,".modal"),m=W(i,"."+C),v=W(i,".navbar-fixed-bottom");this[s]=a[s]&&"fade"!==a[s]?a[s]:o||"fade",this.placement=a.placement?a.placement:l||w,this.delay=parseInt(a.delay||r)||200,this.container=h||(p||(m||(v||(g||e[n]))));var b=this,y=0,T=this.placement,k=null,A=i[f]("title")||i[f]("data-title")||i[f]("data-original-title");if(A&&""!=A){var I=function(){b.container.removeChild(k),k=null,y=null},L=function(){if(!(A=i[f]("title")||i[f]("data-title")||i[f]("data-original-title"))||""==A)return!1;k=e.createElement("div"),k[u]("role","tooltip");var t=e.createElement("div"),n=e.createElement("div");t[u]("class","tooltip-arrow"),n[u]("class","tooltip-inner"),k.appendChild(t),k.appendChild(n),n.innerHTML=A,b.container.appendChild(k),k[u]("class","tooltip "+T+" "+b[s])},B=function(){F(i,k,T,b.container)},H=function(){!M(k,"in")&&E(k,"in")},D=function(){Y.call(i,"shown","tooltip"),!x&&P(t,"resize",b.hide,j)},S=function(){!x&&z(t,"resize",b.hide,j),I(),Y.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(y),y=setTimeout(function(){if(null===k){if(T=b.placement,0==L())return;B(),H(),Y.call(i,"show","tooltip"),b[s]?U(k,D):D()}},20)},this.hide=function(){clearTimeout(y),y=setTimeout(function(){k&&M(k,"in")&&(Y.call(i,"hide","tooltip"),N(k,"in"),b[s]?U(k,S):S())},b.delay)},this.toggle=function(){k?b.hide():b.show()},"Tooltip"in i||(i[u]("data-original-title",A),i.removeAttribute("title"),P(i,c[0],b.show),P(i,c[1],b.hide)),i.Tooltip=b}};o[b](["Tooltip",nt,'[data-toggle="tooltip"]']);var at=function(t,e){for(var i=0,n=e[p];i<n;i++)new t(e[i])},ot=a.initCallback=function(t){t=t||e;for(var i=0,n=o[p];i<n;i++)at(o[i][1],t.querySelectorAll(o[i][2]))};return e[n]?ot():P(e,"DOMContentLoaded",function(){ot()}),{Affix:G,Alert:J,Button:K,Carousel:Q,Collapse:V,Dropdown:Z,Modal:_,Popover:tt,ScrollSpy:et,Tab:it,Tooltip:nt}});