mdb-ui-kit
Version:
Bootstrap 5 UI KIT - 700+ components, plain JavaScript, MIT license, simple installation.
20 lines (19 loc) • 125 kB
JavaScript
/*!
* MDB5
* Version: FREE 8.2.0
*
*
* Copyright: Material Design for Bootstrap
* https://mdbootstrap.com/
*
* Read the license: https://mdbootstrap.com/general/license/
*
*
* Documentation: https://mdbootstrap.com/docs/standard/
*
* Support: https://mdbootstrap.com/support/
*
* Contact: contact@mdbootstrap.com
*
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).mdb={})}(this,(function(t){"use strict";var e=Object.defineProperty,i=(t,i,n)=>(((t,i,n)=>{i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[i]=n})(t,"symbol"!=typeof i?i+"":i,n),n);const n=(()=>{const t={};let e=1;return{set(i,n,s){void 0===i[n]&&(i[n]={key:n,id:e},e++),t[i[n].id]=s},get(e,i){if(!e||void 0===e[i])return null;const n=e[i];return n.key===i?t[n.id]:null},delete(e,i){if(void 0===e[i])return;const n=e[i];n.key===i&&(delete t[n.id],delete e[i])}}})(),s={setData(t,e,i){n.set(t,e,i)},getData:(t,e)=>n.get(t,e),removeData(t,e){n.delete(t,e)}},o=t=>{let e=t.getAttribute("data-mdb-target");if(!e||"#"===e){const i=t.getAttribute("href");e=i&&"#"!==i?i.trim():null}return e},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=(t,e,i)=>{Object.keys(i).forEach((n=>{const s=i[n],o=e[n],r=o&&l(o)?"element":null==(a=o)?`${a}`:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(s).test(r))throw new Error(`${t.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}))},d=t=>{if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){const e=getComputedStyle(t),i=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==i.display&&"hidden"!==e.visibility}return!1},u=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),f=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-mdb-no-jquery")?t:null},p=t=>{"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()};document.documentElement.dir;const m=t=>document.createElement(t),g=f(),_=/[^.]*(?=\..*)\.|.*/,b=/\..*/,v=/::\d+$/,y={};let w=1;const E={mouseenter:"mouseover",mouseleave:"mouseout"},A=["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"];function C(t,e){return e&&`${e}::${w++}`||t.uidEvent||w++}function T(t){const e=C(t);return t.uidEvent=e,y[e]=y[e]||{},y[e]}function O(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function x(t,e,i){const n="string"==typeof e,s=n?i:e;let o=t.replace(b,"");const r=E[o];r&&(o=r);return A.indexOf(o)>-1||(o=t),[n,s,o]}function L(t,e,i,n,s){if("string"!=typeof e||!t)return;i||(i=n,n=null);const[o,r,a]=x(e,i,n),l=T(t),c=l[a]||(l[a]={}),h=O(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=C(r,e.replace(_,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:e}=s;e&&e!==this;e=e.parentNode)for(let r=o.length;r--;"")if(o[r]===e)return s.delegateTarget=e,n.oneOff&&D.off(t,s.type,i),i.apply(e,[s]);return null}}(t,i,n):function(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&D.off(t,n.type,e),e.apply(t,[n])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function $(t,e,i,n,s){const o=O(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}const D={on(t,e,i,n){L(t,e,i,n,!1)},one(t,e,i,n){L(t,e,i,n,!0)},extend(t,e,i){e.forEach((e=>{D.on(t,`${e.name}.bs.${i}`,(n=>{const s={};e.parametersToCopy&&e.parametersToCopy.forEach((t=>{s[t]=n[t]}));D.trigger(t,`${e.name}.mdb.${i}`,s).defaultPrevented&&n.preventDefault()}))}))},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=x(e,i,n),a=r!==e,l=T(t),c="."===e.charAt(0);if(void 0!==o){if(!l||!l[r])return;return void $(t,l,r,o,s?i:null)}c&&Object.keys(l).forEach((i=>{!function(t,e,i,n){const s=e[i]||{};Object.keys(s).forEach((o=>{if(o.indexOf(n)>-1){const n=s[o];$(t,e,i,n.originalHandler,n.delegationSelector)}}))}(t,l,i,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((i=>{const n=i.replace(v,"");if(!a||e.indexOf(n)>-1){const e=h[i];$(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=e.replace(b,""),s=e!==n,o=A.indexOf(n)>-1;let r,a=!0,l=!0,c=!1,h=null;return s&&g&&(r=g.Event(e,i),g(t).trigger(r),a=!r.isPropagationStopped(),l=!r.isImmediatePropagationStopped(),c=r.isDefaultPrevented()),o?(h=document.createEvent("HTMLEvents"),h.initEvent(n,a,!0)):h=new CustomEvent(e,{bubbles:a,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((t=>{Object.defineProperty(h,t,{get:()=>i[t]})})),c&&h.preventDefault(),l&&t.dispatchEvent(h),h.defaultPrevented&&void 0!==r&&r.preventDefault(),h}};function k(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function N(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const M={setDataAttribute(t,e,i){t.setAttribute(`data-mdb-${N(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-mdb-${N(e)}`)},getDataAttributes(t){if(!t)return{};const e={...t.dataset};return Object.keys(e).filter((t=>t.startsWith("mdb"))).forEach((t=>{let i=t.replace(/^mdb/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=k(e[t])})),e},getDataAttribute:(t,e)=>k(t.getAttribute(`data-mdb-${N(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:t=>({top:t.offsetTop,left:t.offsetLeft}),style(t,e){Object.assign(t.style,e)},toggleClass(t,e){t&&(t.classList.contains(e)?t.classList.remove(e):t.classList.add(e))},addClass(t,e){t.classList.contains(e)||t.classList.add(e)},addStyle(t,e){Object.keys(e).forEach((i=>{t.style[i]=e[i]}))},removeClass(t,e){t.classList.contains(e)&&t.classList.remove(e)},hasClass:(t,e)=>t.classList.contains(e)},S={closest:(t,e)=>t.closest(e),matches:(t,e)=>t.matches(e),find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)this.matches(n,e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(this.matches(i,e))return[i];i=i.nextElementSibling}return[]}},I=new Map,P={set(t,e,i){I.has(t)||I.set(t,new Map);const n=I.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>I.has(t)&&I.get(t).get(e)||null,remove(t,e){if(!I.has(t))return;const i=I.get(t);i.delete(e),0===i.size&&I.delete(t)}},j="transitionend",H=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),z=t=>{t.dispatchEvent(new Event(j))},R=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),B=t=>R(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(H(t)):null,W=t=>{if(!R(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},F=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),q=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?q(t.parentNode):null},V=()=>{},Y=t=>{t.offsetHeight},U=()=>"rtl"===document.documentElement.dir,K=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,X=(t,e,i=!0)=>{if(!i)return void K(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(j,o),K(t))};e.addEventListener(j,o),setTimeout((()=>{s||z(e)}),n)},Q=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},G=/[^.]*(?=\..*)\.|.*/,Z=/\..*/,J=/::\d+$/,tt={};let et=1;const it={mouseenter:"mouseover",mouseleave:"mouseout"},nt=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function st(t,e){return e&&`${e}::${et++}`||t.uidEvent||et++}function ot(t){const e=st(t);return t.uidEvent=e,tt[e]=tt[e]||{},tt[e]}function rt(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function at(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=dt(t);return nt.has(o)||(o=t),[n,s,o]}function lt(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=at(e,i,n);if(e in it){r=(t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)})(r)}const l=ot(t),c=l[a]||(l[a]={}),h=rt(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=st(r,e.replace(G,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return ft(s,{delegateTarget:r}),n.oneOff&&ut.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return ft(n,{delegateTarget:t}),i.oneOff&&ut.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function ct(t,e,i,n,s){const o=rt(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function ht(t,e,i,n){const s=e[i]||{};for(const[o,r]of Object.entries(s))o.includes(n)&&ct(t,e,i,r.callable,r.delegationSelector)}function dt(t){return t=t.replace(Z,""),it[t]||t}const ut={on(t,e,i,n){lt(t,e,i,n,!1)},one(t,e,i,n){lt(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=at(e,i,n),a=r!==e,l=ot(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))ht(t,l,i,e.slice(1));for(const[i,n]of Object.entries(c)){const s=i.replace(J,"");a&&!e.includes(s)||ct(t,l,r,n.callable,n.delegationSelector)}}else{if(!Object.keys(c).length)return;ct(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=window.jQuery&&!document.body.hasAttribute("data-mdb-no-jquery")?window.jQuery:null;let s=null,o=!0,r=!0,a=!1;e!==dt(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const l=ft(new Event(e,{bubbles:o,cancelable:!0}),i);return a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function ft(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function pt(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function mt(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const gt={setDataAttribute(t,e,i){t.setAttribute(`data-mdb-${mt(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-mdb-${mt(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("mdb")&&!t.startsWith("mdbConfig")));for(const n of i){let i=n.replace(/^mdb/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=pt(t.dataset[n])}return e},getDataAttribute:(t,e)=>pt(t.getAttribute(`data-mdb-${mt(e)}`))};class _t{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=R(e)?gt.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...R(e)?gt.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[n,s]of Object.entries(e)){const e=t[n],o=R(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${o}" but expected type "${s}".`)}var i}}let bt=class extends _t{constructor(t,e){super(),(t=B(t))&&(this._element=t,this._config=this._getConfig(e),P.set(this._element,this.constructor.DATA_KEY,this))}dispose(){P.remove(this._element,this.constructor.DATA_KEY),ut.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){X(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return P.get(B(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}};let vt=class t extends bt{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this);"toggle"===e&&i[e]()}))}};const yt=(()=>{const t=[];return{set(e){t.push(e)},get:e=>t.includes(e)}})(),wt={set(t){yt.set(t)},get:t=>yt.get(t)},Et=t=>{if(e=t.NAME,!wt.get(e)){At(t,!0)}var e},At=(t,e=!1)=>{if(!t||wt.get(t.NAME))return;e||wt.set(t.NAME);const i=Ct[t.NAME]||null,n=(null==i?void 0:i.isToggler)||!1;var s;s=t,p((()=>{const t=f();if(t){const e=s.NAME,i=t.fn[e];t.fn[e]=s.jQueryInterface,t.fn[e].Constructor=s,t.fn[e].noConflict=()=>(t.fn[e]=i,s.jQueryInterface)}})),(null==i?void 0:i.advanced)?i.advanced(t,null==i?void 0:i.selector):n?i.callback(t,null==i?void 0:i.selector):e||S.find(null==i?void 0:i.selector).forEach((e=>{let n=t.getInstance(e);n||(n=new t(e),(null==i?void 0:i.onInit)&&n[i.onInit]())}))};let Ct;const Tt="button",Ot=`mdb.${Tt}`,xt=`.${Ot}`,Lt=`click${xt}`,$t="transitionend",Dt="mouseenter",kt="mouseleave",Nt=`hide${xt}`,Mt=`hidden${xt}`,St=`show${xt}`,It=`shown${xt}`,Pt="active",jt="fixed-action-btn";class Ht extends vt{constructor(t){super(t),this._fn={},this._element&&(s.setData(this._element,Ot,this),this._init(),M.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),Et(this.constructor))}static get NAME(){return Tt}static jQueryInterface(t,e){return this.each((function(){let i=s.getData(this,Ot);const n="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new Ht(this,n)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}get _actionButton(){return S.findOne(".fixed-action-btn:not(.smooth-scroll) > .btn-floating",this._element)}get _buttonListElements(){return S.find("ul .btn",this._element)}get _buttonList(){return S.findOne("ul",this._element)}get _isTouchDevice(){return"ontouchstart"in document.documentElement}show(){M.hasClass(this._element,jt)&&(D.off(this._buttonList,$t),D.trigger(this._element,St),this._bindListOpenTransitionEnd(),M.addStyle(this._element,{height:`${this._fullContainerHeight}px`}),this._toggleVisibility(!0))}hide(){M.hasClass(this._element,jt)&&(D.off(this._buttonList,$t),D.trigger(this._element,Nt),this._bindListHideTransitionEnd(),this._toggleVisibility(!1))}dispose(){M.hasClass(this._element,jt)&&(D.off(this._actionButton,Lt),this._actionButton.removeEventListener(Dt,this._fn.mouseenter),this._element.removeEventListener(kt,this._fn.mouseleave)),M.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_init(){M.hasClass(this._element,jt)&&(this._saveInitialHeights(),this._setInitialStyles(),this._bindInitialEvents())}_bindMouseEnter(){this._actionButton.addEventListener(Dt,this._fn.mouseenter=()=>{this._isTouchDevice||this.show()})}_bindMouseLeave(){this._element.addEventListener(kt,this._fn.mouseleave=()=>{this.hide()})}_bindClick(){D.on(this._actionButton,Lt,(()=>{M.hasClass(this._element,Pt)?this.hide():this.show()}))}_bindListHideTransitionEnd(){D.on(this._buttonList,$t,(t=>{"transform"===t.propertyName&&(D.off(this._buttonList,$t),this._element.style.height=`${this._initialContainerHeight}px`,D.trigger(this._element,Mt))}))}_bindListOpenTransitionEnd(){D.on(this._buttonList,$t,(t=>{"transform"===t.propertyName&&(D.off(this._buttonList,$t),D.trigger(this._element,It))}))}_toggleVisibility(t){const e=t?"addClass":"removeClass",i=t?"translate(0)":`translateY(${this._fullContainerHeight}px)`;M.addStyle(this._buttonList,{transform:i}),this._buttonListElements&&this._buttonListElements.forEach((t=>M[e](t,"shown"))),M[e](this._element,Pt)}_getHeight(t){const e=window.getComputedStyle(t);return parseFloat(e.getPropertyValue("height"))}_saveInitialHeights(){this._initialContainerHeight=this._getHeight(this._element),this._initialListHeight=this._getHeight(this._buttonList),this._fullContainerHeight=this._initialContainerHeight+this._initialListHeight}_bindInitialEvents(){this._bindClick(),this._bindMouseEnter(),this._bindMouseLeave()}_setInitialStyles(){this._buttonList.style.marginBottom=`${this._initialContainerHeight}px`,this._buttonList.style.transform=`translateY(${this._fullContainerHeight}px)`,this._element.style.height=`${this._initialContainerHeight}px`}}const zt=t=>{let e=t.getAttribute("data-mdb-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map((t=>H(t))).join(","):null},Rt={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!F(t)&&W(t)))},getSelectorFromElement(t){const e=zt(t);return e&&Rt.findOne(e)?e:null},getElementFromSelector(t){const e=zt(t);return e?Rt.findOne(e):null},getMultipleElementsFromSelector(t){const e=zt(t);return e?Rt.find(e):[]}},Bt="backdrop",Wt="show",Ft=`mousedown.bs.${Bt}`,qt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Vt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Yt extends _t{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return qt}static get DefaultType(){return Vt}static get NAME(){return Bt}show(t){if(!this._config.isVisible)return void K(t);this._append();const e=this._getElement();this._config.isAnimated&&Y(e),e.classList.add(Wt),this._emulateAnimation((()=>{K(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Wt),this._emulateAnimation((()=>{this.dispose(),K(t)}))):K(t)}dispose(){this._isAppended&&(ut.off(this._element,Ft),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=B(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ut.on(t,Ft,(()=>{K(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){X(t,this._getElement(),this._config.isAnimated)}}const Ut=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;ut.on(document,i,`[data-mdb-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),F(this))return;const s=Rt.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Kt=".bs.focustrap",Xt=`focusin${Kt}`,Qt=`keydown.tab${Kt}`,Gt="backward",Zt={autofocus:!0,trapElement:null},Jt={autofocus:"boolean",trapElement:"element"};class te extends _t{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Zt}static get DefaultType(){return Jt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ut.off(document,Kt),ut.on(document,Xt,(t=>this._handleFocusin(t))),ut.on(document,Qt,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ut.off(document,Kt))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=Rt.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Gt?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Gt:"forward")}}const ee=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ie=".sticky-top",ne="padding-right",se="margin-right";class oe{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ne,(e=>e+t)),this._setElementAttributes(ee,ne,(e=>e+t)),this._setElementAttributes(ie,se,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ne),this._resetElementAttributes(ee,ne),this._resetElementAttributes(ie,se)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&>.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=gt.getDataAttribute(t,e);null!==i?(gt.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(R(t))e(t);else for(const i of Rt.find(t,this._element))e(i)}}const re=".bs.offcanvas",ae="show",le="showing",ce="hiding",he=`show${re}`,de=`shown${re}`,ue=`hide${re}`,fe=`hidePrevented${re}`,pe=`hidden${re}`,me=`keydown.dismiss${re}`,ge={backdrop:!0,keyboard:!0,scroll:!1},_e={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class be extends bt{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ge}static get DefaultType(){return _e}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(ut.trigger(this._element,he,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new oe).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(le);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(ae),this._element.classList.remove(le),ut.trigger(this._element,de,{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(ut.trigger(this._element,ue).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ce),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(ae,ce),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new oe).reset(),ut.trigger(this._element,pe)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Yt({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ut.trigger(this._element,fe)}:null})}_initializeFocusTrap(){return new te({trapElement:this._element})}_addEventListeners(){ut.on(this._element,me,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ut.trigger(this._element,fe))}))}static jQueryInterface(t){return this.each((function(){const e=be.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}const ve=".bs.alert",ye=`close${ve}`,we=`closed${ve}`;let Ee=class t extends bt{static get NAME(){return"alert"}close(){if(ut.trigger(this._element,ye).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),ut.trigger(this._element,we),this.dispose()}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e](this)}}))}};const Ae="alert",Ce=[{name:"close"},{name:"closed"}];class Te extends Ee{constructor(t,e={}){super(t,e),this._init(),M.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),Et(this.constructor)}dispose(){D.off(this._element,"close.bs.alert"),D.off(this._element,"closed.bs.alert"),M.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return Ae}_init(){this._bindMdbEvents()}_bindMdbEvents(){D.extend(this._element,Ce,Ae)}}const Oe=".bs.swipe",xe=`touchstart${Oe}`,Le=`touchmove${Oe}`,$e=`touchend${Oe}`,De=`pointerdown${Oe}`,ke=`pointerup${Oe}`,Ne={endCallback:null,leftCallback:null,rightCallback:null},Me={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Se extends _t{constructor(t,e){super(),this._element=t,t&&Se.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ne}static get DefaultType(){return Me}static get NAME(){return"swipe"}dispose(){ut.off(this._element,Oe)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),K(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&K(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ut.on(this._element,De,(t=>this._start(t))),ut.on(this._element,ke,(t=>this._end(t))),this._element.classList.add("pointer-event")):(ut.on(this._element,xe,(t=>this._start(t))),ut.on(this._element,Le,(t=>this._move(t))),ut.on(this._element,$e,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Ie=".bs.carousel",Pe="next",je="prev",He="left",ze="right",Re=`slide${Ie}`,Be=`slid${Ie}`,We=`keydown${Ie}`,Fe=`mouseenter${Ie}`,qe=`mouseleave${Ie}`,Ve=`dragstart${Ie}`,Ye="active",Ue=".active",Ke=".carousel-item",Xe=Ue+Ke,Qe={ArrowLeft:ze,ArrowRight:He},Ge={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Ze={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};let Je=class t extends bt{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Rt.findOne(".carousel-indicators",this._element),this._addEventListeners(),"carousel"===this._config.ride&&this.cycle()}static get Default(){return Ge}static get DefaultType(){return Ze}static get NAME(){return"carousel"}next(){this._slide(Pe)}nextWhenVisible(){!document.hidden&&W(this._element)&&this.next()}prev(){this._slide(je)}pause(){this._isSliding&&z(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ut.one(this._element,Be,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ut.one(this._element,Be,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Pe:je;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ut.on(this._element,We,(t=>this._keydown(t))),"hover"===this._config.pause&&(ut.on(this._element,Fe,(()=>this.pause())),ut.on(this._element,qe,(()=>this._maybeEnableCycle()))),this._config.touch&&Se.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of Rt.find(".carousel-item img",this._element))ut.on(e,Ve,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(He)),rightCallback:()=>this._slide(this._directionToOrder(ze)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Se(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Qe[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Rt.findOne(Ue,this._indicatorsElement);e.classList.remove(Ye),e.removeAttribute("aria-current");const i=Rt.findOne(`[data-mdb-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Ye),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-mdb-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Pe,s=e||Q(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>ut.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Re).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),Y(s),i.classList.add(l),s.classList.add(l);this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(Ye),i.classList.remove(Ye,c,l),this._isSliding=!1,r(Be)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Rt.findOne(Xe,this._element)}_getItems(){return Rt.find(Ke,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return U()?t===He?je:Pe:t===He?Pe:je}_orderToDirection(t){return U()?t===je?He:ze:t===je?ze:He}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e]()}}else i.to(e)}))}};const ti="carousel",ei=[{name:"slide",parametersToCopy:["relatedTarget","direction","from","to"]},{name:"slid",parametersToCopy:["relatedTarget","direction","from","to"]}];class ii extends Je{constructor(t,e){super(t,e),this._init(),M.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),Et(this.constructor)}dispose(){D.off(this._element,"slide.bs.carousel"),D.off(this._element,"slid.bs.carousel"),M.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return ti}_init(){this._bindMdbEvents()}_bindMdbEvents(){D.extend(this._element,ei,ti)}}const ni=".bs.modal",si=`hide${ni}`,oi=`hidePrevented${ni}`,ri=`hidden${ni}`,ai=`show${ni}`,li=`shown${ni}`,ci=`resize${ni}`,hi=`click.dismiss${ni}`,di=`mousedown.dismiss${ni}`,ui=`keydown.dismiss${ni}`,fi="modal-open",pi="show",mi="modal-static",gi={backdrop:!0,focus:!0,keyboard:!0},_i={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};let bi=class t extends bt{constructor(t,e){super(t,e),this._dialog=Rt.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new oe,this._addEventListeners()}static get Default(){return gi}static get DefaultType(){return _i}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;ut.trigger(this._element,ai,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(fi),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;ut.trigger(this._element,si).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(pi),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){ut.off(window,ni),ut.off(this._dialog,ni),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Yt({isVisible:Boolean(this._config.backdrop)&&Boolean(!this._config.modalNonInvasive),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new te({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Rt.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Y(this._element),this._element.classList.add(pi);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ut.trigger(this._element,li,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){ut.on(this._element,ui,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),ut.on(window,ci,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),ut.on(this._element,di,(t=>{ut.one(this._element,hi,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(fi),this._resetAdjustments(),this._scrollBar.reset(),ut.trigger(this._element,ri)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ut.trigger(this._element,oi).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(mi)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(mi),this._queueCallback((()=>{this._element.classList.remove(mi),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=U()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=U()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,i){return this.each((function(){const n=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](i)}}))}};const vi="modal",yi=[{name:"show",parametersToCopy:["relatedTarget"]},{name:"shown",parametersToCopy:["relatedTarget"]},{name:"hide"},{name:"hidePrevented"},{name:"hidden"}];class wi extends bi{constructor(t,e){super(t,e),this._init(),M.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),Et(this.constructor)}dispose(){D.off(this._element,"show.bs.modal"),D.off(this._element,"shown.bs.modal"),D.off(this._element,"hide.bs.modal"),D.off(this._element,"hidden.bs.modal"),D.off(this._element,"hidePrevented.bs.modal"),M.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return vi}_init(){this._bindMdbEvents()}_bindMdbEvents(){D.extend(this._element,yi,vi)}}var Ei="top",Ai="bottom",Ci="right",Ti="left",Oi="auto",xi=[Ei,Ai,Ci,Ti],Li="start",$i="end",Di="clippingParents",ki="viewport",Ni="popper",Mi="reference",Si=xi.reduce((function(t,e){return t.concat([e+"-"+Li,e+"-"+$i])}),[]),Ii=[].concat(xi,[Oi]).reduce((function(t,e){return t.concat([e,e+"-"+Li,e+"-"+$i])}),[]),Pi="beforeRead",ji="read",Hi="afterRead",zi="beforeMain",Ri="main",Bi="afterMain",Wi="beforeWrite",Fi="write",qi="afterWrite",Vi=[Pi,ji,Hi,zi,Ri,Bi,Wi,Fi,qi];function Yi(t){return t?(t.nodeName||"").toLowerCase():null}function Ui(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ki(t){return t instanceof Ui(t).Element||t instanceof Element}function Xi(t){return t instanceof Ui(t).HTMLElement||t instanceof HTMLElement}function Qi(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ui(t).ShadowRoot||t instanceof ShadowRoot)}const Gi={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];Xi(s)&&Yi(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Xi(n)&&Yi(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Zi(t){return t.split("-")[0]}var Ji=Math.max,tn=Math.min,en=Math.round;function nn(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function sn(){return!/^((?!chrome|android).)*safari/i.test(nn())}function on(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&Xi(t)&&(s=t.offsetWidth>0&&en(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&en(n.height)/t.offsetHeight||1);var r=(Ki(t)?Ui(t):window).visualViewport,a=!sn()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,d=n.height/o;return{width:h,height:d,top:c,right:l+h,bottom:c+d,left:l,x:l,y:c}}function rn(t){var e=on(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function an(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Qi(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ln(t){return Ui(t).getComputedStyle(t)}function cn(t){return["table","td","th"].indexOf(Yi(t))>=0}function hn(t){return((Ki(t)?t.ownerDocument:t.document)||window.document).documentElement}function dn(t){return"html"===Yi(t)?t:t.assignedSlot||t.parentNode||(Qi(t)?t.host:null)||hn(t)}function un(t){return Xi(t)&&"fixed"!==ln(t).position?t.offsetParent:null}function fn(t){for(var e=Ui(t),i=un(t);i&&cn(i)&&"static"===ln(i).position;)i=un(i);return i&&("html"===Yi(i)||"body"===Yi(i)&&"static"===ln(i).position)?e:i||function(t){var e=/firefox/i.test(nn());if(/Trident/i.test(nn())&&Xi(t)&&"fixed"===ln(t).position)return null;var i=dn(t);for(Qi(i)&&(i=i.host);Xi(i)&&["html","body"].indexOf(Yi(i))<0;){var n=ln(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function pn(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function mn(t,e,i){return Ji(t,tn(e,i))}function gn(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function _n(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const bn={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=Zi(i.placement),l=pn(a),c=[Ti,Ci].indexOf(a)>=0?"height":"width";if(o&&r){var h=function(t,e){return gn("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:_n(t,xi))}(s.padding,i),d=rn(o),u="y"===l?Ei:Ti,f="y"===l?Ai:Ci,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=fn(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=h[u],y=_-d[c]-h[f],w=_/2-d[c]/2+b,E=mn(v,w,y),A=l;i.modifiersData[n]=((e={})[A]=E,e.centerOffset=E-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&an(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vn(t){return t.split("-")[1]}var yn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wn(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,d=t.isFixed,u=r.x,f=void 0===u?0:u,p=r.y,m=void 0===p?0:p,g="function"==typeof h?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var _=r.hasOwnProperty("x"),b=r.hasOwnProperty("y"),v=Ti,y=Ei,w=window;if(c){var E=fn(i),A="clientHeight",C="clientWidth";if(E===Ui(i)&&"static"!==ln(E=hn(i)).position&&"absolute"===a&&(A="scrollHeight",C="scrollWidth"),s===Ei||(s===Ti||s===Ci)&&o===$i)y=Ai,m-=(d&&E===w&&w.visualViewport?w.visualViewport.height:E[A])-n.height,m*=l?1:-1;if(s===Ti||(s===Ei||s===Ai)&&o===$i)v=Ci,f-=(d&&E===w&&w.visualViewport?w.visualViewport.width:E[C])-n.width,f*=l?1:-1}var T,O=Object.assign({position:a},c&&yn),x=!0===h?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:en(i*s)/s||0,y:en(n*s)/s||0}}({x:f,y:m},Ui(i)):{x:f,y:m};return f=x.x,m=x.y,l?Object.assign({},O,((T={})[y]=b?"0":"",T[v]=_?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",T)):Object.assign({},O,((e={})[y]=b?m+"px":"",e[v]=_?f+"px":"",e.transform="",e))}const En={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:Zi(e.placement),variation:vn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,wn(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,wn(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var An={passive:!0};const Cn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Ui(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,An)})),a&&l.addEventListener("resize",i.update,An),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,An)})),a&&l.removeEventListener("resize",i.update,An)}},data:{}};var Tn={left:"right",right:"left",bottom:"top",top:"bottom"};function On(t){return t.replace(/left|right|bottom|top/g,(function(t){return Tn[t]}))}var xn={start:"end",end:"start"};function Ln(t){return t.replace(/start|end/g,(function(t){return xn[t]}))}function $n(t){var e=Ui(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Dn(t){return on(hn(t)).left+$n(t).scrollLeft}function kn(t){var e=ln(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Nn(t){return["html","body","#document"].indexOf(Yi(t))>=0?t.ownerDocument.body:Xi(t)&&kn(t)?t:Nn(dn(t))}function Mn(t,e){var i;void 0===e&&(e=[]);var n=Nn(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Ui(n),r=s?[o].concat(o.visualViewport||[],kn(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Mn(dn(r)))}function Sn(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function In(t,e,i){return e===ki?Sn(function(t,e){var i=Ui(t),n=hn(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=sn();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Dn(t),y:l}}(t,i)):Ki(e)?function(t,e){var i=on(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Sn(function(t){var e,i=hn(t),n=$n(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Ji(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Ji(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Dn(t),l=-n.scrollTop;return"rtl"===ln(s||i).direction&&(a+=Ji(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(hn(t)))}function Pn(t,e,i,n){var s="clippingParents"===e?function(t){var e=Mn(dn(t)),i=["absolute","fixed"].indexOf(ln(t).position)>=0&&Xi(t)?fn(t):t;return Ki(i)?e.filter((function(t){re