/*! * MWF (Moray) v2.21.0 * Copyright (c) Microsoft Corporation. All rights reserved. * Copyright 2011-2022 The Bootstrap Authors and Twitter, Inc. * Copyright ©2022 W3C® (MIT, ERCIM, Keio, Beihang). */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).mwf={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i=function(t){return t&&t.Math===Math&&t},n=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||e||Function("return this")(),o={},l=function(t){try{return!!t()}catch(t){return!0}},r=!l((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),a=!l((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),h=a,c=Function.prototype.call,d=h?c.bind(c):function(){return c.apply(c,arguments)},u={},b={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,m=p&&!b.call({1:2},1);u.f=m?function(t){var e=p(this,t);return!!e&&e.enumerable}:b;var g,v,f=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},E=a,y=Function.prototype,w=y.call,S=E&&y.bind.bind(w,w),T=E?S:function(t){return function(){return w.apply(t,arguments)}},L=T,A=L({}.toString),C=L("".slice),I=function(t){return C(A(t),8,-1)},O=l,x=I,k=Object,R=T("".split),N=O((function(){return!k("z").propertyIsEnumerable(0)}))?function(t){return"String"===x(t)?R(t,""):k(t)}:k,D=function(t){return null==t},_=D,M=TypeError,P=function(t){if(_(t))throw M("Can't call method on "+t);return t},B=N,H=P,F=function(t){return B(H(t))},U="object"==typeof document&&document.all,W={all:U,IS_HTMLDDA:void 0===U&&void 0!==U},q=W.all,V=W.IS_HTMLDDA?function(t){return"function"==typeof t||t===q}:function(t){return"function"==typeof t},G=V,j=W.all,$=W.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:G(t)||t===j}:function(t){return"object"==typeof t?null!==t:G(t)},X=n,K=V,z=function(t,e){return arguments.length<2?(s=X[t],K(s)?s:void 0):X[t]&&X[t][e];var s},Y=T({}.isPrototypeOf),Q=n,Z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",J=Q.process,tt=Q.Deno,et=J&&J.versions||tt&&tt.version,st=et&&et.v8;st&&(v=(g=st.split("."))[0]>0&&g[0]<4?1:+(g[0]+g[1])),!v&&Z&&(!(g=Z.match(/Edge\/(\d+)/))||g[1]>=74)&&(g=Z.match(/Chrome\/(\d+)/))&&(v=+g[1]);var it=v,nt=l,ot=n.String,lt=!!Object.getOwnPropertySymbols&&!nt((function(){var t=Symbol("symbol detection");return!ot(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&it&&it<41})),rt=lt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,at=z,ht=V,ct=Y,dt=Object,ut=rt?function(t){return"symbol"==typeof t}:function(t){var e=at("Symbol");return ht(e)&&ct(e.prototype,dt(t))},bt=String,pt=V,mt=function(t){try{return bt(t)}catch(t){return"Object"}},gt=TypeError,vt=function(t){if(pt(t))return t;throw gt(mt(t)+" is not a function")},ft=D,Et=d,yt=V,wt=$,St=TypeError,Tt={exports:{}},Lt=n,At=Object.defineProperty,Ct=function(t,e){try{At(Lt,t,{value:e,configurable:!0,writable:!0})}catch(s){Lt[t]=e}return e},It=Ct,Ot="__core-js_shared__",xt=n[Ot]||It(Ot,{}),kt=xt;(Tt.exports=function(t,e){return kt[t]||(kt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.32.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Rt=Tt.exports,Nt=P,Dt=Object,_t=function(t){return Dt(Nt(t))},Mt=_t,Pt=T({}.hasOwnProperty),Bt=Object.hasOwn||function(t,e){return Pt(Mt(t),e)},Ht=T,Ft=0,Ut=Math.random(),Wt=Ht(1..toString),qt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Wt(++Ft+Ut,36)},Vt=Rt,Gt=Bt,jt=qt,$t=lt,Xt=rt,Kt=n.Symbol,zt=Vt("wks"),Yt=Xt?Kt.for||Kt:Kt&&Kt.withoutSetter||jt,Qt=d,Zt=$,Jt=ut,te=function(t,e){var s=t[e];return ft(s)?void 0:vt(s)},ee=function(t,e){var s,i;if("string"===e&&yt(s=t.toString)&&!wt(i=Et(s,t)))return i;if(yt(s=t.valueOf)&&!wt(i=Et(s,t)))return i;if("string"!==e&&yt(s=t.toString)&&!wt(i=Et(s,t)))return i;throw St("Can't convert object to primitive value")},se=TypeError,ie=function(t){return Gt(zt,t)||(zt[t]=$t&&Gt(Kt,t)?Kt[t]:Yt("Symbol."+t)),zt[t]}("toPrimitive"),ne=function(t,e){if(!Zt(t)||Jt(t))return t;var s,i=te(t,ie);if(i){if(void 0===e&&(e="default"),s=Qt(i,t,e),!Zt(s)||Jt(s))return s;throw se("Can't convert object to primitive value")}return void 0===e&&(e="number"),ee(t,e)},oe=ut,le=function(t){var e=ne(t,"string");return oe(e)?e:e+""},re=$,ae=n.document,he=re(ae)&&re(ae.createElement),ce=function(t){return he?ae.createElement(t):{}},de=!r&&!l((function(){return 7!==Object.defineProperty(ce("div"),"a",{get:function(){return 7}}).a})),ue=r,be=d,pe=u,me=f,ge=F,ve=le,fe=Bt,Ee=de,ye=Object.getOwnPropertyDescriptor;o.f=ue?ye:function(t,e){if(t=ge(t),e=ve(e),Ee)try{return ye(t,e)}catch(t){}if(fe(t,e))return me(!be(pe.f,t,e),t[e])};var we={},Se=r&&l((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Te=$,Le=String,Ae=TypeError,Ce=function(t){if(Te(t))return t;throw Ae(Le(t)+" is not an object")},Ie=r,Oe=de,xe=Se,ke=Ce,Re=le,Ne=TypeError,De=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,Me="enumerable",Pe="configurable",Be="writable";we.f=Ie?xe?function(t,e,s){if(ke(t),e=Re(e),ke(s),"function"==typeof t&&"prototype"===e&&"value"in s&&Be in s&&!s[Be]){var i=_e(t,e);i&&i[Be]&&(t[e]=s.value,s={configurable:Pe in s?s[Pe]:i[Pe],enumerable:Me in s?s[Me]:i[Me],writable:!1})}return De(t,e,s)}:De:function(t,e,s){if(ke(t),e=Re(e),ke(s),Oe)try{return De(t,e,s)}catch(t){}if("get"in s||"set"in s)throw Ne("Accessors not supported");return"value"in s&&(t[e]=s.value),t};var He=we,Fe=f,Ue=r?function(t,e,s){return He.f(t,e,Fe(1,s))}:function(t,e,s){return t[e]=s,t},We={exports:{}},qe=r,Ve=Bt,Ge=Function.prototype,je=qe&&Object.getOwnPropertyDescriptor,$e=Ve(Ge,"name"),Xe={EXISTS:$e,PROPER:$e&&"something"===function(){}.name,CONFIGURABLE:$e&&(!qe||qe&&je(Ge,"name").configurable)},Ke=V,ze=xt,Ye=T(Function.toString);Ke(ze.inspectSource)||(ze.inspectSource=function(t){return Ye(t)});var Qe,Ze,Je,ts=ze.inspectSource,es=V,ss=n.WeakMap,is=es(ss)&&/native code/.test(String(ss)),ns=qt,os=Rt("keys"),ls={},rs=is,as=n,hs=$,cs=Ue,ds=Bt,us=xt,bs=function(t){return os[t]||(os[t]=ns(t))},ps=ls,ms="Object already initialized",gs=as.TypeError,vs=as.WeakMap;if(rs||us.state){var fs=us.state||(us.state=new vs);fs.get=fs.get,fs.has=fs.has,fs.set=fs.set,Qe=function(t,e){if(fs.has(t))throw gs(ms);return e.facade=t,fs.set(t,e),e},Ze=function(t){return fs.get(t)||{}},Je=function(t){return fs.has(t)}}else{var Es=bs("state");ps[Es]=!0,Qe=function(t,e){if(ds(t,Es))throw gs(ms);return e.facade=t,cs(t,Es,e),e},Ze=function(t){return ds(t,Es)?t[Es]:{}},Je=function(t){return ds(t,Es)}}var ys={set:Qe,get:Ze,has:Je,enforce:function(t){return Je(t)?Ze(t):Qe(t,{})},getterFor:function(t){return function(e){var s;if(!hs(e)||(s=Ze(e)).type!==t)throw gs("Incompatible receiver, "+t+" required");return s}}},ws=T,Ss=l,Ts=V,Ls=Bt,As=r,Cs=Xe.CONFIGURABLE,Is=ts,Os=ys.enforce,xs=ys.get,ks=String,Rs=Object.defineProperty,Ns=ws("".slice),Ds=ws("".replace),_s=ws([].join),Ms=As&&!Ss((function(){return 8!==Rs((function(){}),"length",{value:8}).length})),Ps=String(String).split("String"),Bs=We.exports=function(t,e,s){"Symbol("===Ns(ks(e),0,7)&&(e="["+Ds(ks(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(e="get "+e),s&&s.setter&&(e="set "+e),(!Ls(t,"name")||Cs&&t.name!==e)&&(As?Rs(t,"name",{value:e,configurable:!0}):t.name=e),Ms&&s&&Ls(s,"arity")&&t.length!==s.arity&&Rs(t,"length",{value:s.arity});try{s&&Ls(s,"constructor")&&s.constructor?As&&Rs(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=Os(t);return Ls(i,"source")||(i.source=_s(Ps,"string"==typeof e?e:"")),t};Function.prototype.toString=Bs((function(){return Ts(this)&&xs(this).source||Is(this)}),"toString");var Hs=We.exports,Fs=V,Us=we,Ws=Hs,qs=Ct,Vs={},Gs=Math.ceil,js=Math.floor,$s=Math.trunc||function(t){var e=+t;return(e>0?js:Gs)(e)},Xs=function(t){var e=+t;return e!=e||0===e?0:$s(e)},Ks=Xs,zs=Math.max,Ys=Math.min,Qs=Xs,Zs=Math.min,Js=function(t){return t>0?Zs(Qs(t),9007199254740991):0},ti=function(t){return Js(t.length)},ei=F,si=function(t,e){var s=Ks(t);return s<0?zs(s+e,0):Ys(s,e)},ii=ti,ni=function(t){return function(e,s,i){var n,o=ei(e),l=ii(o),r=si(i,l);if(t&&s!=s){for(;l>r;)if((n=o[r++])!=n)return!0}else for(;l>r;r++)if((t||r in o)&&o[r]===s)return t||r||0;return!t&&-1}},oi={includes:ni(!0),indexOf:ni(!1)},li=Bt,ri=F,ai=oi.indexOf,hi=ls,ci=T([].push),di=function(t,e){var s,i=ri(t),n=0,o=[];for(s in i)!li(hi,s)&&li(i,s)&&ci(o,s);for(;e.length>n;)li(i,s=e[n++])&&(~ai(o,s)||ci(o,s));return o},ui=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Vs.f=Object.getOwnPropertyNames||function(t){return di(t,ui)};var bi={};bi.f=Object.getOwnPropertySymbols;var pi=z,mi=Vs,gi=bi,vi=Ce,fi=T([].concat),Ei=pi("Reflect","ownKeys")||function(t){var e=mi.f(vi(t)),s=gi.f;return s?fi(e,s(t)):e},yi=Bt,wi=Ei,Si=o,Ti=we,Li=l,Ai=V,Ci=/#|\.prototype\./,Ii=function(t,e){var s=xi[Oi(t)];return s===Ri||s!==ki&&(Ai(e)?Li(e):!!e)},Oi=Ii.normalize=function(t){return String(t).replace(Ci,".").toLowerCase()},xi=Ii.data={},ki=Ii.NATIVE="N",Ri=Ii.POLYFILL="P",Ni=Ii,Di=n,_i=o.f,Mi=Ue,Pi=function(t,e,s,i){i||(i={});var n=i.enumerable,o=void 0!==i.name?i.name:e;if(Fs(s)&&Ws(s,o,i),i.global)n?t[e]=s:qs(e,s);else{try{i.unsafe?t[e]&&(n=!0):delete t[e]}catch(t){}n?t[e]=s:Us.f(t,e,{value:s,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t},Bi=Ct,Hi=function(t,e,s){for(var i=wi(e),n=Ti.f,o=Si.f,l=0;l9007199254740991)throw $i("Maximum allowed index exceeded");return t};(function(t,e){var s,i,n,o,l,r=t.target,a=t.global,h=t.stat;if(s=a?Di:h?Di[r]||Bi(r,{}):(Di[r]||{}).prototype)for(i in e){if(o=e[i],n=t.dontCallGetSet?(l=_i(s,i))&&l.value:s[i],!Fi(a?i:r+(h?".":"#")+i,t.forced)&&void 0!==n){if(typeof o==typeof n)continue;Hi(o,n)}(t.sham||n&&n.sham)&&Mi(o,"sham",!0),Pi(s,i,o,t)}})({target:"Array",proto:!0,arity:1,forced:l((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}}()},{push:function(t){var e=Xi(this),s=Ki(e),i=arguments.length;Yi(s+i);for(var n=0;n=Qi.XS&&t=Qi.SM?"sm":t=Qi.MD?"md":t=Qi.LG?"lg":t>=Qi.XL?"xl":void 0},isBiDirectional:t=>(t||(t=document.querySelector("html")),"rtl"===t.getAttribute("dir")),prefersReducedMotion:()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches},Ji={initializeComponent(t,e){document.querySelectorAll(t).forEach((t=>e(t)))},addEvents(t){for(const e of t)void 0===e.options&&(e.options={}),"function"==typeof e.el.addEventListener?e.el.addEventListener(e.type,e.handler,e.options):"[object MediaQueryList]"===e.el.toString()&&"function"==typeof e.el.addListener&&e.el.addListener(e.handler)},removeEvents(t){for(const e of t)"function"==typeof e.el.removeEventListener?e.el.removeEventListener(e.type,e.handler):"[object MediaQueryList]"===e.el.toString()&&"function"==typeof e.el.removeListener&&e.el.removeListener(e.handler)},tearDownComponentList(t){if(Array.isArray(t)){let e;for(;t.length>0;)e=t.pop(),"function"==typeof e.remove&&e.remove()}}},tn=["input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]","button:not([disabled])","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],en=[...tn,'[tabindex]:not([tabindex^="-"]):not([disabled])'],sn=[...tn,"[tabindex]:not([disabled])"],nn={getTabbableElements:t=>(void 0===t&&(t=document),Array.from(t.querySelectorAll(en.join(", ")))),isElementTabbable:t=>t.matches(en.join(", ")),getUid:()=>Math.random().toString(36).slice(2,9),getFocusableElements:t=>(void 0===t&&(t=document),Array.from(t.querySelectorAll(sn.join(", ")))),getElementOuterHeight(t,e){void 0===e&&(e=null);const s=getComputedStyle(t);if(!e)return s.offsetHeight;let i=t.offsetHeight;return e.cssSelectors.forEach((t=>{t.toLowerCase().includes("top")||t.toLowerCase().includes("bottom")?t.values.length>0&&(i+=parseInt(s[t],10)):i+=parseInt(s[t+"Top"],10)+parseInt(s[t+"Bottom"],10)})),i},getElementOuterWidth(t,e){void 0===e&&(e=null);const s=getComputedStyle(t);if(!e)return s.offsetWidth;let i=t.offsetWidth;return e.cssSelectors.forEach((t=>{t.toLowerCase().includes("left")||t.toLowerCase().includes("right")?t.values.length>0&&(i+=parseInt(s[t],10)):i+=parseInt(s[t+"Left"],10)+parseInt(s[t+"Right"],10)})),i},getSelectorFromElement(t){try{let e=t.getAttribute("data-target");if(!e||"#"===e){const s=t.getAttribute("href");e=s&&"#"!==s?s.trim():""}return e}catch{return null}},reflow:t=>t.offsetHeight,getDocumentHeight:()=>Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},on={getYiq(t){let{r:e,g:s,b:i}=t;return(299*e+587*s+114*i)/1e3},hexToRGB(t){let e=0,s=0,i=0;return 4===t.length?(e="0x"+t[1]+t[1],s="0x"+t[2]+t[2],i="0x"+t[3]+t[3]):7===t.length&&(e="0x"+t[1]+t[2],s="0x"+t[3]+t[4],i="0x"+t[5]+t[6]),isNaN(e)||isNaN(s)||isNaN(i)?null:"rgb("+Number(e)+","+Number(s)+","+Number(i)+")"},getRGB(t){const e=t.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d\.\d?)\))?/);return e?{r:e[1],g:e[2],b:e[3]}:{}}},ln={keyCodes:{ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,BACKSPACE:8,CLEAR:12,END:35,ENTER:13,ESC:27,HOME:36,PAGE_DOWN:34,PAGE_UP:33,SPACE:32,TAB:9},keys:{ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CLEAR:"Clear",END:"End",ENTER:"Enter",ESC:"Escape",HOME:"Home",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SPACE:" ",TAB:"Tab"},getKeyCode:t=>t.which||t.keyCode||0},rn={interpolateString:(t,e)=>t.replaceAll(/%{(\w+)}/g,((s,i)=>Object.prototype.hasOwnProperty.call(e,i)?e[i]:(console.warn(`Template error, %{${i}} not found:`,t),"")))},an="onRemove",hn=[];const cn="transitionend",dn=t=>{t.dispatchEvent(new Event(cn))};var un={TRANSITION_END:cn,getTransitionDurationFromElement:t=>{if(!t)return 0;let e=getComputedStyle(t)["transition-duration"],s=getComputedStyle(t)["transition-delay"];const i=parseFloat(e),n=parseFloat(s);return i||n?(e=e.split(",")[0],s=s.split(",")[0],1e3*(parseFloat(e)+parseFloat(s))):0},triggerTransitionEnd:dn,emulateTransitionEnd:function(t,e){void 0===e&&(e=0);let s=!1;const i=e+5;t.addEventListener(cn,(function e(){s=!0,t.removeEventListener(cn,e)})),setTimeout((()=>{s||dn(t)}),i)}};const bn={...Zi,...nn,...Ji,...on,...ln,...rn,FocusControls:class{constructor(t){this.el=t.el,this.target=document.querySelector(this.el.getAttribute("href")),this.events=[{el:this.el,type:"click",handler:t=>{this.onClick(t)}}],Ji.addEvents(this.events),hn.push(this)}onClick(t){t.preventDefault(),document.activeElement===this.target&&document.activeElement.blur(),this.target.focus(),this.target.scrollIntoView()}remove(){Ji.removeEvents(this.events);const t=hn.indexOf(this);hn.splice(t,1),this[an]=new CustomEvent(an,{bubbles:!0}),this.el.dispatchEvent(this[an])}static getInstances(){return hn}},...un},pn=[],mn={DATA_MOUNT:'.alert-dismissible, [data-mount="alert-dismissible"]',DISMISS:'[data-dismiss="alert"]'},gn={CLOSE:"onClose",CLOSED:"onClosed",ON_REMOVE:"onRemove",ON_UPDATE:"onUpdate"},vn="fade",fn="show";function En(t){if(t.classList.remove(fn),!t.classList.contains(vn))return void yn.call(this,t);const e=bn.getTransitionDurationFromElement(t);t.addEventListener(bn.TRANSITION_END,(e=>yn.call(this,t,e)),{once:!0}),bn.emulateTransitionEnd(t,e)}function yn(t){this[gn.CLOSED]=new CustomEvent(gn.CLOSED),t.dispatchEvent(this[gn.CLOSED]),t.remove()}class wn{constructor(t){this.el=t.el,this.dismiss=this.el.querySelector(mn.DISMISS),this.dismiss&&(this.events=[{el:this.dismiss,type:"click",handler:()=>{this.close()}}],bn.addEvents(this.events)),pn.push(this)}close(){const t=this.el;this[gn.CLOSE]=new CustomEvent(gn.CLOSE,{cancelable:!0}),t.dispatchEvent(this[gn.CLOSE]),this[gn.CLOSE].defaultPrevented||(En.call(this,t),this.remove())}update(){this[gn.ON_UPDATE]=new CustomEvent(gn.ON_UPDATE,{bubbles:!0}),this.el.dispatchEvent(this[gn.ON_UPDATE])}remove(){bn.removeEvents(this.events);const t=pn.indexOf(this);pn.splice(t,1),this[gn.ON_REMOVE]=new CustomEvent(gn.ON_REMOVE,{bubbles:!0}),this.el.dispatchEvent(this[gn.ON_REMOVE])}static getInstances(){return pn}}const Sn={DEFAULT_SEARCH_RESULT:10},Tn=[],Ln={RESULT_LIST:".result-list",RESULTS_CONTAINER:".search-results-container",SEARCH_INPUT:".search-input",RESULT_STATUS:".result-status",LIST_FIRST_CHILD:"li:first-child",LIST_LAST_CHILD:"li:last-child",LIST_SELECTED:"li.selected"},An="%{numResults} results are available, use up and down arrow keys to navigate",Cn="%{numResults} result is available, use up and down arrow keys to navigate",In="No results are available",On="Data must be of type Array[] or Array[{value: }]",xn={ACTIVE:"active",SELECTED:"selected"},kn="onClose",Rn="onOpen",Nn="onUpdate",Dn="onRemove";function _n(t){const e=Hn.bind(this)();return t.filter((t=>!!("object"==typeof t&&e.test(t.value)||"string"==typeof t&&e.test(t))&&t))}function Mn(t){const e=t.slice(0,Sn.DEFAULT_SEARCH_RESULT);let s,i="",n=null;e.length>0&&""!==this.searchInput.value?(e.forEach((t=>{"string"==typeof t?n=t:"object"==typeof t&&(n=t.value),i+='
  • '+Fn.bind(this)(n)+"
  • "})),s=bn.interpolateString(e.length>1?this.resultsAvailableTemplateMany:this.resultsAvailableTemplateOne,{numResults:e.length}),this.shown||this.open()):(this.close(),s=this.noResultsMsg),this.target.innerHTML=i,this.container.querySelector(Ln.RESULT_STATUS).textContent=s}function Pn(){let t=this.suggestedData;"object"==typeof this.suggestedData&&("true"===this.filter&&(t=_n.bind(this)(t)),Mn.bind(this)(t))}function Bn(){this.target.innerHTML="",this.container.querySelector(Ln.RESULT_STATUS).textContent=""}function Hn(){const t=this.searchInput.value.replaceAll(/([()*+.?\\])/gi,"\\$&");return new RegExp("\\b\\s?"+t,"gi")}function Fn(t){const e=Hn.bind(this)();return t.replace(e,"$&")}function Un(t){t.classList.remove(xn.SELECTED),t.removeAttribute("aria-selected")}function Wn(t){t.classList.add(xn.SELECTED),t.setAttribute("aria-selected",!0),t.focus()}function qn(t){return!(!Array.isArray(t)||!t.every((t=>"string"==typeof t||"object"==typeof t&&Object.keys(t).includes("value")&&"string"==typeof t.value)))}function Vn(t){if(t.target!==this.searchInput&&t.target!==this.searchResultsContainer){this.target.classList.remove(xn.ACTIVE),this.searchInput.setAttribute("aria-expanded",!1)}}function Gn(t){""===this.searchInput.value?(Bn.bind(this)(t),this.shown&&this.close()):Pn.bind(this)(t)}function jn(t){const e=this.target;t.keyCode===bn.keyCodes.ARROW_DOWN&&e.children.length>0&&(this.open(),Wn(e.querySelector(Ln.LIST_FIRST_CHILD))),t.keyCode===bn.keyCodes.TAB&&this.shown&&this.close()}function $n(){this.searchInput.setSelectionRange(this.searchInput.value.length,this.searchInput.value.length)}function Xn(t){if(this.target.classList.contains(xn.ACTIVE)){const e=this.target,s=e.querySelector(Ln.LIST_SELECTED);let i;switch(t.keyCode){case bn.keyCodes.ARROW_UP:if(s)if(i=s.previousElementSibling,Un(s),i)Wn(i);else{Wn(e.querySelector(Ln.LIST_LAST_CHILD))}break;case bn.keyCodes.ARROW_DOWN:if(e.querySelector("li")&&!e.querySelector(Ln.LIST_SELECTED)){Wn(e.querySelector(Ln.LIST_FIRST_CHILD))}else{let t=null;if(t=s.nextElementSibling,t)Un(s),Wn(t);else{const t=e.querySelector(Ln.LIST_FIRST_CHILD);Un(s),Wn(t)}}break;case bn.keyCodes.ARROW_LEFT:{const t=this.searchInput.selectionStart;this.searchInput.focus(),this.searchInput.setSelectionRange(t,t),Un(s);break}case bn.keyCodes.ARROW_RIGHT:case bn.keyCodes.BACKSPACE:{const t=this.searchInput.selectionStart;this.searchInput.focus(),this.searchInput.setSelectionRange(t,t),Un(s);break}case bn.keyCodes.ENTER:s&&(this.searchInput.value=s.textContent,Bn.bind(this)(),this.searchInput.focus(),this.close(),t.preventDefault());break;case bn.keyCodes.ESC:this.searchInput.value="",this.searchInput.focus(),Bn.bind(this)();break;case bn.keyCodes.HOME:this.searchInput.focus(),this.searchInput.setSelectionRange(0,0),Un(s);break;case bn.keyCodes.END:this.searchInput.focus(),Un(s);break;case bn.keyCodes.TAB:this.close(),this.searchInput.focus(),Un(s);break;default:1===t.key.length&&this.searchInput.focus()}}}function Kn(t){this.searchInput.value=t.target.textContent,Bn.bind(this)(),this.searchInput.focus(),this.close(),t.stopPropagation()}function zn(t,e,s){var i,n=s||{},o=n.noTrailing,l=void 0!==o&&o,r=n.noLeading,a=void 0!==r&&r,h=n.debounceMode,c=void 0===h?void 0:h,d=!1,u=0;function b(){i&&clearTimeout(i)}function p(){for(var s=arguments.length,n=new Array(s),o=0;ot?a?(u=Date.now(),l||(i=setTimeout(c?m:p,t))):p():!0!==l&&(i=setTimeout(c?m:p,void 0===c?t-h:t)))}return p.cancel=function(t){var e=(t||{}).upcomingOnly,s=void 0!==e&&e;b(),d=!s},p}function Yn(t,e,s){var i=(s||{}).atBegin;return zn(t,e,{debounceMode:!1!==(void 0!==i&&i)})}const Qn={DATA_MOUNT:'[data-mount="sticky"]',SHOW_STUCK:".sticky-show-stuck",HIDE_STUCK:".sticky-hide-stuck"},Zn="sticky",Jn="stuck",to="get-height",eo="sticky-direction-top",so="sticky-direction-bottom",io="top",no="bottom",oo="onSticky",lo="onStatic",ro="onUpdate",ao="onRemove",ho="resize",co="top",uo=12,bo={ALWAYS:"always",OFF:"off",SIZE_AWARE:"size-aware"},po=[];function mo(t,e){switch(void 0===e&&(e=co),t){case"top":case"bottom":return t;default:return e}}class go{constructor(t){this.el=t.el,this.direction=mo(t.direction||this.el.dataset.direction),this.extraScrollPaddingPx="number"==typeof t.extraScrollPaddingPx?t.extraScrollPaddingPx:uo,this.enableObserver=!0,this.observerBehavior=this.#t(t.observerBehavior),this.isStuck=!1,this.observer=null,this.windowScrollY=window.scrollY,this.observedWindowDimensions={width:window.innerWidth,height:window.innerHeight},this.looseWidth=this.#e(),this.el.classList.add(Zn),this.#s(),this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{const t={width:window.innerWidth,height:window.innerHeight};this.looseWidth=this.#e(),this.#i(JSON.stringify(t)===JSON.stringify(this.observedWindowDimensions)),this.observedWindowDimensions=t}))})),Array.from(this.el.children).forEach((t=>{this.resizeObserver.observe(t)})),this.#n(),po.push(this)}#n(){this.#o(),this.#i(),this.events=[{el:window,type:ho,handler:zn(200,this.#l.bind(this))}],bn.addEvents(this.events)}#i(t){this.#r()?(this.#a(),t?this.#h(this.enableObserver):this.setObserver()):t?this.#h(this.enableObserver):this.setObserver()}#t(t){const e=t=>Object.values(bo).includes(t);return t&&e(t)?t:e(this.el.dataset.observerBehavior)?this.el.dataset.observerBehavior:bo.SIZE_AWARE}#o(){this.direction===no?(this.el.classList.add(so),this.el.classList.remove(eo)):(this.el.classList.add(eo),this.el.classList.remove(so))}#r(){const t=this.stuckHeight,e=this.looseHeight,s={cssSelectors:["margin"]};return this.#c(!0),this.el.classList.contains(Jn)?(this.stuckHeight=bn.getElementOuterHeight(this.el,s),this.el.classList.remove(Jn),this.looseHeight=bn.getElementOuterHeight(this.el,s),this.el.classList.add(Jn)):(this.looseHeight=bn.getElementOuterHeight(this.el,s),this.el.classList.add(to),this.el.classList.add(Jn),this.stuckHeight=bn.getElementOuterHeight(this.el,s),this.el.classList.remove(Jn),this.el.classList.remove(to)),this.heightDif=this.looseHeight-this.stuckHeight,this.#c(),t!==this.stuckHeight||e!==this.looseHeight}#e(){let t=this.el.getBoundingClientRect().width;return this.el.classList.contains(Jn)&&(this.el.classList.remove(Jn),t=this.el.getBoundingClientRect().width,this.el.classList.add(Jn)),t}#d(){this.el.classList.toggle(Jn,this.isStuck),this.#u()}#a(){this.observer&&this.observer.disconnect();const t=this.direction===no?this.el.nextElementSibling:this.el.previousElementSibling,e=(document.documentElement.clientWidth-this.looseWidth)/2,s=t?-1:-2,i=t?document:this.el.parentElement,n={root:i,rootMargin:`${s}px ${e}px ${s}px ${e}px`,threshold:[.99,.995,.999,1]};this.observer=new IntersectionObserver((t=>{let[e]=t;if(this.enableObserver){const t=this.isStuck;if(i===document){let t=Math.ceil(e.intersectionRect.top)===-s;this.direction===no&&(t=Math.floor(e.intersectionRect.bottom)===document.documentElement.clientHeight+s),this.isStuck=e.intersectionRatio<1&&t}else this.isStuck=e.isIntersecting;void 0!==t&&t!==this.isStuck&&(this.#d(),this.isStuck?(this[oo]=new CustomEvent(oo,{bubbles:!0}),this.el.dispatchEvent(this[oo])):(this[lo]=new CustomEvent(lo,{bubbles:!0}),this.el.dispatchEvent(this[lo])))}}),n),this.observer.observe(this.el)}#c(t){void 0===t&&(t=!1);let e=null,s=null;if(this.el.style.setProperty("margin-top",s),!t){e=`${this.stuckHeight}px`;const{marginTop:t}=getComputedStyle(this.el);s=`${this.heightDif+parseInt(t,10)}px`}this.el.style.setProperty("height",e),s&&this.el.style.setProperty("margin-top",s)}#s(){const t=document.documentElement.clientWidth;this.el.style.setProperty("--vw",`${t}px`)}#b(){if(this.enableObserver){const t=this.direction===no&&this.el.getBoundingClientRect().bottom===window.innerHeight,e=this.direction===io&&0===this.el.getBoundingClientRect().top;(t||e)&&(this.isStuck=!0)}}#l(){this.#s(),window.innerHeight!==this.observedWindowDimensions.height&&this.#i()}#u(t){const e=document.querySelector("html");this.currentHeight=this.el.getBoundingClientRect().height,t&&(e.style.scrollPaddingTop=0,e.style.scrollPaddingBottom=0),this.direction===io?e.style.scrollPaddingTop=this.currentHeight+this.extraScrollPaddingPx+"px":this.direction===no&&(e.style.scrollPaddingBottom=this.currentHeight+this.extraScrollPaddingPx+"px")}#p(){return this.stuckHeight>window.innerHeight/3}setObserver(){switch(this.observerBehavior){case bo.OFF:this.#h(!1);break;case bo.ALWAYS:this.#h(!0);break;default:this.#p()?this.#h(!1):this.#h(!0)}}#h(t){this.enableObserver=t;let e=null;t||(e="initial",this.isStuck=!1),this.el.style.setProperty("position",e),this.#b(),this.#d()}getStuckHeight(){return this.stuckHeight}update(t){void 0===t&&(t={}),bn.removeEvents(this.events),t.direction&&(this.direction=mo(t.direction)),t.extraScrollPaddingPx&&"number"==typeof t.extraScrollPaddingPx&&(this.extraScrollPaddingPx=t.extraScrollPaddingPx),t.observerBehavior&&(this.observerBehavior=this.#t(t.observerBehavior)),this.#n(),this[ro]=new CustomEvent(ro,{bubbles:!0}),this.el.dispatchEvent(this[ro])}remove(){bn.removeEvents(this.events),this.resizeObserver.disconnect(),this.el.classList.remove(Zn),this.#u(!0),this.#c(!0),this.observer.disconnect();const t=po.indexOf(this);po.splice(t,1),this[ao]=new CustomEvent(ao,{bubbles:!0}),this.el.dispatchEvent(this[ao])}static getInstances(){return po}}const vo=[],fo={BACK_TO_TOP:"back-to-top",HIDE:"hide"},Eo="scroll",yo="onRemove",wo="resize",So="onUpdate",To="tabindex",Lo=.7;function Ao(){const t=this.el.previousElementSibling;if(!t)return;const e=t.getBoundingClientRect().bottom-this.offsetMarginTop;(window.scrollY||window.pageYOffset)>e?(this.stickyElement.setObserver(),Co.call(this,!1)):(Co.call(this,!0),this.el.classList.remove(Jn),this.stickyElement.enableObserver=!1)}function Co(t){this.el.classList.toggle(fo.HIDE,t)}function Io(){this.offsetMarginTop!==bn.getDocumentHeight()*Lo&&(this.offsetMarginTop=bn.getDocumentHeight()*Lo,this.stickyElement.remove(),this.stickyElement=new go({el:this.el,direction:no,observerBehavior:bo.SIZE_AWARE}))}class Oo{constructor(t){let{el:e,offsetMarginTop:s=bn.getDocumentHeight()*Lo,onScroll:i,onWindowResize:n}=t;this.el=e,this.offsetMarginTop=s,this.onScroll=i||Ao.bind(this),this.onWindowResize=n||Io.bind(this),this.setTabindex(),vo.push(this),Co.call(this,!0),this.stickyElement=new go({el:this.el,direction:no,observerBehavior:bo.SIZE_AWARE}),this.onScroll(),this.events={scrollEvent:{el:document,type:Eo,handler:zn(200,this.onScroll),options:{passive:!0}},resizeEvent:{el:window,type:wo,handler:zn(200,this.onWindowResize)}},bn.addEvents(Object.values(this.events))}setTabindex(){const t=this.el.querySelector("a").getAttribute("href"),e=document.querySelector(t);if(null!==document.querySelector(t)&&!bn.isElementTabbable(e)){null===e.getAttribute(To)&&e.setAttribute(To,"-1")}}update(t){void 0===t&&(t={}),t.offsetMarginTop&&(this.offsetMarginTop=t.offsetMarginTop),t.onScroll&&(bn.removeEvents([this.events.scrollEvent]),this.onScroll=t.onScroll,bn.addEvents([this.events.scrollEvent])),t.onWindowResize&&(bn.removeEvents([this.events.resizeEvent]),this.onWindowResize=t.onWindowResize,bn.addEvents([this.events.resizeEvent])),this.onScroll(),this[So]=new CustomEvent(So,{bubbles:!0}),this.el.dispatchEvent(this[So])}remove(){bn.removeEvents(Object.values(this.events)),this.el.classList.remove(fo.BACK_TO_TOP),this.stickyElement.remove();const t=vo.indexOf(this);vo.splice(t,1),this[yo]=new CustomEvent(yo,{bubbles:!0}),this.el.dispatchEvent(this[yo])}static getInstances(){return vo}}var xo,ko={exports:{}},Ro={exports:{}};function No(){return xo||(xo=1,function(t){!function(e,s){t.exports?t.exports=s():e.EvEmitter=s()}("undefined"!=typeof window?window:e,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let s=this._events=this._events||{},i=s[t]=s[t]||[];return i.includes(e)||i.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let s=this._onceEvents=this._onceEvents||{};return(s[t]=s[t]||{})[e]=!0,this},e.off=function(t,e){let s=this._events&&this._events[t];if(!s||!s.length)return this;let i=s.indexOf(e);return-1!=i&&s.splice(i,1),this},e.emitEvent=function(t,e){let s=this._events&&this._events[t];if(!s||!s.length)return this;s=s.slice(0),e=e||[];let i=this._onceEvents&&this._onceEvents[t];for(let n of s){i&&i[n]&&(this.off(t,n),delete i[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t}))}(Ro)),Ro.exports} /*! * imagesLoaded v5.0.0 * JavaScript is all like "You images are done yet or what?" * MIT License */!function(t){!function(e,s){t.exports?t.exports=s(e,No()):e.imagesLoaded=s(e,e.EvEmitter)}("undefined"!=typeof window?window:e,(function(t,e){let s=t.jQuery,i=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let l=t;var r;("string"==typeof t&&(l=document.querySelectorAll(t)),l)?(this.elements=(r=l,Array.isArray(r)?r:"object"==typeof r&&"number"==typeof r.length?[...r]:[r]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),s&&(this.jqDeferred=new s.Deferred),setTimeout(this.check.bind(this))):i.error(`Bad element for imagesLoaded ${l||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let s=t.querySelectorAll("img");for(let t of s)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const l=/url\((['"])?(.*?)\1\)/gi;function r(t){this.img=t}function a(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let s=l.exec(e.backgroundImage);for(;null!==s;){let i=s&&s[2];i&&this.addBackground(i,t),s=l.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new r(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let s=new a(t,e);this.images.push(s)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,s)=>{setTimeout((()=>{this.progress(t,e,s)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,s){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&i&&i.log(`progress: ${s}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:s}=this.img,i="PICTURE"===s.nodeName?s:this.img;this.emitEvent("progress",[this,i,e])},r.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype=Object.create(r.prototype),a.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(s=e,s.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(s(this))})},n.makeJQueryPlugin(),n}))}(ko);var Do=s(ko.exports);const _o={TOUCH:"touch",PEN:"pen"},Mo="pointerdown",Po="pointerup",Bo="touchstart",Ho="touchmove",Fo="touchend",Uo="pointer-event";function Wo(){const t=Math.abs(this.touchDeltaX);if(t<=this.swipeThreshold)return;const e=t/this.touchDeltaX;e>0&&this.negativeCallback(),e<0&&this.positiveCallback()}function qo(t){this.pointerEvent&&_o[t.pointerType.toUpperCase()]?this.touchStartX=t.clientX:this.pointerEvent||(this.touchStartX=t.touches[0].clientX)}function Vo(t){t.touches&&t.touches.length>1?this.touchDeltaX=0:this.touchDeltaX=t.touches[0].clientX-this.touchStartX}function Go(t){this.pointerEvent&&_o[t.pointerType.toUpperCase()]&&(this.touchDeltaX=t.clientX-this.touchStartX),Wo.call(this)}class jo{constructor(t){this.el=t.el,this.positiveCallback=t.positiveCallback,this.negativeCallback=t.negativeCallback,this.swipeThreshold=t.swipeThreshold||40,this.pointerEventClassName=t.pointerEventClassName||Uo,this.touchStartX=0,this.touchDeltaX=0,this.touchSupported="ontouchstart"in document.documentElement||Boolean(navigator.maxTouchPoints>0),this.pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this.onSwipeStart=qo.bind(this),this.onSwipeMove=Vo.bind(this),this.onSwipeEnd=Go.bind(this)}addEventListeners(){this.touchSupported&&(this.pointerEvent?(this.el.addEventListener(Mo,this.onSwipeStart),this.el.addEventListener(Po,this.onSwipeEnd),this.el.classList.add(this.pointerEventClassName)):(this.el.addEventListener(Bo,this.onSwipeStart),this.el.addEventListener(Ho,this.onSwipeMove),this.el.addEventListener(Fo,this.onSwipeEnd)))}removeEventListeners(){this.touchSupported&&(this.pointerEvent?(this.el.removeEventListener(Mo,this.onSwipeStart),this.el.removeEventListener(Po,this.onSwipeEnd),this.el.classList.remove(this.pointerEventClassName)):(this.el.removeEventListener(Bo,this.onSwipeStart),this.el.removeEventListener(Ho,this.onSwipeMove),this.el.removeEventListener(Fo,this.onSwipeEnd)))}}const $o={ACTIVE:"active",SLIDE:"slide",SLIDE_IN:"sliding-in",SNEAK_PEAK:"carousel-sneak-peek",PRODUCT_CARD:"carousel-product-card",VARIABLE_HEIGHT:"carousel-variable-height",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",GET_HEIGHT:"get-height",MARGIN_X_0:"mx-0",PADDING_X_0:"px-0"},Xo="next",Ko="prev",zo={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",ITEM_IMG:".carousel-item img",INDICATORS:".carousel-indicators",DATA_SLIDE_PREV:'[data-slide="prev"]',DATA_SLIDE_NEXT:'[data-slide="next"]',DATA_MOUNT:'[data-mount="carousel"]',DATA_LOOP:"data-loop",DATA_STATUS:"data-status",CAROUSEL_INNER:".carousel-inner",ROW:".row",SLIDE_ITEM:".slide-item",VISIBLE_STATUS:'[aria-hidden="true"]',SR_STATUS:"[aria-live]",BACK_TO_CONTROLS:".back-to-controls",DATA_ACTIVE_SLIDE_FOCUS:"data-active-slide-focus"},Yo="onChange",Qo="onUpdate",Zo="onRemove";function Jo(t){return(t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(zo.ITEM)):[]).indexOf(t)}function tl(){const t=this.el.querySelector(zo.ACTIVE_ITEM);return Jo.bind(this)(t)}function el(){const t=this.currentSlideIndex+1;return t>this.slides.length-1?0:t}function sl(){const t=this.currentSlideIndex-1;return t<0?this.slides.length-1:t}function il(t){const e=Math.max(t,0);return Math.min(e,this.slides.length-1)}function nl(){const t=this.el.getAttribute(zo.DATA_STATUS);return t?document.getElementById(t):null}function ol(){return!("false"===this.el.getAttribute(zo.DATA_LOOP))}function ll(){return!("false"===this.el.getAttribute(zo.DATA_ACTIVE_SLIDE_FOCUS))}function rl(){return 0===this.currentSlideIndex}function al(){return this.currentSlideIndex===this.slides.length-1}function hl(){return!al.bind(this)()||this.loopSlides}function cl(){return!rl.bind(this)()||this.loopSlides}function dl(){this.goToPrevSlide()}function ul(){bn.addEvents(this.nextBtnEvents),this.goToNextSlide()}function bl(t){t.preventDefault(),this.backToControlsBtn&&(this.prevBtn.disabled?this.nextBtn.disabled?(this.el.setAttribute("tabindex",-1),this.el.focus()):this.nextBtn.focus():this.prevBtn.focus())}function pl(t){t.preventDefault()}function ml(t,e){const s=this.slides[this.currentSlideIndex],i=this.slides[e];let n,o;if(t===Xo?(n=$o.LEFT,o=$o.NEXT):(n=$o.RIGHT,o=$o.PREV),i&&i.classList.contains($o.ACTIVE))this.isSliding=!1;else if(s&&i){if(this.isSliding=!0,gl.bind(this)(e),this.el.classList.contains($o.SNEAK_PEAK)&&vl.bind(this)(),this.el.classList.contains($o.SLIDE)){this.el.classList.contains($o.VARIABLE_HEIGHT)&&this.el.classList.add($o.MARGIN_X_0,$o.PADDING_X_0),i.classList.add(o,$o.SLIDE_IN),bn.reflow(i),s.classList.add(n),i.classList.add(n);const t=bn.getTransitionDurationFromElement(s);setTimeout((()=>{i.classList.remove(n,o,$o.SLIDE_IN),i.classList.add($o.ACTIVE),s.classList.remove($o.ACTIVE,o,n),this.el.classList.contains($o.VARIABLE_HEIGHT)&&this.el.classList.remove($o.MARGIN_X_0,$o.PADDING_X_0),this.isSliding=!1}),t)}else s.classList.remove($o.ACTIVE),i.classList.add($o.ACTIVE),this.isSliding=!1;El.bind(this)(e),this.didSlide=!0,this.currentSlideIndex=e,this.el.classList.contains($o.SNEAK_PEAK)&&fl.bind(this)(),wl.bind(this)(),this.statusContainer&&Sl.bind(this)(e)}}function gl(t){if(this.indicators){[].slice.call(this.indicators.querySelectorAll(zo.ACTIVE)).forEach((t=>{t.classList.remove($o.ACTIVE)}));const e=this.indicators.children[t];e&&e.classList.add($o.ACTIVE)}}function vl(){const t=el.bind(this)(),e=sl.bind(this)();this.slides[e].classList.remove($o.PREV),this.slides[t].classList.remove($o.NEXT)}function fl(){const t=el.bind(this)(),e=sl.bind(this)();this.slides[t].classList.add($o.NEXT),this.slides[e].classList.add($o.PREV)}function El(t){for(let e=0;e{t.classList.contains($o.ACTIVE)||t.classList.add($o.GET_HEIGHT),t.clientHeight>e&&(e=t.clientHeight),t.classList.remove($o.GET_HEIGHT)})),t.forEach((t=>{t.style.height=`${e}px`}))}function Ll(){[].slice.call(this.slides).forEach((t=>{t.style.height=""}))}function Al(){Ll.bind(this)(),Do(this.el,(()=>{Tl.bind(this)()}))}function Cl(t){(t.keycode||t.which)===bn.keyCodes.TAB&&this.didSlide&&(Il.bind(this)(this.currentSlideIndex),this.didSlide=!1,t.preventDefault()),Ol.call(this)}function Il(t){this.slides[t].focus()}function Ol(){this.didSlide=!1,bn.removeEvents(this.nextBtnEvents)}function xl(){const t=this.el.querySelector(zo.CAROUSEL_INNER),e=this.el.querySelector(zo.ACTIVE_ITEM),s=e.querySelector(zo.ROW),i=[].slice.call(this.el.querySelectorAll(zo.SLIDE_ITEM)),n=e.querySelectorAll(zo.SLIDE_ITEM),o=Math.round(s.clientWidth/n[0].clientWidth),l=Math.ceil(i.length/o)-this.slides.length;if(Ll.bind(this)(),this.prevBtn.style.display="",this.nextBtn.style.display="",this.statusContainer&&(this.statusContainer.style.display="",this.statusContainer.nextElementSibling.style.display=""),l>0)for(let e=0;el;e--)t.lastChild.remove();const r=this.el.querySelectorAll(zo.ROW);let a;for(let t=r.length-1;t>=0;t--){const e=i.length%o;a=e>0?i.splice(i.length-e,e):i.splice(i.length-o,o),a.forEach((e=>{r[t].append(e)}))}this.slides=this.el.querySelectorAll(zo.ITEM),this.currentSlideIndex>this.slides.length-1&&(this.currentSlideIndex=this.slides.length-1),1===this.slides.length&&(this.prevBtn.style.display="none",this.nextBtn.style.display="none",this.statusContainer&&(this.statusContainer.style.display="none",this.statusContainer.nextElementSibling.style.display="none")),Al.bind(this)()}function kl(){this.el.classList.contains($o.PRODUCT_CARD)&&xl.bind(this)(),this.el.classList.contains($o.VARIABLE_HEIGHT)&&Al.bind(this)(),El.bind(this)(this.currentSlideIndex),yl.bind(this)(this.currentSlideIndex),gl.bind(this)(this.currentSlideIndex),this.el.classList.contains($o.SNEAK_PEAK)&&fl.bind(this)(),wl.bind(this)(),this.statusContainer&&(Sl.bind(this)(this.currentSlideIndex),this.statusContainer.parentNode.classList.remove("d-none"))}function Rl(){const t=[{el:this.prevBtn,type:"click",handler:this.prevOnClick},{el:this.nextBtn,type:"click",handler:this.nextOnClick}];return this.itemImg&&this.itemImg.forEach((e=>{t.push({el:e,type:"dragstart",handler:pl})})),(this.el.classList.contains($o.PRODUCT_CARD)||this.el.classList.contains($o.VARIABLE_HEIGHT))&&t.push({el:window,type:"resize",handler:Yn(300,kl.bind(this)),options:{passive:!0}}),this.backToControlsBtn&&t.push({el:this.backToControlsBtn,type:"click",handler:this.backToControlsBtnOnClick}),t}class Nl{constructor(t){this.el=t.el,this.slides=t.slides||this.el.querySelectorAll(zo.ITEM),this.currentSlideIndex=t.initialSlideIndex||tl.bind(this)(),this.loopSlides="boolean"==typeof t.loopSlides?t.loopSlides:ol.bind(this)(),this.statusContainer=t.statusContainer||nl.bind(this)(),this.prevOnClick=t.prevOnClick||dl.bind(this),this.nextOnClick=t.nextOnClick||ul.bind(this),this.backToControlsBtnOnClick=bl.bind(this),this.activeSlideFocus="boolean"==typeof t.activeSlideFocus?t.activeSlideFocus:ll.bind(this)(),this.isSliding=!1,this.didSlide=!1,this.touchUtil=new jo({el:this.el,positiveCallback:this.goToNextSlide.bind(this),negativeCallback:this.goToPrevSlide.bind(this)}),this.prevBtn=this.el.querySelector(zo.DATA_SLIDE_PREV),this.nextBtn=this.el.querySelector(zo.DATA_SLIDE_NEXT),this.backToControlsBtn=this.el.querySelector(zo.BACK_TO_CONTROLS),this.indicators=this.el.querySelector(zo.INDICATORS),this.itemImg=this.el.querySelectorAll(zo.ITEM_IMG),this.statusContainer&&(this.visibleStatusContainer=this.statusContainer.querySelector(zo.VISIBLE_STATUS),this.srStatusContainer=this.statusContainer.querySelector(zo.SR_STATUS),this.visibleStatusContainer&&(this.visibleStatusTemplate=this.visibleStatusContainer.textContent),this.srStatusContainer&&(this.srStatusTemplate=this.srStatusContainer.textContent)),this.events=Rl.call(this),bn.addEvents(this.events),this.touchUtil.addEventListeners(),this.nextBtnEvents=[{el:this.nextBtn,type:"keydown",handler:Cl.bind(this)},{el:this.nextBtn,type:"blur",handler:Ol.bind(this)}],(this.el.classList.contains($o.PRODUCT_CARD)||this.el.classList.contains($o.VARIABLE_HEIGHT))&&(this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&kl.call(this)})),this.observer.observe(this.el)),kl.bind(this)()}remove(){bn.removeEvents(this.events),this.touchUtil.removeEventListeners(),Ol.call(this),(this.el.classList.contains($o.PRODUCT_CARD)||this.el.classList.contains($o.VARIABLE_HEIGHT))&&this.observer.disconnect(),this[Zo]=new CustomEvent(Zo,{bubbles:!0}),this.el.dispatchEvent(this[Zo])}update(t){void 0===t&&(t={}),bn.removeEvents(this.events),this.el.classList.contains($o.SNEAK_PEAK)&&vl.bind(this)(),t.slides?this.slides=t.slides:this.slides=this.el.querySelectorAll(zo.ITEM),t.initialSlideIndex&&(this.initialSlideIndex=t.initialSlideIndex),"boolean"==typeof t.loopSlides&&(this.loopSlides=t.loopSlides),"boolean"==typeof t.activeSlideFocus&&(this.activeSlideFocus=t.activeSlideFocus),t.prevOnClick&&(this.prevOnClick=t.prevOnClick),t.nextOnClick&&(this.nextOnClick=t.nextOnClick),this.events=Rl.call(this),bn.addEvents(this.events),kl.bind(this)(),this[Qo]=new CustomEvent(Qo,{bubbles:!0}),this.el.dispatchEvent(this[Qo])}goToNextSlide(){if(!this.isSliding&&hl.bind(this)()){if(this[Yo]=new CustomEvent(Yo,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Yo]),this[Yo].defaultPrevented)return;ml.bind(this)(Xo,el.bind(this)())}}goToPrevSlide(){if(!this.isSliding&&cl.bind(this)()){if(this[Yo]=new CustomEvent(Yo,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Yo]),this[Yo].defaultPrevented)return;ml.bind(this)(Ko,sl.bind(this)())}}goToSlide(t){if(!this.isSliding){if(this[Yo]=new CustomEvent(Yo,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Yo]),this[Yo].defaultPrevented)return;ml.bind(this)(Ko,il.bind(this)(t))}}}const Dl=[];class _l{constructor(t){this.el=t.el,this.controls=t.controls||new Nl(t),Dl.push(this)}remove(){this.controls.remove(),delete this.controls;const t=Dl.indexOf(this);Dl.splice(t,1)}update(t){void 0===t&&(t={}),this.controls.update(t)}static getInstances(){return Dl}}const Ml="onUpdate",Pl="onRemove",Bl=[];function Hl(){const t=bn.getSelectorFromElement(this.statusMessage);return document.querySelector(t)}function Fl(t){const e=this.isMaxInputReached()?this.maxMessageTemplate:this.statusMessageTemplate,s=this.getUserInputLength();t.textContent=bn.interpolateString(e,{remaining:this.inputMaxLength-s,entered:s,max:this.inputMaxLength})}function Ul(){Fl.call(this,this.statusMessageVisual)}function Wl(t){var e;this.isMaxInputReached()&&(e=t.key,/^.$/.test(e))&&(this.statusMessageVisual.textContent=this.maxMessageTemplate+" ",setTimeout((()=>{Ul.call(this)}),200))}class ql{constructor(t){this.statusMessage=t.el,this.statusMessageSR=this.statusMessage.querySelector(".sr-only"),this.statusMessageVisual=this.statusMessage.querySelector('[role="status"]'),this.target=Hl.call(this),this.inputMaxLength=Number(this.target.getAttribute("maxLength")),this.statusMessageTemplate=this.statusMessage.getAttribute("data-status-msg-template"),this.maxMessageTemplate=this.statusMessage.getAttribute("data-max-msg-template"),this.debouncedSRUpdate=()=>{console.warn("Deprecated. Will be removed in v3.0.")},this.srLowCharWarnLvl=Number(this.statusMessage.getAttribute("data-sr-low-char-warning-lvl")),this.userHasBeenWarned=!1,this.ariaLiveWasReset=!1,this.events=[{el:this.target,type:"input",handler:this.updateStatusMessage.bind(this)},{el:this.target,type:"keydown",handler:Wl.bind(this)}],bn.addEvents(this.events),Ul.call(this),Bl.push(this)}getUserInputLength(){return this.target.value.length}isMaxInputReached(){return this.getUserInputLength()===this.inputMaxLength}isInputAtOrBelowLowCharWarnLvl(){console.warn("Deprecated. Will be removed in v3.0.")}updateStatusMessage(){this.isMaxInputReached()?this.statusMessageVisual.setAttribute("role","alert"):this.statusMessageVisual.setAttribute("role","status"),Ul.call(this)}update(){this.target=Hl.call(this),this.inputMaxLength=Number(this.target.getAttribute("maxLength")),this.statusMessageTemplate=this.statusMessage.getAttribute("data-status-msg-template"),this.maxMessageTemplate=this.statusMessage.getAttribute("data-max-msg-template"),this[Ml]=new CustomEvent(Ml,{bubbles:!0}),this.statusMessage.dispatchEvent(this[Ml])}remove(){bn.removeEvents(this.events);const t=Bl.indexOf(this);Bl.splice(t,1),this[Pl]=new CustomEvent(Pl,{bubbles:!0}),this.statusMessage.dispatchEvent(this[Pl])}static getInstances(){return Bl}}const Vl="onClick",Gl="onRemove",jl="onUpdate",$l=[];function Xl(){const t=this.el.dataset.target;if(t)return document.querySelector(`#${t}`);return this.el.getElementsByTagName("a")[0]??null}function Kl(t){if(t.target!==this.target){if(this[Vl]=new CustomEvent(Vl,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Vl]),this[Vl].defaultPrevented)return;this.target.click()}}class zl{constructor(t){this.el=t.el,this.target=t.target||Xl.call(this),this.onClick=t.onClick||Kl.bind(this),this.events=[],this.el.querySelectorAll("a, button").length>1&&(this.target=null),this.target&&(this.el.style.cursor="pointer",this.events=[{el:this.el,type:"click",handler:this.onClick}],bn.addEvents(this.events)),$l.push(this)}update(t){void 0===t&&(t={}),t&&(t.onClick&&(this.onClick=t.onClick),t.target&&(this.target=t.target),(t.onClick||t.target)&&this.target&&this.onClick&&(bn.removeEvents(this.events),this.events=[{el:this.el,type:"click",handler:this.onClick}],bn.addEvents(this.events))),this[jl]=new CustomEvent(jl,{bubbles:!0}),this.el.dispatchEvent(this[jl])}remove(){this.target&&(this.el.style.cursor="",bn.removeEvents(this.events));const t=$l.indexOf(this);$l.splice(t,1),this[Gl]=new CustomEvent(Gl,{bubbles:!0}),this.el.dispatchEvent(this[Gl])}static getInstances(){return $l}}const Yl=[],Ql="onShow",Zl="onShown",Jl="onHide",tr="onHidden",er="onRemove",sr="onUpdate",ir={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},nr="width",or="height",lr={ACTIVES:".show, .collapsing",DATA_MOUNT:'[data-mount="collapse"]'};function rr(){return this.el.classList.contains(nr)?nr:or}function ar(t,e){const s=t.classList.contains(ir.SHOW);e.length&&e.forEach((t=>{t.classList.toggle(ir.COLLAPSED,!s),t.setAttribute("aria-expanded",s)}))}class hr{constructor(t){let{el:e,toggle:s=!1,parent:i,addEventListener:n=!0}=t;this.isTransitioning=!1,this.isCollapsed=!0,this.triggerElement=e,"true"===this.triggerElement.getAttribute("aria-expanded").toString()&&(this.isCollapsed=!1);const o=bn.getSelectorFromElement(this.triggerElement);this.el=document.querySelector(o),this.toggleArray=Array.from(document.querySelectorAll(`[href="http://approjects.co.za/?big=#${this.el.id}"],[data-target="#${this.el.id}"]`)),this.events=[],this[Zl]=new CustomEvent(Zl),this[tr]=new CustomEvent(tr);Array.from(document.querySelectorAll(lr.DATA_MOUNT)).forEach((t=>{const e=bn.getSelectorFromElement(t),s=Array.from(document.querySelectorAll(e)).filter((t=>t===this.triggerElement));null!==e&&s.length&&this.toggleArray.push(t)})),this.parent=this.el.getAttribute("data-parent"),i||ar.bind(this)(this.el,this.toggleArray),s&&this.toggle(),n&&(this.events=[{el:e,type:"click",handler:t=>{"A"===t.currentTarget.tagName&&t.preventDefault(),this.#m()||this.toggle()}}],bn.addEvents(this.events)),Yl.push(this)}#g(){let t=[];return this.parent&&(t=hr.getInstances()),t}#m(){const t=this.#g();let e=!1;return t.forEach((t=>{t!==this&&t.parent===this.parent&&t.isTransitioning&&(e=!0)})),e}toggle(){this.el.classList.contains(ir.SHOW)?this.hide():this.show()}show(){if(this.isTransitioning||this.el.classList.contains(ir.SHOW))return;if(this[Ql]=new CustomEvent(Ql,{cancelable:!0}),this.el.dispatchEvent(this[Ql]),this[Ql].defaultPrevented)return;const t=rr.bind(this)();if(this.el.classList.remove(ir.COLLAPSE),this.el.classList.add(ir.COLLAPSING),this.el.style[t]=0,this.toggleArray.length&&this.toggleArray.forEach((t=>{t.classList.remove(ir.COLLAPSED),t.setAttribute("aria-expanded","true")})),this.isTransitioning=!0,this.parent){this.#g().forEach((t=>{t===this||t.parent!==this.parent||t.isCollapsed||t.toggle()}))}const e=`scroll${t[0].toUpperCase()+t.slice(1)}`,s=bn.getTransitionDurationFromElement(this.el);this.el.addEventListener(bn.TRANSITION_END,(()=>{this.el.classList.remove(ir.COLLAPSING),this.el.classList.add(ir.COLLAPSE),this.el.classList.add(ir.SHOW),this.el.style[t]="",this.isTransitioning=!1,this.isCollapsed=!1,this.el.dispatchEvent(this[Zl])}).bind(this),{once:!0}),bn.emulateTransitionEnd(this.el,s),this.el.style[t]=`${this.el[e]}px`}hide(){if(this.isTransitioning||!this.el.classList.contains(ir.SHOW))return;if(this[Jl]=new CustomEvent(Jl,{cancelable:!0}),this.el.dispatchEvent(this[Jl]),this[Jl].defaultPrevented)return;const t=rr.bind(this)();this.el.style[t]=`${this.el.getBoundingClientRect()[t]}px`,bn.reflow(this.el),this.el.classList.add(ir.COLLAPSING),this.el.classList.remove(ir.COLLAPSE),this.el.classList.remove(ir.SHOW),this.toggleArray.forEach((t=>{const e=bn.getSelectorFromElement(t);if(null!==e){Array.from(document.querySelectorAll(e)).forEach((e=>{e.classList.contains(ir.SHOW)||(t.classList.add(ir.COLLAPSED),t.setAttribute("aria-expanded","false"))}))}})),this.isTransitioning=!0;this.el.style[t]="";const e=bn.getTransitionDurationFromElement(this.el);this.el.addEventListener(bn.TRANSITION_END,(()=>{this.isTransitioning=!1,this.el.classList.remove(ir.COLLAPSING),this.el.classList.add(ir.COLLAPSE),this.isCollapsed=!0,this.el.dispatchEvent(this[tr])}).bind(this),{once:!0}),bn.emulateTransitionEnd(this.el,e)}update(){this[sr]=new CustomEvent(sr,{bubbles:!0}),this.el.dispatchEvent(this[sr])}remove(){bn.removeEvents(this.events);const t=Yl.indexOf(this);Yl.splice(t,1),this[er]=new CustomEvent(er,{bubbles:!0}),this.el.dispatchEvent(this[er])}static getInstances(){return Yl}}const cr=[],dr={DATA_MOUNT:'[data-mount="collapse-controls"]',DATA_ACTION_COLLAPSE:'[data-action="collapse"]',DATA_ACTION_EXPAND:'[data-action="expand"]'};function ur(){let t=0;this.collapseList.forEach((e=>{e.isCollapsed||t++})),t===this.collapseListCount?(pr(this.collapse),br(this.expand)):0===t?(pr(this.expand),br(this.collapse)):(pr(this.expand),pr(this.collapse))}function br(t){t.setAttribute("aria-pressed",!0),t.setAttribute("aria-disabled",!0),t.setAttribute("tabindex","-1"),t.classList.add("inactive")}function pr(t){t.setAttribute("aria-pressed",!1),t.setAttribute("aria-disabled",!1),t.removeAttribute("tabindex"),t.classList.remove("inactive")}class mr{constructor(t){if(this.el=t.el,this.accordion=function(t){const e=bn.getSelectorFromElement(t);return[].slice.call(document.querySelectorAll(e))}(this.el)[0],this.collapse=this.el.querySelector(dr.DATA_ACTION_COLLAPSE),this.expand=this.el.querySelector(dr.DATA_ACTION_EXPAND),this.collapseList=t.collapses||[],!this.collapseList.length){const t=this.accordion.querySelectorAll(lr.DATA_MOUNT),e=hr.getInstances();if(t.forEach((t=>{this.collapseList.push(e.find((e=>e.triggerElement===t)))})),!this.collapseList.length)throw new Error("Collapses must be auto-initialized or passed in as an option.")}this.collapseListCount=this.collapseList.length,this.openCount=0,this.events=[{el:this.collapse,type:"click",handler:this.collapseAll.bind(this)},{el:this.expand,type:"click",handler:this.expandAll.bind(this)}],this.collapseList.forEach((t=>{this.events.push({el:t.el,type:Zl,handler:ur.bind(this)},{el:t.el,type:tr,handler:ur.bind(this)})})),bn.addEvents(this.events),ur.call(this),cr.push(this)}collapseAll(){this.collapseList.forEach((t=>{t.hide()})),this.openCount=0,ur.call(this),this.expand.focus()}update(){this[sr]=new CustomEvent(sr,{bubbles:!0}),this.el.dispatchEvent(this[sr])}expandAll(){this.collapseList.forEach((t=>{t.show(),this.openCount=this.collapseListCount})),ur.call(this),this.collapse.focus()}remove(){bn.removeEvents(this.events);const t=cr.indexOf(this);cr.splice(t,1),this[er]=new CustomEvent(er,{bubbles:!0}),this.el.dispatchEvent(this[er])}static getInstances(){return cr}}const gr={DATA_MOUNT:'[data-mount="swatch"]',DATA_COLOR:"data-color",ROLE_IMG:"[role=img]"},vr="active",fr="swatch-light",Er="onUpdate",yr="onRemove",wr=[];class Sr{constructor(t){this.el=t.el,this.color=t.color||this.el.getAttribute(gr.DATA_COLOR)||this.#v(),this.#f(),this.#E(),this.observer=new MutationObserver(this.#E.bind(this)),this.observer.observe(this.el,{attributeFilter:["class"]}),this.observer.observe(this.el.parentElement,{attributeFilter:["class"]}),wr.push(this)}#v(){const t=this.el.querySelector("circle");if(t)return t.getAttribute("fill")}#f(){if(this.el.querySelector("circle")){const t=bn.hexToRGB(this.color),e=bn.getRGB(t),s={r:0,g:0,b:0},i=bn.getYiq(s),n=bn.getYiq(e);Math.floor(Math.abs(n-i))>128&&this.el.classList.add(fr)}}#E(){this.el.classList.contains(vr)||this.el.parentElement.classList.contains(vr)?this.#y():this.#w()}#y(){this.el.style.borderColor=this.color}#w(){this.el.style.borderColor=""}toggle(t){this.el.classList.toggle(vr,t)}update(t){void 0===t&&(t={}),t.color&&(this.color=t.color),this.#f(),this.#E(),this[Er]=new CustomEvent(Er,{bubbles:!0}),this.el.dispatchEvent(this[Er])}remove(){this.observer.disconnect();const t=wr.indexOf(this);wr.splice(t,1),this[yr]=new CustomEvent(yr,{bubbles:!0}),this.el.dispatchEvent(this[yr])}static getInstances(){return wr}}const Tr=[],Lr="onChange",Ar="onRemove",Cr="change",Ir=".color-picker-dot",Or="data-color-picker-image",xr="id",kr="src",Rr="color-picker-dot-light";function Nr(){const t=this.el.getAttribute(xr),e=this.el.parentNode.querySelector(`label[for="${t}"]`),{backgroundColor:s}=e.querySelector(Ir).style,i=bn.getRGB(s),n=bn.getYiq({r:0,g:0,b:0}),o=bn.getYiq(i);Math.floor(Math.abs(o-n))>128&&e.classList.add(Rr)}function Dr(t){const e=t.getAttribute(xr),s=this.colorPickerEl.querySelector(`label[for="${e}"]`).querySelector(Ir);let{backgroundColor:i}=s.style;s.getAttribute("data-color")&&(i=s.getAttribute("data-color")),s.style.borderColor=`${i}`}class _r{constructor(t){this.el=t.el,this.containerTarget=t.containerTarget,this.colorNameEl=t.colorNameTarget,this.colorPickerEl=t.colorPickerEl||this.el.parentNode,this.swatchEl=t.swatchEl||null,this.swatchEl?(this.swatch=new Sr({el:this.swatchEl}),this.el.checked&&this.swatch.toggle(!0)):(Nr.bind(this)(),this.el.checked&&Dr.call(this,this.el)),this.events=[{el:this.el,type:Cr,handler:t=>this._controlListener(t,this.containerTarget)}],bn.addEvents(this.events),Tr.push(this)}_controlListener(t,e){if(this.swatchEl){Array.from(this.colorPickerEl.querySelectorAll(gr.ROLE_IMG)).forEach((t=>t.classList.remove(vr))),this.swatch.toggle(!0)}else{Array.from(this.colorPickerEl.querySelectorAll(Ir)).forEach((t=>{t.style.borderColor=""})),Dr.call(this,t.target)}const s=t.target.getAttribute("data-color-name");if(this.colorNameEl.textContent=s,e){const s=e.nodeName.toLowerCase(),i=t.target.getAttribute(Or),n=new CustomEvent(Lr,{element:e.getAttribute(xr),imageUrl:i});i&&("img"===s?e.setAttribute(kr,i):e.style.backgroundImage=`url(${i})`,e.dispatchEvent(n))}}static getInstances(){return Tr}remove(){bn.removeEvents(this.events),this.swatch&&this.swatch.remove();const t=Tr.indexOf(this);Tr.splice(t,1),this[Ar]=new CustomEvent(Ar,{bubbles:!0}),this.el.dispatchEvent(this[Ar])}}const Mr={CONTROL:"input",DATA_MOUNT:'[data-mount="color-picker"]',CHECKED:":checked",COLOR_NAME:"data-color-picker-color-name"},Pr={DATA_CONTROLS:"data-controls",IMAGE:"data-color-picker-image"},Br=[];function Hr(){const t=this.el,e=this.containerTarget?this.containerTarget.nodeName.toLowerCase():null,s=t.querySelector(Mr.CHECKED);if(s){const t=s.getAttribute(Pr.IMAGE);t&&e&&("img"!==e&&console.warn(`ColorPicker’s \`data-controls\` attribute must resolve to a valid ID of an element. <${e}> element found.`),this.containerTarget.setAttribute("src",t))}}function Fr(t){this.el=t&&t.el||this.el;const e=this.el.getAttribute(Mr.COLOR_NAME),s=this.el.querySelector(`#${e}`);if(this.colorNameContainer=s,!this.el)return this;const i=this.el.getAttribute(Pr.DATA_CONTROLS);i&&(this.containerTarget=document.querySelector(`#${i}`),Hr.call(this)),this.controls=[];return this.el.querySelectorAll(Mr.CONTROL).forEach((t=>{const e=t.getAttribute("id"),s=t.parentNode.querySelector(`label[for="${e}"]`).querySelector(gr.ROLE_IMG);this.controls.push(new _r({el:t,containerTarget:this.containerTarget,colorNameTarget:this.colorNameContainer,colorPickerEl:this.el,swatchEl:s}))})),this}class Ur{constructor(t){Br.push(Fr.call(this,t))}static getInstances(){return Br}update(t){bn.tearDownComponentList(this.controls),Fr.call(this,t)}remove(){bn.tearDownComponentList(this.controls);const t=Br.indexOf(this);Br.splice(t,1)}}const Wr={DATA_MOUNT:'[data-mount="combobox-select"]',DATA_TEXT:"[data-combobox-text]",ROLE_COMBOBOX:"[role=combobox]",ROLE_LISTBOX:"[role=listbox]",ROLE_OPTION:"[role=option]"},qr="blur",Vr="click",Gr="focusout",jr="keydown",$r="onChange",Xr="onRemove",Kr="onUpdate",zr="current-item",Yr=0,Qr=1,Zr=2,Jr=3,ta=4,ea=5,sa=6,ia=7,na=8,oa=10,{ARROW_DOWN:la,ARROW_UP:ra,BACKSPACE:aa,CLEAR:ha,ENTER:ca,END:da,ESC:ua,HOME:ba,PAGE_DOWN:pa,PAGE_UP:ma,SPACE:ga}=bn.keys,va=[];function fa(t,e,s){return void 0===e&&(e=[]),void 0===s&&(s=[]),e.filter((e=>0===e.toLowerCase().indexOf(t.toLowerCase())&&s.indexOf(e)<0))}function Ea(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}class ya{constructor(t){let{el:e,manageFocusOnClick:s=!0}=t;this.el=e,this.manageFocusOnClick=s,this.comboEl=e.querySelector(Wr.ROLE_COMBOBOX),this.listboxEl=e.querySelector(Wr.ROLE_LISTBOX),this.optionEls=e.querySelectorAll(Wr.ROLE_OPTION),this.comboboxText=e.querySelector(Wr.DATA_TEXT),this.idBase=this.comboEl?.id||`combobox_${bn.getUid()}`,this.activeIndex=0,this.open=!1,this.searchString="",this.searchTimeout=null,this.events=[],e&&this.comboEl&&this.listboxEl&&Boolean(this.optionEls.length)&&this.#n(),va.push(this)}#n(){this.comboboxText.textContent=this.optionEls[0].textContent;const t=[{el:this.comboEl,type:qr,handler:this.#S.bind(this)},{el:this.listboxEl,type:Gr,handler:this.#S.bind(this)},{el:this.comboEl,type:Vr,handler:this.#T.bind(this)},{el:this.comboEl,type:jr,handler:this.#L.bind(this)}];this.events.push(...t),bn.addEvents(t),Array.from(this.optionEls).forEach(this.#A.bind(this))}#A(t,e){t.setAttribute("aria-selected",`${0===e}`),0===e?t.classList.add(zr):t.classList.remove(zr),t.id=`${this.idBase}-${e}`;const s=[{el:t,type:Vr,handler:t=>{t.stopPropagation(),this.#C(e)}}];this.events.push(...s),bn.addEvents(s)}#I(t){return"number"==typeof this.searchTimeout&&window.clearTimeout(this.searchTimeout),this.searchTimeout=window.setTimeout((()=>{this.searchString=""}),500),this.searchString+=t,this.searchString}#S(t){this.listboxEl.contains(t.relatedTarget)||this.open&&(this.selectOption(this.activeIndex,"blur"),this.#O(!1,!1))}#T(){this.#O(!this.open,!1)}#L(t){const{key:e}=t,s=this.optionEls.length-1,i=function(t,e){const{key:s,altKey:i,ctrlKey:n,metaKey:o}=t;switch(!0){case!e&&[la,ra,ca,ga].includes(s):return ea;case s===ba:return Zr;case s===da:return Jr;case s===aa:case s===ha:case 1===s.length&&s!==ga&&!i&&!n&&!o:return oa;default:if(e)switch(!0){case s===ra&&i:return Qr;case s===la&&!i:return ta;case s===ra:return na;case s===ma:return ia;case s===pa:return sa;case s===ua:return Yr;case s===ca:case s===ga:return Qr}}}(t,this.open);switch(i){case Jr:case Zr:this.#O(!0);case ta:case na:case ia:case sa:return t.preventDefault(),this.#x(function(t,e,s){switch(s){case Zr:return 0;case Jr:return e;case na:return Math.max(0,t-1);case ta:return Math.min(e,t+1);case ia:return Math.max(0,t-10);case sa:return Math.min(e,t+10);default:return t}}(this.activeIndex,s,i));case Qr:t.preventDefault(),this.selectOption(this.activeIndex,"keydown");case Yr:return t.preventDefault(),this.#O(!1);case oa:return this.#k(e);case ea:return t.preventDefault(),this.#O(!0)}}#k(t){this.#O(!0);const e=this.#I(t),s=function(t,e,s){void 0===s&&(s=0);const i=[...t.slice(s),...t.slice(0,s)],n=fa(e,i)[0];if(n)return t.indexOf(n);if((o=e.split("")).every((t=>t===o[0]))){const s=fa(e[0],i);return t.indexOf(s[0])}var o;return-1}(Array.from(this.optionEls).map((t=>t.textContent)),e,this.activeIndex+1);s>=0?this.#x(s):(window.clearTimeout(this.searchTimeout),this.searchString="")}#x(t){var e;this.activeIndex=t,this.comboEl.setAttribute("aria-activedescendant",`${this.idBase}-${t}`),Array.from(this.optionEls).forEach((t=>{t.classList.remove(zr)})),this.optionEls[t].classList.add(zr),(e=this.listboxEl)&&e.clientHeighto+n;i{e.setAttribute("aria-selected",`${s===t}`)})),this[$r]=new CustomEvent($r,{bubbles:!0,detail:{value:s.textContent,event:e}}),this.comboEl.dispatchEvent(this[$r])}update(t){void 0===t&&(t={}),this.comboEl=this.el.querySelector(Wr.ROLE_COMBOBOX),this.listboxEl=this.el.querySelector(Wr.ROLE_LISTBOX),this.optionEls=this.el.querySelectorAll(Wr.ROLE_OPTION),"boolean"==typeof t.manageFocusOnClick&&(this.manageFocusOnClick=t.manageFocusOnClick),this.el&&this.comboEl&&this.listboxEl&&Boolean(this.optionEls.length)&&(bn.removeEvents(this.events),this.#n()),this[Kr]=new CustomEvent(Kr,{bubbles:!0}),this.el.dispatchEvent(this[Kr])}remove(){bn.removeEvents(this.events);const t=va.indexOf(this);va.splice(t,1),this[Xr]=new CustomEvent(Xr,{bubbles:!0}),this.el.dispatchEvent(this[Xr])}}const wa="onSwap",Sa="onHide",Ta="onShow",La="onUpdate",Aa="onRemove",Ca=[];function Ia(){const t=bn.getSelectorFromElement(this.swapTrigger);return[].slice.call(document.querySelectorAll(t))}class Oa{constructor(t){this.swapTrigger=t.el,this.targetList=Ia.call(this),this.events=[{el:this.swapTrigger,type:"click",handler:this.swapContent.bind(this)}],bn.addEvents(this.events),Ca.push(this)}remove(){bn.removeEvents(this.events);const t=Ca.indexOf(this);Ca.splice(t,1),this[Aa]=new CustomEvent(Aa,{bubbles:!0}),this.swapTrigger.dispatchEvent(this[Aa])}hide(t){t.setAttribute("hidden",""),this[Sa]=new CustomEvent(Sa,{bubbles:!0}),t.dispatchEvent(this[Sa])}show(t){t.removeAttribute("hidden"),this[Ta]=new CustomEvent(Ta,{bubbles:!0}),t.dispatchEvent(this[Ta])}swapContent(){this[wa]=new CustomEvent(wa,{bubbles:!0,cancelable:!0}),this.swapTrigger.dispatchEvent(this[wa]),this[wa].defaultPrevented||this.targetList.forEach((t=>{t.hasAttribute("hidden")?this.show(t):this.hide(t)}))}update(){this.targetList=Ia.call(this),this[La]=new CustomEvent(La,{bubbles:!0}),this.swapTrigger.dispatchEvent(this[La])}static getInstances(){return Ca}}const xa=bn.isBiDirectional(),ka={SHOW:"show",FADE:"fade",FADING_OUT:"fading-out",ACTIVE:"active",FLYOUT:"flyout"},Ra={START:xa?"right":"left",END:xa?"left":"right",ALIGNMENT:"start"},Na={left:["left","bottom","top","right"],right:["right","bottom","top","left"],top:["top","right","bottom","left"],bottom:["bottom","right","top","left"]};function Da(t,e){switch(void 0===e&&(e=Ra.END),t){case"top":case"bottom":return t;case"left":case"start":return Ra.START;case"right":case"end":return Ra.END;default:return e}}function _a(t,e){switch(void 0===e&&(e=Ra.ALIGNMENT),t){case"center":case"start":case"end":return t;default:return e}}function Ma(t,e,s){let i=0,n=0;return"left"===t?"right"===e?i+=this.boundingRect.el.width+this.offset:"left"===e?i-=this.boundingRect.menu.width+this.offset:"center"===s?i-=(this.boundingRect.menu.width-this.boundingRect.el.width)/2:"end"===s&&!xa||"start"===s&&xa?(i-=this.boundingRect.menu.width-this.boundingRect.el.width,n=Pa.call(this,i),i+=n):(n=Ba.call(this,i),i+=n):"right"===e?i+=this.boundingRect.menu.width+this.offset:"left"===e?i-=this.boundingRect.el.width+this.offset:"center"===s?i+=(this.boundingRect.menu.width-this.boundingRect.el.width)/2:"start"===s&&!xa||"end"===s&&xa?(i+=this.boundingRect.menu.width-this.boundingRect.el.width,n=Ba.call(this,i),i+=n):(n=Pa.call(this,i),i+=n),this.overflowOffset=Math.round(n),i}function Pa(){const t=this.boundingRect.window.width-(this.boundingRect.el.x+this.boundingRect.el.width)+this.boundingRect.menu.width;return t>this.boundingRect.window.width?t-this.boundingRect.window.width:0}function Ba(){const t=this.boundingRect.el.x+this.boundingRect.menu.width;return t>this.boundingRect.window.width?-(t-this.boundingRect.window.width):0}function Ha(t,e){let s=0;return"top"===t?s-=this.boundingRect.menu.height+this.offset:"bottom"===t?s+=this.boundingRect.el.height+this.offset:"center"===e?s-=(this.boundingRect.menu.height-this.boundingRect.el.height)/2:"end"===e&&(s-=this.boundingRect.menu.height-this.boundingRect.el.height),s}class Fa{constructor(t){var e;this.el=t.el,this.menu=t.menu||function(t){if(t.attributes["aria-controls"])return document.querySelector(`#${t.attributes["aria-controls"].value}`)}(this.el),this.parent=this.el.offsetParent||this.el.parentElement,this.placement=Da(t.placement||this.el.getAttribute("data-placement")),this.alignment=_a(t.alignment||this.el.getAttribute("data-alignment")),this.offset=t.offset?parseInt(t.offset,10):0,this.translateX=0,this.translateY=0,this.overflowOffset=0,this.enableReflow="boolean"==typeof t.enableReflow?t.enableReflow:!(e=this.el).hasAttribute("data-disable-reflow")||"false"===e.getAttribute("data-disable-reflow"),this.enableFade="boolean"==typeof t.enableFade?t.enableFade:this.menu.classList.contains(ka.FADE),this.shown=!1;const s=window.getComputedStyle(this.parent).position;"relative"!==s&&"absolute"!==s&&(this.parent.style.position="relative"),!0===t.enableFade?this.menu.classList.add(ka.FADE):!1===t.enableFade&&this.menu.classList.remove(ka.FADE),this.menu.hasAttribute("tabindex")||this.menu.setAttribute("tabindex","-1")}get currentPosition(){const t={placement:this.placement,alignment:this.alignment};return this.enableReflow&&this.reflowPosition||t}calcReflowPosition(){const t={top:this.boundingRect.el.top,bottom:window.innerHeight-this.boundingRect.el.bottom,left:this.boundingRect.el.left,right:document.body.clientWidth-this.boundingRect.el.right},e=this.boundingRect.menu.width+this.offset,s=this.boundingRect.menu.height+this.offset,i=Na[this.placement].slice();let n=e-this.boundingRect.el.width,o=s-this.boundingRect.el.height;"center"===this.alignment&&(n/=2,o/=2);let{placement:l,alignment:r}=this;t.left{this.menu.classList.remove(ka.FADING_OUT)}),{once:!0}),this.menu.classList.add(ka.FADING_OUT))}toggle(){this.shown?this.hide():this.show()}update(t){if(void 0===t&&(t={}),t.placement&&(this.placement=Da(t.placement)),t.alignment&&(this.alignment=_a(t.alignment)),void 0!==t.offset){const e=parseInt(t.offset,10);isNaN(e)||(this.offset=e)}"boolean"==typeof t.enableReflow&&(this.enableReflow=t.enableReflow),"boolean"==typeof t.enableFade&&t.enableFade!==this.enableFade&&(this.enableFade=t.enableFade,this.menu.classList.toggle(ka.FADE)),this.shown&&this.positionMenu()}}const Ua={DATA_MOUNT:'[data-mount="dropdown"]',MENU:".dropdown-menu"},Wa="onHide",qa="onShow",Va="onUpdate",Ga="onRemove",ja={SHOW:"show",ACTIVE:"active",BOTTOM:"dropdown",TOP:"dropup",RIGHT:"dropright",LEFT:"dropleft"},$a={...Ra,PLACEMENT:"bottom"},{ARROW_DOWN:Xa,ARROW_LEFT:Ka,ARROW_RIGHT:za,ARROW_UP:Ya,ENTER:Qa,ESC:Za,SPACE:Ja,TAB:th}=bn.keys,eh=[];function sh(t){t.preventDefault(),this.toggle()}function ih(t){const{key:e}=t;e!==Ja&&e!==Qa||(t.preventDefault(),sh.bind(this)(t),this.isSubDropdown&&this.arrowableItems[0].focus()),this.shown&&this.arrowableItems&&e===Xa&&(t.preventDefault(),this.arrowableItems[0].focus())}function nh(t){if(this.arrowableItems?.includes(t.target)){const{key:e}=t;switch(e){case za:case Ka:oh.call(this,t);break;case Xa:lh.call(this,t);break;case Ya:rh.call(this,t);break;case th:ah.call(this,t)}}}function oh(t){const{key:e,target:s}=t,i=this.isSubDropdown?this.menu.parentElement:s.parentElement;if(i.classList.contains(ja.RIGHT)||i.classList.contains(ja.LEFT)){const t=i.classList.contains(ja.RIGHT)?ja.RIGHT:ja.LEFT,n=e===za?ja.RIGHT:ja.LEFT,o=this.isRTL?n!==t:n===t,l=this.subDropdowns?.find((t=>s===t.el||t.el.contains(s)));o&&l?(s.click(),l.arrowableItems[0].focus()):!o&&this.isSubDropdown&&this.hide()}}function lh(t){t.preventDefault(),document.activeElement!==this.arrowableItems[this.arrowableItems.length-1]&&this.arrowableItems[this.arrowableItems.indexOf(document.activeElement)+1].focus()}function rh(t){t.preventDefault(),document.activeElement!==this.arrowableItems[0]&&this.arrowableItems[this.arrowableItems.indexOf(document.activeElement)-1].focus()}function ah(t){document.activeElement===this.arrowableItems[this.arrowableItems.length-1]&&this.isSubDropdown&&(t.preventDefault(),this.hide())}function hh(t){!this.shown||this.menu.contains(t.target)||this.el.contains(t.target)||this.hide({setFocus:!1})}function ch(t){this.shown&&!this.menu.contains(t.target)&&this.hide()}function dh(t){const{key:e}=t;if(e===Za&&this.shown){t.stopPropagation();const e=this.subDropdowns?.find((t=>t.shown));if(e)return void e.hide();this.hide()}}function uh(t){const e=this.subDropdowns?.find((e=>t.target===e.el||e.el.contains(t.target)));e&&!e.shown&&e.show()}function bh(t){const e=this.subDropdowns?.find((e=>t.target===e.el||e.el.contains(t.target)));e&&e.shown&&e.hide({setFocus:!1})}function ph(t){const e=this.subDropdowns?.find((e=>t.target===e.menu||e.menu.contains(t.target)));e&&!e.shown&&e.show()}function mh(t){const e=this.subDropdowns?.find((e=>t.target===e.menu||e.menu.contains(t.target)));e&&e.shown&&e.hide({setFocus:!1})}function gh(t,e){const s=ja[e.toUpperCase()];t.classList.remove(ja.BOTTOM,ja.TOP,ja.RIGHT,ja.LEFT),t.classList.add(s)}class vh extends Fa{constructor(t){const e={...t},s=function(t){for(let e=0;e0&&(this.subDropdowns=this.#R()),this.isSubDropdown=Boolean(this.menu.parentElement.closest(Ua.MENU)),"ul"!==this.menu.nodeName.toLowerCase()&&"ol"!==this.menu.nodeName.toLowerCase()||(this.arrowableItems=this.#N()),this.events=this.#D(),bn.addEvents(this.events),this.menuObserver=new MutationObserver(this.update.bind(this)),this.menuObserver.observe(this.menu,{childList:!0,subtree:!0}),this.isSubDropdown||eh.push(this)}#R(){const t=[];return this.subMenus.forEach((e=>{t.push(new vh({el:this.menu.querySelector(`[aria-controls=${e.id}]`)}))})),t}#N(){const t=new Set(this.menu.children);return bn.getTabbableElements(this.menu).filter((e=>t.has(e.parentElement)))}#D(){const t=[{el:this.el,type:"click",handler:sh.bind(this)},{el:this.el,type:"keydown",handler:ih.bind(this)},{el:this.menu,type:"keydown",handler:nh.bind(this)}];return this.isSubDropdown||t.push({el:document,type:"mousedown",handler:hh.bind(this)},{el:document,type:"focusin",handler:ch.bind(this)},{el:document,type:"keydown",handler:dh.bind(this)}),this.subMenus.length>0&&(this.subMenus.forEach((e=>{t.push({el:e,type:"mouseenter",handler:ph.bind(this)},{el:e,type:"mouseleave",handler:mh.bind(this)})})),this.subDropdowns&&this.subDropdowns.forEach((e=>{t.push({el:e.el,type:"mouseenter",handler:uh.bind(this)},{el:e.el,type:"mouseleave",handler:bh.bind(this)})}))),t}show(){this[qa]=new CustomEvent(qa,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[qa]),this[qa].defaultPrevented||(super.show(),this.el.setAttribute("aria-expanded",this.shown))}hide(t){void 0===t&&(t={}),this[Wa]=new CustomEvent(Wa,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Wa]),this[Wa].defaultPrevented||(super.hide(t),this.el.setAttribute("aria-expanded",this.shown))}update(t){void 0===t&&(t={}),bn.removeEvents(this.events);const e={...t};e.enableFade=!1,this.subMenus=Array.from(this.menu.querySelectorAll(Ua.MENU)),this.subMenus&&(this.subDropdowns&&this.subDropdowns.forEach((t=>t.remove())),this.subDropdowns=this.#R()),void 0!==this.arrowableItems&&(this.arrowableItems=this.#N()),t.placement&&(e.placement=Da(t.placement,$a.PLACEMENT)),super.update(e);const s=Da(this.placement,$a.PLACEMENT);gh(this.parent,s),this.events=this.#D(),bn.addEvents(this.events),this[Va]=new CustomEvent(Va,{bubbles:!0}),this.el.dispatchEvent(this[Va])}remove(){bn.removeEvents(this.events),this.menuObserver.disconnect(),this.subDropdowns&&this.subDropdowns.forEach((t=>t.remove()));const t=eh.indexOf(this);eh.splice(t,1),this[Ga]=new CustomEvent(Ga,{bubbles:!0}),this.el.dispatchEvent(this[Ga])}static getInstances(){return eh}}const fh=[],Eh={DATA_MOUNT:'[data-mount="form-star"]',INPUTS:".form-star-input",LABEL:"data-checked-label",TEXT:".form-star-text"},yh={EMPTY:"form-star-empty"},wh="onRemove";function Sh(){this.el.classList.remove(yh.EMPTY)}function Th(){this.getCheckedInputs().length||this.el.classList.add(yh.EMPTY)}function Lh(t){this.checkedLabel.textContent=t.target.labels[0].querySelector(Eh.TEXT).textContent,Sh.bind(this)()}function Ah(){return[].slice.call(this.inputs).filter((t=>!0===t.disabled)).length===this.inputs.length||this.el.closest("fieldset").disabled}function Ch(){if(!this.inputs[0].labels){const t=this.el.querySelectorAll("label");[].slice.call(t).forEach((t=>{if(t.htmlFor){const e=document.getElementById(t.htmlFor);e&&(e.labels=[t])}}))}}class Ih{constructor(t){this.el=t.el,this.inputs=this.el.querySelectorAll(Eh.INPUTS),this.checkedLabel=t.checkedLabel||document.getElementById(this.el.getAttribute(Eh.LABEL)),this.isDisabled=Ah.bind(this)(),this.events=[{el:this.el,type:"mouseenter",handler:Sh.bind(this)},{el:this.el,type:"mouseleave",handler:Th.bind(this)},{el:this.el,type:"change",handler:t=>{Lh.bind(this)(t)}}],this.isDisabled&&(this.events=[]),fh.push(this),Ch.bind(this)();const e=this.getCheckedInputs();e.length?this.checkedLabel.textContent=e[0].labels[0].querySelector(Eh.TEXT).textContent:this.el.classList.add(yh.EMPTY),bn.addEvents(this.events)}getCheckedInputs(){return[].slice.call(this.inputs).filter((t=>!0===t.checked))}remove(){bn.removeEvents(this.events);const t=fh.indexOf(this);fh.splice(t,1),this[wh]=new CustomEvent(wh,{bubbles:!0}),this.el.dispatchEvent(this[wh])}static getInstances(){return fh}}const Oh={DATA_MOUNT:'.needs-validation, [data-mount="validation"]',INPUTS:"input, select, textarea",SUBMIT:'[type="submit"]',FEEDBACK_LIST:'[data-mount="feedback-list"]',FEEDBACK_EL:"data-feedback",FEEDBACK_CONTENT:"data-feedback-content",CHECKBOX_REQUIRED:"data-form-check-required",CHECKBOX_MAX:"data-form-check-max"},xh="onValid",kh="onRemove",Rh="onUpdate",Nh={DISPLAY:{NONE:"d-none"},IS_INVALID:"is-invalid"},Dh=[];function _h(t){if(!t.feedback.link){const e=document.createElement("li"),s=document.createElement("a"),i=document.createTextNode(t.feedback.content);s.setAttribute("href",`#${t.id}`),t.feedback.focusControls=new bn.FocusControls({el:s}),s.append(i),e.append(s),t.feedback.link=e,t.group&&t.group.siblings.forEach((s=>{s.feedback.link=e,s.feedback.focusControls=t.feedback.focusControls}))}this.feedbackList.append(t.feedback.link),t.feedback.focusControls||(t.feedback.focusControls=new bn.FocusControls({el:t.feedback.link.querySelector("a")})),t.feedback.linkRemoved=!1,t.group&&t.group.siblings.forEach((t=>{t.feedback.linkRemoved=!1})),this.feedbackListContainer.classList.remove(Nh.DISPLAY.NONE)}function Mh(t){t.group?t.group.siblings.forEach((t=>{t.feedback.linkRemoved=!0,t.feedback.focusControls.remove()})):(t.feedback.linkRemoved=!0,t.feedback.focusControls.remove()),t.feedback.link.remove(),0===this.feedbackList.children.length&&this.feedbackListContainer.classList.add(Nh.DISPLAY.NONE)}function Ph(t){const e={id:t.getAttribute(Oh.FEEDBACK_EL)};return e.id&&(e.content=t.getAttribute(Oh.FEEDBACK_CONTENT),e.el=this.el.querySelector(`#${e.id}`),e.linkRemoved=!0),e}function Bh(t){t.classList.remove(Nh.IS_INVALID),t.setAttribute("aria-invalid","false"),t.group&&t.group.siblings.forEach((t=>{t.classList.remove(Nh.IS_INVALID),t.setAttribute("aria-invalid",!1)})),t.feedback.el&&(t.feedback.el.classList.remove(Nh.IS_INVALID),t.feedback.el.textContent="",this.feedbackList&&t.feedback.link&&!t.feedback.linkRemoved&&Mh.bind(this)(t))}function Hh(t){t.classList.add(Nh.IS_INVALID),t.setAttribute("aria-invalid",!0),t.group&&t.group.siblings.forEach((t=>{t.classList.add(Nh.IS_INVALID),t.setAttribute("aria-invalid",!0)})),t.feedback.el&&t.feedback.content&&(t.feedback.el.classList.add(Nh.IS_INVALID),t.feedback.el.textContent=t.feedback.content,this.feedbackList&&t.feedback.linkRemoved&&_h.bind(this)(t))}function Fh(t){const{name:e,type:s}=t;return[].slice.call(this.inputs).reduce(((t,i)=>{if(i.type===s&&i.name===e){t.siblings?t.siblings.push(i):t.siblings=[i];const e=i.getAttribute(Oh.CHECKBOX_REQUIRED),s=i.getAttribute(Oh.CHECKBOX_MAX);if(e){let s=Number(e);isNaN(s)&&(s="true"===e?1:0),t.requiredMin=s}if(s){const e=Number(s);isNaN(e)||(t.maxValid=e)}i.getAttribute(Oh.FEEDBACK_EL)&&(t.feedback?t.feedback.push(i):t.feedback=[i])}return t}),{})}function Uh(t){const{type:e,required:s}=t;let i=t;if(s&&t.setAttribute("aria-invalid","false"),"radio"===e||"checkbox"===e){const e=Fh.bind(this)(t),{feedback:s,...n}=e;n.siblings.length>1&&(t.group=n),s&&(i=s[0])}t.feedback=Ph.bind(this)(i)}function Wh(){const t=this.feedbackList.previousElementSibling;this.feedbackListFocusEl=this.feedbackListContainer,t&&["H1","H2","H3","H4","H5","H6","P"].indexOf(t.tagName)>-1&&(this.feedbackListFocusEl=t),this.feedbackListFocusEl.tabIndex=-1}function qh(){this.feedbackListFocusEl.removeAttribute("tabIndex")}function Vh(){this.events.push({el:this.el,type:"submit",handler:t=>{this.onSubmit(t)}})}function Gh(){this.inputs.forEach((t=>{Uh.bind(this)(t),this.events.push({el:t,type:"blur",handler:()=>{setTimeout((()=>{this.validate(t,!0)}),0)}},{el:t,type:"change",handler:()=>{this.validate(t,!0)}})}))}class jh{constructor(t){let{el:e,preventFormSubmission:s=!1,allowEmptySubmit:i=!1,feedbackListContainer:n}=t;this.el=e,this.preventFormSubmission=s||void 0!==this.el.dataset.preventFormSubmission,this.allowEmptySubmit=i||void 0!==this.el.dataset.allowEmptySubmit,this.inputs=this.el.querySelectorAll(Oh.INPUTS),this.submit=this.el.querySelector(Oh.SUBMIT),this.feedbackListContainer=n||this.el.querySelector(Oh.FEEDBACK_LIST),this.feedbackListContainer&&(this.feedbackList=this.feedbackListContainer.querySelector("ol"),Wh.call(this)),this.events=[],Vh.call(this),Dh.push(this),this.feedbackList&&0===this.feedbackList.children.length&&this.feedbackListContainer.classList.add(Nh.DISPLAY.NONE),Gh.call(this),bn.addEvents(this.events)}validate(t,e){void 0===e&&(e=!1);const s=document.activeElement;t.group&&t.name===s.name||(this.isInputValid(t)?Bh.bind(this)(t):e||Hh.bind(this)(t))}isInputValid(t){if(t.group&&(t.group.requiredMin||t.group.maxValid)){const e=t.group.siblings.filter((t=>!0===t.checked));return!(t.group.requiredMin&&e.lengtht.group.maxValid)}return t.checkValidity()}isFormValid(){return![].slice.call(this.inputs).some((t=>!1===this.isInputValid(t)))}isFormEmpty(){return![].slice.call(this.inputs).some((t=>{const{type:e,value:s,checked:i}=t;if("radio"===e||"checkbox"===e){if(i)return!0}else if(null!=s&&s.trim().length)return!0;return!1}))}onSubmit(t){t.preventDefault(),this.inputs.forEach((t=>{this.validate(t)})),this.isFormValid()?(this[xh]=new CustomEvent(xh,{bubbles:!0}),this.el.dispatchEvent(this[xh]),this.preventFormSubmission||this.isFormEmpty()&&!this.allowEmptySubmit||this.el.submit()):this.feedbackListFocusEl&&this.feedbackListFocusEl.focus()}update(t){void 0===t&&(t={}),t&&(this.inputs=this.el.querySelectorAll(Oh.INPUTS),this.submit=this.el.querySelector(Oh.SUBMIT),bn.removeEvents(this.events),this.events=[],Vh.call(this),Gh.call(this),bn.addEvents(this.events),t.preventFormSubmission&&(this.preventFormSubmission=t.preventFormSubmission),t.feedbackListContainer&&(qh.call(this),this.feedbackListContainer=t.feedbackListContainer,this.feedbackList=this.feedbackListContainer.querySelector("ol"),Wh.call(this),0===this.feedbackList.children.length?this.feedbackListContainer.classList.add(Nh.DISPLAY.NONE):this.feedbackListContainer.classList.remove(Nh.DISPLAY.NONE)),t.allowEmptySubmit&&(this.allowEmptySubmit=t.allowEmptySubmit)),this[Rh]=new CustomEvent(Rh,{bubbles:!0}),this.el.dispatchEvent(this[Rh])}remove(){bn.removeEvents(this.events);const t=Dh.indexOf(this);Dh.splice(t,1),this[kh]=new CustomEvent(kh,{bubbles:!0}),this.el.dispatchEvent(this[kh])}static getInstances(){return Dh}}const $h=[],Xh={CLICK:"click",HIDE:"onHide",HIDDEN:"onHidden",SHOW:"onShow",SHOWN:"onShown",ON_REMOVE:"onRemove",ON_UPDATE:"onUpdate",FOCUSIN:"focusin",RESIZE:"resize",CLICK_DISMISS:"click.dismiss",KEYDOWN:"keydown"},Kh={SCROLLABLE:"modal-dialog-scrollable",SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},zh={DIALOG:".modal-dialog",MODAL_BODY:".modal-body",DATA_MOUNT:'[data-mount="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top"};function Yh(t){switch(bn.getKeyCode(t)){case bn.keyCodes.ESC:t.preventDefault(),this.hide();break;case bn.keyCodes.TAB:document.activeElement!==this.firstTabbableElement&&document.activeElement!==this.el||!t.shiftKey||(t.preventDefault(),this.lastTabbableElement.focus()),document.activeElement!==this.lastTabbableElement||t.shiftKey||(t.preventDefault(),this.firstTabbableElement.focus())}}function Qh(t){document===t.target||this.el===t.target||this.el.contains(t.target)||this.el.focus()}function Zh(t){this.dialog.contains(t.target)||this.el.dispatchEvent(this[Xh.CLICK_DISMISS])}function Jh(t){t.target===t.currentTarget&&this.hide()}function tc(){const t=this.el.classList.contains(Kh.FADE);this.el.parentNode&&this.el.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this.el),this.el.style.display="block",this.dialog.classList.contains(Kh.SCROLLABLE)?this.dialog.querySelector(zh.MODAL_BODY).scrollTop=0:this.el.scrollTop=0,t&&bn.reflow(this.el),this.el.classList.add(Kh.SHOW),ec.call(this);const e=()=>{const t=this.dialog.querySelector(zh.DATA_DISMISS);t&&t.focus(),this.isTransitioning=!1,this.el.dispatchEvent(this[Xh.SHOWN])};if(t){const t=bn.getTransitionDurationFromElement(this.dialog);this.dialog.addEventListener(bn.TRANSITION_END,e.bind(this),{once:!0}),bn.emulateTransitionEnd(this.dialog,t)}else e.call(this)}function ec(){document.removeEventListener(Xh.FOCUSIN,this.onDocumentFocusin),document.addEventListener(Xh.FOCUSIN,this.onDocumentFocusin)}function sc(){this.isShown?this.el.addEventListener(Xh.KEYDOWN,this.onKeydown):this.el.removeEventListener(Xh.KEYDOWN,this.onKeydown)}function ic(){this.isShown?window.addEventListener(Xh.RESIZE,this.handleUpdate):window.removeEventListener(Xh.RESIZE,this.handleUpdate)}function nc(){this.el.style.display="none",this.isTransitioning=!1,lc.call(this,(()=>{document.body.classList.remove(Kh.OPEN),ac.call(this),dc.call(this),this.el.dispatchEvent(this[Xh.HIDDEN]),document.body.removeEventListener(Xh.CLICK,this.onBackdropClick)}))}function oc(){this.backdrop&&(this.backdrop.remove(),this.backdrop=null),this.trigger&&this.trigger.focus()}function lc(t){const e=this.el.classList.contains(Kh.FADE)?Kh.FADE:"";if(this.isShown){if(this.backdrop=document.createElement("div"),this.backdrop.className=Kh.BACKDROP,e&&this.backdrop.classList.add(e),document.body.append(this.backdrop),document.body.addEventListener(Xh.CLICK,this.onBackdropClick),this.el.addEventListener(Xh.CLICK_DISMISS,this.onClickDismiss),e&&bn.reflow(this.backdrop),this.backdrop.classList.add(Kh.SHOW),!t)return;if(!e)return void t();const s=bn.getTransitionDurationFromElement(this.backdrop);this.backdrop.addEventListener(bn.TRANSITION_END,t,{once:!0}),bn.emulateTransitionEnd(this.backdrop,s)}else if(!this.isShown&&this.backdrop){this.backdrop.classList.remove(Kh.SHOW);const e=()=>{oc.call(this),t&&t()};if(this.el.classList.contains(Kh.FADE)){const t=bn.getTransitionDurationFromElement(this.backdrop);this.backdrop.addEventListener(bn.TRANSITION_END,e,{once:!0}),bn.emulateTransitionEnd(this.backdrop,t)}else e()}else t&&t()}function rc(){const t=this.el.scrollHeight>document.documentElement.clientHeight;!this.isBodyOverflowing&&t&&(this.el.style.paddingLeft=`${this.scrollbarWidth}px`),this.isBodyOverflowing&&!t&&(this.el.style.paddingRight=`${this.scrollbarWidth}px`)}function ac(){this.el.style.paddingLeft="",this.el.style.paddingRight=""}function hc(){const t=document.body.getBoundingClientRect();this.isBodyOverflowing=t.left+t.right{const e=t.style.paddingRight??0,s=getComputedStyle(t)["padding-right"];this.data.set({element:t,attribute:"padding-right"},e),t.style.paddingRight=`${parseFloat(s)+this.scrollbarWidth}px`})),e.forEach((t=>{const e=t.style.marginRight??0,s=getComputedStyle(t)["margin-right"];this.data.set({element:t,attribute:"margin-right"},e),t.style.marginRight=parseFloat(s)-this.scrollbarWidth+"px"}));const s=document.body.style.paddingRight??0,i=getComputedStyle(document.body)["padding-right"];this.data.set({element:document.body,attribute:"padding-right"},s),document.body.style.paddingRight=`${parseFloat(i)+this.scrollbarWidth}px`}document.body.classList.add(Kh.OPEN)}function dc(){[].slice.call(document.querySelectorAll(zh.FIXED_CONTENT)).forEach((t=>{const e={element:t,attribute:"padding-right"},s=this.data.get(e);t.style.paddingRight=s??"",this.data.delete(e)}));[].slice.call(document.querySelectorAll(`${zh.STICKY_CONTENT}`)).forEach((t=>{const e={element:t,attribute:"margin-right"},s=this.data.get(e);void 0!==s&&(t.style.marginRight=s,this.data.delete(e))}));const t={element:document.body,attribute:"padding-right"},e=this.data.get(t);this.data.delete(t),document.body.style.paddingRight=e??""}function uc(){this.tabbableElements=bn.getTabbableElements(this.dialog).filter((t=>t.offsetHeight>0)),this.firstTabbableElement=this.tabbableElements[0],this.lastTabbableElement=this.tabbableElements[this.tabbableElements.length-1]}class bc{constructor(t){let{el:e,displayOnInit:s=!1}=t;this.el=e,this.button=document.querySelector(`[data-target="#${this.el.id}"]`),this.buttons=document.querySelectorAll(`[data-target="#${this.el.id}"]`),this.dialog=this.el.querySelector(zh.DIALOG),this.backdrop=null,this.isShown=!1,this.isBodyOverflowing=!1,this.isTransitioning=!1,this.scrollbarWidth=0,this.data=new WeakMap,this.dialogObserver=new MutationObserver(uc.bind(this)),this[Xh.SHOWN]=new CustomEvent(Xh.SHOWN,{detail:this.el}),this[Xh.SHOW]=new CustomEvent(Xh.SHOW,{detail:this.el}),this[Xh.HIDE]=new CustomEvent(Xh.HIDE),this[Xh.HIDDEN]=new CustomEvent(Xh.HIDDEN),this[Xh.CLICK_DISMISS]=new CustomEvent(Xh.CLICK_DISMISS),this.events=[],this.buttons&&(this.buttons.forEach((t=>{this.events.push({el:t,type:Xh.CLICK,handler:t=>{this.toggle(t)}})})),bn.addEvents(this.events)),this.onDocumentFocusin=Qh.bind(this),this.onKeydown=Yh.bind(this),this.onBackdropClick=Zh.bind(this),this.onClickDismiss=Jh.bind(this),this.handleUpdate=this.handleUpdate.bind(this),this.hide=this.hide.bind(this),(s||"true"===this.el.dataset.displayOnInit)&&this.show(),$h.push(this)}toggle(t){return t&&(this.trigger=t.target),this.isShown?this.hide():this.show()}show(){this.isShown||this.isTransitioning||(this.el.classList.contains(Kh.FADE)&&(this.isTransitioning=!0),this.el.dispatchEvent(this[Xh.SHOW]),this.isShown||this[Xh.SHOW].defaultPrevented||(this.isShown=!0,hc.call(this),cc.call(this),rc.call(this),ic.call(this),this.el.addEventListener(Xh.CLICK_DISMISS,this.hide),this.el.querySelectorAll(zh.DATA_DISMISS).forEach((t=>t.addEventListener(Xh.CLICK,this.hide))),lc.call(this,(()=>{tc.call(this),uc.call(this),sc.call(this),this.dialogObserver.observe(this.dialog,{attributes:!0,childList:!0,subtree:!0})}))))}hide(t){if(t&&t.preventDefault(),!this.isShown||this.isTransitioning)return;if(this.el.dispatchEvent(this[Xh.HIDE]),!this.isShown||this[Xh.HIDE].defaultPrevented)return;this.isShown=!1;const e=this.el.classList.contains(Kh.FADE);if(e&&(this.isTransitioning=!0),sc.call(this),ic.call(this),document.removeEventListener(Xh.FOCUSIN,this.onDocumentFocusin),this.el.classList.remove(Kh.SHOW),this.el.removeEventListener(Xh.CLICK_DISMISS,this.onClickDismiss),this.dialogObserver.disconnect(),e){const t=bn.getTransitionDurationFromElement(this.el);this.el.addEventListener(bn.TRANSITION_END,nc.bind(this),{once:!0}),bn.emulateTransitionEnd(this.el,t)}else nc.call(this)}handleUpdate(){rc.call(this)}remove(){bn.removeEvents(this.events),document.removeEventListener(Xh.FOCUSIN,this.onDocumentFocusin);const t=$h.indexOf(this);$h.splice(t,1),this[Xh.ON_REMOVE]=new CustomEvent(Xh.ON_REMOVE,{bubbles:!0}),this.el.dispatchEvent(this[Xh.ON_REMOVE])}update(){this[Xh.ON_UPDATE]=new CustomEvent(Xh.ON_UPDATE,{bubbles:!0}),this.el.dispatchEvent(this[Xh.ON_UPDATE])}static getInstances(){return $h}}const pc={DATA_MOUNT:'[data-mount="multi-feature"]',FEATURE:".multi-feature-feature",ACCORDION:".accordion"},mc="onRemove",gc="onUpdate",vc={DISPLAY:{BLOCK:"block",NONE:"d-none"}},fc=[];function Ec(){this.inCustomViewport()?Do(this.el,(()=>{let t,e;this.collapses.forEach(((s,i)=>{s.el.addEventListener(bn.TRANSITION_END,(()=>{const n=s.el.classList.contains(ir.SHOW);s.el.classList.add(ir.SHOW),s.feature.classList.remove(vc.DISPLAY.NONE);const o=s.feature.offsetHeight;(!t||o{const s=e.el!==t.target,i=!e.isCollapsed&&!e.isTransitioning&&s,n=e.isCollapsed&&e.isTransitioning&&s;return i||n}));this.inCustomViewport()?e?this.open.feature?.classList.add(vc.DISPLAY.NONE):t.preventDefault():e||(this.open=void 0)}function Tc(){Ec.call(this),yc.call(this),this.inCustomViewport()?!this.open&&this.collapses.length&&(this.collapses[0].toggle(),this.open=this.collapses[0]):this.collapses.forEach((t=>{t.feature.classList.remove(vc.DISPLAY.NONE)}))}function Lc(){const t=[{el:window,type:"resize",handler:Yn(300,Tc.bind(this)),options:{passive:!0}}];return this.collapses.forEach((e=>{t.push({el:e.el,type:Zl,handler:()=>{wc.call(this,e)}},{el:e.el,type:Jl,handler:t=>{Sc.call(this,t)}})})),t}function Ac(t){t.feature=t.el.querySelector(pc.FEATURE),t.parent=`#${this.accordionElement.id}`,!1===t.isCollapsed&&(this.open=t)}class Cc{constructor(t){let{el:e,accordion:s,collapses:i=[],customViewports:n}=t;if(this.el=e,this.accordionElement=s||this.el.querySelector(pc.ACCORDION),this.collapses=i,this.customViewports=n||["lg","xl"],this.collapses.length)this.collapses.forEach((t=>{Ac.call(this,t)}));else{const t=this.el.querySelectorAll(lr.DATA_MOUNT),e=hr.getInstances();t.forEach((t=>{const s=e.find((e=>e.triggerElement===t));Ac.call(this,s),this.collapses.push(s)}))}Ec.call(this),!this.open&&this.collapses.length&&(this.collapses[0].toggle(),this.open=this.collapses[0]),this.events=Lc.call(this),bn.addEvents(this.events),fc.push(this)}inCustomViewport(){const t=bn.detectViewport();return this.customViewports.indexOf(t)>-1}update(t){void 0===t&&(t={}),bn.removeEvents(this.events),t.accordionElement&&(this.accordionElement=t.accordionElement),t.customViewports&&(this.customViewports=t.customViewports),t.collapses&&(this.open=null,this.collapses=t.collapses,this.collapses.forEach((t=>{Ac.call(this,t)}))),Ec.call(this),!this.open&&this.collapses.length&&(this.collapses[0].toggle(),this.open=this.collapses[0]),this.events=Lc.call(this),bn.addEvents(this.events),this[gc]=new CustomEvent(gc,{bubbles:!0}),this.el.dispatchEvent(this[gc])}remove(){bn.removeEvents(this.events);const t=fc.indexOf(this);fc.splice(t,1),this[mc]=new CustomEvent(mc,{bubbles:!0}),this.el.dispatchEvent(this[mc])}static getInstances(){return fc}}const Ic={DATA_MOUNT:'[data-mount="nav-in-page"]',NAV:".nav-in-page",NAV_CONTAINER:".nav-in-page-container",ITEMS:".nav-in-page-item",LABEL:".nav-in-page-label"},Oc="onRemove",xc="onUpdate",kc="nav-in-page-vertical",Rc="nav-in-page-horizontal",Nc={EL:"combobox",MENU:"combobox-menu",ITEM:"combobox-item",TOGGLE:"combobox-toggle",DIVIDER:"combobox-divider"},Dc="d-none",_c="active",Mc="vertical",Pc="horizontal",Bc=[];class Hc{#_;constructor(t){this.el=t.el,this.navContainer=t.navContainer||this.el.querySelector(Ic.NAV_CONTAINER),this.navEl=t.navEl||this.el.querySelector(Ic.NAV),this.navItems=t.navItems||this.el.querySelectorAll(Ic.ITEMS),this.navLabel=t.navLabel||this.el.querySelector(Ic.LABEL),this.desktopVp=t.desktopVp||this.el.dataset.desktopVp||"lg",this.alignment=t.alignment||this.el.dataset.alignment||Pc,this.stickyEl=t.stickyEl||document.querySelector(this.el.dataset.stickyEl),this.isSticky=!1,this.el.style.display="inline-flex",this.comboboxEvents=[],this.scrollSpyObserver=new MutationObserver((t=>this.#M(t))),this.#P(),Bc.push(this)}#P(){this.#B(),this.#H(),this.#_=Array.from(this.el.children),this.width=this.el.scrollWidth,this.#F(),this.events=this.#D(),bn.addEvents(this.events),this.scrollSpyObserver.observe(this.navEl,{subtree:!0,attributeFilter:["class"]})}#M(t){t.forEach((t=>{if(t.target.classList.contains(_c)&&this.combobox){const e=Array.from(this.combobox.optionEls).indexOf(t.target.parentNode);this.combobox.selectOption(e,"scrollspy")}}))}#U(){this.isSticky=!0,this.combobox||this.#W()}#q(){this.isSticky=!1,this.combobox||this.#W()}#B(){switch(this.alignment){case Pc:this.el.classList.add(Rc),this.el.style.whiteSpace="nowrap";break;case Mc:this.el.classList.add(kc)}}#W(){if(!this.combobox){let t=0;this.#_.forEach((e=>{t+=e.scrollWidth})),this.width=t}this.#F()}#D(){const t=[{el:window,type:"resize",handler:zn(100,this.#W.bind(this)),options:{passive:!0}}];return this.stickyEl&&t.push({el:this.stickyEl,type:"onSticky",handler:this.#U.bind(this)},{el:this.stickyEl,type:"onStatic",handler:this.#q.bind(this)}),t}#V(){const{paddingRight:t,paddingLeft:e}=getComputedStyle(this.el),s=this.width+parseInt(t,10)+parseInt(e,10)>document.body.clientWidth,i=Qi[this.desktopVp.toUpperCase()]>window.innerWidth;return this.alignment===Mc?i:s}#H(){const t=`in-page-nav-${bn.getUid()}`;this.stickyEl&&(this.labelOption=document.createElement("li"),this.labelOption.setAttribute("id",t),this.labelOption.classList.add(Nc.ITEM),this.labelOption.textContent=this.navLabel?.textContent,this.comboboxDivider=document.createElement("li"),this.comboboxDivider.classList.add(Nc.DIVIDER)),this.comboboxLabel=document.createElement("label"),this.comboboxLabel.setAttribute("id",t),this.comboboxLabel.textContent=this.navLabel?.textContent,this.comboboxToggle=document.createElement("div"),this.comboboxToggle.setAttribute("aria-controls",this.navEl.id),this.comboboxToggle.setAttribute("aria-expanded","false"),this.comboboxToggle.setAttribute("aria-haspopup","listbox"),this.comboboxToggle.setAttribute("aria-labelledby",t),this.comboboxToggle.setAttribute("role","combobox"),this.comboboxToggle.setAttribute("tabindex","0"),this.comboboxToggle.classList.add(Nc.TOGGLE,"btn","btn-faint-secondary"),this.comboboxSpanText=document.createElement("span"),this.comboboxSpanText.setAttribute("data-combobox-text",""),this.comboboxSpanGlyph=document.createElement("span"),this.comboboxSpanGlyph.classList.add("glyph"),this.comboboxSpanGlyph.setAttribute("aria-hidden","true"),this.comboboxItemGlyphArray=[],this.navItems.forEach(((t,e)=>{const s=document.createElement("span");s.classList.add("glyph"),s.setAttribute("aria-hidden","true"),this.comboboxItemGlyphArray[e]=s}))}#G(t){const{detail:e}=t;"click"!==e.event&&"keydown"!==e.event||this.combobox.optionEls[this.combobox.activeIndex].querySelector("a").click()}#j(){this.combobox||(this.el.style.display=null,this.el.style.whiteSpace=null,this.navEl.setAttribute("role","listbox"),this.navEl.classList.add(Nc.MENU),this.navEl.setAttribute("aria-labelledby",this.comboboxLabel.id),this.navEl.setAttribute("tabindex","-1"),this.navLabel.classList.add(Dc),this.stickyEl&&(this.navEl.insertBefore(this.labelOption,this.navItems[0]),this.navEl.insertBefore(this.comboboxDivider,this.navItems[0])),this.navContainer.insertBefore(this.comboboxLabel,this.navEl),this.navContainer.insertBefore(this.comboboxToggle,this.navEl),this.comboboxEvents.push({el:this.navContainer,type:"onChange",handler:t=>this.#G(t)}),this.navItems.forEach(((t,e)=>{t.append(this.comboboxItemGlyphArray[e]),t.setAttribute("role","option"),t.classList.add(Nc.ITEM);const s=t.querySelector("a");s&&s.setAttribute("tabindex","-1")})),this.comboboxToggle.append(this.comboboxSpanText),this.comboboxToggle.append(this.comboboxSpanGlyph),this.el.classList.remove(kc,Rc),this.navContainer.classList.add(Nc.EL),this.combobox=new ya({el:this.navContainer,manageFocusOnClick:!1}),bn.addEvents(this.comboboxEvents))}#$(){this.combobox&&(this.combobox.remove(),this.combobox=null,this.el.style.display="inline-flex",this.navEl.removeAttribute("role"),this.navEl.classList.remove(Nc.MENU),this.navEl.removeAttribute("aria-labelledby"),this.navLabel.classList.remove(Dc),this.navEl.removeAttribute("tabindex"),this.comboboxLabel.remove(),this.comboboxToggle.remove(),this.labelOption?.remove(),this.comboboxDivider?.remove(),this.navItems.forEach(((t,e)=>{t.removeAttribute("role"),t.removeAttribute("aria-selected"),t.classList.remove(Nc.ITEM),this.comboboxItemGlyphArray[e].remove();const s=t.querySelector("a");s&&s.removeAttribute("tabindex")})),this.navContainer.classList.remove(Nc.EL),this.#B(),bn.removeEvents(this.comboboxEvents),this.comboboxEvents=[])}#F(){this.#V()?this.#j():this.#$()}update(t){void 0===t&&(t={}),bn.removeEvents(this.events),this.#$(),this.scrollSpyObserver.disconnect(),t.navContainer&&(this.navContainer=t.navContainer),t.navEl&&(this.navEl=t.navEl),t.navItems&&(this.navItems=t.navItems),t.navLabel&&(this.navLabel=t.navLabel),t.desktopVp&&(this.desktopVp=t.desktopVp),t.alignment&&(this.alignment=t.alignment),t.stickyEl&&(this.stickyEl=t.stickyEl),this.#P(),this[xc]=new CustomEvent(xc,{bubbles:!0}),this.el.dispatchEvent(this[xc])}remove(){bn.removeEvents(this.events),this.#$(),this.el.style.display=null,this.el.style.whiteSpace=null,this.scrollSpyObserver.disconnect();const t=Bc.indexOf(this);Bc.splice(t,1),this[Oc]=new CustomEvent(Oc,{bubbles:!0}),this.el.dispatchEvent(this[Oc])}static getInstances(){return Bc}}const Fc="onHide",Uc="onShow",Wc="onUpdate",qc="onRemove",Vc={...ka,POPOVER:"popover",CLOSE:"close",ARROW:"arrow"},Gc={...Ra,CLOSE_LABEL:"Close dialog",ALIGNMENT:"center"},jc=[];function $c(t){t.preventDefault(),this.toggle()}function Xc(t){t.keyCode!==bn.keyCodes.SPACE&&t.keyCode!==bn.keyCodes.ENTER||(t.preventDefault(),$c.call(this,t))}function Kc(t){if(t.keyCode===bn.keyCodes.ESC&&(t.stopPropagation(),this.hide()),t.keyCode===bn.keyCodes.TAB){const e=this.tabbableElements[this.tabbableElements.length-1];document.activeElement!==e||this.removeFocusTrap||(this.closeBtn.focus(),t.preventDefault())}}function zc(t){t.preventDefault(),this.hide()}function Yc(t){const e="true"===t.getAttribute("aria-modal"),s=t.closest('[aria-modal="true"]');return!e&&!s||s.contains(this.menu)}function Qc(t){const e=Yc.call(this,t.target);this.shown&&!this.menu.contains(t.target)&&!this.el.contains(t.target)&&e&&this.hide({setFocus:!1}),this.shown&&!this.menu.contains(t.target)&&this.removeFocusTrap&&t.preventDefault()}function Zc(t){const e=Yc.call(this,t.target);this.shown&&!this.menu.contains(t.target)&&e&&(t.relatedTarget===this.closeBtn?this.removeFocusTrap?this.hide({setFocus:!1}):this.tabbableElements[this.tabbableElements.length-1].focus():this.removeFocusTrap?this.hide({setFocus:!1}):this.closeBtn.focus())}function Jc(t){void 0===t&&(t={});const e=document.createElement("button");return e.classList.add(Vc.CLOSE),e.setAttribute("aria-label",t.label||Gc.CLOSE_LABEL),e}function td(){this.tabbableElements=bn.getTabbableElements(this.menu).filter((t=>t.offsetHeight>0))}class ed extends Fa{constructor(t){const e={...t};e.menu=t.menu||function(t){if(t.attributes["aria-controls"])return document.querySelector(`#${t.attributes["aria-controls"].value}`);if(t.attributes["data-content"]){const e=document.createElement("div"),s=`${Vc.POPOVER}_${bn.getUid()}`,i=document.createElement("div"),n=document.createElement("div");return e.setAttribute("id",s),e.classList.add(Vc.POPOVER),e.setAttribute("role","dialog"),e.setAttribute("aria-labelledby",t.id),i.classList.add("popover-content"),e.append(i),n.classList.add("popover-body"),n.textContent=t.getAttribute("data-content"),i.append(n),e.prepend(Jc({label:t.getAttribute("data-close-label")})),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",s),t.after(e),e}}(e.el),e.alignment=_a(t.alignment||e.el.getAttribute("data-alignment"),Gc.ALIGNMENT),e.offset=t.offset?parseInt(t.offset,10):16,e.enableFade="boolean"!=typeof t.enableFade||t.enableFade,super(e),this.arrow=function(t){const e=document.createElement("div");return e.classList.add(Vc.ARROW),t.append(e),e}(this.menu),this.closeBtn=this.menu.querySelector("button.close"),this.closeBtn||(this.closeBtn=Jc({label:this.el.getAttribute("data-close-label")}),this.menu.prepend(this.closeBtn)),this.menuObserver=new MutationObserver(td.bind(this)),this.removeFocusTrap=this.el.hasAttribute("data-remove-trap"),this.removeFocusTrap&&(this.menu.removeAttribute("role"),this.menu.removeAttribute("aria-labelledby")),this.events=[{el:this.el,type:"click",handler:$c.bind(this)},{el:this.el,type:"keydown",handler:Xc.bind(this)},{el:this.menu,type:"keydown",handler:Kc.bind(this)},{el:this.closeBtn,type:"click",handler:zc.bind(this)},{el:document,type:"mousedown",handler:Qc.bind(this)},{el:document,type:"focusin",handler:Zc.bind(this)}],bn.addEvents(this.events),jc.push(this)}positionMenu(){super.positionMenu(),this.positionMenuArrow()}positionMenuArrow(){const t=this.currentPosition;this.arrow.style.top=null,this.arrow.style.bottom=null,this.arrow.style.left=null,this.arrow.style.right=null,"top"===t.placement||"bottom"===t.placement?"start"===t.alignment?this.arrow.style[Gc.START]=Math.round(this.boundingRect.el.width/2)-this.arrow.offsetWidth/2+Math.abs(this.overflowOffset)+"px":"end"===t.alignment?this.arrow.style[Gc.END]=Math.round(this.boundingRect.el.width/2)-this.arrow.offsetWidth/2+Math.abs(this.overflowOffset)+"px":this.arrow.style.left=Math.round(this.boundingRect.menu.width/2)-this.arrow.offsetWidth/2+Math.abs(this.overflowOffset)+"px":"start"===t.alignment?this.arrow.style.top=Math.round(this.boundingRect.el.height/2)-this.arrow.offsetWidth/2+"px":"end"===t.alignment?this.arrow.style.bottom=Math.round(this.boundingRect.el.height/2)-this.arrow.offsetWidth/2+"px":this.arrow.style.top=Math.round(this.boundingRect.menu.height/2)-this.arrow.offsetWidth/2+"px"}show(){this[Uc]=new CustomEvent(Uc,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Uc]),this[Uc].defaultPrevented||(super.show(),this.el.setAttribute("aria-expanded",this.shown),td.call(this),this.menuObserver.observe(this.menu,{attributes:!0,childList:!0,subtree:!0}),this.closeBtn.focus())}hide(t){void 0===t&&(t={}),this[Fc]=new CustomEvent(Fc,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[Fc]),this[Fc].defaultPrevented||(super.hide(t),this.el.setAttribute("aria-expanded",this.shown),this.menuObserver.disconnect())}update(t){void 0===t&&(t={});const e={...t};this.tabbableElements=bn.getTabbableElements(this.menu),t.alignment&&(e.alignment=_a(t.alignment,Gc.ALIGNMENT)),super.update(e),this[Wc]=new CustomEvent(Wc,{bubbles:!0}),this.el.dispatchEvent(this[Wc])}remove(){bn.removeEvents(this.events);const t=jc.indexOf(this);jc.splice(t,1),this[qc]=new CustomEvent(qc,{bubbles:!0}),this.el.dispatchEvent(this[qc])}static getInstances(){return jc}}const sd="onUpdate",id="onRemove",nd={default:0,xs:0,sm:1,md:2,lg:3,xl:4},od=["default","sm","md","lg","xl"],ld={},rd=[];function ad(t){this.el.getAttribute("data-position-top-"+t)&&this.el.getAttribute("data-position-left-"+t)&&(this.positionMap[t]={},this.positionMap[t].top=parseFloat(this.el.getAttribute("data-position-top-"+t)),this.positionMap[t].left=parseFloat(this.el.getAttribute("data-position-left-"+t)))}function hd(){const t=bn.detectViewport();let e,s;for(e=nd[t];e>=0;e--)if(s=od[e],this.positionMap[s]&&Number.isFinite(this.positionMap[s].top)&&Number.isFinite(this.positionMap[s].left))return this.el.style.top=this.positionMap[s].top+"%",void(this.el.style.left=this.positionMap[s].left+"%");cd.clearInlinePosition(this.el)}class cd{constructor(t){let e;for(void 0===t&&(t={}),this.el=t.el,this.positionMap={},e=0;e{this.#P()})),Ud.push(this)}#P(){this.#K.clear(),this.#z.clear();const t=Array.from(this.target.querySelectorAll(Od.TARGET_LINKS));t.forEach((t=>{if(!t.hash||t.hasAttribute("disabled"))return;const e=this.el.querySelector(t.hash);"visible"===getComputedStyle(e).getPropertyValue("visibility")&&(this.#K.set(t.hash,t),this.#z.set(t.hash,e),this.events.push({el:t,type:xd,handler:this.#it.bind(this)}))})),this.#nt(t),this.#Q.length>0&&this.#Z!==this.#Q[0]&&this.#ot(this.#Q[0]),this.events.push({el:this.#X,handler:zn(200,(()=>this.#lt())),type:kd},{el:this.#X,handler:this.#rt.bind(this),type:Rd},{el:window,handler:zn(500,(()=>this.#at()),{noLeading:!0}),type:Nd}),bn.addEvents(this.events)}#nt(t){if(this.#J=this.#ht(),t.length>0){this.#Y=[],this.#Q=[];const e=this.#X===window?Pd:Bd;t.map((t=>{const s=this.#z.get(t.hash);return[e===Pd?this.#ct(s):this.#dt(s),t.hash]})).filter(Boolean).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this.#Y.push(t[0]),this.#Q.push(t[1])}))}}#ct(t){return t.getBoundingClientRect().top+window.scrollY}#dt(t){return t.offsetTop}#ut(){return this.#X===window?window.scrollY:this.#X.scrollTop}#ht(){return this.#X.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}#bt(){return this.#X===window?window.innerHeight:this.#X.getBoundingClientRect().height}#pt(){this.#tt||(this.#tt=this.#mt()),this.#et=this.#gt()}#mt(){const t=this.target.closest(Qn.DATA_MOUNT);if(t){return go.getInstances().find((e=>e.el===t))}return null}#vt(){const t=this.target.closest(Ic.DATA_MOUNT);if(t){return Hc.getInstances().find((e=>e.el===t))}return null}#gt(){if(this.#tt){const t=parseFloat(window.getComputedStyle(this.#tt.el).width),e=Math.min(document.documentElement.clientWidth,window.innerWidth);return this.#st||(this.#st=this.#vt()),t>=e||this.#st.alignment===Pc?this.#tt.getStuckHeight():0}return 0}#at(){setTimeout((()=>{Do(this.el,(()=>{this.#nt(Array.from(this.#K.values())),this.#pt(),this.#lt()}))}),1e3)}#it(t){if(this.#z.get(t.target.hash)){t.preventDefault(),this.#pt(),t.target.hash!==window.location.hash&&window.history.pushState({},"",t.target.hash);const e=this.#X,s=this.#Q.indexOf(t.target.hash),i=this.#Y[s]-this.#et,n=this.smoothScroll&&!bn.prefersReducedMotion()?"smooth":"auto";this.#z.get(t.target.hash).focus({preventScroll:!0}),setTimeout((()=>{e.scrollTo({top:i,behavior:n})}),100)}}#rt(t){const{key:e}=t;if(e===Fd&&document.querySelector(Od.SCROLLSPY_CONTAINER).contains(document.activeElement)){const t=this.#Q.join(","),e=document.activeElement.closest(t);if(e)this.#ot(`#${e.id}`);else{const e=this.#Q.map((t=>t+" ~ *")).join(","),s=document.activeElement.closest(e),i=s?.previousElementSibling;i&&i.matches(t)&&this.#ot(`#${i.id}`)}}}#lt(){this.#pt();const t=this.#ut()+this.#et+this.offset,e=this.#ht(),s=this.#et+this.offset+e-this.#bt();if(this.#J!==e&&this.#P(),t>=s){const t=this.#Q[this.#Q.length-1];this.#Z!==t&&this.#ot(t)}else if(this.#Z&&t0){const t=this.#Q[0];this.#Z!==t&&this.#ot(t)}else for(let e=this.#Y.length;e--;){this.#Z!==this.#Q[e]&&t>=this.#Y[e]&&(void 0===this.#Y[e+1]||t{t===s?(e.setAttribute("aria-current","true"),e.classList.add(this.activeClass)):(e.removeAttribute("aria-current"),e.classList.remove(this.activeClass))})),this[Dd]=new CustomEvent(Dd,{bubbles:!0}),this.el.dispatchEvent(this[Dd]))}static getInstances(){return Ud}update(t){void 0===t&&(t={}),t.target&&(this.target=t.target),"boolean"==typeof t.smoothScroll&&(this.smoothScroll=t.smoothScroll),t.activeClass&&(this.activeClass=t.activeClass),t.offset&&(this.offset=t.offset),bn.removeEvents(this.events),this.events=[],this.#P(),this[_d]=new CustomEvent(_d,{bubbles:!0}),this.el.dispatchEvent(this[_d])}remove(){bn.removeEvents(this.events);const t=Ud.indexOf(this);Ud.splice(t,1),this[Md]=new CustomEvent(Md,{bubbles:!0}),this.el.dispatchEvent(this[Md])}}const Vd={TOGGLE:".show-more-show-less-toggle",ELLIPSIS:".show-more-show-less-ellipsis",TOGGLEABLE_CONTENT:".show-more-show-less-toggleable-content",DATA_MOUNT:'[data-mount="show-more-show-less"]'},Gd="data-disable-hide",jd="d-none",$d="onHide",Xd="onShow",Kd="onRemove",zd="onUpdate",Yd=[];function Qd(){this.toggle()}function Zd(t){t.removeAttribute("aria-live"),t.removeAttribute("aria-atomic")}class Jd{constructor(t){let{el:e,disableHide:s=!1,hideAfter:i,showMoreText:n,showLessText:o,showLessAriaLabel:l}=t;return i??e.hasAttribute("data-count")?new su({el:e,hideAfter:i||Number(e.getAttribute("data-count")),showMoreText:n,showLessText:o,showLessAriaLabel:l}):new eu({el:e,disableHide:s,showMoreText:n,showLessText:o,showLessAriaLabel:l})}static getInstances(){return Yd}}class tu{constructor(t){this.el=t.el,this.control=this.el.querySelector(Vd.TOGGLE),this.spanEl=document.createElement("span"),this.spanEl.setAttribute("aria-hidden","true"),this.spanEl.setAttribute("class","glyph"),this.disableHide=t.disableHide||this.el.hasAttribute(Gd),this.showMoreText=t.showMoreText||this.control.textContent,this.showLessText=t.showLessText||this.control.getAttribute("data-show-less-text"),this.showLessLabelText=t.showLessAriaLabel,this.control.hasAttribute("aria-label")&&(this.showMoreLabelText=this.control.getAttribute("aria-label"),this.showLessLabelText=t.showLessAriaLabel||this.control.getAttribute("data-alternate-aria-label")||this.showLessText),this.ellipsis=this.el.querySelector(Vd.ELLIPSIS),this.shown=!1,this.events=[{el:this.control,type:"click",handler:Qd.bind(this)}],Yd.push(this)}setFocusToElement(t){document.activeElement.blur();const e=bn.getFocusableElements(t)[0];e?e.focus():t.focus()}show(){this[Xd]=new CustomEvent(Xd,{bubbles:!0,cancelable:!0}),this.control.dispatchEvent(this[Xd]),this[Xd].defaultPrevented||(this.shown=!0,this.ellipsis&&this.ellipsis.classList.add(jd),this.control.setAttribute("aria-expanded",!0),this.control.textContent=this.showLessText,this.control.hasAttribute("aria-label")&&this.control.setAttribute("aria-label",this.showLessLabelText),this.control.prepend(this.spanEl),this.spanEl.classList.add("glyph-remove-from"))}hide(){this.disableHide||(this[$d]=new CustomEvent($d,{bubbles:!0,cancelable:!0}),this.control.dispatchEvent(this[$d]),this[$d].defaultPrevented||(this.shown=!1,this.ellipsis&&this.ellipsis.classList.remove(jd),this.control.setAttribute("aria-expanded",!1),this.control.hasAttribute("aria-label")&&this.control.setAttribute("aria-label",this.showMoreLabelText),this.control.textContent=this.showMoreText,this.control.prepend(this.spanEl),this.spanEl.classList.remove("glyph-remove-from"),this.spanEl.classList.add("glyph-circle-plus")))}toggle(){this.shown?this.hide():this.show()}remove(){bn.removeEvents(this.events);const t=Yd.indexOf(this);Yd.splice(t,1),this[Kd]=new CustomEvent(Kd,{bubbles:!0}),this.control.dispatchEvent(this[Kd])}}class eu extends tu{constructor(t){super(t),this.toggleableContent=this.el.querySelector(Vd.TOGGLEABLE_CONTENT),this.events.push({el:this.toggleableContent,type:"focusout",handler:Zd.bind(null,this.toggleableContent)}),bn.addEvents(this.events),this.toggleableContent.setAttribute("tabindex",-1),this.toggleableContent.classList.add(jd),this.disableHide&&(this.toggleableContent.setAttribute("aria-live","polite"),this.toggleableContent.setAttribute("aria-atomic","false"))}show(){super.show(),this.toggleableContent.classList.remove(jd),super.setFocusToElement(this.toggleableContent),this.disableHide&&this.control.classList.add(jd)}hide(){this.disableHide||(super.hide(),this.toggleableContent.classList.add(jd))}update(t){void 0===t&&(t={});const e=t._self||this;e.toggleableContent.innerHTML?(e.control.classList.remove(jd),e.hide()):(e.control.classList.add(jd),e.ellipsis.classList.add(jd)),e[zd]=new CustomEvent(zd,{bubbles:!0}),e.el.dispatchEvent(e[zd])}}class su extends tu{constructor(t){super(t),this.hideAfter=t.hideAfter||null,this.setChildren();const e=this.toggleableContent[0];this.events.push({el:this.toggleableContent[0],type:"focusout",handler:Zd.bind(null,e)}),bn.addEvents(this.events),this.toggleableContent[0].setAttribute("tabindex",-1),this.toggleableContent.forEach((t=>{t.classList.add(jd)})),this.childObserver=new MutationObserver((()=>{this.update({_self:this})})),this.childObserver.observe(this.el.querySelector(Vd.TOGGLEABLE_CONTENT),{childList:!0,subtree:!0})}setChildren(){this.visibleContent=this.el.querySelectorAll(Vd.TOGGLEABLE_CONTENT+" > :nth-child(-n+"+(this.hideAfter-1)+")"),this.toggleableContent=this.el.querySelectorAll(Vd.TOGGLEABLE_CONTENT+" > :nth-child(n+"+this.hideAfter+")")}show(){super.show(),this.toggleableContent.forEach((t=>{t.classList.remove(jd)})),this.toggleableContent&&super.setFocusToElement(this.toggleableContent[0])}hide(){super.hide(),this.toggleableContent.length>0&&(this.toggleableContent.forEach((t=>{t.classList.add(jd)})),this.toggleableContent[0].setAttribute("tabindex",-1))}update(t){void 0===t&&(t={});const e=t._self||this;if(e.setChildren(),e.visibleContent.forEach((t=>{t.classList.contains(jd)&&t.classList.remove(jd),t.hasAttribute("tabindex")&&t.removeAttribute("tabindex")})),e.toggleableContent.length>0&&e.hide(),e.toggleableContent.length>1){let t=!1;e.toggleableContent.forEach((e=>{t&&e.removeAttribute("tabindex"),e.hasAttribute("tabindex")&&(t=!0)}))}0!==e.toggleableContent.length||e.el.classList.contains(jd)||e.el.classList.add(jd),e.toggleableContent.length>0&&e.el.classList.contains(jd)&&e.el.classList.remove(jd),e[zd]=new CustomEvent(zd,{bubbles:!0}),e.el.dispatchEvent(e[zd])}remove(){super.remove(),this.childObserver.disconnect()}}const iu="keyup",nu="onRemove",ou="onUpdate",lu={DATA_MOUNT:'[data-mount="switch"]',SWITCH_INPUT:".custom-switch-input"},ru=[];class au{constructor(t){let{el:e}=t;this.el=e,this.switchEl=this.el?this.el.querySelector(lu.SWITCH_INPUT):null,this.events=[],this.el&&this.switchEl&&this.#n(),ru.push(this)}#n(){const t=[{el:this.switchEl,type:iu,handler:this.#ft.bind(this)}];this.events.push(...t),bn.addEvents(t)}#ft(t){t.keyCode===bn.keyCodes.ENTER&&(t.preventDefault(),this.switchEl?.click())}update(){this[ou]=new CustomEvent(ou,{bubbles:!0}),this.el&&this.el.dispatchEvent(this[ou])}remove(){bn.removeEvents(this.events);const t=ru.indexOf(this);ru.splice(t,1),this[nu]=new CustomEvent(nu,{bubbles:!0}),this.el&&this.el.dispatchEvent(this[nu])}static getInstances(){return ru}}const hu=[],cu="onHide",du="onHidden",uu="onShow",bu="onShown",pu="click",mu="keydown",gu="onRemove",vu="onUpdate",fu="popstate",Eu="focus",yu="blur",wu="mouseenter",Su="mouseleave",Tu={HIDDEN:"hidden",SHARED_LABEL_CONTAINER:"data-shared-label-container"},Lu={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},Au={NAV_LIST_GROUP:".nav, .list-group, .tab-group",ACTIVE:".active",ACTIVE_UL:"li .active",DATA_MOUNT:'[data-mount="tab"]',BACK_TO_TABS:'[data-focus="back-to-tabs"]',ROLE_TAB:'[role="tab"]',TAB_CONTENT:".tab-content, .tab-panel-group",TAB_LABEL:"[data-tab-label]"};function Cu(t,e,s){let i;i=!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?[].slice.call(e.children).filter((t=>t.classList.contains(Lu.ACTIVE))):e.querySelector(Au.ACTIVE_UL);const n=i[0],o=s&&n&&n.classList.contains(Lu.FADE),l=()=>xu.call(this,t,n,s);if(n&&o){const t=bn.getTransitionDurationFromElement(n);n.classList.remove(Lu.SHOW),n.addEventListener(bn.TRANSITION_END,l,{once:!0}),bn.emulateTransitionEnd(n,t)}else l();Ou(this.sharedLabelEl,this.el.querySelector(Au.TAB_LABEL)?.textContent)}function Iu(){const t=this.listGroup.hasAttribute(Tu.SHARED_LABEL_CONTAINER)&&this.listGroup.dataset.sharedLabelContainer;let e;return t&&(e=document.querySelector(`#${t}`)),e}function Ou(t,e){t&&e&&(t.textContent=e)}function xu(t,e,s){if(e&&(e.classList.remove(Lu.ACTIVE),"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1")):"tabpanel"===e.getAttribute("role")&&(e.hidden=!0)),t.classList.add(Lu.ACTIVE),"tab"===t.getAttribute("role"))t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0");else if("tabpanel"===t.getAttribute("role")){t.removeAttribute(Tu.HIDDEN);const e=t.getBoundingClientRect().top,s=document.documentElement;let i=0;if(s.style.scrollPaddingTop&&(i=parseInt(s.style.scrollPaddingTop,10)),e<0){const t=e-s.getBoundingClientRect().top-i;window.scrollTo(0,t)}this.backToTabs&&this.backToTabs instanceof HTMLAnchorElement&&(this.backToTabs.focusControls?.remove(),this.backToTabs.href=`#${t.id}-tab`,this.backToTabs.focusControls=new bn.FocusControls({el:this.backToTabs}))}bn.reflow(t),t.classList.contains(Lu.FADE)&&t.classList.add(Lu.SHOW),s&&s()}function ku(t){switch(bn.getKeyCode(t)){case bn.keyCodes.SPACE:case bn.keyCodes.ENTER:t.preventDefault(),this.show(t);break;case bn.keyCodes.HOME:t.preventDefault(),this.listNodeList[0].focus();break;case bn.keyCodes.END:t.preventDefault(),this.listNodeList[this.listNodeList.length-1].focus();break;case bn.keyCodes.ARROW_LEFT:t.preventDefault(),this.isRTL?Nu.call(this):Ru.call(this);break;case bn.keyCodes.ARROW_RIGHT:t.preventDefault(),this.isRTL?Ru.call(this):Nu.call(this)}}function Ru(){const t=this.listNodeList[this.listNodeList.length-1],e=this.listNodeList[this.tabIndex-1];return 0===this.tabIndex?t.focus():e.focus()}function Nu(){const t=this.listNodeList[0],e=this.listNodeList[this.tabIndex+1];return this.tabIndex===this.listNodeList.length-1?t.focus():e.focus()}function Du(){const t=this.el.querySelector(Au.TAB_LABEL)?.textContent;this.sharedLabelEl&&t&&Ou(this.sharedLabelEl,t)}function _u(){const t=this.listGroup?.querySelector(Au.ACTIVE)?.querySelector(Au.TAB_LABEL)?.textContent;this.sharedLabelEl&&t&&Ou(this.sharedLabelEl,t)}function Mu(){const{hash:t}=window.location;if(t)if(t===`#${this.tabPanel.id}`)this.show(),this.tabContent.addEventListener(bn.TRANSITION_END,(()=>{this.el.scrollIntoView(!0),this.el.focus()}),{once:!0});else{const e=this.tabPanel.querySelector(`[id="${t.slice(1)}"]`);e&&(this.show(),this.tabContent.addEventListener(bn.TRANSITION_END,(()=>{e.scrollIntoView(!0),e.focus()}),{once:!0}))}else this.tabIndex===this.defaultTabIndex&&this.show()}class Pu{constructor(t){let{el:e,sharedLabelEl:s=null,addUrlToHistory:i=!1,defaultTabIndex:n=0}=t;if(this.el=e,this.listGroup=this.el.closest(Au.NAV_LIST_GROUP),this.targetSelector=bn.getSelectorFromElement(this.el),this.tabPanel=document.querySelector(this.targetSelector),this.tabContent=this.tabPanel.closest(Au.TAB_CONTENT),this.isRTL="rtl"===document.dir,this.backToTabs=[...Array.from(this.tabContent.children),...Array.from(this.tabContent.parentNode.children)].find((t=>"back-to-tabs"===t.dataset.focus)),this.sharedLabelEl=s||Iu.call(this),this.el.classList.contains(Lu.ACTIVE)&&this.backToTabs&&this.backToTabs instanceof HTMLAnchorElement&&(this.backToTabs.href=`#${this.el.id}`,this.backToTabs.focusControls=new bn.FocusControls({el:this.backToTabs})),this.listGroup){this.listNodeList=this.listGroup.querySelectorAll(Au.ROLE_TAB)||[],this.nodeListArray=[].slice.call(this.listNodeList),this.tabIndex=this.nodeListArray.indexOf(this.el),this.addUrlToHistory=i||void 0!==this.listGroup.dataset.addUrlToHistory;const t=this.listGroup.querySelector(Au.ACTIVE),e=this.nodeListArray.indexOf(t)>-1?this.nodeListArray.indexOf(t):null;this.defaultTabIndex=n||e||0}Mu.call(this),this.sharedLabelEl&&this.el.classList.contains(Lu.ACTIVE)&&Ou(this.sharedLabelEl,this.el.querySelector(Au.TAB_LABEL)?.textContent),this.events=[{el:this.el,type:pu,handler:this.show.bind(this)},{el:this.el,type:mu,handler:ku.bind(this)},{el:this.el,type:Eu,handler:Du.bind(this)},{el:this.el,type:wu,handler:Du.bind(this)},{el:this.el,type:Su,handler:_u.bind(this)},{el:this.el,type:yu,handler:_u.bind(this)},{el:window,type:fu,handler:Mu.bind(this)}],bn.addEvents(this.events),hu.push(this)}show(t){t&&t.preventDefault();const e=this.el.parentNode&&this.el.parentNode.nodeType===Node.ELEMENT_NODE,s=this.el.classList.contains(Lu.ACTIVE),i=this.el.classList.contains(Lu.DISABLED);if(e&&s||i)return;const n=this.tabPanel;let o;const l=this.listGroup||this.el.closest(Au.NAV_LIST_GROUP);if(l){const t="UL"===l.nodeName||"OL"===l.nodeName?Au.ACTIVE_UL:Au.ACTIVE;o=this.el.parentNode.querySelector(t)}const r=new CustomEvent(cu,{detail:{relatedTarget:this.el}}),a=new CustomEvent(uu,{detail:{relatedTarget:o}});if(o&&o.dispatchEvent(r),this.el.dispatchEvent(a),a.defaultPrevented||r.defaultPrevented)return;Cu.call(this,this.el,l);const h=()=>{const t=new CustomEvent(du,{detail:{relatedTarget:this.el}}),e=new CustomEvent(bu,{detail:{relatedTarget:o}});o&&o.dispatchEvent(t),this.el.dispatchEvent(e);const{hash:s}=window.location,i=`#${this.tabPanel.id}`,{title:n}=document,{state:l}=window.history,r=!s&&this.tabIndex!==this.defaultTabIndex,a=s&&!this.tabPanel.querySelector(s);(r||a&&s!==i)&&(this.addUrlToHistory?window.history.pushState(l,n,i):window.history.replaceState(l,n,i))};n?Cu.call(this,n,n.parentNode,h):h()}remove(){bn.removeEvents(this.events);const t=hu.indexOf(this);hu.splice(t,1),this[gu]=new CustomEvent(gu,{bubbles:!0}),this.el.dispatchEvent(this[gu])}update(t){void 0===t&&(t={}),"boolean"==typeof t.addUrlToHistory&&(this.addUrlToHistory=t.addUrlToHistory),void 0!==t.sharedLabelEl&&(this.sharedLabelEl=t.sharedLabelEl),this[vu]=new CustomEvent(vu,{bubbles:!0}),this.el.dispatchEvent(this[vu])}static getInstances(){return hu}}const Bu=[],Hu="click",Fu="resize",Uu="focus",Wu="scroll",qu="onScroll",Vu="onRemove",Gu="onUpdate",ju={LEFT:"left",RIGHT:"right"},$u="justify-content-center",Xu="mobile-arrows",Ku={ACTIVE:`.${"active"}`,ARROWS:`.${"tab-arrows"}`,ARROW_PREV:`.${"arrow-prev"}`,ARROW_NEXT:`.${"arrow-next"}`,TAB_OVERFLOW:`.${"tab-overflow"}`,TAB_WINDOW:`.${"tab-window"}`,TAB_GROUP:`.${"tab-group"}`,DATA_MOUNT:'[data-mount="tab-slider"]',IMAGE_TAB:`.${"tab-image"}`,IMAGE_TAB_LABEL:`.${"tab-image-label"}`},zu="data-disable-scroll-into-view",Yu={inline:"center",block:"nearest",behavior:bn.prefersReducedMotion()?"auto":"smooth"};function Qu(t,e){const s=t.getBoundingClientRect(),i=e.getBoundingClientRect();return Math.ceil(s.left)>=Math.ceil(i.left)&&Math.ceil(s.right){const t=n.offsetHeight-(n.querySelector(Ku.IMAGE_TAB_LABEL).offsetHeight-1||0);s.style.height=`${t}px`,i.style.height=`${t}px`})),Qu(this.tabListItems[0],t)||!this.isRTL&&0===e?(s.style.display="none",i.style.display="block"):Qu(this.tabListItems[this.tabListItems.length-1],t)?(s.style.display="block",i.style.display="none"):(this.arrowNext.style.display="block",this.arrowPrev.style.display="block")}function Ju(){const t=this.isRTL?this.arrowNext:this.arrowPrev,e=this.isRTL?this.arrowPrev:this.arrowNext;this.arrowDirection===ju.LEFT?"block"===t.style.display?t.focus():e.focus():this.arrowDirection===ju.RIGHT&&("block"===e.style.display?e.focus():t.focus())}function tb(t){t.preventDefault(),this.isArrowClicked=!0,rb.call(this),t.target.matches(Ku.ARROW_NEXT)?this.arrowDirection=this.isRTL?ju.LEFT:ju.RIGHT:this.arrowDirection=this.isRTL?ju.RIGHT:ju.LEFT;const e=sb.call(this);e&&eb.call(this,e)}function eb(t){const e=parseInt(getComputedStyle(this.arrowPrev).paddingLeft,10)||parseInt(getComputedStyle(this.arrowNext).paddingLeft,10),s=Math.floor(this.scrollElement.scrollLeft),i=Math.floor(ab.call(this,t,"left")),n=Math.floor(ab.call(this,this.scrollElement,"left"));let o;o=this.isRTL?this.arrowDirection===ju.LEFT?s+i+n+e:s-i-n+e:s+i-n-e;try{this.scrollElement.scrollTo({left:o,behavior:bn.prefersReducedMotion()?"auto":"smooth"})}catch{this.scrollElement.scrollLeft=o}}function sb(){let t,e,s,i;const n=this.el.getBoundingClientRect();if(this.arrowDirection===ju.RIGHT)for(e=this.tabListItems.length;e--&&(i=this.tabListItems[e].getBoundingClientRect(),e!==this.tabListItems.length-1||!Qu(this.tabListItems[e],this.el))&&ab.call(this,this.tabListItems[e],"right")>=ab.call(this,this.el,"right");)t=this.tabListItems[e],this.tabSlideTarget.el=t,this.tabSlideTarget.index=e;else{if(e=this.tabSlideTarget.index,s=n.width,-1===e)return;for(;e--&&s>=0&&(i=this.tabListItems[e].getBoundingClientRect(),0!==e||!Qu(this.tabListItems[e],this.el))&&(s-=i.width,t=this.tabListItems[e],this.tabSlideTarget.el=t,this.tabSlideTarget.index=e,!(this.tabListItems[e-1]&&s-this.tabListItems[e-1].getBoundingClientRect().width<0)););}return t}function ib(){const t=this.el.offsetWidth-2*parseInt(getComputedStyle(this.el).paddingLeft,10),e=getComputedStyle(this.arrows).display;if(rb.call(this),t>=this.tabListWidth)return("block"===e||this.tabWindow.style.width)&&(this.arrows.style.display="none",this.tabWindow.style.width=""),void(this.tabContentCentered&&this.tabGroup.classList.add($u));this.tabWindow.style.width=this.tabListWidth+"px",this.tabContentCentered&&this.tabGroup.classList.remove($u),this.tabListItems=this.el.querySelectorAll(Au.ROLE_TAB),this.lastTabBounds=this.tabListItems[this.tabListItems.length-1].getBoundingClientRect();const s=ab.call(this,this.tabListItems[this.tabListItems.length-1],"right"),i=ab.call(this,this.el,"right");"none"===e&&i-this.arrowOffsetWidth<=s-this.arrowOffsetWidth&&(this.arrows.style.display="block"),Zu.call(this)}function nb(t){let{target:e}=t;const s=e;s.matches(Au.ROLE_TAB)&&(setTimeout((()=>{s.scrollIntoView(Yu)}),0),this.tabSlideTarget.el=s,this.tabSlideTarget.index=[].slice.call(this.tabListItems).indexOf(s))}function ob(){if(Zu.call(this),!this.arrowDirection||document.activeElement!==this.arrowNext&&document.activeElement!==this.arrowPrev||Ju.call(this),this.isArrowClicked)this.isArrowClicked=!1;else for(let t=this.tabSlideTarget.index;t0){this.tabSlideTarget.el=this.tabListItems[t],this.tabSlideTarget.index=t;break}}function lb(t){let{marginLeft:e,marginRight:s}=getComputedStyle(t);return e=Math.abs(parseInt(e,10))||0,s=Math.abs(parseInt(s,10))||0,t.offsetWidth+e+s}function rb(){this.tabListWidth=0,this.tabListItems.forEach((t=>{this.tabListWidth+=lb(t)})),this.tabListWidth+=6,!this.isTabWindowWidthAdjusted&&this.tabWindow.style.width&&(this.tabWindow.style.width=this.tabListWidth+"px",this.isTabWindowWidthAdjusted=!0)}function ab(t,e){void 0===e&&(e="left");const s=t.getBoundingClientRect();if("left"===e){if(this.isRTL){const e=getComputedStyle(t),i=parseInt(e.borderRightWidth,10),n=parseInt(e.marginRight,10);return Math.abs(s.right+i+n-window.innerWidth)}return s.left}return this.isRTL?Math.abs(s.left-window.innerWidth):s.right}function hb(){const t=[{el:this.arrowPrev,type:Hu,handler:this.onPrevArrowClick},{el:this.arrowNext,type:Hu,handler:this.onNextArrowClick},{el:window,type:Fu,handler:zn(100,this.onWindowResize)},{el:this.scrollElement,type:Wu,handler:zn(100,this.onScrollEvent)}];return this.tabListItems.forEach((e=>{t.push({el:e,type:Uu,handler:this.onFocusEvent},{el:e,type:uu,handler:t=>function(t,e){e&&setTimeout((()=>{t.scrollIntoView(Yu)}),0)}(e,this.scrollIntoView)})})),t}class cb{constructor(t){let{el:e,scrollIntoView:s=!0,onPrevArrowClick:i,onNextArrowClick:n,onFocusEvent:o,onScrollEvent:l,onWindowResize:r}=t;this.el=e,this.tabListItems=this.el.querySelectorAll(Au.ROLE_TAB),this.scrollElement=this.el.querySelector(Ku.TAB_OVERFLOW),this.tabWindow=this.el.querySelector(Ku.TAB_WINDOW),this.tabGroup=this.el.querySelector(Ku.TAB_GROUP),this.tabContentCentered=this.tabGroup.classList.contains($u),this.arrows=this.el.querySelector(Ku.ARROWS),this.arrowPrev=this.el.querySelector(Ku.ARROW_PREV),this.arrowNext=this.el.querySelector(Ku.ARROW_NEXT),this.arrowOffsetWidth=parseInt(this.arrowNext.dataset.width,10)||40,this.onPrevArrowClick=i||tb.bind(this),this.onNextArrowClick=n||tb.bind(this),this.onFocusEvent=o||nb.bind(this),this.onScrollEvent=l||ob.bind(this),this.onWindowResize=r||ib.bind(this),this.isRTL="rtl"===document.dir,this.isTabWindowWidthAdjusted=!1,this.isArrowClicked=!1,this.arrowDirection=ju.LEFT,this.tabListWidth=0,this.tabListWidthBuffer=0,this.lastTabBounds=this.tabListItems[this.tabListItems.length-1].getBoundingClientRect(),this.tabSlideTarget={el:this.isRTL?this.tabListItems[this.tabListItems.length-1]:this.tabListItems[0],index:this.isRTL?this.tabListItems.length-1:0},this.scrollIntoView=!1!==s&&!this.el.hasAttribute(zu),this.tabListItems.forEach((t=>{this.tabListWidth+=lb(t)})),this.tabListWidth*=1.5,bn.detectMobile(!0)&&this.arrows.classList.add(Xu),this.events=hb.call(this),bn.addEvents(this.events),Bu.push(this),this.observer=new IntersectionObserver((t=>{t[0].isIntersecting&&this.onWindowResize()})),this.observer.observe(this.el)}remove(){bn.removeEvents(this.events),this.observer.disconnect();const t=Bu.indexOf(this);Bu.splice(t,1),this[Vu]=new CustomEvent(Vu,{bubbles:!0}),this.el.dispatchEvent(this[Vu])}update(t){void 0===t&&(t={}),bn.removeEvents(this.events),t.onPrevArrowClick&&(this.onPrevArrowClick=t.onPrevArrowClick),t.onNextArrowClick&&(this.onNextArrowClick=t.onNextArrowClick),t.onWindowResize&&(this.onWindowResize=t.onWindowResize),t.onScrollEvent&&(this.onScrollEvent=t.onScrollEvent),t.onFocusEvent&&(this.onFocusEvent=t.onFocusEvent),"boolean"==typeof t.scrollIntoView&&(this.scrollIntoView=t.scrollIntoView),this.events=hb.call(this),bn.addEvents(this.events),this[Gu]=new CustomEvent(Gu,{bubbles:!0}),this.el.dispatchEvent(this[Gu])}onClickNextArrow(){this[qu]=new CustomEvent(qu,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[qu]),this[qu].defaultPrevented||this.arrowNext.click()}onClickPrevArrow(){this[qu]=new CustomEvent(qu,{bubbles:!0,cancelable:!0}),this.el.dispatchEvent(this[qu]),this[qu].defaultPrevented||this.arrowPrev.click()}static getInstances(){return Bu}}const db={focusedElement(){document.addEventListener("focus",(()=>{console.log("focused",document.activeElement)}),!0)}};const ub=[[wn,mn],[Oo,{DATA_MOUNT:'[data-mount="back-to-top"]'}],[_l,zo],[ql,{DATA_MOUNT:'[data-mount="character-count"]'}],[zl,{DATA_MOUNT:'[data-mount="click-group"]'}],[hr,lr],[mr,dr],[Ur,Mr],[ya,Wr],[Oa,{DATA_MOUNT:'[data-mount="content-swap"]'}],[vh,Ua],[Ih,Eh],[jh,Oh],[bc,zh],[Cc,pc],[Hc,Ic],[ed,{DATA_MOUNT:'[data-mount="popover"]'}],[cd,{DATA_MOUNT:'[data-position="positioner"]'}],[Id,dd],[qd,Od],[Jd,Vd],[go,Qn],[Sr,gr],[au,lu],[Pu,Au],[cb,Ku]];document.addEventListener("DOMContentLoaded",(()=>{ub.forEach((t=>{let[e,s]=t;bn.initializeComponent(s.DATA_MOUNT,(t=>new e({el:t})))})),document.dispatchEvent(new CustomEvent("mwfInitialized"))})),t.Alert=wn,t.AutoComplete=class{constructor(t){if(this.container=t.target,this.resultsAvailableTemplateMany=t.multipleResultsMsg||An,this.resultsAvailableTemplateOne=t.oneResultMsg||Cn,this.noResultsMsg=t.noResultsMsg||In,this.filter=t.filter||t.target.getAttribute("data-filter")||!0,!qn(t.data))throw new TypeError(On);this.suggestedData=t.data,this.target=t.target.querySelector(Ln.RESULT_LIST),this.searchResultsContainer=this.container.querySelector(Ln.RESULTS_CONTAINER),this.searchInput=this.container.querySelector(Ln.SEARCH_INPUT),this.shown=!1,Tn.push(this),this.events=[{el:document,type:"click",handler:Vn.bind(this)},{el:this.searchInput,type:"input",handler:Gn.bind(this)},{el:this.searchInput,type:"keydown",handler:jn.bind(this)},{el:this.searchInput,type:"focus",handler:$n.bind(this)},{el:this.target,type:"mouseup",handler:Kn.bind(this)},{el:this.target,type:"keydown",handler:Xn.bind(this)}],bn.addEvents(this.events)}static getInstances(){return Tn}open(){this[Rn]=new CustomEvent(Rn,{bubbles:!0,cancelable:!0}),this.container.dispatchEvent(this[Rn]),this[Rn].defaultPrevented||(this.shown=!0,this.target.classList.add(xn.ACTIVE),this.searchInput.setAttribute("aria-expanded",!0))}close(){this[kn]=new CustomEvent(kn,{bubbles:!0,cancelable:!0}),this.container.dispatchEvent(this[kn]),this[kn].defaultPrevented||(this.shown=!1,this.target.classList.remove(xn.ACTIVE),this.searchInput.setAttribute("aria-expanded",!1))}update(t){"string"==typeof t&&(this.searchInput.value=t,t?(Pn.bind(this)(),this[Nn]=new CustomEvent(Nn,{bubbles:!0}),this.container.dispatchEvent(this[Nn])):this.close())}updateDataSource(t){if(!qn(t))throw new TypeError(On);this.suggestedData=t,Pn.bind(this)()}remove(){bn.removeEvents(this.events);const t=Tn.indexOf(this);Tn.splice(t,1),this[Dn]=new CustomEvent(Dn,{bubbles:!0}),this.container.dispatchEvent(this[Dn])}},t.BackToTop=Oo,t.Carousel=_l,t.CharacterCount=ql,t.ClickGroup=zl,t.Collapse=hr,t.CollapseControls=mr,t.ColorPicker=Ur,t.ComboboxSelect=ya,t.ContentSwap=Oa,t.Debug=db,t.Dropdown=vh,t.FormStar=Ih,t.FormValidation=jh,t.Modal=bc,t.MultiFeature=Cc,t.NavInPage=Hc,t.Popover=ed,t.Positioner=cd,t.Range=Id,t.Scrollspy=qd,t.ShowMoreShowLess=Jd,t.Sticky=go,t.Swatch=Sr,t.Switch=au,t.Tab=Pu,t.TabSlider=cb,t.Util=bn,t.version="2.21.0"}));