diff --git a/assets/js/autocomplete.js b/assets/js/autocomplete.js index f04bea648c..c52c1e2d63 100644 --- a/assets/js/autocomplete.js +++ b/assets/js/autocomplete.js @@ -129,7 +129,7 @@ export default class Autocomplete return `
${item.entityAsString}
`; }, item: function(item, escape) { - return `
${item.entityAsString}
`; + return `
${escape(item.entityAsString)}
`; }, loading_more: function(data, escape) { return `
${element.getAttribute('data-ea-i18n-loading-more-results')}
`; diff --git a/src/Resources/public/app.c647be58.js b/src/Resources/public/app.a937f82e.js similarity index 93% rename from src/Resources/public/app.c647be58.js rename to src/Resources/public/app.a937f82e.js index e8443c929c..6c12d2df53 100644 --- a/src/Resources/public/app.c647be58.js +++ b/src/Resources/public/app.a937f82e.js @@ -1,2 +1,2 @@ -/*! For license information please see app.c647be58.js.LICENSE.txt */ -(()=>{var t={5577:function(t){t.exports=function(){"use strict";const t=1e6,e=1e3,i="transitionend",n=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),s=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},o=t=>{let e=t.getAttribute("data-bs-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},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:i,transitionDelay:n}=window.getComputedStyle(t);const s=Number.parseFloat(i),o=Number.parseFloat(n);return s||o?(i=i.split(",")[0],n=n.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(n))*e):0},c=t=>{t.dispatchEvent(new Event(i))},d=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>d(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=t=>{if(!d(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},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")),f=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?f(t.parentNode):null},g=()=>{},m=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=t=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of _)t()})),_.push(t)):t()},y=()=>"rtl"===document.documentElement.dir,w=t=>{b((()=>{const e=v();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},O=t=>{"function"==typeof t&&t()},A=(t,e,n=!0)=>{if(!n)return void O(t);const s=5,o=l(e)+s;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),O(t))};e.addEventListener(i,a),setTimeout((()=>{r||c(e)}),o)},x=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},E=/[^.]*(?=\..*)\.|.*/,S=/\..*/,C=/::\d+$/,k={};let I=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},L=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 N(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function $(t){const e=N(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e){return function i(n){return z(n,{delegateTarget:t}),i.oneOff&&W.off(t,n.type,e),e.apply(t,[n])}}function D(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return z(s,{delegateTarget:r}),n.oneOff&&W.off(t,s.type,e,i),i.apply(r,[s])}}function j(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function F(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=H(t);return L.has(o)||(o=t),[n,s,o]}function M(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=F(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=$(t),c=l[a]||(l[a]={}),d=j(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=N(r,e.replace(E,"")),h=o?D(t,i,r):P(t,r);h.delegationSelector=o?i:null,h.callable=r,h.oneOff=s,h.uidEvent=u,c[u]=h,t.addEventListener(a,h,o)}function q(t,e,i,n,s){const o=j(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function R(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];q(t,e,i,n.callable,n.delegationSelector)}}function H(t){return t=t.replace(S,""),T[t]||t}const W={on(t,e,i,n){M(t,e,i,n,!1)},one(t,e,i,n){M(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=F(e,i,n),a=r!==e,l=$(t),c=l[r]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const i of Object.keys(l))R(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(C,"");if(!a||e.includes(n)){const e=c[i];q(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;q(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=v();let s=null,o=!0,r=!0,a=!1;e!==H(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=z(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function z(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const V=new Map,B={set(t,e,i){V.has(t)||V.set(t,new Map);const n=V.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>V.has(t)&&V.get(t).get(e)||null,remove(t,e){if(!V.has(t))return;const i=V.get(t);i.delete(e),0===i.size&&V.delete(t)}};function K(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(e){return t}}function Q(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${Q(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Q(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=K(t.dataset[n])}return e},getDataAttribute:(t,e)=>K(t.getAttribute(`data-bs-${Q(e)}`))};class J{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=d(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...d(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const i of Object.keys(e)){const s=e[i],o=t[i],r=d(o)?"element":n(o);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}}}const Y="5.2.3";class X extends J{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),B.set(this._element,this.constructor.DATA_KEY,this))}dispose(){B.remove(this._element,this.constructor.DATA_KEY),W.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){A(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return B.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Y}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const G=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;W.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),p(this))return;const s=a(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Z="alert",tt=".bs.alert",et=`close${tt}`,it=`closed${tt}`,nt="fade",st="show";class ot extends X{static get NAME(){return Z}close(){if(W.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(st);const t=this._element.classList.contains(nt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),W.trigger(this._element,it),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=ot.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(ot,"close"),w(ot);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class dt extends X{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=dt.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}W.on(document,ct,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);dt.getOrCreateInstance(e).toggle()})),w(dt);const ut={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&h(t)))}},ht="swipe",pt=".bs.swipe",ft=`touchstart${pt}`,gt=`touchmove${pt}`,mt=`touchend${pt}`,vt=`pointerdown${pt}`,_t=`pointerup${pt}`,bt="touch",yt="pen",wt="pointer-event",Ot=40,At={endCallback:null,leftCallback:null,rightCallback:null},xt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Et extends J{constructor(t,e){super(),this._element=t,t&&Et.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return At}static get DefaultType(){return xt}static get NAME(){return ht}dispose(){W.off(this._element,pt)}_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(),O(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<=Ot)return;const e=t/this._deltaX;this._deltaX=0,e&&O(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(W.on(this._element,vt,(t=>this._start(t))),W.on(this._element,_t,(t=>this._end(t))),this._element.classList.add(wt)):(W.on(this._element,ft,(t=>this._start(t))),W.on(this._element,gt,(t=>this._move(t))),W.on(this._element,mt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===yt||t.pointerType===bt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const St="carousel",Ct=".bs.carousel",kt=".data-api",It=500,Tt="next",Lt="prev",Nt="left",$t="right",Pt=`slide${Ct}`,Dt=`slid${Ct}`,jt=`keydown${Ct}`,Ft=`mouseenter${Ct}`,Mt=`mouseleave${Ct}`,qt=`dragstart${Ct}`,Rt=`load${Ct}${kt}`,Ht=`click${Ct}${kt}`,Wt="carousel",zt="active",Vt="slide",Bt="carousel-item-end",Kt="carousel-item-start",Qt="carousel-item-next",Ut="carousel-item-prev",Jt=".active",Yt=".carousel-item",Xt=Jt+Yt,Gt=".carousel-item img",Zt=".carousel-indicators",te="[data-bs-slide], [data-bs-slide-to]",ee='[data-bs-ride="carousel"]',ie={ArrowLeft:$t,ArrowRight:Nt},ne={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class oe extends X{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ut.findOne(Zt,this._element),this._addEventListeners(),this._config.ride===Wt&&this.cycle()}static get Default(){return ne}static get DefaultType(){return se}static get NAME(){return St}next(){this._slide(Tt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Lt)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?W.one(this._element,Dt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void W.one(this._element,Dt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Tt:Lt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&W.on(this._element,jt,(t=>this._keydown(t))),"hover"===this._config.pause&&(W.on(this._element,Ft,(()=>this.pause())),W.on(this._element,Mt,(()=>this._maybeEnableCycle()))),this._config.touch&&Et.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ut.find(Gt,this._element))W.on(t,qt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Nt)),rightCallback:()=>this._slide(this._directionToOrder($t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),It+this._config.interval))}};this._swipeHelper=new Et(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ie[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=ut.findOne(Jt,this._indicatorsElement);e.classList.remove(zt),e.removeAttribute("aria-current");const i=ut.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(zt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Tt,s=e||x(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>W.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?Kt:Bt,c=n?Qt:Ut;s.classList.add(c),m(s),i.classList.add(l),s.classList.add(l);const d=()=>{s.classList.remove(l,c),s.classList.add(zt),i.classList.remove(zt,c,l),this._isSliding=!1,r(Dt)};this._queueCallback(d,i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Vt)}_getActive(){return ut.findOne(Xt,this._element)}_getItems(){return ut.find(Yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return y()?t===Nt?Lt:Tt:t===Nt?Tt:Lt}_orderToDirection(t){return y()?t===Lt?Nt:$t:t===Lt?$t:Nt}static jQueryInterface(t){return this.each((function(){const e=oe.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}W.on(document,Ht,te,(function(t){const e=a(this);if(!e||!e.classList.contains(Wt))return;t.preventDefault();const i=oe.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===U.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),W.on(window,Rt,(()=>{const t=ut.find(ee);for(const e of t)oe.getOrCreateInstance(e)})),w(oe);const re="collapse",ae=".bs.collapse",le=`show${ae}`,ce=`shown${ae}`,de=`hide${ae}`,ue=`hidden${ae}`,he=`click${ae}.data-api`,pe="show",fe="collapse",ge="collapsing",me="collapsed",ve=`:scope .${fe} .${fe}`,_e="collapse-horizontal",be="width",ye="height",we=".collapse.show, .collapse.collapsing",Oe='[data-bs-toggle="collapse"]',Ae={parent:null,toggle:!0},xe={parent:"(null|element)",toggle:"boolean"};class Ee extends X{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=ut.find(Oe);for(const t of i){const e=r(t),i=ut.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ae}static get DefaultType(){return xe}static get NAME(){return re}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(we).filter((t=>t!==this._element)).map((t=>Ee.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(W.trigger(this._element,le).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(ge),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe,pe),this._element.style[e]="",W.trigger(this._element,ce)},n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(W.trigger(this._element,de).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,m(this._element),this._element.classList.add(ge),this._element.classList.remove(fe,pe);for(const t of this._triggerArray){const e=a(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe),W.trigger(this._element,ue)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(pe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(_e)?be:ye}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Oe);for(const e of t){const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ut.find(ve,this._config.parent);return ut.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(me,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Ee.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}W.on(document,he,Oe,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this),i=ut.find(e);for(const t of i)Ee.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Ee);var Se="top",Ce="bottom",ke="right",Ie="left",Te="auto",Le=[Se,Ce,ke,Ie],Ne="start",$e="end",Pe="clippingParents",De="viewport",je="popper",Fe="reference",Me=Le.reduce((function(t,e){return t.concat([e+"-"+Ne,e+"-"+$e])}),[]),qe=[].concat(Le,[Te]).reduce((function(t,e){return t.concat([e,e+"-"+Ne,e+"-"+$e])}),[]),Re="beforeRead",He="read",We="afterRead",ze="beforeMain",Ve="main",Be="afterMain",Ke="beforeWrite",Qe="write",Ue="afterWrite",Je=[Re,He,We,ze,Ve,Be,Ke,Qe,Ue];function Ye(t){return t?(t.nodeName||"").toLowerCase():null}function Xe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ge(t){return t instanceof Xe(t).Element||t instanceof Element}function Ze(t){return t instanceof Xe(t).HTMLElement||t instanceof HTMLElement}function ti(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Xe(t).ShadowRoot||t instanceof ShadowRoot)}function ei(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];Ze(s)&&Ye(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))}function ii(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Ze(n)&&Ye(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}}const ni={name:"applyStyles",enabled:!0,phase:"write",fn:ei,effect:ii,requires:["computeStyles"]};function si(t){return t.split("-")[0]}var oi=Math.max,ri=Math.min,ai=Math.round;function li(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ci(){return!/^((?!chrome|android).)*safari/i.test(li())}function di(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&Ze(t)&&(s=t.offsetWidth>0&&ai(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ai(n.height)/t.offsetHeight||1);var r=(Ge(t)?Xe(t):window).visualViewport,a=!ci()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,d=n.width/s,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function ui(t){var e=di(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function hi(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ti(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function pi(t){return Xe(t).getComputedStyle(t)}function fi(t){return["table","td","th"].indexOf(Ye(t))>=0}function gi(t){return((Ge(t)?t.ownerDocument:t.document)||window.document).documentElement}function mi(t){return"html"===Ye(t)?t:t.assignedSlot||t.parentNode||(ti(t)?t.host:null)||gi(t)}function vi(t){return Ze(t)&&"fixed"!==pi(t).position?t.offsetParent:null}function _i(t){var e=/firefox/i.test(li());if(/Trident/i.test(li())&&Ze(t)&&"fixed"===pi(t).position)return null;var i=mi(t);for(ti(i)&&(i=i.host);Ze(i)&&["html","body"].indexOf(Ye(i))<0;){var n=pi(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function bi(t){for(var e=Xe(t),i=vi(t);i&&fi(i)&&"static"===pi(i).position;)i=vi(i);return i&&("html"===Ye(i)||"body"===Ye(i)&&"static"===pi(i).position)?e:i||_i(t)||e}function yi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wi(t,e,i){return oi(t,ri(e,i))}function Oi(t,e,i){var n=wi(t,e,i);return n>i?i:n}function Ai(){return{top:0,right:0,bottom:0,left:0}}function xi(t){return Object.assign({},Ai(),t)}function Ei(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Si=function(t,e){return xi("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ei(t,Le))};function Ci(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=si(i.placement),l=yi(a),c=[Ie,ke].indexOf(a)>=0?"height":"width";if(o&&r){var d=Si(s.padding,i),u=ui(o),h="y"===l?Se:Ie,p="y"===l?Ce:ke,f=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=bi(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,_=f/2-g/2,b=d[h],y=v-u[c]-d[p],w=v/2-u[c]/2+_,O=wi(b,w,y),A=l;i.modifiersData[n]=((e={})[A]=O,e.centerOffset=O-w,e)}}function ki(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&hi(e.elements.popper,n)&&(e.elements.arrow=n)}const Ii={name:"arrow",enabled:!0,phase:"main",fn:Ci,effect:ki,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ti(t){return t.split("-")[1]}var Li={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ni(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:ai(e*n)/n||0,y:ai(i*n)/n||0}}function $i(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,h=r.x,p=void 0===h?0:h,f=r.y,g=void 0===f?0:f,m="function"==typeof d?d({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=r.hasOwnProperty("x"),_=r.hasOwnProperty("y"),b=Ie,y=Se,w=window;if(c){var O=bi(i),A="clientHeight",x="clientWidth";O===Xe(i)&&"static"!==pi(O=gi(i)).position&&"absolute"===a&&(A="scrollHeight",x="scrollWidth"),(s===Se||(s===Ie||s===ke)&&o===$e)&&(y=Ce,g-=(u&&O===w&&w.visualViewport?w.visualViewport.height:O[A])-n.height,g*=l?1:-1),s!==Ie&&(s!==Se&&s!==Ce||o!==$e)||(b=ke,p-=(u&&O===w&&w.visualViewport?w.visualViewport.width:O[x])-n.width,p*=l?1:-1)}var E,S=Object.assign({position:a},c&&Li),C=!0===d?Ni({x:p,y:g}):{x:p,y:g};return p=C.x,g=C.y,l?Object.assign({},S,((E={})[y]=_?"0":"",E[b]=v?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",E)):Object.assign({},S,((e={})[y]=_?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function Pi(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:si(e.placement),variation:Ti(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,$i(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,$i(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Di={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pi,data:{}};var ji={passive:!0};function Fi(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Xe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,ji)})),a&&l.addEventListener("resize",i.update,ji),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,ji)})),a&&l.removeEventListener("resize",i.update,ji)}}const Mi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Fi,data:{}};var qi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t){return t.replace(/left|right|bottom|top/g,(function(t){return qi[t]}))}var Hi={start:"end",end:"start"};function Wi(t){return t.replace(/start|end/g,(function(t){return Hi[t]}))}function zi(t){var e=Xe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vi(t){return di(gi(t)).left+zi(t).scrollLeft}function Bi(t,e){var i=Xe(t),n=gi(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=ci();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Vi(t),y:l}}function Ki(t){var e,i=gi(t),n=zi(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=oi(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=oi(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Vi(t),l=-n.scrollTop;return"rtl"===pi(s||i).direction&&(a+=oi(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Qi(t){var e=pi(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Ui(t){return["html","body","#document"].indexOf(Ye(t))>=0?t.ownerDocument.body:Ze(t)&&Qi(t)?t:Ui(mi(t))}function Ji(t,e){var i;void 0===e&&(e=[]);var n=Ui(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Xe(n),r=s?[o].concat(o.visualViewport||[],Qi(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ji(mi(r)))}function Yi(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xi(t,e){var i=di(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}function Gi(t,e,i){return e===De?Yi(Bi(t,i)):Ge(e)?Xi(e,i):Yi(Ki(gi(t)))}function Zi(t){var e=Ji(mi(t)),i=["absolute","fixed"].indexOf(pi(t).position)>=0&&Ze(t)?bi(t):t;return Ge(i)?e.filter((function(t){return Ge(t)&&hi(t,i)&&"body"!==Ye(t)})):[]}function tn(t,e,i,n){var s="clippingParents"===e?Zi(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=Gi(t,i,n);return e.top=oi(s.top,e.top),e.right=ri(s.right,e.right),e.bottom=ri(s.bottom,e.bottom),e.left=oi(s.left,e.left),e}),Gi(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function en(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?si(s):null,r=s?Ti(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Se:e={x:a,y:i.y-n.height};break;case Ce:e={x:a,y:i.y+i.height};break;case ke:e={x:i.x+i.width,y:l};break;case Ie:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?yi(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case Ne:e[c]=e[c]-(i[d]/2-n[d]/2);break;case $e:e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function nn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Pe:a,c=i.rootBoundary,d=void 0===c?De:c,u=i.elementContext,h=void 0===u?je:u,p=i.altBoundary,f=void 0!==p&&p,g=i.padding,m=void 0===g?0:g,v=xi("number"!=typeof m?m:Ei(m,Le)),_=h===je?Fe:je,b=t.rects.popper,y=t.elements[f?_:h],w=tn(Ge(y)?y:y.contextElement||gi(t.elements.popper),l,d,r),O=di(t.elements.reference),A=en({reference:O,element:b,strategy:"absolute",placement:s}),x=Yi(Object.assign({},b,A)),E=h===je?x:O,S={top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right},C=t.modifiersData.offset;if(h===je&&C){var k=C[s];Object.keys(S).forEach((function(t){var e=[ke,Ce].indexOf(t)>=0?1:-1,i=[Se,Ce].indexOf(t)>=0?"y":"x";S[t]+=k[i]*e}))}return S}function sn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?qe:l,d=Ti(n),u=d?a?Me:Me.filter((function(t){return Ti(t)===d})):Le,h=u.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=u);var p=h.reduce((function(e,i){return e[i]=nn(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[si(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function on(t){if(si(t)===Te)return[];var e=Ri(t);return[Wi(t),e,Wi(e)]}function rn(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,v=si(m),_=l||(v!==m&&f?on(m):[Ri(m)]),b=[m].concat(_).reduce((function(t,i){return t.concat(si(i)===Te?sn(e,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),y=e.rects.reference,w=e.rects.popper,O=new Map,A=!0,x=b[0],E=0;E=0,T=I?"width":"height",L=nn(e,{placement:S,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),N=I?k?ke:Ie:k?Ce:Se;y[T]>w[T]&&(N=Ri(N));var $=Ri(N),P=[];if(o&&P.push(L[C]<=0),a&&P.push(L[N]<=0,L[$]<=0),P.every((function(t){return t}))){x=S,A=!1;break}O.set(S,P)}if(A)for(var D=function(t){var e=b.find((function(e){var i=O.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return x=e,"break"},j=f?3:1;j>0&&"break"!==D(j);j--);e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)}}const an={name:"flip",enabled:!0,phase:"main",fn:rn,requiresIfExists:["offset"],data:{_skip:!1}};function ln(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 cn(t){return[Se,ke,Ce,Ie].some((function(e){return t[e]>=0}))}function dn(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=nn(e,{elementContext:"reference"}),a=nn(e,{altBoundary:!0}),l=ln(r,n),c=ln(a,s,o),d=cn(l),u=cn(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const un={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dn};function hn(t,e,i){var n=si(t),s=[Ie,Se].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Ie,ke].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function pn(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=qe.reduce((function(t,i){return t[i]=hn(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}const fn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pn};function gn(t){var e=t.state,i=t.name;e.modifiersData[i]=en({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const mn={name:"popperOffsets",enabled:!0,phase:"read",fn:gn,data:{}};function vn(t){return"x"===t?"y":"x"}function _n(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,f=i.tetherOffset,g=void 0===f?0:f,m=nn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=si(e.placement),_=Ti(e.placement),b=!_,y=yi(v),w=vn(y),O=e.modifiersData.popperOffsets,A=e.rects.reference,x=e.rects.popper,E="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(O){if(o){var I,T="y"===y?Se:Ie,L="y"===y?Ce:ke,N="y"===y?"height":"width",$=O[y],P=$+m[T],D=$-m[L],j=p?-x[N]/2:0,F=_===Ne?A[N]:x[N],M=_===Ne?-x[N]:-A[N],q=e.elements.arrow,R=p&&q?ui(q):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ai(),W=H[T],z=H[L],V=wi(0,A[N],R[N]),B=b?A[N]/2-j-V-W-S.mainAxis:F-V-W-S.mainAxis,K=b?-A[N]/2+j+V+z+S.mainAxis:M+V+z+S.mainAxis,Q=e.elements.arrow&&bi(e.elements.arrow),U=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,J=null!=(I=null==C?void 0:C[y])?I:0,Y=$+K-J,X=wi(p?ri(P,$+B-J-U):P,$,p?oi(D,Y):D);O[y]=X,k[y]=X-$}if(a){var G,Z="x"===y?Se:Ie,tt="x"===y?Ce:ke,et=O[w],it="y"===w?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[Se,Ie].indexOf(v),rt=null!=(G=null==C?void 0:C[w])?G:0,at=ot?nt:et-A[it]-x[it]-rt+S.altAxis,lt=ot?et+A[it]+x[it]-rt-S.altAxis:st,ct=p&&ot?Oi(at,et,lt):wi(p?at:nt,et,p?lt:st);O[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}}const bn={name:"preventOverflow",enabled:!0,phase:"main",fn:_n,requiresIfExists:["offset"]};function yn(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function wn(t){return t!==Xe(t)&&Ze(t)?yn(t):zi(t)}function On(t){var e=t.getBoundingClientRect(),i=ai(e.width)/t.offsetWidth||1,n=ai(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function An(t,e,i){void 0===i&&(i=!1);var n=Ze(e),s=Ze(e)&&On(e),o=gi(e),r=di(t,s,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==Ye(e)||Qi(o))&&(a=wn(e)),Ze(e)?((l=di(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Vi(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function xn(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}function En(t){var e=xn(t);return Je.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function Sn(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Cn(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function In(){for(var t=arguments.length,e=new Array(t),i=0;iNumber.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)&&(U.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=ut.find(as,this._menu).filter((t=>h(t)));i.length&&x(i,e,t===Hn,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=_s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Wn||"keyup"===t.type&&t.key!==qn)return;const e=ut.find(ns);for(const i of e){const e=_s.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===qn||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=t.key===Mn,n=[Rn,Hn].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(is)?this:ut.prev(this,is)[0]||ut.next(this,is)[0]||ut.findOne(is,t.delegateTarget.parentNode),o=_s.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}W.on(document,Un,is,_s.dataApiKeydownHandler),W.on(document,Un,ss,_s.dataApiKeydownHandler),W.on(document,Qn,_s.clearMenus),W.on(document,Jn,_s.clearMenus),W.on(document,Qn,is,(function(t){t.preventDefault(),_s.getOrCreateInstance(this).toggle()})),w(_s);const bs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ys=".sticky-top",ws="padding-right",Os="margin-right";class As{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,ws,(e=>e+t)),this._setElementAttributes(bs,ws,(e=>e+t)),this._setElementAttributes(ys,Os,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ws),this._resetElementAttributes(bs,ws),this._resetElementAttributes(ys,Os)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),s=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)};this._applyManipulationCallback(t,s)}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=t=>{const i=U.getDataAttribute(t,e);null!==i?(U.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){if(d(t))e(t);else for(const i of ut.find(t,this._element))e(i)}}const xs="backdrop",Es="fade",Ss="show",Cs=`mousedown.bs.${xs}`,ks={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Is={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ts extends J{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ks}static get DefaultType(){return Is}static get NAME(){return xs}show(t){if(!this._config.isVisible)return void O(t);this._append();const e=this._getElement();this._config.isAnimated&&m(e),e.classList.add(Ss),this._emulateAnimation((()=>{O(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ss),this._emulateAnimation((()=>{this.dispose(),O(t)}))):O(t)}dispose(){this._isAppended&&(W.off(this._element,Cs),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(Es),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),W.on(t,Cs,(()=>{O(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){A(t,this._getElement(),this._config.isAnimated)}}const Ls="focustrap",Ns=".bs.focustrap",$s=`focusin${Ns}`,Ps=`keydown.tab${Ns}`,Ds="Tab",js="forward",Fs="backward",Ms={autofocus:!0,trapElement:null},qs={autofocus:"boolean",trapElement:"element"};class Rs extends J{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ms}static get DefaultType(){return qs}static get NAME(){return Ls}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),W.off(document,Ns),W.on(document,$s,(t=>this._handleFocusin(t))),W.on(document,Ps,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,W.off(document,Ns))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=ut.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Fs?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Ds&&(this._lastTabNavDirection=t.shiftKey?Fs:js)}}const Hs="modal",Ws=".bs.modal",zs="Escape",Vs=`hide${Ws}`,Bs=`hidePrevented${Ws}`,Ks=`hidden${Ws}`,Qs=`show${Ws}`,Us=`shown${Ws}`,Js=`resize${Ws}`,Ys=`click.dismiss${Ws}`,Xs=`mousedown.dismiss${Ws}`,Gs=`keydown.dismiss${Ws}`,Zs=`click${Ws}.data-api`,to="modal-open",eo="fade",io="show",no="modal-static",so=".modal.show",oo=".modal-dialog",ro=".modal-body",ao='[data-bs-toggle="modal"]',lo={backdrop:!0,focus:!0,keyboard:!0},co={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class uo extends X{constructor(t,e){super(t,e),this._dialog=ut.findOne(oo,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new As,this._addEventListeners()}static get Default(){return lo}static get DefaultType(){return co}static get NAME(){return Hs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||W.trigger(this._element,Qs,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(to),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(W.trigger(this._element,Vs).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(io),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])W.off(t,Ws);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ts({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Rs({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=ut.findOne(ro,this._dialog);e&&(e.scrollTop=0),m(this._element),this._element.classList.add(io);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,W.trigger(this._element,Us,{relatedTarget:t})};this._queueCallback(i,this._dialog,this._isAnimated())}_addEventListeners(){W.on(this._element,Gs,(t=>{if(t.key===zs)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),W.on(window,Js,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),W.on(this._element,Xs,(t=>{W.one(this._element,Ys,(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(to),this._resetAdjustments(),this._scrollBar.reset(),W.trigger(this._element,Ks)}))}_isAnimated(){return this._element.classList.contains(eo)}_triggerBackdropTransition(){if(W.trigger(this._element,Bs).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(no)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(no),this._queueCallback((()=>{this._element.classList.remove(no),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=y()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=y()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}W.on(document,Zs,ao,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),W.one(e,Qs,(t=>{t.defaultPrevented||W.one(e,Ks,(()=>{h(this)&&this.focus()}))}));const i=ut.findOne(so);i&&uo.getInstance(i).hide(),uo.getOrCreateInstance(e).toggle(this)})),G(uo),w(uo);const ho="offcanvas",po=".bs.offcanvas",fo=".data-api",go=`load${po}${fo}`,mo="Escape",vo="show",_o="showing",bo="hiding",yo="offcanvas-backdrop",wo=".offcanvas.show",Oo=`show${po}`,Ao=`shown${po}`,xo=`hide${po}`,Eo=`hidePrevented${po}`,So=`hidden${po}`,Co=`resize${po}`,ko=`click${po}${fo}`,Io=`keydown.dismiss${po}`,To='[data-bs-toggle="offcanvas"]',Lo={backdrop:!0,keyboard:!0,scroll:!1},No={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class $o extends X{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Lo}static get DefaultType(){return No}static get NAME(){return ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(W.trigger(this._element,Oo,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new As).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_o);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(vo),this._element.classList.remove(_o),W.trigger(this._element,Ao,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(W.trigger(this._element,xo).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(bo),this._backdrop.hide();const t=()=>{this._element.classList.remove(vo,bo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new As).reset(),W.trigger(this._element,So)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():W.trigger(this._element,Eo)},e=Boolean(this._config.backdrop);return new Ts({className:yo,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Rs({trapElement:this._element})}_addEventListeners(){W.on(this._element,Io,(t=>{t.key===mo&&(this._config.keyboard?this.hide():W.trigger(this._element,Eo))}))}static jQueryInterface(t){return this.each((function(){const e=$o.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)}}))}}W.on(document,ko,To,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;W.one(e,So,(()=>{h(this)&&this.focus()}));const i=ut.findOne(wo);i&&i!==e&&$o.getInstance(i).hide(),$o.getOrCreateInstance(e).toggle(this)})),W.on(window,go,(()=>{for(const t of ut.find(wo))$o.getOrCreateInstance(t).show()})),W.on(window,Co,(()=>{for(const t of ut.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&$o.getOrCreateInstance(t).hide()})),G($o),w($o);const Po=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Do=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,jo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Fo=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Po.has(i)||Boolean(Do.test(t.nodeValue)||jo.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Mo={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function qo(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Fo(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}const Ro="TemplateFactory",Ho={allowList:Mo,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Wo={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},zo={entry:"(string|element|function|null)",selector:"(string|element)"};class Vo extends J{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ho}static get DefaultType(){return Wo}static get NAME(){return Ro}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[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);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},zo)}_setContent(t,e,i){const n=ut.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?d(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?qo(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Bo="tooltip",Ko=new Set(["sanitize","allowList","sanitizeFn"]),Qo="fade",Uo="show",Jo=".tooltip-inner",Yo=".modal",Xo="hide.bs.modal",Go="hover",Zo="focus",tr="click",er="manual",ir="hide",nr="hidden",sr="show",or="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",dr="mouseenter",ur="mouseleave",hr={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},pr={allowList:Mo,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={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"};class gr extends X{constructor(t,e){if(void 0===Pn)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 pr}static get DefaultType(){return fr}static get NAME(){return Bo}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),W.off(this._element.closest(Yo),Xo,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-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=W.trigger(this._element,this.constructor.eventName(sr)),e=(f(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:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),W.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(i),i.classList.add(Uo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.on(t,"mouseover",g);const s=()=>{W.trigger(this._element,this.constructor.eventName(or)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(W.trigger(this._element,this.constructor.eventName(ir)).defaultPrevented)return;if(this._getTipElement().classList.remove(Uo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.off(t,"mouseover",g);this._activeTrigger[tr]=!1,this._activeTrigger[Zo]=!1,this._activeTrigger[Go]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),W.trigger(this._element,this.constructor.eventName(nr)))};this._queueCallback(t,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(Qo,Uo),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=s(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Qo),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Vo({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Jo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Qo)}_isShown(){return this.tip&&this.tip.classList.contains(Uo)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=hr[e.toUpperCase()];return $n(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"function"==typeof t?t.call(this._element):t}_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,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)W.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(e!==er){const t=e===Go?this.constructor.eventName(dr):this.constructor.eventName(lr),i=e===Go?this.constructor.eventName(ur):this.constructor.eventName(cr);W.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Zo:Go]=!0,e._enter()})),W.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Zo:Go]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},W.on(this._element.closest(Yo),Xo,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-bs-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=U.getDataAttributes(this._element);for(const t of Object.keys(e))Ko.has(t)&&delete e[t];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:u(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 in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);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(t){return this.each((function(){const e=gr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(gr);const mr="popover",vr=".popover-header",_r=".popover-body",br={...gr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yr={...gr.DefaultType,content:"(null|string|element|function)"};class wr extends gr{static get Default(){return br}static get DefaultType(){return yr}static get NAME(){return mr}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[vr]:this._getTitle(),[_r]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const Or="scrollspy",Ar=".bs.scrollspy",xr=`activate${Ar}`,Er=`click${Ar}`,Sr=`load${Ar}.data-api`,Cr="dropdown-item",kr="active",Ir='[data-bs-spy="scroll"]',Tr="[href]",Lr=".nav, .list-group",Nr=".nav-link",$r=`${Nr}, .nav-item > ${Nr}, .list-group-item`,Pr=".dropdown",Dr=".dropdown-toggle",jr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Fr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Mr extends X{constructor(t,e){super(t,e),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 jr}static get DefaultType(){return Fr}static get NAME(){return Or}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.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(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&&(W.off(this._config.target,Er),W.on(this._config.target,Er,Tr,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_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))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;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(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ut.find(Tr,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=ut.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(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(kr),this._activateParents(t),W.trigger(this._element,xr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Cr))ut.findOne(Dr,t.closest(Pr)).classList.add(kr);else for(const e of ut.parents(t,Lr))for(const t of ut.prev(e,$r))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=ut.find(`${Tr}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each((function(){const e=Mr.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]()}}))}}W.on(window,Sr,(()=>{for(const t of ut.find(Ir))Mr.getOrCreateInstance(t)})),w(Mr);const qr="tab",Rr=".bs.tab",Hr=`hide${Rr}`,Wr=`hidden${Rr}`,zr=`show${Rr}`,Vr=`shown${Rr}`,Br=`click${Rr}`,Kr=`keydown${Rr}`,Qr=`load${Rr}`,Ur="ArrowLeft",Jr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Gr="active",Zr="fade",ta="show",ea="dropdown",ia=".dropdown-toggle",na=".dropdown-menu",sa=":not(.dropdown-toggle)",oa='.list-group, .nav, [role="tablist"]',ra=".nav-item, .list-group-item",aa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',la=`.nav-link${sa}, .list-group-item${sa}, [role="tab"]${sa}, ${aa}`,ca=`.${Gr}[data-bs-toggle="tab"], .${Gr}[data-bs-toggle="pill"], .${Gr}[data-bs-toggle="list"]`;class da extends X{constructor(t){super(t),this._parent=this._element.closest(oa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),W.on(this._element,Kr,(t=>this._keydown(t))))}static get NAME(){return qr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?W.trigger(e,Hr,{relatedTarget:t}):null;W.trigger(t,zr,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Gr),this._activate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),W.trigger(t,Vr,{relatedTarget:e})):t.classList.add(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_deactivate(t,e){if(!t)return;t.classList.remove(Gr),t.blur(),this._deactivate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),W.trigger(t,Wr,{relatedTarget:e})):t.classList.remove(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_keydown(t){if(![Ur,Jr,Yr,Xr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Jr,Xr].includes(t.key),i=x(this._getChildren().filter((t=>!p(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),da.getOrCreateInstance(i).show())}_getChildren(){return ut.find(la,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_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=a(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(ea))return;const n=(t,n)=>{const s=ut.findOne(t,i);s&&s.classList.toggle(n,e)};n(ia,Gr),n(na,ta),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Gr)}_getInnerElement(t){return t.matches(la)?t:ut.findOne(la,t)}_getOuterElement(t){return t.closest(ra)||t}static jQueryInterface(t){return this.each((function(){const e=da.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}W.on(document,Br,aa,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||da.getOrCreateInstance(this).show()})),W.on(window,Qr,(()=>{for(const t of ut.find(ca))da.getOrCreateInstance(t)})),w(da);const ua="toast",ha=".bs.toast",pa=`mouseover${ha}`,fa=`mouseout${ha}`,ga=`focusin${ha}`,ma=`focusout${ha}`,va=`hide${ha}`,_a=`hidden${ha}`,ba=`show${ha}`,ya=`shown${ha}`,wa="fade",Oa="hide",Aa="show",xa="showing",Ea={animation:"boolean",autohide:"boolean",delay:"number"},Sa={animation:!0,autohide:!0,delay:5e3};class Ca extends X{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Sa}static get DefaultType(){return Ea}static get NAME(){return ua}show(){if(W.trigger(this._element,ba).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(wa);const t=()=>{this._element.classList.remove(xa),W.trigger(this._element,ya),this._maybeScheduleHide()};this._element.classList.remove(Oa),m(this._element),this._element.classList.add(Aa,xa),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(W.trigger(this._element,va).defaultPrevented)return;const t=()=>{this._element.classList.add(Oa),this._element.classList.remove(xa,Aa),W.trigger(this._element,_a)};this._element.classList.add(xa),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Aa),super.dispose()}isShown(){return this._element.classList.contains(Aa)}_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(){W.on(this._element,pa,(t=>this._onInteraction(t,!0))),W.on(this._element,fa,(t=>this._onInteraction(t,!1))),W.on(this._element,ga,(t=>this._onInteraction(t,!0))),W.on(this._element,ma,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Ca.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return G(Ca),w(Ca),{Alert:ot,Button:dt,Carousel:oe,Collapse:Ee,Dropdown:_s,Modal:uo,Offcanvas:$o,Popover:wr,ScrollSpy:Mr,Tab:da,Toast:Ca,Tooltip:gr}}()},312:(t,e,i)=>{"use strict";i.r(e)},6416:function(t){t.exports=function(){"use strict";function t(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,i){t(e,(t=>{const e=this._events[t]||[];e.push(i),this._events[t]=e}))}off(e,i){var n=arguments.length;0!==n?t(e,(t=>{if(1===n)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(i),1),this._events[t]=e)})):this._events={}}trigger(e,...i){var n=this;t(e,(t=>{const e=n._events[t];void 0!==e&&e.forEach((t=>{t.apply(n,i)}))}))}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==a(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",n=t=>{if(!o(t))return t.join("");let e="",i=0;const n=()=>{i>1&&(e+="{"+i+"}")};return t.forEach(((s,o)=>{s!==t[o-1]?(n(),e+=s,i=1):i++})),n(),e},s=t=>{let e=c(t);return i(e)},o=t=>new Set(t).size!==t.length,r=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),a=t=>t.reduce(((t,e)=>Math.max(t,l(e))),0),l=t=>c(t).length,c=t=>Array.from(t),d=t=>{if(1===t.length)return[[t]];let e=[];const i=t.substring(1);return d(i).forEach((function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),n=i.slice(0),n.unshift(t.charAt(0)),e.push(n)})),e},u=[[0,65535]];let h,p;const f={},g={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in g){let e=g[t]||"";for(let i=0;it.normalize(e),_=t=>c(t).reduce(((t,e)=>t+b(e)),""),b=t=>(t=v(t).toLowerCase().replace(m,(t=>f[t]||"")),v(t,"NFC")),y=t=>{const e={},i=(t,i)=>{const n=e[t]||new Set,o=new RegExp("^"+s(n)+"$","iu");i.match(o)||(n.add(r(i)),e[t]=n)};for(let e of function*(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=_(e);i!=e.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}(t))i(e.folded,e.folded),i(e.folded,e.composed);return e},w=t=>{const e=y(t),n={};let o=[];for(let t in e){let i=e[t];i&&(n[t]=s(i)),t.length>1&&o.push(r(t))}o.sort(((t,e)=>e.length-t.length));const a=i(o);return p=new RegExp("^"+a,"u"),n},O=(t,e=1)=>(e=Math.max(e,t.length-1),i(d(t).map((t=>((t,e=1)=>{let i=0;return t=t.map((t=>(h[t]&&(i+=t.length),h[t]||t))),i>=e?n(t):""})(t,e))))),A=(t,e=!0)=>{let s=t.length>1?1:0;return i(t.map((t=>{let i=[];const o=e?t.length():t.length()-1;for(let e=0;e{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue;if(i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const n=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1;if(1!=t.length&&1!=i.length){if(t.starti.start)return!0;if(i.startt.start)return!0}}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class E{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new E,n=JSON.parse(JSON.stringify(this.parts)),s=n.pop();for(const t of n)i.add(t);let o=e.substr.substring(0,t-s.start),r=o.length;return i.add({start:s.start,end:s.start+r,length:r,substr:o}),i}}const S=t=>{var e;void 0===h&&(h=w(e||u)),t=_(t);let i="",n=[new E];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)x(t,n)||n.push(t)}else if(e>0&&1==l.size&&!l.has("3")){i+=A(n,!1);let t=new E;const e=n[0];e&&t.add(e.last()),n=[t]}}return i+=A(n,!0),i},C=(t,e)=>{if(t)return t[e]},k=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},I=(t,e,i)=>{var n,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(n=e.string.length/t.length,0===s&&(n+=.5),n*i)):0},T=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},L=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},N=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=_(e+"").toLowerCase())?1:e>t?-1:0;class P{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],s=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(r).join("|")+"):(.*)$")),s.forEach((t=>{let i,s=null,a=null;o&&(i=t.match(o))&&(s=i[1],t=i[2]),t.length>0&&(a=this.settings.diacritics?S(t)||null:r(t),a&&e&&(a="\\b"+a)),n.push({string:t,regex:a?new RegExp(a,"iu"):null,field:s})})),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,s=t.weights,o=n.length,r=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return I(r(e,i),t,s[i]||1)}:function(t,e){var i=0;if(t.field){const n=r(e,t.field);!t.regex&&n?i+=1/o:i+=I(n,t,1)}else L(s,((n,s)=>{i+=I(r(e,s),t,n)}));return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,s=0;for(let i of e){if((n=a(i,t))<=0)return 0;s+=n}return s/i}:function(t){var n=0;return L(e,(e=>{n+=a(e,t)})),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((t=>"$score"!==t.field));return i.length?function(t,e){var n,s;for(let o of i)if(s=o.field,n=("desc"===o.direction?-1:1)*N(r(s,t),r(s,e)))return n;return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(T(n,"sort"),T(n,"sort_empty"),n.fields){T(n,"fields");const t=[];n.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1})),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?k:C}}search(t,e){var i,n,s=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||s._getScoreFunction(n);t.length?L(s.items,((t,s)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:s})})):L(s.items,((t,e)=>{n.items.push({score:1,id:e})}));const r=s._getSortFunction(n);return r&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const D=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},j=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(F(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},F=t=>"string"==typeof t&&t.indexOf("<")>-1,M=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},q=(t,e)=>{Object.assign(t.style,e)},R=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.add(e)}))}))},H=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.remove(e)}))}))},W=t=>{var e=[];return D(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},z=t=>(Array.isArray(t)||(t=[t]),t),V=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},B=(t,e=0)=>e>0?t[t.length-1]:t[0],K=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},Q=(t,e)=>{D(e,((e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)}))},U=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},J=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>3===t.nodeType?(t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var s=t.splitText(i.index);s.splitText(i[0].length);var o=s.cloneNode(!0);return n.appendChild(o),U(s,n),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{i(t)}))})(t),0);i(t)},Y="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var X={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const G=t=>null==t?null:Z(t),Z=t=>"boolean"==typeof t?t?"1":"0":t+"",tt=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),et=(t,e)=>{var i;return function(n,s){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,s)}),e)}},it=(t,e,i)=>{var n,s=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return s.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=s,e))n in o&&s.apply(t,o[n])},nt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},st=(t,e,i,n)=>{t.addEventListener(e,i,n)},ot=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),rt=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),at=t=>t.replace(/[\\"']/g,"\\$&"),lt=(t,e)=>{e&&t.append(e)};function ct(t,e){var i=Object.assign({},X,e),n=i.dataAttr,s=i.labelField,o=i.valueField,r=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!u&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(u=e.textContent)}var h,p,f,g,m,v,_={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(p=_.options,f={},g=1,m=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},v=(t,e)=>{var n=G(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(f.hasOwnProperty(n)){if(e){var l=f[n][a];l?Array.isArray(l)?l.push(e):f[n][a]=[l,e]:f[n][a]=e}}else{var c=m(t);c[s]=c[s]||t.textContent,c[o]=c[o]||n,c[r]=c[r]||t.disabled,c[a]=c[a]||e,c.$option=t,f[n]=c,p.push(c)}t.selected&&_.items.push(n)}},_.maxItems=t.hasAttribute("multiple")?null:1,D(t.children,(t=>{var e,i,n;"optgroup"===(h=t.tagName.toLowerCase())?((n=m(e=t))[l]=n[l]||e.getAttribute("label")||"",n[c]=n[c]||g++,n[r]=n[r]||e.disabled,_.optgroups.push(n),i=n[c],D(e.children,(t=>{v(t,i)}))):"option"===h&&v(t)}))):(()=>{const e=t.getAttribute(n);if(e)_.options=JSON.parse(e),D(_.options,(t=>{_.items.push(t[o])}));else{var r=t.value.trim()||"";if(!i.allowEmptyOption&&!r.length)return;const e=r.split(i.delimiter);D(e,(t=>{const e={};e[s]=t,e[o]=t,_.options.push(e)})),_.items=e}})(),Object.assign({},X,_,e)}var dt=0;class ut extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i;const n=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(n.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(n.plugins.settings[e]=t[e],s.push(e));for(;i=s.shift();)n.require(i)}loadPlugin(e){var i=this,n=i.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=s.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)}require(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]}}}(e)){constructor(t,e){var i;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],dt++;var n=j(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const s=ct(n,e);this.settings=s,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=rt(n,"tomselect-"+dt),this.isRequired=n.required,this.sifter=new P(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=t=>o.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=j("
"),a=j("
"),l=this._render("dropdown"),c=j('
'),d=this.input.getAttribute("class")||"",u=s.mode;var h;R(r,s.wrapperClass,d,u),R(a,s.controlClass),lt(r,a),R(l,s.dropdownClass,u),s.copyClassesToDropdown&&R(l,d),R(c,s.dropdownContentClass),lt(l,c),j(s.dropdownParent||r).appendChild(l),F(s.controlInput)?(h=j(s.controlInput),L(["autocorrect","autocapitalize","autocomplete"],(t=>{n.getAttribute(t)&&Q(h,{[t]:n.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=j(s.controlInput),this.focus_node=h):(h=j(""),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,s=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown";Q(s,{id:u}),Q(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const h=rt(c,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),g=t.focus.bind(t);if(f){st(f,"click",g),Q(f,{for:h});const e=rt(f,t.inputId+"-ts-label");Q(c,{"aria-labelledby":e}),Q(s,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");R([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&Q(l,{multiple:"multiple"}),e.placeholder&&Q(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=et(e.load,e.loadThrottle)),t.control_input.type=l.type,st(n,"mousemove",(()=>{t.ignoreHover=!1})),st(n,"mouseenter",(e=>{var i=V(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)}),{capture:!0}),st(n,"click",(e=>{const i=V(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),nt(e,!0))})),st(a,"click",(e=>{var n=V(e.target,"[data-ts-item]",a);n&&t.onItemSelect(e,n)?nt(e,!0):""==i.value&&(t.onClick(),nt(e,!0))})),st(c,"keydown",(e=>t.onKeyDown(e))),st(i,"keypress",(e=>t.onKeyPress(e))),st(i,"input",(e=>t.onInput(e))),st(c,"blur",(e=>t.onBlur(e))),st(c,"focus",(e=>t.onFocus(e))),st(i,"paste",(e=>t.onPaste(e)));const m=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!n.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==i&&t.isOpen?e.stopPropagation():nt(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};st(document,"mousedown",m),st(window,"scroll",v,d),st(window,"resize",v,d),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),f&&f.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,st(l,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():t.enable(),t.on("change",this.onChange),R(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),L(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
'+e(t[i])+"
",option:(t,i)=>"
"+i(t[e])+"
",item:(t,i)=>"
"+i(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?ct(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){M(this.input,"input"),M(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?nt(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);L(i,(t=>{G(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void nt(t)):void 0}nt(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&nt(t);else{switch(t.keyCode){case 65:if(ot(Y,t)&&""==e.control_input.value)return nt(t),void e.selectAll();break;case 27:return e.isOpen&&(nt(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void nt(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void nt(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),nt(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&nt(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),nt(t)),e.settings.create&&e.createItem()&&nt(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ot(Y,t)&&nt(t)}}onInput(t){var e=this;if(!e.isLocked){var i=e.inputValue();e.lastValue!==i&&(e.lastValue=i,e.settings.shouldLoad.call(e,i)&&e.load(i),e.refreshOptions(),e.trigger("type",i))}}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),void nt(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,(()=>{n.settings.closeAfterSelect&&n.close()})):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(nt(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;R(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||H(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,M(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){it(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=e&&e.type.toLowerCase())&&ot("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),n=s;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);nt(e)}else"click"===i&&ot(Y,e)||"keydown"===i&&ot("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&H(i,"last-active"),R(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),H(t,"active")}clearActiveItems(){H(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,Q(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),Q(t,{"aria-selected":"true"}),R(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,e):r{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(Q(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&Q(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,s=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(s,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=G(t.id);return!(e&&-1!==n.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,i,n,s,o,r,a,l,c,d;const u={},h=[];var p=this,f=p.inputValue();const g=f===p.lastQuery||""==f&&null==p.lastQuery;var m,v=p.search(f),_=null,b=p.settings.shouldOpen||!1,y=p.dropdown_content;for(g&&(_=p.activeOption)&&(c=_.closest("[data-group]")),s=v.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(b=!0),e=0;e0&&(d=d.cloneNode(!0),Q(d,{id:a.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),H(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(_=d)),t.appendChild(d),u[o]=t}}p.settings.lockOptgroupOrder&&h.sort(((t,e)=>{const i=p.optgroups[t],n=p.optgroups[e];return(i&&i.$order||0)-(n&&n.$order||0)})),a=document.createDocumentFragment(),L(h,(t=>{let e=u[t];if(!e||!e.children.length)return;let i=p.optgroups[t];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);lt(t,n),lt(t,e);let s=p.render("optgroup",{group:i,options:t});lt(a,s)}else lt(a,e)})),y.innerHTML="",lt(y,a),p.settings.highlight&&(m=y.querySelectorAll("span.highlight"),Array.prototype.forEach.call(m,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),v.query.length&&v.tokens.length&&L(v.tokens,(t=>{J(y,t.regex)})));var w=t=>{let e=p.render(t,{input:f});return e&&(b=!0,y.insertBefore(e,y.firstChild)),e};if(p.loading?w("loading"):p.settings.shouldLoad.call(p,f)?0===v.items.length&&w("no_results"):w("not_loading"),(l=p.canCreate(f))&&(d=w("option_create")),p.hasOptions=v.items.length>0||l,b){if(v.items.length>0){if(_||"single"!==p.settings.mode||null==p.items[0]||(_=p.getOption(p.items[0])),!y.contains(_)){let t=0;d&&!p.settings.addPrecedence&&(t=1),_=p.selectable()[t]}}else d&&(_=d);t&&!p.isOpen&&(p.open(),p.scrollToOption(_,"auto")),p.setActiveOption(_)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=G(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){L(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=G(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,s;const o=G(t),r=G(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);U(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",e),c.classList.contains("active")&&R(n,"active"),U(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=Z(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};L(this.options,((t,n)=>{e(t,n)&&(i[n]=t)})),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=G(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=G(t);return null!==e?this.control.querySelector(`[data-value="${at(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const s=(n=n.filter((t=>-1===i.items.indexOf(t))))[n.length-1];n.forEach((t=>{i.isPending=t!==s,i.addItem(t,e)}))}addItem(t,e){it(this,e?[]:["change","dropdown_close"],(()=>{var i,n;const s=this,o=s.settings.mode,r=G(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,s;const o=t.dataset.value;n=K(t),t.remove(),t.classList.contains("active")&&(s=i.activeItems.indexOf(t),i.activeItems.splice(s,1),H(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,s=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=G(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(s),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;var s;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",(s=t.options,0===Object.keys(s).length)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,i,n){return t||(t=j('")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{i=e.options[t],n=i[e.settings.labelField]||"",o.includes(i.$option)?a(e.input.querySelector(`option[value="${at(t)}"]:not(:checked)`),t,n):i.$option=a(i.$option,t,n)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,Q(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),q(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),q(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,Q(e.focus_node,{"aria-expanded":"false"}),q(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;q(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();L(i,(t=>{e.removeItem(t,!0)})),e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,s,o,r=this;e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=B(r.activeItems,e),n=K(s),e>0&&n++,L(r.activeItems,(t=>a.push(t)));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(n=t[r.caretPos]),void 0!==n&&a.push(n)}if(!r.shouldDelete(a,t))return!1;for(nt(t,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map((t=>t.dataset.value));return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,s=this;s.rtl&&(t*=-1),s.inputValue().length||(ot(Y,e)||ot("shiftKey",e)?(n=(i=s.getLastActive(t))?i.classList.contains("active")?s.getAdjacent(i,t,"item"):i:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?B(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,H(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=s.settings.render[t].call(this,e,tt)))return null;if(n=j(n),"option"===t||"option_create"===t?e[s.settings.disabledField]?Q(n,{"aria-disabled":"true"}):Q(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[s.settings.optgroupValueField],Q(n,{"data-group":i}),e.group[s.settings.disabledField]&&Q(n,{"data-disabled":""})),"option"===t||"item"===t){const i=Z(e[s.settings.valueField]);Q(n,{"data-value":i}),"item"===t?(R(n,s.settings.itemClass),Q(n,{"data-ts-item":""})):(R(n,s.settings.optionClass),Q(n,{role:"option",id:e.$id}),e.$div=n,s.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){L(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,s=n[e];n[e]=function(){var e,o;return"after"===t&&(e=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=s.apply(n,arguments)),e)}}}return ut.define("change_listener",(function(){st(this.input,"change",(()=>{this.sync()}))})),ut.define("checkbox_options",(function(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var i=function(t){setTimeout((()=>{var e=t.querySelector("input");e instanceof HTMLInputElement&&(t.classList.contains("selected")?e.checked=!0:e.checked=!1)}),1)};t.hook("after","setupTemplates",(()=>{var e=t.settings.render.option;t.settings.render.option=(i,n)=>{var s=j(e.call(t,i,n)),o=document.createElement("input");o.addEventListener("click",(function(t){nt(t)})),o.type="checkbox";const r=G(i[t.settings.valueField]);return r&&t.items.indexOf(r)>-1&&(o.checked=!0),s.prepend(o),s}})),t.on("item_remove",(e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),i(n))})),t.on("item_add",(e=>{var n=t.getOption(e);n&&i(n)})),t.hook("instead","onOptionSelect",((n,s)=>{if(s.classList.contains("selected"))return s.classList.remove("selected"),t.removeItem(s.dataset.value),t.refreshOptions(),void nt(n,!0);e.call(t,n,s),i(s)}))})),ut.define("clear_button",(function(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`
`},t);e.on("initialize",(()=>{var t=j(i.html(i));t.addEventListener("click",(t=>{e.isDisabled||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),ut.define("drag_drop",(function(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,i=t.unlock;t.hook("instead","lock",(()=>{var i=$(t.control).data("sortable");return i&&i.disable(),e.call(t)})),t.hook("instead","unlock",(()=>{var e=$(t.control).data("sortable");return e&&e.enable(),i.call(t)})),t.on("initialize",(()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,i)=>{i.placeholder.css("width",i.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var i=[];e.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),t.setValue(i)}})}))}})),ut.define("dropdown_header",(function(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'
'+t.title+'×
'},t);e.on("initialize",(()=>{var t=j(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",(t=>{nt(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),ut.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((i,n)=>{n{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=K(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),H(i,"last-active")}else t.setCaret(t.caretPos+e)}))})),ut.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,R(t.control_input,"dropdown-input");const e=j('")}},plugins:{dropdown_input:{}}};return null===t.getAttribute("required")&&null===t.getAttribute("disabled")&&(e.plugins.clear_button={title:""}),null!==t.getAttribute("multiple")&&(e.plugins.remove_button={title:""}),null!==t.getAttribute("data-ea-autocomplete-endpoint-url")&&(e.plugins.virtual_scroll={}),"true"===t.getAttribute("data-ea-autocomplete-allow-item-create")&&(e.create=!0),e}function x(t){var e=g(this,w,k).call(this,g(this,m,A).call(this,t),{maxOptions:null});return new(a())(t,e)}function E(t){for(var e=[],i=0;i".concat(t.label_raw,"
")},option:function(t,e){return"
".concat(t.label_raw,"
")}}});return new(a())(t,o)}function S(t,e){var i=g(this,w,k).call(this,g(this,m,A).call(this,t),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(t){return e+"&query="+encodeURIComponent(t)},load:function(t,e){var i=this,n=this.getUrl(t);fetch(n).then((function(t){return t.json()})).then((function(n){i.setNextUrl(t,n.next_page),e(n.results)})).catch((function(){return e()}))},preload:"focus",maxOptions:null,score:function(t){return function(t){return 1}},render:{option:function(t,e){return"
".concat(t.entityAsString,"
")},item:function(t,e){return"
".concat(t.entityAsString,"
")},loading_more:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-loading-more-results"),"
")},no_more_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-more-results"),"
")},no_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-results-found"),"
")}}});return new(a())(t,i)}function C(t){return t.replace(/(<([^>]+)>)/gi,"")}function k(t,e){return d(d({},t),e)}function I(t,e){e?(t.classList.remove("d-block"),t.classList.add("d-none")):(t.classList.remove("d-none"),t.classList.add("d-block"))}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function L(t,e){for(var i=0;i
',fetch(e.getAttribute("href")).then((function(t){return t.text()})).then((function(e){s.innerHTML=e,F(t,U,ot).call(t),F(t,X,lt).call(t)})).catch((function(t){console.error(t)})),n.preventDefault()}));var n=function(t){t.closest("form").querySelectorAll('input[name^="filters['.concat(t.dataset.filterProperty,']"]')).forEach((function(t){t.remove()})),t.remove()};document.querySelector("#modal-clear-button").addEventListener("click",(function(){i.querySelectorAll(".filter-field").forEach((function(t){n(t)})),i.querySelector("form").submit()})),document.querySelector("#modal-apply-button").addEventListener("click",(function(){i.querySelectorAll(".filter-checkbox:not(:checked)").forEach((function(t){n(t.closest(".filter-field"))})),i.querySelector("form").submit()}))}}function st(){var t=null,e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",(function(){i.forEach((function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))}))}));var n=document.querySelector(".deselect-batch-button");null!==n&&n.addEventListener("click",(function(){e.checked=!1,e.dispatchEvent(new Event("change"))})),i.forEach((function(n,s){n.dataset.rowIndex=s,n.addEventListener("click",(function(e){if(t&&e.shiftKey){var n=parseInt(t.dataset.rowIndex),s=parseInt(e.target.dataset.rowIndex),o=e.target.checked,r=Math.min(n,s),a=Math.max(n,s);i.forEach((function(t,e){r<=e&&e<=a&&(t.checked=o,t.dispatchEvent(new Event("change")))}))}t=e.target})),n.addEventListener("change",(function(){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),i=n.closest("tr"),s=n.closest(".content");n.checked?i.classList.add("selected-row"):(i.classList.remove("selected-row"),e.checked=!1);var o=0!==t.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&I(r,o),null!==a&&I(a,o),null!==l&&I(l,o),null!==c&&I(c,!o)}))}));var s=document.querySelector("#batch-action-confirmation-title"),o=s.textContent;document.querySelectorAll("[data-action-batch]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e=t.currentTarget,i=e.textContent.trim()||e.getAttribute("title"),n=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked');s.textContent=o.replace("%action_name%",i).replace("%num_items%",n.length.toString()),document.querySelector("#modal-batch-action-button").addEventListener("click",(function(){e.setAttribute("disabled","disabled");var t={batchActionName:e.getAttribute("data-action-name"),entityFqcn:e.getAttribute("data-entity-fqcn"),batchActionUrl:e.getAttribute("data-action-url"),batchActionCsrfToken:e.getAttribute("data-action-csrf-token")};n.forEach((function(e,i){t["batchActionEntityIds[".concat(i,"]")]=e.value}));var i=document.createElement("form");for(var s in i.setAttribute("method","POST"),i.setAttribute("action",e.getAttribute("data-action-url")),t){var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",s),o.setAttribute("value",t[s]),i.appendChild(o)}document.body.appendChild(i),i.submit()}))}))}))}}function ot(){var t=new O;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach((function(e){t.create(e)}))}function rt(){document.querySelectorAll(".action-delete").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),document.querySelector("#modal-delete-button").addEventListener("click",(function(){var e=t.getAttribute("formaction"),i=document.querySelector("#delete-form");i.setAttribute("action",e),i.submit()}))}))}))}function at(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach((function(t){new(e().Popover)(t)}))}function lt(){document.querySelectorAll(".filter-checkbox").forEach((function(t){t.addEventListener("change",(function(){var e=t.nextElementSibling,i=t.nextElementSibling.getAttribute("aria-expanded");(t.checked&&"false"===i||!t.checked&&"true"===i)&&e.click()}))})),document.querySelectorAll("form[data-ea-filters-form-id]").forEach((function(t){t.addEventListener("change",(function(t){if(!t.target.classList.contains("filter-checkbox")){var e=t.target.closest(".filter-field").querySelector(".filter-checkbox");e.checked||(e.checked=!0)}}))})),document.querySelectorAll("[data-ea-comparison-id]").forEach((function(t){t.addEventListener("change",(function(t){var e=t.currentTarget,i=e.dataset.eaComparisonId;if(void 0!==i){var n=document.querySelector('[data-ea-value2-of-comparison-id="'.concat(i,'"]'));null!==n&&I(n,"between"!==e.value)}}))}))}})()})(); \ No newline at end of file +/*! For license information please see app.a937f82e.js.LICENSE.txt */ +(()=>{var t={5577:function(t){t.exports=function(){"use strict";const t=1e6,e=1e3,i="transitionend",n=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),s=e=>{do{e+=Math.floor(Math.random()*t)}while(document.getElementById(e));return e},o=t=>{let e=t.getAttribute("data-bs-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},r=t=>{const e=o(t);return e&&document.querySelector(e)?e:null},a=t=>{const e=o(t);return e?document.querySelector(e):null},l=t=>{if(!t)return 0;let{transitionDuration:i,transitionDelay:n}=window.getComputedStyle(t);const s=Number.parseFloat(i),o=Number.parseFloat(n);return s||o?(i=i.split(",")[0],n=n.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(n))*e):0},c=t=>{t.dispatchEvent(new Event(i))},d=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),u=t=>d(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=t=>{if(!d(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},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")),f=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?f(t.parentNode):null},g=()=>{},m=t=>{t.offsetHeight},v=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,_=[],b=t=>{"loading"===document.readyState?(_.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of _)t()})),_.push(t)):t()},y=()=>"rtl"===document.documentElement.dir,w=t=>{b((()=>{const e=v();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}}))},O=t=>{"function"==typeof t&&t()},A=(t,e,n=!0)=>{if(!n)return void O(t);const s=5,o=l(e)+s;let r=!1;const a=({target:n})=>{n===e&&(r=!0,e.removeEventListener(i,a),O(t))};e.addEventListener(i,a),setTimeout((()=>{r||c(e)}),o)},x=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},E=/[^.]*(?=\..*)\.|.*/,S=/\..*/,C=/::\d+$/,k={};let I=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},L=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 N(t,e){return e&&`${e}::${I++}`||t.uidEvent||I++}function $(t){const e=N(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e){return function i(n){return z(n,{delegateTarget:t}),i.oneOff&&W.off(t,n.type,e),e.apply(t,[n])}}function D(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return z(s,{delegateTarget:r}),n.oneOff&&W.off(t,s.type,e,i),i.apply(r,[s])}}function j(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function F(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=H(t);return L.has(o)||(o=t),[n,s,o]}function M(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=F(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=$(t),c=l[a]||(l[a]={}),d=j(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=N(r,e.replace(E,"")),h=o?D(t,i,r):P(t,r);h.delegationSelector=o?i:null,h.callable=r,h.oneOff=s,h.uidEvent=u,c[u]=h,t.addEventListener(a,h,o)}function q(t,e,i,n,s){const o=j(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function R(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];q(t,e,i,n.callable,n.delegationSelector)}}function H(t){return t=t.replace(S,""),T[t]||t}const W={on(t,e,i,n){M(t,e,i,n,!1)},one(t,e,i,n){M(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=F(e,i,n),a=r!==e,l=$(t),c=l[r]||{},d=e.startsWith(".");if(void 0===o){if(d)for(const i of Object.keys(l))R(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(C,"");if(!a||e.includes(n)){const e=c[i];q(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;q(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=v();let s=null,o=!0,r=!0,a=!1;e!==H(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=z(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function z(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const V=new Map,B={set(t,e,i){V.has(t)||V.set(t,new Map);const n=V.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>V.has(t)&&V.get(t).get(e)||null,remove(t,e){if(!V.has(t))return;const i=V.get(t);i.delete(e),0===i.size&&V.delete(t)}};function K(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(e){return t}}function Q(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const U={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${Q(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Q(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=K(t.dataset[n])}return e},getDataAttribute:(t,e)=>K(t.getAttribute(`data-bs-${Q(e)}`))};class J{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=d(e)?U.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...d(e)?U.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const i of Object.keys(e)){const s=e[i],o=t[i],r=d(o)?"element":n(o);if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}}}const Y="5.2.3";class X extends J{constructor(t,e){super(),(t=u(t))&&(this._element=t,this._config=this._getConfig(e),B.set(this._element,this.constructor.DATA_KEY,this))}dispose(){B.remove(this._element,this.constructor.DATA_KEY),W.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){A(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return B.get(u(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return Y}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const G=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;W.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),p(this))return;const s=a(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Z="alert",tt=".bs.alert",et=`close${tt}`,it=`closed${tt}`,nt="fade",st="show";class ot extends X{static get NAME(){return Z}close(){if(W.trigger(this._element,et).defaultPrevented)return;this._element.classList.remove(st);const t=this._element.classList.contains(nt);this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),W.trigger(this._element,it),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=ot.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}G(ot,"close"),w(ot);const rt="button",at="active",lt='[data-bs-toggle="button"]',ct="click.bs.button.data-api";class dt extends X{static get NAME(){return rt}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(at))}static jQueryInterface(t){return this.each((function(){const e=dt.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}W.on(document,ct,lt,(t=>{t.preventDefault();const e=t.target.closest(lt);dt.getOrCreateInstance(e).toggle()})),w(dt);const ut={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!p(t)&&h(t)))}},ht="swipe",pt=".bs.swipe",ft=`touchstart${pt}`,gt=`touchmove${pt}`,mt=`touchend${pt}`,vt=`pointerdown${pt}`,_t=`pointerup${pt}`,bt="touch",yt="pen",wt="pointer-event",Ot=40,At={endCallback:null,leftCallback:null,rightCallback:null},xt={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Et extends J{constructor(t,e){super(),this._element=t,t&&Et.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return At}static get DefaultType(){return xt}static get NAME(){return ht}dispose(){W.off(this._element,pt)}_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(),O(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<=Ot)return;const e=t/this._deltaX;this._deltaX=0,e&&O(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(W.on(this._element,vt,(t=>this._start(t))),W.on(this._element,_t,(t=>this._end(t))),this._element.classList.add(wt)):(W.on(this._element,ft,(t=>this._start(t))),W.on(this._element,gt,(t=>this._move(t))),W.on(this._element,mt,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===yt||t.pointerType===bt)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const St="carousel",Ct=".bs.carousel",kt=".data-api",It=500,Tt="next",Lt="prev",Nt="left",$t="right",Pt=`slide${Ct}`,Dt=`slid${Ct}`,jt=`keydown${Ct}`,Ft=`mouseenter${Ct}`,Mt=`mouseleave${Ct}`,qt=`dragstart${Ct}`,Rt=`load${Ct}${kt}`,Ht=`click${Ct}${kt}`,Wt="carousel",zt="active",Vt="slide",Bt="carousel-item-end",Kt="carousel-item-start",Qt="carousel-item-next",Ut="carousel-item-prev",Jt=".active",Yt=".carousel-item",Xt=Jt+Yt,Gt=".carousel-item img",Zt=".carousel-indicators",te="[data-bs-slide], [data-bs-slide-to]",ee='[data-bs-ride="carousel"]',ie={ArrowLeft:$t,ArrowRight:Nt},ne={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class oe extends X{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ut.findOne(Zt,this._element),this._addEventListeners(),this._config.ride===Wt&&this.cycle()}static get Default(){return ne}static get DefaultType(){return se}static get NAME(){return St}next(){this._slide(Tt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(Lt)}pause(){this._isSliding&&c(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?W.one(this._element,Dt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void W.one(this._element,Dt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Tt:Lt;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&W.on(this._element,jt,(t=>this._keydown(t))),"hover"===this._config.pause&&(W.on(this._element,Ft,(()=>this.pause())),W.on(this._element,Mt,(()=>this._maybeEnableCycle()))),this._config.touch&&Et.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ut.find(Gt,this._element))W.on(t,qt,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(Nt)),rightCallback:()=>this._slide(this._directionToOrder($t)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),It+this._config.interval))}};this._swipeHelper=new Et(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ie[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=ut.findOne(Jt,this._indicatorsElement);e.classList.remove(zt),e.removeAttribute("aria-current");const i=ut.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(zt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Tt,s=e||x(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>W.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Pt).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?Kt:Bt,c=n?Qt:Ut;s.classList.add(c),m(s),i.classList.add(l),s.classList.add(l);const d=()=>{s.classList.remove(l,c),s.classList.add(zt),i.classList.remove(zt,c,l),this._isSliding=!1,r(Dt)};this._queueCallback(d,i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains(Vt)}_getActive(){return ut.findOne(Xt,this._element)}_getItems(){return ut.find(Yt,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return y()?t===Nt?Lt:Tt:t===Nt?Tt:Lt}_orderToDirection(t){return y()?t===Lt?Nt:$t:t===Lt?$t:Nt}static jQueryInterface(t){return this.each((function(){const e=oe.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}W.on(document,Ht,te,(function(t){const e=a(this);if(!e||!e.classList.contains(Wt))return;t.preventDefault();const i=oe.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===U.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),W.on(window,Rt,(()=>{const t=ut.find(ee);for(const e of t)oe.getOrCreateInstance(e)})),w(oe);const re="collapse",ae=".bs.collapse",le=`show${ae}`,ce=`shown${ae}`,de=`hide${ae}`,ue=`hidden${ae}`,he=`click${ae}.data-api`,pe="show",fe="collapse",ge="collapsing",me="collapsed",ve=`:scope .${fe} .${fe}`,_e="collapse-horizontal",be="width",ye="height",we=".collapse.show, .collapse.collapsing",Oe='[data-bs-toggle="collapse"]',Ae={parent:null,toggle:!0},xe={parent:"(null|element)",toggle:"boolean"};class Ee extends X{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=ut.find(Oe);for(const t of i){const e=r(t),i=ut.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ae}static get DefaultType(){return xe}static get NAME(){return re}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(we).filter((t=>t!==this._element)).map((t=>Ee.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(W.trigger(this._element,le).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(fe),this._element.classList.add(ge),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe,pe),this._element.style[e]="",W.trigger(this._element,ce)},n=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[e]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(W.trigger(this._element,de).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,m(this._element),this._element.classList.add(ge),this._element.classList.remove(fe,pe);for(const t of this._triggerArray){const e=a(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const e=()=>{this._isTransitioning=!1,this._element.classList.remove(ge),this._element.classList.add(fe),W.trigger(this._element,ue)};this._element.style[t]="",this._queueCallback(e,this._element,!0)}_isShown(t=this._element){return t.classList.contains(pe)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=u(t.parent),t}_getDimension(){return this._element.classList.contains(_e)?be:ye}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Oe);for(const e of t){const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ut.find(ve,this._config.parent);return ut.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle(me,!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=Ee.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}W.on(document,he,Oe,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=r(this),i=ut.find(e);for(const t of i)Ee.getOrCreateInstance(t,{toggle:!1}).toggle()})),w(Ee);var Se="top",Ce="bottom",ke="right",Ie="left",Te="auto",Le=[Se,Ce,ke,Ie],Ne="start",$e="end",Pe="clippingParents",De="viewport",je="popper",Fe="reference",Me=Le.reduce((function(t,e){return t.concat([e+"-"+Ne,e+"-"+$e])}),[]),qe=[].concat(Le,[Te]).reduce((function(t,e){return t.concat([e,e+"-"+Ne,e+"-"+$e])}),[]),Re="beforeRead",He="read",We="afterRead",ze="beforeMain",Ve="main",Be="afterMain",Ke="beforeWrite",Qe="write",Ue="afterWrite",Je=[Re,He,We,ze,Ve,Be,Ke,Qe,Ue];function Ye(t){return t?(t.nodeName||"").toLowerCase():null}function Xe(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ge(t){return t instanceof Xe(t).Element||t instanceof Element}function Ze(t){return t instanceof Xe(t).HTMLElement||t instanceof HTMLElement}function ti(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Xe(t).ShadowRoot||t instanceof ShadowRoot)}function ei(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];Ze(s)&&Ye(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))}function ii(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});Ze(n)&&Ye(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}}const ni={name:"applyStyles",enabled:!0,phase:"write",fn:ei,effect:ii,requires:["computeStyles"]};function si(t){return t.split("-")[0]}var oi=Math.max,ri=Math.min,ai=Math.round;function li(){var t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function ci(){return!/^((?!chrome|android).)*safari/i.test(li())}function di(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&Ze(t)&&(s=t.offsetWidth>0&&ai(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ai(n.height)/t.offsetHeight||1);var r=(Ge(t)?Xe(t):window).visualViewport,a=!ci()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,d=n.width/s,u=n.height/o;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l,x:l,y:c}}function ui(t){var e=di(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function hi(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ti(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function pi(t){return Xe(t).getComputedStyle(t)}function fi(t){return["table","td","th"].indexOf(Ye(t))>=0}function gi(t){return((Ge(t)?t.ownerDocument:t.document)||window.document).documentElement}function mi(t){return"html"===Ye(t)?t:t.assignedSlot||t.parentNode||(ti(t)?t.host:null)||gi(t)}function vi(t){return Ze(t)&&"fixed"!==pi(t).position?t.offsetParent:null}function _i(t){var e=/firefox/i.test(li());if(/Trident/i.test(li())&&Ze(t)&&"fixed"===pi(t).position)return null;var i=mi(t);for(ti(i)&&(i=i.host);Ze(i)&&["html","body"].indexOf(Ye(i))<0;){var n=pi(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function bi(t){for(var e=Xe(t),i=vi(t);i&&fi(i)&&"static"===pi(i).position;)i=vi(i);return i&&("html"===Ye(i)||"body"===Ye(i)&&"static"===pi(i).position)?e:i||_i(t)||e}function yi(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function wi(t,e,i){return oi(t,ri(e,i))}function Oi(t,e,i){var n=wi(t,e,i);return n>i?i:n}function Ai(){return{top:0,right:0,bottom:0,left:0}}function xi(t){return Object.assign({},Ai(),t)}function Ei(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Si=function(t,e){return xi("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ei(t,Le))};function Ci(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=si(i.placement),l=yi(a),c=[Ie,ke].indexOf(a)>=0?"height":"width";if(o&&r){var d=Si(s.padding,i),u=ui(o),h="y"===l?Se:Ie,p="y"===l?Ce:ke,f=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=bi(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,_=f/2-g/2,b=d[h],y=v-u[c]-d[p],w=v/2-u[c]/2+_,O=wi(b,w,y),A=l;i.modifiersData[n]=((e={})[A]=O,e.centerOffset=O-w,e)}}function ki(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&hi(e.elements.popper,n)&&(e.elements.arrow=n)}const Ii={name:"arrow",enabled:!0,phase:"main",fn:Ci,effect:ki,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ti(t){return t.split("-")[1]}var Li={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ni(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:ai(e*n)/n||0,y:ai(i*n)/n||0}}function $i(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,u=t.isFixed,h=r.x,p=void 0===h?0:h,f=r.y,g=void 0===f?0:f,m="function"==typeof d?d({x:p,y:g}):{x:p,y:g};p=m.x,g=m.y;var v=r.hasOwnProperty("x"),_=r.hasOwnProperty("y"),b=Ie,y=Se,w=window;if(c){var O=bi(i),A="clientHeight",x="clientWidth";O===Xe(i)&&"static"!==pi(O=gi(i)).position&&"absolute"===a&&(A="scrollHeight",x="scrollWidth"),(s===Se||(s===Ie||s===ke)&&o===$e)&&(y=Ce,g-=(u&&O===w&&w.visualViewport?w.visualViewport.height:O[A])-n.height,g*=l?1:-1),s!==Ie&&(s!==Se&&s!==Ce||o!==$e)||(b=ke,p-=(u&&O===w&&w.visualViewport?w.visualViewport.width:O[x])-n.width,p*=l?1:-1)}var E,S=Object.assign({position:a},c&&Li),C=!0===d?Ni({x:p,y:g}):{x:p,y:g};return p=C.x,g=C.y,l?Object.assign({},S,((E={})[y]=_?"0":"",E[b]=v?"0":"",E.transform=(w.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",E)):Object.assign({},S,((e={})[y]=_?g+"px":"",e[b]=v?p+"px":"",e.transform="",e))}function Pi(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:si(e.placement),variation:Ti(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,$i(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,$i(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Di={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pi,data:{}};var ji={passive:!0};function Fi(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Xe(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,ji)})),a&&l.addEventListener("resize",i.update,ji),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,ji)})),a&&l.removeEventListener("resize",i.update,ji)}}const Mi={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Fi,data:{}};var qi={left:"right",right:"left",bottom:"top",top:"bottom"};function Ri(t){return t.replace(/left|right|bottom|top/g,(function(t){return qi[t]}))}var Hi={start:"end",end:"start"};function Wi(t){return t.replace(/start|end/g,(function(t){return Hi[t]}))}function zi(t){var e=Xe(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vi(t){return di(gi(t)).left+zi(t).scrollLeft}function Bi(t,e){var i=Xe(t),n=gi(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=ci();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+Vi(t),y:l}}function Ki(t){var e,i=gi(t),n=zi(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=oi(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=oi(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Vi(t),l=-n.scrollTop;return"rtl"===pi(s||i).direction&&(a+=oi(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Qi(t){var e=pi(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function Ui(t){return["html","body","#document"].indexOf(Ye(t))>=0?t.ownerDocument.body:Ze(t)&&Qi(t)?t:Ui(mi(t))}function Ji(t,e){var i;void 0===e&&(e=[]);var n=Ui(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Xe(n),r=s?[o].concat(o.visualViewport||[],Qi(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(Ji(mi(r)))}function Yi(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Xi(t,e){var i=di(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}function Gi(t,e,i){return e===De?Yi(Bi(t,i)):Ge(e)?Xi(e,i):Yi(Ki(gi(t)))}function Zi(t){var e=Ji(mi(t)),i=["absolute","fixed"].indexOf(pi(t).position)>=0&&Ze(t)?bi(t):t;return Ge(i)?e.filter((function(t){return Ge(t)&&hi(t,i)&&"body"!==Ye(t)})):[]}function tn(t,e,i,n){var s="clippingParents"===e?Zi(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=Gi(t,i,n);return e.top=oi(s.top,e.top),e.right=ri(s.right,e.right),e.bottom=ri(s.bottom,e.bottom),e.left=oi(s.left,e.left),e}),Gi(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function en(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?si(s):null,r=s?Ti(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case Se:e={x:a,y:i.y-n.height};break;case Ce:e={x:a,y:i.y+i.height};break;case ke:e={x:i.x+i.width,y:l};break;case Ie:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?yi(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case Ne:e[c]=e[c]-(i[d]/2-n[d]/2);break;case $e:e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function nn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.strategy,r=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?Pe:a,c=i.rootBoundary,d=void 0===c?De:c,u=i.elementContext,h=void 0===u?je:u,p=i.altBoundary,f=void 0!==p&&p,g=i.padding,m=void 0===g?0:g,v=xi("number"!=typeof m?m:Ei(m,Le)),_=h===je?Fe:je,b=t.rects.popper,y=t.elements[f?_:h],w=tn(Ge(y)?y:y.contextElement||gi(t.elements.popper),l,d,r),O=di(t.elements.reference),A=en({reference:O,element:b,strategy:"absolute",placement:s}),x=Yi(Object.assign({},b,A)),E=h===je?x:O,S={top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right},C=t.modifiersData.offset;if(h===je&&C){var k=C[s];Object.keys(S).forEach((function(t){var e=[ke,Ce].indexOf(t)>=0?1:-1,i=[Se,Ce].indexOf(t)>=0?"y":"x";S[t]+=k[i]*e}))}return S}function sn(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?qe:l,d=Ti(n),u=d?a?Me:Me.filter((function(t){return Ti(t)===d})):Le,h=u.filter((function(t){return c.indexOf(t)>=0}));0===h.length&&(h=u);var p=h.reduce((function(e,i){return e[i]=nn(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[si(i)],e}),{});return Object.keys(p).sort((function(t,e){return p[t]-p[e]}))}function on(t){if(si(t)===Te)return[];var e=Ri(t);return[Wi(t),e,Wi(e)]}function rn(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=e.options.placement,v=si(m),_=l||(v!==m&&f?on(m):[Ri(m)]),b=[m].concat(_).reduce((function(t,i){return t.concat(si(i)===Te?sn(e,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),y=e.rects.reference,w=e.rects.popper,O=new Map,A=!0,x=b[0],E=0;E=0,T=I?"width":"height",L=nn(e,{placement:S,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),N=I?k?ke:Ie:k?Ce:Se;y[T]>w[T]&&(N=Ri(N));var $=Ri(N),P=[];if(o&&P.push(L[C]<=0),a&&P.push(L[N]<=0,L[$]<=0),P.every((function(t){return t}))){x=S,A=!1;break}O.set(S,P)}if(A)for(var D=function(t){var e=b.find((function(e){var i=O.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return x=e,"break"},j=f?3:1;j>0&&"break"!==D(j);j--);e.placement!==x&&(e.modifiersData[n]._skip=!0,e.placement=x,e.reset=!0)}}const an={name:"flip",enabled:!0,phase:"main",fn:rn,requiresIfExists:["offset"],data:{_skip:!1}};function ln(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 cn(t){return[Se,ke,Ce,Ie].some((function(e){return t[e]>=0}))}function dn(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=nn(e,{elementContext:"reference"}),a=nn(e,{altBoundary:!0}),l=ln(r,n),c=ln(a,s,o),d=cn(l),u=cn(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const un={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:dn};function hn(t,e,i){var n=si(t),s=[Ie,Se].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[Ie,ke].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function pn(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=qe.reduce((function(t,i){return t[i]=hn(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}const fn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:pn};function gn(t){var e=t.state,i=t.name;e.modifiersData[i]=en({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const mn={name:"popperOffsets",enabled:!0,phase:"read",fn:gn,data:{}};function vn(t){return"x"===t?"y":"x"}function _n(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,f=i.tetherOffset,g=void 0===f?0:f,m=nn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=si(e.placement),_=Ti(e.placement),b=!_,y=yi(v),w=vn(y),O=e.modifiersData.popperOffsets,A=e.rects.reference,x=e.rects.popper,E="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),C=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(O){if(o){var I,T="y"===y?Se:Ie,L="y"===y?Ce:ke,N="y"===y?"height":"width",$=O[y],P=$+m[T],D=$-m[L],j=p?-x[N]/2:0,F=_===Ne?A[N]:x[N],M=_===Ne?-x[N]:-A[N],q=e.elements.arrow,R=p&&q?ui(q):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ai(),W=H[T],z=H[L],V=wi(0,A[N],R[N]),B=b?A[N]/2-j-V-W-S.mainAxis:F-V-W-S.mainAxis,K=b?-A[N]/2+j+V+z+S.mainAxis:M+V+z+S.mainAxis,Q=e.elements.arrow&&bi(e.elements.arrow),U=Q?"y"===y?Q.clientTop||0:Q.clientLeft||0:0,J=null!=(I=null==C?void 0:C[y])?I:0,Y=$+K-J,X=wi(p?ri(P,$+B-J-U):P,$,p?oi(D,Y):D);O[y]=X,k[y]=X-$}if(a){var G,Z="x"===y?Se:Ie,tt="x"===y?Ce:ke,et=O[w],it="y"===w?"height":"width",nt=et+m[Z],st=et-m[tt],ot=-1!==[Se,Ie].indexOf(v),rt=null!=(G=null==C?void 0:C[w])?G:0,at=ot?nt:et-A[it]-x[it]-rt+S.altAxis,lt=ot?et+A[it]+x[it]-rt-S.altAxis:st,ct=p&&ot?Oi(at,et,lt):wi(p?at:nt,et,p?lt:st);O[w]=ct,k[w]=ct-et}e.modifiersData[n]=k}}const bn={name:"preventOverflow",enabled:!0,phase:"main",fn:_n,requiresIfExists:["offset"]};function yn(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function wn(t){return t!==Xe(t)&&Ze(t)?yn(t):zi(t)}function On(t){var e=t.getBoundingClientRect(),i=ai(e.width)/t.offsetWidth||1,n=ai(e.height)/t.offsetHeight||1;return 1!==i||1!==n}function An(t,e,i){void 0===i&&(i=!1);var n=Ze(e),s=Ze(e)&&On(e),o=gi(e),r=di(t,s,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&(("body"!==Ye(e)||Qi(o))&&(a=wn(e)),Ze(e)?((l=di(e,!0)).x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Vi(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function xn(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}function En(t){var e=xn(t);return Je.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}function Sn(t){var e;return function(){return e||(e=new Promise((function(i){Promise.resolve().then((function(){e=void 0,i(t())}))}))),e}}function Cn(t){var e=t.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}var kn={placement:"bottom",modifiers:[],strategy:"absolute"};function In(){for(var t=arguments.length,e=new Array(t),i=0;iNumber.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)&&(U.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=ut.find(as,this._menu).filter((t=>h(t)));i.length&&x(i,e,t===Hn,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=_s.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t.button===Wn||"keyup"===t.type&&t.key!==qn)return;const e=ut.find(ns);for(const i of e){const e=_s.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&t.key===qn||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i=t.key===Mn,n=[Rn,Hn].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(is)?this:ut.prev(this,is)[0]||ut.next(this,is)[0]||ut.findOne(is,t.delegateTarget.parentNode),o=_s.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}W.on(document,Un,is,_s.dataApiKeydownHandler),W.on(document,Un,ss,_s.dataApiKeydownHandler),W.on(document,Qn,_s.clearMenus),W.on(document,Jn,_s.clearMenus),W.on(document,Qn,is,(function(t){t.preventDefault(),_s.getOrCreateInstance(this).toggle()})),w(_s);const bs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ys=".sticky-top",ws="padding-right",Os="margin-right";class As{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,ws,(e=>e+t)),this._setElementAttributes(bs,ws,(e=>e+t)),this._setElementAttributes(ys,Os,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ws),this._resetElementAttributes(bs,ws),this._resetElementAttributes(ys,Os)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth(),s=t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)};this._applyManipulationCallback(t,s)}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&U.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){const i=t=>{const i=U.getDataAttribute(t,e);null!==i?(U.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)};this._applyManipulationCallback(t,i)}_applyManipulationCallback(t,e){if(d(t))e(t);else for(const i of ut.find(t,this._element))e(i)}}const xs="backdrop",Es="fade",Ss="show",Cs=`mousedown.bs.${xs}`,ks={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Is={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Ts extends J{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return ks}static get DefaultType(){return Is}static get NAME(){return xs}show(t){if(!this._config.isVisible)return void O(t);this._append();const e=this._getElement();this._config.isAnimated&&m(e),e.classList.add(Ss),this._emulateAnimation((()=>{O(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ss),this._emulateAnimation((()=>{this.dispose(),O(t)}))):O(t)}dispose(){this._isAppended&&(W.off(this._element,Cs),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(Es),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=u(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),W.on(t,Cs,(()=>{O(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){A(t,this._getElement(),this._config.isAnimated)}}const Ls="focustrap",Ns=".bs.focustrap",$s=`focusin${Ns}`,Ps=`keydown.tab${Ns}`,Ds="Tab",js="forward",Fs="backward",Ms={autofocus:!0,trapElement:null},qs={autofocus:"boolean",trapElement:"element"};class Rs extends J{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Ms}static get DefaultType(){return qs}static get NAME(){return Ls}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),W.off(document,Ns),W.on(document,$s,(t=>this._handleFocusin(t))),W.on(document,Ps,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,W.off(document,Ns))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=ut.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Fs?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){t.key===Ds&&(this._lastTabNavDirection=t.shiftKey?Fs:js)}}const Hs="modal",Ws=".bs.modal",zs="Escape",Vs=`hide${Ws}`,Bs=`hidePrevented${Ws}`,Ks=`hidden${Ws}`,Qs=`show${Ws}`,Us=`shown${Ws}`,Js=`resize${Ws}`,Ys=`click.dismiss${Ws}`,Xs=`mousedown.dismiss${Ws}`,Gs=`keydown.dismiss${Ws}`,Zs=`click${Ws}.data-api`,to="modal-open",eo="fade",io="show",no="modal-static",so=".modal.show",oo=".modal-dialog",ro=".modal-body",ao='[data-bs-toggle="modal"]',lo={backdrop:!0,focus:!0,keyboard:!0},co={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class uo extends X{constructor(t,e){super(t,e),this._dialog=ut.findOne(oo,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new As,this._addEventListeners()}static get Default(){return lo}static get DefaultType(){return co}static get NAME(){return Hs}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||W.trigger(this._element,Qs,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(to),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(W.trigger(this._element,Vs).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(io),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])W.off(t,Ws);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ts({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Rs({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=ut.findOne(ro,this._dialog);e&&(e.scrollTop=0),m(this._element),this._element.classList.add(io);const i=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,W.trigger(this._element,Us,{relatedTarget:t})};this._queueCallback(i,this._dialog,this._isAnimated())}_addEventListeners(){W.on(this._element,Gs,(t=>{if(t.key===zs)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),W.on(window,Js,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),W.on(this._element,Xs,(t=>{W.one(this._element,Ys,(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(to),this._resetAdjustments(),this._scrollBar.reset(),W.trigger(this._element,Ks)}))}_isAnimated(){return this._element.classList.contains(eo)}_triggerBackdropTransition(){if(W.trigger(this._element,Bs).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(no)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(no),this._queueCallback((()=>{this._element.classList.remove(no),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=y()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=y()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=uo.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}W.on(document,Zs,ao,(function(t){const e=a(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),W.one(e,Qs,(t=>{t.defaultPrevented||W.one(e,Ks,(()=>{h(this)&&this.focus()}))}));const i=ut.findOne(so);i&&uo.getInstance(i).hide(),uo.getOrCreateInstance(e).toggle(this)})),G(uo),w(uo);const ho="offcanvas",po=".bs.offcanvas",fo=".data-api",go=`load${po}${fo}`,mo="Escape",vo="show",_o="showing",bo="hiding",yo="offcanvas-backdrop",wo=".offcanvas.show",Oo=`show${po}`,Ao=`shown${po}`,xo=`hide${po}`,Eo=`hidePrevented${po}`,So=`hidden${po}`,Co=`resize${po}`,ko=`click${po}${fo}`,Io=`keydown.dismiss${po}`,To='[data-bs-toggle="offcanvas"]',Lo={backdrop:!0,keyboard:!0,scroll:!1},No={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class $o extends X{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Lo}static get DefaultType(){return No}static get NAME(){return ho}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown)return;if(W.trigger(this._element,Oo,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||(new As).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_o);const e=()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(vo),this._element.classList.remove(_o),W.trigger(this._element,Ao,{relatedTarget:t})};this._queueCallback(e,this._element,!0)}hide(){if(!this._isShown)return;if(W.trigger(this._element,xo).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(bo),this._backdrop.hide();const t=()=>{this._element.classList.remove(vo,bo),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new As).reset(),W.trigger(this._element,So)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{"static"!==this._config.backdrop?this.hide():W.trigger(this._element,Eo)},e=Boolean(this._config.backdrop);return new Ts({className:yo,isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?t:null})}_initializeFocusTrap(){return new Rs({trapElement:this._element})}_addEventListeners(){W.on(this._element,Io,(t=>{t.key===mo&&(this._config.keyboard?this.hide():W.trigger(this._element,Eo))}))}static jQueryInterface(t){return this.each((function(){const e=$o.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)}}))}}W.on(document,ko,To,(function(t){const e=a(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this))return;W.one(e,So,(()=>{h(this)&&this.focus()}));const i=ut.findOne(wo);i&&i!==e&&$o.getInstance(i).hide(),$o.getOrCreateInstance(e).toggle(this)})),W.on(window,go,(()=>{for(const t of ut.find(wo))$o.getOrCreateInstance(t).show()})),W.on(window,Co,(()=>{for(const t of ut.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&$o.getOrCreateInstance(t).hide()})),G($o),w($o);const Po=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Do=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,jo=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Fo=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Po.has(i)||Boolean(Do.test(t.nodeValue)||jo.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Mo={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function qo(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Fo(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}const Ro="TemplateFactory",Ho={allowList:Mo,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Wo={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},zo={entry:"(string|element|function|null)",selector:"(string|element)"};class Vo extends J{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Ho}static get DefaultType(){return Wo}static get NAME(){return Ro}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[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);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},zo)}_setContent(t,e,i){const n=ut.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?d(e)?this._putElementInTemplate(u(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?qo(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Bo="tooltip",Ko=new Set(["sanitize","allowList","sanitizeFn"]),Qo="fade",Uo="show",Jo=".tooltip-inner",Yo=".modal",Xo="hide.bs.modal",Go="hover",Zo="focus",tr="click",er="manual",ir="hide",nr="hidden",sr="show",or="shown",rr="inserted",ar="click",lr="focusin",cr="focusout",dr="mouseenter",ur="mouseleave",hr={AUTO:"auto",TOP:"top",RIGHT:y()?"left":"right",BOTTOM:"bottom",LEFT:y()?"right":"left"},pr={allowList:Mo,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},fr={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"};class gr extends X{constructor(t,e){if(void 0===Pn)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 pr}static get DefaultType(){return fr}static get NAME(){return Bo}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),W.off(this._element.closest(Yo),Xo,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-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=W.trigger(this._element,this.constructor.eventName(sr)),e=(f(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:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),W.trigger(this._element,this.constructor.eventName(rr))),this._popper=this._createPopper(i),i.classList.add(Uo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.on(t,"mouseover",g);const s=()=>{W.trigger(this._element,this.constructor.eventName(or)),!1===this._isHovered&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if(W.trigger(this._element,this.constructor.eventName(ir)).defaultPrevented)return;if(this._getTipElement().classList.remove(Uo),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))W.off(t,"mouseover",g);this._activeTrigger[tr]=!1,this._activeTrigger[Zo]=!1,this._activeTrigger[Go]=!1,this._isHovered=null;const t=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),W.trigger(this._element,this.constructor.eventName(nr)))};this._queueCallback(t,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(Qo,Uo),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=s(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Qo),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Vo({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Jo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Qo)}_isShown(){return this.tip&&this.tip.classList.contains(Uo)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=hr[e.toUpperCase()];return $n(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"function"==typeof t?t.call(this._element):t}_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,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)W.on(this._element,this.constructor.eventName(ar),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if(e!==er){const t=e===Go?this.constructor.eventName(dr):this.constructor.eventName(lr),i=e===Go?this.constructor.eventName(ur):this.constructor.eventName(cr);W.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Zo:Go]=!0,e._enter()})),W.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Zo:Go]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},W.on(this._element.closest(Yo),Xo,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-bs-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=U.getDataAttributes(this._element);for(const t of Object.keys(e))Ko.has(t)&&delete e[t];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:u(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 in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);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(t){return this.each((function(){const e=gr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(gr);const mr="popover",vr=".popover-header",_r=".popover-body",br={...gr.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yr={...gr.DefaultType,content:"(null|string|element|function)"};class wr extends gr{static get Default(){return br}static get DefaultType(){return yr}static get NAME(){return mr}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[vr]:this._getTitle(),[_r]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=wr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}w(wr);const Or="scrollspy",Ar=".bs.scrollspy",xr=`activate${Ar}`,Er=`click${Ar}`,Sr=`load${Ar}.data-api`,Cr="dropdown-item",kr="active",Ir='[data-bs-spy="scroll"]',Tr="[href]",Lr=".nav, .list-group",Nr=".nav-link",$r=`${Nr}, .nav-item > ${Nr}, .list-group-item`,Pr=".dropdown",Dr=".dropdown-toggle",jr={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Fr={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Mr extends X{constructor(t,e){super(t,e),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 jr}static get DefaultType(){return Fr}static get NAME(){return Or}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.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=u(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&&(W.off(this._config.target,Er),W.on(this._config.target,Er,Tr,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_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))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;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(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ut.find(Tr,this._config.target);for(const e of t){if(!e.hash||p(e))continue;const t=ut.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(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(kr),this._activateParents(t),W.trigger(this._element,xr,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(Cr))ut.findOne(Dr,t.closest(Pr)).classList.add(kr);else for(const e of ut.parents(t,Lr))for(const t of ut.prev(e,$r))t.classList.add(kr)}_clearActiveClass(t){t.classList.remove(kr);const e=ut.find(`${Tr}.${kr}`,t);for(const t of e)t.classList.remove(kr)}static jQueryInterface(t){return this.each((function(){const e=Mr.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]()}}))}}W.on(window,Sr,(()=>{for(const t of ut.find(Ir))Mr.getOrCreateInstance(t)})),w(Mr);const qr="tab",Rr=".bs.tab",Hr=`hide${Rr}`,Wr=`hidden${Rr}`,zr=`show${Rr}`,Vr=`shown${Rr}`,Br=`click${Rr}`,Kr=`keydown${Rr}`,Qr=`load${Rr}`,Ur="ArrowLeft",Jr="ArrowRight",Yr="ArrowUp",Xr="ArrowDown",Gr="active",Zr="fade",ta="show",ea="dropdown",ia=".dropdown-toggle",na=".dropdown-menu",sa=":not(.dropdown-toggle)",oa='.list-group, .nav, [role="tablist"]',ra=".nav-item, .list-group-item",aa='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',la=`.nav-link${sa}, .list-group-item${sa}, [role="tab"]${sa}, ${aa}`,ca=`.${Gr}[data-bs-toggle="tab"], .${Gr}[data-bs-toggle="pill"], .${Gr}[data-bs-toggle="list"]`;class da extends X{constructor(t){super(t),this._parent=this._element.closest(oa),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),W.on(this._element,Kr,(t=>this._keydown(t))))}static get NAME(){return qr}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?W.trigger(e,Hr,{relatedTarget:t}):null;W.trigger(t,zr,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){if(!t)return;t.classList.add(Gr),this._activate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),W.trigger(t,Vr,{relatedTarget:e})):t.classList.add(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_deactivate(t,e){if(!t)return;t.classList.remove(Gr),t.blur(),this._deactivate(a(t));const i=()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),W.trigger(t,Wr,{relatedTarget:e})):t.classList.remove(ta)};this._queueCallback(i,t,t.classList.contains(Zr))}_keydown(t){if(![Ur,Jr,Yr,Xr].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Jr,Xr].includes(t.key),i=x(this._getChildren().filter((t=>!p(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),da.getOrCreateInstance(i).show())}_getChildren(){return ut.find(la,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_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=a(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(ea))return;const n=(t,n)=>{const s=ut.findOne(t,i);s&&s.classList.toggle(n,e)};n(ia,Gr),n(na,ta),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Gr)}_getInnerElement(t){return t.matches(la)?t:ut.findOne(la,t)}_getOuterElement(t){return t.closest(ra)||t}static jQueryInterface(t){return this.each((function(){const e=da.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}W.on(document,Br,aa,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),p(this)||da.getOrCreateInstance(this).show()})),W.on(window,Qr,(()=>{for(const t of ut.find(ca))da.getOrCreateInstance(t)})),w(da);const ua="toast",ha=".bs.toast",pa=`mouseover${ha}`,fa=`mouseout${ha}`,ga=`focusin${ha}`,ma=`focusout${ha}`,va=`hide${ha}`,_a=`hidden${ha}`,ba=`show${ha}`,ya=`shown${ha}`,wa="fade",Oa="hide",Aa="show",xa="showing",Ea={animation:"boolean",autohide:"boolean",delay:"number"},Sa={animation:!0,autohide:!0,delay:5e3};class Ca extends X{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Sa}static get DefaultType(){return Ea}static get NAME(){return ua}show(){if(W.trigger(this._element,ba).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(wa);const t=()=>{this._element.classList.remove(xa),W.trigger(this._element,ya),this._maybeScheduleHide()};this._element.classList.remove(Oa),m(this._element),this._element.classList.add(Aa,xa),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown())return;if(W.trigger(this._element,va).defaultPrevented)return;const t=()=>{this._element.classList.add(Oa),this._element.classList.remove(xa,Aa),W.trigger(this._element,_a)};this._element.classList.add(xa),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Aa),super.dispose()}isShown(){return this._element.classList.contains(Aa)}_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(){W.on(this._element,pa,(t=>this._onInteraction(t,!0))),W.on(this._element,fa,(t=>this._onInteraction(t,!1))),W.on(this._element,ga,(t=>this._onInteraction(t,!0))),W.on(this._element,ma,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=Ca.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return G(Ca),w(Ca),{Alert:ot,Button:dt,Carousel:oe,Collapse:Ee,Dropdown:_s,Modal:uo,Offcanvas:$o,Popover:wr,ScrollSpy:Mr,Tab:da,Toast:Ca,Tooltip:gr}}()},312:(t,e,i)=>{"use strict";i.r(e)},6416:function(t){t.exports=function(){"use strict";function t(t,e){t.split(/\s+/).forEach((t=>{e(t)}))}class e{constructor(){this._events=void 0,this._events={}}on(e,i){t(e,(t=>{const e=this._events[t]||[];e.push(i),this._events[t]=e}))}off(e,i){var n=arguments.length;0!==n?t(e,(t=>{if(1===n)return void delete this._events[t];const e=this._events[t];void 0!==e&&(e.splice(e.indexOf(i),1),this._events[t]=e)})):this._events={}}trigger(e,...i){var n=this;t(e,(t=>{const e=n._events[t];void 0!==e&&e.forEach((t=>{t.apply(n,i)}))}))}}const i=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==a(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",n=t=>{if(!o(t))return t.join("");let e="",i=0;const n=()=>{i>1&&(e+="{"+i+"}")};return t.forEach(((s,o)=>{s!==t[o-1]?(n(),e+=s,i=1):i++})),n(),e},s=t=>{let e=c(t);return i(e)},o=t=>new Set(t).size!==t.length,r=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),a=t=>t.reduce(((t,e)=>Math.max(t,l(e))),0),l=t=>c(t).length,c=t=>Array.from(t),d=t=>{if(1===t.length)return[[t]];let e=[];const i=t.substring(1);return d(i).forEach((function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),n=i.slice(0),n.unshift(t.charAt(0)),e.push(n)})),e},u=[[0,65535]];let h,p;const f={},g={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in g){let e=g[t]||"";for(let i=0;it.normalize(e),_=t=>c(t).reduce(((t,e)=>t+b(e)),""),b=t=>(t=v(t).toLowerCase().replace(m,(t=>f[t]||"")),v(t,"NFC")),y=t=>{const e={},i=(t,i)=>{const n=e[t]||new Set,o=new RegExp("^"+s(n)+"$","iu");i.match(o)||(n.add(r(i)),e[t]=n)};for(let e of function*(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=_(e);i!=e.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}(t))i(e.folded,e.folded),i(e.folded,e.composed);return e},w=t=>{const e=y(t),n={};let o=[];for(let t in e){let i=e[t];i&&(n[t]=s(i)),t.length>1&&o.push(r(t))}o.sort(((t,e)=>e.length-t.length));const a=i(o);return p=new RegExp("^"+a,"u"),n},O=(t,e=1)=>(e=Math.max(e,t.length-1),i(d(t).map((t=>((t,e=1)=>{let i=0;return t=t.map((t=>(h[t]&&(i+=t.length),h[t]||t))),i>=e?n(t):""})(t,e))))),A=(t,e=!0)=>{let s=t.length>1?1:0;return i(t.map((t=>{let i=[];const o=e?t.length():t.length()-1;for(let e=0;e{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue;if(i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const n=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1;if(1!=t.length&&1!=i.length){if(t.starti.start)return!0;if(i.startt.start)return!0}}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class E{constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new E,n=JSON.parse(JSON.stringify(this.parts)),s=n.pop();for(const t of n)i.add(t);let o=e.substr.substring(0,t-s.start),r=o.length;return i.add({start:s.start,end:s.start+r,length:r,substr:o}),i}}const S=t=>{var e;void 0===h&&(h=w(e||u)),t=_(t);let i="",n=[new E];for(let e=0;e0){a=a.sort(((t,e)=>t.length()-e.length()));for(let t of a)x(t,n)||n.push(t)}else if(e>0&&1==l.size&&!l.has("3")){i+=A(n,!1);let t=new E;const e=n[0];e&&t.add(e.last()),n=[t]}}return i+=A(n,!0),i},C=(t,e)=>{if(t)return t[e]},k=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},I=(t,e,i)=>{var n,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(n=e.string.length/t.length,0===s&&(n+=.5),n*i)):0},T=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},L=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},N=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t(e=_(e+"").toLowerCase())?1:e>t?-1:0;class P{constructor(t,e){this.items=void 0,this.settings=void 0,this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],s=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(r).join("|")+"):(.*)$")),s.forEach((t=>{let i,s=null,a=null;o&&(i=t.match(o))&&(s=i[1],t=i[2]),t.length>0&&(a=this.settings.diacritics?S(t)||null:r(t),a&&e&&(a="\\b"+a)),n.push({string:t,regex:a?new RegExp(a,"iu"):null,field:s})})),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,s=t.weights,o=n.length,r=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return I(r(e,i),t,s[i]||1)}:function(t,e){var i=0;if(t.field){const n=r(e,t.field);!t.regex&&n?i+=1/o:i+=I(n,t,1)}else L(s,((n,s)=>{i+=I(r(e,s),t,n)}));return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,s=0;for(let i of e){if((n=a(i,t))<=0)return 0;s+=n}return s/i}:function(t){var n=0;return L(e,(e=>{n+=a(e,t)})),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter((t=>"$score"!==t.field));return i.length?function(t,e){var n,s;for(let o of i)if(s=o.field,n=("desc"===o.direction?-1:1)*N(r(s,t),r(s,e)))return n;return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(T(n,"sort"),T(n,"sort_empty"),n.fields){T(n,"fields");const t=[];n.fields.forEach((e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1})),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?k:C}}search(t,e){var i,n,s=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||s._getScoreFunction(n);t.length?L(s.items,((t,s)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:s})})):L(s.items,((t,e)=>{n.items.push({score:1,id:e})}));const r=s._getSortFunction(n);return r&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const D=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},j=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(F(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},F=t=>"string"==typeof t&&t.indexOf("<")>-1,M=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},q=(t,e)=>{Object.assign(t.style,e)},R=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.add(e)}))}))},H=(t,...e)=>{var i=W(e);(t=z(t)).map((t=>{i.map((e=>{t.classList.remove(e)}))}))},W=t=>{var e=[];return D(t,(t=>{"string"==typeof t&&(t=t.trim().split(/[\11\12\14\15\40]/)),Array.isArray(t)&&(e=e.concat(t))})),e.filter(Boolean)},z=t=>(Array.isArray(t)||(t=[t]),t),V=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},B=(t,e=0)=>e>0?t[t.length-1]:t[0],K=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},Q=(t,e)=>{D(e,((e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)}))},U=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},J=(t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>3===t.nodeType?(t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var s=t.splitText(i.index);s.splitText(i[0].length);var o=s.cloneNode(!0);return n.appendChild(o),U(s,n),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach((t=>{i(t)}))})(t),0);i(t)},Y="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var X={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};const G=t=>null==t?null:Z(t),Z=t=>"boolean"==typeof t?t?"1":"0":t+"",tt=t=>(t+"").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""),et=(t,e)=>{var i;return function(n,s){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,s)}),e)}},it=(t,e,i)=>{var n,s=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return s.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=s,e))n in o&&s.apply(t,o[n])},nt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},st=(t,e,i,n)=>{t.addEventListener(e,i,n)},ot=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),rt=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),at=t=>t.replace(/[\\"']/g,"\\$&"),lt=(t,e)=>{e&&t.append(e)};function ct(t,e){var i=Object.assign({},X,e),n=i.dataAttr,s=i.labelField,o=i.valueField,r=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!u&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(u=e.textContent)}var h,p,f,g,m,v,_={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(p=_.options,f={},g=1,m=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},v=(t,e)=>{var n=G(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(f.hasOwnProperty(n)){if(e){var l=f[n][a];l?Array.isArray(l)?l.push(e):f[n][a]=[l,e]:f[n][a]=e}}else{var c=m(t);c[s]=c[s]||t.textContent,c[o]=c[o]||n,c[r]=c[r]||t.disabled,c[a]=c[a]||e,c.$option=t,f[n]=c,p.push(c)}t.selected&&_.items.push(n)}},_.maxItems=t.hasAttribute("multiple")?null:1,D(t.children,(t=>{var e,i,n;"optgroup"===(h=t.tagName.toLowerCase())?((n=m(e=t))[l]=n[l]||e.getAttribute("label")||"",n[c]=n[c]||g++,n[r]=n[r]||e.disabled,_.optgroups.push(n),i=n[c],D(e.children,(t=>{v(t,i)}))):"option"===h&&v(t)}))):(()=>{const e=t.getAttribute(n);if(e)_.options=JSON.parse(e),D(_.options,(t=>{_.items.push(t[o])}));else{var r=t.value.trim()||"";if(!i.allowEmptyOption&&!r.length)return;const e=r.split(i.delimiter);D(e,(t=>{const e={};e[s]=t,e[o]=t,_.options.push(e)})),_.items=e}})(),Object.assign({},X,_,e)}var dt=0;class ut extends(function(t){return t.plugins={},class extends t{constructor(...t){super(...t),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i;const n=this,s=[];if(Array.isArray(t))t.forEach((t=>{"string"==typeof t?s.push(t):(n.plugins.settings[t.name]=t.options,s.push(t.name))}));else if(t)for(e in t)t.hasOwnProperty(e)&&(n.plugins.settings[e]=t[e],s.push(e));for(;i=s.shift();)n.require(i)}loadPlugin(e){var i=this,n=i.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=s.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)}require(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]}}}(e)){constructor(t,e){var i;super(),this.control_input=void 0,this.wrapper=void 0,this.dropdown=void 0,this.control=void 0,this.dropdown_content=void 0,this.focus_node=void 0,this.order=0,this.settings=void 0,this.input=void 0,this.tabIndex=void 0,this.is_select_tag=void 0,this.rtl=void 0,this.inputId=void 0,this._destroy=void 0,this.sifter=void 0,this.isOpen=!1,this.isDisabled=!1,this.isRequired=void 0,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.currentResults=void 0,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],dt++;var n=j(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const s=ct(n,e);this.settings=s,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=rt(n,"tomselect-"+dt),this.isRequired=n.required,this.sifter=new P(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=t=>o.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=j("
"),a=j("
"),l=this._render("dropdown"),c=j('
'),d=this.input.getAttribute("class")||"",u=s.mode;var h;R(r,s.wrapperClass,d,u),R(a,s.controlClass),lt(r,a),R(l,s.dropdownClass,u),s.copyClassesToDropdown&&R(l,d),R(c,s.dropdownContentClass),lt(l,c),j(s.dropdownParent||r).appendChild(l),F(s.controlInput)?(h=j(s.controlInput),L(["autocorrect","autocapitalize","autocomplete"],(t=>{n.getAttribute(t)&&Q(h,{[t]:n.getAttribute(t)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h):s.controlInput?(h=j(s.controlInput),this.focus_node=h):(h=j(""),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,s=t.dropdown_content,o=t.wrapper,a=t.control,l=t.input,c=t.focus_node,d={passive:!0},u=t.inputId+"-ts-dropdown";Q(s,{id:u}),Q(c,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const h=rt(c,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),g=t.focus.bind(t);if(f){st(f,"click",g),Q(f,{for:h});const e=rt(f,t.inputId+"-ts-label");Q(c,{"aria-labelledby":e}),Q(s,{"aria-labelledby":e})}if(o.style.width=l.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");R([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&Q(l,{multiple:"multiple"}),e.placeholder&&Q(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+r(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=et(e.load,e.loadThrottle)),t.control_input.type=l.type,st(n,"mousemove",(()=>{t.ignoreHover=!1})),st(n,"mouseenter",(e=>{var i=V(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)}),{capture:!0}),st(n,"click",(e=>{const i=V(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),nt(e,!0))})),st(a,"click",(e=>{var n=V(e.target,"[data-ts-item]",a);n&&t.onItemSelect(e,n)?nt(e,!0):""==i.value&&(t.onClick(),nt(e,!0))})),st(c,"keydown",(e=>t.onKeyDown(e))),st(i,"keypress",(e=>t.onKeyPress(e))),st(i,"input",(e=>t.onInput(e))),st(c,"blur",(e=>t.onBlur(e))),st(c,"focus",(e=>t.onFocus(e))),st(i,"paste",(e=>t.onPaste(e)));const m=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!n.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==i&&t.isOpen?e.stopPropagation():nt(e,!0)},v=()=>{t.isOpen&&t.positionDropdown()};st(document,"mousedown",m),st(window,"scroll",v,d),st(window,"resize",v,d),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",v),window.removeEventListener("resize",v),f&&f.removeEventListener("click",g)},this.revertSettings={innerHTML:l.innerHTML,tabIndex:l.tabIndex},l.tabIndex=-1,l.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,st(l,"invalid",(()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())})),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,l.disabled?t.disable():t.enable(),t.on("change",this.onChange),R(l,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),L(e,(t=>{this.registerOptionGroup(t)}))}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'
'+e(t[i])+"
",option:(t,i)=>"
"+i(t[e])+"
",item:(t,i)=>"
"+i(t[e])+"
",option_create:(t,e)=>'
Add '+e(t.input)+"
",no_results:()=>'
No results found
',loading:()=>'
',not_loading:()=>{},dropdown:()=>"
"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?ct(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){M(this.input,"input"),M(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?nt(t):e.settings.splitOn&&setTimeout((()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);L(i,(t=>{G(t)&&(this.options[t]?e.addItem(t):e.createItem(t))}))}}),0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void nt(t)):void 0}nt(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&nt(t);else{switch(t.keyCode){case 65:if(ot(Y,t)&&""==e.control_input.value)return nt(t),void e.selectAll();break;case 27:return e.isOpen&&(nt(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void nt(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void nt(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),nt(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&nt(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),nt(t)),e.settings.create&&e.createItem()&&nt(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!ot(Y,t)&&nt(t)}}onInput(t){var e=this;if(!e.isLocked){var i=e.inputValue();e.lastValue!==i&&(e.lastValue=i,e.settings.shouldLoad.call(e,i)&&e.load(i),e.refreshOptions(),e.trigger("type",i))}}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled)return e.blur(),void nt(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.showInput(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,(()=>{n.settings.closeAfterSelect&&n.close()})):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(nt(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;R(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||H(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,M(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){it(this,e?[]:["change"],(()=>{this.clear(e),this.addItems(t,e)}))}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=e&&e.type.toLowerCase())&&ot("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),n=s;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);nt(e)}else"click"===i&&ot(Y,e)||"keydown"===i&&ot("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&H(i,"last-active"),R(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),H(t,"active")}clearActiveItems(){H(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,Q(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),Q(t,{"aria-selected":"true"}),R(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,e):r{t.setActiveItemClass(e)})))}inputState(){var t=this;t.control.contains(t.control_input)&&(Q(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&Q(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout((()=>{t.ignoreFocus=!1,t.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,s=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(s,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter((t=>{let e=G(t.id);return!(e&&-1!==n.items.indexOf(e))}))),e}refreshOptions(t=!0){var e,i,n,s,o,r,a,l,c,d;const u={},h=[];var p=this,f=p.inputValue();const g=f===p.lastQuery||""==f&&null==p.lastQuery;var m,v=p.search(f),_=null,b=p.settings.shouldOpen||!1,y=p.dropdown_content;for(g&&(_=p.activeOption)&&(c=_.closest("[data-group]")),s=v.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(b=!0),e=0;e0&&(d=d.cloneNode(!0),Q(d,{id:a.$id+"-clone-"+i,"aria-selected":null}),d.classList.add("ts-cloned"),H(d,"active"),p.activeOption&&p.activeOption.dataset.value==s&&c&&c.dataset.group===o.toString()&&(_=d)),t.appendChild(d),u[o]=t}}p.settings.lockOptgroupOrder&&h.sort(((t,e)=>{const i=p.optgroups[t],n=p.optgroups[e];return(i&&i.$order||0)-(n&&n.$order||0)})),a=document.createDocumentFragment(),L(h,(t=>{let e=u[t];if(!e||!e.children.length)return;let i=p.optgroups[t];if(void 0!==i){let t=document.createDocumentFragment(),n=p.render("optgroup_header",i);lt(t,n),lt(t,e);let s=p.render("optgroup",{group:i,options:t});lt(a,s)}else lt(a,e)})),y.innerHTML="",lt(y,a),p.settings.highlight&&(m=y.querySelectorAll("span.highlight"),Array.prototype.forEach.call(m,(function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()})),v.query.length&&v.tokens.length&&L(v.tokens,(t=>{J(y,t.regex)})));var w=t=>{let e=p.render(t,{input:f});return e&&(b=!0,y.insertBefore(e,y.firstChild)),e};if(p.loading?w("loading"):p.settings.shouldLoad.call(p,f)?0===v.items.length&&w("no_results"):w("not_loading"),(l=p.canCreate(f))&&(d=w("option_create")),p.hasOptions=v.items.length>0||l,b){if(v.items.length>0){if(_||"single"!==p.settings.mode||null==p.items[0]||(_=p.getOption(p.items[0])),!y.contains(_)){let t=0;d&&!p.settings.addPrecedence&&(t=1),_=p.selectable()[t]}}else d&&(_=d);t&&!p.isOpen&&(p.open(),p.scrollToOption(_,"auto")),p.setActiveOption(_)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=G(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){L(t,(t=>{this.addOption(t,e)}))}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=G(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,s;const o=G(t),r=G(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=i.getOption(o),c=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);U(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}c&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",e),c.classList.contains("active")&&R(n,"active"),U(c,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=Z(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};L(this.options,((t,n)=>{e(t,n)&&(i[n]=t)})),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=G(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=G(t);return null!==e?this.control.querySelector(`[data-value="${at(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const s=(n=n.filter((t=>-1===i.items.indexOf(t))))[n.length-1];n.forEach((t=>{i.isPending=t!==s,i.addItem(t,e)}))}addItem(t,e){it(this,e?[]:["change","dropdown_close"],(()=>{var i,n;const s=this,o=s.settings.mode,r=G(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,s;const o=t.dataset.value;n=K(t),t.remove(),t.classList.contains("active")&&(s=i.activeItems.indexOf(t),i.activeItems.splice(s,1),H(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n{})){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,s=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=G(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(s),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;var s;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",(s=t.options,0===Object.keys(s).length)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,i,n){return t||(t=j('")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach((t=>{t.selected=!1})),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach((t=>{i=e.options[t],n=i[e.settings.labelField]||"",o.includes(i.$option)?a(e.input.querySelector(`option[value="${at(t)}"]:not(:checked)`),t,n):i.$option=a(i.$option,t,n)}))}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,Q(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),q(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),q(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.hideInput()),e.isOpen=!1,Q(e.focus_node,{"aria-expanded":"false"}),q(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;q(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();L(i,(t=>{e.removeItem(t,!0)})),e.showInput(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,s,o,r=this;e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=B(r.activeItems,e),n=K(s),e>0&&n++,L(r.activeItems,(t=>a.push(t)));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(n=t[r.caretPos]),void 0!==n&&a.push(n)}if(!r.shouldDelete(a,t))return!1;for(nt(t,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map((t=>t.dataset.value));return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,s=this;s.rtl&&(t*=-1),s.inputValue().length||(ot(Y,e)||ot("shiftKey",e)?(n=(i=s.getLastActive(t))?i.classList.contains("active")?s.getAdjacent(i,t,"item"):i:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?B(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var t=this;t.input.disabled=!0,t.control_input.disabled=!0,t.focus_node.tabIndex=-1,t.isDisabled=!0,this.close(),t.lock()}enable(){var t=this;t.input.disabled=!1,t.control_input.disabled=!1,t.focus_node.tabIndex=t.tabIndex,t.isDisabled=!1,t.unlock()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,H(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=s.settings.render[t].call(this,e,tt)))return null;if(n=j(n),"option"===t||"option_create"===t?e[s.settings.disabledField]?Q(n,{"aria-disabled":"true"}):Q(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[s.settings.optgroupValueField],Q(n,{"data-group":i}),e.group[s.settings.disabledField]&&Q(n,{"data-disabled":""})),"option"===t||"item"===t){const i=Z(e[s.settings.valueField]);Q(n,{"data-value":i}),"item"===t?(R(n,s.settings.itemClass),Q(n,{"data-ts-item":""})):(R(n,s.settings.optionClass),Q(n,{role:"option",id:e.$id}),e.$div=n,s.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){L(this.options,(t=>{t.$div&&(t.$div.remove(),delete t.$div)}))}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,s=n[e];n[e]=function(){var e,o;return"after"===t&&(e=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=s.apply(n,arguments)),e)}}}return ut.define("change_listener",(function(){st(this.input,"change",(()=>{this.sync()}))})),ut.define("checkbox_options",(function(){var t=this,e=t.onOptionSelect;t.settings.hideSelected=!1;var i=function(t){setTimeout((()=>{var e=t.querySelector("input");e instanceof HTMLInputElement&&(t.classList.contains("selected")?e.checked=!0:e.checked=!1)}),1)};t.hook("after","setupTemplates",(()=>{var e=t.settings.render.option;t.settings.render.option=(i,n)=>{var s=j(e.call(t,i,n)),o=document.createElement("input");o.addEventListener("click",(function(t){nt(t)})),o.type="checkbox";const r=G(i[t.settings.valueField]);return r&&t.items.indexOf(r)>-1&&(o.checked=!0),s.prepend(o),s}})),t.on("item_remove",(e=>{var n=t.getOption(e);n&&(n.classList.remove("selected"),i(n))})),t.on("item_add",(e=>{var n=t.getOption(e);n&&i(n)})),t.hook("instead","onOptionSelect",((n,s)=>{if(s.classList.contains("selected"))return s.classList.remove("selected"),t.removeItem(s.dataset.value),t.refreshOptions(),void nt(n,!0);e.call(t,n,s),i(s)}))})),ut.define("clear_button",(function(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`
`},t);e.on("initialize",(()=>{var t=j(i.html(i));t.addEventListener("click",(t=>{e.isDisabled||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())})),e.control.appendChild(t)}))})),ut.define("drag_drop",(function(){var t=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===t.settings.mode){var e=t.lock,i=t.unlock;t.hook("instead","lock",(()=>{var i=$(t.control).data("sortable");return i&&i.disable(),e.call(t)})),t.hook("instead","unlock",(()=>{var e=$(t.control).data("sortable");return e&&e.enable(),i.call(t)})),t.on("initialize",(()=>{var e=$(t.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:t.isLocked,start:(t,i)=>{i.placeholder.css("width",i.helper.css("width")),e.css({overflow:"visible"})},stop:()=>{e.css({overflow:"hidden"});var i=[];e.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),t.setValue(i)}})}))}})),ut.define("dropdown_header",(function(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'
'+t.title+'×
'},t);e.on("initialize",(()=>{var t=j(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",(t=>{nt(t,!0),e.close()})),e.dropdown.insertBefore(t,e.dropdown.firstChild)}))})),ut.define("caret_position",(function(){var t=this;t.hook("instead","setCaret",(e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEach(((i,n)=>{n{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const n=K(i);t.setCaret(e>0?n+1:n),t.setActiveItem(),H(i,"last-active")}else t.setCaret(t.caretPos+e)}))})),ut.define("dropdown_input",(function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",(()=>{t.focus_node=t.control,R(t.control_input,"dropdown-input");const e=j('")}},plugins:{dropdown_input:{}}};return null===t.getAttribute("required")&&null===t.getAttribute("disabled")&&(e.plugins.clear_button={title:""}),null!==t.getAttribute("multiple")&&(e.plugins.remove_button={title:""}),null!==t.getAttribute("data-ea-autocomplete-endpoint-url")&&(e.plugins.virtual_scroll={}),"true"===t.getAttribute("data-ea-autocomplete-allow-item-create")&&(e.create=!0),e}function x(t){var e=g(this,w,k).call(this,g(this,m,A).call(this,t),{maxOptions:null});return new(a())(t,e)}function E(t){for(var e=[],i=0;i".concat(t.label_raw,"
")},option:function(t,e){return"
".concat(t.label_raw,"
")}}});return new(a())(t,o)}function S(t,e){var i=g(this,w,k).call(this,g(this,m,A).call(this,t),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(t){return e+"&query="+encodeURIComponent(t)},load:function(t,e){var i=this,n=this.getUrl(t);fetch(n).then((function(t){return t.json()})).then((function(n){i.setNextUrl(t,n.next_page),e(n.results)})).catch((function(){return e()}))},preload:"focus",maxOptions:null,score:function(t){return function(t){return 1}},render:{option:function(t,e){return"
".concat(t.entityAsString,"
")},item:function(t,e){return"
".concat(e(t.entityAsString),"
")},loading_more:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-loading-more-results"),"
")},no_more_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-more-results"),"
")},no_results:function(e,i){return'
'.concat(t.getAttribute("data-ea-i18n-no-results-found"),"
")}}});return new(a())(t,i)}function C(t){return t.replace(/(<([^>]+)>)/gi,"")}function k(t,e){return d(d({},t),e)}function I(t,e){e?(t.classList.remove("d-block"),t.classList.add("d-none")):(t.classList.remove("d-none"),t.classList.add("d-block"))}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function L(t,e){for(var i=0;i
',fetch(e.getAttribute("href")).then((function(t){return t.text()})).then((function(e){s.innerHTML=e,F(t,U,ot).call(t),F(t,X,lt).call(t)})).catch((function(t){console.error(t)})),n.preventDefault()}));var n=function(t){t.closest("form").querySelectorAll('input[name^="filters['.concat(t.dataset.filterProperty,']"]')).forEach((function(t){t.remove()})),t.remove()};document.querySelector("#modal-clear-button").addEventListener("click",(function(){i.querySelectorAll(".filter-field").forEach((function(t){n(t)})),i.querySelector("form").submit()})),document.querySelector("#modal-apply-button").addEventListener("click",(function(){i.querySelectorAll(".filter-checkbox:not(:checked)").forEach((function(t){n(t.closest(".filter-field"))})),i.querySelector("form").submit()}))}}function st(){var t=null,e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",(function(){i.forEach((function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))}))}));var n=document.querySelector(".deselect-batch-button");null!==n&&n.addEventListener("click",(function(){e.checked=!1,e.dispatchEvent(new Event("change"))})),i.forEach((function(n,s){n.dataset.rowIndex=s,n.addEventListener("click",(function(e){if(t&&e.shiftKey){var n=parseInt(t.dataset.rowIndex),s=parseInt(e.target.dataset.rowIndex),o=e.target.checked,r=Math.min(n,s),a=Math.max(n,s);i.forEach((function(t,e){r<=e&&e<=a&&(t.checked=o,t.dispatchEvent(new Event("change")))}))}t=e.target})),n.addEventListener("change",(function(){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),i=n.closest("tr"),s=n.closest(".content");n.checked?i.classList.add("selected-row"):(i.classList.remove("selected-row"),e.checked=!1);var o=0!==t.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&I(r,o),null!==a&&I(a,o),null!==l&&I(l,o),null!==c&&I(c,!o)}))}));var s=document.querySelector("#batch-action-confirmation-title"),o=s.textContent;document.querySelectorAll("[data-action-batch]").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var e=t.currentTarget,i=e.textContent.trim()||e.getAttribute("title"),n=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked');s.textContent=o.replace("%action_name%",i).replace("%num_items%",n.length.toString()),document.querySelector("#modal-batch-action-button").addEventListener("click",(function(){e.setAttribute("disabled","disabled");var t={batchActionName:e.getAttribute("data-action-name"),entityFqcn:e.getAttribute("data-entity-fqcn"),batchActionUrl:e.getAttribute("data-action-url"),batchActionCsrfToken:e.getAttribute("data-action-csrf-token")};n.forEach((function(e,i){t["batchActionEntityIds[".concat(i,"]")]=e.value}));var i=document.createElement("form");for(var s in i.setAttribute("method","POST"),i.setAttribute("action",e.getAttribute("data-action-url")),t){var o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",s),o.setAttribute("value",t[s]),i.appendChild(o)}document.body.appendChild(i),i.submit()}))}))}))}}function ot(){var t=new O;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach((function(e){t.create(e)}))}function rt(){document.querySelectorAll(".action-delete").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),document.querySelector("#modal-delete-button").addEventListener("click",(function(){var e=t.getAttribute("formaction"),i=document.querySelector("#delete-form");i.setAttribute("action",e),i.submit()}))}))}))}function at(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach((function(t){new(e().Popover)(t)}))}function lt(){document.querySelectorAll(".filter-checkbox").forEach((function(t){t.addEventListener("change",(function(){var e=t.nextElementSibling,i=t.nextElementSibling.getAttribute("aria-expanded");(t.checked&&"false"===i||!t.checked&&"true"===i)&&e.click()}))})),document.querySelectorAll("form[data-ea-filters-form-id]").forEach((function(t){t.addEventListener("change",(function(t){if(!t.target.classList.contains("filter-checkbox")){var e=t.target.closest(".filter-field").querySelector(".filter-checkbox");e.checked||(e.checked=!0)}}))})),document.querySelectorAll("[data-ea-comparison-id]").forEach((function(t){t.addEventListener("change",(function(t){var e=t.currentTarget,i=e.dataset.eaComparisonId;if(void 0!==i){var n=document.querySelector('[data-ea-value2-of-comparison-id="'.concat(i,'"]'));null!==n&&I(n,"between"!==e.value)}}))}))}})()})(); \ No newline at end of file diff --git a/src/Resources/public/app.c647be58.js.LICENSE.txt b/src/Resources/public/app.a937f82e.js.LICENSE.txt similarity index 100% rename from src/Resources/public/app.c647be58.js.LICENSE.txt rename to src/Resources/public/app.a937f82e.js.LICENSE.txt diff --git a/src/Resources/public/entrypoints.json b/src/Resources/public/entrypoints.json index 1be844c7c2..26310f49e3 100644 --- a/src/Resources/public/entrypoints.json +++ b/src/Resources/public/entrypoints.json @@ -6,7 +6,7 @@ "/app.1c98f4b0.rtl.css" ], "js": [ - "/app.c647be58.js" + "/app.a937f82e.js" ] }, "form": { diff --git a/src/Resources/public/manifest.json b/src/Resources/public/manifest.json index 5fcdeaf28f..0aeb4abcc8 100644 --- a/src/Resources/public/manifest.json +++ b/src/Resources/public/manifest.json @@ -1,7 +1,7 @@ { "app.css": "app.1c98f4b0.css", "app.rtl.css": "app.1c98f4b0.rtl.css", - "app.js": "app.c647be58.js", + "app.js": "app.a937f82e.js", "form.js": "form.fc39362b.js", "page-layout.js": "page-layout.3347892e.js", "page-color-scheme.js": "page-color-scheme.a1970567.js",