diff --git a/dist/bootstrap-native-v5-esm.js b/dist/bootstrap-native-v5-esm.js index ffc52f4b..7332d36b 100644 --- a/dist/bootstrap-native-v5-esm.js +++ b/dist/bootstrap-native-v5-esm.js @@ -392,7 +392,7 @@ var dataBsContainer = 'data-bs-container'; function getTargetElement( element ){ return queryElement( element.getAttribute( dataBsTarget ) || element.getAttribute( 'href' ) ) || element.closest( element.getAttribute( dataBsParent ) ) - || queryElement( element, element.getAttribute( dataBsContainer ) ) + || queryElement( element.getAttribute( dataBsContainer ) ) } function normalizeValue( value ) { diff --git a/dist/bootstrap-native-v5-esm.min.js b/dist/bootstrap-native-v5-esm.min.js index bbd16d0c..3905ac65 100644 --- a/dist/bootstrap-native-v5-esm.min.js +++ b/dist/bootstrap-native-v5-esm.min.js @@ -1,2 +1,2 @@ // Native JavaScript for Bootstrap v3.0.15 | 2021 © dnp_theme | MIT-License -var e="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",t="webkitTransition"in document.head.style||"transition"in document.head.style,n="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",o="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function i(e){var i=getComputedStyle(e),a=i[o],r=i[n],s=r.indexOf("ms")>-1?1:1e3,l=t&&a&&"none"!==a?parseFloat(r)*s:0;return isNaN(l)?0:l}function a(t,n){var o=0,a=new Event(e),r=i(t);r?(t.addEventListener(e,(function i(a){a.target===t&&(n.apply(t,[a]),t.removeEventListener(e,i),o=1)})),setTimeout((function(){!o&&t.dispatchEvent(a)}),r+17)):n.apply(t,[a])}function r(e,t){var n=t&&t instanceof Element?t:document;return e instanceof Element?e:n.querySelector(e)}function s(e,t){return e.classList.contains(t)}function l(e,t){e.classList.remove(t)}function c(e,t){var n=new CustomEvent(e,{cancelable:!0});return t instanceof Object&&Object.keys(t).forEach((function(e){Object.defineProperty(n,e,{value:t[e]})})),n}function d(e){var t,n,o,i=c("close.bs.alert"),d=c("closed.bs.alert");function u(){p(),o.dispatchEvent(d),o.parentNode.removeChild(o)}function f(e){var i=e.target;o&&(n===i||n.contains(i))&&t.close()}function p(e){n[e=e?"addEventListener":"removeEventListener"]("click",f)}var m=function(e){t=this,(n=r(e)).Alert&&n.Alert.dispose(),o=n.closest(".alert"),p(1),n.Alert=this},h=m.prototype;return h.close=function(){if(o&&s(o,"show")){if(o.dispatchEvent(i),i.defaultPrevented)return;l(o,"show"),s(o,"fade")?a(o,u):u(),this.dispose()}},h.dispose=function(){p(),delete n.Alert},new m(e)}var u={component:"Alert",selector:'[data-bs-dismiss="alert"]',constructor:d};function f(e,t){e.classList.add(t)}var p="data-bs-toggle";function m(e){var t,n,o=c("change.bs.button");function i(e){t[e=e?"addEventListener":"removeEventListener"]("click",a),t[e]("keyup",d),t[e]("keydown",u),t[e]("focusin",p),t[e]("focusout",p)}function a(e){var i=e.target,a="LABEL"===i.tagName?i:i.closest("LABEL"),r=a&&a.getElementsByTagName("INPUT")[0];r&&(t.dispatchEvent(o),o.defaultPrevented||("checkbox"===r.type&&(r.checked?(l(a,"active"),r.getAttribute("checked"),r.removeAttribute("checked"),r.checked=!1):(f(a,"active"),r.getAttribute("checked"),r.setAttribute("checked","checked"),r.checked=!0),t.toggled||(t.toggled=!0)),"radio"!==r.type||t.toggled||(!r.checked||0===e.screenX&&0==e.screenY)&&(f(a,"active"),f(a,"focus"),r.setAttribute("checked","checked"),r.checked=!0,t.toggled=!0,Array.from(n).map((function(e){var t=e.getElementsByTagName("INPUT")[0];e!==a&&s(e,"active")&&(t.dispatchEvent(o),l(e,"active"),t.removeAttribute("checked"),t.checked=!1)}))),setTimeout((function(){t.toggled=!1}),10)))}function d(e){32===e.which&&e.target===document.activeElement&&a(e)}function u(e){32===e.which&&e.preventDefault()}function p(e){var t=e.target,n="focusin"===e.type?f:l;"INPUT"===t.tagName&&n(t.closest(".btn"),"focus")}var m=function(e){(t=r(e)).Button&&t.Button.dispose(),(n=t.getElementsByClassName("btn")).length&&(t.toggled=!1,Array.from(n).map((function(e){!s(e,"active")&&r("input:checked",e)&&f(e,"active"),s(e,"active")&&!r("input:checked",e)&&l(e,"active")})),i(1),t.Button=this)};return m.prototype.dispose=function(){i(),delete t.toggled,delete t.Button},new m(e)}var h={component:"Button",selector:'[data-bs-toggle="buttons"]',constructor:m},v="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],g=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){}return e}()&&{passive:!0};function b(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0}function y(e){return r(e.getAttribute("data-bs-target")||e.getAttribute("href"))||e.closest(e.getAttribute("data-bs-parent"))||r(e,e.getAttribute("data-bs-container"))}function w(e){return"true"===e||"false"!==e&&(isNaN(e)?""===e||"null"===e?null:e:+e)}function E(e,t,n){var o={},i={},a=e.dataset,s=["target","parent","container"];return Object.keys(a).map((function(t){var n=t.replace("bs","").toLowerCase();i[n]=s.includes(n)?y(e):w(a[t])})),Object.keys(n).map((function(t){n[t]=s.includes(t)?n[t]instanceof Element?n[t]:"parent"===t?e.closest(n[t]):r(n[t]):w(n[t])})),Object.keys(t).map((function(e){o[e]=e in n?n[e]:e in i?i[e]:t[e]})),o}function T(e,t){var n,o,d,u,p,m,h={pause:"hover",keyboard:!1,touch:!0,interval:5e3},y=c("slide.bs.carousel"),w=c("slid.bs.carousel"),T={},A="left",k=0,L=null,N=!1,C=!1,x=0,H=0,P=0;function B(){var e=k,t=o.getActiveIndex(),i="left"===A?"next":"prev",a="left"===A?"start":"end";N&&n.Carousel&&(N=!1,f(d[e],"active"),l(d[t],"active"),l(d[e],"carousel-item-"+i),l(d[e],"carousel-item-"+a),l(d[t],"carousel-item-"+a),n.dispatchEvent(w),document.hidden||!T.interval||s(n,"paused")||o.cycle())}function M(){s(n,"paused")||(f(n,"paused"),!N&&(clearInterval(L),L=null))}function D(){s(n,"paused")&&(l(n,"paused"),N||(clearInterval(L),L=null,o.cycle()))}function S(e){e.preventDefault();var t=e.target;N||t&&!s(t,"active")&&t.getAttribute("data-bs-slide-to")&&o.to(+t.getAttribute("data-bs-slide-to"))}function O(e){e.preventDefault();var t=e.currentTarget||e.srcElement;m[1]&&t===m[1]?o.next():m[1]&&t===m[0]&&o.prev()}function I(e){var t=e.which;if(b(n))switch(t){case 39:o.next();break;case 37:o.prev();break;default:return}}function W(e){C||(x=e.changedTouches[0].pageX,n.contains(e.target)&&(C=!0,X(1)))}function R(e){if(C)return H=e.changedTouches[0].pageX,"touchmove"===e.type&&e.changedTouches.length>1?(e.preventDefault(),!1):void 0}function z(e){if(C&&!N&&(P=H||e.changedTouches[0].pageX,C)){if((!n.contains(e.target)||!n.contains(e.relatedTarget))&&Math.abs(x-P)<75)return!1;Hx&&k--,C=!1,o.to(k),X()}}function j(e){Array.from(p).map((function(e){return l(e,"active")})),p[e]&&f(p[e],"active")}function X(e){n[e=e?"addEventListener":"removeEventListener"]("touchmove",R,g),n[e]("touchend",z,g)}function F(e){e=e?"addEventListener":"removeEventListener",T.pause&&T.interval&&(n[e](v[0],M),n[e](v[1],D),n[e]("touchstart",M,g),n[e]("touchend",D,g)),T.touch&&d.length>1&&n[e]("touchstart",W,g),m.map((function(t){return t&&t[e]("click",O)})),u&&u[e]("click",S),T.keyboard&&window[e]("keydown",I)}var Y=function(e,t){o=this,t=t||{},n=r(e),d=n.getElementsByClassName("carousel-item"),n.Carousel&&n.Carousel.dispose(),d.length<2||(m=[n.getElementsByClassName("carousel-control-prev")[0],n.getElementsByClassName("carousel-control-next")[0]],u=n.getElementsByClassName("carousel-indicators")[0],p=u&&u.getElementsByTagName("LI")||[],(T=E(n,h,t)).interval=!0===T.interval?h.interval:T.interval,this.getActiveIndex()<0&&(d.length&&f(d[0],"active"),p.length&&j(0)),F(1),T.interval&&this.cycle(),n.Carousel=this)},U=Y.prototype;return U.cycle=function(){L&&(clearInterval(L),L=null),L=setInterval((function(){b(n)&&(k++,o.to(k))}),T.interval)},U.next=function(){!N&&k++,o.to(k)},U.prev=function(){!N&&k--,o.to(k)},U.to=function(e){var t=o.getActiveIndex();if(!N&&t!==e){te||t===d.length-1&&0===e)&&(A="right"),e<0?e=d.length-1:e>=d.length&&(e=0);var r="left"===A?"next":"prev",c="left"===A?"start":"end",u={relatedTarget:d[e],direction:A,from:t,to:e};Object.keys(u).map((function(e){y[e]=u[e],w[e]=u[e]})),n.dispatchEvent(y),y.defaultPrevented||(k=e,N=!0,clearInterval(L),L=null,j(e),i(d[e])&&s(n,"slide")?(f(d[e],"carousel-item-"+r),d[e].offsetWidth,f(d[e],"carousel-item-"+c),f(d[t],"carousel-item-"+c),a(d[e],B)):(f(d[e],"active"),l(d[t],"active"),setTimeout((function(){N=!1,T.interval&&n&&!s(n,"paused")&&o.cycle(),n.dispatchEvent(w)}),100)))}},U.getActiveIndex=function(){return Array.from(d).indexOf(n.getElementsByClassName("carousel-item active")[0])||0},U.dispose=function(){var e=["start","end","prev","next"];Array.from(d).map((function(t,n){s(t,"active")&&j(n),e.map((function(e){return l(t,"carousel-item-"+e)}))})),F(),clearInterval(L),delete n.Carousel},new Y(e,t)}var A={component:"Carousel",selector:'[data-bs-ride="carousel"]',constructor:T};function k(e,t){var n,o,i,d,u,m=c("show.bs.collapse"),h=c("shown.bs.collapse"),v=c("hide.bs.collapse"),g=c("hidden.bs.collapse");function b(e){var t=e.collapse,n=e.element;t.dispatchEvent(v),v.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),t.style.height=t.scrollHeight+"px",l(t,"collapse"),l(t,"show"),f(t,"collapsing"),t.offsetWidth,t.style.height="0px",a(t,(function(){u=!1,d&&(d.isAnimating=!1),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),l(t,"collapsing"),f(t,"collapse"),t.style.height="",t.dispatchEvent(g)})))}function w(e){o[e=e?"addEventListener":"removeEventListener"]("click",E)}function E(e){var t=e.target;n.toggle(),(e&&"A"===t.tagName&&"collapse"===t.getAttribute(p)||"A"===o.tagName)&&e.preventDefault()}var T=function(e,t){n=this,t=t||{},(o=r(e)).Collapse&&o.Collapse.dispose(),i=r(t.target)||y(o),d=o.closest(t.parent)||y(i),i&&(u=!1),d&&(d.isAnimating=!1),w(1),o.Collapse=n},A=T.prototype;return A.toggle=function(){s(i,"show")?this.hide():this.show()},A.hide=function(){u||(b({collapse:i,element:o}),f(o,"collapsed"))},A.show=function(){var e,t;d&&(t=d.getElementsByClassName("collapse show")[0],e=Array.from(d.querySelectorAll('[data-bs-toggle="collapse"]')).find((function(e){return!s(e,"collapsed")}))),d&&(!d||d.isAnimating)||u||(e&&t!==i&&(b({collapse:t,element:e}),f(e,"collapsed")),i.dispatchEvent(m),m.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),f(i,"collapsing"),l(i,"collapse"),i.style.height=i.scrollHeight+"px",a(i,(function(){u=!1,d&&(d.isAnimating=!1),i.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","true"),l(i,"collapsing"),f(i,"collapse"),f(i,"show"),i.style.height="",i.dispatchEvent(h)}))),l(o,"collapsed"))},A.dispose=function(){w(),d&&delete d.isAnimating,delete o.Collapse},new T(e,t)}var L={component:"Collapse",selector:'[data-bs-toggle="collapse"]',constructor:k},N=["dropdown","dropup","dropstart","dropend"];function C(e){return e&&(e.href&&"#"===e.href.slice(-1)||e.parentNode&&e.parentNode.href&&"#"===e.parentNode.href.slice(-1))}function x(e){e.focus?e.focus():e.setActive()}var H=N[0],P='[data-bs-toggle="'+H+'"]';function B(e){var t,n,o,i,a,d,u,m,h,v,b,y=N[1],w=N[2],E=N[3],T=["d-block","invisible"],A=[H,y],k=[w,E],L=c("show.bs."+H),B=c("shown.bs."+H),M=c("hide.bs."+H),D=c("hidden.bs."+H);function S(e){var t=N.filter((function(e){return d.includes(e)}))[0];if(!e)return o.className=d.join(" "),void(h&&!s(i,"dropdown-menu-end")?f:l)(i,"dropdown-menu-end");T.map((function(e){return f(i,e)}));var r=new RegExp("\\b("+H+"|"+y+"|"+w+"|"+E+")+"),c=n.offsetWidth,p=n.offsetHeight,v=i.offsetWidth,g=i.offsetHeight,b=document.documentElement.clientWidth||document.body.clientWidth,L=document.documentElement.clientHeight||document.body.clientHeight,C=n.getBoundingClientRect(),x=C.left+c-v<0,P=C.left-v<0,B=C.left+v>=b,M=C.left+v+c>=b,D=C.top+g>=L,S=C.top+g+p>=L,O=C.top-g<0;t=k.includes(t)&&P&&M?H:t,t=k.includes(t)&&D?y:t,!s(o,t=(t=(t=(t=t===w&&P&&!D?E:t)===E&&M&&!D?w:t)===y&&O&&!S?H:t)===H&&S&&!O?y:t)&&(o.className=o.className.replace(r,t));var I=u&&m||t!==E?l:f;if((u&&m||t!==w?l:f)(o,"dropleft"),I(o,"dropright"),A.includes(t)){var W=B?f:l;a?x&&f(o,"position-static"):W(i,"dropdown-menu-end")}T.map((function(e){return l(i,e)}))}function O(){var e=n.open?"addEventListener":"removeEventListener";document[e]("click",R),document[e]("focus",R),document[e]("keydown",j),document[e]("keyup",X),window[e]("scroll",F,g),window[e]("resize",F,g)}function I(e){n[e=e?"addEventListener":"removeEventListener"]("click",z)}function W(){M.relatedTarget=b,o.dispatchEvent(M),M.defaultPrevented||(l(i,"show"),l(o,"show"),S(),n.setAttribute("aria-expanded",!1),n.open=!1,x(n),setTimeout((function(){return O()}),1),D.relatedTarget=b,o.dispatchEvent(D))}function R(e){var t=e.target,a=t.getAttribute(p)===H||null!==t.closest(P),r=o.contains(t)&&("form"===t.tagName||null!==t.closest("form"));"click"===e.type&&C(t)&&e.preventDefault(),("focus"!==e.type||t!==n&&t!==i&&!i.contains(t))&&(r||a||(b=t,W()))}function z(e){b=n,t.toggle(),C(e.target)&&e.preventDefault()}function j(e){38!==e.which&&40!==e.which||e.preventDefault()}function X(e){var o=e.which,a=document.activeElement,r=a===n,s=i.contains(a),l=a.parentNode===i||a.parentNode.parentNode===i,c=v.indexOf(a);l&&(c=r?0:38===o?c>1?c-1:0:40===o&&c=m,L=v.top+p/2+y/2>=h,N=v.top-p<0,C=v.left-f<0,x=v.top+p+y>=h,H=v.left+f+b>=m;n="right"===(n="left"===(n="bottom"===(n="top"===(n=("left"===n||"right"===n)&&C&&H?"top":n)&&N?"bottom":n)&&x?"top":n)&&C?"right":n)&&H?"left":n,-1===t.className.indexOf(n)&&(t.className=t.className.replace(/\b(top|bottom|start|end)+/,O[n])),c=E?E.offsetWidth:0,d=E?E.offsetHeight:0,u=w?.8*c:c/2,"left"===n||"right"===n?(r="left"===n?v.left+g.x-f-(w?c:0):v.left+g.x+b,T?(a=v.top+g.y,s=y/2-c):L?(a=v.top+g.y-p+y,s=p-y/2-c):(a=v.top+g.y-p/2+y/2,s=p/2-(w?.9*d:d/2)),l=null):"top"!==n&&"bottom"!==n||(i&&I(e)?(a="top"===n?i.pageY-p-(w?c:d):i.pageY+d,i.clientX-f/2<0?(r=0,l=i.pageX-(w?.8*c:c/2)):i.clientX+.51*f>m?(r=m-1.009*f,l=f-(m-i.pageX)-u):(r=i.pageX-f/2,l=f/2-(w?.8*c:c/2))):(a="top"===n?v.top+g.y-p-(w?d:0):v.top+g.y+y,A?(r=0,l=v.left+b/2-(w?.8*c:c/2)):k?(r=m-f,l=f-(m-v.left)+b/2-(w?.8*c:c/2)):(r=v.left+g.x-f/2+b/2,l=f/2-(w?.8*c:c/2))),s=null),t.style.top=a+"px",t.style.left=r+"px",E.style.top=null!==s?s+"px":"",E.style.left=null!==l?l+"px":""}var R=1;function z(e,t){return e[t]||R++}var j={template:'',title:null,content:null,sanitizeFn:null,dismissible:!1,trigger:"hover",animation:"fade",placement:"top",delay:200};function X(e,t){var n,o,d,u,p=/(iPhone|iPod|iPad)/.test(navigator.userAgent),m=c("show.bs.popover"),h=c("shown.bs.popover"),b=c("hide.bs.popover"),y=c("hidden.bs.popover"),w=null,T={},A=!0,k=null;function L(e){null!==w&&e.target===r(".btn-close",w)&&n.hide()}function N(e){w&&W(o,w,T.placement,T.container,e)}function C(){null===w&&o.focus()}function x(){null===w&&n.show()}function H(){null!==w&&n.hide()}function P(){n.toggle()}function B(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function M(e){e=e?"addEventListener":"removeEventListener","hover"===T.trigger?(o[e](S,x),o[e](v[0],x),I(o)&&o[e]("mousemove",N,g),!T.dismissible&&o[e](v[1],H)):"click"===T.trigger?o[e](T.trigger,P):"focus"===T.trigger&&(p&&o[e]("click",C),o[e]("focusin",x))}function D(e){e=e?"addEventListener":"removeEventListener",T.dismissible?document[e]("click",L):("focus"===T.trigger&&o[e]("focusout",H),"hover"===T.trigger&&document[e]("touchstart",B,g)),I(o)||(window[e]("scroll",N,g),window[e]("resize",N,g))}function R(){D(1),o.dispatchEvent(h)}function X(e){D(),o.removeAttribute("aria-describedby"),T.container.removeChild(w),k=null,w=null,o.dispatchEvent(y)}var F=function(e,t){n=this,t=t||{},(o=r(e)).Popover&&o.Popover.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");j.container=i||a||document.body,(T=E(o,j,t)).content&&(u="bs-popover-"+O[T.placement],d="popover-"+(o.id||z(o)),M(1),o.Popover=n)},Y=F.prototype;return Y.toggle=function(){null===w?n.show():n.hide()},Y.show=function(){clearTimeout(k),k=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!function(){var e=T.title,t=T.content;e=e?e.trim():null,t=t?t.trim():null,T.sanitizeFn&&(e=e?T.sanitizeFn(e):null,t=t?T.sanitizeFn(t):null),(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var n=document.createElement("div");n.innerHTML=T.template.trim(),w.className=n.firstChild.className,w.innerHTML=n.firstChild.innerHTML;var i=r(".popover-header",w),a=r(".popover-body",w);e=T.dismissible&&e?e+'':e,t=T.dismissible&&null===e?NaN:t,e&&i&&(i.innerHTML=e.trim()),t&&a&&(a.innerHTML=t.trim()),T.container.appendChild(w),w.style.display="block",!s(w,"popover")&&f(w,"popover"),!s(w,T.animation)&&f(w,T.animation),!s(w,u)&&f(w,u)}(),N(),!s(w,"show")&&f(w,"show"),T.animation?a(w,R):R()}}),17)},Y.hide=function(){clearTimeout(k),k=setTimeout((function(){if(w&&null!==w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),T.animation?a(w,X):X()}}),T.delay+50)},Y.enable=function(){A||(M(1),A=!A)},Y.disable=function(){A&&(null!==w&&T.animation?(n.hide(),setTimeout(M,i(w)+T.delay+17)):M(),A=!A)},Y.toggleEnabled=function(){A?n.disable():n.enable()},Y.dispose=function(){n.hide(),M(),delete o.Popover},new F(e,t)}function F(e,t){var n,o,i,a,d,u,p,m,h,v,b,w=c("activate.bs.scrollspy"),E=0,T=[],A=[];function k(){var e,t,n,o=u.getElementsByTagName("A");(b=p?d.pageYOffset:d.scrollTop,E!==o.length||L(d)!==h)&&(T=[],A=[],h=L(d),v=h-(p?window.innerHeight:i.getBoundingClientRect().height),Array.from(o).map((function(o){e=o.getAttribute("href"),(t=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&r(e))&&(T.push(o),n=t.getBoundingClientRect(),A.push((p?n.top+b:t.offsetTop)-a))})),E=T.length)}function L(e){return e.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}function N(e){Array.from(e.getElementsByTagName("A")).map((function(e){return s(e,"active")&&l(e,"active")}))}function C(e){N(u),m=e,f(e,"active");for(var t=[];e.parentNode!==document.body;)e=e.parentNode,["dropdown-menu","nav"].some((function(t){return s(e,t)}))&&t.push(e);t.map((function(e){var t=e.previousElementSibling;t&&!s(t,"active")&&f(t,"active")})),w.relatedTarget=e,i.dispatchEvent(w)}function x(e){var t=e?"addEventListener":"removeEventListener",i=H.indexOf(H.find((function(e){return e.id===n}))),a=B.indexOf(B.find((function(e){return e.id===n}))),r={id:n,self:o};e||(i>-1&&H.splice(i,1),a>-1&&B.splice(a,1)),p&&(!e||H.length)&&e||d[t]("scroll",P,g),(e&&!B.length||!e&&!B.length)&&window[t]("resize",M,g),e&&(H.push(r),B.push(r))}var H=[];function P(){H.map((function(e){return e.self.refresh()}))}var B=[];function M(){B.map((function(e){return e.self.refresh()}))}var D=function(e,t){o=this,t=t||{},(i=r(e)).ScrollSpy&&i.ScrollSpy.dispose(),u=r(t.target)||y(i),d=i.clientHeight=v){var e=T[E-1];m!==e&&C(e)}else{if(m&&b0)return m=null,void N(u);T.map((function(e,t){m!==e&&b>=A[t]&&(void 0===A[t+1]||b1&&(e=t[t.length-1]):e=t[0],e}function H(){return r(x().getAttribute("href"))}function P(e){o[e=e?"addEventListener":"removeEventListener"]("click",B)}function B(e){e.preventDefault(),i=e.currentTarget,!h.isAnimating&&n.show()}var M=function(e){n=this,(o=r(e)).Tab&&o.Tab.dispose(),h=o.closest(".nav"),v=h&&r("."+N[0]+"-toggle",h),m=H(),g=t&&m.closest(".tab-content"),b=m.scrollHeight,h.isAnimating=!1,P(1),o.Tab=this},D=M.prototype;return D.show=function(){if(!s(i,"active")){if(d=r(i.getAttribute("href")),p=x(),m=H(),T.relatedTarget=i,p.dispatchEvent(T),T.defaultPrevented)return;h.isAnimating=!0,l(p,"active"),p.setAttribute("aria-selected","false"),f(i,"active"),i.setAttribute("aria-selected","true"),v&&(s(o.parentNode,"dropdown-menu")?!s(v,"active")&&f(v,"active"):s(v,"active")&&l(v,"active")),s(m,"fade")?(l(m,"show"),a(m,C)):C()}},D.dispose=function(){P(),delete o.Tab},new M(e)}function U(e,t){var n,o,i,d={animation:!0,autohide:!0,delay:500},u=c("show.bs.toast"),p=c("hide.bs.toast"),m=c("shown.bs.toast"),h=c("hidden.bs.toast"),v=null,g={};function b(){g.animation||(l(i,"showing"),f(i,"show")),i.dispatchEvent(m),g.autohide&&n.hide()}function y(){f(i,"hide"),i.dispatchEvent(h)}function w(){l(i,"show"),g.animation?(i.offsetWidth,a(i,y)):y()}function T(e){o[e=e?"addEventListener":"removeEventListener"]("click",A)}function A(){n.hide()}var k=function(e,t){n=this,t=t||{},o=r(e),i=o.closest(".toast"),o.Toast&&o.Toast.dispose(),g=E(o,d,t),T(1),o.Toast=n},L=k.prototype;return L.show=function(){if(i&&s(i,"hide")){if(i.dispatchEvent(u),u.defaultPrevented)return;f(i,"fade"),clearTimeout(v),v=setTimeout((function(){return l(i,"hide"),void(g.animation?(i.offsetWidth,f(i,"showing"),f(i,"show"),a(i,b)):b())}),10)}},L.hide=function(e){if(i&&s(i,"show")){if(i.dispatchEvent(p),p.defaultPrevented)return;clearTimeout(v),v=setTimeout(w,e?10:g.delay)}},L.dispose=function(){var e=function(){clearTimeout(v),T(),delete o.Toast};n.hide(),g.animation?a(i,e):e()},new k(e,t)}function q(e,t){var n,o,d,u,p={title:null,template:'',placement:"top",animation:"fade",delay:200,sanitizeFn:null},m=c("show.bs.tooltip"),h=c("shown.bs.tooltip"),b=c("hide.bs.tooltip"),y=c("hidden.bs.tooltip"),w=null,T=null,A=!0,k={};function L(e){w&&W(o,w,k.placement,k.container,e)}function N(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function C(){n.show()}function x(){n.hide()}function H(e){e=e?"addEventListener":"removeEventListener",document[e]("touchstart",N,g),I(o)||(window[e]("scroll",L,g),window[e]("resize",L,g))}function P(){H(1),o.dispatchEvent(h)}function B(){H(),o.removeAttribute("aria-describedby"),k.container.removeChild(w),w=null,T=null,o.dispatchEvent(y)}function M(e){e=e?"addEventListener":"removeEventListener",I(o)&&o[e]("mousemove",L,g),o[e](S,C),o[e](v[0],C),o[e](v[1],x)}function D(e){var t=["data-original-title","title"];o.setAttribute(t[e?0:1],e||o.getAttribute(t[0])),o.removeAttribute(t[e?1:0])}var R=function(e,t){n=this,t=t||{},(o=r(e)).Tooltip&&o.Tooltip.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");p.title=o.getAttribute("title"),p.container=i||a||document.body,(k=E(o,p,t)).title&&(d="tooltip-"+(o.id||z(o)),u="bs-tooltip-"+O[k.placement],o.hasAttribute("title")&&D(k.title),M(1),o.Tooltip=n)},j=R.prototype;return j.show=function(){clearTimeout(T),T=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!1!==function(){var e=k.title.trim();if(e=k.sanitizeFn?k.sanitizeFn(e):e){(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var t=document.createElement("div");t.innerHTML=k.template.trim(),w.className=t.firstChild.className,w.innerHTML=t.firstChild.innerHTML,r(".tooltip-inner",w).innerHTML=e,w.style.left="0",w.style.top="0",w.setAttribute("role","tooltip"),!s(w,"tooltip")&&f(w,"tooltip"),!s(w,k.animation)&&f(w,k.animation),!s(w,u)&&f(w,u),k.container.appendChild(w)}}()&&(L(),!s(w,"show")&&f(w,"show"),k.animation?a(w,P):P())}}),20)},j.hide=function(){clearTimeout(T),T=setTimeout((function(){if(w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),k.animation?a(w,B):B()}}),k.delay)},j.toggle=function(){null===w?n.show():n.hide()},j.enable=function(){A||(M(1),A=!A)},j.disable=function(){A&&(null!==w&&k.animation?(n.hide(),setTimeout(M,i(w)+k.delay+17)):M(),A=!A)},j.toggleEnabled=function(){A?n.disable():n.enable()},j.dispose=function(){this.hide(),M(),o.hasAttribute("data-original-title")&&D(),delete o.Tooltip},new R(e,t)}var V={Alert:u,Button:h,Carousel:A,Collapse:L,Dropdown:{component:"Dropdown",selector:P,constructor:B},Modal:{component:"Modal",selector:'[data-bs-toggle="modal"]',constructor:D},Popover:{component:"Popover",selector:'[data-bs-toggle="popover"],[data-tip="popover"]',constructor:X},ScrollSpy:{component:"ScrollSpy",selector:'[data-bs-spy="scroll"]',constructor:F},Tab:{component:"Tab",selector:'[data-bs-toggle="tab"]',constructor:Y},Toast:{component:"Toast",selector:'[data-bs-dismiss="toast"]',constructor:U},Tooltip:{component:"Tooltip",selector:'[data-bs-toggle="tooltip"],[data-tip="tooltip"]',constructor:q}};function G(e,t){Array.from(t).map((function(t){return new e(t)}))}function J(e,t){Array.from(t).map((function(t){return t[e].dispose()}))}function K(e,t){for(var n in e=e instanceof Element?lookup:document,t=t?G:J,V)t(V[n].constructor,e.querySelectorAll(V[n].selector))}document.body?K(0,1):document.addEventListener("DOMContentLoaded",(function(){return K(0,1)}),{once:!0});var Q={Alert:d,Button:m,Carousel:T,Collapse:k,Dropdown:B,Modal:D,Popover:X,ScrollSpy:F,Tab:Y,Toast:U,Tooltip:q,Callback:K,Version:"3.0.15"};export default Q; +var e="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",t="webkitTransition"in document.head.style||"transition"in document.head.style,n="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",o="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function i(e){var i=getComputedStyle(e),a=i[o],r=i[n],s=r.indexOf("ms")>-1?1:1e3,l=t&&a&&"none"!==a?parseFloat(r)*s:0;return isNaN(l)?0:l}function a(t,n){var o=0,a=new Event(e),r=i(t);r?(t.addEventListener(e,(function i(a){a.target===t&&(n.apply(t,[a]),t.removeEventListener(e,i),o=1)})),setTimeout((function(){!o&&t.dispatchEvent(a)}),r+17)):n.apply(t,[a])}function r(e,t){var n=t&&t instanceof Element?t:document;return e instanceof Element?e:n.querySelector(e)}function s(e,t){return e.classList.contains(t)}function l(e,t){e.classList.remove(t)}function c(e,t){var n=new CustomEvent(e,{cancelable:!0});return t instanceof Object&&Object.keys(t).forEach((function(e){Object.defineProperty(n,e,{value:t[e]})})),n}function d(e){var t,n,o,i=c("close.bs.alert"),d=c("closed.bs.alert");function u(){p(),o.dispatchEvent(d),o.parentNode.removeChild(o)}function f(e){var i=e.target;o&&(n===i||n.contains(i))&&t.close()}function p(e){n[e=e?"addEventListener":"removeEventListener"]("click",f)}var m=function(e){t=this,(n=r(e)).Alert&&n.Alert.dispose(),o=n.closest(".alert"),p(1),n.Alert=this},h=m.prototype;return h.close=function(){if(o&&s(o,"show")){if(o.dispatchEvent(i),i.defaultPrevented)return;l(o,"show"),s(o,"fade")?a(o,u):u(),this.dispose()}},h.dispose=function(){p(),delete n.Alert},new m(e)}var u={component:"Alert",selector:'[data-bs-dismiss="alert"]',constructor:d};function f(e,t){e.classList.add(t)}var p="data-bs-toggle";function m(e){var t,n,o=c("change.bs.button");function i(e){t[e=e?"addEventListener":"removeEventListener"]("click",a),t[e]("keyup",d),t[e]("keydown",u),t[e]("focusin",p),t[e]("focusout",p)}function a(e){var i=e.target,a="LABEL"===i.tagName?i:i.closest("LABEL"),r=a&&a.getElementsByTagName("INPUT")[0];r&&(t.dispatchEvent(o),o.defaultPrevented||("checkbox"===r.type&&(r.checked?(l(a,"active"),r.getAttribute("checked"),r.removeAttribute("checked"),r.checked=!1):(f(a,"active"),r.getAttribute("checked"),r.setAttribute("checked","checked"),r.checked=!0),t.toggled||(t.toggled=!0)),"radio"!==r.type||t.toggled||(!r.checked||0===e.screenX&&0==e.screenY)&&(f(a,"active"),f(a,"focus"),r.setAttribute("checked","checked"),r.checked=!0,t.toggled=!0,Array.from(n).map((function(e){var t=e.getElementsByTagName("INPUT")[0];e!==a&&s(e,"active")&&(t.dispatchEvent(o),l(e,"active"),t.removeAttribute("checked"),t.checked=!1)}))),setTimeout((function(){t.toggled=!1}),10)))}function d(e){32===e.which&&e.target===document.activeElement&&a(e)}function u(e){32===e.which&&e.preventDefault()}function p(e){var t=e.target,n="focusin"===e.type?f:l;"INPUT"===t.tagName&&n(t.closest(".btn"),"focus")}var m=function(e){(t=r(e)).Button&&t.Button.dispose(),(n=t.getElementsByClassName("btn")).length&&(t.toggled=!1,Array.from(n).map((function(e){!s(e,"active")&&r("input:checked",e)&&f(e,"active"),s(e,"active")&&!r("input:checked",e)&&l(e,"active")})),i(1),t.Button=this)};return m.prototype.dispose=function(){i(),delete t.toggled,delete t.Button},new m(e)}var h={component:"Button",selector:'[data-bs-toggle="buttons"]',constructor:m},v="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],g=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){}return e}()&&{passive:!0};function b(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0}function y(e){return r(e.getAttribute("data-bs-target")||e.getAttribute("href"))||e.closest(e.getAttribute("data-bs-parent"))||r(e.getAttribute("data-bs-container"))}function w(e){return"true"===e||"false"!==e&&(isNaN(e)?""===e||"null"===e?null:e:+e)}function E(e,t,n){var o={},i={},a=e.dataset,s=["target","parent","container"];return Object.keys(a).map((function(t){var n=t.replace("bs","").toLowerCase();i[n]=s.includes(n)?y(e):w(a[t])})),Object.keys(n).map((function(t){n[t]=s.includes(t)?n[t]instanceof Element?n[t]:"parent"===t?e.closest(n[t]):r(n[t]):w(n[t])})),Object.keys(t).map((function(e){o[e]=e in n?n[e]:e in i?i[e]:t[e]})),o}function T(e,t){var n,o,d,u,p,m,h={pause:"hover",keyboard:!1,touch:!0,interval:5e3},y=c("slide.bs.carousel"),w=c("slid.bs.carousel"),T={},A="left",k=0,L=null,N=!1,C=!1,x=0,H=0,P=0;function B(){var e=k,t=o.getActiveIndex(),i="left"===A?"next":"prev",a="left"===A?"start":"end";N&&n.Carousel&&(N=!1,f(d[e],"active"),l(d[t],"active"),l(d[e],"carousel-item-"+i),l(d[e],"carousel-item-"+a),l(d[t],"carousel-item-"+a),n.dispatchEvent(w),document.hidden||!T.interval||s(n,"paused")||o.cycle())}function M(){s(n,"paused")||(f(n,"paused"),!N&&(clearInterval(L),L=null))}function D(){s(n,"paused")&&(l(n,"paused"),N||(clearInterval(L),L=null,o.cycle()))}function S(e){e.preventDefault();var t=e.target;N||t&&!s(t,"active")&&t.getAttribute("data-bs-slide-to")&&o.to(+t.getAttribute("data-bs-slide-to"))}function O(e){e.preventDefault();var t=e.currentTarget||e.srcElement;m[1]&&t===m[1]?o.next():m[1]&&t===m[0]&&o.prev()}function I(e){var t=e.which;if(b(n))switch(t){case 39:o.next();break;case 37:o.prev();break;default:return}}function W(e){C||(x=e.changedTouches[0].pageX,n.contains(e.target)&&(C=!0,X(1)))}function R(e){if(C)return H=e.changedTouches[0].pageX,"touchmove"===e.type&&e.changedTouches.length>1?(e.preventDefault(),!1):void 0}function z(e){if(C&&!N&&(P=H||e.changedTouches[0].pageX,C)){if((!n.contains(e.target)||!n.contains(e.relatedTarget))&&Math.abs(x-P)<75)return!1;Hx&&k--,C=!1,o.to(k),X()}}function j(e){Array.from(p).map((function(e){return l(e,"active")})),p[e]&&f(p[e],"active")}function X(e){n[e=e?"addEventListener":"removeEventListener"]("touchmove",R,g),n[e]("touchend",z,g)}function F(e){e=e?"addEventListener":"removeEventListener",T.pause&&T.interval&&(n[e](v[0],M),n[e](v[1],D),n[e]("touchstart",M,g),n[e]("touchend",D,g)),T.touch&&d.length>1&&n[e]("touchstart",W,g),m.map((function(t){return t&&t[e]("click",O)})),u&&u[e]("click",S),T.keyboard&&window[e]("keydown",I)}var Y=function(e,t){o=this,t=t||{},n=r(e),d=n.getElementsByClassName("carousel-item"),n.Carousel&&n.Carousel.dispose(),d.length<2||(m=[n.getElementsByClassName("carousel-control-prev")[0],n.getElementsByClassName("carousel-control-next")[0]],u=n.getElementsByClassName("carousel-indicators")[0],p=u&&u.getElementsByTagName("LI")||[],(T=E(n,h,t)).interval=!0===T.interval?h.interval:T.interval,this.getActiveIndex()<0&&(d.length&&f(d[0],"active"),p.length&&j(0)),F(1),T.interval&&this.cycle(),n.Carousel=this)},U=Y.prototype;return U.cycle=function(){L&&(clearInterval(L),L=null),L=setInterval((function(){b(n)&&(k++,o.to(k))}),T.interval)},U.next=function(){!N&&k++,o.to(k)},U.prev=function(){!N&&k--,o.to(k)},U.to=function(e){var t=o.getActiveIndex();if(!N&&t!==e){te||t===d.length-1&&0===e)&&(A="right"),e<0?e=d.length-1:e>=d.length&&(e=0);var r="left"===A?"next":"prev",c="left"===A?"start":"end",u={relatedTarget:d[e],direction:A,from:t,to:e};Object.keys(u).map((function(e){y[e]=u[e],w[e]=u[e]})),n.dispatchEvent(y),y.defaultPrevented||(k=e,N=!0,clearInterval(L),L=null,j(e),i(d[e])&&s(n,"slide")?(f(d[e],"carousel-item-"+r),d[e].offsetWidth,f(d[e],"carousel-item-"+c),f(d[t],"carousel-item-"+c),a(d[e],B)):(f(d[e],"active"),l(d[t],"active"),setTimeout((function(){N=!1,T.interval&&n&&!s(n,"paused")&&o.cycle(),n.dispatchEvent(w)}),100)))}},U.getActiveIndex=function(){return Array.from(d).indexOf(n.getElementsByClassName("carousel-item active")[0])||0},U.dispose=function(){var e=["start","end","prev","next"];Array.from(d).map((function(t,n){s(t,"active")&&j(n),e.map((function(e){return l(t,"carousel-item-"+e)}))})),F(),clearInterval(L),delete n.Carousel},new Y(e,t)}var A={component:"Carousel",selector:'[data-bs-ride="carousel"]',constructor:T};function k(e,t){var n,o,i,d,u,m=c("show.bs.collapse"),h=c("shown.bs.collapse"),v=c("hide.bs.collapse"),g=c("hidden.bs.collapse");function b(e){var t=e.collapse,n=e.element;t.dispatchEvent(v),v.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),t.style.height=t.scrollHeight+"px",l(t,"collapse"),l(t,"show"),f(t,"collapsing"),t.offsetWidth,t.style.height="0px",a(t,(function(){u=!1,d&&(d.isAnimating=!1),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),l(t,"collapsing"),f(t,"collapse"),t.style.height="",t.dispatchEvent(g)})))}function w(e){o[e=e?"addEventListener":"removeEventListener"]("click",E)}function E(e){var t=e.target;n.toggle(),(e&&"A"===t.tagName&&"collapse"===t.getAttribute(p)||"A"===o.tagName)&&e.preventDefault()}var T=function(e,t){n=this,t=t||{},(o=r(e)).Collapse&&o.Collapse.dispose(),i=r(t.target)||y(o),d=o.closest(t.parent)||y(i),i&&(u=!1),d&&(d.isAnimating=!1),w(1),o.Collapse=n},A=T.prototype;return A.toggle=function(){s(i,"show")?this.hide():this.show()},A.hide=function(){u||(b({collapse:i,element:o}),f(o,"collapsed"))},A.show=function(){var e,t;d&&(t=d.getElementsByClassName("collapse show")[0],e=Array.from(d.querySelectorAll('[data-bs-toggle="collapse"]')).find((function(e){return!s(e,"collapsed")}))),d&&(!d||d.isAnimating)||u||(e&&t!==i&&(b({collapse:t,element:e}),f(e,"collapsed")),i.dispatchEvent(m),m.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),f(i,"collapsing"),l(i,"collapse"),i.style.height=i.scrollHeight+"px",a(i,(function(){u=!1,d&&(d.isAnimating=!1),i.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","true"),l(i,"collapsing"),f(i,"collapse"),f(i,"show"),i.style.height="",i.dispatchEvent(h)}))),l(o,"collapsed"))},A.dispose=function(){w(),d&&delete d.isAnimating,delete o.Collapse},new T(e,t)}var L={component:"Collapse",selector:'[data-bs-toggle="collapse"]',constructor:k},N=["dropdown","dropup","dropstart","dropend"];function C(e){return e&&(e.href&&"#"===e.href.slice(-1)||e.parentNode&&e.parentNode.href&&"#"===e.parentNode.href.slice(-1))}function x(e){e.focus?e.focus():e.setActive()}var H=N[0],P='[data-bs-toggle="'+H+'"]';function B(e){var t,n,o,i,a,d,u,m,h,v,b,y=N[1],w=N[2],E=N[3],T=["d-block","invisible"],A=[H,y],k=[w,E],L=c("show.bs."+H),B=c("shown.bs."+H),M=c("hide.bs."+H),D=c("hidden.bs."+H);function S(e){var t=N.filter((function(e){return d.includes(e)}))[0];if(!e)return o.className=d.join(" "),void(h&&!s(i,"dropdown-menu-end")?f:l)(i,"dropdown-menu-end");T.map((function(e){return f(i,e)}));var r=new RegExp("\\b("+H+"|"+y+"|"+w+"|"+E+")+"),c=n.offsetWidth,p=n.offsetHeight,v=i.offsetWidth,g=i.offsetHeight,b=document.documentElement.clientWidth||document.body.clientWidth,L=document.documentElement.clientHeight||document.body.clientHeight,C=n.getBoundingClientRect(),x=C.left+c-v<0,P=C.left-v<0,B=C.left+v>=b,M=C.left+v+c>=b,D=C.top+g>=L,S=C.top+g+p>=L,O=C.top-g<0;t=k.includes(t)&&P&&M?H:t,t=k.includes(t)&&D?y:t,!s(o,t=(t=(t=(t=t===w&&P&&!D?E:t)===E&&M&&!D?w:t)===y&&O&&!S?H:t)===H&&S&&!O?y:t)&&(o.className=o.className.replace(r,t));var I=u&&m||t!==E?l:f;if((u&&m||t!==w?l:f)(o,"dropleft"),I(o,"dropright"),A.includes(t)){var W=B?f:l;a?x&&f(o,"position-static"):W(i,"dropdown-menu-end")}T.map((function(e){return l(i,e)}))}function O(){var e=n.open?"addEventListener":"removeEventListener";document[e]("click",R),document[e]("focus",R),document[e]("keydown",j),document[e]("keyup",X),window[e]("scroll",F,g),window[e]("resize",F,g)}function I(e){n[e=e?"addEventListener":"removeEventListener"]("click",z)}function W(){M.relatedTarget=b,o.dispatchEvent(M),M.defaultPrevented||(l(i,"show"),l(o,"show"),S(),n.setAttribute("aria-expanded",!1),n.open=!1,x(n),setTimeout((function(){return O()}),1),D.relatedTarget=b,o.dispatchEvent(D))}function R(e){var t=e.target,a=t.getAttribute(p)===H||null!==t.closest(P),r=o.contains(t)&&("form"===t.tagName||null!==t.closest("form"));"click"===e.type&&C(t)&&e.preventDefault(),("focus"!==e.type||t!==n&&t!==i&&!i.contains(t))&&(r||a||(b=t,W()))}function z(e){b=n,t.toggle(),C(e.target)&&e.preventDefault()}function j(e){38!==e.which&&40!==e.which||e.preventDefault()}function X(e){var o=e.which,a=document.activeElement,r=a===n,s=i.contains(a),l=a.parentNode===i||a.parentNode.parentNode===i,c=v.indexOf(a);l&&(c=r?0:38===o?c>1?c-1:0:40===o&&c=m,L=v.top+p/2+y/2>=h,N=v.top-p<0,C=v.left-f<0,x=v.top+p+y>=h,H=v.left+f+b>=m;n="right"===(n="left"===(n="bottom"===(n="top"===(n=("left"===n||"right"===n)&&C&&H?"top":n)&&N?"bottom":n)&&x?"top":n)&&C?"right":n)&&H?"left":n,-1===t.className.indexOf(n)&&(t.className=t.className.replace(/\b(top|bottom|start|end)+/,O[n])),c=E?E.offsetWidth:0,d=E?E.offsetHeight:0,u=w?.8*c:c/2,"left"===n||"right"===n?(r="left"===n?v.left+g.x-f-(w?c:0):v.left+g.x+b,T?(a=v.top+g.y,s=y/2-c):L?(a=v.top+g.y-p+y,s=p-y/2-c):(a=v.top+g.y-p/2+y/2,s=p/2-(w?.9*d:d/2)),l=null):"top"!==n&&"bottom"!==n||(i&&I(e)?(a="top"===n?i.pageY-p-(w?c:d):i.pageY+d,i.clientX-f/2<0?(r=0,l=i.pageX-(w?.8*c:c/2)):i.clientX+.51*f>m?(r=m-1.009*f,l=f-(m-i.pageX)-u):(r=i.pageX-f/2,l=f/2-(w?.8*c:c/2))):(a="top"===n?v.top+g.y-p-(w?d:0):v.top+g.y+y,A?(r=0,l=v.left+b/2-(w?.8*c:c/2)):k?(r=m-f,l=f-(m-v.left)+b/2-(w?.8*c:c/2)):(r=v.left+g.x-f/2+b/2,l=f/2-(w?.8*c:c/2))),s=null),t.style.top=a+"px",t.style.left=r+"px",E.style.top=null!==s?s+"px":"",E.style.left=null!==l?l+"px":""}var R=1;function z(e,t){return e[t]||R++}var j={template:'',title:null,content:null,sanitizeFn:null,dismissible:!1,trigger:"hover",animation:"fade",placement:"top",delay:200};function X(e,t){var n,o,d,u,p=/(iPhone|iPod|iPad)/.test(navigator.userAgent),m=c("show.bs.popover"),h=c("shown.bs.popover"),b=c("hide.bs.popover"),y=c("hidden.bs.popover"),w=null,T={},A=!0,k=null;function L(e){null!==w&&e.target===r(".btn-close",w)&&n.hide()}function N(e){w&&W(o,w,T.placement,T.container,e)}function C(){null===w&&o.focus()}function x(){null===w&&n.show()}function H(){null!==w&&n.hide()}function P(){n.toggle()}function B(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function M(e){e=e?"addEventListener":"removeEventListener","hover"===T.trigger?(o[e](S,x),o[e](v[0],x),I(o)&&o[e]("mousemove",N,g),!T.dismissible&&o[e](v[1],H)):"click"===T.trigger?o[e](T.trigger,P):"focus"===T.trigger&&(p&&o[e]("click",C),o[e]("focusin",x))}function D(e){e=e?"addEventListener":"removeEventListener",T.dismissible?document[e]("click",L):("focus"===T.trigger&&o[e]("focusout",H),"hover"===T.trigger&&document[e]("touchstart",B,g)),I(o)||(window[e]("scroll",N,g),window[e]("resize",N,g))}function R(){D(1),o.dispatchEvent(h)}function X(e){D(),o.removeAttribute("aria-describedby"),T.container.removeChild(w),k=null,w=null,o.dispatchEvent(y)}var F=function(e,t){n=this,t=t||{},(o=r(e)).Popover&&o.Popover.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");j.container=i||a||document.body,(T=E(o,j,t)).content&&(u="bs-popover-"+O[T.placement],d="popover-"+(o.id||z(o)),M(1),o.Popover=n)},Y=F.prototype;return Y.toggle=function(){null===w?n.show():n.hide()},Y.show=function(){clearTimeout(k),k=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!function(){var e=T.title,t=T.content;e=e?e.trim():null,t=t?t.trim():null,T.sanitizeFn&&(e=e?T.sanitizeFn(e):null,t=t?T.sanitizeFn(t):null),(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var n=document.createElement("div");n.innerHTML=T.template.trim(),w.className=n.firstChild.className,w.innerHTML=n.firstChild.innerHTML;var i=r(".popover-header",w),a=r(".popover-body",w);e=T.dismissible&&e?e+'':e,t=T.dismissible&&null===e?NaN:t,e&&i&&(i.innerHTML=e.trim()),t&&a&&(a.innerHTML=t.trim()),T.container.appendChild(w),w.style.display="block",!s(w,"popover")&&f(w,"popover"),!s(w,T.animation)&&f(w,T.animation),!s(w,u)&&f(w,u)}(),N(),!s(w,"show")&&f(w,"show"),T.animation?a(w,R):R()}}),17)},Y.hide=function(){clearTimeout(k),k=setTimeout((function(){if(w&&null!==w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),T.animation?a(w,X):X()}}),T.delay+50)},Y.enable=function(){A||(M(1),A=!A)},Y.disable=function(){A&&(null!==w&&T.animation?(n.hide(),setTimeout(M,i(w)+T.delay+17)):M(),A=!A)},Y.toggleEnabled=function(){A?n.disable():n.enable()},Y.dispose=function(){n.hide(),M(),delete o.Popover},new F(e,t)}function F(e,t){var n,o,i,a,d,u,p,m,h,v,b,w=c("activate.bs.scrollspy"),E=0,T=[],A=[];function k(){var e,t,n,o=u.getElementsByTagName("A");(b=p?d.pageYOffset:d.scrollTop,E!==o.length||L(d)!==h)&&(T=[],A=[],h=L(d),v=h-(p?window.innerHeight:i.getBoundingClientRect().height),Array.from(o).map((function(o){e=o.getAttribute("href"),(t=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&r(e))&&(T.push(o),n=t.getBoundingClientRect(),A.push((p?n.top+b:t.offsetTop)-a))})),E=T.length)}function L(e){return e.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}function N(e){Array.from(e.getElementsByTagName("A")).map((function(e){return s(e,"active")&&l(e,"active")}))}function C(e){N(u),m=e,f(e,"active");for(var t=[];e.parentNode!==document.body;)e=e.parentNode,["dropdown-menu","nav"].some((function(t){return s(e,t)}))&&t.push(e);t.map((function(e){var t=e.previousElementSibling;t&&!s(t,"active")&&f(t,"active")})),w.relatedTarget=e,i.dispatchEvent(w)}function x(e){var t=e?"addEventListener":"removeEventListener",i=H.indexOf(H.find((function(e){return e.id===n}))),a=B.indexOf(B.find((function(e){return e.id===n}))),r={id:n,self:o};e||(i>-1&&H.splice(i,1),a>-1&&B.splice(a,1)),p&&(!e||H.length)&&e||d[t]("scroll",P,g),(e&&!B.length||!e&&!B.length)&&window[t]("resize",M,g),e&&(H.push(r),B.push(r))}var H=[];function P(){H.map((function(e){return e.self.refresh()}))}var B=[];function M(){B.map((function(e){return e.self.refresh()}))}var D=function(e,t){o=this,t=t||{},(i=r(e)).ScrollSpy&&i.ScrollSpy.dispose(),u=r(t.target)||y(i),d=i.clientHeight=v){var e=T[E-1];m!==e&&C(e)}else{if(m&&b0)return m=null,void N(u);T.map((function(e,t){m!==e&&b>=A[t]&&(void 0===A[t+1]||b1&&(e=t[t.length-1]):e=t[0],e}function H(){return r(x().getAttribute("href"))}function P(e){o[e=e?"addEventListener":"removeEventListener"]("click",B)}function B(e){e.preventDefault(),i=e.currentTarget,!h.isAnimating&&n.show()}var M=function(e){n=this,(o=r(e)).Tab&&o.Tab.dispose(),h=o.closest(".nav"),v=h&&r("."+N[0]+"-toggle",h),m=H(),g=t&&m.closest(".tab-content"),b=m.scrollHeight,h.isAnimating=!1,P(1),o.Tab=this},D=M.prototype;return D.show=function(){if(!s(i,"active")){if(d=r(i.getAttribute("href")),p=x(),m=H(),T.relatedTarget=i,p.dispatchEvent(T),T.defaultPrevented)return;h.isAnimating=!0,l(p,"active"),p.setAttribute("aria-selected","false"),f(i,"active"),i.setAttribute("aria-selected","true"),v&&(s(o.parentNode,"dropdown-menu")?!s(v,"active")&&f(v,"active"):s(v,"active")&&l(v,"active")),s(m,"fade")?(l(m,"show"),a(m,C)):C()}},D.dispose=function(){P(),delete o.Tab},new M(e)}function U(e,t){var n,o,i,d={animation:!0,autohide:!0,delay:500},u=c("show.bs.toast"),p=c("hide.bs.toast"),m=c("shown.bs.toast"),h=c("hidden.bs.toast"),v=null,g={};function b(){g.animation||(l(i,"showing"),f(i,"show")),i.dispatchEvent(m),g.autohide&&n.hide()}function y(){f(i,"hide"),i.dispatchEvent(h)}function w(){l(i,"show"),g.animation?(i.offsetWidth,a(i,y)):y()}function T(e){o[e=e?"addEventListener":"removeEventListener"]("click",A)}function A(){n.hide()}var k=function(e,t){n=this,t=t||{},o=r(e),i=o.closest(".toast"),o.Toast&&o.Toast.dispose(),g=E(o,d,t),T(1),o.Toast=n},L=k.prototype;return L.show=function(){if(i&&s(i,"hide")){if(i.dispatchEvent(u),u.defaultPrevented)return;f(i,"fade"),clearTimeout(v),v=setTimeout((function(){return l(i,"hide"),void(g.animation?(i.offsetWidth,f(i,"showing"),f(i,"show"),a(i,b)):b())}),10)}},L.hide=function(e){if(i&&s(i,"show")){if(i.dispatchEvent(p),p.defaultPrevented)return;clearTimeout(v),v=setTimeout(w,e?10:g.delay)}},L.dispose=function(){var e=function(){clearTimeout(v),T(),delete o.Toast};n.hide(),g.animation?a(i,e):e()},new k(e,t)}function q(e,t){var n,o,d,u,p={title:null,template:'',placement:"top",animation:"fade",delay:200,sanitizeFn:null},m=c("show.bs.tooltip"),h=c("shown.bs.tooltip"),b=c("hide.bs.tooltip"),y=c("hidden.bs.tooltip"),w=null,T=null,A=!0,k={};function L(e){w&&W(o,w,k.placement,k.container,e)}function N(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function C(){n.show()}function x(){n.hide()}function H(e){e=e?"addEventListener":"removeEventListener",document[e]("touchstart",N,g),I(o)||(window[e]("scroll",L,g),window[e]("resize",L,g))}function P(){H(1),o.dispatchEvent(h)}function B(){H(),o.removeAttribute("aria-describedby"),k.container.removeChild(w),w=null,T=null,o.dispatchEvent(y)}function M(e){e=e?"addEventListener":"removeEventListener",I(o)&&o[e]("mousemove",L,g),o[e](S,C),o[e](v[0],C),o[e](v[1],x)}function D(e){var t=["data-original-title","title"];o.setAttribute(t[e?0:1],e||o.getAttribute(t[0])),o.removeAttribute(t[e?1:0])}var R=function(e,t){n=this,t=t||{},(o=r(e)).Tooltip&&o.Tooltip.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");p.title=o.getAttribute("title"),p.container=i||a||document.body,(k=E(o,p,t)).title&&(d="tooltip-"+(o.id||z(o)),u="bs-tooltip-"+O[k.placement],o.hasAttribute("title")&&D(k.title),M(1),o.Tooltip=n)},j=R.prototype;return j.show=function(){clearTimeout(T),T=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!1!==function(){var e=k.title.trim();if(e=k.sanitizeFn?k.sanitizeFn(e):e){(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var t=document.createElement("div");t.innerHTML=k.template.trim(),w.className=t.firstChild.className,w.innerHTML=t.firstChild.innerHTML,r(".tooltip-inner",w).innerHTML=e,w.style.left="0",w.style.top="0",w.setAttribute("role","tooltip"),!s(w,"tooltip")&&f(w,"tooltip"),!s(w,k.animation)&&f(w,k.animation),!s(w,u)&&f(w,u),k.container.appendChild(w)}}()&&(L(),!s(w,"show")&&f(w,"show"),k.animation?a(w,P):P())}}),20)},j.hide=function(){clearTimeout(T),T=setTimeout((function(){if(w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),k.animation?a(w,B):B()}}),k.delay)},j.toggle=function(){null===w?n.show():n.hide()},j.enable=function(){A||(M(1),A=!A)},j.disable=function(){A&&(null!==w&&k.animation?(n.hide(),setTimeout(M,i(w)+k.delay+17)):M(),A=!A)},j.toggleEnabled=function(){A?n.disable():n.enable()},j.dispose=function(){this.hide(),M(),o.hasAttribute("data-original-title")&&D(),delete o.Tooltip},new R(e,t)}var V={Alert:u,Button:h,Carousel:A,Collapse:L,Dropdown:{component:"Dropdown",selector:P,constructor:B},Modal:{component:"Modal",selector:'[data-bs-toggle="modal"]',constructor:D},Popover:{component:"Popover",selector:'[data-bs-toggle="popover"],[data-tip="popover"]',constructor:X},ScrollSpy:{component:"ScrollSpy",selector:'[data-bs-spy="scroll"]',constructor:F},Tab:{component:"Tab",selector:'[data-bs-toggle="tab"]',constructor:Y},Toast:{component:"Toast",selector:'[data-bs-dismiss="toast"]',constructor:U},Tooltip:{component:"Tooltip",selector:'[data-bs-toggle="tooltip"],[data-tip="tooltip"]',constructor:q}};function G(e,t){Array.from(t).map((function(t){return new e(t)}))}function J(e,t){Array.from(t).map((function(t){return t[e].dispose()}))}function K(e,t){for(var n in e=e instanceof Element?lookup:document,t=t?G:J,V)t(V[n].constructor,e.querySelectorAll(V[n].selector))}document.body?K(0,1):document.addEventListener("DOMContentLoaded",(function(){return K(0,1)}),{once:!0});var Q={Alert:d,Button:m,Carousel:T,Collapse:k,Dropdown:B,Modal:D,Popover:X,ScrollSpy:F,Tab:Y,Toast:U,Tooltip:q,Callback:K,Version:"3.0.15"};export default Q; diff --git a/dist/bootstrap-native-v5.js b/dist/bootstrap-native-v5.js index 788035b7..1352e8dd 100644 --- a/dist/bootstrap-native-v5.js +++ b/dist/bootstrap-native-v5.js @@ -398,7 +398,7 @@ function getTargetElement( element ){ return queryElement( element.getAttribute( dataBsTarget ) || element.getAttribute( 'href' ) ) || element.closest( element.getAttribute( dataBsParent ) ) - || queryElement( element, element.getAttribute( dataBsContainer ) ) + || queryElement( element.getAttribute( dataBsContainer ) ) } function normalizeValue( value ) { diff --git a/dist/bootstrap-native-v5.min.js b/dist/bootstrap-native-v5.min.js index 1a65d950..01553645 100644 --- a/dist/bootstrap-native-v5.min.js +++ b/dist/bootstrap-native-v5.min.js @@ -1,2 +1,2 @@ // Native JavaScript for Bootstrap v3.0.15 | 2021 © dnp_theme | MIT-License -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BSN=t()}(this,(function(){"use strict";var e="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",t="webkitTransition"in document.head.style||"transition"in document.head.style,n="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",o="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function i(e){var i=getComputedStyle(e),a=i[o],r=i[n],s=r.indexOf("ms")>-1?1:1e3,l=t&&a&&"none"!==a?parseFloat(r)*s:0;return isNaN(l)?0:l}function a(t,n){var o=0,a=new Event(e),r=i(t);r?(t.addEventListener(e,(function i(a){a.target===t&&(n.apply(t,[a]),t.removeEventListener(e,i),o=1)})),setTimeout((function(){!o&&t.dispatchEvent(a)}),r+17)):n.apply(t,[a])}function r(e,t){var n=t&&t instanceof Element?t:document;return e instanceof Element?e:n.querySelector(e)}function s(e,t){return e.classList.contains(t)}function l(e,t){e.classList.remove(t)}function c(e,t){var n=new CustomEvent(e,{cancelable:!0});return t instanceof Object&&Object.keys(t).forEach((function(e){Object.defineProperty(n,e,{value:t[e]})})),n}function d(e){var t,n,o,i=c("close.bs.alert"),d=c("closed.bs.alert");function u(){p(),o.dispatchEvent(d),o.parentNode.removeChild(o)}function f(e){var i=e.target;o&&(n===i||n.contains(i))&&t.close()}function p(e){n[e=e?"addEventListener":"removeEventListener"]("click",f)}var m=function(e){t=this,(n=r(e)).Alert&&n.Alert.dispose(),o=n.closest(".alert"),p(1),n.Alert=this},h=m.prototype;return h.close=function(){if(o&&s(o,"show")){if(o.dispatchEvent(i),i.defaultPrevented)return;l(o,"show"),s(o,"fade")?a(o,u):u(),this.dispose()}},h.dispose=function(){p(),delete n.Alert},new m(e)}var u={component:"Alert",selector:'[data-bs-dismiss="alert"]',constructor:d};function f(e,t){e.classList.add(t)}var p="data-bs-toggle";function m(e){var t,n,o=c("change.bs.button");function i(e){t[e=e?"addEventListener":"removeEventListener"]("click",a),t[e]("keyup",d),t[e]("keydown",u),t[e]("focusin",p),t[e]("focusout",p)}function a(e){var i=e.target,a="LABEL"===i.tagName?i:i.closest("LABEL"),r=a&&a.getElementsByTagName("INPUT")[0];r&&(t.dispatchEvent(o),o.defaultPrevented||("checkbox"===r.type&&(r.checked?(l(a,"active"),r.getAttribute("checked"),r.removeAttribute("checked"),r.checked=!1):(f(a,"active"),r.getAttribute("checked"),r.setAttribute("checked","checked"),r.checked=!0),t.toggled||(t.toggled=!0)),"radio"!==r.type||t.toggled||(!r.checked||0===e.screenX&&0==e.screenY)&&(f(a,"active"),f(a,"focus"),r.setAttribute("checked","checked"),r.checked=!0,t.toggled=!0,Array.from(n).map((function(e){var t=e.getElementsByTagName("INPUT")[0];e!==a&&s(e,"active")&&(t.dispatchEvent(o),l(e,"active"),t.removeAttribute("checked"),t.checked=!1)}))),setTimeout((function(){t.toggled=!1}),10)))}function d(e){32===e.which&&e.target===document.activeElement&&a(e)}function u(e){32===e.which&&e.preventDefault()}function p(e){var t=e.target,n="focusin"===e.type?f:l;"INPUT"===t.tagName&&n(t.closest(".btn"),"focus")}var m=function(e){(t=r(e)).Button&&t.Button.dispose(),(n=t.getElementsByClassName("btn")).length&&(t.toggled=!1,Array.from(n).map((function(e){!s(e,"active")&&r("input:checked",e)&&f(e,"active"),s(e,"active")&&!r("input:checked",e)&&l(e,"active")})),i(1),t.Button=this)};return m.prototype.dispose=function(){i(),delete t.toggled,delete t.Button},new m(e)}var h={component:"Button",selector:'[data-bs-toggle="buttons"]',constructor:m},v="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],g=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){}return e}()&&{passive:!0};function b(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0}function y(e){return r(e.getAttribute("data-bs-target")||e.getAttribute("href"))||e.closest(e.getAttribute("data-bs-parent"))||r(e,e.getAttribute("data-bs-container"))}function w(e){return"true"===e||"false"!==e&&(isNaN(e)?""===e||"null"===e?null:e:+e)}function E(e,t,n){var o={},i={},a=e.dataset,s=["target","parent","container"];return Object.keys(a).map((function(t){var n=t.replace("bs","").toLowerCase();i[n]=s.includes(n)?y(e):w(a[t])})),Object.keys(n).map((function(t){n[t]=s.includes(t)?n[t]instanceof Element?n[t]:"parent"===t?e.closest(n[t]):r(n[t]):w(n[t])})),Object.keys(t).map((function(e){o[e]=e in n?n[e]:e in i?i[e]:t[e]})),o}function T(e,t){var n,o,d,u,p,m,h={pause:"hover",keyboard:!1,touch:!0,interval:5e3},y=c("slide.bs.carousel"),w=c("slid.bs.carousel"),T={},A="left",k=0,L=null,N=!1,C=!1,x=0,H=0,B=0;function P(){var e=k,t=o.getActiveIndex(),i="left"===A?"next":"prev",a="left"===A?"start":"end";N&&n.Carousel&&(N=!1,f(d[e],"active"),l(d[t],"active"),l(d[e],"carousel-item-"+i),l(d[e],"carousel-item-"+a),l(d[t],"carousel-item-"+a),n.dispatchEvent(w),document.hidden||!T.interval||s(n,"paused")||o.cycle())}function M(){s(n,"paused")||(f(n,"paused"),!N&&(clearInterval(L),L=null))}function S(){s(n,"paused")&&(l(n,"paused"),N||(clearInterval(L),L=null,o.cycle()))}function D(e){e.preventDefault();var t=e.target;N||t&&!s(t,"active")&&t.getAttribute("data-bs-slide-to")&&o.to(+t.getAttribute("data-bs-slide-to"))}function O(e){e.preventDefault();var t=e.currentTarget||e.srcElement;m[1]&&t===m[1]?o.next():m[1]&&t===m[0]&&o.prev()}function I(e){var t=e.which;if(b(n))switch(t){case 39:o.next();break;case 37:o.prev();break;default:return}}function W(e){C||(x=e.changedTouches[0].pageX,n.contains(e.target)&&(C=!0,X(1)))}function R(e){if(C)return H=e.changedTouches[0].pageX,"touchmove"===e.type&&e.changedTouches.length>1?(e.preventDefault(),!1):void 0}function z(e){if(C&&!N&&(B=H||e.changedTouches[0].pageX,C)){if((!n.contains(e.target)||!n.contains(e.relatedTarget))&&Math.abs(x-B)<75)return!1;Hx&&k--,C=!1,o.to(k),X()}}function j(e){Array.from(p).map((function(e){return l(e,"active")})),p[e]&&f(p[e],"active")}function X(e){n[e=e?"addEventListener":"removeEventListener"]("touchmove",R,g),n[e]("touchend",z,g)}function F(e){e=e?"addEventListener":"removeEventListener",T.pause&&T.interval&&(n[e](v[0],M),n[e](v[1],S),n[e]("touchstart",M,g),n[e]("touchend",S,g)),T.touch&&d.length>1&&n[e]("touchstart",W,g),m.map((function(t){return t&&t[e]("click",O)})),u&&u[e]("click",D),T.keyboard&&window[e]("keydown",I)}var Y=function(e,t){o=this,t=t||{},n=r(e),d=n.getElementsByClassName("carousel-item"),n.Carousel&&n.Carousel.dispose(),d.length<2||(m=[n.getElementsByClassName("carousel-control-prev")[0],n.getElementsByClassName("carousel-control-next")[0]],u=n.getElementsByClassName("carousel-indicators")[0],p=u&&u.getElementsByTagName("LI")||[],(T=E(n,h,t)).interval=!0===T.interval?h.interval:T.interval,this.getActiveIndex()<0&&(d.length&&f(d[0],"active"),p.length&&j(0)),F(1),T.interval&&this.cycle(),n.Carousel=this)},U=Y.prototype;return U.cycle=function(){L&&(clearInterval(L),L=null),L=setInterval((function(){b(n)&&(k++,o.to(k))}),T.interval)},U.next=function(){!N&&k++,o.to(k)},U.prev=function(){!N&&k--,o.to(k)},U.to=function(e){var t=o.getActiveIndex();if(!N&&t!==e){te||t===d.length-1&&0===e)&&(A="right"),e<0?e=d.length-1:e>=d.length&&(e=0);var r="left"===A?"next":"prev",c="left"===A?"start":"end",u={relatedTarget:d[e],direction:A,from:t,to:e};Object.keys(u).map((function(e){y[e]=u[e],w[e]=u[e]})),n.dispatchEvent(y),y.defaultPrevented||(k=e,N=!0,clearInterval(L),L=null,j(e),i(d[e])&&s(n,"slide")?(f(d[e],"carousel-item-"+r),d[e].offsetWidth,f(d[e],"carousel-item-"+c),f(d[t],"carousel-item-"+c),a(d[e],P)):(f(d[e],"active"),l(d[t],"active"),setTimeout((function(){N=!1,T.interval&&n&&!s(n,"paused")&&o.cycle(),n.dispatchEvent(w)}),100)))}},U.getActiveIndex=function(){return Array.from(d).indexOf(n.getElementsByClassName("carousel-item active")[0])||0},U.dispose=function(){var e=["start","end","prev","next"];Array.from(d).map((function(t,n){s(t,"active")&&j(n),e.map((function(e){return l(t,"carousel-item-"+e)}))})),F(),clearInterval(L),delete n.Carousel},new Y(e,t)}var A={component:"Carousel",selector:'[data-bs-ride="carousel"]',constructor:T};function k(e,t){var n,o,i,d,u,m=c("show.bs.collapse"),h=c("shown.bs.collapse"),v=c("hide.bs.collapse"),g=c("hidden.bs.collapse");function b(e){var t=e.collapse,n=e.element;t.dispatchEvent(v),v.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),t.style.height=t.scrollHeight+"px",l(t,"collapse"),l(t,"show"),f(t,"collapsing"),t.offsetWidth,t.style.height="0px",a(t,(function(){u=!1,d&&(d.isAnimating=!1),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),l(t,"collapsing"),f(t,"collapse"),t.style.height="",t.dispatchEvent(g)})))}function w(e){o[e=e?"addEventListener":"removeEventListener"]("click",E)}function E(e){var t=e.target;n.toggle(),(e&&"A"===t.tagName&&"collapse"===t.getAttribute(p)||"A"===o.tagName)&&e.preventDefault()}var T=function(e,t){n=this,t=t||{},(o=r(e)).Collapse&&o.Collapse.dispose(),i=r(t.target)||y(o),d=o.closest(t.parent)||y(i),i&&(u=!1),d&&(d.isAnimating=!1),w(1),o.Collapse=n},A=T.prototype;return A.toggle=function(){s(i,"show")?this.hide():this.show()},A.hide=function(){u||(b({collapse:i,element:o}),f(o,"collapsed"))},A.show=function(){var e,t;d&&(t=d.getElementsByClassName("collapse show")[0],e=Array.from(d.querySelectorAll('[data-bs-toggle="collapse"]')).find((function(e){return!s(e,"collapsed")}))),d&&(!d||d.isAnimating)||u||(e&&t!==i&&(b({collapse:t,element:e}),f(e,"collapsed")),i.dispatchEvent(m),m.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),f(i,"collapsing"),l(i,"collapse"),i.style.height=i.scrollHeight+"px",a(i,(function(){u=!1,d&&(d.isAnimating=!1),i.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","true"),l(i,"collapsing"),f(i,"collapse"),f(i,"show"),i.style.height="",i.dispatchEvent(h)}))),l(o,"collapsed"))},A.dispose=function(){w(),d&&delete d.isAnimating,delete o.Collapse},new T(e,t)}var L={component:"Collapse",selector:'[data-bs-toggle="collapse"]',constructor:k},N=["dropdown","dropup","dropstart","dropend"];function C(e){return e&&(e.href&&"#"===e.href.slice(-1)||e.parentNode&&e.parentNode.href&&"#"===e.parentNode.href.slice(-1))}function x(e){e.focus?e.focus():e.setActive()}var H=N[0],B="["+p+'="'+H+'"]';function P(e){var t,n,o,i,a,d,u,m,h,v,b,y=N[1],w=N[2],E=N[3],T=["d-block","invisible"],A=[H,y],k=[w,E],L=c("show.bs."+H),P=c("shown.bs."+H),M=c("hide.bs."+H),S=c("hidden.bs."+H);function D(e){var t=N.filter((function(e){return d.includes(e)}))[0];if(!e)return o.className=d.join(" "),void(h&&!s(i,"dropdown-menu-end")?f:l)(i,"dropdown-menu-end");T.map((function(e){return f(i,e)}));var r=new RegExp("\\b("+H+"|"+y+"|"+w+"|"+E+")+"),c=n.offsetWidth,p=n.offsetHeight,v=i.offsetWidth,g=i.offsetHeight,b=document.documentElement.clientWidth||document.body.clientWidth,L=document.documentElement.clientHeight||document.body.clientHeight,C=n.getBoundingClientRect(),x=C.left+c-v<0,B=C.left-v<0,P=C.left+v>=b,M=C.left+v+c>=b,S=C.top+g>=L,D=C.top+g+p>=L,O=C.top-g<0;t=k.includes(t)&&B&&M?H:t,t=k.includes(t)&&S?y:t,!s(o,t=(t=(t=(t=t===w&&B&&!S?E:t)===E&&M&&!S?w:t)===y&&O&&!D?H:t)===H&&D&&!O?y:t)&&(o.className=o.className.replace(r,t));var I=u&&m||t!==E?l:f;if((u&&m||t!==w?l:f)(o,"dropleft"),I(o,"dropright"),A.includes(t)){var W=P?f:l;a?x&&f(o,"position-static"):W(i,"dropdown-menu-end")}T.map((function(e){return l(i,e)}))}function O(){var e=n.open?"addEventListener":"removeEventListener";document[e]("click",R),document[e]("focus",R),document[e]("keydown",j),document[e]("keyup",X),window[e]("scroll",F,g),window[e]("resize",F,g)}function I(e){n[e=e?"addEventListener":"removeEventListener"]("click",z)}function W(){M.relatedTarget=b,o.dispatchEvent(M),M.defaultPrevented||(l(i,"show"),l(o,"show"),D(),n.setAttribute("aria-expanded",!1),n.open=!1,x(n),setTimeout((function(){return O()}),1),S.relatedTarget=b,o.dispatchEvent(S))}function R(e){var t=e.target,a=t.getAttribute(p)===H||null!==t.closest(B),r=o.contains(t)&&("form"===t.tagName||null!==t.closest("form"));"click"===e.type&&C(t)&&e.preventDefault(),("focus"!==e.type||t!==n&&t!==i&&!i.contains(t))&&(r||a||(b=t,W()))}function z(e){b=n,t.toggle(),C(e.target)&&e.preventDefault()}function j(e){38!==e.which&&40!==e.which||e.preventDefault()}function X(e){var o=e.which,a=document.activeElement,r=a===n,s=i.contains(a),l=a.parentNode===i||a.parentNode.parentNode===i,c=v.indexOf(a);l&&(c=r?0:38===o?c>1?c-1:0:40===o&&c=m,L=v.top+p/2+y/2>=h,N=v.top-p<0,C=v.left-f<0,x=v.top+p+y>=h,H=v.left+f+b>=m;n="right"===(n="left"===(n="bottom"===(n="top"===(n=("left"===n||"right"===n)&&C&&H?"top":n)&&N?"bottom":n)&&x?"top":n)&&C?"right":n)&&H?"left":n,-1===t.className.indexOf(n)&&(t.className=t.className.replace(/\b(top|bottom|start|end)+/,O[n])),c=E?E.offsetWidth:0,d=E?E.offsetHeight:0,u=w?.8*c:c/2,"left"===n||"right"===n?(r="left"===n?v.left+g.x-f-(w?c:0):v.left+g.x+b,T?(a=v.top+g.y,s=y/2-c):L?(a=v.top+g.y-p+y,s=p-y/2-c):(a=v.top+g.y-p/2+y/2,s=p/2-(w?.9*d:d/2)),l=null):"top"!==n&&"bottom"!==n||(i&&I(e)?(a="top"===n?i.pageY-p-(w?c:d):i.pageY+d,i.clientX-f/2<0?(r=0,l=i.pageX-(w?.8*c:c/2)):i.clientX+.51*f>m?(r=m-1.009*f,l=f-(m-i.pageX)-u):(r=i.pageX-f/2,l=f/2-(w?.8*c:c/2))):(a="top"===n?v.top+g.y-p-(w?d:0):v.top+g.y+y,A?(r=0,l=v.left+b/2-(w?.8*c:c/2)):k?(r=m-f,l=f-(m-v.left)+b/2-(w?.8*c:c/2)):(r=v.left+g.x-f/2+b/2,l=f/2-(w?.8*c:c/2))),s=null),t.style.top=a+"px",t.style.left=r+"px",E.style.top=null!==s?s+"px":"",E.style.left=null!==l?l+"px":""}var R=1;function z(e,t){return e[t]||R++}var j={template:'',title:null,content:null,sanitizeFn:null,dismissible:!1,trigger:"hover",animation:"fade",placement:"top",delay:200};function X(e,t){var n,o,d,u,p=/(iPhone|iPod|iPad)/.test(navigator.userAgent),m=c("show.bs.popover"),h=c("shown.bs.popover"),b=c("hide.bs.popover"),y=c("hidden.bs.popover"),w=null,T={},A=!0,k=null;function L(e){null!==w&&e.target===r(".btn-close",w)&&n.hide()}function N(e){w&&W(o,w,T.placement,T.container,e)}function C(){null===w&&o.focus()}function x(){null===w&&n.show()}function H(){null!==w&&n.hide()}function B(){n.toggle()}function P(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function M(e){e=e?"addEventListener":"removeEventListener","hover"===T.trigger?(o[e](D,x),o[e](v[0],x),I(o)&&o[e]("mousemove",N,g),!T.dismissible&&o[e](v[1],H)):"click"===T.trigger?o[e](T.trigger,B):"focus"===T.trigger&&(p&&o[e]("click",C),o[e]("focusin",x))}function S(e){e=e?"addEventListener":"removeEventListener",T.dismissible?document[e]("click",L):("focus"===T.trigger&&o[e]("focusout",H),"hover"===T.trigger&&document[e]("touchstart",P,g)),I(o)||(window[e]("scroll",N,g),window[e]("resize",N,g))}function R(){S(1),o.dispatchEvent(h)}function X(e){S(),o.removeAttribute("aria-describedby"),T.container.removeChild(w),k=null,w=null,o.dispatchEvent(y)}var F=function(e,t){n=this,t=t||{},(o=r(e)).Popover&&o.Popover.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");j.container=i||a||document.body,(T=E(o,j,t)).content&&(u="bs-popover-"+O[T.placement],d="popover-"+(o.id||z(o)),M(1),o.Popover=n)},Y=F.prototype;return Y.toggle=function(){null===w?n.show():n.hide()},Y.show=function(){clearTimeout(k),k=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!function(){var e=T.title,t=T.content;e=e?e.trim():null,t=t?t.trim():null,T.sanitizeFn&&(e=e?T.sanitizeFn(e):null,t=t?T.sanitizeFn(t):null),(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var n=document.createElement("div");n.innerHTML=T.template.trim(),w.className=n.firstChild.className,w.innerHTML=n.firstChild.innerHTML;var i=r(".popover-header",w),a=r(".popover-body",w);e=T.dismissible&&e?e+'':e,t=T.dismissible&&null===e?NaN:t,e&&i&&(i.innerHTML=e.trim()),t&&a&&(a.innerHTML=t.trim()),T.container.appendChild(w),w.style.display="block",!s(w,"popover")&&f(w,"popover"),!s(w,T.animation)&&f(w,T.animation),!s(w,u)&&f(w,u)}(),N(),!s(w,"show")&&f(w,"show"),T.animation?a(w,R):R()}}),17)},Y.hide=function(){clearTimeout(k),k=setTimeout((function(){if(w&&null!==w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),T.animation?a(w,X):X()}}),T.delay+50)},Y.enable=function(){A||(M(1),A=!A)},Y.disable=function(){A&&(null!==w&&T.animation?(n.hide(),setTimeout(M,i(w)+T.delay+17)):M(),A=!A)},Y.toggleEnabled=function(){A?n.disable():n.enable()},Y.dispose=function(){n.hide(),M(),delete o.Popover},new F(e,t)}function F(e,t){var n,o,i,a,d,u,p,m,h,v,b,w=c("activate.bs.scrollspy"),E=0,T=[],A=[];function k(){var e,t,n,o=u.getElementsByTagName("A");(b=p?d.pageYOffset:d.scrollTop,E!==o.length||L(d)!==h)&&(T=[],A=[],h=L(d),v=h-(p?window.innerHeight:i.getBoundingClientRect().height),Array.from(o).map((function(o){e=o.getAttribute("href"),(t=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&r(e))&&(T.push(o),n=t.getBoundingClientRect(),A.push((p?n.top+b:t.offsetTop)-a))})),E=T.length)}function L(e){return e.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}function N(e){Array.from(e.getElementsByTagName("A")).map((function(e){return s(e,"active")&&l(e,"active")}))}function C(e){N(u),m=e,f(e,"active");for(var t=[];e.parentNode!==document.body;)e=e.parentNode,["dropdown-menu","nav"].some((function(t){return s(e,t)}))&&t.push(e);t.map((function(e){var t=e.previousElementSibling;t&&!s(t,"active")&&f(t,"active")})),w.relatedTarget=e,i.dispatchEvent(w)}function x(e){var t=e?"addEventListener":"removeEventListener",i=H.indexOf(H.find((function(e){return e.id===n}))),a=P.indexOf(P.find((function(e){return e.id===n}))),r={id:n,self:o};e||(i>-1&&H.splice(i,1),a>-1&&P.splice(a,1)),p&&(!e||H.length)&&e||d[t]("scroll",B,g),(e&&!P.length||!e&&!P.length)&&window[t]("resize",M,g),e&&(H.push(r),P.push(r))}var H=[];function B(){H.map((function(e){return e.self.refresh()}))}var P=[];function M(){P.map((function(e){return e.self.refresh()}))}var S=function(e,t){o=this,t=t||{},(i=r(e)).ScrollSpy&&i.ScrollSpy.dispose(),u=r(t.target)||y(i),d=i.clientHeight=v){var e=T[E-1];m!==e&&C(e)}else{if(m&&b0)return m=null,void N(u);T.map((function(e,t){m!==e&&b>=A[t]&&(void 0===A[t+1]||b1&&(e=t[t.length-1]):e=t[0],e}function H(){return r(x().getAttribute("href"))}function B(e){o[e=e?"addEventListener":"removeEventListener"]("click",P)}function P(e){e.preventDefault(),i=e.currentTarget,!h.isAnimating&&n.show()}var M=function(e){n=this,(o=r(e)).Tab&&o.Tab.dispose(),h=o.closest(".nav"),v=h&&r("."+N[0]+"-toggle",h),m=H(),g=t&&m.closest(".tab-content"),b=m.scrollHeight,h.isAnimating=!1,B(1),o.Tab=this},S=M.prototype;return S.show=function(){if(!s(i,"active")){if(d=r(i.getAttribute("href")),p=x(),m=H(),T.relatedTarget=i,p.dispatchEvent(T),T.defaultPrevented)return;h.isAnimating=!0,l(p,"active"),p.setAttribute("aria-selected","false"),f(i,"active"),i.setAttribute("aria-selected","true"),v&&(s(o.parentNode,"dropdown-menu")?!s(v,"active")&&f(v,"active"):s(v,"active")&&l(v,"active")),s(m,"fade")?(l(m,"show"),a(m,C)):C()}},S.dispose=function(){B(),delete o.Tab},new M(e)}function U(e,t){var n,o,i,d={animation:!0,autohide:!0,delay:500},u=c("show.bs.toast"),p=c("hide.bs.toast"),m=c("shown.bs.toast"),h=c("hidden.bs.toast"),v=null,g={};function b(){g.animation||(l(i,"showing"),f(i,"show")),i.dispatchEvent(m),g.autohide&&n.hide()}function y(){f(i,"hide"),i.dispatchEvent(h)}function w(){l(i,"show"),g.animation?(i.offsetWidth,a(i,y)):y()}function T(e){o[e=e?"addEventListener":"removeEventListener"]("click",A)}function A(){n.hide()}var k=function(e,t){n=this,t=t||{},o=r(e),i=o.closest(".toast"),o.Toast&&o.Toast.dispose(),g=E(o,d,t),T(1),o.Toast=n},L=k.prototype;return L.show=function(){if(i&&s(i,"hide")){if(i.dispatchEvent(u),u.defaultPrevented)return;f(i,"fade"),clearTimeout(v),v=setTimeout((function(){return l(i,"hide"),void(g.animation?(i.offsetWidth,f(i,"showing"),f(i,"show"),a(i,b)):b())}),10)}},L.hide=function(e){if(i&&s(i,"show")){if(i.dispatchEvent(p),p.defaultPrevented)return;clearTimeout(v),v=setTimeout(w,e?10:g.delay)}},L.dispose=function(){var e=function(){clearTimeout(v),T(),delete o.Toast};n.hide(),g.animation?a(i,e):e()},new k(e,t)}function q(e,t){var n,o,d,u,p={title:null,template:'',placement:"top",animation:"fade",delay:200,sanitizeFn:null},m=c("show.bs.tooltip"),h=c("shown.bs.tooltip"),b=c("hide.bs.tooltip"),y=c("hidden.bs.tooltip"),w=null,T=null,A=!0,k={};function L(e){w&&W(o,w,k.placement,k.container,e)}function N(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function C(){n.show()}function x(){n.hide()}function H(e){e=e?"addEventListener":"removeEventListener",document[e]("touchstart",N,g),I(o)||(window[e]("scroll",L,g),window[e]("resize",L,g))}function B(){H(1),o.dispatchEvent(h)}function P(){H(),o.removeAttribute("aria-describedby"),k.container.removeChild(w),w=null,T=null,o.dispatchEvent(y)}function M(e){e=e?"addEventListener":"removeEventListener",I(o)&&o[e]("mousemove",L,g),o[e](D,C),o[e](v[0],C),o[e](v[1],x)}function S(e){var t=["data-original-title","title"];o.setAttribute(t[e?0:1],e||o.getAttribute(t[0])),o.removeAttribute(t[e?1:0])}var R=function(e,t){n=this,t=t||{},(o=r(e)).Tooltip&&o.Tooltip.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");p.title=o.getAttribute("title"),p.container=i||a||document.body,(k=E(o,p,t)).title&&(d="tooltip-"+(o.id||z(o)),u="bs-tooltip-"+O[k.placement],o.hasAttribute("title")&&S(k.title),M(1),o.Tooltip=n)},j=R.prototype;return j.show=function(){clearTimeout(T),T=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!1!==function(){var e=k.title.trim();if(e=k.sanitizeFn?k.sanitizeFn(e):e){(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var t=document.createElement("div");t.innerHTML=k.template.trim(),w.className=t.firstChild.className,w.innerHTML=t.firstChild.innerHTML,r(".tooltip-inner",w).innerHTML=e,w.style.left="0",w.style.top="0",w.setAttribute("role","tooltip"),!s(w,"tooltip")&&f(w,"tooltip"),!s(w,k.animation)&&f(w,k.animation),!s(w,u)&&f(w,u),k.container.appendChild(w)}}()&&(L(),!s(w,"show")&&f(w,"show"),k.animation?a(w,B):B())}}),20)},j.hide=function(){clearTimeout(T),T=setTimeout((function(){if(w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),k.animation?a(w,P):P()}}),k.delay)},j.toggle=function(){null===w?n.show():n.hide()},j.enable=function(){A||(M(1),A=!A)},j.disable=function(){A&&(null!==w&&k.animation?(n.hide(),setTimeout(M,i(w)+k.delay+17)):M(),A=!A)},j.toggleEnabled=function(){A?n.disable():n.enable()},j.dispose=function(){this.hide(),M(),o.hasAttribute("data-original-title")&&S(),delete o.Tooltip},new R(e,t)}var V={Alert:u,Button:h,Carousel:A,Collapse:L,Dropdown:{component:"Dropdown",selector:B,constructor:P},Modal:{component:"Modal",selector:'[data-bs-toggle="modal"]',constructor:S},Popover:{component:"Popover",selector:'[data-bs-toggle="popover"],[data-tip="popover"]',constructor:X},ScrollSpy:{component:"ScrollSpy",selector:'[data-bs-spy="scroll"]',constructor:F},Tab:{component:"Tab",selector:'[data-bs-toggle="tab"]',constructor:Y},Toast:{component:"Toast",selector:'[data-bs-dismiss="toast"]',constructor:U},Tooltip:{component:"Tooltip",selector:'[data-bs-toggle="tooltip"],[data-tip="tooltip"]',constructor:q}};function G(e,t){Array.from(t).map((function(t){return new e(t)}))}function J(e,t){Array.from(t).map((function(t){return t[e].dispose()}))}function K(e,t){for(var n in e=e instanceof Element?lookup:document,t=t?G:J,V)t(V[n].constructor,e.querySelectorAll(V[n].selector))}return document.body?K(0,1):document.addEventListener("DOMContentLoaded",(function(){return K(0,1)}),{once:!0}),{Alert:d,Button:m,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:X,ScrollSpy:F,Tab:Y,Toast:U,Tooltip:q,Callback:K,Version:"3.0.15"}})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BSN=t()}(this,(function(){"use strict";var e="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",t="webkitTransition"in document.head.style||"transition"in document.head.style,n="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",o="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function i(e){var i=getComputedStyle(e),a=i[o],r=i[n],s=r.indexOf("ms")>-1?1:1e3,l=t&&a&&"none"!==a?parseFloat(r)*s:0;return isNaN(l)?0:l}function a(t,n){var o=0,a=new Event(e),r=i(t);r?(t.addEventListener(e,(function i(a){a.target===t&&(n.apply(t,[a]),t.removeEventListener(e,i),o=1)})),setTimeout((function(){!o&&t.dispatchEvent(a)}),r+17)):n.apply(t,[a])}function r(e,t){var n=t&&t instanceof Element?t:document;return e instanceof Element?e:n.querySelector(e)}function s(e,t){return e.classList.contains(t)}function l(e,t){e.classList.remove(t)}function c(e,t){var n=new CustomEvent(e,{cancelable:!0});return t instanceof Object&&Object.keys(t).forEach((function(e){Object.defineProperty(n,e,{value:t[e]})})),n}function d(e){var t,n,o,i=c("close.bs.alert"),d=c("closed.bs.alert");function u(){p(),o.dispatchEvent(d),o.parentNode.removeChild(o)}function f(e){var i=e.target;o&&(n===i||n.contains(i))&&t.close()}function p(e){n[e=e?"addEventListener":"removeEventListener"]("click",f)}var m=function(e){t=this,(n=r(e)).Alert&&n.Alert.dispose(),o=n.closest(".alert"),p(1),n.Alert=this},h=m.prototype;return h.close=function(){if(o&&s(o,"show")){if(o.dispatchEvent(i),i.defaultPrevented)return;l(o,"show"),s(o,"fade")?a(o,u):u(),this.dispose()}},h.dispose=function(){p(),delete n.Alert},new m(e)}var u={component:"Alert",selector:'[data-bs-dismiss="alert"]',constructor:d};function f(e,t){e.classList.add(t)}var p="data-bs-toggle";function m(e){var t,n,o=c("change.bs.button");function i(e){t[e=e?"addEventListener":"removeEventListener"]("click",a),t[e]("keyup",d),t[e]("keydown",u),t[e]("focusin",p),t[e]("focusout",p)}function a(e){var i=e.target,a="LABEL"===i.tagName?i:i.closest("LABEL"),r=a&&a.getElementsByTagName("INPUT")[0];r&&(t.dispatchEvent(o),o.defaultPrevented||("checkbox"===r.type&&(r.checked?(l(a,"active"),r.getAttribute("checked"),r.removeAttribute("checked"),r.checked=!1):(f(a,"active"),r.getAttribute("checked"),r.setAttribute("checked","checked"),r.checked=!0),t.toggled||(t.toggled=!0)),"radio"!==r.type||t.toggled||(!r.checked||0===e.screenX&&0==e.screenY)&&(f(a,"active"),f(a,"focus"),r.setAttribute("checked","checked"),r.checked=!0,t.toggled=!0,Array.from(n).map((function(e){var t=e.getElementsByTagName("INPUT")[0];e!==a&&s(e,"active")&&(t.dispatchEvent(o),l(e,"active"),t.removeAttribute("checked"),t.checked=!1)}))),setTimeout((function(){t.toggled=!1}),10)))}function d(e){32===e.which&&e.target===document.activeElement&&a(e)}function u(e){32===e.which&&e.preventDefault()}function p(e){var t=e.target,n="focusin"===e.type?f:l;"INPUT"===t.tagName&&n(t.closest(".btn"),"focus")}var m=function(e){(t=r(e)).Button&&t.Button.dispose(),(n=t.getElementsByClassName("btn")).length&&(t.toggled=!1,Array.from(n).map((function(e){!s(e,"active")&&r("input:checked",e)&&f(e,"active"),s(e,"active")&&!r("input:checked",e)&&l(e,"active")})),i(1),t.Button=this)};return m.prototype.dispose=function(){i(),delete t.toggled,delete t.Button},new m(e)}var h={component:"Button",selector:'[data-bs-toggle="buttons"]',constructor:m},v="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],g=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});document.addEventListener("DOMContentLoaded",(function e(){document.removeEventListener("DOMContentLoaded",e,t)}),t)}catch(e){}return e}()&&{passive:!0};function b(e){var t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return t.top<=n&&t.bottom>=0}function y(e){return r(e.getAttribute("data-bs-target")||e.getAttribute("href"))||e.closest(e.getAttribute("data-bs-parent"))||r(e.getAttribute("data-bs-container"))}function w(e){return"true"===e||"false"!==e&&(isNaN(e)?""===e||"null"===e?null:e:+e)}function E(e,t,n){var o={},i={},a=e.dataset,s=["target","parent","container"];return Object.keys(a).map((function(t){var n=t.replace("bs","").toLowerCase();i[n]=s.includes(n)?y(e):w(a[t])})),Object.keys(n).map((function(t){n[t]=s.includes(t)?n[t]instanceof Element?n[t]:"parent"===t?e.closest(n[t]):r(n[t]):w(n[t])})),Object.keys(t).map((function(e){o[e]=e in n?n[e]:e in i?i[e]:t[e]})),o}function T(e,t){var n,o,d,u,p,m,h={pause:"hover",keyboard:!1,touch:!0,interval:5e3},y=c("slide.bs.carousel"),w=c("slid.bs.carousel"),T={},A="left",k=0,L=null,N=!1,C=!1,x=0,H=0,B=0;function P(){var e=k,t=o.getActiveIndex(),i="left"===A?"next":"prev",a="left"===A?"start":"end";N&&n.Carousel&&(N=!1,f(d[e],"active"),l(d[t],"active"),l(d[e],"carousel-item-"+i),l(d[e],"carousel-item-"+a),l(d[t],"carousel-item-"+a),n.dispatchEvent(w),document.hidden||!T.interval||s(n,"paused")||o.cycle())}function M(){s(n,"paused")||(f(n,"paused"),!N&&(clearInterval(L),L=null))}function S(){s(n,"paused")&&(l(n,"paused"),N||(clearInterval(L),L=null,o.cycle()))}function D(e){e.preventDefault();var t=e.target;N||t&&!s(t,"active")&&t.getAttribute("data-bs-slide-to")&&o.to(+t.getAttribute("data-bs-slide-to"))}function O(e){e.preventDefault();var t=e.currentTarget||e.srcElement;m[1]&&t===m[1]?o.next():m[1]&&t===m[0]&&o.prev()}function I(e){var t=e.which;if(b(n))switch(t){case 39:o.next();break;case 37:o.prev();break;default:return}}function W(e){C||(x=e.changedTouches[0].pageX,n.contains(e.target)&&(C=!0,X(1)))}function R(e){if(C)return H=e.changedTouches[0].pageX,"touchmove"===e.type&&e.changedTouches.length>1?(e.preventDefault(),!1):void 0}function z(e){if(C&&!N&&(B=H||e.changedTouches[0].pageX,C)){if((!n.contains(e.target)||!n.contains(e.relatedTarget))&&Math.abs(x-B)<75)return!1;Hx&&k--,C=!1,o.to(k),X()}}function j(e){Array.from(p).map((function(e){return l(e,"active")})),p[e]&&f(p[e],"active")}function X(e){n[e=e?"addEventListener":"removeEventListener"]("touchmove",R,g),n[e]("touchend",z,g)}function F(e){e=e?"addEventListener":"removeEventListener",T.pause&&T.interval&&(n[e](v[0],M),n[e](v[1],S),n[e]("touchstart",M,g),n[e]("touchend",S,g)),T.touch&&d.length>1&&n[e]("touchstart",W,g),m.map((function(t){return t&&t[e]("click",O)})),u&&u[e]("click",D),T.keyboard&&window[e]("keydown",I)}var Y=function(e,t){o=this,t=t||{},n=r(e),d=n.getElementsByClassName("carousel-item"),n.Carousel&&n.Carousel.dispose(),d.length<2||(m=[n.getElementsByClassName("carousel-control-prev")[0],n.getElementsByClassName("carousel-control-next")[0]],u=n.getElementsByClassName("carousel-indicators")[0],p=u&&u.getElementsByTagName("LI")||[],(T=E(n,h,t)).interval=!0===T.interval?h.interval:T.interval,this.getActiveIndex()<0&&(d.length&&f(d[0],"active"),p.length&&j(0)),F(1),T.interval&&this.cycle(),n.Carousel=this)},U=Y.prototype;return U.cycle=function(){L&&(clearInterval(L),L=null),L=setInterval((function(){b(n)&&(k++,o.to(k))}),T.interval)},U.next=function(){!N&&k++,o.to(k)},U.prev=function(){!N&&k--,o.to(k)},U.to=function(e){var t=o.getActiveIndex();if(!N&&t!==e){te||t===d.length-1&&0===e)&&(A="right"),e<0?e=d.length-1:e>=d.length&&(e=0);var r="left"===A?"next":"prev",c="left"===A?"start":"end",u={relatedTarget:d[e],direction:A,from:t,to:e};Object.keys(u).map((function(e){y[e]=u[e],w[e]=u[e]})),n.dispatchEvent(y),y.defaultPrevented||(k=e,N=!0,clearInterval(L),L=null,j(e),i(d[e])&&s(n,"slide")?(f(d[e],"carousel-item-"+r),d[e].offsetWidth,f(d[e],"carousel-item-"+c),f(d[t],"carousel-item-"+c),a(d[e],P)):(f(d[e],"active"),l(d[t],"active"),setTimeout((function(){N=!1,T.interval&&n&&!s(n,"paused")&&o.cycle(),n.dispatchEvent(w)}),100)))}},U.getActiveIndex=function(){return Array.from(d).indexOf(n.getElementsByClassName("carousel-item active")[0])||0},U.dispose=function(){var e=["start","end","prev","next"];Array.from(d).map((function(t,n){s(t,"active")&&j(n),e.map((function(e){return l(t,"carousel-item-"+e)}))})),F(),clearInterval(L),delete n.Carousel},new Y(e,t)}var A={component:"Carousel",selector:'[data-bs-ride="carousel"]',constructor:T};function k(e,t){var n,o,i,d,u,m=c("show.bs.collapse"),h=c("shown.bs.collapse"),v=c("hide.bs.collapse"),g=c("hidden.bs.collapse");function b(e){var t=e.collapse,n=e.element;t.dispatchEvent(v),v.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),t.style.height=t.scrollHeight+"px",l(t,"collapse"),l(t,"show"),f(t,"collapsing"),t.offsetWidth,t.style.height="0px",a(t,(function(){u=!1,d&&(d.isAnimating=!1),t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),l(t,"collapsing"),f(t,"collapse"),t.style.height="",t.dispatchEvent(g)})))}function w(e){o[e=e?"addEventListener":"removeEventListener"]("click",E)}function E(e){var t=e.target;n.toggle(),(e&&"A"===t.tagName&&"collapse"===t.getAttribute(p)||"A"===o.tagName)&&e.preventDefault()}var T=function(e,t){n=this,t=t||{},(o=r(e)).Collapse&&o.Collapse.dispose(),i=r(t.target)||y(o),d=o.closest(t.parent)||y(i),i&&(u=!1),d&&(d.isAnimating=!1),w(1),o.Collapse=n},A=T.prototype;return A.toggle=function(){s(i,"show")?this.hide():this.show()},A.hide=function(){u||(b({collapse:i,element:o}),f(o,"collapsed"))},A.show=function(){var e,t;d&&(t=d.getElementsByClassName("collapse show")[0],e=Array.from(d.querySelectorAll('[data-bs-toggle="collapse"]')).find((function(e){return!s(e,"collapsed")}))),d&&(!d||d.isAnimating)||u||(e&&t!==i&&(b({collapse:t,element:e}),f(e,"collapsed")),i.dispatchEvent(m),m.defaultPrevented||(u=!0,d&&(d.isAnimating=!0),f(i,"collapsing"),l(i,"collapse"),i.style.height=i.scrollHeight+"px",a(i,(function(){u=!1,d&&(d.isAnimating=!1),i.setAttribute("aria-expanded","true"),o.setAttribute("aria-expanded","true"),l(i,"collapsing"),f(i,"collapse"),f(i,"show"),i.style.height="",i.dispatchEvent(h)}))),l(o,"collapsed"))},A.dispose=function(){w(),d&&delete d.isAnimating,delete o.Collapse},new T(e,t)}var L={component:"Collapse",selector:'[data-bs-toggle="collapse"]',constructor:k},N=["dropdown","dropup","dropstart","dropend"];function C(e){return e&&(e.href&&"#"===e.href.slice(-1)||e.parentNode&&e.parentNode.href&&"#"===e.parentNode.href.slice(-1))}function x(e){e.focus?e.focus():e.setActive()}var H=N[0],B="["+p+'="'+H+'"]';function P(e){var t,n,o,i,a,d,u,m,h,v,b,y=N[1],w=N[2],E=N[3],T=["d-block","invisible"],A=[H,y],k=[w,E],L=c("show.bs."+H),P=c("shown.bs."+H),M=c("hide.bs."+H),S=c("hidden.bs."+H);function D(e){var t=N.filter((function(e){return d.includes(e)}))[0];if(!e)return o.className=d.join(" "),void(h&&!s(i,"dropdown-menu-end")?f:l)(i,"dropdown-menu-end");T.map((function(e){return f(i,e)}));var r=new RegExp("\\b("+H+"|"+y+"|"+w+"|"+E+")+"),c=n.offsetWidth,p=n.offsetHeight,v=i.offsetWidth,g=i.offsetHeight,b=document.documentElement.clientWidth||document.body.clientWidth,L=document.documentElement.clientHeight||document.body.clientHeight,C=n.getBoundingClientRect(),x=C.left+c-v<0,B=C.left-v<0,P=C.left+v>=b,M=C.left+v+c>=b,S=C.top+g>=L,D=C.top+g+p>=L,O=C.top-g<0;t=k.includes(t)&&B&&M?H:t,t=k.includes(t)&&S?y:t,!s(o,t=(t=(t=(t=t===w&&B&&!S?E:t)===E&&M&&!S?w:t)===y&&O&&!D?H:t)===H&&D&&!O?y:t)&&(o.className=o.className.replace(r,t));var I=u&&m||t!==E?l:f;if((u&&m||t!==w?l:f)(o,"dropleft"),I(o,"dropright"),A.includes(t)){var W=P?f:l;a?x&&f(o,"position-static"):W(i,"dropdown-menu-end")}T.map((function(e){return l(i,e)}))}function O(){var e=n.open?"addEventListener":"removeEventListener";document[e]("click",R),document[e]("focus",R),document[e]("keydown",j),document[e]("keyup",X),window[e]("scroll",F,g),window[e]("resize",F,g)}function I(e){n[e=e?"addEventListener":"removeEventListener"]("click",z)}function W(){M.relatedTarget=b,o.dispatchEvent(M),M.defaultPrevented||(l(i,"show"),l(o,"show"),D(),n.setAttribute("aria-expanded",!1),n.open=!1,x(n),setTimeout((function(){return O()}),1),S.relatedTarget=b,o.dispatchEvent(S))}function R(e){var t=e.target,a=t.getAttribute(p)===H||null!==t.closest(B),r=o.contains(t)&&("form"===t.tagName||null!==t.closest("form"));"click"===e.type&&C(t)&&e.preventDefault(),("focus"!==e.type||t!==n&&t!==i&&!i.contains(t))&&(r||a||(b=t,W()))}function z(e){b=n,t.toggle(),C(e.target)&&e.preventDefault()}function j(e){38!==e.which&&40!==e.which||e.preventDefault()}function X(e){var o=e.which,a=document.activeElement,r=a===n,s=i.contains(a),l=a.parentNode===i||a.parentNode.parentNode===i,c=v.indexOf(a);l&&(c=r?0:38===o?c>1?c-1:0:40===o&&c=m,L=v.top+p/2+y/2>=h,N=v.top-p<0,C=v.left-f<0,x=v.top+p+y>=h,H=v.left+f+b>=m;n="right"===(n="left"===(n="bottom"===(n="top"===(n=("left"===n||"right"===n)&&C&&H?"top":n)&&N?"bottom":n)&&x?"top":n)&&C?"right":n)&&H?"left":n,-1===t.className.indexOf(n)&&(t.className=t.className.replace(/\b(top|bottom|start|end)+/,O[n])),c=E?E.offsetWidth:0,d=E?E.offsetHeight:0,u=w?.8*c:c/2,"left"===n||"right"===n?(r="left"===n?v.left+g.x-f-(w?c:0):v.left+g.x+b,T?(a=v.top+g.y,s=y/2-c):L?(a=v.top+g.y-p+y,s=p-y/2-c):(a=v.top+g.y-p/2+y/2,s=p/2-(w?.9*d:d/2)),l=null):"top"!==n&&"bottom"!==n||(i&&I(e)?(a="top"===n?i.pageY-p-(w?c:d):i.pageY+d,i.clientX-f/2<0?(r=0,l=i.pageX-(w?.8*c:c/2)):i.clientX+.51*f>m?(r=m-1.009*f,l=f-(m-i.pageX)-u):(r=i.pageX-f/2,l=f/2-(w?.8*c:c/2))):(a="top"===n?v.top+g.y-p-(w?d:0):v.top+g.y+y,A?(r=0,l=v.left+b/2-(w?.8*c:c/2)):k?(r=m-f,l=f-(m-v.left)+b/2-(w?.8*c:c/2)):(r=v.left+g.x-f/2+b/2,l=f/2-(w?.8*c:c/2))),s=null),t.style.top=a+"px",t.style.left=r+"px",E.style.top=null!==s?s+"px":"",E.style.left=null!==l?l+"px":""}var R=1;function z(e,t){return e[t]||R++}var j={template:'',title:null,content:null,sanitizeFn:null,dismissible:!1,trigger:"hover",animation:"fade",placement:"top",delay:200};function X(e,t){var n,o,d,u,p=/(iPhone|iPod|iPad)/.test(navigator.userAgent),m=c("show.bs.popover"),h=c("shown.bs.popover"),b=c("hide.bs.popover"),y=c("hidden.bs.popover"),w=null,T={},A=!0,k=null;function L(e){null!==w&&e.target===r(".btn-close",w)&&n.hide()}function N(e){w&&W(o,w,T.placement,T.container,e)}function C(){null===w&&o.focus()}function x(){null===w&&n.show()}function H(){null!==w&&n.hide()}function B(){n.toggle()}function P(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function M(e){e=e?"addEventListener":"removeEventListener","hover"===T.trigger?(o[e](D,x),o[e](v[0],x),I(o)&&o[e]("mousemove",N,g),!T.dismissible&&o[e](v[1],H)):"click"===T.trigger?o[e](T.trigger,B):"focus"===T.trigger&&(p&&o[e]("click",C),o[e]("focusin",x))}function S(e){e=e?"addEventListener":"removeEventListener",T.dismissible?document[e]("click",L):("focus"===T.trigger&&o[e]("focusout",H),"hover"===T.trigger&&document[e]("touchstart",P,g)),I(o)||(window[e]("scroll",N,g),window[e]("resize",N,g))}function R(){S(1),o.dispatchEvent(h)}function X(e){S(),o.removeAttribute("aria-describedby"),T.container.removeChild(w),k=null,w=null,o.dispatchEvent(y)}var F=function(e,t){n=this,t=t||{},(o=r(e)).Popover&&o.Popover.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");j.container=i||a||document.body,(T=E(o,j,t)).content&&(u="bs-popover-"+O[T.placement],d="popover-"+(o.id||z(o)),M(1),o.Popover=n)},Y=F.prototype;return Y.toggle=function(){null===w?n.show():n.hide()},Y.show=function(){clearTimeout(k),k=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!function(){var e=T.title,t=T.content;e=e?e.trim():null,t=t?t.trim():null,T.sanitizeFn&&(e=e?T.sanitizeFn(e):null,t=t?T.sanitizeFn(t):null),(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var n=document.createElement("div");n.innerHTML=T.template.trim(),w.className=n.firstChild.className,w.innerHTML=n.firstChild.innerHTML;var i=r(".popover-header",w),a=r(".popover-body",w);e=T.dismissible&&e?e+'':e,t=T.dismissible&&null===e?NaN:t,e&&i&&(i.innerHTML=e.trim()),t&&a&&(a.innerHTML=t.trim()),T.container.appendChild(w),w.style.display="block",!s(w,"popover")&&f(w,"popover"),!s(w,T.animation)&&f(w,T.animation),!s(w,u)&&f(w,u)}(),N(),!s(w,"show")&&f(w,"show"),T.animation?a(w,R):R()}}),17)},Y.hide=function(){clearTimeout(k),k=setTimeout((function(){if(w&&null!==w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),T.animation?a(w,X):X()}}),T.delay+50)},Y.enable=function(){A||(M(1),A=!A)},Y.disable=function(){A&&(null!==w&&T.animation?(n.hide(),setTimeout(M,i(w)+T.delay+17)):M(),A=!A)},Y.toggleEnabled=function(){A?n.disable():n.enable()},Y.dispose=function(){n.hide(),M(),delete o.Popover},new F(e,t)}function F(e,t){var n,o,i,a,d,u,p,m,h,v,b,w=c("activate.bs.scrollspy"),E=0,T=[],A=[];function k(){var e,t,n,o=u.getElementsByTagName("A");(b=p?d.pageYOffset:d.scrollTop,E!==o.length||L(d)!==h)&&(T=[],A=[],h=L(d),v=h-(p?window.innerHeight:i.getBoundingClientRect().height),Array.from(o).map((function(o){e=o.getAttribute("href"),(t=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&r(e))&&(T.push(o),n=t.getBoundingClientRect(),A.push((p?n.top+b:t.offsetTop)-a))})),E=T.length)}function L(e){return e.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}function N(e){Array.from(e.getElementsByTagName("A")).map((function(e){return s(e,"active")&&l(e,"active")}))}function C(e){N(u),m=e,f(e,"active");for(var t=[];e.parentNode!==document.body;)e=e.parentNode,["dropdown-menu","nav"].some((function(t){return s(e,t)}))&&t.push(e);t.map((function(e){var t=e.previousElementSibling;t&&!s(t,"active")&&f(t,"active")})),w.relatedTarget=e,i.dispatchEvent(w)}function x(e){var t=e?"addEventListener":"removeEventListener",i=H.indexOf(H.find((function(e){return e.id===n}))),a=P.indexOf(P.find((function(e){return e.id===n}))),r={id:n,self:o};e||(i>-1&&H.splice(i,1),a>-1&&P.splice(a,1)),p&&(!e||H.length)&&e||d[t]("scroll",B,g),(e&&!P.length||!e&&!P.length)&&window[t]("resize",M,g),e&&(H.push(r),P.push(r))}var H=[];function B(){H.map((function(e){return e.self.refresh()}))}var P=[];function M(){P.map((function(e){return e.self.refresh()}))}var S=function(e,t){o=this,t=t||{},(i=r(e)).ScrollSpy&&i.ScrollSpy.dispose(),u=r(t.target)||y(i),d=i.clientHeight=v){var e=T[E-1];m!==e&&C(e)}else{if(m&&b0)return m=null,void N(u);T.map((function(e,t){m!==e&&b>=A[t]&&(void 0===A[t+1]||b1&&(e=t[t.length-1]):e=t[0],e}function H(){return r(x().getAttribute("href"))}function B(e){o[e=e?"addEventListener":"removeEventListener"]("click",P)}function P(e){e.preventDefault(),i=e.currentTarget,!h.isAnimating&&n.show()}var M=function(e){n=this,(o=r(e)).Tab&&o.Tab.dispose(),h=o.closest(".nav"),v=h&&r("."+N[0]+"-toggle",h),m=H(),g=t&&m.closest(".tab-content"),b=m.scrollHeight,h.isAnimating=!1,B(1),o.Tab=this},S=M.prototype;return S.show=function(){if(!s(i,"active")){if(d=r(i.getAttribute("href")),p=x(),m=H(),T.relatedTarget=i,p.dispatchEvent(T),T.defaultPrevented)return;h.isAnimating=!0,l(p,"active"),p.setAttribute("aria-selected","false"),f(i,"active"),i.setAttribute("aria-selected","true"),v&&(s(o.parentNode,"dropdown-menu")?!s(v,"active")&&f(v,"active"):s(v,"active")&&l(v,"active")),s(m,"fade")?(l(m,"show"),a(m,C)):C()}},S.dispose=function(){B(),delete o.Tab},new M(e)}function U(e,t){var n,o,i,d={animation:!0,autohide:!0,delay:500},u=c("show.bs.toast"),p=c("hide.bs.toast"),m=c("shown.bs.toast"),h=c("hidden.bs.toast"),v=null,g={};function b(){g.animation||(l(i,"showing"),f(i,"show")),i.dispatchEvent(m),g.autohide&&n.hide()}function y(){f(i,"hide"),i.dispatchEvent(h)}function w(){l(i,"show"),g.animation?(i.offsetWidth,a(i,y)):y()}function T(e){o[e=e?"addEventListener":"removeEventListener"]("click",A)}function A(){n.hide()}var k=function(e,t){n=this,t=t||{},o=r(e),i=o.closest(".toast"),o.Toast&&o.Toast.dispose(),g=E(o,d,t),T(1),o.Toast=n},L=k.prototype;return L.show=function(){if(i&&s(i,"hide")){if(i.dispatchEvent(u),u.defaultPrevented)return;f(i,"fade"),clearTimeout(v),v=setTimeout((function(){return l(i,"hide"),void(g.animation?(i.offsetWidth,f(i,"showing"),f(i,"show"),a(i,b)):b())}),10)}},L.hide=function(e){if(i&&s(i,"show")){if(i.dispatchEvent(p),p.defaultPrevented)return;clearTimeout(v),v=setTimeout(w,e?10:g.delay)}},L.dispose=function(){var e=function(){clearTimeout(v),T(),delete o.Toast};n.hide(),g.animation?a(i,e):e()},new k(e,t)}function q(e,t){var n,o,d,u,p={title:null,template:'',placement:"top",animation:"fade",delay:200,sanitizeFn:null},m=c("show.bs.tooltip"),h=c("shown.bs.tooltip"),b=c("hide.bs.tooltip"),y=c("hidden.bs.tooltip"),w=null,T=null,A=!0,k={};function L(e){w&&W(o,w,k.placement,k.container,e)}function N(e){var t=e.target;w&&w.contains(t)||t===o||o.contains(t)||n.hide()}function C(){n.show()}function x(){n.hide()}function H(e){e=e?"addEventListener":"removeEventListener",document[e]("touchstart",N,g),I(o)||(window[e]("scroll",L,g),window[e]("resize",L,g))}function B(){H(1),o.dispatchEvent(h)}function P(){H(),o.removeAttribute("aria-describedby"),k.container.removeChild(w),w=null,T=null,o.dispatchEvent(y)}function M(e){e=e?"addEventListener":"removeEventListener",I(o)&&o[e]("mousemove",L,g),o[e](D,C),o[e](v[0],C),o[e](v[1],x)}function S(e){var t=["data-original-title","title"];o.setAttribute(t[e?0:1],e||o.getAttribute(t[0])),o.removeAttribute(t[e?1:0])}var R=function(e,t){n=this,t=t||{},(o=r(e)).Tooltip&&o.Tooltip.dispose();var i=o.closest(".modal"),a=o.closest(".fixed-top")||o.closest(".fixed-bottom");p.title=o.getAttribute("title"),p.container=i||a||document.body,(k=E(o,p,t)).title&&(d="tooltip-"+(o.id||z(o)),u="bs-tooltip-"+O[k.placement],o.hasAttribute("title")&&S(k.title),M(1),o.Tooltip=n)},j=R.prototype;return j.show=function(){clearTimeout(T),T=setTimeout((function(){if(null===w){if(o.dispatchEvent(m),m.defaultPrevented)return;!1!==function(){var e=k.title.trim();if(e=k.sanitizeFn?k.sanitizeFn(e):e){(w=document.createElement("div")).setAttribute("id",d),o.setAttribute("aria-describedby","#"+d);var t=document.createElement("div");t.innerHTML=k.template.trim(),w.className=t.firstChild.className,w.innerHTML=t.firstChild.innerHTML,r(".tooltip-inner",w).innerHTML=e,w.style.left="0",w.style.top="0",w.setAttribute("role","tooltip"),!s(w,"tooltip")&&f(w,"tooltip"),!s(w,k.animation)&&f(w,k.animation),!s(w,u)&&f(w,u),k.container.appendChild(w)}}()&&(L(),!s(w,"show")&&f(w,"show"),k.animation?a(w,B):B())}}),20)},j.hide=function(){clearTimeout(T),T=setTimeout((function(){if(w&&s(w,"show")){if(o.dispatchEvent(b),b.defaultPrevented)return;l(w,"show"),k.animation?a(w,P):P()}}),k.delay)},j.toggle=function(){null===w?n.show():n.hide()},j.enable=function(){A||(M(1),A=!A)},j.disable=function(){A&&(null!==w&&k.animation?(n.hide(),setTimeout(M,i(w)+k.delay+17)):M(),A=!A)},j.toggleEnabled=function(){A?n.disable():n.enable()},j.dispose=function(){this.hide(),M(),o.hasAttribute("data-original-title")&&S(),delete o.Tooltip},new R(e,t)}var V={Alert:u,Button:h,Carousel:A,Collapse:L,Dropdown:{component:"Dropdown",selector:B,constructor:P},Modal:{component:"Modal",selector:'[data-bs-toggle="modal"]',constructor:S},Popover:{component:"Popover",selector:'[data-bs-toggle="popover"],[data-tip="popover"]',constructor:X},ScrollSpy:{component:"ScrollSpy",selector:'[data-bs-spy="scroll"]',constructor:F},Tab:{component:"Tab",selector:'[data-bs-toggle="tab"]',constructor:Y},Toast:{component:"Toast",selector:'[data-bs-dismiss="toast"]',constructor:U},Tooltip:{component:"Tooltip",selector:'[data-bs-toggle="tooltip"],[data-tip="tooltip"]',constructor:q}};function G(e,t){Array.from(t).map((function(t){return new e(t)}))}function J(e,t){Array.from(t).map((function(t){return t[e].dispose()}))}function K(e,t){for(var n in e=e instanceof Element?lookup:document,t=t?G:J,V)t(V[n].constructor,e.querySelectorAll(V[n].selector))}return document.body?K(0,1):document.addEventListener("DOMContentLoaded",(function(){return K(0,1)}),{once:!0}),{Alert:d,Button:m,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:X,ScrollSpy:F,Tab:Y,Toast:U,Tooltip:q,Callback:K,Version:"3.0.15"}})); diff --git a/src/util/getTargetElement.js b/src/util/getTargetElement.js index f55baca5..f6933825 100644 --- a/src/util/getTargetElement.js +++ b/src/util/getTargetElement.js @@ -7,5 +7,5 @@ import dataBsContainer from '../strings/dataBsContainer.js' export default function( element ){ return queryElement( element.getAttribute( dataBsTarget ) || element.getAttribute( 'href' ) ) || element.closest( element.getAttribute( dataBsParent ) ) - || queryElement( element, element.getAttribute( dataBsContainer ) ) + || queryElement( element.getAttribute( dataBsContainer ) ) } \ No newline at end of file