/*! * MDB5 * Version: PRO 7.3.2 * * * 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,s)=>(((t,i,s)=>{i in t?e(t,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[i]=s})(t,"symbol"!=typeof i?i+"":i,s),s);const s=(()=>{const t={};let e=1;return{set(i,s,n){void 0===i[s]&&(i[s]={key:s,id:e},e++),t[i[s].id]=n},get(e,i){if(!e||void 0===e[i])return null;const s=e[i];return s.key===i?t[s.id]:null},delete(e,i){if(void 0===e[i])return;const s=e[i];s.key===i&&(delete t[s.id],delete e[i])}}})(),n={setData(t,e,i){s.set(t,e,i)},getData:(t,e)=>s.get(t,e),removeData(t,e){s.delete(t,e)}},o=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},a=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=a(t);return e&&document.querySelector(e)?e:null},l=t=>{const e=a(t);return e?document.querySelector(e):null},h=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>h(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,d=(t,e,i)=>{Object.keys(i).forEach((s=>{const n=i[s],o=e[s],a=o&&h(o)?"element":null==(r=o)?`${r}`:{}.toString.call(r).match(/\s([a-z]+)/i)[1].toLowerCase();var r;if(!new RegExp(n).test(a))throw new Error(`${t.toUpperCase()}: Option "${s}" provided type "${a}" but expected type "${n}".`)}))},u=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},p=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),_=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-mdb-no-jquery")?t:null},m=t=>{"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t):t()},f="rtl"===document.documentElement.dir,g=t=>document.createElement(t),b=t=>{m((()=>{const e=_();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}}))},v=_(),y=/[^.]*(?=\..*)\.|.*/,x=/\..*/,w=/::\d+$/,C={};let k=1;const T={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 S(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function E(t){const e=S(t);return t.uidEvent=e,C[e]=C[e]||{},C[e]}function M(t,e,i=null){const s=Object.keys(t);for(let n=0,o=s.length;n-1||(o=t),[s,n,o]}function D(t,e,i,s,n){if("string"!=typeof e||!t)return;i||(i=s,s=null);const[o,a,r]=O(e,i,s),l=E(t),h=l[r]||(l[r]={}),c=M(h,a,o?i:null);if(c)return void(c.oneOff=c.oneOff&&n);const d=S(a,e.replace(y,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:e}=n;e&&e!==this;e=e.parentNode)for(let a=o.length;a--;"")if(o[a]===e)return n.delegateTarget=e,s.oneOff&&$.off(t,n.type,i),i.apply(e,[n]);return null}}(t,i,s):function(t,e){return function i(s){return s.delegateTarget=t,i.oneOff&&$.off(t,s.type,e),e.apply(t,[s])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=a,u.oneOff=n,u.uidEvent=d,h[d]=u,t.addEventListener(r,u,o)}function I(t,e,i,s,n){const o=M(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}const $={on(t,e,i,s){D(t,e,i,s,!1)},one(t,e,i,s){D(t,e,i,s,!0)},extend(t,e,i){e.forEach((e=>{$.on(t,`${e.name}.bs.${i}`,(s=>{const n={};e.parametersToCopy&&e.parametersToCopy.forEach((t=>{n[t]=s[t]}));$.trigger(t,`${e.name}.mdb.${i}`,n).defaultPrevented&&s.preventDefault()}))}))},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,a]=O(e,i,s),r=a!==e,l=E(t),h="."===e.charAt(0);if(void 0!==o){if(!l||!l[a])return;return void I(t,l,a,o,n?i:null)}h&&Object.keys(l).forEach((i=>{!function(t,e,i,s){const n=e[i]||{};Object.keys(n).forEach((o=>{if(o.indexOf(s)>-1){const s=n[o];I(t,e,i,s.originalHandler,s.delegationSelector)}}))}(t,l,i,e.slice(1))}));const c=l[a]||{};Object.keys(c).forEach((i=>{const s=i.replace(w,"");if(!r||e.indexOf(s)>-1){const e=c[i];I(t,l,a,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=e.replace(x,""),n=e!==s,o=A.indexOf(s)>-1;let a,r=!0,l=!0,h=!1,c=null;return n&&v&&(a=v.Event(e,i),v(t).trigger(a),r=!a.isPropagationStopped(),l=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),o?(c=document.createEvent("HTMLEvents"),c.initEvent(s,r,!0)):c=new CustomEvent(e,{bubbles:r,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((t=>{Object.defineProperty(c,t,{get:()=>i[t]})})),h&&c.preventDefault(),l&&t.dispatchEvent(c),c.defaultPrevented&&void 0!==a&&a.preventDefault(),c}},L={on(t,e,i,s){const n=e.split(" ");for(let o=0;o`-${t.toLowerCase()}`))}const R={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]=P(e[t])})),e},getDataAttribute:(t,e)=>P(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)},B={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 s=t.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&3!==s.nodeType;)this.matches(s,e)&&i.push(s),s=s.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[]}},H=new Map,W={set(t,e,i){H.has(t)||H.set(t,new Map);const s=H.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>H.has(t)&&H.get(t).get(e)||null,remove(t,e){if(!H.has(t))return;const i=H.get(t);i.delete(e),0===i.size&&H.delete(t)}},z="transitionend",F=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),V=t=>{t.dispatchEvent(new Event(z))},j=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Y=t=>j(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(F(t)):null,X=t=>{if(!j(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},K=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),U=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?U(t.parentNode):null},q=()=>{},Q=t=>{t.offsetHeight},Z=()=>"rtl"===document.documentElement.dir,G=(t,e=[],i=t)=>"function"==typeof t?t(...e):i,J=(t,e,i=!0)=>{if(!i)return void G(t);const s=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let n=!1;const o=({target:i})=>{i===e&&(n=!0,e.removeEventListener(z,o),G(t))};e.addEventListener(z,o),setTimeout((()=>{n||V(e)}),s)},tt=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},et=/[^.]*(?=\..*)\.|.*/,it=/\..*/,st=/::\d+$/,nt={};let ot=1;const at={mouseenter:"mouseover",mouseleave:"mouseout"},rt=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 lt(t,e){return e&&`${e}::${ot++}`||t.uidEvent||ot++}function ht(t){const e=lt(t);return t.uidEvent=e,nt[e]=nt[e]||{},nt[e]}function ct(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function dt(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=mt(t);return rt.has(o)||(o=t),[s,n,o]}function ut(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,a,r]=dt(e,i,s);if(e in at){a=(t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)})(a)}const l=ht(t),h=l[r]||(l[r]={}),c=ct(h,a,o?i:null);if(c)return void(c.oneOff=c.oneOff&&n);const d=lt(a,e.replace(et,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:a}=n;a&&a!==this;a=a.parentNode)for(const r of o)if(r===a)return gt(n,{delegateTarget:a}),s.oneOff&&ft.off(t,n.type,e,i),i.apply(a,[n])}}(t,i,a):function(t,e){return function i(s){return gt(s,{delegateTarget:t}),i.oneOff&&ft.off(t,s.type,e),e.apply(t,[s])}}(t,a);u.delegationSelector=o?i:null,u.callable=a,u.oneOff=n,u.uidEvent=d,h[d]=u,t.addEventListener(r,u,o)}function pt(t,e,i,s,n){const o=ct(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function _t(t,e,i,s){const n=e[i]||{};for(const[o,a]of Object.entries(n))o.includes(s)&&pt(t,e,i,a.callable,a.delegationSelector)}function mt(t){return t=t.replace(it,""),at[t]||t}const ft={on(t,e,i,s){ut(t,e,i,s,!1)},one(t,e,i,s){ut(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,a]=dt(e,i,s),r=a!==e,l=ht(t),h=l[a]||{},c=e.startsWith(".");if(void 0===o){if(c)for(const i of Object.keys(l))_t(t,l,i,e.slice(1));for(const[i,s]of Object.entries(h)){const n=i.replace(st,"");r&&!e.includes(n)||pt(t,l,a,s.callable,s.delegationSelector)}}else{if(!Object.keys(h).length)return;pt(t,l,a,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=window.jQuery&&!document.body.hasAttribute("data-mdb-no-jquery")?window.jQuery:null;let n=null,o=!0,a=!0,r=!1;e!==mt(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),a=!n.isImmediatePropagationStopped(),r=n.isDefaultPrevented());const l=gt(new Event(e,{bubbles:o,cancelable:!0}),i);return r&&l.preventDefault(),a&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function gt(t,e={}){for(const[i,s]of Object.entries(e))try{t[i]=s}catch{Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}function bt(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 vt(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const yt={setDataAttribute(t,e,i){t.setAttribute(`data-mdb-${vt(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-mdb-${vt(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("mdb")&&!t.startsWith("mdbConfig")));for(const s of i){let i=s.replace(/^mdb/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=bt(t.dataset[s])}return e},getDataAttribute:(t,e)=>bt(t.getAttribute(`data-mdb-${vt(e)}`))};let xt=class{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=j(e)?yt.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...j(e)?yt.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[s,n]of Object.entries(e)){const e=t[s],o=j(e)?"element":null==(i=e)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".`)}var i}};let wt=class extends xt{constructor(t,e){super(),(t=Y(t))&&(this._element=t,this._config=this._getConfig(e),W.set(this._element,this.constructor.DATA_KEY,this))}dispose(){W.remove(this._element,this.constructor.DATA_KEY),ft.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){J(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return W.get(Y(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 Ct=class t extends wt{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 kt=(()=>{const t=[];return{set(e){t.push(e)},get:e=>t.includes(e)}})(),Tt={set(t){kt.set(t)},get:t=>kt.get(t)},At=t=>{if(e=t.NAME,!Tt.get(e)){St(t,!0)}var e},St=(t,e=!1)=>{if(!t||Tt.get(t.NAME))return;e||Tt.set(t.NAME);const i=Et[t.NAME]||null,s=(null==i?void 0:i.isToggler)||!1;b(t),(null==i?void 0:i.advanced)?i.advanced(t,null==i?void 0:i.selector):s?i.callback(t,null==i?void 0:i.selector):e||B.find(null==i?void 0:i.selector).forEach((e=>{let s=t.getInstance(e);s||(s=new t(e),(null==i?void 0:i.onInit)&&s[i.onInit]())}))};let Et;const Mt="button",Ot=`mdb.${Mt}`,Dt=`.${Ot}`,It=`click${Dt}`,$t="transitionend",Lt="mouseenter",Pt="mouseleave",Nt=`hide${Dt}`,Rt=`hidden${Dt}`,Bt=`show${Dt}`,Ht=`shown${Dt}`,Wt="active",zt="fixed-action-btn";class Ft extends Ct{constructor(t){super(t),this._fn={},this._element&&(n.setData(this._element,Ot,this),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return Mt}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,Ot);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new Ft(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}get _actionButton(){return B.findOne(".fixed-action-btn:not(.smooth-scroll) > .btn-floating",this._element)}get _buttonListElements(){return B.find("ul .btn",this._element)}get _buttonList(){return B.findOne("ul",this._element)}get _isTouchDevice(){return"ontouchstart"in document.documentElement}show(){R.hasClass(this._element,zt)&&($.off(this._buttonList,$t),$.trigger(this._element,Bt),this._bindListOpenTransitionEnd(),R.addStyle(this._element,{height:`${this._fullContainerHeight}px`}),this._toggleVisibility(!0))}hide(){R.hasClass(this._element,zt)&&($.off(this._buttonList,$t),$.trigger(this._element,Nt),this._bindListHideTransitionEnd(),this._toggleVisibility(!1))}dispose(){R.hasClass(this._element,zt)&&($.off(this._actionButton,It),this._actionButton.removeEventListener(Lt,this._fn.mouseenter),this._element.removeEventListener(Pt,this._fn.mouseleave)),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_init(){R.hasClass(this._element,zt)&&(this._saveInitialHeights(),this._setInitialStyles(),this._bindInitialEvents())}_bindMouseEnter(){this._actionButton.addEventListener(Lt,this._fn.mouseenter=()=>{this._isTouchDevice||this.show()})}_bindMouseLeave(){this._element.addEventListener(Pt,this._fn.mouseleave=()=>{this.hide()})}_bindClick(){$.on(this._actionButton,It,(()=>{R.hasClass(this._element,Wt)?this.hide():this.show()}))}_bindListHideTransitionEnd(){$.on(this._buttonList,$t,(t=>{"transform"===t.propertyName&&($.off(this._buttonList,$t),this._element.style.height=`${this._initialContainerHeight}px`,$.trigger(this._element,Rt))}))}_bindListOpenTransitionEnd(){$.on(this._buttonList,$t,(t=>{"transform"===t.propertyName&&($.off(this._buttonList,$t),$.trigger(this._element,Ht))}))}_toggleVisibility(t){const e=t?"addClass":"removeClass",i=t?"translate(0)":`translateY(${this._fullContainerHeight}px)`;R.addStyle(this._buttonList,{transform:i}),this._buttonListElements&&this._buttonListElements.forEach((t=>R[e](t,"shown"))),R[e](this._element,Wt)}_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 Vt=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=>F(t))).join(","):null},jt={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 s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.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=>!K(t)&&X(t)))},getSelectorFromElement(t){const e=Vt(t);return e&&jt.findOne(e)?e:null},getElementFromSelector(t){const e=Vt(t);return e?jt.findOne(e):null},getMultipleElementsFromSelector(t){const e=Vt(t);return e?jt.find(e):[]}},Yt="backdrop",Xt="show",Kt=`mousedown.bs.${Yt}`,Ut={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},qt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Qt extends xt{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Ut}static get DefaultType(){return qt}static get NAME(){return Yt}show(t){if(!this._config.isVisible)return void G(t);this._append();const e=this._getElement();this._config.isAnimated&&Q(e),e.classList.add(Xt),this._emulateAnimation((()=>{G(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Xt),this._emulateAnimation((()=>{this.dispose(),G(t)}))):G(t)}dispose(){this._isAppended&&(ft.off(this._element,Kt),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=Y(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ft.on(t,Kt,(()=>{G(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){J(t,this._getElement(),this._config.isAnimated)}}const Zt=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;ft.on(document,i,`[data-mdb-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),K(this))return;const n=jt.getElementFromSelector(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))},Gt=".bs.focustrap",Jt=`focusin${Gt}`,te=`keydown.tab${Gt}`,ee="backward",ie={autofocus:!0,trapElement:null},se={autofocus:"boolean",trapElement:"element"};let ne=class extends xt{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ie}static get DefaultType(){return se}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ft.off(document,Gt),ft.on(document,Jt,(t=>this._handleFocusin(t))),ft.on(document,te,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ft.off(document,Gt))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=jt.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===ee?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?ee:"forward")}};const oe=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ae=".sticky-top",re="padding-right",le="margin-right";class he{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,re,(e=>e+t)),this._setElementAttributes(oe,re,(e=>e+t)),this._setElementAttributes(ae,le,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,re),this._resetElementAttributes(oe,re),this._resetElementAttributes(ae,le)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&yt.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=yt.getDataAttribute(t,e);null!==i?(yt.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(j(t))e(t);else for(const i of jt.find(t,this._element))e(i)}}const ce=".bs.offcanvas",de="show",ue="showing",pe="hiding",_e=`show${ce}`,me=`shown${ce}`,fe=`hide${ce}`,ge=`hidePrevented${ce}`,be=`hidden${ce}`,ve=`keydown.dismiss${ce}`,ye={backdrop:!0,keyboard:!0,scroll:!1},xe={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class we extends wt{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ye}static get DefaultType(){return xe}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(ft.trigger(this._element,_e,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new he).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ue);this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(de),this._element.classList.remove(ue),ft.trigger(this._element,me,{relatedTarget:t})}),this._element,!0)}hide(){if(!this._isShown)return;if(ft.trigger(this._element,fe).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(pe),this._backdrop.hide();this._queueCallback((()=>{this._element.classList.remove(de,pe),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new he).reset(),ft.trigger(this._element,be)}),this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Qt({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ft.trigger(this._element,ge)}:null})}_initializeFocusTrap(){return new ne({trapElement:this._element})}_addEventListeners(){ft.on(this._element,ve,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ft.trigger(this._element,ge))}))}static jQueryInterface(t){return this.each((function(){const e=we.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 Ce=".bs.swipe",ke=`touchstart${Ce}`,Te=`touchmove${Ce}`,Ae=`touchend${Ce}`,Se=`pointerdown${Ce}`,Ee=`pointerup${Ce}`,Me={endCallback:null,leftCallback:null,rightCallback:null},Oe={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};let De=class t extends xt{constructor(e,i){super(),this._element=e,e&&t.isSupported()&&(this._config=this._getConfig(i),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Me}static get DefaultType(){return Oe}static get NAME(){return"swipe"}dispose(){ft.off(this._element,Ce)}_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(),G(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&&G(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ft.on(this._element,Se,(t=>this._start(t))),ft.on(this._element,Ee,(t=>this._end(t))),this._element.classList.add("pointer-event")):(ft.on(this._element,ke,(t=>this._start(t))),ft.on(this._element,Te,(t=>this._move(t))),ft.on(this._element,Ae,(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",$e="next",Le="prev",Pe="left",Ne="right",Re=`slide${Ie}`,Be=`slid${Ie}`,He=`keydown${Ie}`,We=`mouseenter${Ie}`,ze=`mouseleave${Ie}`,Fe=`dragstart${Ie}`,Ve="active",je=".active",Ye=".carousel-item",Xe=je+Ye,Ke={ArrowLeft:Ne,ArrowRight:Pe},Ue={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},qe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};let Qe=class t extends wt{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=jt.findOne(".carousel-indicators",this._element),this._addEventListeners(),"carousel"===this._config.ride&&this.cycle()}static get Default(){return Ue}static get DefaultType(){return qe}static get NAME(){return"carousel"}next(){this._slide($e)}nextWhenVisible(){!document.hidden&&X(this._element)&&this.next()}prev(){this._slide(Le)}pause(){this._isSliding&&V(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ft.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 ft.one(this._element,Be,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?$e:Le;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ft.on(this._element,He,(t=>this._keydown(t))),"hover"===this._config.pause&&(ft.on(this._element,We,(()=>this.pause())),ft.on(this._element,ze,(()=>this._maybeEnableCycle()))),this._config.touch&&De.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of jt.find(".carousel-item img",this._element))ft.on(e,Fe,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Pe)),rightCallback:()=>this._slide(this._directionToOrder(Ne)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new De(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=Ke[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=jt.findOne(je,this._indicatorsElement);e.classList.remove(Ve),e.removeAttribute("aria-current");const i=jt.findOne(`[data-mdb-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Ve),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(),s=t===$e,n=e||tt(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),a=e=>ft.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(a(Re).defaultPrevented)return;if(!i||!n)return;const r=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",h=s?"carousel-item-next":"carousel-item-prev";n.classList.add(h),Q(n),i.classList.add(l),n.classList.add(l);this._queueCallback((()=>{n.classList.remove(l,h),n.classList.add(Ve),i.classList.remove(Ve,h,l),this._isSliding=!1,a(Be)}),i,this._isAnimated()),r&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return jt.findOne(Xe,this._element)}_getItems(){return jt.find(Ye,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Z()?t===Pe?Le:$e:t===Pe?$e:Le}_orderToDirection(t){return Z()?t===Le?Pe:Ne:t===Le?Ne:Pe}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 Ze="carousel",Ge=[{name:"slide",parametersToCopy:["relatedTarget","direction","from","to"]},{name:"slid",parametersToCopy:["relatedTarget","direction","from","to"]}];class Je extends Qe{constructor(t,e){super(t,e),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._element,"slide.bs.carousel"),$.off(this._element,"slid.bs.carousel"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return Ze}_init(){this._bindMdbEvents()}_bindMdbEvents(){$.extend(this._element,Ge,Ze)}}var ti="top",ei="bottom",ii="right",si="left",ni="auto",oi=[ti,ei,ii,si],ai="start",ri="end",li="clippingParents",hi="viewport",ci="popper",di="reference",ui=oi.reduce((function(t,e){return t.concat([e+"-"+ai,e+"-"+ri])}),[]),pi=[].concat(oi,[ni]).reduce((function(t,e){return t.concat([e,e+"-"+ai,e+"-"+ri])}),[]),_i="beforeRead",mi="read",fi="afterRead",gi="beforeMain",bi="main",vi="afterMain",yi="beforeWrite",xi="write",wi="afterWrite",Ci=[_i,mi,fi,gi,bi,vi,yi,xi,wi];function ki(t){return t?(t.nodeName||"").toLowerCase():null}function Ti(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ai(t){return t instanceof Ti(t).Element||t instanceof Element}function Si(t){return t instanceof Ti(t).HTMLElement||t instanceof HTMLElement}function Ei(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ti(t).ShadowRoot||t instanceof ShadowRoot)}const Mi={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]||{},s=e.attributes[t]||{},n=e.elements[t];Si(n)&&ki(n)&&(Object.assign(n.style,i),Object.keys(s).forEach((function(t){var e=s[t];!1===e?n.removeAttribute(t):n.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 s=e.elements[t],n=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Si(s)&&ki(s)&&(Object.assign(s.style,o),Object.keys(n).forEach((function(t){s.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Oi(t){return t.split("-")[0]}var Di=Math.max,Ii=Math.min,$i=Math.round;function Li(){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 Pi(){return!/^((?!chrome|android).)*safari/i.test(Li())}function Ni(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=t.getBoundingClientRect(),n=1,o=1;e&&Si(t)&&(n=t.offsetWidth>0&&$i(s.width)/t.offsetWidth||1,o=t.offsetHeight>0&&$i(s.height)/t.offsetHeight||1);var a=(Ai(t)?Ti(t):window).visualViewport,r=!Pi()&&i,l=(s.left+(r&&a?a.offsetLeft:0))/n,h=(s.top+(r&&a?a.offsetTop:0))/o,c=s.width/n,d=s.height/o;return{width:c,height:d,top:h,right:l+c,bottom:h+d,left:l,x:l,y:h}}function Ri(t){var e=Ni(t),i=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:s}}function Bi(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&Ei(i)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function Hi(t){return Ti(t).getComputedStyle(t)}function Wi(t){return["table","td","th"].indexOf(ki(t))>=0}function zi(t){return((Ai(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fi(t){return"html"===ki(t)?t:t.assignedSlot||t.parentNode||(Ei(t)?t.host:null)||zi(t)}function Vi(t){return Si(t)&&"fixed"!==Hi(t).position?t.offsetParent:null}function ji(t){for(var e=Ti(t),i=Vi(t);i&&Wi(i)&&"static"===Hi(i).position;)i=Vi(i);return i&&("html"===ki(i)||"body"===ki(i)&&"static"===Hi(i).position)?e:i||function(t){var e=/firefox/i.test(Li());if(/Trident/i.test(Li())&&Si(t)&&"fixed"===Hi(t).position)return null;var i=Fi(t);for(Ei(i)&&(i=i.host);Si(i)&&["html","body"].indexOf(ki(i))<0;){var s=Hi(i);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||e&&"filter"===s.willChange||e&&s.filter&&"none"!==s.filter)return i;i=i.parentNode}return null}(t)||e}function Yi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Xi(t,e,i){return Di(t,Ii(e,i))}function Ki(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Ui(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const qi={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,s=t.name,n=t.options,o=i.elements.arrow,a=i.modifiersData.popperOffsets,r=Oi(i.placement),l=Yi(r),h=[si,ii].indexOf(r)>=0?"height":"width";if(o&&a){var c=function(t,e){return Ki("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ui(t,oi))}(n.padding,i),d=Ri(o),u="y"===l?ti:si,p="y"===l?ei:ii,_=i.rects.reference[h]+i.rects.reference[l]-a[l]-i.rects.popper[h],m=a[l]-i.rects.reference[l],f=ji(o),g=f?"y"===l?f.clientHeight||0:f.clientWidth||0:0,b=_/2-m/2,v=c[u],y=g-d[h]-c[p],x=g/2-d[h]/2+b,w=Xi(v,x,y),C=l;i.modifiersData[s]=((e={})[C]=w,e.centerOffset=w-x,e)}},effect:function(t){var e=t.state,i=t.options.element,s=void 0===i?"[data-popper-arrow]":i;null!=s&&("string"!=typeof s||(s=e.elements.popper.querySelector(s)))&&Bi(e.elements.popper,s)&&(e.elements.arrow=s)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qi(t){return t.split("-")[1]}var Zi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gi(t){var e,i=t.popper,s=t.popperRect,n=t.placement,o=t.variation,a=t.offsets,r=t.position,l=t.gpuAcceleration,h=t.adaptive,c=t.roundOffsets,d=t.isFixed,u=a.x,p=void 0===u?0:u,_=a.y,m=void 0===_?0:_,f="function"==typeof c?c({x:p,y:m}):{x:p,y:m};p=f.x,m=f.y;var g=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),v=si,y=ti,x=window;if(h){var w=ji(i),C="clientHeight",k="clientWidth";if(w===Ti(i)&&"static"!==Hi(w=zi(i)).position&&"absolute"===r&&(C="scrollHeight",k="scrollWidth"),n===ti||(n===si||n===ii)&&o===ri)y=ei,m-=(d&&w===x&&x.visualViewport?x.visualViewport.height:w[C])-s.height,m*=l?1:-1;if(n===si||(n===ti||n===ei)&&o===ri)v=ii,p-=(d&&w===x&&x.visualViewport?x.visualViewport.width:w[k])-s.width,p*=l?1:-1}var T,A=Object.assign({position:r},h&&Zi),S=!0===c?function(t,e){var i=t.x,s=t.y,n=e.devicePixelRatio||1;return{x:$i(i*n)/n||0,y:$i(s*n)/n||0}}({x:p,y:m},Ti(i)):{x:p,y:m};return p=S.x,m=S.y,l?Object.assign({},A,((T={})[y]=b?"0":"",T[v]=g?"0":"",T.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",T)):Object.assign({},A,((e={})[y]=b?m+"px":"",e[v]=g?p+"px":"",e.transform="",e))}const Ji={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,s=i.gpuAcceleration,n=void 0===s||s,o=i.adaptive,a=void 0===o||o,r=i.roundOffsets,l=void 0===r||r,h={placement:Oi(e.placement),variation:Qi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Gi(Object.assign({},h,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Gi(Object.assign({},h,{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 ts={passive:!0};const es={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,s=t.options,n=s.scroll,o=void 0===n||n,a=s.resize,r=void 0===a||a,l=Ti(e.elements.popper),h=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&h.forEach((function(t){t.addEventListener("scroll",i.update,ts)})),r&&l.addEventListener("resize",i.update,ts),function(){o&&h.forEach((function(t){t.removeEventListener("scroll",i.update,ts)})),r&&l.removeEventListener("resize",i.update,ts)}},data:{}};var is={left:"right",right:"left",bottom:"top",top:"bottom"};function ss(t){return t.replace(/left|right|bottom|top/g,(function(t){return is[t]}))}var ns={start:"end",end:"start"};function os(t){return t.replace(/start|end/g,(function(t){return ns[t]}))}function as(t){var e=Ti(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function rs(t){return Ni(zi(t)).left+as(t).scrollLeft}function ls(t){var e=Hi(t),i=e.overflow,s=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+s)}function hs(t){return["html","body","#document"].indexOf(ki(t))>=0?t.ownerDocument.body:Si(t)&&ls(t)?t:hs(Fi(t))}function cs(t,e){var i;void 0===e&&(e=[]);var s=hs(t),n=s===(null==(i=t.ownerDocument)?void 0:i.body),o=Ti(s),a=n?[o].concat(o.visualViewport||[],ls(s)?s:[]):s,r=e.concat(a);return n?r:r.concat(cs(Fi(a)))}function ds(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function us(t,e,i){return e===hi?ds(function(t,e){var i=Ti(t),s=zi(t),n=i.visualViewport,o=s.clientWidth,a=s.clientHeight,r=0,l=0;if(n){o=n.width,a=n.height;var h=Pi();(h||!h&&"fixed"===e)&&(r=n.offsetLeft,l=n.offsetTop)}return{width:o,height:a,x:r+rs(t),y:l}}(t,i)):Ai(e)?function(t,e){var i=Ni(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):ds(function(t){var e,i=zi(t),s=as(t),n=null==(e=t.ownerDocument)?void 0:e.body,o=Di(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=Di(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),r=-s.scrollLeft+rs(t),l=-s.scrollTop;return"rtl"===Hi(n||i).direction&&(r+=Di(i.clientWidth,n?n.clientWidth:0)-o),{width:o,height:a,x:r,y:l}}(zi(t)))}function ps(t,e,i,s){var n="clippingParents"===e?function(t){var e=cs(Fi(t)),i=["absolute","fixed"].indexOf(Hi(t).position)>=0&&Si(t)?ji(t):t;return Ai(i)?e.filter((function(t){return Ai(t)&&Bi(t,i)&&"body"!==ki(t)})):[]}(t):[].concat(e),o=[].concat(n,[i]),a=o[0],r=o.reduce((function(e,i){var n=us(t,i,s);return e.top=Di(n.top,e.top),e.right=Ii(n.right,e.right),e.bottom=Ii(n.bottom,e.bottom),e.left=Di(n.left,e.left),e}),us(t,a,s));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function _s(t){var e,i=t.reference,s=t.element,n=t.placement,o=n?Oi(n):null,a=n?Qi(n):null,r=i.x+i.width/2-s.width/2,l=i.y+i.height/2-s.height/2;switch(o){case ti:e={x:r,y:i.y-s.height};break;case ei:e={x:r,y:i.y+i.height};break;case ii:e={x:i.x+i.width,y:l};break;case si:e={x:i.x-s.width,y:l};break;default:e={x:i.x,y:i.y}}var h=o?Yi(o):null;if(null!=h){var c="y"===h?"height":"width";switch(a){case ai:e[h]=e[h]-(i[c]/2-s[c]/2);break;case ri:e[h]=e[h]+(i[c]/2-s[c]/2)}}return e}function ms(t,e){void 0===e&&(e={});var i=e,s=i.placement,n=void 0===s?t.placement:s,o=i.strategy,a=void 0===o?t.strategy:o,r=i.boundary,l=void 0===r?li:r,h=i.rootBoundary,c=void 0===h?hi:h,d=i.elementContext,u=void 0===d?ci:d,p=i.altBoundary,_=void 0!==p&&p,m=i.padding,f=void 0===m?0:m,g=Ki("number"!=typeof f?f:Ui(f,oi)),b=u===ci?di:ci,v=t.rects.popper,y=t.elements[_?b:u],x=ps(Ai(y)?y:y.contextElement||zi(t.elements.popper),l,c,a),w=Ni(t.elements.reference),C=_s({reference:w,element:v,strategy:"absolute",placement:n}),k=ds(Object.assign({},v,C)),T=u===ci?k:w,A={top:x.top-T.top+g.top,bottom:T.bottom-x.bottom+g.bottom,left:x.left-T.left+g.left,right:T.right-x.right+g.right},S=t.modifiersData.offset;if(u===ci&&S){var E=S[n];Object.keys(A).forEach((function(t){var e=[ii,ei].indexOf(t)>=0?1:-1,i=[ti,ei].indexOf(t)>=0?"y":"x";A[t]+=E[i]*e}))}return A}const fs={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var n=i.mainAxis,o=void 0===n||n,a=i.altAxis,r=void 0===a||a,l=i.fallbackPlacements,h=i.padding,c=i.boundary,d=i.rootBoundary,u=i.altBoundary,p=i.flipVariations,_=void 0===p||p,m=i.allowedAutoPlacements,f=e.options.placement,g=Oi(f),b=l||(g===f||!_?[ss(f)]:function(t){if(Oi(t)===ni)return[];var e=ss(t);return[os(t),e,os(e)]}(f)),v=[f].concat(b).reduce((function(t,i){return t.concat(Oi(i)===ni?function(t,e){void 0===e&&(e={});var i=e,s=i.placement,n=i.boundary,o=i.rootBoundary,a=i.padding,r=i.flipVariations,l=i.allowedAutoPlacements,h=void 0===l?pi:l,c=Qi(s),d=c?r?ui:ui.filter((function(t){return Qi(t)===c})):oi,u=d.filter((function(t){return h.indexOf(t)>=0}));0===u.length&&(u=d);var p=u.reduce((function(e,i){return e[i]=ms(t,{placement:i,boundary:n,rootBoundary:o,padding:a})[Oi(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}(e,{placement:i,boundary:c,rootBoundary:d,padding:h,flipVariations:_,allowedAutoPlacements:m}):i)}),[]),y=e.rects.reference,x=e.rects.popper,w=new Map,C=!0,k=v[0],T=0;T=0,O=M?"width":"height",D=ms(e,{placement:A,boundary:c,rootBoundary:d,altBoundary:u,padding:h}),I=M?E?ii:si:E?ei:ti;y[O]>x[O]&&(I=ss(I));var $=ss(I),L=[];if(o&&L.push(D[S]<=0),r&&L.push(D[I]<=0,D[$]<=0),L.every((function(t){return t}))){k=A,C=!1;break}w.set(A,L)}if(C)for(var P=function(t){var e=v.find((function(e){var i=w.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return k=e,"break"},N=_?3:1;N>0;N--){if("break"===P(N))break}e.placement!==k&&(e.modifiersData[s]._skip=!0,e.placement=k,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function gs(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function bs(t){return[ti,ii,ei,si].some((function(e){return t[e]>=0}))}const vs={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,s=e.rects.reference,n=e.rects.popper,o=e.modifiersData.preventOverflow,a=ms(e,{elementContext:"reference"}),r=ms(e,{altBoundary:!0}),l=gs(a,s),h=gs(r,n,o),c=bs(l),d=bs(h);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};const ys={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,s=t.name,n=i.offset,o=void 0===n?[0,0]:n,a=pi.reduce((function(t,i){return t[i]=function(t,e,i){var s=Oi(t),n=[si,ti].indexOf(s)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,a=o[0],r=o[1];return a=a||0,r=(r||0)*n,[si,ii].indexOf(s)>=0?{x:r,y:a}:{x:a,y:r}}(i,e.rects,o),t}),{}),r=a[e.placement],l=r.x,h=r.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=h),e.modifiersData[s]=a}};const xs={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=_s({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}};const ws={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,s=t.name,n=i.mainAxis,o=void 0===n||n,a=i.altAxis,r=void 0!==a&&a,l=i.boundary,h=i.rootBoundary,c=i.altBoundary,d=i.padding,u=i.tether,p=void 0===u||u,_=i.tetherOffset,m=void 0===_?0:_,f=ms(e,{boundary:l,rootBoundary:h,padding:d,altBoundary:c}),g=Oi(e.placement),b=Qi(e.placement),v=!b,y=Yi(g),x="x"===y?"y":"x",w=e.modifiersData.popperOffsets,C=e.rects.reference,k=e.rects.popper,T="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,A="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),S=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,E={x:0,y:0};if(w){if(o){var M,O="y"===y?ti:si,D="y"===y?ei:ii,I="y"===y?"height":"width",$=w[y],L=$+f[O],P=$-f[D],N=p?-k[I]/2:0,R=b===ai?C[I]:k[I],B=b===ai?-k[I]:-C[I],H=e.elements.arrow,W=p&&H?Ri(H):{width:0,height:0},z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},F=z[O],V=z[D],j=Xi(0,C[I],W[I]),Y=v?C[I]/2-N-j-F-A.mainAxis:R-j-F-A.mainAxis,X=v?-C[I]/2+N+j+V+A.mainAxis:B+j+V+A.mainAxis,K=e.elements.arrow&&ji(e.elements.arrow),U=K?"y"===y?K.clientTop||0:K.clientLeft||0:0,q=null!=(M=null==S?void 0:S[y])?M:0,Q=$+X-q,Z=Xi(p?Ii(L,$+Y-q-U):L,$,p?Di(P,Q):P);w[y]=Z,E[y]=Z-$}if(r){var G,J="x"===y?ti:si,tt="x"===y?ei:ii,et=w[x],it="y"===x?"height":"width",st=et+f[J],nt=et-f[tt],ot=-1!==[ti,si].indexOf(g),at=null!=(G=null==S?void 0:S[x])?G:0,rt=ot?st:et-C[it]-k[it]-at+A.altAxis,lt=ot?et+C[it]+k[it]-at-A.altAxis:nt,ht=p&&ot?(dt=Xi(rt,et,ct=lt))>ct?ct:dt:Xi(p?rt:st,et,p?lt:nt);w[x]=ht,E[x]=ht-et}var ct,dt;e.modifiersData[s]=E}},requiresIfExists:["offset"]};function Cs(t,e,i){void 0===i&&(i=!1);var s,n,o=Si(e),a=Si(e)&&function(t){var e=t.getBoundingClientRect(),i=$i(e.width)/t.offsetWidth||1,s=$i(e.height)/t.offsetHeight||1;return 1!==i||1!==s}(e),r=zi(e),l=Ni(t,a,i),h={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!i)&&(("body"!==ki(e)||ls(r))&&(h=(s=e)!==Ti(s)&&Si(s)?{scrollLeft:(n=s).scrollLeft,scrollTop:n.scrollTop}:as(s)),Si(e)?((c=Ni(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):r&&(c.x=rs(r))),{x:l.left+h.scrollLeft-c.x,y:l.top+h.scrollTop-c.y,width:l.width,height:l.height}}function ks(t){var e=new Map,i=new Set,s=[];function n(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var s=e.get(t);s&&n(s)}})),s.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||n(t)})),s}var Ts={placement:"bottom",modifiers:[],strategy:"absolute"};function As(){for(var t=arguments.length,e=new Array(t),i=0;i{const i=t.nodeName.toLowerCase();return e.includes(i)?!$s.has(i)||Boolean(Ls.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))};const Ns={allowList:Is,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Rs={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Bs={entry:"(string|element|function|null)",selector:"(string|element)"};class Hs extends xt{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ns}static get DefaultType(){return Rs}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[s,n]of Object.entries(this._config.content))this._setContent(t,n,s);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Bs)}_setContent(t,e,i){const s=jt.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?j(e)?this._putElementInTemplate(Y(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const o of n){const t=o.nodeName.toLowerCase();if(!Object.keys(e).includes(t)){o.remove();continue}const i=[].concat(...o.attributes),s=[].concat(e["*"]||[],e[t]||[]);for(const e of i)Ps(e,s)||o.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return G(t,[this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ws=new Set(["sanitize","allowList","sanitizeFn"]),zs="fade",Fs="show",Vs=".modal",js="hide.bs.modal",Ys="hover",Xs="focus",Ks={AUTO:"auto",TOP:"top",RIGHT:Z()?"left":"right",BOTTOM:"bottom",LEFT:Z()?"right":"left"},Us={allowList:Is,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},qs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};let Qs=class t extends wt{constructor(t,e){if(void 0===Ds)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Us}static get DefaultType(){return qs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ft.off(this._element.closest(Vs),js,this._hideModalHandler),this._element.getAttribute("data-mdb-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-mdb-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=ft.trigger(this._element,this.constructor.eventName("show")),e=(U(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),ft.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Fs),"ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))ft.on(n,"mouseover",q);this._queueCallback((()=>{ft.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(ft.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;if(this._getTipElement().classList.remove(Fs),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ft.off(t,"mouseover",q);this._activeTrigger.click=!1,this._activeTrigger[Xs]=!1,this._activeTrigger[Ys]=!1,this._isHovered=null;this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ft.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(zs,Fs),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(zs),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Hs({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-mdb-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(zs)}_isShown(){return this.tip&&this.tip.classList.contains(Fs)}_createPopper(t){const e=G(this._config.placement,[this,t,this._element]),i=Ks[e.toUpperCase()];return Os(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return G(t,[this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...G(this._config.popperConfig,[e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ft.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Ys?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Ys?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ft.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Xs:Ys]=!0,e._enter()})),ft.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Xs:Ys]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},ft.on(this._element.closest(Vs),js,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-mdb-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=yt.getDataAttributes(this._element);for(const i of Object.keys(e))Ws.has(i)&&delete e[i];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Y(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}};const Zs={...Qs.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Gs={...Qs.DefaultType,content:"(null|string|element|function)"};let Js=class t extends Qs{static get Default(){return Zs}static get DefaultType(){return Gs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}};const tn="popover",en=[{name:"show"},{name:"shown"},{name:"hide"},{name:"hidden"},{name:"inserted"}];class sn extends Js{constructor(t,e){super(t,e),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this.element,"show.bs.popover"),$.off(this.element,"shown.bs.popover"),$.off(this.element,"hide.bs.popover"),$.off(this.element,"hidden.bs.popover"),$.off(this.element,"inserted.bs.popover"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return tn}_init(){this._bindMdbEvents()}_bindMdbEvents(){$.extend(this._element,en,tn)}}const nn=".bs.scrollspy",on=`activate${nn}`,an=`click${nn}`,rn="active",ln="[href]",hn=".nav-link",cn=`${hn}, .nav-item > ${hn}, .list-group-item`,dn={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},un={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};let pn=class t extends wt{constructor(t,e){super(t,e),this._config.target&&(this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh())}static get Default(){return dn}static get DefaultType(){return un}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer&&this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Y(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ft.off(this._config.target,an),ft.on(this._config.target,an,ln,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=jt.find(ln,this._config.target);for(const e of t){if(!e.hash||K(e))continue;const t=jt.findOne(decodeURI(e.hash),this._element);X(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(rn),this._activateParents(t),ft.trigger(this._element,on,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))jt.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(rn);else for(const e of jt.parents(t,".nav, .list-group"))for(const t of jt.prev(e,cn))t.classList.add(rn)}_clearActiveClass(t){t.classList.remove(rn);const e=jt.find(`${ln}.${rn}`,t);for(const i of e)i.classList.remove(rn)}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);i[e]()}}))}};const _n="scrollspy",mn="activate.bs.scrollspy",fn=`activate${`.${`mdb.${_n}`}`}`,gn="collapsible-scrollspy",bn="ul",vn=`.${gn}`;class yn extends pn{constructor(t,e){super(t,e),this._collapsibles=[],this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._scrollElement,mn),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return _n}_init(){this._bindActivateEvent(),this._getCollapsibles(),0!==this._collapsibles.length&&(this._showSubsection(),this._hideSubsection())}_getHeight(t){return t.offsetHeight}_hide(t){const e=B.findOne(bn,t.parentNode);e.style.overflow="hidden",e.style.height="0px"}_show(t,e){t.style.height=e}_getCollapsibles(){const t=B.find(vn);t&&t.forEach((t=>{const e=t.parentNode,i=B.findOne(bn,e),s=i.offsetHeight;this._collapsibles.push({element:i,relatedTarget:t.getAttribute("href"),height:`${s}px`})}))}_showSubsection(){B.find(".active").filter((t=>R.hasClass(t,gn))).forEach((t=>{const e=B.findOne(bn,t.parentNode),i=this._collapsibles.find((e=>e.relatedTarget=t.getAttribute("href"))).height;this._show(e,i)}))}_hideSubsection(){B.find(vn).filter((t=>!1===R.hasClass(t,"active"))).forEach((t=>{this._hide(t)}))}_bindActivateEvent(){$.on(this._element,mn,(t=>{this._showSubsection(),this._hideSubsection(),$.trigger(this._element,fn,{relatedTarget:t.relatedTarget})}))}}const xn=".bs.tab",wn=`hide${xn}`,Cn=`hidden${xn}`,kn=`show${xn}`,Tn=`shown${xn}`,An=`keydown${xn}`,Sn="ArrowLeft",En="ArrowRight",Mn="ArrowUp",On="ArrowDown",Dn="Home",In="End",$n="active",Ln="fade",Pn="show",Nn=".dropdown-toggle",Rn=`:not(${Nn})`,Bn=`${`.nav-link${Rn}, .list-group-item${Rn}, [role="tab"]${Rn}`}, [data-mdb-tab-initialized]`;let Hn=class t extends wt{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ft.on(this._element,An,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?ft.trigger(e,wn,{relatedTarget:t}):null;ft.trigger(t,kn,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add($n),this._activate(jt.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ft.trigger(t,Tn,{relatedTarget:e})):t.classList.add(Pn)}),t,t.classList.contains(Ln))}_deactivate(t,e){if(!t)return;t.classList.remove($n),t.blur(),this._deactivate(jt.getElementFromSelector(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ft.trigger(t,Cn,{relatedTarget:e})):t.classList.remove(Pn)}),t,t.classList.contains(Ln))}_keydown(e){if(![Sn,En,Mn,On,Dn,In].includes(e.key))return;e.stopPropagation(),e.preventDefault();const i=this._getChildren().filter((t=>!K(t)));let s;if([Dn,In].includes(e.key))s=i[e.key===Dn?0:i.length-1];else{const t=[En,On].includes(e.key);s=tt(i,e.target,t,!0)}s&&(s.focus({preventScroll:!0}),t.getOrCreateInstance(s).show())}_getChildren(){return jt.find(Bn,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const i of e)this._setInitialAttributesOnChild(i)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=jt.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=jt.findOne(t,i);n&&n.classList.toggle(s,e)};s(Nn,$n),s(".dropdown-menu",Pn),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains($n)}_getInnerElement(t){return t.matches(Bn)?t:jt.findOne(Bn,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}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]()}}))}};const Wn=".mdb.tab",zn="show.bs.tab",Fn="shown.bs.tab",Vn=`show${Wn}`,jn=`shown${Wn}`,Yn=`hide${Wn}`,Xn=`hidden${Wn}`,Kn="active",Un="fade",qn="show";class Qn extends Hn{constructor(t){super(t),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._element,zn),$.off(this._element,Fn),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem();let i=null,s=null;e&&(i=$.trigger(e,"hide.bs.tab",{relatedTarget:t}),s=$.trigger(e,Yn,{relatedTarget:t}));const n=$.trigger(t,zn,{relatedTarget:e}),o=$.trigger(t,Vn,{relatedTarget:e});n.defaultPrevented||o.defaultPrevented||i&&i.defaultPrevented||s&&s.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Kn),this._activate(l(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.focus(),t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),$.trigger(t,Fn,{relatedTarget:e}),$.trigger(t,jn,{relatedTarget:e})):t.classList.add(qn)}),t,t.classList.contains(Un))}_deactivate(t,e){if(!t)return;t.classList.remove(Kn),t.blur(),this._deactivate(l(t));this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),$.trigger(t,"hidden.bs.tab",{relatedTarget:e}),$.trigger(t,Xn,{relatedTarget:e})):t.classList.remove(qn)}),t,t.classList.contains(Un))}}const Zn="tooltip",Gn=[{name:"show"},{name:"shown"},{name:"hide"},{name:"hidden"},{name:"inserted"}];let Jn=class extends Qs{constructor(t,e){super(t,e),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._element,"show.bs.tooltip"),$.off(this._element,"shown.bs.tooltip"),$.off(this._element,"hide.bs.tooltip"),$.off(this._element,"hidden.bs.tooltip"),$.off(this._element,"inserted.bs.tooltip"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return Zn}_init(){this._bindMdbEvents()}_bindMdbEvents(){$.extend(this._element,Gn,Zn)}};(()=>{var t={454:(t,e,i)=>{i.d(e,{Z:()=>o});var s=i(645),n=i.n(s)()((function(t){return t[1]}));n.push([t.id,"INPUT:-webkit-autofill,SELECT:-webkit-autofill,TEXTAREA:-webkit-autofill{animation-name:onautofillstart}INPUT:not(:-webkit-autofill),SELECT:not(:-webkit-autofill),TEXTAREA:not(:-webkit-autofill){animation-name:onautofillcancel}@keyframes onautofillstart{}@keyframes onautofillcancel{}",""]);const o=n},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,s){"string"==typeof t&&(t=[[null,t,""]]);var n={};if(s)for(var o=0;o{!function(){if("undefined"!=typeof window)try{var t=new window.CustomEvent("test",{cancelable:!0});if(t.preventDefault(),!0!==t.defaultPrevented)throw new Error("Could not prevent default")}catch(i){var e=function(t,e){var i,s;return(e=e||{}).bubbles=!!e.bubbles,e.cancelable=!!e.cancelable,(i=document.createEvent("CustomEvent")).initCustomEvent(t,e.bubbles,e.cancelable,e.detail),s=i.preventDefault,i.preventDefault=function(){s.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(t){this.defaultPrevented=!0}},i};e.prototype=window.Event.prototype,window.CustomEvent=e}}()},379:(t,e,i)=>{var s,n,o=(n={},function(t){if(void 0===n[t]){var e=document.querySelector(t);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(i){e=null}n[t]=e}return n[t]}),a=[];function r(t){for(var e=-1,i=0;i{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(379),e=i.n(t),s=i(454);function n(t){if(!t.hasAttribute("autocompleted")){t.setAttribute("autocompleted","");var e=new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!0,detail:null});t.dispatchEvent(e)||(t.value="")}}function o(t){t.hasAttribute("autocompleted")&&(t.removeAttribute("autocompleted"),t.dispatchEvent(new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!1,detail:null})))}e()(s.Z,{insert:"head",singleton:!1}),s.Z.locals,i(810),document.addEventListener("animationstart",(function(t){"onautofillstart"===t.animationName?n(t.target):o(t.target)}),!0),document.addEventListener("input",(function(t){"insertReplacementText"!==t.inputType&&"data"in t?o(t.target):n(t.target)}),!0)})()})();class to{constructor(t){(t=c(t))&&(this._element=t,n.setData(this._element,this.constructor.DATA_KEY,this))}dispose(){n.removeData(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}static getInstance(t){return n.getData(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`mdb.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const eo="active",io="form-notch",so="form-notch-leading",no="form-notch-middle",oo=`.${io}`,ao=`.${so}`,ro=`.${no}`;class lo extends to{constructor(t){super(t),this._label=null,this._labelWidth=0,this._labelMarginLeft=0,this._notchLeading=null,this._notchMiddle=null,this._notchTrailing=null,this._initiated=!1,this._helper=null,this._counter=!1,this._counterElement=null,this._maxLength=0,this._leadingIcon=null,this._element&&(this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return"input"}get input(){return B.findOne("input",this._element)||B.findOne("textarea",this._element)}init(){this._initiated||(this._getLabelData(),this._applyDivs(),this._applyNotch(),this._activate(),this._getHelper(),this._getCounter(),this._initiated=!0)}update(){this._getLabelData(),this._getNotchData(),this._applyNotch(),this._activate(),this._getHelper(),this._getCounter()}forceActive(){R.addClass(this.input,eo)}forceInactive(){R.removeClass(this.input,eo)}dispose(){this._removeBorder(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_getLabelData(){this._label=B.findOne("label",this._element),null===this._label?this._showPlaceholder():(this._getLabelWidth(),this._getLabelPositionInInputGroup(),this._toggleDefaultDatePlaceholder())}_getHelper(){this._helper=B.findOne(".form-helper",this._element)}_getCounter(){this._counter=R.getDataAttribute(this.input,"showcounter"),this._counter&&(this._maxLength=this.input.maxLength,this._showCounter())}_showCounter(){if(B.find(".form-counter",this._element).length>0)return;this._counterElement=document.createElement("div"),R.addClass(this._counterElement,"form-counter");const t=this.input.value.length;this._counterElement.innerHTML=`${t} / ${this._maxLength}`,this._helper.appendChild(this._counterElement),this._bindCounter()}_bindCounter(){$.on(this.input,"input",(()=>{const t=this.input.value.length;this._counterElement.innerHTML=`${t} / ${this._maxLength}`}))}_toggleDefaultDatePlaceholder(t=this.input){const e=t.getAttribute("type");if(!["date","time","datetime-local","month","week"].includes(e))return;document.activeElement===t||t.value?t.style.opacity=1:t.style.opacity=0}_showPlaceholder(){R.addClass(this.input,"placeholder-active")}_getNotchData(){this._notchMiddle=B.findOne(ro,this._element),this._notchLeading=B.findOne(ao,this._element)}_getLabelWidth(){this._labelWidth=.8*this._label.clientWidth+8}_getLabelPositionInInputGroup(){if(this._labelMarginLeft=0,!this._element.classList.contains("input-group"))return;const t=this.input,e=B.prev(t,".input-group-text")[0];this._labelMarginLeft=void 0===e?0:e.offsetWidth-1}_applyDivs(){const t=B.find(oo,this._element),e=g("div");R.addClass(e,io),this._notchLeading=g("div"),R.addClass(this._notchLeading,so),this._notchMiddle=g("div"),R.addClass(this._notchMiddle,no),this._notchTrailing=g("div"),R.addClass(this._notchTrailing,"form-notch-trailing"),t.length>=1||(e.append(this._notchLeading),e.append(this._notchMiddle),e.append(this._notchTrailing),this._element.append(e))}_applyNotch(){this._notchMiddle.style.width=`${this._labelWidth}px`,this._notchLeading.style.width=`${this._labelMarginLeft+9}px`,null!==this._label&&(this._label.style.marginLeft=`${this._labelMarginLeft}px`)}_removeBorder(){const t=B.findOne(oo,this._element);t&&t.remove()}_activate(t){m((()=>{if(this._getElements(t),!this._element)return;const e=t?t.target:this.input;""!==e.value&&R.addClass(e,eo),this._toggleDefaultDatePlaceholder(e)}))}_getElements(t){let e;if(t&&(this._element=t.target.parentNode,this._label=B.findOne("label",this._element),e=R.getDataAttribute(this._element,`${this.constructor.NAME}-initialized`)),e&&t&&this._label){const e=this._labelWidth;this._getLabelData(),e!==this._labelWidth&&(this._notchMiddle=B.findOne(".form-notch-middle",t.target.parentNode),this._notchLeading=B.findOne(ao,t.target.parentNode),this._applyNotch())}}_deactivate(t){const e=t?t.target:this.input;""===e.value&&e.classList.remove(eo),this._toggleDefaultDatePlaceholder(e)}static activate(t){return function(e){t._activate(e)}}static deactivate(t){return function(e){t._deactivate(e)}}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,"mdb.input");const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new lo(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const ho=".bs.collapse",co=`show${ho}`,uo=`shown${ho}`,po=`hide${ho}`,_o=`hidden${ho}`,mo="show",fo="collapse",go="collapsing",bo=`:scope .${fo} .${fo}`,vo="[data-mdb-collapse-init]",yo={parent:null,toggle:!0},xo={parent:"(null|element)",toggle:"boolean"};let wo=class t extends wt{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=jt.find(vo);for(const s of i){const t=jt.getSelectorFromElement(s),e=jt.find(t).filter((t=>t===this._element));null!==t&&e.length&&this._triggerArray.push(s)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return yo}static get DefaultType(){return xo}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((e=>t.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(ft.trigger(this._element,co).defaultPrevented)return;for(const t of e)t.hide();const i=this._getDimension();this._element.classList.remove(fo),this._element.classList.add(go),this._element.style[i]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(go),this._element.classList.add(fo,mo),this._element.style[i]="",ft.trigger(this._element,uo)}),this._element,!0),this._element.style[i]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ft.trigger(this._element,po).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Q(this._element),this._element.classList.add(go),this._element.classList.remove(fo,mo);for(const e of this._triggerArray){const t=jt.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(go),this._element.classList.add(fo),ft.trigger(this._element,_o)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(mo)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Y(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(vo);for(const e of t){const t=jt.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=jt.find(bo,this._config.parent);return jt.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(e){const i={};return"string"==typeof e&&/show|hide/.test(e)&&(i.toggle=!1),this.each((function(){const s=t.getOrCreateInstance(this,i);if("string"==typeof e){if(void 0===s[e])throw new TypeError(`No method named "${e}"`);s[e]()}}))}};const Co="collapse",ko=[{name:"show"},{name:"shown"},{name:"hide"},{name:"hidden"}];class To extends wo{constructor(t,e={}){super(t,e),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._element,"show.bs.collapse"),$.off(this._element,"shown.bs.collapse"),$.off(this._element,"hide.bs.collapse"),$.off(this._element,"hidden.bs.collapse"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return Co}_init(){this._bindMdbEvents()}_bindMdbEvents(){$.extend(this._element,ko,Co)}}const Ao="dropdown",So=".bs.dropdown",Eo="ArrowUp",Mo="ArrowDown",Oo=`hide${So}`,Do=`hidden${So}`,Io=`show${So}`,$o=`shown${So}`,Lo="show",Po="[data-mdb-dropdown-initialized]:not(.disabled):not(:disabled)",No=`${Po}.${Lo}`,Ro=".dropdown-menu",Bo=Z()?"top-end":"top-start",Ho=Z()?"top-start":"top-end",Wo=Z()?"bottom-end":"bottom-start",zo=Z()?"bottom-start":"bottom-end",Fo=Z()?"left-start":"right-start",Vo=Z()?"right-start":"left-start",jo={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Yo={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};let Xo=class t extends wt{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=jt.next(this._element,Ro)[0]||jt.prev(this._element,Ro)[0]||jt.findOne(Ro,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return jo}static get DefaultType(){return Yo}static get NAME(){return Ao}toggle(){return this._isShown()?this.hide():this.show()}show(){if(K(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ft.trigger(this._element,Io,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ft.on(t,"mouseover",q);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Lo),this._element.classList.add(Lo),ft.trigger(this._element,$o,t)}}hide(){if(K(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!ft.trigger(this._element,Oo,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ft.off(t,"mouseover",q);this._popper&&this._popper.destroy(),this._menu.classList.remove(Lo),this._element.classList.remove(Lo),this._element.setAttribute("aria-expanded","false"),yt.removeDataAttribute(this._menu,"popper"),ft.trigger(this._element,Do,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!j(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ao.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===Ds)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:j(this._config.reference)?t=Y(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=Os(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Lo)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Fo;if(t.classList.contains("dropstart"))return Vo;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--mdb-position").trim();return t.classList.contains("dropup")?e?Ho:Bo:e?zo:Wo}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(yt.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...G(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:e}){const i=jt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>X(t)));i.length&&tt(i,e,t===Mo,!i.includes(e)).focus()}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const i=jt.find(No);for(const s of i){const i=t.getInstance(s);if(!i||!1===i._config.autoClose)continue;const n=e.composedPath(),o=n.includes(i._menu);if(n.includes(i._element)||"inside"===i._config.autoClose&&!o||"outside"===i._config.autoClose&&o)continue;if(i._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const a={relatedTarget:i._element};"click"===e.type&&(a.clickEvent=e),i._completeHide(a)}}static dataApiKeydownHandler(e){const i=/input|textarea/i.test(e.target.tagName),s="Escape"===e.key,n=[Eo,Mo].includes(e.key);if(!n&&!s)return;if(i&&!s)return;e.preventDefault();const o=this.matches(Po)?this:jt.prev(this,Po)[0]||jt.next(this,Po)[0]||jt.findOne(Po,e.delegateTarget.parentNode),a=t.getOrCreateInstance(o);if(n)return e.stopPropagation(),a.show(),void a._selectMenuItem(e);a._isShown()&&(e.stopPropagation(),a.hide(),o.focus())}};const Ko="dropdown",Uo=`.${`mdb.${Ko}`}`,qo={offset:[0,2],flip:!0,boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,dropdownAnimation:"on"},Qo={offset:"(array|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",dropdownAnimation:"string"},Zo="hide.bs.dropdown",Go="hidden.bs.dropdown",Jo="show.bs.dropdown",ta="shown.bs.dropdown",ea=`hide${Uo}`,ia=`hidden${Uo}`,sa=`show${Uo}`,na=`shown${Uo}`,oa="animation",aa="fade-in",ra="fade-out";class la extends Xo{constructor(t,e){super(t,e),this._config=this._getConfig(e),this._menuStyle="",this._popperPlacement="",this._mdbPopperConfig="";const i=window.matchMedia("(prefers-reduced-motion: reduce)").matches;"on"!==this._config.dropdownAnimation||i||this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._element,Jo),$.off(this._parent,ta),$.off(this._parent,Zo),$.off(this._parent,Go),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}static get NAME(){return Ko}_init(){this._bindShowEvent(),this._bindShownEvent(),this._bindHideEvent(),this._bindHiddenEvent()}_getConfig(t){const e={...qo,...R.getDataAttributes(this._element),...t};return d(Ko,e,Qo),e}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{altBoundary:this._config.flip,boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(R.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_bindShowEvent(){$.on(this._element,Jo,(t=>{$.trigger(this._element,sa,{relatedTarget:t.relatedTarget}).defaultPrevented?t.preventDefault():this._dropdownAnimationStart("show")}))}_bindShownEvent(){$.on(this._parent,ta,(t=>{$.trigger(this._parent,na,{relatedTarget:t.relatedTarget}).defaultPrevented&&t.preventDefault()}))}_bindHideEvent(){$.on(this._parent,Zo,(t=>{$.trigger(this._parent,ea,{relatedTarget:t.relatedTarget}).defaultPrevented?t.preventDefault():(this._menuStyle=this._menu.style.cssText,this._popperPlacement=this._menu.getAttribute("data-popper-placement"),this._mdbPopperConfig=this._menu.getAttribute("data-mdb-popper"))}))}_bindHiddenEvent(){$.on(this._parent,Go,(t=>{$.trigger(this._parent,ia,{relatedTarget:t.relatedTarget}).defaultPrevented?t.preventDefault():("static"!==this._config.display&&""!==this._menuStyle&&(this._menu.style.cssText=this._menuStyle),this._menu.setAttribute("data-popper-placement",this._popperPlacement),this._menu.setAttribute("data-mdb-popper",this._mdbPopperConfig),this._dropdownAnimationStart("hide"))}))}_dropdownAnimationStart(t){if("show"===t)this._menu.classList.add(oa,aa),this._menu.classList.remove(ra);else this._menu.classList.add(oa,ra),this._menu.classList.remove(aa);this._bindAnimationEnd()}_bindAnimationEnd(){$.one(this._menu,"animationend",(()=>{this._menu.classList.remove(oa,ra,aa)}))}}const ha="ripple",ca="ripple-surface",da="ripple-wave",ua="input-wrapper",pa=[".btn",`[data-mdb-${ha}-init]`],_a="ripple-surface-unbound",ma=[0,0,0],fa=["primary","secondary","success","danger","warning","info","light","dark"],ga={rippleCentered:!1,rippleColor:"",rippleDuration:"500ms",rippleRadius:0,rippleUnbound:!1},ba={rippleCentered:"boolean",rippleColor:"string",rippleDuration:"string",rippleRadius:"number",rippleUnbound:"boolean"};class va extends to{constructor(t,e){super(t),this._options=this._getConfig(e),this._element&&(R.addClass(this._element,ca),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)),this._clickHandler=this._createRipple.bind(this),this._rippleTimer=null,this._isMinWidthSet=!1,this._rippleInSpan=!1,this.init()}static get NAME(){return ha}init(){this._addClickEvent(this._element)}dispose(){$.off(this._element,"mousedown",this._clickHandler),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_autoInit(t){pa.forEach((e=>{B.closest(t.target,e)&&(this._element=B.closest(t.target,e))}));const e=R.getDataAttributes(this._element);if(!this._element.classList.contains("btn")||!1!==e.rippleInit){if(this._options=this._getConfig(),"input"===this._element.tagName.toLowerCase()){const t=this._element.parentNode;if(this._rippleInSpan=!0,"span"===t.tagName.toLowerCase()&&t.classList.contains(ca))this._element=t;else{const e=getComputedStyle(this._element).boxShadow,i=this._element,s=document.createElement("span");i.classList.contains("btn-block")&&(s.style.display="block"),$.one(s,"mouseup",(t=>{0===t.button&&i.click()})),s.classList.add(ca,ua),R.addStyle(s,{border:0,"box-shadow":e}),t.replaceChild(s,this._element),s.appendChild(this._element),this._element=s}this._element.focus()}this._element.style.minWidth||(R.style(this._element,{"min-width":`${getComputedStyle(this._element).width}`}),this._isMinWidthSet=!0),R.addClass(this._element,ca),this._createRipple(t)}}_addClickEvent(t){$.on(t,"mousedown",this._clickHandler)}_getEventLayer(t){return{layerX:Math.round(t.clientX-t.target.getBoundingClientRect().x),layerY:Math.round(t.clientY-t.target.getBoundingClientRect().y)}}_createRipple(t){if(null===this._element)return;R.hasClass(this._element,ca)||R.addClass(this._element,ca);const{layerX:e,layerY:i}=this._getEventLayer(t),s=e,n=i,o=this._element.offsetHeight,a=this._element.offsetWidth,r=this._durationToMsNumber(this._options.rippleDuration),l={offsetX:this._options.rippleCentered?o/2:s,offsetY:this._options.rippleCentered?a/2:n,height:o,width:a},h=this._getDiameter(l),c=this._options.rippleRadius||h/2,d=.5*r,u=r-.5*r,p={left:this._options.rippleCentered?a/2-c+"px":s-c+"px",top:this._options.rippleCentered?o/2-c+"px":n-c+"px",height:`${2*this._options.rippleRadius||h}px`,width:`${2*this._options.rippleRadius||h}px`,transitionDelay:`0s, ${d}ms`,transitionDuration:`${r}ms, ${u}ms`},_=g("div");this._createHTMLRipple({wrapper:this._element,ripple:_,styles:p}),this._removeHTMLRipple({ripple:_,duration:r})}_createHTMLRipple({wrapper:t,ripple:e,styles:i}){Object.keys(i).forEach((t=>e.style[t]=i[t])),e.classList.add(da),""!==this._options.rippleColor&&(this._removeOldColorClasses(t),this._addColor(e,t)),this._toggleUnbound(t),this._appendRipple(e,t)}_removeHTMLRipple({ripple:t,duration:e}){this._rippleTimer&&(clearTimeout(this._rippleTimer),this._rippleTimer=null),this._rippleTimer=setTimeout((()=>{t&&(t.remove(),this._element&&(B.find(`.${da}`,this._element).forEach((t=>{t.remove()})),this._isMinWidthSet&&(R.style(this._element,{"min-width":""}),this._isMinWidthSet=!1),this._rippleInSpan&&this._element.classList.contains(ua)?this._removeWrapperSpan():R.removeClass(this._element,ca)))}),e)}_removeWrapperSpan(){const t=this._element.firstChild;this._element.replaceWith(t),this._element=t,this._element.focus(),this._rippleInSpan=!1}_durationToMsNumber(t){return Number(t.replace("ms","").replace("s","000"))}_getConfig(t={}){const e=R.getDataAttributes(this._element);return t={...ga,...e,...t},d(ha,t,ba),t}_getDiameter({offsetX:t,offsetY:e,height:i,width:s}){const n=e<=i/2,o=t<=s/2,a=(t,e)=>Math.sqrt(t**2+e**2),r=e===i/2&&t===s/2,l=!0===n&&!1===o,h=!0===n&&!0===o,c=!1===n&&!0===o,d=!1===n&&!1===o,u={topLeft:a(t,e),topRight:a(s-t,e),bottomLeft:a(t,i-e),bottomRight:a(s-t,i-e)};let p=0;return r||d?p=u.topLeft:c?p=u.topRight:h?p=u.bottomRight:l&&(p=u.bottomLeft),2*p}_appendRipple(t,e){e.appendChild(t),setTimeout((()=>{R.addClass(t,"active")}),50)}_toggleUnbound(t){!0===this._options.rippleUnbound?R.addClass(t,_a):t.classList.remove(_a)}_addColor(t,e){if(fa.find((t=>t===this._options.rippleColor.toLowerCase())))R.addClass(e,`${ca}-${this._options.rippleColor.toLowerCase()}`);else{const e=this._colorToRGB(this._options.rippleColor).join(","),i="rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%".split("{{color}}").join(`${e}`);t.style.backgroundImage=`radial-gradient(circle, ${i})`}}_removeOldColorClasses(t){const e=new RegExp(`${ca}-[a-z]+`,"gi");(t.classList.value.match(e)||[]).forEach((e=>{t.classList.remove(e)}))}_colorToRGB(t){return"transparent"===t.toLowerCase()?ma:"#"===t[0]?((e=t).length<7&&(e=`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`),[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16)]):(-1===t.indexOf("rgb")&&(t=function(t){const e=document.body.appendChild(document.createElement("fictum")),i="rgb(1, 2, 3)";return e.style.color=i,e.style.color!==i?ma:(e.style.color=t,e.style.color===i||""===e.style.color?ma:(t=getComputedStyle(e).color,document.body.removeChild(e),t))}(t)),0===t.indexOf("rgb")?function(t){return(t=t.match(/[.\d]+/g).map((t=>+Number(t)))).length=3,t}(t):ma);var e}static autoInitial(t){return function(e){t._autoInit(e)}}static jQueryInterface(t){return this.each((function(){return n.getData(this,"mdb.ripple")?null:new va(this,t)}))}}const ya="thumb",xa="thumb-active",wa=`.${ya}`;class Ca extends to{constructor(t){super(t),this._initiated=!1,this._thumb=null,this._element&&(this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return"range"}get rangeInput(){return B.findOne("input[type=range]",this._element)}init(){this._initiated||(this._addThumb(),this._thumbUpdate(),this._handleEvents(),this._initiated=!0)}dispose(){this._disposeEvents(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_addThumb(){const t=g("span");R.addClass(t,ya),t.innerHTML='',this._element.append(t),this._thumb=B.findOne(wa,this._element)}_handleEvents(){$.on(this.rangeInput,"mousedown",(()=>this._showThumb())),$.on(this.rangeInput,"mouseup",(()=>this._hideThumb())),$.on(this.rangeInput,"touchstart",(()=>this._showThumb())),$.on(this.rangeInput,"touchend",(()=>this._hideThumb())),$.on(this.rangeInput,"input",(()=>this._thumbUpdate()))}_disposeEvents(){$.off(this.rangeInput,"mousedown"),$.off(this.rangeInput,"mouseup"),$.off(this.rangeInput,"touchstart"),$.off(this.rangeInput,"touchend"),$.off(this.rangeInput,"input")}_showThumb(){R.addClass(this._thumb,xa)}_hideThumb(){R.removeClass(this._thumb,xa)}_thumbUpdate(){const t=this.rangeInput,e=t.value,i=t.min?t.min:0,s=t.max?t.max:100;B.findOne(".thumb-value",this._thumb).textContent=e;const n=Number(100*(e-i)/(s-i));R.style(this._thumb,{left:`calc(${n}% + (${8-.15*n}px))`})}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,"mdb.range");const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new Ca(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const ka="animation",Ta={animation:"string",animationStart:"string",animationShowOnLoad:"boolean",onStart:"(null|function)",onEnd:"(null|function)",onHide:"(null|function)",onShow:"(null|function)",animationOnScroll:"(string)",animationWindowHeight:"number",animationOffset:"(number|string)",animationDelay:"(number|string)",animationDuration:"(number|string)",animationReverse:"boolean",animationInterval:"(number|string)",animationRepeat:"(number|boolean)",animationReset:"boolean"},Aa={animation:"fade",animationStart:"onClick",animationShowOnLoad:!0,onStart:null,onEnd:null,onHide:null,onShow:null,animationOnScroll:"once",animationWindowHeight:0,animationOffset:0,animationDelay:0,animationDuration:500,animationReverse:!1,animationInterval:0,animationRepeat:!1,animationReset:!1};class Sa extends to{constructor(t,e){super(t),this._animateElement=this._getAnimateElement(),this._isFirstScroll=!0,this._repeatAnimateOnScroll=!0,this._options=this._getConfig(e),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return ka}init(){this._init()}startAnimation(){this._startAnimation()}stopAnimation(){this._clearAnimationClass()}changeAnimationType(t){this._options.animation=t}dispose(){$.off(this._element,"mousedown"),$.off(this._animateElement,"animationend"),$.off(window,"scroll"),$.off(this._element,"mouseover"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_init(){switch(this._options.animationStart){case"onHover":this._bindHoverEvents();break;case"onLoad":this._startAnimation();break;case"onScroll":this._bindScrollEvents();break;case"onClick":this._bindClickEvents()}this._bindTriggerOnEndCallback(),this._options.animationReset&&this._bindResetAnimationAfterFinish()}_getAnimateElement(){const t=R.getDataAttribute(this._element,"animation-target");return t?B.find(t)[0]:this._element}_getConfig(t){const e=R.getDataAttributes(this._animateElement);return t={...Aa,...e,...t},d(ka,t,Ta),t}_animateOnScroll(){const t=R.offset(this._animateElement).top,e=this._animateElement.offsetHeight,i=window.innerHeight,s=t+this._options.animationOffset<=i&&t+this._options.animationOffset+e>=0,n="visible"===this._animateElement.style.visibility;switch(!0){case s&&this._isFirstScroll:this._isFirstScroll=!1,this._startAnimation();break;case!s&&this._isFirstScroll:this._isFirstScroll=!1,this._hideAnimateElement();break;case s&&!n&&this._repeatAnimateOnScroll:"repeat"!==this._options.animationOnScroll&&(this._repeatAnimateOnScroll=!1),this._callback(this._options.onShow),this._showAnimateElement(),this._startAnimation();break;case!s&&n&&this._repeatAnimateOnScroll:this._hideAnimateElement(),this._clearAnimationClass(),this._callback(this._options.onHide)}}_addAnimatedClass(){R.addClass(this._animateElement,"animation"),R.addClass(this._animateElement,this._options.animation)}_clearAnimationClass(){this._animateElement.classList.remove(this._options.animation,"animation")}_removeInvisibleClass(){R.removeClass(this._animateElement,"invisible")}_startAnimation(){this._callback(this._options.onStart),this._removeInvisibleClass(),this._addAnimatedClass(),this._options.animationRepeat&&!this._options.animationInterval&&this._setAnimationRepeat(),this._options.animationReverse&&this._setAnimationReverse(),this._options.animationDelay&&this._setAnimationDelay(),this._options.animationDuration&&this._setAnimationDuration(),this._options.animationInterval&&this._setAnimationInterval()}_setAnimationReverse(){R.style(this._animateElement,{animationIterationCount:!0===this._options.animationRepeat?"infinite":"2",animationDirection:"alternate"})}_setAnimationDuration(){R.style(this._animateElement,{animationDuration:`${this._options.animationDuration}ms`})}_setAnimationDelay(){R.style(this._animateElement,{animationDelay:`${this._options.animationDelay}ms`})}_setAnimationRepeat(){R.style(this._animateElement,{animationIterationCount:!0===this._options.animationRepeat?"infinite":this._options.animationRepeat})}_setAnimationInterval(){$.on(this._animateElement,"animationend",(()=>{this._clearAnimationClass(),setTimeout((()=>{this._addAnimatedClass()}),this._options.animationInterval)}))}_hideAnimateElement(){R.style(this._animateElement,{visibility:"hidden"})}_showAnimateElement(){R.style(this._animateElement,{visibility:"visible"})}_bindResetAnimationAfterFinish(){$.on(this._animateElement,"animationend",(()=>{this._clearAnimationClass()}))}_bindTriggerOnEndCallback(){$.on(this._animateElement,"animationend",(()=>{this._callback(this._options.onEnd)}))}_bindScrollEvents(){this._options.animationShowOnLoad||this._animateOnScroll(),$.on(window,"scroll",(()=>{this._animateOnScroll()}))}_bindClickEvents(){$.on(this._element,"mousedown",(()=>{this._startAnimation()}))}_bindHoverEvents(){$.one(this._element,"mouseover",(()=>{this._startAnimation()})),$.one(this._animateElement,"animationend",(()=>{setTimeout((()=>{this._bindHoverEvents()}),100)}))}_callback(t){t instanceof Function&&t()}static autoInit(t){t._init()}static jQueryInterface(t){new Sa(this[0],t).init()}} /*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License */function Ea(){}const Ma=function(){let t=0;return function(){return t++}}();function Oa(t){return null==t}function Da(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Ia(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const $a=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function La(t,e){return $a(t)?t:e}function Pa(t,e){return void 0===t?e:t}const Na=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Ra(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function Ba(t,e,i,s){let n,o,a;if(Da(t))if(o=t.length,s)for(n=o-1;n>=0;n--)e.call(i,t[n],n);else for(n=0;nt,x:t=>t.x,y:t=>t.y};function Ka(t,e){const i=Xa[e]||(Xa[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const n of e)s+=n,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Ua(t){return t.charAt(0).toUpperCase()+t.slice(1)}const qa=t=>void 0!==t,Qa=t=>"function"==typeof t,Za=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const Ga=Math.PI,Ja=2*Ga,tr=Ja+Ga,er=Number.POSITIVE_INFINITY,ir=Ga/180,sr=Ga/2,nr=Ga/4,or=2*Ga/3,ar=Math.log10,rr=Math.sign;function lr(t){const e=Math.round(t);t=cr(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(ar(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function hr(t){return!isNaN(parseFloat(t))&&isFinite(t)}function cr(t,e,i){return Math.abs(t-e)l&&h=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function wr(t,e,i){i=i||(i=>t[i]1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const Cr=(t,e,i,s)=>wr(t,i,s?s=>t[s][e]<=i:s=>t[s][e]wr(t,i,(s=>t[s][e]>=i));const Tr=["push","pop","shift","splice","unshift"];function Ar(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(Tr.forEach((e=>{delete t[e]})),delete t._chartjs)}function Sr(t){const e=new Set;let i,s;for(i=0,s=t.length;iArray.prototype.slice.call(t));let n=!1,o=[];return function(...i){o=s(i),n||(n=!0,Er.call(window,(()=>{n=!1,t.apply(e,o)})))}}const Or=t=>"start"===t?"left":"end"===t?"right":"center",Dr=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Ir(t,e,i){const s=e.length;let n=0,o=s;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:h,max:c,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(n=yr(Math.min(Cr(r,a.axis,h).lo,i?s:Cr(e,l,a.getPixelForValue(h)).lo),0,s-1)),o=u?yr(Math.max(Cr(r,a.axis,c,!0).hi+1,i?0:Cr(e,l,a.getPixelForValue(c),!0).hi+1),n,s)-n:s-n}return{start:n,count:o}}function $r(t){const{xScale:e,yScale:i,_scaleRanges:s}=t,n={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!s)return t._scaleRanges=n,!0;const o=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==i.min||s.ymax!==i.max;return Object.assign(s,n),o}const Lr=t=>0===t||1===t,Pr=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ja/i),Nr=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ja/i)+1,Rr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*sr),easeOutSine:t=>Math.sin(t*sr),easeInOutSine:t=>-.5*(Math.cos(Ga*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Lr(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Lr(t)?t:Pr(t,.075,.3),easeOutElastic:t=>Lr(t)?t:Nr(t,.075,.3),easeInOutElastic(t){const e=.1125;return Lr(t)?t:t<.5?.5*Pr(2*t,e,.45):.5+.5*Nr(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Rr.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Rr.easeInBounce(2*t):.5*Rr.easeOutBounce(2*t-1)+.5}; /*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License */ function Br(t){return t+.5|0}const Hr=(t,e,i)=>Math.max(Math.min(t,i),e);function Wr(t){return Hr(Br(2.55*t),0,255)}function zr(t){return Hr(Br(255*t),0,255)}function Fr(t){return Hr(Br(t/2.55)/100,0,1)}function Vr(t){return Hr(Br(100*t),0,100)}const jr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Yr=[..."0123456789ABCDEF"],Xr=t=>Yr[15&t],Kr=t=>Yr[(240&t)>>4]+Yr[15&t],Ur=t=>(240&t)>>4==(15&t);function qr(t){var e=(t=>Ur(t.r)&&Ur(t.g)&&Ur(t.b)&&Ur(t.a))(t)?Xr:Kr;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Qr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Zr(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Gr(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Jr(t,e,i){const s=Zr(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function tl(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e>16&255,o>>8&255,255&o]}return t}(),rl.transparent=[0,0,0,0]);const e=rl[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const hl=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const cl=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,dl=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function ul(t,e,i){if(t){let s=tl(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=il(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function pl(t,e){return t?Object.assign(e||{},t):t}function _l(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=zr(t[3]))):(e=pl(t,{r:0,g:0,b:0,a:1})).a=zr(e.a),e}function ml(t){return"r"===t.charAt(0)?function(t){const e=hl.exec(t);let i,s,n,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?Wr(t):Hr(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?Wr(i):Hr(i,0,255)),s=255&(e[4]?Wr(s):Hr(s,0,255)),n=255&(e[6]?Wr(n):Hr(n,0,255)),{r:i,g:s,b:n,a:o}}}(t):nl(t)}class fl{constructor(t){if(t instanceof fl)return t;const e=typeof t;let i;var s,n,o;"object"===e?i=_l(t):"string"===e&&(o=(s=t).length,"#"===s[0]&&(4===o||5===o?n={r:255&17*jr[s[1]],g:255&17*jr[s[2]],b:255&17*jr[s[3]],a:5===o?17*jr[s[4]]:255}:7!==o&&9!==o||(n={r:jr[s[1]]<<4|jr[s[2]],g:jr[s[3]]<<4|jr[s[4]],b:jr[s[5]]<<4|jr[s[6]],a:9===o?jr[s[7]]<<4|jr[s[8]]:255})),i=n||ll(t)||ml(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=pl(this._rgb);return t&&(t.a=Fr(t.a)),t}set rgb(t){this._rgb=_l(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Fr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?qr(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=tl(t),i=e[0],s=Vr(e[1]),n=Vr(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${Fr(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const o=e===n?.5:e,a=2*o-1,r=i.a-s.a,l=((a*r==-1?a:(a+r)/(1+a*r))+1)/2;n=1-l,i.r=255&l*i.r+n*s.r+.5,i.g=255&l*i.g+n*s.g+.5,i.b=255&l*i.b+n*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=dl(Fr(t.r)),n=dl(Fr(t.g)),o=dl(Fr(t.b));return{r:zr(cl(s+i*(dl(Fr(e.r))-s))),g:zr(cl(n+i*(dl(Fr(e.g))-n))),b:zr(cl(o+i*(dl(Fr(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new fl(this.rgb)}alpha(t){return this._rgb.a=zr(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Br(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ul(this._rgb,2,t),this}darken(t){return ul(this._rgb,2,-t),this}saturate(t){return ul(this._rgb,1,t),this}desaturate(t){return ul(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=tl(t);i[0]=sl(i[0]+e),i=il(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function gl(t){return new fl(t)}function bl(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function vl(t){return bl(t)?t:gl(t)}function yl(t){return bl(t)?t:gl(t).saturate(.5).darken(.1).hexString()}const xl=Object.create(null),wl=Object.create(null);function Cl(t,e){if(!e)return t;const i=e.split(".");for(let s=0,n=i.length;st.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>yl(e.backgroundColor),this.hoverBorderColor=(t,e)=>yl(e.borderColor),this.hoverColor=(t,e)=>yl(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return kl(this,t,e)}get(t){return Cl(this,t)}describe(t,e){return kl(wl,t,e)}override(t,e){return kl(xl,t,e)}route(t,e,i,s){const n=Cl(this,t),o=Cl(this,i),a="_"+e;Object.defineProperties(n,{[a]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[s];return Ia(t)?Object.assign({},e,t):Pa(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Al(t,e,i,s,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),o>s&&(s=o),s}function Sl(t,e,i,s){let n=(s=s||{}).data=s.data||{},o=s.garbageCollect=s.garbageCollect||[];s.font!==e&&(n=s.data={},o=s.garbageCollect=[],s.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,h,c,d,u;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function Il(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,h;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);Oa(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l+t||0;function jl(t,e){const i={},s=Ia(e),n=s?Object.keys(e):e,o=Ia(t)?s?i=>Pa(t[i],t[e[i]]):e=>t[e]:()=>t;for(const a of n)i[a]=Vl(o(a));return i}function Yl(t){return jl(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Xl(t){return jl(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Kl(t){const e=Yl(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ul(t,e){t=t||{},e=e||Tl.font;let i=Pa(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let s=Pa(t.style,e.style);s&&!(""+s).match(zl)&&(console.warn('Invalid font style specified: "'+s+'"'),s="");const n={family:Pa(t.family,e.family),lineHeight:Fl(Pa(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:Pa(t.weight,e.weight),string:""};return n.string=function(t){return!t||Oa(t.size)||Oa(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function ql(t,e,i,s){let n,o,a,r=!0;for(n=0,o=t.length;nt[0])){qa(s)||(s=lh("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:s,_getTarget:n,override:n=>Zl([n,...t],e,i,s)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>ih(i,s,(()=>function(t,e,i,s){let n;for(const o of e)if(n=lh(th(o,t),i),qa(n))return eh(t,n)?ah(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>hh(t).includes(e),ownKeys:t=>hh(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function Gl(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Jl(t,s),setContext:e=>Gl(t,e,i,s),override:n=>Gl(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ih(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:o,_descriptors:a}=t;let r=s[e];Qa(r)&&a.isScriptable(e)&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(o,a||s),r.delete(t),eh(t,e)&&(e=ah(n._scopes,n,t,e));return e}(e,r,t,i));Da(r)&&r.length&&(r=function(t,e,i,s){const{_proxy:n,_context:o,_subProxy:a,_descriptors:r}=i;if(qa(o.index)&&s(t))e=e[o.index%e.length];else if(Ia(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=ah(s,n,t,l);e.push(Gl(i,o,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));eh(e,r)&&(r=Gl(r,n,o&&o[e],a));return r}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function Jl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:Qa(i)?i:()=>i,isIndexable:Qa(s)?s:()=>s}}const th=(t,e)=>t?t+Ua(e):e,eh=(t,e)=>Ia(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ih(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const s=i();return t[e]=s,s}function sh(t,e,i){return Qa(t)?t(e,i):t}const nh=(t,e)=>!0===t?e:"string"==typeof t?Ka(e,t):void 0;function oh(t,e,i,s,n){for(const o of e){const e=nh(i,o);if(e){t.add(e);const o=sh(e._fallback,i,n);if(qa(o)&&o!==i&&o!==s)return o}else if(!1===e&&qa(s)&&i!==s)return null}return!1}function ah(t,e,i,s){const n=e._rootScopes,o=sh(e._fallback,i,s),a=[...t,...n],r=new Set;r.add(s);let l=rh(r,a,i,o||i,s);return null!==l&&((!qa(o)||o===i||(l=rh(r,a,o,l,s),null!==l))&&Zl(Array.from(r),[""],n,o,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];if(Da(n)&&Ia(i))return i;return n}(e,i,s))))}function rh(t,e,i,s,n){for(;i;)i=oh(t,e,i,s,n);return i}function lh(t,e){for(const i of e){if(!i)continue;const e=i[t];if(qa(e))return e}}function hh(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function ch(t,e,i,s){const{iScale:n}=t,{key:o="r"}=this._parsing,a=new Array(s);let r,l,h,c;for(r=0,l=s;re"x"===t?"y":"x";function _h(t,e,i,s){const n=t.skip?e:t,o=e,a=i.skip?e:i,r=fr(o,n),l=fr(a,o);let h=r/(r+l),c=l/(r+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const d=s*h,u=s*c;return{previous:{x:o.x-d*(a.x-n.x),y:o.y-d*(a.y-n.y)},next:{x:o.x+u*(a.x-n.x),y:o.y+u*(a.y-n.y)}}}function mh(t,e="x"){const i=ph(e),s=t.length,n=Array(s).fill(0),o=Array(s);let a,r,l,h=uh(t,0);for(a=0;a!t.skip))),"monotone"===e.cubicInterpolationMode)mh(t,n);else{let i=s?t[t.length-1]:t[0];for(o=0,a=t.length;owindow.getComputedStyle(t,null);const wh=["top","right","bottom","left"];function Ch(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const o=wh[n];s[o]=parseFloat(t[e+"-"+o+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const kh=(t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot);function Th(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=xh(i),o="border-box"===n.boxSizing,a=Ch(n,"padding"),r=Ch(n,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:o}=s;let a,r,l=!1;if(kh(n,o,t.target))a=n,r=o;else{const t=e.getBoundingClientRect();a=s.clientX-t.left,r=s.clientY-t.top,l=!0}return{x:a,y:r,box:l}}(t,i),d=a.left+(c&&r.left),u=a.top+(c&&r.top);let{width:p,height:_}=e;return o&&(p-=a.width+r.width,_-=a.height+r.height),{x:Math.round((l-d)/p*i.width/s),y:Math.round((h-u)/_*i.height/s)}}const Ah=t=>Math.round(10*t)/10;function Sh(t,e,i,s){const n=xh(t),o=Ch(n,"margin"),a=yh(n.maxWidth,t,"clientWidth")||er,r=yh(n.maxHeight,t,"clientHeight")||er,l=function(t,e,i){let s,n;if(void 0===e||void 0===i){const o=vh(t);if(o){const t=o.getBoundingClientRect(),a=xh(o),r=Ch(a,"border","width"),l=Ch(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,s=yh(a.maxWidth,o,"clientWidth"),n=yh(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||er,maxHeight:n||er}}(t,e,i);let{width:h,height:c}=l;if("content-box"===n.boxSizing){const t=Ch(n,"border","width"),e=Ch(n,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-o.width),c=Math.max(0,s?Math.floor(h/s):c-o.height),h=Ah(Math.min(h,a,l.maxWidth)),c=Ah(Math.min(c,r,l.maxHeight)),h&&!c&&(c=Ah(h/2)),{width:h,height:c}}function Eh(t,e,i){const s=e||1,n=Math.floor(t.height*s),o=Math.floor(t.width*s);t.height=n/s,t.width=o/s;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||a.height!==n||a.width!==o)&&(t.currentDevicePixelRatio=s,a.height=n,a.width=o,t.ctx.setTransform(s,0,0,s,0,0),!0)}const Mh=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}return t}();function Oh(t,e){const i=function(t,e){return xh(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Dh(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ih(t,e,i,s){return{x:t.x+i*(e.x-t.x),y:"middle"===s?i<.5?t.y:e.y:"after"===s?i<1?t.y:e.y:i>0?e.y:t.y}}function $h(t,e,i,s){const n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=Dh(t,n,i),r=Dh(n,o,i),l=Dh(o,e,i),h=Dh(a,r,i),c=Dh(r,l,i);return Dh(h,c,i)}const Lh=new Map;function Ph(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=Lh.get(i);return s||(s=new Intl.NumberFormat(t,e),Lh.set(i,s)),s}(e,i).format(t)}function Nh(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Rh(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Bh(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Hh(t){return"angle"===t?{between:vr,compare:gr,normalize:br}:{between:xr,compare:(t,e)=>t-e,normalize:t=>t}}function Wh({start:t,end:e,count:i,loop:s,style:n}){return{start:t%i,end:e%i,loop:s&&(e-t+1)%i==0,style:n}}function zh(t,e,i){if(!i)return[t];const{property:s,start:n,end:o}=i,a=e.length,{compare:r,between:l,normalize:h}=Hh(s),{start:c,end:d,loop:u,style:p}=function(t,e,i){const{property:s,start:n,end:o}=i,{between:a,normalize:r}=Hh(s),l=e.length;let h,c,{start:d,end:u,loop:p}=t;if(p){for(d+=l,u+=l,h=0,c=l;hb||l(n,g,m)&&0!==r(n,g),x=()=>!b||0===r(o,m)||l(o,g,m);for(let w=c,C=c;w<=d;++w)f=e[w%a],f.skip||(m=h(f[s]),m!==g&&(b=l(m,n,o),null===v&&y()&&(v=0===r(m,n)?w:C),null!==v&&x()&&(_.push(Wh({start:v,end:w,loop:u,count:a,style:p})),v=null),C=w,g=m));return null!==v&&_.push(Wh({start:v,end:d,loop:u,count:a,style:p})),_}function Fh(t,e){const i=[],s=t.segments;for(let n=0;ns({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=Er.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let o,a=n.length-1,r=!1;for(;a>=0;--a)o=n[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),r=!0):(n[a]=n[n.length-1],n.pop());r&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const Kh="transparent",Uh={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=vl(t||Kh),n=s.valid&&vl(e||Kh);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class qh{constructor(t,e,i,s){const n=e[i];s=ql([t.to,s,n,t.from]);const o=ql([t.from,n,s]);this._active=!0,this._fn=t.fn||Uh[t.type||typeof o],this._easing=Rr[t.easing]||Rr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,o=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=ql([t.to,e,s,t.from]),this._from=ql([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,o=this._loop,a=this._to;let r;if(this._active=n!==a&&(o||e1?2-r:r,r=this._easing(Math.min(1,Math.max(0,r))),this._target[s]=this._fn(n,a,r))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Tl.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Tl.describe("animations",{_fallback:"animation"}),Tl.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class Zh{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Ia(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const s=t[i];if(!Ia(s))return;const n={};for(const t of Qh)n[t]=s[t];(Da(s.properties)&&s.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,n)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let n=0;n{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let r;for(r=o.length-1;r>=0;--r){const l=o[r];if("$"===l.charAt(0))continue;if("options"===l){s.push(...this._animateOptions(t,e));continue}const h=e[l];let c=n[l];const d=i.get(l);if(c){if(d&&c.active()){c.update(d,h,a);continue}c.cancel()}d&&d.duration?(n[l]=c=new qh(d,t,l,h),s.push(c)):t[l]=h}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Xh.add(this._chart,i),!0):void 0}}function Gh(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:s?o:n,end:s?n:o}}function Jh(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=s.length;n0||!i&&e<0)return n.index}return null}function nc(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:r}=s,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,s),d=e.length;let u;for(let p=0;pi[t].axis===e)).shift()}function ac(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i]}}}const rc=t=>"reset"===t||"none"===t,lc=(t,e)=>e?t:Object.assign({},t);class hc{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ec(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ac(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=Pa(i.xAxisID,oc(t,"x")),o=e.yAxisID=Pa(i.yAxisID,oc(t,"y")),a=e.rAxisID=Pa(i.rAxisID,oc(t,"r")),r=e.indexAxis,l=e.iAxisID=s(r,n,o,a),h=e.vAxisID=s(r,o,n,a);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ar(this._data,this),t._stacked&&ac(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Ia(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let s,n,o;for(s=0,n=e.length;s{const e="_onData"+Ua(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return s._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),n}})})))),this._syncList=[],this._data=e}var s,n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=ec(e.vScale,e),e.stack!==i.stack&&(s=!0,ac(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&nc(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:o}=i,a=n.axis;let r,l,h,c=0===t&&e===s.length||i._sorted,d=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,h=s;else{h=Da(s[t])?this.parseArrayData(i,s,t,e):Ia(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===l[a]||d&&l[a]t&&!e.hidden&&e._stacked&&{keys:Jh(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(a);let d,u;function p(){u=s[d];const e=u[a.axis];return!$a(u[t.axis])||h>e||c=0;--d)if(!p()){this.updateRangeFromParsed(l,t,u,r);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,o;for(s=0,n=e.length;s=0&&tthis.getContext(i,s)),c);return p.$shared&&(p.$shared=r,n[o]=Object.freeze(lc(p,r))),p}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,o=`animation-${e}`,a=n[o];if(a)return a;let r;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),o=s.getOptionScopes(this.getDataset(),n);r=s.createResolver(o,this.getContext(t,i,e))}const l=new Zh(s,r&&r.animations);return r&&r._cacheable&&(n[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||rc(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),o=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:o}}updateElement(t,e,i,s){rc(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!rc(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,r,l]of this._syncList)this[a](r,l);this._syncList=[];const s=i.length,n=e.length,o=Math.min(n,s);o&&this.parse(0,o),n>s?this._insertElements(s,n-s,t):n{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(r(n),a=t;at-e)))}return t._cache.$bar}(e,t.type);let s,n,o,a,r=e._length;const l=()=>{32767!==o&&-32768!==o&&(qa(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(s=0,n=i.length;sMath.abs(r)&&(l=r,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:n,end:o,min:a,max:r}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function uc(t,e,i,s){const n=t.iScale,o=t.vScale,a=n.getLabels(),r=n===o,l=[];let h,c,d,u;for(h=i,c=i+s;ht.x,i="left",s="right"):(e=t.baset.controller.options.grouped)),n=i.options.stacked,o=[],a=t=>{const i=t.controller.getParsed(e),s=i&&i[t.vScale.axis];if(Oa(s)||isNaN(s))return!0};for(const r of s)if((void 0===e||!a(r))&&((!1===n||-1===o.indexOf(r.stack)||void 0===n&&void 0===r.stack)&&o.push(r.stack),r.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,o;for(n=0,o=e.data.length;n=i?1:-1)}(c,e,o)*n,d===o&&(m-=c/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),s=Math.min(t,i),a=Math.max(t,i);m=Math.max(Math.min(m,a),s),h=m+c}if(m===e.getPixelForValue(o)){const t=rr(c)*e.getLineWidthForValue(o)/2;m+=t,c-=t}return{size:c,base:m,head:h,center:h+c/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,o=Pa(s.maxBarThickness,1/0);let a,r;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,l="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,o=n[t];let a=t>0?n[t-1]:null,r=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:s}=e,n=this.getParsed(t),o=i.getLabelForValue(n.x),a=s.getLabelForValue(n.y),r=n._custom;return{label:e.label,value:"("+o+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:r,includeOptions:l}=this._getSharedOptions(e,s),h=o.axis,c=a.axis;for(let d=e;d""}}}};class yc extends hc{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,o,a=t=>+i[t];if(Ia(i[t])){const{key:t="value"}=this._parsing;a=e=>+Ka(i[e],t)}for(n=t,o=t+e;nvr(t,r,l,!0)?1:Math.max(e,e*i,s,s*i),_=(t,e,s)=>vr(t,r,l,!0)?-1:Math.min(e,e*i,s,s*i),m=p(0,h,d),f=p(sr,c,u),g=_(Ga,h,d),b=_(Ga+sr,c,u);s=(m-g)/2,n=(f-b)/2,o=-(m+g)/2,a=-(f+b)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:a}}(u,d,r),g=(i.width-o)/p,b=(i.height-o)/_,v=Math.max(Math.min(g,b)/2,0),y=Na(this.options.radius,v),x=(y-Math.max(y*r,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*y,this.offsetY=f*y,s.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/Ja)}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.chartArea,r=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=n&&r.animateScale,d=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:p,includeOptions:_}=this._getSharedOptions(e,s);let m,f=this._getRotation();for(m=0;m0&&!isNaN(t)?Ja*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=Ph(e._parsed[t],i.options.locale);return{label:s[t]||"",value:n}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,o,a,r;if(!t)for(s=0,n=i.data.datasets.length;s"spacing"!==t,_indexable:t=>"spacing"!==t},yc.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return Da(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class xc extends hc{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:n}=e,o=this.chart._animationsDisabled;let{start:a,count:r}=Ir(e,s,o);this._drawStart=a,this._drawCount=r,$r(e)&&(a=0,r=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!n._decimated,i.points=s;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(s,a,r,t)}updateElements(t,e,i,s){const n="reset"===s,{iScale:o,vScale:a,_stacked:r,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,s),d=o.axis,u=a.axis,{spanGaps:p,segment:_}=this.options,m=hr(p)?p:Number.POSITIVE_INFINITY,f=this.chart._animationsDisabled||n||"none"===s;let g=e>0&&this.getParsed(e-1);for(let b=e;b0&&Math.abs(i[d]-g[d])>m,_&&(p.parsed=i,p.raw=l.data[b]),c&&(p.options=h||this.resolveDataElementOptions(b,e.active?"active":s)),f||this.updateElement(e,b,p,s),g=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const n=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,n,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}xc.id="line",xc.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},xc.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class wc extends hc{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],n=Ph(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:n}}parseObjectData(t,e,i,s){return ch.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach(((t,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(se.max&&(e.max=s))})),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),o=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,s){const n="reset"===s,o=this.chart,a=o.options.animation,r=this._cachedMeta.rScale,l=r.xCenter,h=r.yCenter,c=r.getIndexAngle(0)-.5*Ga;let d,u=c;const p=360/this.countVisibleElements();for(d=0;d{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++})),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?ur(this.resolveDataElementOptions(t,e).angle||i):0}}wc.id="polarArea",wc.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},wc.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,s)=>{const n=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Cc extends yc{}Cc.id="pie",Cc.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class kc extends hc{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return ch.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],n=e.iScale.getLabels();if(i.points=s,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:n.length===s.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const n=this._cachedMeta.rScale,o="reset"===s;for(let a=e;a{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}};Tc.defaults={},Tc.defaultRoutes=void 0;const Ac={values:t=>Da(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=ar(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Ph(t,s,l)},logarithmic(t,e,i){if(0===t)return"0";const s=t/Math.pow(10,Math.floor(ar(t)));return 1===s||2===s||5===s?Ac.numeric.call(this,t,e,i):""}};var Sc={formatters:Ac};function Ec(t,e){const i=t.options.ticks,s=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),s=t._length/i+(e?0:1),n=t._maxLength/i;return Math.floor(Math.min(s,n))}(t),n=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;is)return function(t,e,i,s){let n,o=0,a=i[0];for(s=Math.ceil(s),n=0;nt-e)).pop(),e}(s);for(let a=0,r=o.length-1;an)return t}return Math.max(n,1)}(n,e,s);if(o>0){let t,i;const s=o>1?Math.round((r-a)/(o-1)):null;for(Mc(e,l,h,Oa(s)?0:a-s,a),t=0,i=o-1;te.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Sc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Tl.route("scale.ticks","color","","color"),Tl.route("scale.grid","color","","borderColor"),Tl.route("scale.grid","borderColor","","borderColor"),Tl.route("scale.title","color","","color"),Tl.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Tl.describe("scales",{_fallback:"scale"}),Tl.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Oc=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Dc(t,e){const i=[],s=t.length/e,n=t.length;let o=0;for(;oa+r)))return h}function $c(t){return t.drawTicks?t.tickLength:0}function Lc(t,e){if(!t.display)return 0;const i=Ul(t.font,e),s=Kl(t.padding);return(Da(t.text)?t.text.length:1)*i.lineHeight+s.height}function Pc(t,e,i){let s=Or(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class Nc extends Tc{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=La(t,Number.POSITIVE_INFINITY),e=La(e,Number.NEGATIVE_INFINITY),i=La(i,Number.POSITIVE_INFINITY),s=La(s,Number.NEGATIVE_INFINITY),{min:La(t,i),max:La(e,s),minDefined:$a(t),maxDefined:$a(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:o}=this.getUserBounds();if(n&&o)return{min:i,max:s};const a=this.getMatchingVisibleMetas();for(let r=0,l=a.length;rs?s:i,s=n&&i>s?i:s,{min:La(i,La(s,i)),max:La(s,La(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ra(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:s,max:n}=t,o=Na(e,(n-s)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(s,-Math.abs(o)),max:a(n,o)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const r=a=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const h=this._getLabelSizes(),c=h.widest.width,d=h.highest.height,u=yr(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:u/(i-1),c+6>o&&(o=u/(i-(t.offset?.5:1)),a=this.maxHeight-$c(t.grid)-e.padding-Lc(t.title,this.chart.options.font),r=Math.sqrt(c*c+d*d),l=pr(Math.min(Math.asin(yr((h.highest.height+6)/o,-1,1)),Math.asin(yr(a/r,-1,1))-Math.asin(yr(d/r,-1,1)))),l=Math.max(s,Math.min(n,l))),this.labelRotation=l}afterCalculateLabelRotation(){Ra(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ra(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=Lc(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=$c(n)+o):(t.height=this.maxHeight,t.width=$c(n)+o),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:o}=this._getLabelSizes(),r=2*i.padding,l=ur(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*n.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+r)}else{const e=i.mirror?0:h*n.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+r)}this._calculatePadding(e,s,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:o},position:a}=this.options,r=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,d=0;r?l?(c=s*t.width,d=i*e.height):(c=i*t.height,d=s*e.width):"start"===n?d=e.width:"end"===n?c=t.width:"inner"!==n&&(c=t.width/2,d=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((d-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+o,this.paddingBottom=s+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ra(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n({width:n[t]||0,height:o[t]||0});return{first:x(0),last:x(e-1),widest:x(v),highest:x(y),widths:n,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return yr(this._alignToPixels?El(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*s?a/i:r/s:r*s0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:o}=s,a=n.offset,r=this.isHorizontal(),l=this.ticks.length+(a?1:0),h=$c(n),c=[],d=n.setContext(this.getContext()),u=d.drawBorder?d.borderWidth:0,p=u/2,_=function(t){return El(i,t,u)};let m,f,g,b,v,y,x,w,C,k,T,A;if("top"===o)m=_(this.bottom),y=this.bottom-h,w=m-p,k=_(t.top)+p,A=t.bottom;else if("bottom"===o)m=_(this.top),k=t.top,A=_(t.bottom)-p,y=m+p,w=this.top+h;else if("left"===o)m=_(this.right),v=this.right-h,x=m-p,C=_(t.left)+p,T=t.right;else if("right"===o)m=_(this.left),C=t.left,T=_(t.right)-p,v=m+p,x=this.left+h;else if("x"===e){if("center"===o)m=_((t.top+t.bottom)/2+.5);else if(Ia(o)){const t=Object.keys(o)[0],e=o[t];m=_(this.chart.scales[t].getPixelForValue(e))}k=t.top,A=t.bottom,y=m+p,w=y+h}else if("y"===e){if("center"===o)m=_((t.left+t.right)/2);else if(Ia(o)){const t=Object.keys(o)[0],e=o[t];m=_(this.chart.scales[t].getPixelForValue(e))}v=m-p,x=v-h,C=t.left,T=t.right}const S=Pa(s.ticks.maxTicksLimit,l),E=Math.max(1,Math.ceil(l/S));for(f=0;fe.value===t));if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,o;const a=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,o=s.length;n{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,o;for(n=0,o=e.length;n{const s=i.split("."),n=s.pop(),o=[t].concat(s).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");Tl.route(o,n,l,r)}))}(e,t.defaultRoutes);t.descriptors&&Tl.describe(e,t.descriptors)}(t,o,i),this.override&&Tl.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in Tl[s]&&(delete Tl[s][i],this.override&&delete xl[i])}}var Bc=new class{constructor(){this.controllers=new Rc(hc,"datasets",!0),this.elements=new Rc(Tc,"elements"),this.plugins=new Rc(Object,"plugins"),this.scales=new Rc(Nc,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):Ba(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=Ua(t);Ra(i["before"+s],[],i),e[t](i),Ra(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e0&&this.getParsed(e-1);for(let v=e;v0&&Math.abs(i[u]-b[u])>f,m&&(h.parsed=i,h.raw=l.data[v]),d&&(h.options=c||this.resolveDataElementOptions(v,e.active?"active":s)),g||this.updateElement(e,v,h,s),b=i}this.updateSharedOptions(c,s,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const n=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,n,o)/2}}function Wc(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Hc.id="scatter",Hc.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},Hc.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};class zc{constructor(t){this.options=t||{}}init(t){}formats(){return Wc()}parse(t,e){return Wc()}format(t,e){return Wc()}add(t,e,i){return Wc()}diff(t,e,i){return Wc()}startOf(t,e,i){return Wc()}endOf(t,e){return Wc()}}zc.override=function(t){Object.assign(zc.prototype,t)};var Fc={_date:zc};function Vc(t,e,i,s){const{controller:n,data:o,_sorted:a}=t,r=n._cachedMeta.iScale;if(r&&e===r.axis&&"r"!==e&&a&&o.length){const t=r._reversePixels?kr:Cr;if(!s)return t(o,e,i);if(n._sharedOptions){const s=o[0],n="function"==typeof s.getRange&&s.getRange(e);if(n){const s=t(o,e,i-n),a=t(o,e,i+n);return{lo:s.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function jc(t,e,i,s,n){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let r=0,l=o.length;r{t[a](e[i],n)&&(o.push({element:t,datasetIndex:s,index:l}),r=r||t.inRange(e.x,e.y,n))})),s&&!r?[]:o}var qc={evaluateInteractionItems:jc,modes:{index(t,e,i,s){const n=Th(e,t),o=i.axis||"x",a=i.includeInvisible||!1,r=i.intersect?Yc(t,n,o,s,a):Kc(t,n,o,!1,s,a),l=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=r[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})})),l):[]},dataset(t,e,i,s){const n=Th(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;let r=i.intersect?Yc(t,n,o,s,a):Kc(t,n,o,!1,s,a);if(r.length>0){const e=r[0].datasetIndex,i=t.getDatasetMeta(e).data;r=[];for(let t=0;tYc(t,Th(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest(t,e,i,s){const n=Th(e,t),o=i.axis||"xy",a=i.includeInvisible||!1;return Kc(t,n,o,i.intersect,s,a)},x:(t,e,i,s)=>Uc(t,Th(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Uc(t,Th(e,t),"y",i.intersect,s)}};const Qc=["left","top","right","bottom"];function Zc(t,e){return t.filter((t=>t.pos===e))}function Gc(t,e){return t.filter((t=>-1===Qc.indexOf(t.pos)&&t.box.axis===e))}function Jc(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function td(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!Qc.includes(s))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let o,a,r;for(o=0,a=t.length;o{s[t]=Math.max(e[t],i[t])})),s}return s(t?["left","right"]:["top","bottom"])}function od(t,e,i,s){const n=[];let o,a,r,l,h,c;for(o=0,a=t.length,h=0;ot.box.fullSize)),!0),s=Jc(Zc(e,"left"),!0),n=Jc(Zc(e,"right")),o=Jc(Zc(e,"top"),!0),a=Jc(Zc(e,"bottom")),r=Gc(e,"x"),l=Gc(e,"y");return{fullSize:i,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(a).concat(r),chartArea:Zc(e,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(a).concat(r)}}(t.boxes),l=r.vertical,h=r.horizontal;Ba(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),u=Object.assign({},n);id(u,Kl(s));const p=Object.assign({maxPadding:u,w:o,h:a,x:n.left,y:n.top},n),_=td(l.concat(h),d);od(r.fullSize,p,d,_),od(l,p,d,_),od(h,p,d,_)&&od(l,p,d,_),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),rd(r.leftAndTop,p,d,_),p.x+=p.w,p.y+=p.h,rd(r.rightAndBottom,p,d,_),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ba(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})}))}};class hd{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class cd extends hd{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const dd="$chartjs",ud={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},pd=t=>null===t||""===t;const _d=!!Mh&&{passive:!0};function md(t,e,i){t.canvas.removeEventListener(e,i,_d)}function fd(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function gd(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||fd(i.addedNodes,s),e=e&&!fd(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function bd(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||fd(i.removedNodes,s),e=e&&!fd(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const vd=new Map;let yd=0;function xd(){const t=window.devicePixelRatio;t!==yd&&(yd=t,vd.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function wd(t,e,i){const s=t.canvas,n=s&&vh(s);if(!n)return;const o=Mr(((t,e)=>{const s=n.clientWidth;i(t,e),s{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||o(i,s)}));return a.observe(n),function(t,e){vd.size||window.addEventListener("resize",xd),vd.set(t,e)}(t,o),a}function Cd(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){vd.delete(t),vd.size||window.removeEventListener("resize",xd)}(t)}function kd(t,e,i){const s=t.canvas,n=Mr((e=>{null!==t.ctx&&i(function(t,e){const i=ud[t.type]||t.type,{x:s,y:n}=Th(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,_d)}(s,e,n),n}class Td extends hd{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[dd]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",pd(n)){const e=Oh(t,"width");void 0!==e&&(t.width=e)}if(pd(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Oh(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[dd])return!1;const i=e[dd].initial;["height","width"].forEach((t=>{const s=i[t];Oa(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e[dd],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),n={attach:gd,detach:bd,resize:wd}[e]||kd;s[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Cd,detach:Cd,resize:Cd}[e]||md)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Sh(t,e,i,s)}isAttached(t){const e=vh(t);return!(!e||!e.isConnected)}}class Ad{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),o=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===Ra(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){Oa(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=Pa(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(Bc.plugins.items);for(let o=0;ot.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function Sd(t,e){return e||!1!==t?!0===t?{}:t:null}function Ed(t,{plugin:e,local:i},s,n){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(s,o);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Md(t,e){const i=Tl.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Od(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Dd(t){const e=t.options||(t.options={});e.plugins=Pa(e.plugins,{}),e.scales=function(t,e){const i=xl[t.type]||{scales:{}},s=e.scales||{},n=Md(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(s).forEach((t=>{const e=s[t];if(!Ia(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const r=Od(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,n),h=i.scales||{};o[r]=o[r]||t,a[t]=ja(Object.create(null),[{axis:r},e,h[r],h[l]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,r=i.indexAxis||Md(n,e),l=(xl[n]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),n=i[e+"AxisID"]||o[e]||e;a[n]=a[n]||Object.create(null),ja(a[n],[{axis:e},s[n],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];ja(e,[Tl.scales[e.type],Tl.scale])})),a}(t,e)}function Id(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const $d=new Map,Ld=new Set;function Pd(t,e){let i=$d.get(t);return i||(i=e(),$d.set(t,i),Ld.add(i)),i}const Nd=(t,e,i)=>{const s=Ka(e,i);void 0!==s&&t.add(s)};class Rd{constructor(t){this._config=function(t){return(t=t||{}).data=Id(t.data),Dd(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Id(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Dd(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Pd(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Pd(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Pd(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Pd(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>Nd(r,t,e)))),e.forEach((t=>Nd(r,s,t))),e.forEach((t=>Nd(r,xl[n]||{},t))),e.forEach((t=>Nd(r,Tl,t))),e.forEach((t=>Nd(r,wl,t)))}));const l=Array.from(r);return 0===l.length&&l.push(Object.create(null)),Ld.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,xl[e]||{},Tl.datasets[e]||{},{type:e},Tl,wl]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:o,subPrefixes:a}=Bd(this._resolverCache,t,s);let r=o;if(function(t,e){const{isScriptable:i,isIndexable:s}=Jl(t);for(const n of e){const e=i(n),o=s(n),a=(o||e)&&t[n];if(e&&(Qa(a)||Hd(a))||o&&Da(a))return!0}return!1}(o,e)){n.$shared=!1;r=Gl(o,i=Qa(i)?i():i,this.createResolver(t,i,a))}for(const l of e)n[l]=r[l];return n}createResolver(t,e,i=[""],s){const{resolver:n}=Bd(this._resolverCache,t,i);return Ia(e)?Gl(n,e,void 0,s):n}}function Bd(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let o=s.get(n);if(!o){o={resolver:Zl(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,o)}return o}const Hd=t=>Ia(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||Qa(t[i])),!1);const Wd=["top","bottom","left","right","chartArea"];function zd(t,e){return"top"===t||"bottom"===t||-1===Wd.indexOf(t)&&"x"===e}function Fd(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function Vd(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Ra(i&&i.onComplete,[t],e)}function jd(t){const e=t.chart,i=e.options.animation;Ra(i&&i.onProgress,[t],e)}function Yd(t){return bh()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Xd={},Kd=t=>{const e=Yd(t);return Object.values(Xd).filter((t=>t.canvas===e)).pop()};function Ud(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const o=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=o)}}}let qd=class{constructor(t,e){const i=this.config=new Rd(e),s=Yd(t),n=Kd(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!bh()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?cd:Td}(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,o.aspectRatio),r=a&&a.canvas,l=r&&r.height,h=r&&r.width;this.id=Ma(),this.ctx=a,this.canvas=r,this.width=h,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ad,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}((t=>this.update(t)),o.resizeDelay||0),this._dataChanges=[],Xd[this.id]=this,a&&r?(Xh.listen(this,"complete",Vd),Xh.listen(this,"progress",jd),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return Oa(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Eh(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ml(this.canvas,this.ctx),this}stop(){return Xh.stop(this),this}resize(t,e){Xh.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,n=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,e,n),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Eh(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),Ra(i.onResize,[this,o],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){Ba(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=Od(t,i),n="r"===s,o="x"===s;return{options:i,dposition:n?"chartArea":o?"bottom":"left",dtype:n?"radialLinear":o?"category":"linear"}})))),Ba(n,(e=>{const n=e.options,o=n.id,a=Od(o,n),r=Pa(n.type,e.dtype);void 0!==n.position&&zd(n.position,a)===zd(e.dposition)||(n.position=e.dposition),s[o]=!0;let l=null;if(o in i&&i[o].type===r)l=i[o];else{l=new(Bc.getScale(r))({id:o,type:r,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(n,t)})),Ba(s,((t,e)=>{t||delete i[e]})),Ba(i,(t=>{ld.configure(this,t,t.options),ld.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let l=0,h=this.data.datasets.length;l{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Fd("z","_idx"));const{_active:a,_lastEvent:r}=this;r?this._eventHandler(r,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Ba(this.scales,(t=>{ld.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);Za(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e){Ud(t,s,"_removeElements"===i?-n:n)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let n=1;nt.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;ld.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Ba(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,n=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(s&&$l(e,{left:!1===i.left?0:n.left-i.left,right:!1===i.right?this.width:n.right+i.right,top:!1===i.top?0:n.top-i.top,bottom:!1===i.bottom?this.height:n.bottom+i.bottom}),t.controller.draw(),s&&Ll(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Il(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=qc.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Ql(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),o=n.controller._resolveAnimations(void 0,s);qa(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Xh.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};Ba(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",n),i("detach",o)};o=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){Ba(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},Ba(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,o,a,r;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),a=0,r=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!Ha(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=n(e,t),a=i?t:n(t,e);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,o=e,a=this._getActiveElements(t,s,i,o),r=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,r);i&&(this._lastEvent=null,Ra(n.onHover,[t,a,this],this),r&&Ra(n.onClick,[t,a,this],this));const h=!Ha(a,s);return(h||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}};const Qd=()=>Ba(qd.instances,(t=>t._plugins.invalidate())),Zd=!0;function Gd(t,e,i){const{startAngle:s,pixelMargin:n,x:o,y:a,outerRadius:r,innerRadius:l}=e;let h=n/r;t.beginPath(),t.arc(o,a,r,s-h,i+h),l>n?(h=n/l,t.arc(o,a,l,i+h,s-h,!0)):t.arc(o,a,n,i+sr,s-sr),t.closePath(),t.clip()}function Jd(t,e,i,s){const n=jl(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,a=Math.min(o,s*e/2),r=t=>{const e=(i-Math.min(o,t))*s/2;return yr(t,0,Math.min(o,e))};return{outerStart:r(n.outerStart),outerEnd:r(n.outerEnd),innerStart:yr(n.innerStart,0,a),innerEnd:yr(n.innerEnd,0,a)}}function tu(t,e,i,s){return{x:i+t*Math.cos(e),y:s+t*Math.sin(e)}}function eu(t,e,i,s,n,o){const{x:a,y:r,startAngle:l,pixelMargin:h,innerRadius:c}=e,d=Math.max(e.outerRadius+s+i-h,0),u=c>0?c+s+i+h:0;let p=0;const _=n-l;if(s){const t=((c>0?c-s:0)+(d>0?d-s:0))/2;p=(_-(0!==t?_*t/(t+s):_))/2}const m=(_-Math.max(.001,_*d-i/Ga)/d)/2,f=l+m+p,g=n-m-p,{outerStart:b,outerEnd:v,innerStart:y,innerEnd:x}=Jd(e,u,d,g-f),w=d-b,C=d-v,k=f+b/w,T=g-v/C,A=u+y,S=u+x,E=f+y/A,M=g-x/S;if(t.beginPath(),o){if(t.arc(a,r,d,k,T),v>0){const e=tu(C,T,a,r);t.arc(e.x,e.y,v,T,g+sr)}const e=tu(S,g,a,r);if(t.lineTo(e.x,e.y),x>0){const e=tu(S,M,a,r);t.arc(e.x,e.y,x,g+sr,M+Math.PI)}if(t.arc(a,r,u,g-x/u,f+y/u,!0),y>0){const e=tu(A,E,a,r);t.arc(e.x,e.y,y,E+Math.PI,f-sr)}const i=tu(w,f,a,r);if(t.lineTo(i.x,i.y),b>0){const e=tu(w,k,a,r);t.arc(e.x,e.y,b,f-sr,k)}}else{t.moveTo(a,r);const e=Math.cos(k)*d+a,i=Math.sin(k)*d+r;t.lineTo(e,i);const s=Math.cos(T)*d+a,n=Math.sin(T)*d+r;t.lineTo(s,n)}t.closePath()}function iu(t,e,i,s,n,o){const{options:a}=e,{borderWidth:r,borderJoinStyle:l}=a,h="inner"===a.borderAlign;r&&(h?(t.lineWidth=2*r,t.lineJoin=l||"round"):(t.lineWidth=r,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:s,y:n,startAngle:o,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),h=e.innerRadius+a;let c;for(i&&Gd(t,e,o+Ja),t.beginPath(),t.arc(s,n,h,o+Ja,o,!0),c=0;c{Bc.add(...t),Qd()}},unregister:{enumerable:Zd,value:(...t)=>{Bc.remove(...t),Qd()}}});class su extends Tc{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.getProps(["x","y"],i),{angle:n,distance:o}=mr(s,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2,u=Pa(c,r-a)>=Ja||vr(n,a,r),p=xr(o,l+d,h+d);return u&&p}getCenterPoint(t){const{x:e,y:i,startAngle:s,endAngle:n,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,h=(s+n)/2,c=(o+a+l+r)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,s=(e.offset||0)/2,n=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>Ja?Math.floor(i/Ja):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=0;if(s){a=s/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*a,Math.sin(e)*a),this.circumference>=Ga&&(a=s)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const r=function(t,e,i,s,n){const{fullCircles:o,startAngle:a,circumference:r}=e;let l=e.endAngle;if(o){eu(t,e,i,s,a+Ja,n);for(let e=0;er&&o>r;return{count:s,start:l,loop:e.loop,ilen:h(a+(h?r-t:t))%o,v=()=>{p!==_&&(t.lineTo(f,_),t.lineTo(f,p),t.lineTo(f,m))};for(l&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=r;++c){if(d=n[b(c)],d.skip)continue;const e=d.x,i=d.y,s=0|e;s===u?(i_&&(_=i),f=(g*f+e)/++g):(v(),t.lineTo(e,i),u=s,g=0,p=_=i),m=i}v()}function hu(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?lu:ru}su.id="arc",su.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},su.defaultRoutes={backgroundColor:"backgroundColor"};const cu="function"==typeof Path2D;function du(t,e,i,s){cu&&!e.options.segment?function(t,e,i,s){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,s)&&n.closePath()),nu(t,e.options),t.stroke(n)}(t,e,i,s):function(t,e,i,s){const{segments:n,options:o}=e,a=hu(e);for(const r of n)nu(t,o,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+s-1})&&t.closePath(),t.stroke()}(t,e,i,s)}class uu extends Tc{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;gh(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,s=t.options.spanGaps,n=i.length;if(!n)return[];const o=!!t._loop,{start:a,end:r}=function(t,e,i,s){let n=0,o=e-1;if(i&&!s)for(;nn&&t[o%e].skip;)o--;return o%=e,{start:n,end:o}}(i,n,o,s);return Vh(t,!0===s?[{start:a,end:r,loop:o}]:function(t,e,i,s){const n=t.length,o=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%n];i.skip||i.stop?l.skip||(s=!1,o.push({start:e%n,end:(a-1)%n,loop:s}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&o.push({start:e%n,end:r%n,loop:s}),o}(i,a,r"borderDash"!==t&&"fill"!==t};class _u extends Tc{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const s=this.options,{x:n,y:o}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-o,2){wu(t)}))}xu.id="bar",xu.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},xu.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var ku={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Cu(t);const s=t.width;t.data.datasets.forEach(((e,n)=>{const{_data:o,indexAxis:a}=e,r=t.getDatasetMeta(n),l=o||e.data;if("y"===ql([a,t.options.indexAxis]))return;if(!r.controller.supportsDecimation)return;const h=t.scales[r.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let{start:c,count:d}=function(t,e){const i=e.length;let s,n=0;const{iScale:o}=t,{min:a,max:r,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(n=yr(Cr(e,o.axis,a).lo,0,i-1)),s=h?yr(Cr(e,o.axis,r).hi+1,n,i)-n:i-n,{start:n,count:s}}(r,l);if(d<=(i.threshold||4*s))return void wu(e);let u;switch(Oa(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,s,n){const o=n.samples||s;if(o>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(o-2);let l=0;const h=e+i-1;let c,d,u,p,_,m=e;for(a[l++]=t[m],c=0;cu&&(u=p,d=t[s],_=s);a[l++]=d,m=_}return a[l++]=t[h],a}(l,c,d,s,i);break;case"min-max":u=function(t,e,i,s){let n,o,a,r,l,h,c,d,u,p,_=0,m=0;const f=[],g=e+i-1,b=t[e].x,v=t[g].x-b;for(n=e;np&&(p=r,c=n),_=(m*_+o.x)/++m;else{const i=n-1;if(!Oa(h)&&!Oa(c)){const e=Math.min(h,c),s=Math.max(h,c);e!==d&&e!==i&&f.push({...t[e],x:_}),s!==d&&s!==i&&f.push({...t[s],x:_})}n>0&&i!==d&&f.push(t[i]),f.push(o),l=e,m=0,u=p=r,h=c=d=n}}return f}(l,c,d,s);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}))},destroy(t){Cu(t)}};function Tu(t,e,i,s){if(s)return;let n=e[t],o=i[t];return"angle"===t&&(n=br(n),o=br(o)),{property:t,start:n,end:o}}function Au(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Su(t,e,i,s){return t&&e?s(t[i],e[i]):t?t[i]:e?e[i]:0}function Eu(t,e){let i=[],s=!1;return Da(t)?(s=!0,i=t):i=function(t,e){const{x:i=null,y:s=null}=t||{},n=e.points,o=[];return e.segments.forEach((({start:t,end:e})=>{e=Au(t,e,n);const a=n[t],r=n[e];null!==s?(o.push({x:a.x,y:s}),o.push({x:r.x,y:s})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:r.y}))})),o}(t,e),i.length?new uu({points:i,options:{tension:0},_loop:s,_fullLoop:s}):null}function Mu(t){return t&&!1!==t.fill}function Ou(t,e,i){let s=t[e].fill;const n=[e];let o;if(!i)return s;for(;!1!==s&&-1===n.indexOf(s);){if(!$a(s))return s;if(o=t[s],!o)return!1;if(o.visible)return s;n.push(s),s=o.fill}return!1}function Du(t,e,i){const s=function(t){const e=t.options,i=e.fill;let s=Pa(i&&i.target,i);void 0===s&&(s=!!e.backgroundColor);if(!1===s||null===s)return!1;if(!0===s)return"origin";return s}(t);if(Ia(s))return!isNaN(s.value)&&s;let n=parseFloat(s);return $a(n)&&Math.floor(n)===n?function(t,e,i,s){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=s)return!1;return i}(s[0],e,n,i):["origin","start","end","stack","shape"].indexOf(s)>=0&&s}function Iu(t,e,i){const s=[];for(let n=0;n=0;--a){const e=n[a].$filler;e&&(e.line.updateControlPoints(o,e.axis),s&&e.fill&&Nu(t.ctx,e,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const s=t.getSortedVisibleDatasetMetas();for(let n=s.length-1;n>=0;--n){const e=s[n].$filler;Mu(e)&&Nu(t.ctx,e,t.chartArea)}},beforeDatasetDraw(t,e,i){const s=e.meta.$filler;Mu(s)&&"beforeDatasetDraw"===i.drawTime&&Nu(t.ctx,s,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Fu=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class Vu extends Tc{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Ra(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=Ul(i.font),n=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:r}=Fu(i,n);let l,h;e.font=s.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,n,a,r)+10):(h=this.maxHeight,l=this._fitCols(o,n,a,r)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.lineWidths=[0],h=s+a;let c=t;n.textAlign="left",n.textBaseline="middle";let d=-1,u=-h;return this.legendItems.forEach(((t,p)=>{const _=i+e/2+n.measureText(t.text).width;(0===p||l[l.length-1]+_+2*a>o)&&(c+=h,l[l.length-(p>0?0:1)]=0,u+=h,d++),r[p]={left:0,top:u,row:d,width:_,height:s},l[l.length-1]+=_+a})),c}_fitCols(t,e,i,s){const{ctx:n,maxHeight:o,options:{labels:{padding:a}}}=this,r=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,d=0,u=0,p=0,_=0;return this.legendItems.forEach(((t,o)=>{const m=i+e/2+n.measureText(t.text).width;o>0&&u+s+2*a>h&&(c+=d+a,l.push({width:d,height:u}),p+=d+a,_++,d=u=0),r[o]={left:p,top:u,col:_,width:m,height:s},d=Math.max(d,m),u+=s+a})),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,o=Nh(n,this.left,this.width);if(this.isHorizontal()){let n=0,a=Dr(i,this.left+s,this.right-this.lineWidths[n]);for(const r of e)n!==r.row&&(n=r.row,a=Dr(i,this.left+s,this.right-this.lineWidths[n])),r.top+=this.top+t+s,r.left=o.leftForLtr(o.x(a),r.width),a+=r.width+s}else{let n=0,a=Dr(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const r of e)r.col!==n&&(n=r.col,a=Dr(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),r.top=a,r.left+=this.left+s,r.left=o.leftForLtr(o.x(r.left),r.width),a+=r.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;$l(t,this),this._draw(),Ll(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:o}=t,a=Tl.color,r=Nh(t.rtl,this.left,this.width),l=Ul(o.font),{color:h,padding:c}=o,d=l.size,u=d/2;let p;this.drawTitle(),s.textAlign=r.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=l.string;const{boxWidth:_,boxHeight:m,itemHeight:f}=Fu(o,d),g=this.isHorizontal(),b=this._computeTitleHeight();p=g?{x:Dr(n,this.left+c,this.right-i[0]),y:this.top+c+b,line:0}:{x:this.left+c,y:Dr(n,this.top+b+c,this.bottom-e[0].height),line:0},Rh(this.ctx,t.textDirection);const v=f+c;this.legendItems.forEach(((y,x)=>{s.strokeStyle=y.fontColor||h,s.fillStyle=y.fontColor||h;const w=s.measureText(y.text).width,C=r.textAlign(y.textAlign||(y.textAlign=o.textAlign)),k=_+u+w;let T=p.x,A=p.y;r.setWidth(this.width),g?x>0&&T+k+c>this.right&&(A=p.y+=v,p.line++,T=p.x=Dr(n,this.left+c,this.right-i[p.line])):x>0&&A+v>this.bottom&&(T=p.x=T+e[p.line].width+c,p.line++,A=p.y=Dr(n,this.top+b+c,this.bottom-e[p.line].height));!function(t,e,i){if(isNaN(_)||_<=0||isNaN(m)||m<0)return;s.save();const n=Pa(i.lineWidth,1);if(s.fillStyle=Pa(i.fillStyle,a),s.lineCap=Pa(i.lineCap,"butt"),s.lineDashOffset=Pa(i.lineDashOffset,0),s.lineJoin=Pa(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=Pa(i.strokeStyle,a),s.setLineDash(Pa(i.lineDash,[])),o.usePointStyle){const a={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},l=r.xPlus(t,_/2);Dl(s,a,l,e+u,o.pointStyleWidth&&_)}else{const o=e+Math.max((d-m)/2,0),a=r.leftForLtr(t,_),l=Xl(i.borderRadius);s.beginPath(),Object.values(l).some((t=>0!==t))?Hl(s,{x:a,y:o,w:_,h:m,radius:l}):s.rect(a,o,_,m),s.fill(),0!==n&&s.stroke()}s.restore()}(r.x(T),A,y),T=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(C,T+_+u,g?T+k:this.right,t.rtl),function(t,e,i){Rl(s,i.text,t,e+f/2,l,{strikethrough:i.hidden,textAlign:r.textAlign(i.textAlign)})}(r.x(T),A,y),g?p.x+=k+c:p.y+=v})),Bh(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Ul(e.font),s=Kl(e.padding);if(!e.display)return;const n=Nh(t.rtl,this.left,this.width),o=this.ctx,a=e.position,r=i.size/2,l=s.top+r;let h,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),h=this.top+l,c=Dr(t.align,c,this.right-d);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);h=l+Dr(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Dr(a,c,c+d);o.textAlign=n.textAlign(Or(a)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Rl(o,e.text,u,h,i)}_computeTitleHeight(){const t=this.options.title,e=Ul(t.font),i=Kl(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(xr(t,this.left,this.right)&&xr(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;it.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=Kl(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Yu extends Tc{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=Da(i.text)?i.text.length:1;this._padding=Kl(i.padding);const n=s*Ul(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:o}=this,a=o.align;let r,l,h,c=0;return this.isHorizontal()?(l=Dr(a,i,n),h=e+t,r=n-i):("left"===o.position?(l=i+t,h=Dr(a,s,e),c=-.5*Ga):(l=n-t,h=Dr(a,e,s),c=.5*Ga),r=s-e),{titleX:l,titleY:h,maxWidth:r,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Ul(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:o,maxWidth:a,rotation:r}=this._drawArgs(s);Rl(t,e.text,0,0,i,{color:e.color,maxWidth:a,rotation:r,textAlign:Or(e.align),textBaseline:"middle",translation:[n,o]})}}var Xu={id:"title",_element:Yu,start(t,e,i){!function(t,e){const i=new Yu({ctx:t.ctx,options:e,chart:t});ld.configure(t,i,e),ld.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;ld.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;ld.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ku=new WeakMap;var Uu={id:"subtitle",start(t,e,i){const s=new Yu({ctx:t.ctx,options:i,chart:t});ld.configure(t,s,i),ld.addBox(t,s),Ku.set(t,s)},stop(t){ld.removeBox(t,Ku.get(t)),Ku.delete(t)},beforeUpdate(t,e,i){const s=Ku.get(t);ld.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const qu={average(t){if(!t.length)return!1;let e,i,s=0,n=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function Gu(t,e){const{element:i,datasetIndex:s,index:n}=e,o=t.getDatasetMeta(s).controller,{label:a,value:r}=o.getLabelAndValue(n);return{chart:t,label:a,parsed:o.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:r,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function Ju(t,e){const i=t.chart.ctx,{body:s,footer:n,title:o}=t,{boxWidth:a,boxHeight:r}=e,l=Ul(e.bodyFont),h=Ul(e.titleFont),c=Ul(e.footerFont),d=o.length,u=n.length,p=s.length,_=Kl(e.padding);let m=_.height,f=0,g=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(g+=t.beforeBody.length+t.afterBody.length,d&&(m+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),g){m+=p*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(g-p)*l.lineHeight+(g-1)*e.bodySpacing}u&&(m+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){f=Math.max(f,i.measureText(t).width+b)};return i.save(),i.font=h.string,Ba(t.title,v),i.font=l.string,Ba(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?a+2+e.boxPadding:0,Ba(s,(t=>{Ba(t.before,v),Ba(t.lines,v),Ba(t.after,v)})),b=0,i.font=c.string,Ba(t.footer,v),i.restore(),f+=_.width,{width:f,height:m}}function tp(t,e,i,s){const{x:n,width:o}=i,{width:a,chartArea:{left:r,right:l}}=t;let h="center";return"center"===s?h=n<=(r+l)/2?"left":"right":n<=o/2?h="left":n>=a-o/2&&(h="right"),function(t,e,i,s){const{x:n,width:o}=s,a=i.caretSize+i.caretPadding;return"left"===t&&n+o+a>e.width||"right"===t&&n-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function ep(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return it.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||tp(t,e,i,s),yAlign:s}}function ip(t,e,i,s){const{caretSize:n,caretPadding:o,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,h=n+o,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:p}=Xl(a);let _=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,r);const m=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,l,h);return"center"===l?"left"===r?_+=h:"right"===r&&(_-=h):"left"===r?_-=Math.max(c,u)+n:"right"===r&&(_+=Math.max(d,p)+n),{x:yr(_,0,s.width-e.width),y:yr(m,0,s.height-e.height)}}function sp(t,e,i){const s=Kl(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function np(t){return Qu([],Zu(t))}function op(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class ap extends Tc{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new Zh(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,Ql(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,s=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let a=[];return a=Qu(a,Zu(s)),a=Qu(a,Zu(n)),a=Qu(a,Zu(o)),a}getBeforeBody(t,e){return np(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,s=[];return Ba(t,(t=>{const e={before:[],lines:[],after:[]},n=op(i,t);Qu(e.before,Zu(n.beforeLabel.call(this,t))),Qu(e.lines,n.label.call(this,t)),Qu(e.after,Zu(n.afterLabel.call(this,t))),s.push(e)})),s}getAfterBody(t,e){return np(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,s=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let a=[];return a=Qu(a,Zu(s)),a=Qu(a,Zu(n)),a=Qu(a,Zu(o)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],o=[];let a,r,l=[];for(a=0,r=e.length;at.filter(e,s,n,i)))),t.itemSort&&(l=l.sort(((e,s)=>t.itemSort(e,s,i)))),Ba(l,(e=>{const i=op(t.callbacks,e);s.push(i.labelColor.call(this,e)),n.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,o=[];if(s.length){const t=qu[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=Ju(this,i),a=Object.assign({},t,e),r=ep(this.chart,i,a),l=ip(i,a,r,this.chart);this.xAlign=r.xAlign,this.yAlign=r.yAlign,n={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=o,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:r,topRight:l,bottomLeft:h,bottomRight:c}=Xl(a),{x:d,y:u}=t,{width:p,height:_}=e;let m,f,g,b,v,y;return"center"===n?(v=u+_/2,"left"===s?(m=d,f=m-o,b=v+o,y=v-o):(m=d+p,f=m+o,b=v-o,y=v+o),g=m):(f="left"===s?d+Math.max(r,h)+o:"right"===s?d+p-Math.max(l,c)-o:this.caretX,"top"===n?(b=u,v=b-o,m=f-o,g=f+o):(b=u+_,v=b+o,m=f+o,g=f-o),y=b),{x1:m,x2:f,x3:g,y1:b,y2:v,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let o,a,r;if(n){const l=Nh(i.rtl,this.x,this.width);for(t.x=sp(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Ul(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,r=0;r0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,Hl(t,{x:e,y:_,w:l,h:r,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Hl(t,{x:i,y:_+1,w:l-2,h:r-2,radius:a}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,_,l,r),t.strokeRect(e,_,l,r),t.fillStyle=o.backgroundColor,t.fillRect(i,_+1,l-2,r-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:o,displayColors:a,boxHeight:r,boxWidth:l,boxPadding:h}=i,c=Ul(i.bodyFont);let d=c.lineHeight,u=0;const p=Nh(i.rtl,this.x,this.width),_=function(i){e.fillText(i,p.x(t.x+u),t.y+d/2),t.y+=d+n},m=p.textAlign(o);let f,g,b,v,y,x,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=sp(this,m,i),e.fillStyle=i.bodyColor,Ba(this.beforeBody,_),u=a&&"right"!==m?"center"===o?l/2+h:l+2+h:0,v=0,x=s.length;v0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=qu[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=Ju(this,t),a=Object.assign({},i,this._size),r=ep(e,t,a),l=ip(t,a,r,e);s._to===l.x&&n._to===l.y||(this.xAlign=r.xAlign,this.yAlign=r.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Kl(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),Rh(t,e.textDirection),n.y+=o.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Bh(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!Ha(i,s),o=this._positionChanged(s,e);(n||o)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],o=this._getActiveElements(t,n,e,i),a=this._positionChanged(o,t),r=e||!Ha(o,n)||a;return r&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e;const o=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,o=qu[n.position].call(this,t,e);return!1!==o&&(i!==o.x||s!==o.y)}}ap.positioners=qu;var rp={id:"tooltip",_element:ap,positioners:qu,afterInit(t,e,i){i&&(t.tooltip=new ap({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Ea,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function lp(t,e,i,s){const n=t.indexOf(e);if(-1===n)return((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s);return n!==t.lastIndexOf(e)?i:n}class hp extends Nc{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Oa(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:yr(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:lp(i,t,Pa(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=t;o<=e;o++)s.push({value:o});return s}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function cp(t,e){const i=[],{bounds:s,step:n,min:o,max:a,precision:r,count:l,maxTicks:h,maxDigits:c,includeBounds:d}=t,u=n||1,p=h-1,{min:_,max:m}=e,f=!Oa(o),g=!Oa(a),b=!Oa(l),v=(m-_)/(c+1);let y,x,w,C,k=lr((m-_)/p/u)*u;if(k<1e-14&&!f&&!g)return[{value:_},{value:m}];C=Math.ceil(m/k)-Math.floor(_/k),C>p&&(k=lr(C*k/p/u)*u),Oa(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===s?(x=Math.floor(_/k)*k,w=Math.ceil(m/k)*k):(x=_,w=m),f&&g&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/n,k/1e3)?(C=Math.round(Math.min((a-o)/k,h)),k=(a-o)/C,x=o,w=a):b?(x=f?o:x,w=g?a:w,C=l-1,k=(w-x)/C):(C=(w-x)/k,C=cr(C,Math.round(C),k/1e3)?Math.round(C):Math.ceil(C));const T=Math.max(_r(k),_r(x));y=Math.pow(10,Oa(r)?T:r),x=Math.round(x*y)/y,w=Math.round(w*y)/y;let A=0;for(f&&(d&&x!==o?(i.push({value:o}),xs=e?s:t,a=t=>n=i?n:t;if(t){const t=rr(s),e=rr(n);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(s===n){let e=1;(n>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*n)),a(n+e),t||o(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=cp({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&dr(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ph(t,this.chart.options.locale,this.options.ticks.format)}}class pp extends up{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=$a(t)?t:0,this.max=$a(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=ur(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function _p(t){return 1===t/Math.pow(10,Math.floor(ar(t)))}pp.id="linear",pp.defaults={ticks:{callback:Sc.formatters.numeric}};class mp extends Nc{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=up.prototype.parse.apply(this,[t,e]);if(0!==i)return $a(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=$a(t)?Math.max(0,t):null,this.max=$a(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const n=e=>i=t?i:e,o=t=>s=e?s:t,a=(t,e)=>Math.pow(10,Math.floor(ar(t))+e);i===s&&(i<=0?(n(1),o(10)):(n(a(i,-1)),o(a(s,1)))),i<=0&&n(a(s,-1)),s<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&n(a(i,-1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(ar(e.max)),s=Math.ceil(e.max/Math.pow(10,i)),n=[];let o=La(t.min,Math.pow(10,Math.floor(ar(e.min)))),a=Math.floor(ar(o)),r=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{n.push({value:o,major:_p(o)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),o=Math.round(r*Math.pow(10,a)*l)/l}while(an?{start:e-i,end:e}:{start:e,end:e+i}}function bp(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),s=[],n=[],o=t._pointLabels.length,a=t.options.pointLabels,r=a.centerPointLabels?Ga/o:0;for(let d=0;de.r&&(r=(s.end-e.r)/o,t.r=Math.max(t.r,e.r+r)),n.starte.b&&(l=(n.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function yp(t){return 0===t||180===t?"center":t<180?"left":"right"}function xp(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function wp(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Cp(t,e,i,s){const{ctx:n}=t;if(i)n.arc(t.xCenter,t.yCenter,e,0,Ja);else{let i=t.getPointPosition(0,e);n.moveTo(i.x,i.y);for(let o=1;o{const i=Ra(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""})).filter(((t,e)=>this.chart.getDataVisibility(e)))}fit(){const t=this.options;t.display&&t.pointLabels.display?bp(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){return br(t*(Ja/(this._pointLabels.length||1))+ur(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Oa(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Oa(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t=0;n--){const e=s.setContext(t.getPointLabelContext(n)),o=Ul(e.font),{x:a,y:r,textAlign:l,left:h,top:c,right:d,bottom:u}=t._pointLabelItems[n],{backdropColor:p}=e;if(!Oa(p)){const t=Xl(e.borderRadius),s=Kl(e.backdropPadding);i.fillStyle=p;const n=h-s.left,o=c-s.top,a=d-h+s.width,r=u-c+s.height;Object.values(t).some((t=>0!==t))?(i.beginPath(),Hl(i,{x:n,y:o,w:a,h:r,radius:t}),i.fill()):i.fillRect(n,o,a,r)}Rl(i,t._pointLabels[n],a,r+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,n),s.display&&this.ticks.forEach(((t,e)=>{if(0!==e){a=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,s){const n=t.ctx,o=e.circular,{color:a,lineWidth:r}=e;!o&&!s||!a||!r||i<0||(n.save(),n.strokeStyle=a,n.lineWidth=r,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),Cp(t,i,o,s),n.closePath(),n.stroke(),n.restore())}(this,s.setContext(this.getContext(e-1)),a,n)}})),i.display){for(t.save(),o=n-1;o>=0;o--){const s=i.setContext(this.getPointLabelContext(o)),{color:n,lineWidth:l}=s;l&&n&&(t.lineWidth=l,t.strokeStyle=n,t.setLineDash(s.borderDash),t.lineDashOffset=s.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),r=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(r.x,r.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let n,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((s,a)=>{if(0===a&&!e.reverse)return;const r=i.setContext(this.getContext(a)),l=Ul(r.font);if(n=this.getDistanceFromCenterForValue(this.ticks[a].value),r.showLabelBackdrop){t.font=l.string,o=t.measureText(s.label).width,t.fillStyle=r.backdropColor;const e=Kl(r.backdropPadding);t.fillRect(-o/2-e.left,-n-l.size/2-e.top,o+e.width,l.size+e.height)}Rl(t,s.label,0,-n,l,{color:r.color})})),t.restore()}drawTitle(){}}kp.id="radialLinear",kp.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Sc.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},kp.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},kp.descriptors={angleLines:{_fallback:"grid"}};const Tp={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ap=Object.keys(Tp);function Sp(t,e){return t-e}function Ep(t,e){if(Oa(e))return null;const i=t._adapter,{parser:s,round:n,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof s&&(a=s(a)),$a(a)||(a="string"==typeof s?i.parse(a,s):i.parse(a)),null===a?null:(n&&(a="week"!==n||!hr(o)&&!0!==o?i.startOf(a,n):i.startOf(a,"isoWeek",o)),+a)}function Mp(t,e,i,s){const n=Ap.length;for(let o=Ap.indexOf(t);o=e?i[s]:i[n]]=!0}}else t[e]=!0}function Dp(t,e,i){const s=[],n={},o=e.length;let a,r;for(a=0;a=0&&(e[l].major=!0);return e}(t,s,n,i):s}class Ip extends Nc{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),s=this._adapter=new Fc._date(t.adapters.date);s.init(e),ja(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Ep(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:n,minDefined:o,maxDefined:a}=this.getUserBounds();function r(t){o||isNaN(t.min)||(s=Math.min(s,t.min)),a||isNaN(t.max)||(n=Math.max(n,t.max))}o&&a||(r(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||r(this.getMinMax(!1))),s=$a(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),n=$a(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,n-1),this.max=Math.max(s+1,n)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const n=this.min,o=function(t,e,i){let s=0,n=t.length;for(;ss&&t[n-1]>i;)n--;return s>0||n=Ap.indexOf(i);o--){const i=Ap[o];if(Tp[i].common&&t._adapter.diff(n,s,i)>=e-1)return i}return Ap[i?Ap.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Ap.indexOf(t)+1,i=Ap.length;e+t.value)))}initOffsets(t){let e,i,s=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),s=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;s=yr(s,0,o),n=yr(n,0,o),this._offsets={start:s,end:n,factor:1/(s+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,n=s.time,o=n.unit||Mp(n.minUnit,e,i,this._getLabelCapacity(e)),a=Pa(n.stepSize,1),r="week"===o&&n.isoWeekday,l=hr(r)||!0===r,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",r)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const p="data"===s.ticks.source&&this.getDataTimestamps();for(c=u,d=0;ct-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,s){const n=this.options,o=n.time.displayFormats,a=this._unit,r=this._majorUnit,l=a&&o[a],h=r&&o[r],c=i[e],d=r&&h&&c&&c.major,u=this._adapter.format(t,s||(d?h:l)),p=n.ticks.callback;return p?Ra(p,[u,e,i],this):u}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,e=s.length;t=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=Cr(t,"pos",e)),({pos:s,time:o}=t[r]),({pos:n,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=Cr(t,"time",e)),({time:s,pos:o}=t[r]),({time:n,pos:a}=t[l]));const h=n-s;return h?o+(a-o)*(e-s)/h:o}Ip.id="time",Ip.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Lp extends Ip{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=$p(e,this.min),this._tableRange=$p(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],n=[];let o,a,r,l,h;for(o=0,a=t.length;o=e&&l<=i&&s.push(l);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=s.length;ojp(i[e],t,{arrayMerge:(t,e,i)=>{const s=t.slice();return e.forEach(((e,n)=>{void 0===s[n]?s[n]=i.cloneUnlessOtherwiseSpecified(e,i):i.isMergeableObject(e)?s[n]=jp(t[n],e,i):-1===t.indexOf(e)&&s.push(e)})),s}}),Qp={darkTicksColor:"#fff",darkLabelColor:"#fff",darkGridLinesColor:"#555",darkmodeOff:"undefined",darkMode:null,darkBgColor:"#262626",darkBgColorLight:"#fff",options:null},Zp={darkTicksColor:"string",darkLabelColor:"string",darkGridLinesColor:"string",darkmodeOff:"(string|null)",darkMode:"(string|null)",darkBgColor:"string",darkBgColorLight:"string",options:"(object|null)"};class Gp extends to{constructor(t,e,i={},s={}){if(super(t),this._data=e,this._options=i,this._type=e.type,this._canvas=null,this._chart=null,this._darkOptions=this._getDarkConfig(s),this._darkModeClassContainer=document.querySelector("html"),this._prevConfig=i,this._observer=null,this._element&&(R.addClass(this._element,"chart"),this._chartConstructor(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)),this._element&&null!==this._darkOptions.darkmodeOff){let t;switch(this._darkOptions.darkMode){case"dark":t="dark";break;case"light":t="light";break;default:t=this.systemColorMode}this._handleMode(t),this._observer=new MutationObserver(this._observerCallback.bind(this)),this._observer.observe(this._darkModeClassContainer,{attributes:!0})}}static get NAME(){return Kp}get systemColorMode(){return localStorage.theme||R.getDataAttribute(this._darkModeClassContainer,"theme")||"light"}static get BarController(){return bc}static get BubbleController(){return vc}static get DoughnutController(){return yc}static get LineController(){return xc}static get PieController(){return Cc}static get PolarAreaController(){return wc}static get RadarController(){return kc}static get ScatterController(){return Hc}dispose(){this._observer.disconnect(),n.removeData(this._element,Up),this._chart.destroy(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}update(t,e={}){t&&(this._data={...this._data,...t},this._chart.data=this._data);const i=Object.prototype.hasOwnProperty.call(e,"options")?e:{options:{...e}};this._options=jp(this._options,i),this._chart.options=qp(this._options,this._type,Xp).options,this._chart.update()}static register(t){qd.register(t)}setTheme(t){"dark"!==t&&"light"!==t||!this._data||this._handleMode(t)}_getDarkConfig(t){let e={};const i=R.getDataAttributes(this._element);Object.keys(i).forEach((t=>t.startsWith("dark")&&(e[t]=i[t]))),e={...Qp,...e};const s={y:{ticks:{color:e.darkTicksColor},grid:{color:e.darkGridLinesColor}},x:{ticks:{color:e.darkTicksColor},grid:{color:e.darkGridLinesColor}}},n={r:{ticks:{color:e.darkTicksColor,backdropColor:e.darkBgColor},grid:{color:e.darkGridLinesColor},pointLabels:{color:e.darkTicksColor}}};let o={};["pie","doughnut","polarArea","radar"].includes(this._type)?["polarArea","radar"].includes(this._type)&&(o=n):o=s;const a={scales:o,plugins:{legend:{labels:{color:e.darkLabelColor}}}};return t={...e,options:{...a},...t},d(Kp,t,Zp),t}_getLightTheme(t){const e=Xp[`${t}`]?Xp[`${t}`].options:{},i=this._prevConfig||{};return jp(e,i)}_chartConstructor(){if(this._data){this._createCanvas();const t=qp(this._options,this._type,Xp);this._chart=new qd(this._canvas,{...this._data,...t})}}_createCanvas(){this._canvas||("CANVAS"===this._element.nodeName?this._canvas=this._element:(this._canvas=g("canvas"),this._element.appendChild(this._canvas)))}_handleMode(t){"dark"===t?(this._changeDatasetBorderColor(),this.update(null,this._darkOptions.options)):(this._changeDatasetBorderColor(!1),this._options=null,this.update(null,this._getLightTheme(this._type)))}_observerCallback(t){t.forEach((t=>{"attributes"===t.type&&this._handleMode(this.systemColorMode)}))}_changeDatasetBorderColor(t=!0){this._data.data&&[...this._data.data.datasets].forEach((e=>["pie","doughnut","polarArea"].includes(this._type)&&(e.borderColor=t?this._darkOptions.darkBgColor:this._darkOptions.darkBgColorLight)))}static jQueryInterface(t,e,i){return this.each((function(){let s=n.getData(this,Up);if(s||!/dispose/.test(t)){if(!s){const n=e?qp(e,i,Xp):Xp[i];s=new Gp(this,t,n)}if("string"==typeof t){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](e,i)}}}))}static getInstance(t){return n.getData(t,Up)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}}const Jp="lightbox",t_="mdb.lightbox",e_=`click${`.${t_}`}.data-api`,i_="lightbox-gallery-caption",s_=`[data-mdb-${Jp}-init] img:not(.lightbox-disabled)`,n_={container:"string",zoomLevel:"(number|string)"},o_={container:"body",zoomLevel:1};class a_ extends to{constructor(t,e={}){super(t),this._options=e,this._getContainer(),this._id=`lightbox-${Math.random().toString(36).substr(2,9)}`,this._activeImg=0,this._images=[],this._zoom=1,this._gallery=null,this._galleryToolbar=null,this._galleryContent=null,this._loader=null,this._imgCounter=null,this._animating=!1,this._fullscreen=!1,this._zoomBtn=null,this._fullscreenBtn=null,this._toolsToggleTimer=0,this._mousedown=!1,this._mousedownPositionX=0,this._mousedownPositionY=0,this._originalPositionX=0,this._originalPositionY=0,this._positionX=0,this._positionY=0,this._zoomTimer=0,this._tapCounter=0,this._tapTime=0,this._rightArrow=null,this._leftArrowWrapper=null,this._rightArrowWrapper=null,this._initiated=!1,this._multitouch=!1,this._touchZoomPosition=[],this._element&&(this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return Jp}get activeImg(){return this._activeImg}get currentImg(){return B.findOne(".active",this._galleryContent)}get options(){const t={...o_,...R.getDataAttributes(this._element),...this._options};return d(Jp,t,n_),t}init(){this._initiated||(this._appendTemplate(),this._initiated=!0)}open(t=0){this._getImages(),this._setActiveImg(t),this._sortImages(),this._triggerEvents("open","opened"),this._loadImages().then((t=>{this._resizeImages(t),this._toggleTemplate(),this._addEvents(),this._focusFullscreenBtn()}))}close(){this.reset(),this._removeEvents(),this._toggleTemplate(),this._triggerEvents("close","closed")}slide(t="right"){!0===this._animating||this._images.length<=1||(this._triggerEvents("slide","slid"),this._beforeSlideEvents(),"right"===t&&this._slideHorizontally(t),"left"===t&&this._slideHorizontally(t),"first"===t&&this._slideToTarget(t),"last"===t&&this._slideToTarget(t),this._afterSlideEvents())}zoomIn(){this._zoom>=3||(this._triggerEvents("zoomIn","zoomedIn"),this._zoom+=parseFloat(this.options.zoomLevel),R.style(this.currentImg.parentNode,{transform:`scale(${this._zoom})`}),this._updateZoomBtn())}zoomOut(){this._zoom<=1||(this._triggerEvents("zoomOut","zoomedOut"),this._zoom-=parseFloat(this.options.zoomLevel),R.style(this.currentImg.parentNode,{transform:`scale(${this._zoom})`}),this._updateZoomBtn(),this._updateImgPosition())}toggleFullscreen(){!1===this._fullscreen?(R.addClass(this._fullscreenBtn,"active"),this._gallery.requestFullscreen&&this._gallery.requestFullscreen(),this._fullscreen=!0):(R.removeClass(this._fullscreenBtn,"active"),document.exitFullscreen&&document.exitFullscreen(),this._fullscreen=!1)}reset(){this._restoreDefaultFullscreen(),this._restoreDefaultPosition(),this._restoreDefaultZoom(),clearTimeout(this._toolsToggleTimer),clearTimeout(this._doubleTapTimer)}dispose(){$.off(document,e_,s_,this.toggle),this._galleryContent&&this._removeEvents(),this._gallery&&this._gallery.remove(),n.removeData(this._element,t_),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),this._element=null}_getImages(){const t=B.find("img",this._element).filter((t=>!t.classList.contains("lightbox-disabled")));this._images=t}_getContainer(){this._container=B.findOne(this.options.container)}_setActiveImg(t){this._activeImg="number"==typeof t?t:this._images.indexOf(t.target)}_appendTemplate(){this._gallery=g("div"),R.addClass(this._gallery,"lightbox-gallery"),this._element.dataset.id=this._id,this._gallery.id=this._id,this._appendLoader(),this._appendToolbar(),this._appendContent(),this._appendArrows(),this._appendCaption(),this._container.append(this._gallery)}_appendToolbar(){this._galleryToolbar=g("div"),this._imgCounter=g("p"),this._fullscreenBtn=g("button"),this._zoomBtn=g("button");const t=g("div"),e=g("div"),i=g("button");R.addClass(this._galleryToolbar,"lightbox-gallery-toolbar"),R.addClass(this._imgCounter,"lightbox-gallery-counter"),R.addClass(this._fullscreenBtn,"lightbox-gallery-fullscreen-btn"),R.addClass(this._zoomBtn,"lightbox-gallery-zoom-btn"),R.addClass(t,"lightbox-gallery-left-tools"),R.addClass(e,"lightbox-gallery-right-tools"),R.addClass(i,"lightbox-gallery-close-btn"),this._fullscreenBtn.setAttribute("aria-label","Toggle fullscreen"),this._zoomBtn.setAttribute("aria-label","Zoom in"),i.setAttribute("aria-label","Close"),$.on(this._fullscreenBtn,e_,(()=>this.toggleFullscreen())),$.on(this._zoomBtn,e_,(()=>this._toggleZoom())),$.on(i,e_,(()=>this.close())),t.append(this._imgCounter),e.append(this._fullscreenBtn),e.append(this._zoomBtn),e.append(i),this._galleryToolbar.append(t),this._galleryToolbar.append(e),this._gallery.append(this._galleryToolbar)}_appendContent(){this._galleryContent=g("div"),R.addClass(this._galleryContent,"lightbox-gallery-content"),this._gallery.append(this._galleryContent)}_appendLoader(){this._loader=g("div");const t=g("div"),e=g("span");R.addClass(this._loader,"lightbox-gallery-loader"),R.addClass(t,"spinner-grow"),R.addClass(t,"text-light"),R.addClass(e,"sr-only"),t.setAttribute("role","status"),e.innerHTML="Loading...",t.append(e),this._loader.append(t),this._gallery.append(this._loader)}_appendArrows(){this._leftArrowWrapper=g("div"),R.addClass(this._leftArrowWrapper,"lightbox-gallery-arrow-left");const t=g("button");t.setAttribute("aria-label","Previous"),$.on(t,e_,(()=>this.slide("left"))),this._leftArrowWrapper.append(t),this._rightArrowWrapper=g("div"),R.addClass(this._rightArrowWrapper,"lightbox-gallery-arrow-right"),this._rightArrow=g("button"),this._rightArrow.setAttribute("aria-label","Next"),$.on(this._rightArrow,e_,(()=>this.slide())),this._rightArrowWrapper.append(this._rightArrow),this._getImages(),this._images.length<=1||(this._gallery.append(this._leftArrowWrapper),this._gallery.append(this._rightArrowWrapper))}_appendCaption(){const t=g("div"),e=g("p");R.addClass(t,"lightbox-gallery-caption-wrapper"),R.addClass(e,i_),t.append(e),this._gallery.append(t)}_sortImages(){for(let t=0;t{t.push(new Promise((t=>{const o=new Image,a=g("div");R.addClass(a,"lightbox-gallery-image"),this._addImgStyles(o,a,i,n,s),a.append(o),this._galleryContent.append(a),o.onload=t,o.src=s.dataset.mdbImg||s.src,e.push(o),i+=100})))})),await Promise.all(t),e}_addImgStyles(t,e,i,s,n){t.alt=n.alt,t.draggable=!1,R.style(e,{position:"absolute",left:`${i}%`,top:0}),(n.dataset.mdbCaption||""===n.dataset.mdbCaption)&&(t.dataset.caption=n.dataset.mdbCaption),0===i?(t.width1&&R.style(e,{left:"-100%"})}_resizeImages(t){t.forEach((t=>{this._calculateImgSize(t)}))}_calculateImgSize(t){t.width>=t.height?(t.style.width="100%",t.style.maxWidth="100%",t.style.height="auto",t.style.top=(t.parentNode.offsetHeight-t.height)/2+"px",t.style.left=0):(t.style.height="100%",t.style.maxHeight="100%",t.style.width="auto",t.style.left=(t.parentNode.offsetWidth-t.width)/2+"px",t.style.top=0),t.width>=t.parentNode.offsetWidth&&(t.style.width=`${t.parentNode.offsetWidth}px`,t.style.height="auto",t.style.left=0,t.style.top=(t.parentNode.offsetHeight-t.height)/2+"px"),t.height>=t.parentNode.offsetHeight&&(t.style.height=`${t.parentNode.offsetHeight}px`,t.style.width="auto",t.style.top=0,t.style.left=(t.parentNode.offsetWidth-t.width)/2+"px"),this._positionX=parseFloat(t.style.left)||0,this._positionY=parseFloat(t.style.top)||0}_onResize(){this._images=B.find("img",this._galleryContent),this._images.forEach((t=>{this._calculateImgSize(t)}))}_onFullscreenChange(){void 0===(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement)&&(this._fullscreen=!1,R.removeClass(this._fullscreenBtn,"active"))}_beforeSlideEvents(){this._animationStart(),this._restoreDefaultZoom(),this._restoreDefaultPosition(),this._resetDoubleTap()}_slideHorizontally(t){this._images=B.find("img",this._galleryContent),this._images.forEach((e=>{let i;"right"===t?(i=parseInt(e.parentNode.style.left,10)-100,i<-100&&(i=100*(this._images.length-2))):(i=parseInt(e.parentNode.style.left,10)+100,i===100*(this._images.length-1)&&(i=-100)),this._slideImg(e,i)})),this._updateActiveImg(t)}_slideImg(t,e){0===e?(R.addClass(t,"active"),R.style(t.parentNode,{opacity:1,transform:"scale(1)"})):(R.removeClass(t,"active"),R.style(t.parentNode,{opacity:0,transform:"scale(0.25)"})),t.parentNode.style.left=`${e}%`}_slideToTarget(t){"first"===t&&0===this._activeImg||"last"===t&&this._activeImg===this._images.length-1||(this.reset(),this._removeEvents(),this._showLoader(),this._getImages(),this._activeImg="first"===t?0:this._images.length-1,this._sortImages(),R.style(this.currentImg.parentNode,{transform:"scale(0.25)",opacity:0}),setTimeout((()=>{this._loadImages().then((t=>{this._resizeImages(t),this._addEvents(),this._updateCaption(),this._hideLoader(),setTimeout((()=>{R.style(this.currentImg.parentNode,{transform:"scale(1)",opacity:1})}),10)}))}),400))}_updateActiveImg(t){"right"===t&&(this._activeImg===this._images.length-1?this._activeImg=0:this._activeImg++),"left"===t&&(0===this._activeImg?this._activeImg=this._images.length-1:this._activeImg--)}_afterSlideEvents(){this._updateCounter(),this._updateCaption()}_updateCounter(){this._images.length<=1||setTimeout((()=>{this._imgCounter.innerHTML=`${this._activeImg+1} / ${this._images.length}`}),200)}_updateCaption(){setTimeout((()=>{let t=this.currentImg.alt;(this.currentImg.dataset.caption||""===this.currentImg.dataset.caption)&&(t=this.currentImg.dataset.caption),B.findOne(`.${i_}`,this._gallery).innerHTML=t}),200)}_toggleTemplate(){"visible"===this._gallery.style.visibility?(R.style(this.currentImg.parentNode,{transform:"scale(0.25)"}),setTimeout((()=>{this._hideGallery(),this._enableScroll(),this._showLoader()}),100)):(this._showGallery(),this._disableScroll(),this._updateCounter(),this._updateCaption(),this._setToolsToggleTimout(),this._hideLoader())}_showLoader(){R.style(this._loader,{opacity:1})}_hideLoader(){R.style(this._loader,{opacity:0})}_hideGallery(){R.style(this._gallery,{opacity:0,pointerEvents:"none",visibility:"hidden"})}_showGallery(){R.style(this._gallery,{opacity:1,pointerEvents:"initial",visibility:"visible"}),setTimeout((()=>{R.style(this.currentImg.parentNode,{transform:"scale(1)"})}),50)}_toggleZoom(){1!==this._zoom?this._restoreDefaultZoom():this.zoomIn()}_updateZoomBtn(){this._zoom>1?(R.addClass(this._zoomBtn,"active"),this._zoomBtn.setAttribute("aria-label","Zoom out")):(R.removeClass(this._zoomBtn,"active"),this._zoomBtn.setAttribute("aria-label","Zoom in"))}_updateImgPosition(){1===this._zoom&&this._restoreDefaultPosition()}_addEvents(){const t=B.find("img",this._galleryContent);this._onWindowTouchmove=this._onWindowTouchmove.bind(this),this._onWindowTouchstart=this._onWindowTouchstart.bind(this),this._onImgMousedown=this._onMousedown.bind(this),this._onImgMousemove=this._onMousemove.bind(this),this._onImgWheel=this._onZoom.bind(this),this._onImgMouseup=this._onMouseup.bind(this),this._onImgTouchend=this._onTouchend.bind(this),this._onImgDoubleClick=this._onDoubleClick.bind(this),this._onWindowResize=this._onResize.bind(this),this._onWindowFullscreenChange=this._onFullscreenChange.bind(this),this._onAnyImgAction=this._resetToolsToggler.bind(this),this._onGalleryClick=this._onBackdropClick.bind(this),this._onKeyupEvent=this._onKeyup.bind(this),this._onRightArrowKeydownEvent=this._onRightArrowKeydown.bind(this),this._onFullscreenBtnKeydownEvent=this._onFullscreenBtnKeydown.bind(this),t.forEach((t=>{$.on(t,"mousedown",this._onImgMousedown,{passive:!0}),$.on(t,"touchstart",this._onImgMousedown,{passive:!0}),$.on(t,"mousemove",this._onImgMousemove,{passive:!0}),$.on(t,"touchmove",this._onImgMousemove,{passive:!0}),$.on(t,"wheel",this._onImgWheel,{passive:!0}),$.on(t,"dblclick",this._onImgDoubleClick,{passive:!0})})),document.addEventListener("touchmove",this._onWindowTouchmove,{passive:!1}),$.on(window,"touchstart",this._onWindowTouchstart),$.on(window,"mouseup",this._onImgMouseup),$.on(window,"touchend",this._onImgTouchend),$.on(window,"resize",this._onWindowResize),$.on(window,"orientationchange",this._onWindowResize),$.on(window,"keyup",this._onKeyupEvent),$.on(window,"fullscreenchange",this._onWindowFullscreenChange),$.on(this._gallery,"mousemove",this._onAnyImgAction),$.on(this._gallery,"click",this._onGalleryClick),$.on(this._rightArrow,"keydown",this._onRightArrowKeydownEvent),$.on(this._fullscreenBtn,"keydown",this._onFullscreenBtnKeydownEvent)}_removeEvents(){B.find("img",this._galleryContent).forEach((t=>{$.off(t,"mousedown",this._onImgMousedown),$.off(t,"touchstart",this._onImgMousedown),$.off(t,"mousemove",this._onImgMousemove),$.off(t,"touchmove",this._onImgMousemove),$.off(t,"wheel",this._onImgWheel),$.off(t,"dblclick",this._onImgDoubleClick)})),document.removeEventListener("touchmove",this._onWindowTouchmove,{passive:!1}),$.off(window,"touchstart",this._onWindowTouchstart),$.off(window,"mouseup",this._onImgMouseup),$.off(window,"touchend",this._onImgTouchend),$.off(window,"resize",this._onWindowResize),$.off(window,"orientationchange",this._onWindowResize),$.off(window,"keyup",this._onKeyupEvent),$.off(window,"fullscreenchange",this._onWindowFullscreenChange),$.off(this._gallery,"mousemove",this._onAnyImgAction),$.off(this._gallery,"click",this._onGalleryClick),$.off(this._rightArrow,"keydown",this._onRightArrowKeydownEvent),$.off(this._fullscreenBtn,"keydown",this._onFullscreenBtnKeydownEvent)}_onMousedown(t){const e=t.touches,i=e?e[0].clientX:t.clientX,s=e?e[0].clientY:t.clientY;this._originalPositionX=parseFloat(this.currentImg.style.left)||0,this._originalPositionY=parseFloat(this.currentImg.style.top)||0,this._positionX=this._originalPositionX,this._positionY=this._originalPositionY,this._mousedownPositionX=i*(1/this._zoom)-this._positionX,this._mousedownPositionY=s*(1/this._zoom)-this._positionY,this._mousedown=!0,"touchstart"===t.type&&t.touches.length>1&&(this._multitouch=!0,this._touchZoomPosition=t.touches)}_onMousemove(t){if(!this._mousedown)return;const e=t.touches,i=e?e[0].clientX:t.clientX,s=e?e[0].clientY:t.clientY;if(e&&this._resetToolsToggler(),!this._multitouch)if(1!==this._zoom)this._positionX=i*(1/this._zoom)-this._mousedownPositionX,this._positionY=s*(1/this._zoom)-this._mousedownPositionY,R.style(this.currentImg,{left:`${this._positionX}px`,top:`${this._positionY}px`});else{if(this._images.length<=1)return;this._positionX=i*(1/this._zoom)-this._mousedownPositionX,R.style(this.currentImg,{left:`${this._positionX}px`})}}_onMouseup(t){this._mousedown=!1,this._moveImg(t.target)}_onTouchend(t){this._mousedown=!1,this._multitouch?0===t.targetTouches.length&&(this._multitouch=!1,this._touchZoomPosition=[]):this._multitouch||(this._checkDoubleTap(t),this._moveImg(t.target))}_calculateTouchZoom(t){const e=Math.hypot(this._touchZoomPosition[1].pageX-this._touchZoomPosition[0].pageX,this._touchZoomPosition[1].pageY-this._touchZoomPosition[0].pageY),i=Math.hypot(t.touches[1].pageX-t.touches[0].pageX,t.touches[1].pageY-t.touches[0].pageY);Math.abs(e-i)>.03*t.view.screen.width&&(e<=i?this.zoomIn():this.zoomOut(),this._touchZoomPosition=t.touches)}_onWindowTouchstart(t){t.touches.length>1&&(this._multitouch=!0,this._touchZoomPosition=t.touches)}_onWindowTouchmove(t){t.preventDefault(),"touchmove"===t.type&&t.targetTouches.length>1&&this._calculateTouchZoom(t)}_onRightArrowKeydown(t){switch(t.keyCode){case 9:if(t.shiftKey)break;t.preventDefault(),this._focusFullscreenBtn()}}_onFullscreenBtnKeydown(t){switch(t.keyCode){case 9:if(!t.shiftKey)break;t.preventDefault(),this._focusRightArrow()}}_onKeyup(t){switch(this._resetToolsToggler(),t.keyCode){case 39:f?this.slide("left"):this.slide();break;case 37:f?this.slide():this.slide("left");break;case 27:this.close();break;case 36:this.slide("first");break;case 35:this.slide("last");break;case 38:this.zoomIn();break;case 40:this.zoomOut()}}_focusFullscreenBtn(){setTimeout((()=>{this._fullscreenBtn.focus()}),100)}_focusRightArrow(){this._rightArrow.focus()}_moveImg(t){if(this._multitouch)return;if(1!==this._zoom||t!==this.currentImg||this._images.length<=1)return;const e=this._positionX-this._originalPositionX;e>0?f?this.slide():this.slide("left"):e<0&&(f?this.slide("left"):this.slide())}_checkDoubleTap(t){clearTimeout(this._doubleTapTimer);const e=(new Date).getTime()-this._tapTime;this._tapCounter>0&&e<500?(this._onDoubleClick(t),this._doubleTapTimer=setTimeout((()=>{this._tapTime=(new Date).getTime(),this._tapCounter=0}),300)):(this._tapCounter++,this._tapTime=(new Date).getTime())}_resetDoubleTap(){this._tapTime=0,this._tapCounter=0,clearTimeout(this._doubleTapTimer)}_onDoubleClick(t){this._multitouch||(t.touches||this._setNewPositionOnZoomIn(t),1!==this._zoom?this._restoreDefaultZoom():this.zoomIn())}_onZoom(t){if(t.deltaY>0)this.zoomOut();else{if(this._zoom>=3)return;this._setNewPositionOnZoomIn(t),this.zoomIn()}}_onBackdropClick(t){this._resetToolsToggler(),"DIV"===t.target.tagName&&this.close()}_setNewPositionOnZoomIn(t){clearTimeout(this._zoomTimer),this._positionX=window.innerWidth/2-t.offsetX-50,this._positionY=window.innerHeight/2-t.offsetY-50,this.currentImg.style.transition="all 0.5s ease-out",this.currentImg.style.left=`${this._positionX}px`,this.currentImg.style.top=`${this._positionY}px`,this._zoomTimer=setTimeout((()=>{this.currentImg.style.transition="none"}),500)}_resetToolsToggler(){this._showTools(),clearTimeout(this._toolsToggleTimer),this._setToolsToggleTimout()}_setToolsToggleTimout(){this._toolsToggleTimer=setTimeout((()=>{this._hideTools(),clearTimeout(this._toolsToggleTimer)}),4e3)}_hideTools(){R.style(this._galleryToolbar,{opacity:0}),R.style(this._leftArrowWrapper,{opacity:0}),R.style(this._rightArrowWrapper,{opacity:0})}_showTools(){R.style(this._galleryToolbar,{opacity:1}),R.style(this._leftArrowWrapper,{opacity:1}),R.style(this._rightArrowWrapper,{opacity:1})}_disableScroll(){R.addClass(document.body,"disabled-scroll"),document.documentElement.scrollHeight>document.documentElement.clientHeight&&R.addClass(document.body,"replace-scrollbar")}_enableScroll(){setTimeout((()=>{R.removeClass(document.body,"disabled-scroll"),R.removeClass(document.body,"replace-scrollbar")}),300)}_animationStart(){this._animating=!0,setTimeout((()=>{this._animating=!1}),400)}_restoreDefaultZoom(){1!==this._zoom&&(this._zoom=1,R.style(this.currentImg.parentNode,{transform:`scale(${this._zoom})`}),this._updateZoomBtn(),this._updateImgPosition())}_restoreDefaultFullscreen(){this._fullscreen&&this.toggleFullscreen()}_restoreDefaultPosition(){clearTimeout(this._zoomTimer);const t=this.currentImg;R.style(this.currentImg.parentNode,{left:0,top:0}),R.style(this.currentImg,{transition:"all 0.5s ease-out",left:0,top:0}),this._calculateImgSize(t),setTimeout((()=>{R.style(this.currentImg,{transition:"none"})}),500)}async _triggerEvents(t,e){$.trigger(this._element,`${t}.mdb.lightbox`),e&&await setTimeout((()=>{$.trigger(this._element,`${e}.mdb.lightbox`)}),505)}static toggle(){return function(t){const e=B.closest(t.target,".lightbox");(a_.getInstance(e)||new a_(e)).open(t)}}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,t_);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new a_(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const r_="rating",l_=`mdb.${r_}`,h_=`.${l_}`,c_={tooltip:"string",value:"(string|number)",readonly:"boolean",after:"string",before:"string",dynamic:"boolean"},d_={tooltip:"top",value:"",readonly:!1,after:"",before:"",dynamic:!1},u_=`scoreSelect${h_}`,p_=`scoreHover${h_}`,__=`keyup${h_}`,m_=`focusout${h_}`,f_=`keydown${h_}`,g_=`mousedown${h_}`;class b_ extends to{constructor(t,e){super(t),this._icons=B.find("i",this._element),this._options=this._getConfig(e),this._index=-1,this._savedIndex=null,this._originalClassList=[],this._fn={},this._tooltips=[],this._element&&(this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return r_}dispose(){this._options.readonly||($.off(this._element,__),$.off(this._element,m_),$.off(this._element,f_),this._element.removeEventListener("mouseleave",this._fn.mouseleave),this._icons.forEach(((t,e)=>{$.off(t,g_),t.removeEventListener("mouseenter",this._fn.mouseenter[e])})),this._tooltips.forEach((t=>{t._element.removeAttribute("data-mdb-toggle"),t.dispose()})),this._element.removeAttribute("tabIndex")),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_init(){this._options.readonly||(this._bindMouseEnter(),this._bindMouseLeave(),this._bindMouseDown(),this._bindKeyDown(),this._bindKeyUp(),this._bindFocusLost()),this._options.dynamic&&this._saveOriginalClassList(),this._setCustomText(),this._setCustomColor(),this._setToolTips(),this._options.value&&(this._index=this._options.value-1,this._updateRating(this._index))}_getConfig(t){const e=R.getDataAttributes(this._element);return t={...d_,...e,...t},d(r_,t,c_),t}_bindMouseEnter(){this._fn.mouseenter=[],this._icons.forEach(((t,e)=>{t.addEventListener("mouseenter",this._fn.mouseenter[e]=e=>{this._index=this._icons.indexOf(e.target),this._updateRating(this._index),this._triggerEvents(t,p_)})}))}_bindMouseLeave(){this._element.addEventListener("mouseleave",this._fn.mouseleave=()=>{null!==this._savedIndex?(this._updateRating(this._savedIndex),this._index=this._savedIndex):this._options.value?(this._updateRating(this._options.value-1),this._index=this._options.value-1):(this._index=-1,this._clearRating())})}_bindMouseDown(){this._icons.forEach((t=>{$.on(t,g_,(()=>{this._setElementOutline("none"),this._savedIndex=this._index,this._triggerEvents(t,u_)}))}))}_bindKeyDown(){this._element.tabIndex=0,$.on(this._element,f_,(t=>this._updateAfterKeyDown(t)))}_bindKeyUp(){$.on(this._element,__,(()=>this._setElementOutline("auto")))}_bindFocusLost(){$.on(this._element,m_,(()=>this._setElementOutline("none")))}_setElementOutline(t){this._element.style.outline=t}_triggerEvents(t,e){$.trigger(t,e,{value:this._index+1})}_updateAfterKeyDown(t){const e=this._icons.length-1,i=this._index;"ArrowRight"===t.key&&this._index-1&&(this._index-=1),i!==this._index&&(this._savedIndex=this._index,this._updateRating(this._savedIndex),this._triggerEvents(this._icons[this._savedIndex],u_))}_updateRating(t){this._clearRating(),this._options.dynamic&&this._restoreOriginalIcon(t),this._icons.forEach(((e,i)=>{i<=t&&(e.classList.add("fas","active"),e.classList.remove("far"))}))}_clearRating(){this._icons.forEach(((t,e)=>{this._options.dynamic?t.classList=this._originalClassList[e]:(t.classList.remove("fas","active"),t.classList.add("far"))}))}_setToolTips(){this._icons.forEach(((t,e)=>{const i=R.getDataAttribute(t,"toggle");t.title&&!i&&(R.setDataAttribute(t,"toggle","tooltip"),this._tooltips[e]=new Jn(t,{placement:this._options.tooltip}))}))}_setCustomText(){this._icons.forEach((t=>{const e=R.getDataAttribute(t,"after"),i=R.getDataAttribute(t,"before");e&&t.insertAdjacentHTML("afterEnd",e),i&&t.insertAdjacentHTML("beforeBegin",i)}))}_setCustomColor(){this._icons.forEach((t=>{const e=R.getDataAttribute(t,"color");e&&(t.style.color=e)}))}_saveOriginalClassList(){this._icons.forEach((t=>{const e=t.classList.value;this._originalClassList.push(e)}))}_restoreOriginalIcon(t){const e=this._originalClassList[t],i=R.getDataAttribute(this._icons[t],"color");this._icons.forEach(((s,n)=>{n<=t&&(s.classList=e,s.style.color=i)}))}static autoInit(t){return new b_(t)}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,l_);const s="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new b_(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}function v_(t){return getComputedStyle(t)}function y_(t,e){for(const i in e){let s=e[i];"number"==typeof s&&(s=`${s}px`),t.style[i]=s}return t}function x_(t){const e=document.createElement("div");return e.className=t,e}const w_="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function C_(t,e){if(!w_)throw new Error("No element matching method supported");return w_.call(t,e)}function k_(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function T_(t,e){return Array.prototype.filter.call(t.children,(t=>C_(t,e)))}const A_={main:"ps",rtl:"ps__rtl",element:{thumb:t=>`ps__thumb-${t}`,rail:t=>`ps__rail-${t}`,consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:t=>`ps--active-${t}`,scrolling:t=>`ps--scrolling-${t}`}},S_={x:null,y:null};function E_(t,e){const i=t.element.classList,s=A_.state.scrolling(e);i.contains(s)?clearTimeout(S_[e]):i.add(s)}function M_(t,e){S_[e]=setTimeout((()=>t.isAlive&&t.element.classList.remove(A_.state.scrolling(e))),t.settings.scrollingThreshold)}let O_=class{constructor(t){this.element=t,this.handlers={}}bind(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)}unbind(t,e){this.handlers[t]=this.handlers[t].filter((i=>!(!e||i===e)||(this.element.removeEventListener(t,i,!1),!1)))}unbindAll(){for(const t in this.handlers)this.unbind(t)}get isEmpty(){return Object.keys(this.handlers).every((t=>0===this.handlers[t].length))}},D_=class{constructor(){this.eventElements=[]}eventElement(t){let e=this.eventElements.filter((e=>e.element===t))[0];return e||(e=new O_(t),this.eventElements.push(e)),e}bind(t,e,i){this.eventElement(t).bind(e,i)}unbind(t,e,i){const s=this.eventElement(t);s.unbind(e,i),s.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(s),1)}unbindAll(){this.eventElements.forEach((t=>t.unbindAll())),this.eventElements=[]}once(t,e,i){const s=this.eventElement(t),n=t=>{s.unbind(e,n),i(t)};s.bind(e,n)}};function I_(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);const e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function $_(t,e,i,s=!0,n=!1){let o;if("top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,[i,s,n,o,a,r],l=!0,h=!1){const c=t.element;t.reach[o]=null,c[n]<1&&(t.reach[o]="start");c[n]>t[i]-t[s]-1&&(t.reach[o]="end");e&&(c.dispatchEvent(I_(`ps-scroll-${o}`)),e<0?c.dispatchEvent(I_(`ps-scroll-${a}`)):e>0&&c.dispatchEvent(I_(`ps-scroll-${r}`)),l&&function(t,e){E_(t,e),M_(t,e)}(t,o));t.reach[o]&&(e||h)&&c.dispatchEvent(I_(`ps-${o}-reach-${t.reach[o]}`))}(t,i,o,s,n)}function L_(t){return parseInt(t,10)||0}const P_={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function N_(t){const e=t.element,i=Math.floor(e.scrollTop),s=e.getBoundingClientRect();t.containerWidth=Math.floor(s.width),t.containerHeight=Math.floor(s.height),t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(T_(e,A_.element.rail("x")).forEach((t=>k_(t))),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(T_(e,A_.element.rail("y")).forEach((t=>k_(t))),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){const i={width:e.railXWidth},s=Math.floor(t.scrollTop);e.isRtl?i.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:i.left=t.scrollLeft;e.isScrollbarXUsingBottom?i.bottom=e.scrollbarXBottom-s:i.top=e.scrollbarXTop+s;y_(e.scrollbarXRail,i);const n={top:s,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?n.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:n.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:n.left=e.scrollbarYLeft+t.scrollLeft;y_(e.scrollbarYRail,n),y_(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),y_(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(A_.state.active("x")):(e.classList.remove(A_.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?e.classList.add(A_.state.active("y")):(e.classList.remove(A_.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)}function R_(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function B_(t,[e,i,s,n,o,a,r,l,h]){const c=t.element;let d=null,u=null,p=null;function _(e){e.touches&&e.touches[0]&&(e[s]=e.touches[0].pageY),c[r]=d+p*(e[s]-u),E_(t,l),N_(t),e.stopPropagation(),e.preventDefault()}function m(){M_(t,l),t[h].classList.remove(A_.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",_)}function f(o,l){d=c[r],l&&o.touches&&(o[s]=o.touches[0].pageY),u=o[s],p=(t[i]-t[e])/(t[n]-t[a]),l?t.event.bind(t.ownerDocument,"touchmove",_):(t.event.bind(t.ownerDocument,"mousemove",_),t.event.once(t.ownerDocument,"mouseup",m),o.preventDefault()),t[h].classList.add(A_.state.clicking),o.stopPropagation()}t.event.bind(t[o],"mousedown",(t=>{f(t)})),t.event.bind(t[o],"touchstart",(t=>{f(t,!0)}))}const H_={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",(t=>t.stopPropagation())),t.event.bind(t.scrollbarYRail,"mousedown",(e=>{const i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*t.containerHeight,N_(t),e.stopPropagation()})),t.event.bind(t.scrollbarX,"mousedown",(t=>t.stopPropagation())),t.event.bind(t.scrollbarXRail,"mousedown",(e=>{const i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*t.containerWidth,N_(t),e.stopPropagation()}))},"drag-thumb":function(t){B_(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),B_(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){const e=t.element;t.event.bind(t.ownerDocument,"keydown",(i=>{if(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)return;if(!C_(e,":hover")&&!C_(t.scrollbarX,":focus")&&!C_(t.scrollbarY,":focus"))return;let s=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(s){if("IFRAME"===s.tagName)s=s.contentDocument.activeElement;else for(;s.shadowRoot;)s=s.shadowRoot.activeElement;if(C_(n=s,"input,[contenteditable]")||C_(n,"select,[contenteditable]")||C_(n,"textarea,[contenteditable]")||C_(n,"button,[contenteditable]"))return}var n;let o=0,a=0;switch(i.which){case 37:o=i.metaKey?-t.contentWidth:i.altKey?-t.containerWidth:-30;break;case 38:a=i.metaKey?t.contentHeight:i.altKey?t.containerHeight:30;break;case 39:o=i.metaKey?t.contentWidth:i.altKey?t.containerWidth:30;break;case 40:a=i.metaKey?-t.contentHeight:i.altKey?-t.containerHeight:-30;break;case 32:a=i.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=o,N_(t),function(i,s){const n=Math.floor(e.scrollTop);if(0===i){if(!t.scrollbarYActive)return!1;if(0===n&&s>0||n>=t.contentHeight-t.containerHeight&&s<0)return!t.settings.wheelPropagation}const o=e.scrollLeft;if(0===s){if(!t.scrollbarXActive)return!1;if(0===o&&i<0||o>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}(o,a)&&i.preventDefault())}))},wheel:function(t){const e=t.element;function i(i){const[s,n]=function(t){let e=t.deltaX,i=-1*t.deltaY;return void 0!==e&&void 0!==i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!=e&&i!=i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}(i);if(function(t,i,s){if(!P_.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;let n=t;for(;n&&n!==e;){if(n.classList.contains(A_.element.consuming))return!0;const t=v_(n);if(s&&t.overflowY.match(/(scroll|auto)/)){const t=n.scrollHeight-n.clientHeight;if(t>0&&(n.scrollTop>0&&s<0||n.scrollTop0))return!0}if(i&&t.overflowX.match(/(scroll|auto)/)){const t=n.scrollWidth-n.clientWidth;if(t>0&&(n.scrollLeft>0&&i<0||n.scrollLeft0))return!0}n=n.parentNode}return!1}(i.target,s,n))return;let o=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(n?e.scrollTop-=n*t.settings.wheelSpeed:e.scrollTop+=s*t.settings.wheelSpeed,o=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(s?e.scrollLeft+=s*t.settings.wheelSpeed:e.scrollLeft-=n*t.settings.wheelSpeed,o=!0):(e.scrollTop-=n*t.settings.wheelSpeed,e.scrollLeft+=s*t.settings.wheelSpeed),N_(t),o=o||function(i,s){const n=Math.floor(e.scrollTop),o=0===e.scrollTop,a=n+e.offsetHeight===e.scrollHeight,r=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;let h;return h=Math.abs(s)>Math.abs(i)?o||a:r||l,!h||!t.settings.wheelPropagation}(s,n),o&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}void 0!==window.onwheel?t.event.bind(e,"wheel",i):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",i)},touch:function(t){if(!P_.supportsTouch&&!P_.supportsIePointer)return;const e=t.element;function i(i,s){e.scrollTop-=s,e.scrollLeft-=i,N_(t)}let s={},n=0,o={},a=null;function r(t){return t.targetTouches?t.targetTouches[0]:t}function l(t){return(!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function h(t){if(!l(t))return;const e=r(t);s.pageX=e.pageX,s.pageY=e.pageY,n=(new Date).getTime(),null!==a&&clearInterval(a)}function c(a){if(l(a)){const l=r(a),h={pageX:l.pageX,pageY:l.pageY},c=h.pageX-s.pageX,d=h.pageY-s.pageY;if(function(t,i,s){if(!e.contains(t))return!1;let n=t;for(;n&&n!==e;){if(n.classList.contains(A_.element.consuming))return!0;const t=v_(n);if(s&&t.overflowY.match(/(scroll|auto)/)){const t=n.scrollHeight-n.clientHeight;if(t>0&&(n.scrollTop>0&&s<0||n.scrollTop0))return!0}if(i&&t.overflowX.match(/(scroll|auto)/)){const t=n.scrollWidth-n.clientWidth;if(t>0&&(n.scrollLeft>0&&i<0||n.scrollLeft0))return!0}n=n.parentNode}return!1}(a.target,c,d))return;i(c,d),s=h;const u=(new Date).getTime(),p=u-n;p>0&&(o.x=c/p,o.y=d/p,n=u),function(i,s){const n=Math.floor(e.scrollTop),o=e.scrollLeft,a=Math.abs(i),r=Math.abs(s);if(r>a){if(s<0&&n===t.contentHeight-t.containerHeight||s>0&&0===n)return 0===window.scrollY&&s>0&&P_.isChrome}else if(a>r&&(i<0&&o===t.contentWidth-t.containerWidth||i>0&&0===o))return!0;return!0}(c,d)&&a.preventDefault()}}function d(){t.settings.swipeEasing&&(clearInterval(a),a=setInterval((function(){t.isInitialized?clearInterval(a):o.x||o.y?Math.abs(o.x)<.01&&Math.abs(o.y)<.01?clearInterval(a):(i(30*o.x,30*o.y),o.x*=.8,o.y*=.8):clearInterval(a)}),10))}P_.supportsTouch?(t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",c),t.event.bind(e,"touchend",d)):P_.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",c),t.event.bind(e,"pointerup",d)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",c),t.event.bind(e,"MSPointerUp",d)))}};let W_=class{constructor(t,e={}){if("string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=t,t.classList.add(A_.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1};for(const a in e)this.settings[a]=e[a];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;const i=()=>t.classList.add(A_.state.focus),s=()=>t.classList.remove(A_.state.focus);this.isRtl="rtl"===v_(t).direction,!0===this.isRtl&&t.classList.add(A_.rtl),this.isNegativeScroll=(()=>{const e=t.scrollLeft;let i=null;return t.scrollLeft=-1,i=t.scrollLeft<0,t.scrollLeft=e,i})(),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new D_,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=x_(A_.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=x_(A_.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",i),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;const n=v_(this.scrollbarXRail);this.scrollbarXBottom=parseInt(n.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=L_(n.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=L_(n.borderLeftWidth)+L_(n.borderRightWidth),y_(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=L_(n.marginLeft)+L_(n.marginRight),y_(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=x_(A_.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=x_(A_.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",i),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;const o=v_(this.scrollbarYRail);this.scrollbarYRight=parseInt(o.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=L_(o.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){const e=v_(t);return L_(e.width)+L_(e.paddingLeft)+L_(e.paddingRight)+L_(e.borderLeftWidth)+L_(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=L_(o.borderTopWidth)+L_(o.borderBottomWidth),y_(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=L_(o.marginTop)+L_(o.marginBottom),y_(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((t=>H_[t](this))),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",(t=>this.onScroll(t))),N_(this)}update(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,y_(this.scrollbarXRail,{display:"block"}),y_(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=L_(v_(this.scrollbarXRail).marginLeft)+L_(v_(this.scrollbarXRail).marginRight),this.railYMarginHeight=L_(v_(this.scrollbarYRail).marginTop)+L_(v_(this.scrollbarYRail).marginBottom),y_(this.scrollbarXRail,{display:"none"}),y_(this.scrollbarYRail,{display:"none"}),N_(this),$_(this,"top",0,!1,!0),$_(this,"left",0,!1,!0),y_(this.scrollbarXRail,{display:""}),y_(this.scrollbarYRail,{display:""}))}onScroll(t){this.isAlive&&(N_(this),$_(this,"top",this.element.scrollTop-this.lastScrollTop),$_(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)}destroy(){this.isAlive&&(this.event.unbindAll(),k_(this.scrollbarX),k_(this.scrollbarY),k_(this.scrollbarXRail),k_(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)}removePsClasses(){this.element.className=this.element.className.split(" ").filter((t=>!t.match(/^ps([-_].+|)$/))).join(" ")}};class z_{constructor(t,e={},i){this._element=t,this._toggler=i,this._event=e.event||"blur",this._condition=e.condition||(()=>!0),this._selector=e.selector||'button, a, input, select, textarea, [tabindex]:not([tabindex="-1"])',this._onlyVisible=e.onlyVisible||!1,this._focusableElements=[],this._firstElement=null,this._lastElement=null,this.handler=t=>{this._condition(t)&&t.target===this._lastElement&&(t.preventDefault(),this._firstElement.focus())}}trap(){this._setElements(),this._init(),this._setFocusTrap()}disable(){this._focusableElements.forEach((t=>{t.removeEventListener(this._event,this.handler)})),this._toggler&&this._toggler.focus()}update(){this._setElements(),this._setFocusTrap()}_init(){const t=e=>{this._firstElement&&"Tab"===e.key&&!this._focusableElements.includes(e.target)&&(e.preventDefault(),this._firstElement.focus(),window.removeEventListener("keydown",t))};window.addEventListener("keydown",t)}_filterVisible(t){return t.filter((t=>{if(!u(t))return!1;const e=B.parents(t,"*");for(let i=0;i{const e="true"===t.getAttribute("data-mdb-disabled")||t.hasAttribute("disabled");return t.disabled||e?null:t})),this._onlyVisible&&(this._focusableElements=this._filterVisible(this._focusableElements)),this._firstElement=this._focusableElements[0],this._lastElement=this._focusableElements[this._focusableElements.length-1]}_setFocusTrap(){this._focusableElements.forEach(((t,e)=>{e===this._focusableElements.length-1?t.addEventListener(this._event,this.handler):t.removeEventListener(this._event,this.handler)}))}}const F_=37,V_=38,j_=39,Y_=40,X_=36,K_=35,U_=13,q_=27,Q_={threshold:10,direction:"all"};let Z_=class{constructor(t,e){this._element=t,this._startPosition=null,this._options={...Q_,...e}}handleTouchStart(t){this._startPosition=this._getCoordinates(t)}handleTouchMove(t){if(!this._startPosition)return;const e=this._getCoordinates(t),i={x:e.x-this._startPosition.x,y:e.y-this._startPosition.y},s=this._getDirection(i);if("all"===this._options.direction){if(s.y.values.x.value?s.y.direction:s.x.direction;return $.trigger(this._element,`swipe${t}`),$.trigger(this._element,"swipe",{direction:t}),void(this._startPosition=null)}const n="left"===this._options.direction||"right"===this._options?"x":"y";s[n].direction===this._options.direction&&s[n].value>this._options.threshold&&($.trigger(this._element,`swipe${s[n].direction}`),this._startPosition=null)}handleTouchEnd(){this._startPosition=null}_getCoordinates(t){const[e]=t.touches;return{x:e.clientX,y:e.clientY}}_getDirection(t){return{x:{direction:t.x<0?"left":"right",value:Math.abs(t.x)},y:{direction:t.y<0?"up":"down",value:Math.abs(t.y)}}}},G_=class{constructor(t,e="swipe",i={}){this._element=t,this._event=e,this.swipe=new Z_(t,i),this._touchStartHandler=this._handleTouchStart.bind(this),this._touchMoveHandler=this._handleTouchMove.bind(this),this._touchEndHandler=this._handleTouchEnd.bind(this)}dispose(){this._element.removeEventListener("touchstart",this._touchStartHandler),this._element.removeEventListener("touchmove",this._touchMoveHandler),window.removeEventListener("touchend",this._touchEndHandler)}init(){this._element.addEventListener("touchstart",(t=>this._handleTouchStart(t))),this._element.addEventListener("touchmove",(t=>this._handleTouchMove(t))),window.addEventListener("touchend",(t=>this._handleTouchEnd(t)))}_handleTouchStart(t){this[this._event].handleTouchStart(t)}_handleTouchMove(t){this[this._event].handleTouchMove(t)}_handleTouchEnd(t){this[this._event].handleTouchEnd(t)}};const J_="sidenav",tm="mdb.sidenav",em="rotate-icon",im='[data-mdb-toggle="sidenav"]',sm=".sidenav-collapse",nm=".sidenav-link",om=f?100:-100,am=f?-100:100;let rm=0;const lm={accordion:"(boolean)",backdrop:"(boolean)",backdropClass:"(null|string)",closeOnEsc:"(boolean)",color:"(string)",content:"(null|string)",expandable:"(boolean)",expandOnHover:"(boolean)",focusTrap:"(boolean)",hidden:"(boolean)",mode:"(string)",scrollContainer:"(null|string)",slim:"(boolean)",slimCollapsed:"(boolean)",slimWidth:"(number)",position:"(string)",right:"(boolean)",transitionDuration:"(number)",width:"(number)"},hm={accordion:!1,backdrop:!0,backdropClass:null,closeOnEsc:!0,color:"primary",content:null,expandable:!0,expandOnHover:!1,focusTrap:!0,hidden:!0,mode:"over",scrollContainer:null,slim:!1,slimCollapsed:!1,slimWidth:77,position:"fixed",right:!1,transitionDuration:300,width:240};class cm extends to{constructor(t,e={}){super(t),this._options=e,rm++,this._ID=rm,this._backdrop=null,this._content=null,this._initialContentStyle=null,this._slimCollapsed=!1,this._activeNode=null,this._tempSlim=!1,this._focusTrap=null,this._perfectScrollbar=null,this._touch=null,this.escHandler=t=>{t.keyCode===q_&&this.toggler&&u(this.toggler)&&(this._update(!1),$.off(window,"keydown",this.escHandler))},this.hashHandler=()=>{this._setActiveElements()},t&&this._setup(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return J_}get container(){if("fixed"===this.options.position)return B.findOne("body");const t=e=>{if(!e.parentNode||e.parentNode===document)return e;return"relative"===e.parentNode.style.position||e.parentNode.classList.contains("position-relative")?e.parentNode:t(e.parentNode)};return t(this._element)}get isVisible(){let t=0,e=window.innerWidth;if("fixed"!==this.options.position){const i=this.container.getBoundingClientRect();t=i.x,e=i.x+i.width}const{x:i}=this._element.getBoundingClientRect();if(this.options.right&&!f||!this.options.right&&f){let t=0;if(this.container.scrollHeight>this.container.clientHeight&&(t=this.container.offsetWidth-this.container.clientWidth),"BODY"===this.container.tagName){const e=document.documentElement.clientWidth;t=Math.abs(window.innerWidth-e)}return Math.abs(i+t-e)>10}return Math.abs(i-t)<10}get links(){return B.find(nm,this._element)}get navigation(){return B.find(".sidenav-menu",this._element)}get options(){const t={...hm,...R.getDataAttributes(this._element),...this._options};return d(J_,t,lm),t}get sidenavStyle(){return{width:`${this.width}px`,height:"fixed"===this.options.position?"100vh":"100%",position:this.options.position,transitionDuration:this.transitionDuration,transitionProperty:"transform, width, padding, margin",transitionTimingFunction:"linear"}}get toggler(){return B.find(im).find((t=>{const e=R.getDataAttribute(t,"target");return B.findOne(e)===this._element}))}get transitionDuration(){return this.options.transitionDuration/1e3+"s"}get translation(){return this.options.right?am:om}get width(){return this._slimCollapsed?this.options.slimWidth:this.options.width}changeMode(t){this._setMode(t)}dispose(){this._backdrop&&this._removeBackdrop(),$.off(window,"keydown",this.escHandler),$.off(window,"hashchange",this.hashHandler),this._touch.dispose(),n.removeData(this._element,tm),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}hide(){this._setVisibility(!1),this._update(!1)}show(){this._setVisibility(!0),this._update(!0)}toggle(){this._setVisibility(!this.isVisible),this._update(!this.isVisible)}toggleSlim(){this._setSlim(!this._slimCollapsed)}update(t){this._options=t,this._setup()}_appendArrow(t){const e=g("i");["fas","fa-angle-down",em].forEach((t=>{R.addClass(e,t)})),0===B.find(`.${em}`,t).length&&t.appendChild(e)}_collapseItems(){this.navigation.forEach((t=>{B.find(sm,t).forEach((t=>{wo.getInstance(t).hide()}))}))}_setupBackdrop(){const t=[];this.options.backdropClass&&t.push(this.options.backdropClass);const e={transition:`opacity ${this.transitionDuration} ease-out`,position:this.options.position,width:"fixed"===this.options.position?"100vw":"100%",height:"fixed"===this.options.position?"100vh":"100%"};if(!this._backdrop){const i=g("div");t.push("sidenav-backdrop"),e.opacity=0,$.on(i,"click",(()=>{this._setVisibility(!1),this._update(!1)})),this._backdrop=i}this._backdrop.classList.add(...t),R.style(this._backdrop,e)}_getOffsetValue(t,{index:e,property:i,offsets:s}){return this._getPxValue(this._initialContentStyle[e][s[i].property])+(t?s[i].value:0)}_getProperty(...t){return t.map(((t,e)=>0===e?t:t[0].toUpperCase().concat(t.slice(1)))).join("")}_getPxValue(t){return t?parseFloat(t):0}_handleSwipe(t,e){e&&this._slimCollapsed&&this.options.slim&&this.options.expandable?this.toggleSlim():e||(!this._slimCollapsed&&this.options.slim&&this.options.expandable?this.toggleSlim():this.toggler&&u(this.toggler)&&this.toggle())}_isActive(t,e){if(e)return e===t;if(t.attributes.href){const e=window.location.href.split(/#|\?/)[0],i=window.location.href.split("?")[0];return new URL(t,window.location.href).href===e||new URL(t,window.location.href).href===i}return!1}_isAllToBeCollapsed(){return 0===B.find("[data-mdb-collapse-init]",this._element).filter((t=>"true"===t.getAttribute("aria-expanded"))).length}_isAllCollapsed(){return 0===B.find(sm,this._element).filter((t=>u(t))).length}_setup(){this._setupTouch(),this.options.focusTrap&&this._setupFocusTrap(),this.options.backdrop&&(this._setupBackdrop(),this.options.hidden||"over"!==this.options.mode||this._appendBackdrop()),this._setupCollapse(),this.options.slimCollapsed&&R.addClass(this._element,"sidenav-slim"),this.options.slim&&this._setupSlim(),this._setupInitialStyling(),this._setupScrolling(),this.options.content&&this._setupContent(),this._setupActiveState(),this._setupRippleEffect(),this.options.hidden||(this.options.right&&this.show(),this._updateOffsets(!0,!0))}_setupActiveState(){this._setActiveElements(),this.links.forEach((t=>{$.on(t,"click",(()=>this._setActiveElements(t))),$.on(t,"keydown",(e=>{e.keyCode===U_&&this._setActiveElements(t)}))})),$.on(window,"hashchange",this.hashHandler)}_setupCollapse(){this.navigation.forEach(((t,e)=>{B.find(sm,t).forEach(((i,s)=>this._setupCollapseList({list:i,index:s,menu:t,menuIndex:e})))}))}_generateCollpaseID(t,e){return`sidenav-collapse-${this._ID}-${e}-${t}`}_setupCollapseList({list:t,index:e,menu:i,menuIndex:s}){const n=this._generateCollpaseID(e,s);t.classList.add("collapse"),t.setAttribute("id",n);const[o]=B.prev(t,nm);R.setDataAttribute(o,"collapse-init",""),o.setAttribute("href",`#${n}`),o.setAttribute("role","button");const a=wo.getInstance(t)||new wo(t,{toggle:!1,parent:this.options.accordion?i:t});this._appendArrow(o),R.hasClass(t,"show")&&this._rotateArrow(o,180),$.on(o,"click",(e=>{this._toggleCategory(e,a,t),this._tempSlim&&this._isAllToBeCollapsed()&&(this._setSlim(!0),this._tempSlim=!1),"over"===this.options.mode&&this._focusTrap&&this._focusTrap.update()})),$.on(t,"show.bs.collapse",(()=>this._rotateArrow(o,180))),$.on(t,"hide.bs.collapse",(()=>this._rotateArrow(o,0))),$.on(t,"shown.bs.collapse",(()=>{"over"===this.options.mode&&this._focusTrap&&this._focusTrap.update()})),$.on(t,"hidden.bs.collapse",(()=>{this._tempSlim&&this._isAllCollapsed()&&(this._setSlim(!0),this._tempSlim=!1),"over"===this.options.mode&&this._focusTrap&&this._focusTrap.update()}))}_setupContent(){this._content=B.find(this.options.content),this._initialContentStyle||(this._initialContentStyle=this._content.map((t=>{const{paddingLeft:e,paddingRight:i,marginLeft:s,marginRight:n,transition:o}=window.getComputedStyle(t);return{paddingLeft:e,paddingRight:i,marginLeft:s,marginRight:n,transition:o}})))}_setupFocusTrap(){this._focusTrap=new z_(this._element,{event:"keydown",condition:t=>9===t.keyCode,onlyVisible:!0},this.toggler)}_setupInitialStyling(){this._setColor(),R.style(this._element,this.sidenavStyle)}_setupScrolling(){let t=this._element;if(this.options.scrollContainer){t=B.findOne(this.options.scrollContainer,this._element);const i=(e=t.parentNode.children,Array.from(e)).filter((e=>e!==t)).reduce(((t,e)=>t+e.clientHeight),0);R.style(t,{maxHeight:`calc(100% - ${i}px)`,position:"relative"})}var e;this._perfectScrollbar=new W_(t,{suppressScrollX:!0,handlers:["click-rail","drag-thumb","wheel","touch"]})}_setupSlim(){this._slimCollapsed=this.options.slimCollapsed,this._toggleSlimDisplay(this._slimCollapsed),this.options.expandOnHover&&(this._element.addEventListener("mouseenter",(()=>{this._slimCollapsed&&this._setSlim(!1)})),this._element.addEventListener("mouseleave",(()=>{this._slimCollapsed||this._setSlim(!0)})))}_setupRippleEffect(){this.links.forEach((t=>{let e=va.getInstance(t);if(e&&e._options.color!==this.options.color)e.dispose();else if(e)return;e=new va(t,{rippleColor:this.options.color})}))}_setupTouch(){this._touch=new G_(this._element,"swipe",{threshold:20}),this._touch.init(),$.on(this._element,"swipeleft",(t=>this._handleSwipe(t,this.options.right))),$.on(this._element,"swiperight",(t=>this._handleSwipe(t,!this.options.right)))}_setActive(t,e){R.addClass(t,"active"),this._activeNode&&this._activeNode.classList.remove("active"),this._activeNode=t;const[i]=B.parents(this._activeNode,sm);if(!i)return void this._setActiveCategory();const[s]=B.prev(i,nm);this._setActiveCategory(s),e||this._slimCollapsed||wo.getInstance(i).show()}_setActiveCategory(t){this.navigation.forEach((e=>{B.find(sm,e).forEach((e=>{const[i]=B.prev(e,nm);i!==t?i.classList.remove("active"):R.addClass(i,"active")}))}))}_setActiveElements(t){this.navigation.forEach((e=>{B.find(nm,e).filter((t=>0===B.next(t,sm).length)).forEach((e=>{this._isActive(e,t)&&e!==this._activeNode&&this._setActive(e,t)}))}))}_setColor(){const t=["primary","secondary","success","info","warning","danger","light","dark"],{color:e}=this.options,i=t.includes(e)?e:"primary";t.forEach((t=>{this._element.classList.remove(`sidenav-${t}`)})),R.addClass(this._element,`sidenav-${i}`)}_setContentOffsets(t,e,i){this._content.forEach(((s,n)=>{const o=this._getOffsetValue(t,{index:n,property:"padding",offsets:e}),a=this._getOffsetValue(t,{index:n,property:"margin",offsets:e}),r={};i||(r.transition=`all ${this.transitionDuration} linear`),r[e.padding.property]=`${o}px`,r[e.margin.property]=`${a}px`,R.style(s,r),t&&(i?R.style(s,{transition:this._initialContentStyle[n].transition}):$.on(s,"transitionend",(()=>{R.style(s,{transition:this._initialContentStyle[n].transition})})))}))}_setMode(t){this.options.mode!==t&&(this._options.mode=t,this._update(this.isVisible))}_setSlim(t){const e=t?["collapse","collapsed"]:["expand","expanded"];this._triggerEvents(...e),t?(this._collapseItems(),R.addClass(this._element,"sidenav-slim")):R.removeClass(this._element,"sidenav-slim"),this._slimCollapsed=t,this._toggleSlimDisplay(t),R.style(this._element,{width:`${this.width}px`}),this._updateOffsets(this.isVisible)}_setTabindex(t){this.links.forEach((e=>{e.tabIndex=t?1:-1}))}_setVisibility(t){const e=t?["show","shown"]:["hide","hidden"];this._triggerEvents(...e)}_rotateArrow(t,e){const[i]=B.children(t,`.${em}`);i&&R.style(i,{transform:`rotate(${e}deg)`})}async _toggleBackdrop(t){t&&"over"===this.options.mode?this._appendBackdrop():(R.style(this._backdrop,{opacity:0}),await setTimeout((()=>{this._removeBackdrop()}),this.options.transitionDuration))}_removeBackdrop(){this._backdrop.parentNode===this.container&&this.container.removeChild(this._backdrop)}_appendBackdrop(){this.container.appendChild(this._backdrop),setTimeout((()=>R.style(this._backdrop,{opacity:1})),0)}_toggleCategory(t,e){t.preventDefault(),e.toggle(),this._slimCollapsed&&this.options.expandable&&(this._tempSlim=!0,this._setSlim(!1))}_toggleSlimDisplay(t){const e=B.find('[data-mdb-slim="true"]',this._element),i=B.find('[data-mdb-slim="false"]',this._element),s=()=>{e.forEach((t=>{R.style(t,{display:this._slimCollapsed?"unset":"none"})})),i.forEach((t=>{R.style(t,{display:this._slimCollapsed?"none":"unset"})}))};t?setTimeout((()=>s()),this.options.transitionDuration):s()}async _triggerEvents(t,e){$.trigger(this._element,`${t}.mdb.sidenav`),e&&await setTimeout((()=>{$.trigger(this._element,`${e}.mdb.sidenav`)}),this.options.transitionDuration+5)}_update(t){this.toggler&&this._updateTogglerAria(t),this._updateDisplay(t),this.options.backdrop&&this._toggleBackdrop(t),this._updateOffsets(t),t&&this.options.closeOnEsc&&"side"!==this.options.mode&&$.on(window,"keydown",this.escHandler),this.options.focusTrap&&this._updateFocus(t)}_updateDisplay(t){const e=t?0:this.translation;R.style(this._element,{transform:`translateX(${e}%)`})}_updateFocus(t){if(this._setTabindex(t),"over"===this.options.mode&&this.options.focusTrap){if(t)return void this._focusTrap.trap();this._focusTrap.disable()}this._focusTrap.disable()}_updateOffsets(t,e=!1){const[i,s]=this.options.right&&!f||!this.options.right&&f?["right","left"]:["left","right"],n={property:this._getProperty("padding",i),value:"over"===this.options.mode?0:this.width},o={property:this._getProperty("margin",s),value:"push"===this.options.mode?-1*this.width:0};$.trigger(this._element,"update.mdb.sidenav",{margin:o,padding:n}),this._content&&this._setContentOffsets(t,{padding:n,margin:o},e)}_updateTogglerAria(t){this.toggler.setAttribute("aria-expanded",t)}static toggleSidenav(){return function(t){const e=B.closest(t.target,im),i=R.getDataAttributes(e).target;B.find(i).forEach((t=>{(cm.getInstance(t)||new cm(t)).toggle()}))}}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,tm);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new cm(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const dm=".bs.alert",um=`close${dm}`,pm=`closed${dm}`;let _m=class t extends wt{static get NAME(){return"alert"}close(){if(ft.trigger(this._element,um).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(),ft.trigger(this._element,pm),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 mm={position:"top",container:null,refresh:1e3,filter:t=>t},fm={position:"string",container:"(undefined|null|string)",refresh:"number",filter:"function"};class gm{constructor(t,e,i){this._element=t,this._selector=e,this._options=this._getConfig(i),this._offset=null,this._options.container&&(this._parent=B.findOne(this._options.container))}get stackableElements(){return B.find(this._selector).filter(((t,e)=>this._options.filter(t,e))).map((t=>({el:t,rect:t.getBoundingClientRect()}))).filter((({el:t,rect:e})=>{const i=t!==this._element&&u(t);return null===this._offset?i:i&&this._getBoundryOffset(e)this._getBoundryOffset(e.rect)-this._getBoundryOffset(t.rect)))}get nextElements(){return B.find(this._selector).filter((t=>t!==this._element)).filter(((t,e)=>this._options.filter(t,e))).filter((t=>(this._offset=null,this._getBoundryOffset(t.getBoundingClientRect())>this._offset)))}_getConfig(t){const e={...mm,...t};return d("Stack",e,fm),e}_getBoundryOffset(t){const{position:e}=this._options;let i=0,s=window.innerHeight;if(this._parent){const t=this._parent.getBoundingClientRect();i=t.top,s=t.bottom}return"top"===e?t.top-i:s-t.bottom}calculateOffset(){const[t]=this.stackableElements;return this._offset=t?this._getBoundryOffset(t.rect)+t.rect.height:0,this._offset}}const bm="alert",vm={position:"(string || null)",delay:"number",autohide:"boolean",width:"(string || null)",offset:"number",stacking:"boolean",hidden:"boolean",appendToBody:"boolean",color:"(string || null)",container:"(string|null)"},ym={position:null,delay:1e3,autohide:!1,width:null,offset:10,stacking:!1,hidden:!1,appendToBody:!1,color:null,container:null},xm=[{name:"close"},{name:"closed"}];class wm extends _m{constructor(t,e={}){super(t,e),this._options=this._getConfig(e),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){$.off(this._element,"close.bs.alert"),$.off(this._element,"closed.bs.alert"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}get verticalOffset(){return this._options.stacking?this.stackUtil.calculateOffset():0}get parent(){const[t]=B.parents(this._element,this._options.container);return t}get position(){const[t,e]=this._options.position.split("-");return{y:t,x:e}}update(t={}){null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._options=this._getConfig(t),this._setup()}hide(){if(this._element&&this._element.classList.contains("show")){R.toggleClass(this._element,"show");const t=e=>{R.style(e.target,{display:"none"}),null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._options.stacking&&this._updateAlertStack(),$.off(e.target,"transitionend",t)};$.on(this._element,"transitionend",t)}}show(){if(this._options.autohide&&this._setupAutohide(),!this._element.classList.contains("show")&&(R.style(this._element,{display:"block"}),u(this._element))){const t=e=>{R.style(e.target,{display:"block"}),$.off(e.target,"transitionend",t)};R.toggleClass(this._element,"show"),this._options.position&&this._setupAlignment(),$.on(this._element,"transitionend",t)}}_init(){this._options.hidden&&R.style(this._element,{display:"none"}),this._bindMdbEvents(),this._setup()}_setup(){this._options.color&&this._setColor(),this._options.stacking&&this._setupStacking(),this._options.autohide&&this._setupAutohide(),this._options.width&&this._setupWidth(),this._options.appendToBody&&this._appendToBody(),this._options.position&&(this._setupAlignment(),this._setupPosition())}_setupStacking(){this.stackUtil=new gm(this._element,".alert",{position:this.position.y,offset:this._options.offset,container:this._options.container,filter:t=>{const e=wm.getInstance(t);return!!e&&(e._options.container===this._options.container&&e._options.position===this._options.position)}}),$.on(this._element,"closed.bs.alert",(()=>{this._updateAlertStack()}))}_setColor(){const t=["primary","secondary","success","info","warning","danger","light","dark"],e=t.includes(this._options.color)?this._options.color:"primary";t.forEach((t=>{this._element.classList.remove(`alert-${t}`)})),R.addClass(this._element,`alert-${e}`)}_setupWidth(){R.style(this._element,{width:this._options.width})}_setupAutohide(){this._timeout=setTimeout((()=>{this.hide()}),this._options.delay)}_setupAlignment(){const t="top"===this.position.y?"bottom":"top",e="left"===this.position.x?"right":"left";"center"===this.position.x?R.style(this._element,{[this.position.y]:`${this.verticalOffset+this._options.offset}px`,[t]:"unset",left:"50%",transform:"translate(-50%)"}):R.style(this._element,{[this.position.y]:`${this.verticalOffset+this._options.offset}px`,[this.position.x]:`${this._options.offset}px`,[t]:"unset",[e]:"unset",transform:"unset"})}_setupPosition(){this._options.container?(R.addClass(this.parent,"parent-alert-relative"),R.addClass(this._element,"alert-absolute")):R.addClass(this._element,"alert-fixed")}_appendToBody(){this._element.parentNode.removeChild(this._element),document.body.appendChild(this._element)}_getConfig(t){const e={...ym,...R.getDataAttributes(this._element),...t};return d(bm,e,vm),e}_bindMdbEvents(){$.extend(this._element,xm,bm)}_updatePosition(){R.style(this._element,{[this.position.y]:`${this.verticalOffset+this._options.offset}px`})}_updateAlertStack(){this.stackUtil.nextElements.forEach((t=>{const e=wm.getInstance(t);e&&e._updatePosition()}))}}const Cm=".bs.toast",km=`mouseover${Cm}`,Tm=`mouseout${Cm}`,Am=`focusin${Cm}`,Sm=`focusout${Cm}`,Em=`hide${Cm}`,Mm=`hidden${Cm}`,Om=`show${Cm}`,Dm=`shown${Cm}`,Im="hide",$m="show",Lm="showing",Pm={animation:"boolean",autohide:"boolean",delay:"number"},Nm={animation:!0,autohide:!0,delay:5e3};let Rm=class t extends wt{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Nm}static get DefaultType(){return Pm}static get NAME(){return"toast"}show(){if(ft.trigger(this._element,Om).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");this._element.classList.remove(Im),Q(this._element),this._element.classList.add($m,Lm),this._queueCallback((()=>{this._element.classList.remove(Lm),ft.trigger(this._element,Dm),this._maybeScheduleHide()}),this._element,this._config.animation)}hide(){if(!this.isShown())return;if(ft.trigger(this._element,Em).defaultPrevented)return;this._element.classList.add(Lm),this._queueCallback((()=>{this._element.classList.add(Im),this._element.classList.remove(Lm,$m),ft.trigger(this._element,Mm)}),this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove($m),super.dispose()}isShown(){return this._element.classList.contains($m)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){ft.on(this._element,km,(t=>this._onInteraction(t,!0))),ft.on(this._element,Tm,(t=>this._onInteraction(t,!1))),ft.on(this._element,Am,(t=>this._onInteraction(t,!0))),ft.on(this._element,Sm,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const i=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](this)}}))}};const Bm="toast",Hm="show.bs.toast",Wm="hidden.bs.toast",zm=[{name:"shown"},{name:"hide"}],Fm={position:"(string|null)",animation:"boolean",autohide:"boolean",width:"(string || null)",color:"(string|null)",delay:"(boolean|number)",offset:"number",appendToBody:"boolean",stacking:"boolean"},Vm={position:null,animation:!0,autohide:!0,width:null,color:null,delay:500,offset:10,appendToBody:!1,stacking:!0};class jm extends Rm{constructor(t,e={}){super(t,e),this._config=this._getConfig(e),this._setup(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}get parent(){const[t]=B.parents(this._element,this._config.container);return t}get position(){if(!this._config.position)return null;const[t,e]=this._config.position.split("-");return{y:t,x:e}}get verticalOffset(){return this._config.stacking&&this.position?this.stackUtil.calculateOffset():0}update(t={}){this._config=this._getConfig(t),this._setupColor(),this._config.position&&(this._config.stacking&&(this._setupStacking(),$.on(this._element,"hidden.bs.toast",(()=>{setTimeout((()=>this._updateToastStack()),150)}))),this._setupPosition(),this._setupAlignment())}dispose(){$.off(this._element,Hm),$.off(this._element,"shown.bs.toast"),$.off(this._element,"hide.bs.toast"),$.off(this._element,Wm),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_setup(){this._setupColor(),this._config.width&&this._setupWidth(),this._config.position&&(this._config.stacking&&(this._setupStacking(),$.on(this._element,"hidden.bs.toast",(()=>{setTimeout((()=>this._updateToastStack()),150)}))),this._setupPosition(),this._setupDisplay(),!this._config.container&&this._config.appendToBody&&this._appendToBody(),this._bindMdbEvents())}_setupStacking(){this.stackUtil=new gm(this._element,".toast",{position:this.position.y,offset:this._config.offset,container:this._config.container,filter:t=>{const e=jm.getInstance(t);return!!e&&(e._config.container===this._config.container&&e._config.position===this._config.position)}}),$.on(this._element,"closed.bs.alert",(()=>{this._updateAlertStack()}))}_setupColor(){if(!this._config.color)return;const t=B.findOne(".toast-header",this._element),e=["primary","secondary","success","info","warning","danger","light","dark"],i=e.includes(this._config.color)?this._config.color:"primary";e.forEach((e=>{this._element.classList.remove(`toast-${e}`),t&&t.classList.remove(`toast-${e}`)})),R.addClass(this._element,`toast-${i}`),t&&R.addClass(t,`toast-${i}`)}_setupWidth(){R.style(this._element,{width:this._config.width})}_setupPosition(){this._config.container?(R.addClass(this.parent,"parent-toast-relative"),R.addClass(this._element,"toast-absolute")):R.addClass(this._element,"toast-fixed")}_setupAlignment(){const t="top"===this.position.y?"bottom":"top",e="left"===this.position.x?"right":"left";"center"===this.position.x?R.style(this._element,{[this.position.y]:`${this.verticalOffset+this._config.offset}px`,[t]:"unset",left:"50%",transform:"translate(-50%)"}):R.style(this._element,{[this.position.y]:`${this.verticalOffset+this._config.offset}px`,[this.position.x]:`${this._config.offset}px`,[t]:"unset",[e]:"unset",transform:"unset"})}_setupDisplay(){this._element.classList.contains("show")||R.style(this._element,{display:"none"}),$.on(this._element,Wm,(()=>{$.trigger(this._element,"hidden.mdb.toast"),R.style(this._element,{display:"none"})})),$.on(this._element,Hm,(()=>{$.trigger(this._element,"show.mdb.toast").defaultPrevented||(this._setupAlignment(),R.style(this._element,{display:"block"}))}))}_bindMdbEvents(){$.extend(this._element,zm,Bm)}_getConfig(t){const e={...Vm,...R.getDataAttributes(this._element),...t};return d(Bm,e,Fm),e}_appendToBody(){this._element.parentNode.removeChild(this._element),document.body.appendChild(this._element)}_updatePosition(){R.style(this._element,{[this.position.y]:`${this.verticalOffset+this._config.offset}px`})}_updateToastStack(){this.stackUtil.nextElements.forEach((t=>{const e=jm.getInstance(t);e&&e._updatePosition()}))}static jQueryInterface(t,e={}){return this.each((function(){let i;if(i="object"==typeof t?new jm(this,t):jm.getOrCreateInstance(this,t),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const Ym=t=>{if(""===t)return;let e,i,s,n;return Xm(t)?(e=t.getHours(),n=e,i=t.getMinutes(),e%=12,0===e?s="AM":e>12&&(s="PM"),e=e||12,void 0===s&&(s=e>=12?"PM":"AM"),i=i<10?`0${i}`:i):([e,i,s]=Qm(t,!1),n=e,e%=12,0===e&&void 0===s&&(s="AM"),e=e||12,void 0===s&&(s=n>=12?"PM":"AM")),{hours:e,minutes:i,amOrPm:s}},Xm=t=>t&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t),Km=t=>{if(""===t)return;let e,i;return Xm(t)?(e=t.getHours(),i=t.getMinutes()):[e,i]=Qm(t,!1),i=Number(i)<10?`0${Number(i)}`:i,{hours:e,minutes:i}},Um=({clientX:t,clientY:e,touches:i},s,n=!1)=>{const{left:o,top:a}=s.getBoundingClientRect();let r={};return n&&i?n&&Object.keys(i).length>0&&(r={x:i[0].clientX-o,y:i[0].clientY-a}):r={x:t-o,y:e-a},r},qm=()=>{let t=!1;return(navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))&&(t=!0),t},Qm=(t,e=!0)=>{let i;return i=e?t.value.replace(/:/gi," "):t.replace(/:/gi," "),i.split(" ")},Zm=(t,e)=>{const[i,s,n]=Qm(t,!1),[o,a,r]=Qm(e,!1);return"PM"==n&&"AM"==r?1:"AM"==n&&"PM"==r?2:n==r&&i>o?1:ia?1:s{const t=new Date,e=t.getHours();let i=String(t.getMinutes());1===i.length&&(i=`0${i}`);return`${e}:${i}`},Jm=(t,e,i)=>{if(!e)return t;let s=Gm();return i&&(s=`${Ym(s).hours}:${Ym(s).minutes} ${Ym(s).amOrPm}`),(""!=t&&1==Zm(s,t)||""===t)&&(t=s),t},tf=(t,e,i)=>{if(!e)return t;let s=Gm();return i&&(s=`${Ym(s).hours}:${Ym(s).minutes} ${Ym(s).amOrPm}`),(""!=t&&2==Zm(s,t)||""===t)&&(t=s),t},ef=(t,e)=>{t.forEach((t=>{("00"===t.textContent||Number(t.textContent)>e)&&R.addClass(t,"disabled")}))},sf=(t,e)=>{t.forEach((t=>{"00"!==t.textContent&&Number(t.textContent){"PM"==t?(this._isPmEnabled=!0,this._isAmEnabled=!1):"AM"==t&&(this._isPmEnabled=!1,this._isAmEnabled=!0)})),i(this,"_toggleBackgroundColorCircle",(t=>{null!==this._modal.querySelector(`.${t}.${yf}`)?R.addClass(this._circle,"active"):R.removeClass(this._circle,"active")})),i(this,"_toggleClassActive",((t,{textContent:e},i)=>{const s=[...t].find((t=>Number(t)===Number(e)));return i.forEach((t=>{R.hasClass(t,"disabled")||(t.textContent===s?R.addClass(t,yf):R.removeClass(t,yf))}))})),i(this,"_makeMinutesDegrees",((t,e)=>{const{increment:i}=this._options;return t<0?(e=Math.round(360+t/6)%60,t=360+6*Math.round(t/6)):(e=Math.round(t/6)%60,t=6*Math.round(t/6)),i&&(t=30*Math.round(t/30),60===(e=6*Math.round(t/6)/6)&&(e="00")),t>=360&&(t=0),{degrees:t,minute:e,addDegrees:i?30:6}})),i(this,"_makeHourDegrees",((t,e,i)=>{if(t)return this._hasTargetInnerClass(t)?e<0?(i=Math.round(360+e/30)%24,e=360+e):12===(i=Math.round(e/30)+12)&&(i="00"):e<0?(i=Math.round(360+e/30)%12,e=360+e):(0===(i=Math.round(e/30)%12)||i>12)&&(i=12),e>=360&&(e=0),{degrees:e,hour:i,addDegrees:30}})),i(this,"_makeInnerHoursDegrees",((t,e)=>(t<0?(e=Math.round(360+t/30)%24,t=360+t):12===(e=Math.round(t/30)+12)&&(e="00"),{degrees:t,hour:e,addDegrees:30}))),i(this,"_getAppendClock",((t=[],e=`.${Sf}`,i)=>{let{minTime:s,maxTime:n}=this._options;const{inline:o,format12:a,disablePast:r,disableFuture:l}=this._options;s=Jm(s,r,a),n=tf(n,l,a);const[h,c,d]=Qm(n,!1),[u,p,_]=Qm(s,!1);o||a&&this._isInvalidTimeFormat&&!R.hasClass(this._AM,"active")&&R.addClass(this._PM,"active");const m=B.findOne(e),f=360/t.length;if(null===m)return;const b=(m.offsetWidth-32)/2,v=(m.offsetHeight-32)/2,y=b-4;setTimeout((()=>{let t;a&&(t=B.findOne(`.${Lf}.${yf}`).textContent),this._handleDisablingTipsMinTime(t,_,p,u),this._handleDisablingTipsMaxTime(t,d,c,h)}),0),[...t].forEach(((e,s)=>{const n=s*f*(Math.PI/180);const o=g("span"),a=g("span");a.innerHTML=e,R.addClass(o,i);const r=o.offsetWidth,l=o.offsetHeight;return R.addStyle(o,{left:b+Math.sin(n)*y-r+"px",bottom:v+Math.cos(n)*y-l+"px"}),t.includes("05")&&R.addClass(o,`${Uf}`),t.includes("13")?a.classList.add(Xf):a.classList.add(jf),o.appendChild(a),m.appendChild(o)}))})),this._document=document,this._options=this._getConfig(e),this._currentTime=null,this._toggleButtonId=this._element.id?`timepicker-toggle-${this._element.id}`:o("timepicker-toggle-"),this.hoursArray=["12","1","2","3","4","5","6","7","8","9","10","11"],this.innerHours=["00","13","14","15","16","17","18","19","20","21","22","23"],this.minutesArray=["00","05","10","15","20","25","30","35","40","45","50","55"],this.input=B.findOne("input",this._element),this.dataWithIcon=t.dataset.withIcon,this.dataToggle=t.dataset.toggle,this.customIcon=B.findOne(".timepicker-toggle-button",this._element),this._checkToggleButton(),this.inputFormatShow=B.findOne("[data-mdb-timepicker-format24]",this._element),this.inputFormat=null===this.inputFormatShow?"":Object.values(this.inputFormatShow.dataset)[0],this.elementToggle=B.findOne("[data-mdb-toggle]",this._element),this.toggleElement=Object.values(t.querySelector("[data-mdb-toggle]").dataset)[0],this._hour=null,this._minutes=null,this._AM=null,this._PM=null,this._wrapper=null,this._modal=null,this._hand=null,this._circle=null,this._focusTrap=null,this._popper=null,this._interval=null,this._timeoutInterval=null,this._inputValue=""!==this._options.defaultTime?this._options.defaultTime:this.input.value,this._options.format24&&(this._options.format12=!1,this._currentTime=Km(this._inputValue)),this._options.format12&&(this._options.format24=!1,this._currentTime=Ym(this._inputValue)),this._options.readOnly&&this.input.setAttribute("readonly",!0),"true"===this.inputFormat&&""!==this.inputFormat&&(this._options.format12=!1,this._options.format24=!0,this._currentTime=Km(this._inputValue)),this._scrollBar=new he,this._animations=!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&this._options.animations,this.init(),this._isHours=!0,this._isMinutes=!1,this._isInvalidTimeFormat=!1,this._isMouseMove=!1,this._isInner=!1,this._isAmEnabled=!1,this._isPmEnabled=!1,this._options.format12&&!this._options.defaultTime&&(this._isPmEnabled=!0),this._objWithDataOnChange={degrees:null},R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return nf}init(){const{format12:t,format24:e}=this._options;let i,s,n;if(R.addClass(this.input,Zf),void 0!==this._currentTime){const{hours:o,minutes:a,amOrPm:r}=this._currentTime;i=Number(o)<10?0:"",s=`${i}${Number(o)}:${a}`,n=r,t?this.input.value=`${s} ${n}`:e&&(this.input.value=`${s}`)}else i="",s="",n="",this.input.value="";this.input.value.length>0&&""!==this.input.value&&R.addClass(this.input,"active"),null===this._options&&null===this._element||(this._listenToUserInput(),this._handleOpen(),this._listenToToggleKeydown())}dispose(){this._removeModal(),$.off(this._element,"click",`[data-mdb-toggle='${this.toggleElement}']`),$.off(this._element,"keydown",`[data-mdb-toggle='${this.toggleElement}']`),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),setTimeout((()=>{super.dispose()}),355)}update(t={}){this._options=this._getConfig({...this._options,...t})}_checkToggleButton(){null===this.customIcon&&(void 0!==this.dataWithIcon&&(this._options.withIcon=null,"true"===this.dataWithIcon&&this._appendToggleButton(this._options)),this._options.withIcon&&this._appendToggleButton(this._options))}_appendToggleButton(){const t=((t,e)=>{const{iconClass:i}=t;return`\n \n`})(this._options,this._toggleButtonId);this.input.insertAdjacentHTML("afterend",t)}_getDomElements(){this._hour=B.findOne(`.${$f}`),this._minutes=B.findOne(`.${zf}`),this._AM=B.findOne(`.${xf}`),this._PM=B.findOne(`.${Vf}`),this._wrapper=B.findOne(`.${Qf}`),this._modal=B.findOne(`.${Ff}`),this._hand=B.findOne(`.${If}`),this._circle=B.findOne(`.${Tf}`),this._clock=B.findOne(`.${Sf}`),this._clockInner=B.findOne(`.${Ef}`)}_handlerMaxMinHoursOptions(t,e,i,s,n,o){if(!e&&!i)return!0;const{format24:a,format12:r,disablePast:l,disableFuture:h}=this._options,{_isAmEnabled:c,_isPmEnabled:d}=this,u=o.keyCode,p=o.target.classList.contains("timepicker-clock-inner")||o.target.classList.contains("timepicker-time-tips-inner")||o.target.classList.contains("timepicker-tips-inner-element");i=Jm(i,l,r);let _=""!==(e=tf(e,h,r))?30*e:"",m=""!==i?30*i:"";t<=0&&(t=360+t);const f=()=>{const t=document.querySelectorAll(".timepicker-tips-element"),e=document.querySelectorAll(".timepicker-tips-inner-element");let i,s,n,o=(t=>{let e;return e=t.startsWith("0")?Number(t.slice(1)):Number(t),e})(this._hour.innerText);return u===V_?s=1:u===Y_&&(s=-1),n=12===o&&u===V_?1:0===o&&u===V_?13:0===o&&u===Y_?23:13===o&&u===Y_?0:1===o&&u===Y_?12:o+s,t.forEach((t=>{t.textContent==n&&(i=t)})),e.forEach((t=>{t.textContent==n&&(i=t)})),!i.parentElement.classList.contains("disabled")};if(a&&"keydown"!==o.type&&p)return(s=>{let n=""!==i&&i>12?30*(i-12):"",o=""!==e&&e>12?30*(e-12):"";if(!(n&&to||e&&e<12))return!0})();if("keydown"===o.type)return f();return!(i&&("PM"===n&&c||(!n||"PM"===n&&d||""!==i&&"AM"===n&&c)&&t_))||void 0}_handleKeyboard(){$.on(this._document,hf,"",(t=>{let e,i,{increment:s,maxTime:n,minTime:o,format12:a,disablePast:r,disableFuture:l}=this._options,[h,c]=Qm(o,!1),[d,u]=Qm(n,!1);h=Jm(h,r,a),d=tf(d,l,a);const p=null===B.findOne(`.${Uf}`),_=null!==B.findOne(`.${Kf}`),m=Number(this._hand.style.transform.replace(/[^\d-]/g,"")),f=B.find(`.${Uf}`,this._modal),g=B.find(`.${Yf}`,this._modal),b=B.find(`.${Kf}`,this._modal);let v=this._makeHourDegrees(t.target,m,e).hour;const{degrees:y,addDegrees:x}=this._makeHourDegrees(t.target,m,e);let{minute:w,degrees:C}=this._makeMinutesDegrees(m,i);const k=this._makeMinutesDegrees(m,i).addDegrees;let{hour:T}=this._makeInnerHoursDegrees(m,undefined);if(t.keyCode===q_){const t=B.findOne(`.${wf}`,this._modal);$.trigger(t,"click")}else if(p){if(_&&(t.keyCode===j_&&(this._isInner=!1,R.addStyle(this._hand,{height:"calc(40% + 1px)"}),this._hour.textContent=this._setHourOrMinute(v>12?1:v),this._toggleClassActive(this.hoursArray,this._hour,g),this._toggleClassActive(this.innerHours,this._hour,b)),t.keyCode===F_&&(this._isInner=!0,R.addStyle(this._hand,{height:"21.5%"}),this._hour.textContent=this._setHourOrMinute(T>=24||"00"===T?0:T),this._toggleClassActive(this.innerHours,this._hour,b),this._toggleClassActive(this.hoursArray,this._hour-1,g))),t.keyCode===V_){if(!this._handlerMaxMinHoursOptions(y+30,d,h,u,c,t))return;(()=>R.addStyle(this._hand,{transform:`rotateZ(${y+x}deg)`}))(),this._isInner?(T+=1,24===T?T=0:25!==T&&"001"!==T||(T=13),this._hour.textContent=this._setHourOrMinute(T),this._toggleClassActive(this.innerHours,this._hour,b)):(v+=1,this._hour.textContent=this._setHourOrMinute(v>12?1:v),this._toggleClassActive(this.hoursArray,this._hour,g))}if(t.keyCode===Y_){if(!this._handlerMaxMinHoursOptions(y-30,d,h,u,c,t))return;(()=>R.addStyle(this._hand,{transform:`rotateZ(${y-x}deg)`}))(),this._isInner?(T-=1,12===T?T=0:-1===T&&(T=23),this._hour.textContent=this._setHourOrMinute(T),this._toggleClassActive(this.innerHours,this._hour,b)):(v-=1,this._hour.textContent=this._setHourOrMinute(0===v?12:v),this._toggleClassActive(this.hoursArray,this._hour,g))}}else t.keyCode===V_&&(C+=k,R.addStyle(this._hand,{transform:`rotateZ(${C}deg)`}),w+=1,s&&(w+=4,"0014"===w&&(w=5)),this._minutes.textContent=this._setHourOrMinute(w>59?0:w),this._toggleClassActive(this.minutesArray,this._minutes,f),this._toggleBackgroundColorCircle(`${Uf}`)),t.keyCode===Y_&&(C-=k,R.addStyle(this._hand,{transform:`rotateZ(${C}deg)`}),w-=s?5:1,-1===w?w=59:-5===w&&(w=55),this._minutes.textContent=this._setHourOrMinute(w),this._toggleClassActive(this.minutesArray,this._minutes,f),this._toggleBackgroundColorCircle(`${Uf}`))}))}_setActiveClassToTipsOnOpen(t,...e){if(!this._isInvalidTimeFormat)if(this._options.format24){const e=B.find(`.${Yf}`,this._modal),i=B.find(`.${Kf}`,this._modal);this._addActiveClassToTip(e,t),this._addActiveClassToTip(i,t)}else{[...e].filter((t=>("pm"===t.toLowerCase()?R.addClass(this._PM,yf):"am"===t.toLowerCase()?R.addClass(this._AM,yf):(R.removeClass(this._AM,yf),R.removeClass(this._PM,yf)),t)));const i=B.find(`.${Yf}`,this._modal);this._addActiveClassToTip(i,t)}}_setTipsAndTimesDependOnInputValue(t,e){const{inline:i,format12:s}=this._options;if(this._isInvalidTimeFormat)this._hour.textContent="12",this._minutes.textContent="00",i||R.addStyle(this._hand,{transform:"rotateZ(0deg)"}),s&&R.addClass(this._PM,yf);else{const s=t>12?30*t-360:30*t;this._hour.textContent=t,this._minutes.textContent=e,i||(R.addStyle(this._hand,{transform:`rotateZ(${s}deg)`}),R.addClass(this._circle,"active"),(Number(t)>12||"00"===t)&&R.addStyle(this._hand,{height:"21.5%"}))}}_listenToToggleKeydown(){$.on(this._element,"keydown",`[data-mdb-toggle='${this.toggleElement}']`,(t=>{t.keyCode===U_&&(t.preventDefault(),$.trigger(this.elementToggle,"click"))}))}_handleOpen(){const t=this._getContainer();L.on(this._element,"click",`[data-mdb-toggle='${this.toggleElement}']`,(e=>{if(null===this._options)return;const i=null!==R.getDataAttribute(this.input,"toggle")?200:0;setTimeout((()=>{let i;R.addStyle(this.elementToggle,{pointerEvents:"none"}),this.elementToggle.blur(),i=""===Qm(this.input)[0]||this._isInvalidTimeFormat?["12","00","PM"]:Qm(this.input);const{modalId:s,inline:n,format12:o}=this._options,[a,r,l]=i,h=g("div");if((Number(a)>12||"00"===a)&&(this._isInner=!0),this.input.blur(),e.target.blur(),h.innerHTML=(({format24:t,okLabel:e,cancelLabel:i,headId:s,footerId:n,bodyId:o,pickerId:a,clearLabel:r,inline:l,showClearBtn:h,amLabel:c,pmLabel:d,isRTL:u})=>l?`
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n ${t?"":`
\n \n \n \n
`}\n ${t?``:""}\n
\n
\n
\n
\n
\n `:`
\n
\n
\n
\n
\n
\n \n \n \n \n \n \n \n
\n ${t?"":`
\n \n \n
`}\n
\n
\n ${l?"":`
\n
\n \n
\n
\n
\n ${t?'
':""}\n
\n
`}\n\n
\n \n
\n
`)(this._options),R.addClass(h,Ff),h.setAttribute("role","dialog"),h.setAttribute("tabIndex","-1"),h.setAttribute("id",s),n?(this._popper=Os(this.input,h,{placement:"bottom-start"}),t.appendChild(h)):(t.appendChild(h),this._scrollBar.hide()),this._getDomElements(),this._animations?this._toggleBackdropAnimation():R.addClass(this._wrapper,"opacity-100"),this._setActiveClassToTipsOnOpen(a,r,l),this._appendTimes(),this._setActiveClassToTipsOnOpen(a,r,l),this._setTipsAndTimesDependOnInputValue(a,r),""===this.input.value){const t=B.find(`.${Yf}`,this._modal);o&&R.addClass(this._PM,yf),this._hour.textContent="12",this._minutes.textContent="00",this._addActiveClassToTip(t,Number(this._hour.textContent))}this._handleSwitchTimeMode(),this._handleOkButton(),this._handleClose(),n?(this._handleHoverInlineBtn(),this._handleDocumentClickInline(),this._handleInlineClicks()):(this._handleSwitchHourMinute(),this._handleClockClick(),this._handleKeyboard(),R.addStyle(this._hour,{pointerEvents:"none"}),R.addStyle(this._minutes,{pointerEvents:""})),this._focusTrap=new z_(this._wrapper,{event:"keydown",condition:({key:t})=>"Tab"===t}),this._focusTrap.trap()}),i)}))}_handleInlineClicks(){let t,e;const i=t=>{let e=t;return e>59?e=0:e<0&&(e=59),e},s=t=>{let e=t;return this._options.format24?(e>24?e=1:e<0&&(e=23),e>23&&(e=0)):(e>12?e=1:e<1&&(e=12),e>12&&(e=1)),e},n=t=>{const e=s(t);this._hour.textContent=this._setHourOrMinute(e)},o=t=>{const e=i(t);this._minutes.textContent=this._setHourOrMinute(e)},a=()=>{t=s(t)+1,n(t)},r=()=>{e=i(e)+1,o(e)},l=()=>{t=s(t)-1,n(t)},h=()=>{e=i(e)-1,o(e)},c=()=>{clearInterval(this._interval),clearTimeout(this._timeoutInterval)},d=t=>{c(),this._timeoutInterval=setTimeout((()=>{this._interval=setInterval(t,100)}),500)};L.on(this._modal,"click mousedown mouseup touchstart touchend contextmenu",`.${Bf}, .${Pf}`,(i=>{t=Number(this._hour.textContent),e=Number(this._minutes.textContent);const{target:s,type:n}=i,o="mousedown"===n||"touchstart"===n;R.hasClass(s,Bf)?R.hasClass(s.parentNode,Hf)?o?d(a):"mouseup"===n||"touchend"===n||"contextmenu"===n?c():a():o?d(r):"mouseup"===n||"touchend"===n||"contextmenu"===n?c():r():R.hasClass(s,Pf)&&(R.hasClass(s.parentNode,Hf)?o?d(l):"mouseup"===n||"touchend"===n?c():l():o?d(h):"mouseup"===n||"touchend"===n?c():h())})),L.on(this._document,`${df} ${ff}`,(()=>{c()})),$.on(window,hf,(i=>{const s=i.code,n=document.activeElement.classList.contains("timepicker-hour"),o=document.activeElement.classList.contains("timepicker-minute"),c=document.activeElement===document.body;switch(t=Number(this._hour.textContent),e=Number(this._minutes.textContent),s){case"ArrowUp":i.preventDefault(),c||n?(this._hour.focus(),a()):o&&r();break;case"ArrowDown":i.preventDefault(),c||n?(this._hour.focus(),l()):o&&h()}}))}_handleClose(){$.on(this._modal,"click",`.${Qf}, .${wf}, .${Cf}`,(({target:t})=>{const{closeModalOnBackdropClick:e}=this._options,i=()=>{R.addStyle(this.elementToggle,{pointerEvents:"auto"}),this._animations&&this._toggleBackdropAnimation(!0),this._removeModal(),this._focusTrap.disable(),this._focusTrap=null,this.elementToggle?this.elementToggle.focus():this.input&&this.input.focus()};if(R.hasClass(t,Cf)){let t;this._toggleAmPm("PM"),this.input.value="",$.trigger(this.input,vf),R.removeClass(this.input,"active"),t=""===Qm(this.input)[0]?["12","00","PM"]:Qm(this.input);const[e,i,s]=t;this._setTipsAndTimesDependOnInputValue("12","00"),this._setActiveClassToTipsOnOpen(e,i,s),this._hour.click()}else(R.hasClass(t,wf)||R.hasClass(t,Qf)&&e)&&i()}))}showValueInput(){return this.input.value}_handleOkButton(){L.on(this._modal,"click",`.${kf}`,(()=>{let{maxTime:t,minTime:e}=this._options;const{format12:i,format24:s,readOnly:n,focusInputAfterApprove:o,disablePast:a,disableFuture:r}=this._options,l=this._document.querySelector(`.${Lf}.${yf}`),h=`${this._hour.textContent}:${this._minutes.textContent}`,c=Number(this._hour.textContent),d=Number(this._minutes.textContent);e=Jm(e,a,i),t=tf(t,r,i);const[u,p,_]=Qm(t,!1),[m,f,g]=Qm(e,!1),b=cNumber(u);let y=!0;l&&(y=_===l.textContent);let x=!0;l&&(x=g===l.textContent);const w=d>p&&c===Number(u),C=d{const l=Qm(o)[1];i=Jm(i,s,t),e=tf(e,n,t);const[h,c,d]=Qm(e,!1),[u,p,_]=Qm(i,!1);if(void 0===d&&void 0===_)if(void 0===d){if(""!==h&&""===u){if(Number(a)>Number(h))return;if(""!==c&&void 0===p&&Number(a)>Number(h))return}else if(""===h&&""!==u&&void 0===c&&""!==p&&(Number(a)Number(h))return;if(""!==c&&void 0===p&&(Number(a)>Number(h)||r>Number(c)))return}else if(""===h&&""!==u&&void 0===c&&""!==p&&(Number(a){const i=B.find(`.${Nf}`,this._modal),s=B.find(`.${Rf}`,this._modal);"mouseover"===t?R.hasClass(e,$f)?i.forEach((t=>R.addClass(t,yf))):s.forEach((t=>R.addClass(t,yf))):R.hasClass(e,$f)?i.forEach((t=>R.removeClass(t,yf))):s.forEach((t=>R.removeClass(t,yf)))}))}_handleDocumentClickInline(){$.on(document,lf,(({target:t})=>{!this._modal||this._modal.contains(t)||R.hasClass(t,"timepicker-icon")||(clearInterval(this._interval),R.addStyle(this.elementToggle,{pointerEvents:"auto"}),this._removeModal())}))}_handleSwitchHourMinute(){var t,e;t="click",e=Of,$.on(document,t,e,(({target:t})=>{R.hasClass(t,"active")||(document.querySelectorAll(e).forEach((t=>{R.hasClass(t,"active")&&R.removeClass(t,"active")})),R.addClass(t,"active"))})),$.on(this._modal,"click",Of,(()=>{const{format24:t}=this._options,e=B.find(Of,this._modal),i=B.find(`.${Uf}`,this._modal),s=B.find(`.${Yf}`,this._modal),n=B.find(`.${Kf}`,this._modal),o=Number(this._hour.textContent),a=Number(this._minutes.textContent),r=(e,n)=>{s.forEach((t=>t.remove())),i.forEach((t=>t.remove())),R.addClass(this._hand,qf),setTimeout((()=>{R.removeClass(this._hand,qf)}),401),this._getAppendClock(e,`.${Sf}`,n);const r=()=>{const t=B.find(`.${Yf}`,this._modal),e=B.find(`.${Uf}`,this._modal);this._addActiveClassToTip(t,o),this._addActiveClassToTip(e,a)};if(t){const t=B.find(`.${Kf}`,this._modal);setTimeout((()=>{this._addActiveClassToTip(t,o),r()}),401)}else setTimeout((()=>{r()}),401)};e.forEach((e=>{R.hasClass(e,yf)&&(R.hasClass(e,zf)?(R.addClass(this._hand,qf),R.addStyle(this._hand,{transform:`rotateZ(${6*this._minutes.textContent}deg)`,height:"calc(40% + 1px)"}),t&&n.length>0&&n.forEach((t=>t.remove())),r(this.minutesArray,`${Uf}`),this._hour.style.pointerEvents="",this._minutes.style.pointerEvents="none"):R.hasClass(e,$f)&&(R.addStyle(this._hand,{transform:`rotateZ(${30*this._hour.textContent}deg)`}),Number(this._hour.textContent)>12?(R.addStyle(this._hand,{transform:`rotateZ(${30*this._hour.textContent-360}deg)`,height:"21.5%"}),Number(this._hour.textContent)>12&&R.addStyle(this._hand,{height:"21.5%"})):R.addStyle(this._hand,{height:"calc(40% + 1px)"}),t&&this._getAppendClock(this.innerHours,`.${Ef}`,Kf),n.length>0&&n.forEach((t=>t.remove())),r(this.hoursArray,`${Yf}`),R.addStyle(this._hour,{pointerEvents:"none"}),R.addStyle(this._minutes,{pointerEvents:""})))}))}))}_handleDisablingTipsMaxTime(t,e,i,s){if(!this._options.maxTime&&!this._options.disableFuture)return;const n=B.find(`.${Yf}`),o=B.find(`.${Kf}`),a=B.find(`.${Uf}`);if(!e||e===t)return ef(o,s),ef(n,s),r=a,l=i,h=s,c=this._hour.textContent,void r.forEach((t=>{Number(t.textContent)>l&&Number(c)==h&&R.addClass(t,"disabled")}));var r,l,h,c;"AM"===e&&"PM"===t&&(n.forEach((t=>{R.addClass(t,"disabled")})),a.forEach((t=>{R.addClass(t,"disabled")})))}_handleDisablingTipsMinTime(t,e,i,s){if(!this._options.minTime&&!this._options.disablePast)return;const n=B.find(`.${Yf}`),o=B.find(`.${Kf}`),a=B.find(`.${Uf}`);var r,l,h,c;e&&e!==t?"PM"===e&&"AM"===t&&(n.forEach((t=>R.addClass(t,"disabled"))),a.forEach((t=>R.addClass(t,"disabled")))):(sf(n,s),sf(o,s),r=a,l=i,h=s,c=this._hour.textContent,r.forEach((t=>{Number(t.textContent){let{maxTime:e,minTime:i}=this._options;const{disablePast:s,disableFuture:n,format12:o}=this._options;i=Jm(i,s,o),e=tf(e,n,o);let[a,r,l]=Qm(e,!1),[h,c,d]=Qm(i,!1);const u=B.find(`.${Yf}`),p=B.find(`.${Uf}`);if(u.forEach((t=>{R.removeClass(t,"disabled")})),p.forEach((t=>{R.removeClass(t,"disabled")})),this._handleDisablingTipsMinTime(t.textContent,d,c,h),this._handleDisablingTipsMaxTime(t.textContent,l,r,a),this._toggleAmPm(t.textContent),!R.hasClass(t,yf)){B.find(`.${Lf}`).forEach((t=>{R.hasClass(t,yf)&&R.removeClass(t,yf)})),R.addClass(t,yf)}}))}_handleClockClick(){let{maxTime:t,minTime:e}=this._options;const{disablePast:i,disableFuture:s,format12:n}=this._options;e=Jm(e,i,n),t=tf(t,s,n);const o=Qm(t,!1)[2],a=Qm(e,!1)[2],r=Qm(t,!1)[0],l=Qm(e,!1)[0],h=B.findOne(`.${Mf}`);L.on(document,`${cf} ${df} ${uf} ${pf} ${_f} ${gf} ${mf} ${ff}`,"",(t=>{qm()||t.preventDefault();const{type:e,target:i}=t,{closeModalOnMinutesClick:s,switchHoursToMinutesOnClick:n}=this._options,c=null!==B.findOne(`.${Uf}`,this._modal),d=null!==B.findOne(`.${Yf}`,this._modal),u=null!==B.findOne(`.${Kf}`,this._modal),p=B.find(`.${Uf}`,this._modal),_=Um(t,h),m=h.offsetWidth/2;let f=Math.atan2(_.y-m,_.x-m);if(qm()){const e=Um(t,h,!0);f=Math.atan2(e.y-m,e.x-m)}let g=null,b=null,v=null;if("mousedown"===e||"mousemove"===e||"touchmove"===e||"touchstart"===e)"mousedown"!==e&&"touchstart"!==e&&"touchmove"!==e||(this._hasTargetInnerClass(i)||R.hasClass(i,Mf)||R.hasClass(i,Sf)||R.hasClass(i,Uf)||R.hasClass(i,Yf)||R.hasClass(i,Tf)||R.hasClass(i,If)||R.hasClass(i,Wf)||R.hasClass(i,jf))&&(this._isMouseMove=!0,qm()&&t.touches&&(g=t.touches[0].clientX,b=t.touches[0].clientY,v=document.elementFromPoint(g,b)));else if("mouseup"===e||"touchend"===e){if(this._isMouseMove=!1,this._hasTargetInnerClass(i)||R.hasClass(i,Sf)||R.hasClass(i,Yf)||R.hasClass(i,Tf)||R.hasClass(i,If)||R.hasClass(i,Wf)||R.hasClass(i,jf)){if((d||u)&&n){const t=Number(this._hour.textContent)>r||Number(this._hour.textContent)r)return;if(this._options.format24&&""!=l&&this._hour.textContento>=10||"00"===o?o:`0${o}`;this._minutes.textContent=t(),this._toggleClassActive(this.minutesArray,this._minutes,p),this._toggleBackgroundColorCircle(`${Uf}`),this._objWithDataOnChange.degreesMinutes=n,this._objWithDataOnChange.minutes=o}}if(d||u){let e,s=Math.trunc(180*f/Math.PI)+90;if(s=30*Math.round(s/30),R.addClass(this._circle,"active"),void 0===this._makeHourDegrees(i,s,e))return;const n=()=>{if(qm()&&s&&v){const{degrees:t,hour:i}=this._makeHourDegrees(v,s,e);return this._handleMoveHand(v,i,t)}{const{degrees:t,hour:n}=this._makeHourDegrees(i,s,e);return this._handleMoveHand(i,n,t)}};this._objWithDataOnChange.degreesHours=s,this._handlerMaxMinHoursOptions(s,r,l,o,a,t)&&n()}t.stopPropagation()}))}_hasTargetInnerClass(t){return R.hasClass(t,Ef)||R.hasClass(t,Kf)||R.hasClass(t,Xf)}_handleMoveHand(t,e,i){const s=B.find(`.${Yf}`,this._modal),n=B.find(`.${Kf}`,this._modal);this._isMouseMove&&(this._hasTargetInnerClass(t)?R.addStyle(this._hand,{height:"21.5%"}):R.addStyle(this._hand,{height:"calc(40% + 1px)"}),R.addStyle(this._hand,{transform:`rotateZ(${i}deg)`}),this._hour.textContent=e>=10||"00"===e?e:`0${e}`,this._toggleClassActive(this.hoursArray,this._hour,s),this._toggleClassActive(this.innerHours,this._hour,n),this._objWithDataOnChange.hour=e>=10||"00"===e?e:`0${e}`)}_handlerMaxMinMinutesOptions(t,e){let{maxTime:i,minTime:s}=this._options;const{format12:n,increment:o,disablePast:a,disableFuture:r}=this._options;s=Jm(s,a,n),i=tf(i,r,n);const l=Qm(i,!1)[1],h=Qm(s,!1)[1],c=Qm(i,!1)[0],d=Qm(s,!1)[0],u=Qm(i,!1)[2],p=Qm(s,!1)[2],_=""!==l?6*l:"",m=""!==h?6*h:"",f=Number(this._hour.textContent);if(u||p){if(""!==s){if("PM"===p&&this._isAmEnabled)return;if("PM"===p&&this._isPmEnabled){if(f=Number(c)&&t>=_+6)return t}else if("AM"===u&&this._isAmEnabled&&f>=Number(c)&&t>=_+6)return t}}else if(""!==i&&""!==s){if(c==f&&t>_||d==f&&t=Number(c)&&t>=_+6)return t;return o&&(t=30*Math.round(t/30)),t<=0?t=360+t:t>=360&&(t=0),{degrees:t,minute:e}}_removeModal(){this._animations?setTimeout((()=>{this._removeModalElements(),this._scrollBar.reset()}),300):(this._removeModalElements(),this._scrollBar.reset()),L.off(this._document,`${lf} ${hf} ${cf} ${df} ${uf} ${pf} ${_f} ${gf} ${mf} ${ff}`),$.off(window,hf)}_removeModalElements(){this._modal&&this._modal.remove()}_toggleBackdropAnimation(t=!1){t?(R.addClass(this._wrapper,"animation"),R.addClass(this._wrapper,"fade-out"),this._wrapper.style.animationDuration="300ms"):(R.addClass(this._wrapper,"animation"),R.addClass(this._wrapper,"fade-in"),this._wrapper.style.animationDuration="300ms",this._options.inline||R.addClass(this._clock,Af))}_addActiveClassToTip(t,e){t.forEach((t=>{Number(t.textContent)===Number(e)&&R.addClass(t,yf)}))}_setHourOrMinute(t){return t<10?`0${t}`:t}_appendTimes(){const{format24:t}=this._options;t?(this._getAppendClock(this.hoursArray,`.${Sf}`,`${Yf}`),this._getAppendClock(this.innerHours,`.${Ef}`,Kf)):this._getAppendClock(this.hoursArray,`.${Sf}`,`${Yf}`)}_getConfig(t){const e=R.getDataAttributes(this._element);return t={...Gf,...e,...t,isRTL:f},d(nf,t,Jf),t}_getContainer(){return B.findOne(this._options.container)}_listenToUserInput(){$.on(this.input,"input",(t=>{this._handleUserInput(t.target.value)}))}_handleUserInput(t){const{format24:e,format12:i}=this._options;if(""===this.input.value)return;const s=/^(0?[1-9]|1[0-2]):[0-5][0-9] [APap][mM]$/.test(t);!0===/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(t)&&e?(this._isInvalidTimeFormat=!1,this._inputValue=this.input.value,this._currentTime=Km(this._inputValue)):!0===s&&i?(this._isInvalidTimeFormat=!1,this._inputValue=this.input.value,this._currentTime=Ym(this._inputValue)):this._isInvalidTimeFormat=!0}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,of);const i="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new tg(this,i)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}class eg extends to{static get NAME(){return"navbar"}init(){this._onScroll(),this._addEvent(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}dispose(){this._removeEvent(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_addEvent(){$.on(window,"scroll",(()=>this._onScroll()))}_removeEvent(){$.off(window,"scroll")}_onScroll(){window.scrollY>0?R.addClass(this._element,"navbar-scrolled"):R.removeClass(this._element,"navbar-scrolled")}}const ig="infiniteScroll",sg=`mdb.${ig}`,ng=`completed${`.${sg}`}`,og={infiniteDirection:"y"},ag={infiniteDirection:"string"};class rg extends to{constructor(t,e){super(t),this._element=t,this._options=this._getConfig(e),this._elementScrollHandler=this._scrollHandler.bind(this),this._init(),this._element!==window&&(R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return ig}get rect(){return this._element.getBoundingClientRect()}get condition(){return this._element===window?Math.abs(window.scrollY+window.innerHeight-document.documentElement.scrollHeight)<1:"x"===this._options.infiniteDirection?this.rect.width+this._element.scrollLeft+10>=this._element.scrollWidth:Math.ceil(this.rect.height+this._element.scrollTop)>=this._element.scrollHeight}dispose(){$.off(this._element,"scroll",this._elementScrollHandler),this._element!==window&&R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_init(){$.on(this._element,"scroll",this._elementScrollHandler)}_scrollHandler(){this.condition&&$.trigger(this._element,ng)}_getConfig(t){const e={...og,...R.getDataAttributes(this._element),...t};return d(ig,e,ag),e}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,sg);if(e||(e=new rg(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}const lg="lazyLoad",hg="mdb.lazyLoad",cg="lazy",dg=["img","video"],ug=`.${hg}`,pg=`contentLoaded${ug}`,_g=`loadingError${ug}`,mg={lazySrc:"(string|null)",lazyDelay:"number",lazyAnimation:"string",lazyOffset:"number",lazyPlaceholder:"(string|undefined)",lazyError:"(string|undefined)"},fg={lazySrc:null,lazyDelay:500,lazyAnimation:"fade-in",lazyOffset:0};class gg extends to{constructor(t,e){super(t),this._options=this._getConfig(e),this._scrollHandler=this._handleScroll.bind(this),this._errorHandler=this._setElementError.bind(this),this._childrenInstances=null,this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return lg}get offsetValues(){return this._element.getBoundingClientRect()}get inViewport(){if(this.parent){const t=this.parent.getBoundingClientRect();return t.y>0&&t.y=t.y&&this.offsetValues.y<=t.y+t.height&&this.offsetValues.y<=window.innerHeight}return this.offsetValues.top+this._options.lazyOffset<=window.innerHeight&&this.offsetValues.bottom>=0}get parent(){const[t]=B.parents(this._element,".lazy");return t}get node(){return this._element.nodeName}get isContainer(){return!B.matches(this._element,dg)}dispose(){$.off(this._element,"load"),$.off(this._element,"error",this._errorHandler),$.off(window,"scroll",this._scrollHandler),this._animation&&(this._animation.dispose(),this._animation=null),this._childrenInstances&&this._childrenInstances.forEach((t=>t.dispose())),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_init(){R.addClass(this._element,cg),this.isContainer?this._setupContainer():this._setupElement()}_setupElement(){$.one(this._element,"error",this._errorHandler),this._options.lazyPlaceholder&&this._setPlaceholder(),this._animation=new Sa(this._element,{animation:this._options.lazyAnimation,animationStart:"onLoad"}),$.one(this._element,"load",this._scrollHandler),this.parent&&$.on(this.parent,"scroll",this._scrollHandler),$.on(window,"scroll",this._scrollHandler)}_handleScroll(){this.inViewport&&(this._timeout=setTimeout((()=>{this._setSrc(),this._element.classList.remove(cg),this._removeAttrs(),this._animation.init()}),this._options.lazyDelay),this.parent&&$.off(this.parent,"scroll",this._scrollHandler),$.off(window,"scroll",this._scrollHandler))}_setElementError(){this._options.lazyError&&this._element.src!==this._options.lazyError?this._element.setAttribute("src",this._options.lazyError):this._element.alt="404 not found",$.trigger(this._element,_g)}_setSrc(){this._element.setAttribute("src",this._options.lazySrc),$.trigger(this._element,pg)}_setPlaceholder(){"IMG"===this.node?this._element.setAttribute("src",this._options.lazyPlaceholder):"VIDEO"===this.node&&this._element.setAttribute("poster",this._options.lazyPlaceholder)}_removeAttrs(){["src","delay","animation","placeholder","offset","error"].forEach((t=>{R.removeDataAttribute(this._element,`lazy-${t}`)}))}_setupContainer(){this._childrenInstances=B.children(this._element,dg).map((t=>new gg(t,this._options)))}_getConfig(t){const e={...fg,...t,...R.getDataAttributes(this._element)};return d(lg,e,mg),e}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,hg);if(e||(e=new gg(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}function bg(t){return t.getDate()}function vg(t){return t.getDay()}function yg(t){return t.getMonth()}function xg(t){return t.getFullYear()}function wg(t){return function(t){return Sg(t.getFullYear(),t.getMonth()+1,0)}(t).getDate()}function Cg(){return new Date}function kg(t,e){return Tg(t,12*e)}function Tg(t,e){const i=Sg(t.getFullYear(),t.getMonth()+e,t.getDate());return bg(t)!==bg(i)&&i.setDate(0),i}function Ag(t,e){return Sg(t.getFullYear(),t.getMonth(),t.getDate()+e)}function Sg(t,e,i){const s=new Date(t,e,i);return t>=0&&t<100&&s.setFullYear(s.getFullYear()-1900),s}function Eg(t){const e=t.split("-");return Sg(e[0],e[1],e[2])}function Mg(t,e){return xg(t)-xg(e)||yg(t)-yg(e)||bg(t)-bg(e)}function Og(t,e){return t.setHours(0,0,0,0),e.setHours(0,0,0,0),t.getTime()===e.getTime()}function Dg(t,e){const i=xg(t)-function(t,e,i){let s=0;if(i){s=xg(i)-t+1}else e&&(s=xg(e));return s}();return(i%(s=e)+s)%s;var s}function Ig(t,e,i,s,n,o){const a=new Date;a.setHours(0,0,0,0);const r=e&&Mg(t,e)<=-1,l=i&&Mg(t,i)>=1,h=n&&Mg(t,a)<=-1,c=o&&Mg(t,a)>=1,d=s&&!1===s(t);return r||l||d||h||c}function $g(t,e,i,s,n,o){const a=new Date,r=s&&xg(s),l=s&&yg(s),h=i&&xg(i),c=i&&yg(i),d=xg(a),u=yg(a);return l&&r&&(e>r||e===r&&t>l)||c&&h&&(ed||e===d&&t>u)}function Lg(t,e,i,s,n){const o=e&&xg(e),a=i&&xg(i),r=xg(new Date);return a&&t>a||o&&tr}function Pg(t,e,i,s,n,o,a,r){return"days"===i?xg(t)===xg(e)&&yg(t)===yg(e):"months"===i?xg(t)===xg(e):"years"===i&&(xg(e)>=r&&xg(e)<=a)}function Ng(t,e,i,s,n,o,a,r,l){const h=yg(t),c=xg(t),d=bg(t),u=vg(t),p=g("div"),_=`\n ${Bg(t,h,c,e,i,s,n,o,a,r)}\n `,m=`\n ${function(t,e,i,s,n){return`\n
\n ${s.headerTemplate?Rg(t,e,i,n,s):`\n
\n ${s.title}\n
\n
\n ${s.weekdaysShort[e]}, ${s.monthsShort[i]} ${t}\n
\n `}\n
\n `}(d,u,h,n,t)}\n ${Bg(t,h,c,e,i,s,n,o,a,r)}\n `;return n.inline?(R.addClass(p,"datepicker-dropdown-container"),R.addClass(p,`datepicker-dropdown-container-${l}`),p.innerHTML=_):(R.addClass(p,"datepicker-modal-container"),R.addClass(p,`datepicker-modal-container-${l}`),p.innerHTML=m),p}function Rg(t,e,i,s,n){const{weekdaysShort:o,weekdaysFull:a,monthsShort:r,headerTemplateModifier:l,headerTemplate:h}=n,c=l?l(s):s;return h.replaceAll("[day]",t).replaceAll("[weekday]",o[e]).replaceAll("[weekdayFull]",a[e]).replaceAll("[month]",r[i]).replaceAll("[selected]",c)}function Bg(t,e,i,s,n,o,a,r,l,h){let c;return c=a.inline?`\n
\n ${Wg(e,i,a)}\n
\n ${Hg(t,i,s,n,o,a,r,l,h)}\n
\n
\n `:`\n
\n ${Wg(e,i,a)}\n
\n ${Hg(t,i,s,n,o,a,r,l,h)}\n
\n ${function(t){const e=``,i=``,s=``;return`\n \n `}(a)}\n
\n `,c}function Hg(t,e,i,s,n,o,a,r,l){let h;return h="days"===o.view?zg(t,i,o):"months"===o.view?Fg(e,s,n,o,a):Vg(t,s,o,r,l),h}function Wg(t,e,i){return`\n
\n \n
\n \n \n
\n
\n `}function zg(t,e,i){const s=function(t,e,i){const s=[],n=yg(t),o=yg(Tg(t,-1)),a=yg(Tg(t,1)),r=xg(t),l=function(t,e,i){const s=i.startDay,n=s>0?7-s:0,o=new Date(t,e).getDay()+n;return o>=7?o-7:o}(r,n,i),h=wg(t),c=wg(Tg(t,-1)),d=7;let u=1,p=!1;for(let _=1;_h&&(u=1,p=!1);const s=Sg(r,p?n:a,u);t.push({date:s,currentMonth:p,isSelected:e&&Og(s,e),isToday:Og(s,Cg()),dayNumber:bg(s),disabled:Ig(s,i.min,i.max,i.filter,i.disablePast,i.disableFuture)}),u++}s.push(t)}return s}(t,e,i);return`\n \n \n ${`\n \n ${i.weekdaysNarrow.map(((t,e)=>``)).join("")}\n \n `}\n \n \n ${s.map((t=>`\n \n ${t.map((t=>{const e=`${i.weekdaysFull[vg(t.date)]}, ${i.monthsFull[yg(t.date)]} ${bg(t.date)}, ${xg(t.date)}`;return`\n \n \n ${t.dayNumber}\n \n \n `})).join("")}\n \n `)).join("")}\n \n
${t}
\n `}function Fg(t,e,i,s,n){const o=function(t,e){const i=[];let s=[];for(let n=0;n\n \n ${`\n ${o.map((n=>`\n \n ${n.map((n=>{const o=s.monthsShort.indexOf(n),l=$g(o,t,s.min,s.max,s.disablePast,s.disableFuture);return`\n \n
${n}
\n \n `})).join("")}\n \n `)).join("")}\n `}\n \n \n `}function Vg(t,e,i,s,n){const o=function(t,e,i){const s=[],n=xg(t),o=Dg(t,e),a=n-o;let r=[];for(let l=0;l\n \n ${`\n ${o.map((t=>`\n \n ${t.map((t=>{const s=Lg(t,i.min,i.max,i.disablePast,i.disableFuture);return`\n \n
${t}
\n \n `})).join("")}\n \n `)).join("")}\n `}\n \n \n `}const jg=24,Yg="datepicker",Xg=`mdb.${Yg}`,Kg=`.${Xg}`,Ug=`close${Kg}`,qg=`open${Kg}`,Qg=`valueChanged${Kg}`,Zg=`viewChanged${Kg}`,Gg=`click${Kg}.data-api`,Jg='[data-mdb-toggle="datepicker"]',tb={title:"Select date",container:"body",disablePast:!1,disableFuture:!1,monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysNarrow:["S","M","T","W","T","F","S"],okBtnText:"Ok",clearBtnText:"Clear",cancelBtnText:"Cancel",okBtnLabel:"Confirm selection",clearBtnLabel:"Clear selection",cancelBtnLabel:"Cancel selection",nextMonthLabel:"Next month",prevMonthLabel:"Previous month",nextYearLabel:"Next year",prevYearLabel:"Previous year",nextMultiYearLabel:"Next 24 years",prevMultiYearLabel:"Previous 24 years",switchToMultiYearViewLabel:"Switch to year list",switchToDayViewLabel:"Switch to day list",startDate:null,startDay:0,format:"dd/mm/yyyy",view:"days",min:null,max:null,filter:null,inline:!1,toggleButton:!0,disableToggleButton:!1,disableInput:!1,animations:!0,confirmDateOnSelect:!1,removeOkBtn:!1,removeCancelBtn:!1,removeClearBtn:!1,headerTemplate:null,headerTemplateModifier:null},eb={title:"string",container:"string",disablePast:"boolean",disableFuture:"boolean",monthsFull:"array",monthsShort:"array",weekdaysFull:"array",weekdaysShort:"array",weekdaysNarrow:"array",okBtnText:"string",clearBtnText:"string",cancelBtnText:"string",okBtnLabel:"string",clearBtnLabel:"string",cancelBtnLabel:"string",nextMonthLabel:"string",prevMonthLabel:"string",nextYearLabel:"string",prevYearLabel:"string",nextMultiYearLabel:"string",prevMultiYearLabel:"string",switchToMultiYearViewLabel:"string",switchToDayViewLabel:"string",startDate:"(null|string|date)",startDay:"number",format:"string",view:"string",min:"(null|date|string)",max:"(null|date|string)",filter:"(null|function)",inline:"boolean",toggleButton:"boolean",disableToggleButton:"boolean",disableInput:"boolean",animations:"boolean",confirmDateOnSelect:"boolean",removeOkBtn:"boolean",removeCancelBtn:"boolean",removeClearBtn:"boolean",headerTemplate:"(null|string)",headerTemplateModifier:"(null|function)"};class ib extends to{constructor(t,e){super(t),this._input=B.findOne("input",this._element),this._options=this._getConfig(e),this._activeDate=new Date,this._selectedDate=null,this._selectedYear=null,this._selectedMonth=null,this._headerDate=null,this._headerYear=null,this._headerMonth=null,this._view=this._options.view,this._popper=null,this._focusTrap=null,this._isOpen=!1,this._toggleButtonId=this._element.id?`datepicker-toggle-${this._element.id}`:o("datepicker-toggle-"),this._animations=!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&this._options.animations,this._scrollBar=new he,this._init(),this.toggleButton&&this._options.disableToggle&&(this.toggleButton.disabled="true"),this._options.disableInput&&(this._input.disabled="true"),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return Yg}get container(){return B.findOne(`.datepicker-modal-container-${this._toggleButtonId}`)||B.findOne(`.datepicker-dropdown-container-${this._toggleButtonId}`)}get options(){return this._options}get activeCell(){let t;return"days"===this._view&&(t=this._getActiveDayCell()),"months"===this._view&&(t=this._getActiveMonthCell()),"years"===this._view&&(t=this._getActiveYearCell()),t}get activeDay(){return bg(this._activeDate)}get activeMonth(){return yg(this._activeDate)}get activeYear(){return xg(this._activeDate)}get firstYearInView(){return this.activeYear-Dg(this._activeDate,jg)}get lastYearInView(){return this.firstYearInView+jg-1}get viewChangeButton(){return B.findOne(".datepicker-view-change-button",this.container)}get previousButton(){return B.findOne(".datepicker-previous-button",this.container)}get nextButton(){return B.findOne(".datepicker-next-button",this.container)}get okButton(){return B.findOne(".datepicker-ok-btn",this.container)}get cancelButton(){return B.findOne(".datepicker-cancel-btn",this.container)}get clearButton(){return B.findOne(".datepicker-clear-btn",this.container)}get datesContainer(){return B.findOne(".datepicker-view",this.container)}get toggleButton(){return B.findOne(".datepicker-toggle-button",this._element)}update(t={}){this._options=this._getConfig({...this._options,...t})}_getConfig(t){const e=R.getDataAttributes(this._element);if(t={...tb,...e,...t},d(Yg,t,eb),t.max&&"string"==typeof t.max&&(t.max=new Date(t.max)),t.min&&"string"==typeof t.min&&(t.min=new Date(t.min)),t.startDay&&0!==t.startDay){const e=this._getNewDaysOrderArray(t);t.weekdaysNarrow=e}return t}_getContainer(){return B.findOne(this._options.container)}_getNewDaysOrderArray(t){const e=t.startDay,i=t.weekdaysNarrow;return i.slice(e).concat(i.slice(0,e))}_init(){!this.toggleButton&&this._options.toggleButton&&(this._appendToggleButton(),(this._input.readOnly||this._input.disabled)&&(this.toggleButton.style.pointerEvents="none")),this._listenToUserInput(),this._listenToToggleClick(),this._listenToToggleKeydown()}_appendToggleButton(){const t=`\n \n `;this._element.insertAdjacentHTML("beforeend",t),R.addClass(this._input,"form-icon-trailing")}open(){if(this._input.readOnly||this._input.disabled)return;const t=$.trigger(this._element,qg);if(this._isOpen||t.defaultPrevented)return;this._setInitialDate();const e=function(){const t=g("div");return R.addClass(t,"datepicker-backdrop"),t}(),i=Ng(this._activeDate,this._selectedDate,this._selectedYear,this._selectedMonth,this._options,4,jg,4,this._toggleButtonId);this._options.inline?this._openDropdown(i):(this._openModal(e,i),this._scrollBar.hide()),this._animations&&(R.addClass(this.container,"animation"),R.addClass(this.container,"fade-in"),this.container.style.animationDuration="300ms",R.addClass(e,"animation"),R.addClass(e,"fade-in"),e.style.animationDuration="150ms"),this._setFocusTrap(this.container),this._listenToDateSelection(),this._addControlsListeners(),this._updateControlsDisabledState(),this._listenToEscapeClick(),this._listenToKeyboardNavigation(),this._listenToDatesContainerFocus(),this._listenToDatesContainerBlur(),this._asyncFocusDatesContainer(),this._updateViewControlsAndAttributes(this._view),this._isOpen=!0,setTimeout((()=>{this._listenToOutsideClick()}),0)}_openDropdown(t){this._popper=Os(this._input,t,{placement:"bottom-start"});this._getContainer().appendChild(t)}_openModal(t,e){const i=this._getContainer();i.appendChild(t),i.appendChild(e)}_setFocusTrap(t){this._focusTrap=new z_(t,{event:"keydown",condition:t=>"Tab"===t.key}),this._focusTrap.trap()}_listenToUserInput(){$.on(this._input,"input",(t=>{this._handleUserInput(t.target.value)}))}_listenToToggleClick(){$.on(this._element,Gg,Jg,(t=>{t.preventDefault(),this.open()}))}_listenToToggleKeydown(){$.on(this._element,"keydown",Jg,(t=>{t.keyCode!==U_||this._isOpen||this.open()}))}_listenToDateSelection(){$.on(this.datesContainer,"click",(t=>{this._handleDateSelection(t)}))}_handleDateSelection(t){const e="DIV"===t.target.nodeName?t.target.parentNode.dataset:t.target.dataset,i="DIV"===t.target.nodeName?t.target.parentNode:t.target;if(e.mdbDate&&this._pickDay(e.mdbDate,i),e.mdbMonth&&e.mdbYear){const t=parseInt(e.mdbMonth,10),i=parseInt(e.mdbYear,10);this._pickMonth(t,i)}if(e.mdbYear&&!e.mdbMonth){const t=parseInt(e.mdbYear,10);this._pickYear(t)}this._options.inline||this._updateHeaderDate(this._activeDate,this._options.monthsShort,this._options.weekdaysShort)}_updateHeaderDate(t,e,i){const s=B.findOne(".datepicker-date-text",this.container),n=yg(t),o=bg(t),a=vg(t),r=B.findOne(".datepicker-header",this.container);this._options.headerTemplate&&r?r.innerHTML=Rg(o,a,n,t,this._options):s.innerHTML=`${i[a]}, ${e[n]} ${o}`}_addControlsListeners(){$.on(this.nextButton,"click",(()=>{"days"===this._view?this.nextMonth():"years"===this._view?this.nextYears():this.nextYear(),this._updateControlsDisabledState()})),$.on(this.previousButton,"click",(()=>{"days"===this._view?this.previousMonth():"years"===this._view?this.previousYears():this.previousYear(),this._updateControlsDisabledState()})),$.on(this.viewChangeButton,"click",(()=>{"days"===this._view?this._changeView("years"):"years"!==this._view&&"months"!==this._view||this._changeView("days")})),this._options.inline||this._listenToFooterButtonsClick()}_listenToFooterButtonsClick(){$.on(this.okButton,"click",(()=>this.handleOk())),$.on(this.cancelButton,"click",(()=>this.handleCancel())),$.on(this.clearButton,"click",(()=>this.handleClear()))}_listenToOutsideClick(){$.on(document,Gg,(t=>{const e=t.target===this.container,i=this.container&&this.container.contains(t.target);e||i||this.close()}))}_listenToEscapeClick(){$.on(document,"keydown",(t=>{t.keyCode===q_&&this._isOpen&&this.close()}))}_listenToKeyboardNavigation(){$.on(this.datesContainer,"keydown",(t=>{this._handleKeydown(t)}))}_listenToDatesContainerFocus(){$.on(this.datesContainer,"focus",(()=>{this._focusActiveCell(this.activeCell)}))}_listenToDatesContainerBlur(){$.on(this.datesContainer,"blur",(()=>{this._removeCurrentFocusStyles()}))}_handleKeydown(t){"days"===this._view&&this._handleDaysViewKeydown(t),"months"===this._view&&this._handleMonthsViewKeydown(t),"years"===this._view&&this._handleYearsViewKeydown(t)}_handleDaysViewKeydown(t){const e=this._activeDate,i=this.activeCell;switch(t.keyCode){case F_:this._activeDate=Ag(this._activeDate,f?1:-1);break;case j_:this._activeDate=Ag(this._activeDate,f?-1:1);break;case V_:this._activeDate=Ag(this._activeDate,-7);break;case Y_:this._activeDate=Ag(this._activeDate,7);break;case X_:this._activeDate=Ag(this._activeDate,1-bg(this._activeDate));break;case K_:this._activeDate=Ag(this._activeDate,wg(this._activeDate)-bg(this._activeDate));break;case 33:this._activeDate=Tg(this._activeDate,-1);break;case 34:this._activeDate=Tg(this._activeDate,1);break;case U_:case 32:return this._selectDate(this._activeDate),this._handleDateSelection(t),void t.preventDefault();default:return}Pg(e,this._activeDate,this._view,0,this._options.min,this._options.max)||this._changeView("days"),this._removeHighlightFromCell(i),this._focusActiveCell(this.activeCell),t.preventDefault()}_asyncFocusDatesContainer(){setTimeout((()=>{this.datesContainer.focus()}),0)}_focusActiveCell(t){t&&R.addClass(t,"focused")}_removeHighlightFromCell(t){t&&t.classList.remove("focused")}_getActiveDayCell(){const t=B.find("td",this.datesContainer);return Array.from(t).find((t=>Og(Eg(t.dataset.mdbDate),this._activeDate)))}_handleMonthsViewKeydown(t){const e=this._activeDate,i=this.activeCell;switch(t.keyCode){case F_:this._activeDate=Tg(this._activeDate,f?1:-1);break;case j_:this._activeDate=Tg(this._activeDate,f?-1:1);break;case V_:this._activeDate=Tg(this._activeDate,-4);break;case Y_:this._activeDate=Tg(this._activeDate,4);break;case X_:this._activeDate=Tg(this._activeDate,-this.activeMonth);break;case K_:this._activeDate=Tg(this._activeDate,11-this.activeMonth);break;case 33:this._activeDate=kg(this._activeDate,-1);break;case 34:this._activeDate=kg(this._activeDate,1);break;case U_:case 32:return void this._selectMonth(this.activeMonth);default:return}Pg(e,this._activeDate,this._view,0,this._options.min,this._options.max)||this._changeView("months"),this._removeHighlightFromCell(i),this._focusActiveCell(this.activeCell),t.preventDefault()}_getActiveMonthCell(){const t=B.find("td",this.datesContainer);return Array.from(t).find((t=>{const e=parseInt(t.dataset.mdbYear,10),i=parseInt(t.dataset.mdbMonth,10);return e===this.activeYear&&i===this.activeMonth}))}_handleYearsViewKeydown(t){const e=this._activeDate,i=this.activeCell;switch(t.keyCode){case F_:this._activeDate=kg(this._activeDate,f?1:-1);break;case j_:this._activeDate=kg(this._activeDate,f?-1:1);break;case V_:this._activeDate=kg(this._activeDate,-4);break;case Y_:this._activeDate=kg(this._activeDate,4);break;case X_:this._activeDate=kg(this._activeDate,-Dg(this._activeDate,24));break;case K_:this._activeDate=kg(this._activeDate,24-Dg(this._activeDate,24)-1);break;case 33:this._activeDate=kg(this._activeDate,-24);break;case 34:this._activeDate=kg(this._activeDate,24);break;case U_:case 32:return void this._selectYear(this.activeYear);default:return}Pg(e,this._activeDate,this._view,0,this._options.min,this._options.max)||this._changeView("years"),this._removeHighlightFromCell(i),this._focusActiveCell(this.activeCell),t.preventDefault()}_getActiveYearCell(){const t=B.find("td",this.datesContainer);return Array.from(t).find((t=>parseInt(t.dataset.mdbYear,10)===this.activeYear))}_setInitialDate(){this._input.value?this._handleUserInput(this._input.value):this._options.startDate?this._activeDate=new Date(this._options.startDate):this._activeDate=new Date}close(){const t=$.trigger(this._element,Ug);this._isOpen&&!t.defaultPrevented&&(this._removeDatepickerListeners(),this._animations&&(R.addClass(this.container,"animation"),R.addClass(this.container,"fade-out")),this._options.inline?this._closeDropdown():this._closeModal(),this._isOpen=!1,this._view=this._options.view,this.toggleButton?this.toggleButton.focus():this._input.focus())}_closeDropdown(){const t=B.findOne(".datepicker-dropdown-container"),e=this._getContainer();this._animations?t.addEventListener("animationend",(()=>{t&&e.removeChild(t),this._popper&&this._popper.destroy()})):(t&&e.removeChild(t),this._popper&&this._popper.destroy()),this._removeFocusTrap()}_closeModal(){const t=B.findOne(".datepicker-backdrop"),e=B.findOne(".datepicker-modal-container");e&&t&&(this._animations&&(R.addClass(t,"animation"),R.addClass(t,"fade-out")),this._animations?t.addEventListener("animationend",(()=>{this._removePicker(t,e),this._scrollBar.reset()})):(this._removePicker(t,e),this._scrollBar.reset()))}_removePicker(t,e){const i=this._getContainer();i.removeChild(t),i.removeChild(e)}_removeFocusTrap(){this._focusTrap&&(this._focusTrap.disable(),this._focusTrap=null)}_removeDatepickerListeners(){$.off(this.nextButton,"click"),$.off(this.previousButton,"click"),$.off(this.viewChangeButton,"click"),$.off(this.okButton,"click"),$.off(this.cancelButton,"click"),$.off(this.clearButton,"click"),$.off(this.datesContainer,"click"),$.off(this.datesContainer,"keydown"),$.off(this.datesContainer,"focus"),$.off(this.datesContainer,"blur"),$.off(document,Gg)}dispose(){this._isOpen&&this.close(),this._removeInputAndToggleListeners();const t=B.findOne(`#${this._toggleButtonId}`);t&&this._element.removeChild(t),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_removeInputAndToggleListeners(){$.off(this._input,"input"),$.off(this._element,Gg,Jg),$.off(this._element,"keydown",Jg)}handleOk(){this._confirmSelection(this._headerDate),this.close()}_selectDate(t,e=this.activeCell){const{min:i,max:s,filter:n,disablePast:o,disableFuture:a}=this._options;Ig(t,i,s,n,o,a)||(this._removeCurrentSelectionStyles(),this._removeCurrentFocusStyles(),this._addSelectedStyles(e),this._selectedDate=t,this._selectedYear=xg(t),this._selectedMonth=yg(t),this._headerDate=t,(this._options.inline||this.options.confirmDateOnSelect)&&(this._confirmSelection(t),this.close()))}_selectYear(t,e=this.activeCell){this._removeCurrentSelectionStyles(),this._removeCurrentFocusStyles(),this._addSelectedStyles(e),this._headerYear=t,this._asyncChangeView("months")}_selectMonth(t,e=this.activeCell){this._removeCurrentSelectionStyles(),this._removeCurrentFocusStyles(),this._addSelectedStyles(e),this._headerMonth=t,this._asyncChangeView("days")}_removeSelectedStyles(t){t&&t.classList.remove("selected")}_addSelectedStyles(t){t&&R.addClass(t,"selected")}_confirmSelection(t){if(t){const e=this.formatDate(t);this._input.value=e,R.addClass(this._input,"active"),$.trigger(this._element,Qg,{date:t})}}handleCancel(){this._selectedDate=null,this._selectedYear=null,this._selectedMonth=null,this.close()}handleClear(){this._selectedDate=null,this._selectedMonth=null,this._selectedYear=null,this._headerDate=null,this._headerMonth=null,this._headerYear=null,this._removeCurrentSelectionStyles(),this._input.value="",this._input.classList.remove("active"),this._setInitialDate(),this._changeView("days"),this._updateHeaderDate(this._activeDate,this._options.monthsShort,this._options.weekdaysShort)}_removeCurrentSelectionStyles(){const t=B.findOne(".selected",this.container);t&&t.classList.remove("selected")}_removeCurrentFocusStyles(){const t=B.findOne(".focused",this.container);t&&t.classList.remove("focused")}formatDate(t){const e=bg(t),i=this._addLeadingZero(bg(t)),s=this._options.weekdaysShort[vg(t)],n=this._options.weekdaysFull[vg(t)],o=yg(t)+1,a=this._addLeadingZero(yg(t)+1),r=this._options.monthsShort[yg(t)],l=this._options.monthsFull[yg(t)],h=2===xg(t).toString().length?xg(t):xg(t).toString().slice(2,4),c=xg(t),d=this._options.format.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g);let u="";return d.forEach((t=>{switch(t){case"dddd":t=t.replace(t,n);break;case"ddd":t=t.replace(t,s);break;case"dd":t=t.replace(t,i);break;case"d":t=t.replace(t,e);break;case"mmmm":t=t.replace(t,l);break;case"mmm":t=t.replace(t,r);break;case"mm":t=t.replace(t,a);break;case"m":t=t.replace(t,o);break;case"yyyy":t=t.replace(t,c);break;case"yy":t=t.replace(t,h)}u+=t})),u}_addLeadingZero(t){return parseInt(t,10)<10?`0${t}`:t}_pickDay(t,e){const i=Eg(t),{min:s,max:n,filter:o,disablePast:a,disableFuture:r}=this._options;Ig(i,s,n,o,a,r)||(this._activeDate=i,this._selectDate(i,e))}_pickYear(t){const{min:e,max:i,disablePast:s,disableFuture:n}=this._options;if(Lg(t,e,i,s,n))return;const o=Sg(t,this.activeMonth,this.activeDay);this._activeDate=o,this._selectedDate=o,this._selectYear(t)}_pickMonth(t,e){const{min:i,max:s,disablePast:n,disableFuture:o}=this._options;if($g(t,e,i,s,n,o)||Lg(e,i,s,n,o))return;const a=Sg(e,t,this.activeDay);this._activeDate=a,this._selectMonth(t)}nextMonth(){const t=Tg(this._activeDate,1),e=zg(t,this._headerDate,this._options);this._activeDate=t,this.viewChangeButton.textContent=`${this._options.monthsFull[this.activeMonth]} ${this.activeYear}`,this.datesContainer.innerHTML=e}previousMonth(){const t=Tg(this._activeDate,-1);this._activeDate=t;const e=zg(t,this._headerDate,this._options);this.viewChangeButton.textContent=`${this._options.monthsFull[this.activeMonth]} ${this.activeYear}`,this.datesContainer.innerHTML=e}nextYear(){const t=kg(this._activeDate,1);this._activeDate=t,this.viewChangeButton.textContent=`${this.activeYear}`;const e=Fg(this.activeYear,this._selectedYear,this._selectedMonth,this._options,4);this.datesContainer.innerHTML=e}previousYear(){const t=kg(this._activeDate,-1);this._activeDate=t,this.viewChangeButton.textContent=`${this.activeYear}`;const e=Fg(this.activeYear,this._selectedYear,this._selectedMonth,this._options,4);this.datesContainer.innerHTML=e}nextYears(){const t=kg(this._activeDate,24);this._activeDate=t;const e=Vg(t,this._selectedYear,this._options,jg,4);this.viewChangeButton.textContent=`${this.firstYearInView} - ${this.lastYearInView}`,this.datesContainer.innerHTML=e}previousYears(){const t=kg(this._activeDate,-24);this._activeDate=t;const e=Vg(t,this._selectedYear,this._options,jg,4);this.viewChangeButton.textContent=`${this.firstYearInView} - ${this.lastYearInView}`,this.datesContainer.innerHTML=e}_asyncChangeView(t){setTimeout((()=>{this._changeView(t)}),0)}_changeView(t){this._view=t,this.datesContainer.blur(),"days"===t&&(this.datesContainer.innerHTML=zg(this._activeDate,this._headerDate,this._options)),"months"===t&&(this.datesContainer.innerHTML=Fg(this.activeYear,this._selectedYear,this._selectedMonth,this._options,4)),"years"===t&&(this.datesContainer.innerHTML=Vg(this._activeDate,this._selectedYear,this._options,jg,4)),this.datesContainer.focus(),this._updateViewControlsAndAttributes(t),this._updateControlsDisabledState(),$.trigger(this._element,Zg,{view:this._view})}_updateViewControlsAndAttributes(t){"days"===t&&(this.viewChangeButton.textContent=`${this._options.monthsFull[this.activeMonth]} ${this.activeYear}`,this.viewChangeButton.setAttribute("aria-label",this._options.switchToMultiYearViewLabel),this.previousButton.setAttribute("aria-label",this._options.prevMonthLabel),this.nextButton.setAttribute("aria-label",this._options.nextMonthLabel)),"months"===t&&(this.viewChangeButton.textContent=`${this.activeYear}`,this.viewChangeButton.setAttribute("aria-label",this._options.switchToDayViewLabel),this.previousButton.setAttribute("aria-label",this._options.prevYearLabel),this.nextButton.setAttribute("aria-label",this._options.nextYearLabel)),"years"===t&&(this.viewChangeButton.textContent=`${this.firstYearInView} - ${this.lastYearInView}`,this.viewChangeButton.setAttribute("aria-label",this._options.switchToDayViewLabel),this.previousButton.setAttribute("aria-label",this._options.prevMultiYearLabel),this.nextButton.setAttribute("aria-label",this._options.nextMultiYearLabel))}_updateControlsDisabledState(){!function(t,e,i,s,n,o,a,r){const l=new Date;return l.setHours(0,0,0,0),(t&&o&&Mg(o,l)<0||t)&&(o=l),o&&Pg(e,o,i,0,0,0,a,r)}(this._options.disableFuture,this._activeDate,this._view,0,this._options.min,this._options.max,this.lastYearInView,this.firstYearInView)?this.nextButton.disabled=!1:this.nextButton.disabled=!0,!function(t,e,i,s,n,o,a,r){const l=new Date;return l.setHours(0,0,0,0),(t&&n&&Mg(n,l)<0||t)&&(n=l),n&&Pg(e,n,i,0,0,0,a,r)}(this._options.disablePast,this._activeDate,this._view,0,this._options.min,this._options.max,this.lastYearInView,this.firstYearInView)?this.previousButton.disabled=!1:this.previousButton.disabled=!0}_handleUserInput(t){const e=this._getDelimeters(this._options.format),i=this._parseDate(t,this._options.format,e);!function(t){return!Number.isNaN(t.getTime())}(i)?(this._activeDate=new Date,this._selectedDate=null,this._selectedMonth=null,this._selectedYear=null,this._headerDate=null,this._headerMonth=null,this._headerYear=null):(this._activeDate=i,this._selectedDate=i,this._selectedYear=xg(i),this._selectedMonth=yg(i),this._headerDate=i)}_getDelimeters(t){return t.match(/[^(dmy)]{1,}/g)}_parseDate(t,e,i){let s;s=i[0]!==i[1]?i[0]+i[1]:i[0];const n=new RegExp(`[${s}]`),o=t.split(n),a=e.split(n),r=-1!==e.indexOf("mmm"),l=[];for(let c=0;ce===t))}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,Xg);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new ib(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const sb="popconfirm",nb="mdb.popconfirm",ob=`.${nb}`,ab=`cancel${ob}`,rb=`confirm${ob}`,lb={popconfirmMode:"string",message:"string",cancelText:"string",okText:"string",okClass:"string",popconfirmIcon:"string",cancelLabel:"string",confirmLabel:"string"},hb={popconfirmMode:"inline",message:"Are you sure?",cancelText:"Cancel",okText:"OK",okClass:"btn-primary",popconfirmIcon:"",cancelLabel:"Cancel",confirmLabel:"Confirm"};class cb extends to{constructor(t,e){super(t),this._options=this._getConfig(e),this._cancelButtonTemplate=this._getCancelButtonTemplate(),this._popper=null,this._cancelButton="",this._confirmButton="",this._isOpen=!1,this._uid=this._element.id?`popconfirm-${this._element.id}`:o("popconfirm-"),this._focusTrap=null,this._scrollBar=new he,this._clickHandler=this.open.bind(this),this._escapeKeydownHandler=this._handleEscapeKey.bind(this),this._outsideClickHandler=this._handleOutsideClick.bind(this),$.on(this._element,"click",this._clickHandler),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return sb}get container(){return B.findOne(`#${this._uid}`)}get popconfirmBody(){return B.findOne(".popconfirm",this.container)}dispose(){(this._isOpen||null!==this.container)&&this.close(),$.off(this._element,"click",this._clickHandler),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`);const t=this._isOpen&&"inline"===this._options.popconfirmMode?155:0;setTimeout((()=>{super.dispose()}),t)}open(){this._isOpen||("inline"===this._options.popconfirmMode?this._openPopover(this._getPopoverTemplate()):(this._openModal(this._getModalTemplate()),this._scrollBar.hide()),this._handleCancelButtonClick(),this._handleConfirmButtonClick(),this._listenToEscapeKey(),this._listenToOutsideClick())}close(){if(this._isOpen){if(null!==this._popper||null!==B.findOne(".popconfirm-popover"))$.on(this.popconfirmBody,"transitionend",this._handlePopconfirmTransitionEnd.bind(this)),R.removeClass(this.popconfirmBody,"show");else{const t=B.findOne(".popconfirm-backdrop");R.removeClass(this.popconfirmBody,"show"),document.body.removeChild(t),this._isOpen=!1}this._removeFocusTrap(),this._scrollBar.reset(),this._element.focus(),$.off(document,"click",this._outsideClickHandler),$.off(document,"keydown",this._escapeKeydownHandler)}}_setFocusTrap(t){this._focusTrap=new z_(t,{event:"keydown",condition:t=>"Tab"===t.key}),this._focusTrap.trap();const e=B.findOne("#popconfirm-button-cancel",t),i=B.findOne("#popconfirm-button-confirm",t);e?e.focus():i.focus()}_removeFocusTrap(){this._focusTrap&&(this._focusTrap.disable(),this._focusTrap=null)}_handlePopconfirmTransitionEnd(t){if(t.target!==this.popconfirmBody)return;const e=B.findOne(".popconfirm-popover");$.off(this.popconfirmBody,"transitionend"),this._isOpen&&t&&"opacity"===t.propertyName&&(this._popper.destroy(),e&&document.body.removeChild(e),this._isOpen=!1)}_getPopoverTemplate(){const t=g("div"),e=this._getPopconfirmTemplate();return R.addClass(t,"popconfirm-popover"),R.addClass(t,"shadow-2"),t.id=this._uid,t.innerHTML=e,t}_getModalTemplate(){const t=g("div"),e=this._getPopconfirmTemplate();return R.addClass(t,"popconfirm-modal"),R.addClass(t,"shadow-2"),t.id=this._uid,t.innerHTML=e,t}_getPopconfirmTemplate(){return`
\n

\n ${this._getMessageIcon()}\n ${this._options.message}\n

\n
\n ${this._cancelButtonTemplate}\n \n
\n
`}_getConfig(t){return t={...hb,...R.getDataAttributes(this._element),...t},d(sb,t,lb),t}_getCancelButtonTemplate(){return""===this._options.cancelText||" "===this._options.cancelText?"":``}_getMessageIcon(){return""===this._options.popconfirmIcon?"":``}_openPopover(t){this._popper=Os(this._element,t,{placement:this._translatePositionValue(),modifiers:[{name:"offset",options:{offset:[0,5]}}]}),document.body.appendChild(t),setTimeout((()=>{R.addClass(this.popconfirmBody,"fade"),R.addClass(this.popconfirmBody,"show"),this._isOpen=!0,this._setFocusTrap(this.container)}),0)}_openModal(t){const e=g("div");R.addClass(e,"popconfirm-backdrop"),document.body.appendChild(e),e.appendChild(t),R.addClass(this.popconfirmBody,"show"),this._isOpen=!0,this._setFocusTrap(this.container)}_handleCancelButtonClick(){const t=this.container;this._cancelButton=B.findOne("#popconfirm-button-cancel",t),null!==this._cancelButton&&$.on(this._cancelButton,"click",(()=>{this.close(),$.trigger(this._element,ab)}))}_handleConfirmButtonClick(){const t=this.container;this._confirmButton=B.findOne("#popconfirm-button-confirm",t),$.on(this._confirmButton,"click",(()=>{this.close(),$.trigger(this._element,rb)}))}_listenToEscapeKey(){$.on(document,"keydown",this._escapeKeydownHandler)}_handleEscapeKey(t){t.keyCode===q_&&(this._isOpen&&$.trigger(this._element,ab),this.close())}_listenToOutsideClick(){$.on(document,"click",this._outsideClickHandler)}_handleOutsideClick(t){const e=this.container,i=t.target===e,s=e&&e.contains(t.target),n=t.target===this._element,o=this._element&&this._element.contains(t.target);i||s||n||o||(this._isOpen&&$.trigger(this._element,ab),this.close())}_translatePositionValue(){switch(this._options.position){case"top left":return f?"top-start":"top-end";case"top":return"top";case"top right":return f?"top-end":"top-start";case"bottom left":return f?"bottom-start":"bottom-end";case"bottom":return"bottom";case"bottom right":return f?"bottom-end":"bottom-start";case"left":return f?"right":"left";case"left top":return f?"right-end":"left-end";case"left bottom":return f?"right-start":"left-start";case"right":return f?"left":"right";case"right top":return f?"left-end":"right-end";case"right bottom":return f?"left-start":"right-start";case void 0:return"bottom";default:return this._options.position}}static jQueryInterface(t,e){return this.each((function(){const i=n.getData(this,nb),s="object"==typeof t&&t;if(i||!/dispose/.test(t)){if(!i)return new cb(this,s);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}}))}}const db=({columns:t,rows:e,noFoundMessage:i,edit:s,multi:n,selectable:o,loading:a,loadingMessage:r,loaderClass:l,pagination:h})=>{const c=(({rows:t,columns:e,noFoundMessage:i,edit:s,selectable:n,loading:o})=>{const a=t.map((t=>{const i=`\n \n
\n \n
\n \n `,o=e.map(((i,n)=>{const o={};if(i.width&&(o["min-width"]=i.width-1+"px",o["max-width"]=`${i.width}px`,o.width=`${i.width}px`),i.fixed){const t=e.filter(((t,e)=>t.fixed===i.fixed&&et+e.width),0);o["right"===i.fixed?"right":"left"]=`${t}px`}return`${t[i.field]}`})).join("");return`${n?i:""}${o}`}));return t.length>0||o?a.join("\n"):`${i}`})({rows:e,columns:t,noFoundMessage:i,edit:s,loading:a,selectable:o}),d=((t,e,i)=>[e?i?'\n\n
\n \n
\n\n':'':"",...t.map(((e,i)=>{const s=e.fixed?t.filter(((t,s)=>t.fixed===e.fixed&&st+e.width),0):null;return`${e.sort?``:""} ${e.label}`}))].join("\n"))(t,o,n),u=`\n
\n \n \n \n ${d}\n \n \n \n ${a?"":c}\n \n
\n
\n ${a?`\n
\n \n
\n

${r}

\n`:""}\n ${h.enable?(({text:t,entries:e,entriesOptions:i,fullPagination:s,rowsText:n,allText:o},a)=>`\n
\n
\n

${n}

\n \n
\n
\n ${t}\n
\n
\n ${s?'':""}\n \n \n ${s?'':""}\n
\n
\n`)(h,a):""}\n `;return{table:u,rows:c,column:d}},ub=({rows:t,entries:e,activePage:i})=>{const s=i*e;return t.slice(s,s+Number(e))},pb=".form-check-input",_b="selected",mb="active";class fb{constructor(t,e,i,s,n,o,a,r,l,h,c){this.id=t,this.nativeOption=e,this.multiple=i,this.value=s,this.label=n,this.selected=o,this.disabled=a,this.hidden=r,this.secondaryText=l,this.groupId=h,this.icon=c,this.node=null,this.active=!1}select(){this.multiple?this._selectMultiple():this._selectSingle()}_selectSingle(){this.selected||(R.addClass(this.node,_b),this.node.setAttribute("aria-selected",!0),this.selected=!0,this.nativeOption&&(this.nativeOption.selected=!0))}_selectMultiple(){if(!this.selected){B.findOne(pb,this.node).checked=!0,R.addClass(this.node,_b),this.node.setAttribute("aria-selected",!0),this.selected=!0,this.nativeOption&&(this.nativeOption.selected=!0)}}deselect(){this.multiple?this._deselectMultiple():this._deselectSingle()}_deselectSingle(){this.selected&&(R.removeClass(this.node,_b),this.node.setAttribute("aria-selected",!1),this.selected=!1,this.nativeOption&&(this.nativeOption.selected=!1))}_deselectMultiple(){if(this.selected){B.findOne(pb,this.node).checked=!1,R.removeClass(this.node,_b),this.node.setAttribute("aria-selected",!1),this.selected=!1,this.nativeOption&&(this.nativeOption.selected=!1)}}setNode(t){this.node=t}setActiveStyles(){this.active||(this.active=!0,R.addClass(this.node,mb))}removeActiveStyles(){this.active&&(this.active=!1,R.removeClass(this.node,mb))}}class gb{constructor(t=!1){this._multiple=t,this._selections=[]}select(t){this._multiple?this._selections.push(t):this._selections=[t]}deselect(t){if(this._multiple){const e=this._selections.findIndex((e=>t===e));this._selections.splice(e,1)}else this._selections=[]}clear(){this._selections=[]}get selection(){return this._selections[0]}get selections(){return this._selections}get label(){return this._selections[0]&&this.selection.label}get labels(){return this._selections.map((t=>t.label)).join(", ")}get value(){return this.selections[0]&&this.selection.value}get values(){return this._selections.map((t=>t.value))}}function bb(t){return t.filter((t=>!t.disabled)).every((t=>t.selected))}const vb=t=>{"Tab"!==t.code&&"Esc"!==t.code&&t.preventDefault()};function yb(t,e,i,s,n,o,a){const r=document.createElement("div");r.classList.add("select-dropdown-container"),r.setAttribute("id",`${t}`),r.style.width=`${i}px`;const l=document.createElement("div");l.setAttribute("tabindex",0),l.classList.add("select-dropdown");const h=g("div");R.addClass(h,"select-options-wrapper"),h.style.maxHeight=`${s}px`;const c=xb(o,n,e);return h.appendChild(c),e.filter&&l.appendChild(function(t){const e=g("div");R.addClass(e,"input-group");const i=g("input");return R.addClass(i,"form-control"),R.addClass(i,"select-filter-input"),i.placeholder=t,i.setAttribute("role","searchbox"),i.setAttribute("type","text"),e.appendChild(i),e}(e.searchPlaceholder)),l.appendChild(h),a&&l.appendChild(a),r.appendChild(l),r}function xb(t,e,i){const s=g("div");let n;return R.addClass(s,"select-options-list"),n=i.multiple?function(t,e,i){let s=null;i.selectAll&&(s=function(t,e,i){const s=bb(e),n=g("div");R.addClass(n,"select-option"),R.addClass(n,"select-all-option"),R.addStyle(n,{height:`${i.optionHeight}px`}),n.setAttribute("role","option"),n.setAttribute("aria-selected",s),s&&R.addClass(n,"selected");return n.appendChild(kb(t,i)),t.setNode(n),n}(e,t,i));const n=wb(t,i),o=s?[s,...n]:n;return o}(t,e,i):function(t,e){const i=wb(t,e);return i}(t,i),n.forEach((t=>{s.appendChild(t)})),s}function wb(t,e){const i=[];return t.forEach((t=>{if(t.hasOwnProperty("options")){const s=function(t,e){const i=g("div");R.addClass(i,"select-option-group"),i.setAttribute("role","group"),i.setAttribute("id",t.id),t.hidden&&R.addClass(i,"d-none");const s=g("label");return R.addClass(s,"select-option-group-label"),R.addStyle(s,{height:`${e.optionHeight}px`}),s.setAttribute("for",t.id),s.textContent=t.label,i.appendChild(s),t.options.forEach((t=>{i.appendChild(Cb(t,e))})),i}(t,e);i.push(s)}else i.push(Cb(t,e))})),i}function Cb(t,e){if(t.node)return t.node;const i=g("div");return R.addClass(i,"select-option"),R.addStyle(i,{height:`${e.optionHeight}px`}),R.setDataAttribute(i,"id",t.id),i.setAttribute("role","option"),i.setAttribute("aria-selected",t.selected),i.setAttribute("aria-disabled",t.disabled),t.selected&&R.addClass(i,"selected"),t.disabled&&R.addClass(i,"disabled"),t.hidden&&R.addClass(i,"d-none"),i.appendChild(kb(t,e)),t.icon&&i.appendChild(function(t){const e=g("span");R.addClass(e,"select-option-icon-container");const i=g("img");return R.addClass(i,"select-option-icon"),R.addClass(i,"rounded-circle"),i.src=t.icon,e.appendChild(i),e}(t)),t.setNode(i),i}function kb(t,e){const i=g("span");R.addClass(i,"select-option-text");const s=document.createTextNode(t.label);return e.multiple&&i.appendChild(function(t){const e=g("input");e.setAttribute("type","checkbox"),R.addClass(e,"form-check-input");const i=g("label");t.selected&&e.setAttribute("checked",!0);t.disabled&&e.setAttribute("disabled",!0);return e.appendChild(i),e}(t)),i.appendChild(s),(t.secondaryText||"number"==typeof t.secondaryText)&&i.appendChild(function(t){const e=g("span");R.addClass(e,"select-option-secondary-text");const i=document.createTextNode(t);return e.appendChild(i),e}(t.secondaryText)),i}const Tb={autoSelect:!1,container:"body",clearButton:!1,disabled:!1,displayedLabels:5,formWhite:!1,multiple:!1,optionsSelectedLabel:"options selected",optionHeight:38,selectAll:!0,selectAllLabel:"Select all",searchPlaceholder:"Search...",size:"default",visibleOptions:5,filter:!1,filterDebounce:300,noResultText:"No results",validation:!1,validFeedback:"Valid",invalidFeedback:"Invalid",placeholder:"",filterFn:null},Ab={autoSelect:"boolean",container:"string",clearButton:"boolean",disabled:"boolean",displayedLabels:"number",formWhite:"boolean",multiple:"boolean",optionsSelectedLabel:"string",optionHeight:"number",selectAll:"boolean",selectAllLabel:"string",searchPlaceholder:"string",size:"string",visibleOptions:"number",filter:"boolean",filterDebounce:"number",noResultText:"string",validation:"boolean",validFeedback:"string",invalidFeedback:"string",placeholder:"",filterFn:"(function|null)"},Sb="select",Eb="mdb.select",Mb=`.${Eb}`,Ob=`close${Mb}`,Db=`open${Mb}`,Ib=`optionSelected${Mb}`,$b=`optionDeselected${Mb}`,Lb=`valueChanged${Mb}`,Pb=`opened${Mb}`,Nb=`closed${Mb}`,Rb=`search${Mb}`,Bb=".select-input",Hb=".select-options-list",Wb=".form-outline",zb="select-initialized",Fb="open",Vb="active",jb="focused";class Yb extends to{constructor(t,e){super(t),this._config=this._getConfig(e),this._optionsToRender=this._getOptionsToRender(t),this._plainOptions=this._getPlainOptions(this._optionsToRender),this._filteredOptionsList=null,this._selectionModel=new gb(this.multiple),this._activeOptionIndex=-1,this._activeOption=null,this._wrapperId=this._element.id?`select-wrapper-${this._element.id}`:o("select-wrapper-"),this._dropdownContainerId=this._element.id?`select-dropdown-container-${this._element.id}`:o("select-dropdown-container-"),this._selectAllId=this._element.id?`select-all-${this._element.id}`:o("select-all-"),this._debounceTimeoutId=null,this._dropdownHeight=this._config.optionHeight*this._config.visibleOptions,this._popper=null,this._input=null,this._label=B.next(this._element,".select-label")[0],this._fakeValue=null,this._isFakeValueActive=!1,this._customContent=B.next(t,".select-custom-content")[0],this._toggleButton=null,this._elementToggle=null,this._wrapper=null,this._inputEl=null,this._dropdownContainer=null,this._container=null,this._selectAllOption=null,this._init(),this._mutationObserver=null,this._isOpen=!1,this._addMutationObserver(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return Sb}get filterInput(){return B.findOne(".select-filter-input",this._dropdownContainer)}get dropdown(){return B.findOne(".select-dropdown",this._dropdownContainer)}get optionsList(){return B.findOne(Hb,this._dropdownContainer)}get optionsWrapper(){return B.findOne(".select-options-wrapper",this._dropdownContainer)}get clearButton(){return B.findOne(".select-clear-btn",this._wrapper)}get options(){return this._filteredOptionsList?this._filteredOptionsList:this._plainOptions}get value(){return this.multiple?this._selectionModel.values:this._selectionModel.value}get multiple(){return this._config.multiple}get hasSelectAll(){return this.multiple&&this._config.selectAll}get hasSelection(){return this._selectionModel.selection||this._selectionModel.selections.length>0}_getConfig(t){const e=R.getDataAttributes(this._element);return t={...Tb,...e,...t},this._element.hasAttribute("multiple")&&(t.multiple=!0),this._element.hasAttribute("disabled")&&(t.disabled=!0),this._element.tabIndex&&(t.tabIndex=this._element.getAttribute("tabIndex")),d(Sb,t,Ab),t}_getOptionsToRender(t){const e=[];return t.childNodes.forEach((t=>{if("OPTGROUP"===t.nodeName){const i={id:t.id?`group-${t.id}`:o("group-"),label:t.label,disabled:t.hasAttribute("disabled"),hidden:t.hasAttribute("hidden"),options:[]};t.childNodes.forEach((t=>{"OPTION"===t.nodeName&&i.options.push(this._createOptionObject(t,i))})),e.push(i)}else"OPTION"===t.nodeName&&e.push(this._createOptionObject(t))})),e}_getPlainOptions(t){if(!B.findOne("optgroup",this._element))return t;const e=[];return t.forEach((t=>{t.hasOwnProperty("options")?t.options.forEach((t=>{e.push(t)})):e.push(t)})),e}_createOptionObject(t,e={}){const i=t.id?`option-${t.id}`:o("option-"),s=e.id?e.id:null,n=!!e.disabled&&e.disabled,a=t.selected||t.hasAttribute("selected"),r=t.hasAttribute("disabled")||n,l=t.hasAttribute("hidden")||e&&e.hidden,h=this.multiple,c=t.value,d=t.label,u=R.getDataAttribute(t,"secondaryText"),p=R.getDataAttribute(t,"icon");return new fb(i,t,h,c,d,a,r,l,u,s,p)}_getNavigationOptions(){const t=this.options.filter((t=>!t.hidden));return this.hasSelectAll?[this._selectAllOption,...t]:t}_init(){this._renderMaterialWrapper(),this._wrapper=B.findOne(`#${this._wrapperId}`),this._input=B.findOne(Bb,this._wrapper),"off"===this._element.getAttribute("autocomplete")&&this._input.setAttribute("autocomplete","off");const t=this._config.container;this._container="body"===t?document.body:B.findOne(t),this._initOutlineInput(),this._setDefaultSelections(),this._updateInputValue(),this._appendFakeValue(),this._updateFakeLabelPosition(),this._updateLabelPosition(),this._updateClearButtonVisibility(),this._bindComponentEvents(),this.hasSelectAll&&(this._selectAllOption=this._createSelectAllOption()),this._dropdownContainer=yb(this._dropdownContainerId,this._config,this._input.offsetWidth,this._dropdownHeight,this._selectAllOption,this._optionsToRender,this._customContent),this._setFirstActiveOption()}_renderMaterialWrapper(){const t=function(t,e,i){const s=document.createElement("div");s.setAttribute("id",t),s.classList.add("select-wrapper");const n=g("div");R.addClass(n,"form-outline"),n.setAttribute("data-mdb-input-init",""),e.formWhite&&R.addClass(n,"form-white");const o=g("input"),a=e.filter?"combobox":"listbox",r=e.multiple?"true":"false",l=e.disabled?"true":"false";R.addClass(o,"form-control"),R.addClass(o,"select-input"),"sm"===e.size&&R.addClass(o,"form-control-sm"),"lg"===e.size&&R.addClass(o,"form-control-lg"),o.setAttribute("type","text"),o.setAttribute("role",a),o.setAttribute("aria-multiselectable",r),o.setAttribute("aria-disabled",l),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded",!1),e.tabIndex&&o.setAttribute("tabIndex",e.tabIndex),e.disabled&&o.setAttribute("disabled",""),""!==e.placeholder&&o.setAttribute("placeholder",e.placeholder),e.validation?(R.addStyle(o,{"pointer-events":"none","caret-color":"transparent"}),R.addStyle(n,{cursor:"pointer"})):o.setAttribute("readonly","true"),e.validation&&(o.setAttribute("required","true"),o.setAttribute("aria-required","true"),o.addEventListener("keydown",vb));const h=g("div");R.addClass(h,"valid-feedback");const c=document.createTextNode(`${e.validFeedback}`);h.appendChild(c);const d=g("div");R.addClass(d,"invalid-feedback");const u=document.createTextNode(`${e.invalidFeedback}`);d.appendChild(u);const p=g("span");R.addClass(p,"select-clear-btn");const _=document.createTextNode("✕");p.appendChild(_),p.setAttribute("tabindex","0");const m=g("span");return R.addClass(m,"select-arrow"),n.appendChild(o),i&&n.appendChild(i),e.validation&&(n.appendChild(h),n.appendChild(d)),e.clearButton&&n.appendChild(p),n.appendChild(m),s.appendChild(n),s}(this._wrapperId,this._config,this._label);this._element.parentNode.insertBefore(t,this._element),R.addClass(this._element,zb),t.appendChild(this._element)}_initOutlineInput(){const t=B.findOne(Wb,this._wrapper);new lo(t).init()}_updateOutlineInput(){const t=B.findOne(Wb,this._wrapper);lo.getInstance(t).update()}_bindComponentEvents(){this._listenToComponentKeydown(),this._listenToWrapperClick(),this._config.disabled||(this._listenToClearBtnClick(),this._listenToClearBtnKeydown())}_setDefaultSelections(){this.options.forEach((t=>{t.selected&&this._selectionModel.select(t)}))}_listenToComponentKeydown(){this._wrapperKeydownHandler=this._handleKeydown.bind(this),$.on(this._wrapper,"keydown",this._wrapperKeydownHandler)}_handleKeydown(t){this._isOpen&&!this._config.filter?this._handleOpenKeydown(t):this._handleClosedKeydown(t)}_handleOpenKeydown(t){const e=t.keyCode,i=e===q_||(e===V_||e===Y_)&&t.altKey||9===e;if(9===e&&this._config.autoSelect&&!this.multiple&&this._handleAutoSelection(this._activeOption),i)return this.close(),void this._input.focus();switch(e){case Y_:this._setNextOptionActive(),this._scrollToOption(this._activeOption);break;case V_:this._setPreviousOptionActive(),this._scrollToOption(this._activeOption);break;case X_:this._setFirstOptionActive(),this._scrollToOption(this._activeOption);break;case K_:this._setLastOptionActive(),this._scrollToOption(this._activeOption);break;case U_:return t.preventDefault(),void(this._activeOption&&(this.hasSelectAll&&0===this._activeOptionIndex?this._handleSelectAll():this._handleSelection(this._activeOption)));default:return}t.preventDefault()}_handleClosedKeydown(t){const e=t.keyCode;e===U_&&t.preventDefault();if((e===U_||(e===Y_||e===V_)&&t.altKey||e===Y_&&this.multiple)&&this.open(),this.multiple)switch(e){case Y_:case V_:this.open();break;default:return}else switch(e){case Y_:if(t.altKey)return;this._setNextOptionActive(),this._handleSelection(this._activeOption);break;case V_:if(t.altKey)return;this._setPreviousOptionActive(),this._handleSelection(this._activeOption);break;case X_:this._setFirstOptionActive(),this._handleSelection(this._activeOption);break;case K_:this._setLastOptionActive(),this._handleSelection(this._activeOption);break;default:return}t.preventDefault()}_scrollToOption(t){if(!t)return;let e;const i=this.options.filter((t=>!t.hidden));e=this.hasSelectAll?i.indexOf(t)+1:i.indexOf(t);const s=e+this._getNumberOfGroupsBeforeOption(e),n=this.optionsWrapper,o=n.offsetHeight,a=this._config.optionHeight,r=n.scrollTop;if(e>-1){const t=s*a,e=t+a>r+o,i=t!t.hidden)),i=this._optionsToRender.filter((t=>!t.hidden)),s=this.hasSelectAll?t-1:t;let n=0;for(let o=0;o<=s;o++)e[o].groupId&&i[n]&&i[n].id&&e[o].groupId===i[n].id&&n++;return n}_setNextOptionActive(){let t=this._activeOptionIndex+1;const e=this._getNavigationOptions();if(e[t]){for(;e[t].disabled;)if(t+=1,!e[t])return;this._updateActiveOption(e[t],t)}}_setPreviousOptionActive(){let t=this._activeOptionIndex-1;const e=this._getNavigationOptions();if(e[t]){for(;e[t].disabled;)if(t-=1,!e[t])return;this._updateActiveOption(e[t],t)}}_setFirstOptionActive(){const t=this._getNavigationOptions();this._updateActiveOption(t[0],0)}_setLastOptionActive(){const t=this._getNavigationOptions(),e=t.length-1;this._updateActiveOption(t[e],e)}_updateActiveOption(t,e){const i=this._activeOption;i&&i.removeActiveStyles(),t.setActiveStyles(),this._activeOptionIndex=e,this._activeOption=t}_listenToWrapperClick(){$.on(this._wrapper,"click",(()=>{this.toggle()}))}_listenToClearBtnClick(){$.on(this.clearButton,"click",(t=>{t.preventDefault(),t.stopPropagation(),this._handleClear()}))}_listenToClearBtnKeydown(){$.on(this.clearButton,"keydown",(t=>{t.keyCode===U_&&(this._handleClear(),t.preventDefault(),t.stopPropagation())}))}_handleClear(){if(this.multiple)this._selectionModel.clear(),this._deselectAllOptions(this.options),this.hasSelectAll&&this._updateSelectAllState();else{const t=this._selectionModel.selection;this._selectionModel.clear(),t.deselect()}!0===this._optionsToRender[0].hidden?this._singleOptionSelect(this._optionsToRender[0]):(this._emitValueChangeEvent(null),this._emitNativeChangeEvent()),this._updateInputValue(),this._updateFakeLabelPosition(),this._updateLabelPosition(),this._updateClearButtonVisibility()}_listenToOptionsClick(){$.on(this.optionsWrapper,"click",(t=>{if(t.target.classList.contains("select-option-group-label"))return;const e="DIV"===t.target.nodeName?t.target:B.closest(t.target,".select-option");if(e.classList.contains("select-all-option"))return void this._handleSelectAll();const i=e.dataset.mdbId,s=this.options.find((t=>t.id===i));s&&!s.disabled&&this._handleSelection(s)}))}_handleSelectAll(){this._selectAllOption.selected?(this._deselectAllOptions(this.options),this._selectAllOption.deselect()):(this._selectAllOptions(this.options),this._selectAllOption.select()),this._updateInputValue(),this._updateFakeLabelPosition(),this._updateLabelPosition(),this._updateClearButtonVisibility(),this._emitValueChangeEvent(this.value),this._emitNativeChangeEvent()}_selectAllOptions(t){t.forEach((t=>{t.selected||t.disabled||(this._selectionModel.select(t),t.select())}))}_deselectAllOptions(t){t.forEach((t=>{t.selected&&!t.disabled&&(this._selectionModel.deselect(t),t.deselect())}))}_handleSelection(t){this.multiple?(this._handleMultiSelection(t),this.hasSelectAll&&this._updateSelectAllState()):this._handleSingleSelection(t),this._updateInputValue(),this._updateFakeLabelPosition(),this._updateLabelPosition(),this._updateClearButtonVisibility(),this._updateOutlineInput()}_handleAutoSelection(t){this._singleOptionSelect(t),this._updateInputValue(),this._updateFakeLabelPosition(),this._updateLabelPosition(),this._updateClearButtonVisibility(),this._updateOutlineInput()}_handleSingleSelection(t){this._singleOptionSelect(t),this.close(),this._input.focus()}_singleOptionSelect(t){const e=this._selectionModel.selections[0];e&&e!==t&&(this._selectionModel.deselect(e),e.deselect(),e.node.setAttribute("selected",!1),$.trigger(this._element,$b,{value:e.value})),(!e||e&&t!==e)&&(this._selectionModel.select(t),t.select(),t.node.setAttribute("selected",!0),$.trigger(this._element,Ib,{value:t.value}),this._emitValueChangeEvent(this.value),this._emitNativeChangeEvent())}_handleMultiSelection(t){t.selected?(this._selectionModel.deselect(t),t.deselect(),t.node.setAttribute("selected",!1),$.trigger(this._element,$b,{value:t.value})):(this._selectionModel.select(t),t.select(),t.node.setAttribute("selected",!0),$.trigger(this._element,Ib,{value:t.value})),this._emitValueChangeEvent(this.value),this._emitNativeChangeEvent()}_emitValueChangeEvent(t){$.trigger(this._element,Lb,{value:t})}_emitNativeChangeEvent(){$.trigger(this._element,"change")}_updateInputValue(){const t=this.multiple?this._selectionModel.labels:this._selectionModel.label;let e;e=this.multiple&&-1!==this._config.displayedLabels&&this._selectionModel.selections.length>this._config.displayedLabels?`${this._selectionModel.selections.length} ${this._config.optionsSelectedLabel}`:t,this.multiple||this._isSelectionValid(this._selectionModel.selection)?this._isLabelEmpty(this._selectionModel.selection)?this._input.value=" ":e?this._input.value=e:this.multiple||!this._optionsToRender[0]||this._config.placeholder?this._input.value="":this._input.value=this._optionsToRender[0].label:this._input.value=""}_isSelectionValid(t){return!t||!t.disabled&&""!==t.value}_isLabelEmpty(t){return!(!t||""!==t.label)}_appendFakeValue(){if(!this._selectionModel.selection||this._selectionModel._multiple||this._config.placeholder)return;const t=this._selectionModel.selection.label;this._fakeValue=function(t){const e=g("div");return e.textContent=t,R.addClass(e,"form-label"),R.addClass(e,"select-fake-value"),e}(t);B.findOne(Wb,this._wrapper).appendChild(this._fakeValue)}_updateLabelPosition(){const t=R.hasClass(this._element,zb),e=""!==this._input.value;this._label&&(t&&(e||this._isOpen||this._isFakeValueActive)?R.addClass(this._label,Vb):R.removeClass(this._label,Vb))}_updateLabelPositionWhileClosing(){this._label&&(""!==this._input.value||this._isFakeValueActive?R.addClass(this._label,Vb):R.removeClass(this._label,Vb))}_updateFakeLabelPosition(){this._fakeValue&&(this.hasSelection&&(this._fakeValue.textContent=this.hasSelection.label),""===this._input.value&&""!==this._fakeValue.innerHTML?(this._isFakeValueActive=!0,R.addClass(this._fakeValue,Vb)):(this._isFakeValueActive=!1,R.removeClass(this._fakeValue,Vb)))}_updateClearButtonVisibility(){this.clearButton&&(this._optionsToRender[0].hidden&&this._optionsToRender[0].selected||!this.hasSelection?R.addStyle(this.clearButton,{display:"none"}):R.addStyle(this.clearButton,{display:"block"}))}_updateSelectAllState(){const t=this._selectAllOption.selected,e=bb(this.options);!e&&t?this._selectAllOption.deselect():e&&!t&&this._selectAllOption.select()}toggle(){this._isOpen?this.close():this.open()}open(){const t=this._config.disabled,e=$.trigger(this._element,Db);this._isOpen||t||e.defaultPrevented||(this._openDropdown(),this._updateDropdownWidth(),this._setFirstActiveOption(),this._scrollToOption(this._activeOption),this._config.filter&&(setTimeout((()=>{this.filterInput.focus(),this._filterOptions(this.filterInput.value)}),0),this._listenToSelectSearch(),this._listenToDropdownKeydown()),this._listenToOptionsClick(),this._listenToOutsideClick(),this._listenToWindowResize(),this._isOpen=!0,this._input.setAttribute("aria-expanded",!0),$.trigger(this._element,Pb),this._updateLabelPosition(),this._setInputActiveStyles())}_openDropdown(){this._popper=Os(this._input,this._dropdownContainer,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,1]}}]}),this._container.appendChild(this._dropdownContainer),setTimeout((()=>{R.addClass(this.dropdown,Fb)}),0)}_updateDropdownWidth(){const t=this._input.offsetWidth;R.addStyle(this._dropdownContainer,{width:`${t}px`})}_setFirstActiveOption(){const t=this._getNavigationOptions(),e=this._activeOption;e&&e.removeActiveStyles();const i=this.multiple?this._selectionModel.selections[0]:this._selectionModel.selection;i?(this._activeOption=i,i.setActiveStyles(),this._activeOptionIndex=t.findIndex((t=>t===i))):(this._activeOption=null,this._activeOptionIndex=-1)}_setInputActiveStyles(){R.addClass(this._input,jb)}_listenToWindowResize(){this._windowResizeHandler=this._handleWindowResize.bind(this),$.on(window,"resize",this._windowResizeHandler)}_handleWindowResize(){this._dropdownContainer&&this._updateDropdownWidth()}_listenToSelectSearch(){this.filterInput.addEventListener("input",(t=>{const e=t.target.value,i=this._config.filterDebounce;$.trigger(this._element,Rb,{value:e}).defaultPrevented||this._debounceFilter(e,i)}))}_debounceFilter(t,e){this._debounceTimeoutId&&clearTimeout(this._debounceTimeoutId),this._debounceTimeoutId=setTimeout((()=>{this._filterOptions(t)}),e)}_filterOptions(t){const e=[],i=this._config.filterFn;this._optionsToRender.forEach((s=>{const n=s.hasOwnProperty("options"),o=!n&&s.label.toLowerCase().includes(t.toLowerCase()),a={};if(n&&(a.label=s.label,a.options=this._filter(t,s.options),a.options.length>0&&e.push(a)),i&&!n){i(t,s)&&e.push(s)}else o&&e.push(s)}));const s=""!==this._config.noResultText,n=0!==e.length;if(n)this._updateOptionsListTemplate(e),this._popper.forceUpdate(),this._filteredOptionsList=this._getPlainOptions(e),this.hasSelectAll&&this._updateSelectAllState(),this._setFirstActiveOption();else if(!n&&s){const t=this._getNoResultTemplate();this.optionsWrapper.innerHTML=t}}_updateOptionsListTemplate(t){const e=B.findOne(Hb,this._dropdownContainer)||B.findOne(".select-no-results",this._dropdownContainer),i=xb(t,this._selectAllOption,this._config);this.optionsWrapper.removeChild(e),this.optionsWrapper.appendChild(i)}_getNoResultTemplate(){return`
${this._config.noResultText}
`}_filter(t,e){const i=this._config.filterFn;if(i)return e.filter((e=>i(t,e)&&!e.hidden));const s=t.toLowerCase();return e.filter((t=>t.label.toLowerCase().includes(s)&&!t.hidden))}_listenToDropdownKeydown(){this._dropdownKeydownHandler=this._handleOpenKeydown.bind(this),$.on(this.dropdown,"keydown",this._dropdownKeydownHandler)}_listenToOutsideClick(){this._outsideClickHandler=this._handleOutSideClick.bind(this),$.on(document,"click",this._outsideClickHandler)}_handleOutSideClick(t){const e=this._wrapper&&this._wrapper.contains(t.target),i=t.target===this._dropdownContainer,s=this._dropdownContainer&&this._dropdownContainer.contains(t.target);let n;this._toggleButton||(this._elementToggle=B.find("[data-mdb-toggle]")),this._elementToggle&&this._elementToggle.forEach((e=>{const i=R.getDataAttribute(e,"toggle");(i===this._element.id||this._element.classList.contains(i))&&(this._toggleButton=e,n=this._toggleButton.contains(t.target))})),e||i||s||n||this.close()}close(){const t=$.trigger(this._element,Ob);this._isOpen&&!t.defaultPrevented&&(this._config.filter&&this.hasSelectAll&&(this._resetFilterState(),this._updateOptionsListTemplate(this._optionsToRender),this._config.multiple&&this._updateSelectAllState()),this._removeDropdownEvents(),R.removeClass(this.dropdown,Fb),setTimeout((()=>{R.removeClass(this._input,jb),this._label&&!this.hasSelection&&(R.removeClass(this._label,Vb),R.removeClass(this._input,Vb)),this._updateLabelPositionWhileClosing()}),0),setTimeout((()=>{this._container&&this._dropdownContainer.parentNode===this._container&&this._container.removeChild(this._dropdownContainer),this._popper.destroy(),this._isOpen=!1,this._input.setAttribute("aria-expanded",!1),$.off(this.dropdown,"transitionend"),$.trigger(this._element,Nb)}),200))}_resetFilterState(){this.filterInput.value="",this._filteredOptionsList=null}_removeDropdownEvents(){$.off(document,"click",this._outsideClickHandler),this._config.filter&&$.off(this.dropdown,"keydown"),$.off(this.optionsWrapper,"click")}_addMutationObserver(){this._mutationObserver=new MutationObserver((()=>{this._wrapper&&(this._updateSelections(),this._updateDisabledState())})),this._observeMutationObserver()}_updateSelections(){this._optionsToRender=this._getOptionsToRender(this._element),this._plainOptions=this._getPlainOptions(this._optionsToRender),this._selectionModel.clear(),this._setDefaultSelections(),this._updateInputValue(),this._updateFakeLabelPosition(),this._updateLabelPosition(),this._updateClearButtonVisibility(),this.hasSelectAll&&this._updateSelectAllState();const t=this._config.filter&&this.filterInput&&this.filterInput.value;this._isOpen&&!t?(this._updateOptionsListTemplate(this._optionsToRender),this._setFirstActiveOption()):this._isOpen&&t?(this._filterOptions(this.filterInput.value),this._setFirstActiveOption()):this._dropdownContainer=yb(this._dropdownContainerId,this._config,this._input.offsetWidth,this._dropdownHeight,this._selectAllOption,this._optionsToRender,this._customContent)}_updateDisabledState(){const t=B.findOne(Bb,this._wrapper);this._element.hasAttribute("disabled")?(this._config.disabled=!0,t.setAttribute("disabled","")):(this._config.disabled=!1,t.removeAttribute("disabled"))}_observeMutationObserver(){this._mutationObserver&&this._mutationObserver.observe(this._element,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}_disconnectMutationObserver(){this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null)}_createSelectAllOption(){const t=this._selectAllId,e=this._config.selectAllLabel,i=bb(this.options);return new fb(t,null,!0,"select-all",e,i,!1,!1,null,null,null)}dispose(){this._disconnectMutationObserver(),this._removeComponentEvents(),this._disconnectMutationObserver(),this._destroyMaterialSelect(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_removeComponentEvents(){$.off(this.input,"click"),$.off(this.wrapper,this._wrapperKeydownHandler),$.off(this.clearButton,"click"),$.off(this.clearButton,"keydown"),$.off(window,"resize",this._windowResizeHandler)}_destroyMaterialSelect(){this._isOpen&&this.close(),this._destroyMaterialTemplate()}_destroyMaterialTemplate(){const t=this._wrapper.parentNode,e=B.find("label",this._wrapper);t.appendChild(this._element),e.forEach((e=>{t.appendChild(e)})),e.forEach((t=>{R.removeClass(t,Vb)})),R.removeClass(this._element,zb),this._customContent&&t.appendChild(this._customContent),t.removeChild(this._wrapper)}setValue(t){this.options.filter((t=>t.selected)).forEach((t=>t.nativeOption.selected=!1));Array.isArray(t)?t.forEach((t=>{this._selectByValue(t)})):this._selectByValue(t),this._updateSelections(),this._emitValueChangeEvent(t),this._updateOutlineInput()}_selectByValue(t){const e=this.options.find((e=>e.value===t));return!!e&&(e.nativeOption.selected=!0,!0)}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,Eb);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new Yb(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const Xb="datatable",Kb=`mdb.${Xb}`,Ub="datatable",qb="fixed-cell",Qb="td",Zb=".datatable-sort-icon",Gb=".datatable-body tr",Jb=".datatable-row-checkbox",tv=`.${Kb}`,ev=`rowSelected${tv}`,iv=`render${tv}`,sv=`rowClicked${tv}`,nv=`update${tv}`,ov="valueChanged.mdb.select",av={bordered:"boolean",borderless:"boolean",borderColor:"(string|null)",clickableRows:"boolean",color:"(string|null)",defaultValue:"string",edit:"boolean",entries:"(number|string)",entriesOptions:"array",fullPagination:"boolean",hover:"boolean",loading:"boolean",loadingMessage:"string",maxWidth:"(null|number|string)",maxHeight:"(null|number|string)",multi:"boolean",noFoundMessage:"string",pagination:"boolean",selectable:"boolean",sm:"boolean",sortField:"(null|string)",sortOrder:"string",loaderClass:"string",fixedHeader:"boolean",striped:"boolean",rowsText:"string",ofText:"string",allText:"string",forceSort:"boolean"},rv={label:"string",field:"string",fixed:"(boolean|string)",format:"(function|null)",width:"(number|null)",sort:"boolean",columnIndex:"number"},lv={bordered:!1,borderless:!1,borderColor:null,clickableRows:!1,color:null,dark:!1,defaultValue:"-",edit:!1,entries:10,entriesOptions:[10,25,50,200],fixedHeader:!1,fullPagination:!1,hover:!1,loaderClass:"bg-primary",loading:!1,loadingMessage:"Loading results...",maxWidth:null,maxHeight:null,multi:!1,noFoundMessage:"No matching results found",pagination:!0,selectable:!1,sm:!1,sortField:null,sortOrder:"asc",striped:!1,rowsText:"Rows per page:",ofText:"of",allText:"All",forceSort:!1},hv={label:"",field:"",fixed:!1,format:null,width:null,sort:!0,columnIndex:0};class cv extends to{constructor(t,e={},i={}){super(t),this._options=this._getOptions(i),this._sortReverse=!1,this._activePage=0,this._search="",this._searchColumn=null,this._paginationLeft=null,this._paginationRight=null,this._paginationStart=null,this._paginationEnd=null,this._select=null,this._selectInstance=null,this._selected=[],this._checkboxes=null,this._headerCheckbox=null,this._rows=this._getRows(e.rows),this._columns=this._getColumns(e.columns),this._tableId=null,this._hasFixedColumns=null,this._element&&(this._perfectScrollbar=null,this._setup(),this._hasFixedColumns=this._columns.some((t=>t.hasOwnProperty("fixed"))),this._hasFixedColumns&&this._listenToWindowResize(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return Xb}get columns(){return this._columns.map(((t,e)=>{let i={...hv,field:`field_${e}`,columnIndex:e};return"string"==typeof t?i.label=t:"object"==typeof t&&(i={...i,...t}),d("column",i,rv),i}))}get rows(){return this._rows.map(((t,e)=>{const i={rowIndex:e};return Array.isArray(t)?this.columns.forEach(((e,s)=>{0===t[s]?i[e.field]=t[s]:i[e.field]=t[s]||this._options.defaultValue})):"object"==typeof t&&this.columns.forEach((e=>{0===t[e.field]?i[e.field]=t[e.field]:i[e.field]=t[e.field]||this._options.defaultValue})),i}))}get searchResult(){return((t,e,i)=>{if(!e)return t;const s=t=>{const i=document.createElement("div");return i.innerHTML=t,(t=i.textContent||i.innerText||"").toString().toLowerCase().match(e.toLowerCase())};return t.filter((t=>{if(i&&"string"==typeof i)return s(t[i]);let e=Object.values(t);return i&&Array.isArray(i)&&(e=Object.keys(t).filter((t=>i.includes(t))).map((e=>t[e]))),e.filter((t=>s(t))).length>0}))})(this.rows,this._search,this._searchColumn)}get computedRows(){let t=[...this.searchResult];return this._options.sortOrder&&(t=(({rows:t,field:e,order:i})=>t.sort(((t,s)=>{let n=t[e],o=s[e];return"string"==typeof n&&(n=n.toLowerCase()),"string"==typeof o&&(o=o.toLowerCase()),no?"desc"===i?-1:1:0})))({rows:t,field:this._options.sortField,order:this._options.sortOrder})),this._options.pagination&&(t="all"===this._optionToLowerCase(this._options.entries)?ub({rows:t,entries:t.length,activePage:this._activePage}):ub({rows:t,entries:this._options.entries,activePage:this._activePage})),t}get pages(){return"all"===this._optionToLowerCase(this._options.entries)?1:Math.ceil(this.searchResult.length/this._options.entries)}get navigationText(){const t=this._activePage*this._options.entries;return 0===this.searchResult.length?`0 ${this._options.ofText} 0`:"all"===this._optionToLowerCase(this._options.entries)?`1 - ${this.searchResult.length} ${this._options.ofText} ${this.searchResult.length}`:`${t+1} - ${this.computedRows.length+t} ${this._options.ofText} ${this.searchResult.length}`}get classNames(){return[Ub,this._options.color,this._options.borderColor&&`border-${this._options.borderColor}`,this._options.dark&&"datatable-dark",this._options.hover&&"datatable-hover",this._options.bordered&&"datatable-bordered",this._options.borderless&&"datatable-borderless",this._options.sm&&"datatable-sm",this._options.striped&&"datatable-striped",this._options.loading&&"datatable-loading",this._options.clickableRows&&"datatable-clickable-rows"].filter((t=>t))}get tableOptions(){return{columns:this.columns,rows:this.computedRows,noFoundMessage:this._options.noFoundMessage,edit:this._options.edit,loading:this._options.loading,loaderClass:this._options.loaderClass,loadingMessage:this._options.loadingMessage,selectable:this._options.selectable,multi:this._options.multi,pagination:{enable:this._options.pagination,text:this.navigationText,entries:this._options.entries,entriesOptions:this._options.entriesOptions,fullPagination:this._options.fullPagination,rowsText:this._options.rowsText,ofText:this._options.ofText,allText:this._options.allText},forceSort:this._options.forceSort}}update(t,e={}){t&&t.rows&&(this._rows=t.rows),t&&t.columns&&(this._columns=t.columns),this._clearClassList(e),this._options=this._getOptions({...this._options,...e}),this._setup(),this._performSort()}dispose(){this._selectInstance&&this._selectInstance.dispose(),this._removeEventListeners(),this._perfectScrollbar.destroy(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}search(t,e){this._search=t,this._searchColumn=e,this._activePage=0,this._options.pagination&&this._toggleDisableState(),this._renderRows(),this._options.maxHeight&&(this._perfectScrollbar.element.scrollTop=0,this._perfectScrollbar.update())}sort(t,e="asc"){this._options.sortOrder=e,this._options.sortField="string"==typeof t?this.columns.find((e=>e.label===t)).field:t.field;const i=B.findOne(`i[data-mdb-sort="${this._options.sortField}"]`,this._element);this._toggleDisableState(),this._renderRows(),this._setActiveSortIcon(i)}setActivePage(t){t{this._options[e]&&!t[e]&&R.removeClass(this._element,`datatable-${e}`)}))}_emitSelectEvent(){$.trigger(this._element,ev,{selectedRows:this.rows.filter((t=>-1!==this._selected.indexOf(t.rowIndex))),selectedIndexes:this._selected,allSelected:this._selected.length===this.rows.length})}_getRows(t=[]){const e=B.findOne("tbody",this._element);if(!e)return t;return[...B.find("tr",e).map((t=>B.find("td",t).map((t=>t.innerHTML)))),...t]}_getColumns(t=[]){const e=B.findOne("thead",this._element);if(!e)return t;const i=B.findOne("tr",e);return[...B.find("th",i).map((t=>({label:t.innerHTML,...R.getDataAttributes(t)}))),...t]}_getCSSValue(t){return"string"==typeof t?t:`${t}px`}_getOptions(t){const e={...lv,...R.getDataAttributes(this._element),...t},i=R.getDataAttributes(this._element).entriesOptions,s=Array.isArray(e.entriesOptions)?e.entriesOptions:JSON.parse(i.replaceAll("'",'"'));return e.entriesOptions=s,d(Xb,e,av),e}_setActiveRows(){B.find(Gb,this._element).forEach((t=>{this._selected.includes(R.getDataAttribute(t,"index"))?R.addClass(t,"active"):R.removeClass(t,"active")}))}_setEntries(t){this._options=this._getOptions({...this._options,entries:t.target.value}),this._activePage>this.pages-1&&(this._activePage=this.pages-1),this._toggleDisableState(),this._renderRows()}_setSelected(){B.find(Jb,this._element).forEach((t=>{const e=R.getDataAttribute(t,"rowIndex");t.checked=this._selected.includes(e)})),this._setActiveRows()}_setActiveSortIcon(t){B.find(Zb,this._element).forEach((e=>{const i="desc"===this._options.sortOrder&&e===t?180:0;R.style(e,{transform:`rotate(${i}deg)`}),e===t&&this._options.sortOrder?R.addClass(e,"active"):R.removeClass(e,"active")}))}_setClassNames(){this.classNames.forEach((t=>{R.addClass(this._element,t)}))}_setup(){this._setClassNames(),this._renderTable(),this._options.pagination&&this._setupPagination(),this._options.edit&&this._setupEditable(),this._options.clickableRows&&this._setupClickableRows(),this._options.selectable&&this._setupSelectable(),this._setupScroll(),this._setupSort()}_listenToWindowResize(){this._windowResizeHandler=this._handleWindowResize.bind(this),L.on(window,"resize DOMContentLoaded",this._windowResizeHandler)}_handleWindowResize(){this._renderRows()}_setupClickableRows(){B.find(Gb,this._element).forEach((t=>{const e=R.getDataAttribute(t,"index");$.on(t,"click",(t=>{B.matches(t.target,Jb)||$.trigger(this._element,sv,{index:e,row:this.rows[e]})}))}))}_setupEditable(){B.find(Gb,this._element).forEach((t=>{const e=R.getDataAttribute(t,"index");B.find(Qb,t).forEach((t=>{$.on(t,"input",(t=>this._updateRow(t,e)))}))}))}_setupScroll(){const t=B.findOne(".datatable-inner",this._element),e={overflow:"auto",position:"relative"};if(this._options.maxHeight&&(e.maxHeight=this._getCSSValue(this._options.maxHeight)),this._options.maxWidth){const t=this._getCSSValue(this._options.maxWidth);e.maxWidth=t,R.style(this._element,{maxWidth:t})}if(R.style(t,e),this._options.fixedHeader){let t=B.find(".datatable-header th",this._element);this._options.selectable&&(t=t.filter(((t,e)=>(R.addClass(t,qb),this._options.color&&R.addClass(t,this._options.color),0!==e)))),t.forEach(((t,e)=>{R.addClass(t,qb),this.columns[e].fixed&&R.addStyle(t,{zIndex:4}),this._options.color&&R.addClass(t,this._options.color)}))}this._perfectScrollbar=new W_(t)}_setupSort(){B.find(Zb,this._element).forEach((t=>{const e=R.getDataAttribute(t,"sort"),[i]=B.parents(t,"th");R.style(i,{cursor:"pointer"}),e===this._options.sortField&&this._setActiveSortIcon(t),$.on(i,"click",(()=>{this._options.sortField===e&&"asc"===this._options.sortOrder?this._options.sortOrder="desc":this._options.sortField===e&&"desc"===this._options.sortOrder?this._options.sortOrder=this._options.forceSort?"asc":null:this._options.sortOrder="asc",this._options.sortField=e,this._performSort(),this._setActiveSortIcon(t)}))}))}_performSort(){this._toggleDisableState(),this._renderRows()}_setupSelectable(){this._checkboxes=B.find(Jb,this._element),this._headerCheckbox=B.findOne(".datatable-header-checkbox",this._element),$.on(this._headerCheckbox,"input",(t=>this._toggleSelectAll(t))),this._checkboxes.forEach((t=>{const e=R.getDataAttribute(t,"rowIndex");$.on(t,"input",(t=>this._toggleSelectRow(t,e)))}))}_setupPagination(){this._paginationRight=B.findOne(".datatable-pagination-right",this._element),this._paginationLeft=B.findOne(".datatable-pagination-left",this._element),$.on(this._paginationRight,"click",(()=>this._changeActivePage(this._activePage+1))),$.on(this._paginationLeft,"click",(()=>this._changeActivePage(this._activePage-1))),this._options.fullPagination&&(this._paginationStart=B.findOne(".datatable-pagination-start",this._element),this._paginationEnd=B.findOne(".datatable-pagination-end",this._element),$.on(this._paginationStart,"click",(()=>this._changeActivePage(0))),$.on(this._paginationEnd,"click",(()=>this._changeActivePage(this.pages-1)))),this._toggleDisableState(),this._setupPaginationSelect()}_setupPaginationSelect(){this._select=B.findOne(".datatable-select",this._element),this._selectInstance&&this._selectInstance.dispose(),this._selectInstance=new Yb(this._select),$.on(this._select,ov,(t=>this._setEntries(t)))}_removeEventListeners(){this._options.pagination&&($.off(this._paginationRight,"click"),$.off(this._paginationLeft,"click"),$.off(this._select,ov),this._options.fullPagination&&($.off(this._paginationStart,"click"),$.off(this._paginationEnd,"click")),L.off(window,"resize DOMContentLoaded",this._windowResizeHandler)),this._options.editable&&B.find(Qb,this._element).forEach((t=>{$.off(t,"input")})),this._options.clickableRows&&B.find(Gb,this._element).forEach((t=>{$.off(t,"click")})),B.find(Zb,this._element).forEach((t=>{const[e]=B.parents(t,"th");$.off(e,"click")})),this._options.selectable&&($.off(this._headerCheckbox,"input"),this._checkboxes.forEach((t=>{$.off(t,"input")})))}_renderTable(){const t=B.findOne("table",this._element);if(this._tableId=null==t?void 0:t.getAttribute("id"),this._element.innerHTML=db(this.tableOptions).table,this._tableId){B.findOne("table",this._element).setAttribute("id",this._tableId)}this._formatCells(),$.trigger(this._element,iv)}_renderRows(){const t=B.findOne("tbody",this._element);if(this._options.pagination){B.findOne(".datatable-pagination-nav",this._element).innerText=this.navigationText}t.innerHTML=db(this.tableOptions).rows,this._formatCells(),this._options.edit&&this._setupEditable(),this._options.selectable&&(this._setupSelectable(),this._setSelected()),this._options.clickableRows&&this._setupClickableRows(),$.trigger(this._element,iv)}_formatCells(){const t=new Map(this.columns.map((t=>[t.field,t]))),e=B.find(Gb,this._element),i=this.rows,s=[];e.forEach(((e,n)=>{B.find(Qb,e).forEach((e=>{const o=R.getDataAttribute(e,"field"),a=t.get(o);if(a&&null!==a.format){const t=i[n][o];s.push({cell:e,column:a,cellData:t})}}))})),s.forEach((({cell:t,column:e,cellData:i})=>e.format(t,i)))}_toggleDisableState(){!1!==this._options.pagination&&(0===this._activePage||this._options.loading?(this._paginationLeft.setAttribute("disabled",!0),this._options.fullPagination&&this._paginationStart.setAttribute("disabled",!0)):(this._paginationLeft.removeAttribute("disabled"),this._options.fullPagination&&this._paginationStart.removeAttribute("disabled")),this._activePage===this.pages-1||this._options.loading||0===this.pages?(this._paginationRight.setAttribute("disabled",!0),this._options.fullPagination&&this._paginationEnd.setAttribute("disabled",!0)):(this._paginationRight.removeAttribute("disabled"),this._options.fullPagination&&this._paginationEnd.removeAttribute("disabled")))}_toggleSelectAll(t){t.target.checked?this._selected=this.rows.map((t=>t.rowIndex)):this._selected=[],this._setSelected(),this._emitSelectEvent()}_toggleSelectRow(t,e){t.target.checked?this._options.multi&&!this._selected.includes(e)?this._selected=[...this._selected,e]:(this._selected=[e],this._checkboxes.forEach((e=>{e!==t.target&&(e.checked=!1)}))):this._selected=this._selected.filter((t=>t!==e)),this._options.multi&&!t.target.checked&&(this._headerCheckbox.checked=!1),this._setActiveRows(),this._emitSelectEvent()}_updateRow(t,e){const i=R.getDataAttribute(t.target,"field"),s=t.target.textContent,n=this._rows[e];if(Array.isArray(n)){n[this.columns.find((t=>t.field===i)).columnIndex]=s}else n[i]=s;$.trigger(this._element,nv,{rows:this._rows,columns:this._columns})}static jQueryInterface(t,e,i){return this.each((function(){let s=n.getData(this,Kb);const o="object"==typeof t&&t;if((s||!/dispose/.test(t))&&(s||(s=new cv(this,o,e)),"string"==typeof t)){if(void 0===s[t])throw new TypeError(`No method named "${t}"`);s[t](e,i)}}))}}const dv="stepper",uv="mdb.stepper",pv=`.${uv}`,_v="horizontal",mv="vertical",fv="mobile",gv={stepperType:"string",stepperLinear:"boolean",stepperNoEditable:"boolean",stepperActive:"string",stepperCompleted:"string",stepperInvalid:"string",stepperDisabled:"string",stepperVerticalBreakpoint:"number",stepperMobileBreakpoint:"number",stepperMobileBarBreakpoint:"number",animations:"boolean",stepperHeadClick:"boolean",stepperMobileNextBtn:"string",stepperMobileBackBtn:"string",stepperMobileStepTxt:"string",stepperMobileOfTxt:"string"},bv={stepperType:_v,stepperLinear:!1,stepperNoEditable:!1,stepperActive:"",stepperCompleted:"",stepperInvalid:"",stepperDisabled:"",stepperVerticalBreakpoint:0,stepperMobileBreakpoint:0,stepperMobileBarBreakpoint:4,animations:!0,stepperHeadClick:!0,stepperMobileNextBtn:"NEXT",stepperMobileBackBtn:"BACK",stepperMobileStepTxt:"step",stepperMobileOfTxt:"of"},vv=`mousedown${pv}`,yv=`submit${pv}`,xv=`keydown${pv}`,wv=`keyup${pv}`,Cv=`resize${pv}`,kv=`click${pv}`,Tv="animationend",Av=`stepChange${pv}`,Sv=`stepChanged${pv}`,Ev=`stepInvalid${pv}`,Mv=`stepValid${pv}`,Ov=`${dv}-step`,Dv=`${dv}-head`,Iv=`${dv}-head-text`,$v=`${dv}-content`,Lv=`${dv}-active`,Pv=`${dv}-completed`,Nv=`${dv}-invalid`,Rv=`${dv}-disabled`,Bv=`${dv}-${mv}`,Hv=`${dv}-content-hide`,Wv=`${dv}-${_v}`,zv=`${dv}-${fv}`,Fv=`${dv}-${fv}-head`,Vv=`${dv}-${fv}-footer`,jv=`${dv}-${fv}-progress-bar`,Yv=`${dv}-next-btn`,Xv=`${dv}-back-btn`,Kv=`${dv}-active-step`,Uv=`${dv}-all-steps`,qv=`\n
\n
\n
\n`,Qv=`\n
\n`;class Zv extends to{constructor(t,e){super(t),this._options=this._getConfig(e),this._elementHeight=0,this._steps=B.find(`.${Ov}`,this._element),this._currentView="",this._activeStepIndex=0,this._verticalStepperStyles=[],this._animations=!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&this._options.animations,this._element&&(this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return dv}get activeStep(){return this._steps[this._activeStepIndex]}get activeStepIndex(){return this._activeStepIndex}dispose(){this._steps.forEach((t=>{$.off(t,vv),$.off(t,xv)})),$.off(window,Cv),this._unbindMouseDown(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}changeStep(t){this._toggleStep(t)}nextStep(){this._toggleStep(this._activeStepIndex+1)}prevStep(){this._toggleStep(this._activeStepIndex-1)}resizeStepper(){this._currentView===mv&&this._setSingleStepHeight(this.activeStep),this._currentView===_v&&this._setHeight(this.activeStep),(this._options.stepperVerticalBreakpoint||this._options.stepperMobileBreakpoint)&&this._toggleStepperView()}_init(){const t=B.findOne(`.${Lv}`,this._element);switch(t?(this._activeStepIndex=this._steps.indexOf(t),this._toggleStepClass(this._activeStepIndex,"add",this._options.stepperActive)):(this._toggleStepClass(this._activeStepIndex,"add",Lv),this._toggleStepClass(this._activeStepIndex,"add",this._options.stepperActive)),this._setOptional(),this._options.stepperHeadClick&&this._bindMouseDown(),this._bindKeysNavigation(),this._options.stepperType){case mv:this._toggleVertical();break;case fv:this._toggleMobile();break;default:this._toggleHorizontal()}(this._options.stepperVerticalBreakpoint||this._options.stepperMobileBreakpoint)&&this._toggleStepperView(),this._options.stepperLinear&&this._setValidation(),this._bindResize()}_getConfig(t){const e=R.getDataAttributes(this._element);return t={...bv,...e,...t},d(dv,t,gv),t}_bindMouseDown(){this._steps.forEach((t=>{const e=B.findOne(`.${Dv}`,t);$.on(e,vv,(t=>{const e=B.parents(t.target,`.${Ov}`)[0],i=this._steps.indexOf(e);t.preventDefault(),this._toggleStep(i)}))}))}_unbindMouseDown(){this._steps.forEach((t=>{const e=B.findOne(`.${Dv}`,t);$.off(e,vv)}))}_bindResize(){$.on(window,Cv,(()=>{this.resizeStepper()}))}_toggleStepperView(){const t=this._options.stepperVerticalBreakpointwindow.innerWidth,i=this._options.stepperMobileBreakpoint>window.innerWidth;t&&this._currentView!==_v&&this._toggleHorizontal(),e&&!i&&this._currentView!==mv&&(this._steps.forEach((t=>{const e=B.findOne(`.${$v}`,t);this._resetStepperHeight(),this._showElement(e)})),this._toggleVertical()),i&&this._currentView!==fv&&this._toggleMobile()}_toggleStep(t){const e=this._steps.length,i=this._validateStep(t),s=this._activeStepIndex;if(!i)return;if(this._options.stepperLinear&&$.trigger(this.activeStep,Mv,{currentStep:this._activeStepIndex,nextStep:t}),this._options.stepperNoEditable&&this._toggleDisabled(),this._showElement(B.findOne(`.${$v}`,this._steps[t])),this._toggleActive(t),(!this._options.stepperLinear||t>this._activeStepIndex)&&this._toggleCompleted(this._activeStepIndex),this._currentView===_v||this._currentView===fv?this._animateHorizontalStep(t):(this._animateVerticalStep(t),this._setSingleStepHeight(this._steps[t])),this._toggleStepTabIndex(B.findOne(`.${Dv}`,this.activeStep),B.findOne(`.${Dv}`,this._steps[t])),this._activeStepIndex=t,this._currentView===fv){B.findOne(`#${Kv}`,this._element).textContent=this._activeStepIndex+1,e>this._options.stepperMobileBarBreakpoint&&this._updateProgressBar()}const n=this.activeStep.querySelectorAll(".form-outline"),o=B.find(".form-notch",n[0]);n.length&&o.length<1&&n.forEach((t=>{new mdb.Input(t).init()})),$.trigger(this.activeStep,Sv,{currentStep:this._activeStepIndex,prevStep:s})}_resetStepperHeight(){this._element.style.height=""}_setStepsHeight(){this._steps.forEach((t=>{const e=B.findOne(`.${$v}`,t),i=window.getComputedStyle(e);this._verticalStepperStyles.push({paddingTop:parseFloat(i.paddingTop),paddingBottom:parseFloat(i.paddingBottom)});const s=e.scrollHeight;e.style.height=`${s}px`}))}_setSingleStepHeight(t){const e=B.findOne(`.${$v}`,t),i=this.activeStep===t,s=this._steps.indexOf(t);let n;i?(e.style.height="",n=e.scrollHeight):n=e.scrollHeight+this._verticalStepperStyles[s].paddingTop+this._verticalStepperStyles[s].paddingBottom,e.style.height=`${n}px`}_createMobileElements(){this._element.insertAdjacentHTML("beforeend",Qv);const t=B.findOne(`.${Vv}`,this._element);var e;this._steps.length>this._options.stepperMobileBarBreakpoint&&(this._element.classList.add("stepper-progress-bar"),t.insertAdjacentHTML("afterbegin",qv),this._updateProgressBar()),t.insertAdjacentHTML("afterbegin",(e=this._options,`\n
\n \n
\n`)),t.insertAdjacentHTML("beforeend",(t=>`\n
\n \n
\n`)(this._options)),this._element.insertAdjacentHTML("afterbegin",(t=>`\n
\n ${t.stepperMobileStepTxt} ${t.stepperMobileOfTxt} \n
\n`)(this._options));B.findOne(`#${Uv}`,this._element).textContent=this._steps.length;B.findOne(`#${Kv}`,this._element).textContent=this._activeStepIndex+1}_toggleMobile(){this._currentView=fv,this._toggleStepperClass(zv),this._createMobileElements(),this._bindMobileButtons(),this._setHeight(this.activeStep),this._hideInactiveSteps()}_toggleVertical(){this._currentView===fv&&(this._deleteMobileElements(),this._unbindMobileButtons()),this._currentView=mv,this._toggleStepperClass(Bv),this._setStepsHeight(),this._hideInactiveSteps()}_toggleHorizontal(){this._currentView===fv&&(this._deleteMobileElements(),this._unbindMobileButtons()),this._currentView=_v,this._toggleStepperClass(Wv),this._setHeight(this.activeStep),this._hideInactiveSteps()}_toggleStepperClass(t){this._element.classList.remove(Wv,zv,Bv),this._element.classList.add(t),t!==Bv&&this._steps.forEach((t=>{B.findOne(`.${$v}`,t).classList.remove(Hv)}))}_toggleStepClass(t,e,i){i&&this._steps[t].classList[e](i)}_deleteMobileElements(){const t=B.findOne(`.${Vv}`,this._element),e=B.findOne(`.${Fv}`,this._element);t.remove(),e.remove()}_bindKeysNavigation(){this._toggleStepTabIndex(!1,B.findOne(`.${Dv}`,this.activeStep)),this._steps.forEach((t=>{const e=B.findOne(`.${Dv}`,t);$.on(e,xv,(t=>{const e=B.parents(t.currentTarget,`.${Ov}`)[0],i=B.next(e,`.${Ov}`)[0],s=B.prev(e,`.${Ov}`)[0],n=B.findOne(`.${Dv}`,e),o=B.findOne(`.${Dv}`,this.activeStep);let a=null,r=null;if(i&&(a=B.findOne(`.${Dv}`,i)),s&&(r=B.findOne(`.${Dv}`,s)),t.keyCode===F_&&this._currentView!==mv&&(!f&&r?(this._toggleStepTabIndex(n,r),this._toggleOutlineStyles(n,r),r.focus()):f&&a&&(this._toggleStepTabIndex(n,a),this._toggleOutlineStyles(n,a),a.focus())),t.keyCode===j_&&this._currentView!==mv&&(!f&&a?(this._toggleStepTabIndex(n,a),this._toggleOutlineStyles(n,a),a.focus()):f&&r&&(this._toggleStepTabIndex(n,r),this._toggleOutlineStyles(n,r),r.focus())),t.keyCode===Y_&&this._currentView===mv&&(t.preventDefault(),a&&(this._toggleStepTabIndex(n,a),this._toggleOutlineStyles(n,a),a.focus())),t.keyCode===V_&&this._currentView===mv&&(t.preventDefault(),r&&(this._toggleStepTabIndex(n,r),this._toggleOutlineStyles(n,r),r.focus())),t.keyCode===X_){const t=B.findOne(`.${Dv}`,this._steps[0]);this._toggleStepTabIndex(n,t),this._toggleOutlineStyles(n,t),t.focus()}if(t.keyCode===K_){const t=this._steps[this._steps.length-1],e=B.findOne(`.${Dv}`,t);this._toggleStepTabIndex(n,e),this._toggleOutlineStyles(n,e),e.focus()}t.keyCode!==U_&&32!==t.keyCode||(t.preventDefault(),this.changeStep(this._steps.indexOf(e))),9===t.keyCode&&(this._toggleStepTabIndex(n,o),this._toggleOutlineStyles(n,!1),o.focus())})),$.on(e,wv,(t=>{const e=B.parents(t.currentTarget,`.${Ov}`)[0],i=B.findOne(`.${Dv}`,e),s=B.findOne(`.${Dv}`,this.activeStep);9===t.keyCode&&(this._toggleStepTabIndex(i,s),this._toggleOutlineStyles(!1,s),s.focus())}))}))}_bindMobileButtons(){const t=B.findOne(`.${Xv}`,this._element),e=B.findOne(`.${Yv}`,this._element);$.on(t,kv,(()=>this.prevStep())),$.on(e,kv,(()=>this.nextStep()))}_unbindMobileButtons(){const t=B.findOne(`.${Xv}`,this._element),e=B.findOne(`.${Yv}`,this._element);$.off(t,kv,(()=>this.prevStep())),$.off(e,kv,(()=>this.nextStep()))}_toggleStepTabIndex(t,e){t&&t.setAttribute("tabIndex",-1),e&&e.setAttribute("tabIndex",0)}_validateActiveStepRequiredElements(){return B.find("[required]",this.activeStep).every((t=>!0===t.checkValidity()))}_validateStep(t){const e=this._steps.length;let i=!0;t===this._activeStepIndex&&(i=!1),(t>=e||t<0)&&(i=!1);const s=$.trigger(this.activeStep,Av,{currentStep:this._activeStepIndex,nextStep:t});if(this._options.stepperLinear){const s=t-this.activeStepIndex-1;if(t>this._activeStepIndex+1){let t=B.next(this.activeStep,"li")[0];for(let e=0;ethis._activeStepIndex||t===e-1)&&(this.activeStep.classList.add("was-validated"),this._validateActiveStepRequiredElements()||(this._toggleInvalid(this._activeStepIndex),$.trigger(this.activeStep,Ev,{currentStep:this._activeStepIndex,nextStep:t}),this._currentView!==mv?setTimeout((()=>{this._setHeight(this.activeStep)}),210):setTimeout((()=>{this._setSingleStepHeight(this.activeStep)}),210),i=!1))}return t>this._activeStepIndex&&s.defaultPrevented&&(i=!1),this._options.stepperNoEditable&&this._steps[t].classList.contains(Rv)&&(i=!1),i}_updateProgressBar(){const t=this._steps.length;B.findOne(`.${jv}`,this._element).style.width=(this._activeStepIndex+1)/t*100+"%"}_toggleOutlineStyles(t,e){t&&(t.style.outline=""),e&&(e.style.outline="revert")}_toggleDisabled(){this._toggleStepClass(this._activeStepIndex,"add",Rv),this._toggleStepClass(this._activeStepIndex,"add",this._options.stepperDisabled)}_toggleActive(t){this._toggleStepClass(t,"add",Lv),this._toggleStepClass(this._activeStepIndex,"remove",Lv),this._toggleStepClass(t,"add",this._options.stepperActive),this._toggleStepClass(this._activeStepIndex,"remove",this._options.stepperActive)}_toggleCompleted(t){this._toggleStepClass(t,"add",Pv),this._toggleStepClass(t,"remove",Nv),this._toggleStepClass(t,"add",this._options.stepperCompleted),this._toggleStepClass(t,"remove",this._options.stepperInvalid)}_toggleInvalid(t){this._toggleStepClass(t,"add",Nv),this._toggleStepClass(t,"remove",Pv),this._toggleStepClass(t,"add",this._options.stepperInvalid),this._toggleStepClass(t,"remove",this._options.stepperCompleted)}_setOptional(){this._steps.forEach((t=>{if(R.getDataAttribute(t,"stepper-optional")){B.findOne(`.${Iv}`,t).setAttribute("data-mdb-content","Optional")}}))}_hideInactiveSteps(){this._steps.forEach((t=>{t.classList.contains(Lv)||this._hideElement(B.findOne(`.${$v}`,t))}))}_setValidation(){const t=B.findOne(".needs-validation.stepper-form",this._element);$.on(t,yv,(e=>{t.checkValidity()||(e.preventDefault(),e.stopPropagation()),this._steps.forEach(((t,e)=>{this._validateStep(e)||(this._toggleInvalid(e),$.trigger(this.activeStep,Ev))}))}),!1)}_setHeight(t){const e=B.findOne(`.${$v}`,t),i=B.findOne(`.${Vv}`,this._element),s=getComputedStyle(e),n=i?getComputedStyle(i):"";let o;o=this._currentView===fv?B.findOne(`.${Fv}`,this._element):B.findOne(`.${Dv}`,t);const a=getComputedStyle(o),r=e.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom),l=o.offsetHeight+parseFloat(a.marginTop)+parseFloat(a.marginBottom),h=n?i.offsetHeight+parseFloat(n.marginTop)+parseFloat(n.marginBottom):0;this._element.style.height=`${l+r+h}px`}_hideElement(t){B.parents(t,`.${Ov}`)[0].classList.contains(Lv)||this._currentView===mv?t.classList.add(Hv):t.style.display="none"}_showElement(t){this._currentView===mv?t.classList.remove(Hv):t.style.display="block"}_animateHorizontalStep(t){if(!this._animations)return this._steps.forEach(((e,i)=>{const s=B.findOne(`.${$v}`,e);i!==t&&this._hideElement(s)})),void this._setHeight(this._steps[t]);const e=t>this._activeStepIndex,i=B.findOne(`.${$v}`,this._steps[t]),s=B.findOne(`.${$v}`,this.activeStep);let n,o;this._steps.forEach(((e,i)=>{const s=B.findOne(`.${$v}`,e);this._clearStepAnimation(s),i!==t&&i!==this._activeStepIndex&&this._hideElement(s)})),e?(o="slide-out-left",n="slide-in-right"):(o="slide-out-right",n="slide-in-left"),this._animations&&(s.classList.add(o,"animation","fast"),i.classList.add(n,"animation","fast")),this._setHeight(this._steps[t]),$.one(s,Tv,(t=>{this._clearStepAnimation(t.target),this._hideElement(t.target)})),$.one(i,Tv,(t=>{this._clearStepAnimation(t.target)}))}_animateVerticalStep(t){const e=B.findOne(`.${$v}`,this._steps[t]),i=B.findOne(`.${$v}`,this.activeStep);this._hideElement(i),this._showElement(e)}_clearStepAnimation(t){t.classList.remove("slide-out-left","slide-in-right","slide-out-right","slide-in-left","animation","fast")}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,uv);const s="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new Zv(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const Gv="sticky",Jv="mdb.sticky",ty="animation",ey=`.${Jv}`,iy=`activated${ey}`,sy=`deactivated${ey}`,ny={stickyActiveClass:"",stickyAnimationSticky:"",stickyAnimationUnsticky:"",stickyBoundary:!1,stickyDelay:0,stickyDirection:"down",stickyMedia:0,stickyOffset:0,stickyPosition:"top"},oy={stickyActiveClass:"string",stickyAnimationSticky:"string",stickyAnimationUnsticky:"string",stickyBoundary:"(boolean|string)",stickyDelay:"number",stickyDirection:"string",stickyMedia:"number",stickyOffset:"number",stickyPosition:"string"};class ay extends to{constructor(t,e){super(t),this._hiddenElement=null,this._elementPositionStyles={},this._scrollDirection="",this._isSticked=!1,this._elementOffsetTop=null,this._scrollTop=0,this._pushPoint="",this._manuallyDeactivated=!1,this._element&&(this._options=this._getConfig(e),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return Gv}dispose(){const{stickyAnimationUnsticky:t}=this._options;let{animationDuration:e}=getComputedStyle(this._element);e=""!==t?1e3*parseFloat(e):0,this._disableSticky(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),setTimeout((()=>{super.dispose()}),e)}activate(){this._isSticked||(this._createHiddenElement(),this._enableSticky(),this._changeBoundaryPosition(),this._isSticked=!0,this._manuallyDeactivated=!1)}deactivate(){this._isSticked&&(this._disableSticky(),this._isSticked=!1,this._manuallyDeactivated=!0)}_init(){this._userActivityListener()}_userActivityListener(){$.on(window,"resize",(()=>{this._updateElementPosition(),this._updateElementOffset()})),$.on(window,"scroll",(()=>{if(!this._element)return;if(window.innerWidth<=this._options.stickyMedia)return;if(this._manuallyDeactivated)return;const t=document.documentElement,{stickyDirection:e}=this._options,i=window.pageYOffset||t.scrollTop;this._updateElementOffset(),this._updatePushPoint(),this._updateScrollDirection(i),this._clearInProgressAnimations();const s=[this._scrollDirection,"both"].includes(e),n=this._pushPoint<=i,o=n&&!this._isSticked&&s,a=(!n||!s)&&this._isSticked;o&&(this._createHiddenElement(),this._enableSticky(),this._changeBoundaryPosition(),this._isSticked=!0),a&&(this._disableSticky(),this._isSticked=!1),this._isSticked&&(this._updatePosition({styles:this._elementPositionStyles}),this._changeBoundaryPosition()),this._scrollTop=i<=0?0:i}))}_updatePushPoint(){"top"===this._options.stickyPosition?this._pushPoint=this._elementOffsetTop-this._options.stickyDelay:this._pushPoint=this._elementOffsetTop+this._element.height-document.body.scrollHeight+this._options.stickyDelay}_updateElementOffset(){this._hiddenElement?this._elementOffsetTop=this._hiddenElement.offsetTop:this._elementOffsetTop=this._element.offsetTop,this._options.stickyAnimationUnsticky&&(this._elementOffsetTop+=this._element.height||0)}_updateElementPosition(){if(this._hiddenElement){const{left:t}=this._hiddenElement.getBoundingClientRect();this._elementPositionStyles={left:`${t}px`}}else this._elementPositionStyles={};this._setStyle(this._element,this._elementPositionStyles)}_updateScrollDirection(t){t>this._scrollTop?this._scrollDirection="down":this._scrollDirection="up"}_clearInProgressAnimations(){const t="up"===this._scrollDirection,e=this._element.classList.contains(this._options.stickyAnimationUnsticky),i=window.scrollY<=this._elementOffsetTop-this._element.height;t&&e&&i&&(this._removeUnstickyAnimation(),this._resetStyles(),this._removeHiddenElement())}_enableSticky(){const{stickyActiveClass:t,stickyAnimationSticky:e,stickyAnimationUnsticky:i,stickyOffset:s,stickyPosition:n}=this._options,{height:o,left:a,width:r}=this._element.getBoundingClientRect();""!==e&&(R.addClass(this._element,ty),this._toggleClass(e,i,this._element)),this._toggleClass(t,"",this._element),this._setStyle(this._element,{top:"top"===n&&`${0+s}px`,bottom:"bottom"===n&&`${0+s}px`,height:`${o}px`,width:`${r}px`,left:`${a}px`,zIndex:"100",position:"fixed"}),this._hiddenElement.hidden=!1,$.trigger(this._element,iy)}_changeBoundaryPosition(){const{stickyPosition:t,stickyBoundary:e,stickyOffset:i}=this._options,{height:s}=this._element.getBoundingClientRect(),n={height:this._element.parentElement.getBoundingClientRect().height,...this._getOffset(this._element.parentElement)};let o;const a=B.findOne(e);o=a?this._getOffset(a).top-s-i:n.height+n[t]-s-i;const r="top"===t,l="bottom"===t,h=e,c=o<0,d=o>n.height-s;let u;r&&(u=c&&h?{top:`${i+o}px`}:{top:`${i+0}px`}),l&&(u=c&&h?{bottom:`${i+o}px`}:d&&h?{bottom:`${i+n.bottom}px`}:{bottom:`${i+0}px`}),this._setStyle(this._element,u)}_disableSticky(){const{stickyActiveClass:t,stickyAnimationUnsticky:e,stickyAnimationSticky:i}=this._options;let{animationDuration:s}=getComputedStyle(this._element);s=""!==e?1e3*parseFloat(s):0,""!==this._options.stickyAnimationUnsticky&&(R.addClass(this._element,ty),this._toggleClass(e,i,this._element)),setTimeout((()=>{this._element.classList.contains(i)||(this._removeUnstickyAnimation(),this._resetStyles(),this._removeHiddenElement(),this._toggleClass("",t,this._element),$.trigger(this._element,sy))}),s)}_createHiddenElement(){this._hiddenElement||(this._hiddenElement=this._copyElement(this._element))}_removeHiddenElement(){this._hiddenElement&&(this._hiddenElement.remove(),this._hiddenElement=null)}_removeUnstickyAnimation(){this._toggleClass("",this._options.stickyAnimationUnsticky,this._element)}_resetStyles(){this._setStyle(this._element,{top:null,bottom:null,position:null,left:null,zIndex:null,width:null,height:null})}_updatePosition({styles:t}){this._setStyle(this._element,t)}_toggleClass(t,e,i){t&&R.addClass(i,t),e&&R.removeClass(i,e)}_getOffset(t){const e=R.offset(t),i=t.getBoundingClientRect(),s=0===e.left&&0===e.top?0:window.innerHeight-i.bottom;return{...e,bottom:s}}_copyElement(t){const{height:e,width:i}=t.getBoundingClientRect(),s=t.cloneNode(!1);return s.hidden=!0,this._setStyle(s,{height:`${e}px`,width:`${i}px`,opacity:"0"}),t.parentElement.insertBefore(s,t),s}_getConfig(t={}){const e=R.getDataAttributes(this._element);return t={...ny,...e,...t},d(Gv,t,oy),t}_setStyle(t,e){Object.keys(e).forEach((i=>{t.style[i]=e[i]}))}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,Jv);const s="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new ay(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}class ry{_getCoordinates(t){const[e]=t.touches;return{x:e.clientX,y:e.clientY}}_getDirection({x:t,y:e}){return{x:{direction:t<0?"left":"right",value:Math.abs(t)},y:{direction:e<0?"up":"down",value:Math.abs(e)}}}_getOrigin({x:t,y:e},{x:i,y:s}){return{x:t-i,y:e-s}}_getDistanceBetweenTwoPoints(t,e,i,s){return Math.hypot(e-t,s-i)}_getMidPoint({x1:t,x2:e,y1:i,y2:s}){return{x:(t+e)/2,y:(i+s)/2}}_getVectorLength({x1:t,x2:e,y1:i,y2:s}){return Math.sqrt((e-t)**2+(s-i)**2)}_getRightMostTouch(t){let e=null;const i=Number.MIN_VALUE;return t.forEach((t=>{t.clientX>i&&(e=t)})),e}_getAngle(t,e,i,s){return Math.atan2(s-e,i-t)}_getAngularDistance(t,e){return e-t}_getCenterXY({x1:t,x2:e,y1:i,y2:s}){return{x:t+(e-t)/2,y:i+(s-i)/2}}_getPinchTouchOrigin(t){const[e,i]=t,s={x1:e.clientX,x2:i.clientX,y1:e.clientY,y2:i.clientY};return[this._getVectorLength(s),this._getCenterXY(s)]}_getPosition({x1:t,x2:e,y1:i,y2:s}){return{x1:t,x2:e,y1:i,y2:s}}}const ly={time:250,pointers:1},hy="press";class cy extends ry{constructor(t,e={}){super(),this._element=t,this._options={...ly,...e},this._timer=null}static get NAME(){return hy}handleTouchStart(t){const{time:e,pointers:i}=this._options;t.touches.length===i&&(this._timer=setTimeout((()=>{$.trigger(this._element,hy,{touch:t,time:e}),$.trigger(this._element,"pressup",{touch:t})}),e))}handleTouchEnd(){clearTimeout(this._timer)}}const dy={threshold:10,direction:"all"};class uy{constructor(t,e){this._element=t,this._startPosition=null,this._options={...dy,...e}}handleTouchStart(t){this._startPosition=this._getCoordinates(t)}handleTouchMove(t){if(!this._startPosition)return;const e=this._getCoordinates(t),i={x:e.x-this._startPosition.x,y:e.y-this._startPosition.y},s=this._getDirection(i);if("all"===this._options.direction){if(s.y.values.x.value?s.y.direction:s.x.direction;return $.trigger(this._element,`swipe${e}`,{touch:t}),$.trigger(this._element,"swipe",{touch:t,direction:e}),void(this._startPosition=null)}const n="left"===this._options.direction||"right"===this._options?"x":"y";s[n].direction===this._options.direction&&s[n].value>this._options.threshold&&($.trigger(this._element,`swipe${s[n].direction}`,{touch:t}),this._startPosition=null)}handleTouchEnd(){this._startPosition=null}_getCoordinates(t){const[e]=t.touches;return{x:e.clientX,y:e.clientY}}_getDirection(t){return{x:{direction:t.x<0?"left":"right",value:Math.abs(t.x)},y:{direction:t.y<0?"up":"down",value:Math.abs(t.y)}}}}const py={threshold:20,direction:"all",pointers:1},_y="pan",my=`${_y}start`,fy=`${_y}end`,gy=`${_y}move`;class by extends ry{constructor(t,e={}){super(),this._element=t,this._options={...py,...e},this._startTouch=null}static get NAME(){return _y}handleTouchStart(t){this._startTouch=this._getCoordinates(t),this._movedTouch=t,$.trigger(this._element,my,{touch:t})}handleTouchMove(t){"touchmove"===t.type&&t.preventDefault();const{threshold:e,direction:i}=this._options,s=this._getCoordinates(t),n=this._getCoordinates(this._movedTouch),o=this._getOrigin(s,this._startTouch),a=this._getOrigin(s,n),r=this._getDirection(o),l=this._getDirection(a),{x:h,y:c}=r;if("all"===i&&(c.value>e||h.value>e)){const e=c.value>h.value?c.direction:h.direction;$.trigger(this._element,`${_y}${e}`,{touch:t}),$.trigger(this._element,_y,{...a,touch:t})}const d="left"===i||"right"===i?"x":"y";l[d].direction===i&&r[d].value>e&&$.trigger(this._element,`${_y}${i}`,{touch:t,[d]:s[d]-n[d]}),this._movedTouch=t,$.trigger(this._element,gy,{touch:t})}handleTouchEnd(t){"touchend"===t.type&&t.preventDefault(),this._movedTouch=null,this._startTouch=null,$.trigger(this._element,fy,{touch:t})}}const vy={pointers:2,threshold:10},yy="pinch",xy=`${yy}end`,wy=`${yy}start`,Cy=`${yy}move`;class ky extends ry{constructor(t,e={}){super(),this._element=t,this._options={...vy,...e},this._startTouch=null,this._origin=null,this._touch=null,this._math=null,this._ratio=null}static get NAME(){return yy}get isNumber(){return"number"==typeof this._startTouch&&"number"==typeof this._touch&&!isNaN(this._startTouch)&&!isNaN(this._touch)}handleTouchStart(t){if(t.touches.length!==this._options.pointers)return;"touchstart"===t.type&&t.preventDefault();const[e,i]=this._getPinchTouchOrigin(t.touches);this._touch=e,this._origin=i,this._startTouch=this._touch,$.trigger(this._element,wy,{touch:t,ratio:this._ratio,origin:this._origin})}handleTouchMove(t){const{threshold:e,pointers:i}=this._options;t.touches.length===i&&("touchmove"===t.type&&t.preventDefault(),this._touch=this._getPinchTouchOrigin(t.touches)[0],this._ratio=this._touch/this._startTouch,this.isNumber&&(this._origin.x>e||this._origin.y>e)&&(this._startTouch=this._touch,$.trigger(this._element,yy,{touch:t,ratio:this._ratio,origin:this._origin}),$.trigger(this._element,Cy,{touch:t,ratio:this._ratio,origin:this._origin})))}handleTouchEnd(t){this.isNumber&&(this._startTouch=null,$.trigger(this._element,xy,{touch:t,ratio:this._ratio,origin:this._origin}))}}const Ty={interval:500,time:250,taps:1,pointers:1};class Ay extends ry{constructor(t,e){super(),this._element=t,this._options={...Ty,...e},this._timer=null,this._tapCount=0}static get NAME(){return"tap"}handleTouchStart(t){const{x:e,y:i}=this._getCoordinates(t),{interval:s,taps:n,pointers:o}=this._options;return t.touches.length===o&&(this._tapCount+=1,1===this._tapCount&&(this._timer=setTimeout((()=>{this._tapCount=0}),s)),this._tapCount===n&&(clearTimeout(this._timer),this._tapCount=0,$.trigger(this._element,"tap",{touch:t,origin:{x:e,y:i}}))),t}handleTouchEnd(){}handleTouchMove(){}}const Sy={angle:0,pointers:2},Ey="rotate",My=`${Ey}end`,Oy=`${Ey}start`;class Dy extends ry{constructor(t,e){super(),this._element=t,this._options={...Sy,...e},this._origin={}}static get NAME(){return Ey}handleTouchStart(t){"touchstart"===t.type&&t.preventDefault(),t.touches.length<2||(this._startTouch=t,this._origin={},$.trigger(this._element,Oy,{touch:t}))}handleTouchMove(t){let e,i;"touchmove"===t.type&&t.preventDefault();const s=t.touches;if(1===s.length&&1===this._options.pointers){const{left:t,top:n,width:o,height:a}=this._element.getBoundingClientRect();e={x:t+o/2,y:n+a/2},i=s[0]}else{if(2!==t.touches.length||2!==this._options.pointers)return;{const[s,n]=t.touches,o={x1:n.clientX,x2:s.clientX,y1:n.clientY,y2:s.clientY};e=this._getMidPoint(o),i=this._getRightMostTouch(t.touches)}}this.currentAngle=this._getAngle(e.x,e.y,i.clientX,i.clientY),this._origin.initialAngle?(this._origin.change=this._getAngularDistance(this._origin.previousAngle,this.currentAngle),this._origin.distance+=this._origin.change):(this._origin.initialAngle=this._origin.previousAngle=this.currentAngle,this._origin.distance=this._origin.change=0),this._origin.previousAngle=this.currentAngle,this.rotate={currentAngle:this.currentAngle,distance:this._origin.distance,change:this._origin.change},$.trigger(this._element,Ey,{...this.rotate,touch:t})}handleTouchEnd(t){"touchend"===t.type&&t.preventDefault(),this._origin={},$.trigger(this._element,My,{touch:t})}}class Iy extends to{constructor(t,e="swipe",i={}){super(t),this._options=this._getConfig(i),this._event=this._options.event||e,this.swipe="swipe"===this._event?new uy(t,this._options):null,this.press="press"===this._event?new cy(t,this._options):null,this.pan="pan"===this._event?new by(t,this._options):null,this.pinch="pinch"===this._event?new ky(t,this._options):null,this.tap="tap"===this._event?new Ay(t,this._options):null,this.rotate="rotate"===this._event?new Dy(t,this._options):null,this._touchStartHandler=this._handleTouchStart.bind(this),this._touchMoveHandler=this._handleTouchMove.bind(this),this._touchEndHandler=this._handleTouchEnd.bind(this),this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return"touch"}dispose(){$.off(this._element,"touchstart",this._touchStartHandler),$.off(this._element,"touchmove",this._touchMoveHandler),$.off(this._element,"touchend",this._touchEndHandler),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}init(){$.on(this._element,"touchstart",this._touchStartHandler),$.on(this._element,"touchmove",this._touchMoveHandler),$.on(this._element,"touchend",this._touchEndHandler)}_getConfig(t){return t={...R.getDataAttributes(this._element),...t}}_handleTouchStart(t){this[this._event].handleTouchStart(t)}_handleTouchMove(t){this[this._event].handleTouchMove&&this[this._event].handleTouchMove(t)}_handleTouchEnd(t){this[this._event].handleTouchEnd(t)}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,"mdb.touch");const i="object"==typeof t&&t;if((e||!/dispose/.test(t))&&(e||(e=new Iy(this,i)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);return e[t]}}))}}const $y="smoothScroll",Ly=`mdb.${$y}`,Py=`.${Ly}`,Ny={container:"string",offset:"number",easing:"string",duration:"number"},Ry={container:"body",offset:0,easing:"linear",duration:500},By=`scrollStart${Py}`,Hy=`scrollEnd${Py}`,Wy=`scrollCancel${Py}`;class zy extends to{constructor(t,e={}){super(t),this._options=this._getConfig(e),this._href=this._element.getAttribute("href"),this.isCancel=!1,this._element&&(this._setup(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return $y}get isWindow(){return"body"===this._options.container}get containerToScroll(){return this.isWindow?document.documentElement:B.findOne(this._options.container,document.documentElement)}get elFromHrefExist(){return!!B.findOne(this._href,this.containerToScroll)}get offsetFromEl(){const t=this.containerToScroll.scrollTop,e=B.findOne(this._href,this.containerToScroll);if(this.isWindow)return R.offset(e).top-this._options.offset+t;return e.getBoundingClientRect().y-this.containerToScroll.getBoundingClientRect().y-this._options.offset+t}get easingFunction(){const t=this._options.easing,e=`_motion${t[0].toUpperCase()}${t.slice(1)}`;return this[e]?this[e]:this._motionLinear}dispose(){$.off(this._element,"click"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}cancelScroll(){this.isCancel=!0}_getConfig(t){const e={...Ry,...R.getDataAttributes(this._element),...t};return d($y,e,Ny),e}_inViewport(){if(this.isWindow)return!0;const t=this.containerToScroll.getBoundingClientRect();return t.top>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)}_setup(){const t=void 0!==this._href,e=this._href.includes("#");t&&e&&this.elFromHrefExist&&(this._scrollOnClickEvent(),this._preventNativeScroll())}_scrollOnClickEvent(){$.on(this._element,"click",(t=>{this._handleClick(t)}))}_handleClick(t){t.preventDefault(),this.isCancel=!1,$.trigger(this._element,By);const e=this.containerToScroll,i=this.containerToScroll.scrollTop,s=this.offsetFromEl,n=1/this._options.duration,o=4.25,a=this.easingFunction;this._inViewport()?this._scrollOnNextTick(e,i,s,0,n,o,a):(this._scrollOnNextTick(document.documentElement,document.documentElement.scrollTop,this.containerToScroll.offsetTop,0,n,o,a),setTimeout((()=>{this._scrollOnNextTick(e,i,s,0,n,o,a),this.isCancel=!1}),this._options.duration))}_scrollOnNextTick(t,e,i,s,n,o,a){if(s<0||s>1||n<=0||this.isCancel)return this.isCancel?(this.isInViewport&&(this.isCancel=!1),void $.trigger(this._element,Wy)):($.trigger(this._element,Hy),void(t.scrollTop=i));t.scrollTo({top:e-(e-i)*a(s)}),s+=n*o,setTimeout((()=>{this._scrollOnNextTick(t,e,i,s,n,o,a)}))}_preventDefault(t){t.preventDefault()}_preventNativeScroll(){let t=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>t=!0}))}catch(s){this._scrollError=s}const e=!!t&&{passive:!1},i="onwheel"in g("div")?"wheel":"mousewheel";this.isWindow&&(this._deleteScrollOnStart(e,i),this._addScrollOnEnd(e,i),this._addScrollOnCancel(e,i))}_deleteScrollOnStart(t,e){$.on(this._element,"scrollStart.mdb.smoothScroll",(()=>{window.addEventListener(e,this._preventDefault,t),window.addEventListener("touchmove",this._preventDefault,t)}))}_addScrollOnEnd(t,e){$.on(this._element,"scrollEnd.mdb.smoothScroll",(()=>{window.removeEventListener(e,this._preventDefault,t),window.removeEventListener("touchmove",this._preventDefault,t)}))}_addScrollOnCancel(t,e){$.on(this._element,"scrollCancel.mdb.smoothScroll",(()=>{window.removeEventListener(e,this._preventDefault,t),window.removeEventListener("touchmove",this._preventDefault,t)}))}_motionLinear(t){return t}_motionEaseInQuad(t){return t*t}_motionEaseInCubic(t){return t*t*t}_motionEaseInQuart(t){return t*t*t*t}_motionEaseInQuint(t){return t*t*t*t*t}_motionEaseInOutQuad(t){return t<.5?2*t*t:(4-2*t)*t-1}_motionEaseInOutCubic(t){return(t/=.5)<1?t*t*t/2:((t-=2)*t*t+2)/2}_motionEaseInOutQuart(t){return(t/=.5)<1?.5*t*t*t*t:-((t-=2)*t*t*t-2)/2}_motionEaseInOutQuint(t){return(t/=.5)<1?t*t*t*t*t/2:((t-=2)*t*t*t*t+2)/2}_motionEaseOutQuad(t){return-t*(t-2)}_motionEaseOutCubic(t){return--t*t*t+1}_motionEaseOutQuart(t){return-(--t*t*t*t-1)}_motionEaseOutQuint(t){return--t*t*t*t*t+1}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,Ly);if(e||(e=new zy(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}} /*! * perfect-scrollbar v1.5.3 * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors * Licensed under MIT */function Fy(t){return getComputedStyle(t)}function Vy(t,e){for(var i in e){var s=e[i];"number"==typeof s&&(s+="px"),t.style[i]=s}return t}function jy(t){var e=document.createElement("div");return e.className=t,e}var Yy="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Xy(t,e){if(!Yy)throw new Error("No element matching method supported");return Yy.call(t,e)}function Ky(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function Uy(t,e){return Array.prototype.filter.call(t.children,(function(t){return Xy(t,e)}))}var qy={main:"ps",rtl:"ps__rtl",element:{thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}}},Qy={x:null,y:null};function Zy(t,e){var i=t.element.classList,s=qy.state.scrolling(e);i.contains(s)?clearTimeout(Qy[e]):i.add(s)}function Gy(t,e){Qy[e]=setTimeout((function(){return t.isAlive&&t.element.classList.remove(qy.state.scrolling(e))}),t.settings.scrollingThreshold)}var Jy=function(t){this.element=t,this.handlers={}},tx={isEmpty:{configurable:!0}};Jy.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},Jy.prototype.unbind=function(t,e){var i=this;this.handlers[t]=this.handlers[t].filter((function(s){return!(!e||s===e)||(i.element.removeEventListener(t,s,!1),!1)}))},Jy.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},tx.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every((function(e){return 0===t.handlers[e].length}))},Object.defineProperties(Jy.prototype,tx);var ex=function(){this.eventElements=[]};function ix(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function sx(t,e,i,s,n){var o;if(void 0===s&&(s=!0),void 0===n&&(n=!1),"top"===e)o=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");o=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,i,s,n){var o=i[0],a=i[1],r=i[2],l=i[3],h=i[4],c=i[5];void 0===s&&(s=!0);void 0===n&&(n=!1);var d=t.element;t.reach[l]=null,d[r]<1&&(t.reach[l]="start");d[r]>t[o]-t[a]-1&&(t.reach[l]="end");e&&(d.dispatchEvent(ix("ps-scroll-"+l)),e<0?d.dispatchEvent(ix("ps-scroll-"+h)):e>0&&d.dispatchEvent(ix("ps-scroll-"+c)),s&&function(t,e){Zy(t,e),Gy(t,e)}(t,l));t.reach[l]&&(e||n)&&d.dispatchEvent(ix("ps-"+l+"-reach-"+t.reach[l]))}(t,i,o,s,n)}function nx(t){return parseInt(t,10)||0}ex.prototype.eventElement=function(t){var e=this.eventElements.filter((function(e){return e.element===t}))[0];return e||(e=new Jy(t),this.eventElements.push(e)),e},ex.prototype.bind=function(t,e,i){this.eventElement(t).bind(e,i)},ex.prototype.unbind=function(t,e,i){var s=this.eventElement(t);s.unbind(e,i),s.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(s),1)},ex.prototype.unbindAll=function(){this.eventElements.forEach((function(t){return t.unbindAll()})),this.eventElements=[]},ex.prototype.once=function(t,e,i){var s=this.eventElement(t),n=function(t){s.unbind(e,n),i(t)};s.bind(e,n)};var ox={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function ax(t){var e=t.element,i=Math.floor(e.scrollTop),s=e.getBoundingClientRect();t.containerWidth=Math.round(s.width),t.containerHeight=Math.round(s.height),t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(Uy(e,qy.element.rail("x")).forEach((function(t){return Ky(t)})),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(Uy(e,qy.element.rail("y")).forEach((function(t){return Ky(t)})),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){var i={width:e.railXWidth},s=Math.floor(t.scrollTop);e.isRtl?i.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:i.left=t.scrollLeft;e.isScrollbarXUsingBottom?i.bottom=e.scrollbarXBottom-s:i.top=e.scrollbarXTop+s;Vy(e.scrollbarXRail,i);var n={top:s,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?n.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:n.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:n.left=e.scrollbarYLeft+t.scrollLeft;Vy(e.scrollbarYRail,n),Vy(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),Vy(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(qy.state.active("x")):(e.classList.remove(qy.state.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?e.classList.add(qy.state.active("y")):(e.classList.remove(qy.state.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)}function rx(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function lx(t,e){var i=e[0],s=e[1],n=e[2],o=e[3],a=e[4],r=e[5],l=e[6],h=e[7],c=e[8],d=t.element,u=null,p=null,_=null;function m(e){e.touches&&e.touches[0]&&(e[n]=e.touches[0].pageY),d[l]=u+_*(e[n]-p),Zy(t,h),ax(t),e.stopPropagation(),e.type.startsWith("touch")&&e.changedTouches.length>1&&e.preventDefault()}function f(){Gy(t,h),t[c].classList.remove(qy.state.clicking),t.event.unbind(t.ownerDocument,"mousemove",m)}function g(e,a){u=d[l],a&&e.touches&&(e[n]=e.touches[0].pageY),p=e[n],_=(t[s]-t[i])/(t[o]-t[r]),a?t.event.bind(t.ownerDocument,"touchmove",m):(t.event.bind(t.ownerDocument,"mousemove",m),t.event.once(t.ownerDocument,"mouseup",f),e.preventDefault()),t[c].classList.add(qy.state.clicking),e.stopPropagation()}t.event.bind(t[a],"mousedown",(function(t){g(t)})),t.event.bind(t[a],"touchstart",(function(t){g(t,!0)}))}var hx={"click-rail":function(t){t.element,t.event.bind(t.scrollbarY,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarYRail,"mousedown",(function(e){var i=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=i*t.containerHeight,ax(t),e.stopPropagation()})),t.event.bind(t.scrollbarX,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarXRail,"mousedown",(function(e){var i=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=i*t.containerWidth,ax(t),e.stopPropagation()}))},"drag-thumb":function(t){lx(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),lx(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",(function(i){if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&(Xy(e,":hover")||Xy(t.scrollbarX,":focus")||Xy(t.scrollbarY,":focus"))){var s,n=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(n){if("IFRAME"===n.tagName)n=n.contentDocument.activeElement;else for(;n.shadowRoot;)n=n.shadowRoot.activeElement;if(Xy(s=n,"input,[contenteditable]")||Xy(s,"select,[contenteditable]")||Xy(s,"textarea,[contenteditable]")||Xy(s,"button,[contenteditable]"))return}var o=0,a=0;switch(i.which){case 37:o=i.metaKey?-t.contentWidth:i.altKey?-t.containerWidth:-30;break;case 38:a=i.metaKey?t.contentHeight:i.altKey?t.containerHeight:30;break;case 39:o=i.metaKey?t.contentWidth:i.altKey?t.containerWidth:30;break;case 40:a=i.metaKey?-t.contentHeight:i.altKey?-t.containerHeight:-30;break;case 32:a=i.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:a=t.containerHeight;break;case 34:a=-t.containerHeight;break;case 36:a=t.contentHeight;break;case 35:a=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==o||t.settings.suppressScrollY&&0!==a||(e.scrollTop-=a,e.scrollLeft+=o,ax(t),function(i,s){var n=Math.floor(e.scrollTop);if(0===i){if(!t.scrollbarYActive)return!1;if(0===n&&s>0||n>=t.contentHeight-t.containerHeight&&s<0)return!t.settings.wheelPropagation}var o=e.scrollLeft;if(0===s){if(!t.scrollbarXActive)return!1;if(0===o&&i<0||o>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}(o,a)&&i.preventDefault())}}))},wheel:function(t){var e=t.element;function i(i){var s=function(t){var e=t.deltaX,i=-1*t.deltaY;return void 0!==e&&void 0!==i||(e=-1*t.wheelDeltaX/6,i=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,i*=10),e!=e&&i!=i&&(e=0,i=t.wheelDelta),t.shiftKey?[-i,-e]:[e,i]}(i),n=s[0],o=s[1];if(!function(t,i,s){if(!ox.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var n=t;n&&n!==e;){if(n.classList.contains(qy.element.consuming))return!0;var o=Fy(n);if(s&&o.overflowY.match(/(scroll|auto)/)){var a=n.scrollHeight-n.clientHeight;if(a>0&&(n.scrollTop>0&&s<0||n.scrollTop0))return!0}if(i&&o.overflowX.match(/(scroll|auto)/)){var r=n.scrollWidth-n.clientWidth;if(r>0&&(n.scrollLeft>0&&i<0||n.scrollLeft0))return!0}n=n.parentNode}return!1}(i.target,n,o)){var a=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(o?e.scrollTop-=o*t.settings.wheelSpeed:e.scrollTop+=n*t.settings.wheelSpeed,a=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(n?e.scrollLeft+=n*t.settings.wheelSpeed:e.scrollLeft-=o*t.settings.wheelSpeed,a=!0):(e.scrollTop-=o*t.settings.wheelSpeed,e.scrollLeft+=n*t.settings.wheelSpeed),ax(t),a=a||function(i,s){var n=Math.floor(e.scrollTop),o=0===e.scrollTop,a=n+e.offsetHeight===e.scrollHeight,r=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(s)>Math.abs(i)?o||a:r||l)||!t.settings.wheelPropagation}(n,o),a&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault())}}void 0!==window.onwheel?t.event.bind(e,"wheel",i):void 0!==window.onmousewheel&&t.event.bind(e,"mousewheel",i)},touch:function(t){if(ox.supportsTouch||ox.supportsIePointer){var e=t.element,i={},s=0,n={},o=null;ox.supportsTouch?(t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",c),t.event.bind(e,"touchend",d)):ox.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",c),t.event.bind(e,"pointerup",d)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",c),t.event.bind(e,"MSPointerUp",d)))}function a(i,s){e.scrollTop-=s,e.scrollLeft-=i,ax(t)}function r(t){return t.targetTouches?t.targetTouches[0]:t}function l(t){return(!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(!(!t.targetTouches||1!==t.targetTouches.length)||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function h(t){if(l(t)){var e=r(t);i.pageX=e.pageX,i.pageY=e.pageY,s=(new Date).getTime(),null!==o&&clearInterval(o)}}function c(o){if(l(o)){var h=r(o),c={pageX:h.pageX,pageY:h.pageY},d=c.pageX-i.pageX,u=c.pageY-i.pageY;if(function(t,i,s){if(!e.contains(t))return!1;for(var n=t;n&&n!==e;){if(n.classList.contains(qy.element.consuming))return!0;var o=Fy(n);if(s&&o.overflowY.match(/(scroll|auto)/)){var a=n.scrollHeight-n.clientHeight;if(a>0&&(n.scrollTop>0&&s<0||n.scrollTop0))return!0}if(i&&o.overflowX.match(/(scroll|auto)/)){var r=n.scrollWidth-n.clientWidth;if(r>0&&(n.scrollLeft>0&&i<0||n.scrollLeft0))return!0}n=n.parentNode}return!1}(o.target,d,u))return;a(d,u),i=c;var p=(new Date).getTime(),_=p-s;_>0&&(n.x=d/_,n.y=u/_,s=p),function(i,s){var n=Math.floor(e.scrollTop),o=e.scrollLeft,a=Math.abs(i),r=Math.abs(s);if(r>a){if(s<0&&n===t.contentHeight-t.containerHeight||s>0&&0===n)return 0===window.scrollY&&s>0&&ox.isChrome}else if(a>r&&(i<0&&o===t.contentWidth-t.containerWidth||i>0&&0===o))return!0;return!0}(d,u)&&o.preventDefault()}}function d(){t.settings.swipeEasing&&(clearInterval(o),o=setInterval((function(){t.isInitialized?clearInterval(o):n.x||n.y?Math.abs(n.x)<.01&&Math.abs(n.y)<.01?clearInterval(o):t.element?(a(30*n.x,30*n.y),n.x*=.8,n.y*=.8):clearInterval(o):clearInterval(o)}),10))}}},cx=function(t,e){var i=this;if(void 0===e&&(e={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var s in this.element=t,t.classList.add(qy.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},e)this.settings[s]=e[s];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var n,o,a=function(){return t.classList.add(qy.state.focus)},r=function(){return t.classList.remove(qy.state.focus)};this.isRtl="rtl"===Fy(t).direction,!0===this.isRtl&&t.classList.add(qy.rtl),this.isNegativeScroll=(o=t.scrollLeft,t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=o,n),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new ex,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=jy(qy.element.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=jy(qy.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",r),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var l=Fy(this.scrollbarXRail);this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=nx(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=nx(l.borderLeftWidth)+nx(l.borderRightWidth),Vy(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=nx(l.marginLeft)+nx(l.marginRight),Vy(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=jy(qy.element.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=jy(qy.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",r),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var h=Fy(this.scrollbarYRail);this.scrollbarYRight=parseInt(h.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=nx(h.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=Fy(t);return nx(e.width)+nx(e.paddingLeft)+nx(e.paddingRight)+nx(e.borderLeftWidth)+nx(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=nx(h.borderTopWidth)+nx(h.borderBottomWidth),Vy(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=nx(h.marginTop)+nx(h.marginBottom),Vy(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(t){return hx[t](i)})),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",(function(t){return i.onScroll(t)})),ax(this)};cx.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Vy(this.scrollbarXRail,{display:"block"}),Vy(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=nx(Fy(this.scrollbarXRail).marginLeft)+nx(Fy(this.scrollbarXRail).marginRight),this.railYMarginHeight=nx(Fy(this.scrollbarYRail).marginTop)+nx(Fy(this.scrollbarYRail).marginBottom),Vy(this.scrollbarXRail,{display:"none"}),Vy(this.scrollbarYRail,{display:"none"}),ax(this),sx(this,"top",0,!1,!0),sx(this,"left",0,!1,!0),Vy(this.scrollbarXRail,{display:""}),Vy(this.scrollbarYRail,{display:""}))},cx.prototype.onScroll=function(t){this.isAlive&&(ax(this),sx(this,"top",this.element.scrollTop-this.lastScrollTop),sx(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},cx.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),Ky(this.scrollbarX),Ky(this.scrollbarY),Ky(this.scrollbarXRail),Ky(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},cx.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(t){return!t.match(/^ps([-_].+|)$/)})).join(" ")};const dx="perfectScrollbar",ux="mdb",px="ps",_x=[{mdb:`scrollX.${ux}.${px}`,ps:"ps-scroll-x"},{mdb:`scrollY.${ux}.${px}`,ps:"ps-scroll-y"},{mdb:`scrollUp.${ux}.${px}`,ps:"ps-scroll-up"},{mdb:`scrollDown.${ux}.${px}`,ps:"ps-scroll-down"},{mdb:`scrollLeft.${ux}.${px}`,ps:"ps-scroll-left"},{mdb:`scrollRight.${ux}.${px}`,ps:"ps-scroll-right"},{mdb:`scrollXEnd.${ux}.${px}`,ps:"ps-x-reach-end"},{mdb:`scrollYEnd.${ux}.${px}`,ps:"ps-y-reach-end"},{mdb:`scrollXStart.${ux}.${px}`,ps:"ps-x-reach-start"},{mdb:`scrollYStart.${ux}.${px}`,ps:"ps-y-reach-start"}],mx={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],wheelSpeed:1,wheelPropagation:!0,swipeEasing:!0,minScrollbarLength:null,maxScrollbarLength:null,scrollingThreshold:1e3,useBothWheelAxes:!1,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0},fx={handlers:"(string|array)",wheelSpeed:"number",wheelPropagation:"boolean",swipeEasing:"boolean",minScrollbarLength:"(number|null)",maxScrollbarLength:"(number|null)",scrollingThreshold:"number",useBothWheelAxes:"boolean",suppressScrollX:"boolean",suppressScrollY:"boolean",scrollXMarginOffset:"number",scrollYMarginOffset:"number"};class gx extends to{constructor(t,e={}){super(t),this._options=this._getConfig(e),this.perfectScrollbar=null,this._element&&R.addClass(this._element,"perfect-scrollbar"),this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return dx}_getConfig(t){const e=R.getDataAttributes(this._element);return void 0!==e.handlers&&(e.handlers=e.handlers.split(" ")),t={...mx,...e,...t},d(dx,t,fx),t}dispose(){this.removeEvent(_x),this.perfectScrollbar.destroy(),this.perfectScrollbar=null,R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}init(){this.perfectScrollbar=new cx(this._element,this._options),this._initEvents(_x)}update(){return this.perfectScrollbar.update()}_initEvents(t=[]){t.forEach((({ps:t,mdb:e})=>$.on(this._element,t,(t=>$.trigger(this._element,e,{e:t})))))}removeEvent(t){let e=[];"string"==typeof t&&(e=_x.filter((({mdb:e})=>e===t))),e.forEach((({ps:t,mdb:e})=>{$.off(this._element,t),$.off(this._element,e)}))}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,"mdb.perfectScrollbar");const i="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new gx(this,i)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}const bx="loading",vx="loading-spinner",yx={backdrop:"(null|boolean)",backdropColor:"string",backdropOpacity:"(number|string)",delay:"(null|number)",loader:"string",loadingIcon:"boolean",loadingText:"boolean",scroll:"boolean"},xx={backdrop:!0,backdropColor:"rgba(0, 0, 0)",backdropOpacity:.4,backdropID:"",delay:null,loader:"",parentSelector:null,scroll:!0,loadingText:!0,loadingIcon:!0};class wx extends to{constructor(t,e={}){super(t),this._options=this._getConfig(e),this._backdropElement=null,this._parentElement=B.findOne(this._options.parentSelector),this._loadingIcon=B.findOne(".loading-icon",this._element),this._loadingText=B.findOne(".loading-text",this._element),this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return bx}init(){const t=this._loadingIcon.cloneNode(!0),e=this._loadingText.cloneNode(!0);this._removeElementsOnStart(),setTimeout((()=>{R.addClass(this._element,vx),this._setBackdrop(),this._setLoadingIcon(t),this._setLoadingText(e),this._setScrollOption(),$.trigger(this._element,"show.mdb.loading")}),this._options.delay)}dispose(){R.removeClass(this._element,vx);const t=this._options.delay;R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),setTimeout((()=>{this._removeBackdrop(),setTimeout((()=>{super.dispose()}),t)}),t)}_setBackdrop(){const{backdrop:t}=this._options;t&&(this._backdropElement=function({backdropID:t,backdropOpacity:e,backdropColor:i}){const s=g("div");return R.addClass(s,"loading-backdrop"),s.id=t,R.addStyle(s,{opacity:e,backgroundColor:i}),s}(this._options),null!==this._parentElement?(R.addClass(this._element,"position-absolute"),R.addClass(this._parentElement,"position-relative"),R.addClass(this._backdropElement,"position-absolute"),this._parentElement.appendChild(this._backdropElement)):(R.addClass(this._element,"position-fixed"),document.body.appendChild(this._backdropElement),document.body.appendChild(this._element)))}_removeBackdrop(){const{backdrop:t}=this._options;t&&(null!==this._parentElement?(R.removeClass(this._element,"position-absolute"),R.removeClass(this._parentElement,"position-relative"),this._backdropElement.remove()):(this._backdropElement.remove(),this._element.remove()))}_setLoadingIcon(t){this._options.loadingIcon?(this._element.appendChild(t),t.id=this._options.loader):t.remove()}_setLoadingText(t){this._options.loadingText?this._element.appendChild(t):t.remove()}_removeElementsOnStart(){null!==this._element&&(this._loadingIcon.remove(),this._loadingText.remove())}_setScrollOption(){if(this._options.scroll){if(null===this._parentElement)return void(document.body.style.overflow="");R.addStyle(this._parentElement,{overflow:""})}else{if(null===this._parentElement)return void(document.body.style.overflow="hidden");R.addStyle(this._parentElement,{overflow:"hidden"})}}_getConfig(t){const e={...xx,...R.getDataAttributes(this._element),...t};return d(bx,e,yx),e}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,"mdb.loading");if(e||(e=new wx(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}const Cx=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),kx=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,Tx=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ax=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!Cx.has(i)||Boolean(t.nodeValue.match(kx)||t.nodeValue.match(Tx));const s=e.filter((t=>t instanceof RegExp));for(let n=0,o=s.length;n{Ax(e,r)||t.removeAttribute(e.nodeName)}))}return s.body.innerHTML}const Mx="autocomplete-item";function Ox(t=[],e){const i=e.displayValue,s=e.itemContent;return`\n ${t.map(((t,e)=>{const n="function"==typeof s?Ex(s(t),Sx,null):i(t);return`
  • ${n}
  • `})).join("")}\n `}const Dx={autoSelect:!1,container:"body",customContent:"",debounce:300,displayValue:t=>t,filter:null,itemContent:null,listHeight:190,noResults:"No results found",threshold:0},Ix={autoSelect:"boolean",container:"string",customContent:"string",debounce:"number",displayValue:"function",filter:"(null|function)",itemContent:"(null|function)",listHeight:"number",noResults:"string",threshold:"number"},$x="autocomplete",Lx="mdb.autocomplete",Px="active",Nx="focused",Rx="focusing",Bx="open",Hx=".autocomplete-items-list",Wx=".autocomplete-item",zx=`.${Lx}`,Fx=`close${zx}`,Vx=`open${zx}`,jx=`itemSelect${zx}`,Yx=`update${zx}`;class Xx extends to{constructor(t,e){super(t),this._options=this._getConfig(e),this._getContainer(),this._input=B.findOne(".form-control",t),this._label=B.findOne(".form-label",t),this._customContent=B.findOne(".autocomplete-custom-content",t),this._loader=function(){const t=g("div");return R.addClass(t,"autocomplete-loader"),R.addClass(t,"spinner-border"),t.setAttribute("role","status"),t.innerHTML='Loading...',t}(),this._popper=null,this._debounceTimeoutId=null,this._loaderTimeout=null,this._activeItemIndex=-1,this._activeItem=null,this._filteredResults=null,this._lastQueryValue=null,this._canOpenOnFocus=!0,this._isOpen=!1,this._outsideClickHandler=this._handleOutsideClick.bind(this),this._inputFocusHandler=this._handleInputFocus.bind(this),this._userInputHandler=this._handleUserInput.bind(this),this._keydownHandler=this._handleKeydown.bind(this),this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return $x}get filter(){return this._options.filter}get dropdown(){return B.findOne(".autocomplete-dropdown",this._dropdownContainer)}get items(){return B.find(Wx,this._dropdownContainer)}get itemsList(){return B.findOne(Hx,this._dropdownContainer)}search(t){this._filterResults(t)}_getContainer(){this._container=B.findOne(this._options.container)}_getConfig(t){const e=R.getDataAttributes(this._element);return t={...Dx,...e,...t},d($x,t,Ix),t}_init(){this._initDropdown(),this._setInputAndLabelClasses(),this._updateLabelPosition(),this._setInputAriaAttributes(),this._listenToInputFocus(),this._listenToUserInput(),this._listenToKeydown()}_initDropdown(){this._dropdownContainerId=this._element.id?`autocomplete-dropdown-${this._element.id}`:o("autocomplete-dropdown-");const t={id:this._dropdownContainerId,items:[],width:this._input.offsetWidth,options:this._options};if(this._dropdownContainer=function(t){const{id:e,items:i,width:s,options:n}=t,o=g("div");R.addClass(o,"autocomplete-dropdown-container"),R.addStyle(o,{width:`${s}px`}),o.setAttribute("id",e);const a=g("div");R.addClass(a,"autocomplete-dropdown");const r=g("ul"),l=n.listHeight;R.addClass(r,"autocomplete-items-list"),R.addStyle(r,{maxHeight:`${l}px`}),r.setAttribute("role","listbox");const h=Ox(i,n);return r.innerHTML=h,a.appendChild(r),o.appendChild(a),o}(t),""!==this._options.customContent){const t=Ex(this._options.customContent,Sx,null);this.dropdown.insertAdjacentHTML("beforeend",t)}}_setInputAndLabelClasses(){R.addClass(this._input,"autocomplete-input"),this._label&&R.addClass(this._label,"autocomplete-label")}_setInputAriaAttributes(){this._input.setAttribute("role","combobox"),this._input.setAttribute("aria-expanded",!1),this._input.setAttribute("aria-owns",this._dropdownContainerId),this._input.setAttribute("aria-haspopup",!0),this._input.setAttribute("autocomplete","off")}_updateLabelPosition(){this._label&&(""!==this._input.value||this._isOpen?R.addClass(this._label,Px):R.removeClass(this._label,Px))}_listenToInputFocus(){$.on(this._input,"focus",this._inputFocusHandler)}_handleInputFocus(t){const{value:e}=t.target,i=this._options.threshold;this._canOpenOnFocus?e.length{this._filterResults(t)}),e)}_filterResults(t){this._lastQueryValue=t;const e=this.filter(t);this._isPromise(e)?this._asyncUpdateResults(e):this._updateResults(e)}_isPromise(t){return!!t&&"function"==typeof t.then}_asyncUpdateResults(t){this._resetActiveItem(),this._showLoader(),t.then((t=>{this._updateResults(t),this._loaderTimeout=setTimeout((()=>{this._hideLoader(),this._loaderTimeout=null}),300)}))}_resetActiveItem(){const t=this._activeItem;t&&(R.removeClass(t,"active"),this._activeItem=null,this._activeItemIndex=-1)}_showLoader(){this._element.appendChild(this._loader)}_hideLoader(){B.findOne(".autocomplete-loader",this._element)&&this._element.removeChild(this._loader)}_updateResults(t){this._resetActiveItem(),this._filteredResults=t,$.trigger(this._element,Yx,{results:t});const e=B.findOne(".autocomplete-items-list",this._dropdownContainer),i=Ox(t,this._options),s=`
  • ${this._options.noResults}
  • `;0===t.length&&""!==this._options.noResults?e.innerHTML=s:e.innerHTML=i,this._isOpen||this.open(),this._popper&&this._popper.forceUpdate()}_listenToKeydown(){$.on(this._element,"keydown",this._keydownHandler)}_handleKeydown(t){this._isOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t)}_handleOpenKeydown(t){const e=t.keyCode;if(9===e&&this._options.autoSelect&&this._selectActiveItem(),e===q_||e===V_&&t.altKey)return this._input.value||R.addClass(this._input,Rx),this.close(),this._input.focus(),void(this._input.value||setTimeout((()=>{R.removeClass(this._input,Rx)}),10));if(e===q_||e===V_&&t.altKey||9===e)return this.close(),void this._input.focus();switch(e){case Y_:this._setActiveItem(this._activeItemIndex+1),this._scrollToItem(this._activeItem);break;case V_:this._setActiveItem(this._activeItemIndex-1),this._scrollToItem(this._activeItem);break;case X_:if(t.shiftKey){const t=0,e=this._input.selectionStart;this._input.setSelectionRange(t,e)}else this._activeItemIndex>-1?(this._setActiveItem(0),this._scrollToItem(this._activeItem)):this._input.setSelectionRange(0,0);break;case K_:if(t.shiftKey){const t=this._input.selectionStart,e=this._input.value.length;this._input.setSelectionRange(t,e)}else if(this._activeItemIndex>-1)this._setActiveItem(this.items.length-1),this._scrollToItem(this._activeItem);else{const t=this._input.value.length;this._input.setSelectionRange(t,t)}break;case U_:if(t.preventDefault(),this._activeItemIndex>-1){const t=this._filteredResults[this._activeItemIndex];this._handleSelection(t)}return;default:return}t.preventDefault()}_setActiveItem(t){const e=this.items;e[t]&&this._updateActiveItem(e[t],t)}_updateActiveItem(t,e){const i=this._activeItem;i&&R.removeClass(i,"active"),R.addClass(t,"active"),this._activeItemIndex=e,this._activeItem=t}_scrollToItem(t){if(!t)return;const e=this.itemsList,i=e.offsetHeight,s=this.items.indexOf(t),n=t.offsetHeight,o=e.scrollTop;if(s>-1){const t=s*n,a=t+n>o+i,r=t{R.addClass(this.dropdown,Bx),this._isOpen=!0,this._input.setAttribute("aria-expanded",!0),this._setInputActiveStyles(),this._updateLabelPosition()}),0))}_listenToOutsideClick(){$.on(document,"click",this._outsideClickHandler)}_handleOutsideClick(t){const e=this._input===t.target,i=t.target===this._dropdownContainer,s=this._dropdownContainer&&this._dropdownContainer.contains(t.target);e||i||s||this.close()}_listenToItemsClick(){const t=B.findOne(Hx,this._dropdownContainer);$.on(t,"click",this._handleItemsClick.bind(this))}_handleItemsClick(t){const e=B.closest(t.target,Wx),i=R.getDataAttribute(e,"index"),s=this._filteredResults[i];this._handleSelection(s)}_selectActiveItem(){const t=this._filteredResults[this._activeItemIndex];if(!t)return;const e=this._options.displayValue(t);$.trigger(this._element,jx,{value:t}).defaultPrevented||setTimeout((()=>{this._canOpenOnFocus=!1,this._updateInputValue(e),this._updateLabelPosition()}),0)}_handleSelection(t){if(!t)return;const e=this._options.displayValue(t);$.trigger(this._element,jx,{value:t}).defaultPrevented||setTimeout((()=>{this._canOpenOnFocus=!1,this._updateInputValue(e),this._updateLabelPosition(),this._input.focus(),this.close()}),0)}_updateInputValue(t){this._input.value=t}_setInputActiveStyles(){R.addClass(this._input,Nx)}close(){const t=$.trigger(this._element,Fx);this._isOpen&&!t.defaultPrevented&&(this._resetActiveItem(),this._removeDropdownEvents(),R.removeClass(this.dropdown,Bx),$.on(this.dropdown,"transitionend",this._handleDropdownTransitionEnd.bind(this)),R.removeClass(this._input,Nx),R.removeClass(this._input,Px),!this._input.value&&this._label&&R.removeClass(this._label,Px))}_removeDropdownEvents(){const t=B.findOne(Hx,this._dropdownContainer);$.off(t,"click"),$.off(document,"click",this._outsideClickHandler),$.off(window,"resize",this._windowResizeHandler)}_handleDropdownTransitionEnd(t){this._isOpen&&t&&"opacity"===t.propertyName&&(this._popper.destroy(),this._dropdownContainer&&this._container.removeChild(this._dropdownContainer),this._isOpen=!1,this._input.setAttribute("aria-expanded",!1),$.off(this.dropdown,"transitionend"))}dispose(){this._isOpen&&this.close(),this._removeInputAndElementEvents(),this._dropdownContainer.remove(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_removeInputAndElementEvents(){$.off(this._input,"focus",this._inputFocusHandler),$.off(this._input,"input",this._userInputHandler),$.off(this._element,"keydown",this._keydownHandler)}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,Lx);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new Xx(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}b(Xx);const Kx=".bs.modal",Ux=`hide${Kx}`,qx=`hidePrevented${Kx}`,Qx=`hidden${Kx}`,Zx=`show${Kx}`,Gx=`shown${Kx}`,Jx=`resize${Kx}`,tw=`click.dismiss${Kx}`,ew=`mousedown.dismiss${Kx}`,iw=`keydown.dismiss${Kx}`,sw="modal-open",nw="show",ow="modal-static",aw={backdrop:!0,focus:!0,keyboard:!0},rw={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};let lw=class t extends wt{constructor(t,e){super(t,e),this._dialog=jt.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new he,this._addEventListeners()}static get Default(){return aw}static get DefaultType(){return rw}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;ft.trigger(this._element,Zx,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(sw),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;ft.trigger(this._element,Ux).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(nw),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated()))}dispose(){ft.off(window,Kx),ft.off(this._dialog,Kx),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Qt({isVisible:Boolean(this._config.backdrop)&&Boolean(!this._config.modalNonInvasive),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ne({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=jt.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Q(this._element),this._element.classList.add(nw);this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ft.trigger(this._element,Gx,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){ft.on(this._element,iw,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),ft.on(window,Jx,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),ft.on(this._element,ew,(t=>{ft.one(this._element,tw,(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(sw),this._resetAdjustments(),this._scrollBar.reset(),ft.trigger(this._element,Qx)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ft.trigger(this._element,qx).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(ow)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(ow),this._queueCallback((()=>{this._element.classList.remove(ow),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=Z()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=Z()?"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 s=t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===s[e])throw new TypeError(`No method named "${e}"`);s[e](i)}}))}};const hw=(t,e)=>{B.find(t).forEach((t=>{const i=R.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(R.removeDataAttribute(t,e),t.style[e]=i)}))},cw="modal",dw="bs.modal",uw=`.${dw}`,pw="modal-non-invasive-open",_w="modal-non-invasive-show",mw=".modal-content",fw=`show${uw}`,gw=`shown${uw}`,bw=`hidden${uw}`,vw=[{name:"show",parametersToCopy:["relatedTarget"]},{name:"shown",parametersToCopy:["relatedTarget"]},{name:"hide"},{name:"hidePrevented"},{name:"hidden"}],yw={backdrop:!0,keyboard:!0,focus:!0,show:!0,modalNonInvasive:!1},xw={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean",modalNonInvasive:"boolean"};class ww extends lw{constructor(t,e){super(t,e),this._config=this._getConfig(e),this._modalContentRect="",this._modalContentComputedStyles="",this._isNonInvasive=this._config.modalNonInvasive,this._isScrollable="",this._isBottomRight="",this._isBottomLeft="",this._isTopRight="",this._isTopLeft="",this._isSideTopModal="",this._isSideBottomModal="",this._isSideModal="",this._isModalBottom="",this._isNonInvasive&&(this._config.backdrop=!1,this._config.focus=!1,this._isBodyOverflowing=!0,this._onModalShow(),this._onModalShown(),this._onModalHidden(),this._listenToWindowResize()),n.setData(t,dw,this),this._bindMdbEvents(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return cw}dispose(){$.off(this._element,fw),$.off(this._element,gw),$.off(this._element,"hide.bs.modal"),$.off(this._element,bw),$.off(this._element,"hidePrevented.bs.modal"),$.off(window,"resize",this._windowResizeHandler),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_onModalShow(){$.on(this._element,fw,(()=>{this._addNonInvasiveClass()}))}_onModalShown(){$.on(this._element,gw,(()=>{const t=B.findOne(mw,this._element);this._isScrollable=B.findOne(".modal-dialog-scrollable",this._element),this._isBottomRight=B.findOne(".modal-bottom-right",this._element),this._isBottomLeft=B.findOne(".modal-bottom-left",this._element),this._isTopRight=B.findOne(".modal-top-right",this._element),this._isTopLeft=B.findOne(".modal-top-left",this._element),this._isSideTopModal=this._isTopLeft||this._isTopRight,this._isSideBottomModal=this._isBottomLeft||this._isBottomRight,this._isSideModal=this._isSideTopModal||this._isSideBottomModal,this._isModalBottom=B.findOne(".modal-bottom",this._element),this._modalContentRect=t.getBoundingClientRect(),this._modalContentComputedStyles=window.getComputedStyle(t),this._modalDialogComputedStyles=window.getComputedStyle(B.findOne(".modal-dialog",this._element)),this._topOffset=parseInt(this._modalDialogComputedStyles.top,0),this._leftOffset=parseInt(this._modalDialogComputedStyles.left,0),this._rightOffset=parseInt(this._modalDialogComputedStyles.right,0),this._bottomOffset=parseInt(this._modalDialogComputedStyles.bottom,0),this._addOpenClass(),this._setStyles()}))}_listenToWindowResize(){this._windowResizeHandler=this._handleWindowResize.bind(this),$.on(window,"resize",this._windowResizeHandler)}_handleWindowResize(){const t=B.findOne(mw,this._element);if(this._resetStyles(),this._modalContentRect=t.getBoundingClientRect(),this._modalContentComputedStyles=window.getComputedStyle(t),this._isSideTopModal||this._isSideBottomModal){let t=0,e=0;return(this._isBottomRight||this._isBottomLeft)&&(e=-this._bottomOffset),(this._isBottomRight||this._isTopRight)&&(t=-this._rightOffset),(this._isBottomLeft||this._isTopLeft)&&(t=this._leftOffset),void this._setStyles(t,e)}this._setStyles()}_showBackdrop(t){this._isNonInvasive?"function"==typeof t&&t():super._showBackdrop(t)}_adjustDialog(){super._adjustDialog();const t=document.body.classList.contains(pw);(this._isNonInvasive||t)&&(this._isBodyOverflowing=!1),this._isNonInvasive&&(this._resetAdjustments(),hw("body","overflow"),hw("body","paddingRight"),hw(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),hw(".sticky-top","marginRight"))}_onModalHidden(){$.on(this._element,bw,(t=>{t.stopImmediatePropagation(),this._removeOpenClass(),this._resetStyles(),this._removeNonInvasiveClass()}))}_addOpenClass(){this._element.classList.add(_w)}_removeOpenClass(){this._element.classList.remove(_w)}_addNonInvasiveClass(){document.body.classList.add(pw)}_removeNonInvasiveClass(){B.findOne(`.modal.show.${_w}`,document.body)?document.body.classList.add("modal-open"):document.body.classList.remove(pw)}_setStyles(t=0,e=0){const i=window.innerWidth>=992;this._element.style.left=`${this._modalContentRect.left+t}px`,this._element.style.width=this._modalContentComputedStyles.width,this._isScrollable||(this._element.style.height=this._modalContentComputedStyles.height,this._element.style.display=""),i&&((this._isSideBottomModal||this._isModalBottom)&&(this._element.style.top=`${this._modalContentRect.top+e}px`),this._isSideModal&&(this._element.style.overflowX="auto")),i||(this._element.style.height="")}_resetStyles(){this._element.style.left="",this._element.style.top="",this._element.style.height="",this._element.style.width="",this._isScrollable||(this._element.style.display=""),this._isSideModal&&(this._element.style.overflowX="")}_getConfig(t){let e;this._element&&(e=l(this._element));const i={...yw,...R.getDataAttributes(this._element),...R.getDataAttributes(e),...t};return d(cw,i,xw),i}_bindMdbEvents(){$.extend(this._element,vw,cw)}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,dw);const s={...yw,...R.getDataAttributes(this),..."object"==typeof t&&t?t:{}};if(i||(i=new ww(this,s)),"string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}else s.show&&i.show(e)}))}}const Cw="clipboard",kw="mdb.clipboard",Tw={clipboardTarget:null},Aw={clipboardTarget:"null|string"},Sw=`copied${`.${kw}`}`;class Ew extends to{constructor(t,e={}){super(t),this._options=e,this._element&&(this._initCopyHandler=this._initCopy.bind(this),this._setup(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor))}static get NAME(){return Cw}get options(){const t={...Tw,...R.getDataAttributes(this._element),...this._options};return d(Cw,t,Aw),t}get clipboardTarget(){return B.findOne(this.options.clipboardTarget)}get copyText(){const t=this.clipboardTarget.hasAttribute("data-mdb-clipboard-text"),e=this.clipboardTarget.value,i=this.clipboardTarget.textContent;return t?this.clipboardTarget.getAttribute("data-mdb-clipboard-text"):e||i}dispose(){$.off(this._element,"click",this._initCopyHandler),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_setup(){$.on(this._element,"click",this._initCopyHandler)}_initCopy(){const t=this._createNewInput();document.body.appendChild(t),this._selectInput(t),$.trigger(this._element,Sw,{copyText:this.copyText}),t.remove()}_createNewInput(){const t="TEXTAREA"===this.clipboardTarget.tagName?"textarea":"input",e=g(t);return e.value=this.copyText,R.style(e,{left:"-9999px",position:"absolute"}),e}_selectInput(t){t.select(),t.focus(),t.setSelectionRange(0,99999),document.execCommand("copy")}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,kw);if(e||(e=new Ew(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}const Mw="chip",Ow=`mdb.${Mw}`,Dw=".close",Iw={text:"string",closeIcon:"boolean",img:"object"},$w={text:"",closeIcon:!1,img:{path:"",alt:""}};class Lw extends to{constructor(t,e={}){super(t,e),this._options=this._getConfig(e),this._element&&n.setData(t,Ow,this),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return Mw}init(){this._appendCloseIcon(),this._handleDelete(),this._handleTextChip(),this._handleClickOnChip()}dispose(){$.off(this._element,"click"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}appendChip(){const{text:t,closeIcon:e}=this._options,i=(({text:t})=>`
    ${t}
    `)({text:t,closeIcon:e});return i}_appendCloseIcon(t=this._element){if(!(B.find(Dw,this._element).length>0)&&this._options.closeIcon){const e=g("i");e.classList="close fas fa-times",t.insertAdjacentElement("beforeend",e)}}_handleClickOnChip(){$.on(this._element,"click",(t=>{const{textContent:e}=t.target,i={};i.tag=e.trim(),$.trigger("select.mdb.chip",{event:t,obj:i})}))}_handleDelete(){0!==B.find(Dw,this._element).length&&$.on(this._element,"click",Dw,(()=>{$.trigger(this._element,"delete.mdb.chips"),this._element.remove()}))}_handleTextChip(){""===this._element.innerText&&(this._element.innerText=this._options.text)}_getConfig(t){const e={...$w,...R.getDataAttributes(this._element),...t};return d(Mw,e,Iw),e}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,Ow);const i="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new Lw(this,i)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}const Pw="chips",Nw=`mdb.${Pw}`,Rw="active",Bw=`${Pw}-initial`,Hw=`${Pw}-placeholder`,Ww="chip-opacity",zw=`${Pw}-padding`,Fw=`${Pw}-transition`,Vw=`${Pw}-input-wrapper`,jw=".chip",Yw=`${jw}.${Rw}`,Xw="delete.mdb.chips",Kw="select.mdb.chips",Uw={inputID:"string",parentSelector:"string",initialValues:"array",editable:"boolean",labelText:"string"},qw={inputID:"",parentSelector:"",initialValues:[{tag:"init1"},{tag:"init2"}],editable:!1,labelText:"Example label"};class Qw extends Lw{constructor(t,e={}){super(t,e),this._options=this._getConfig(e),this.numberClicks=0,this._inputInstance=null,this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return Pw}get activeChip(){return B.findOne(Yw,this._element)}get input(){return B.findOne("input",this._element)}get allChips(){return B.find(jw,this._element)}get chipsInputWrapper(){return B.findOne(`.${Vw}`,this._element)}init(){this._setChipsClass(),this._appendInputToElement(Hw),this._handleInitialValue(),this._initializeInput(),this._handleInputText(),this._handleKeyboard(),this._handleChipsOnSelect(),this._handleEditable(),this._handleChipsFocus(),this._handleClicksOnChips()}dispose(){R.removeClass(this._element,"chips"),this.allChips.forEach((t=>{const e=Lw.getInstance(t);e&&(t.remove(),$.off(t,"dblclick"),e.dispose())})),this._inputInstance&&this._inputInstance.dispose(),this.chipsInputWrapper.remove(),$.off(this._element,"click"),$.off(this._element,"keypress"),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_initializeInput(){const t=this._element.querySelector(".form-outline");this._inputInstance=new lo(t).init()}_setChipsClass(){R.addClass(this._element,"chips")}_handleDeleteEvents(t){const[e]=this.allChips.slice(-1);if(null===this.activeChip)e.remove(),this._handleEvents(t,Xw);else{const e=this.allChips.findIndex((t=>t===this.activeChip)),i=this._handleActiveChipAfterRemove(e),s=[];if(null===this.activeChip)return;this.activeChip.remove(),this._handleEvents(t,Xw),this.numberClicks=e,R.addClass(i,Rw),this.allChips.forEach((t=>{R.hasClass(t,Rw)&&(s.push(t),s.length>1&&this.allChips.forEach((t=>t.remove())))}))}}_handleUpEvents(t){this.numberClicks+=1,this.numberClicks===this.allChips.length+1&&(this.numberClicks=0),this._handleRightKeyboardArrow(this.numberClicks),this._handleEvents(t,"arrowRight.mdb.chips"),this._handleEvents(t,"arrowUp.mdb.chips")}_handleDownEvents(t){this.numberClicks-=1,this.numberClicks<=0&&(this.numberClicks=this.allChips.length),this._handleLeftKeyboardArrow(this.numberClicks),this._handleEvents(t,"arrowLeft.mdb.chips"),this._handleEvents(t,"arrowDown.mdb.chips")}_keyboardEvents(t){const{target:e,keyCode:i,ctrlKey:s}=t;e.value.length>0||0===this.allChips.length||(8===i||46===i?this._handleDeleteEvents(t):i===j_||i===V_?this._handleUpEvents(t):i===F_||i===Y_?this._handleDownEvents(t):65===i&&s&&this._handleAddActiveClass())}_handleKeyboard(){$.on(this.input,"keydown",(t=>this._keyboardEvents(t)))}_handleEditable(){const{editable:t}=this._options;t&&this.allChips.forEach((t=>{$.on(t,"dblclick",(e=>{const i=B.findOne(".close",t);t.contentEditable=!0,t.focus(),setTimeout((()=>{R.addStyle(i,{display:"none"})}),200),R.addClass(i,"close-opacity"),e.target.textContent,$.trigger(t,Kw,{event:e,allChips:this.allChips})})),$.on(document,"click",(({target:e})=>{const i=B.findOne(".close",t),s=B.findOne(".text-chip",t),n=e===t,o=t&&t.contains(e);n||o||(t.contentEditable=!1,""!==s.textContent&&setTimeout((()=>{R.addStyle(i,{display:"block"}),R.removeClass(i,"close-opacity")}),160)),""===s.textContent&&(setTimeout((()=>{R.addClass(t,Ww)}),200),setTimeout((()=>{t.remove()}),300))}))}))}_handleRemoveActiveClass(){this.allChips.forEach((t=>R.removeClass(t,Rw)))}_handleAddActiveClass(){this.allChips.forEach((t=>R.addClass(t,Rw)))}_handleRightKeyboardArrow(t){this._handleRemoveActiveClass(),0===t&&(t=1),this._handleAddActiveClassWithKeyboard(t)}_handleLeftKeyboardArrow(t){this._handleRemoveActiveClass(),this._handleAddActiveClassWithKeyboard(t)}_handleActiveChipAfterRemove(t){const e=0===t?1:t-1;return this.allChips[e]}_handleClicksOnChips(){$.on(this._element,"click",(()=>{0===this.allChips.length&&(R.removeClass(this.chipsInputWrapper,zw),R.removeClass(this.input,Rw))}))}_handleTextContent(){const t=[];return this.allChips.forEach((e=>t.push({tag:e.textContent.trim()}))),t}_handleEvents(t,e){const i=this._handleTextContent(),s=this.allChips.filter((t=>R.hasClass(t,Rw)&&t));$.trigger(this._element,e,{event:t,allChips:this.allChips,arrOfObjects:i,active:s,activeObj:{tag:s.length<=0?"":s[0].textContent.trim()}})}_handleChipsFocus(){$.on(this._element,"click",(({target:{classList:t}})=>{t.contains("chip")||t.contains("close")||t.contains("text-chip")||this.input.focus()}))}_handleInitialValue(){if(this._appendInputToElement(Bw),R.hasClass(this._element,Bw)){const{initialValues:t}=this._options;t.forEach((({tag:t})=>this._handleCreateChip(this.input,t))),R.addClass(this.input,Rw)}this.allChips.length>0&&(R.addClass(this.chipsInputWrapper,zw),R.addClass(this.chipsInputWrapper,Fw))}_handleKeysInputToElement(t){const{keyCode:e,target:i}=t;if(R.hasClass(i,"chip")){const t=B.findOne(".close",i);e===U_&&(i.contentEditable=!1,""!==i.textContent?setTimeout((()=>{R.addStyle(t,{display:"block"}),R.removeClass(t,"close-opacity")}),160):""===i.textContent&&(setTimeout((()=>{R.addClass(i,Ww)}),200),setTimeout((()=>{i.remove()}),300)))}else{if(e===U_){if(""===i.value)return;t.preventDefault(),this._handleCreateChip(i,i.value),this._handleRemoveActiveClass(),this.numberClicks=this.allChips.length+1}this.allChips.length>0?(R.addClass(this.chipsInputWrapper,zw),R.addClass(this.chipsInputWrapper,Fw)):R.removeClass(this.chipsInputWrapper,zw)}}_handleBlurInput(t){const{target:e}=t;e.value.length>0&&this._handleCreateChip(e,e.value),this.allChips.length>0?(R.addClass(e,Rw),R.addClass(this.chipsInputWrapper,zw)):(R.removeClass(e,Rw),R.removeClass(this.chipsInputWrapper,zw)),this.allChips.forEach((t=>R.removeClass(t,Rw)))}_handleInputText(){const t=B.findOne(Hw,this._element);$.on(this._element,"keypress",t,(t=>this._handleKeysInputToElement(t))),$.on(this.input,"blur",(t=>this._handleBlurInput(t)))}_appendInputToElement(t){if(!R.hasClass(this._element,t))return;const e=(({inputID:t,labelText:e})=>`
    \n \n \n
    `)(this._options);this._element.insertAdjacentHTML("beforeend",e)}_handleCreateChip(t,e){if($.trigger(this._element,"add.mdb.chips",{value:e}).defaultPrevented)return;const i=g("div"),s=new Lw(i,{text:e});let n;if(""!==this._options.parentSelector){const t=document.querySelector(this._options.parentSelector);t.insertAdjacentHTML("beforeend",s.appendChip()),n=t}else t.insertAdjacentHTML("beforebegin",s.appendChip()),n=t.parentNode;t.value="",B.find(jw,n).forEach((t=>{let e=Lw.getInstance(t);e||(e=new Lw(t),e.init())})),this._handleEditable(),$.trigger(this._element,"added.mdb.chips",{value:e})}_handleChipsOnSelect(){this.allChips.forEach((t=>{$.on(this._element,"click",(e=>{$.trigger(t,Kw,{event:e,allChips:this.allChips})}))}))}_handleAddActiveClassWithKeyboard(t){let e;e=void 0===this.allChips[t-1]?this.allChips[t-2]:this.allChips[t-1],R.addClass(e,Rw)}_getConfig(t){const e={...qw,...R.getDataAttributes(this._element),...t};return d(Pw,e,Uw),e}static jQueryInterface(t){return this.each((function(){let e=n.getData(this,Nw);const i="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new Qw(this,i)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}const Zw=t=>"touchmove"===t.type?t.touches[0].clientX:t.clientX,Gw="multiRangeSlider",Jw=`mdb.${Gw}`,tC=`.${Jw}`,eC=`valueChanged${tC}`,iC=`start${tC}`,sC=".multi-range-slider-hand",nC="active",oC={direction:"string",margin:"(string||number||null)",max:"number",min:"number",numberOfRanges:"number",orientation:"string",padding:"(string||number||null)",startValues:"array",step:"(string||null||number)",tooltips:"boolean"},aC={direction:"",margin:null,max:100,min:0,numberOfRanges:2,orientation:"horizontal",padding:null,startValues:[0,100],step:null,tooltips:!1};class rC extends to{constructor(t,e={}){super(t),this._options=this._getConfig(e),this._mousemove=!1,this.init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return Gw}get hands(){return B.find(sC,this._element)}get connect(){return B.findOne(".multi-range-slider-connect",this._element)}get leftConnectRect(){return this.connect.getBoundingClientRect().left}get handsNoActive(){return this.hands.filter((t=>!R.hasClass(t,"active")))}get handActive(){return B.findOne(`${sC}.active`)}get activeTooltip(){return B.findOne(".multi-range-slider-tooltip")}get activeTooltipValue(){return B.findOne(`${sC}.active`).children[1].children[0]}init(){this._setClassHorizontalOrVertical(),this._setRangeConnectsElement(),this._setRangeHandleElements(),this._setTransofrmationOnStart(),this._handleClickEventOnHand(),this._handleEndMoveEventDocument(),this._handleClickOnRange(),this._setTooltipToHand()}dispose(){R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}_setTransofrmationOnStart(){const{startValues:t,max:e,min:i}=this._options;0===t.length?this.hands.forEach((t=>{const e=-t.offsetWidth;R.setDataAttribute(t,"translation",Math.round(e)),R.addStyle(t,{transform:`translate(${e}px,-25%)`})})):this.hands.forEach(((s,n)=>{if(t[n]>e||t[n]{L.on(i,"mousedown touchstart",(n=>{this._mousemove=!0;const o=Zw(n)-this.leftConnectRect-i.offsetWidth/2,a=(Zw(n)-this.leftConnectRect)/(this.connect.offsetWidth/(t-e))%(t-e);R.addStyle(i,{transform:`translate(${o}px,-25%)`}),R.setDataAttribute(i,"translation",o),R.addClass(i,nC),this._options.tooltip&&(R.addClass(i.children[1],"active"),this.activeTooltipValue.innerText=Math.round(a)),this._handleMoveEvent(i,s),this._handleEndMoveEvent(i,n),$.trigger(i,iC,{hand:i})}))}))}_setClassHorizontalOrVertical(){this._element&&R.addClass(this._element,"multi-range-slider"),"horizontal"===this._options.orientation&&R.addClass(this._element,"multi-range-slider-horizontal")}_setRangeConnectsElement(){this._element.insertAdjacentHTML("afterbegin",'
    \n
    \n
    ')}_setRangeHandleElements(){for(let t=0;t\n
    \n');this.hands.forEach(((t,e)=>{t.setAttribute("aria-orientation",this._options.orientation),t.setAttribute("role","slider"),R.setDataAttribute(t,"handle",e)}))}_setTooltipToHand(){this._options.tooltip&&this.hands.forEach((t=>{return t.insertAdjacentHTML("beforeend",`\n \n ${e}\n \n `);var e}))}_handleMoveEvent(t){const{tooltip:e,step:i}=this._options;L.on(document,"mousemove touchmove",(s=>{"mousemove"===s.type&&s.preventDefault();const{max:n,min:o,numberOfRanges:a}=this._options;if(R.hasClass(t,nC)){const r=(Zw(s)-this.leftConnectRect)/this.connect.offsetWidth*n;let l=(Zw(s)-this.leftConnectRect)/(this.connect.offsetWidth/(n-o))%(n-o)+o,h=Zw(s)-this.leftConnectRect-t.offsetWidth/2;const c=R.getDataAttribute(this.handActive,"handle"),d=R.getDataAttribute(this.handActive,"translation");if(l=n)return;const u=this.handsNoActive.map((t=>R.getDataAttribute(t,"handle"))),p=this.handsNoActive.map((t=>R.getDataAttribute(t,"translation")));cu&&d>=p&&(Math.round(l)%i==0&&null!==i||null===i)&&(R.addStyle(t,{transform:`translate(${h}px,-25%)`}),e&&(this.activeTooltipValue.innerText=Math.round(l))),a<2&&(Math.round(l)%i==0&&null!==i||null===i)&&(R.addStyle(t,{transform:`translate(${h}px,-25%)`}),e&&(this.activeTooltipValue.innerText=Math.round(l))),R.setDataAttribute(t,"translation",h),a<2?$.trigger(this._element,eC,{values:{value:l+o,rounded:Math.round(l+o)}}):this._handleMultiValuesOnRange()}}))}_handleMultiValuesOnRange(){const{max:t,min:e}=this._options,i=[];this.hands.forEach((s=>{const n=s.getBoundingClientRect().left-this.leftConnectRect+s.offsetWidth/2;let o=n/(this.connect.offsetWidth/(t-e))%(t-e);n===this.connect.offsetWidth?o=t:o+=e,R.setDataAttribute(s,"value",Math.round(10*o)/10),i.push({value:o})})),$.trigger(this._element,eC,{values:{value:i.map((({value:t})=>t)),rounded:i.map((({value:t})=>Math.round(t)))}})}_handleEndMoveEventDocument(){L.on(document,"mouseup touchend",(()=>{this._mousemove&&(this.hands.forEach((t=>{$.off(t,"mousemove"),R.removeClass(t,nC),this._options.tooltip&&R.removeClass(t.children[1],"active")})),this._mousemove=!1)}))}_handleEndMoveEvent(t){L.on(t,"mouseup touchend",(()=>{$.off(t,"mousemove"),R.removeClass(t,nC),this._options.tooltip&&R.removeClass(t.children[1],"active"),this._mousemove=!1}))}_handleClickOnRange(){L.on(this.connect,"mousedown touchstart",(t=>{this.hands.forEach((e=>{R.addClass(e,nC),this._mousemove=!0,this._options.numberOfRanges<2?R.addStyle(e,{transform:`translate(${Zw(t)-this.leftConnectRect-e.offsetWidth/2}px,-25%)`}):R.addStyle(this.hands[0],{transform:`translate(${Zw(t)-this.leftConnectRect-e.offsetWidth/2}px,-25%)`})}))}))}_handlePadding(){L.on(this.connect,"mousedown touchstart",(t=>{const{padding:e,numberOfRanges:i}=this._options;let s;return i<2&&(s=Math.round((Zw(t)-this.leftConnectRect)/(t.target.offsetWidth/e))%e),s}))}_setMovingTooltipEvent(){L.on(this.connect,"mousemove",(t=>{const e=(Zw(t)-this.leftConnectRect)/t.target.offsetWidth,i=`${Math.round(100*e)}%`;$.trigger(this._element,"movetooltip",{percents:{value:e,percent:i}})}))}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,Jw);const s="object"==typeof t&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new rC(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}_getConfig(t){const e={...aC,...R.getDataAttributes(this._element),...t};return d(Gw,e,oC),e}}const lC=(t,e)=>e.findIndex((e=>e===t)),hC="datetimepicker",cC=`mdb.${hC}`,dC="datepicker",uC="timepicker",pC="invalid-feedback",_C="is-invalid",mC=`.${uC}`,fC=`.${dC}`,gC=`[data-mdb-toggle="${hC}"]`,bC=`.${`${hC}-toggle-button`}`,vC=`.${pC}`,yC=`.${cC}`,xC=`open${yC}`,wC=`close${yC}`,CC=`valueChanged${yC}`,kC="close.mdb.datepicker",TC="valueChanged.mdb.timepicker",AC=g("div"),SC={appendValidationInfo:!0,inline:!1,toggleButton:!0,container:"body",disabled:!1,disablePast:!1,disableFuture:!1,defaultTime:"",defaultDate:"",timepicker:{},datepicker:{},invalidLabel:"Invalid Date or Time Format",showFormat:!1},EC={appendValidationInfo:"boolean",inline:"boolean",toggleButton:"boolean",container:"string",disabled:"boolean",disablePast:"boolean",disableFuture:"boolean",defaultTime:"(string|date|number)",defaultDate:"(string|date|number)",timepicker:"object",datepicker:"object",invalidLabel:"string",showFormat:"boolean"};class MC extends to{constructor(t,e){super(t),this._input=B.findOne("input",this._element),this._options=this._getConfig(e),this._timepicker=null,this._datepicker=null,this._dateValue=this._options.defaultDate?this._options.defaultDate:"",this._timeValue=this._options.defaultTime?this._options.defaultTime:"",this._isInvalidTimeFormat=!1,this._validationInfo=null,this._format=this._options.datepicker.format?this._options.datepicker.format:"dd/mm/yyyy",this._cancel=!1,this._scrollBar=new he,this._init(),R.setDataAttribute(this._element,`${this.constructor.NAME}-initialized`,!0),At(this.constructor)}static get NAME(){return hC}get toggleButton(){return B.findOne(bC,this._element)}dispose(){$.off(this._element,"click",this._openDatePicker),$.off(this._input,"input",this._handleInput),$.off(this._element,"click"),this._removeTimePicker(),this._removeDatepicker();this.toggleButton&&this.toggleButton.remove(),R.removeDataAttribute(this._element,`${this.constructor.NAME}-initialized`),super.dispose()}update(t={}){const e=this._getConfig({...this._options,...t});$.off(this._element,"click",this._openDatePicker),$.off(this._input,"input",this._handleInput),$.off(this._element,"click"),this._removeTimePicker(),this._removeDatepicker();this.toggleButton&&this.toggleButton.remove(),this._options=SC,this._timepicker=null,this._datepicker=null,this._dateValue=null,this._timeValue=null,this._isInvalidTimeFormat=null,this._validationInfo=null,this._options=e,this._init()}_init(){this._addDatepicker(),this._addTimePicker(),this._appendToggleButton(),this._listenToToggleClick(),this._listenToUserInput(),this._disableInput(),this._setInitialDefaultInput(),this._appendValidationInfo(),this._applyFormatPlaceholder(),this._options.disablePast&&this._handleTimepickerDisablePast(),this._options.disableFuture&&this._handleTimepickerDisableFuture(),this._input.value&&this._handleInput(this._input.value)}_removeDatepicker(){const t=this._element.querySelector(".datepicker");t&&t.remove()}_addDatepicker(){const t=g("div");t.id=this._element.id?`datepicker-${this._element.id}`:o("datepicker-");t.innerHTML='',R.addClass(t,dC),this._element.appendChild(t),R.style(t,{display:"none"});let e={...this._options.datepicker,container:this._options.container,disablePast:this._options.disablePast,disableFuture:this._options.disableFuture};(this._options.inline||this._options.datepicker.inline)&&(e={...e,inline:!0}),this._datepicker=new ib(t,e),this._datepicker._input.value=this._dateValue}_removeTimePicker(){const t=this._element.querySelector(".timepicker");t&&(t.remove(),this._scrollBar.reset())}_addTimePicker(){const t=g("div");t.id=this._element.id?`timepicker-${this._element.id}`:o("timepicker-");t.innerHTML='',R.addClass(t,uC),this._element.appendChild(t),R.style(t,{display:"none"});let e={...this._options.timepicker,container:this._options.container};(this._options.inline||this._options.timepicker.inline)&&(e={...e,inline:!0}),this._timepicker=new tg(t,e),this._timepicker.input.value=this._timeValue}_addIconButtons(){if(R.addClass(AC,"buttons-container"),AC.innerHTML='\n \n \n',!this._options.inline&&!this._options.datepicker.inline)if(this._scrollBar.hide(),this._datepicker._isOpen){B.findOne(`${fC}-header`,document.body).appendChild(AC)}else if(this._timepicker._modal&&!this._options.timepicker.inline){const t=B.findOne(`${mC}-elements`,document.body),e=B.findOne(`${mC}-clock-wrapper`,document.body);t.insertBefore(AC,e)}}_enableOrDisableToggleButton(){this._options.disabled?(this.toggleButton.disabled=!0,this.toggleButton.style.pointerEvents="none"):(this.toggleButton.disabled=!1,this.toggleButton.style.pointerEvents="pointer")}_appendToggleButton(){this._options.toggleButton&&(this._element.insertAdjacentHTML("beforeend",'\n \n'),this._enableOrDisableToggleButton())}_appendValidationInfo(){const{invalidLabel:t,appendValidationInfo:e}=this._options;e&&(this._validationInfo=g("div"),R.addClass(this._validationInfo,pC),this._validationInfo.innerHTML=t,R.addStyle(this._input,{marginBottom:0}),R.addStyle(this._validationInfo,{bottom:"-23px"}))}_applyFormatPlaceholder(){this._options.showFormat&&(this._input.placeholder=this._format)}_listenToCancelClick(){const t=B.findOne(`${fC}-cancel-btn`,document.body);$.one(t,"mousedown",(()=>{this._cancel=!0,this._scrollBar.reset(),$.off(t,"mousedown")}))}_listenToToggleClick(){$.on(this._element,"click",gC,(t=>{t.preventDefault(),this._openDatePicker()}))}_listenToUserInput(){$.on(this._input,"input",(t=>{this._handleInput(t.target.value)}))}_disableInput(){this._options.disabled&&(this._input.disabled="true")}_getConfig(t){const e=R.getDataAttributes(this._element);return t={...SC,...e,...t},d(hC,t,EC),t}_handleInput(t){const e=t.split(", "),i=this._format.match(/[^(dmy)]{1,}/g);const s=e[0],n=e[1]||"",o=((t,e,i,s)=>{let n;n=i[0]!==i[1]?i[0]+i[1]:i[0];const o=new RegExp(`[${n}]`),a=t.split(o),r=e.split(o),l=-1!==e.indexOf("mmm"),h=[];for(let d=0;dt&&"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t))(o)&&((a=n).match(/^(0?[1-9]|1[012])(:[0-5]\d) [APap][mM]$/)||a.match(/^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?$/));t?(this._dateValue=s,this._timeValue=n,this._removeInvalidClass(this._input),this._datepicker._input.value=this._dateValue,this._datepicker._activeDate=this._dateValue,this._datepicker._selectedYear=(t=>t.getFullYear())(o),this._datepicker._selectedMonth=(t=>t.getMonth())(o),this._datepicker._headerDate=o,this._timepicker.input.value=this._timeValue,this._timepicker._isInvalidTimeFormat=!1):(this._datepicker._activeDate=new Date,this._datepicker._selectedDate=null,this._datepicker._selectedMonth=null,this._datepicker._selectedYear=null,this._datepicker._headerDate=null,this._datepicker._headerMonth=null,this._datepicker._headerYear=null,this._timepicker._isInvalidTimeFormat=!0,this._addInvalidClass(this._input,this._validationInfo))}else this._addInvalidClass(this._input,this._validationInfo);else this._removeInvalidClass(this._input);var a}_addInvalidClass(){const{appendValidationInfo:t}=this._options;t&&(R.addClass(this._input,_C),B.findOne(vC)||this._input.parentNode.insertBefore(this._validationInfo,this._input.nextSibling))}_removeInvalidClass(t){R.removeClass(t,_C),this._isInvalidTimeFormat=!1;const e=B.findOne(vC);null!==e&&e.remove()}_openDatePicker(){if($.trigger(this._element,xC).defaultPrevented)return;this._datepicker.open(),this._options.inline||this._scrollBar.hide(),(this._options.inline||this._options.datepicker.inline)&&this._openDropdownDate(),this._addIconButtons(),this._listenToCancelClick(),this._options.inline&&this._datepicker._isOpen&&(this.toggleButton.style.pointerEvents="none"),$.one(this._datepicker._element,kC,(()=>{this._dateValue=this._datepicker._input.value,this._updateInputValue(),this._cancel?this._cancel=!1:($.on(this._datepicker.container,"click",(t=>{!this._datepicker._selectedDate&&t.target.classList.contains("datepicker-ok-btn")||this._openTimePicker()})),setTimeout((()=>{B.findOne(`${mC}-wrapper`,document.body)||this._scrollBar.reset()}),10),this._options.inline&&(this.toggleButton.style.pointerEvents="auto"))}));const t=B.findOne(`${mC}-button-toggle`,document.body);$.on(t,"click",(()=>{this._datepicker._confirmSelection(this._datepicker._headerDate),this._datepicker.close(),this._scrollBar.hide(),$.trigger(this._datepicker._element,kC)}))}_handleTimepickerDisablePast(){const t=new Date;t.setHours(0,0,0,0),$.on(this._datepicker._element,"dateChange.mdb.datepicker",(()=>{this._datepicker._selectedDate.getTime()===t.getTime()?this._timepicker.update({disablePast:!0}):this._timepicker.update({disablePast:!1})}))}_handleTimepickerDisableFuture(){const t=new Date;t.setHours(0,0,0,0),$.on(this._datepicker._element,"dateChange.mdb.datepicker",(()=>{this._datepicker._selectedDate.getTime()===t.getTime()?this._timepicker.update({disableFuture:!0}):this._timepicker.update({disableFuture:!1})}))}_handleEscapeKey(){$.one(document.body,"keyup",(()=>{setTimeout((()=>{B.findOne(`${mC}-wrapper`,document.body)||this._scrollBar.reset()}),250)}))}_handleCancelButton(){const t=B.findOne(`${mC}-cancel`,document.body);$.one(t,"mousedown",(()=>{this._scrollBar.reset()}))}_openDropdownDate(){this._datepicker._popper.state.elements.reference=this._input,this._scrollBar.reset()}_openTimePicker(){$.trigger(this._timepicker.elementToggle,"click"),setTimeout((()=>{if(this._addIconButtons(),(this._options.inline||this._options.timepicker.inline)&&this._openDropdownTime(),this._timepicker._modal){const t=B.findOne(`${mC}-cancel`,document.body);this._handleEscapeKey(),this._handleCancelButton(),$.on(this._timepicker._modal,"click",(e=>{(e.target.classList.contains(`${uC}-wrapper`)||e.target.classList.contains(`${uC}-submit`))&&setTimeout((()=>{this._scrollBar.reset()}),200),e.target.classList.contains(`${uC}-clear`)&&$.trigger(this._timepicker._element,TC),e.target.classList.contains(`${dC}-button-toggle`)&&($.trigger(t,"click"),setTimeout((()=>{this._openDatePicker(),this._scrollBar.hide()}),200))}))}})),$.one(this._timepicker._element,TC,(()=>{this._timeValue=this._timepicker.input.value,this._updateInputValue(),$.trigger(this._element,wC)}))}_openDropdownTime(){const t=this._timepicker._popper;t.state.elements.reference=this._input,t.update(),this._scrollBar.reset()}_setInitialDefaultInput(){(this._options.defaultDate||this._options.defaultTime)&&this._updateInputValue()}_updateInputValue(){if(this._timeValue&&this._dateValue){this._input.value=`${this._dateValue}, ${this._timeValue}`,this._removeInvalidClass(this._input);if($.trigger(this._element,CC,{value:this._input.value}).defaultPrevented)return}$.trigger(this._input,"focus")}static jQueryInterface(t,e){return this.each((function(){let i=n.getData(this,cC);const s="object"==typeof t&&t;if((i||!/dispose/.test(t))&&(i||(i=new MC(this,s)),"string"==typeof t)){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}const OC=new Map,DC=(t,e)=>{const i=t;OC.has(t.name)||($.one(document,"mousedown",e,i.autoInitial(new i)),OC.set(t.name,!0))},IC=new Map,$C={...{alert:{name:"Alert",selector:"[data-mdb-alert-init]",isToggler:!0,callback:(t,e)=>{const i=t;OC.has(t.name)||(Zt(i),OC.set(t.name,!0)),B.find(e).forEach((t=>i.getOrCreateInstance(t)))}},button:{name:"Button",selector:"[data-mdb-button-init]",isToggler:!0,callback:(t,e)=>{const i=t,s=`click.bs.${t.name}.data-api`;OC.has(t.name)||($.on(document,s,e,(t=>{t.preventDefault();const s=t.target.closest(e);i.getOrCreateInstance(s).toggle()})),OC.set(t.name,!0)),B.find(e).forEach((t=>i.getOrCreateInstance(t)))}},carousel:{name:"Carousel",selector:"[data-mdb-carousel-init]",isToggler:!0,callback:(t,e)=>{if(OC.has(t.name))return;const i=`click.bs.${t.name}.data-api`,s=t,n=`load.bs.${t.name}.data-api`,o=e;$.on(document,i,"[data-mdb-slide], [data-mdb-slide-to]",(function(t){const e=l(this);if(!e||!e.classList.contains("carousel"))return;t.preventDefault();const i=s.getOrCreateInstance(e),n=this.getAttribute("data-mdb-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===R.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),$.on(window,n,(()=>{B.find(o).forEach((t=>{s.getOrCreateInstance(t)}))})),OC.set(t.name,!0)}},collapse:{name:"Collapse",selector:"[data-mdb-collapse-init]",isToggler:!0,callback:(t,e)=>{const i=`click.bs.${t.name}.data-api`,s=e,n=t;OC.has(t.name)||($.on(document,i,s,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this);B.find(e).forEach((t=>{n.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),OC.set(t.name,!0)),B.find(s).forEach((t=>{const e=r(t);B.find(e).forEach((t=>{n.getOrCreateInstance(t,{toggle:!1})}))}))}},dropdown:{name:"Dropdown",selector:"[data-mdb-dropdown-init]",isToggler:!0,callback:(t,e)=>{const i=`click.bs.${t.name}.data-api`,s=`keydown.bs.${t.name}.data-api`,n=`keyup.bs.${t.name}.data-api`,o=`[data-mdb-${t.NAME}-initialized]`,a=t;OC.has(t.name)||($.on(document,s,o,a.dataApiKeydownHandler),$.on(document,s,".dropdown-menu",a.dataApiKeydownHandler),$.on(document,i,a.clearMenus),$.on(document,n,a.clearMenus),$.on(document,i,o,(function(t){t.preventDefault(),a.getOrCreateInstance(this).toggle()}))),OC.set(t.name,!0),B.find(e).forEach((t=>{a.getOrCreateInstance(t)}))}},modal:{name:"Modal",selector:"[data-mdb-modal-init]",isToggler:!0,callback:(t,e)=>{const i=`click.bs.${t.name}.data-api`,s=t,n=`show.bs.${t.name}`,o=`hidden.bs.${t.name}`;OC.has(t.name)||($.on(document,i,e,(function(t){const e=l(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,n,(t=>{t.defaultPrevented||$.one(e,o,(()=>{u(this)&&this.focus()}))}));B.find(".modal.show").forEach((t=>{t.classList.contains("modal-non-invasive-show")||s.getInstance(t).hide()}));s.getOrCreateInstance(e).toggle(this)})),Zt(s),OC.set(t.name,!0)),B.find(e).forEach((t=>{const e=r(t),i=B.findOne(e);s.getOrCreateInstance(i)}))}},offcanvas:{name:"Offcanvas",selector:"[data-mdb-offcanvas-init]",isToggler:!0,callback:(t,e)=>{if(OC.has(t.name))return;const i=`click.bs.${t.name}.data-api`,s=".offcanvas.show",n=t,o=`hidden.bs.${t.name}`,a=`load.bs.${t.name}.data-api`,r=`resize.bs.${t.name}`;$.on(document,i,e,(function(t){const e=l(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;$.one(e,o,(()=>{u(this)&&this.focus()}));const i=B.findOne(s);i&&i!==e&&n.getInstance(i).hide();n.getOrCreateInstance(e).toggle(this)})),$.on(window,a,(()=>{B.find(s).forEach((t=>{n.getOrCreateInstance(t).show()}))})),$.on(window,r,(()=>{B.find("[aria-modal][class*=show][class*=offcanvas-]").forEach((t=>{"fixed"!==getComputedStyle(t).position&&n.getOrCreateInstance(t).hide()}))})),Zt(n),OC.set(t.name,!0)}},scrollspy:{name:"ScrollSpy",selector:"[data-mdb-scrollspy-init]",isToggler:!0,callback:(t,e)=>{if(OC.has(t.name))return;const i=`load.bs.${t.name}.data-api`,s=t;$.on(window,i,(()=>{B.find(e).forEach((t=>{s.getOrCreateInstance(t)}))})),OC.set(t.name,!0)}},tab:{name:"Tab",selector:"[data-mdb-tab-init], [data-mdb-pill-init], [data-mdb-list-init]",isToggler:!0,callback:(t,e)=>{const i=`load.bs.${t.name}.data-api`,s=`click.bs.${t.name}.data-api`,n="active",o=`.${n}[data-mdb-tab-init], .${n}[data-mdb-pill-init], .${n}[data-mdb-toggle="list"]`,a=t;OC.has(t.name)||($.on(document,s,e,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||a.getOrCreateInstance(this).show()})),$.on(window,i,(()=>{B.find(o).forEach((t=>{a.getOrCreateInstance(t)}))})),OC.set(t.name,!0))}},toast:{name:"Toast",selector:"[data-mdb-toast-init]",isToggler:!0,callback:(t,e)=>{const i=t;OC.has(t.name)||(Zt(i),OC.set(t.name,!0)),B.find(e).forEach((t=>i.getOrCreateInstance(t)))}},tooltip:{name:"Tooltip",selector:"[data-mdb-tooltip-init]",isToggler:!1},input:{name:"Input",selector:"[data-mdb-input-init]",isToggler:!0,callback:(t,e)=>{const i=e,s=`${i} input`,n=`${i} textarea`,o=t;OC.has(t.name)||($.on(document,"focus",s,o.activate(new o)),$.on(document,"input",s,o.activate(new o)),$.on(document,"blur",s,o.deactivate(new o)),$.on(document,"focus",n,o.activate(new o)),$.on(document,"input",n,o.activate(new o)),$.on(document,"blur",n,o.deactivate(new o)),$.on(window,"shown.bs.modal",(t=>{B.find(s,t.target).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.update()})),B.find(n,t.target).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.update()}))})),$.on(window,"shown.bs.dropdown",(t=>{const e=t.target.parentNode.querySelector(".dropdown-menu");e&&(B.find(s,e).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.update()})),B.find(n,e).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.update()})))})),$.on(window,"shown.bs.tab",(t=>{let e;e=t.target.href?t.target.href.split("#")[1]:R.getDataAttribute(t.target,"target").split("#")[1];const i=B.findOne(`#${e}`);B.find(s,i).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.update()})),B.find(n,i).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.update()}))})),$.on(window,"reset",(t=>{B.find(s,t.target).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.forceInactive()})),B.find(n,t.target).forEach((t=>{const e=o.getInstance(t.parentNode);e&&e.forceInactive()}))})),$.on(window,"onautocomplete",(t=>{const e=o.getInstance(t.target.parentNode);e&&t.cancelable&&e.forceActive()})),OC.set(t.name,!0)),B.find(i).map((t=>o.getOrCreateInstance(t)))}},range:{name:"Range",selector:"[data-mdb-range-init]",isToggler:!1},ripple:{name:"Ripple",selector:"[data-mdb-ripple-init]",isToggler:!0,callback:DC},popover:{name:"Popover",selector:"[data-mdb-popover-init]",isToggler:!1,callback:DC}},chart:{name:"Chart",selector:"[data-mdb-chart-init]",isToggler:!1,advanced:(t,e)=>{const i=t=>{const e={};return Object.keys(t).forEach((i=>{if(i.match(/dataset.*/)){const s=i.slice(7,8).toLowerCase().concat(i.slice(8));e[s]=(t=>"string"!=typeof t?t:(t=>"{"===t[0]&&"}"===t[t.length-1]||"["===t[0]&&"]"===t[t.length-1])(t)?JSON.parse(t.replace(/'/g,'"')):t)(t[i])}})),e};B.find(e).forEach((e=>{if(!t.getInstance(e)&&"bubble"!==R.getDataAttribute(e,"chart")&&"scatter"!==R.getDataAttribute(e,"chart")){const s=R.getDataAttributes(e),n={data:{datasets:[i(s)]}};return s.chart&&(n.type=s.chart),s.labels&&(n.data.labels=JSON.parse(s.labels.replace(/'/g,'"'))),new t(e,{...n,...Xp[n.type]})}return null}))}},chips:{name:"ChipsInput",selector:"[data-mdb-chips-input-init]",isToggler:!1},chip:{name:"Chip",selector:"[data-mdb-chip-init]",isToggler:!1,onInit:"init"},datatable:{name:"Datatable",selector:"[data-mdb-datatable-init]",isToggler:!1},select:{name:"Select",selector:"[data-mdb-select-init]",isToggler:!1},datetimepicker:{name:"Datetimepicker",selector:"[data-mdb-datetimepicker-init]",isToggler:!1},datepicker:{name:"Datepicker",selector:"[data-mdb-datepicker-init]",isToggler:!1},loading:{name:"Loading",selector:"[data-mdb-loading-init]",isToggler:!1},multiRangeSlider:{name:"MultiRangeSlider",selector:"[data-mdb-multi-range-slider-init]",isToggler:!1},timepicker:{name:"Timepicker",selector:"[data-mdb-timepicker-init]",isToggler:!1},touch:{name:"Touch",selector:"[data-mdb-touch-init]",isToggler:!1},alert:{name:"Alert",selector:"[data-mdb-alert-init]",isToggler:!0,callback:(t,e)=>{const i=t;IC.has(t.name)||(Zt(i),IC.set(t.name,!0)),B.find(e).forEach((t=>i.getOrCreateInstance(t)))}},animation:{name:"Animate",selector:"[data-mdb-animation-init]",isToggler:!1,onInit:"init"},clipboard:{name:"Clipboard",selector:"[data-mdb-clipboard-init]",isToggler:!1},infiniteScroll:{name:"InfiniteScroll",selector:"[data-mdb-infinite-scroll-init]",isToggler:!1},lazyLoad:{name:"LazyLoad",selector:"[data-mdb-lazy-load-init]",isToggler:!1},lightbox:{name:"Lightbox",selector:"[data-mdb-lightbox-init]",isToggler:!0,callback:(t,e)=>{const i=`click.mdb.${t.name}.data-api`,s=e,n=`${s} img:not(.lightbox-disabled)`,o=t;B.find(s).forEach((t=>new o(t))),IC.has(t.name)||($.on(document,i,n,o.toggle()),IC.set(t.name,!0))}},modal:{name:"Modal",selector:"[data-mdb-modal-init]",isToggler:!0,callback:(t,e)=>{const i=`click.bs.${t.name}.data-api`,s=t,n=`show.bs.${t.name}`,o=`hidden.bs.${t.name}`;IC.has(t.name)||($.on(document,i,e,(function(t){const e=l(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,n,(t=>{t.defaultPrevented||$.one(e,o,(()=>{u(this)&&this.focus()}))}));B.find(".modal.show").forEach((t=>{t.classList.contains("modal-non-invasive-show")||s.getInstance(t).hide()}));s.getOrCreateInstance(e).toggle(this)})),Zt(s),IC.set(t.name,!0)),B.find(e).forEach((t=>{const e=r(t),i=B.findOne(e);s.getOrCreateInstance(i)}))}},navbar:{name:"Navbar",selector:"[data-mdb-navbar-init]",isToggler:!1,onInit:"init"},perfectScrollbar:{name:"PerfectScrollbar",selector:"[data-mdb-perfect-scrollbar-init]",isToggler:!1},popconfirm:{name:"Popconfirm",selector:"[data-mdb-popconfirm-init]",isToggler:!1},rating:{name:"Rating",selector:"[data-mdb-rating-init]",isToggler:!1},sidenav:{name:"Sidenav",selector:"[data-mdb-sidenav-init]",isToggler:!0,callback:(t,e)=>{const i=e,s=t;IC.has(t.name)||($.on(document,"click",'[data-mdb-toggle="sidenav"]',s.toggleSidenav()),IC.set(t.name,!0)),B.find(i).forEach((t=>s.getOrCreateInstance(t)))}},smoothScroll:{name:"SmoothScroll",selector:"[data-mdb-smooth-scroll-init]",isToggler:!1},stepper:{name:"Stepper",selector:"[data-mdb-stepper-init]",isToggler:!1},sticky:{name:"Sticky",selector:"[data-mdb-sticky-init]",isToggler:!1},toast:{name:"Toast",selector:"[data-mdb-toast-init]",isToggler:!0,callback:(t,e)=>{const i=e,s=t;IC.has(t.name)||(Zt(s),IC.set(t.name,!0)),B.find(i).forEach((t=>s.getOrCreateInstance(t)))}}},LC=new class{constructor(t){i(this,"init",(t=>{t.forEach((t=>St(t)))})),i(this,"initMDB",((t,e=!1)=>{const i=Object.keys(Et).map((i=>{if(Boolean(document.querySelector(Et[i].selector))){const s=t[Et[i].name];return s||Tt.get(i)||!e||console.warn(`Please import ${Et[i].name} from "MDB" package and add it to a object parameter inside "initMDB" function`),s}return null}));this.init(i)})),Et=t}}($C).initMDB;LC({Button:Ft,Carousel:Je,Collapse:To,Offcanvas:we,Dropdown:la,Input:lo,Modal:ww,Popover:sn,ScrollSpy:yn,Ripple:va,Tab:Qn,Tooltip:Jn,Range:Ca,Alert:wm,Animate:Sa,Chart:Gp,Datepicker:ib,Datatable:cv,Lightbox:a_,Navbar:eg,Popconfirm:cb,Rating:b_,Sidenav:cm,SmoothScroll:zy,Timepicker:tg,Toast:jm,InfiniteScroll:rg,LazyLoad:gg,Stepper:Zv,Sticky:ay,Select:Yb,Touch:Iy,PerfectScrollbar:gx,Loading:wx,Autocomplete:Xx,Clipboard:Ew,ChipsInput:Qw,Chip:Lw,MultiRangeSlider:rC,Datetimepicker:MC}),t.Alert=wm,t.Animate=Sa,t.Autocomplete=Xx,t.Button=Ft,t.Carousel=Je,t.Chart=Gp,t.Chip=Lw,t.ChipsInput=Qw,t.Clipboard=Ew,t.Collapse=To,t.Datatable=cv,t.Datepicker=ib,t.Datetimepicker=MC,t.Dropdown=la,t.InfiniteScroll=rg,t.Input=lo,t.LazyLoad=gg,t.Lightbox=a_,t.Loading=wx,t.Modal=ww,t.MultiRangeSlider=rC,t.Navbar=eg,t.Offcanvas=we,t.PerfectScrollbar=gx,t.Popconfirm=cb,t.Popover=sn,t.Range=Ca,t.Rating=b_,t.Ripple=va,t.ScrollSpy=yn,t.Select=Yb,t.Sidenav=cm,t.SmoothScroll=zy,t.Stepper=Zv,t.Sticky=ay,t.Tab=Qn,t.Timepicker=tg,t.Toast=jm,t.Tooltip=Jn,t.Touch=Iy,t.initMDB=LC,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})})); //# sourceMappingURL=mdb.umd.min.js.map