From 1c87774dbf384a66f0577324a4034cdc8b0a5fbf Mon Sep 17 00:00:00 2001 From: fynnfeldpausch Date: Thu, 23 May 2024 06:44:37 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20haiilo/c?= =?UTF-8?q?atalyst@e56bcb8b56577c5af2088615310e449d19e71071=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/catalyst.esm.js | 2 +- build/p-20919029.js.map | 1 - build/{p-20919029.js => p-22f0435a.js} | 6 +++--- build/p-22f0435a.js.map | 1 + build/{p-300a0448.js => p-6a30c24b.js} | 2 +- build/{p-ff4075a2.entry.js => p-deb69820.entry.js} | 6 +++--- build/{p-ff4075a2.entry.js.map => p-deb69820.entry.js.map} | 2 +- index.html | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 build/p-20919029.js.map rename build/{p-20919029.js => p-22f0435a.js} (71%) create mode 100644 build/p-22f0435a.js.map rename build/{p-300a0448.js => p-6a30c24b.js} (96%) rename build/{p-ff4075a2.entry.js => p-deb69820.entry.js} (99%) rename build/{p-ff4075a2.entry.js.map => p-deb69820.entry.js.map} (73%) diff --git a/build/catalyst.esm.js b/build/catalyst.esm.js index 72f59e995..4bbed2f44 100644 --- a/build/catalyst.esm.js +++ b/build/catalyst.esm.js @@ -1,2 +1,2 @@ -import{p as e,b as a}from"./p-20919029.js";export{s as setNonce}from"./p-20919029.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-ff4075a2",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); +import{p as e,b as a}from"./p-22f0435a.js";export{s as setNonce}from"./p-22f0435a.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-deb69820",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[8,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); //# sourceMappingURL=catalyst.esm.js.map \ No newline at end of file diff --git a/build/p-20919029.js.map b/build/p-20919029.js.map deleted file mode 100644 index e85b601ec..000000000 --- a/build/p-20919029.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"names":["NAMESPACE","scopeId","hostTagName","useNativeShadowDom","isSvgMode","queuePending","createTime","fnName","tagName","uniqueTime","key","measureText","HYDRATED_CSS","SLOT_FB_CSS","XLINK_NS","EMPTY_OBJ","SVG_NS","HTML_NS","isDef","v","isComplexType","o","queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","h","nodeName","vnodeData","children","child","simple","lastSimple","vNodeChildren","walk","c","i","length","Array","isArray","String","$text$","push","newVNode","classData","className","class","Object","keys","filter","k","join","vdomFnUtils","vnode","$attrs$","$children$","$key$","tag","text","$flags$","$tag$","$elm$","Host","isHost","node","forEach","cb","map","convertToPublic","convertToPrivate","vattrs","vchildren","vkey","vname","$name$","vtag","vtext","assign","name","parsePropertyValue","propValue","propType","parseFloat","getElement","ref","getHostRef","createEvent","flags","elm","emit","detail","emitEvent","bubbles","composed","cancelable","opts","ev","plt","ce","dispatchEvent","rootAppliedStyles","WeakMap","registerStyle","cssText","allowCS","style","styles","get","supportsConstructableStylesheets","CSSStyleSheet","replaceSync","set","addStyle","styleContainerNode","cmpMeta","mode","getScopeId","nodeType","appliedStyles","styleElm","Set","has","createElement","innerHTML","nonce","$nonce$","setAttribute","insertBefore","add","adoptedStyleSheets","includes","attachStyles","hostRef","$cmpMeta$","$hostElement$","endAttachStyles","$tagName$","shadowRoot","getRootNode","classList","cmp","setAccessor","memberName","oldValue","newValue","isSvg","isProp","isMemberInElement","ln","toLowerCase","oldClasses","parseClassList","newClasses","remove","prop","removeProperty","setProperty","slice","win","capture","endsWith","CAPTURE_EVENT_SUFFIX","replace","CAPTURE_EVENT_REGEX","rel","ael","isComplex","n","e","xlink","removeAttributeNS","removeAttribute","setAttributeNS","parseClassListRegex","value","split","RegExp","updateElement","oldVnode","newVnode","host","oldVnodeAttrs","newVnodeAttrs","createElm","oldParentVNode","newParentVNode","childIndex","parentElm","childNode","createTextNode","createElementNS","appendChild","addVnodes","before","parentVNode","vnodes","startIdx","endIdx","containerElm","removeVnodes","index","nullifyVNodeRefs","updateChildren","oldCh","newCh","isInitialRender","oldStartIdx","newStartIdx","idxInOld","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","elmToMove","isSameVnode","patch","nextSibling","parentNode","leftVNode","rightVNode","oldVNode","oldChildren","newChildren","textContent","data","vNode","renderVdom","renderFnResults","isInitialLoad","hostElm","$vnode$","rootVnode","$attrsToReflect$","propName","attribute","hasAttribute","attachToAncestor","ancestorComponent","$onRenderResolve$","Promise","r","scheduleUpdate","$ancestorComponent$","dispatch","dispatchHooks","writeTask","endSchedule","instance","$lazyInstance$","maybePromise","$queuedListeners$","methodName","event","safeCall","enqueue","updateComponent","fn","isPromisey","then","async","endUpdate","rc","endRender","callRender","childrenPromises","postUpdate","postUpdateComponent","all","render","consoleError","endPostUpdate","addHydratedFlag","$onReadyResolve$","appDidLoad","$onInstanceResolve$","nextTick","who","documentElement","namespace","method","arg","getValue","$instanceValues$","setValue","newVal","oldVal","$members$","areBothNaN","Number","isNaN","didValueChange","$watchers$","watchMethods","watchMethodName","proxyComponent","Cstr","prototype","watchers","members","entries","memberFlags","defineProperty","this","configurable","enumerable","args","$onInstancePromise$","attrNameToPropName","Map","attributeChangedCallback","attrName","jmp","hasOwnProperty","entry","callbackName","call","observedAttributes","from","_","m","initializeComponent","hmrVersionId","bundleId","$lazyBundleId$","loadModule","endLoad","isProxied","endNewInstance","fireConnectedCallback","constructor","customElements","whenDefined","endRegisterStyles","schedule","connectedCallback","endConnected","addHostEventListeners","$listeners$","$onReadyPromise$","disconnectInstance","disconnectedCallback","$rmListeners$","rmListener","bootstrapLazy","lazyBundles","options","endBootstrap","cmpTags","exclude","metaCharset","dataStyles","deferredConnectedCallbacks","appLoadFallback","isBootstrapping","$resourcesUrl$","URL","resourcesUrl","baseURI","href","hasSlotRelocation","lazyBundle","compactMeta","HostElement","HTMLElement","self","super","registerHost","attachShadow","clearTimeout","componentOnReady","define","firstChild","setTimeout","listeners","attachParentListeners","target","handler","hostListenerProxy","hostListenerOpts","supportsListenerOptions","passive","setNonce","hostRefs","registerInstance","lazyInstance","hostElement","el","console","error","cmpModules","exportName","module","import","importedModule","window","document","raf","requestAnimationFrame","eventName","listener","addEventListener","removeEventListener","CustomEvent","promiseResolve","resolve","queueDomReads","queueDomWrites","queueTask","queue","write","flush","consume","performance","now"],"sources":["@stencil/core/internal/app-data","../node_modules/.pnpm/@stencil+core@4.12.6/node_modules/@stencil/core/internal/client/index.js?app-data=conditional"],"sourcesContent":["export const NAMESPACE = 'catalyst';\nexport const BUILD = /* catalyst */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };\nexport const Env = /* catalyst */ {};\n","/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/snabbdom/snabbdom/blob/master/LICENSE\n *\n * Modified for Stencil's renderer and slot projection\n */\nlet scopeId;\nlet contentRef;\nlet hostTagName;\nlet customError;\nlet i = 0;\nlet useNativeShadowDom = false;\nlet checkSlotFallbackVisibility = false;\nlet checkSlotRelocate = false;\nlet isSvgMode = false;\nlet renderingRef = null;\nlet queueCongestion = 0;\nlet queuePending = false;\n/*\n Stencil Client Platform v4.12.6 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nconst Build = {\n isDev: BUILD.isDev ? true : false,\n isBrowser: true,\n isServer: false,\n isTesting: BUILD.isTesting ? true : false,\n};\nconst getAssetPath = (path) => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nconst setAssetPath = (path) => (plt.$resourcesUrl$ = path);\nconst createTime = (fnName, tagName = '') => {\n if (BUILD.profile && performance.mark) {\n const key = `st:${fnName}:${tagName}:${i++}`;\n // Start\n performance.mark(key);\n // End\n return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);\n }\n else {\n return () => {\n return;\n };\n }\n};\nconst uniqueTime = (key, measureText) => {\n if (BUILD.profile && performance.mark) {\n if (performance.getEntriesByName(key, 'mark').length === 0) {\n performance.mark(key);\n }\n return () => {\n if (performance.getEntriesByName(measureText, 'measure').length === 0) {\n performance.measure(measureText, key);\n }\n };\n }\n else {\n return () => {\n return;\n };\n }\n};\nconst inspect = (ref) => {\n const hostRef = getHostRef(ref);\n if (!hostRef) {\n return undefined;\n }\n const flags = hostRef.$flags$;\n const hostElement = hostRef.$hostElement$;\n return {\n renderCount: hostRef.$renderCount$,\n flags: {\n hasRendered: !!(flags & 2 /* HOST_FLAGS.hasRendered */),\n hasConnected: !!(flags & 1 /* HOST_FLAGS.hasConnected */),\n isWaitingForChildren: !!(flags & 4 /* HOST_FLAGS.isWaitingForChildren */),\n isConstructingInstance: !!(flags & 8 /* HOST_FLAGS.isConstructingInstance */),\n isQueuedForUpdate: !!(flags & 16 /* HOST_FLAGS.isQueuedForUpdate */),\n hasInitializedComponent: !!(flags & 32 /* HOST_FLAGS.hasInitializedComponent */),\n hasLoadedComponent: !!(flags & 64 /* HOST_FLAGS.hasLoadedComponent */),\n isWatchReady: !!(flags & 128 /* HOST_FLAGS.isWatchReady */),\n isListenReady: !!(flags & 256 /* HOST_FLAGS.isListenReady */),\n needsRerender: !!(flags & 512 /* HOST_FLAGS.needsRerender */),\n },\n instanceValues: hostRef.$instanceValues$,\n ancestorComponent: hostRef.$ancestorComponent$,\n hostElement,\n lazyInstance: hostRef.$lazyInstance$,\n vnode: hostRef.$vnode$,\n modeName: hostRef.$modeName$,\n onReadyPromise: hostRef.$onReadyPromise$,\n onReadyResolve: hostRef.$onReadyResolve$,\n onInstancePromise: hostRef.$onInstancePromise$,\n onInstanceResolve: hostRef.$onInstanceResolve$,\n onRenderResolve: hostRef.$onRenderResolve$,\n queuedListeners: hostRef.$queuedListeners$,\n rmListeners: hostRef.$rmListeners$,\n ['s-id']: hostElement['s-id'],\n ['s-cr']: hostElement['s-cr'],\n ['s-lr']: hostElement['s-lr'],\n ['s-p']: hostElement['s-p'],\n ['s-rc']: hostElement['s-rc'],\n ['s-sc']: hostElement['s-sc'],\n };\n};\nconst installDevTools = () => {\n if (BUILD.devTools) {\n const stencil = (win.stencil = win.stencil || {});\n const originalInspect = stencil.inspect;\n stencil.inspect = (ref) => {\n let result = inspect(ref);\n if (!result && typeof originalInspect === 'function') {\n result = originalInspect(ref);\n }\n return result;\n };\n }\n};\nconst CONTENT_REF_ID = 'r';\nconst ORG_LOCATION_ID = 'o';\nconst SLOT_NODE_ID = 's';\nconst TEXT_NODE_ID = 't';\nconst HYDRATE_ID = 's-id';\nconst HYDRATED_STYLE_ID = 'sty-id';\nconst HYDRATE_CHILD_ID = 'c-id';\nconst HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';\n/**\n * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.\n *\n * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser\n * support as of Stencil v4.\n */\nconst SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';\nconst XLINK_NS = 'http://www.w3.org/1999/xlink';\nconst FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [\n 'formAssociatedCallback',\n 'formResetCallback',\n 'formDisabledCallback',\n 'formStateRestoreCallback',\n];\n/**\n * Default style mode id\n */\n/**\n * Reusable empty obj/array\n * Don't add values to these!!\n */\nconst EMPTY_OBJ = {};\n/**\n * Namespaces\n */\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst HTML_NS = 'http://www.w3.org/1999/xhtml';\nconst isDef = (v) => v != null;\n/**\n * Check whether a value is a 'complex type', defined here as an object or a\n * function.\n *\n * @param o the value to check\n * @returns whether it's a complex type or not\n */\nconst isComplexType = (o) => {\n // https://jsperf.com/typeof-fn-object/5\n o = typeof o;\n return o === 'object' || o === 'function';\n};\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n/**\n * Production h() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;\nconst h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let slotName = null;\n let simple = false;\n let lastSimple = false;\n const vNodeChildren = [];\n const walk = (c) => {\n for (let i = 0; i < c.length; i++) {\n child = c[i];\n if (Array.isArray(child)) {\n walk(child);\n }\n else if (child != null && typeof child !== 'boolean') {\n if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {\n child = String(child);\n }\n else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {\n consoleDevError(`vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects.`);\n }\n if (simple && lastSimple) {\n // If the previous child was simple (string), we merge both\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n }\n else {\n // Append a new vNode, if it's text, we create a text vNode\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n if (BUILD.isDev && nodeName === 'input') {\n validateInputProperties(vnodeData);\n }\n if (BUILD.vdomKey && vnodeData.key) {\n key = vnodeData.key;\n }\n if (BUILD.slotRelocation && vnodeData.name) {\n slotName = vnodeData.name;\n }\n // normalize class / className attributes\n if (BUILD.vdomClass) {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class =\n typeof classData !== 'object'\n ? classData\n : Object.keys(classData)\n .filter((k) => classData[k])\n .join(' ');\n }\n }\n }\n if (BUILD.isDev && vNodeChildren.some(isHost)) {\n consoleDevError(`The must be the single root component. Make sure:\n- You are NOT using hostData() and in the same component.\n- is used once, and it's the single root component of the render() function.`);\n }\n if (BUILD.vdomFunctional && typeof nodeName === 'function') {\n // nodeName is a functional component\n return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = key;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = slotName;\n }\n return vnode;\n};\n/**\n * A utility function for creating a virtual DOM node from a tag and some\n * possible text content.\n *\n * @param tag the tag for this element\n * @param text possible text content for the node\n * @returns a newly-minted virtual DOM node\n */\nconst newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null,\n };\n if (BUILD.vdomAttribute) {\n vnode.$attrs$ = null;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = null;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = null;\n }\n return vnode;\n};\nconst Host = {};\n/**\n * Check whether a given node is a Host node or not\n *\n * @param node the virtual DOM node to check\n * @returns whether it's a Host node or not\n */\nconst isHost = (node) => node && node.$tag$ === Host;\n/**\n * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.\n *\n * Note that these functions convert from {@link d.VNode} to\n * {@link d.ChildNode} to give functional component developers a friendly\n * interface.\n */\nconst vdomFnUtils = {\n forEach: (children, cb) => children.map(convertToPublic).forEach(cb),\n map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),\n};\n/**\n * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a\n * friendlier public interface (hence, 'convertToPublic').\n *\n * @param node the virtual DOM node to convert\n * @returns a converted child node\n */\nconst convertToPublic = (node) => ({\n vattrs: node.$attrs$,\n vchildren: node.$children$,\n vkey: node.$key$,\n vname: node.$name$,\n vtag: node.$tag$,\n vtext: node.$text$,\n});\n/**\n * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in\n * order to use the resulting object in the virtual DOM. The initial object was\n * likely created as part of presenting a public API, so converting it back\n * involved making it 'private' again (hence, `convertToPrivate`).\n *\n * @param node the child node to convert\n * @returns a converted virtual DOM node\n */\nconst convertToPrivate = (node) => {\n if (typeof node.vtag === 'function') {\n const vnodeData = Object.assign({}, node.vattrs);\n if (node.vkey) {\n vnodeData.key = node.vkey;\n }\n if (node.vname) {\n vnodeData.name = node.vname;\n }\n return h(node.vtag, vnodeData, ...(node.vchildren || []));\n }\n const vnode = newVNode(node.vtag, node.vtext);\n vnode.$attrs$ = node.vattrs;\n vnode.$children$ = node.vchildren;\n vnode.$key$ = node.vkey;\n vnode.$name$ = node.vname;\n return vnode;\n};\n/**\n * Validates the ordering of attributes on an input element\n *\n * @param inputElm the element to validate\n */\nconst validateInputProperties = (inputElm) => {\n const props = Object.keys(inputElm);\n const value = props.indexOf('value');\n if (value === -1) {\n return;\n }\n const typeIndex = props.indexOf('type');\n const minIndex = props.indexOf('min');\n const maxIndex = props.indexOf('max');\n const stepIndex = props.indexOf('step');\n if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {\n consoleDevWarn(`The \"value\" prop of should be set after \"min\", \"max\", \"type\" and \"step\"`);\n }\n};\n/**\n * Entrypoint of the client-side hydration process. Facilitates calls to hydrate the\n * document and all its nodes.\n *\n * This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.\n *\n * @param hostElm The element to hydrate.\n * @param tagName The element's tag name.\n * @param hostId The host ID assigned to the element by the server.\n * @param hostRef The host reference for the element.\n */\nconst initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {\n const endHydrate = createTime('hydrateClient', tagName);\n const shadowRoot = hostElm.shadowRoot;\n const childRenderNodes = [];\n const slotNodes = [];\n const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;\n const vnode = (hostRef.$vnode$ = newVNode(tagName, null));\n if (!plt.$orgLocNodes$) {\n initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));\n }\n hostElm[HYDRATE_ID] = hostId;\n hostElm.removeAttribute(HYDRATE_ID);\n clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);\n childRenderNodes.map((c) => {\n const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;\n const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);\n const node = c.$elm$;\n // Put the node back in its original location since the native Shadow DOM\n // can handle rendering it its correct location now\n if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {\n orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);\n }\n if (!shadowRoot) {\n node['s-hn'] = tagName;\n if (orgLocationNode) {\n node['s-ol'] = orgLocationNode;\n node['s-ol']['s-nr'] = node;\n }\n }\n plt.$orgLocNodes$.delete(orgLocationId);\n });\n if (BUILD.shadowDom && shadowRoot) {\n shadowRootNodes.map((shadowRootNode) => {\n if (shadowRootNode) {\n shadowRoot.appendChild(shadowRootNode);\n }\n });\n }\n endHydrate();\n};\n/**\n * Recursively constructs the virtual node tree for a host element and its children.\n * The tree is constructed by parsing the annotations set on the nodes by the server.\n *\n * In addition to constructing the vNode tree, we also track information about the node's\n * descendants like which are slots, which should exist in the shadow root, and which\n * are nodes that should be rendered as children of the parent node.\n *\n * @param parentVNode The vNode representing the parent node.\n * @param childRenderNodes An array of all child nodes in the parent's node tree.\n * @param slotNodes An array of all slot nodes in the parent's node tree.\n * @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.\n * @param hostElm The parent element.\n * @param node The node to construct the vNode tree for.\n * @param hostId The host ID assigned to the element by the server.\n */\nconst clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {\n let childNodeType;\n let childIdSplt;\n let childVNode;\n let i;\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n childNodeType = node.getAttribute(HYDRATE_CHILD_ID);\n if (childNodeType) {\n // got the node data from the element's attribute\n // `${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = childNodeType.split('.');\n if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[0],\n $nodeId$: childIdSplt[1],\n $depth$: childIdSplt[2],\n $index$: childIdSplt[3],\n $tag$: node.tagName.toLowerCase(),\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $text$: null,\n };\n childRenderNodes.push(childVNode);\n node.removeAttribute(HYDRATE_CHILD_ID);\n // this is a new child vnode\n // so ensure its parent vnode has the vchildren array\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n // add our child vnode to a specific index of the vnode's children\n parentVNode.$children$[childVNode.$index$] = childVNode;\n // this is now the new parent vnode for all the next child checks\n parentVNode = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n // recursively drill down, end to start so we can remove nodes\n for (i = node.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);\n }\n if (node.shadowRoot) {\n // keep drilling down through the shadow root nodes\n for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);\n }\n }\n }\n else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {\n // comment node for either the host id or a 0 host id\n childNodeType = childIdSplt[0];\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[1],\n $nodeId$: childIdSplt[2],\n $depth$: childIdSplt[3],\n $index$: childIdSplt[4],\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $tag$: null,\n $text$: null,\n };\n if (childNodeType === TEXT_NODE_ID) {\n childVNode.$elm$ = node.nextSibling;\n if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {\n childVNode.$text$ = childVNode.$elm$.textContent;\n childRenderNodes.push(childVNode);\n // remove the text comment since it's no longer needed\n node.remove();\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n else if (childVNode.$hostId$ === hostId) {\n // this comment node is specifically for this host id\n if (childNodeType === SLOT_NODE_ID) {\n // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;\n childVNode.$tag$ = 'slot';\n if (childIdSplt[5]) {\n node['s-sn'] = childVNode.$name$ = childIdSplt[5];\n }\n else {\n node['s-sn'] = '';\n }\n node['s-sr'] = true;\n if (BUILD.shadowDom && shadowRootNodes) {\n // browser support shadowRoot and this is a shadow dom component\n // create an actual slot element\n childVNode.$elm$ = doc.createElement(childVNode.$tag$);\n if (childVNode.$name$) {\n // add the slot name attribute\n childVNode.$elm$.setAttribute('name', childVNode.$name$);\n }\n // insert the new slot element before the slot comment\n node.parentNode.insertBefore(childVNode.$elm$, node);\n // remove the slot comment since it's not needed for shadow\n node.remove();\n if (childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n slotNodes.push(childVNode);\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n }\n else if (childNodeType === CONTENT_REF_ID) {\n // `${CONTENT_REF_ID}.${hostId}`;\n if (BUILD.shadowDom && shadowRootNodes) {\n // remove the content ref comment since it's not needed for shadow\n node.remove();\n }\n else if (BUILD.slotRelocation) {\n hostElm['s-cr'] = node;\n node['s-cn'] = true;\n }\n }\n }\n }\n }\n else if (parentVNode && parentVNode.$tag$ === 'style') {\n const vnode = newVNode(null, node.textContent);\n vnode.$elm$ = node;\n vnode.$index$ = '0';\n parentVNode.$children$ = [vnode];\n }\n};\n/**\n * Recursively locate any comments representing an original location for a node in a node's\n * children or shadowRoot children.\n *\n * @param node The node to search.\n * @param orgLocNodes A map of the original location annotation and the current node being searched.\n */\nconst initializeDocumentHydrate = (node, orgLocNodes) => {\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n let i = 0;\n for (; i < node.childNodes.length; i++) {\n initializeDocumentHydrate(node.childNodes[i], orgLocNodes);\n }\n if (node.shadowRoot) {\n for (i = 0; i < node.shadowRoot.childNodes.length; i++) {\n initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);\n }\n }\n }\n else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n const childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[0] === ORG_LOCATION_ID) {\n orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);\n node.nodeValue = '';\n // useful to know if the original location is\n // the root light-dom of a shadow dom component\n node['s-en'] = childIdSplt[3];\n }\n }\n};\n// Private\nconst computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);\n// Public\nconst setMode = (handler) => modeResolutionChain.push(handler);\nconst getMode = (ref) => getHostRef(ref).$modeName$;\n/**\n * Parse a new property value for a given property type.\n *\n * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,\n * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:\n * 1. `any`, the type given to `propValue` in the function signature\n * 2. the type stored from `propType`.\n *\n * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.\n *\n * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to\n * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is\n * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.\n * ```tsx\n * \n * ```\n *\n * HTML prop values on the other hand, will always a string\n *\n * @param propValue the new value to coerce to some type\n * @param propType the type of the prop, expressed as a binary number\n * @returns the parsed/coerced value\n */\nconst parsePropertyValue = (propValue, propType) => {\n // ensure this value is of the correct prop type\n if (propValue != null && !isComplexType(propValue)) {\n if (BUILD.propBoolean && propType & 4 /* MEMBER_FLAGS.Boolean */) {\n // per the HTML spec, any string value means it is a boolean true value\n // but we'll cheat here and say that the string \"false\" is the boolean false\n return propValue === 'false' ? false : propValue === '' || !!propValue;\n }\n if (BUILD.propNumber && propType & 2 /* MEMBER_FLAGS.Number */) {\n // force it to be a number\n return parseFloat(propValue);\n }\n if (BUILD.propString && propType & 1 /* MEMBER_FLAGS.String */) {\n // could have been passed as a number or boolean\n // but we still want it as a string\n return String(propValue);\n }\n // redundant return here for better minification\n return propValue;\n }\n // not sure exactly what type we want\n // so no need to change to a different type\n return propValue;\n};\nconst getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);\nconst createEvent = (ref, name, flags) => {\n const elm = getElement(ref);\n return {\n emit: (detail) => {\n if (BUILD.isDev && !elm.isConnected) {\n consoleDevWarn(`The \"${name}\" event was emitted, but the dispatcher node is no longer connected to the dom.`);\n }\n return emitEvent(elm, name, {\n bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),\n composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),\n cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),\n detail,\n });\n },\n };\n};\n/**\n * Helper function to create & dispatch a custom Event on a provided target\n * @param elm the target of the Event\n * @param name the name to give the custom Event\n * @param opts options for configuring a custom Event\n * @returns the custom Event\n */\nconst emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nconst rootAppliedStyles = /*@__PURE__*/ new WeakMap();\nconst registerStyle = (scopeId, cssText, allowCS) => {\n let style = styles.get(scopeId);\n if (supportsConstructableStylesheets && allowCS) {\n style = (style || new CSSStyleSheet());\n if (typeof style === 'string') {\n style = cssText;\n }\n else {\n style.replaceSync(cssText);\n }\n }\n else {\n style = cssText;\n }\n styles.set(scopeId, style);\n};\nconst addStyle = (styleContainerNode, cmpMeta, mode) => {\n var _a;\n const scopeId = getScopeId(cmpMeta, mode);\n const style = styles.get(scopeId);\n if (!BUILD.attachStyles) {\n return scopeId;\n }\n // if an element is NOT connected then getRootNode() will return the wrong root node\n // so the fallback is to always use the document for the root node in those cases\n styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;\n if (style) {\n if (typeof style === 'string') {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));\n }\n if (!appliedStyles.has(scopeId)) {\n if (BUILD.hydrateClientSide &&\n styleContainerNode.host &&\n (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}=\"${scopeId}\"]`))) {\n // This is only happening on native shadow-dom, do not needs CSS var shim\n styleElm.innerHTML = style;\n }\n else {\n styleElm = doc.createElement('style');\n styleElm.innerHTML = style;\n // Apply CSP nonce to the style tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n styleElm.setAttribute('nonce', nonce);\n }\n if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {\n styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);\n }\n styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));\n }\n // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM\n if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {\n styleElm.innerHTML += SLOT_FB_CSS;\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId);\n }\n }\n }\n else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];\n }\n }\n return scopeId;\n};\nconst attachStyles = (hostRef) => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);\n const scopeId = addStyle(BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$);\n if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n // DOM WRITE!!\n elm['s-sc'] = scopeId;\n elm.classList.add(scopeId + '-h');\n if (BUILD.scoped && flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n elm.classList.add(scopeId + '-s');\n }\n }\n endAttachStyles();\n};\nconst getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);\nconst convertScopedToShadow = (css) => css.replace(/\\/\\*!@([^\\/]+)\\*\\/[^\\{]+\\{/g, '$1{');\n/**\n * Production setAccessor() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n/**\n * When running a VDom render set properties present on a VDom node onto the\n * corresponding HTML element.\n *\n * Note that this function has special functionality for the `class`,\n * `style`, `key`, and `ref` attributes, as well as event handlers (like\n * `onClick`, etc). All others are just passed through as-is.\n *\n * @param elm the HTMLElement onto which attributes should be set\n * @param memberName the name of the attribute to set\n * @param oldValue the old value for the attribute\n * @param newValue the new value for the attribute\n * @param isSvg whether we're in an svg context or not\n * @param flags bitflags for Vdom variables\n */\nconst setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {\n if (oldValue !== newValue) {\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (BUILD.vdomClass && memberName === 'class') {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n const newClasses = parseClassList(newValue);\n classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));\n }\n else if (BUILD.vdomStyle && memberName === 'style') {\n // update style attribute, css properties and values\n if (BUILD.updatable) {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.removeProperty(prop);\n }\n else {\n elm.style[prop] = '';\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.setProperty(prop, newValue[prop]);\n }\n else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n }\n else if (BUILD.vdomKey && memberName === 'key')\n ;\n else if (BUILD.vdomRef && memberName === 'ref') {\n // minifier will clean this up\n if (newValue) {\n newValue(elm);\n }\n }\n else if (BUILD.vdomListener &&\n (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&\n memberName[0] === 'o' &&\n memberName[1] === 'n') {\n // Event Handlers\n // so if the member name starts with \"on\" and the 3rd characters is\n // a capital letter, and it's not already a member on the element,\n // then we're assuming it's an event listener\n if (memberName[2] === '-') {\n // on- prefixed events\n // allows to be explicit about the dom event to listen without any magic\n // under the hood:\n // // listens for \"click\"\n // // listens for \"Click\"\n // // listens for \"ionChange\"\n // // listens for \"EVENTS\"\n memberName = memberName.slice(3);\n }\n else if (isMemberInElement(win, ln)) {\n // standard event\n // the JSX attribute could have been \"onMouseOver\" and the\n // member name \"onmouseover\" is on the window's prototype\n // so let's add the listener \"mouseover\", which is all lowercased\n memberName = ln.slice(2);\n }\n else {\n // custom event\n // the JSX attribute could have been \"onMyCustomEvent\"\n // so let's trim off the \"on\" prefix and lowercase the first character\n // and add the listener \"myCustomEvent\"\n // except for the first character, we keep the event name case\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue || newValue) {\n // Need to account for \"capture\" events.\n // If the event name ends with \"Capture\", we'll update the name to remove\n // the \"Capture\" suffix and make sure the event listener is setup to handle the capture event.\n const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);\n // Make sure we only replace the last instance of \"Capture\"\n memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, capture);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, capture);\n }\n }\n }\n else if (BUILD.vdomPropOrAttr) {\n // Set property if it exists and it's not a SVG\n const isComplex = isComplexType(newValue);\n if ((isProp || (isComplex && newValue !== null)) && !isSvg) {\n try {\n if (!elm.tagName.includes('-')) {\n const n = newValue == null ? '' : newValue;\n // Workaround for Safari, moving the caret when re-assigning the same valued\n if (memberName === 'list') {\n isProp = false;\n }\n else if (oldValue == null || elm[memberName] != n) {\n elm[memberName] = n;\n }\n }\n else {\n elm[memberName] = newValue;\n }\n }\n catch (e) {\n /**\n * in case someone tries to set a read-only property, e.g. \"namespaceURI\", we just ignore it\n */\n }\n }\n /**\n * Need to manually update attribute if:\n * - memberName is not an attribute\n * - if we are rendering the host element in order to reflect attribute\n * - if it's a SVG, since properties might not work in \n * - if the newValue is null/undefined or 'false'.\n */\n let xlink = false;\n if (BUILD.vdomXlink) {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, ''))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === '') {\n if (BUILD.vdomXlink && xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n }\n else {\n elm.removeAttribute(memberName);\n }\n }\n }\n else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {\n newValue = newValue === true ? '' : newValue;\n if (BUILD.vdomXlink && xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n }\n else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n }\n};\nconst parseClassListRegex = /\\s/;\n/**\n * Parsed a string of classnames into an array\n * @param value className string, e.g. \"foo bar baz\"\n * @returns list of classes, e.g. [\"foo\", \"bar\", \"baz\"]\n */\nconst parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));\nconst CAPTURE_EVENT_SUFFIX = 'Capture';\nconst CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');\nconst updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {\n // if the element passed in is a shadow root, which is a document fragment\n // then we want to be adding attrs/props to the shadow root's \"host\" element\n // if it's not a shadow root, then we add attrs/props to the same element\n const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host\n ? newVnode.$elm$.host\n : newVnode.$elm$;\n const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;\n const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;\n if (BUILD.updatable) {\n // remove attributes no longer present on the vnode by setting them to undefined\n for (memberName in oldVnodeAttrs) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);\n }\n }\n }\n // add new & update changed attributes\n for (memberName in newVnodeAttrs) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);\n }\n};\n/**\n * Create a DOM Node corresponding to one of the children of a given VNode.\n *\n * @param oldParentVNode the parent VNode from the previous render\n * @param newParentVNode the parent VNode from the current render\n * @param childIndex the index of the VNode, in the _new_ parent node's\n * children, for which we will create a new DOM node\n * @param parentElm the parent DOM node which our new node will be a child of\n * @returns the newly created node\n */\nconst createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {\n // tslint:disable-next-line: prefer-const\n const newVNode = newParentVNode.$children$[childIndex];\n let i = 0;\n let elm;\n let childNode;\n let oldVNode;\n if (BUILD.slotRelocation && !useNativeShadowDom) {\n // remember for later we need to check to relocate nodes\n checkSlotRelocate = true;\n if (newVNode.$tag$ === 'slot') {\n if (scopeId) {\n // scoped css needs to add its scoped id to the parent element\n parentElm.classList.add(scopeId + '-s');\n }\n newVNode.$flags$ |= newVNode.$children$\n ? // slot element has fallback content\n 2 /* VNODE_FLAGS.isSlotFallback */\n : // slot element does not have fallback content\n 1 /* VNODE_FLAGS.isSlotReference */;\n }\n }\n if (BUILD.isDev && newVNode.$elm$) {\n consoleDevError(`The JSX ${newVNode.$text$ !== null ? `\"${newVNode.$text$}\" text` : `\"${newVNode.$tag$}\" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);\n }\n if (BUILD.vdomText && newVNode.$text$ !== null) {\n // create text node\n elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);\n }\n else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {\n // create a slot reference node\n elm = newVNode.$elm$ =\n BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');\n }\n else {\n if (BUILD.svg && !isSvgMode) {\n isSvgMode = newVNode.$tag$ === 'svg';\n }\n // create element\n elm = newVNode.$elm$ = (BUILD.svg\n ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */\n ? 'slot-fb'\n : newVNode.$tag$)\n : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */\n ? 'slot-fb'\n : newVNode.$tag$));\n if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {\n isSvgMode = false;\n }\n // add css classes, attrs, props, listeners, etc.\n if (BUILD.vdomAttribute) {\n updateElement(null, newVNode, isSvgMode);\n }\n if ((BUILD.shadowDom || BUILD.scoped) && isDef(scopeId) && elm['s-si'] !== scopeId) {\n // if there is a scopeId and this is the initial render\n // then let's add the scopeId as a css class\n elm.classList.add((elm['s-si'] = scopeId));\n }\n if (newVNode.$children$) {\n for (i = 0; i < newVNode.$children$.length; ++i) {\n // create the node\n childNode = createElm(oldParentVNode, newVNode, i, elm);\n // return node could have been null\n if (childNode) {\n // append our new node\n elm.appendChild(childNode);\n }\n }\n }\n if (BUILD.svg) {\n if (newVNode.$tag$ === 'svg') {\n // Only reset the SVG context when we're exiting element\n isSvgMode = false;\n }\n else if (elm.tagName === 'foreignObject') {\n // Reenter SVG context when we're exiting element\n isSvgMode = true;\n }\n }\n }\n // This needs to always happen so we can hide nodes that are projected\n // to another component but don't end up in a slot\n elm['s-hn'] = hostTagName;\n if (BUILD.slotRelocation) {\n if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {\n // remember the content reference comment\n elm['s-sr'] = true;\n // remember the content reference comment\n elm['s-cr'] = contentRef;\n // remember the slot name, or empty string for default slot\n elm['s-sn'] = newVNode.$name$ || '';\n // check if we've got an old vnode for this slot\n oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];\n if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {\n if (BUILD.experimentalSlotFixes) {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content to the root of the element currently being rendered\n relocateToHostRoot(oldParentVNode.$elm$);\n }\n else {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content back to its original location\n putBackInOriginalLocation(oldParentVNode.$elm$, false);\n }\n }\n }\n }\n return elm;\n};\n/**\n * Relocates all child nodes of an element that were a part of a previous slot relocation\n * to the root of the Stencil component currently being rendered. This happens when a parent\n * element of a slot reference node dynamically changes and triggers a re-render. We cannot use\n * `putBackInOriginalLocation()` because that may relocate nodes to elements that will not be re-rendered\n * and so they will not be relocated again.\n *\n * @param parentElm The element potentially containing relocated nodes.\n */\nconst relocateToHostRoot = (parentElm) => {\n plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n const host = parentElm.closest(hostTagName.toLowerCase());\n if (host != null) {\n const contentRefNode = Array.from(host.childNodes).find((ref) => ref['s-cr']);\n const childNodeArray = Array.from(parentElm.childNodes);\n // If we have a content ref, we need to invert the order of the nodes we're relocating\n // to preserve the correct order of elements in the DOM on future relocations\n for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {\n // Only relocate nodes that were slotted in\n if (childNode['s-sh'] != null) {\n host.insertBefore(childNode, contentRefNode !== null && contentRefNode !== void 0 ? contentRefNode : null);\n // Reset so we can correctly move the node around again.\n childNode['s-sh'] = undefined;\n // Need to tell the render pipeline to check to relocate slot content again\n checkSlotRelocate = true;\n }\n }\n }\n plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n};\nconst putBackInOriginalLocation = (parentElm, recursive) => {\n plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n const oldSlotChildNodes = parentElm.childNodes;\n for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {\n const childNode = oldSlotChildNodes[i];\n if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {\n // and relocate it back to it's original location\n parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));\n // remove the old original location comment entirely\n // later on the patch function will know what to do\n // and move this to the correct spot if need be\n childNode['s-ol'].remove();\n childNode['s-ol'] = undefined;\n // Reset so we can correctly move the node around again.\n childNode['s-sh'] = undefined;\n checkSlotRelocate = true;\n }\n if (recursive) {\n putBackInOriginalLocation(childNode, recursive);\n }\n }\n plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n};\n/**\n * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and\n * add them to the DOM in the appropriate place.\n *\n * @param parentElm the DOM node which should be used as a parent for the new\n * DOM nodes\n * @param before a child of the `parentElm` which the new children should be\n * inserted before (optional)\n * @param parentVNode the parent virtual DOM node\n * @param vnodes the new child virtual DOM nodes to produce DOM nodes for\n * @param startIdx the index in the child virtual DOM nodes at which to start\n * creating DOM nodes (inclusive)\n * @param endIdx the index in the child virtual DOM nodes at which to stop\n * creating DOM nodes (inclusive)\n */\nconst addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = ((BUILD.slotRelocation && parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);\n let childNode;\n if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx, parentElm);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n containerElm.insertBefore(childNode, BUILD.slotRelocation ? referenceNode(before) : before);\n }\n }\n }\n};\n/**\n * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.\n * This can be used to, for instance, clean up after a list of children which\n * should no longer be shown.\n *\n * This function also handles some of Stencil's slot relocation logic.\n *\n * @param vnodes a list of virtual DOM nodes to remove\n * @param startIdx the index at which to start removing nodes (inclusive)\n * @param endIdx the index at which to stop removing nodes (inclusive)\n */\nconst removeVnodes = (vnodes, startIdx, endIdx) => {\n for (let index = startIdx; index <= endIdx; ++index) {\n const vnode = vnodes[index];\n if (vnode) {\n const elm = vnode.$elm$;\n nullifyVNodeRefs(vnode);\n if (elm) {\n if (BUILD.slotRelocation) {\n // we're removing this element\n // so it's possible we need to show slot fallback content now\n checkSlotFallbackVisibility = true;\n if (elm['s-ol']) {\n // remove the original location comment\n elm['s-ol'].remove();\n }\n else {\n // it's possible that child nodes of the node\n // that's being removed are slot nodes\n putBackInOriginalLocation(elm, true);\n }\n }\n // remove the vnode's element from the dom\n elm.remove();\n }\n }\n }\n};\n/**\n * Reconcile the children of a new VNode with the children of an old VNode by\n * traversing the two collections of children, identifying nodes that are\n * conserved or changed, calling out to `patch` to make any necessary\n * updates to the DOM, and rearranging DOM nodes as needed.\n *\n * The algorithm for reconciling children works by analyzing two 'windows' onto\n * the two arrays of children (`oldCh` and `newCh`). We keep track of the\n * 'windows' by storing start and end indices and references to the\n * corresponding array entries. Initially the two 'windows' are basically equal\n * to the entire array, but we progressively narrow the windows until there are\n * no children left to update by doing the following:\n *\n * 1. Skip any `null` entries at the beginning or end of the two arrays, so\n * that if we have an initial array like the following we'll end up dealing\n * only with a window bounded by the highlighted elements:\n *\n * [null, null, VNode1 , ... , VNode2, null, null]\n * ^^^^^^ ^^^^^^\n *\n * 2. Check to see if the elements at the head and tail positions are equal\n * across the windows. This will basically detect elements which haven't\n * been added, removed, or changed position, i.e. if you had the following\n * VNode elements (represented as HTML):\n *\n * oldVNode: `

HEY

`\n * newVNode: `

THERE

`\n *\n * Then when comparing the children of the `
` tag we check the equality\n * of the VNodes corresponding to the `

` tags and, since they are the\n * same tag in the same position, we'd be able to avoid completely\n * re-rendering the subtree under them with a new DOM element and would just\n * call out to `patch` to handle reconciling their children and so on.\n *\n * 3. Check, for both windows, to see if the element at the beginning of the\n * window corresponds to the element at the end of the other window. This is\n * a heuristic which will let us identify _some_ situations in which\n * elements have changed position, for instance it _should_ detect that the\n * children nodes themselves have not changed but merely moved in the\n * following example:\n *\n * oldVNode: `

`\n * newVNode: `
`\n *\n * If we find cases like this then we also need to move the concrete DOM\n * elements corresponding to the moved children to write the re-order to the\n * DOM.\n *\n * 4. Finally, if VNodes have the `key` attribute set on them we check for any\n * nodes in the old children which have the same key as the first element in\n * our window on the new children. If we find such a node we handle calling\n * out to `patch`, moving relevant DOM nodes, and so on, in accordance with\n * what we find.\n *\n * Finally, once we've narrowed our 'windows' to the point that either of them\n * collapse (i.e. they have length 0) we then handle any remaining VNode\n * insertion or deletion that needs to happen to get a DOM state that correctly\n * reflects the new child VNodes. If, for instance, after our window on the old\n * children has collapsed we still have more nodes on the new children that\n * we haven't dealt with yet then we need to add them, or if the new children\n * collapse but we still have unhandled _old_ children then we need to make\n * sure the corresponding DOM nodes are removed.\n *\n * @param parentElm the node into which the parent VNode is rendered\n * @param oldCh the old children of the parent node\n * @param newVNode the new VNode which will replace the parent\n * @param newCh the new children of the parent node\n * @param isInitialRender whether or not this is the first render of the vdom\n */\nconst updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n // VNode might have been moved left\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {\n // if the start nodes are the same then we should patch the new VNode\n // onto the old one, and increment our `newStartIdx` and `oldStartIdx`\n // indices to reflect that. We don't need to move any DOM Nodes around\n // since things are matched up in order.\n patch(oldStartVnode, newStartVnode, isInitialRender);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {\n // likewise, if the end nodes are the same we patch new onto old and\n // decrement our end indices, and also likewise in this case we don't\n // need to move any DOM Nodes.\n patch(oldEndVnode, newEndVnode, isInitialRender);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {\n // case: \"Vnode moved right\"\n //\n // We've found that the last node in our window on the new children is\n // the same VNode as the _first_ node in our window on the old children\n // we're dealing with now. Visually, this is the layout of these two\n // nodes:\n //\n // newCh: [..., newStartVnode , ... , newEndVnode , ...]\n // ^^^^^^^^^^^\n // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]\n // ^^^^^^^^^^^^^\n //\n // In this situation we need to patch `newEndVnode` onto `oldStartVnode`\n // and move the DOM element for `oldStartVnode`.\n if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);\n }\n patch(oldStartVnode, newEndVnode, isInitialRender);\n // We need to move the element for `oldStartVnode` into a position which\n // will be appropriate for `newEndVnode`. For this we can use\n // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a\n // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for\n // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:\n //\n // \n // \n // \n // \n // \n // \n // ```\n // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback\n // will be called with `newValue = \"some-value\"` and will set the shadowed property (this.someAttribute = \"another-value\")\n // to the value that was set inline i.e. \"some-value\" from above example. When\n // the connectedCallback attempts to un-shadow it will use \"some-value\" as the initial value rather than \"another-value\"\n //\n // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed\n // by connectedCallback as this attributeChangedCallback will not fire.\n //\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n //\n // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to\n // properties here given that this goes against best practices outlined here\n // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy\n if (this.hasOwnProperty(propName)) {\n newValue = this[propName];\n delete this[propName];\n }\n else if (prototype.hasOwnProperty(propName) &&\n typeof this[propName] === 'number' &&\n this[propName] == newValue) {\n // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native\n // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in\n // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.\n return;\n }\n else if (propName == null) {\n // At this point we should know this is not a \"member\", so we can treat it like watching an attribute\n // on a vanilla web component\n const hostRef = getHostRef(this);\n const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;\n // We only want to trigger the callback(s) if:\n // 1. The instance is ready\n // 2. The watchers are ready\n // 3. The value has changed\n if (flags &&\n !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&\n flags & 128 /* HOST_FLAGS.isWatchReady */ &&\n newValue !== oldValue) {\n const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];\n entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {\n if (instance[callbackName] != null) {\n instance[callbackName].call(instance, newValue, oldValue, attrName);\n }\n });\n }\n return;\n }\n this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;\n });\n };\n // Create an array of attributes to observe\n // This list in comprised of all strings used within a `@Watch()` decorator\n // on a component as well as any Stencil-specific \"members\" (`@Prop()`s and `@State()`s).\n // As such, there is no way to guarantee type-safety here that a user hasn't entered\n // an invalid attribute.\n Cstr.observedAttributes = Array.from(new Set([\n ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),\n ...members\n .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)\n .map(([propName, m]) => {\n var _a;\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (BUILD.reflect && m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {\n (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);\n }\n return attrName;\n }),\n ]));\n }\n }\n return Cstr;\n};\n/**\n * Initialize a Stencil component given a reference to its host element, its\n * runtime bookkeeping data structure, runtime metadata about the component,\n * and (optionally) an HMR version ID.\n *\n * @param elm a host element\n * @param hostRef the element's runtime bookkeeping object\n * @param cmpMeta runtime metadata for the Stencil component\n * @param hmrVersionId an (optional) HMR version ID\n */\nconst initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {\n let Cstr;\n // initializeComponent\n if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {\n // Let the runtime know that the component has been initialized\n hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;\n const bundleId = cmpMeta.$lazyBundleId$;\n if ((BUILD.lazyLoad || BUILD.hydrateClientSide) && bundleId) {\n // lazy loaded components\n // request the component's implementation to be\n // wired up with the host element\n Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);\n if (Cstr.then) {\n // Await creates a micro-task avoid if possible\n const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for <${cmpMeta.$tagName$}>`);\n Cstr = await Cstr;\n endLoad();\n }\n if ((BUILD.isDev || BUILD.isDebug) && !Cstr) {\n throw new Error(`Constructor for \"${cmpMeta.$tagName$}#${hostRef.$modeName$}\" was not found`);\n }\n if (BUILD.member && !Cstr.isProxied) {\n // we've never proxied this Constructor before\n // let's add the getters/setters to its prototype before\n // the first time we create an instance of the implementation\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);\n Cstr.isProxied = true;\n }\n const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);\n // ok, time to construct the instance\n // but let's keep track of when we start and stop\n // so that the getters/setters don't incorrectly step on data\n if (BUILD.member) {\n hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;\n }\n // construct the lazy-loaded component implementation\n // passing the hostRef is very important during\n // construction in order to directly wire together the\n // host element and the lazy-loaded instance\n try {\n new Cstr(hostRef);\n }\n catch (e) {\n consoleError(e);\n }\n if (BUILD.member) {\n hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;\n }\n if (BUILD.watchCallback) {\n hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;\n }\n endNewInstance();\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n else {\n // sync constructor component\n Cstr = elm.constructor;\n // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,\n // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_\n // Stencil has completed instantiating the component.\n customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));\n }\n if (BUILD.style && Cstr.style) {\n // this component has styles but we haven't registered them yet\n let style = Cstr.style;\n if (BUILD.mode && typeof style !== 'string') {\n style = style[(hostRef.$modeName$ = computeMode(elm))];\n if (BUILD.hydrateServerSide && hostRef.$modeName$) {\n elm.setAttribute('s-mode', hostRef.$modeName$);\n }\n }\n const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);\n if (!styles.has(scopeId)) {\n const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);\n if (!BUILD.hydrateServerSide &&\n BUILD.shadowDom &&\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n BUILD.shadowDomShim &&\n cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {\n style = await import('./shadow-css.js').then((m) => m.scopeCss(style, scopeId, false));\n }\n registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n // we've successfully created a lazy instance\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {\n // this is the initial load and this component it has an ancestor component\n // but the ancestor component has NOT fired its will update lifecycle yet\n // so let's just cool our jets and wait for the ancestor to continue first\n // this will get fired off when the ancestor component\n // finally gets around to rendering its lazy self\n // fire off the initial update\n ancestorComponent['s-rc'].push(schedule);\n }\n else {\n schedule();\n }\n};\nconst fireConnectedCallback = (instance) => {\n if (BUILD.lazyLoad && BUILD.connectedCallback) {\n safeCall(instance, 'connectedCallback');\n }\n};\nconst connectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);\n if (BUILD.hostListenerTargetParent) {\n // only run if we have listeners being attached to a parent\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);\n }\n if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {\n // first time this component has connected\n hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;\n let hostId;\n if (BUILD.hydrateClientSide) {\n hostId = elm.getAttribute(HYDRATE_ID);\n if (hostId) {\n if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n const scopeId = BUILD.mode\n ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))\n : addStyle(elm.shadowRoot, cmpMeta);\n elm.classList.remove(scopeId + '-h', scopeId + '-s');\n }\n initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);\n }\n }\n if (BUILD.slotRelocation && !hostId) {\n // initUpdate\n // if the slot polyfill is required we'll need to put some nodes\n // in here to act as original content anchors as we move nodes around\n // host element has been connected to the DOM\n if (BUILD.hydrateServerSide ||\n ((BUILD.slot || BUILD.shadowDom) &&\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {\n setContentReference(elm);\n }\n }\n if (BUILD.asyncLoading) {\n // find the first ancestor component (if there is one) and register\n // this component as one of the actively loading child components for its ancestor\n let ancestorComponent = elm;\n while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {\n // climb up the ancestors looking for the first\n // component that hasn't finished its lifecycle update yet\n if ((BUILD.hydrateClientSide &&\n ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&\n ancestorComponent.hasAttribute('s-id') &&\n ancestorComponent['s-p']) ||\n ancestorComponent['s-p']) {\n // we found this components first ancestor component\n // keep a reference to this component's ancestor component\n attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));\n break;\n }\n }\n }\n // Lazy properties\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n if (BUILD.initializeNextTick) {\n // connectedCallback, taskQueue, initialLoad\n // angular sets attribute AFTER connectCallback\n // https://github.com/angular/angular/issues/18909\n // https://github.com/angular/angular/issues/19940\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n }\n else {\n initializeComponent(elm, hostRef, cmpMeta);\n }\n }\n else {\n // not the first time this has connected\n // reattach any event listeners to the host\n // since they would have been removed when disconnected\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);\n // fire off connectedCallback() on component instance\n if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {\n hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));\n }\n }\n endConnected();\n }\n};\nconst setContentReference = (elm) => {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n const contentRefElm = (elm['s-cr'] = doc.createComment(BUILD.isDebug ? `content-ref (host=${elm.localName})` : ''));\n contentRefElm['s-cn'] = true;\n elm.insertBefore(contentRefElm, elm.firstChild);\n};\nconst disconnectInstance = (instance) => {\n if (BUILD.lazyLoad && BUILD.disconnectedCallback) {\n safeCall(instance, 'disconnectedCallback');\n }\n if (BUILD.cmpDidUnload) {\n safeCall(instance, 'componentDidUnload');\n }\n};\nconst disconnectedCallback = async (elm) => {\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n if (BUILD.hostListener) {\n if (hostRef.$rmListeners$) {\n hostRef.$rmListeners$.map((rmListener) => rmListener());\n hostRef.$rmListeners$ = undefined;\n }\n }\n if (!BUILD.lazyLoad) {\n disconnectInstance(elm);\n }\n else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {\n disconnectInstance(hostRef.$lazyInstance$);\n }\n else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {\n hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));\n }\n }\n};\nconst patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {\n patchCloneNode(hostElementPrototype);\n patchSlotAppendChild(hostElementPrototype);\n patchSlotAppend(hostElementPrototype);\n patchSlotPrepend(hostElementPrototype);\n patchSlotInsertAdjacentElement(hostElementPrototype);\n patchSlotInsertAdjacentHTML(hostElementPrototype);\n patchSlotInsertAdjacentText(hostElementPrototype);\n patchTextContent(hostElementPrototype);\n patchChildSlotNodes(hostElementPrototype, descriptorPrototype);\n patchSlotRemoveChild(hostElementPrototype);\n};\nconst patchCloneNode = (HostElementPrototype) => {\n const orgCloneNode = HostElementPrototype.cloneNode;\n HostElementPrototype.cloneNode = function (deep) {\n const srcNode = this;\n const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;\n const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);\n if (BUILD.slot && !isShadowDom && deep) {\n let i = 0;\n let slotted, nonStencilNode;\n const stencilPrivates = [\n 's-id',\n 's-cr',\n 's-lr',\n 's-rc',\n 's-sc',\n 's-p',\n 's-cn',\n 's-sr',\n 's-sn',\n 's-hn',\n 's-ol',\n 's-nr',\n 's-si',\n ];\n for (; i < srcNode.childNodes.length; i++) {\n slotted = srcNode.childNodes[i]['s-nr'];\n nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);\n if (slotted) {\n if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {\n clonedNode.__appendChild(slotted.cloneNode(true));\n }\n else {\n clonedNode.appendChild(slotted.cloneNode(true));\n }\n }\n if (nonStencilNode) {\n clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\n/**\n * Patches the `appendChild` method on a `scoped` Stencil component.\n * The patch will attempt to find a slot with the same name as the node being appended\n * and insert it into the slot reference if found. Otherwise, it falls-back to the original\n * `appendChild` method.\n *\n * @param HostElementPrototype The Stencil component to be patched\n */\nconst patchSlotAppendChild = (HostElementPrototype) => {\n HostElementPrototype.__appendChild = HostElementPrototype.appendChild;\n HostElementPrototype.appendChild = function (newChild) {\n const slotName = (newChild['s-sn'] = getSlotName(newChild));\n const slotNode = getHostSlotNode(this.childNodes, slotName);\n if (slotNode) {\n const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);\n const appendAfter = slotChildNodes[slotChildNodes.length - 1];\n const insertedNode = appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);\n // Check if there is fallback content that should be hidden\n updateFallbackSlotVisibility(this);\n // Force a re-render of the host element\n forceUpdate(this);\n return insertedNode;\n }\n return this.__appendChild(newChild);\n };\n};\n/**\n * Patches the `removeChild` method on a `scoped` Stencil component.\n * This patch attempts to remove the specified node from a slot reference\n * if the slot exists. Otherwise, it falls-back to the original `removeChild` method.\n *\n * @param ElementPrototype The Stencil component to be patched\n */\nconst patchSlotRemoveChild = (ElementPrototype) => {\n ElementPrototype.__removeChild = ElementPrototype.removeChild;\n ElementPrototype.removeChild = function (toRemove) {\n if (toRemove && typeof toRemove['s-sn'] !== 'undefined') {\n const slotNode = getHostSlotNode(this.childNodes, toRemove['s-sn']);\n if (slotNode) {\n // Get all slot content\n const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove['s-sn']);\n // See if any of the slotted content matches the node to remove\n const existingNode = slotChildNodes.find((n) => n === toRemove);\n if (existingNode) {\n existingNode.remove();\n // Check if there is fallback content that should be displayed if that\n // was the last node in the slot\n updateFallbackSlotVisibility(this);\n return;\n }\n }\n }\n return this.__removeChild(toRemove);\n };\n};\n/**\n * Patches the `prepend` method for a slotted node inside a scoped component.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotPrepend = (HostElementPrototype) => {\n const originalPrepend = HostElementPrototype.prepend;\n HostElementPrototype.prepend = function (...newChildren) {\n newChildren.forEach((newChild) => {\n if (typeof newChild === 'string') {\n newChild = this.ownerDocument.createTextNode(newChild);\n }\n const slotName = (newChild['s-sn'] = getSlotName(newChild));\n const slotNode = getHostSlotNode(this.childNodes, slotName);\n if (slotNode) {\n const slotPlaceholder = document.createTextNode('');\n slotPlaceholder['s-nr'] = newChild;\n slotNode['s-cr'].parentNode.__appendChild(slotPlaceholder);\n newChild['s-ol'] = slotPlaceholder;\n const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);\n const appendAfter = slotChildNodes[0];\n return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);\n }\n if (newChild.nodeType === 1 && !!newChild.getAttribute('slot')) {\n newChild.hidden = true;\n }\n return originalPrepend.call(this, newChild);\n });\n };\n};\n/**\n * Patches the `append` method for a slotted node inside a scoped component. The patched method uses\n * `appendChild` under-the-hood while creating text nodes for any new children that passed as bare strings.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotAppend = (HostElementPrototype) => {\n HostElementPrototype.append = function (...newChildren) {\n newChildren.forEach((newChild) => {\n if (typeof newChild === 'string') {\n newChild = this.ownerDocument.createTextNode(newChild);\n }\n this.appendChild(newChild);\n });\n };\n};\n/**\n * Patches the `insertAdjacentHTML` method for a slotted node inside a scoped component. Specifically,\n * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the element\n * gets inserted into the DOM in the correct location.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotInsertAdjacentHTML = (HostElementPrototype) => {\n const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;\n HostElementPrototype.insertAdjacentHTML = function (position, text) {\n if (position !== 'afterbegin' && position !== 'beforeend') {\n return originalInsertAdjacentHtml.call(this, position, text);\n }\n const container = this.ownerDocument.createElement('_');\n let node;\n container.innerHTML = text;\n if (position === 'afterbegin') {\n while ((node = container.firstChild)) {\n this.prepend(node);\n }\n }\n else if (position === 'beforeend') {\n while ((node = container.firstChild)) {\n this.append(node);\n }\n }\n };\n};\n/**\n * Patches the `insertAdjacentText` method for a slotted node inside a scoped component. Specifically,\n * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the text node\n * gets inserted into the DOM in the correct location.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotInsertAdjacentText = (HostElementPrototype) => {\n HostElementPrototype.insertAdjacentText = function (position, text) {\n this.insertAdjacentHTML(position, text);\n };\n};\n/**\n * Patches the `insertAdjacentElement` method for a slotted node inside a scoped component. Specifically,\n * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the element\n * gets inserted into the DOM in the correct location.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotInsertAdjacentElement = (HostElementPrototype) => {\n const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;\n HostElementPrototype.insertAdjacentElement = function (position, element) {\n if (position !== 'afterbegin' && position !== 'beforeend') {\n return originalInsertAdjacentElement.call(this, position, element);\n }\n if (position === 'afterbegin') {\n this.prepend(element);\n return element;\n }\n else if (position === 'beforeend') {\n this.append(element);\n return element;\n }\n return element;\n };\n};\n/**\n * Patches the text content of an unnamed slotted node inside a scoped component\n * @param hostElementPrototype the `Element` to be patched\n */\nconst patchTextContent = (hostElementPrototype) => {\n const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');\n Object.defineProperty(hostElementPrototype, '__textContent', descriptor);\n if (BUILD.experimentalScopedSlotChanges) {\n // Patch `textContent` to mimic shadow root behavior\n Object.defineProperty(hostElementPrototype, 'textContent', {\n // To mimic shadow root behavior, we need to return the text content of all\n // nodes in a slot reference node\n get() {\n const slotRefNodes = getAllChildSlotNodes(this.childNodes);\n const textContent = slotRefNodes\n .map((node) => {\n var _a, _b;\n const text = [];\n // Need to get the text content of all nodes in the slot reference node\n let slotContent = node.nextSibling;\n while (slotContent && slotContent['s-sn'] === node['s-sn']) {\n if (slotContent.nodeType === 3 /* NODE_TYPES.TEXT_NODE */ || slotContent.nodeType === 1 /* NODE_TYPES.ELEMENT_NODE */) {\n text.push((_b = (_a = slotContent.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '');\n }\n slotContent = slotContent.nextSibling;\n }\n return text.filter((ref) => ref !== '').join(' ');\n })\n .filter((text) => text !== '')\n .join(' ');\n // Pad the string to return\n return ' ' + textContent + ' ';\n },\n // To mimic shadow root behavior, we need to overwrite all nodes in a slot\n // reference node. If a default slot reference node exists, the text content will be\n // placed there. Otherwise, the new text node will be hidden\n set(value) {\n const slotRefNodes = getAllChildSlotNodes(this.childNodes);\n slotRefNodes.forEach((node) => {\n // Remove the existing content of the slot\n let slotContent = node.nextSibling;\n while (slotContent && slotContent['s-sn'] === node['s-sn']) {\n const tmp = slotContent;\n slotContent = slotContent.nextSibling;\n tmp.remove();\n }\n // If this is a default slot, add the text node in the slot location.\n // Otherwise, destroy the slot reference node\n if (node['s-sn'] === '') {\n const textNode = this.ownerDocument.createTextNode(value);\n textNode['s-sn'] = '';\n node.parentElement.insertBefore(textNode, node.nextSibling);\n }\n else {\n node.remove();\n }\n });\n },\n });\n }\n else {\n Object.defineProperty(hostElementPrototype, 'textContent', {\n get() {\n var _a;\n // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is\n // the empty string\n const slotNode = getHostSlotNode(this.childNodes, '');\n // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how\n // nodes were reordered during the vdom render. first try to get the text content from the sibling.\n if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {\n return slotNode.nextSibling.textContent;\n }\n else if (slotNode) {\n return slotNode.textContent;\n }\n else {\n // fallback to the original implementation\n return this.__textContent;\n }\n },\n set(value) {\n var _a;\n // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is\n // the empty string\n const slotNode = getHostSlotNode(this.childNodes, '');\n // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,\n // depending on how nodes were reordered during the vdom render. first try to set the text content on the\n // sibling.\n if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {\n slotNode.nextSibling.textContent = value;\n }\n else if (slotNode) {\n slotNode.textContent = value;\n }\n else {\n // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM\n // loaded, we could have missed it. check for a content reference element on the scoped component and insert\n // it there\n this.__textContent = value;\n const contentRefElm = this['s-cr'];\n if (contentRefElm) {\n this.insertBefore(contentRefElm, this.firstChild);\n }\n }\n },\n });\n }\n};\nconst patchChildSlotNodes = (elm, cmpMeta) => {\n class FakeNodeList extends Array {\n item(n) {\n return this[n];\n }\n }\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {\n const childNodesFn = elm.__lookupGetter__('childNodes');\n Object.defineProperty(elm, 'children', {\n get() {\n return this.childNodes.map((n) => n.nodeType === 1);\n },\n });\n Object.defineProperty(elm, 'childElementCount', {\n get() {\n return elm.children.length;\n },\n });\n Object.defineProperty(elm, 'childNodes', {\n get() {\n const childNodes = childNodesFn.call(this);\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&\n getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {\n const result = new FakeNodeList();\n for (let i = 0; i < childNodes.length; i++) {\n const slot = childNodes[i]['s-nr'];\n if (slot) {\n result.push(slot);\n }\n }\n return result;\n }\n return FakeNodeList.from(childNodes);\n },\n });\n }\n};\n/**\n * Recursively finds all slot reference nodes ('s-sr') in a series of child nodes.\n *\n * @param childNodes The set of child nodes to search for slot reference nodes.\n * @returns An array of slot reference nodes.\n */\nconst getAllChildSlotNodes = (childNodes) => {\n const slotRefNodes = [];\n for (const childNode of Array.from(childNodes)) {\n if (childNode['s-sr']) {\n slotRefNodes.push(childNode);\n }\n slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));\n }\n return slotRefNodes;\n};\nconst getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';\n/**\n * Recursively searches a series of child nodes for a slot with the provided name.\n * @param childNodes the nodes to search for a slot with a specific name.\n * @param slotName the name of the slot to match on.\n * @returns a reference to the slot node that matches the provided name, `null` otherwise\n */\nconst getHostSlotNode = (childNodes, slotName) => {\n let i = 0;\n let childNode;\n for (; i < childNodes.length; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && childNode['s-sn'] === slotName) {\n return childNode;\n }\n childNode = getHostSlotNode(childNode.childNodes, slotName);\n if (childNode) {\n return childNode;\n }\n }\n return null;\n};\nconst getHostSlotChildNodes = (n, slotName) => {\n const childNodes = [n];\n while ((n = n.nextSibling) && n['s-sn'] === slotName) {\n childNodes.push(n);\n }\n return childNodes;\n};\nconst defineCustomElement = (Cstr, compactMeta) => {\n customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));\n};\nconst proxyCustomElement = (Cstr, compactMeta) => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n };\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.$watchers$;\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;\n }\n // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check\n if (BUILD.experimentalSlotFixes) {\n if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n // This check is intentionally not combined with the surrounding `experimentalSlotFixes` check\n // since, moving forward, we only want to patch the pseudo shadow DOM when the component is scoped\n patchPseudoShadowDom(Cstr.prototype, cmpMeta);\n }\n }\n else {\n if (BUILD.slotChildNodesFix) {\n patchChildSlotNodes(Cstr.prototype, cmpMeta);\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNode(Cstr.prototype);\n }\n if (BUILD.appendChildSlotFix) {\n patchSlotAppendChild(Cstr.prototype);\n }\n if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n patchTextContent(Cstr.prototype);\n }\n }\n const originalConnectedCallback = Cstr.prototype.connectedCallback;\n const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;\n Object.assign(Cstr.prototype, {\n __registerHost() {\n registerHost(this, cmpMeta);\n },\n connectedCallback() {\n connectedCallback(this);\n if (BUILD.connectedCallback && originalConnectedCallback) {\n originalConnectedCallback.call(this);\n }\n },\n disconnectedCallback() {\n disconnectedCallback(this);\n if (BUILD.disconnectedCallback && originalDisconnectedCallback) {\n originalDisconnectedCallback.call(this);\n }\n },\n __attachShadow() {\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n this.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),\n });\n }\n else {\n this.attachShadow({ mode: 'open' });\n }\n }\n else {\n this.shadowRoot = this;\n }\n },\n });\n Cstr.is = cmpMeta.$tagName$;\n return proxyComponent(Cstr, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */ | 2 /* PROXY_FLAGS.proxyState */);\n};\nconst forceModeUpdate = (elm) => {\n if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {\n const mode = computeMode(elm);\n const hostRef = getHostRef(elm);\n if (hostRef.$modeName$ !== mode) {\n const cmpMeta = hostRef.$cmpMeta$;\n const oldScopeId = elm['s-sc'];\n const scopeId = getScopeId(cmpMeta, mode);\n const style = elm.constructor.style[mode];\n const flags = cmpMeta.$flags$;\n if (style) {\n if (!styles.has(scopeId)) {\n registerStyle(scopeId, style, !!(flags & 1 /* CMP_FLAGS.shadowDomEncapsulation */));\n }\n hostRef.$modeName$ = mode;\n elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');\n attachStyles(hostRef);\n forceUpdate(elm);\n }\n }\n }\n};\n/**\n * Kick off hot-module-replacement for a component. In order to replace the\n * component in-place we:\n *\n * 1. get a reference to the {@link d.HostRef} for the element\n * 2. reset the element's runtime flags\n * 3. re-run the initialization logic for the element (via\n * {@link initializeComponent})\n *\n * @param hostElement the host element for the component which we want to start\n * doing HMR\n * @param cmpMeta runtime metadata for the component\n * @param hmrVersionId the current HMR version ID\n */\nconst hmrStart = (hostElement, cmpMeta, hmrVersionId) => {\n // ¯\\_(ツ)_/¯\n const hostRef = getHostRef(hostElement);\n // reset state flags to only have been connected\n hostRef.$flags$ = 1 /* HOST_FLAGS.hasConnected */;\n // TODO\n // detach any event listeners that may have been added\n // because we're not passing an exact event name it'll\n // remove all of this element's event, which is good\n // re-initialize the component\n initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);\n};\nconst bootstrapLazy = (lazyBundles, options = {}) => {\n var _a;\n if (BUILD.profile && performance.mark) {\n performance.mark('st:app:start');\n }\n installDevTools();\n const endBootstrap = createTime('bootstrapLazy');\n const cmpTags = [];\n const exclude = options.exclude || [];\n const customElements = win.customElements;\n const head = doc.head;\n const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');\n const dataStyles = /*@__PURE__*/ doc.createElement('style');\n const deferredConnectedCallbacks = [];\n const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);\n let appLoadFallback;\n let isBootstrapping = true;\n let i = 0;\n Object.assign(plt, options);\n plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;\n if (BUILD.asyncQueue) {\n if (options.syncQueue) {\n plt.$flags$ |= 4 /* PLATFORM_FLAGS.queueSync */;\n }\n }\n if (BUILD.hydrateClientSide) {\n // If the app is already hydrated there is not point to disable the\n // async queue. This will improve the first input delay\n plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;\n }\n if (BUILD.hydrateClientSide && BUILD.shadowDom) {\n for (; i < styles.length; i++) {\n registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);\n }\n }\n let hasSlotRelocation = false;\n lazyBundles.map((lazyBundle) => {\n lazyBundle[1].map((compactMeta) => {\n var _a;\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n $members$: compactMeta[2],\n $listeners$: compactMeta[3],\n };\n // Check if we are using slots outside the shadow DOM in this component.\n // We'll use this information later to add styles for `slot-fb` elements\n if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {\n hasSlotRelocation = true;\n }\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;\n }\n const tagName = BUILD.transformTagName && options.transformTagName\n ? options.transformTagName(cmpMeta.$tagName$)\n : cmpMeta.$tagName$;\n const HostElement = class extends HTMLElement {\n // StencilLazyHost\n constructor(self) {\n // @ts-ignore\n super(self);\n self = this;\n registerHost(self, cmpMeta);\n if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // this component is using shadow dom\n // and this browser supports shadow dom\n // add the read-only property \"shadowRoot\" to the host element\n // adding the shadow root build conditionals to minimize runtime\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n self.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),\n });\n }\n else {\n self.attachShadow({ mode: 'open' });\n }\n }\n else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {\n self.shadowRoot = self;\n }\n }\n }\n connectedCallback() {\n if (appLoadFallback) {\n clearTimeout(appLoadFallback);\n appLoadFallback = null;\n }\n if (isBootstrapping) {\n // connectedCallback will be processed once all components have been registered\n deferredConnectedCallbacks.push(this);\n }\n else {\n plt.jmp(() => connectedCallback(this));\n }\n }\n disconnectedCallback() {\n plt.jmp(() => disconnectedCallback(this));\n }\n componentOnReady() {\n return getHostRef(this).$onReadyPromise$;\n }\n };\n // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check\n if (BUILD.experimentalSlotFixes) {\n // This check is intentionally not combined with the surrounding `experimentalSlotFixes` check\n // since, moving forward, we only want to patch the pseudo shadow DOM when the component is scoped\n if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n patchPseudoShadowDom(HostElement.prototype, cmpMeta);\n }\n }\n else {\n if (BUILD.slotChildNodesFix) {\n patchChildSlotNodes(HostElement.prototype, cmpMeta);\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNode(HostElement.prototype);\n }\n if (BUILD.appendChildSlotFix) {\n patchSlotAppendChild(HostElement.prototype);\n }\n if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n patchTextContent(HostElement.prototype);\n }\n }\n // if the component is formAssociated we need to set that on the host\n // element so that it will be ready for `attachInternals` to be called on\n // it later on\n if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* CMP_FLAGS.formAssociated */) {\n HostElement.formAssociated = true;\n }\n if (BUILD.hotModuleReplacement) {\n // if we're in an HMR dev build then we need to set up the callback\n // which will carry out the work of actually replacing the module for\n // this particular component\n HostElement.prototype['s-hmr'] = function (hmrVersionId) {\n hmrStart(this, cmpMeta, hmrVersionId);\n };\n }\n cmpMeta.$lazyBundleId$ = lazyBundle[0];\n if (!exclude.includes(tagName) && !customElements.get(tagName)) {\n cmpTags.push(tagName);\n customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));\n }\n });\n });\n // Only bother generating CSS if we have components\n // TODO(STENCIL-1118): Add test cases for CSS content based on conditionals\n if (cmpTags.length > 0) {\n // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM\n if (hasSlotRelocation) {\n dataStyles.textContent += SLOT_FB_CSS;\n }\n // Add hydration styles\n if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {\n dataStyles.textContent += cmpTags + HYDRATED_CSS;\n }\n // If we have styles, add them to the DOM\n if (dataStyles.innerHTML.length) {\n dataStyles.setAttribute('data-styles', '');\n // Apply CSP nonce to the style tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n dataStyles.setAttribute('nonce', nonce);\n }\n // Insert the styles into the document head\n // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied\n head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);\n }\n }\n // Process deferred connectedCallbacks now all components have been registered\n isBootstrapping = false;\n if (deferredConnectedCallbacks.length) {\n deferredConnectedCallbacks.map((host) => host.connectedCallback());\n }\n else {\n if (BUILD.profile) {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));\n }\n else {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));\n }\n }\n // Fallback appLoad event\n endBootstrap();\n};\nconst Fragment = (_, children) => children;\nconst addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {\n if (BUILD.hostListener && listeners) {\n // this is called immediately within the element's constructor\n // initialize our event listeners on the host element\n // we do this now so that we can listen to events that may\n // have fired even before the instance is ready\n if (BUILD.hostListenerTargetParent) {\n // this component may have event listeners that should be attached to the parent\n if (attachParentListeners) {\n // this is being ran from within the connectedCallback\n // which is important so that we know the host element actually has a parent element\n // filter out the listeners to only have the ones that ARE being attached to the parent\n listeners = listeners.filter(([flags]) => flags & 32 /* LISTENER_FLAGS.TargetParent */);\n }\n else {\n // this is being ran from within the component constructor\n // everything BUT the parent element listeners should be attached at this time\n // filter out the listeners that are NOT being attached to the parent\n listeners = listeners.filter(([flags]) => !(flags & 32 /* LISTENER_FLAGS.TargetParent */));\n }\n }\n listeners.map(([flags, name, method]) => {\n const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;\n const handler = hostListenerProxy(hostRef, method);\n const opts = hostListenerOpts(flags);\n plt.ael(target, name, handler, opts);\n (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));\n });\n }\n};\nconst hostListenerProxy = (hostRef, methodName) => (ev) => {\n try {\n if (BUILD.lazyLoad) {\n if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {\n // instance is ready, let's call it's member method for this event\n hostRef.$lazyInstance$[methodName](ev);\n }\n else {\n (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);\n }\n }\n else {\n hostRef.$hostElement$[methodName](ev);\n }\n }\n catch (e) {\n consoleError(e);\n }\n};\nconst getHostListenerTarget = (elm, flags) => {\n if (BUILD.hostListenerTargetDocument && flags & 4 /* LISTENER_FLAGS.TargetDocument */)\n return doc;\n if (BUILD.hostListenerTargetWindow && flags & 8 /* LISTENER_FLAGS.TargetWindow */)\n return win;\n if (BUILD.hostListenerTargetBody && flags & 16 /* LISTENER_FLAGS.TargetBody */)\n return doc.body;\n if (BUILD.hostListenerTargetParent && flags & 32 /* LISTENER_FLAGS.TargetParent */)\n return elm.parentElement;\n return elm;\n};\n// prettier-ignore\nconst hostListenerOpts = (flags) => supportsListenerOptions\n ? ({\n passive: (flags & 1 /* LISTENER_FLAGS.Passive */) !== 0,\n capture: (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0,\n })\n : (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;\n/**\n * Assigns the given value to the nonce property on the runtime platform object.\n * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.\n * @param nonce The value to be assigned to the platform nonce property.\n * @returns void\n */\nconst setNonce = (nonce) => (plt.$nonce$ = nonce);\nconst setPlatformOptions = (opts) => Object.assign(plt, opts);\n/**\n * Updates the DOM generated on the server with annotations such as node attributes and\n * comment nodes to facilitate future client-side hydration. These annotations are used for things\n * like moving elements back to their original hosts if using Shadow DOM on the client, and for quickly\n * reconstructing the vNode representations of the DOM.\n *\n * @param doc The DOM generated by the server.\n * @param staticComponents Any components that should be considered static and do not need client-side hydration.\n */\nconst insertVdomAnnotations = (doc, staticComponents) => {\n if (doc != null) {\n const docData = {\n hostIds: 0,\n rootLevelIds: 0,\n staticComponents: new Set(staticComponents),\n };\n const orgLocationNodes = [];\n parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);\n orgLocationNodes.forEach((orgLocationNode) => {\n var _a, _b;\n if (orgLocationNode != null && orgLocationNode['s-nr']) {\n const nodeRef = orgLocationNode['s-nr'];\n let hostId = nodeRef['s-host-id'];\n let nodeId = nodeRef['s-node-id'];\n let childId = `${hostId}.${nodeId}`;\n if (hostId == null) {\n hostId = 0;\n docData.rootLevelIds++;\n nodeId = docData.rootLevelIds;\n childId = `${hostId}.${nodeId}`;\n if (nodeRef.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (nodeRef.nodeType === 3 /* NODE_TYPE.TextNode */) {\n if (hostId === 0) {\n const textContent = (_a = nodeRef.nodeValue) === null || _a === void 0 ? void 0 : _a.trim();\n if (textContent === '') {\n // useless whitespace node at the document root\n orgLocationNode.remove();\n return;\n }\n }\n const commentBeforeTextNode = doc.createComment(childId);\n commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;\n (_b = nodeRef.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(commentBeforeTextNode, nodeRef);\n }\n }\n let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;\n const orgLocationParentNode = orgLocationNode.parentElement;\n if (orgLocationParentNode) {\n if (orgLocationParentNode['s-en'] === '') {\n // ending with a \".\" means that the parent element\n // of this node's original location is a SHADOW dom element\n // and this node is apart of the root level light dom\n orgLocationNodeId += `.`;\n }\n else if (orgLocationParentNode['s-en'] === 'c') {\n // ending with a \".c\" means that the parent element\n // of this node's original location is a SCOPED element\n // and this node is apart of the root level light dom\n orgLocationNodeId += `.c`;\n }\n }\n orgLocationNode.nodeValue = orgLocationNodeId;\n }\n });\n }\n};\n/**\n * Recursively parses a node generated by the server and its children to set host and child id\n * attributes read during client-side hydration. This function also tracks whether each node is\n * an original location reference node meaning that a node has been moved via slot relocation.\n *\n * @param doc The DOM generated by the server.\n * @param node The node to parse.\n * @param docData An object containing metadata about the document.\n * @param orgLocationNodes An array of nodes that have been moved via slot relocation.\n */\nconst parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {\n if (node == null) {\n return;\n }\n if (node['s-nr'] != null) {\n orgLocationNodes.push(node);\n }\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n node.childNodes.forEach((childNode) => {\n const hostRef = getHostRef(childNode);\n if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {\n const cmpData = {\n nodeIds: 0,\n };\n insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);\n }\n parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);\n });\n }\n};\n/**\n * Insert attribute annotations on an element for its host ID and, potentially, its child ID.\n * Also makes calls to insert annotations on the element's children, keeping track of the depth of\n * the component tree.\n *\n * @param doc The DOM generated by the server.\n * @param hostElm The element to insert annotations for.\n * @param vnode The vNode representation of the element.\n * @param docData An object containing metadata about the document.\n * @param cmpData An object containing metadata about the component.\n */\nconst insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {\n if (vnode != null) {\n const hostId = ++docData.hostIds;\n hostElm.setAttribute(HYDRATE_ID, hostId);\n if (hostElm['s-cr'] != null) {\n hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;\n }\n if (vnode.$children$ != null) {\n const depth = 0;\n vnode.$children$.forEach((vnodeChild, index) => {\n insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);\n });\n }\n // If this element does not already have a child ID and has a sibling comment node\n // representing a slot, we use the content of the comment to set the child ID attribute\n // on the host element.\n if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {\n const parent = hostElm.parentElement;\n if (parent && parent.childNodes) {\n const parentChildNodes = Array.from(parent.childNodes);\n const comment = parentChildNodes.find((node) => node.nodeType === 8 /* NODE_TYPE.CommentNode */ && node['s-sr']);\n if (comment) {\n const index = parentChildNodes.indexOf(hostElm) - 1;\n vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);\n }\n }\n }\n }\n};\n/**\n * Recursively analyzes the type of a child vNode and inserts annotations on the vNodes's element based on its type.\n * Element nodes receive a child ID attribute, text nodes have a comment with the child ID inserted before them,\n * and comment nodes representing a slot have their node value set to a slot node ID containing the child ID.\n *\n * @param doc The DOM generated by the server.\n * @param vnodeChild The vNode to insert annotations for.\n * @param cmpData An object containing metadata about the component.\n * @param hostId The host ID of this element's parent.\n * @param depth How deep this element sits in the component tree relative to its parent.\n * @param index The index of this element in its parent's children array.\n */\nconst insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {\n const childElm = vnodeChild.$elm$;\n if (childElm == null) {\n return;\n }\n const nodeId = cmpData.nodeIds++;\n const childId = `${hostId}.${nodeId}.${depth}.${index}`;\n childElm['s-host-id'] = hostId;\n childElm['s-node-id'] = nodeId;\n if (childElm.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n childElm.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (childElm.nodeType === 3 /* NODE_TYPE.TextNode */) {\n const parentNode = childElm.parentNode;\n const nodeName = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName;\n if (nodeName !== 'STYLE' && nodeName !== 'SCRIPT') {\n const textNodeId = `${TEXT_NODE_ID}.${childId}`;\n const commentBeforeTextNode = doc.createComment(textNodeId);\n parentNode === null || parentNode === void 0 ? void 0 : parentNode.insertBefore(commentBeforeTextNode, childElm);\n }\n }\n else if (childElm.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n if (childElm['s-sr']) {\n const slotName = childElm['s-sn'] || '';\n const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;\n childElm.nodeValue = slotNodeId;\n }\n }\n if (vnodeChild.$children$ != null) {\n // Increment depth each time we recur deeper into the tree\n const childDepth = depth + 1;\n vnodeChild.$children$.forEach((vnode, index) => {\n insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);\n });\n }\n};\nvar _a;\n/**\n * A WeakMap mapping runtime component references to their corresponding host reference\n * instances.\n *\n * **Note**: If we're in an HMR context we need to store a reference to this\n * value on `window` in order to maintain the mapping of {@link d.RuntimeRef}\n * to {@link d.HostRef} across HMR updates.\n *\n * This is necessary because when HMR updates for a component are processed by\n * the browser-side dev server client the JS bundle for that component is\n * re-fetched. Since the module containing {@link hostRefs} is included in\n * that bundle, if we do not store a reference to it the new iteration of the\n * component will not have access to the previous hostRef map, leading to a\n * bug where the new version of the component cannot properly initialize.\n */\nconst hostRefs = BUILD.hotModuleReplacement\n ? ((_a = window).__STENCIL_HOSTREFS__ || (_a.__STENCIL_HOSTREFS__ = new WeakMap()))\n : new WeakMap();\n/**\n * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}\n *\n * @param ref the runtime ref of interest\n * @returns the Host reference (if found) or undefined\n */\nconst getHostRef = (ref) => hostRefs.get(ref);\n/**\n * Register a lazy instance with the {@link hostRefs} object so it's\n * corresponding {@link d.HostRef} can be retrieved later.\n *\n * @param lazyInstance the lazy instance of interest\n * @param hostRef that instances `HostRef` object\n * @returns a reference to the host ref WeakMap\n */\nconst registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);\n/**\n * Register a host element for a Stencil component, setting up various metadata\n * and callbacks based on {@link BUILD} flags as well as the component's runtime\n * metadata.\n *\n * @param hostElement the host element to register\n * @param cmpMeta runtime metadata for that component\n * @returns a reference to the host ref WeakMap\n */\nconst registerHost = (hostElement, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: hostElement,\n $cmpMeta$: cmpMeta,\n $instanceValues$: new Map(),\n };\n if (BUILD.isDev) {\n hostRef.$renderCount$ = 0;\n }\n if (BUILD.method && BUILD.lazyLoad) {\n hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));\n }\n if (BUILD.asyncLoading) {\n hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));\n hostElement['s-p'] = [];\n hostElement['s-rc'] = [];\n }\n addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$, false);\n return hostRefs.set(hostElement, hostRef);\n};\nconst isMemberInElement = (elm, memberName) => memberName in elm;\nconst consoleError = (e, el) => (customError || console.error)(e, el);\nconst STENCIL_DEV_MODE = BUILD.isTesting\n ? ['STENCIL:'] // E2E testing\n : [\n '%cstencil',\n 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',\n ];\nconst consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);\nconst consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);\nconst consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);\nconst setErrorHandler = (handler) => (customError = handler);\nconst cmpModules = /*@__PURE__*/ new Map();\nconst loadModule = (cmpMeta, hostRef, hmrVersionId) => {\n // loadModuleImport\n const exportName = cmpMeta.$tagName$.replace(/-/g, '_');\n const bundleId = cmpMeta.$lazyBundleId$;\n if (BUILD.isDev && typeof bundleId !== 'string') {\n consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode \"${hostRef.$modeName$}\", but it does not exist.`);\n return undefined;\n }\n const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;\n if (module) {\n return module[exportName];\n }\n /*!__STENCIL_STATIC_IMPORT_SWITCH__*/\n return import(\n /* @vite-ignore */\n /* webpackInclude: /\\.entry\\.js$/ */\n /* webpackExclude: /\\.system\\.entry\\.js$/ */\n /* webpackMode: \"lazy\" */\n `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then((importedModule) => {\n if (!BUILD.hotModuleReplacement) {\n cmpModules.set(bundleId, importedModule);\n }\n return importedModule[exportName];\n }, consoleError);\n};\nconst styles = /*@__PURE__*/ new Map();\nconst modeResolutionChain = [];\nconst win = typeof window !== 'undefined' ? window : {};\nconst doc = win.document || { head: {} };\nconst H = (win.HTMLElement || class {\n});\nconst plt = {\n $flags$: 0,\n $resourcesUrl$: '',\n jmp: (h) => h(),\n raf: (h) => requestAnimationFrame(h),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts),\n};\nconst setPlatformHelpers = (helpers) => {\n Object.assign(plt, helpers);\n};\nconst supportsShadow = \n// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\nBUILD.shadowDomShim && BUILD.shadowDom\n ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()\n : true;\nconst supportsListenerOptions = /*@__PURE__*/ (() => {\n let supportsListenerOptions = false;\n try {\n doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {\n get() {\n supportsListenerOptions = true;\n },\n }));\n }\n catch (e) { }\n return supportsListenerOptions;\n})();\nconst promiseResolve = (v) => Promise.resolve(v);\nconst supportsConstructableStylesheets = BUILD.constructableCSS\n ? /*@__PURE__*/ (() => {\n try {\n new CSSStyleSheet();\n return typeof new CSSStyleSheet().replaceSync === 'function';\n }\n catch (e) { }\n return false;\n })()\n : false;\nconst queueDomReads = [];\nconst queueDomWrites = [];\nconst queueDomWritesLow = [];\nconst queueTask = (queue, write) => (cb) => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {\n nextTick(flush);\n }\n else {\n plt.raf(flush);\n }\n }\n};\nconst consume = (queue) => {\n for (let i = 0; i < queue.length; i++) {\n try {\n queue[i](performance.now());\n }\n catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nconst consumeTimeout = (queue, timeout) => {\n let i = 0;\n let ts = 0;\n while (i < queue.length && (ts = performance.now()) < timeout) {\n try {\n queue[i++](ts);\n }\n catch (e) {\n consoleError(e);\n }\n }\n if (i === queue.length) {\n queue.length = 0;\n }\n else if (i !== 0) {\n queue.splice(0, i);\n }\n};\nconst flush = () => {\n if (BUILD.asyncQueue) {\n queueCongestion++;\n }\n // always force a bunch of medium callbacks to run, but still have\n // a throttle on how many can run in a certain time\n // DOM READS!!!\n consume(queueDomReads);\n // DOM WRITES!!!\n if (BUILD.asyncQueue) {\n const timeout = (plt.$flags$ & 6 /* PLATFORM_FLAGS.queueMask */) === 2 /* PLATFORM_FLAGS.appLoaded */\n ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))\n : Infinity;\n consumeTimeout(queueDomWrites, timeout);\n consumeTimeout(queueDomWritesLow, timeout);\n if (queueDomWrites.length > 0) {\n queueDomWritesLow.push(...queueDomWrites);\n queueDomWrites.length = 0;\n }\n if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n else {\n queueCongestion = 0;\n }\n }\n else {\n consume(queueDomWrites);\n if ((queuePending = queueDomReads.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n }\n};\nconst nextTick = (cb) => promiseResolve().then(cb);\nconst readTask = /*@__PURE__*/ queueTask(queueDomReads, false);\nconst writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);\nexport { BUILD, Env, NAMESPACE } from '@stencil/core/internal/app-data';\nexport { Build, Fragment, H, H as HTMLElement, Host, STENCIL_DEV_MODE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setPlatformOptions, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };\n"],"mappings":"AAAO,MAAMA,EAAY,WCQzB,IAAIC,EAEJ,IAAIC,EAGJ,IAAIC,EAAqB,MAGzB,IAAIC,EAAY,MAGhB,IAAIC,EAAe,MAgBnB,MAAMC,EAAa,CAACC,EAAQC,EAAU,MAQ7B,CACD,MAAO,MAGf,GAEA,MAAMC,EAAa,CAACC,EAAKC,KAWhB,CACD,MAAO,MAGf,GAgEA,MAAMC,EAAe,mDAOrB,MAAMC,EAAc,yDACpB,MAAMC,EAAW,+BAcjB,MAAMC,EAAY,GAIlB,MAAMC,EAAS,6BACf,MAAMC,EAAU,+BAChB,MAAMC,EAASC,GAAMA,GAAK,KAQ1B,MAAMC,EAAiBC,IAEnBA,SAAWA,EACX,OAAOA,IAAM,UAAYA,IAAM,UAAU,EAU7C,SAASC,EAAyBC,GAC9B,IAAIC,EAAIC,EAAIC,EACZ,OAAQA,GAAMD,GAAMD,EAAKD,EAAII,QAAU,MAAQH,SAAY,OAAS,EAAIA,EAAGI,cAAc,6BAA+B,MAAQH,SAAY,OAAS,EAAIA,EAAGI,aAAa,cAAgB,MAAQH,SAAY,EAAIA,EAAKI,SAC1N,CAWK,MAACC,EAAI,CAACC,EAAUC,KAAcC,KAC/B,IAAIC,EAAQ,KACZ,IAAIzB,EAAM,KAEV,IAAI0B,EAAS,MACb,IAAIC,EAAa,MACjB,MAAMC,EAAgB,GACtB,MAAMC,EAAQC,IACV,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAEE,OAAQD,IAAK,CAC/BN,EAAQK,EAAEC,GACV,GAAIE,MAAMC,QAAQT,GAAQ,CACtBI,EAAKJ,EACrB,MACiB,GAAIA,GAAS,aAAeA,IAAU,UAAW,CAClD,GAAKC,SAAgBJ,IAAa,aAAeZ,EAAce,GAAS,CACpEA,EAAQU,OAAOV,EACnC,CAMgB,GAAIC,GAAUC,EAAY,CAEtBC,EAAcA,EAAcI,OAAS,GAAGI,GAAUX,CACtE,KACqB,CAEDG,EAAcS,KAAKX,EAASY,EAAS,KAAMb,GAASA,EACxE,CACgBE,EAAaD,CAC7B,CACA,GAEIG,EAAKL,GACL,GAAID,EAAW,CAIX,GAAqBA,EAAUvB,IAAK,CAChCA,EAAMuB,EAAUvB,GAC5B,CAK6B,CACjB,MAAMuC,EAAYhB,EAAUiB,WAAajB,EAAUkB,MACnD,GAAIF,EAAW,CACXhB,EAAUkB,aACCF,IAAc,SACfA,EACAG,OAAOC,KAAKJ,GACTK,QAAQC,GAAMN,EAAUM,KACxBC,KAAK,IAClC,CACA,CACA,CAMI,UAAmCxB,IAAa,WAAY,CAExD,OAAOA,EAASC,IAAc,KAAO,GAAKA,EAAWK,EAAemB,EAC5E,CACI,MAAMC,EAAQV,EAAShB,EAAU,MACjC0B,EAAMC,EAAU1B,EAChB,GAAIK,EAAcI,OAAS,EAAG,CAC1BgB,EAAME,EAAatB,CAC3B,CACuB,CACfoB,EAAMG,EAAQnD,CACtB,CAII,OAAOgD,CAAK,EAUhB,MAAMV,EAAW,CAACc,EAAKC,KACnB,MAAML,EAAQ,CACVM,EAAS,EACTC,EAAOH,EACPhB,EAAQiB,EACRG,EAAO,KACPN,EAAY,MAES,CACrBF,EAAMC,EAAU,IACxB,CACuB,CACfD,EAAMG,EAAQ,IACtB,CAII,OAAOH,CAAK,EAEX,MAACS,EAAO,GAOb,MAAMC,EAAUC,GAASA,GAAQA,EAAKJ,IAAUE,EAQhD,MAAMV,EAAc,CAChBa,QAAS,CAACpC,EAAUqC,IAAOrC,EAASsC,IAAIC,GAAiBH,QAAQC,GACjEC,IAAK,CAACtC,EAAUqC,IAAOrC,EAASsC,IAAIC,GAAiBD,IAAID,GAAIC,IAAIE,IASrE,MAAMD,EAAmBJ,IAAI,CACzBM,OAAQN,EAAKV,EACbiB,UAAWP,EAAKT,EAChBiB,KAAMR,EAAKR,EACXiB,MAAOT,EAAKU,EACZC,KAAMX,EAAKJ,EACXgB,MAAOZ,EAAKvB,IAWhB,MAAM4B,EAAoBL,IACtB,UAAWA,EAAKW,OAAS,WAAY,CACjC,MAAM/C,EAAYmB,OAAO8B,OAAO,GAAIb,EAAKM,QACzC,GAAIN,EAAKQ,KAAM,CACX5C,EAAUvB,IAAM2D,EAAKQ,IACjC,CACQ,GAAIR,EAAKS,MAAO,CACZ7C,EAAUkD,KAAOd,EAAKS,KAClC,CACQ,OAAO/C,EAAEsC,EAAKW,KAAM/C,KAAeoC,EAAKO,WAAa,GAC7D,CACI,MAAMlB,EAAQV,EAASqB,EAAKW,KAAMX,EAAKY,OACvCvB,EAAMC,EAAUU,EAAKM,OACrBjB,EAAME,EAAaS,EAAKO,UACxBlB,EAAMG,EAAQQ,EAAKQ,KACnBnB,EAAMqB,EAASV,EAAKS,MACpB,OAAOpB,CAAK,EAkShB,MAAM0B,EAAqB,CAACC,EAAWC,KAEnC,GAAID,GAAa,OAASjE,EAAciE,GAAY,CAChD,GAAyBC,EAAW,EAA8B,CAG9D,OAAOD,IAAc,QAAU,MAAQA,IAAc,MAAQA,CACzE,CACQ,GAAwBC,EAAW,EAA6B,CAE5D,OAAOC,WAAWF,EAC9B,CACQ,GAAwBC,EAAW,EAA6B,CAG5D,OAAOzC,OAAOwC,EAC1B,CAEQ,OAAOA,CACf,CAGI,OAAOA,CAAS,EAEf,MAACG,EAAcC,GAA0BC,GAAWD,GAAwB,cAC5E,MAACE,EAAc,CAACF,EAAKN,EAAMS,KAC5B,MAAMC,EAAML,EAAWC,GACvB,MAAO,CACHK,KAAOC,GAIIC,EAAUH,EAAKV,EAAM,CACxBc,WAAYL,EAAQ,GACpBM,YAAaN,EAAQ,GACrBO,cAAeP,EAAQ,GACvBG,WAGX,EASL,MAAMC,EAAY,CAACH,EAAKV,EAAMiB,KAC1B,MAAMC,EAAKC,GAAIC,GAAGpB,EAAMiB,GACxBP,EAAIW,cAAcH,GAClB,OAAOA,CAAE,EAEb,MAAMI,EAAkC,IAAIC,QAC5C,MAAMC,EAAgB,CAAC1G,EAAS2G,EAASC,KACrC,IAAIC,EAAQC,GAAOC,IAAI/G,GACvB,GAAIgH,IAAoCJ,EAAS,CAC7CC,EAASA,GAAS,IAAII,cACtB,UAAWJ,IAAU,SAAU,CAC3BA,EAAQF,CACpB,KACa,CACDE,EAAMK,YAAYP,EAC9B,CACA,KACS,CACDE,EAAQF,CAChB,CACIG,GAAOK,IAAInH,EAAS6G,EAAM,EAE9B,MAAMO,EAAW,CAACC,EAAoBC,EAASC,KAC3C,IAAIhG,EACJ,MAAMvB,EAAUwH,EAAWF,GAC3B,MAAMT,EAAQC,GAAOC,IAAI/G,GAMzBqH,EAAqBA,EAAmBI,WAAa,GAAsCJ,EAAqB/F,GAChH,GAAIuF,EAAO,CACP,UAAWA,IAAU,SAAU,CAC3BQ,EAAqBA,EAAmB3F,MAAQ2F,EAChD,IAAIK,EAAgBlB,EAAkBO,IAAIM,GAC1C,IAAIM,EACJ,IAAKD,EAAe,CAChBlB,EAAkBW,IAAIE,EAAqBK,EAAgB,IAAIE,IAC/E,CACY,IAAKF,EAAcG,IAAI7H,GAAU,CAOxB,CACD2H,EAAWrG,GAAIwG,cAAc,SAC7BH,EAASI,UAAYlB,EAErB,MAAMmB,GAASzG,EAAK8E,GAAI4B,KAAa,MAAQ1G,SAAY,EAAIA,EAAKF,EAAyBC,IAC3F,GAAI0G,GAAS,KAAM,CACfL,EAASO,aAAa,QAASF,EACvD,CAIoBX,EAAmBc,aAAaR,EAAUN,EAAmB1F,cAAc,QAC/F,CAEgB,GAAI2F,EAAQvD,EAAU,EAAqC,CACvD4D,EAASI,WAAanH,CAC1C,CACgB,GAAI8G,EAAe,CACfA,EAAcU,IAAIpI,EACtC,CACA,CACA,MACa,IAA+BqH,EAAmBgB,mBAAmBC,SAASzB,GAAQ,CACvFQ,EAAmBgB,mBAAqB,IAAIhB,EAAmBgB,mBAAoBxB,EAC/F,CACA,CACI,OAAO7G,CAAO,EAElB,MAAMuI,EAAgBC,IAClB,MAAMlB,EAAUkB,EAAQC,EACxB,MAAM7C,EAAM4C,EAAQE,cACpB,MAAM/C,EAAQ2B,EAAQvD,EACtB,MAAM4E,EAAkBtI,EAAW,eAAgBiH,EAAQsB,GAC3D,MAAM5I,EAAUoH,EAA8CxB,EAAIiD,WAAajD,EAAIiD,WAAajD,EAAIkD,cAAexB,GACnH,GAAiE3B,EAAQ,GAA6C,CAQlHC,EAAI,QAAU5F,EACd4F,EAAImD,UAAUX,IAAIpI,EAAU,KAIpC,CACI2I,GAAiB,EAErB,MAAMnB,EAAa,CAACwB,EAAKzB,IAAS,MAAuGyB,EAAa,EAyBtJ,MAAMC,EAAc,CAACrD,EAAKsD,EAAYC,EAAUC,EAAUC,EAAO1D,KAC7D,GAAIwD,IAAaC,EAAU,CACvB,IAAIE,EAASC,GAAkB3D,EAAKsD,GACpC,IAAIM,EAAKN,EAAWO,cACpB,GAAuBP,IAAe,QAAS,CAC3C,MAAMH,EAAYnD,EAAImD,UACtB,MAAMW,EAAaC,EAAeR,GAClC,MAAMS,EAAaD,EAAeP,GAClCL,EAAUc,UAAUH,EAAWrG,QAAQd,GAAMA,IAAMqH,EAAWtB,SAAS/F,MACvEwG,EAAUX,OAAOwB,EAAWvG,QAAQd,GAAMA,IAAMmH,EAAWpB,SAAS/F,KAChF,MACa,GAAuB2G,IAAe,QAAS,CAE3B,CACjB,IAAK,MAAMY,KAAQX,EAAU,CACzB,IAAKC,GAAYA,EAASU,IAAS,KAAM,CACrC,GAAgCA,EAAKxB,SAAS,KAAM,CAChD1C,EAAIiB,MAAMkD,eAAeD,EACrD,KAC6B,CACDlE,EAAIiB,MAAMiD,GAAQ,EAC9C,CACA,CACA,CACA,CACY,IAAK,MAAMA,KAAQV,EAAU,CACzB,IAAKD,GAAYC,EAASU,KAAUX,EAASW,GAAO,CAChD,GAAgCA,EAAKxB,SAAS,KAAM,CAChD1C,EAAIiB,MAAMmD,YAAYF,EAAMV,EAASU,GAC7D,KACyB,CACDlE,EAAIiB,MAAMiD,GAAQV,EAASU,EACnD,CACA,CACA,CACA,MACa,GAAqBZ,IAAe,YAEpC,GAAqBA,IAAe,MAAO,CAE5C,GAAIE,EAAU,CACVA,EAASxD,EACzB,CACA,MACa,IACkB0D,GACnBJ,EAAW,KAAO,KAClBA,EAAW,KAAO,IAAK,CAKvB,GAAIA,EAAW,KAAO,IAAK,CAQvBA,EAAaA,EAAWe,MAAM,EAC9C,MACiB,GAAIV,GAAkBW,GAAKV,GAAK,CAKjCN,EAAaM,EAAGS,MAAM,EACtC,KACiB,CAMDf,EAAaM,EAAG,GAAKN,EAAWe,MAAM,EACtD,CACY,GAAId,GAAYC,EAAU,CAItB,MAAMe,EAAUjB,EAAWkB,SAASC,GAEpCnB,EAAaA,EAAWoB,QAAQC,EAAqB,IACrD,GAAIpB,EAAU,CACV9C,GAAImE,IAAI5E,EAAKsD,EAAYC,EAAUgB,EACvD,CACgB,GAAIf,EAAU,CACV/C,GAAIoE,IAAI7E,EAAKsD,EAAYE,EAAUe,EACvD,CACA,CACA,KACuC,CAE3B,MAAMO,EAAYvJ,EAAciI,GAChC,IAAKE,GAAWoB,GAAatB,IAAa,QAAWC,EAAO,CACxD,IACI,IAAKzD,EAAIrF,QAAQ+H,SAAS,KAAM,CAC5B,MAAMqC,EAAIvB,GAAY,KAAO,GAAKA,EAElC,GAAIF,IAAe,OAAQ,CACvBI,EAAS,KACrC,MAC6B,GAAIH,GAAY,MAAQvD,EAAIsD,IAAeyB,EAAG,CAC/C/E,EAAIsD,GAAcyB,CAC9C,CACA,KACyB,CACD/E,EAAIsD,GAAcE,CAC1C,CACA,CACgB,MAAOwB,GAIvB,CACA,CAQY,IAAIC,EAAQ,MACS,CACjB,GAAIrB,KAAQA,EAAKA,EAAGc,QAAQ,YAAa,KAAM,CAC3CpB,EAAaM,EACbqB,EAAQ,IAC5B,CACA,CACY,GAAIzB,GAAY,MAAQA,IAAa,MAAO,CACxC,GAAIA,IAAa,OAASxD,EAAIhE,aAAasH,KAAgB,GAAI,CAC3D,GAAuB2B,EAAO,CAC1BjF,EAAIkF,kBAAkBjK,EAAUqI,EACxD,KACyB,CACDtD,EAAImF,gBAAgB7B,EAC5C,CACA,CACA,MACiB,KAAMI,GAAU3D,EAAQ,GAA8B0D,KAAWqB,EAAW,CAC7EtB,EAAWA,IAAa,KAAO,GAAKA,EACpC,GAAuByB,EAAO,CAC1BjF,EAAIoF,eAAenK,EAAUqI,EAAYE,EAC7D,KACqB,CACDxD,EAAIsC,aAAagB,EAAYE,EACjD,CACA,CACA,CACA,GAEA,MAAM6B,EAAsB,KAM5B,MAAMtB,EAAkBuB,IAAYA,EAAQ,GAAKA,EAAMC,MAAMF,GAC7D,MAAMZ,EAAuB,UAC7B,MAAME,EAAsB,IAAIa,OAAOf,EAAuB,KAC9D,MAAMgB,EAAgB,CAACC,EAAUC,EAAUpL,EAAW+I,KAIlD,MAAMtD,EAAM2F,EAAStH,EAAMwD,WAAa,IAAuC8D,EAAStH,EAAMuH,KACxFD,EAAStH,EAAMuH,KACfD,EAAStH,EACf,MAAMwH,EAAiBH,GAAYA,EAAS5H,GAAY5C,EACxD,MAAM4K,EAAgBH,EAAS7H,GAAW5C,EACrB,CAEjB,IAAKoI,KAAcuC,EAAe,CAC9B,KAAMvC,KAAcwC,GAAgB,CAChCzC,EAAYrD,EAAKsD,EAAYuC,EAAcvC,GAAarH,UAAW1B,EAAWoL,EAASxH,EACvG,CACA,CACA,CAEI,IAAKmF,KAAcwC,EAAe,CAC9BzC,EAAYrD,EAAKsD,EAAYuC,EAAcvC,GAAawC,EAAcxC,GAAa/I,EAAWoL,EAASxH,EAC/G,GAYA,MAAM4H,EAAY,CAACC,EAAgBC,EAAgBC,EAAYC,KAE3D,MAAMhJ,EAAW8I,EAAelI,EAAWmI,GAC3C,IAAItJ,EAAI,EACR,IAAIoD,EACJ,IAAIoG,EAoBJ,GAAsBjJ,EAASF,IAAW,KAAM,CAE5C+C,EAAM7C,EAASkB,EAAQ3C,GAAI2K,eAAelJ,EAASF,EAC3D,KAMS,CACD,IAAkB1C,EAAW,CACzBA,EAAY4C,EAASiB,IAAU,KAC3C,CAEQ4B,EAAM7C,EAASkB,EACT3C,GAAI4K,gBAAgB/L,EAAYY,EAASC,EAErC+B,EAASiB,GAInB,GAAiB7D,GAAa4C,EAASiB,IAAU,gBAAiB,CAC9D7D,EAAY,KACxB,CAEiC,CACrBkL,EAAc,KAAMtI,EAAU5C,EAC1C,CACQ,GAAyCc,EAAMjB,IAAY4F,EAAI,UAAY5F,EAAS,CAGhF4F,EAAImD,UAAUX,IAAKxC,EAAI,QAAU5F,EAC7C,CACQ,GAAI+C,EAASY,EAAY,CACrB,IAAKnB,EAAI,EAAGA,EAAIO,EAASY,EAAWlB,SAAUD,EAAG,CAE7CwJ,EAAYL,EAAUC,EAAgB7I,EAAUP,GAEhD,GAAIwJ,EAAW,CAEXpG,EAAIuG,YAAYH,EACpC,CACA,CACA,CACuB,CACX,GAAIjJ,EAASiB,IAAU,MAAO,CAE1B7D,EAAY,KAC5B,MACiB,GAAIyF,EAAIrF,UAAY,gBAAiB,CAEtCJ,EAAY,IAC5B,CACA,CACA,CAGIyF,EAAI,QAAU3F,EAyBd,OAAO2F,CAAG,EAsEd,MAAMwG,EAAY,CAACL,EAAWM,EAAQC,EAAaC,EAAQC,EAAUC,KACjE,IAAIC,EAAY,EAChB,IAAIV,EACJ,GAAuBU,EAAa7D,YAAc6D,EAAanM,UAAYN,EAAa,CACpFyM,EAAeA,EAAa7D,UACpC,CACI,KAAO2D,GAAYC,IAAUD,EAAU,CACnC,GAAID,EAAOC,GAAW,CAClBR,EAAYL,EAAU,KAAMW,EAAaE,GACzC,GAAIR,EAAW,CACXO,EAAOC,GAAUvI,EAAQ+H,EACzBU,EAAavE,aAAa6D,EAA0DK,EACpG,CACA,CACA,GAaA,MAAMM,EAAe,CAACJ,EAAQC,EAAUC,KACpC,IAAK,IAAIG,EAAQJ,EAAUI,GAASH,IAAUG,EAAO,CACjD,MAAMnJ,EAAQ8I,EAAOK,GACrB,GAAInJ,EAAO,CACP,MAAMmC,EAAMnC,EAAMQ,EAClB4I,EAAiBpJ,GACjB,GAAImC,EAAK,CAgBLA,EAAIiE,QACpB,CACA,CACA,GAuEA,MAAMiD,EAAiB,CAACf,EAAWgB,EAAOhK,EAAUiK,EAAOC,EAAkB,SACzE,IAAIC,EAAc,EAClB,IAAIC,EAAc,EAClB,IAAIC,EAAW,EACf,IAAI5K,EAAI,EACR,IAAI6K,EAAYN,EAAMtK,OAAS,EAC/B,IAAI6K,EAAgBP,EAAM,GAC1B,IAAIQ,EAAcR,EAAMM,GACxB,IAAIG,EAAYR,EAAMvK,OAAS,EAC/B,IAAIgL,EAAgBT,EAAM,GAC1B,IAAIU,EAAcV,EAAMQ,GACxB,IAAIpJ,EACJ,IAAIuJ,EACJ,MAAOT,GAAeG,GAAaF,GAAeK,EAAW,CACzD,GAAIF,GAAiB,KAAM,CAEvBA,EAAgBP,IAAQG,EACpC,MACa,GAAIK,GAAe,KAAM,CAC1BA,EAAcR,IAAQM,EAClC,MACa,GAAII,GAAiB,KAAM,CAC5BA,EAAgBT,IAAQG,EACpC,MACa,GAAIO,GAAe,KAAM,CAC1BA,EAAcV,IAAQQ,EAClC,MACa,GAAII,EAAYN,EAAeG,EAAeR,GAAkB,CAKjEY,EAAMP,EAAeG,EAAeR,GACpCK,EAAgBP,IAAQG,GACxBO,EAAgBT,IAAQG,EACpC,MACa,GAAIS,EAAYL,EAAaG,EAAaT,GAAkB,CAI7DY,EAAMN,EAAaG,EAAaT,GAChCM,EAAcR,IAAQM,GACtBK,EAAcV,IAAQQ,EAClC,MACa,GAAII,EAAYN,EAAeI,EAAaT,GAAkB,CAkB/DY,EAAMP,EAAeI,EAAaT,GAkBlClB,EAAU5D,aAAamF,EAAcrJ,EAAOsJ,EAAYtJ,EAAM6J,aAC9DR,EAAgBP,IAAQG,GACxBQ,EAAcV,IAAQQ,EAClC,MACa,GAAII,EAAYL,EAAaE,EAAeR,GAAkB,CAmB/DY,EAAMN,EAAaE,EAAeR,GAMlClB,EAAU5D,aAAaoF,EAAYtJ,EAAOqJ,EAAcrJ,GACxDsJ,EAAcR,IAAQM,GACtBI,EAAgBT,IAAQG,EACpC,KACa,CASDC,GAAY,EACO,CACf,IAAK5K,EAAI0K,EAAa1K,GAAK6K,IAAa7K,EAAG,CACvC,GAAIuK,EAAMvK,IAAMuK,EAAMvK,GAAGoB,IAAU,MAAQmJ,EAAMvK,GAAGoB,IAAU6J,EAAc7J,EAAO,CAC/EwJ,EAAW5K,EACX,KACxB,CACA,CACA,CACY,GAAqB4K,GAAY,EAAG,CAGhCO,EAAYZ,EAAMK,GAClB,GAAIO,EAAU3J,IAAUyJ,EAAczJ,EAAO,CAEzCI,EAAOuH,EAAUoB,GAASA,EAAMI,GAAcpK,EAAUqK,EAC5E,KACqB,CACDS,EAAMF,EAAWF,EAAeR,GAGhCF,EAAMK,GAAYvL,UAClBuC,EAAOuJ,EAAU1J,CACrC,CACgBwJ,EAAgBT,IAAQG,EACxC,KACiB,CAKD/I,EAAOuH,EAAUoB,GAASA,EAAMI,GAAcpK,EAAUoK,GACxDM,EAAgBT,IAAQG,EACxC,CACY,GAAI/I,EAAM,CAKD,CACDkJ,EAAcrJ,EAAM8J,WAAW5F,aAAa/D,EAAMkJ,EAAcrJ,EACpF,CACA,CACA,CACA,CACI,GAAIiJ,EAAcG,EAAW,CAEzBjB,EAAUL,EAAWiB,EAAMQ,EAAY,IAAM,KAAO,KAAOR,EAAMQ,EAAY,GAAGvJ,EAAOlB,EAAUiK,EAAOG,EAAaK,EAC7H,MACS,GAAuBL,EAAcK,EAAW,CAIjDb,EAAaI,EAAOG,EAAaG,EACzC,GAqBA,MAAMO,EAAc,CAACI,EAAWC,EAAYhB,EAAkB,SAG1D,GAAIe,EAAUhK,IAAUiK,EAAWjK,EAAO,CAStC,IAAsBiJ,EAAiB,CACnC,OAAOe,EAAUpK,IAAUqK,EAAWrK,CAClD,CACQ,OAAO,IACf,CACI,OAAO,KAAK,EAmBhB,MAAMiK,EAAQ,CAACK,EAAUnL,EAAUkK,EAAkB,SACjD,MAAMrH,EAAO7C,EAASkB,EAAQiK,EAASjK,EACvC,MAAMkK,EAAcD,EAASvK,EAC7B,MAAMyK,EAAcrL,EAASY,EAC7B,MAAME,EAAMd,EAASiB,EACrB,MAAMF,EAAOf,EAASF,EAEtB,GAAuBiB,IAAS,KAAM,CACnB,CAGX3D,EAAY0D,IAAQ,MAAQ,KAAOA,IAAQ,gBAAkB,MAAQ1D,CACjF,CACkD,CACtC,GAAkB0D,IAAQ,SAAW3D,OAMhC,CAIDmL,EAAc6C,EAAUnL,EAAU5C,EAClD,CACA,CACQ,GAAuBgO,IAAgB,MAAQC,IAAgB,KAAM,CAGjEtB,EAAelH,EAAKuI,EAAapL,EAAUqL,EAAanB,EACpE,MACa,GAAImB,IAAgB,KAAM,CAE3B,GAAyCF,EAASrL,IAAW,KAAM,CAE/D+C,EAAIyI,YAAc,EAClC,CAEYjC,EAAUxG,EAAK,KAAM7C,EAAUqL,EAAa,EAAGA,EAAY3L,OAAS,EAChF,MACa,GAAuB0L,IAAgB,KAAM,CAE9CxB,EAAawB,EAAa,EAAGA,EAAY1L,OAAS,EAC9D,CACQ,GAAiBtC,GAAa0D,IAAQ,MAAO,CACzC1D,EAAY,KACxB,CACA,MAKS,GAAsB+N,EAASrL,IAAWiB,EAAM,CAGjD8B,EAAI0I,KAAOxK,CACnB,GA0LA,MAAM+I,EAAoB0B,IACH,CACfA,EAAM7K,GAAW6K,EAAM7K,EAAQ8B,KAAO+I,EAAM7K,EAAQ8B,IAAI,MACxD+I,EAAM5K,GAAc4K,EAAM5K,EAAWY,IAAIsI,EACjD,GAeA,MAAM2B,EAAa,CAAChG,EAASiG,EAAiBC,EAAgB,SAE1D,MAAMC,EAAUnG,EAAQE,cACxB,MAAMpB,EAAUkB,EAAQC,EACxB,MAAMyF,EAAW1F,EAAQoG,GAAW7L,EAAS,KAAM,MAMnD,MAAM8L,EAAY1K,EAAOsK,GAAmBA,EAAkB3M,EAAE,KAAM,KAAM2M,GAC5ExO,EAAc0O,EAAQpO,QAgBtB,GAAqB+G,EAAQwH,EAAkB,CAC3CD,EAAUnL,EAAUmL,EAAUnL,GAAW,GACzC4D,EAAQwH,EAAiBvK,KAAI,EAAEwK,EAAUC,KAAgBH,EAAUnL,EAAQsL,GAAaL,EAAQI,IACxG,CAOI,GAAIL,GAAiBG,EAAUnL,EAAS,CACpC,IAAK,MAAMjD,KAAO0C,OAAOC,KAAKyL,EAAUnL,GAAU,CAS9C,GAAIiL,EAAQM,aAAaxO,KAAS,CAAC,MAAO,MAAO,QAAS,SAAS6H,SAAS7H,GAAM,CAC9EoO,EAAUnL,EAAQjD,GAAOkO,EAAQlO,EACjD,CACA,CACA,CACIoO,EAAU7K,EAAQ,KAClB6K,EAAU9K,GAAW,EACrByE,EAAQoG,EAAUC,EAClBA,EAAU5K,EAAQiK,EAASjK,EAA2B0K,EAAQ9F,YAAc8F,EACvC,CACjC3O,EAAU2O,EAAQ,OAC1B,CACIzO,GAAwCoH,EAAQvD,EAAU,KAA8C,EAOxG8J,EAAMK,EAAUW,EAAWH,EAAc,EA6H7C,MAAMQ,EAAmB,CAAC1G,EAAS2G,KAC/B,GAA0BA,IAAsB3G,EAAQ4G,GAAqBD,EAAkB,OAAQ,CACnGA,EAAkB,OAAOrM,KAAK,IAAIuM,SAASC,GAAO9G,EAAQ4G,EAAoBE,IACtF,GAEA,MAAMC,EAAiB,CAAC/G,EAASkG,KACW,CACpClG,EAAQzE,GAAW,EAC3B,CACI,GAA0ByE,EAAQzE,EAAU,EAAyC,CACjFyE,EAAQzE,GAAW,IACnB,MACR,CACImL,EAAiB1G,EAASA,EAAQgH,GAIlC,MAAMC,EAAW,IAAMC,EAAclH,EAASkG,GAC9C,OAAyBiB,GAAUF,EAAsB,EAY7D,MAAMC,EAAgB,CAAClH,EAASkG,KAE5B,MAAMkB,EAAcvP,EAAW,iBAAkBmI,EAAQC,EAAUG,GACnE,MAAMiH,EAA4BrH,EAAQsH,EAa1C,IAAIC,EACJ,GAAIrB,EAAe,CAC2B,CACtClG,EAAQzE,GAAW,IACnB,GAAIyE,EAAQwH,EAAmB,CAC3BxH,EAAQwH,EAAkBzL,KAAI,EAAE0L,EAAYC,KAAWC,GAASN,EAAUI,EAAYC,KACtF1H,EAAQwH,EAAoBnO,SAC5C,CACA,CAE+B,CAMnBkO,EAAeI,GAASN,EAAU,oBAC9C,CACA,CAa6B,CACrBE,EAAeK,EAAQL,GAAc,IAAMI,GAASN,EAAU,wBACtE,CACID,IACA,OAAOQ,EAAQL,GAAc,IAAMM,EAAgB7H,EAASqH,EAAUnB,IAAe,EAkBzF,MAAM0B,EAAU,CAACL,EAAcO,IAAOC,EAAWR,GAAgBA,EAAaS,KAAKF,GAAMA,IAWzF,MAAMC,EAAcR,GAAiBA,aAAwBV,SACxDU,GAAgBA,EAAaS,aAAeT,EAAaS,OAAS,WAWvE,MAAMH,EAAkBI,MAAOjI,EAASqH,EAAUnB,KAC9C,IAAInN,EACJ,MAAMqE,EAAM4C,EAAQE,cACpB,MAAMgI,EAAYrQ,EAAW,SAAUmI,EAAQC,EAAUG,GACzD,MAAM+H,EAAK/K,EAAI,QACf,GAAmB8I,EAAe,CAE9BnG,EAAaC,EACrB,CACI,MAAMoI,EAAYvQ,EAAW,SAAUmI,EAAQC,EAAUG,GAOpD,CACDiI,EAAWrI,EAASqH,EAAUjK,EAAK8I,EAC3C,CAuBI,GAA0BiC,EAAI,CAI1BA,EAAGpM,KAAKD,GAAOA,MACfsB,EAAI,QAAU/D,SACtB,CACI+O,IACAF,IACwB,CACpB,MAAMI,GAAoBvP,EAAKqE,EAAI,UAAY,MAAQrE,SAAY,EAAIA,EAAK,GAC5E,MAAMwP,EAAa,IAAMC,GAAoBxI,GAC7C,GAAIsI,EAAiBrO,SAAW,EAAG,CAC/BsO,GACZ,KACa,CACD1B,QAAQ4B,IAAIH,GAAkBN,KAAKO,GACnCvI,EAAQzE,GAAW,EACnB+M,EAAiBrO,OAAS,CACtC,CACA,GAiBA,MAAMoO,EAAa,CAACrI,EAASqH,EAAUjK,EAAK8I,KAQxC,IAMImB,EAAyBA,EAASqB,SACN,CACxB1I,EAAQzE,IAAY,EAChC,CACmC,CACvByE,EAAQzE,GAAW,CAC/B,CACgD,CACG,CAO9B,CACDyK,EAAWhG,EAASqH,EAAUnB,EAClD,CACA,CAUA,CACA,CACI,MAAO9D,GACHuG,GAAavG,EAAGpC,EAAQE,cAChC,CAEI,OAAO,IAAI,EAGf,MAAMsI,GAAuBxI,IACzB,MAAMjI,EAAUiI,EAAQC,EAAUG,EAClC,MAAMhD,EAAM4C,EAAQE,cACpB,MAAM0I,EAAgB/Q,EAAW,aAAcE,GAC/C,MAAMsP,EAA4BrH,EAAQsH,EAC1C,MAAMX,EAAoB3G,EAAQgH,EACV,CAIpBW,GAASN,EAAU,qBAI3B,CAEI,KAAMrH,EAAQzE,EAAU,IAAyC,CAC7DyE,EAAQzE,GAAW,GAC6B,CAE5CsN,GAAgBzL,EAC5B,CAC8B,CAIlBuK,GAASN,EAAU,mBAI/B,CAEQuB,IACwB,CACpB5I,EAAQ8I,EAAiB1L,GACzB,IAAKuJ,EAAmB,CACpBoC,IAChB,CACA,CACA,KACS,CAeDH,GACR,CACwC,CAChC5I,EAAQgJ,EAAoB5L,EACpC,CAG4B,CACpB,GAAI4C,EAAQ4G,EAAmB,CAC3B5G,EAAQ4G,IACR5G,EAAQ4G,EAAoBvN,SACxC,CACQ,GAAI2G,EAAQzE,EAAU,IAAoC,CACtD0N,IAAS,IAAMlC,EAAe/G,EAAS,QACnD,CACQA,EAAQzE,KAAa,EAA0C,IACvE,GAkBA,MAAMwN,GAAcG,IAGU,CACtBL,GAAgB/P,GAAIqQ,gBAC5B,CAIIF,IAAS,IAAM1L,EAAUmE,GAAK,UAAW,CAAEpE,OAAQ,CAAE8L,UAAW7R,MAAe,EAenF,MAAMoQ,GAAW,CAACN,EAAUgC,EAAQC,KAChC,GAAIjC,GAAYA,EAASgC,GAAS,CAC9B,IACI,OAAOhC,EAASgC,GAAQC,EACpC,CACQ,MAAOlH,GACHuG,GAAavG,EACzB,CACA,CACI,OAAO/I,SAAS,EAmBpB,MAAMwP,GAAmBzL,GACnBA,EAAImD,UAAUX,IAAI,YAgBxB,MAAM2J,GAAW,CAACvM,EAAKuJ,IAAatJ,GAAWD,GAAKwM,EAAiBjL,IAAIgI,GACzE,MAAMkD,GAAW,CAACzM,EAAKuJ,EAAUmD,EAAQ5K,KAErC,MAAMkB,EAAU/C,GAAWD,GAC3B,MAAMI,EAAuB4C,EAAQE,cACrC,MAAMyJ,EAAS3J,EAAQwJ,EAAiBjL,IAAIgI,GAC5C,MAAMpJ,EAAQ6C,EAAQzE,EACtB,MAAM8L,EAA4BrH,EAAQsH,EAC1CoC,EAAS/M,EAAmB+M,EAAQ5K,EAAQ8K,EAAUrD,GAAU,IAEhE,MAAMsD,EAAaC,OAAOC,MAAMJ,IAAWG,OAAOC,MAAML,GACxD,MAAMM,EAAiBN,IAAWC,IAAWE,EAC7C,MAA0B1M,EAAQ,IAA8CwM,IAAWtQ,YAAc2Q,EAAgB,CAGrHhK,EAAQwJ,EAAiB7K,IAAI4H,EAAUmD,GASvC,GAAuBrC,EAAU,CAE7B,GAA2BvI,EAAQmL,GAAc9M,EAAQ,IAAmC,CACxF,MAAM+M,EAAepL,EAAQmL,EAAW1D,GACxC,GAAI2D,EAAc,CAEdA,EAAanO,KAAKoO,IACd,IAEI9C,EAAS8C,GAAiBT,EAAQC,EAAQpD,EACtE,CACwB,MAAOnE,GACHuG,GAAavG,EAAGhF,EAC5C,IAEA,CACA,CACY,IACKD,GAAS,EAAiC,OAA4C,EAAgC,CAUvH4J,EAAe/G,EAAS,MACxC,CACA,CACA,GAYA,MAAMoK,GAAiB,CAACC,EAAMvL,EAAS3B,KACnC,IAAIpE,EACJ,MAAMuR,EAAYD,EAAKC,UAwBvB,GAAoBxL,EAAQ8K,EAAW,CACnC,GAA2BS,EAAKE,SAAU,CACtCzL,EAAQmL,EAAaI,EAAKE,QACtC,CAEQ,MAAMC,EAAU7P,OAAO8P,QAAQ3L,EAAQ8K,GACvCY,EAAQzO,KAAI,EAAE2E,GAAagK,OACvB,GACKA,EAAc,IACUvN,EAAQ,GAAmCuN,EAAc,GAA+B,CAEjH/P,OAAOgQ,eAAeL,EAAW5J,EAAY,CACzC,GAAAnC,GAEI,OAAOgL,GAASqB,KAAMlK,EAC9C,EACoB,GAAA/B,CAAIiC,GAiBA6I,GAASmB,KAAMlK,EAAYE,EAAU9B,EAC7D,EACoB+L,aAAc,KACdC,WAAY,MAEhC,MACiB,GAED3N,EAAQ,GACRuN,EAAc,GAA8B,CAE5C/P,OAAOgQ,eAAeL,EAAW5J,EAAY,CACzC,KAAAgC,IAASqI,GACL,IAAIhS,EACJ,MAAMiE,EAAMC,GAAW2N,MACvB,OAAQ7R,EAAKiE,IAAQ,MAAQA,SAAa,OAAS,EAAIA,EAAIgO,KAAyB,MAAQjS,SAAY,OAAS,EAAIA,EAAGiP,MAAK,KAAQ,IAAIjP,EAAI,OAAQA,EAAKiE,EAAIsK,KAAoB,MAAQvO,SAAY,OAAS,EAAIA,EAAG2H,MAAeqK,EAAK,GAClQ,GAEA,KAEQ,GAAkD5N,EAAQ,EAA2C,CACjG,MAAM8N,EAAqB,IAAIC,IAC/BZ,EAAUa,yBAA2B,SAAUC,EAAUzK,EAAUC,GAC/D/C,GAAIwN,KAAI,KACJ,IAAItS,EACJ,MAAMwN,EAAW0E,EAAmB1M,IAAI6M,GAkCxC,GAAIR,KAAKU,eAAe/E,GAAW,CAC/B3F,EAAWgK,KAAKrE,UACTqE,KAAKrE,EACpC,MACyB,GAAI+D,EAAUgB,eAAe/E,WACvBqE,KAAKrE,KAAc,UAC1BqE,KAAKrE,IAAa3F,EAAU,CAI5B,MACxB,MACyB,GAAI2F,GAAY,KAAM,CAGvB,MAAMvG,EAAU/C,GAAW2N,MAC3B,MAAMzN,EAAQ6C,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQzE,EAKxE,GAAI4B,KACEA,EAAQ,IACVA,EAAQ,KACRyD,IAAaD,EAAU,CAEvB,MAAM0G,EAA4BrH,EAAQsH,EAC1C,MAAMiE,GAASxS,EAAK+F,EAAQmL,KAAgB,MAAQlR,SAAY,OAAS,EAAIA,EAAGqS,GAChFG,IAAU,MAAQA,SAAe,OAAS,EAAIA,EAAM1P,SAAS2P,IACzD,GAAInE,EAASmE,IAAiB,KAAM,CAChCnE,EAASmE,GAAcC,KAAKpE,EAAUzG,EAAUD,EAAUyK,EAC9F,IAEA,CACwB,MACxB,CACoBR,KAAKrE,GAAY3F,IAAa,aAAegK,KAAKrE,KAAc,UAAY,MAAQ3F,CAAQ,GAEhH,EAMYyJ,EAAKqB,mBAAqBxR,MAAMyR,KAAK,IAAIvM,IAAI,IACtCzE,OAAOC,MAAM7B,EAAK+F,EAAQmL,KAAgB,MAAQlR,SAAY,EAAIA,EAAK,OACvEyR,EACE3P,QAAO,EAAE+Q,EAAGC,KAAOA,EAAE,GAAK,KAC1B9P,KAAI,EAAEwK,EAAUsF,MACjB,IAAI9S,EACJ,MAAMqS,EAAWS,EAAE,IAAMtF,EACzB0E,EAAmBtM,IAAIyM,EAAU7E,GACjC,GAAqBsF,EAAE,GAAK,IAAoC,EAC3D9S,EAAK+F,EAAQwH,KAAsB,MAAQvN,SAAY,OAAS,EAAIA,EAAGuB,KAAK,CAACiM,EAAU6E,GAChH,CACoB,OAAOA,CAAQ,MAGnC,CACA,CACI,OAAOf,CAAI,EAYf,MAAMyB,GAAsB7D,MAAO7K,EAAK4C,EAASlB,EAASiN,KACtD,IAAI1B,EAEJ,IAAKrK,EAAQzE,EAAU,MAAiD,EAAG,CAEvEyE,EAAQzE,GAAW,GACnB,MAAMyQ,EAAWlN,EAAQmN,EACzB,GAAmDD,EAAU,CAIzD3B,EAAO6B,GAAWpN,GAClB,GAAIuL,EAAKrC,KAAM,CAEX,MAAMmE,EAAUnU,IAChBqS,QAAaA,EACb8B,GAChB,CAIY,IAAqB9B,EAAK+B,UAAW,CAIR,CACrBtN,EAAQmL,EAAaI,EAAKE,QAC9C,CACgBH,GAAeC,EAAMvL,EAAS,GAC9BuL,EAAK+B,UAAY,IACjC,CACY,MAAMC,EAAiBxU,EAAW,iBAAkBiH,EAAQsB,GAI1C,CACdJ,EAAQzE,GAAW,CACnC,CAKY,IACI,IAAI8O,EAAKrK,EACzB,CACY,MAAOoC,GACHuG,GAAavG,EAC7B,CAC8B,CACdpC,EAAQzE,IAAY,CACpC,CACqC,CACrByE,EAAQzE,GAAW,GACnC,CACY8Q,IACAC,GAAsBtM,EAAQsH,EAC1C,KACa,CAED+C,EAAOjN,EAAImP,YAIXC,eAAeC,YAAY3N,EAAQsB,GAAW4H,MAAK,IAAOhI,EAAQzE,GAAW,KACzF,CACQ,GAAmB8O,EAAKhM,MAAO,CAE3B,IAAIA,EAAQgM,EAAKhM,MAOjB,MAAM7G,EAAUwH,EAAWF,GAC3B,IAAKR,GAAOe,IAAI7H,GAAU,CACtB,MAAMkV,EAAoB7U,EAAW,iBAAkBiH,EAAQsB,GAQ/DlC,EAAc1G,EAAS6G,KAAUS,EAAQvD,EAAU,IACnDmR,GAChB,CACA,CACA,CAEI,MAAM/F,EAAoB3G,EAAQgH,EAClC,MAAM2F,EAAW,IAAM5F,EAAe/G,EAAS,MAC/C,GAA0B2G,GAAqBA,EAAkB,QAAS,CAOtEA,EAAkB,QAAQrM,KAAKqS,EACvC,KACS,CACDA,GACR,GAEA,MAAML,GAAyBjF,IACoB,CAC3CM,GAASN,EAAU,oBAC3B,GAEA,MAAMuF,GAAqBxP,IACvB,IAAKS,GAAItC,EAAU,KAA8C,EAAG,CAChE,MAAMyE,EAAU/C,GAAWG,GAC3B,MAAM0B,EAAUkB,EAAQC,EACxB,MAAM4M,EAAehV,EAAW,oBAAqBiH,EAAQsB,GAK7D,KAAMJ,EAAQzE,EAAU,GAAkC,CAEtDyE,EAAQzE,GAAW,EA0BK,CAGpB,IAAIoL,EAAoBvJ,EACxB,MAAQuJ,EAAoBA,EAAkBpB,YAAcoB,EAAkB3D,KAAO,CAGjF,GAII2D,EAAkB,OAAQ,CAG1BD,EAAiB1G,EAAUA,EAAQgH,EAAsBL,GACzD,KACxB,CACA,CACA,CAGY,GAA8C7H,EAAQ8K,EAAW,CAC7DjP,OAAO8P,QAAQ3L,EAAQ8K,GAAW7N,KAAI,EAAE2E,GAAagK,OACjD,GAAIA,EAAc,IAA8BtN,EAAIkO,eAAe5K,GAAa,CAC5E,MAAMgC,EAAQtF,EAAIsD,UACXtD,EAAIsD,GACXtD,EAAIsD,GAAcgC,CAC1C,IAEA,CAQiB,CACDoJ,GAAoB1O,EAAK4C,EAASlB,EAClD,CACA,KACa,CAIDgO,GAAsB1P,EAAK4C,EAASlB,EAAQiO,GAE5C,GAAI/M,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQsH,EAAgB,CAC1EgF,GAAsBtM,EAAQsH,EAC9C,MACiB,GAAItH,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQgN,EAAkB,CACjFhN,EAAQgN,EAAiBhF,MAAK,IAAMsE,GAAsBtM,EAAQsH,IAClF,CACA,CACQuF,GACR,GAaA,MAAMI,GAAsB5F,IAC0B,CAC9CM,GAASN,EAAU,uBAC3B,GAKA,MAAM6F,GAAuBjF,MAAO7K,IAChC,IAAKS,GAAItC,EAAU,KAA8C,EAAG,CAChE,MAAMyE,EAAU/C,GAAWG,GACH,CACpB,GAAI4C,EAAQmN,EAAe,CACvBnN,EAAQmN,EAAcpR,KAAKqR,GAAeA,MAC1CpN,EAAQmN,EAAgB9T,SACxC,CACA,CAIa,GAAI2G,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQsH,EAAgB,CAC/E2F,GAAmBjN,EAAQsH,EACvC,MACa,GAAItH,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQgN,EAAkB,CACjFhN,EAAQgN,EAAiBhF,MAAK,IAAMiF,GAAmBjN,EAAQsH,IAC3E,CACA,GAiiBK,MAAC+F,GAAgB,CAACC,EAAaC,EAAU,MAC1C,IAAIxU,EAKJ,MAAMyU,EAAe3V,IACrB,MAAM4V,EAAU,GAChB,MAAMC,EAAUH,EAAQG,SAAW,GACnC,MAAMlB,EAAiB9K,GAAI8K,eAC3B,MAAMtT,EAAOJ,GAAII,KACjB,MAAMyU,EAA4BzU,EAAKC,cAAc,iBACrD,MAAMyU,EAA2B9U,GAAIwG,cAAc,SACnD,MAAMuO,EAA6B,GAEnC,IAAIC,EACJ,IAAIC,EAAkB,KAEtBpT,OAAO8B,OAAOoB,GAAK0P,GACnB1P,GAAImQ,EAAiB,IAAIC,IAAIV,EAAQW,cAAgB,KAAMpV,GAAIqV,SAASC,KAgBxE,IAAIC,EAAoB,MACxBf,EAAYvR,KAAKuS,IACbA,EAAW,GAAGvS,KAAKwS,IACf,IAAIxV,EACJ,MAAM+F,EAAU,CACZvD,EAASgT,EAAY,GACrBnO,EAAWmO,EAAY,GACvB3E,EAAW2E,EAAY,GACvBxB,EAAawB,EAAY,IAI7B,GAAIzP,EAAQvD,EAAU,EAAqC,CACvD8S,EAAoB,IACpC,CAC8B,CACdvP,EAAQ8K,EAAY2E,EAAY,EAChD,CACoC,CACpBzP,EAAQiO,EAAcwB,EAAY,EAClD,CAC+B,CACfzP,EAAQwH,EAAmB,EAC3C,CACqC,CACrBxH,EAAQmL,GAAclR,EAAKwV,EAAY,MAAQ,MAAQxV,SAAY,EAAIA,EAAK,EAC5F,CAKY,MAAMhB,EAEA+G,EAAQsB,EACd,MAAMoO,EAAc,cAAcC,YAE9B,WAAAlC,CAAYmC,GAERC,MAAMD,GACNA,EAAO9D,KACPgE,GAAaF,EAAM5P,GACnB,GAAuBA,EAAQvD,EAAU,EAA0C,CAK3D,CAOX,CACDmT,EAAKG,aAAa,CAAE9P,KAAM,QAC1D,CACA,CAIA,CACA,CACgB,iBAAA6N,GACI,GAAIkB,EAAiB,CACjBgB,aAAahB,GACbA,EAAkB,IAC1C,CACoB,GAAIC,EAAiB,CAEjBF,EAA2BvT,KAAKsQ,KACxD,KACyB,CACD/M,GAAIwN,KAAI,IAAMuB,GAAkBhC,OACxD,CACA,CACgB,oBAAAsC,GACIrP,GAAIwN,KAAI,IAAM6B,GAAqBtC,OACvD,CACgB,gBAAAmE,GACI,OAAO9R,GAAW2N,MAAMoC,CAC5C,GAsCYlO,EAAQmN,EAAiBqC,EAAW,GACpC,IAAKZ,EAAQ5N,SAAS/H,KAAayU,EAAejO,IAAIxG,GAAU,CAC5D0V,EAAQnT,KAAKvC,GACbyU,EAAewC,OAAOjX,EAASqS,GAAeoE,EAAa1P,EAAS,GACpF,IACU,IAIN,GAAI2O,EAAQxT,OAAS,EAAG,CAEpB,GAAIoU,EAAmB,CACnBT,EAAW/H,aAAezN,CACtC,CAE6F,CACjFwV,EAAW/H,aAAe4H,EAAUtV,CAChD,CAEQ,GAAIyV,EAAWrO,UAAUtF,OAAQ,CAC7B2T,EAAWlO,aAAa,cAAe,IAEvC,MAAMF,GAASzG,EAAK8E,GAAI4B,KAAa,MAAQ1G,SAAY,EAAIA,EAAKF,EAAyBC,IAC3F,GAAI0G,GAAS,KAAM,CACfoO,EAAWlO,aAAa,QAASF,EACjD,CAGYtG,EAAKyG,aAAaiO,EAAYD,EAAcA,EAAYrI,YAAcpM,EAAK+V,WACvF,CACA,CAEIlB,EAAkB,MAClB,GAAIF,EAA2B5T,OAAQ,CACnC4T,EAA2B9R,KAAKiH,GAASA,EAAK4J,qBACtD,KACS,CAII,CACD/O,GAAIwN,KAAI,IAAOyC,EAAkBoB,WAAWnG,GAAY,KACpE,CACA,CAEIyE,GAAc,EAGlB,MAAMV,GAAwB,CAAC1P,EAAK4C,EAASmP,EAAWC,KACpD,GAA0BD,EAAW,CAoBjCA,EAAUpT,KAAI,EAAEoB,EAAOT,EAAM2M,MACzB,MAAMgG,EAAwEjS,EAC9E,MAAMkS,EAAUC,GAAkBvP,EAASqJ,GAC3C,MAAM1L,EAAO6R,GAAiBrS,GAC9BU,GAAIoE,IAAIoN,EAAQ3S,EAAM4S,EAAS3R,IAC9BqC,EAAQmN,EAAgBnN,EAAQmN,GAAiB,IAAI7S,MAAK,IAAMuD,GAAImE,IAAIqN,EAAQ3S,EAAM4S,EAAS3R,IAAM,GAElH,GAEA,MAAM4R,GAAoB,CAACvP,EAASyH,IAAgB7J,IAChD,IACwB,CAChB,GAAIoC,EAAQzE,EAAU,IAAoC,CAEtDyE,EAAQsH,EAAeG,GAAY7J,EACnD,KACiB,EACAoC,EAAQwH,EAAoBxH,EAAQwH,GAAqB,IAAIlN,KAAK,CAACmN,EAAY7J,GAChG,CACA,CAIA,CACI,MAAOwE,GACHuG,GAAavG,EACrB,GAcA,MAAMoN,GAAoBrS,GAAUsS,GACpC,CACQC,SAAUvS,EAAQ,KAAoC,EACtDwE,SAAUxE,EAAQ,KAAoC,IAEvDA,EAAQ,KAAoC,EAO9C,MAACwS,GAAYnQ,GAAW3B,GAAI4B,EAAUD,EA4M3C,MAAMoQ,GAEA,IAAI3R,QAOV,MAAMhB,GAAcD,GAAQ4S,GAASrR,IAAIvB,GASpC,MAAC6S,GAAmB,CAACC,EAAc9P,IAAY4P,GAASjR,IAAKqB,EAAQsH,EAAiBwI,EAAe9P,GAU1G,MAAM4O,GAAe,CAACmB,EAAajR,KAC/B,MAAMkB,EAAU,CACZzE,EAAS,EACT2E,cAAe6P,EACf9P,EAAWnB,EACX0K,EAAkB,IAAI0B,KAKU,CAChClL,EAAQgL,EAAsB,IAAInE,SAASC,GAAO9G,EAAQgJ,EAAsBlC,GACxF,CAC4B,CACpB9G,EAAQgN,EAAmB,IAAInG,SAASC,GAAO9G,EAAQ8I,EAAmBhC,IAC1EiJ,EAAY,OAAS,GACrBA,EAAY,QAAU,EAC9B,CACIjD,GAAsBiD,EAAa/P,EAASlB,EAAQiO,GACpD,OAAO6C,GAASjR,IAAIoR,EAAa/P,EAAQ,EAE7C,MAAMe,GAAoB,CAAC3D,EAAKsD,IAAeA,KAActD,EAC7D,MAAMuL,GAAe,CAACvG,EAAG4N,KAAO,EAAgBC,QAAQC,OAAO9N,EAAG4N,GAWlE,MAAMG,GAA2B,IAAIjF,IACrC,MAAMgB,GAAa,CAACpN,EAASkB,EAAS+L,KAElC,MAAMqE,EAAatR,EAAQsB,EAAU0B,QAAQ,KAAM,KACnD,MAAMkK,EAAWlN,EAAQmN,EAKzB,MAAMoE,EAAuCF,GAAW5R,IAAIyN,GAC5D,GAAIqE,EAAQ,CACR,OAAOA,EAAOD,EACtB;qCAEI,OAAOE,OAKP,KAAKtE,aAA4F,MAAMhE,MAAMuI,IACxE,CAC7BJ,GAAWxR,IAAIqN,EAAUuE,EACrC,CACQ,OAAOA,EAAeH,EAAW,GAClCzH,GAAa,EAEpB,MAAMrK,GAAuB,IAAI4M,IAEjC,MAAMxJ,UAAa8O,SAAW,YAAcA,OAAS,GACrD,MAAM1X,GAAM4I,GAAI+O,UAAY,CAAEvX,KAAM,IAGpC,MAAM2E,GAAM,CACRtC,EAAS,EACTyS,EAAgB,GAChB3C,IAAM/R,GAAMA,IACZoX,IAAMpX,GAAMqX,sBAAsBrX,GAClC2I,IAAK,CAAC+N,EAAIY,EAAWC,EAAUlT,IAASqS,EAAGc,iBAAiBF,EAAWC,EAAUlT,GACjFqE,IAAK,CAACgO,EAAIY,EAAWC,EAAUlT,IAASqS,EAAGe,oBAAoBH,EAAWC,EAAUlT,GACpFG,GAAI,CAAC8S,EAAWjT,IAAS,IAAIqT,YAAYJ,EAAWjT,IAUxD,MAAM8R,GAAwC,MAC1C,IAAIA,EAA0B,MAC9B,IACI3W,GAAIgY,iBAAiB,IAAK,KAAMnW,OAAOgQ,eAAe,GAAI,UAAW,CACjE,GAAApM,GACIkR,EAA0B,IAC1C,IAEA,CACI,MAAOrN,GAAG,CACV,OAAOqN,CACV,EAX6C,GAYzC,MAACwB,GAAkBvY,GAAMmO,QAAQqK,QAAQxY,GAC9C,MAAM8F,GACc,MACZ,IACI,IAAIC,cACJ,cAAc,IAAIA,eAAgBC,cAAgB,UAC9D,CACQ,MAAO0D,GAAG,CACV,OAAO,KACV,EAPe,GASpB,MAAM+O,GAAgB,GACtB,MAAMC,GAAiB,GAEvB,MAAMC,GAAY,CAACC,EAAOC,IAAWzV,IACjCwV,EAAMhX,KAAKwB,GACX,IAAKlE,EAAc,CACfA,EAAe,KACf,GAAI2Z,GAAS1T,GAAItC,EAAU,EAAkC,CACzD0N,GAASuI,GACrB,KACa,CACD3T,GAAI6S,IAAIc,GACpB,CACA,GAEA,MAAMC,GAAWH,IACb,IAAK,IAAItX,EAAI,EAAGA,EAAIsX,EAAMrX,OAAQD,IAAK,CACnC,IACIsX,EAAMtX,GAAG0X,YAAYC,MACjC,CACQ,MAAOvP,GACHuG,GAAavG,EACzB,CACA,CACIkP,EAAMrX,OAAS,CAAC,EAoBpB,MAAMuX,GAAQ,KAOVC,GAAQN,IAqBH,CACDM,GAAQL,IACR,GAAKxZ,EAAeuZ,GAAclX,OAAS,EAAI,CAG3C4D,GAAI6S,IAAIc,GACpB,CACA,GAEA,MAAMvI,GAAYnN,GAAOmV,KAAiBjJ,KAAKlM,GAE/C,MAAMqL,GAA0BkK,GAAUD,GAAgB,a"} \ No newline at end of file diff --git a/build/p-20919029.js b/build/p-22f0435a.js similarity index 71% rename from build/p-20919029.js rename to build/p-22f0435a.js index 7bff1d5ab..a6c9887b9 100644 --- a/build/p-20919029.js +++ b/build/p-22f0435a.js @@ -1,3 +1,3 @@ -const t="catalyst";let e;let n;let s=false;let l=false;let o=false;const c=(t,e="")=>{{return()=>{}}};const i=(t,e)=>{{return()=>{}}};const f="{visibility:hidden}.hydrated{visibility:inherit}";const r="slot-fb{display:contents}slot-fb[hidden]{display:none}";const u="http://www.w3.org/1999/xlink";const a={};const d="http://www.w3.org/2000/svg";const v="http://www.w3.org/1999/xhtml";const p=t=>t!=null;const y=t=>{t=typeof t;return t==="object"||t==="function"};function h(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const m=(t,e,...n)=>{let s=null;let l=null;let o=false;let c=false;const i=[];const f=e=>{for(let n=0;nt[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,i,g)}const r=b(t,null);r.l=e;if(i.length>0){r.o=i}{r.i=l}return r};const b=(t,e)=>{const n={u:0,v:t,t:e,p:null,o:null};{n.l=null}{n.i=null}return n};const w={};const $=t=>t&&t.v===w;const g={forEach:(t,e)=>t.map(S).forEach(e),map:(t,e)=>t.map(S).map(e).map(j)};const S=t=>({vattrs:t.l,vchildren:t.o,vkey:t.i,vname:t.h,vtag:t.v,vtext:t.t});const j=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return m(t.vtag,e,...t.vchildren||[])}const e=b(t.vtag,t.vtext);e.l=t.vattrs;e.o=t.vchildren;e.i=t.vkey;e.h=t.vname;return e};const k=(t,e)=>{if(t!=null&&!y(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const O=t=>bt(t).$hostElement$;const C=(t,e,n)=>{const s=O(t);return{emit:t=>x(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const x=(t,e,n)=>{const s=Mt.ce(e,n);t.dispatchEvent(s);return s};const M=new WeakMap;const E=(t,e,n)=>{let s=Ot.get(t);if(Rt&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}Ot.set(t,s)};const P=(t,e,n)=>{var s;const l=L(e);const o=Ot.get(l);t=t.nodeType===11?t:xt;if(o){if(typeof o==="string"){t=t.head||t;let n=M.get(t);let c;if(!n){M.set(t,n=new Set)}if(!n.has(l)){{c=xt.createElement("style");c.innerHTML=o;const e=(s=Mt.m)!==null&&s!==void 0?s:h(xt);if(e!=null){c.setAttribute("nonce",e)}t.insertBefore(c,t.querySelector("link"))}if(e.u&4){c.innerHTML+=r}if(n){n.add(l)}}}else if(!t.adoptedStyleSheets.includes(o)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]}}return l};const R=t=>{const e=t.$;const n=t.$hostElement$;const s=e.u;const l=c("attachStyles",e.S);const o=P(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h")}l()};const L=(t,e)=>"sc-"+t.S;const U=(t,e,n,s,l,o)=>{if(n!==s){let c=gt(t,e);let i=e.toLowerCase();if(e==="class"){const e=t.classList;const l=A(n);const o=A(s);e.remove(...l.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!l.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!c&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(gt(Ct,i)){e=i.slice(2)}else{e=i[2]+e.slice(3)}if(n||s){const l=e.endsWith(N);e=e.replace(T,"");if(n){Mt.rel(t,e,n,l)}if(s){Mt.ael(t,e,s,l)}}}else{const f=y(s);if((c||f&&s!==null)&&!l){try{if(!t.tagName.includes("-")){const l=s==null?"":s;if(e==="list"){c=false}else if(n==null||t[e]!=l){t[e]=l}}else{t[e]=s}}catch(t){}}let r=false;{if(i!==(i=i.replace(/^xlink\:?/,""))){e=i;r=true}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){if(r){t.removeAttributeNS(u,e)}else{t.removeAttribute(e)}}}else if((!c||o&4||l)&&!f){s=s===true?"":s;if(r){t.setAttributeNS(u,e,s)}else{t.setAttribute(e,s)}}}}};const W=/\s/;const A=t=>!t?[]:t.split(W);const N="Capture";const T=new RegExp(N+"$");const D=(t,e,n,s)=>{const l=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const o=t&&t.l||a;const c=e.l||a;{for(s in o){if(!(s in c)){U(l,s,o[s],undefined,n,e.u)}}}for(s in c){U(l,s,o[s],c[s],n,e.u)}};const F=(t,s,o,c)=>{const i=s.o[o];let f=0;let r;let u;if(i.t!==null){r=i.p=xt.createTextNode(i.t)}else{if(!l){l=i.v==="svg"}r=i.p=xt.createElementNS(l?d:v,i.v);if(l&&i.v==="foreignObject"){l=false}{D(null,i,l)}if(p(e)&&r["s-si"]!==e){r.classList.add(r["s-si"]=e)}if(i.o){for(f=0;f{let i=t;let f;if(i.shadowRoot&&i.tagName===n){i=i.shadowRoot}for(;o<=c;++o){if(l[o]){f=F(null,s,o);if(f){l[o].p=f;i.insertBefore(f,e)}}}};const q=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.p;z(e);if(t){t.remove()}}}};const I=(t,e,n,s,l=false)=>{let o=0;let c=0;let i=0;let f=0;let r=e.length-1;let u=e[0];let a=e[r];let d=s.length-1;let v=s[0];let p=s[d];let y;let h;while(o<=r&&c<=d){if(u==null){u=e[++o]}else if(a==null){a=e[--r]}else if(v==null){v=s[++c]}else if(p==null){p=s[--d]}else if(V(u,v,l)){_(u,v,l);u=e[++o];v=s[++c]}else if(V(a,p,l)){_(a,p,l);a=e[--r];p=s[--d]}else if(V(u,p,l)){_(u,p,l);t.insertBefore(u.p,a.p.nextSibling);u=e[++o];p=s[--d]}else if(V(a,v,l)){_(a,v,l);t.insertBefore(a.p,u.p);a=e[--r];v=s[++c]}else{i=-1;{for(f=o;f<=r;++f){if(e[f]&&e[f].i!==null&&e[f].i===v.i){i=f;break}}}if(i>=0){h=e[i];if(h.v!==v.v){y=F(e&&e[c],n,i)}else{_(h,v,l);e[i]=undefined;y=h.p}v=s[++c]}else{y=F(e&&e[c],n,c);v=s[++c]}if(y){{u.p.parentNode.insertBefore(y,u.p)}}}}if(o>r){H(t,s[d+1]==null?null:s[d+1].p,n,s,c,d)}else if(c>d){q(e,o,r)}};const V=(t,e,n=false)=>{if(t.v===e.v){if(!n){return t.i===e.i}return true}return false};const _=(t,e,n=false)=>{const o=e.p=t.p;const c=t.o;const i=e.o;const f=e.v;const r=e.t;if(r===null){{l=f==="svg"?true:f==="foreignObject"?false:l}{if(f==="slot"&&!s);else{D(t,e,l)}}if(c!==null&&i!==null){I(o,c,e,i,n)}else if(i!==null){if(t.t!==null){o.textContent=""}H(o,null,e,i,0,i.length-1)}else if(c!==null){q(c,0,c.length-1)}if(l&&f==="svg"){l=false}}else if(t.t!==r){o.data=r}};const z=t=>{{t.l&&t.l.ref&&t.l.ref(null);t.o&&t.o.map(z)}};const B=(t,l,o=false)=>{const c=t.$hostElement$;const i=t.$;const f=t.j||b(null,null);const r=$(l)?l:m(null,null,l);n=c.tagName;if(i.k){r.l=r.l||{};i.k.map((([t,e])=>r.l[e]=c[t]))}if(o&&r.l){for(const t of Object.keys(r.l)){if(c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){r.l[t]=c[t]}}}r.v=null;r.u|=4;t.j=r;r.p=f.p=c.shadowRoot||c;{e=c["s-sc"]}s=(i.u&1)!==0;_(f,r,o)};const G=(t,e)=>{if(e&&!t.O&&e["s-p"]){e["s-p"].push(new Promise((e=>t.O=e)))}};const J=(t,e)=>{{t.u|=16}if(t.u&4){t.u|=512;return}G(t,t.C);const n=()=>K(t,e);return Dt(n)};const K=(t,e)=>{const n=c("scheduleUpdate",t.$.S);const s=t.M;let l;if(e){{t.u|=256;if(t.P){t.P.map((([t,e])=>nt(s,t,e)));t.P=undefined}}{l=nt(s,"componentWillLoad")}}{l=Q(l,(()=>nt(s,"componentWillRender")))}n();return Q(l,(()=>Y(t,s,e)))};const Q=(t,e)=>X(t)?t.then(e):e();const X=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const Y=async(t,e,n)=>{var s;const l=t.$hostElement$;const o=c("update",t.$.S);const i=l["s-rc"];if(n){R(t)}const f=c("render",t.$.S);{Z(t,e,l,n)}if(i){i.map((t=>t()));l["s-rc"]=undefined}f();o();{const e=(s=l["s-p"])!==null&&s!==void 0?s:[];const n=()=>tt(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.u|=4;e.length=0}}};const Z=(t,e,n,s)=>{try{e=e.render();{t.u&=~16}{t.u|=2}{{{B(t,e,s)}}}}catch(e){St(e,t.$hostElement$)}return null};const tt=t=>{const e=t.$.S;const n=t.$hostElement$;const s=c("postUpdate",e);const l=t.M;const o=t.C;{nt(l,"componentDidRender")}if(!(t.u&64)){t.u|=64;{st(n)}{nt(l,"componentDidLoad")}s();{t.R(n);if(!o){et()}}}else{s()}{t.L(n)}{if(t.O){t.O();t.O=undefined}if(t.u&512){Tt((()=>J(t,false)))}t.u&=~(4|512)}};const et=e=>{{st(xt.documentElement)}Tt((()=>x(Ct,"appload",{detail:{namespace:t}})))};const nt=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){St(t)}}return undefined};const st=t=>t.classList.add("hydrated");const lt=(t,e)=>bt(t).U.get(e);const ot=(t,e,n,s)=>{const l=bt(t);const o=l.$hostElement$;const c=l.U.get(e);const i=l.u;const f=l.M;n=k(n,s.W[e][0]);const r=Number.isNaN(c)&&Number.isNaN(n);const u=n!==c&&!r;if((!(i&8)||c===undefined)&&u){l.U.set(e,n);if(f){if(s.A&&i&128){const t=s.A[e];if(t){t.map((t=>{try{f[t](n,c,e)}catch(t){St(t,o)}}))}}if((i&(2|16))===2){J(l,false)}}}};const ct=(t,e,n)=>{var s;const l=t.prototype;if(e.W){if(t.watchers){e.A=t.watchers}const o=Object.entries(e.W);o.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,t,{get(){return lt(this,t)},set(n){ot(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(l,t,{value(...e){var n;const s=bt(this);return(n=s===null||s===void 0?void 0:s.N)===null||n===void 0?void 0:n.then((()=>{var n;return(n=s.M)===null||n===void 0?void 0:n[t](...e)}))}})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(t,s,o){Mt.jmp((()=>{var c;const i=n.get(t);if(this.hasOwnProperty(i)){o=this[i];delete this[i]}else if(l.hasOwnProperty(i)&&typeof this[i]==="number"&&this[i]==o){return}else if(i==null){const n=bt(this);const l=n===null||n===void 0?void 0:n.u;if(l&&!(l&8)&&l&128&&o!==s){const l=n.M;const i=(c=e.A)===null||c===void 0?void 0:c[t];i===null||i===void 0?void 0:i.forEach((e=>{if(l[e]!=null){l[e].call(l,o,s,t)}}))}return}this[i]=o===null&&typeof this[i]==="boolean"?false:o}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=e.A)!==null&&s!==void 0?s:{}),...o.filter((([t,e])=>e[0]&15)).map((([t,s])=>{var l;const o=s[1]||t;n.set(o,t);if(s[0]&512){(l=e.k)===null||l===void 0?void 0:l.push([t,o])}return o}))]))}}return t};const it=async(t,e,n,s)=>{let l;if((e.u&32)===0){e.u|=32;const s=n.T;if(s){l=kt(n);if(l.then){const t=i();l=await l;t()}if(!l.isProxied){{n.A=l.watchers}ct(l,n,2);l.isProxied=true}const t=c("createInstance",n.S);{e.u|=8}try{new l(e)}catch(t){St(t)}{e.u&=~8}{e.u|=128}t();ft(e.M)}else{l=t.constructor;customElements.whenDefined(n.S).then((()=>e.u|=128))}if(l.style){let t=l.style;const e=L(n);if(!Ot.has(e)){const s=c("registerStyles",n.S);E(e,t,!!(n.u&1));s()}}}const o=e.C;const f=()=>J(e,true);if(o&&o["s-rc"]){o["s-rc"].push(f)}else{f()}};const ft=t=>{{nt(t,"connectedCallback")}};const rt=t=>{if((Mt.u&1)===0){const e=bt(t);const n=e.$;const s=c("connectedCallback",n.S);if(!(e.u&1)){e.u|=1;{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){G(e,e.C=n);break}}}if(n.W){Object.entries(n.W).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{it(t,e,n)}}else{vt(t,e,n.D);if(e===null||e===void 0?void 0:e.M){ft(e.M)}else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>ft(e.M)))}}s()}};const ut=t=>{{nt(t,"disconnectedCallback")}};const at=async t=>{if((Mt.u&1)===0){const e=bt(t);{if(e.H){e.H.map((t=>t()));e.H=undefined}}if(e===null||e===void 0?void 0:e.M){ut(e.M)}else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>ut(e.M)))}}};const dt=(t,e={})=>{var n;const s=c();const l=[];const o=e.exclude||[];const i=Ct.customElements;const u=xt.head;const a=u.querySelector("meta[charset]");const d=xt.createElement("style");const v=[];let p;let y=true;Object.assign(Mt,e);Mt.q=new URL(e.resourcesUrl||"./",xt.baseURI).href;let m=false;t.map((t=>{t[1].map((e=>{var n;const s={u:e[0],S:e[1],W:e[2],D:e[3]};if(s.u&4){m=true}{s.W=e[2]}{s.D=e[3]}{s.k=[]}{s.A=(n=e[4])!==null&&n!==void 0?n:{}}const c=s.S;const f=class extends HTMLElement{constructor(t){super(t);t=this;$t(t,s);if(s.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(p){clearTimeout(p);p=null}if(y){v.push(this)}else{Mt.jmp((()=>rt(this)))}}disconnectedCallback(){Mt.jmp((()=>at(this)))}componentOnReady(){return bt(this).F}};s.T=t[0];if(!o.includes(c)&&!i.get(c)){l.push(c);i.define(c,ct(f,s,1))}}))}));if(l.length>0){if(m){d.textContent+=r}{d.textContent+=l+f}if(d.innerHTML.length){d.setAttribute("data-styles","");const t=(n=Mt.m)!==null&&n!==void 0?n:h(xt);if(t!=null){d.setAttribute("nonce",t)}u.insertBefore(d,a?a.nextSibling:u.firstChild)}}y=false;if(v.length){v.map((t=>t.connectedCallback()))}else{{Mt.jmp((()=>p=setTimeout(et,30)))}}s()};const vt=(t,e,n,s)=>{if(n){n.map((([n,s,l])=>{const o=t;const c=pt(e,l);const i=yt(n);Mt.ael(o,s,c,i);(e.H=e.H||[]).push((()=>Mt.rel(o,s,c,i)))}))}};const pt=(t,e)=>n=>{try{{if(t.u&256){t.M[e](n)}else{(t.P=t.P||[]).push([e,n])}}}catch(t){St(t)}};const yt=t=>Et?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;const ht=t=>Mt.m=t;const mt=new WeakMap;const bt=t=>mt.get(t);const wt=(t,e)=>mt.set(e.M=t,e);const $t=(t,e)=>{const n={u:0,$hostElement$:t,$:e,U:new Map};{n.N=new Promise((t=>n.L=t))}{n.F=new Promise((t=>n.R=t));t["s-p"]=[];t["s-rc"]=[]}vt(t,n,e.D);return mt.set(t,n)};const gt=(t,e)=>e in t;const St=(t,e)=>(0,console.error)(t,e);const jt=new Map;const kt=(t,e,n)=>{const s=t.S.replace(/-/g,"_");const l=t.T;const o=jt.get(l);if(o){return o[s]} -/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((t=>{{jt.set(l,t)}return t[s]}),St)};const Ot=new Map;const Ct=typeof window!=="undefined"?window:{};const xt=Ct.document||{head:{}};const Mt={u:0,q:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Et=(()=>{let t=false;try{xt.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=true}}))}catch(t){}return t})();const Pt=t=>Promise.resolve(t);const Rt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Lt=[];const Ut=[];const Wt=(t,e)=>n=>{t.push(n);if(!o){o=true;if(e&&Mt.u&4){Tt(Nt)}else{Mt.raf(Nt)}}};const At=t=>{for(let e=0;e{At(Lt);{At(Ut);if(o=Lt.length>0){Mt.raf(Nt)}}};const Tt=t=>Pt().then(t);const Dt=Wt(Ut,true);export{w as H,dt as b,C as c,O as g,m as h,Pt as p,wt as r,ht as s}; -//# sourceMappingURL=p-20919029.js.map \ No newline at end of file +const t="catalyst";let e;let n;let s=false;let l=false;let o=false;const c=(t,e="")=>{{return()=>{}}};const i=(t,e)=>{{return()=>{}}};const f="{visibility:hidden}.hydrated{visibility:inherit}";const r="slot-fb{display:contents}slot-fb[hidden]{display:none}";const u="http://www.w3.org/1999/xlink";const a={};const d="http://www.w3.org/2000/svg";const v="http://www.w3.org/1999/xhtml";const p=t=>t!=null;const y=t=>{t=typeof t;return t==="object"||t==="function"};function h(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const m=(t,e,...n)=>{let s=null;let l=null;let o=false;let c=false;const i=[];const f=e=>{for(let n=0;nt[e])).join(" ")}}}if(typeof t==="function"){return t(e===null?{}:e,i,g)}const r=b(t,null);r.l=e;if(i.length>0){r.o=i}{r.i=l}return r};const b=(t,e)=>{const n={u:0,v:t,t:e,p:null,o:null};{n.l=null}{n.i=null}return n};const w={};const $=t=>t&&t.v===w;const g={forEach:(t,e)=>t.map(S).forEach(e),map:(t,e)=>t.map(S).map(e).map(j)};const S=t=>({vattrs:t.l,vchildren:t.o,vkey:t.i,vname:t.h,vtag:t.v,vtext:t.t});const j=t=>{if(typeof t.vtag==="function"){const e=Object.assign({},t.vattrs);if(t.vkey){e.key=t.vkey}if(t.vname){e.name=t.vname}return m(t.vtag,e,...t.vchildren||[])}const e=b(t.vtag,t.vtext);e.l=t.vattrs;e.o=t.vchildren;e.i=t.vkey;e.h=t.vname;return e};const k=(t,e)=>{if(t!=null&&!y(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const O=t=>wt(t).$hostElement$;const C=(t,e,n)=>{const s=O(t);return{emit:t=>x(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const x=(t,e,n)=>{const s=Et.ce(e,n);t.dispatchEvent(s);return s};const M=new WeakMap;const E=(t,e,n)=>{let s=Ct.get(t);if(Lt&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}Ct.set(t,s)};const P=(t,e,n)=>{var s;const l=L(e);const o=Ct.get(l);t=t.nodeType===11?t:Mt;if(o){if(typeof o==="string"){t=t.head||t;let n=M.get(t);let c;if(!n){M.set(t,n=new Set)}if(!n.has(l)){{c=Mt.createElement("style");c.innerHTML=o;const e=(s=Et.m)!==null&&s!==void 0?s:h(Mt);if(e!=null){c.setAttribute("nonce",e)}t.insertBefore(c,t.querySelector("link"))}if(e.u&4){c.innerHTML+=r}if(n){n.add(l)}}}else if(!t.adoptedStyleSheets.includes(o)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,o]}}return l};const R=t=>{const e=t.$;const n=t.$hostElement$;const s=e.u;const l=c("attachStyles",e.S);const o=P(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=o;n.classList.add(o+"-h")}l()};const L=(t,e)=>"sc-"+t.S;const U=(t,e,n,s,l,o)=>{if(n!==s){let c=St(t,e);let i=e.toLowerCase();if(e==="class"){const e=t.classList;const l=A(n);const o=A(s);e.remove(...l.filter((t=>t&&!o.includes(t))));e.add(...o.filter((t=>t&&!l.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(e==="ref"){if(s){s(t)}}else if(!c&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(St(xt,i)){e=i.slice(2)}else{e=i[2]+e.slice(3)}if(n||s){const l=e.endsWith(N);e=e.replace(T,"");if(n){Et.rel(t,e,n,l)}if(s){Et.ael(t,e,s,l)}}}else{const f=y(s);if((c||f&&s!==null)&&!l){try{if(!t.tagName.includes("-")){const l=s==null?"":s;if(e==="list"){c=false}else if(n==null||t[e]!=l){t[e]=l}}else{t[e]=s}}catch(t){}}let r=false;{if(i!==(i=i.replace(/^xlink\:?/,""))){e=i;r=true}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){if(r){t.removeAttributeNS(u,e)}else{t.removeAttribute(e)}}}else if((!c||o&4||l)&&!f){s=s===true?"":s;if(r){t.setAttributeNS(u,e,s)}else{t.setAttribute(e,s)}}}}};const W=/\s/;const A=t=>!t?[]:t.split(W);const N="Capture";const T=new RegExp(N+"$");const D=(t,e,n,s)=>{const l=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const o=t&&t.l||a;const c=e.l||a;{for(s in o){if(!(s in c)){U(l,s,o[s],undefined,n,e.u)}}}for(s in c){U(l,s,o[s],c[s],n,e.u)}};const F=(t,s,o,c)=>{const i=s.o[o];let f=0;let r;let u;if(i.t!==null){r=i.p=Mt.createTextNode(i.t)}else{if(!l){l=i.v==="svg"}r=i.p=Mt.createElementNS(l?d:v,i.v);if(l&&i.v==="foreignObject"){l=false}{D(null,i,l)}if(p(e)&&r["s-si"]!==e){r.classList.add(r["s-si"]=e)}if(i.o){for(f=0;f{let i=t;let f;if(i.shadowRoot&&i.tagName===n){i=i.shadowRoot}for(;o<=c;++o){if(l[o]){f=F(null,s,o);if(f){l[o].p=f;i.insertBefore(f,e)}}}};const q=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.p;z(e);if(t){t.remove()}}}};const I=(t,e,n,s,l=false)=>{let o=0;let c=0;let i=0;let f=0;let r=e.length-1;let u=e[0];let a=e[r];let d=s.length-1;let v=s[0];let p=s[d];let y;let h;while(o<=r&&c<=d){if(u==null){u=e[++o]}else if(a==null){a=e[--r]}else if(v==null){v=s[++c]}else if(p==null){p=s[--d]}else if(V(u,v,l)){_(u,v,l);u=e[++o];v=s[++c]}else if(V(a,p,l)){_(a,p,l);a=e[--r];p=s[--d]}else if(V(u,p,l)){_(u,p,l);t.insertBefore(u.p,a.p.nextSibling);u=e[++o];p=s[--d]}else if(V(a,v,l)){_(a,v,l);t.insertBefore(a.p,u.p);a=e[--r];v=s[++c]}else{i=-1;{for(f=o;f<=r;++f){if(e[f]&&e[f].i!==null&&e[f].i===v.i){i=f;break}}}if(i>=0){h=e[i];if(h.v!==v.v){y=F(e&&e[c],n,i)}else{_(h,v,l);e[i]=undefined;y=h.p}v=s[++c]}else{y=F(e&&e[c],n,c);v=s[++c]}if(y){{u.p.parentNode.insertBefore(y,u.p)}}}}if(o>r){H(t,s[d+1]==null?null:s[d+1].p,n,s,c,d)}else if(c>d){q(e,o,r)}};const V=(t,e,n=false)=>{if(t.v===e.v){if(!n){return t.i===e.i}return true}return false};const _=(t,e,n=false)=>{const o=e.p=t.p;const c=t.o;const i=e.o;const f=e.v;const r=e.t;if(r===null){{l=f==="svg"?true:f==="foreignObject"?false:l}{if(f==="slot"&&!s);else{D(t,e,l)}}if(c!==null&&i!==null){I(o,c,e,i,n)}else if(i!==null){if(t.t!==null){o.textContent=""}H(o,null,e,i,0,i.length-1)}else if(c!==null){q(c,0,c.length-1)}if(l&&f==="svg"){l=false}}else if(t.t!==r){o.data=r}};const z=t=>{{t.l&&t.l.ref&&t.l.ref(null);t.o&&t.o.map(z)}};const B=(t,l,o=false)=>{const c=t.$hostElement$;const i=t.$;const f=t.j||b(null,null);const r=$(l)?l:m(null,null,l);n=c.tagName;if(i.k){r.l=r.l||{};i.k.map((([t,e])=>r.l[e]=c[t]))}if(o&&r.l){for(const t of Object.keys(r.l)){if(c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){r.l[t]=c[t]}}}r.v=null;r.u|=4;t.j=r;r.p=f.p=c.shadowRoot||c;{e=c["s-sc"]}s=(i.u&1)!==0;_(f,r,o)};const G=(t,e)=>{if(e&&!t.O&&e["s-p"]){e["s-p"].push(new Promise((e=>t.O=e)))}};const J=(t,e)=>{{t.u|=16}if(t.u&4){t.u|=512;return}G(t,t.C);const n=()=>K(t,e);return Ft(n)};const K=(t,e)=>{const n=c("scheduleUpdate",t.$.S);const s=t.M;let l;if(e){{t.u|=256;if(t.P){t.P.map((([t,e])=>nt(s,t,e)));t.P=undefined}}{l=nt(s,"componentWillLoad")}}{l=Q(l,(()=>nt(s,"componentWillRender")))}n();return Q(l,(()=>Y(t,s,e)))};const Q=(t,e)=>X(t)?t.then(e):e();const X=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const Y=async(t,e,n)=>{var s;const l=t.$hostElement$;const o=c("update",t.$.S);const i=l["s-rc"];if(n){R(t)}const f=c("render",t.$.S);{Z(t,e,l,n)}if(i){i.map((t=>t()));l["s-rc"]=undefined}f();o();{const e=(s=l["s-p"])!==null&&s!==void 0?s:[];const n=()=>tt(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.u|=4;e.length=0}}};const Z=(t,e,n,s)=>{try{e=e.render();{t.u&=~16}{t.u|=2}{{{B(t,e,s)}}}}catch(e){jt(e,t.$hostElement$)}return null};const tt=t=>{const e=t.$.S;const n=t.$hostElement$;const s=c("postUpdate",e);const l=t.M;const o=t.C;{nt(l,"componentDidRender")}if(!(t.u&64)){t.u|=64;{st(n)}{nt(l,"componentDidLoad")}s();{t.R(n);if(!o){et()}}}else{s()}{t.L(n)}{if(t.O){t.O();t.O=undefined}if(t.u&512){Dt((()=>J(t,false)))}t.u&=~(4|512)}};const et=e=>{{st(Mt.documentElement)}Dt((()=>x(xt,"appload",{detail:{namespace:t}})))};const nt=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){jt(t)}}return undefined};const st=t=>t.classList.add("hydrated");const lt=(t,e)=>wt(t).U.get(e);const ot=(t,e,n,s)=>{const l=wt(t);const o=l.$hostElement$;const c=l.U.get(e);const i=l.u;const f=l.M;n=k(n,s.W[e][0]);const r=Number.isNaN(c)&&Number.isNaN(n);const u=n!==c&&!r;if((!(i&8)||c===undefined)&&u){l.U.set(e,n);if(f){if(s.A&&i&128){const t=s.A[e];if(t){t.map((t=>{try{f[t](n,c,e)}catch(t){jt(t,o)}}))}}if((i&(2|16))===2){J(l,false)}}}};const ct=(t,e,n)=>{var s;const l=t.prototype;if(e.W){if(t.watchers){e.A=t.watchers}const o=Object.entries(e.W);o.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(l,t,{get(){return lt(this,t)},set(n){ot(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(l,t,{value(...e){var n;const s=wt(this);return(n=s===null||s===void 0?void 0:s.N)===null||n===void 0?void 0:n.then((()=>{var n;return(n=s.M)===null||n===void 0?void 0:n[t](...e)}))}})}}));if(n&1){const n=new Map;l.attributeChangedCallback=function(t,s,o){Et.jmp((()=>{var c;const i=n.get(t);if(this.hasOwnProperty(i)){o=this[i];delete this[i]}else if(l.hasOwnProperty(i)&&typeof this[i]==="number"&&this[i]==o){return}else if(i==null){const n=wt(this);const l=n===null||n===void 0?void 0:n.u;if(l&&!(l&8)&&l&128&&o!==s){const l=n.M;const i=(c=e.A)===null||c===void 0?void 0:c[t];i===null||i===void 0?void 0:i.forEach((e=>{if(l[e]!=null){l[e].call(l,o,s,t)}}))}return}this[i]=o===null&&typeof this[i]==="boolean"?false:o}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=e.A)!==null&&s!==void 0?s:{}),...o.filter((([t,e])=>e[0]&15)).map((([t,s])=>{var l;const o=s[1]||t;n.set(o,t);if(s[0]&512){(l=e.k)===null||l===void 0?void 0:l.push([t,o])}return o}))]))}}return t};const it=async(t,e,n,s)=>{let l;if((e.u&32)===0){e.u|=32;const s=n.T;if(s){l=Ot(n);if(l.then){const t=i();l=await l;t()}if(!l.isProxied){{n.A=l.watchers}ct(l,n,2);l.isProxied=true}const t=c("createInstance",n.S);{e.u|=8}try{new l(e)}catch(t){jt(t)}{e.u&=~8}{e.u|=128}t();ft(e.M)}else{l=t.constructor;customElements.whenDefined(n.S).then((()=>e.u|=128))}if(l.style){let t=l.style;const e=L(n);if(!Ct.has(e)){const s=c("registerStyles",n.S);E(e,t,!!(n.u&1));s()}}}const o=e.C;const f=()=>J(e,true);if(o&&o["s-rc"]){o["s-rc"].push(f)}else{f()}};const ft=t=>{{nt(t,"connectedCallback")}};const rt=t=>{if((Et.u&1)===0){const e=wt(t);const n=e.$;const s=c("connectedCallback",n.S);if(!(e.u&1)){e.u|=1;{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){G(e,e.C=n);break}}}if(n.W){Object.entries(n.W).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{it(t,e,n)}}else{vt(t,e,n.D);if(e===null||e===void 0?void 0:e.M){ft(e.M)}else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>ft(e.M)))}}s()}};const ut=t=>{{nt(t,"disconnectedCallback")}};const at=async t=>{if((Et.u&1)===0){const e=wt(t);{if(e.H){e.H.map((t=>t()));e.H=undefined}}if(e===null||e===void 0?void 0:e.M){ut(e.M)}else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>ut(e.M)))}}};const dt=(t,e={})=>{var n;const s=c();const l=[];const o=e.exclude||[];const i=xt.customElements;const u=Mt.head;const a=u.querySelector("meta[charset]");const d=Mt.createElement("style");const v=[];let p;let y=true;Object.assign(Et,e);Et.q=new URL(e.resourcesUrl||"./",Mt.baseURI).href;let m=false;t.map((t=>{t[1].map((e=>{var n;const s={u:e[0],S:e[1],W:e[2],D:e[3]};if(s.u&4){m=true}{s.W=e[2]}{s.D=e[3]}{s.k=[]}{s.A=(n=e[4])!==null&&n!==void 0?n:{}}const c=s.S;const f=class extends HTMLElement{constructor(t){super(t);t=this;gt(t,s);if(s.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(p){clearTimeout(p);p=null}if(y){v.push(this)}else{Et.jmp((()=>rt(this)))}}disconnectedCallback(){Et.jmp((()=>at(this)))}componentOnReady(){return wt(this).F}};s.T=t[0];if(!o.includes(c)&&!i.get(c)){l.push(c);i.define(c,ct(f,s,1))}}))}));if(l.length>0){if(m){d.textContent+=r}{d.textContent+=l+f}if(d.innerHTML.length){d.setAttribute("data-styles","");const t=(n=Et.m)!==null&&n!==void 0?n:h(Mt);if(t!=null){d.setAttribute("nonce",t)}u.insertBefore(d,a?a.nextSibling:u.firstChild)}}y=false;if(v.length){v.map((t=>t.connectedCallback()))}else{{Et.jmp((()=>p=setTimeout(et,30)))}}s()};const vt=(t,e,n,s)=>{if(n){n.map((([n,s,l])=>{const o=yt(t,n);const c=pt(e,l);const i=ht(n);Et.ael(o,s,c,i);(e.H=e.H||[]).push((()=>Et.rel(o,s,c,i)))}))}};const pt=(t,e)=>n=>{try{{if(t.u&256){t.M[e](n)}else{(t.P=t.P||[]).push([e,n])}}}catch(t){jt(t)}};const yt=(t,e)=>{if(e&8)return xt;return t};const ht=t=>Pt?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;const mt=t=>Et.m=t;const bt=new WeakMap;const wt=t=>bt.get(t);const $t=(t,e)=>bt.set(e.M=t,e);const gt=(t,e)=>{const n={u:0,$hostElement$:t,$:e,U:new Map};{n.N=new Promise((t=>n.L=t))}{n.F=new Promise((t=>n.R=t));t["s-p"]=[];t["s-rc"]=[]}vt(t,n,e.D);return bt.set(t,n)};const St=(t,e)=>e in t;const jt=(t,e)=>(0,console.error)(t,e);const kt=new Map;const Ot=(t,e,n)=>{const s=t.S.replace(/-/g,"_");const l=t.T;const o=kt.get(l);if(o){return o[s]} +/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${l}.entry.js${""}`).then((t=>{{kt.set(l,t)}return t[s]}),jt)};const Ct=new Map;const xt=typeof window!=="undefined"?window:{};const Mt=xt.document||{head:{}};const Et={u:0,q:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Pt=(()=>{let t=false;try{Mt.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=true}}))}catch(t){}return t})();const Rt=t=>Promise.resolve(t);const Lt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const Ut=[];const Wt=[];const At=(t,e)=>n=>{t.push(n);if(!o){o=true;if(e&&Et.u&4){Dt(Tt)}else{Et.raf(Tt)}}};const Nt=t=>{for(let e=0;e{Nt(Ut);{Nt(Wt);if(o=Ut.length>0){Et.raf(Tt)}}};const Dt=t=>Rt().then(t);const Ft=At(Wt,true);export{w as H,dt as b,C as c,O as g,m as h,Rt as p,$t as r,mt as s}; +//# sourceMappingURL=p-22f0435a.js.map \ No newline at end of file diff --git a/build/p-22f0435a.js.map b/build/p-22f0435a.js.map new file mode 100644 index 000000000..2a1196a18 --- /dev/null +++ b/build/p-22f0435a.js.map @@ -0,0 +1 @@ +{"version":3,"names":["NAMESPACE","scopeId","hostTagName","useNativeShadowDom","isSvgMode","queuePending","createTime","fnName","tagName","uniqueTime","key","measureText","HYDRATED_CSS","SLOT_FB_CSS","XLINK_NS","EMPTY_OBJ","SVG_NS","HTML_NS","isDef","v","isComplexType","o","queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","h","nodeName","vnodeData","children","child","simple","lastSimple","vNodeChildren","walk","c","i","length","Array","isArray","String","$text$","push","newVNode","classData","className","class","Object","keys","filter","k","join","vdomFnUtils","vnode","$attrs$","$children$","$key$","tag","text","$flags$","$tag$","$elm$","Host","isHost","node","forEach","cb","map","convertToPublic","convertToPrivate","vattrs","vchildren","vkey","vname","$name$","vtag","vtext","assign","name","parsePropertyValue","propValue","propType","parseFloat","getElement","ref","getHostRef","createEvent","flags","elm","emit","detail","emitEvent","bubbles","composed","cancelable","opts","ev","plt","ce","dispatchEvent","rootAppliedStyles","WeakMap","registerStyle","cssText","allowCS","style","styles","get","supportsConstructableStylesheets","CSSStyleSheet","replaceSync","set","addStyle","styleContainerNode","cmpMeta","mode","getScopeId","nodeType","appliedStyles","styleElm","Set","has","createElement","innerHTML","nonce","$nonce$","setAttribute","insertBefore","add","adoptedStyleSheets","includes","attachStyles","hostRef","$cmpMeta$","$hostElement$","endAttachStyles","$tagName$","shadowRoot","getRootNode","classList","cmp","setAccessor","memberName","oldValue","newValue","isSvg","isProp","isMemberInElement","ln","toLowerCase","oldClasses","parseClassList","newClasses","remove","prop","removeProperty","setProperty","slice","win","capture","endsWith","CAPTURE_EVENT_SUFFIX","replace","CAPTURE_EVENT_REGEX","rel","ael","isComplex","n","e","xlink","removeAttributeNS","removeAttribute","setAttributeNS","parseClassListRegex","value","split","RegExp","updateElement","oldVnode","newVnode","host","oldVnodeAttrs","newVnodeAttrs","createElm","oldParentVNode","newParentVNode","childIndex","parentElm","childNode","createTextNode","createElementNS","appendChild","addVnodes","before","parentVNode","vnodes","startIdx","endIdx","containerElm","removeVnodes","index","nullifyVNodeRefs","updateChildren","oldCh","newCh","isInitialRender","oldStartIdx","newStartIdx","idxInOld","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","elmToMove","isSameVnode","patch","nextSibling","parentNode","leftVNode","rightVNode","oldVNode","oldChildren","newChildren","textContent","data","vNode","renderVdom","renderFnResults","isInitialLoad","hostElm","$vnode$","rootVnode","$attrsToReflect$","propName","attribute","hasAttribute","attachToAncestor","ancestorComponent","$onRenderResolve$","Promise","r","scheduleUpdate","$ancestorComponent$","dispatch","dispatchHooks","writeTask","endSchedule","instance","$lazyInstance$","maybePromise","$queuedListeners$","methodName","event","safeCall","enqueue","updateComponent","fn","isPromisey","then","async","endUpdate","rc","endRender","callRender","childrenPromises","postUpdate","postUpdateComponent","all","render","consoleError","endPostUpdate","addHydratedFlag","$onReadyResolve$","appDidLoad","$onInstanceResolve$","nextTick","who","documentElement","namespace","method","arg","getValue","$instanceValues$","setValue","newVal","oldVal","$members$","areBothNaN","Number","isNaN","didValueChange","$watchers$","watchMethods","watchMethodName","proxyComponent","Cstr","prototype","watchers","members","entries","memberFlags","defineProperty","this","configurable","enumerable","args","$onInstancePromise$","attrNameToPropName","Map","attributeChangedCallback","attrName","jmp","hasOwnProperty","entry","callbackName","call","observedAttributes","from","_","m","initializeComponent","hmrVersionId","bundleId","$lazyBundleId$","loadModule","endLoad","isProxied","endNewInstance","fireConnectedCallback","constructor","customElements","whenDefined","endRegisterStyles","schedule","connectedCallback","endConnected","addHostEventListeners","$listeners$","$onReadyPromise$","disconnectInstance","disconnectedCallback","$rmListeners$","rmListener","bootstrapLazy","lazyBundles","options","endBootstrap","cmpTags","exclude","metaCharset","dataStyles","deferredConnectedCallbacks","appLoadFallback","isBootstrapping","$resourcesUrl$","URL","resourcesUrl","baseURI","href","hasSlotRelocation","lazyBundle","compactMeta","HostElement","HTMLElement","self","super","registerHost","attachShadow","clearTimeout","componentOnReady","define","firstChild","setTimeout","listeners","attachParentListeners","target","getHostListenerTarget","handler","hostListenerProxy","hostListenerOpts","supportsListenerOptions","passive","setNonce","hostRefs","registerInstance","lazyInstance","hostElement","el","console","error","cmpModules","exportName","module","import","importedModule","window","document","raf","requestAnimationFrame","eventName","listener","addEventListener","removeEventListener","CustomEvent","promiseResolve","resolve","queueDomReads","queueDomWrites","queueTask","queue","write","flush","consume","performance","now"],"sources":["@stencil/core/internal/app-data","../node_modules/.pnpm/@stencil+core@4.12.6/node_modules/@stencil/core/internal/client/index.js?app-data=conditional"],"sourcesContent":["export const NAMESPACE = 'catalyst';\nexport const BUILD = /* catalyst */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };\nexport const Env = /* catalyst */ {};\n","/**\n * Virtual DOM patching algorithm based on Snabbdom by\n * Simon Friis Vindum (@paldepind)\n * Licensed under the MIT License\n * https://github.com/snabbdom/snabbdom/blob/master/LICENSE\n *\n * Modified for Stencil's renderer and slot projection\n */\nlet scopeId;\nlet contentRef;\nlet hostTagName;\nlet customError;\nlet i = 0;\nlet useNativeShadowDom = false;\nlet checkSlotFallbackVisibility = false;\nlet checkSlotRelocate = false;\nlet isSvgMode = false;\nlet renderingRef = null;\nlet queueCongestion = 0;\nlet queuePending = false;\n/*\n Stencil Client Platform v4.12.6 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nconst Build = {\n isDev: BUILD.isDev ? true : false,\n isBrowser: true,\n isServer: false,\n isTesting: BUILD.isTesting ? true : false,\n};\nconst getAssetPath = (path) => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nconst setAssetPath = (path) => (plt.$resourcesUrl$ = path);\nconst createTime = (fnName, tagName = '') => {\n if (BUILD.profile && performance.mark) {\n const key = `st:${fnName}:${tagName}:${i++}`;\n // Start\n performance.mark(key);\n // End\n return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);\n }\n else {\n return () => {\n return;\n };\n }\n};\nconst uniqueTime = (key, measureText) => {\n if (BUILD.profile && performance.mark) {\n if (performance.getEntriesByName(key, 'mark').length === 0) {\n performance.mark(key);\n }\n return () => {\n if (performance.getEntriesByName(measureText, 'measure').length === 0) {\n performance.measure(measureText, key);\n }\n };\n }\n else {\n return () => {\n return;\n };\n }\n};\nconst inspect = (ref) => {\n const hostRef = getHostRef(ref);\n if (!hostRef) {\n return undefined;\n }\n const flags = hostRef.$flags$;\n const hostElement = hostRef.$hostElement$;\n return {\n renderCount: hostRef.$renderCount$,\n flags: {\n hasRendered: !!(flags & 2 /* HOST_FLAGS.hasRendered */),\n hasConnected: !!(flags & 1 /* HOST_FLAGS.hasConnected */),\n isWaitingForChildren: !!(flags & 4 /* HOST_FLAGS.isWaitingForChildren */),\n isConstructingInstance: !!(flags & 8 /* HOST_FLAGS.isConstructingInstance */),\n isQueuedForUpdate: !!(flags & 16 /* HOST_FLAGS.isQueuedForUpdate */),\n hasInitializedComponent: !!(flags & 32 /* HOST_FLAGS.hasInitializedComponent */),\n hasLoadedComponent: !!(flags & 64 /* HOST_FLAGS.hasLoadedComponent */),\n isWatchReady: !!(flags & 128 /* HOST_FLAGS.isWatchReady */),\n isListenReady: !!(flags & 256 /* HOST_FLAGS.isListenReady */),\n needsRerender: !!(flags & 512 /* HOST_FLAGS.needsRerender */),\n },\n instanceValues: hostRef.$instanceValues$,\n ancestorComponent: hostRef.$ancestorComponent$,\n hostElement,\n lazyInstance: hostRef.$lazyInstance$,\n vnode: hostRef.$vnode$,\n modeName: hostRef.$modeName$,\n onReadyPromise: hostRef.$onReadyPromise$,\n onReadyResolve: hostRef.$onReadyResolve$,\n onInstancePromise: hostRef.$onInstancePromise$,\n onInstanceResolve: hostRef.$onInstanceResolve$,\n onRenderResolve: hostRef.$onRenderResolve$,\n queuedListeners: hostRef.$queuedListeners$,\n rmListeners: hostRef.$rmListeners$,\n ['s-id']: hostElement['s-id'],\n ['s-cr']: hostElement['s-cr'],\n ['s-lr']: hostElement['s-lr'],\n ['s-p']: hostElement['s-p'],\n ['s-rc']: hostElement['s-rc'],\n ['s-sc']: hostElement['s-sc'],\n };\n};\nconst installDevTools = () => {\n if (BUILD.devTools) {\n const stencil = (win.stencil = win.stencil || {});\n const originalInspect = stencil.inspect;\n stencil.inspect = (ref) => {\n let result = inspect(ref);\n if (!result && typeof originalInspect === 'function') {\n result = originalInspect(ref);\n }\n return result;\n };\n }\n};\nconst CONTENT_REF_ID = 'r';\nconst ORG_LOCATION_ID = 'o';\nconst SLOT_NODE_ID = 's';\nconst TEXT_NODE_ID = 't';\nconst HYDRATE_ID = 's-id';\nconst HYDRATED_STYLE_ID = 'sty-id';\nconst HYDRATE_CHILD_ID = 'c-id';\nconst HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';\n/**\n * Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.\n *\n * Two cascading rules must be used instead of a `:not()` selector due to Stencil browser\n * support as of Stencil v4.\n */\nconst SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';\nconst XLINK_NS = 'http://www.w3.org/1999/xlink';\nconst FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [\n 'formAssociatedCallback',\n 'formResetCallback',\n 'formDisabledCallback',\n 'formStateRestoreCallback',\n];\n/**\n * Default style mode id\n */\n/**\n * Reusable empty obj/array\n * Don't add values to these!!\n */\nconst EMPTY_OBJ = {};\n/**\n * Namespaces\n */\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst HTML_NS = 'http://www.w3.org/1999/xhtml';\nconst isDef = (v) => v != null;\n/**\n * Check whether a value is a 'complex type', defined here as an object or a\n * function.\n *\n * @param o the value to check\n * @returns whether it's a complex type or not\n */\nconst isComplexType = (o) => {\n // https://jsperf.com/typeof-fn-object/5\n o = typeof o;\n return o === 'object' || o === 'function';\n};\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n/**\n * Production h() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;\nconst h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let slotName = null;\n let simple = false;\n let lastSimple = false;\n const vNodeChildren = [];\n const walk = (c) => {\n for (let i = 0; i < c.length; i++) {\n child = c[i];\n if (Array.isArray(child)) {\n walk(child);\n }\n else if (child != null && typeof child !== 'boolean') {\n if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {\n child = String(child);\n }\n else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {\n consoleDevError(`vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects.`);\n }\n if (simple && lastSimple) {\n // If the previous child was simple (string), we merge both\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n }\n else {\n // Append a new vNode, if it's text, we create a text vNode\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n if (BUILD.isDev && nodeName === 'input') {\n validateInputProperties(vnodeData);\n }\n if (BUILD.vdomKey && vnodeData.key) {\n key = vnodeData.key;\n }\n if (BUILD.slotRelocation && vnodeData.name) {\n slotName = vnodeData.name;\n }\n // normalize class / className attributes\n if (BUILD.vdomClass) {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class =\n typeof classData !== 'object'\n ? classData\n : Object.keys(classData)\n .filter((k) => classData[k])\n .join(' ');\n }\n }\n }\n if (BUILD.isDev && vNodeChildren.some(isHost)) {\n consoleDevError(`The must be the single root component. Make sure:\n- You are NOT using hostData() and in the same component.\n- is used once, and it's the single root component of the render() function.`);\n }\n if (BUILD.vdomFunctional && typeof nodeName === 'function') {\n // nodeName is a functional component\n return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = key;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = slotName;\n }\n return vnode;\n};\n/**\n * A utility function for creating a virtual DOM node from a tag and some\n * possible text content.\n *\n * @param tag the tag for this element\n * @param text possible text content for the node\n * @returns a newly-minted virtual DOM node\n */\nconst newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null,\n };\n if (BUILD.vdomAttribute) {\n vnode.$attrs$ = null;\n }\n if (BUILD.vdomKey) {\n vnode.$key$ = null;\n }\n if (BUILD.slotRelocation) {\n vnode.$name$ = null;\n }\n return vnode;\n};\nconst Host = {};\n/**\n * Check whether a given node is a Host node or not\n *\n * @param node the virtual DOM node to check\n * @returns whether it's a Host node or not\n */\nconst isHost = (node) => node && node.$tag$ === Host;\n/**\n * Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.\n *\n * Note that these functions convert from {@link d.VNode} to\n * {@link d.ChildNode} to give functional component developers a friendly\n * interface.\n */\nconst vdomFnUtils = {\n forEach: (children, cb) => children.map(convertToPublic).forEach(cb),\n map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),\n};\n/**\n * Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a\n * friendlier public interface (hence, 'convertToPublic').\n *\n * @param node the virtual DOM node to convert\n * @returns a converted child node\n */\nconst convertToPublic = (node) => ({\n vattrs: node.$attrs$,\n vchildren: node.$children$,\n vkey: node.$key$,\n vname: node.$name$,\n vtag: node.$tag$,\n vtext: node.$text$,\n});\n/**\n * Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in\n * order to use the resulting object in the virtual DOM. The initial object was\n * likely created as part of presenting a public API, so converting it back\n * involved making it 'private' again (hence, `convertToPrivate`).\n *\n * @param node the child node to convert\n * @returns a converted virtual DOM node\n */\nconst convertToPrivate = (node) => {\n if (typeof node.vtag === 'function') {\n const vnodeData = Object.assign({}, node.vattrs);\n if (node.vkey) {\n vnodeData.key = node.vkey;\n }\n if (node.vname) {\n vnodeData.name = node.vname;\n }\n return h(node.vtag, vnodeData, ...(node.vchildren || []));\n }\n const vnode = newVNode(node.vtag, node.vtext);\n vnode.$attrs$ = node.vattrs;\n vnode.$children$ = node.vchildren;\n vnode.$key$ = node.vkey;\n vnode.$name$ = node.vname;\n return vnode;\n};\n/**\n * Validates the ordering of attributes on an input element\n *\n * @param inputElm the element to validate\n */\nconst validateInputProperties = (inputElm) => {\n const props = Object.keys(inputElm);\n const value = props.indexOf('value');\n if (value === -1) {\n return;\n }\n const typeIndex = props.indexOf('type');\n const minIndex = props.indexOf('min');\n const maxIndex = props.indexOf('max');\n const stepIndex = props.indexOf('step');\n if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {\n consoleDevWarn(`The \"value\" prop of should be set after \"min\", \"max\", \"type\" and \"step\"`);\n }\n};\n/**\n * Entrypoint of the client-side hydration process. Facilitates calls to hydrate the\n * document and all its nodes.\n *\n * This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.\n *\n * @param hostElm The element to hydrate.\n * @param tagName The element's tag name.\n * @param hostId The host ID assigned to the element by the server.\n * @param hostRef The host reference for the element.\n */\nconst initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {\n const endHydrate = createTime('hydrateClient', tagName);\n const shadowRoot = hostElm.shadowRoot;\n const childRenderNodes = [];\n const slotNodes = [];\n const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;\n const vnode = (hostRef.$vnode$ = newVNode(tagName, null));\n if (!plt.$orgLocNodes$) {\n initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));\n }\n hostElm[HYDRATE_ID] = hostId;\n hostElm.removeAttribute(HYDRATE_ID);\n clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);\n childRenderNodes.map((c) => {\n const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;\n const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);\n const node = c.$elm$;\n // Put the node back in its original location since the native Shadow DOM\n // can handle rendering it its correct location now\n if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {\n orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);\n }\n if (!shadowRoot) {\n node['s-hn'] = tagName;\n if (orgLocationNode) {\n node['s-ol'] = orgLocationNode;\n node['s-ol']['s-nr'] = node;\n }\n }\n plt.$orgLocNodes$.delete(orgLocationId);\n });\n if (BUILD.shadowDom && shadowRoot) {\n shadowRootNodes.map((shadowRootNode) => {\n if (shadowRootNode) {\n shadowRoot.appendChild(shadowRootNode);\n }\n });\n }\n endHydrate();\n};\n/**\n * Recursively constructs the virtual node tree for a host element and its children.\n * The tree is constructed by parsing the annotations set on the nodes by the server.\n *\n * In addition to constructing the vNode tree, we also track information about the node's\n * descendants like which are slots, which should exist in the shadow root, and which\n * are nodes that should be rendered as children of the parent node.\n *\n * @param parentVNode The vNode representing the parent node.\n * @param childRenderNodes An array of all child nodes in the parent's node tree.\n * @param slotNodes An array of all slot nodes in the parent's node tree.\n * @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.\n * @param hostElm The parent element.\n * @param node The node to construct the vNode tree for.\n * @param hostId The host ID assigned to the element by the server.\n */\nconst clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {\n let childNodeType;\n let childIdSplt;\n let childVNode;\n let i;\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n childNodeType = node.getAttribute(HYDRATE_CHILD_ID);\n if (childNodeType) {\n // got the node data from the element's attribute\n // `${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = childNodeType.split('.');\n if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[0],\n $nodeId$: childIdSplt[1],\n $depth$: childIdSplt[2],\n $index$: childIdSplt[3],\n $tag$: node.tagName.toLowerCase(),\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $text$: null,\n };\n childRenderNodes.push(childVNode);\n node.removeAttribute(HYDRATE_CHILD_ID);\n // this is a new child vnode\n // so ensure its parent vnode has the vchildren array\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n // add our child vnode to a specific index of the vnode's children\n parentVNode.$children$[childVNode.$index$] = childVNode;\n // this is now the new parent vnode for all the next child checks\n parentVNode = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n // recursively drill down, end to start so we can remove nodes\n for (i = node.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);\n }\n if (node.shadowRoot) {\n // keep drilling down through the shadow root nodes\n for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);\n }\n }\n }\n else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {\n // comment node for either the host id or a 0 host id\n childNodeType = childIdSplt[0];\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[1],\n $nodeId$: childIdSplt[2],\n $depth$: childIdSplt[3],\n $index$: childIdSplt[4],\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $tag$: null,\n $text$: null,\n };\n if (childNodeType === TEXT_NODE_ID) {\n childVNode.$elm$ = node.nextSibling;\n if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {\n childVNode.$text$ = childVNode.$elm$.textContent;\n childRenderNodes.push(childVNode);\n // remove the text comment since it's no longer needed\n node.remove();\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n else if (childVNode.$hostId$ === hostId) {\n // this comment node is specifically for this host id\n if (childNodeType === SLOT_NODE_ID) {\n // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;\n childVNode.$tag$ = 'slot';\n if (childIdSplt[5]) {\n node['s-sn'] = childVNode.$name$ = childIdSplt[5];\n }\n else {\n node['s-sn'] = '';\n }\n node['s-sr'] = true;\n if (BUILD.shadowDom && shadowRootNodes) {\n // browser support shadowRoot and this is a shadow dom component\n // create an actual slot element\n childVNode.$elm$ = doc.createElement(childVNode.$tag$);\n if (childVNode.$name$) {\n // add the slot name attribute\n childVNode.$elm$.setAttribute('name', childVNode.$name$);\n }\n // insert the new slot element before the slot comment\n node.parentNode.insertBefore(childVNode.$elm$, node);\n // remove the slot comment since it's not needed for shadow\n node.remove();\n if (childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n slotNodes.push(childVNode);\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n }\n else if (childNodeType === CONTENT_REF_ID) {\n // `${CONTENT_REF_ID}.${hostId}`;\n if (BUILD.shadowDom && shadowRootNodes) {\n // remove the content ref comment since it's not needed for shadow\n node.remove();\n }\n else if (BUILD.slotRelocation) {\n hostElm['s-cr'] = node;\n node['s-cn'] = true;\n }\n }\n }\n }\n }\n else if (parentVNode && parentVNode.$tag$ === 'style') {\n const vnode = newVNode(null, node.textContent);\n vnode.$elm$ = node;\n vnode.$index$ = '0';\n parentVNode.$children$ = [vnode];\n }\n};\n/**\n * Recursively locate any comments representing an original location for a node in a node's\n * children or shadowRoot children.\n *\n * @param node The node to search.\n * @param orgLocNodes A map of the original location annotation and the current node being searched.\n */\nconst initializeDocumentHydrate = (node, orgLocNodes) => {\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n let i = 0;\n for (; i < node.childNodes.length; i++) {\n initializeDocumentHydrate(node.childNodes[i], orgLocNodes);\n }\n if (node.shadowRoot) {\n for (i = 0; i < node.shadowRoot.childNodes.length; i++) {\n initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);\n }\n }\n }\n else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n const childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[0] === ORG_LOCATION_ID) {\n orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);\n node.nodeValue = '';\n // useful to know if the original location is\n // the root light-dom of a shadow dom component\n node['s-en'] = childIdSplt[3];\n }\n }\n};\n// Private\nconst computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);\n// Public\nconst setMode = (handler) => modeResolutionChain.push(handler);\nconst getMode = (ref) => getHostRef(ref).$modeName$;\n/**\n * Parse a new property value for a given property type.\n *\n * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,\n * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:\n * 1. `any`, the type given to `propValue` in the function signature\n * 2. the type stored from `propType`.\n *\n * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.\n *\n * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to\n * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is\n * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.\n * ```tsx\n * \n * ```\n *\n * HTML prop values on the other hand, will always a string\n *\n * @param propValue the new value to coerce to some type\n * @param propType the type of the prop, expressed as a binary number\n * @returns the parsed/coerced value\n */\nconst parsePropertyValue = (propValue, propType) => {\n // ensure this value is of the correct prop type\n if (propValue != null && !isComplexType(propValue)) {\n if (BUILD.propBoolean && propType & 4 /* MEMBER_FLAGS.Boolean */) {\n // per the HTML spec, any string value means it is a boolean true value\n // but we'll cheat here and say that the string \"false\" is the boolean false\n return propValue === 'false' ? false : propValue === '' || !!propValue;\n }\n if (BUILD.propNumber && propType & 2 /* MEMBER_FLAGS.Number */) {\n // force it to be a number\n return parseFloat(propValue);\n }\n if (BUILD.propString && propType & 1 /* MEMBER_FLAGS.String */) {\n // could have been passed as a number or boolean\n // but we still want it as a string\n return String(propValue);\n }\n // redundant return here for better minification\n return propValue;\n }\n // not sure exactly what type we want\n // so no need to change to a different type\n return propValue;\n};\nconst getElement = (ref) => (BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref);\nconst createEvent = (ref, name, flags) => {\n const elm = getElement(ref);\n return {\n emit: (detail) => {\n if (BUILD.isDev && !elm.isConnected) {\n consoleDevWarn(`The \"${name}\" event was emitted, but the dispatcher node is no longer connected to the dom.`);\n }\n return emitEvent(elm, name, {\n bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),\n composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),\n cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),\n detail,\n });\n },\n };\n};\n/**\n * Helper function to create & dispatch a custom Event on a provided target\n * @param elm the target of the Event\n * @param name the name to give the custom Event\n * @param opts options for configuring a custom Event\n * @returns the custom Event\n */\nconst emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nconst rootAppliedStyles = /*@__PURE__*/ new WeakMap();\nconst registerStyle = (scopeId, cssText, allowCS) => {\n let style = styles.get(scopeId);\n if (supportsConstructableStylesheets && allowCS) {\n style = (style || new CSSStyleSheet());\n if (typeof style === 'string') {\n style = cssText;\n }\n else {\n style.replaceSync(cssText);\n }\n }\n else {\n style = cssText;\n }\n styles.set(scopeId, style);\n};\nconst addStyle = (styleContainerNode, cmpMeta, mode) => {\n var _a;\n const scopeId = getScopeId(cmpMeta, mode);\n const style = styles.get(scopeId);\n if (!BUILD.attachStyles) {\n return scopeId;\n }\n // if an element is NOT connected then getRootNode() will return the wrong root node\n // so the fallback is to always use the document for the root node in those cases\n styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;\n if (style) {\n if (typeof style === 'string') {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));\n }\n if (!appliedStyles.has(scopeId)) {\n if (BUILD.hydrateClientSide &&\n styleContainerNode.host &&\n (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}=\"${scopeId}\"]`))) {\n // This is only happening on native shadow-dom, do not needs CSS var shim\n styleElm.innerHTML = style;\n }\n else {\n styleElm = doc.createElement('style');\n styleElm.innerHTML = style;\n // Apply CSP nonce to the style tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n styleElm.setAttribute('nonce', nonce);\n }\n if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {\n styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);\n }\n styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));\n }\n // Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM\n if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {\n styleElm.innerHTML += SLOT_FB_CSS;\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId);\n }\n }\n }\n else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];\n }\n }\n return scopeId;\n};\nconst attachStyles = (hostRef) => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);\n const scopeId = addStyle(BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$);\n if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n // DOM WRITE!!\n elm['s-sc'] = scopeId;\n elm.classList.add(scopeId + '-h');\n if (BUILD.scoped && flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n elm.classList.add(scopeId + '-s');\n }\n }\n endAttachStyles();\n};\nconst getScopeId = (cmp, mode) => 'sc-' + (BUILD.mode && mode && cmp.$flags$ & 32 /* CMP_FLAGS.hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);\nconst convertScopedToShadow = (css) => css.replace(/\\/\\*!@([^\\/]+)\\*\\/[^\\{]+\\{/g, '$1{');\n/**\n * Production setAccessor() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n/**\n * When running a VDom render set properties present on a VDom node onto the\n * corresponding HTML element.\n *\n * Note that this function has special functionality for the `class`,\n * `style`, `key`, and `ref` attributes, as well as event handlers (like\n * `onClick`, etc). All others are just passed through as-is.\n *\n * @param elm the HTMLElement onto which attributes should be set\n * @param memberName the name of the attribute to set\n * @param oldValue the old value for the attribute\n * @param newValue the new value for the attribute\n * @param isSvg whether we're in an svg context or not\n * @param flags bitflags for Vdom variables\n */\nconst setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {\n if (oldValue !== newValue) {\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (BUILD.vdomClass && memberName === 'class') {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n const newClasses = parseClassList(newValue);\n classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));\n }\n else if (BUILD.vdomStyle && memberName === 'style') {\n // update style attribute, css properties and values\n if (BUILD.updatable) {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.removeProperty(prop);\n }\n else {\n elm.style[prop] = '';\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (!BUILD.hydrateServerSide && prop.includes('-')) {\n elm.style.setProperty(prop, newValue[prop]);\n }\n else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n }\n else if (BUILD.vdomKey && memberName === 'key')\n ;\n else if (BUILD.vdomRef && memberName === 'ref') {\n // minifier will clean this up\n if (newValue) {\n newValue(elm);\n }\n }\n else if (BUILD.vdomListener &&\n (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&\n memberName[0] === 'o' &&\n memberName[1] === 'n') {\n // Event Handlers\n // so if the member name starts with \"on\" and the 3rd characters is\n // a capital letter, and it's not already a member on the element,\n // then we're assuming it's an event listener\n if (memberName[2] === '-') {\n // on- prefixed events\n // allows to be explicit about the dom event to listen without any magic\n // under the hood:\n // // listens for \"click\"\n // // listens for \"Click\"\n // // listens for \"ionChange\"\n // // listens for \"EVENTS\"\n memberName = memberName.slice(3);\n }\n else if (isMemberInElement(win, ln)) {\n // standard event\n // the JSX attribute could have been \"onMouseOver\" and the\n // member name \"onmouseover\" is on the window's prototype\n // so let's add the listener \"mouseover\", which is all lowercased\n memberName = ln.slice(2);\n }\n else {\n // custom event\n // the JSX attribute could have been \"onMyCustomEvent\"\n // so let's trim off the \"on\" prefix and lowercase the first character\n // and add the listener \"myCustomEvent\"\n // except for the first character, we keep the event name case\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue || newValue) {\n // Need to account for \"capture\" events.\n // If the event name ends with \"Capture\", we'll update the name to remove\n // the \"Capture\" suffix and make sure the event listener is setup to handle the capture event.\n const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);\n // Make sure we only replace the last instance of \"Capture\"\n memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, capture);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, capture);\n }\n }\n }\n else if (BUILD.vdomPropOrAttr) {\n // Set property if it exists and it's not a SVG\n const isComplex = isComplexType(newValue);\n if ((isProp || (isComplex && newValue !== null)) && !isSvg) {\n try {\n if (!elm.tagName.includes('-')) {\n const n = newValue == null ? '' : newValue;\n // Workaround for Safari, moving the caret when re-assigning the same valued\n if (memberName === 'list') {\n isProp = false;\n }\n else if (oldValue == null || elm[memberName] != n) {\n elm[memberName] = n;\n }\n }\n else {\n elm[memberName] = newValue;\n }\n }\n catch (e) {\n /**\n * in case someone tries to set a read-only property, e.g. \"namespaceURI\", we just ignore it\n */\n }\n }\n /**\n * Need to manually update attribute if:\n * - memberName is not an attribute\n * - if we are rendering the host element in order to reflect attribute\n * - if it's a SVG, since properties might not work in \n * - if the newValue is null/undefined or 'false'.\n */\n let xlink = false;\n if (BUILD.vdomXlink) {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, ''))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === '') {\n if (BUILD.vdomXlink && xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n }\n else {\n elm.removeAttribute(memberName);\n }\n }\n }\n else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {\n newValue = newValue === true ? '' : newValue;\n if (BUILD.vdomXlink && xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n }\n else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n }\n};\nconst parseClassListRegex = /\\s/;\n/**\n * Parsed a string of classnames into an array\n * @param value className string, e.g. \"foo bar baz\"\n * @returns list of classes, e.g. [\"foo\", \"bar\", \"baz\"]\n */\nconst parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));\nconst CAPTURE_EVENT_SUFFIX = 'Capture';\nconst CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');\nconst updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {\n // if the element passed in is a shadow root, which is a document fragment\n // then we want to be adding attrs/props to the shadow root's \"host\" element\n // if it's not a shadow root, then we add attrs/props to the same element\n const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host\n ? newVnode.$elm$.host\n : newVnode.$elm$;\n const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;\n const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;\n if (BUILD.updatable) {\n // remove attributes no longer present on the vnode by setting them to undefined\n for (memberName in oldVnodeAttrs) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);\n }\n }\n }\n // add new & update changed attributes\n for (memberName in newVnodeAttrs) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);\n }\n};\n/**\n * Create a DOM Node corresponding to one of the children of a given VNode.\n *\n * @param oldParentVNode the parent VNode from the previous render\n * @param newParentVNode the parent VNode from the current render\n * @param childIndex the index of the VNode, in the _new_ parent node's\n * children, for which we will create a new DOM node\n * @param parentElm the parent DOM node which our new node will be a child of\n * @returns the newly created node\n */\nconst createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {\n // tslint:disable-next-line: prefer-const\n const newVNode = newParentVNode.$children$[childIndex];\n let i = 0;\n let elm;\n let childNode;\n let oldVNode;\n if (BUILD.slotRelocation && !useNativeShadowDom) {\n // remember for later we need to check to relocate nodes\n checkSlotRelocate = true;\n if (newVNode.$tag$ === 'slot') {\n if (scopeId) {\n // scoped css needs to add its scoped id to the parent element\n parentElm.classList.add(scopeId + '-s');\n }\n newVNode.$flags$ |= newVNode.$children$\n ? // slot element has fallback content\n 2 /* VNODE_FLAGS.isSlotFallback */\n : // slot element does not have fallback content\n 1 /* VNODE_FLAGS.isSlotReference */;\n }\n }\n if (BUILD.isDev && newVNode.$elm$) {\n consoleDevError(`The JSX ${newVNode.$text$ !== null ? `\"${newVNode.$text$}\" text` : `\"${newVNode.$tag$}\" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);\n }\n if (BUILD.vdomText && newVNode.$text$ !== null) {\n // create text node\n elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);\n }\n else if (BUILD.slotRelocation && newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {\n // create a slot reference node\n elm = newVNode.$elm$ =\n BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode) : doc.createTextNode('');\n }\n else {\n if (BUILD.svg && !isSvgMode) {\n isSvgMode = newVNode.$tag$ === 'svg';\n }\n // create element\n elm = newVNode.$elm$ = (BUILD.svg\n ? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */\n ? 'slot-fb'\n : newVNode.$tag$)\n : doc.createElement(BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */\n ? 'slot-fb'\n : newVNode.$tag$));\n if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {\n isSvgMode = false;\n }\n // add css classes, attrs, props, listeners, etc.\n if (BUILD.vdomAttribute) {\n updateElement(null, newVNode, isSvgMode);\n }\n if ((BUILD.shadowDom || BUILD.scoped) && isDef(scopeId) && elm['s-si'] !== scopeId) {\n // if there is a scopeId and this is the initial render\n // then let's add the scopeId as a css class\n elm.classList.add((elm['s-si'] = scopeId));\n }\n if (newVNode.$children$) {\n for (i = 0; i < newVNode.$children$.length; ++i) {\n // create the node\n childNode = createElm(oldParentVNode, newVNode, i, elm);\n // return node could have been null\n if (childNode) {\n // append our new node\n elm.appendChild(childNode);\n }\n }\n }\n if (BUILD.svg) {\n if (newVNode.$tag$ === 'svg') {\n // Only reset the SVG context when we're exiting element\n isSvgMode = false;\n }\n else if (elm.tagName === 'foreignObject') {\n // Reenter SVG context when we're exiting element\n isSvgMode = true;\n }\n }\n }\n // This needs to always happen so we can hide nodes that are projected\n // to another component but don't end up in a slot\n elm['s-hn'] = hostTagName;\n if (BUILD.slotRelocation) {\n if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {\n // remember the content reference comment\n elm['s-sr'] = true;\n // remember the content reference comment\n elm['s-cr'] = contentRef;\n // remember the slot name, or empty string for default slot\n elm['s-sn'] = newVNode.$name$ || '';\n // check if we've got an old vnode for this slot\n oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];\n if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {\n if (BUILD.experimentalSlotFixes) {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content to the root of the element currently being rendered\n relocateToHostRoot(oldParentVNode.$elm$);\n }\n else {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content back to its original location\n putBackInOriginalLocation(oldParentVNode.$elm$, false);\n }\n }\n }\n }\n return elm;\n};\n/**\n * Relocates all child nodes of an element that were a part of a previous slot relocation\n * to the root of the Stencil component currently being rendered. This happens when a parent\n * element of a slot reference node dynamically changes and triggers a re-render. We cannot use\n * `putBackInOriginalLocation()` because that may relocate nodes to elements that will not be re-rendered\n * and so they will not be relocated again.\n *\n * @param parentElm The element potentially containing relocated nodes.\n */\nconst relocateToHostRoot = (parentElm) => {\n plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n const host = parentElm.closest(hostTagName.toLowerCase());\n if (host != null) {\n const contentRefNode = Array.from(host.childNodes).find((ref) => ref['s-cr']);\n const childNodeArray = Array.from(parentElm.childNodes);\n // If we have a content ref, we need to invert the order of the nodes we're relocating\n // to preserve the correct order of elements in the DOM on future relocations\n for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {\n // Only relocate nodes that were slotted in\n if (childNode['s-sh'] != null) {\n host.insertBefore(childNode, contentRefNode !== null && contentRefNode !== void 0 ? contentRefNode : null);\n // Reset so we can correctly move the node around again.\n childNode['s-sh'] = undefined;\n // Need to tell the render pipeline to check to relocate slot content again\n checkSlotRelocate = true;\n }\n }\n }\n plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n};\nconst putBackInOriginalLocation = (parentElm, recursive) => {\n plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n const oldSlotChildNodes = parentElm.childNodes;\n for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {\n const childNode = oldSlotChildNodes[i];\n if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {\n // and relocate it back to it's original location\n parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));\n // remove the old original location comment entirely\n // later on the patch function will know what to do\n // and move this to the correct spot if need be\n childNode['s-ol'].remove();\n childNode['s-ol'] = undefined;\n // Reset so we can correctly move the node around again.\n childNode['s-sh'] = undefined;\n checkSlotRelocate = true;\n }\n if (recursive) {\n putBackInOriginalLocation(childNode, recursive);\n }\n }\n plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;\n};\n/**\n * Create DOM nodes corresponding to a list of {@link d.Vnode} objects and\n * add them to the DOM in the appropriate place.\n *\n * @param parentElm the DOM node which should be used as a parent for the new\n * DOM nodes\n * @param before a child of the `parentElm` which the new children should be\n * inserted before (optional)\n * @param parentVNode the parent virtual DOM node\n * @param vnodes the new child virtual DOM nodes to produce DOM nodes for\n * @param startIdx the index in the child virtual DOM nodes at which to start\n * creating DOM nodes (inclusive)\n * @param endIdx the index in the child virtual DOM nodes at which to stop\n * creating DOM nodes (inclusive)\n */\nconst addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = ((BUILD.slotRelocation && parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);\n let childNode;\n if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx, parentElm);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n containerElm.insertBefore(childNode, BUILD.slotRelocation ? referenceNode(before) : before);\n }\n }\n }\n};\n/**\n * Remove the DOM elements corresponding to a list of {@link d.VNode} objects.\n * This can be used to, for instance, clean up after a list of children which\n * should no longer be shown.\n *\n * This function also handles some of Stencil's slot relocation logic.\n *\n * @param vnodes a list of virtual DOM nodes to remove\n * @param startIdx the index at which to start removing nodes (inclusive)\n * @param endIdx the index at which to stop removing nodes (inclusive)\n */\nconst removeVnodes = (vnodes, startIdx, endIdx) => {\n for (let index = startIdx; index <= endIdx; ++index) {\n const vnode = vnodes[index];\n if (vnode) {\n const elm = vnode.$elm$;\n nullifyVNodeRefs(vnode);\n if (elm) {\n if (BUILD.slotRelocation) {\n // we're removing this element\n // so it's possible we need to show slot fallback content now\n checkSlotFallbackVisibility = true;\n if (elm['s-ol']) {\n // remove the original location comment\n elm['s-ol'].remove();\n }\n else {\n // it's possible that child nodes of the node\n // that's being removed are slot nodes\n putBackInOriginalLocation(elm, true);\n }\n }\n // remove the vnode's element from the dom\n elm.remove();\n }\n }\n }\n};\n/**\n * Reconcile the children of a new VNode with the children of an old VNode by\n * traversing the two collections of children, identifying nodes that are\n * conserved or changed, calling out to `patch` to make any necessary\n * updates to the DOM, and rearranging DOM nodes as needed.\n *\n * The algorithm for reconciling children works by analyzing two 'windows' onto\n * the two arrays of children (`oldCh` and `newCh`). We keep track of the\n * 'windows' by storing start and end indices and references to the\n * corresponding array entries. Initially the two 'windows' are basically equal\n * to the entire array, but we progressively narrow the windows until there are\n * no children left to update by doing the following:\n *\n * 1. Skip any `null` entries at the beginning or end of the two arrays, so\n * that if we have an initial array like the following we'll end up dealing\n * only with a window bounded by the highlighted elements:\n *\n * [null, null, VNode1 , ... , VNode2, null, null]\n * ^^^^^^ ^^^^^^\n *\n * 2. Check to see if the elements at the head and tail positions are equal\n * across the windows. This will basically detect elements which haven't\n * been added, removed, or changed position, i.e. if you had the following\n * VNode elements (represented as HTML):\n *\n * oldVNode: `

HEY

`\n * newVNode: `

THERE

`\n *\n * Then when comparing the children of the `
` tag we check the equality\n * of the VNodes corresponding to the `

` tags and, since they are the\n * same tag in the same position, we'd be able to avoid completely\n * re-rendering the subtree under them with a new DOM element and would just\n * call out to `patch` to handle reconciling their children and so on.\n *\n * 3. Check, for both windows, to see if the element at the beginning of the\n * window corresponds to the element at the end of the other window. This is\n * a heuristic which will let us identify _some_ situations in which\n * elements have changed position, for instance it _should_ detect that the\n * children nodes themselves have not changed but merely moved in the\n * following example:\n *\n * oldVNode: `

`\n * newVNode: `
`\n *\n * If we find cases like this then we also need to move the concrete DOM\n * elements corresponding to the moved children to write the re-order to the\n * DOM.\n *\n * 4. Finally, if VNodes have the `key` attribute set on them we check for any\n * nodes in the old children which have the same key as the first element in\n * our window on the new children. If we find such a node we handle calling\n * out to `patch`, moving relevant DOM nodes, and so on, in accordance with\n * what we find.\n *\n * Finally, once we've narrowed our 'windows' to the point that either of them\n * collapse (i.e. they have length 0) we then handle any remaining VNode\n * insertion or deletion that needs to happen to get a DOM state that correctly\n * reflects the new child VNodes. If, for instance, after our window on the old\n * children has collapsed we still have more nodes on the new children that\n * we haven't dealt with yet then we need to add them, or if the new children\n * collapse but we still have unhandled _old_ children then we need to make\n * sure the corresponding DOM nodes are removed.\n *\n * @param parentElm the node into which the parent VNode is rendered\n * @param oldCh the old children of the parent node\n * @param newVNode the new VNode which will replace the parent\n * @param newCh the new children of the parent node\n * @param isInitialRender whether or not this is the first render of the vdom\n */\nconst updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n // VNode might have been moved left\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {\n // if the start nodes are the same then we should patch the new VNode\n // onto the old one, and increment our `newStartIdx` and `oldStartIdx`\n // indices to reflect that. We don't need to move any DOM Nodes around\n // since things are matched up in order.\n patch(oldStartVnode, newStartVnode, isInitialRender);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {\n // likewise, if the end nodes are the same we patch new onto old and\n // decrement our end indices, and also likewise in this case we don't\n // need to move any DOM Nodes.\n patch(oldEndVnode, newEndVnode, isInitialRender);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {\n // case: \"Vnode moved right\"\n //\n // We've found that the last node in our window on the new children is\n // the same VNode as the _first_ node in our window on the old children\n // we're dealing with now. Visually, this is the layout of these two\n // nodes:\n //\n // newCh: [..., newStartVnode , ... , newEndVnode , ...]\n // ^^^^^^^^^^^\n // oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]\n // ^^^^^^^^^^^^^\n //\n // In this situation we need to patch `newEndVnode` onto `oldStartVnode`\n // and move the DOM element for `oldStartVnode`.\n if (BUILD.slotRelocation && (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);\n }\n patch(oldStartVnode, newEndVnode, isInitialRender);\n // We need to move the element for `oldStartVnode` into a position which\n // will be appropriate for `newEndVnode`. For this we can use\n // `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a\n // sibling for `oldEndVnode.$elm$` then we want to move the DOM node for\n // `oldStartVnode` between `oldEndVnode` and it's sibling, like so:\n //\n // \n // \n // \n // \n // \n // \n // ```\n // In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback\n // will be called with `newValue = \"some-value\"` and will set the shadowed property (this.someAttribute = \"another-value\")\n // to the value that was set inline i.e. \"some-value\" from above example. When\n // the connectedCallback attempts to un-shadow it will use \"some-value\" as the initial value rather than \"another-value\"\n //\n // The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed\n // by connectedCallback as this attributeChangedCallback will not fire.\n //\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n //\n // TODO(STENCIL-16) we should think about whether or not we actually want to be reflecting the attributes to\n // properties here given that this goes against best practices outlined here\n // https://developers.google.com/web/fundamentals/web-components/best-practices#avoid-reentrancy\n if (this.hasOwnProperty(propName)) {\n newValue = this[propName];\n delete this[propName];\n }\n else if (prototype.hasOwnProperty(propName) &&\n typeof this[propName] === 'number' &&\n this[propName] == newValue) {\n // if the propName exists on the prototype of `Cstr`, this update may be a result of Stencil using native\n // APIs to reflect props as attributes. Calls to `setAttribute(someElement, propName)` will result in\n // `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.\n return;\n }\n else if (propName == null) {\n // At this point we should know this is not a \"member\", so we can treat it like watching an attribute\n // on a vanilla web component\n const hostRef = getHostRef(this);\n const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;\n // We only want to trigger the callback(s) if:\n // 1. The instance is ready\n // 2. The watchers are ready\n // 3. The value has changed\n if (flags &&\n !(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&\n flags & 128 /* HOST_FLAGS.isWatchReady */ &&\n newValue !== oldValue) {\n const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;\n const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;\n const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];\n entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {\n if (instance[callbackName] != null) {\n instance[callbackName].call(instance, newValue, oldValue, attrName);\n }\n });\n }\n return;\n }\n this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;\n });\n };\n // Create an array of attributes to observe\n // This list in comprised of all strings used within a `@Watch()` decorator\n // on a component as well as any Stencil-specific \"members\" (`@Prop()`s and `@State()`s).\n // As such, there is no way to guarantee type-safety here that a user hasn't entered\n // an invalid attribute.\n Cstr.observedAttributes = Array.from(new Set([\n ...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),\n ...members\n .filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)\n .map(([propName, m]) => {\n var _a;\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (BUILD.reflect && m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {\n (_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);\n }\n return attrName;\n }),\n ]));\n }\n }\n return Cstr;\n};\n/**\n * Initialize a Stencil component given a reference to its host element, its\n * runtime bookkeeping data structure, runtime metadata about the component,\n * and (optionally) an HMR version ID.\n *\n * @param elm a host element\n * @param hostRef the element's runtime bookkeeping object\n * @param cmpMeta runtime metadata for the Stencil component\n * @param hmrVersionId an (optional) HMR version ID\n */\nconst initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {\n let Cstr;\n // initializeComponent\n if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {\n // Let the runtime know that the component has been initialized\n hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;\n const bundleId = cmpMeta.$lazyBundleId$;\n if ((BUILD.lazyLoad || BUILD.hydrateClientSide) && bundleId) {\n // lazy loaded components\n // request the component's implementation to be\n // wired up with the host element\n Cstr = loadModule(cmpMeta, hostRef, hmrVersionId);\n if (Cstr.then) {\n // Await creates a micro-task avoid if possible\n const endLoad = uniqueTime(`st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`, `[Stencil] Load module for <${cmpMeta.$tagName$}>`);\n Cstr = await Cstr;\n endLoad();\n }\n if ((BUILD.isDev || BUILD.isDebug) && !Cstr) {\n throw new Error(`Constructor for \"${cmpMeta.$tagName$}#${hostRef.$modeName$}\" was not found`);\n }\n if (BUILD.member && !Cstr.isProxied) {\n // we've never proxied this Constructor before\n // let's add the getters/setters to its prototype before\n // the first time we create an instance of the implementation\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);\n Cstr.isProxied = true;\n }\n const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);\n // ok, time to construct the instance\n // but let's keep track of when we start and stop\n // so that the getters/setters don't incorrectly step on data\n if (BUILD.member) {\n hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;\n }\n // construct the lazy-loaded component implementation\n // passing the hostRef is very important during\n // construction in order to directly wire together the\n // host element and the lazy-loaded instance\n try {\n new Cstr(hostRef);\n }\n catch (e) {\n consoleError(e);\n }\n if (BUILD.member) {\n hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;\n }\n if (BUILD.watchCallback) {\n hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;\n }\n endNewInstance();\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n else {\n // sync constructor component\n Cstr = elm.constructor;\n // wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,\n // watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_\n // Stencil has completed instantiating the component.\n customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));\n }\n if (BUILD.style && Cstr.style) {\n // this component has styles but we haven't registered them yet\n let style = Cstr.style;\n if (BUILD.mode && typeof style !== 'string') {\n style = style[(hostRef.$modeName$ = computeMode(elm))];\n if (BUILD.hydrateServerSide && hostRef.$modeName$) {\n elm.setAttribute('s-mode', hostRef.$modeName$);\n }\n }\n const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);\n if (!styles.has(scopeId)) {\n const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);\n if (!BUILD.hydrateServerSide &&\n BUILD.shadowDom &&\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n BUILD.shadowDomShim &&\n cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {\n style = await import('./shadow-css.js').then((m) => m.scopeCss(style, scopeId, false));\n }\n registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n // we've successfully created a lazy instance\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (BUILD.asyncLoading && ancestorComponent && ancestorComponent['s-rc']) {\n // this is the initial load and this component it has an ancestor component\n // but the ancestor component has NOT fired its will update lifecycle yet\n // so let's just cool our jets and wait for the ancestor to continue first\n // this will get fired off when the ancestor component\n // finally gets around to rendering its lazy self\n // fire off the initial update\n ancestorComponent['s-rc'].push(schedule);\n }\n else {\n schedule();\n }\n};\nconst fireConnectedCallback = (instance) => {\n if (BUILD.lazyLoad && BUILD.connectedCallback) {\n safeCall(instance, 'connectedCallback');\n }\n};\nconst connectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);\n if (BUILD.hostListenerTargetParent) {\n // only run if we have listeners being attached to a parent\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);\n }\n if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {\n // first time this component has connected\n hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;\n let hostId;\n if (BUILD.hydrateClientSide) {\n hostId = elm.getAttribute(HYDRATE_ID);\n if (hostId) {\n if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n const scopeId = BUILD.mode\n ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))\n : addStyle(elm.shadowRoot, cmpMeta);\n elm.classList.remove(scopeId + '-h', scopeId + '-s');\n }\n initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);\n }\n }\n if (BUILD.slotRelocation && !hostId) {\n // initUpdate\n // if the slot polyfill is required we'll need to put some nodes\n // in here to act as original content anchors as we move nodes around\n // host element has been connected to the DOM\n if (BUILD.hydrateServerSide ||\n ((BUILD.slot || BUILD.shadowDom) &&\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {\n setContentReference(elm);\n }\n }\n if (BUILD.asyncLoading) {\n // find the first ancestor component (if there is one) and register\n // this component as one of the actively loading child components for its ancestor\n let ancestorComponent = elm;\n while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {\n // climb up the ancestors looking for the first\n // component that hasn't finished its lifecycle update yet\n if ((BUILD.hydrateClientSide &&\n ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&\n ancestorComponent.hasAttribute('s-id') &&\n ancestorComponent['s-p']) ||\n ancestorComponent['s-p']) {\n // we found this components first ancestor component\n // keep a reference to this component's ancestor component\n attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));\n break;\n }\n }\n }\n // Lazy properties\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n if (BUILD.initializeNextTick) {\n // connectedCallback, taskQueue, initialLoad\n // angular sets attribute AFTER connectCallback\n // https://github.com/angular/angular/issues/18909\n // https://github.com/angular/angular/issues/19940\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n }\n else {\n initializeComponent(elm, hostRef, cmpMeta);\n }\n }\n else {\n // not the first time this has connected\n // reattach any event listeners to the host\n // since they would have been removed when disconnected\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);\n // fire off connectedCallback() on component instance\n if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {\n hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));\n }\n }\n endConnected();\n }\n};\nconst setContentReference = (elm) => {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n const contentRefElm = (elm['s-cr'] = doc.createComment(BUILD.isDebug ? `content-ref (host=${elm.localName})` : ''));\n contentRefElm['s-cn'] = true;\n elm.insertBefore(contentRefElm, elm.firstChild);\n};\nconst disconnectInstance = (instance) => {\n if (BUILD.lazyLoad && BUILD.disconnectedCallback) {\n safeCall(instance, 'disconnectedCallback');\n }\n if (BUILD.cmpDidUnload) {\n safeCall(instance, 'componentDidUnload');\n }\n};\nconst disconnectedCallback = async (elm) => {\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n if (BUILD.hostListener) {\n if (hostRef.$rmListeners$) {\n hostRef.$rmListeners$.map((rmListener) => rmListener());\n hostRef.$rmListeners$ = undefined;\n }\n }\n if (!BUILD.lazyLoad) {\n disconnectInstance(elm);\n }\n else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {\n disconnectInstance(hostRef.$lazyInstance$);\n }\n else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {\n hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));\n }\n }\n};\nconst patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {\n patchCloneNode(hostElementPrototype);\n patchSlotAppendChild(hostElementPrototype);\n patchSlotAppend(hostElementPrototype);\n patchSlotPrepend(hostElementPrototype);\n patchSlotInsertAdjacentElement(hostElementPrototype);\n patchSlotInsertAdjacentHTML(hostElementPrototype);\n patchSlotInsertAdjacentText(hostElementPrototype);\n patchTextContent(hostElementPrototype);\n patchChildSlotNodes(hostElementPrototype, descriptorPrototype);\n patchSlotRemoveChild(hostElementPrototype);\n};\nconst patchCloneNode = (HostElementPrototype) => {\n const orgCloneNode = HostElementPrototype.cloneNode;\n HostElementPrototype.cloneNode = function (deep) {\n const srcNode = this;\n const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;\n const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);\n if (BUILD.slot && !isShadowDom && deep) {\n let i = 0;\n let slotted, nonStencilNode;\n const stencilPrivates = [\n 's-id',\n 's-cr',\n 's-lr',\n 's-rc',\n 's-sc',\n 's-p',\n 's-cn',\n 's-sr',\n 's-sn',\n 's-hn',\n 's-ol',\n 's-nr',\n 's-si',\n ];\n for (; i < srcNode.childNodes.length; i++) {\n slotted = srcNode.childNodes[i]['s-nr'];\n nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);\n if (slotted) {\n if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {\n clonedNode.__appendChild(slotted.cloneNode(true));\n }\n else {\n clonedNode.appendChild(slotted.cloneNode(true));\n }\n }\n if (nonStencilNode) {\n clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\n/**\n * Patches the `appendChild` method on a `scoped` Stencil component.\n * The patch will attempt to find a slot with the same name as the node being appended\n * and insert it into the slot reference if found. Otherwise, it falls-back to the original\n * `appendChild` method.\n *\n * @param HostElementPrototype The Stencil component to be patched\n */\nconst patchSlotAppendChild = (HostElementPrototype) => {\n HostElementPrototype.__appendChild = HostElementPrototype.appendChild;\n HostElementPrototype.appendChild = function (newChild) {\n const slotName = (newChild['s-sn'] = getSlotName(newChild));\n const slotNode = getHostSlotNode(this.childNodes, slotName);\n if (slotNode) {\n const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);\n const appendAfter = slotChildNodes[slotChildNodes.length - 1];\n const insertedNode = appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);\n // Check if there is fallback content that should be hidden\n updateFallbackSlotVisibility(this);\n // Force a re-render of the host element\n forceUpdate(this);\n return insertedNode;\n }\n return this.__appendChild(newChild);\n };\n};\n/**\n * Patches the `removeChild` method on a `scoped` Stencil component.\n * This patch attempts to remove the specified node from a slot reference\n * if the slot exists. Otherwise, it falls-back to the original `removeChild` method.\n *\n * @param ElementPrototype The Stencil component to be patched\n */\nconst patchSlotRemoveChild = (ElementPrototype) => {\n ElementPrototype.__removeChild = ElementPrototype.removeChild;\n ElementPrototype.removeChild = function (toRemove) {\n if (toRemove && typeof toRemove['s-sn'] !== 'undefined') {\n const slotNode = getHostSlotNode(this.childNodes, toRemove['s-sn']);\n if (slotNode) {\n // Get all slot content\n const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove['s-sn']);\n // See if any of the slotted content matches the node to remove\n const existingNode = slotChildNodes.find((n) => n === toRemove);\n if (existingNode) {\n existingNode.remove();\n // Check if there is fallback content that should be displayed if that\n // was the last node in the slot\n updateFallbackSlotVisibility(this);\n return;\n }\n }\n }\n return this.__removeChild(toRemove);\n };\n};\n/**\n * Patches the `prepend` method for a slotted node inside a scoped component.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotPrepend = (HostElementPrototype) => {\n const originalPrepend = HostElementPrototype.prepend;\n HostElementPrototype.prepend = function (...newChildren) {\n newChildren.forEach((newChild) => {\n if (typeof newChild === 'string') {\n newChild = this.ownerDocument.createTextNode(newChild);\n }\n const slotName = (newChild['s-sn'] = getSlotName(newChild));\n const slotNode = getHostSlotNode(this.childNodes, slotName);\n if (slotNode) {\n const slotPlaceholder = document.createTextNode('');\n slotPlaceholder['s-nr'] = newChild;\n slotNode['s-cr'].parentNode.__appendChild(slotPlaceholder);\n newChild['s-ol'] = slotPlaceholder;\n const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);\n const appendAfter = slotChildNodes[0];\n return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);\n }\n if (newChild.nodeType === 1 && !!newChild.getAttribute('slot')) {\n newChild.hidden = true;\n }\n return originalPrepend.call(this, newChild);\n });\n };\n};\n/**\n * Patches the `append` method for a slotted node inside a scoped component. The patched method uses\n * `appendChild` under-the-hood while creating text nodes for any new children that passed as bare strings.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotAppend = (HostElementPrototype) => {\n HostElementPrototype.append = function (...newChildren) {\n newChildren.forEach((newChild) => {\n if (typeof newChild === 'string') {\n newChild = this.ownerDocument.createTextNode(newChild);\n }\n this.appendChild(newChild);\n });\n };\n};\n/**\n * Patches the `insertAdjacentHTML` method for a slotted node inside a scoped component. Specifically,\n * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the element\n * gets inserted into the DOM in the correct location.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotInsertAdjacentHTML = (HostElementPrototype) => {\n const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;\n HostElementPrototype.insertAdjacentHTML = function (position, text) {\n if (position !== 'afterbegin' && position !== 'beforeend') {\n return originalInsertAdjacentHtml.call(this, position, text);\n }\n const container = this.ownerDocument.createElement('_');\n let node;\n container.innerHTML = text;\n if (position === 'afterbegin') {\n while ((node = container.firstChild)) {\n this.prepend(node);\n }\n }\n else if (position === 'beforeend') {\n while ((node = container.firstChild)) {\n this.append(node);\n }\n }\n };\n};\n/**\n * Patches the `insertAdjacentText` method for a slotted node inside a scoped component. Specifically,\n * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the text node\n * gets inserted into the DOM in the correct location.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotInsertAdjacentText = (HostElementPrototype) => {\n HostElementPrototype.insertAdjacentText = function (position, text) {\n this.insertAdjacentHTML(position, text);\n };\n};\n/**\n * Patches the `insertAdjacentElement` method for a slotted node inside a scoped component. Specifically,\n * we only need to patch the behavior for the specific `beforeend` and `afterbegin` positions so the element\n * gets inserted into the DOM in the correct location.\n *\n * @param HostElementPrototype the `Element` to be patched\n */\nconst patchSlotInsertAdjacentElement = (HostElementPrototype) => {\n const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;\n HostElementPrototype.insertAdjacentElement = function (position, element) {\n if (position !== 'afterbegin' && position !== 'beforeend') {\n return originalInsertAdjacentElement.call(this, position, element);\n }\n if (position === 'afterbegin') {\n this.prepend(element);\n return element;\n }\n else if (position === 'beforeend') {\n this.append(element);\n return element;\n }\n return element;\n };\n};\n/**\n * Patches the text content of an unnamed slotted node inside a scoped component\n * @param hostElementPrototype the `Element` to be patched\n */\nconst patchTextContent = (hostElementPrototype) => {\n const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');\n Object.defineProperty(hostElementPrototype, '__textContent', descriptor);\n if (BUILD.experimentalScopedSlotChanges) {\n // Patch `textContent` to mimic shadow root behavior\n Object.defineProperty(hostElementPrototype, 'textContent', {\n // To mimic shadow root behavior, we need to return the text content of all\n // nodes in a slot reference node\n get() {\n const slotRefNodes = getAllChildSlotNodes(this.childNodes);\n const textContent = slotRefNodes\n .map((node) => {\n var _a, _b;\n const text = [];\n // Need to get the text content of all nodes in the slot reference node\n let slotContent = node.nextSibling;\n while (slotContent && slotContent['s-sn'] === node['s-sn']) {\n if (slotContent.nodeType === 3 /* NODE_TYPES.TEXT_NODE */ || slotContent.nodeType === 1 /* NODE_TYPES.ELEMENT_NODE */) {\n text.push((_b = (_a = slotContent.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : '');\n }\n slotContent = slotContent.nextSibling;\n }\n return text.filter((ref) => ref !== '').join(' ');\n })\n .filter((text) => text !== '')\n .join(' ');\n // Pad the string to return\n return ' ' + textContent + ' ';\n },\n // To mimic shadow root behavior, we need to overwrite all nodes in a slot\n // reference node. If a default slot reference node exists, the text content will be\n // placed there. Otherwise, the new text node will be hidden\n set(value) {\n const slotRefNodes = getAllChildSlotNodes(this.childNodes);\n slotRefNodes.forEach((node) => {\n // Remove the existing content of the slot\n let slotContent = node.nextSibling;\n while (slotContent && slotContent['s-sn'] === node['s-sn']) {\n const tmp = slotContent;\n slotContent = slotContent.nextSibling;\n tmp.remove();\n }\n // If this is a default slot, add the text node in the slot location.\n // Otherwise, destroy the slot reference node\n if (node['s-sn'] === '') {\n const textNode = this.ownerDocument.createTextNode(value);\n textNode['s-sn'] = '';\n node.parentElement.insertBefore(textNode, node.nextSibling);\n }\n else {\n node.remove();\n }\n });\n },\n });\n }\n else {\n Object.defineProperty(hostElementPrototype, 'textContent', {\n get() {\n var _a;\n // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is\n // the empty string\n const slotNode = getHostSlotNode(this.childNodes, '');\n // when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how\n // nodes were reordered during the vdom render. first try to get the text content from the sibling.\n if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {\n return slotNode.nextSibling.textContent;\n }\n else if (slotNode) {\n return slotNode.textContent;\n }\n else {\n // fallback to the original implementation\n return this.__textContent;\n }\n },\n set(value) {\n var _a;\n // get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is\n // the empty string\n const slotNode = getHostSlotNode(this.childNodes, '');\n // when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,\n // depending on how nodes were reordered during the vdom render. first try to set the text content on the\n // sibling.\n if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {\n slotNode.nextSibling.textContent = value;\n }\n else if (slotNode) {\n slotNode.textContent = value;\n }\n else {\n // we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM\n // loaded, we could have missed it. check for a content reference element on the scoped component and insert\n // it there\n this.__textContent = value;\n const contentRefElm = this['s-cr'];\n if (contentRefElm) {\n this.insertBefore(contentRefElm, this.firstChild);\n }\n }\n },\n });\n }\n};\nconst patchChildSlotNodes = (elm, cmpMeta) => {\n class FakeNodeList extends Array {\n item(n) {\n return this[n];\n }\n }\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {\n const childNodesFn = elm.__lookupGetter__('childNodes');\n Object.defineProperty(elm, 'children', {\n get() {\n return this.childNodes.map((n) => n.nodeType === 1);\n },\n });\n Object.defineProperty(elm, 'childElementCount', {\n get() {\n return elm.children.length;\n },\n });\n Object.defineProperty(elm, 'childNodes', {\n get() {\n const childNodes = childNodesFn.call(this);\n if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&\n getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {\n const result = new FakeNodeList();\n for (let i = 0; i < childNodes.length; i++) {\n const slot = childNodes[i]['s-nr'];\n if (slot) {\n result.push(slot);\n }\n }\n return result;\n }\n return FakeNodeList.from(childNodes);\n },\n });\n }\n};\n/**\n * Recursively finds all slot reference nodes ('s-sr') in a series of child nodes.\n *\n * @param childNodes The set of child nodes to search for slot reference nodes.\n * @returns An array of slot reference nodes.\n */\nconst getAllChildSlotNodes = (childNodes) => {\n const slotRefNodes = [];\n for (const childNode of Array.from(childNodes)) {\n if (childNode['s-sr']) {\n slotRefNodes.push(childNode);\n }\n slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));\n }\n return slotRefNodes;\n};\nconst getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';\n/**\n * Recursively searches a series of child nodes for a slot with the provided name.\n * @param childNodes the nodes to search for a slot with a specific name.\n * @param slotName the name of the slot to match on.\n * @returns a reference to the slot node that matches the provided name, `null` otherwise\n */\nconst getHostSlotNode = (childNodes, slotName) => {\n let i = 0;\n let childNode;\n for (; i < childNodes.length; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && childNode['s-sn'] === slotName) {\n return childNode;\n }\n childNode = getHostSlotNode(childNode.childNodes, slotName);\n if (childNode) {\n return childNode;\n }\n }\n return null;\n};\nconst getHostSlotChildNodes = (n, slotName) => {\n const childNodes = [n];\n while ((n = n.nextSibling) && n['s-sn'] === slotName) {\n childNodes.push(n);\n }\n return childNodes;\n};\nconst defineCustomElement = (Cstr, compactMeta) => {\n customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));\n};\nconst proxyCustomElement = (Cstr, compactMeta) => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n };\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = Cstr.$watchers$;\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;\n }\n // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check\n if (BUILD.experimentalSlotFixes) {\n if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n // This check is intentionally not combined with the surrounding `experimentalSlotFixes` check\n // since, moving forward, we only want to patch the pseudo shadow DOM when the component is scoped\n patchPseudoShadowDom(Cstr.prototype, cmpMeta);\n }\n }\n else {\n if (BUILD.slotChildNodesFix) {\n patchChildSlotNodes(Cstr.prototype, cmpMeta);\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNode(Cstr.prototype);\n }\n if (BUILD.appendChildSlotFix) {\n patchSlotAppendChild(Cstr.prototype);\n }\n if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n patchTextContent(Cstr.prototype);\n }\n }\n const originalConnectedCallback = Cstr.prototype.connectedCallback;\n const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;\n Object.assign(Cstr.prototype, {\n __registerHost() {\n registerHost(this, cmpMeta);\n },\n connectedCallback() {\n connectedCallback(this);\n if (BUILD.connectedCallback && originalConnectedCallback) {\n originalConnectedCallback.call(this);\n }\n },\n disconnectedCallback() {\n disconnectedCallback(this);\n if (BUILD.disconnectedCallback && originalDisconnectedCallback) {\n originalDisconnectedCallback.call(this);\n }\n },\n __attachShadow() {\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n this.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),\n });\n }\n else {\n this.attachShadow({ mode: 'open' });\n }\n }\n else {\n this.shadowRoot = this;\n }\n },\n });\n Cstr.is = cmpMeta.$tagName$;\n return proxyComponent(Cstr, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */ | 2 /* PROXY_FLAGS.proxyState */);\n};\nconst forceModeUpdate = (elm) => {\n if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {\n const mode = computeMode(elm);\n const hostRef = getHostRef(elm);\n if (hostRef.$modeName$ !== mode) {\n const cmpMeta = hostRef.$cmpMeta$;\n const oldScopeId = elm['s-sc'];\n const scopeId = getScopeId(cmpMeta, mode);\n const style = elm.constructor.style[mode];\n const flags = cmpMeta.$flags$;\n if (style) {\n if (!styles.has(scopeId)) {\n registerStyle(scopeId, style, !!(flags & 1 /* CMP_FLAGS.shadowDomEncapsulation */));\n }\n hostRef.$modeName$ = mode;\n elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');\n attachStyles(hostRef);\n forceUpdate(elm);\n }\n }\n }\n};\n/**\n * Kick off hot-module-replacement for a component. In order to replace the\n * component in-place we:\n *\n * 1. get a reference to the {@link d.HostRef} for the element\n * 2. reset the element's runtime flags\n * 3. re-run the initialization logic for the element (via\n * {@link initializeComponent})\n *\n * @param hostElement the host element for the component which we want to start\n * doing HMR\n * @param cmpMeta runtime metadata for the component\n * @param hmrVersionId the current HMR version ID\n */\nconst hmrStart = (hostElement, cmpMeta, hmrVersionId) => {\n // ¯\\_(ツ)_/¯\n const hostRef = getHostRef(hostElement);\n // reset state flags to only have been connected\n hostRef.$flags$ = 1 /* HOST_FLAGS.hasConnected */;\n // TODO\n // detach any event listeners that may have been added\n // because we're not passing an exact event name it'll\n // remove all of this element's event, which is good\n // re-initialize the component\n initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);\n};\nconst bootstrapLazy = (lazyBundles, options = {}) => {\n var _a;\n if (BUILD.profile && performance.mark) {\n performance.mark('st:app:start');\n }\n installDevTools();\n const endBootstrap = createTime('bootstrapLazy');\n const cmpTags = [];\n const exclude = options.exclude || [];\n const customElements = win.customElements;\n const head = doc.head;\n const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');\n const dataStyles = /*@__PURE__*/ doc.createElement('style');\n const deferredConnectedCallbacks = [];\n const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);\n let appLoadFallback;\n let isBootstrapping = true;\n let i = 0;\n Object.assign(plt, options);\n plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;\n if (BUILD.asyncQueue) {\n if (options.syncQueue) {\n plt.$flags$ |= 4 /* PLATFORM_FLAGS.queueSync */;\n }\n }\n if (BUILD.hydrateClientSide) {\n // If the app is already hydrated there is not point to disable the\n // async queue. This will improve the first input delay\n plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;\n }\n if (BUILD.hydrateClientSide && BUILD.shadowDom) {\n for (; i < styles.length; i++) {\n registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);\n }\n }\n let hasSlotRelocation = false;\n lazyBundles.map((lazyBundle) => {\n lazyBundle[1].map((compactMeta) => {\n var _a;\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n $members$: compactMeta[2],\n $listeners$: compactMeta[3],\n };\n // Check if we are using slots outside the shadow DOM in this component.\n // We'll use this information later to add styles for `slot-fb` elements\n if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {\n hasSlotRelocation = true;\n }\n if (BUILD.member) {\n cmpMeta.$members$ = compactMeta[2];\n }\n if (BUILD.hostListener) {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n if (BUILD.reflect) {\n cmpMeta.$attrsToReflect$ = [];\n }\n if (BUILD.watchCallback) {\n cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};\n }\n if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\n cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;\n }\n const tagName = BUILD.transformTagName && options.transformTagName\n ? options.transformTagName(cmpMeta.$tagName$)\n : cmpMeta.$tagName$;\n const HostElement = class extends HTMLElement {\n // StencilLazyHost\n constructor(self) {\n // @ts-ignore\n super(self);\n self = this;\n registerHost(self, cmpMeta);\n if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {\n // this component is using shadow dom\n // and this browser supports shadow dom\n // add the read-only property \"shadowRoot\" to the host element\n // adding the shadow root build conditionals to minimize runtime\n if (supportsShadow) {\n if (BUILD.shadowDelegatesFocus) {\n self.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),\n });\n }\n else {\n self.attachShadow({ mode: 'open' });\n }\n }\n else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {\n self.shadowRoot = self;\n }\n }\n }\n connectedCallback() {\n if (appLoadFallback) {\n clearTimeout(appLoadFallback);\n appLoadFallback = null;\n }\n if (isBootstrapping) {\n // connectedCallback will be processed once all components have been registered\n deferredConnectedCallbacks.push(this);\n }\n else {\n plt.jmp(() => connectedCallback(this));\n }\n }\n disconnectedCallback() {\n plt.jmp(() => disconnectedCallback(this));\n }\n componentOnReady() {\n return getHostRef(this).$onReadyPromise$;\n }\n };\n // TODO(STENCIL-914): this check and `else` block can go away and be replaced by just the `scoped` check\n if (BUILD.experimentalSlotFixes) {\n // This check is intentionally not combined with the surrounding `experimentalSlotFixes` check\n // since, moving forward, we only want to patch the pseudo shadow DOM when the component is scoped\n if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n patchPseudoShadowDom(HostElement.prototype, cmpMeta);\n }\n }\n else {\n if (BUILD.slotChildNodesFix) {\n patchChildSlotNodes(HostElement.prototype, cmpMeta);\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNode(HostElement.prototype);\n }\n if (BUILD.appendChildSlotFix) {\n patchSlotAppendChild(HostElement.prototype);\n }\n if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {\n patchTextContent(HostElement.prototype);\n }\n }\n // if the component is formAssociated we need to set that on the host\n // element so that it will be ready for `attachInternals` to be called on\n // it later on\n if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* CMP_FLAGS.formAssociated */) {\n HostElement.formAssociated = true;\n }\n if (BUILD.hotModuleReplacement) {\n // if we're in an HMR dev build then we need to set up the callback\n // which will carry out the work of actually replacing the module for\n // this particular component\n HostElement.prototype['s-hmr'] = function (hmrVersionId) {\n hmrStart(this, cmpMeta, hmrVersionId);\n };\n }\n cmpMeta.$lazyBundleId$ = lazyBundle[0];\n if (!exclude.includes(tagName) && !customElements.get(tagName)) {\n cmpTags.push(tagName);\n customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));\n }\n });\n });\n // Only bother generating CSS if we have components\n // TODO(STENCIL-1118): Add test cases for CSS content based on conditionals\n if (cmpTags.length > 0) {\n // Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM\n if (hasSlotRelocation) {\n dataStyles.textContent += SLOT_FB_CSS;\n }\n // Add hydration styles\n if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {\n dataStyles.textContent += cmpTags + HYDRATED_CSS;\n }\n // If we have styles, add them to the DOM\n if (dataStyles.innerHTML.length) {\n dataStyles.setAttribute('data-styles', '');\n // Apply CSP nonce to the style tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n dataStyles.setAttribute('nonce', nonce);\n }\n // Insert the styles into the document head\n // NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied\n head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);\n }\n }\n // Process deferred connectedCallbacks now all components have been registered\n isBootstrapping = false;\n if (deferredConnectedCallbacks.length) {\n deferredConnectedCallbacks.map((host) => host.connectedCallback());\n }\n else {\n if (BUILD.profile) {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));\n }\n else {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));\n }\n }\n // Fallback appLoad event\n endBootstrap();\n};\nconst Fragment = (_, children) => children;\nconst addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {\n if (BUILD.hostListener && listeners) {\n // this is called immediately within the element's constructor\n // initialize our event listeners on the host element\n // we do this now so that we can listen to events that may\n // have fired even before the instance is ready\n if (BUILD.hostListenerTargetParent) {\n // this component may have event listeners that should be attached to the parent\n if (attachParentListeners) {\n // this is being ran from within the connectedCallback\n // which is important so that we know the host element actually has a parent element\n // filter out the listeners to only have the ones that ARE being attached to the parent\n listeners = listeners.filter(([flags]) => flags & 32 /* LISTENER_FLAGS.TargetParent */);\n }\n else {\n // this is being ran from within the component constructor\n // everything BUT the parent element listeners should be attached at this time\n // filter out the listeners that are NOT being attached to the parent\n listeners = listeners.filter(([flags]) => !(flags & 32 /* LISTENER_FLAGS.TargetParent */));\n }\n }\n listeners.map(([flags, name, method]) => {\n const target = BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;\n const handler = hostListenerProxy(hostRef, method);\n const opts = hostListenerOpts(flags);\n plt.ael(target, name, handler, opts);\n (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));\n });\n }\n};\nconst hostListenerProxy = (hostRef, methodName) => (ev) => {\n try {\n if (BUILD.lazyLoad) {\n if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {\n // instance is ready, let's call it's member method for this event\n hostRef.$lazyInstance$[methodName](ev);\n }\n else {\n (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);\n }\n }\n else {\n hostRef.$hostElement$[methodName](ev);\n }\n }\n catch (e) {\n consoleError(e);\n }\n};\nconst getHostListenerTarget = (elm, flags) => {\n if (BUILD.hostListenerTargetDocument && flags & 4 /* LISTENER_FLAGS.TargetDocument */)\n return doc;\n if (BUILD.hostListenerTargetWindow && flags & 8 /* LISTENER_FLAGS.TargetWindow */)\n return win;\n if (BUILD.hostListenerTargetBody && flags & 16 /* LISTENER_FLAGS.TargetBody */)\n return doc.body;\n if (BUILD.hostListenerTargetParent && flags & 32 /* LISTENER_FLAGS.TargetParent */)\n return elm.parentElement;\n return elm;\n};\n// prettier-ignore\nconst hostListenerOpts = (flags) => supportsListenerOptions\n ? ({\n passive: (flags & 1 /* LISTENER_FLAGS.Passive */) !== 0,\n capture: (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0,\n })\n : (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;\n/**\n * Assigns the given value to the nonce property on the runtime platform object.\n * During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.\n * @param nonce The value to be assigned to the platform nonce property.\n * @returns void\n */\nconst setNonce = (nonce) => (plt.$nonce$ = nonce);\nconst setPlatformOptions = (opts) => Object.assign(plt, opts);\n/**\n * Updates the DOM generated on the server with annotations such as node attributes and\n * comment nodes to facilitate future client-side hydration. These annotations are used for things\n * like moving elements back to their original hosts if using Shadow DOM on the client, and for quickly\n * reconstructing the vNode representations of the DOM.\n *\n * @param doc The DOM generated by the server.\n * @param staticComponents Any components that should be considered static and do not need client-side hydration.\n */\nconst insertVdomAnnotations = (doc, staticComponents) => {\n if (doc != null) {\n const docData = {\n hostIds: 0,\n rootLevelIds: 0,\n staticComponents: new Set(staticComponents),\n };\n const orgLocationNodes = [];\n parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);\n orgLocationNodes.forEach((orgLocationNode) => {\n var _a, _b;\n if (orgLocationNode != null && orgLocationNode['s-nr']) {\n const nodeRef = orgLocationNode['s-nr'];\n let hostId = nodeRef['s-host-id'];\n let nodeId = nodeRef['s-node-id'];\n let childId = `${hostId}.${nodeId}`;\n if (hostId == null) {\n hostId = 0;\n docData.rootLevelIds++;\n nodeId = docData.rootLevelIds;\n childId = `${hostId}.${nodeId}`;\n if (nodeRef.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (nodeRef.nodeType === 3 /* NODE_TYPE.TextNode */) {\n if (hostId === 0) {\n const textContent = (_a = nodeRef.nodeValue) === null || _a === void 0 ? void 0 : _a.trim();\n if (textContent === '') {\n // useless whitespace node at the document root\n orgLocationNode.remove();\n return;\n }\n }\n const commentBeforeTextNode = doc.createComment(childId);\n commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;\n (_b = nodeRef.parentNode) === null || _b === void 0 ? void 0 : _b.insertBefore(commentBeforeTextNode, nodeRef);\n }\n }\n let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;\n const orgLocationParentNode = orgLocationNode.parentElement;\n if (orgLocationParentNode) {\n if (orgLocationParentNode['s-en'] === '') {\n // ending with a \".\" means that the parent element\n // of this node's original location is a SHADOW dom element\n // and this node is apart of the root level light dom\n orgLocationNodeId += `.`;\n }\n else if (orgLocationParentNode['s-en'] === 'c') {\n // ending with a \".c\" means that the parent element\n // of this node's original location is a SCOPED element\n // and this node is apart of the root level light dom\n orgLocationNodeId += `.c`;\n }\n }\n orgLocationNode.nodeValue = orgLocationNodeId;\n }\n });\n }\n};\n/**\n * Recursively parses a node generated by the server and its children to set host and child id\n * attributes read during client-side hydration. This function also tracks whether each node is\n * an original location reference node meaning that a node has been moved via slot relocation.\n *\n * @param doc The DOM generated by the server.\n * @param node The node to parse.\n * @param docData An object containing metadata about the document.\n * @param orgLocationNodes An array of nodes that have been moved via slot relocation.\n */\nconst parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {\n if (node == null) {\n return;\n }\n if (node['s-nr'] != null) {\n orgLocationNodes.push(node);\n }\n if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n node.childNodes.forEach((childNode) => {\n const hostRef = getHostRef(childNode);\n if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {\n const cmpData = {\n nodeIds: 0,\n };\n insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);\n }\n parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);\n });\n }\n};\n/**\n * Insert attribute annotations on an element for its host ID and, potentially, its child ID.\n * Also makes calls to insert annotations on the element's children, keeping track of the depth of\n * the component tree.\n *\n * @param doc The DOM generated by the server.\n * @param hostElm The element to insert annotations for.\n * @param vnode The vNode representation of the element.\n * @param docData An object containing metadata about the document.\n * @param cmpData An object containing metadata about the component.\n */\nconst insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {\n if (vnode != null) {\n const hostId = ++docData.hostIds;\n hostElm.setAttribute(HYDRATE_ID, hostId);\n if (hostElm['s-cr'] != null) {\n hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;\n }\n if (vnode.$children$ != null) {\n const depth = 0;\n vnode.$children$.forEach((vnodeChild, index) => {\n insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);\n });\n }\n // If this element does not already have a child ID and has a sibling comment node\n // representing a slot, we use the content of the comment to set the child ID attribute\n // on the host element.\n if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {\n const parent = hostElm.parentElement;\n if (parent && parent.childNodes) {\n const parentChildNodes = Array.from(parent.childNodes);\n const comment = parentChildNodes.find((node) => node.nodeType === 8 /* NODE_TYPE.CommentNode */ && node['s-sr']);\n if (comment) {\n const index = parentChildNodes.indexOf(hostElm) - 1;\n vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);\n }\n }\n }\n }\n};\n/**\n * Recursively analyzes the type of a child vNode and inserts annotations on the vNodes's element based on its type.\n * Element nodes receive a child ID attribute, text nodes have a comment with the child ID inserted before them,\n * and comment nodes representing a slot have their node value set to a slot node ID containing the child ID.\n *\n * @param doc The DOM generated by the server.\n * @param vnodeChild The vNode to insert annotations for.\n * @param cmpData An object containing metadata about the component.\n * @param hostId The host ID of this element's parent.\n * @param depth How deep this element sits in the component tree relative to its parent.\n * @param index The index of this element in its parent's children array.\n */\nconst insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {\n const childElm = vnodeChild.$elm$;\n if (childElm == null) {\n return;\n }\n const nodeId = cmpData.nodeIds++;\n const childId = `${hostId}.${nodeId}.${depth}.${index}`;\n childElm['s-host-id'] = hostId;\n childElm['s-node-id'] = nodeId;\n if (childElm.nodeType === 1 /* NODE_TYPE.ElementNode */) {\n childElm.setAttribute(HYDRATE_CHILD_ID, childId);\n }\n else if (childElm.nodeType === 3 /* NODE_TYPE.TextNode */) {\n const parentNode = childElm.parentNode;\n const nodeName = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName;\n if (nodeName !== 'STYLE' && nodeName !== 'SCRIPT') {\n const textNodeId = `${TEXT_NODE_ID}.${childId}`;\n const commentBeforeTextNode = doc.createComment(textNodeId);\n parentNode === null || parentNode === void 0 ? void 0 : parentNode.insertBefore(commentBeforeTextNode, childElm);\n }\n }\n else if (childElm.nodeType === 8 /* NODE_TYPE.CommentNode */) {\n if (childElm['s-sr']) {\n const slotName = childElm['s-sn'] || '';\n const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;\n childElm.nodeValue = slotNodeId;\n }\n }\n if (vnodeChild.$children$ != null) {\n // Increment depth each time we recur deeper into the tree\n const childDepth = depth + 1;\n vnodeChild.$children$.forEach((vnode, index) => {\n insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);\n });\n }\n};\nvar _a;\n/**\n * A WeakMap mapping runtime component references to their corresponding host reference\n * instances.\n *\n * **Note**: If we're in an HMR context we need to store a reference to this\n * value on `window` in order to maintain the mapping of {@link d.RuntimeRef}\n * to {@link d.HostRef} across HMR updates.\n *\n * This is necessary because when HMR updates for a component are processed by\n * the browser-side dev server client the JS bundle for that component is\n * re-fetched. Since the module containing {@link hostRefs} is included in\n * that bundle, if we do not store a reference to it the new iteration of the\n * component will not have access to the previous hostRef map, leading to a\n * bug where the new version of the component cannot properly initialize.\n */\nconst hostRefs = BUILD.hotModuleReplacement\n ? ((_a = window).__STENCIL_HOSTREFS__ || (_a.__STENCIL_HOSTREFS__ = new WeakMap()))\n : new WeakMap();\n/**\n * Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}\n *\n * @param ref the runtime ref of interest\n * @returns the Host reference (if found) or undefined\n */\nconst getHostRef = (ref) => hostRefs.get(ref);\n/**\n * Register a lazy instance with the {@link hostRefs} object so it's\n * corresponding {@link d.HostRef} can be retrieved later.\n *\n * @param lazyInstance the lazy instance of interest\n * @param hostRef that instances `HostRef` object\n * @returns a reference to the host ref WeakMap\n */\nconst registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);\n/**\n * Register a host element for a Stencil component, setting up various metadata\n * and callbacks based on {@link BUILD} flags as well as the component's runtime\n * metadata.\n *\n * @param hostElement the host element to register\n * @param cmpMeta runtime metadata for that component\n * @returns a reference to the host ref WeakMap\n */\nconst registerHost = (hostElement, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: hostElement,\n $cmpMeta$: cmpMeta,\n $instanceValues$: new Map(),\n };\n if (BUILD.isDev) {\n hostRef.$renderCount$ = 0;\n }\n if (BUILD.method && BUILD.lazyLoad) {\n hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));\n }\n if (BUILD.asyncLoading) {\n hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));\n hostElement['s-p'] = [];\n hostElement['s-rc'] = [];\n }\n addHostEventListeners(hostElement, hostRef, cmpMeta.$listeners$, false);\n return hostRefs.set(hostElement, hostRef);\n};\nconst isMemberInElement = (elm, memberName) => memberName in elm;\nconst consoleError = (e, el) => (customError || console.error)(e, el);\nconst STENCIL_DEV_MODE = BUILD.isTesting\n ? ['STENCIL:'] // E2E testing\n : [\n '%cstencil',\n 'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',\n ];\nconst consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);\nconst consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);\nconst consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);\nconst setErrorHandler = (handler) => (customError = handler);\nconst cmpModules = /*@__PURE__*/ new Map();\nconst loadModule = (cmpMeta, hostRef, hmrVersionId) => {\n // loadModuleImport\n const exportName = cmpMeta.$tagName$.replace(/-/g, '_');\n const bundleId = cmpMeta.$lazyBundleId$;\n if (BUILD.isDev && typeof bundleId !== 'string') {\n consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode \"${hostRef.$modeName$}\", but it does not exist.`);\n return undefined;\n }\n const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;\n if (module) {\n return module[exportName];\n }\n /*!__STENCIL_STATIC_IMPORT_SWITCH__*/\n return import(\n /* @vite-ignore */\n /* webpackInclude: /\\.entry\\.js$/ */\n /* webpackExclude: /\\.system\\.entry\\.js$/ */\n /* webpackMode: \"lazy\" */\n `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? '?s-hmr=' + hmrVersionId : ''}`).then((importedModule) => {\n if (!BUILD.hotModuleReplacement) {\n cmpModules.set(bundleId, importedModule);\n }\n return importedModule[exportName];\n }, consoleError);\n};\nconst styles = /*@__PURE__*/ new Map();\nconst modeResolutionChain = [];\nconst win = typeof window !== 'undefined' ? window : {};\nconst doc = win.document || { head: {} };\nconst H = (win.HTMLElement || class {\n});\nconst plt = {\n $flags$: 0,\n $resourcesUrl$: '',\n jmp: (h) => h(),\n raf: (h) => requestAnimationFrame(h),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts),\n};\nconst setPlatformHelpers = (helpers) => {\n Object.assign(plt, helpers);\n};\nconst supportsShadow = \n// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field\nBUILD.shadowDomShim && BUILD.shadowDom\n ? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()\n : true;\nconst supportsListenerOptions = /*@__PURE__*/ (() => {\n let supportsListenerOptions = false;\n try {\n doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {\n get() {\n supportsListenerOptions = true;\n },\n }));\n }\n catch (e) { }\n return supportsListenerOptions;\n})();\nconst promiseResolve = (v) => Promise.resolve(v);\nconst supportsConstructableStylesheets = BUILD.constructableCSS\n ? /*@__PURE__*/ (() => {\n try {\n new CSSStyleSheet();\n return typeof new CSSStyleSheet().replaceSync === 'function';\n }\n catch (e) { }\n return false;\n })()\n : false;\nconst queueDomReads = [];\nconst queueDomWrites = [];\nconst queueDomWritesLow = [];\nconst queueTask = (queue, write) => (cb) => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {\n nextTick(flush);\n }\n else {\n plt.raf(flush);\n }\n }\n};\nconst consume = (queue) => {\n for (let i = 0; i < queue.length; i++) {\n try {\n queue[i](performance.now());\n }\n catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nconst consumeTimeout = (queue, timeout) => {\n let i = 0;\n let ts = 0;\n while (i < queue.length && (ts = performance.now()) < timeout) {\n try {\n queue[i++](ts);\n }\n catch (e) {\n consoleError(e);\n }\n }\n if (i === queue.length) {\n queue.length = 0;\n }\n else if (i !== 0) {\n queue.splice(0, i);\n }\n};\nconst flush = () => {\n if (BUILD.asyncQueue) {\n queueCongestion++;\n }\n // always force a bunch of medium callbacks to run, but still have\n // a throttle on how many can run in a certain time\n // DOM READS!!!\n consume(queueDomReads);\n // DOM WRITES!!!\n if (BUILD.asyncQueue) {\n const timeout = (plt.$flags$ & 6 /* PLATFORM_FLAGS.queueMask */) === 2 /* PLATFORM_FLAGS.appLoaded */\n ? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))\n : Infinity;\n consumeTimeout(queueDomWrites, timeout);\n consumeTimeout(queueDomWritesLow, timeout);\n if (queueDomWrites.length > 0) {\n queueDomWritesLow.push(...queueDomWrites);\n queueDomWrites.length = 0;\n }\n if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n else {\n queueCongestion = 0;\n }\n }\n else {\n consume(queueDomWrites);\n if ((queuePending = queueDomReads.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n }\n};\nconst nextTick = (cb) => promiseResolve().then(cb);\nconst readTask = /*@__PURE__*/ queueTask(queueDomReads, false);\nconst writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);\nexport { BUILD, Env, NAMESPACE } from '@stencil/core/internal/app-data';\nexport { Build, Fragment, H, H as HTMLElement, Host, STENCIL_DEV_MODE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, doc, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getValue, h, insertVdomAnnotations, isMemberInElement, loadModule, modeResolutionChain, nextTick, parsePropertyValue, plt, postUpdateComponent, promiseResolve, proxyComponent, proxyCustomElement, readTask, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setPlatformOptions, setValue, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsShadow, win, writeTask };\n"],"mappings":"AAAO,MAAMA,EAAY,WCQzB,IAAIC,EAEJ,IAAIC,EAGJ,IAAIC,EAAqB,MAGzB,IAAIC,EAAY,MAGhB,IAAIC,EAAe,MAgBnB,MAAMC,EAAa,CAACC,EAAQC,EAAU,MAQ7B,CACD,MAAO,MAGf,GAEA,MAAMC,EAAa,CAACC,EAAKC,KAWhB,CACD,MAAO,MAGf,GAgEA,MAAMC,EAAe,mDAOrB,MAAMC,EAAc,yDACpB,MAAMC,EAAW,+BAcjB,MAAMC,EAAY,GAIlB,MAAMC,EAAS,6BACf,MAAMC,EAAU,+BAChB,MAAMC,EAASC,GAAMA,GAAK,KAQ1B,MAAMC,EAAiBC,IAEnBA,SAAWA,EACX,OAAOA,IAAM,UAAYA,IAAM,UAAU,EAU7C,SAASC,EAAyBC,GAC9B,IAAIC,EAAIC,EAAIC,EACZ,OAAQA,GAAMD,GAAMD,EAAKD,EAAII,QAAU,MAAQH,SAAY,OAAS,EAAIA,EAAGI,cAAc,6BAA+B,MAAQH,SAAY,OAAS,EAAIA,EAAGI,aAAa,cAAgB,MAAQH,SAAY,EAAIA,EAAKI,SAC1N,CAWK,MAACC,EAAI,CAACC,EAAUC,KAAcC,KAC/B,IAAIC,EAAQ,KACZ,IAAIzB,EAAM,KAEV,IAAI0B,EAAS,MACb,IAAIC,EAAa,MACjB,MAAMC,EAAgB,GACtB,MAAMC,EAAQC,IACV,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAEE,OAAQD,IAAK,CAC/BN,EAAQK,EAAEC,GACV,GAAIE,MAAMC,QAAQT,GAAQ,CACtBI,EAAKJ,EACrB,MACiB,GAAIA,GAAS,aAAeA,IAAU,UAAW,CAClD,GAAKC,SAAgBJ,IAAa,aAAeZ,EAAce,GAAS,CACpEA,EAAQU,OAAOV,EACnC,CAMgB,GAAIC,GAAUC,EAAY,CAEtBC,EAAcA,EAAcI,OAAS,GAAGI,GAAUX,CACtE,KACqB,CAEDG,EAAcS,KAAKX,EAASY,EAAS,KAAMb,GAASA,EACxE,CACgBE,EAAaD,CAC7B,CACA,GAEIG,EAAKL,GACL,GAAID,EAAW,CAIX,GAAqBA,EAAUvB,IAAK,CAChCA,EAAMuB,EAAUvB,GAC5B,CAK6B,CACjB,MAAMuC,EAAYhB,EAAUiB,WAAajB,EAAUkB,MACnD,GAAIF,EAAW,CACXhB,EAAUkB,aACCF,IAAc,SACfA,EACAG,OAAOC,KAAKJ,GACTK,QAAQC,GAAMN,EAAUM,KACxBC,KAAK,IAClC,CACA,CACA,CAMI,UAAmCxB,IAAa,WAAY,CAExD,OAAOA,EAASC,IAAc,KAAO,GAAKA,EAAWK,EAAemB,EAC5E,CACI,MAAMC,EAAQV,EAAShB,EAAU,MACjC0B,EAAMC,EAAU1B,EAChB,GAAIK,EAAcI,OAAS,EAAG,CAC1BgB,EAAME,EAAatB,CAC3B,CACuB,CACfoB,EAAMG,EAAQnD,CACtB,CAII,OAAOgD,CAAK,EAUhB,MAAMV,EAAW,CAACc,EAAKC,KACnB,MAAML,EAAQ,CACVM,EAAS,EACTC,EAAOH,EACPhB,EAAQiB,EACRG,EAAO,KACPN,EAAY,MAES,CACrBF,EAAMC,EAAU,IACxB,CACuB,CACfD,EAAMG,EAAQ,IACtB,CAII,OAAOH,CAAK,EAEX,MAACS,EAAO,GAOb,MAAMC,EAAUC,GAASA,GAAQA,EAAKJ,IAAUE,EAQhD,MAAMV,EAAc,CAChBa,QAAS,CAACpC,EAAUqC,IAAOrC,EAASsC,IAAIC,GAAiBH,QAAQC,GACjEC,IAAK,CAACtC,EAAUqC,IAAOrC,EAASsC,IAAIC,GAAiBD,IAAID,GAAIC,IAAIE,IASrE,MAAMD,EAAmBJ,IAAI,CACzBM,OAAQN,EAAKV,EACbiB,UAAWP,EAAKT,EAChBiB,KAAMR,EAAKR,EACXiB,MAAOT,EAAKU,EACZC,KAAMX,EAAKJ,EACXgB,MAAOZ,EAAKvB,IAWhB,MAAM4B,EAAoBL,IACtB,UAAWA,EAAKW,OAAS,WAAY,CACjC,MAAM/C,EAAYmB,OAAO8B,OAAO,GAAIb,EAAKM,QACzC,GAAIN,EAAKQ,KAAM,CACX5C,EAAUvB,IAAM2D,EAAKQ,IACjC,CACQ,GAAIR,EAAKS,MAAO,CACZ7C,EAAUkD,KAAOd,EAAKS,KAClC,CACQ,OAAO/C,EAAEsC,EAAKW,KAAM/C,KAAeoC,EAAKO,WAAa,GAC7D,CACI,MAAMlB,EAAQV,EAASqB,EAAKW,KAAMX,EAAKY,OACvCvB,EAAMC,EAAUU,EAAKM,OACrBjB,EAAME,EAAaS,EAAKO,UACxBlB,EAAMG,EAAQQ,EAAKQ,KACnBnB,EAAMqB,EAASV,EAAKS,MACpB,OAAOpB,CAAK,EAkShB,MAAM0B,EAAqB,CAACC,EAAWC,KAEnC,GAAID,GAAa,OAASjE,EAAciE,GAAY,CAChD,GAAyBC,EAAW,EAA8B,CAG9D,OAAOD,IAAc,QAAU,MAAQA,IAAc,MAAQA,CACzE,CACQ,GAAwBC,EAAW,EAA6B,CAE5D,OAAOC,WAAWF,EAC9B,CACQ,GAAwBC,EAAW,EAA6B,CAG5D,OAAOzC,OAAOwC,EAC1B,CAEQ,OAAOA,CACf,CAGI,OAAOA,CAAS,EAEf,MAACG,EAAcC,GAA0BC,GAAWD,GAAwB,cAC5E,MAACE,EAAc,CAACF,EAAKN,EAAMS,KAC5B,MAAMC,EAAML,EAAWC,GACvB,MAAO,CACHK,KAAOC,GAIIC,EAAUH,EAAKV,EAAM,CACxBc,WAAYL,EAAQ,GACpBM,YAAaN,EAAQ,GACrBO,cAAeP,EAAQ,GACvBG,WAGX,EASL,MAAMC,EAAY,CAACH,EAAKV,EAAMiB,KAC1B,MAAMC,EAAKC,GAAIC,GAAGpB,EAAMiB,GACxBP,EAAIW,cAAcH,GAClB,OAAOA,CAAE,EAEb,MAAMI,EAAkC,IAAIC,QAC5C,MAAMC,EAAgB,CAAC1G,EAAS2G,EAASC,KACrC,IAAIC,EAAQC,GAAOC,IAAI/G,GACvB,GAAIgH,IAAoCJ,EAAS,CAC7CC,EAASA,GAAS,IAAII,cACtB,UAAWJ,IAAU,SAAU,CAC3BA,EAAQF,CACpB,KACa,CACDE,EAAMK,YAAYP,EAC9B,CACA,KACS,CACDE,EAAQF,CAChB,CACIG,GAAOK,IAAInH,EAAS6G,EAAM,EAE9B,MAAMO,EAAW,CAACC,EAAoBC,EAASC,KAC3C,IAAIhG,EACJ,MAAMvB,EAAUwH,EAAWF,GAC3B,MAAMT,EAAQC,GAAOC,IAAI/G,GAMzBqH,EAAqBA,EAAmBI,WAAa,GAAsCJ,EAAqB/F,GAChH,GAAIuF,EAAO,CACP,UAAWA,IAAU,SAAU,CAC3BQ,EAAqBA,EAAmB3F,MAAQ2F,EAChD,IAAIK,EAAgBlB,EAAkBO,IAAIM,GAC1C,IAAIM,EACJ,IAAKD,EAAe,CAChBlB,EAAkBW,IAAIE,EAAqBK,EAAgB,IAAIE,IAC/E,CACY,IAAKF,EAAcG,IAAI7H,GAAU,CAOxB,CACD2H,EAAWrG,GAAIwG,cAAc,SAC7BH,EAASI,UAAYlB,EAErB,MAAMmB,GAASzG,EAAK8E,GAAI4B,KAAa,MAAQ1G,SAAY,EAAIA,EAAKF,EAAyBC,IAC3F,GAAI0G,GAAS,KAAM,CACfL,EAASO,aAAa,QAASF,EACvD,CAIoBX,EAAmBc,aAAaR,EAAUN,EAAmB1F,cAAc,QAC/F,CAEgB,GAAI2F,EAAQvD,EAAU,EAAqC,CACvD4D,EAASI,WAAanH,CAC1C,CACgB,GAAI8G,EAAe,CACfA,EAAcU,IAAIpI,EACtC,CACA,CACA,MACa,IAA+BqH,EAAmBgB,mBAAmBC,SAASzB,GAAQ,CACvFQ,EAAmBgB,mBAAqB,IAAIhB,EAAmBgB,mBAAoBxB,EAC/F,CACA,CACI,OAAO7G,CAAO,EAElB,MAAMuI,EAAgBC,IAClB,MAAMlB,EAAUkB,EAAQC,EACxB,MAAM7C,EAAM4C,EAAQE,cACpB,MAAM/C,EAAQ2B,EAAQvD,EACtB,MAAM4E,EAAkBtI,EAAW,eAAgBiH,EAAQsB,GAC3D,MAAM5I,EAAUoH,EAA8CxB,EAAIiD,WAAajD,EAAIiD,WAAajD,EAAIkD,cAAexB,GACnH,GAAiE3B,EAAQ,GAA6C,CAQlHC,EAAI,QAAU5F,EACd4F,EAAImD,UAAUX,IAAIpI,EAAU,KAIpC,CACI2I,GAAiB,EAErB,MAAMnB,EAAa,CAACwB,EAAKzB,IAAS,MAAuGyB,EAAa,EAyBtJ,MAAMC,EAAc,CAACrD,EAAKsD,EAAYC,EAAUC,EAAUC,EAAO1D,KAC7D,GAAIwD,IAAaC,EAAU,CACvB,IAAIE,EAASC,GAAkB3D,EAAKsD,GACpC,IAAIM,EAAKN,EAAWO,cACpB,GAAuBP,IAAe,QAAS,CAC3C,MAAMH,EAAYnD,EAAImD,UACtB,MAAMW,EAAaC,EAAeR,GAClC,MAAMS,EAAaD,EAAeP,GAClCL,EAAUc,UAAUH,EAAWrG,QAAQd,GAAMA,IAAMqH,EAAWtB,SAAS/F,MACvEwG,EAAUX,OAAOwB,EAAWvG,QAAQd,GAAMA,IAAMmH,EAAWpB,SAAS/F,KAChF,MACa,GAAuB2G,IAAe,QAAS,CAE3B,CACjB,IAAK,MAAMY,KAAQX,EAAU,CACzB,IAAKC,GAAYA,EAASU,IAAS,KAAM,CACrC,GAAgCA,EAAKxB,SAAS,KAAM,CAChD1C,EAAIiB,MAAMkD,eAAeD,EACrD,KAC6B,CACDlE,EAAIiB,MAAMiD,GAAQ,EAC9C,CACA,CACA,CACA,CACY,IAAK,MAAMA,KAAQV,EAAU,CACzB,IAAKD,GAAYC,EAASU,KAAUX,EAASW,GAAO,CAChD,GAAgCA,EAAKxB,SAAS,KAAM,CAChD1C,EAAIiB,MAAMmD,YAAYF,EAAMV,EAASU,GAC7D,KACyB,CACDlE,EAAIiB,MAAMiD,GAAQV,EAASU,EACnD,CACA,CACA,CACA,MACa,GAAqBZ,IAAe,YAEpC,GAAqBA,IAAe,MAAO,CAE5C,GAAIE,EAAU,CACVA,EAASxD,EACzB,CACA,MACa,IACkB0D,GACnBJ,EAAW,KAAO,KAClBA,EAAW,KAAO,IAAK,CAKvB,GAAIA,EAAW,KAAO,IAAK,CAQvBA,EAAaA,EAAWe,MAAM,EAC9C,MACiB,GAAIV,GAAkBW,GAAKV,GAAK,CAKjCN,EAAaM,EAAGS,MAAM,EACtC,KACiB,CAMDf,EAAaM,EAAG,GAAKN,EAAWe,MAAM,EACtD,CACY,GAAId,GAAYC,EAAU,CAItB,MAAMe,EAAUjB,EAAWkB,SAASC,GAEpCnB,EAAaA,EAAWoB,QAAQC,EAAqB,IACrD,GAAIpB,EAAU,CACV9C,GAAImE,IAAI5E,EAAKsD,EAAYC,EAAUgB,EACvD,CACgB,GAAIf,EAAU,CACV/C,GAAIoE,IAAI7E,EAAKsD,EAAYE,EAAUe,EACvD,CACA,CACA,KACuC,CAE3B,MAAMO,EAAYvJ,EAAciI,GAChC,IAAKE,GAAWoB,GAAatB,IAAa,QAAWC,EAAO,CACxD,IACI,IAAKzD,EAAIrF,QAAQ+H,SAAS,KAAM,CAC5B,MAAMqC,EAAIvB,GAAY,KAAO,GAAKA,EAElC,GAAIF,IAAe,OAAQ,CACvBI,EAAS,KACrC,MAC6B,GAAIH,GAAY,MAAQvD,EAAIsD,IAAeyB,EAAG,CAC/C/E,EAAIsD,GAAcyB,CAC9C,CACA,KACyB,CACD/E,EAAIsD,GAAcE,CAC1C,CACA,CACgB,MAAOwB,GAIvB,CACA,CAQY,IAAIC,EAAQ,MACS,CACjB,GAAIrB,KAAQA,EAAKA,EAAGc,QAAQ,YAAa,KAAM,CAC3CpB,EAAaM,EACbqB,EAAQ,IAC5B,CACA,CACY,GAAIzB,GAAY,MAAQA,IAAa,MAAO,CACxC,GAAIA,IAAa,OAASxD,EAAIhE,aAAasH,KAAgB,GAAI,CAC3D,GAAuB2B,EAAO,CAC1BjF,EAAIkF,kBAAkBjK,EAAUqI,EACxD,KACyB,CACDtD,EAAImF,gBAAgB7B,EAC5C,CACA,CACA,MACiB,KAAMI,GAAU3D,EAAQ,GAA8B0D,KAAWqB,EAAW,CAC7EtB,EAAWA,IAAa,KAAO,GAAKA,EACpC,GAAuByB,EAAO,CAC1BjF,EAAIoF,eAAenK,EAAUqI,EAAYE,EAC7D,KACqB,CACDxD,EAAIsC,aAAagB,EAAYE,EACjD,CACA,CACA,CACA,GAEA,MAAM6B,EAAsB,KAM5B,MAAMtB,EAAkBuB,IAAYA,EAAQ,GAAKA,EAAMC,MAAMF,GAC7D,MAAMZ,EAAuB,UAC7B,MAAME,EAAsB,IAAIa,OAAOf,EAAuB,KAC9D,MAAMgB,EAAgB,CAACC,EAAUC,EAAUpL,EAAW+I,KAIlD,MAAMtD,EAAM2F,EAAStH,EAAMwD,WAAa,IAAuC8D,EAAStH,EAAMuH,KACxFD,EAAStH,EAAMuH,KACfD,EAAStH,EACf,MAAMwH,EAAiBH,GAAYA,EAAS5H,GAAY5C,EACxD,MAAM4K,EAAgBH,EAAS7H,GAAW5C,EACrB,CAEjB,IAAKoI,KAAcuC,EAAe,CAC9B,KAAMvC,KAAcwC,GAAgB,CAChCzC,EAAYrD,EAAKsD,EAAYuC,EAAcvC,GAAarH,UAAW1B,EAAWoL,EAASxH,EACvG,CACA,CACA,CAEI,IAAKmF,KAAcwC,EAAe,CAC9BzC,EAAYrD,EAAKsD,EAAYuC,EAAcvC,GAAawC,EAAcxC,GAAa/I,EAAWoL,EAASxH,EAC/G,GAYA,MAAM4H,EAAY,CAACC,EAAgBC,EAAgBC,EAAYC,KAE3D,MAAMhJ,EAAW8I,EAAelI,EAAWmI,GAC3C,IAAItJ,EAAI,EACR,IAAIoD,EACJ,IAAIoG,EAoBJ,GAAsBjJ,EAASF,IAAW,KAAM,CAE5C+C,EAAM7C,EAASkB,EAAQ3C,GAAI2K,eAAelJ,EAASF,EAC3D,KAMS,CACD,IAAkB1C,EAAW,CACzBA,EAAY4C,EAASiB,IAAU,KAC3C,CAEQ4B,EAAM7C,EAASkB,EACT3C,GAAI4K,gBAAgB/L,EAAYY,EAASC,EAErC+B,EAASiB,GAInB,GAAiB7D,GAAa4C,EAASiB,IAAU,gBAAiB,CAC9D7D,EAAY,KACxB,CAEiC,CACrBkL,EAAc,KAAMtI,EAAU5C,EAC1C,CACQ,GAAyCc,EAAMjB,IAAY4F,EAAI,UAAY5F,EAAS,CAGhF4F,EAAImD,UAAUX,IAAKxC,EAAI,QAAU5F,EAC7C,CACQ,GAAI+C,EAASY,EAAY,CACrB,IAAKnB,EAAI,EAAGA,EAAIO,EAASY,EAAWlB,SAAUD,EAAG,CAE7CwJ,EAAYL,EAAUC,EAAgB7I,EAAUP,GAEhD,GAAIwJ,EAAW,CAEXpG,EAAIuG,YAAYH,EACpC,CACA,CACA,CACuB,CACX,GAAIjJ,EAASiB,IAAU,MAAO,CAE1B7D,EAAY,KAC5B,MACiB,GAAIyF,EAAIrF,UAAY,gBAAiB,CAEtCJ,EAAY,IAC5B,CACA,CACA,CAGIyF,EAAI,QAAU3F,EAyBd,OAAO2F,CAAG,EAsEd,MAAMwG,EAAY,CAACL,EAAWM,EAAQC,EAAaC,EAAQC,EAAUC,KACjE,IAAIC,EAAY,EAChB,IAAIV,EACJ,GAAuBU,EAAa7D,YAAc6D,EAAanM,UAAYN,EAAa,CACpFyM,EAAeA,EAAa7D,UACpC,CACI,KAAO2D,GAAYC,IAAUD,EAAU,CACnC,GAAID,EAAOC,GAAW,CAClBR,EAAYL,EAAU,KAAMW,EAAaE,GACzC,GAAIR,EAAW,CACXO,EAAOC,GAAUvI,EAAQ+H,EACzBU,EAAavE,aAAa6D,EAA0DK,EACpG,CACA,CACA,GAaA,MAAMM,EAAe,CAACJ,EAAQC,EAAUC,KACpC,IAAK,IAAIG,EAAQJ,EAAUI,GAASH,IAAUG,EAAO,CACjD,MAAMnJ,EAAQ8I,EAAOK,GACrB,GAAInJ,EAAO,CACP,MAAMmC,EAAMnC,EAAMQ,EAClB4I,EAAiBpJ,GACjB,GAAImC,EAAK,CAgBLA,EAAIiE,QACpB,CACA,CACA,GAuEA,MAAMiD,EAAiB,CAACf,EAAWgB,EAAOhK,EAAUiK,EAAOC,EAAkB,SACzE,IAAIC,EAAc,EAClB,IAAIC,EAAc,EAClB,IAAIC,EAAW,EACf,IAAI5K,EAAI,EACR,IAAI6K,EAAYN,EAAMtK,OAAS,EAC/B,IAAI6K,EAAgBP,EAAM,GAC1B,IAAIQ,EAAcR,EAAMM,GACxB,IAAIG,EAAYR,EAAMvK,OAAS,EAC/B,IAAIgL,EAAgBT,EAAM,GAC1B,IAAIU,EAAcV,EAAMQ,GACxB,IAAIpJ,EACJ,IAAIuJ,EACJ,MAAOT,GAAeG,GAAaF,GAAeK,EAAW,CACzD,GAAIF,GAAiB,KAAM,CAEvBA,EAAgBP,IAAQG,EACpC,MACa,GAAIK,GAAe,KAAM,CAC1BA,EAAcR,IAAQM,EAClC,MACa,GAAII,GAAiB,KAAM,CAC5BA,EAAgBT,IAAQG,EACpC,MACa,GAAIO,GAAe,KAAM,CAC1BA,EAAcV,IAAQQ,EAClC,MACa,GAAII,EAAYN,EAAeG,EAAeR,GAAkB,CAKjEY,EAAMP,EAAeG,EAAeR,GACpCK,EAAgBP,IAAQG,GACxBO,EAAgBT,IAAQG,EACpC,MACa,GAAIS,EAAYL,EAAaG,EAAaT,GAAkB,CAI7DY,EAAMN,EAAaG,EAAaT,GAChCM,EAAcR,IAAQM,GACtBK,EAAcV,IAAQQ,EAClC,MACa,GAAII,EAAYN,EAAeI,EAAaT,GAAkB,CAkB/DY,EAAMP,EAAeI,EAAaT,GAkBlClB,EAAU5D,aAAamF,EAAcrJ,EAAOsJ,EAAYtJ,EAAM6J,aAC9DR,EAAgBP,IAAQG,GACxBQ,EAAcV,IAAQQ,EAClC,MACa,GAAII,EAAYL,EAAaE,EAAeR,GAAkB,CAmB/DY,EAAMN,EAAaE,EAAeR,GAMlClB,EAAU5D,aAAaoF,EAAYtJ,EAAOqJ,EAAcrJ,GACxDsJ,EAAcR,IAAQM,GACtBI,EAAgBT,IAAQG,EACpC,KACa,CASDC,GAAY,EACO,CACf,IAAK5K,EAAI0K,EAAa1K,GAAK6K,IAAa7K,EAAG,CACvC,GAAIuK,EAAMvK,IAAMuK,EAAMvK,GAAGoB,IAAU,MAAQmJ,EAAMvK,GAAGoB,IAAU6J,EAAc7J,EAAO,CAC/EwJ,EAAW5K,EACX,KACxB,CACA,CACA,CACY,GAAqB4K,GAAY,EAAG,CAGhCO,EAAYZ,EAAMK,GAClB,GAAIO,EAAU3J,IAAUyJ,EAAczJ,EAAO,CAEzCI,EAAOuH,EAAUoB,GAASA,EAAMI,GAAcpK,EAAUqK,EAC5E,KACqB,CACDS,EAAMF,EAAWF,EAAeR,GAGhCF,EAAMK,GAAYvL,UAClBuC,EAAOuJ,EAAU1J,CACrC,CACgBwJ,EAAgBT,IAAQG,EACxC,KACiB,CAKD/I,EAAOuH,EAAUoB,GAASA,EAAMI,GAAcpK,EAAUoK,GACxDM,EAAgBT,IAAQG,EACxC,CACY,GAAI/I,EAAM,CAKD,CACDkJ,EAAcrJ,EAAM8J,WAAW5F,aAAa/D,EAAMkJ,EAAcrJ,EACpF,CACA,CACA,CACA,CACI,GAAIiJ,EAAcG,EAAW,CAEzBjB,EAAUL,EAAWiB,EAAMQ,EAAY,IAAM,KAAO,KAAOR,EAAMQ,EAAY,GAAGvJ,EAAOlB,EAAUiK,EAAOG,EAAaK,EAC7H,MACS,GAAuBL,EAAcK,EAAW,CAIjDb,EAAaI,EAAOG,EAAaG,EACzC,GAqBA,MAAMO,EAAc,CAACI,EAAWC,EAAYhB,EAAkB,SAG1D,GAAIe,EAAUhK,IAAUiK,EAAWjK,EAAO,CAStC,IAAsBiJ,EAAiB,CACnC,OAAOe,EAAUpK,IAAUqK,EAAWrK,CAClD,CACQ,OAAO,IACf,CACI,OAAO,KAAK,EAmBhB,MAAMiK,EAAQ,CAACK,EAAUnL,EAAUkK,EAAkB,SACjD,MAAMrH,EAAO7C,EAASkB,EAAQiK,EAASjK,EACvC,MAAMkK,EAAcD,EAASvK,EAC7B,MAAMyK,EAAcrL,EAASY,EAC7B,MAAME,EAAMd,EAASiB,EACrB,MAAMF,EAAOf,EAASF,EAEtB,GAAuBiB,IAAS,KAAM,CACnB,CAGX3D,EAAY0D,IAAQ,MAAQ,KAAOA,IAAQ,gBAAkB,MAAQ1D,CACjF,CACkD,CACtC,GAAkB0D,IAAQ,SAAW3D,OAMhC,CAIDmL,EAAc6C,EAAUnL,EAAU5C,EAClD,CACA,CACQ,GAAuBgO,IAAgB,MAAQC,IAAgB,KAAM,CAGjEtB,EAAelH,EAAKuI,EAAapL,EAAUqL,EAAanB,EACpE,MACa,GAAImB,IAAgB,KAAM,CAE3B,GAAyCF,EAASrL,IAAW,KAAM,CAE/D+C,EAAIyI,YAAc,EAClC,CAEYjC,EAAUxG,EAAK,KAAM7C,EAAUqL,EAAa,EAAGA,EAAY3L,OAAS,EAChF,MACa,GAAuB0L,IAAgB,KAAM,CAE9CxB,EAAawB,EAAa,EAAGA,EAAY1L,OAAS,EAC9D,CACQ,GAAiBtC,GAAa0D,IAAQ,MAAO,CACzC1D,EAAY,KACxB,CACA,MAKS,GAAsB+N,EAASrL,IAAWiB,EAAM,CAGjD8B,EAAI0I,KAAOxK,CACnB,GA0LA,MAAM+I,EAAoB0B,IACH,CACfA,EAAM7K,GAAW6K,EAAM7K,EAAQ8B,KAAO+I,EAAM7K,EAAQ8B,IAAI,MACxD+I,EAAM5K,GAAc4K,EAAM5K,EAAWY,IAAIsI,EACjD,GAeA,MAAM2B,EAAa,CAAChG,EAASiG,EAAiBC,EAAgB,SAE1D,MAAMC,EAAUnG,EAAQE,cACxB,MAAMpB,EAAUkB,EAAQC,EACxB,MAAMyF,EAAW1F,EAAQoG,GAAW7L,EAAS,KAAM,MAMnD,MAAM8L,EAAY1K,EAAOsK,GAAmBA,EAAkB3M,EAAE,KAAM,KAAM2M,GAC5ExO,EAAc0O,EAAQpO,QAgBtB,GAAqB+G,EAAQwH,EAAkB,CAC3CD,EAAUnL,EAAUmL,EAAUnL,GAAW,GACzC4D,EAAQwH,EAAiBvK,KAAI,EAAEwK,EAAUC,KAAgBH,EAAUnL,EAAQsL,GAAaL,EAAQI,IACxG,CAOI,GAAIL,GAAiBG,EAAUnL,EAAS,CACpC,IAAK,MAAMjD,KAAO0C,OAAOC,KAAKyL,EAAUnL,GAAU,CAS9C,GAAIiL,EAAQM,aAAaxO,KAAS,CAAC,MAAO,MAAO,QAAS,SAAS6H,SAAS7H,GAAM,CAC9EoO,EAAUnL,EAAQjD,GAAOkO,EAAQlO,EACjD,CACA,CACA,CACIoO,EAAU7K,EAAQ,KAClB6K,EAAU9K,GAAW,EACrByE,EAAQoG,EAAUC,EAClBA,EAAU5K,EAAQiK,EAASjK,EAA2B0K,EAAQ9F,YAAc8F,EACvC,CACjC3O,EAAU2O,EAAQ,OAC1B,CACIzO,GAAwCoH,EAAQvD,EAAU,KAA8C,EAOxG8J,EAAMK,EAAUW,EAAWH,EAAc,EA6H7C,MAAMQ,EAAmB,CAAC1G,EAAS2G,KAC/B,GAA0BA,IAAsB3G,EAAQ4G,GAAqBD,EAAkB,OAAQ,CACnGA,EAAkB,OAAOrM,KAAK,IAAIuM,SAASC,GAAO9G,EAAQ4G,EAAoBE,IACtF,GAEA,MAAMC,EAAiB,CAAC/G,EAASkG,KACW,CACpClG,EAAQzE,GAAW,EAC3B,CACI,GAA0ByE,EAAQzE,EAAU,EAAyC,CACjFyE,EAAQzE,GAAW,IACnB,MACR,CACImL,EAAiB1G,EAASA,EAAQgH,GAIlC,MAAMC,EAAW,IAAMC,EAAclH,EAASkG,GAC9C,OAAyBiB,GAAUF,EAAsB,EAY7D,MAAMC,EAAgB,CAAClH,EAASkG,KAE5B,MAAMkB,EAAcvP,EAAW,iBAAkBmI,EAAQC,EAAUG,GACnE,MAAMiH,EAA4BrH,EAAQsH,EAa1C,IAAIC,EACJ,GAAIrB,EAAe,CAC2B,CACtClG,EAAQzE,GAAW,IACnB,GAAIyE,EAAQwH,EAAmB,CAC3BxH,EAAQwH,EAAkBzL,KAAI,EAAE0L,EAAYC,KAAWC,GAASN,EAAUI,EAAYC,KACtF1H,EAAQwH,EAAoBnO,SAC5C,CACA,CAE+B,CAMnBkO,EAAeI,GAASN,EAAU,oBAC9C,CACA,CAa6B,CACrBE,EAAeK,EAAQL,GAAc,IAAMI,GAASN,EAAU,wBACtE,CACID,IACA,OAAOQ,EAAQL,GAAc,IAAMM,EAAgB7H,EAASqH,EAAUnB,IAAe,EAkBzF,MAAM0B,EAAU,CAACL,EAAcO,IAAOC,EAAWR,GAAgBA,EAAaS,KAAKF,GAAMA,IAWzF,MAAMC,EAAcR,GAAiBA,aAAwBV,SACxDU,GAAgBA,EAAaS,aAAeT,EAAaS,OAAS,WAWvE,MAAMH,EAAkBI,MAAOjI,EAASqH,EAAUnB,KAC9C,IAAInN,EACJ,MAAMqE,EAAM4C,EAAQE,cACpB,MAAMgI,EAAYrQ,EAAW,SAAUmI,EAAQC,EAAUG,GACzD,MAAM+H,EAAK/K,EAAI,QACf,GAAmB8I,EAAe,CAE9BnG,EAAaC,EACrB,CACI,MAAMoI,EAAYvQ,EAAW,SAAUmI,EAAQC,EAAUG,GAOpD,CACDiI,EAAWrI,EAASqH,EAAUjK,EAAK8I,EAC3C,CAuBI,GAA0BiC,EAAI,CAI1BA,EAAGpM,KAAKD,GAAOA,MACfsB,EAAI,QAAU/D,SACtB,CACI+O,IACAF,IACwB,CACpB,MAAMI,GAAoBvP,EAAKqE,EAAI,UAAY,MAAQrE,SAAY,EAAIA,EAAK,GAC5E,MAAMwP,EAAa,IAAMC,GAAoBxI,GAC7C,GAAIsI,EAAiBrO,SAAW,EAAG,CAC/BsO,GACZ,KACa,CACD1B,QAAQ4B,IAAIH,GAAkBN,KAAKO,GACnCvI,EAAQzE,GAAW,EACnB+M,EAAiBrO,OAAS,CACtC,CACA,GAiBA,MAAMoO,EAAa,CAACrI,EAASqH,EAAUjK,EAAK8I,KAQxC,IAMImB,EAAyBA,EAASqB,SACN,CACxB1I,EAAQzE,IAAY,EAChC,CACmC,CACvByE,EAAQzE,GAAW,CAC/B,CACgD,CACG,CAO9B,CACDyK,EAAWhG,EAASqH,EAAUnB,EAClD,CACA,CAUA,CACA,CACI,MAAO9D,GACHuG,GAAavG,EAAGpC,EAAQE,cAChC,CAEI,OAAO,IAAI,EAGf,MAAMsI,GAAuBxI,IACzB,MAAMjI,EAAUiI,EAAQC,EAAUG,EAClC,MAAMhD,EAAM4C,EAAQE,cACpB,MAAM0I,EAAgB/Q,EAAW,aAAcE,GAC/C,MAAMsP,EAA4BrH,EAAQsH,EAC1C,MAAMX,EAAoB3G,EAAQgH,EACV,CAIpBW,GAASN,EAAU,qBAI3B,CAEI,KAAMrH,EAAQzE,EAAU,IAAyC,CAC7DyE,EAAQzE,GAAW,GAC6B,CAE5CsN,GAAgBzL,EAC5B,CAC8B,CAIlBuK,GAASN,EAAU,mBAI/B,CAEQuB,IACwB,CACpB5I,EAAQ8I,EAAiB1L,GACzB,IAAKuJ,EAAmB,CACpBoC,IAChB,CACA,CACA,KACS,CAeDH,GACR,CACwC,CAChC5I,EAAQgJ,EAAoB5L,EACpC,CAG4B,CACpB,GAAI4C,EAAQ4G,EAAmB,CAC3B5G,EAAQ4G,IACR5G,EAAQ4G,EAAoBvN,SACxC,CACQ,GAAI2G,EAAQzE,EAAU,IAAoC,CACtD0N,IAAS,IAAMlC,EAAe/G,EAAS,QACnD,CACQA,EAAQzE,KAAa,EAA0C,IACvE,GAkBA,MAAMwN,GAAcG,IAGU,CACtBL,GAAgB/P,GAAIqQ,gBAC5B,CAIIF,IAAS,IAAM1L,EAAUmE,GAAK,UAAW,CAAEpE,OAAQ,CAAE8L,UAAW7R,MAAe,EAenF,MAAMoQ,GAAW,CAACN,EAAUgC,EAAQC,KAChC,GAAIjC,GAAYA,EAASgC,GAAS,CAC9B,IACI,OAAOhC,EAASgC,GAAQC,EACpC,CACQ,MAAOlH,GACHuG,GAAavG,EACzB,CACA,CACI,OAAO/I,SAAS,EAmBpB,MAAMwP,GAAmBzL,GACnBA,EAAImD,UAAUX,IAAI,YAgBxB,MAAM2J,GAAW,CAACvM,EAAKuJ,IAAatJ,GAAWD,GAAKwM,EAAiBjL,IAAIgI,GACzE,MAAMkD,GAAW,CAACzM,EAAKuJ,EAAUmD,EAAQ5K,KAErC,MAAMkB,EAAU/C,GAAWD,GAC3B,MAAMI,EAAuB4C,EAAQE,cACrC,MAAMyJ,EAAS3J,EAAQwJ,EAAiBjL,IAAIgI,GAC5C,MAAMpJ,EAAQ6C,EAAQzE,EACtB,MAAM8L,EAA4BrH,EAAQsH,EAC1CoC,EAAS/M,EAAmB+M,EAAQ5K,EAAQ8K,EAAUrD,GAAU,IAEhE,MAAMsD,EAAaC,OAAOC,MAAMJ,IAAWG,OAAOC,MAAML,GACxD,MAAMM,EAAiBN,IAAWC,IAAWE,EAC7C,MAA0B1M,EAAQ,IAA8CwM,IAAWtQ,YAAc2Q,EAAgB,CAGrHhK,EAAQwJ,EAAiB7K,IAAI4H,EAAUmD,GASvC,GAAuBrC,EAAU,CAE7B,GAA2BvI,EAAQmL,GAAc9M,EAAQ,IAAmC,CACxF,MAAM+M,EAAepL,EAAQmL,EAAW1D,GACxC,GAAI2D,EAAc,CAEdA,EAAanO,KAAKoO,IACd,IAEI9C,EAAS8C,GAAiBT,EAAQC,EAAQpD,EACtE,CACwB,MAAOnE,GACHuG,GAAavG,EAAGhF,EAC5C,IAEA,CACA,CACY,IACKD,GAAS,EAAiC,OAA4C,EAAgC,CAUvH4J,EAAe/G,EAAS,MACxC,CACA,CACA,GAYA,MAAMoK,GAAiB,CAACC,EAAMvL,EAAS3B,KACnC,IAAIpE,EACJ,MAAMuR,EAAYD,EAAKC,UAwBvB,GAAoBxL,EAAQ8K,EAAW,CACnC,GAA2BS,EAAKE,SAAU,CACtCzL,EAAQmL,EAAaI,EAAKE,QACtC,CAEQ,MAAMC,EAAU7P,OAAO8P,QAAQ3L,EAAQ8K,GACvCY,EAAQzO,KAAI,EAAE2E,GAAagK,OACvB,GACKA,EAAc,IACUvN,EAAQ,GAAmCuN,EAAc,GAA+B,CAEjH/P,OAAOgQ,eAAeL,EAAW5J,EAAY,CACzC,GAAAnC,GAEI,OAAOgL,GAASqB,KAAMlK,EAC9C,EACoB,GAAA/B,CAAIiC,GAiBA6I,GAASmB,KAAMlK,EAAYE,EAAU9B,EAC7D,EACoB+L,aAAc,KACdC,WAAY,MAEhC,MACiB,GAED3N,EAAQ,GACRuN,EAAc,GAA8B,CAE5C/P,OAAOgQ,eAAeL,EAAW5J,EAAY,CACzC,KAAAgC,IAASqI,GACL,IAAIhS,EACJ,MAAMiE,EAAMC,GAAW2N,MACvB,OAAQ7R,EAAKiE,IAAQ,MAAQA,SAAa,OAAS,EAAIA,EAAIgO,KAAyB,MAAQjS,SAAY,OAAS,EAAIA,EAAGiP,MAAK,KAAQ,IAAIjP,EAAI,OAAQA,EAAKiE,EAAIsK,KAAoB,MAAQvO,SAAY,OAAS,EAAIA,EAAG2H,MAAeqK,EAAK,GAClQ,GAEA,KAEQ,GAAkD5N,EAAQ,EAA2C,CACjG,MAAM8N,EAAqB,IAAIC,IAC/BZ,EAAUa,yBAA2B,SAAUC,EAAUzK,EAAUC,GAC/D/C,GAAIwN,KAAI,KACJ,IAAItS,EACJ,MAAMwN,EAAW0E,EAAmB1M,IAAI6M,GAkCxC,GAAIR,KAAKU,eAAe/E,GAAW,CAC/B3F,EAAWgK,KAAKrE,UACTqE,KAAKrE,EACpC,MACyB,GAAI+D,EAAUgB,eAAe/E,WACvBqE,KAAKrE,KAAc,UAC1BqE,KAAKrE,IAAa3F,EAAU,CAI5B,MACxB,MACyB,GAAI2F,GAAY,KAAM,CAGvB,MAAMvG,EAAU/C,GAAW2N,MAC3B,MAAMzN,EAAQ6C,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQzE,EAKxE,GAAI4B,KACEA,EAAQ,IACVA,EAAQ,KACRyD,IAAaD,EAAU,CAEvB,MAAM0G,EAA4BrH,EAAQsH,EAC1C,MAAMiE,GAASxS,EAAK+F,EAAQmL,KAAgB,MAAQlR,SAAY,OAAS,EAAIA,EAAGqS,GAChFG,IAAU,MAAQA,SAAe,OAAS,EAAIA,EAAM1P,SAAS2P,IACzD,GAAInE,EAASmE,IAAiB,KAAM,CAChCnE,EAASmE,GAAcC,KAAKpE,EAAUzG,EAAUD,EAAUyK,EAC9F,IAEA,CACwB,MACxB,CACoBR,KAAKrE,GAAY3F,IAAa,aAAegK,KAAKrE,KAAc,UAAY,MAAQ3F,CAAQ,GAEhH,EAMYyJ,EAAKqB,mBAAqBxR,MAAMyR,KAAK,IAAIvM,IAAI,IACtCzE,OAAOC,MAAM7B,EAAK+F,EAAQmL,KAAgB,MAAQlR,SAAY,EAAIA,EAAK,OACvEyR,EACE3P,QAAO,EAAE+Q,EAAGC,KAAOA,EAAE,GAAK,KAC1B9P,KAAI,EAAEwK,EAAUsF,MACjB,IAAI9S,EACJ,MAAMqS,EAAWS,EAAE,IAAMtF,EACzB0E,EAAmBtM,IAAIyM,EAAU7E,GACjC,GAAqBsF,EAAE,GAAK,IAAoC,EAC3D9S,EAAK+F,EAAQwH,KAAsB,MAAQvN,SAAY,OAAS,EAAIA,EAAGuB,KAAK,CAACiM,EAAU6E,GAChH,CACoB,OAAOA,CAAQ,MAGnC,CACA,CACI,OAAOf,CAAI,EAYf,MAAMyB,GAAsB7D,MAAO7K,EAAK4C,EAASlB,EAASiN,KACtD,IAAI1B,EAEJ,IAAKrK,EAAQzE,EAAU,MAAiD,EAAG,CAEvEyE,EAAQzE,GAAW,GACnB,MAAMyQ,EAAWlN,EAAQmN,EACzB,GAAmDD,EAAU,CAIzD3B,EAAO6B,GAAWpN,GAClB,GAAIuL,EAAKrC,KAAM,CAEX,MAAMmE,EAAUnU,IAChBqS,QAAaA,EACb8B,GAChB,CAIY,IAAqB9B,EAAK+B,UAAW,CAIR,CACrBtN,EAAQmL,EAAaI,EAAKE,QAC9C,CACgBH,GAAeC,EAAMvL,EAAS,GAC9BuL,EAAK+B,UAAY,IACjC,CACY,MAAMC,EAAiBxU,EAAW,iBAAkBiH,EAAQsB,GAI1C,CACdJ,EAAQzE,GAAW,CACnC,CAKY,IACI,IAAI8O,EAAKrK,EACzB,CACY,MAAOoC,GACHuG,GAAavG,EAC7B,CAC8B,CACdpC,EAAQzE,IAAY,CACpC,CACqC,CACrByE,EAAQzE,GAAW,GACnC,CACY8Q,IACAC,GAAsBtM,EAAQsH,EAC1C,KACa,CAED+C,EAAOjN,EAAImP,YAIXC,eAAeC,YAAY3N,EAAQsB,GAAW4H,MAAK,IAAOhI,EAAQzE,GAAW,KACzF,CACQ,GAAmB8O,EAAKhM,MAAO,CAE3B,IAAIA,EAAQgM,EAAKhM,MAOjB,MAAM7G,EAAUwH,EAAWF,GAC3B,IAAKR,GAAOe,IAAI7H,GAAU,CACtB,MAAMkV,EAAoB7U,EAAW,iBAAkBiH,EAAQsB,GAQ/DlC,EAAc1G,EAAS6G,KAAUS,EAAQvD,EAAU,IACnDmR,GAChB,CACA,CACA,CAEI,MAAM/F,EAAoB3G,EAAQgH,EAClC,MAAM2F,EAAW,IAAM5F,EAAe/G,EAAS,MAC/C,GAA0B2G,GAAqBA,EAAkB,QAAS,CAOtEA,EAAkB,QAAQrM,KAAKqS,EACvC,KACS,CACDA,GACR,GAEA,MAAML,GAAyBjF,IACoB,CAC3CM,GAASN,EAAU,oBAC3B,GAEA,MAAMuF,GAAqBxP,IACvB,IAAKS,GAAItC,EAAU,KAA8C,EAAG,CAChE,MAAMyE,EAAU/C,GAAWG,GAC3B,MAAM0B,EAAUkB,EAAQC,EACxB,MAAM4M,EAAehV,EAAW,oBAAqBiH,EAAQsB,GAK7D,KAAMJ,EAAQzE,EAAU,GAAkC,CAEtDyE,EAAQzE,GAAW,EA0BK,CAGpB,IAAIoL,EAAoBvJ,EACxB,MAAQuJ,EAAoBA,EAAkBpB,YAAcoB,EAAkB3D,KAAO,CAGjF,GAII2D,EAAkB,OAAQ,CAG1BD,EAAiB1G,EAAUA,EAAQgH,EAAsBL,GACzD,KACxB,CACA,CACA,CAGY,GAA8C7H,EAAQ8K,EAAW,CAC7DjP,OAAO8P,QAAQ3L,EAAQ8K,GAAW7N,KAAI,EAAE2E,GAAagK,OACjD,GAAIA,EAAc,IAA8BtN,EAAIkO,eAAe5K,GAAa,CAC5E,MAAMgC,EAAQtF,EAAIsD,UACXtD,EAAIsD,GACXtD,EAAIsD,GAAcgC,CAC1C,IAEA,CAQiB,CACDoJ,GAAoB1O,EAAK4C,EAASlB,EAClD,CACA,KACa,CAIDgO,GAAsB1P,EAAK4C,EAASlB,EAAQiO,GAE5C,GAAI/M,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQsH,EAAgB,CAC1EgF,GAAsBtM,EAAQsH,EAC9C,MACiB,GAAItH,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQgN,EAAkB,CACjFhN,EAAQgN,EAAiBhF,MAAK,IAAMsE,GAAsBtM,EAAQsH,IAClF,CACA,CACQuF,GACR,GAaA,MAAMI,GAAsB5F,IAC0B,CAC9CM,GAASN,EAAU,uBAC3B,GAKA,MAAM6F,GAAuBjF,MAAO7K,IAChC,IAAKS,GAAItC,EAAU,KAA8C,EAAG,CAChE,MAAMyE,EAAU/C,GAAWG,GACH,CACpB,GAAI4C,EAAQmN,EAAe,CACvBnN,EAAQmN,EAAcpR,KAAKqR,GAAeA,MAC1CpN,EAAQmN,EAAgB9T,SACxC,CACA,CAIa,GAAI2G,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQsH,EAAgB,CAC/E2F,GAAmBjN,EAAQsH,EACvC,MACa,GAAItH,IAAY,MAAQA,SAAiB,OAAS,EAAIA,EAAQgN,EAAkB,CACjFhN,EAAQgN,EAAiBhF,MAAK,IAAMiF,GAAmBjN,EAAQsH,IAC3E,CACA,GAiiBK,MAAC+F,GAAgB,CAACC,EAAaC,EAAU,MAC1C,IAAIxU,EAKJ,MAAMyU,EAAe3V,IACrB,MAAM4V,EAAU,GAChB,MAAMC,EAAUH,EAAQG,SAAW,GACnC,MAAMlB,EAAiB9K,GAAI8K,eAC3B,MAAMtT,EAAOJ,GAAII,KACjB,MAAMyU,EAA4BzU,EAAKC,cAAc,iBACrD,MAAMyU,EAA2B9U,GAAIwG,cAAc,SACnD,MAAMuO,EAA6B,GAEnC,IAAIC,EACJ,IAAIC,EAAkB,KAEtBpT,OAAO8B,OAAOoB,GAAK0P,GACnB1P,GAAImQ,EAAiB,IAAIC,IAAIV,EAAQW,cAAgB,KAAMpV,GAAIqV,SAASC,KAgBxE,IAAIC,EAAoB,MACxBf,EAAYvR,KAAKuS,IACbA,EAAW,GAAGvS,KAAKwS,IACf,IAAIxV,EACJ,MAAM+F,EAAU,CACZvD,EAASgT,EAAY,GACrBnO,EAAWmO,EAAY,GACvB3E,EAAW2E,EAAY,GACvBxB,EAAawB,EAAY,IAI7B,GAAIzP,EAAQvD,EAAU,EAAqC,CACvD8S,EAAoB,IACpC,CAC8B,CACdvP,EAAQ8K,EAAY2E,EAAY,EAChD,CACoC,CACpBzP,EAAQiO,EAAcwB,EAAY,EAClD,CAC+B,CACfzP,EAAQwH,EAAmB,EAC3C,CACqC,CACrBxH,EAAQmL,GAAclR,EAAKwV,EAAY,MAAQ,MAAQxV,SAAY,EAAIA,EAAK,EAC5F,CAKY,MAAMhB,EAEA+G,EAAQsB,EACd,MAAMoO,EAAc,cAAcC,YAE9B,WAAAlC,CAAYmC,GAERC,MAAMD,GACNA,EAAO9D,KACPgE,GAAaF,EAAM5P,GACnB,GAAuBA,EAAQvD,EAAU,EAA0C,CAK3D,CAOX,CACDmT,EAAKG,aAAa,CAAE9P,KAAM,QAC1D,CACA,CAIA,CACA,CACgB,iBAAA6N,GACI,GAAIkB,EAAiB,CACjBgB,aAAahB,GACbA,EAAkB,IAC1C,CACoB,GAAIC,EAAiB,CAEjBF,EAA2BvT,KAAKsQ,KACxD,KACyB,CACD/M,GAAIwN,KAAI,IAAMuB,GAAkBhC,OACxD,CACA,CACgB,oBAAAsC,GACIrP,GAAIwN,KAAI,IAAM6B,GAAqBtC,OACvD,CACgB,gBAAAmE,GACI,OAAO9R,GAAW2N,MAAMoC,CAC5C,GAsCYlO,EAAQmN,EAAiBqC,EAAW,GACpC,IAAKZ,EAAQ5N,SAAS/H,KAAayU,EAAejO,IAAIxG,GAAU,CAC5D0V,EAAQnT,KAAKvC,GACbyU,EAAewC,OAAOjX,EAASqS,GAAeoE,EAAa1P,EAAS,GACpF,IACU,IAIN,GAAI2O,EAAQxT,OAAS,EAAG,CAEpB,GAAIoU,EAAmB,CACnBT,EAAW/H,aAAezN,CACtC,CAE6F,CACjFwV,EAAW/H,aAAe4H,EAAUtV,CAChD,CAEQ,GAAIyV,EAAWrO,UAAUtF,OAAQ,CAC7B2T,EAAWlO,aAAa,cAAe,IAEvC,MAAMF,GAASzG,EAAK8E,GAAI4B,KAAa,MAAQ1G,SAAY,EAAIA,EAAKF,EAAyBC,IAC3F,GAAI0G,GAAS,KAAM,CACfoO,EAAWlO,aAAa,QAASF,EACjD,CAGYtG,EAAKyG,aAAaiO,EAAYD,EAAcA,EAAYrI,YAAcpM,EAAK+V,WACvF,CACA,CAEIlB,EAAkB,MAClB,GAAIF,EAA2B5T,OAAQ,CACnC4T,EAA2B9R,KAAKiH,GAASA,EAAK4J,qBACtD,KACS,CAII,CACD/O,GAAIwN,KAAI,IAAOyC,EAAkBoB,WAAWnG,GAAY,KACpE,CACA,CAEIyE,GAAc,EAGlB,MAAMV,GAAwB,CAAC1P,EAAK4C,EAASmP,EAAWC,KACpD,GAA0BD,EAAW,CAoBjCA,EAAUpT,KAAI,EAAEoB,EAAOT,EAAM2M,MACzB,MAAMgG,EAAoCC,GAAsBlS,EAAKD,GACrE,MAAMoS,EAAUC,GAAkBxP,EAASqJ,GAC3C,MAAM1L,EAAO8R,GAAiBtS,GAC9BU,GAAIoE,IAAIoN,EAAQ3S,EAAM6S,EAAS5R,IAC9BqC,EAAQmN,EAAgBnN,EAAQmN,GAAiB,IAAI7S,MAAK,IAAMuD,GAAImE,IAAIqN,EAAQ3S,EAAM6S,EAAS5R,IAAM,GAElH,GAEA,MAAM6R,GAAoB,CAACxP,EAASyH,IAAgB7J,IAChD,IACwB,CAChB,GAAIoC,EAAQzE,EAAU,IAAoC,CAEtDyE,EAAQsH,EAAeG,GAAY7J,EACnD,KACiB,EACAoC,EAAQwH,EAAoBxH,EAAQwH,GAAqB,IAAIlN,KAAK,CAACmN,EAAY7J,GAChG,CACA,CAIA,CACI,MAAOwE,GACHuG,GAAavG,EACrB,GAEA,MAAMkN,GAAwB,CAAClS,EAAKD,KAGhC,GAAsCA,EAAQ,EAC1C,OAAOuE,GAKX,OAAOtE,CAAG,EAGd,MAAMqS,GAAoBtS,GAAUuS,GACpC,CACQC,SAAUxS,EAAQ,KAAoC,EACtDwE,SAAUxE,EAAQ,KAAoC,IAEvDA,EAAQ,KAAoC,EAO9C,MAACyS,GAAYpQ,GAAW3B,GAAI4B,EAAUD,EA4M3C,MAAMqQ,GAEA,IAAI5R,QAOV,MAAMhB,GAAcD,GAAQ6S,GAAStR,IAAIvB,GASpC,MAAC8S,GAAmB,CAACC,EAAc/P,IAAY6P,GAASlR,IAAKqB,EAAQsH,EAAiByI,EAAe/P,GAU1G,MAAM4O,GAAe,CAACoB,EAAalR,KAC/B,MAAMkB,EAAU,CACZzE,EAAS,EACT2E,cAAe8P,EACf/P,EAAWnB,EACX0K,EAAkB,IAAI0B,KAKU,CAChClL,EAAQgL,EAAsB,IAAInE,SAASC,GAAO9G,EAAQgJ,EAAsBlC,GACxF,CAC4B,CACpB9G,EAAQgN,EAAmB,IAAInG,SAASC,GAAO9G,EAAQ8I,EAAmBhC,IAC1EkJ,EAAY,OAAS,GACrBA,EAAY,QAAU,EAC9B,CACIlD,GAAsBkD,EAAahQ,EAASlB,EAAQiO,GACpD,OAAO8C,GAASlR,IAAIqR,EAAahQ,EAAQ,EAE7C,MAAMe,GAAoB,CAAC3D,EAAKsD,IAAeA,KAActD,EAC7D,MAAMuL,GAAe,CAACvG,EAAG6N,KAAO,EAAgBC,QAAQC,OAAO/N,EAAG6N,GAWlE,MAAMG,GAA2B,IAAIlF,IACrC,MAAMgB,GAAa,CAACpN,EAASkB,EAAS+L,KAElC,MAAMsE,EAAavR,EAAQsB,EAAU0B,QAAQ,KAAM,KACnD,MAAMkK,EAAWlN,EAAQmN,EAKzB,MAAMqE,EAAuCF,GAAW7R,IAAIyN,GAC5D,GAAIsE,EAAQ,CACR,OAAOA,EAAOD,EACtB;qCAEI,OAAOE,OAKP,KAAKvE,aAA4F,MAAMhE,MAAMwI,IACxE,CAC7BJ,GAAWzR,IAAIqN,EAAUwE,EACrC,CACQ,OAAOA,EAAeH,EAAW,GAClC1H,GAAa,EAEpB,MAAMrK,GAAuB,IAAI4M,IAEjC,MAAMxJ,UAAa+O,SAAW,YAAcA,OAAS,GACrD,MAAM3X,GAAM4I,GAAIgP,UAAY,CAAExX,KAAM,IAGpC,MAAM2E,GAAM,CACRtC,EAAS,EACTyS,EAAgB,GAChB3C,IAAM/R,GAAMA,IACZqX,IAAMrX,GAAMsX,sBAAsBtX,GAClC2I,IAAK,CAACgO,EAAIY,EAAWC,EAAUnT,IAASsS,EAAGc,iBAAiBF,EAAWC,EAAUnT,GACjFqE,IAAK,CAACiO,EAAIY,EAAWC,EAAUnT,IAASsS,EAAGe,oBAAoBH,EAAWC,EAAUnT,GACpFG,GAAI,CAAC+S,EAAWlT,IAAS,IAAIsT,YAAYJ,EAAWlT,IAUxD,MAAM+R,GAAwC,MAC1C,IAAIA,EAA0B,MAC9B,IACI5W,GAAIiY,iBAAiB,IAAK,KAAMpW,OAAOgQ,eAAe,GAAI,UAAW,CACjE,GAAApM,GACImR,EAA0B,IAC1C,IAEA,CACI,MAAOtN,GAAG,CACV,OAAOsN,CACV,EAX6C,GAYzC,MAACwB,GAAkBxY,GAAMmO,QAAQsK,QAAQzY,GAC9C,MAAM8F,GACc,MACZ,IACI,IAAIC,cACJ,cAAc,IAAIA,eAAgBC,cAAgB,UAC9D,CACQ,MAAO0D,GAAG,CACV,OAAO,KACV,EAPe,GASpB,MAAMgP,GAAgB,GACtB,MAAMC,GAAiB,GAEvB,MAAMC,GAAY,CAACC,EAAOC,IAAW1V,IACjCyV,EAAMjX,KAAKwB,GACX,IAAKlE,EAAc,CACfA,EAAe,KACf,GAAI4Z,GAAS3T,GAAItC,EAAU,EAAkC,CACzD0N,GAASwI,GACrB,KACa,CACD5T,GAAI8S,IAAIc,GACpB,CACA,GAEA,MAAMC,GAAWH,IACb,IAAK,IAAIvX,EAAI,EAAGA,EAAIuX,EAAMtX,OAAQD,IAAK,CACnC,IACIuX,EAAMvX,GAAG2X,YAAYC,MACjC,CACQ,MAAOxP,GACHuG,GAAavG,EACzB,CACA,CACImP,EAAMtX,OAAS,CAAC,EAoBpB,MAAMwX,GAAQ,KAOVC,GAAQN,IAqBH,CACDM,GAAQL,IACR,GAAKzZ,EAAewZ,GAAcnX,OAAS,EAAI,CAG3C4D,GAAI8S,IAAIc,GACpB,CACA,GAEA,MAAMxI,GAAYnN,GAAOoV,KAAiBlJ,KAAKlM,GAE/C,MAAMqL,GAA0BmK,GAAUD,GAAgB,a"} \ No newline at end of file diff --git a/build/p-300a0448.js b/build/p-6a30c24b.js similarity index 96% rename from build/p-300a0448.js rename to build/p-6a30c24b.js index 72f59e995..4bbed2f44 100644 --- a/build/p-300a0448.js +++ b/build/p-6a30c24b.js @@ -1,2 +1,2 @@ -import{p as e,b as a}from"./p-20919029.js";export{s as setNonce}from"./p-20919029.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-ff4075a2",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[0,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); +import{p as e,b as a}from"./p-22f0435a.js";export{s as setNonce}from"./p-22f0435a.js";import{g as t}from"./p-e1255160.js";const n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-deb69820",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[8,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],hint:[4],noToday:[4,"no-today"],weeks:[4],min:[1],max:[1],range:[4],value:[1025],viewDate:[32],select:[64],clear:[64],resetView:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); //# sourceMappingURL=catalyst.esm.js.map \ No newline at end of file diff --git a/build/p-ff4075a2.entry.js b/build/p-deb69820.entry.js similarity index 99% rename from build/p-ff4075a2.entry.js rename to build/p-deb69820.entry.js index 6b6c2578f..3961f1ae1 100644 --- a/build/p-ff4075a2.entry.js +++ b/build/p-deb69820.entry.js @@ -1,4 +1,4 @@ -import{r as t,h as e,H as i,g as a,c as r}from"./p-20919029.js";import{e as n,O as o,f as s,E as c,S as l,g as d,h,i as f,j as u,k as p,l as b,m,n as g,p as v,q as y,r as k,s as x,t as w,u as z,a as D,c as I,d as M,o as R}from"./p-2c8ac8cf.js";const C=n((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class A extends o{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new S(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new C}}next(t){s((()=>{this._throwIfClosed();if(!this.isStopped){if(!this.currentObservers){this.currentObservers=Array.from(this.observers)}for(const e of this.currentObservers){e.next(t)}}}))}error(t){s((()=>{this._throwIfClosed();if(!this.isStopped){this.hasError=this.isStopped=true;this.thrownError=t;const{observers:e}=this;while(e.length){e.shift().error(t)}}}))}complete(){s((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:a}=this;if(e||i){return c}this.currentObservers=null;a.push(t);return new l((()=>{this.currentObservers=null;d(a,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:a}=this;if(e){t.error(i)}else if(a){t.complete()}}asObservable(){const t=new o;t.source=this;return t}}A.create=(t,e)=>new S(t,e);class S extends A{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0?void 0:i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0?void 0:i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:c}}const T={now(){return(T.delegate||Date).now()},delegate:undefined};class F extends l{constructor(t,e){super()}schedule(t,e=0){return this}}const B={setInterval(t,e,...i){const{delegate:a}=B;if(a===null||a===void 0?void 0:a.setInterval){return a.setInterval(t,e,...i)}return setInterval(t,e,...i)},clearInterval(t){const{delegate:e}=B;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class $ extends F{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var i;if(this.closed){return this}this.state=t;const a=this.id;const r=this.scheduler;if(a!=null){this.id=this.recycleAsyncId(r,a,e)}this.pending=true;this.delay=e;this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,i=0){return B.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===false){return e}if(e!=null){B.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const i=this._execute(t,e);if(i){return i}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let i=false;let a;try{this.work(t)}catch(t){i=true;a=t?t:new Error("Scheduled action threw falsy error")}if(i){this.unsubscribe();return a}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:i}=e;this.work=this.state=this.scheduler=null;this.pending=false;d(i,this);if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null;super.unsubscribe()}}}class E{constructor(t,e=E.now){this.schedulerActionCtor=t;this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}E.now=T.now;class O extends E{constructor(t,e=E.now){super(t,e);this.actions=[];this._active=false}flush(t){const{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=true;do{if(i=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(i){while(t=e.shift()){t.unsubscribe()}throw i}}}const N=new O($);const W=N;const L=new o((t=>t.complete()));const j=n((t=>function e(){t(this);this.name="EmptyError";this.message="no elements in sequence"}));function P(t){return t instanceof Date&&!isNaN(t)}function Y(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{a.next(t.call(e,i,r++))})))}))}const{isArray:H}=Array;function U(t,e){return H(e)?t(...e):t(e)}function _(t){return Y((e=>U(t,e)))}function K(t,e,i,a,r,n,o,s){const c=[];let l=0;let d=0;let h=false;const b=()=>{if(h&&!c.length&&!l){e.complete()}};const m=t=>l{n&&e.next(t);l++;let s=false;u(i(t,d++)).subscribe(f(e,(t=>{r===null||r===void 0?void 0:r(t);if(n){m(t)}else{e.next(t)}}),(()=>{s=true}),undefined,(()=>{if(s){try{l--;while(c.length&&lg(t)))}else{g(t)}}b()}catch(t){e.error(t)}}})))};t.subscribe(f(e,m,(()=>{h=true;b()})));return()=>{s===null||s===void 0?void 0:s()}}function V(t,e,i=Infinity){if(b(e)){return V(((i,a)=>Y(((t,r)=>e(i,t,a,r)))(u(t(i,a)))),i)}else if(typeof e==="number"){i=e}return h(((e,a)=>K(e,a,t,i)))}function q(t=Infinity){return V(m,t)}function J(){return q(1)}function G(...t){return J()(g(t,v(t)))}const Z=["addListener","removeListener"];const X=["addEventListener","removeEventListener"];const Q=["on","off"];function tt(t,e,i,a){if(b(i)){a=i;i=undefined}if(a){return tt(t,e,i).pipe(_(a))}const[r,n]=rt(t)?X.map((a=>r=>t[a](e,r,i))):it(t)?Z.map(et(t,e)):at(t)?Q.map(et(t,e)):[];if(!r){if(y(t)){return V((t=>tt(t,e,i)))(u(t))}}if(!r){throw new TypeError("Invalid event target")}return new o((t=>{const e=(...e)=>t.next(1n(e)}))}function et(t,e){return i=>a=>t[i](e,a)}function it(t){return b(t.addListener)&&b(t.removeListener)}function at(t){return b(t.on)&&b(t.off)}function rt(t){return b(t.addEventListener)&&b(t.removeEventListener)}function nt(t=0,e,i=W){let a=-1;if(e!=null){if(k(e)){i=e}else{a=e}}return new o((e=>{let r=P(t)?+t-i.now():t;if(r<0){r=0}let n=0;return i.schedule((function(){if(!e.closed){e.next(n++);if(0<=a){this.schedule(undefined,a)}else{e.complete()}}}),r)}))}function ot(...t){const e=v(t);const i=x(t,Infinity);const a=t;return!a.length?L:a.length===1?u(a[0]):q(i)(g(a,e))}function st(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>t.call(e,i,r++)&&a.next(i))))}))}function ct(t){return h(((e,i)=>{let a=false;let r=null;let n=null;let o=false;const s=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}o&&i.complete()};const c=()=>{n=null;o&&i.complete()};e.subscribe(f(i,(e=>{a=true;r=e;if(!n){u(t(e)).subscribe(n=f(i,s,c))}}),(()=>{o=true;(!a||!n||n.closed)&&i.complete()})))}))}function lt(t,e=N){return ct((()=>nt(t,e)))}function dt(t){return h(((e,i)=>{let a=null;let r=false;let n;a=e.subscribe(f(i,undefined,undefined,(o=>{n=u(t(o,dt(t)(e)));if(a){a.unsubscribe();a=null;n.subscribe(i)}else{r=true}})));if(r){a.unsubscribe();a=null;n.subscribe(i)}}))}function ht(t,e,i,a,r){return(n,o)=>{let s=i;let c=e;let l=0;n.subscribe(f(o,(e=>{const i=l++;c=s?t(c,e,i):(s=true,e);a&&o.next(c)}),r&&(()=>{s&&o.next(c);o.complete()})))}}function ft(t){return h(((e,i)=>{let a=false;let r=null;let n=null;const o=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}};e.subscribe(f(i,(e=>{n===null||n===void 0?void 0:n.unsubscribe();a=true;r=e;n=f(i,o,w);u(t(e)).subscribe(n)}),(()=>{o();i.complete()}),undefined,(()=>{r=n=null})))}))}function ut(t){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>{if(!a){i.next(t)}i.complete()})))}))}function pt(t){return t<=0?()=>L:h(((e,i)=>{let a=0;e.subscribe(f(i,(e=>{if(++a<=t){i.next(e);if(t<=a){i.complete()}}})))}))}function bt(){return h(((t,e)=>{t.subscribe(f(e,w))}))}function mt(t){return Y((()=>t))}function gt(t,e){if(e){return i=>G(e.pipe(pt(1),bt()),i.pipe(gt(t)))}return V(((e,i)=>u(t(e,i)).pipe(pt(1),mt(e))))}function vt(t,e=N){const i=nt(t,e);return gt((()=>i))}function yt(t,e=m){t=t!==null&&t!==void 0?t:kt;return h(((i,a)=>{let r;let n=true;i.subscribe(f(a,(i=>{const o=e(i);if(n||!t(r,o)){n=false;r=o;a.next(i)}})))}))}function kt(t,e){return t===e}function xt(t=wt){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>a?i.complete():i.error(t()))))}))}function wt(){return new j}function zt(t,e){const i=arguments.length>=2;return a=>a.pipe(t?st(((e,i)=>t(e,i,a))):m,pt(1),i?ut(e):xt((()=>new j)))}function Dt(t,e){return h(ht(t,e,arguments.length>=2,true))}function It(...t){const e=v(t);return h(((i,a)=>{(e?G(t,i,e):G(t,i)).subscribe(a)}))}function Mt(t,e){return h(((i,a)=>{let r=null;let n=0;let o=false;const s=()=>o&&!r&&a.complete();i.subscribe(f(a,(i=>{r===null||r===void 0?void 0:r.unsubscribe();let o=0;const c=n++;u(t(i,c)).subscribe(r=f(a,(t=>a.next(e?e(i,t,c,o++):t)),(()=>{r=null;s()})))}),(()=>{o=true;s()})))}))}function Rt(t){return h(((e,i)=>{u(t).subscribe(f(i,(()=>i.complete()),w));!i.closed&&e.subscribe(i)}))}function Ct(t,e=false){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{const n=t(i,r++);(n||e)&&a.next(i);!n&&a.complete()})))}))}function At(t,e,i){const a=b(t)||e||i?{next:t,error:e,complete:i}:t;return a?h(((t,e)=>{var i;(i=a.subscribe)===null||i===void 0?void 0:i.call(a);let r=true;t.subscribe(f(e,(t=>{var i;(i=a.next)===null||i===void 0?void 0:i.call(a,t);e.next(t)}),(()=>{var t;r=false;(t=a.complete)===null||t===void 0?void 0:t.call(a);e.complete()}),(t=>{var i;r=false;(i=a.error)===null||i===void 0?void 0:i.call(a,t);e.error(t)}),(()=>{var t,e;if(r){(t=a.unsubscribe)===null||t===void 0?void 0:t.call(a)}(e=a.finalize)===null||e===void 0?void 0:e.call(a)})))})):m}function St(t,e,i){if(!t.hostElement.hasAttribute(e)&&i!=null){t.hostElement.setAttribute(e,String(i))}}const Tt=":host{display:flex;gap:0.5rem;padding:1.25rem;border-radius:var(--cat-border-radius-l, 0.5rem)}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.content{align-self:center;width:100%}::slotted(:last-child){margin-bottom:0 !important}:host([color=primary]){background-color:rgb(var(--cat-primary-bg, 0, 129, 148));color:rgb(var(--cat-primary-fill, 255, 255, 255));--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=secondary]){background-color:rgb(var(--cat-secondary-bg, 105, 118, 135));color:rgb(var(--cat-secondary-fill, 255, 255, 255));--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=info]){background-color:rgb(var(--cat-info-bg, 0, 115, 230));color:rgb(var(--cat-info-fill, 255, 255, 255));--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=success]){background-color:rgb(var(--cat-success-bg, 0, 132, 88));color:rgb(var(--cat-success-fill, 255, 255, 255));--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=warning]){background-color:rgb(var(--cat-warning-bg, 255, 206, 128));color:rgb(var(--cat-warning-fill, 0, 0, 0));--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}:host([color=danger]){background-color:rgb(var(--cat-danger-bg, 217, 52, 13));color:rgb(var(--cat-danger-fill, 255, 255, 255));--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}";const Ft=Tt;const Bt=class{constructor(e){t(this,e);this.mapIcon=new Map([["primary","$cat:alert-primary"],["secondary","$cat:alert-secondary"],["info","$cat:alert-info"],["success","$cat:alert-success"],["warning","$cat:alert-warning"],["danger","$cat:alert-danger"]]);this.mapRole=new Map([["primary","status"],["secondary","status"],["info","status"],["success","status"],["warning","alert"],["danger","alert"]]);this.color="primary";this.icon=undefined;this.noIcon=false}connectedCallback(){St(this,"tabindex",0);St(this,"role",this.mapRole.get(this.color))}render(){return e(i,{key:"65e08f5679d761056c71407b03b0b22fb5aa5c94"},!this.noIcon&&e("cat-icon",{size:"l",icon:this.icon||this.mapIcon.get(this.color)}),e("div",{key:"b85309b1867b896244a0cda0ababb2e66ca2d01a",class:"content"},e("slot",{key:"ed88e2f275b189f5ae75ba3220b6f30be36699b4"})))}get hostElement(){return a(this)}};Bt.style=Ft;const $t=t=>new Promise(((e,i)=>{const a=new Image;a.addEventListener("load",e);a.addEventListener("error",i);a.src=t}));const Et=":host{display:contents}:host([hidden]){display:none}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:inherit;color:var(--cat-avatar-fill, #515c6c);background-color:var(--cat-avatar-bg, #f2f4f7);background-size:cover;background-position:center;white-space:nowrap;overflow:hidden;vertical-align:middle;font-weight:600;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.avatar:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.avatar-round{border-radius:50%}.avatar-xs{width:var(--cat-avatar-size, 1.5rem);height:var(--cat-avatar-size, 1.5rem);line-height:var(--cat-avatar-size, 1.5rem);font-size:var(--cat-avatar-font-size, 0.75rem)}.avatar-s{width:var(--cat-avatar-size, 2rem);height:var(--cat-avatar-size, 2rem);line-height:var(--cat-avatar-size, 2rem);font-size:var(--cat-avatar-font-size, 0.875rem)}.avatar-m{width:var(--cat-avatar-size, 2.5rem);height:var(--cat-avatar-size, 2.5rem);line-height:var(--cat-avatar-size, 2.5rem);font-size:var(--cat-avatar-font-size, 0.9375rem)}.avatar-l{width:var(--cat-avatar-size, 3rem);height:var(--cat-avatar-size, 3rem);line-height:var(--cat-avatar-size, 3rem);font-size:var(--cat-avatar-font-size, 1.125rem)}.avatar-xl{width:var(--cat-avatar-size, 3.5rem);height:var(--cat-avatar-size, 3.5rem);line-height:var(--cat-avatar-size, 3.5rem);font-size:var(--cat-avatar-font-size, 1.25rem)}";const Ot=Et;const Nt=class{constructor(e){t(this,e);this.backgroundImage=undefined;this.size="m";this.round=false;this.label="";this.initials=undefined;this.src=undefined;this.icon=undefined;this.url=undefined;this.urlTarget=undefined}onSrcChanged(t){if(t){$t(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}componentWillRender(){if(!this.label){z.warn("[A11y] Missing ARIA label on avatar",this)}}render(){if(this.url){return e("a",{href:this.url,target:this.urlTarget,style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}else{return e("span",{style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}}get content(){return!this.backgroundImage?[this.icon?e("cat-icon",{icon:this.icon,size:this.size}):this.getInitials()]:[]}get cssStyle(){return{"background-image":this.backgroundImage}}get cssClass(){return{avatar:true,"avatar-round":this.round,[`avatar-${this.size}`]:Boolean(this.size)}}getInitials(){return this.initials??(this.label??"").split(" ").map((t=>t[0])).join("")}static get watchers(){return{src:["onSrcChanged"]}}};Nt.style=Ot;const Wt=":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;color:rgb(var(--text));box-shadow:inset 0 0 0 1px rgba(var(--text), 0.2)}:host([color=primary]){--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148)}:host([color=secondary]){--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0)}:host([color=info]){--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230)}:host([color=success]){--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88)}:host([color=warning]){--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0)}:host([color=danger]){--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--text), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--text), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--text), 0.2)}}";const Lt=Wt;const jt=class{constructor(e){t(this,e);this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false}render(){return e("slot",{key:"8254c840d9f008183db57fc58dd3a092c7a0378c"})}get hostElement(){return a(this)}};jt.style=Lt;const Pt=["xs","s","m","l","xl"];const Yt={xs:"(max-width: 539.98px)",s:"(max-width: 767.98px)",m:"(max-width: 991.98px)",l:"(max-width: 1199.98px)",xl:"(max-width: 1399.98px)"};function Ht(t){return typeof t==="string"&&Pt.includes(t)}let Ut;try{Ut=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch{Ut=false}class _t{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||Ut)&&typeof CSS!=="undefined"&&!this.EDGE&&!this.TRIDENT;this.WEBKIT=/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;this.IOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);this.FIREFOX=/(firefox|minefield)/i.test(navigator.userAgent);this.ANDROID=/android/i.test(navigator.userAgent)&&!this.TRIDENT;this.SAFARI=/safari/i.test(navigator.userAgent)&&this.WEBKIT}}const Kt=new Set;let Vt;class qt{constructor(){this._platform=new _t;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){Jt(t)}return this._matchMedia(t)}}function Jt(t){if(Kt.has(t)){return}try{if(!Vt){Vt=document.createElement("style");Vt.setAttribute("type","text/css");document.head.appendChild(Vt)}if(Vt.sheet){Vt.sheet.insertRule(`@media ${t} {body{ }}`,0);Kt.add(t)}}catch(t){z.error(t)}}const Gt=':host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:var(--cat-font-weight-button, 600);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;height:1.5rem;padding:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;height:2rem;padding:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;height:2.5rem;padding:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;height:3rem;padding:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;height:3.5rem;padding:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/"";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;min-width:2rem;max-height:3rem;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}';const Zt=Gt;const Xt=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._iconOnly=true;this.variant="outlined";this.color="secondary";this.active=false;this.size="m";this.name=undefined;this.value=undefined;this.disabled=false;this.loading=false;this.submit=false;this.noEllipsis=false;this.round=false;this.url=undefined;this.urlTarget=undefined;this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.buttonId=undefined;this.a11yLabel=undefined;this.a11yCurrent=undefined;this.nativeAttributes=undefined;this.nativeContentAttributes=undefined;this.buttonGroupPosition=undefined}onIconOnlyChanged(t){this.mediaQueryList?.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(Ht(t)){this.mediaMatcher??(this.mediaMatcher=new qt);this.mediaQueryList=this.mediaMatcher.matchMedia(Yt[t]);this.mediaQueryListener=t=>this._iconOnly=t.matches;this.mediaQueryList.addEventListener("change",this.mediaQueryListener);this._iconOnly=this.mediaQueryList.matches}else{this._iconOnly=t}}componentWillLoad(){this.onIconOnlyChanged(this.iconOnly)}componentWillRender(){if(this.isIconButton&&!this.a11yLabel){z.warn("[A11y] Missing ARIA label on icon button",this)}}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){if(this.url){return e("a",{...this.nativeAttributes,ref:t=>this.button=t,href:this.disabled?undefined:this.url,target:this.urlTarget,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}else{return e("button",{...this.nativeAttributes,ref:t=>this.button=t,type:this.submit?"submit":"button",name:this.name,value:this.value,disabled:this.disabled,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round??this.isIconButton,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size),[`cat-group-button-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition),"cat-group-button":Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}}get iconSize(){switch(this.size){case"xs":return"s";default:return"l"}}get spinnerSize(){switch(this.size){case"xs":return"xs";default:return"m"}}get isIconButton(){return Boolean(this.icon)&&this._iconOnly}get hasPrefixIcon(){return Boolean(this.icon)&&!this._iconOnly&&!this.iconRight}get hasSuffixIcon(){return Boolean(this.icon)&&!this._iconOnly&&this.iconRight}get content(){return[this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconButton?e("cat-icon",{icon:this.icon,size:this.iconSize}):e("span",{class:"cat-button-content",part:"content",...this.nativeContentAttributes},e("span",{class:"cat-button-content-inner"},e("slot",null))),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"suffix"}):null,this.loading?e("cat-spinner",{size:this.spinnerSize}):null]}onClick(t){this.catClick.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Xt.style=Zt;const Qt=":host{position:relative;display:inline-flex;vertical-align:middle}::slotted(cat-button[variant=outlined]),::slotted(cat-button:not([variant])){margin-right:-1px}::slotted(cat-button[variant=outlined]:last-child),::slotted(cat-button:not([variant]):last-child){margin-right:0}";const te=Qt;const ee=class{constructor(e){t(this,e);this.formElements=[];this.a11yLabel=undefined}render(){return e(i,{key:"736974e0eb79714f8718e90cb4b533cff13e123f",role:"group","aria-label":this.a11yLabel},e("slot",{key:"7894f468e3e265b67b7eb1c670966d4b55c97ce2",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-button"));this.formElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.formElements.length-1?"last":"middle"}))}get hostElement(){return a(this)}};ee.style=te;const ie=":host{display:block;border-radius:var(--cat-border-radius-l, 0.5rem);background-color:white;padding:1.25rem}:host([hidden]){display:none}::slotted(:last-child){margin-bottom:0 !important}::slotted(nav),::slotted(nav:last-child){margin:-1rem -1rem !important}::slotted(.cat-card-pull){margin:-1.25rem !important;width:calc(100% + 2.5rem) !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-h){margin-left:-1.25rem !important;margin-right:-1.25rem !important;width:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-v){margin-top:-1.25rem !important;margin-bottom:-1.25rem !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-t){margin-top:-1.25rem !important}::slotted(.cat-card-pull-l){margin-left:-1.25rem !important}::slotted(.cat-card-pull-r){margin-right:-1.25rem !important}::slotted(.cat-card-pull-b){margin-bottom:-1.25rem !important}";const ae=ie;const re=class{constructor(e){t(this,e);this.catLoad=r(this,"catLoad",7)}render(){return e("slot",{key:"7c606bbb0c69502b495cde09b987f232f52391fe"})}componentDidLoad(){this.catLoad.emit()}};re.style=ae;const ne=t=>{const{id:i,hint:a,slottedHint:r,errorMap:n}=t;const o=Object.entries(n||{});return e("div",{"aria-live":"polite",id:i+"-hint",class:"hint-section"},o.length?o.map((([i,a])=>e("p",{class:(t.class??"")+" input-hint cat-text-danger"},D.t(`error.${i}`,a)))):[a&&(Array.isArray(a)?a.map((i=>e("p",{class:(t.class??"")+" input-hint"},i))):e("p",{class:(t.class??"")+" input-hint"},a)),r])};const oe=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none;box-sizing:border-box}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const se=oe;let ce=0;const le=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-checkbox-${ce++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.indeterminate=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on checkbox",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"4717606c6860aa834b0be517a990e7c9b3d12ca4"},e("label",{key:"f10b076bce44f869fac2ba524c9b84a9d35540d4",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"9c1ce8476f5336e1bda998998233f1576fa04304",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"54bfdef569a5653d8cf49c8138907e17525f282e",class:"box","aria-hidden":"true"},e("svg",{key:"cdd7a17cbd71c788af281f83f936cae6f8ce7e52",class:"check",viewBox:"0 0 12 10"},e("polyline",{key:"ee39ce12ece8d32ad5aca05183ab43b49ca278c7",points:"1.5 6 4.5 9 10.5 1"})),e("svg",{key:"5593c28f8cd548031d6b3823e9491a4bcc8246e3",class:"dash",viewBox:"0 0 12 10"},e("polyline",{key:"49e30776717be8566e6a135bf791918a93a6f429",points:"1.5 5 10.5 5"}))),e("span",{key:"4461a4d9e42548e5acea1e991b044f7b135f9b67",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"box-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.indeterminate=this.input.indeterminate;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};le.style=se;function de(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function he(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function fe(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return{firstDay:i?.firstDay??1,minDays:i?.minDays??4,weekend:i?.weekend??[6,7]}}function ue(t){const e=new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(3456,10,22)).replace("3456","YYYY").replace("56","YY").replace("11","MM").replace("22","DD");return/^(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)$/.test(e)?e:"DD-MM-YYYY"}function pe(t){return{prevYear:D.t("datepicker.prevYear"),nextYear:D.t("datepicker.nextYear"),prevMonth:D.t("datepicker.prevMonth"),nextMonth:D.t("datepicker.nextMonth"),arrowKeys:D.t("datepicker.arrowKeys"),today:D.t("datepicker.today"),change:D.t("datepicker.change"),choose:D.t("datepicker.choose"),clear:D.t("datepicker.clear"),formatStr:ue(t),weekInfo:fe(t),days:{short:de(t,"short"),long:de(t,"long")},months:{short:he(t,"short"),long:he(t,"long")},now:()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fromLocalISO:t=>{const[e,i,a,r]=t?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return e?new Date(Number(i),Number(a)-1,Number(r)):null},toLocalISO:t=>{const e=t.getFullYear();const i=(t.getMonth()+1).toString().padStart(2,"0");const a=t.getDate().toString().padStart(2,"0");return`${e}-${i}-${a}`},toLocalStr:e=>new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric",weekday:"long"}).format(e)}}function be(t){return t%4===0&&t%100!==0||t%400===0}function me(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function ge(t,e){const[i,a,r]=[t.getFullYear(),t.getMonth(),t.getDate()];const n=[31,be(i)?29:28,31,30,31,30,31,31,30,31,30,31];const o=new Date(t);o.setDate(1);o.setMonth(o.getMonth()+e);o.setDate(Math.min(r,n[(a+e%12+12)%12]));return o}function ve(t,e){return!!t&&!!e&&t.getFullYear()===e.getFullYear()}function ye(t,e){return!!t&&!!e&&t.getMonth()===e.getMonth()&&ve(t,e)}function ke(t,e){return!!t&&!!e&&t.getDate()===e.getDate()&&ye(t,e)}function xe(t,e,i){return new Date(Math.min(Math.max(e.getTime(),t?.getTime()??-Infinity),i?.getTime()??Infinity))}const we=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}cat-date-inline{margin:1rem;width:20rem}";const ze=we;const De=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=pe(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end"}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}get inputValue(){const[t,e,i,a]=this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];if(t){const t=new Date(Number(e),Number(i)-1,Number(a));const r=new Intl.DateTimeFormat(this.language,{year:"numeric",month:"2-digit",day:"2-digit"});return r.format(t)}return""}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){const t=this.locale.formatStr.replace("YYYY","Y").replace("YY","y").replace("MM","m").replace("DD","d");const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(t)||[];this.input?.mask({date:true,dateMin:this.min,dateMax:this.max,delimiter:i,datePattern:[e,a,r]})}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"d588c96f031fc8ab9518d13dfaac730a0d424caa"},e("cat-input",{key:"f49f0682e2f2fe3dfcd89477bda91fe46ed44dfa",class:"cat-date-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,value:this.inputValue,onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.onInputBlur(t.detail)}},e("span",{key:"68ef0708d25128b9a52d60c5b1a7b34e0ffb2ef1",slot:"label"},this.label,e("span",{key:"ac017335567a4e0059631e7535455d52f61f2e43",class:"label-aria"}," (",this.locale.formatStr,")")),e("cat-dropdown",{key:"16a6e95f6e4f6a9b0ddd7716f0b713c8fac3fdff",slot:"addon",placement:this.placement,arrowNavigation:"none",noResize:true,onCatOpen:()=>this.dateInline?.resetView()},e("cat-button",{key:"cf7f2aaa2c5775b23f3e8826e9b0e722c4ce8be6",slot:"trigger",icon:"$cat:datepicker-calendar",iconOnly:true,class:"cat-date-toggle",disabled:this.disabled,a11yLabel:this.getTriggerA11yLabel()}),e("div",{key:"f90eef976a3102855801df5ffeee770d45e7eaba",slot:"content"},e("cat-date-inline",{key:"2a0ee2889e1077a6e403458bd3e114396590d0ed",ref:t=>this.dateInline=t,min:this.min,max:this.max,value:this.value,hint:true,weeks:true,noClear:true,onCatChange:this.onDateChange.bind(this)})))))}getTriggerA11yLabel(){const t=this.locale.fromLocalISO(this.value);return t?`${this.locale.change}, ${this.locale.toLocalStr(t)}`:this.locale.choose}onInputBlur(t){if(!this.input){return}const e=this.value;const i=this.parse(this.input.value??"");const a=this.locale.fromLocalISO(this.min);const r=this.locale.fromLocalISO(this.max);const n=i?xe(a,i,r):null;this.value=n?this.locale.toLocalISO(n):undefined;if(e!==this.value){if(n){this.dateInline?.select(n)}else{this.dateInline?.clear()}this.catChange.emit(this.value)}this.input.value=this.inputValue;this.catBlur.emit(t)}onDateChange(t){t.stopPropagation();const e=this.value;const i=t.detail?new Date(t.detail):null;this.value=i?this.locale.toLocalISO(i):undefined;if(e!==this.value){this.catChange.emit(this.value)}}parse(t){const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr)||[];const n=[e,a,r];const o=t.split(i).map((t=>Number(t||"x")));let s=o[n.indexOf("YYYY")||n.indexOf("YY")]||this.locale.now().getFullYear();const c=o[n.indexOf("MM")];const l=o[n.indexOf("DD")];if(!Number.isInteger(c)||!Number.isInteger(l)){return null}else if(s<100){s+=s<50?2e3:1900}return new Date(s,c-1,l)}reclamp(t,e){const i=this.value;const a=this.locale.fromLocalISO(i);const r=this.locale.fromLocalISO(e);if(!a||!r){return}const n=xe(t==="min"?r:null,a,t==="max"?r:null);const o=this.locale.toLocalISO(n);if(i!==o){this.value=o;this.catChange.emit(o)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};De.style=ze;const Ie='/**\n * Auto-generated file. Do not edit directly.\n */\n/* stylelint-disable value-keyword-case */\n/* stylelint-enable value-keyword-case */\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n}\n.picker-head > :not(:last-child) {\n margin-right: 0.25rem;\n}\n.picker-head h3 {\n font-size: 0.9375rem;\n line-height: 1.25rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: "pnum";\n flex: 1;\n text-align: center;\n margin-block: 0;\n}\n@container (min-width: 20rem) {\n .picker-head h3 {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: "pnum";\n }\n .picker-head > :not(:last-child) {\n margin-right: 0.5rem;\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas: "h h h h h h h" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n.picker-weeks .picker-grid {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas: ". h h h h h h h" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 600;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n}\n.picker-foot > :not(:last-child) {\n margin-right: 0.25rem;\n}\n@container (min-width: 20rem) {\n .picker-foot > :not(:last-child) {\n margin-right: 0.5rem;\n }\n .picker-foot .cursor-help {\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: var(--cat-font-weight-body, 400);\n }\n}\n\n.cursor-help {\n margin-block: 0;\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: var(--cat-font-weight-body, 400);\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-align: center;\n flex: 1;\n}\n.cursor-help:first-child {\n text-align: left;\n}\n.cursor-help:last-child {\n text-align: right;\n}\n.cursor-help:only-child {\n text-align: center;\n}\n\n.cursor-aria {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}';const Me=Ie;const Re=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.language=D.getLocale();this.locale=pe(this.language);this.focusDate=null;this.viewDate=this.locale.now();this.noClear=false;this.hint=false;this.noToday=false;this.weeks=false;this.min=undefined;this.max=undefined;this.range=false;this.value=undefined}get focusedDate(){const[t,e,i,a]=this.hostElement.shadowRoot?.querySelector(`[data-date]:focus`)?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return t?new Date(Number(e),Number(i)-1,Number(a)):null}componentWillLoad(){const[t,e]=this.getValue();if(e){this.focus(e)}else if(t){this.focus(t)}}componentDidRender(){if(this.focusDate){this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus();this.focusDate=null}}onKeyDown(t){if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){return}const e=this.focusedDate;if(!e){t.preventDefault();const[e]=this.getValue();this.focus(e||this.locale.now())}else if(t.key==="ArrowLeft"){t.preventDefault();this.focus(t.shiftKey?ge(e,-1):me(e,-1))}else if(t.key==="ArrowRight"){t.preventDefault();this.focus(t.shiftKey?ge(e,1):me(e,1))}else if(t.key==="ArrowUp"){t.preventDefault();this.focus(me(e,-7))}else if(t.key==="ArrowDown"){t.preventDefault();this.focus(me(e,7))}}async select(t){if(!t){return this.clear()}const e=this.value;const[i,a]=this.getMinMaxDate();const r=xe(i,new Date(t.getFullYear(),t.getMonth(),t.getDate()),a);this.focus(r);if(this.range){const[t,e]=this.getValue();if(!t||e||rthis.navigate("prev","year"),"data-dropdown-no-close":true}),e("cat-button",{key:"90e7420d4bc9c474d322d303413bc7e0bc4ac33d",icon:"$cat:datepicker-month-prev",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.prevMonth,disabled:ye(this.viewDate,t),onClick:()=>this.navigate("prev","month"),"data-dropdown-no-close":true}),e("h3",{key:"e6a39d6e56a360a14bd5db15d53d12b5743071fc"},this.getHeadline()),e("cat-button",{key:"18bbfccbef72377967d96d1481196a0dfd1297fb",icon:"$cat:datepicker-month-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextMonth,disabled:ye(this.viewDate,a),onClick:()=>this.navigate("next","month"),"data-dropdown-no-close":true}),e("cat-button",{key:"e0773fe064c5b70a59437b388e9c4877a4ff66cd",icon:"$cat:datepicker-year-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextYear,disabled:ve(this.viewDate,a),onClick:()=>this.navigate("next","year"),"data-dropdown-no-close":true})),e("div",{key:"f6d969e0cbfc0700f3db9931ab8087ea9cab9c30",class:"picker-grid",onFocusin:()=>this.setAriaLive(this.locale.arrowKeys)},e("div",{key:"ecf39be602c6538f97ccbea7d5060c8e4b0b7f9f",class:"picker-grid-head"},Array.from(Array(7),((t,i)=>{const a=(i+this.locale.weekInfo.firstDay)%7;return e("abbr",{title:this.locale.days.long[a]},this.locale.days.short[a])}))),this.weeks&&e("div",{class:"picker-grid-weeks"},r.filter(((t,e)=>e%7===0)).map((t=>e("div",null,this.getWeekNumber(t))))),e("div",{key:"ce3f468736a76aa772bd2f16ea407a4a890fd02c",class:"picker-grid-days"},r.map((t=>{const i=ke(n,t);const a=ke(o,t);const r=!!n&&!!o&&t>n&&tthis.select(t),"data-date":this.locale.toLocalISO(t)},t.getDate())})))),e("div",{key:"3c542e87fed7a18360871f0bc9b96658c6e6cfeb",class:"picker-foot"},!this.noToday&&this.canClick(this.locale.now())&&e("cat-button",{size:"s","data-dropdown-no-close":true,onClick:()=>this.select(this.locale.now())},this.locale.today),this.hint&&e("p",{class:"cursor-help"},this.locale.arrowKeys),!this.noClear&&e("cat-button",{size:"s",disabled:!this.value,"data-dropdown-no-close":true,onClick:()=>this.clear()},this.locale.clear))),e("p",{key:"f90c2947cdf67dc7a2bed883884133df2cc79380",class:"cursor-aria","aria-live":"polite"}))}focus(t){const[e,i]=this.getMinMaxDate();this.focusDate=xe(e,t,i);this.viewDate=new Date(this.focusDate.getFullYear(),this.focusDate.getMonth());this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus()}navigate(t,e){this.viewDate=new Date(t==="prev"?e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()-1):this.viewDate.setMonth(this.viewDate.getMonth()-1):e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()+1):this.viewDate.setMonth(this.viewDate.getMonth()+1));this.setAriaLive(this.getHeadline())}setAriaLive(t){const e=this.hostElement.shadowRoot?.querySelector(".cursor-aria");if(e){e.innerHTML=t}}dateGrid(t,e){const i=(new Date(t,e,1).getDay()-this.locale.weekInfo.firstDay+7)%7;const a=new Date(t,e+1,0).getDate();const r=[...Array(a).keys()];const n=this.getLastDaysOfMonth(t,e,i);const o=[...Array(42-r.length-n.length).keys()];return[...n.map((i=>new Date(t,e-1,i+1))),...r.map((i=>new Date(t,e,i+1))),...o.map((i=>new Date(t,e+1,i+1)))]}getLastDaysOfMonth(t,e,i){const a=new Date(t,e,0).getDate();const r=Array.from({length:a},((t,e)=>e));return i?r.slice(-i):[]}getHeadline(){return`${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`}getWeekNumber(t,e=true){const i=new Date(t.getTime());const a=e?i.getDay()||7:i.getDay();i.setDate(i.getDate()+4-a);const r=new Date(i.getFullYear(),0,1);return Math.ceil(((+i-+r)/864e5+1)/7)}canFocus(t){const e=this.locale.now();const[i]=this.getMinMaxDate();const a=this.focusedDate;const[r]=this.getValue();if(a&&ye(a,this.viewDate)){return ye(a,t)&&ke(a,t)}else if(r&&ye(r,this.viewDate)){return ye(r,t)&&ke(r,t)}else if(ye(this.viewDate,e)&&(!i||i<=e)){return ye(this.viewDate,t)&&ke(e,t)}const n=ye(t,i)?i?.getDate()??1:1;return ye(this.viewDate,t)&&t.getDate()===n}canClick(t){const[e,i]=this.getMinMaxDate();return(!e||e<=t)&&(!i||i>=t)}getMinMaxDate(){const t=this.locale.fromLocalISO(this.min);const e=this.locale.fromLocalISO(this.max);return[t,e]}getValue(){if(this.range){const[t,e]=JSON.parse(this.value||"[]");return[this.locale.fromLocalISO(t),this.locale.fromLocalISO(e)]}else{return[this.locale.fromLocalISO(this.value),null]}}toRangeValue(t,e){return JSON.stringify([t,e].map((t=>t?this.locale.toLocalISO(t):null)))}get hostElement(){return a(this)}};Re.style=Me;var Ce=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"];var Ae={_disable:[],allowInput:false,allowInvalidPreload:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:true,clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enableSeconds:false,enableTime:false,errorHandler:function(t){return typeof console!=="undefined"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0);e.setDate(e.getDate()+3-(e.getDay()+6)%7);var i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:false,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:false,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"",shorthandCurrentMonth:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var Se={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:false};var Te=function(t,e){if(e===void 0){e=2}return("000"+t).slice(e*-1)};var Fe=function(t){return t===true?1:0};function Be(t,e){var i;return function(){var a=this;var r=arguments;clearTimeout(i);i=setTimeout((function(){return t.apply(a,r)}),e)}}var $e=function(t){return t instanceof Array?t:[t]};function Ee(t,e,i){if(i===true)return t.classList.add(e);t.classList.remove(e)}function Oe(t,e,i){var a=window.document.createElement(t);e=e||"";i=i||"";a.className=e;if(i!==undefined)a.textContent=i;return a}function Ne(t){while(t.firstChild)t.removeChild(t.firstChild)}function We(t,e){if(e(t))return t;else if(t.parentNode)return We(t.parentNode,e);return undefined}function Le(t,e){var i=Oe("div","numInputWrapper"),a=Oe("input","numInput "+t),r=Oe("span","arrowUp"),n=Oe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){a.type="number"}else{a.type="text";a.pattern="\\d*"}if(e!==undefined)for(var o in e)a.setAttribute(o,e[o]);i.appendChild(a);i.appendChild(r);i.appendChild(n);return i}function je(t){try{if(typeof t.composedPath==="function"){var e=t.composedPath();return e[0]}return t.target}catch(e){return t.target}}var Pe=function(){return undefined};var Ye=function(t,e,i){return i.months[e?"shorthand":"longhand"][t]};var He={D:Pe,F:function(t,e,i){t.setMonth(i.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,i){t.setHours(t.getHours()%12+12*Fe(new RegExp(i.amPM[1],"i").test(e)))},M:function(t,e,i){t.setMonth(i.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,i){var a=parseInt(e);var r=new Date(t.getFullYear(),0,2+(a-1)*7,0,0,0,0);r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek);return r},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:Pe,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:Pe,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}};var Ue={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"};var _e={Z:function(t){return t.toISOString()},D:function(t,e,i){return e.weekdays.shorthand[_e.w(t,e,i)]},F:function(t,e,i){return Ye(_e.n(t,e,i)-1,false,e)},G:function(t,e,i){return Te(_e.h(t,e,i))},H:function(t){return Te(t.getHours())},J:function(t,e){return e.ordinal!==undefined?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[Fe(t.getHours()>11)]},M:function(t,e){return Ye(t.getMonth(),true,e)},S:function(t){return Te(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,i){return i.getWeek(t)},Y:function(t){return Te(t.getFullYear(),4)},d:function(t){return Te(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Te(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Te(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}};var Ke=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a,n=t.isMobile,o=n===void 0?false:n;return function(t,e,a){var n=a||r;if(i.formatDate!==undefined&&!o){return i.formatDate(t,e,n)}return e.split("").map((function(e,a,r){return _e[e]&&r[a-1]!=="\\"?_e[e](t,n,i):e!=="\\"?e:""})).join("")}};var Ve=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a;return function(t,e,a,n){if(t!==0&&!t)return undefined;var o=n||r;var s;var c=t;if(t instanceof Date)s=new Date(t.getTime());else if(typeof t!=="string"&&t.toFixed!==undefined)s=new Date(t);else if(typeof t==="string"){var l=e||(i||Ae).dateFormat;var d=String(t).trim();if(d==="today"){s=new Date;a=true}else if(i&&i.parseDate){s=i.parseDate(t,l)}else if(/Z$/.test(d)||/GMT$/.test(d)){s=new Date(t)}else{var h=void 0,f=[];for(var u=0,p=0,b="";uMath.min(e,i)&&t=0?new Date:new Date(i.config.minDate.getTime());var a=Qe(i.config);e.setHours(a.hours,a.minutes,a.seconds,e.getMilliseconds());i.selectedDates=[e];i.latestSelectedDateObj=e}if(t!==undefined&&t.type!=="blur"){It(t)}var r=i._input.value;h();zt();if(i._input.value!==r){i._debouncedChange()}}function l(t,e){return t%12+12*Fe(e===i.l10n.amPM[1])}function d(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}function h(){if(i.hourElement===undefined||i.minuteElement===undefined)return;var t=(parseInt(i.hourElement.value.slice(-2),10)||0)%24,e=(parseInt(i.minuteElement.value,10)||0)%60,a=i.secondElement!==undefined?(parseInt(i.secondElement.value,10)||0)%60:0;if(i.amPM!==undefined){t=l(t,i.amPM.textContent)}var r=i.config.minTime!==undefined||i.config.minDate&&i.minDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.minDate,true)===0;var n=i.config.maxTime!==undefined||i.config.maxDate&&i.maxDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.maxDate,true)===0;if(i.config.maxTime!==undefined&&i.config.minTime!==undefined&&i.config.minTime>i.config.maxTime){var o=Ge(i.config.minTime.getHours(),i.config.minTime.getMinutes(),i.config.minTime.getSeconds());var s=Ge(i.config.maxTime.getHours(),i.config.maxTime.getMinutes(),i.config.maxTime.getSeconds());var c=Ge(t,e,a);if(c>s&&c=12)];if(i.secondElement!==undefined)i.secondElement.value=Te(a)}function p(t){var e=je(t);var i=parseInt(e.value)+(t.delta||0);if(i/1e3>1||t.key==="Enter"&&!/[^\d]/.test(i.toString())){H(i)}}function b(t,e,a,r){if(e instanceof Array)return e.forEach((function(e){return b(t,e,a,r)}));if(t instanceof Array)return t.forEach((function(t){return b(t,e,a,r)}));t.addEventListener(e,a,r);i._handlers.push({remove:function(){return t.removeEventListener(e,a,r)}})}function m(){gt("onChange")}function g(){if(i.config.wrap){["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(i.element.querySelectorAll("[data-"+t+"]"),(function(e){return b(e,"click",i[t])}))}))}if(i.isMobile){bt();return}var t=Be(J,50);i._debouncedChange=Be(m,ii);if(i.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))b(i.daysContainer,"mouseover",(function(t){if(i.config.mode==="range")q(je(t))}));b(i._input,"keydown",V);if(i.calendarContainer!==undefined){b(i.calendarContainer,"keydown",V)}if(!i.config.inline&&!i.config.static)b(window,"resize",t);if(window.ontouchstart!==undefined)b(window.document,"touchstart",Y);else b(window.document,"mousedown",Y);b(window.document,"focus",Y,{capture:true});if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}if(i.daysContainer!==undefined){b(i.monthNav,"click",Dt);b(i.monthNav,["keyup","increment"],p);b(i.daysContainer,"click",ot)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined){var e=function(t){return je(t).select()};b(i.timeContainer,["increment"],c);b(i.timeContainer,"blur",c,{capture:true});b(i.timeContainer,"click",y);b([i.hourElement,i.minuteElement],["focus","click"],e);if(i.secondElement!==undefined)b(i.secondElement,"focus",(function(){return i.secondElement&&i.secondElement.select()}));if(i.amPM!==undefined){b(i.amPM,"click",(function(t){c(t)}))}}if(i.config.allowInput){b(i._input,"blur",K)}}function v(t,e){var a=t!==undefined?i.parseDate(t):i.latestSelectedDateObj||(i.config.minDate&&i.config.minDate>i.now?i.config.minDate:i.config.maxDate&&i.config.maxDate1);i.calendarContainer.appendChild(t);var n=i.config.appendTo!==undefined&&i.config.appendTo.nodeType!==undefined;if(i.config.inline||i.config.static){i.calendarContainer.classList.add(i.config.inline?"inline":"static");if(i.config.inline){if(!n&&i.element.parentNode)i.element.parentNode.insertBefore(i.calendarContainer,i._input.nextSibling);else if(i.config.appendTo!==undefined)i.config.appendTo.appendChild(i.calendarContainer)}if(i.config.static){var o=Oe("div","flatpickr-wrapper");if(i.element.parentNode)i.element.parentNode.insertBefore(o,i.element);o.appendChild(i.element);if(i.altInput)o.appendChild(i.altInput);o.appendChild(i.calendarContainer)}}if(!i.config.static&&!i.config.inline)(i.config.appendTo!==undefined?i.config.appendTo:window.document.body).appendChild(i.calendarContainer)}function w(t,e,a,r){var n=U(e,true),o=Oe("span",t,e.getDate().toString());o.dateObj=e;o.$i=r;o.setAttribute("aria-label",i.formatDate(e,i.config.ariaDateFormat));if(t.indexOf("hidden")===-1&&qe(e,i.now)===0){i.todayDateElem=o;o.classList.add("today");o.setAttribute("aria-current","date")}if(n){o.tabIndex=-1;if(yt(e)){o.classList.add("selected");i.selectedDateElem=o;if(i.config.mode==="range"){Ee(o,"startRange",i.selectedDates[0]&&qe(e,i.selectedDates[0],true)===0);Ee(o,"endRange",i.selectedDates[1]&&qe(e,i.selectedDates[1],true)===0);if(t==="nextMonthDay")o.classList.add("inRange")}}}else{o.classList.add("flatpickr-disabled")}if(i.config.mode==="range"){if(kt(e)&&!yt(e))o.classList.add("inRange")}if(i.weekNumbers&&i.config.showMonths===1&&t!=="prevMonthDay"&&r%7===6){i.weekNumbers.insertAdjacentHTML("beforeend",""+i.config.getWeek(e)+"")}gt("onDayCreate",o);return o}function z(t){t.focus();if(i.config.mode==="range")q(t)}function D(t){var e=t>0?0:i.config.showMonths-1;var a=t>0?i.config.showMonths:-1;for(var r=e;r!=a;r+=t){var n=i.daysContainer.children[r];var o=t>0?0:n.children.length-1;var s=t>0?n.children.length:-1;for(var c=o;c!=s;c+=t){var l=n.children[c];if(l.className.indexOf("hidden")===-1&&U(l.dateObj))return l}}return undefined}function I(t,e){var a=t.className.indexOf("Month")===-1?t.dateObj.getMonth():i.currentMonth;var r=e>0?i.config.showMonths:-1;var n=e>0?1:-1;for(var o=a-i.currentMonth;o!=r;o+=n){var s=i.daysContainer.children[o];var c=a-i.currentMonth===o?t.$i+e:e<0?s.children.length-1:0;var l=s.children.length;for(var d=c;d>=0&&d0?l:-1);d+=n){var h=s.children[d];if(h.className.indexOf("hidden")===-1&&U(h.dateObj)&&Math.abs(t.$i-d)>=Math.abs(e))return z(h)}}i.changeMonth(n);M(D(n),0);return undefined}function M(t,e){var a=n();var r=_(a||document.body);var o=t!==undefined?t:r?a:i.selectedDateElem!==undefined&&_(i.selectedDateElem)?i.selectedDateElem:i.todayDateElem!==undefined&&_(i.todayDateElem)?i.todayDateElem:D(e>0?1:-1);if(o===undefined){i._input.focus()}else if(!r){z(o)}else{I(o,e)}}function R(t,e){var a=(new Date(t,e,1).getDay()-i.l10n.firstDayOfWeek+7)%7;var r=i.utils.getDaysInMonth((e-1+12)%12,t);var n=i.utils.getDaysInMonth(e,t),o=window.document.createDocumentFragment(),s=i.config.showMonths>1,c=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay";var d=r+1-a,h=0;for(;d<=r;d++,h++){o.appendChild(w("flatpickr-day "+c,new Date(t,e-1,d),d,h))}for(d=1;d<=n;d++,h++){o.appendChild(w("flatpickr-day",new Date(t,e,d),d,h))}for(var f=n+1;f<=42-a&&(i.config.showMonths===1||h%7!==0);f++,h++){o.appendChild(w("flatpickr-day "+l,new Date(t,e+1,f%n),f,h))}var u=Oe("div","dayContainer");u.appendChild(o);return u}function C(){if(i.daysContainer===undefined){return}Ne(i.daysContainer);if(i.weekNumbers)Ne(i.weekNumbers);var t=document.createDocumentFragment();for(var e=0;e1||i.config.monthSelectorType!=="dropdown")return;var t=function(t){if(i.config.minDate!==undefined&&i.currentYear===i.config.minDate.getFullYear()&&ti.config.maxDate.getMonth())};i.monthsDropdownContainer.tabIndex=-1;i.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++){if(!t(e))continue;var a=Oe("option","flatpickr-monthDropdown-month");a.value=new Date(i.currentYear,e).getMonth().toString();a.textContent=Ye(e,i.config.shorthandCurrentMonth,i.l10n);a.tabIndex=-1;if(i.currentMonth===e){a.selected=true}i.monthsDropdownContainer.appendChild(a)}}function S(){var t=Oe("div","flatpickr-month");var e=window.document.createDocumentFragment();var a;if(i.config.showMonths>1||i.config.monthSelectorType==="static"){a=Oe("span","cur-month")}else{i.monthsDropdownContainer=Oe("select","flatpickr-monthDropdown-months");i.monthsDropdownContainer.setAttribute("aria-label",i.l10n.monthAriaLabel);b(i.monthsDropdownContainer,"change",(function(t){var e=je(t);var a=parseInt(e.value,10);i.changeMonth(a-i.currentMonth);gt("onMonthChange")}));A();a=i.monthsDropdownContainer}var r=Le("cur-year",{tabindex:"-1"});var n=r.getElementsByTagName("input")[0];n.setAttribute("aria-label",i.l10n.yearAriaLabel);if(i.config.minDate){n.setAttribute("min",i.config.minDate.getFullYear().toString())}if(i.config.maxDate){n.setAttribute("max",i.config.maxDate.getFullYear().toString());n.disabled=!!i.config.minDate&&i.config.minDate.getFullYear()===i.config.maxDate.getFullYear()}var o=Oe("div","flatpickr-current-month");o.appendChild(a);o.appendChild(r);e.appendChild(o);t.appendChild(e);return{container:t,yearElement:n,monthElement:a}}function T(){Ne(i.monthNav);i.monthNav.appendChild(i.prevMonthNav);if(i.config.showMonths){i.yearElements=[];i.monthElements=[]}for(var t=i.config.showMonths;t--;){var e=S();i.yearElements.push(e.yearElement);i.monthElements.push(e.monthElement);i.monthNav.appendChild(e.container)}i.monthNav.appendChild(i.nextMonthNav)}function F(){i.monthNav=Oe("div","flatpickr-months");i.yearElements=[];i.monthElements=[];i.prevMonthNav=Oe("span","flatpickr-prev-month");i.prevMonthNav.innerHTML=i.config.prevArrow;i.nextMonthNav=Oe("span","flatpickr-next-month");i.nextMonthNav.innerHTML=i.config.nextArrow;T();Object.defineProperty(i,"_hidePrevMonthArrow",{get:function(){return i.__hidePrevMonthArrow},set:function(t){if(i.__hidePrevMonthArrow!==t){Ee(i.prevMonthNav,"flatpickr-disabled",t);i.__hidePrevMonthArrow=t}}});Object.defineProperty(i,"_hideNextMonthArrow",{get:function(){return i.__hideNextMonthArrow},set:function(t){if(i.__hideNextMonthArrow!==t){Ee(i.nextMonthNav,"flatpickr-disabled",t);i.__hideNextMonthArrow=t}}});i.currentYearElement=i.yearElements[0];xt();return i.monthNav}function B(){i.calendarContainer.classList.add("hasTime");if(i.config.noCalendar)i.calendarContainer.classList.add("noCalendar");var t=Qe(i.config);i.timeContainer=Oe("div","flatpickr-time");i.timeContainer.tabIndex=-1;var e=Oe("span","flatpickr-time-separator",":");var a=Le("flatpickr-hour",{"aria-label":i.l10n.hourAriaLabel});i.hourElement=a.getElementsByTagName("input")[0];var r=Le("flatpickr-minute",{"aria-label":i.l10n.minuteAriaLabel});i.minuteElement=r.getElementsByTagName("input")[0];i.hourElement.tabIndex=i.minuteElement.tabIndex=-1;i.hourElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getHours():i.config.time_24hr?t.hours:d(t.hours));i.minuteElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getMinutes():t.minutes);i.hourElement.setAttribute("step",i.config.hourIncrement.toString());i.minuteElement.setAttribute("step",i.config.minuteIncrement.toString());i.hourElement.setAttribute("min",i.config.time_24hr?"0":"1");i.hourElement.setAttribute("max",i.config.time_24hr?"23":"12");i.hourElement.setAttribute("maxlength","2");i.minuteElement.setAttribute("min","0");i.minuteElement.setAttribute("max","59");i.minuteElement.setAttribute("maxlength","2");i.timeContainer.appendChild(a);i.timeContainer.appendChild(e);i.timeContainer.appendChild(r);if(i.config.time_24hr)i.timeContainer.classList.add("time24hr");if(i.config.enableSeconds){i.timeContainer.classList.add("hasSeconds");var n=Le("flatpickr-second");i.secondElement=n.getElementsByTagName("input")[0];i.secondElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getSeconds():t.seconds);i.secondElement.setAttribute("step",i.minuteElement.getAttribute("step"));i.secondElement.setAttribute("min","0");i.secondElement.setAttribute("max","59");i.secondElement.setAttribute("maxlength","2");i.timeContainer.appendChild(Oe("span","flatpickr-time-separator",":"));i.timeContainer.appendChild(n)}if(!i.config.time_24hr){i.amPM=Oe("span","flatpickr-am-pm",i.l10n.amPM[Fe((i.latestSelectedDateObj?i.hourElement.value:i.config.defaultHour)>11)]);i.amPM.title=i.l10n.toggleTitle;i.amPM.tabIndex=-1;i.timeContainer.appendChild(i.amPM)}return i.timeContainer}function $(){if(!i.weekdayContainer)i.weekdayContainer=Oe("div","flatpickr-weekdays");else Ne(i.weekdayContainer);for(var t=i.config.showMonths;t--;){var e=Oe("div","flatpickr-weekdaycontainer");i.weekdayContainer.appendChild(e)}E();return i.weekdayContainer}function E(){if(!i.weekdayContainer){return}var t=i.l10n.firstDayOfWeek;var e=ei(i.l10n.weekdays.shorthand);if(t>0&&t\n "+e.join("")+"\n \n "}}function O(){i.calendarContainer.classList.add("hasWeeks");var t=Oe("div","flatpickr-weekwrapper");t.appendChild(Oe("span","flatpickr-weekday",i.l10n.weekAbbreviation));var e=Oe("div","flatpickr-weeks");t.appendChild(e);return{weekWrapper:t,weekNumbers:e}}function N(t,e){if(e===void 0){e=true}var a=e?t:t-i.currentMonth;if(a<0&&i._hidePrevMonthArrow===true||a>0&&i._hideNextMonthArrow===true)return;i.currentMonth+=a;if(i.currentMonth<0||i.currentMonth>11){i.currentYear+=i.currentMonth>11?1:-1;i.currentMonth=(i.currentMonth+12)%12;gt("onYearChange");A()}C();gt("onMonthChange");xt()}function W(t,e){if(t===void 0){t=true}if(e===void 0){e=true}i.input.value="";if(i.altInput!==undefined)i.altInput.value="";if(i.mobileInput!==undefined)i.mobileInput.value="";i.selectedDates=[];i.latestSelectedDateObj=undefined;if(e===true){i.currentYear=i._initialDate.getFullYear();i.currentMonth=i._initialDate.getMonth()}if(i.config.enableTime===true){var a=Qe(i.config),r=a.hours,n=a.minutes,o=a.seconds;u(r,n,o)}i.redraw();if(t)gt("onChange")}function L(){i.isOpen=false;if(!i.isMobile){if(i.calendarContainer!==undefined){i.calendarContainer.classList.remove("open")}if(i._input!==undefined){i._input.classList.remove("active")}}gt("onClose")}function j(){if(i.config!==undefined)gt("onDestroy");for(var t=i._handlers.length;t--;){i._handlers[t].remove()}i._handlers=[];if(i.mobileInput){if(i.mobileInput.parentNode)i.mobileInput.parentNode.removeChild(i.mobileInput);i.mobileInput=undefined}else if(i.calendarContainer&&i.calendarContainer.parentNode){if(i.config.static&&i.calendarContainer.parentNode){var e=i.calendarContainer.parentNode;e.lastChild&&e.removeChild(e.lastChild);if(e.parentNode){while(e.firstChild)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else i.calendarContainer.parentNode.removeChild(i.calendarContainer)}if(i.altInput){i.input.type="text";if(i.altInput.parentNode)i.altInput.parentNode.removeChild(i.altInput);delete i.altInput}if(i.input){i.input.type=i.input._type;i.input.classList.remove("flatpickr-input");i.input.removeAttribute("readonly")}["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete i[t]}catch(t){}}))}function P(t){return i.calendarContainer.contains(t)}function Y(t){if(i.isOpen&&!i.config.inline){var e=je(t);var a=P(e);var r=e===i.input||e===i.altInput||i.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(i.input)||~t.path.indexOf(i.altInput));var n=!r&&!a&&!P(t.relatedTarget);var o=!i.config.ignoredFocusElements.some((function(t){return t.contains(e)}));if(n&&o){if(i.config.allowInput){i.setDate(i._input.value,false,i.config.altInput?i.config.altFormat:i.config.dateFormat)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined&&i.input.value!==""&&i.input.value!==undefined){c()}i.close();if(i.config&&i.config.mode==="range"&&i.selectedDates.length===1)i.clear(false)}}}function H(t){if(!t||i.config.minDate&&ti.config.maxDate.getFullYear())return;var e=t,a=i.currentYear!==e;i.currentYear=e||i.currentYear;if(i.config.maxDate&&i.currentYear===i.config.maxDate.getFullYear()){i.currentMonth=Math.min(i.config.maxDate.getMonth(),i.currentMonth)}else if(i.config.minDate&&i.currentYear===i.config.minDate.getFullYear()){i.currentMonth=Math.max(i.config.minDate.getMonth(),i.currentMonth)}if(a){i.redraw();gt("onYearChange");A()}}function U(t,e){var a;if(e===void 0){e=true}var r=i.parseDate(t,undefined,e);if(i.config.minDate&&r&&qe(r,i.config.minDate,e!==undefined?e:!i.minDateHasTime)<0||i.config.maxDate&&r&&qe(r,i.config.maxDate,e!==undefined?e:!i.maxDateHasTime)>0)return false;if(!i.config.enable&&i.config.disable.length===0)return true;if(r===undefined)return false;var n=!!i.config.enable,o=(a=i.config.enable)!==null&&a!==void 0?a:i.config.disable;for(var s=0,c=void 0;s=c.from.getTime()&&r.getTime()<=c.to.getTime())return n}return!n}function _(t){if(i.daysContainer!==undefined)return t.className.indexOf("hidden")===-1&&t.className.indexOf("flatpickr-disabled")===-1&&i.daysContainer.contains(t);return false}function K(t){var e=t.target===i._input;var a=i._input.value.trimEnd()!==wt();if(e&&a&&!(t.relatedTarget&&P(t.relatedTarget))){i.setDate(i._input.value,true,t.target===i.altInput?i.config.altFormat:i.config.dateFormat)}}function V(e){var a=je(e);var r=i.config.wrap?t.contains(a):a===i._input;var o=i.config.allowInput;var s=i.isOpen&&(!o||!r);var l=i.config.inline&&r&&!o;if(e.keyCode===13&&r){if(o){i.setDate(i._input.value,true,a===i.altInput?i.config.altFormat:i.config.dateFormat);i.close();return a.blur()}else{i.open()}}else if(P(a)||s||l){var d=!!i.timeContainer&&i.timeContainer.contains(a);switch(e.keyCode){case 13:if(d){e.preventDefault();c();nt()}else ot(e);break;case 27:e.preventDefault();nt();break;case 8:case 46:if(r&&!i.config.allowInput){e.preventDefault();i.clear()}break;case 37:case 39:if(!d&&!r){e.preventDefault();var f=n();if(i.daysContainer!==undefined&&(o===false||f&&_(f))){var u=e.keyCode===39?1:-1;if(!e.ctrlKey)M(undefined,u);else{e.stopPropagation();N(u);M(D(1),0)}}}else if(i.hourElement)i.hourElement.focus();break;case 38:case 40:e.preventDefault();var p=e.keyCode===40?1:-1;if(i.daysContainer&&a.$i!==undefined||a===i.input||a===i.altInput){if(e.ctrlKey){e.stopPropagation();H(i.currentYear-p);M(D(1),0)}else if(!d)M(undefined,p*7)}else if(a===i.currentYearElement){H(i.currentYear-p)}else if(i.config.enableTime){if(!d&&i.hourElement)i.hourElement.focus();c(e);i._debouncedChange()}break;case 9:if(d){var b=[i.hourElement,i.minuteElement,i.secondElement,i.amPM].concat(i.pluginElements).filter((function(t){return t}));var m=b.indexOf(a);if(m!==-1){var g=b[m+(e.shiftKey?-1:1)];e.preventDefault();(g||i._input).focus()}}else if(!i.config.noCalendar&&i.daysContainer&&i.daysContainer.contains(a)&&e.shiftKey){e.preventDefault();i._input.focus()}break}}if(i.amPM!==undefined&&a===i.amPM){switch(e.key){case i.l10n.amPM[0].charAt(0):case i.l10n.amPM[0].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[0];h();zt();break;case i.l10n.amPM[1].charAt(0):case i.l10n.amPM[1].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[1];h();zt();break}}if(r||P(a)){gt("onKeyDown",e)}}function q(t,e){if(e===void 0){e="flatpickr-day"}if(i.selectedDates.length!==1||t&&(!t.classList.contains(e)||t.classList.contains("flatpickr-disabled")))return;var a=t?t.dateObj.getTime():i.days.firstElementChild.dateObj.getTime(),r=i.parseDate(i.selectedDates[0],undefined,true).getTime(),n=Math.min(a,i.selectedDates[0].getTime()),o=Math.max(a,i.selectedDates[0].getTime());var s=false;var c=0,l=0;for(var d=n;dn&&dc))c=d;else if(d>r&&(!l||d ."+e));h.forEach((function(e){var n=e.dateObj;var o=n.getTime();var d=c>0&&o0&&o>l;if(d){e.classList.add("notAllowed");["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));return}else if(s&&!d)return;["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)}));if(t!==undefined){t.classList.add(a<=i.selectedDates[0].getTime()?"startRange":"endRange");if(ra&&o===r)e.classList.add("endRange");if(o>=c&&(l===0||o<=l)&&Je(o,r,a))e.classList.add("inRange")}}))}function J(){if(i.isOpen&&!i.config.static&&!i.config.inline)et()}function G(t,e){if(e===void 0){e=i._positionElement}if(i.isMobile===true){if(t){t.preventDefault();var a=je(t);if(a){a.blur()}}if(i.mobileInput!==undefined){i.mobileInput.focus();i.mobileInput.click()}gt("onOpen");return}else if(i._input.disabled||i.config.inline){return}var r=i.isOpen;i.isOpen=true;if(!r){i.calendarContainer.classList.add("open");i._input.classList.add("active");gt("onOpen");et(e)}if(i.config.enableTime===true&&i.config.noCalendar===true){if(i.config.allowInput===false&&(t===undefined||!i.timeContainer.contains(t.relatedTarget))){setTimeout((function(){return i.hourElement.select()}),50)}}}function Z(t){return function(e){var a=i.config["_"+t+"Date"]=i.parseDate(e,i.config.dateFormat);var r=i.config["_"+(t==="min"?"max":"min")+"Date"];if(a!==undefined){i[t==="min"?"minDateHasTime":"maxDateHasTime"]=a.getHours()>0||a.getMinutes()>0||a.getSeconds()>0}if(i.selectedDates){i.selectedDates=i.selectedDates.filter((function(t){return U(t)}));if(!i.selectedDates.length&&t==="min")f(a);zt()}if(i.daysContainer){rt();if(a!==undefined)i.currentYearElement[t]=a.getFullYear().toString();else i.currentYearElement.removeAttribute(t);i.currentYearElement.disabled=!!r&&a!==undefined&&r.getFullYear()===a.getFullYear()}}}function X(){var a=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];var r=ti(ti({},JSON.parse(JSON.stringify(t.dataset||{}))),e);var n={};i.config.parseDate=r.parseDate;i.config.formatDate=r.formatDate;Object.defineProperty(i.config,"enable",{get:function(){return i.config._enable},set:function(t){i.config._enable=ht(t)}});Object.defineProperty(i.config,"disable",{get:function(){return i.config._disable},set:function(t){i.config._disable=ht(t)}});var s=r.mode==="time";if(!r.dateFormat&&(r.enableTime||s)){var c=ni.defaultConfig.dateFormat||Ae.dateFormat;n.dateFormat=r.noCalendar||s?"H:i"+(r.enableSeconds?":S":""):c+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||s)&&!r.altFormat){var l=ni.defaultConfig.altFormat||Ae.altFormat;n.altFormat=r.noCalendar||s?"h:i"+(r.enableSeconds?":S K":" K"):l+(" h:i"+(r.enableSeconds?":S":"")+" K")}Object.defineProperty(i.config,"minDate",{get:function(){return i.config._minDate},set:Z("min")});Object.defineProperty(i.config,"maxDate",{get:function(){return i.config._maxDate},set:Z("max")});var d=function(t){return function(e){i.config[t==="min"?"_minTime":"_maxTime"]=i.parseDate(e,"H:i:S")}};Object.defineProperty(i.config,"minTime",{get:function(){return i.config._minTime},set:d("min")});Object.defineProperty(i.config,"maxTime",{get:function(){return i.config._maxTime},set:d("max")});if(r.mode==="time"){i.config.noCalendar=true;i.config.enableTime=true}Object.assign(i.config,n,r);for(var h=0;h-1){i.config[u]=$e(f[u]).map(o).concat(i.config[u])}else if(typeof r[u]==="undefined")i.config[u]=f[u]}}if(!r.altInputClass){i.config.altInputClass=Q().className+" "+i.config.altInputClass}gt("onParseConfig")}function Q(){return i.config.wrap?t.querySelector("[data-input]"):t}function tt(){if(typeof i.config.locale!=="object"&&typeof ni.l10ns[i.config.locale]==="undefined")i.config.errorHandler(new Error("flatpickr: invalid locale "+i.config.locale));i.l10n=ti(ti({},ni.l10ns.default),typeof i.config.locale==="object"?i.config.locale:i.config.locale!=="default"?ni.l10ns[i.config.locale]:undefined);Ue.D="("+i.l10n.weekdays.shorthand.join("|")+")";Ue.l="("+i.l10n.weekdays.longhand.join("|")+")";Ue.M="("+i.l10n.months.shorthand.join("|")+")";Ue.F="("+i.l10n.months.longhand.join("|")+")";Ue.K="("+i.l10n.amPM[0]+"|"+i.l10n.amPM[1]+"|"+i.l10n.amPM[0].toLowerCase()+"|"+i.l10n.amPM[1].toLowerCase()+")";var a=ti(ti({},e),JSON.parse(JSON.stringify(t.dataset||{})));if(a.time_24hr===undefined&&ni.defaultConfig.time_24hr===undefined){i.config.time_24hr=i.l10n.time_24hr}i.formatDate=Ke(i);i.parseDate=Ve({config:i.config,l10n:i.l10n})}function et(t){if(typeof i.config.position==="function"){return void i.config.position(i,t)}if(i.calendarContainer===undefined)return;gt("onPreCalendarPosition");var e=t||i._positionElement;var a=Array.prototype.reduce.call(i.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),r=i.calendarContainer.offsetWidth,n=i.config.position.split(" "),o=n[0],s=n.length>1?n[1]:null,c=e.getBoundingClientRect(),l=window.innerHeight-c.bottom,d=o==="above"||o!=="below"&&la;var h=window.pageYOffset+c.top+(!d?e.offsetHeight+2:-a-2);Ee(i.calendarContainer,"arrowTop",!d);Ee(i.calendarContainer,"arrowBottom",d);if(i.config.inline)return;var f=window.pageXOffset+c.left;var u=false;var p=false;if(s==="center"){f-=(r-c.width)/2;u=true}else if(s==="right"){f-=r-c.width;p=true}Ee(i.calendarContainer,"arrowLeft",!u&&!p);Ee(i.calendarContainer,"arrowCenter",u);Ee(i.calendarContainer,"arrowRight",p);var b=window.document.body.offsetWidth-(window.pageXOffset+c.right);var m=f+r>window.document.body.offsetWidth;var g=b+r>window.document.body.offsetWidth;Ee(i.calendarContainer,"rightMost",m);if(i.config.static)return;i.calendarContainer.style.top=h+"px";if(!m){i.calendarContainer.style.left=f+"px";i.calendarContainer.style.right="auto"}else if(!g){i.calendarContainer.style.left="auto";i.calendarContainer.style.right=b+"px"}else{var v=it();if(v===undefined)return;var y=window.document.body.offsetWidth;var k=Math.max(0,y/2-r/2);var x=".flatpickr-calendar.centerMost:before";var w=".flatpickr-calendar.centerMost:after";var z=v.cssRules.length;var D="{left:"+c.left+"px;right:auto;}";Ee(i.calendarContainer,"rightMost",false);Ee(i.calendarContainer,"centerMost",true);v.insertRule(x+","+w+D,z);i.calendarContainer.style.left=k+"px";i.calendarContainer.style.right="auto"}}function it(){var t=null;for(var e=0;ei.currentMonth+i.config.showMonths-1)&&i.config.mode!=="range";i.selectedDateElem=r;if(i.config.mode==="single")i.selectedDates=[n];else if(i.config.mode==="multiple"){var s=yt(n);if(s)i.selectedDates.splice(parseInt(s),1);else i.selectedDates.push(n)}else if(i.config.mode==="range"){if(i.selectedDates.length===2){i.clear(false,false)}i.latestSelectedDateObj=n;i.selectedDates.push(n);if(qe(n,i.selectedDates[0],true)!==0)i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}h();if(o){var c=i.currentYear!==n.getFullYear();i.currentYear=n.getFullYear();i.currentMonth=n.getMonth();if(c){gt("onYearChange");A()}gt("onMonthChange")}xt();C();zt();if(!o&&i.config.mode!=="range"&&i.config.showMonths===1)z(r);else if(i.selectedDateElem!==undefined&&i.hourElement===undefined){i.selectedDateElem&&i.selectedDateElem.focus()}if(i.hourElement!==undefined)i.hourElement!==undefined&&i.hourElement.focus();if(i.config.closeOnSelect){var l=i.config.mode==="single"&&!i.config.enableTime;var d=i.config.mode==="range"&&i.selectedDates.length===2&&!i.config.enableTime;if(l||d){nt()}}m()}var st={locale:[tt,E],showMonths:[T,s,$],minDate:[v],maxDate:[v],positionElement:[pt],clickOpens:[function(){if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}else{i._input.removeEventListener("focus",i.open);i._input.removeEventListener("click",i.open)}}]};function ct(t,e){if(t!==null&&typeof t==="object"){Object.assign(i.config,t);for(var a in t){if(st[a]!==undefined)st[a].forEach((function(t){return t()}))}}else{i.config[t]=e;if(st[t]!==undefined)st[t].forEach((function(t){return t()}));else if(Ce.indexOf(t)>-1)i.config[t]=$e(e)}i.redraw();zt(true)}function lt(t,e){var a=[];if(t instanceof Array)a=t.map((function(t){return i.parseDate(t,e)}));else if(t instanceof Date||typeof t==="number")a=[i.parseDate(t,e)];else if(typeof t==="string"){switch(i.config.mode){case"single":case"time":a=[i.parseDate(t,e)];break;case"multiple":a=t.split(i.config.conjunction).map((function(t){return i.parseDate(t,e)}));break;case"range":a=t.split(i.l10n.rangeSeparator).map((function(t){return i.parseDate(t,e)}));break}}else i.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));i.selectedDates=i.config.allowInvalidPreload?a:a.filter((function(t){return t instanceof Date&&U(t,false)}));if(i.config.mode==="range")i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function dt(t,e,a){if(e===void 0){e=false}if(a===void 0){a=i.config.dateFormat}if(t!==0&&!t||t instanceof Array&&t.length===0)return i.clear(e);lt(t,a);i.latestSelectedDateObj=i.selectedDates[i.selectedDates.length-1];i.redraw();v(undefined,e);f();if(i.selectedDates.length===0){i.clear(false)}zt(e);if(e)gt("onChange")}function ht(t){return t.slice().map((function(t){if(typeof t==="string"||typeof t==="number"||t instanceof Date){return i.parseDate(t,undefined,true)}else if(t&&typeof t==="object"&&t.from&&t.to)return{from:i.parseDate(t.from,undefined),to:i.parseDate(t.to,undefined)};return t})).filter((function(t){return t}))}function ft(){i.selectedDates=[];i.now=i.parseDate(i.config.now)||new Date;var t=i.config.defaultDate||((i.input.nodeName==="INPUT"||i.input.nodeName==="TEXTAREA")&&i.input.placeholder&&i.input.value===i.input.placeholder?null:i.input.value);if(t)lt(t,i.config.dateFormat);i._initialDate=i.selectedDates.length>0?i.selectedDates[0]:i.config.minDate&&i.config.minDate.getTime()>i.now.getTime()?i.config.minDate:i.config.maxDate&&i.config.maxDate.getTime()0)i.latestSelectedDateObj=i.selectedDates[0];if(i.config.minTime!==undefined)i.config.minTime=i.parseDate(i.config.minTime,"H:i");if(i.config.maxTime!==undefined)i.config.maxTime=i.parseDate(i.config.maxTime,"H:i");i.minDateHasTime=!!i.config.minDate&&(i.config.minDate.getHours()>0||i.config.minDate.getMinutes()>0||i.config.minDate.getSeconds()>0);i.maxDateHasTime=!!i.config.maxDate&&(i.config.maxDate.getHours()>0||i.config.maxDate.getMinutes()>0||i.config.maxDate.getSeconds()>0)}function ut(){i.input=Q();if(!i.input){i.config.errorHandler(new Error("Invalid input element specified"));return}i.input._type=i.input.type;i.input.type="text";i.input.classList.add("flatpickr-input");i._input=i.input;if(i.config.altInput){i.altInput=Oe(i.input.nodeName,i.config.altInputClass);i._input=i.altInput;i.altInput.placeholder=i.input.placeholder;i.altInput.disabled=i.input.disabled;i.altInput.required=i.input.required;i.altInput.tabIndex=i.input.tabIndex;i.altInput.type="text";i.input.setAttribute("type","hidden");if(!i.config.static&&i.input.parentNode)i.input.parentNode.insertBefore(i.altInput,i.input.nextSibling)}if(!i.config.allowInput)i._input.setAttribute("readonly","readonly");pt()}function pt(){i._positionElement=i.config.positionElement||i._input}function bt(){var t=i.config.enableTime?i.config.noCalendar?"time":"datetime-local":"date";i.mobileInput=Oe("input",i.input.className+" flatpickr-mobile");i.mobileInput.tabIndex=1;i.mobileInput.type=t;i.mobileInput.disabled=i.input.disabled;i.mobileInput.required=i.input.required;i.mobileInput.placeholder=i.input.placeholder;i.mobileFormatStr=t==="datetime-local"?"Y-m-d\\TH:i:S":t==="date"?"Y-m-d":"H:i:S";if(i.selectedDates.length>0){i.mobileInput.defaultValue=i.mobileInput.value=i.formatDate(i.selectedDates[0],i.mobileFormatStr)}if(i.config.minDate)i.mobileInput.min=i.formatDate(i.config.minDate,"Y-m-d");if(i.config.maxDate)i.mobileInput.max=i.formatDate(i.config.maxDate,"Y-m-d");if(i.input.getAttribute("step"))i.mobileInput.step=String(i.input.getAttribute("step"));i.input.type="hidden";if(i.altInput!==undefined)i.altInput.type="hidden";try{if(i.input.parentNode)i.input.parentNode.insertBefore(i.mobileInput,i.input.nextSibling)}catch(t){}b(i.mobileInput,"change",(function(t){i.setDate(je(t).value,false,i.mobileFormatStr);gt("onChange");gt("onClose")}))}function mt(t){if(i.isOpen===true)return i.close();i.open(t)}function gt(t,e){if(i.config===undefined)return;var a=i.config[t];if(a!==undefined&&a.length>0){for(var r=0;a[r]&&r=0&&qe(t,i.selectedDates[1])<=0}function xt(){if(i.config.noCalendar||i.isMobile||!i.monthNav)return;i.yearElements.forEach((function(t,e){var a=new Date(i.currentYear,i.currentMonth,1);a.setMonth(i.currentMonth+e);if(i.config.showMonths>1||i.config.monthSelectorType==="static"){i.monthElements[e].textContent=Ye(a.getMonth(),i.config.shorthandCurrentMonth,i.l10n)+" "}else{i.monthsDropdownContainer.value=a.getMonth().toString()}t.value=a.getFullYear().toString()}));i._hidePrevMonthArrow=i.config.minDate!==undefined&&(i.currentYear===i.config.minDate.getFullYear()?i.currentMonth<=i.config.minDate.getMonth():i.currentYeari.config.maxDate.getMonth():i.currentYear>i.config.maxDate.getFullYear())}function wt(t){var e=t||(i.config.altInput?i.config.altFormat:i.config.dateFormat);return i.selectedDates.map((function(t){return i.formatDate(t,e)})).filter((function(t,e,a){return i.config.mode!=="range"||i.config.enableTime||a.indexOf(t)===e})).join(i.config.mode!=="range"?i.config.conjunction:i.l10n.rangeSeparator)}function zt(t){if(t===void 0){t=true}if(i.mobileInput!==undefined&&i.mobileFormatStr){i.mobileInput.value=i.latestSelectedDateObj!==undefined?i.formatDate(i.latestSelectedDateObj,i.mobileFormatStr):""}i.input.value=wt(i.config.dateFormat);if(i.altInput!==undefined){i.altInput.value=wt(i.config.altFormat)}if(t!==false)gt("onValueUpdate")}function Dt(t){var e=je(t);var a=i.prevMonthNav.contains(e);var r=i.nextMonthNav.contains(e);if(a||r){N(a?-1:1)}else if(i.yearElements.indexOf(e)>=0){e.select()}else if(e.classList.contains("arrowUp")){i.changeYear(i.currentYear+1)}else if(e.classList.contains("arrowDown")){i.changeYear(i.currentYear-1)}}function It(t){t.preventDefault();var e=t.type==="keydown",a=je(t),r=a;if(i.amPM!==undefined&&a===i.amPM){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}var n=parseFloat(r.getAttribute("min")),o=parseFloat(r.getAttribute("max")),s=parseFloat(r.getAttribute("step")),c=parseInt(r.value,10),l=t.delta||(e?t.which===38?1:-1:0);var d=c+s*l;if(typeof r.value!=="undefined"&&r.value.length===2){var h=r===i.hourElement,f=r===i.minuteElement;if(do){d=r===i.hourElement?d-o-Fe(!i.amPM):n;if(f)k(undefined,1,i.hourElement)}if(i.amPM&&h&&(s===1?d+c===23:Math.abs(d-c)>s)){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}r.value=Te(d)}}r();return i}function ri(t,e){var i=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement}));var a=[];for(var r=0;rc||h=e.weekStartDay&&r<=e.weekEndDay)i[a].classList.add("week","selected")}}function r(){var t=e.days.childNodes;for(var i=t.length;i--;)t[i].classList.remove("inRange")}function n(){if(e.daysContainer!==undefined)e.daysContainer.addEventListener("mouseover",i)}function o(){if(e.daysContainer!==undefined)e.daysContainer.removeEventListener("mouseover",i)}return{onValueUpdate:a,onMonthChange:a,onYearChange:a,onOpen:a,onClose:r,onParseConfig:function(){e.config.mode="single";e.config.enableTime=false;e.config.dateFormat=e.config.dateFormat?e.config.dateFormat:"\\W\\e\\e\\k #W, Y";e.config.altFormat=e.config.altFormat?e.config.altFormat:"\\W\\e\\e\\k #W, Y"},onReady:[n,a,function(){e.loadedPlugins.push("weekSelect")}],onDestroy:o}}}return e}))})(si);const ci=si.exports;function li(t,e={}){const i=t.mode==="week"?[new ci({})]:[];const a=di(t.mode);return{...e,locale:t.locale,plugins:i,allowInput:true,altInput:true,prevArrow:"←",nextArrow:"→",dateFormat:a,altFormat:t.format,ariaDateFormat:t.format,mode:t.mode==="daterange"?"range":"single",minDate:t.min,maxDate:t.max,enableTime:t.mode==="time"||t.mode==="datetime",noCalendar:t.mode==="time",weekNumbers:true,minuteIncrement:t.step,clickOpens:!t.disabled&&!t.readonly,appendTo:t.appendTo,position:t.position?t.position:"auto",onReady:(e,i,a)=>{for(const e in t.nativePickerAttributes){const i=t.nativePickerAttributes[e];a.calendarContainer.setAttribute(e,i)}if(t.appendTo&&typeof t.onReady==="function"){t.onReady(e,i,a)}},onClose:function(e,i,a){if(t.mode==="daterange"&&e.length<2){a.clear()}},onChange:(e,i,r)=>{let n=i||undefined;if(t.mode==="daterange"){if(e.length<2){return}else{const t=e[0];const i=e[1];i.setHours(23);i.setMinutes(59);i.setSeconds(59);n=`${r.formatDate(t,a)} - ${r.formatDate(i,a)}`}}else if(t.mode==="week"){n=e[0]?r.config.getWeek(e[0]).toString():undefined}t.applyChange(n)}}}function di(t){if(t==="week"){return"W"}else if(t==="time"){return"H:i"}else{return"Z"}}function hi(t,e){const i=new Date(2e3,1,3,16,5,6);const a={year:"numeric",month:"2-digit",day:"2-digit"};const r={hour:"2-digit",minute:"2-digit"};return e==="week"?"W":new Intl.DateTimeFormat(t,{date:a,time:r,datetime:{...a,...r},daterange:a}[e]).format(i).replace("2000","Y").replace("00","y").replace("02","m").replace("03","d").replace("04","h").replace("16","H").replace("05","i").replace(/AM|PM/i,"K")}function fi(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function ui(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return i?.firstDay??1}function pi(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function bi(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function mi(t){return{firstDayOfWeek:ui(t),rangeSeparator:" - ",weekAbbreviation:"",yearAriaLabel:D.t("datepicker.year"),monthAriaLabel:D.t("datepicker.month"),hourAriaLabel:D.t("datepicker.hour"),minuteAriaLabel:D.t("datepicker.minute"),toggleTitle:D.t("datepicker.toggle"),scrollTitle:D.t("datepicker.scroll"),time_24hr:!fi(t),weekdays:{shorthand:pi(t,"short"),longhand:pi(t,"long")},months:{shorthand:bi(t,"short"),longhand:bi(t,"long")}}}const gi=Math.min;const vi=Math.max;const yi=Math.round;const ki=Math.floor;const xi=t=>({x:t,y:t});const wi={left:"right",right:"left",bottom:"top",top:"bottom"};const zi={start:"end",end:"start"};function Di(t,e,i){return vi(t,gi(e,i))}function Ii(t,e){return typeof t==="function"?t(e):t}function Mi(t){return t.split("-")[0]}function Ri(t){return t.split("-")[1]}function Ci(t){return t==="x"?"y":"x"}function Ai(t){return t==="y"?"height":"width"}function Si(t){return["top","bottom"].includes(Mi(t))?"y":"x"}function Ti(t){return Ci(Si(t))}function Fi(t,e,i){if(i===void 0){i=false}const a=Ri(t);const r=Ti(t);const n=Ai(r);let o=r==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(e.reference[n]>e.floating[n]){o=Ni(o)}return[o,Ni(o)]}function Bi(t){const e=Ni(t);return[$i(t),e,$i(e)]}function $i(t){return t.replace(/start|end/g,(t=>zi[t]))}function Ei(t,e,i){const a=["left","right"];const r=["right","left"];const n=["top","bottom"];const o=["bottom","top"];switch(t){case"top":case"bottom":if(i)return e?r:a;return e?a:r;case"left":case"right":return e?n:o;default:return[]}}function Oi(t,e,i,a){const r=Ri(t);let n=Ei(Mi(t),i==="start",a);if(r){n=n.map((t=>t+"-"+r));if(e){n=n.concat(n.map($i))}}return n}function Ni(t){return t.replace(/left|right|bottom|top/g,(t=>wi[t]))}function Wi(t){return{top:0,right:0,bottom:0,left:0,...t}}function Li(t){return typeof t!=="number"?Wi(t):{top:t,right:t,bottom:t,left:t}}function ji(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Pi(t,e,i){let{reference:a,floating:r}=t;const n=Si(e);const o=Ti(e);const s=Ai(o);const c=Mi(e);const l=n==="y";const d=a.x+a.width/2-r.width/2;const h=a.y+a.height/2-r.height/2;const f=a[s]/2-r[s]/2;let u;switch(c){case"top":u={x:d,y:a.y-r.height};break;case"bottom":u={x:d,y:a.y+a.height};break;case"right":u={x:a.x+a.width,y:h};break;case"left":u={x:a.x-r.width,y:h};break;default:u={x:a.x,y:a.y}}switch(Ri(e)){case"start":u[o]-=f*(i&&l?-1:1);break;case"end":u[o]+=f*(i&&l?-1:1);break}return u}const Yi=async(t,e,i)=>{const{placement:a="bottom",strategy:r="absolute",middleware:n=[],platform:o}=i;const s=n.filter(Boolean);const c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:r});let{x:d,y:h}=Pi(l,a,c);let f=a;let u={};let p=0;for(let i=0;it<=0))){var I,M;const t=(((I=n.flip)==null?void 0:I.index)||0)+1;const e=x[t];if(e){return{data:{index:t,overflows:D},reset:{placement:e}}}let i=(M=D.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:M.placement;if(!i){switch(u){case"bestFit":{var R;const t=(R=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:R[0];if(t){i=t}break}case"initialPlacement":i=s;break}}if(r!==i){return{reset:{placement:i}}}}return{}}}};async function _i(t,e){const{placement:i,platform:a,elements:r}=t;const n=await(a.isRTL==null?void 0:a.isRTL(r.floating));const o=Mi(i);const s=Ri(i);const c=Si(i)==="y";const l=["left","top"].includes(o)?-1:1;const d=n&&c?-1:1;const h=Ii(e,t);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};if(s&&typeof p==="number"){u=s==="end"?p*-1:p}return c?{x:u*d,y:f*l}:{x:f*l,y:u*d}}const Ki=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(e){var i,a;const{x:r,y:n,placement:o,middlewareData:s}=e;const c=await _i(e,t);if(o===((i=s.offset)==null?void 0:i.placement)&&(a=s.arrow)!=null&&a.alignmentOffset){return{}}return{x:r+c.x,y:n+c.y,data:{...c,placement:o}}}}};const Vi=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(e){const{x:i,y:a,placement:r}=e;const{mainAxis:n=true,crossAxis:o=false,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...c}=Ii(t,e);const l={x:i,y:a};const d=await Hi(e,c);const h=Si(Mi(r));const f=Ci(h);let u=l[f];let p=l[h];if(n){const t=f==="y"?"top":"left";const e=f==="y"?"bottom":"right";const i=u+d[t];const a=u-d[e];u=Di(i,u,a)}if(o){const t=h==="y"?"top":"left";const e=h==="y"?"bottom":"right";const i=p+d[t];const a=p-d[e];p=Di(i,p,a)}const b=s.fn({...e,[f]:u,[h]:p});return{...b,data:{x:b.x-i,y:b.y-a}}}}};const qi=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(e){const{placement:i,rects:a,platform:r,elements:n}=e;const{apply:o=(()=>{}),...s}=Ii(t,e);const c=await Hi(e,s);const l=Mi(i);const d=Ri(i);const h=Si(i)==="y";const{width:f,height:u}=a.floating;let p;let b;if(l==="top"||l==="bottom"){p=l;b=d===(await(r.isRTL==null?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"}else{b=l;p=d==="end"?"top":"bottom"}const m=u-c[p];const g=f-c[b];const v=!e.middlewareData.shift;let y=m;let k=g;if(h){const t=f-c.left-c.right;k=d||v?gi(g,t):t}else{const t=u-c.top-c.bottom;y=d||v?gi(m,t):t}if(v&&!d){const t=vi(c.left,0);const e=vi(c.right,0);const i=vi(c.top,0);const a=vi(c.bottom,0);if(h){k=f-2*(t!==0||e!==0?t+e:vi(c.left,c.right))}else{y=u-2*(i!==0||a!==0?i+a:vi(c.top,c.bottom))}}await o({...e,availableWidth:k,availableHeight:y});const x=await r.getDimensions(n.floating);if(f!==x.width||u!==x.height){return{reset:{rects:true}}}return{}}}};function Ji(t){if(Xi(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function Gi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Zi(t){var e;return(e=(Xi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xi(t){return t instanceof Node||t instanceof Gi(t).Node}function Qi(t){return t instanceof Element||t instanceof Gi(t).Element}function ta(t){return t instanceof HTMLElement||t instanceof Gi(t).HTMLElement}function ea(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof Gi(t).ShadowRoot}function ia(t){const{overflow:e,overflowX:i,overflowY:a,display:r}=ca(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+i)&&!["inline","contents"].includes(r)}function aa(t){return["table","td","th"].includes(Ji(t))}function ra(t){const e=oa();const i=ca(t);return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":false)||!e&&(i.backdropFilter?i.backdropFilter!=="none":false)||!e&&(i.filter?i.filter!=="none":false)||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function na(t){let e=da(t);while(ta(e)&&!sa(e)){if(ra(e)){return e}else{e=da(e)}}return null}function oa(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function sa(t){return["html","body","#document"].includes(Ji(t))}function ca(t){return Gi(t).getComputedStyle(t)}function la(t){if(Qi(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function da(t){if(Ji(t)==="html"){return t}const e=t.assignedSlot||t.parentNode||ea(t)&&t.host||Zi(t);return ea(e)?e.host:e}function ha(t){const e=da(t);if(sa(e)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ta(e)&&ia(e)){return e}return ha(e)}function fa(t,e,i){var a;if(e===void 0){e=[]}if(i===void 0){i=true}const r=ha(t);const n=r===((a=t.ownerDocument)==null?void 0:a.body);const o=Gi(r);if(n){return e.concat(o,o.visualViewport||[],ia(r)?r:[],o.frameElement&&i?fa(o.frameElement):[])}return e.concat(r,fa(r,[],i))}function ua(t){const e=ca(t);let i=parseFloat(e.width)||0;let a=parseFloat(e.height)||0;const r=ta(t);const n=r?t.offsetWidth:i;const o=r?t.offsetHeight:a;const s=yi(i)!==n||yi(a)!==o;if(s){i=n;a=o}return{width:i,height:a,$:s}}function pa(t){return!Qi(t)?t.contextElement:t}function ba(t){const e=pa(t);if(!ta(e)){return xi(1)}const i=e.getBoundingClientRect();const{width:a,height:r,$:n}=ua(e);let o=(n?yi(i.width):i.width)/a;let s=(n?yi(i.height):i.height)/r;if(!o||!Number.isFinite(o)){o=1}if(!s||!Number.isFinite(s)){s=1}return{x:o,y:s}}const ma=xi(0);function ga(t){const e=Gi(t);if(!oa()||!e.visualViewport){return ma}return{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function va(t,e,i){if(e===void 0){e=false}if(!i||e&&i!==Gi(t)){return false}return e}function ya(t,e,i,a){if(e===void 0){e=false}if(i===void 0){i=false}const r=t.getBoundingClientRect();const n=pa(t);let o=xi(1);if(e){if(a){if(Qi(a)){o=ba(a)}}else{o=ba(t)}}const s=va(n,i,a)?ga(n):xi(0);let c=(r.left+s.x)/o.x;let l=(r.top+s.y)/o.y;let d=r.width/o.x;let h=r.height/o.y;if(n){const t=Gi(n);const e=a&&Qi(a)?Gi(a):a;let i=t;let r=i.frameElement;while(r&&a&&e!==i){const t=ba(r);const e=r.getBoundingClientRect();const a=ca(r);const n=e.left+(r.clientLeft+parseFloat(a.paddingLeft))*t.x;const o=e.top+(r.clientTop+parseFloat(a.paddingTop))*t.y;c*=t.x;l*=t.y;d*=t.x;h*=t.y;c+=n;l+=o;i=Gi(r);r=i.frameElement}}return ji({width:d,height:h,x:c,y:l})}const ka=[":popover-open",":modal"];function xa(t){return ka.some((e=>{try{return t.matches(e)}catch(t){return false}}))}function wa(t){let{elements:e,rect:i,offsetParent:a,strategy:r}=t;const n=r==="fixed";const o=Zi(a);const s=e?xa(e.floating):false;if(a===o||s&&n){return i}let c={scrollLeft:0,scrollTop:0};let l=xi(1);const d=xi(0);const h=ta(a);if(h||!h&&!n){if(Ji(a)!=="body"||ia(o)){c=la(a)}if(ta(a)){const t=ya(a);l=ba(a);d.x=t.x+a.clientLeft;d.y=t.y+a.clientTop}}return{width:i.width*l.x,height:i.height*l.y,x:i.x*l.x-c.scrollLeft*l.x+d.x,y:i.y*l.y-c.scrollTop*l.y+d.y}}function za(t){return Array.from(t.getClientRects())}function Da(t){return ya(Zi(t)).left+la(t).scrollLeft}function Ia(t){const e=Zi(t);const i=la(t);const a=t.ownerDocument.body;const r=vi(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth);const n=vi(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let o=-i.scrollLeft+Da(t);const s=-i.scrollTop;if(ca(a).direction==="rtl"){o+=vi(e.clientWidth,a.clientWidth)-r}return{width:r,height:n,x:o,y:s}}function Ma(t,e){const i=Gi(t);const a=Zi(t);const r=i.visualViewport;let n=a.clientWidth;let o=a.clientHeight;let s=0;let c=0;if(r){n=r.width;o=r.height;const t=oa();if(!t||t&&e==="fixed"){s=r.offsetLeft;c=r.offsetTop}}return{width:n,height:o,x:s,y:c}}function Ra(t,e){const i=ya(t,true,e==="fixed");const a=i.top+t.clientTop;const r=i.left+t.clientLeft;const n=ta(t)?ba(t):xi(1);const o=t.clientWidth*n.x;const s=t.clientHeight*n.y;const c=r*n.x;const l=a*n.y;return{width:o,height:s,x:c,y:l}}function Ca(t,e,i){let a;if(e==="viewport"){a=Ma(t,i)}else if(e==="document"){a=Ia(Zi(t))}else if(Qi(e)){a=Ra(e,i)}else{const i=ga(t);a={...e,x:e.x-i.x,y:e.y-i.y}}return ji(a)}function Aa(t,e){const i=da(t);if(i===e||!Qi(i)||sa(i)){return false}return ca(i).position==="fixed"||Aa(i,e)}function Sa(t,e){const i=e.get(t);if(i){return i}let a=fa(t,[],false).filter((t=>Qi(t)&&Ji(t)!=="body"));let r=null;const n=ca(t).position==="fixed";let o=n?da(t):t;while(Qi(o)&&!sa(o)){const e=ca(o);const i=ra(o);if(!i&&e.position==="fixed"){r=null}const s=n?!i&&!r:!i&&e.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ia(o)&&!i&&Aa(t,o);if(s){a=a.filter((t=>t!==o))}else{r=e}o=da(o)}e.set(t,a);return a}function Ta(t){let{element:e,boundary:i,rootBoundary:a,strategy:r}=t;const n=i==="clippingAncestors"?Sa(e,this._c):[].concat(i);const o=[...n,a];const s=o[0];const c=o.reduce(((t,i)=>{const a=Ca(e,i,r);t.top=vi(a.top,t.top);t.right=gi(a.right,t.right);t.bottom=gi(a.bottom,t.bottom);t.left=vi(a.left,t.left);return t}),Ca(e,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fa(t){const{width:e,height:i}=ua(t);return{width:e,height:i}}function Ba(t,e,i){const a=ta(e);const r=Zi(e);const n=i==="fixed";const o=ya(t,true,n,e);let s={scrollLeft:0,scrollTop:0};const c=xi(0);if(a||!a&&!n){if(Ji(e)!=="body"||ia(r)){s=la(e)}if(a){const t=ya(e,true,n,e);c.x=t.x+e.clientLeft;c.y=t.y+e.clientTop}else if(r){c.x=Da(r)}}const l=o.left+s.scrollLeft-c.x;const d=o.top+s.scrollTop-c.y;return{x:l,y:d,width:o.width,height:o.height}}function $a(t,e){if(!ta(t)||ca(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function Ea(t,e){const i=Gi(t);if(!ta(t)||xa(t)){return i}let a=$a(t,e);while(a&&aa(a)&&ca(a).position==="static"){a=$a(a,e)}if(a&&(Ji(a)==="html"||Ji(a)==="body"&&ca(a).position==="static"&&!ra(a))){return i}return a||na(t)||i}const Oa=async function(t){const e=this.getOffsetParent||Ea;const i=this.getDimensions;return{reference:Ba(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}};function Na(t){return ca(t).direction==="rtl"}const Wa={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Zi,getClippingRect:Ta,getOffsetParent:Ea,getElementRects:Oa,getClientRects:za,getDimensions:Fa,getScale:ba,isElement:Qi,isRTL:Na};function La(t,e){let i=null;let a;const r=Zi(t);function n(){var t;clearTimeout(a);(t=i)==null||t.disconnect();i=null}function o(s,c){if(s===void 0){s=false}if(c===void 0){c=1}n();const{left:l,top:d,width:h,height:f}=t.getBoundingClientRect();if(!s){e()}if(!h||!f){return}const u=ki(d);const p=ki(r.clientWidth-(l+h));const b=ki(r.clientHeight-(d+f));const m=ki(l);const g=-u+"px "+-p+"px "+-b+"px "+-m+"px";const v={rootMargin:g,threshold:vi(0,gi(1,c))||1};let y=true;function k(t){const e=t[0].intersectionRatio;if(e!==c){if(!y){return o()}if(!e){a=setTimeout((()=>{o(false,1e-7)}),100)}else{o(false,e)}}y=false}try{i=new IntersectionObserver(k,{...v,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(k,v)}i.observe(t)}o(true);return n}function ja(t,e,i,a){if(a===void 0){a={}}const{ancestorScroll:r=true,ancestorResize:n=true,elementResize:o=typeof ResizeObserver==="function",layoutShift:s=typeof IntersectionObserver==="function",animationFrame:c=false}=a;const l=pa(t);const d=r||n?[...l?fa(l):[],...fa(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:true});n&&t.addEventListener("resize",i)}));const h=l&&s?La(l,i):null;let f=-1;let u=null;if(o){u=new ResizeObserver((t=>{let[a]=t;if(a&&a.target===l&&u){u.unobserve(e);cancelAnimationFrame(f);f=requestAnimationFrame((()=>{var t;(t=u)==null||t.observe(e)}))}i()}));if(l&&!c){u.observe(l)}u.observe(e)}let p;let b=c?ya(t):null;if(c){m()}function m(){const e=ya(t);if(b&&(e.x!==b.x||e.y!==b.y||e.width!==b.width||e.height!==b.height)){i()}b=e;p=requestAnimationFrame(m)}i();return()=>{var t;d.forEach((t=>{r&&t.removeEventListener("scroll",i);n&&t.removeEventListener("resize",i)}));h==null||h();(t=u)==null||t.disconnect();u=null;if(c){cancelAnimationFrame(p)}}}const Pa=Vi;const Ya=Ui;const Ha=qi;const Ua=(t,e,i)=>{const a=new Map;const r={platform:Wa,...i};const n={...r.platform,_c:a};return Yi(t,e,{...r,platform:n})};const _a='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:flex}:host([hidden]){display:none}cat-input{flex:1 1 auto;margin:0}';const Ka=_a;const Va=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.mode="date";this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.step=5;this.attachToElement=false;this.position=undefined;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.nativePickerAttributes=undefined}get input(){return this._input?.shadowRoot?.querySelector("input")??undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);if(this.mode!=="daterange"||t.includes(" - ")){this.catChange.emit(t)}}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>{this.input?this.input.disabled=this.disabled:null;this.pickr=this.initDatepicker(this.input)}))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onMinChanged(){this.pickr?.set("minDate",this.min);this.pickr?.set("maxDate",this.max);if(this.value&&!this.pickr?.selectedDates?.length){this.pickr?.clear()}}async doFocus(t){this._input?.doFocus(t)}async doBlur(){this._input?.doBlur()}render(){return[e("cat-input",{key:"bb983974c17139ee60d88877e398b1c46d672d37",ref:t=>this._input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.value,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatChange:t=>{t.stopPropagation();this.value=t.detail||undefined},onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.catBlur.emit(t.detail)}},this.hasSlottedLabel&&e("span",{slot:"label"},e("slot",{name:"label"})),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))),e("div",{key:"c8112214544e0582a1196350a846ddeb063067a3",ref:t=>this._calendarWrapper=t,class:"datepicker-wrapper"})]}initDatepicker(t){if(!t){return}const e=!!oi("cat-dropdown",t);const i=e?{"data-dropdown-no-close":""}:{};return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,appendTo:this.attachToElement?this._calendarWrapper:undefined,nativePickerAttributes:{...i,...this.nativePickerAttributes},position:this.attachToElement?(t,e)=>{this.updatePosition(t,e)}:this.position||undefined,onReady:(e,i,a)=>{ja(t,a.calendarContainer,(()=>this.updatePosition(a,a._input)))},applyChange:t=>this.value=t}))}updatePosition(t,e){if(e){Ua(e,t.calendarContainer,{strategy:"fixed",placement:this.position||"bottom-start",middleware:[Ya()]}).then((({x:e,y:i,placement:a})=>{if(t.calendarContainer){t.calendarContainer.dataset.placement=a;Object.assign(t.calendarContainer.style,{left:`${e}px`,top:`${i}px`,position:"fixed"})}}))}}get hostElement(){return a(this)}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}}};Va.style=Ka;const qa='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:inline-flex}:host>div{display:flex}:host([hidden]){display:none}.datepicker-disabled .flatpickr-days,.datepicker-disabled .flatpickr-time,.datepicker-readonly .flatpickr-days,.datepicker-readonly .flatpickr-time{pointer-events:none}.datepicker-disabled .flatpickr-days{opacity:0.75}.datepicker-disabled .flatpickr-time input,.datepicker-disabled .flatpickr-time .flatpickr-time-separator,.datepicker-disabled .flatpickr-time .flatpickr-am-pm{color:rgb(var(--cat-font-color-muted, 81, 92, 108));opacity:0.75}input{display:none}.flatpickr-calendar{box-shadow:unset;background:unset}';const Ja=qa;const Ga=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.disabled=false;this.max=undefined;this.min=undefined;this.mode="date";this.readonly=false;this.step=5;this.value=undefined;this.nativePickerAttributes=undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);this.catChange.emit(t)}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>this.pickr=this.initDatepicker(this.input)))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}render(){return e(i,{key:"6f363a4a673603f0c39f5a24b31bb768e804abfc"},e("div",{key:"2c56934aad4d60ea96a6a3c983ae9d1e39c82bde",tabIndex:this.disabled||this.readonly?-1:undefined,class:{"datepicker-wrapper":true,"datepicker-disabled":this.disabled,"datepicker-readonly":this.readonly}},e("input",{key:"6885c1c919af468401dddda38045ab9a8dc26aaf",ref:t=>this.input=t,value:this.value,disabled:this.disabled,readonly:this.readonly})))}initDatepicker(t){if(!t){return}return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,nativePickerAttributes:this.nativePickerAttributes??{},applyChange:t=>this.value=t},{...this.disabled?{enable:[]}:{},inline:true}))}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}}};Ga.style=Ja;const Za=125; +import{r as t,h as e,H as i,g as a,c as r}from"./p-22f0435a.js";import{e as n,O as o,f as s,E as c,S as l,g as d,h,i as f,j as u,k as p,l as b,m,n as g,p as v,q as y,r as k,s as x,t as w,u as z,a as D,c as I,d as M,o as R}from"./p-2c8ac8cf.js";const C=n((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class A extends o{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new S(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new C}}next(t){s((()=>{this._throwIfClosed();if(!this.isStopped){if(!this.currentObservers){this.currentObservers=Array.from(this.observers)}for(const e of this.currentObservers){e.next(t)}}}))}error(t){s((()=>{this._throwIfClosed();if(!this.isStopped){this.hasError=this.isStopped=true;this.thrownError=t;const{observers:e}=this;while(e.length){e.shift().error(t)}}}))}complete(){s((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:a}=this;if(e||i){return c}this.currentObservers=null;a.push(t);return new l((()=>{this.currentObservers=null;d(a,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:a}=this;if(e){t.error(i)}else if(a){t.complete()}}asObservable(){const t=new o;t.source=this;return t}}A.create=(t,e)=>new S(t,e);class S extends A{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0?void 0:i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0?void 0:i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:c}}const T={now(){return(T.delegate||Date).now()},delegate:undefined};class F extends l{constructor(t,e){super()}schedule(t,e=0){return this}}const B={setInterval(t,e,...i){const{delegate:a}=B;if(a===null||a===void 0?void 0:a.setInterval){return a.setInterval(t,e,...i)}return setInterval(t,e,...i)},clearInterval(t){const{delegate:e}=B;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class $ extends F{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var i;if(this.closed){return this}this.state=t;const a=this.id;const r=this.scheduler;if(a!=null){this.id=this.recycleAsyncId(r,a,e)}this.pending=true;this.delay=e;this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,i=0){return B.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===false){return e}if(e!=null){B.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const i=this._execute(t,e);if(i){return i}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let i=false;let a;try{this.work(t)}catch(t){i=true;a=t?t:new Error("Scheduled action threw falsy error")}if(i){this.unsubscribe();return a}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:i}=e;this.work=this.state=this.scheduler=null;this.pending=false;d(i,this);if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null;super.unsubscribe()}}}class E{constructor(t,e=E.now){this.schedulerActionCtor=t;this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}E.now=T.now;class O extends E{constructor(t,e=E.now){super(t,e);this.actions=[];this._active=false}flush(t){const{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=true;do{if(i=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(i){while(t=e.shift()){t.unsubscribe()}throw i}}}const N=new O($);const W=N;const L=new o((t=>t.complete()));const j=n((t=>function e(){t(this);this.name="EmptyError";this.message="no elements in sequence"}));function P(t){return t instanceof Date&&!isNaN(t)}function Y(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{a.next(t.call(e,i,r++))})))}))}const{isArray:H}=Array;function U(t,e){return H(e)?t(...e):t(e)}function _(t){return Y((e=>U(t,e)))}function K(t,e,i,a,r,n,o,s){const c=[];let l=0;let d=0;let h=false;const b=()=>{if(h&&!c.length&&!l){e.complete()}};const m=t=>l{n&&e.next(t);l++;let s=false;u(i(t,d++)).subscribe(f(e,(t=>{r===null||r===void 0?void 0:r(t);if(n){m(t)}else{e.next(t)}}),(()=>{s=true}),undefined,(()=>{if(s){try{l--;while(c.length&&lg(t)))}else{g(t)}}b()}catch(t){e.error(t)}}})))};t.subscribe(f(e,m,(()=>{h=true;b()})));return()=>{s===null||s===void 0?void 0:s()}}function V(t,e,i=Infinity){if(b(e)){return V(((i,a)=>Y(((t,r)=>e(i,t,a,r)))(u(t(i,a)))),i)}else if(typeof e==="number"){i=e}return h(((e,a)=>K(e,a,t,i)))}function q(t=Infinity){return V(m,t)}function J(){return q(1)}function G(...t){return J()(g(t,v(t)))}const Z=["addListener","removeListener"];const X=["addEventListener","removeEventListener"];const Q=["on","off"];function tt(t,e,i,a){if(b(i)){a=i;i=undefined}if(a){return tt(t,e,i).pipe(_(a))}const[r,n]=rt(t)?X.map((a=>r=>t[a](e,r,i))):it(t)?Z.map(et(t,e)):at(t)?Q.map(et(t,e)):[];if(!r){if(y(t)){return V((t=>tt(t,e,i)))(u(t))}}if(!r){throw new TypeError("Invalid event target")}return new o((t=>{const e=(...e)=>t.next(1n(e)}))}function et(t,e){return i=>a=>t[i](e,a)}function it(t){return b(t.addListener)&&b(t.removeListener)}function at(t){return b(t.on)&&b(t.off)}function rt(t){return b(t.addEventListener)&&b(t.removeEventListener)}function nt(t=0,e,i=W){let a=-1;if(e!=null){if(k(e)){i=e}else{a=e}}return new o((e=>{let r=P(t)?+t-i.now():t;if(r<0){r=0}let n=0;return i.schedule((function(){if(!e.closed){e.next(n++);if(0<=a){this.schedule(undefined,a)}else{e.complete()}}}),r)}))}function ot(...t){const e=v(t);const i=x(t,Infinity);const a=t;return!a.length?L:a.length===1?u(a[0]):q(i)(g(a,e))}function st(t,e){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>t.call(e,i,r++)&&a.next(i))))}))}function ct(t){return h(((e,i)=>{let a=false;let r=null;let n=null;let o=false;const s=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}o&&i.complete()};const c=()=>{n=null;o&&i.complete()};e.subscribe(f(i,(e=>{a=true;r=e;if(!n){u(t(e)).subscribe(n=f(i,s,c))}}),(()=>{o=true;(!a||!n||n.closed)&&i.complete()})))}))}function lt(t,e=N){return ct((()=>nt(t,e)))}function dt(t){return h(((e,i)=>{let a=null;let r=false;let n;a=e.subscribe(f(i,undefined,undefined,(o=>{n=u(t(o,dt(t)(e)));if(a){a.unsubscribe();a=null;n.subscribe(i)}else{r=true}})));if(r){a.unsubscribe();a=null;n.subscribe(i)}}))}function ht(t,e,i,a,r){return(n,o)=>{let s=i;let c=e;let l=0;n.subscribe(f(o,(e=>{const i=l++;c=s?t(c,e,i):(s=true,e);a&&o.next(c)}),r&&(()=>{s&&o.next(c);o.complete()})))}}function ft(t){return h(((e,i)=>{let a=false;let r=null;let n=null;const o=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(a){a=false;const t=r;r=null;i.next(t)}};e.subscribe(f(i,(e=>{n===null||n===void 0?void 0:n.unsubscribe();a=true;r=e;n=f(i,o,w);u(t(e)).subscribe(n)}),(()=>{o();i.complete()}),undefined,(()=>{r=n=null})))}))}function ut(t){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>{if(!a){i.next(t)}i.complete()})))}))}function pt(t){return t<=0?()=>L:h(((e,i)=>{let a=0;e.subscribe(f(i,(e=>{if(++a<=t){i.next(e);if(t<=a){i.complete()}}})))}))}function bt(){return h(((t,e)=>{t.subscribe(f(e,w))}))}function mt(t){return Y((()=>t))}function gt(t,e){if(e){return i=>G(e.pipe(pt(1),bt()),i.pipe(gt(t)))}return V(((e,i)=>u(t(e,i)).pipe(pt(1),mt(e))))}function vt(t,e=N){const i=nt(t,e);return gt((()=>i))}function yt(t,e=m){t=t!==null&&t!==void 0?t:kt;return h(((i,a)=>{let r;let n=true;i.subscribe(f(a,(i=>{const o=e(i);if(n||!t(r,o)){n=false;r=o;a.next(i)}})))}))}function kt(t,e){return t===e}function xt(t=wt){return h(((e,i)=>{let a=false;e.subscribe(f(i,(t=>{a=true;i.next(t)}),(()=>a?i.complete():i.error(t()))))}))}function wt(){return new j}function zt(t,e){const i=arguments.length>=2;return a=>a.pipe(t?st(((e,i)=>t(e,i,a))):m,pt(1),i?ut(e):xt((()=>new j)))}function Dt(t,e){return h(ht(t,e,arguments.length>=2,true))}function It(...t){const e=v(t);return h(((i,a)=>{(e?G(t,i,e):G(t,i)).subscribe(a)}))}function Mt(t,e){return h(((i,a)=>{let r=null;let n=0;let o=false;const s=()=>o&&!r&&a.complete();i.subscribe(f(a,(i=>{r===null||r===void 0?void 0:r.unsubscribe();let o=0;const c=n++;u(t(i,c)).subscribe(r=f(a,(t=>a.next(e?e(i,t,c,o++):t)),(()=>{r=null;s()})))}),(()=>{o=true;s()})))}))}function Rt(t){return h(((e,i)=>{u(t).subscribe(f(i,(()=>i.complete()),w));!i.closed&&e.subscribe(i)}))}function Ct(t,e=false){return h(((i,a)=>{let r=0;i.subscribe(f(a,(i=>{const n=t(i,r++);(n||e)&&a.next(i);!n&&a.complete()})))}))}function At(t,e,i){const a=b(t)||e||i?{next:t,error:e,complete:i}:t;return a?h(((t,e)=>{var i;(i=a.subscribe)===null||i===void 0?void 0:i.call(a);let r=true;t.subscribe(f(e,(t=>{var i;(i=a.next)===null||i===void 0?void 0:i.call(a,t);e.next(t)}),(()=>{var t;r=false;(t=a.complete)===null||t===void 0?void 0:t.call(a);e.complete()}),(t=>{var i;r=false;(i=a.error)===null||i===void 0?void 0:i.call(a,t);e.error(t)}),(()=>{var t,e;if(r){(t=a.unsubscribe)===null||t===void 0?void 0:t.call(a)}(e=a.finalize)===null||e===void 0?void 0:e.call(a)})))})):m}function St(t,e,i){if(!t.hostElement.hasAttribute(e)&&i!=null){t.hostElement.setAttribute(e,String(i))}}const Tt=":host{display:flex;gap:0.5rem;padding:1.25rem;border-radius:var(--cat-border-radius-l, 0.5rem)}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.content{align-self:center;width:100%}::slotted(:last-child){margin-bottom:0 !important}:host([color=primary]){background-color:rgb(var(--cat-primary-bg, 0, 129, 148));color:rgb(var(--cat-primary-fill, 255, 255, 255));--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=secondary]){background-color:rgb(var(--cat-secondary-bg, 105, 118, 135));color:rgb(var(--cat-secondary-fill, 255, 255, 255));--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=info]){background-color:rgb(var(--cat-info-bg, 0, 115, 230));color:rgb(var(--cat-info-fill, 255, 255, 255));--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=success]){background-color:rgb(var(--cat-success-bg, 0, 132, 88));color:rgb(var(--cat-success-fill, 255, 255, 255));--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}:host([color=warning]){background-color:rgb(var(--cat-warning-bg, 255, 206, 128));color:rgb(var(--cat-warning-fill, 0, 0, 0));--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}:host([color=danger]){background-color:rgb(var(--cat-danger-bg, 217, 52, 13));color:rgb(var(--cat-danger-fill, 255, 255, 255));--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}";const Ft=Tt;const Bt=class{constructor(e){t(this,e);this.mapIcon=new Map([["primary","$cat:alert-primary"],["secondary","$cat:alert-secondary"],["info","$cat:alert-info"],["success","$cat:alert-success"],["warning","$cat:alert-warning"],["danger","$cat:alert-danger"]]);this.mapRole=new Map([["primary","status"],["secondary","status"],["info","status"],["success","status"],["warning","alert"],["danger","alert"]]);this.color="primary";this.icon=undefined;this.noIcon=false}connectedCallback(){St(this,"tabindex",0);St(this,"role",this.mapRole.get(this.color))}render(){return e(i,{key:"65e08f5679d761056c71407b03b0b22fb5aa5c94"},!this.noIcon&&e("cat-icon",{size:"l",icon:this.icon||this.mapIcon.get(this.color)}),e("div",{key:"b85309b1867b896244a0cda0ababb2e66ca2d01a",class:"content"},e("slot",{key:"ed88e2f275b189f5ae75ba3220b6f30be36699b4"})))}get hostElement(){return a(this)}};Bt.style=Ft;const $t=t=>new Promise(((e,i)=>{const a=new Image;a.addEventListener("load",e);a.addEventListener("error",i);a.src=t}));const Et=":host{display:contents}:host([hidden]){display:none}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:inherit;color:var(--cat-avatar-fill, #515c6c);background-color:var(--cat-avatar-bg, #f2f4f7);background-size:cover;background-position:center;white-space:nowrap;overflow:hidden;vertical-align:middle;font-weight:600;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.avatar:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.avatar-round{border-radius:50%}.avatar-xs{width:var(--cat-avatar-size, 1.5rem);height:var(--cat-avatar-size, 1.5rem);line-height:var(--cat-avatar-size, 1.5rem);font-size:var(--cat-avatar-font-size, 0.75rem)}.avatar-s{width:var(--cat-avatar-size, 2rem);height:var(--cat-avatar-size, 2rem);line-height:var(--cat-avatar-size, 2rem);font-size:var(--cat-avatar-font-size, 0.875rem)}.avatar-m{width:var(--cat-avatar-size, 2.5rem);height:var(--cat-avatar-size, 2.5rem);line-height:var(--cat-avatar-size, 2.5rem);font-size:var(--cat-avatar-font-size, 0.9375rem)}.avatar-l{width:var(--cat-avatar-size, 3rem);height:var(--cat-avatar-size, 3rem);line-height:var(--cat-avatar-size, 3rem);font-size:var(--cat-avatar-font-size, 1.125rem)}.avatar-xl{width:var(--cat-avatar-size, 3.5rem);height:var(--cat-avatar-size, 3.5rem);line-height:var(--cat-avatar-size, 3.5rem);font-size:var(--cat-avatar-font-size, 1.25rem)}";const Ot=Et;const Nt=class{constructor(e){t(this,e);this.backgroundImage=undefined;this.size="m";this.round=false;this.label="";this.initials=undefined;this.src=undefined;this.icon=undefined;this.url=undefined;this.urlTarget=undefined}onSrcChanged(t){if(t){$t(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}componentWillRender(){if(!this.label){z.warn("[A11y] Missing ARIA label on avatar",this)}}render(){if(this.url){return e("a",{href:this.url,target:this.urlTarget,style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}else{return e("span",{style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}}get content(){return!this.backgroundImage?[this.icon?e("cat-icon",{icon:this.icon,size:this.size}):this.getInitials()]:[]}get cssStyle(){return{"background-image":this.backgroundImage}}get cssClass(){return{avatar:true,"avatar-round":this.round,[`avatar-${this.size}`]:Boolean(this.size)}}getInitials(){return this.initials??(this.label??"").split(" ").map((t=>t[0])).join("")}static get watchers(){return{src:["onSrcChanged"]}}};Nt.style=Ot;const Wt=":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;color:rgb(var(--text));box-shadow:inset 0 0 0 1px rgba(var(--text), 0.2)}:host([color=primary]){--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148)}:host([color=secondary]){--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0)}:host([color=info]){--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230)}:host([color=success]){--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88)}:host([color=warning]){--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0)}:host([color=danger]){--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--text), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--text), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--text), 0.2)}}";const Lt=Wt;const jt=class{constructor(e){t(this,e);this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false}render(){return e("slot",{key:"8254c840d9f008183db57fc58dd3a092c7a0378c"})}get hostElement(){return a(this)}};jt.style=Lt;const Pt=["xs","s","m","l","xl"];const Yt={xs:"(max-width: 539.98px)",s:"(max-width: 767.98px)",m:"(max-width: 991.98px)",l:"(max-width: 1199.98px)",xl:"(max-width: 1399.98px)"};function Ht(t){return typeof t==="string"&&Pt.includes(t)}let Ut;try{Ut=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch{Ut=false}class _t{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||Ut)&&typeof CSS!=="undefined"&&!this.EDGE&&!this.TRIDENT;this.WEBKIT=/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;this.IOS=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);this.FIREFOX=/(firefox|minefield)/i.test(navigator.userAgent);this.ANDROID=/android/i.test(navigator.userAgent)&&!this.TRIDENT;this.SAFARI=/safari/i.test(navigator.userAgent)&&this.WEBKIT}}const Kt=new Set;let Vt;class qt{constructor(){this._platform=new _t;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){Jt(t)}return this._matchMedia(t)}}function Jt(t){if(Kt.has(t)){return}try{if(!Vt){Vt=document.createElement("style");Vt.setAttribute("type","text/css");document.head.appendChild(Vt)}if(Vt.sheet){Vt.sheet.insertRule(`@media ${t} {body{ }}`,0);Kt.add(t)}}catch(t){z.error(t)}}const Gt=':host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 125ms linear, border-color 125ms linear, background-color 125ms linear, box-shadow 125ms linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{display:flex;flex-direction:column;min-width:0}.cat-button-content-inner{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content-inner{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:var(--cat-font-weight-button, 600);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-link{background-color:transparent;color:rgb(var(--text))}.cat-button-link.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-link:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-link.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-decoration-hover, underline)}.cat-button-primary{--bg:var(--cat-primary-bg, 0, 129, 148);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 0, 129, 148);--base:var(--cat-primary-text, 0, 129, 148)}.cat-button-primary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-hover, 1, 115, 132);--fill:var(--cat-primary-fill-hover, 255, 255, 255);--text:var(--cat-primary-text-hover, 1, 115, 132)}.cat-button-primary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-primary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-primary-bg-active, 2, 99, 113);--fill:var(--cat-primary-fill-active, 255, 255, 255);--text:var(--cat-primary-text-active, 2, 99, 113)}.cat-button-secondary{--bg:var(--cat-secondary-bg, 105, 118, 135);--fill:var(--cat-secondary-fill, 255, 255, 255);--text:var(--cat-secondary-text, 0, 0, 0);--base:var(--cat-secondary-bg, 105, 118, 135)}.cat-button-secondary:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-hover, 105, 118, 135);--fill:var(--cat-secondary-fill-hover, 255, 255, 255);--text:var(--cat-secondary-text-hover, 0, 0, 0)}.cat-button-secondary.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-secondary:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-secondary-bg-active, 105, 118, 135);--fill:var(--cat-secondary-fill-active, 255, 255, 255);--text:var(--cat-secondary-text-active, 0, 0, 0)}.cat-button-info{--bg:var(--cat-info-bg, 0, 115, 230);--fill:var(--cat-info-fill, 255, 255, 255);--text:var(--cat-info-text, 0, 115, 230);--base:var(--cat-info-text, 0, 115, 230)}.cat-button-info:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-hover, 0, 107, 227);--fill:var(--cat-info-fill-hover, 255, 255, 255);--text:var(--cat-info-text-hover, 0, 107, 227)}.cat-button-info.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-info:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-info-bg-active, 0, 96, 223);--fill:var(--cat-info-fill-active, 255, 255, 255);--text:var(--cat-info-text-active, 0, 96, 223)}.cat-button-success{--bg:var(--cat-success-bg, 0, 132, 88);--fill:var(--cat-success-fill, 255, 255, 255);--text:var(--cat-success-text, 0, 132, 88);--base:var(--cat-success-text, 0, 132, 88)}.cat-button-success:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-hover, 0, 117, 78);--fill:var(--cat-success-fill-hover, 255, 255, 255);--text:var(--cat-success-text-hover, 0, 117, 78)}.cat-button-success.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-success:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-success-bg-active, 0, 105, 70);--fill:var(--cat-success-fill-active, 255, 255, 255);--text:var(--cat-success-text-active, 0, 105, 70)}.cat-button-warning{--bg:var(--cat-warning-bg, 255, 206, 128);--fill:var(--cat-warning-fill, 0, 0, 0);--text:var(--cat-warning-text, 159, 97, 0);--base:var(--cat-warning-text, 159, 97, 0)}.cat-button-warning:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-hover, 255, 214, 148);--fill:var(--cat-warning-fill-hover, 0, 0, 0);--text:var(--cat-warning-text-hover, 159, 97, 0)}.cat-button-warning.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-warning:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-warning-bg-active, 255, 222, 168);--fill:var(--cat-warning-fill-active, 0, 0, 0);--text:var(--cat-warning-text-active, 159, 97, 0)}.cat-button-danger{--bg:var(--cat-danger-bg, 217, 52, 13);--fill:var(--cat-danger-fill, 255, 255, 255);--text:var(--cat-danger-text, 217, 52, 13);--base:var(--cat-danger-text, 217, 52, 13)}.cat-button-danger:hover:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-hover, 194, 46, 11);--fill:var(--cat-danger-fill-hover, 255, 255, 255);--text:var(--cat-danger-text-hover, 194, 46, 11)}.cat-button-danger.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),.cat-button-danger:active:not(.cat-button-disabled):not(.cat-button-loading){--bg:var(--cat-danger-bg-active, 174, 42, 10);--fill:var(--cat-danger-fill-active, 255, 255, 255);--text:var(--cat-danger-text-active, 174, 42, 10)}:host(.cat-button-pull:not([size])){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h:not([size])){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v:not([size])){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t:not([size])){margin-top:-0.625rem}:host(.cat-button-pull-l:not([size])){margin-left:-0.75rem}:host(.cat-button-pull-b:not([size])){margin-bottom:-0.625rem}:host(.cat-button-pull-r:not([size])){margin-right:-0.75rem}.cat-button-xs{min-width:1.5rem;padding:0.1875rem 0.25rem;font-size:0.875rem;line-height:1.125rem;gap:0.25rem}.cat-button-xs.cat-button-icon{width:1.5rem;height:1.5rem;padding:0}:host(.cat-button-pull[size=xs]){margin:-0.1875rem -0.25rem}:host(.cat-button-pull-h[size=xs]){margin-left:-0.25rem;margin-right:-0.25rem}:host(.cat-button-pull-v[size=xs]){margin-top:-0.1875rem;margin-bottom:-0.1875rem}:host(.cat-button-pull-t[size=xs]){margin-top:-0.1875rem}:host(.cat-button-pull-l[size=xs]){margin-left:-0.25rem}:host(.cat-button-pull-b[size=xs]){margin-bottom:-0.1875rem}:host(.cat-button-pull-r[size=xs]){margin-right:-0.25rem}.cat-button-s{min-width:2rem;padding:0.375rem 0.5rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-s cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-s.cat-button-icon{width:2rem;height:2rem;padding:0}:host(.cat-button-pull[size=s]){margin:-0.375rem -0.5rem}:host(.cat-button-pull-h[size=s]){margin-left:-0.5rem;margin-right:-0.5rem}:host(.cat-button-pull-v[size=s]){margin-top:-0.375rem;margin-bottom:-0.375rem}:host(.cat-button-pull-t[size=s]){margin-top:-0.375rem}:host(.cat-button-pull-l[size=s]){margin-left:-0.5rem}:host(.cat-button-pull-b[size=s]){margin-bottom:-0.375rem}:host(.cat-button-pull-r[size=s]){margin-right:-0.5rem}.cat-button-m{min-width:2.5rem;padding:0.625rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-m cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-m.cat-button-icon{width:2.5rem;height:2.5rem;padding:0}:host(.cat-button-pull[size=m]){margin:-0.625rem -0.75rem}:host(.cat-button-pull-h[size=m]){margin-left:-0.75rem;margin-right:-0.75rem}:host(.cat-button-pull-v[size=m]){margin-top:-0.625rem;margin-bottom:-0.625rem}:host(.cat-button-pull-t[size=m]){margin-top:-0.625rem}:host(.cat-button-pull-l[size=m]){margin-left:-0.75rem}:host(.cat-button-pull-b[size=m]){margin-bottom:-0.625rem}:host(.cat-button-pull-r[size=m]){margin-right:-0.75rem}.cat-button-l{min-width:3rem;padding:0.875rem 1rem;font-size:0.9375rem;line-height:1.25rem;gap:0.25rem}.cat-button-l cat-icon{margin-top:-0.125rem;margin-bottom:-0.125rem}.cat-button-l.cat-button-icon{width:3rem;height:3rem;padding:0}:host(.cat-button-pull[size=l]){margin:-0.875rem -1rem}:host(.cat-button-pull-h[size=l]){margin-left:-1rem;margin-right:-1rem}:host(.cat-button-pull-v[size=l]){margin-top:-0.875rem;margin-bottom:-0.875rem}:host(.cat-button-pull-t[size=l]){margin-top:-0.875rem}:host(.cat-button-pull-l[size=l]){margin-left:-1rem}:host(.cat-button-pull-b[size=l]){margin-bottom:-0.875rem}:host(.cat-button-pull-r[size=l]){margin-right:-1rem}.cat-button-xl{min-width:3.5rem;padding:1rem 1.25rem;font-size:1.125rem;line-height:1.5rem;gap:0.25rem}.cat-button-xl.cat-button-icon{width:3.5rem;height:3.5rem;padding:0}:host(.cat-button-pull[size=xl]){margin:-1rem -1.25rem}:host(.cat-button-pull-h[size=xl]){margin-left:-1.25rem;margin-right:-1.25rem}:host(.cat-button-pull-v[size=xl]){margin-top:-1rem;margin-bottom:-1rem}:host(.cat-button-pull-t[size=xl]){margin-top:-1rem}:host(.cat-button-pull-l[size=xl]){margin-left:-1.25rem}:host(.cat-button-pull-b[size=xl]){margin-bottom:-1rem}:host(.cat-button-pull-r[size=xl]){margin-right:-1.25rem}:host(.cat-tab)::part(button){padding:1.125rem 0.75rem;--cat-secondary-bg:transparent;--cat-primary-text:transparent;--cat-danger-text:transparent}:host(.cat-tab)::part(content)::before{content:attr(data-text);content:attr(data-text)/"";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:700}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;justify-content:left;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}:host(.cat-time-format) .cat-button{border-radius:0}:host(.cat-date-toggle) .cat-button,:host(.cat-time-toggle) .cat-button{margin-left:-1px;border-top-left-radius:0;border-bottom-left-radius:0}:host(.cat-date-item) .cat-button:hover,:host(.cat-date-toggle) .cat-button:hover,:host(.cat-time-format) .cat-button:hover,:host(.cat-time-toggle) .cat-button:hover{z-index:1}:host(.cat-date-item) .cat-button:focus-visible,:host(.cat-date-toggle) .cat-button:focus-visible,:host(.cat-time-format) .cat-button:focus-visible,:host(.cat-time-toggle) .cat-button:focus-visible{z-index:2}:host(.cat-date-item) .cat-button{padding:0;min-width:2rem;max-height:3rem;aspect-ratio:1}:host(.date-start:not(.date-end)) .cat-button{border-top-right-radius:0;border-bottom-right-radius:0}:host(.date-end:not(.date-start)) .cat-button{border-top-left-radius:0;border-bottom-left-radius:0}';const Zt=Gt;const Xt=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._iconOnly=true;this.variant="outlined";this.color="secondary";this.active=false;this.size="m";this.name=undefined;this.value=undefined;this.disabled=false;this.loading=false;this.submit=false;this.noEllipsis=false;this.round=false;this.url=undefined;this.urlTarget=undefined;this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.buttonId=undefined;this.a11yLabel=undefined;this.a11yCurrent=undefined;this.nativeAttributes=undefined;this.nativeContentAttributes=undefined;this.buttonGroupPosition=undefined}onIconOnlyChanged(t){this.mediaQueryList?.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(Ht(t)){this.mediaMatcher??(this.mediaMatcher=new qt);this.mediaQueryList=this.mediaMatcher.matchMedia(Yt[t]);this.mediaQueryListener=t=>this._iconOnly=t.matches;this.mediaQueryList.addEventListener("change",this.mediaQueryListener);this._iconOnly=this.mediaQueryList.matches}else{this._iconOnly=t}}componentWillLoad(){this.onIconOnlyChanged(this.iconOnly)}componentWillRender(){if(this.isIconButton&&!this.a11yLabel){z.warn("[A11y] Missing ARIA label on icon button",this)}}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){if(this.url){return e("a",{...this.nativeAttributes,ref:t=>this.button=t,href:this.disabled?undefined:this.url,target:this.urlTarget,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}else{return e("button",{...this.nativeAttributes,ref:t=>this.button=t,type:this.submit?"submit":"button",name:this.name,value:this.value,disabled:this.disabled,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round??this.isIconButton,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size),[`cat-group-button-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition),"cat-group-button":Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}}get iconSize(){switch(this.size){case"xs":return"s";default:return"l"}}get spinnerSize(){switch(this.size){case"xs":return"xs";default:return"m"}}get isIconButton(){return Boolean(this.icon)&&this._iconOnly}get hasPrefixIcon(){return Boolean(this.icon)&&!this._iconOnly&&!this.iconRight}get hasSuffixIcon(){return Boolean(this.icon)&&!this._iconOnly&&this.iconRight}get content(){return[this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconButton?e("cat-icon",{icon:this.icon,size:this.iconSize}):e("span",{class:"cat-button-content",part:"content",...this.nativeContentAttributes},e("span",{class:"cat-button-content-inner"},e("slot",null))),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"suffix"}):null,this.loading?e("cat-spinner",{size:this.spinnerSize}):null]}onClick(t){this.catClick.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Xt.style=Zt;const Qt=":host{position:relative;display:inline-flex;vertical-align:middle}::slotted(cat-button[variant=outlined]),::slotted(cat-button:not([variant])){margin-right:-1px}::slotted(cat-button[variant=outlined]:last-child),::slotted(cat-button:not([variant]):last-child){margin-right:0}";const te=Qt;const ee=class{constructor(e){t(this,e);this.formElements=[];this.a11yLabel=undefined}render(){return e(i,{key:"736974e0eb79714f8718e90cb4b533cff13e123f",role:"group","aria-label":this.a11yLabel},e("slot",{key:"7894f468e3e265b67b7eb1c670966d4b55c97ce2",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-button"));this.formElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.formElements.length-1?"last":"middle"}))}get hostElement(){return a(this)}};ee.style=te;const ie=":host{display:block;border-radius:var(--cat-border-radius-l, 0.5rem);background-color:white;padding:1.25rem}:host([hidden]){display:none}::slotted(:last-child){margin-bottom:0 !important}::slotted(nav),::slotted(nav:last-child){margin:-1rem -1rem !important}::slotted(.cat-card-pull){margin:-1.25rem !important;width:calc(100% + 2.5rem) !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-h){margin-left:-1.25rem !important;margin-right:-1.25rem !important;width:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-v){margin-top:-1.25rem !important;margin-bottom:-1.25rem !important;height:calc(100% + 2.5rem) !important}::slotted(.cat-card-pull-t){margin-top:-1.25rem !important}::slotted(.cat-card-pull-l){margin-left:-1.25rem !important}::slotted(.cat-card-pull-r){margin-right:-1.25rem !important}::slotted(.cat-card-pull-b){margin-bottom:-1.25rem !important}";const ae=ie;const re=class{constructor(e){t(this,e);this.catLoad=r(this,"catLoad",7)}render(){return e("slot",{key:"7c606bbb0c69502b495cde09b987f232f52391fe"})}componentDidLoad(){this.catLoad.emit()}};re.style=ae;const ne=t=>{const{id:i,hint:a,slottedHint:r,errorMap:n}=t;const o=Object.entries(n||{});return e("div",{"aria-live":"polite",id:i+"-hint",class:"hint-section"},o.length?o.map((([i,a])=>e("p",{class:(t.class??"")+" input-hint cat-text-danger"},D.t(`error.${i}`,a)))):[a&&(Array.isArray(a)?a.map((i=>e("p",{class:(t.class??"")+" input-hint"},i))):e("p",{class:(t.class??"")+" input-hint"},a)),r])};const oe=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none;box-sizing:border-box}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const se=oe;let ce=0;const le=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-checkbox-${ce++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.indeterminate=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on checkbox",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"4717606c6860aa834b0be517a990e7c9b3d12ca4"},e("label",{key:"f10b076bce44f869fac2ba524c9b84a9d35540d4",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"9c1ce8476f5336e1bda998998233f1576fa04304",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,indeterminate:this.indeterminate,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"54bfdef569a5653d8cf49c8138907e17525f282e",class:"box","aria-hidden":"true"},e("svg",{key:"cdd7a17cbd71c788af281f83f936cae6f8ce7e52",class:"check",viewBox:"0 0 12 10"},e("polyline",{key:"ee39ce12ece8d32ad5aca05183ab43b49ca278c7",points:"1.5 6 4.5 9 10.5 1"})),e("svg",{key:"5593c28f8cd548031d6b3823e9491a4bcc8246e3",class:"dash",viewBox:"0 0 12 10"},e("polyline",{key:"49e30776717be8566e6a135bf791918a93a6f429",points:"1.5 5 10.5 5"}))),e("span",{key:"4461a4d9e42548e5acea1e991b044f7b135f9b67",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"box-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.indeterminate=this.input.indeterminate;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};le.style=se;function de(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function he(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function fe(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return{firstDay:i?.firstDay??1,minDays:i?.minDays??4,weekend:i?.weekend??[6,7]}}function ue(t){const e=new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(3456,10,22)).replace("3456","YYYY").replace("56","YY").replace("11","MM").replace("22","DD");return/^(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)\W(YYYY|YY|MM|DD)$/.test(e)?e:"DD-MM-YYYY"}function pe(t){return{prevYear:D.t("datepicker.prevYear"),nextYear:D.t("datepicker.nextYear"),prevMonth:D.t("datepicker.prevMonth"),nextMonth:D.t("datepicker.nextMonth"),arrowKeys:D.t("datepicker.arrowKeys"),today:D.t("datepicker.today"),change:D.t("datepicker.change"),choose:D.t("datepicker.choose"),clear:D.t("datepicker.clear"),formatStr:ue(t),weekInfo:fe(t),days:{short:de(t,"short"),long:de(t,"long")},months:{short:he(t,"short"),long:he(t,"long")},now:()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fromLocalISO:t=>{const[e,i,a,r]=t?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return e?new Date(Number(i),Number(a)-1,Number(r)):null},toLocalISO:t=>{const e=t.getFullYear();const i=(t.getMonth()+1).toString().padStart(2,"0");const a=t.getDate().toString().padStart(2,"0");return`${e}-${i}-${a}`},toLocalStr:e=>new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric",weekday:"long"}).format(e)}}function be(t){return t%4===0&&t%100!==0||t%400===0}function me(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function ge(t,e){const[i,a,r]=[t.getFullYear(),t.getMonth(),t.getDate()];const n=[31,be(i)?29:28,31,30,31,30,31,31,30,31,30,31];const o=new Date(t);o.setDate(1);o.setMonth(o.getMonth()+e);o.setDate(Math.min(r,n[(a+e%12+12)%12]));return o}function ve(t,e){return!!t&&!!e&&t.getFullYear()===e.getFullYear()}function ye(t,e){return!!t&&!!e&&t.getMonth()===e.getMonth()&&ve(t,e)}function ke(t,e){return!!t&&!!e&&t.getDate()===e.getDate()&&ye(t,e)}function xe(t,e,i){return new Date(Math.min(Math.max(e.getTime(),t?.getTime()??-Infinity),i?.getTime()??Infinity))}const we=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}cat-date-inline{margin:1rem;width:20rem}";const ze=we;const De=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=pe(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end"}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}get inputValue(){const[t,e,i,a]=this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];if(t){const t=new Date(Number(e),Number(i)-1,Number(a));const r=new Intl.DateTimeFormat(this.language,{year:"numeric",month:"2-digit",day:"2-digit"});return r.format(t)}return""}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){const t=this.locale.formatStr.replace("YYYY","Y").replace("YY","y").replace("MM","m").replace("DD","d");const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(t)||[];this.input?.mask({date:true,dateMin:this.min,dateMax:this.max,delimiter:i,datePattern:[e,a,r]})}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"d588c96f031fc8ab9518d13dfaac730a0d424caa"},e("cat-input",{key:"f49f0682e2f2fe3dfcd89477bda91fe46ed44dfa",class:"cat-date-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,value:this.inputValue,onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.onInputBlur(t.detail)}},e("span",{key:"68ef0708d25128b9a52d60c5b1a7b34e0ffb2ef1",slot:"label"},this.label,e("span",{key:"ac017335567a4e0059631e7535455d52f61f2e43",class:"label-aria"}," (",this.locale.formatStr,")")),e("cat-dropdown",{key:"16a6e95f6e4f6a9b0ddd7716f0b713c8fac3fdff",slot:"addon",placement:this.placement,arrowNavigation:"none",noResize:true,onCatOpen:()=>this.dateInline?.resetView()},e("cat-button",{key:"cf7f2aaa2c5775b23f3e8826e9b0e722c4ce8be6",slot:"trigger",icon:"$cat:datepicker-calendar",iconOnly:true,class:"cat-date-toggle",disabled:this.disabled,a11yLabel:this.getTriggerA11yLabel()}),e("div",{key:"f90eef976a3102855801df5ffeee770d45e7eaba",slot:"content"},e("cat-date-inline",{key:"2a0ee2889e1077a6e403458bd3e114396590d0ed",ref:t=>this.dateInline=t,min:this.min,max:this.max,value:this.value,hint:true,weeks:true,noClear:true,onCatChange:this.onDateChange.bind(this)})))))}getTriggerA11yLabel(){const t=this.locale.fromLocalISO(this.value);return t?`${this.locale.change}, ${this.locale.toLocalStr(t)}`:this.locale.choose}onInputBlur(t){if(!this.input){return}const e=this.value;const i=this.parse(this.input.value??"");const a=this.locale.fromLocalISO(this.min);const r=this.locale.fromLocalISO(this.max);const n=i?xe(a,i,r):null;this.value=n?this.locale.toLocalISO(n):undefined;if(e!==this.value){if(n){this.dateInline?.select(n)}else{this.dateInline?.clear()}this.catChange.emit(this.value)}this.input.value=this.inputValue;this.catBlur.emit(t)}onDateChange(t){t.stopPropagation();const e=this.value;const i=t.detail?new Date(t.detail):null;this.value=i?this.locale.toLocalISO(i):undefined;if(e!==this.value){this.catChange.emit(this.value)}}parse(t){const[,e,i,a,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr)||[];const n=[e,a,r];const o=t.split(i).map((t=>Number(t||"x")));let s=o[n.indexOf("YYYY")||n.indexOf("YY")]||this.locale.now().getFullYear();const c=o[n.indexOf("MM")];const l=o[n.indexOf("DD")];if(!Number.isInteger(c)||!Number.isInteger(l)){return null}else if(s<100){s+=s<50?2e3:1900}return new Date(s,c-1,l)}reclamp(t,e){const i=this.value;const a=this.locale.fromLocalISO(i);const r=this.locale.fromLocalISO(e);if(!a||!r){return}const n=xe(t==="min"?r:null,a,t==="max"?r:null);const o=this.locale.toLocalISO(n);if(i!==o){this.value=o;this.catChange.emit(o)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};De.style=ze;const Ie='/**\n * Auto-generated file. Do not edit directly.\n */\n/* stylelint-disable value-keyword-case */\n/* stylelint-enable value-keyword-case */\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n}\n.picker-head > :not(:last-child) {\n margin-right: 0.25rem;\n}\n.picker-head h3 {\n font-size: 0.9375rem;\n line-height: 1.25rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: "pnum";\n flex: 1;\n text-align: center;\n margin-block: 0;\n}\n@container (min-width: 20rem) {\n .picker-head h3 {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: "pnum";\n }\n .picker-head > :not(:last-child) {\n margin-right: 0.5rem;\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas: "h h h h h h h" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d" "d d d d d d d";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n.picker-weeks .picker-grid {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas: ". h h h h h h h" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d" "w d d d d d d d";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 600;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n}\n.picker-foot > :not(:last-child) {\n margin-right: 0.25rem;\n}\n@container (min-width: 20rem) {\n .picker-foot > :not(:last-child) {\n margin-right: 0.5rem;\n }\n .picker-foot .cursor-help {\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: var(--cat-font-weight-body, 400);\n }\n}\n\n.cursor-help {\n margin-block: 0;\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: var(--cat-font-weight-body, 400);\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-align: center;\n flex: 1;\n}\n.cursor-help:first-child {\n text-align: left;\n}\n.cursor-help:last-child {\n text-align: right;\n}\n.cursor-help:only-child {\n text-align: center;\n}\n\n.cursor-aria {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}';const Me=Ie;const Re=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.language=D.getLocale();this.locale=pe(this.language);this.focusDate=null;this.viewDate=this.locale.now();this.noClear=false;this.hint=false;this.noToday=false;this.weeks=false;this.min=undefined;this.max=undefined;this.range=false;this.value=undefined}get focusedDate(){const[t,e,i,a]=this.hostElement.shadowRoot?.querySelector(`[data-date]:focus`)?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return t?new Date(Number(e),Number(i)-1,Number(a)):null}componentWillLoad(){const[t,e]=this.getValue();if(e){this.focus(e)}else if(t){this.focus(t)}}componentDidRender(){if(this.focusDate){this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus();this.focusDate=null}}onKeyDown(t){if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){return}const e=this.focusedDate;if(!e){t.preventDefault();const[e]=this.getValue();this.focus(e||this.locale.now())}else if(t.key==="ArrowLeft"){t.preventDefault();this.focus(t.shiftKey?ge(e,-1):me(e,-1))}else if(t.key==="ArrowRight"){t.preventDefault();this.focus(t.shiftKey?ge(e,1):me(e,1))}else if(t.key==="ArrowUp"){t.preventDefault();this.focus(me(e,-7))}else if(t.key==="ArrowDown"){t.preventDefault();this.focus(me(e,7))}}async select(t){if(!t){return this.clear()}const e=this.value;const[i,a]=this.getMinMaxDate();const r=xe(i,new Date(t.getFullYear(),t.getMonth(),t.getDate()),a);this.focus(r);if(this.range){const[t,e]=this.getValue();if(!t||e||rthis.navigate("prev","year"),"data-dropdown-no-close":true}),e("cat-button",{key:"90e7420d4bc9c474d322d303413bc7e0bc4ac33d",icon:"$cat:datepicker-month-prev",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.prevMonth,disabled:ye(this.viewDate,t),onClick:()=>this.navigate("prev","month"),"data-dropdown-no-close":true}),e("h3",{key:"e6a39d6e56a360a14bd5db15d53d12b5743071fc"},this.getHeadline()),e("cat-button",{key:"18bbfccbef72377967d96d1481196a0dfd1297fb",icon:"$cat:datepicker-month-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextMonth,disabled:ye(this.viewDate,a),onClick:()=>this.navigate("next","month"),"data-dropdown-no-close":true}),e("cat-button",{key:"e0773fe064c5b70a59437b388e9c4877a4ff66cd",icon:"$cat:datepicker-year-next",iconOnly:true,size:"xs",variant:"text","a11y-label":this.locale.nextYear,disabled:ve(this.viewDate,a),onClick:()=>this.navigate("next","year"),"data-dropdown-no-close":true})),e("div",{key:"f6d969e0cbfc0700f3db9931ab8087ea9cab9c30",class:"picker-grid",onFocusin:()=>this.setAriaLive(this.locale.arrowKeys)},e("div",{key:"ecf39be602c6538f97ccbea7d5060c8e4b0b7f9f",class:"picker-grid-head"},Array.from(Array(7),((t,i)=>{const a=(i+this.locale.weekInfo.firstDay)%7;return e("abbr",{title:this.locale.days.long[a]},this.locale.days.short[a])}))),this.weeks&&e("div",{class:"picker-grid-weeks"},r.filter(((t,e)=>e%7===0)).map((t=>e("div",null,this.getWeekNumber(t))))),e("div",{key:"ce3f468736a76aa772bd2f16ea407a4a890fd02c",class:"picker-grid-days"},r.map((t=>{const i=ke(n,t);const a=ke(o,t);const r=!!n&&!!o&&t>n&&tthis.select(t),"data-date":this.locale.toLocalISO(t)},t.getDate())})))),e("div",{key:"3c542e87fed7a18360871f0bc9b96658c6e6cfeb",class:"picker-foot"},!this.noToday&&this.canClick(this.locale.now())&&e("cat-button",{size:"s","data-dropdown-no-close":true,onClick:()=>this.select(this.locale.now())},this.locale.today),this.hint&&e("p",{class:"cursor-help"},this.locale.arrowKeys),!this.noClear&&e("cat-button",{size:"s",disabled:!this.value,"data-dropdown-no-close":true,onClick:()=>this.clear()},this.locale.clear))),e("p",{key:"f90c2947cdf67dc7a2bed883884133df2cc79380",class:"cursor-aria","aria-live":"polite"}))}focus(t){const[e,i]=this.getMinMaxDate();this.focusDate=xe(e,t,i);this.viewDate=new Date(this.focusDate.getFullYear(),this.focusDate.getMonth());this.hostElement.shadowRoot?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)?.doFocus()}navigate(t,e){this.viewDate=new Date(t==="prev"?e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()-1):this.viewDate.setMonth(this.viewDate.getMonth()-1):e==="year"?this.viewDate.setFullYear(this.viewDate.getFullYear()+1):this.viewDate.setMonth(this.viewDate.getMonth()+1));this.setAriaLive(this.getHeadline())}setAriaLive(t){const e=this.hostElement.shadowRoot?.querySelector(".cursor-aria");if(e){e.innerHTML=t}}dateGrid(t,e){const i=(new Date(t,e,1).getDay()-this.locale.weekInfo.firstDay+7)%7;const a=new Date(t,e+1,0).getDate();const r=[...Array(a).keys()];const n=this.getLastDaysOfMonth(t,e,i);const o=[...Array(42-r.length-n.length).keys()];return[...n.map((i=>new Date(t,e-1,i+1))),...r.map((i=>new Date(t,e,i+1))),...o.map((i=>new Date(t,e+1,i+1)))]}getLastDaysOfMonth(t,e,i){const a=new Date(t,e,0).getDate();const r=Array.from({length:a},((t,e)=>e));return i?r.slice(-i):[]}getHeadline(){return`${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`}getWeekNumber(t,e=true){const i=new Date(t.getTime());const a=e?i.getDay()||7:i.getDay();i.setDate(i.getDate()+4-a);const r=new Date(i.getFullYear(),0,1);return Math.ceil(((+i-+r)/864e5+1)/7)}canFocus(t){const e=this.locale.now();const[i]=this.getMinMaxDate();const a=this.focusedDate;const[r]=this.getValue();if(a&&ye(a,this.viewDate)){return ye(a,t)&&ke(a,t)}else if(r&&ye(r,this.viewDate)){return ye(r,t)&&ke(r,t)}else if(ye(this.viewDate,e)&&(!i||i<=e)){return ye(this.viewDate,t)&&ke(e,t)}const n=ye(t,i)?i?.getDate()??1:1;return ye(this.viewDate,t)&&t.getDate()===n}canClick(t){const[e,i]=this.getMinMaxDate();return(!e||e<=t)&&(!i||i>=t)}getMinMaxDate(){const t=this.locale.fromLocalISO(this.min);const e=this.locale.fromLocalISO(this.max);return[t,e]}getValue(){if(this.range){const[t,e]=JSON.parse(this.value||"[]");return[this.locale.fromLocalISO(t),this.locale.fromLocalISO(e)]}else{return[this.locale.fromLocalISO(this.value),null]}}toRangeValue(t,e){return JSON.stringify([t,e].map((t=>t?this.locale.toLocalISO(t):null)))}get hostElement(){return a(this)}};Re.style=Me;var Ce=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"];var Ae={_disable:[],allowInput:false,allowInvalidPreload:false,altFormat:"F j, Y",altInput:false,altInputClass:"form-control input",animate:typeof window==="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:true,clickOpens:true,closeOnSelect:true,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:false,enableSeconds:false,enableTime:false,errorHandler:function(t){return typeof console!=="undefined"&&console.warn(t)},getWeek:function(t){var e=new Date(t.getTime());e.setHours(0,0,0,0);e.setDate(e.getDate()+3-(e.getDay()+6)%7);var i=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-i.getTime())/864e5-3+(i.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:false,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:false,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"",shorthandCurrentMonth:false,showMonths:1,static:false,time_24hr:false,weekNumbers:false,wrap:false};var Se={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(t){var e=t%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:false};var Te=function(t,e){if(e===void 0){e=2}return("000"+t).slice(e*-1)};var Fe=function(t){return t===true?1:0};function Be(t,e){var i;return function(){var a=this;var r=arguments;clearTimeout(i);i=setTimeout((function(){return t.apply(a,r)}),e)}}var $e=function(t){return t instanceof Array?t:[t]};function Ee(t,e,i){if(i===true)return t.classList.add(e);t.classList.remove(e)}function Oe(t,e,i){var a=window.document.createElement(t);e=e||"";i=i||"";a.className=e;if(i!==undefined)a.textContent=i;return a}function Ne(t){while(t.firstChild)t.removeChild(t.firstChild)}function We(t,e){if(e(t))return t;else if(t.parentNode)return We(t.parentNode,e);return undefined}function Le(t,e){var i=Oe("div","numInputWrapper"),a=Oe("input","numInput "+t),r=Oe("span","arrowUp"),n=Oe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1){a.type="number"}else{a.type="text";a.pattern="\\d*"}if(e!==undefined)for(var o in e)a.setAttribute(o,e[o]);i.appendChild(a);i.appendChild(r);i.appendChild(n);return i}function je(t){try{if(typeof t.composedPath==="function"){var e=t.composedPath();return e[0]}return t.target}catch(e){return t.target}}var Pe=function(){return undefined};var Ye=function(t,e,i){return i.months[e?"shorthand":"longhand"][t]};var He={D:Pe,F:function(t,e,i){t.setMonth(i.months.longhand.indexOf(e))},G:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},H:function(t,e){t.setHours(parseFloat(e))},J:function(t,e){t.setDate(parseFloat(e))},K:function(t,e,i){t.setHours(t.getHours()%12+12*Fe(new RegExp(i.amPM[1],"i").test(e)))},M:function(t,e,i){t.setMonth(i.months.shorthand.indexOf(e))},S:function(t,e){t.setSeconds(parseFloat(e))},U:function(t,e){return new Date(parseFloat(e)*1e3)},W:function(t,e,i){var a=parseInt(e);var r=new Date(t.getFullYear(),0,2+(a-1)*7,0,0,0,0);r.setDate(r.getDate()-r.getDay()+i.firstDayOfWeek);return r},Y:function(t,e){t.setFullYear(parseFloat(e))},Z:function(t,e){return new Date(e)},d:function(t,e){t.setDate(parseFloat(e))},h:function(t,e){t.setHours((t.getHours()>=12?12:0)+parseFloat(e))},i:function(t,e){t.setMinutes(parseFloat(e))},j:function(t,e){t.setDate(parseFloat(e))},l:Pe,m:function(t,e){t.setMonth(parseFloat(e)-1)},n:function(t,e){t.setMonth(parseFloat(e)-1)},s:function(t,e){t.setSeconds(parseFloat(e))},u:function(t,e){return new Date(parseFloat(e))},w:Pe,y:function(t,e){t.setFullYear(2e3+parseFloat(e))}};var Ue={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"};var _e={Z:function(t){return t.toISOString()},D:function(t,e,i){return e.weekdays.shorthand[_e.w(t,e,i)]},F:function(t,e,i){return Ye(_e.n(t,e,i)-1,false,e)},G:function(t,e,i){return Te(_e.h(t,e,i))},H:function(t){return Te(t.getHours())},J:function(t,e){return e.ordinal!==undefined?t.getDate()+e.ordinal(t.getDate()):t.getDate()},K:function(t,e){return e.amPM[Fe(t.getHours()>11)]},M:function(t,e){return Ye(t.getMonth(),true,e)},S:function(t){return Te(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,e,i){return i.getWeek(t)},Y:function(t){return Te(t.getFullYear(),4)},d:function(t){return Te(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return Te(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,e){return e.weekdays.longhand[t.getDay()]},m:function(t){return Te(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}};var Ke=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a,n=t.isMobile,o=n===void 0?false:n;return function(t,e,a){var n=a||r;if(i.formatDate!==undefined&&!o){return i.formatDate(t,e,n)}return e.split("").map((function(e,a,r){return _e[e]&&r[a-1]!=="\\"?_e[e](t,n,i):e!=="\\"?e:""})).join("")}};var Ve=function(t){var e=t.config,i=e===void 0?Ae:e,a=t.l10n,r=a===void 0?Se:a;return function(t,e,a,n){if(t!==0&&!t)return undefined;var o=n||r;var s;var c=t;if(t instanceof Date)s=new Date(t.getTime());else if(typeof t!=="string"&&t.toFixed!==undefined)s=new Date(t);else if(typeof t==="string"){var l=e||(i||Ae).dateFormat;var d=String(t).trim();if(d==="today"){s=new Date;a=true}else if(i&&i.parseDate){s=i.parseDate(t,l)}else if(/Z$/.test(d)||/GMT$/.test(d)){s=new Date(t)}else{var h=void 0,f=[];for(var u=0,p=0,b="";uMath.min(e,i)&&t=0?new Date:new Date(i.config.minDate.getTime());var a=Qe(i.config);e.setHours(a.hours,a.minutes,a.seconds,e.getMilliseconds());i.selectedDates=[e];i.latestSelectedDateObj=e}if(t!==undefined&&t.type!=="blur"){It(t)}var r=i._input.value;h();zt();if(i._input.value!==r){i._debouncedChange()}}function l(t,e){return t%12+12*Fe(e===i.l10n.amPM[1])}function d(t){switch(t%24){case 0:case 12:return 12;default:return t%12}}function h(){if(i.hourElement===undefined||i.minuteElement===undefined)return;var t=(parseInt(i.hourElement.value.slice(-2),10)||0)%24,e=(parseInt(i.minuteElement.value,10)||0)%60,a=i.secondElement!==undefined?(parseInt(i.secondElement.value,10)||0)%60:0;if(i.amPM!==undefined){t=l(t,i.amPM.textContent)}var r=i.config.minTime!==undefined||i.config.minDate&&i.minDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.minDate,true)===0;var n=i.config.maxTime!==undefined||i.config.maxDate&&i.maxDateHasTime&&i.latestSelectedDateObj&&qe(i.latestSelectedDateObj,i.config.maxDate,true)===0;if(i.config.maxTime!==undefined&&i.config.minTime!==undefined&&i.config.minTime>i.config.maxTime){var o=Ge(i.config.minTime.getHours(),i.config.minTime.getMinutes(),i.config.minTime.getSeconds());var s=Ge(i.config.maxTime.getHours(),i.config.maxTime.getMinutes(),i.config.maxTime.getSeconds());var c=Ge(t,e,a);if(c>s&&c=12)];if(i.secondElement!==undefined)i.secondElement.value=Te(a)}function p(t){var e=je(t);var i=parseInt(e.value)+(t.delta||0);if(i/1e3>1||t.key==="Enter"&&!/[^\d]/.test(i.toString())){H(i)}}function b(t,e,a,r){if(e instanceof Array)return e.forEach((function(e){return b(t,e,a,r)}));if(t instanceof Array)return t.forEach((function(t){return b(t,e,a,r)}));t.addEventListener(e,a,r);i._handlers.push({remove:function(){return t.removeEventListener(e,a,r)}})}function m(){gt("onChange")}function g(){if(i.config.wrap){["open","close","toggle","clear"].forEach((function(t){Array.prototype.forEach.call(i.element.querySelectorAll("[data-"+t+"]"),(function(e){return b(e,"click",i[t])}))}))}if(i.isMobile){bt();return}var t=Be(J,50);i._debouncedChange=Be(m,ii);if(i.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent))b(i.daysContainer,"mouseover",(function(t){if(i.config.mode==="range")q(je(t))}));b(i._input,"keydown",V);if(i.calendarContainer!==undefined){b(i.calendarContainer,"keydown",V)}if(!i.config.inline&&!i.config.static)b(window,"resize",t);if(window.ontouchstart!==undefined)b(window.document,"touchstart",Y);else b(window.document,"mousedown",Y);b(window.document,"focus",Y,{capture:true});if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}if(i.daysContainer!==undefined){b(i.monthNav,"click",Dt);b(i.monthNav,["keyup","increment"],p);b(i.daysContainer,"click",ot)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined){var e=function(t){return je(t).select()};b(i.timeContainer,["increment"],c);b(i.timeContainer,"blur",c,{capture:true});b(i.timeContainer,"click",y);b([i.hourElement,i.minuteElement],["focus","click"],e);if(i.secondElement!==undefined)b(i.secondElement,"focus",(function(){return i.secondElement&&i.secondElement.select()}));if(i.amPM!==undefined){b(i.amPM,"click",(function(t){c(t)}))}}if(i.config.allowInput){b(i._input,"blur",K)}}function v(t,e){var a=t!==undefined?i.parseDate(t):i.latestSelectedDateObj||(i.config.minDate&&i.config.minDate>i.now?i.config.minDate:i.config.maxDate&&i.config.maxDate1);i.calendarContainer.appendChild(t);var n=i.config.appendTo!==undefined&&i.config.appendTo.nodeType!==undefined;if(i.config.inline||i.config.static){i.calendarContainer.classList.add(i.config.inline?"inline":"static");if(i.config.inline){if(!n&&i.element.parentNode)i.element.parentNode.insertBefore(i.calendarContainer,i._input.nextSibling);else if(i.config.appendTo!==undefined)i.config.appendTo.appendChild(i.calendarContainer)}if(i.config.static){var o=Oe("div","flatpickr-wrapper");if(i.element.parentNode)i.element.parentNode.insertBefore(o,i.element);o.appendChild(i.element);if(i.altInput)o.appendChild(i.altInput);o.appendChild(i.calendarContainer)}}if(!i.config.static&&!i.config.inline)(i.config.appendTo!==undefined?i.config.appendTo:window.document.body).appendChild(i.calendarContainer)}function w(t,e,a,r){var n=U(e,true),o=Oe("span",t,e.getDate().toString());o.dateObj=e;o.$i=r;o.setAttribute("aria-label",i.formatDate(e,i.config.ariaDateFormat));if(t.indexOf("hidden")===-1&&qe(e,i.now)===0){i.todayDateElem=o;o.classList.add("today");o.setAttribute("aria-current","date")}if(n){o.tabIndex=-1;if(yt(e)){o.classList.add("selected");i.selectedDateElem=o;if(i.config.mode==="range"){Ee(o,"startRange",i.selectedDates[0]&&qe(e,i.selectedDates[0],true)===0);Ee(o,"endRange",i.selectedDates[1]&&qe(e,i.selectedDates[1],true)===0);if(t==="nextMonthDay")o.classList.add("inRange")}}}else{o.classList.add("flatpickr-disabled")}if(i.config.mode==="range"){if(kt(e)&&!yt(e))o.classList.add("inRange")}if(i.weekNumbers&&i.config.showMonths===1&&t!=="prevMonthDay"&&r%7===6){i.weekNumbers.insertAdjacentHTML("beforeend",""+i.config.getWeek(e)+"")}gt("onDayCreate",o);return o}function z(t){t.focus();if(i.config.mode==="range")q(t)}function D(t){var e=t>0?0:i.config.showMonths-1;var a=t>0?i.config.showMonths:-1;for(var r=e;r!=a;r+=t){var n=i.daysContainer.children[r];var o=t>0?0:n.children.length-1;var s=t>0?n.children.length:-1;for(var c=o;c!=s;c+=t){var l=n.children[c];if(l.className.indexOf("hidden")===-1&&U(l.dateObj))return l}}return undefined}function I(t,e){var a=t.className.indexOf("Month")===-1?t.dateObj.getMonth():i.currentMonth;var r=e>0?i.config.showMonths:-1;var n=e>0?1:-1;for(var o=a-i.currentMonth;o!=r;o+=n){var s=i.daysContainer.children[o];var c=a-i.currentMonth===o?t.$i+e:e<0?s.children.length-1:0;var l=s.children.length;for(var d=c;d>=0&&d0?l:-1);d+=n){var h=s.children[d];if(h.className.indexOf("hidden")===-1&&U(h.dateObj)&&Math.abs(t.$i-d)>=Math.abs(e))return z(h)}}i.changeMonth(n);M(D(n),0);return undefined}function M(t,e){var a=n();var r=_(a||document.body);var o=t!==undefined?t:r?a:i.selectedDateElem!==undefined&&_(i.selectedDateElem)?i.selectedDateElem:i.todayDateElem!==undefined&&_(i.todayDateElem)?i.todayDateElem:D(e>0?1:-1);if(o===undefined){i._input.focus()}else if(!r){z(o)}else{I(o,e)}}function R(t,e){var a=(new Date(t,e,1).getDay()-i.l10n.firstDayOfWeek+7)%7;var r=i.utils.getDaysInMonth((e-1+12)%12,t);var n=i.utils.getDaysInMonth(e,t),o=window.document.createDocumentFragment(),s=i.config.showMonths>1,c=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay";var d=r+1-a,h=0;for(;d<=r;d++,h++){o.appendChild(w("flatpickr-day "+c,new Date(t,e-1,d),d,h))}for(d=1;d<=n;d++,h++){o.appendChild(w("flatpickr-day",new Date(t,e,d),d,h))}for(var f=n+1;f<=42-a&&(i.config.showMonths===1||h%7!==0);f++,h++){o.appendChild(w("flatpickr-day "+l,new Date(t,e+1,f%n),f,h))}var u=Oe("div","dayContainer");u.appendChild(o);return u}function C(){if(i.daysContainer===undefined){return}Ne(i.daysContainer);if(i.weekNumbers)Ne(i.weekNumbers);var t=document.createDocumentFragment();for(var e=0;e1||i.config.monthSelectorType!=="dropdown")return;var t=function(t){if(i.config.minDate!==undefined&&i.currentYear===i.config.minDate.getFullYear()&&ti.config.maxDate.getMonth())};i.monthsDropdownContainer.tabIndex=-1;i.monthsDropdownContainer.innerHTML="";for(var e=0;e<12;e++){if(!t(e))continue;var a=Oe("option","flatpickr-monthDropdown-month");a.value=new Date(i.currentYear,e).getMonth().toString();a.textContent=Ye(e,i.config.shorthandCurrentMonth,i.l10n);a.tabIndex=-1;if(i.currentMonth===e){a.selected=true}i.monthsDropdownContainer.appendChild(a)}}function S(){var t=Oe("div","flatpickr-month");var e=window.document.createDocumentFragment();var a;if(i.config.showMonths>1||i.config.monthSelectorType==="static"){a=Oe("span","cur-month")}else{i.monthsDropdownContainer=Oe("select","flatpickr-monthDropdown-months");i.monthsDropdownContainer.setAttribute("aria-label",i.l10n.monthAriaLabel);b(i.monthsDropdownContainer,"change",(function(t){var e=je(t);var a=parseInt(e.value,10);i.changeMonth(a-i.currentMonth);gt("onMonthChange")}));A();a=i.monthsDropdownContainer}var r=Le("cur-year",{tabindex:"-1"});var n=r.getElementsByTagName("input")[0];n.setAttribute("aria-label",i.l10n.yearAriaLabel);if(i.config.minDate){n.setAttribute("min",i.config.minDate.getFullYear().toString())}if(i.config.maxDate){n.setAttribute("max",i.config.maxDate.getFullYear().toString());n.disabled=!!i.config.minDate&&i.config.minDate.getFullYear()===i.config.maxDate.getFullYear()}var o=Oe("div","flatpickr-current-month");o.appendChild(a);o.appendChild(r);e.appendChild(o);t.appendChild(e);return{container:t,yearElement:n,monthElement:a}}function T(){Ne(i.monthNav);i.monthNav.appendChild(i.prevMonthNav);if(i.config.showMonths){i.yearElements=[];i.monthElements=[]}for(var t=i.config.showMonths;t--;){var e=S();i.yearElements.push(e.yearElement);i.monthElements.push(e.monthElement);i.monthNav.appendChild(e.container)}i.monthNav.appendChild(i.nextMonthNav)}function F(){i.monthNav=Oe("div","flatpickr-months");i.yearElements=[];i.monthElements=[];i.prevMonthNav=Oe("span","flatpickr-prev-month");i.prevMonthNav.innerHTML=i.config.prevArrow;i.nextMonthNav=Oe("span","flatpickr-next-month");i.nextMonthNav.innerHTML=i.config.nextArrow;T();Object.defineProperty(i,"_hidePrevMonthArrow",{get:function(){return i.__hidePrevMonthArrow},set:function(t){if(i.__hidePrevMonthArrow!==t){Ee(i.prevMonthNav,"flatpickr-disabled",t);i.__hidePrevMonthArrow=t}}});Object.defineProperty(i,"_hideNextMonthArrow",{get:function(){return i.__hideNextMonthArrow},set:function(t){if(i.__hideNextMonthArrow!==t){Ee(i.nextMonthNav,"flatpickr-disabled",t);i.__hideNextMonthArrow=t}}});i.currentYearElement=i.yearElements[0];xt();return i.monthNav}function B(){i.calendarContainer.classList.add("hasTime");if(i.config.noCalendar)i.calendarContainer.classList.add("noCalendar");var t=Qe(i.config);i.timeContainer=Oe("div","flatpickr-time");i.timeContainer.tabIndex=-1;var e=Oe("span","flatpickr-time-separator",":");var a=Le("flatpickr-hour",{"aria-label":i.l10n.hourAriaLabel});i.hourElement=a.getElementsByTagName("input")[0];var r=Le("flatpickr-minute",{"aria-label":i.l10n.minuteAriaLabel});i.minuteElement=r.getElementsByTagName("input")[0];i.hourElement.tabIndex=i.minuteElement.tabIndex=-1;i.hourElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getHours():i.config.time_24hr?t.hours:d(t.hours));i.minuteElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getMinutes():t.minutes);i.hourElement.setAttribute("step",i.config.hourIncrement.toString());i.minuteElement.setAttribute("step",i.config.minuteIncrement.toString());i.hourElement.setAttribute("min",i.config.time_24hr?"0":"1");i.hourElement.setAttribute("max",i.config.time_24hr?"23":"12");i.hourElement.setAttribute("maxlength","2");i.minuteElement.setAttribute("min","0");i.minuteElement.setAttribute("max","59");i.minuteElement.setAttribute("maxlength","2");i.timeContainer.appendChild(a);i.timeContainer.appendChild(e);i.timeContainer.appendChild(r);if(i.config.time_24hr)i.timeContainer.classList.add("time24hr");if(i.config.enableSeconds){i.timeContainer.classList.add("hasSeconds");var n=Le("flatpickr-second");i.secondElement=n.getElementsByTagName("input")[0];i.secondElement.value=Te(i.latestSelectedDateObj?i.latestSelectedDateObj.getSeconds():t.seconds);i.secondElement.setAttribute("step",i.minuteElement.getAttribute("step"));i.secondElement.setAttribute("min","0");i.secondElement.setAttribute("max","59");i.secondElement.setAttribute("maxlength","2");i.timeContainer.appendChild(Oe("span","flatpickr-time-separator",":"));i.timeContainer.appendChild(n)}if(!i.config.time_24hr){i.amPM=Oe("span","flatpickr-am-pm",i.l10n.amPM[Fe((i.latestSelectedDateObj?i.hourElement.value:i.config.defaultHour)>11)]);i.amPM.title=i.l10n.toggleTitle;i.amPM.tabIndex=-1;i.timeContainer.appendChild(i.amPM)}return i.timeContainer}function $(){if(!i.weekdayContainer)i.weekdayContainer=Oe("div","flatpickr-weekdays");else Ne(i.weekdayContainer);for(var t=i.config.showMonths;t--;){var e=Oe("div","flatpickr-weekdaycontainer");i.weekdayContainer.appendChild(e)}E();return i.weekdayContainer}function E(){if(!i.weekdayContainer){return}var t=i.l10n.firstDayOfWeek;var e=ei(i.l10n.weekdays.shorthand);if(t>0&&t\n "+e.join("")+"\n \n "}}function O(){i.calendarContainer.classList.add("hasWeeks");var t=Oe("div","flatpickr-weekwrapper");t.appendChild(Oe("span","flatpickr-weekday",i.l10n.weekAbbreviation));var e=Oe("div","flatpickr-weeks");t.appendChild(e);return{weekWrapper:t,weekNumbers:e}}function N(t,e){if(e===void 0){e=true}var a=e?t:t-i.currentMonth;if(a<0&&i._hidePrevMonthArrow===true||a>0&&i._hideNextMonthArrow===true)return;i.currentMonth+=a;if(i.currentMonth<0||i.currentMonth>11){i.currentYear+=i.currentMonth>11?1:-1;i.currentMonth=(i.currentMonth+12)%12;gt("onYearChange");A()}C();gt("onMonthChange");xt()}function W(t,e){if(t===void 0){t=true}if(e===void 0){e=true}i.input.value="";if(i.altInput!==undefined)i.altInput.value="";if(i.mobileInput!==undefined)i.mobileInput.value="";i.selectedDates=[];i.latestSelectedDateObj=undefined;if(e===true){i.currentYear=i._initialDate.getFullYear();i.currentMonth=i._initialDate.getMonth()}if(i.config.enableTime===true){var a=Qe(i.config),r=a.hours,n=a.minutes,o=a.seconds;u(r,n,o)}i.redraw();if(t)gt("onChange")}function L(){i.isOpen=false;if(!i.isMobile){if(i.calendarContainer!==undefined){i.calendarContainer.classList.remove("open")}if(i._input!==undefined){i._input.classList.remove("active")}}gt("onClose")}function j(){if(i.config!==undefined)gt("onDestroy");for(var t=i._handlers.length;t--;){i._handlers[t].remove()}i._handlers=[];if(i.mobileInput){if(i.mobileInput.parentNode)i.mobileInput.parentNode.removeChild(i.mobileInput);i.mobileInput=undefined}else if(i.calendarContainer&&i.calendarContainer.parentNode){if(i.config.static&&i.calendarContainer.parentNode){var e=i.calendarContainer.parentNode;e.lastChild&&e.removeChild(e.lastChild);if(e.parentNode){while(e.firstChild)e.parentNode.insertBefore(e.firstChild,e);e.parentNode.removeChild(e)}}else i.calendarContainer.parentNode.removeChild(i.calendarContainer)}if(i.altInput){i.input.type="text";if(i.altInput.parentNode)i.altInput.parentNode.removeChild(i.altInput);delete i.altInput}if(i.input){i.input.type=i.input._type;i.input.classList.remove("flatpickr-input");i.input.removeAttribute("readonly")}["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(t){try{delete i[t]}catch(t){}}))}function P(t){return i.calendarContainer.contains(t)}function Y(t){if(i.isOpen&&!i.config.inline){var e=je(t);var a=P(e);var r=e===i.input||e===i.altInput||i.element.contains(e)||t.path&&t.path.indexOf&&(~t.path.indexOf(i.input)||~t.path.indexOf(i.altInput));var n=!r&&!a&&!P(t.relatedTarget);var o=!i.config.ignoredFocusElements.some((function(t){return t.contains(e)}));if(n&&o){if(i.config.allowInput){i.setDate(i._input.value,false,i.config.altInput?i.config.altFormat:i.config.dateFormat)}if(i.timeContainer!==undefined&&i.minuteElement!==undefined&&i.hourElement!==undefined&&i.input.value!==""&&i.input.value!==undefined){c()}i.close();if(i.config&&i.config.mode==="range"&&i.selectedDates.length===1)i.clear(false)}}}function H(t){if(!t||i.config.minDate&&ti.config.maxDate.getFullYear())return;var e=t,a=i.currentYear!==e;i.currentYear=e||i.currentYear;if(i.config.maxDate&&i.currentYear===i.config.maxDate.getFullYear()){i.currentMonth=Math.min(i.config.maxDate.getMonth(),i.currentMonth)}else if(i.config.minDate&&i.currentYear===i.config.minDate.getFullYear()){i.currentMonth=Math.max(i.config.minDate.getMonth(),i.currentMonth)}if(a){i.redraw();gt("onYearChange");A()}}function U(t,e){var a;if(e===void 0){e=true}var r=i.parseDate(t,undefined,e);if(i.config.minDate&&r&&qe(r,i.config.minDate,e!==undefined?e:!i.minDateHasTime)<0||i.config.maxDate&&r&&qe(r,i.config.maxDate,e!==undefined?e:!i.maxDateHasTime)>0)return false;if(!i.config.enable&&i.config.disable.length===0)return true;if(r===undefined)return false;var n=!!i.config.enable,o=(a=i.config.enable)!==null&&a!==void 0?a:i.config.disable;for(var s=0,c=void 0;s=c.from.getTime()&&r.getTime()<=c.to.getTime())return n}return!n}function _(t){if(i.daysContainer!==undefined)return t.className.indexOf("hidden")===-1&&t.className.indexOf("flatpickr-disabled")===-1&&i.daysContainer.contains(t);return false}function K(t){var e=t.target===i._input;var a=i._input.value.trimEnd()!==wt();if(e&&a&&!(t.relatedTarget&&P(t.relatedTarget))){i.setDate(i._input.value,true,t.target===i.altInput?i.config.altFormat:i.config.dateFormat)}}function V(e){var a=je(e);var r=i.config.wrap?t.contains(a):a===i._input;var o=i.config.allowInput;var s=i.isOpen&&(!o||!r);var l=i.config.inline&&r&&!o;if(e.keyCode===13&&r){if(o){i.setDate(i._input.value,true,a===i.altInput?i.config.altFormat:i.config.dateFormat);i.close();return a.blur()}else{i.open()}}else if(P(a)||s||l){var d=!!i.timeContainer&&i.timeContainer.contains(a);switch(e.keyCode){case 13:if(d){e.preventDefault();c();nt()}else ot(e);break;case 27:e.preventDefault();nt();break;case 8:case 46:if(r&&!i.config.allowInput){e.preventDefault();i.clear()}break;case 37:case 39:if(!d&&!r){e.preventDefault();var f=n();if(i.daysContainer!==undefined&&(o===false||f&&_(f))){var u=e.keyCode===39?1:-1;if(!e.ctrlKey)M(undefined,u);else{e.stopPropagation();N(u);M(D(1),0)}}}else if(i.hourElement)i.hourElement.focus();break;case 38:case 40:e.preventDefault();var p=e.keyCode===40?1:-1;if(i.daysContainer&&a.$i!==undefined||a===i.input||a===i.altInput){if(e.ctrlKey){e.stopPropagation();H(i.currentYear-p);M(D(1),0)}else if(!d)M(undefined,p*7)}else if(a===i.currentYearElement){H(i.currentYear-p)}else if(i.config.enableTime){if(!d&&i.hourElement)i.hourElement.focus();c(e);i._debouncedChange()}break;case 9:if(d){var b=[i.hourElement,i.minuteElement,i.secondElement,i.amPM].concat(i.pluginElements).filter((function(t){return t}));var m=b.indexOf(a);if(m!==-1){var g=b[m+(e.shiftKey?-1:1)];e.preventDefault();(g||i._input).focus()}}else if(!i.config.noCalendar&&i.daysContainer&&i.daysContainer.contains(a)&&e.shiftKey){e.preventDefault();i._input.focus()}break}}if(i.amPM!==undefined&&a===i.amPM){switch(e.key){case i.l10n.amPM[0].charAt(0):case i.l10n.amPM[0].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[0];h();zt();break;case i.l10n.amPM[1].charAt(0):case i.l10n.amPM[1].charAt(0).toLowerCase():i.amPM.textContent=i.l10n.amPM[1];h();zt();break}}if(r||P(a)){gt("onKeyDown",e)}}function q(t,e){if(e===void 0){e="flatpickr-day"}if(i.selectedDates.length!==1||t&&(!t.classList.contains(e)||t.classList.contains("flatpickr-disabled")))return;var a=t?t.dateObj.getTime():i.days.firstElementChild.dateObj.getTime(),r=i.parseDate(i.selectedDates[0],undefined,true).getTime(),n=Math.min(a,i.selectedDates[0].getTime()),o=Math.max(a,i.selectedDates[0].getTime());var s=false;var c=0,l=0;for(var d=n;dn&&dc))c=d;else if(d>r&&(!l||d ."+e));h.forEach((function(e){var n=e.dateObj;var o=n.getTime();var d=c>0&&o0&&o>l;if(d){e.classList.add("notAllowed");["inRange","startRange","endRange"].forEach((function(t){e.classList.remove(t)}));return}else if(s&&!d)return;["startRange","inRange","endRange","notAllowed"].forEach((function(t){e.classList.remove(t)}));if(t!==undefined){t.classList.add(a<=i.selectedDates[0].getTime()?"startRange":"endRange");if(ra&&o===r)e.classList.add("endRange");if(o>=c&&(l===0||o<=l)&&Je(o,r,a))e.classList.add("inRange")}}))}function J(){if(i.isOpen&&!i.config.static&&!i.config.inline)et()}function G(t,e){if(e===void 0){e=i._positionElement}if(i.isMobile===true){if(t){t.preventDefault();var a=je(t);if(a){a.blur()}}if(i.mobileInput!==undefined){i.mobileInput.focus();i.mobileInput.click()}gt("onOpen");return}else if(i._input.disabled||i.config.inline){return}var r=i.isOpen;i.isOpen=true;if(!r){i.calendarContainer.classList.add("open");i._input.classList.add("active");gt("onOpen");et(e)}if(i.config.enableTime===true&&i.config.noCalendar===true){if(i.config.allowInput===false&&(t===undefined||!i.timeContainer.contains(t.relatedTarget))){setTimeout((function(){return i.hourElement.select()}),50)}}}function Z(t){return function(e){var a=i.config["_"+t+"Date"]=i.parseDate(e,i.config.dateFormat);var r=i.config["_"+(t==="min"?"max":"min")+"Date"];if(a!==undefined){i[t==="min"?"minDateHasTime":"maxDateHasTime"]=a.getHours()>0||a.getMinutes()>0||a.getSeconds()>0}if(i.selectedDates){i.selectedDates=i.selectedDates.filter((function(t){return U(t)}));if(!i.selectedDates.length&&t==="min")f(a);zt()}if(i.daysContainer){rt();if(a!==undefined)i.currentYearElement[t]=a.getFullYear().toString();else i.currentYearElement.removeAttribute(t);i.currentYearElement.disabled=!!r&&a!==undefined&&r.getFullYear()===a.getFullYear()}}}function X(){var a=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"];var r=ti(ti({},JSON.parse(JSON.stringify(t.dataset||{}))),e);var n={};i.config.parseDate=r.parseDate;i.config.formatDate=r.formatDate;Object.defineProperty(i.config,"enable",{get:function(){return i.config._enable},set:function(t){i.config._enable=ht(t)}});Object.defineProperty(i.config,"disable",{get:function(){return i.config._disable},set:function(t){i.config._disable=ht(t)}});var s=r.mode==="time";if(!r.dateFormat&&(r.enableTime||s)){var c=ni.defaultConfig.dateFormat||Ae.dateFormat;n.dateFormat=r.noCalendar||s?"H:i"+(r.enableSeconds?":S":""):c+" H:i"+(r.enableSeconds?":S":"")}if(r.altInput&&(r.enableTime||s)&&!r.altFormat){var l=ni.defaultConfig.altFormat||Ae.altFormat;n.altFormat=r.noCalendar||s?"h:i"+(r.enableSeconds?":S K":" K"):l+(" h:i"+(r.enableSeconds?":S":"")+" K")}Object.defineProperty(i.config,"minDate",{get:function(){return i.config._minDate},set:Z("min")});Object.defineProperty(i.config,"maxDate",{get:function(){return i.config._maxDate},set:Z("max")});var d=function(t){return function(e){i.config[t==="min"?"_minTime":"_maxTime"]=i.parseDate(e,"H:i:S")}};Object.defineProperty(i.config,"minTime",{get:function(){return i.config._minTime},set:d("min")});Object.defineProperty(i.config,"maxTime",{get:function(){return i.config._maxTime},set:d("max")});if(r.mode==="time"){i.config.noCalendar=true;i.config.enableTime=true}Object.assign(i.config,n,r);for(var h=0;h-1){i.config[u]=$e(f[u]).map(o).concat(i.config[u])}else if(typeof r[u]==="undefined")i.config[u]=f[u]}}if(!r.altInputClass){i.config.altInputClass=Q().className+" "+i.config.altInputClass}gt("onParseConfig")}function Q(){return i.config.wrap?t.querySelector("[data-input]"):t}function tt(){if(typeof i.config.locale!=="object"&&typeof ni.l10ns[i.config.locale]==="undefined")i.config.errorHandler(new Error("flatpickr: invalid locale "+i.config.locale));i.l10n=ti(ti({},ni.l10ns.default),typeof i.config.locale==="object"?i.config.locale:i.config.locale!=="default"?ni.l10ns[i.config.locale]:undefined);Ue.D="("+i.l10n.weekdays.shorthand.join("|")+")";Ue.l="("+i.l10n.weekdays.longhand.join("|")+")";Ue.M="("+i.l10n.months.shorthand.join("|")+")";Ue.F="("+i.l10n.months.longhand.join("|")+")";Ue.K="("+i.l10n.amPM[0]+"|"+i.l10n.amPM[1]+"|"+i.l10n.amPM[0].toLowerCase()+"|"+i.l10n.amPM[1].toLowerCase()+")";var a=ti(ti({},e),JSON.parse(JSON.stringify(t.dataset||{})));if(a.time_24hr===undefined&&ni.defaultConfig.time_24hr===undefined){i.config.time_24hr=i.l10n.time_24hr}i.formatDate=Ke(i);i.parseDate=Ve({config:i.config,l10n:i.l10n})}function et(t){if(typeof i.config.position==="function"){return void i.config.position(i,t)}if(i.calendarContainer===undefined)return;gt("onPreCalendarPosition");var e=t||i._positionElement;var a=Array.prototype.reduce.call(i.calendarContainer.children,(function(t,e){return t+e.offsetHeight}),0),r=i.calendarContainer.offsetWidth,n=i.config.position.split(" "),o=n[0],s=n.length>1?n[1]:null,c=e.getBoundingClientRect(),l=window.innerHeight-c.bottom,d=o==="above"||o!=="below"&&la;var h=window.pageYOffset+c.top+(!d?e.offsetHeight+2:-a-2);Ee(i.calendarContainer,"arrowTop",!d);Ee(i.calendarContainer,"arrowBottom",d);if(i.config.inline)return;var f=window.pageXOffset+c.left;var u=false;var p=false;if(s==="center"){f-=(r-c.width)/2;u=true}else if(s==="right"){f-=r-c.width;p=true}Ee(i.calendarContainer,"arrowLeft",!u&&!p);Ee(i.calendarContainer,"arrowCenter",u);Ee(i.calendarContainer,"arrowRight",p);var b=window.document.body.offsetWidth-(window.pageXOffset+c.right);var m=f+r>window.document.body.offsetWidth;var g=b+r>window.document.body.offsetWidth;Ee(i.calendarContainer,"rightMost",m);if(i.config.static)return;i.calendarContainer.style.top=h+"px";if(!m){i.calendarContainer.style.left=f+"px";i.calendarContainer.style.right="auto"}else if(!g){i.calendarContainer.style.left="auto";i.calendarContainer.style.right=b+"px"}else{var v=it();if(v===undefined)return;var y=window.document.body.offsetWidth;var k=Math.max(0,y/2-r/2);var x=".flatpickr-calendar.centerMost:before";var w=".flatpickr-calendar.centerMost:after";var z=v.cssRules.length;var D="{left:"+c.left+"px;right:auto;}";Ee(i.calendarContainer,"rightMost",false);Ee(i.calendarContainer,"centerMost",true);v.insertRule(x+","+w+D,z);i.calendarContainer.style.left=k+"px";i.calendarContainer.style.right="auto"}}function it(){var t=null;for(var e=0;ei.currentMonth+i.config.showMonths-1)&&i.config.mode!=="range";i.selectedDateElem=r;if(i.config.mode==="single")i.selectedDates=[n];else if(i.config.mode==="multiple"){var s=yt(n);if(s)i.selectedDates.splice(parseInt(s),1);else i.selectedDates.push(n)}else if(i.config.mode==="range"){if(i.selectedDates.length===2){i.clear(false,false)}i.latestSelectedDateObj=n;i.selectedDates.push(n);if(qe(n,i.selectedDates[0],true)!==0)i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}h();if(o){var c=i.currentYear!==n.getFullYear();i.currentYear=n.getFullYear();i.currentMonth=n.getMonth();if(c){gt("onYearChange");A()}gt("onMonthChange")}xt();C();zt();if(!o&&i.config.mode!=="range"&&i.config.showMonths===1)z(r);else if(i.selectedDateElem!==undefined&&i.hourElement===undefined){i.selectedDateElem&&i.selectedDateElem.focus()}if(i.hourElement!==undefined)i.hourElement!==undefined&&i.hourElement.focus();if(i.config.closeOnSelect){var l=i.config.mode==="single"&&!i.config.enableTime;var d=i.config.mode==="range"&&i.selectedDates.length===2&&!i.config.enableTime;if(l||d){nt()}}m()}var st={locale:[tt,E],showMonths:[T,s,$],minDate:[v],maxDate:[v],positionElement:[pt],clickOpens:[function(){if(i.config.clickOpens===true){b(i._input,"focus",i.open);b(i._input,"click",i.open)}else{i._input.removeEventListener("focus",i.open);i._input.removeEventListener("click",i.open)}}]};function ct(t,e){if(t!==null&&typeof t==="object"){Object.assign(i.config,t);for(var a in t){if(st[a]!==undefined)st[a].forEach((function(t){return t()}))}}else{i.config[t]=e;if(st[t]!==undefined)st[t].forEach((function(t){return t()}));else if(Ce.indexOf(t)>-1)i.config[t]=$e(e)}i.redraw();zt(true)}function lt(t,e){var a=[];if(t instanceof Array)a=t.map((function(t){return i.parseDate(t,e)}));else if(t instanceof Date||typeof t==="number")a=[i.parseDate(t,e)];else if(typeof t==="string"){switch(i.config.mode){case"single":case"time":a=[i.parseDate(t,e)];break;case"multiple":a=t.split(i.config.conjunction).map((function(t){return i.parseDate(t,e)}));break;case"range":a=t.split(i.l10n.rangeSeparator).map((function(t){return i.parseDate(t,e)}));break}}else i.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(t)));i.selectedDates=i.config.allowInvalidPreload?a:a.filter((function(t){return t instanceof Date&&U(t,false)}));if(i.config.mode==="range")i.selectedDates.sort((function(t,e){return t.getTime()-e.getTime()}))}function dt(t,e,a){if(e===void 0){e=false}if(a===void 0){a=i.config.dateFormat}if(t!==0&&!t||t instanceof Array&&t.length===0)return i.clear(e);lt(t,a);i.latestSelectedDateObj=i.selectedDates[i.selectedDates.length-1];i.redraw();v(undefined,e);f();if(i.selectedDates.length===0){i.clear(false)}zt(e);if(e)gt("onChange")}function ht(t){return t.slice().map((function(t){if(typeof t==="string"||typeof t==="number"||t instanceof Date){return i.parseDate(t,undefined,true)}else if(t&&typeof t==="object"&&t.from&&t.to)return{from:i.parseDate(t.from,undefined),to:i.parseDate(t.to,undefined)};return t})).filter((function(t){return t}))}function ft(){i.selectedDates=[];i.now=i.parseDate(i.config.now)||new Date;var t=i.config.defaultDate||((i.input.nodeName==="INPUT"||i.input.nodeName==="TEXTAREA")&&i.input.placeholder&&i.input.value===i.input.placeholder?null:i.input.value);if(t)lt(t,i.config.dateFormat);i._initialDate=i.selectedDates.length>0?i.selectedDates[0]:i.config.minDate&&i.config.minDate.getTime()>i.now.getTime()?i.config.minDate:i.config.maxDate&&i.config.maxDate.getTime()0)i.latestSelectedDateObj=i.selectedDates[0];if(i.config.minTime!==undefined)i.config.minTime=i.parseDate(i.config.minTime,"H:i");if(i.config.maxTime!==undefined)i.config.maxTime=i.parseDate(i.config.maxTime,"H:i");i.minDateHasTime=!!i.config.minDate&&(i.config.minDate.getHours()>0||i.config.minDate.getMinutes()>0||i.config.minDate.getSeconds()>0);i.maxDateHasTime=!!i.config.maxDate&&(i.config.maxDate.getHours()>0||i.config.maxDate.getMinutes()>0||i.config.maxDate.getSeconds()>0)}function ut(){i.input=Q();if(!i.input){i.config.errorHandler(new Error("Invalid input element specified"));return}i.input._type=i.input.type;i.input.type="text";i.input.classList.add("flatpickr-input");i._input=i.input;if(i.config.altInput){i.altInput=Oe(i.input.nodeName,i.config.altInputClass);i._input=i.altInput;i.altInput.placeholder=i.input.placeholder;i.altInput.disabled=i.input.disabled;i.altInput.required=i.input.required;i.altInput.tabIndex=i.input.tabIndex;i.altInput.type="text";i.input.setAttribute("type","hidden");if(!i.config.static&&i.input.parentNode)i.input.parentNode.insertBefore(i.altInput,i.input.nextSibling)}if(!i.config.allowInput)i._input.setAttribute("readonly","readonly");pt()}function pt(){i._positionElement=i.config.positionElement||i._input}function bt(){var t=i.config.enableTime?i.config.noCalendar?"time":"datetime-local":"date";i.mobileInput=Oe("input",i.input.className+" flatpickr-mobile");i.mobileInput.tabIndex=1;i.mobileInput.type=t;i.mobileInput.disabled=i.input.disabled;i.mobileInput.required=i.input.required;i.mobileInput.placeholder=i.input.placeholder;i.mobileFormatStr=t==="datetime-local"?"Y-m-d\\TH:i:S":t==="date"?"Y-m-d":"H:i:S";if(i.selectedDates.length>0){i.mobileInput.defaultValue=i.mobileInput.value=i.formatDate(i.selectedDates[0],i.mobileFormatStr)}if(i.config.minDate)i.mobileInput.min=i.formatDate(i.config.minDate,"Y-m-d");if(i.config.maxDate)i.mobileInput.max=i.formatDate(i.config.maxDate,"Y-m-d");if(i.input.getAttribute("step"))i.mobileInput.step=String(i.input.getAttribute("step"));i.input.type="hidden";if(i.altInput!==undefined)i.altInput.type="hidden";try{if(i.input.parentNode)i.input.parentNode.insertBefore(i.mobileInput,i.input.nextSibling)}catch(t){}b(i.mobileInput,"change",(function(t){i.setDate(je(t).value,false,i.mobileFormatStr);gt("onChange");gt("onClose")}))}function mt(t){if(i.isOpen===true)return i.close();i.open(t)}function gt(t,e){if(i.config===undefined)return;var a=i.config[t];if(a!==undefined&&a.length>0){for(var r=0;a[r]&&r=0&&qe(t,i.selectedDates[1])<=0}function xt(){if(i.config.noCalendar||i.isMobile||!i.monthNav)return;i.yearElements.forEach((function(t,e){var a=new Date(i.currentYear,i.currentMonth,1);a.setMonth(i.currentMonth+e);if(i.config.showMonths>1||i.config.monthSelectorType==="static"){i.monthElements[e].textContent=Ye(a.getMonth(),i.config.shorthandCurrentMonth,i.l10n)+" "}else{i.monthsDropdownContainer.value=a.getMonth().toString()}t.value=a.getFullYear().toString()}));i._hidePrevMonthArrow=i.config.minDate!==undefined&&(i.currentYear===i.config.minDate.getFullYear()?i.currentMonth<=i.config.minDate.getMonth():i.currentYeari.config.maxDate.getMonth():i.currentYear>i.config.maxDate.getFullYear())}function wt(t){var e=t||(i.config.altInput?i.config.altFormat:i.config.dateFormat);return i.selectedDates.map((function(t){return i.formatDate(t,e)})).filter((function(t,e,a){return i.config.mode!=="range"||i.config.enableTime||a.indexOf(t)===e})).join(i.config.mode!=="range"?i.config.conjunction:i.l10n.rangeSeparator)}function zt(t){if(t===void 0){t=true}if(i.mobileInput!==undefined&&i.mobileFormatStr){i.mobileInput.value=i.latestSelectedDateObj!==undefined?i.formatDate(i.latestSelectedDateObj,i.mobileFormatStr):""}i.input.value=wt(i.config.dateFormat);if(i.altInput!==undefined){i.altInput.value=wt(i.config.altFormat)}if(t!==false)gt("onValueUpdate")}function Dt(t){var e=je(t);var a=i.prevMonthNav.contains(e);var r=i.nextMonthNav.contains(e);if(a||r){N(a?-1:1)}else if(i.yearElements.indexOf(e)>=0){e.select()}else if(e.classList.contains("arrowUp")){i.changeYear(i.currentYear+1)}else if(e.classList.contains("arrowDown")){i.changeYear(i.currentYear-1)}}function It(t){t.preventDefault();var e=t.type==="keydown",a=je(t),r=a;if(i.amPM!==undefined&&a===i.amPM){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}var n=parseFloat(r.getAttribute("min")),o=parseFloat(r.getAttribute("max")),s=parseFloat(r.getAttribute("step")),c=parseInt(r.value,10),l=t.delta||(e?t.which===38?1:-1:0);var d=c+s*l;if(typeof r.value!=="undefined"&&r.value.length===2){var h=r===i.hourElement,f=r===i.minuteElement;if(do){d=r===i.hourElement?d-o-Fe(!i.amPM):n;if(f)k(undefined,1,i.hourElement)}if(i.amPM&&h&&(s===1?d+c===23:Math.abs(d-c)>s)){i.amPM.textContent=i.l10n.amPM[Fe(i.amPM.textContent===i.l10n.amPM[0])]}r.value=Te(d)}}r();return i}function ri(t,e){var i=Array.prototype.slice.call(t).filter((function(t){return t instanceof HTMLElement}));var a=[];for(var r=0;rc||h=e.weekStartDay&&r<=e.weekEndDay)i[a].classList.add("week","selected")}}function r(){var t=e.days.childNodes;for(var i=t.length;i--;)t[i].classList.remove("inRange")}function n(){if(e.daysContainer!==undefined)e.daysContainer.addEventListener("mouseover",i)}function o(){if(e.daysContainer!==undefined)e.daysContainer.removeEventListener("mouseover",i)}return{onValueUpdate:a,onMonthChange:a,onYearChange:a,onOpen:a,onClose:r,onParseConfig:function(){e.config.mode="single";e.config.enableTime=false;e.config.dateFormat=e.config.dateFormat?e.config.dateFormat:"\\W\\e\\e\\k #W, Y";e.config.altFormat=e.config.altFormat?e.config.altFormat:"\\W\\e\\e\\k #W, Y"},onReady:[n,a,function(){e.loadedPlugins.push("weekSelect")}],onDestroy:o}}}return e}))})(si);const ci=si.exports;function li(t,e={}){const i=t.mode==="week"?[new ci({})]:[];const a=di(t.mode);return{...e,locale:t.locale,plugins:i,allowInput:true,altInput:true,prevArrow:"←",nextArrow:"→",dateFormat:a,altFormat:t.format,ariaDateFormat:t.format,mode:t.mode==="daterange"?"range":"single",minDate:t.min,maxDate:t.max,enableTime:t.mode==="time"||t.mode==="datetime",noCalendar:t.mode==="time",weekNumbers:true,minuteIncrement:t.step,clickOpens:!t.disabled&&!t.readonly,appendTo:t.appendTo,position:t.position?t.position:"auto",onReady:(e,i,a)=>{for(const e in t.nativePickerAttributes){const i=t.nativePickerAttributes[e];a.calendarContainer.setAttribute(e,i)}if(t.appendTo&&typeof t.onReady==="function"){t.onReady(e,i,a)}},onClose:function(e,i,a){if(t.mode==="daterange"&&e.length<2){a.clear()}},onChange:(e,i,r)=>{let n=i||undefined;if(t.mode==="daterange"){if(e.length<2){return}else{const t=e[0];const i=e[1];i.setHours(23);i.setMinutes(59);i.setSeconds(59);n=`${r.formatDate(t,a)} - ${r.formatDate(i,a)}`}}else if(t.mode==="week"){n=e[0]?r.config.getWeek(e[0]).toString():undefined}t.applyChange(n)}}}function di(t){if(t==="week"){return"W"}else if(t==="time"){return"H:i"}else{return"Z"}}function hi(t,e){const i=new Date(2e3,1,3,16,5,6);const a={year:"numeric",month:"2-digit",day:"2-digit"};const r={hour:"2-digit",minute:"2-digit"};return e==="week"?"W":new Intl.DateTimeFormat(t,{date:a,time:r,datetime:{...a,...r},daterange:a}[e]).format(i).replace("2000","Y").replace("00","y").replace("02","m").replace("03","d").replace("04","h").replace("16","H").replace("05","i").replace(/AM|PM/i,"K")}function fi(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function ui(t){const e=new Intl.Locale(t);const i=e.getWeekInfo?.()??e.weekInfo;return i?.firstDay??1}function pi(t,e="long"){const i=new Date;const a=(i.getUTCDate()-i.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(i.getTime()).setUTCDate(a+t))))}function bi(t,e="long"){const i=new Date(0);const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(i.getTime()).setUTCMonth(t))))}function mi(t){return{firstDayOfWeek:ui(t),rangeSeparator:" - ",weekAbbreviation:"",yearAriaLabel:D.t("datepicker.year"),monthAriaLabel:D.t("datepicker.month"),hourAriaLabel:D.t("datepicker.hour"),minuteAriaLabel:D.t("datepicker.minute"),toggleTitle:D.t("datepicker.toggle"),scrollTitle:D.t("datepicker.scroll"),time_24hr:!fi(t),weekdays:{shorthand:pi(t,"short"),longhand:pi(t,"long")},months:{shorthand:bi(t,"short"),longhand:bi(t,"long")}}}const gi=Math.min;const vi=Math.max;const yi=Math.round;const ki=Math.floor;const xi=t=>({x:t,y:t});const wi={left:"right",right:"left",bottom:"top",top:"bottom"};const zi={start:"end",end:"start"};function Di(t,e,i){return vi(t,gi(e,i))}function Ii(t,e){return typeof t==="function"?t(e):t}function Mi(t){return t.split("-")[0]}function Ri(t){return t.split("-")[1]}function Ci(t){return t==="x"?"y":"x"}function Ai(t){return t==="y"?"height":"width"}function Si(t){return["top","bottom"].includes(Mi(t))?"y":"x"}function Ti(t){return Ci(Si(t))}function Fi(t,e,i){if(i===void 0){i=false}const a=Ri(t);const r=Ti(t);const n=Ai(r);let o=r==="x"?a===(i?"end":"start")?"right":"left":a==="start"?"bottom":"top";if(e.reference[n]>e.floating[n]){o=Ni(o)}return[o,Ni(o)]}function Bi(t){const e=Ni(t);return[$i(t),e,$i(e)]}function $i(t){return t.replace(/start|end/g,(t=>zi[t]))}function Ei(t,e,i){const a=["left","right"];const r=["right","left"];const n=["top","bottom"];const o=["bottom","top"];switch(t){case"top":case"bottom":if(i)return e?r:a;return e?a:r;case"left":case"right":return e?n:o;default:return[]}}function Oi(t,e,i,a){const r=Ri(t);let n=Ei(Mi(t),i==="start",a);if(r){n=n.map((t=>t+"-"+r));if(e){n=n.concat(n.map($i))}}return n}function Ni(t){return t.replace(/left|right|bottom|top/g,(t=>wi[t]))}function Wi(t){return{top:0,right:0,bottom:0,left:0,...t}}function Li(t){return typeof t!=="number"?Wi(t):{top:t,right:t,bottom:t,left:t}}function ji(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Pi(t,e,i){let{reference:a,floating:r}=t;const n=Si(e);const o=Ti(e);const s=Ai(o);const c=Mi(e);const l=n==="y";const d=a.x+a.width/2-r.width/2;const h=a.y+a.height/2-r.height/2;const f=a[s]/2-r[s]/2;let u;switch(c){case"top":u={x:d,y:a.y-r.height};break;case"bottom":u={x:d,y:a.y+a.height};break;case"right":u={x:a.x+a.width,y:h};break;case"left":u={x:a.x-r.width,y:h};break;default:u={x:a.x,y:a.y}}switch(Ri(e)){case"start":u[o]-=f*(i&&l?-1:1);break;case"end":u[o]+=f*(i&&l?-1:1);break}return u}const Yi=async(t,e,i)=>{const{placement:a="bottom",strategy:r="absolute",middleware:n=[],platform:o}=i;const s=n.filter(Boolean);const c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:r});let{x:d,y:h}=Pi(l,a,c);let f=a;let u={};let p=0;for(let i=0;it<=0))){var I,M;const t=(((I=n.flip)==null?void 0:I.index)||0)+1;const e=x[t];if(e){return{data:{index:t,overflows:D},reset:{placement:e}}}let i=(M=D.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:M.placement;if(!i){switch(u){case"bestFit":{var R;const t=(R=D.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:R[0];if(t){i=t}break}case"initialPlacement":i=s;break}}if(r!==i){return{reset:{placement:i}}}}return{}}}};async function _i(t,e){const{placement:i,platform:a,elements:r}=t;const n=await(a.isRTL==null?void 0:a.isRTL(r.floating));const o=Mi(i);const s=Ri(i);const c=Si(i)==="y";const l=["left","top"].includes(o)?-1:1;const d=n&&c?-1:1;const h=Ii(e,t);let{mainAxis:f,crossAxis:u,alignmentAxis:p}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};if(s&&typeof p==="number"){u=s==="end"?p*-1:p}return c?{x:u*d,y:f*l}:{x:f*l,y:u*d}}const Ki=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(e){var i,a;const{x:r,y:n,placement:o,middlewareData:s}=e;const c=await _i(e,t);if(o===((i=s.offset)==null?void 0:i.placement)&&(a=s.arrow)!=null&&a.alignmentOffset){return{}}return{x:r+c.x,y:n+c.y,data:{...c,placement:o}}}}};const Vi=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(e){const{x:i,y:a,placement:r}=e;const{mainAxis:n=true,crossAxis:o=false,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...c}=Ii(t,e);const l={x:i,y:a};const d=await Hi(e,c);const h=Si(Mi(r));const f=Ci(h);let u=l[f];let p=l[h];if(n){const t=f==="y"?"top":"left";const e=f==="y"?"bottom":"right";const i=u+d[t];const a=u-d[e];u=Di(i,u,a)}if(o){const t=h==="y"?"top":"left";const e=h==="y"?"bottom":"right";const i=p+d[t];const a=p-d[e];p=Di(i,p,a)}const b=s.fn({...e,[f]:u,[h]:p});return{...b,data:{x:b.x-i,y:b.y-a}}}}};const qi=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(e){const{placement:i,rects:a,platform:r,elements:n}=e;const{apply:o=(()=>{}),...s}=Ii(t,e);const c=await Hi(e,s);const l=Mi(i);const d=Ri(i);const h=Si(i)==="y";const{width:f,height:u}=a.floating;let p;let b;if(l==="top"||l==="bottom"){p=l;b=d===(await(r.isRTL==null?void 0:r.isRTL(n.floating))?"start":"end")?"left":"right"}else{b=l;p=d==="end"?"top":"bottom"}const m=u-c[p];const g=f-c[b];const v=!e.middlewareData.shift;let y=m;let k=g;if(h){const t=f-c.left-c.right;k=d||v?gi(g,t):t}else{const t=u-c.top-c.bottom;y=d||v?gi(m,t):t}if(v&&!d){const t=vi(c.left,0);const e=vi(c.right,0);const i=vi(c.top,0);const a=vi(c.bottom,0);if(h){k=f-2*(t!==0||e!==0?t+e:vi(c.left,c.right))}else{y=u-2*(i!==0||a!==0?i+a:vi(c.top,c.bottom))}}await o({...e,availableWidth:k,availableHeight:y});const x=await r.getDimensions(n.floating);if(f!==x.width||u!==x.height){return{reset:{rects:true}}}return{}}}};function Ji(t){if(Xi(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function Gi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Zi(t){var e;return(e=(Xi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xi(t){return t instanceof Node||t instanceof Gi(t).Node}function Qi(t){return t instanceof Element||t instanceof Gi(t).Element}function ta(t){return t instanceof HTMLElement||t instanceof Gi(t).HTMLElement}function ea(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof Gi(t).ShadowRoot}function ia(t){const{overflow:e,overflowX:i,overflowY:a,display:r}=ca(t);return/auto|scroll|overlay|hidden|clip/.test(e+a+i)&&!["inline","contents"].includes(r)}function aa(t){return["table","td","th"].includes(Ji(t))}function ra(t){const e=oa();const i=ca(t);return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":false)||!e&&(i.backdropFilter?i.backdropFilter!=="none":false)||!e&&(i.filter?i.filter!=="none":false)||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function na(t){let e=da(t);while(ta(e)&&!sa(e)){if(ra(e)){return e}else{e=da(e)}}return null}function oa(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function sa(t){return["html","body","#document"].includes(Ji(t))}function ca(t){return Gi(t).getComputedStyle(t)}function la(t){if(Qi(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function da(t){if(Ji(t)==="html"){return t}const e=t.assignedSlot||t.parentNode||ea(t)&&t.host||Zi(t);return ea(e)?e.host:e}function ha(t){const e=da(t);if(sa(e)){return t.ownerDocument?t.ownerDocument.body:t.body}if(ta(e)&&ia(e)){return e}return ha(e)}function fa(t,e,i){var a;if(e===void 0){e=[]}if(i===void 0){i=true}const r=ha(t);const n=r===((a=t.ownerDocument)==null?void 0:a.body);const o=Gi(r);if(n){return e.concat(o,o.visualViewport||[],ia(r)?r:[],o.frameElement&&i?fa(o.frameElement):[])}return e.concat(r,fa(r,[],i))}function ua(t){const e=ca(t);let i=parseFloat(e.width)||0;let a=parseFloat(e.height)||0;const r=ta(t);const n=r?t.offsetWidth:i;const o=r?t.offsetHeight:a;const s=yi(i)!==n||yi(a)!==o;if(s){i=n;a=o}return{width:i,height:a,$:s}}function pa(t){return!Qi(t)?t.contextElement:t}function ba(t){const e=pa(t);if(!ta(e)){return xi(1)}const i=e.getBoundingClientRect();const{width:a,height:r,$:n}=ua(e);let o=(n?yi(i.width):i.width)/a;let s=(n?yi(i.height):i.height)/r;if(!o||!Number.isFinite(o)){o=1}if(!s||!Number.isFinite(s)){s=1}return{x:o,y:s}}const ma=xi(0);function ga(t){const e=Gi(t);if(!oa()||!e.visualViewport){return ma}return{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function va(t,e,i){if(e===void 0){e=false}if(!i||e&&i!==Gi(t)){return false}return e}function ya(t,e,i,a){if(e===void 0){e=false}if(i===void 0){i=false}const r=t.getBoundingClientRect();const n=pa(t);let o=xi(1);if(e){if(a){if(Qi(a)){o=ba(a)}}else{o=ba(t)}}const s=va(n,i,a)?ga(n):xi(0);let c=(r.left+s.x)/o.x;let l=(r.top+s.y)/o.y;let d=r.width/o.x;let h=r.height/o.y;if(n){const t=Gi(n);const e=a&&Qi(a)?Gi(a):a;let i=t;let r=i.frameElement;while(r&&a&&e!==i){const t=ba(r);const e=r.getBoundingClientRect();const a=ca(r);const n=e.left+(r.clientLeft+parseFloat(a.paddingLeft))*t.x;const o=e.top+(r.clientTop+parseFloat(a.paddingTop))*t.y;c*=t.x;l*=t.y;d*=t.x;h*=t.y;c+=n;l+=o;i=Gi(r);r=i.frameElement}}return ji({width:d,height:h,x:c,y:l})}const ka=[":popover-open",":modal"];function xa(t){return ka.some((e=>{try{return t.matches(e)}catch(t){return false}}))}function wa(t){let{elements:e,rect:i,offsetParent:a,strategy:r}=t;const n=r==="fixed";const o=Zi(a);const s=e?xa(e.floating):false;if(a===o||s&&n){return i}let c={scrollLeft:0,scrollTop:0};let l=xi(1);const d=xi(0);const h=ta(a);if(h||!h&&!n){if(Ji(a)!=="body"||ia(o)){c=la(a)}if(ta(a)){const t=ya(a);l=ba(a);d.x=t.x+a.clientLeft;d.y=t.y+a.clientTop}}return{width:i.width*l.x,height:i.height*l.y,x:i.x*l.x-c.scrollLeft*l.x+d.x,y:i.y*l.y-c.scrollTop*l.y+d.y}}function za(t){return Array.from(t.getClientRects())}function Da(t){return ya(Zi(t)).left+la(t).scrollLeft}function Ia(t){const e=Zi(t);const i=la(t);const a=t.ownerDocument.body;const r=vi(e.scrollWidth,e.clientWidth,a.scrollWidth,a.clientWidth);const n=vi(e.scrollHeight,e.clientHeight,a.scrollHeight,a.clientHeight);let o=-i.scrollLeft+Da(t);const s=-i.scrollTop;if(ca(a).direction==="rtl"){o+=vi(e.clientWidth,a.clientWidth)-r}return{width:r,height:n,x:o,y:s}}function Ma(t,e){const i=Gi(t);const a=Zi(t);const r=i.visualViewport;let n=a.clientWidth;let o=a.clientHeight;let s=0;let c=0;if(r){n=r.width;o=r.height;const t=oa();if(!t||t&&e==="fixed"){s=r.offsetLeft;c=r.offsetTop}}return{width:n,height:o,x:s,y:c}}function Ra(t,e){const i=ya(t,true,e==="fixed");const a=i.top+t.clientTop;const r=i.left+t.clientLeft;const n=ta(t)?ba(t):xi(1);const o=t.clientWidth*n.x;const s=t.clientHeight*n.y;const c=r*n.x;const l=a*n.y;return{width:o,height:s,x:c,y:l}}function Ca(t,e,i){let a;if(e==="viewport"){a=Ma(t,i)}else if(e==="document"){a=Ia(Zi(t))}else if(Qi(e)){a=Ra(e,i)}else{const i=ga(t);a={...e,x:e.x-i.x,y:e.y-i.y}}return ji(a)}function Aa(t,e){const i=da(t);if(i===e||!Qi(i)||sa(i)){return false}return ca(i).position==="fixed"||Aa(i,e)}function Sa(t,e){const i=e.get(t);if(i){return i}let a=fa(t,[],false).filter((t=>Qi(t)&&Ji(t)!=="body"));let r=null;const n=ca(t).position==="fixed";let o=n?da(t):t;while(Qi(o)&&!sa(o)){const e=ca(o);const i=ra(o);if(!i&&e.position==="fixed"){r=null}const s=n?!i&&!r:!i&&e.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ia(o)&&!i&&Aa(t,o);if(s){a=a.filter((t=>t!==o))}else{r=e}o=da(o)}e.set(t,a);return a}function Ta(t){let{element:e,boundary:i,rootBoundary:a,strategy:r}=t;const n=i==="clippingAncestors"?Sa(e,this._c):[].concat(i);const o=[...n,a];const s=o[0];const c=o.reduce(((t,i)=>{const a=Ca(e,i,r);t.top=vi(a.top,t.top);t.right=gi(a.right,t.right);t.bottom=gi(a.bottom,t.bottom);t.left=vi(a.left,t.left);return t}),Ca(e,s,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fa(t){const{width:e,height:i}=ua(t);return{width:e,height:i}}function Ba(t,e,i){const a=ta(e);const r=Zi(e);const n=i==="fixed";const o=ya(t,true,n,e);let s={scrollLeft:0,scrollTop:0};const c=xi(0);if(a||!a&&!n){if(Ji(e)!=="body"||ia(r)){s=la(e)}if(a){const t=ya(e,true,n,e);c.x=t.x+e.clientLeft;c.y=t.y+e.clientTop}else if(r){c.x=Da(r)}}const l=o.left+s.scrollLeft-c.x;const d=o.top+s.scrollTop-c.y;return{x:l,y:d,width:o.width,height:o.height}}function $a(t,e){if(!ta(t)||ca(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function Ea(t,e){const i=Gi(t);if(!ta(t)||xa(t)){return i}let a=$a(t,e);while(a&&aa(a)&&ca(a).position==="static"){a=$a(a,e)}if(a&&(Ji(a)==="html"||Ji(a)==="body"&&ca(a).position==="static"&&!ra(a))){return i}return a||na(t)||i}const Oa=async function(t){const e=this.getOffsetParent||Ea;const i=this.getDimensions;return{reference:Ba(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}};function Na(t){return ca(t).direction==="rtl"}const Wa={convertOffsetParentRelativeRectToViewportRelativeRect:wa,getDocumentElement:Zi,getClippingRect:Ta,getOffsetParent:Ea,getElementRects:Oa,getClientRects:za,getDimensions:Fa,getScale:ba,isElement:Qi,isRTL:Na};function La(t,e){let i=null;let a;const r=Zi(t);function n(){var t;clearTimeout(a);(t=i)==null||t.disconnect();i=null}function o(s,c){if(s===void 0){s=false}if(c===void 0){c=1}n();const{left:l,top:d,width:h,height:f}=t.getBoundingClientRect();if(!s){e()}if(!h||!f){return}const u=ki(d);const p=ki(r.clientWidth-(l+h));const b=ki(r.clientHeight-(d+f));const m=ki(l);const g=-u+"px "+-p+"px "+-b+"px "+-m+"px";const v={rootMargin:g,threshold:vi(0,gi(1,c))||1};let y=true;function k(t){const e=t[0].intersectionRatio;if(e!==c){if(!y){return o()}if(!e){a=setTimeout((()=>{o(false,1e-7)}),100)}else{o(false,e)}}y=false}try{i=new IntersectionObserver(k,{...v,root:r.ownerDocument})}catch(t){i=new IntersectionObserver(k,v)}i.observe(t)}o(true);return n}function ja(t,e,i,a){if(a===void 0){a={}}const{ancestorScroll:r=true,ancestorResize:n=true,elementResize:o=typeof ResizeObserver==="function",layoutShift:s=typeof IntersectionObserver==="function",animationFrame:c=false}=a;const l=pa(t);const d=r||n?[...l?fa(l):[],...fa(e)]:[];d.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:true});n&&t.addEventListener("resize",i)}));const h=l&&s?La(l,i):null;let f=-1;let u=null;if(o){u=new ResizeObserver((t=>{let[a]=t;if(a&&a.target===l&&u){u.unobserve(e);cancelAnimationFrame(f);f=requestAnimationFrame((()=>{var t;(t=u)==null||t.observe(e)}))}i()}));if(l&&!c){u.observe(l)}u.observe(e)}let p;let b=c?ya(t):null;if(c){m()}function m(){const e=ya(t);if(b&&(e.x!==b.x||e.y!==b.y||e.width!==b.width||e.height!==b.height)){i()}b=e;p=requestAnimationFrame(m)}i();return()=>{var t;d.forEach((t=>{r&&t.removeEventListener("scroll",i);n&&t.removeEventListener("resize",i)}));h==null||h();(t=u)==null||t.disconnect();u=null;if(c){cancelAnimationFrame(p)}}}const Pa=Vi;const Ya=Ui;const Ha=qi;const Ua=(t,e,i)=>{const a=new Map;const r={platform:Wa,...i};const n={...r.platform,_c:a};return Yi(t,e,{...r,platform:n})};const _a='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:flex}:host([hidden]){display:none}cat-input{flex:1 1 auto;margin:0}';const Ka=_a;const Va=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.mode="date";this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.step=5;this.attachToElement=false;this.position=undefined;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.nativePickerAttributes=undefined}get input(){return this._input?.shadowRoot?.querySelector("input")??undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);if(this.mode!=="daterange"||t.includes(" - ")){this.catChange.emit(t)}}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>{this.input?this.input.disabled=this.disabled:null;this.pickr=this.initDatepicker(this.input)}))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onMinChanged(){this.pickr?.set("minDate",this.min);this.pickr?.set("maxDate",this.max);if(this.value&&!this.pickr?.selectedDates?.length){this.pickr?.clear()}}async doFocus(t){this._input?.doFocus(t)}async doBlur(){this._input?.doBlur()}render(){return[e("cat-input",{key:"bb983974c17139ee60d88877e398b1c46d672d37",ref:t=>this._input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.value,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatChange:t=>{t.stopPropagation();this.value=t.detail||undefined},onCatFocus:t=>{t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.catBlur.emit(t.detail)}},this.hasSlottedLabel&&e("span",{slot:"label"},e("slot",{name:"label"})),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))),e("div",{key:"c8112214544e0582a1196350a846ddeb063067a3",ref:t=>this._calendarWrapper=t,class:"datepicker-wrapper"})]}initDatepicker(t){if(!t){return}const e=!!oi("cat-dropdown",t);const i=e?{"data-dropdown-no-close":""}:{};return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,appendTo:this.attachToElement?this._calendarWrapper:undefined,nativePickerAttributes:{...i,...this.nativePickerAttributes},position:this.attachToElement?(t,e)=>{this.updatePosition(t,e)}:this.position||undefined,onReady:(e,i,a)=>{ja(t,a.calendarContainer,(()=>this.updatePosition(a,a._input)))},applyChange:t=>this.value=t}))}updatePosition(t,e){if(e){Ua(e,t.calendarContainer,{strategy:"fixed",placement:this.position||"bottom-start",middleware:[Ya()]}).then((({x:e,y:i,placement:a})=>{if(t.calendarContainer){t.calendarContainer.dataset.placement=a;Object.assign(t.calendarContainer.style,{left:`${e}px`,top:`${i}px`,position:"fixed"})}}))}}get hostElement(){return a(this)}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}}};Va.style=Ka;const qa='@charset "UTF-8";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:\'\';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:"pnum";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:"↑";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:"↓";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:"pnum";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:inline-flex}:host>div{display:flex}:host([hidden]){display:none}.datepicker-disabled .flatpickr-days,.datepicker-disabled .flatpickr-time,.datepicker-readonly .flatpickr-days,.datepicker-readonly .flatpickr-time{pointer-events:none}.datepicker-disabled .flatpickr-days{opacity:0.75}.datepicker-disabled .flatpickr-time input,.datepicker-disabled .flatpickr-time .flatpickr-time-separator,.datepicker-disabled .flatpickr-time .flatpickr-am-pm{color:rgb(var(--cat-font-color-muted, 81, 92, 108));opacity:0.75}input{display:none}.flatpickr-calendar{box-shadow:unset;background:unset}';const Ja=qa;const Ga=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.disabled=false;this.max=undefined;this.min=undefined;this.mode="date";this.readonly=false;this.step=5;this.value=undefined;this.nativePickerAttributes=undefined}onValueChanged(t){if(t){this.pickr?.setDate(t,false);this.catChange.emit(t)}else{this.pickr?.clear(false);this.catChange.emit(undefined)}}onDisabledChanged(){this.pickr?.destroy();this.pickr=undefined;setTimeout((()=>this.pickr=this.initDatepicker(this.input)))}componentDidLoad(){this.pickr=this.initDatepicker(this.input)}render(){return e(i,{key:"6f363a4a673603f0c39f5a24b31bb768e804abfc"},e("div",{key:"2c56934aad4d60ea96a6a3c983ae9d1e39c82bde",tabIndex:this.disabled||this.readonly?-1:undefined,class:{"datepicker-wrapper":true,"datepicker-disabled":this.disabled,"datepicker-readonly":this.readonly}},e("input",{key:"6885c1c919af468401dddda38045ab9a8dc26aaf",ref:t=>this.input=t,value:this.value,disabled:this.disabled,readonly:this.readonly})))}initDatepicker(t){if(!t){return}return ni(t,li({locale:mi(D.getLocale()),format:hi(D.getLocale(),this.mode),mode:this.mode,min:this.min,max:this.max,step:this.step,disabled:this.disabled,readonly:this.readonly,nativePickerAttributes:this.nativePickerAttributes??{},applyChange:t=>this.value=t},{...this.disabled?{enable:[]}:{},inline:true}))}static get watchers(){return{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}}};Ga.style=Ja;const Za=125; /*! * tabbable 6.2.0 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE @@ -6,5 +6,5 @@ import{r as t,h as e,H as i,g as a,c as r}from"./p-20919029.js";import{e as n,O /*! * focus-trap 7.5.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE -*/function Tr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Fr(t){for(var e=1;e0){var a=e[e.length-1];if(a!==i){a.pause()}}var r=e.indexOf(i);if(r===-1){e.push(i)}else{e.splice(r,1);e.push(i)}},deactivateTrap:function t(e,i){var a=e.indexOf(i);if(a!==-1){e.splice(a,1)}if(e.length>0){e[e.length-1].unpause()}}};var Nr=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var Wr=function t(e){return(e===null||e===void 0?void 0:e.key)==="Escape"||(e===null||e===void 0?void 0:e.key)==="Esc"||(e===null||e===void 0?void 0:e.keyCode)===27};var Lr=function t(e){return(e===null||e===void 0?void 0:e.key)==="Tab"||(e===null||e===void 0?void 0:e.keyCode)===9};var jr=function t(e){return Lr(e)&&!e.shiftKey};var Pr=function t(e){return Lr(e)&&e.shiftKey};var Yr=function t(e){return setTimeout(e,0)};var Hr=function t(e,i){var a=-1;e.every((function(t,e){if(i(t)){a=e;return false}return true}));return a};var Ur=function t(e){for(var i=arguments.length,a=new Array(i>1?i-1:0),r=1;r1?r-1:0),s=1;s=0){e=a.activeElement}else{var i=o.tabbableGroups[0];var r=i&&i.firstTabbableNode;e=r||d("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var f=function t(){o.containerGroups=o.containers.map((function(t){var e=Mr(t,n.tabbableOptions);var i=Rr(t,n.tabbableOptions);var a=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=i.find((function(t){return Cr(t)}));var s=i.slice().reverse().find((function(t){return Cr(t)}));var c=!!e.find((function(t){return cr(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:i,posTabIndexesFound:c,firstTabbableNode:a,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function t(a){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(a);if(n<0){if(r){return i.slice(i.indexOf(a)+1).find((function(t){return Cr(t)}))}return i.slice(0,i.indexOf(a)).reverse().find((function(t){return Cr(t)}))}return e[n+(r?1:-1)]}}}));o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0}));if(o.tabbableGroups.length<=0&&!d("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(o.containerGroups.find((function(t){return t.posTabIndexesFound}))&&o.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var u=function t(e){var i=e.activeElement;if(!i){return}if(i.shadowRoot&&i.shadowRoot.activeElement!==null){return t(i.shadowRoot)}return i};var p=function t(e){if(e===false){return}if(e===u(document)){return}if(!e||!e.focus){t(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(Nr(e)){e.select()}};var b=function t(e){var i=d("setReturnFocus",e);return i?i:i===false?false:e};var m=function t(e){var i=e.target,a=e.event,r=e.isBackward,s=r===void 0?false:r;i=i||_r(a);f();var c=null;if(o.tabbableGroups.length>0){var h=l(i,a);var u=h>=0?o.containerGroups[h]:undefined;if(h<0){if(s){c=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{c=o.tabbableGroups[0].firstTabbableNode}}else if(s){var p=Hr(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return i===e}));if(p<0&&(u.container===i||Sr(i,n.tabbableOptions)&&!Cr(i,n.tabbableOptions)&&!u.nextTabbableNode(i,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=cr(i)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!Lr(a)){c=u.nextTabbableNode(i,false)}}else{var g=Hr(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return i===e}));if(g<0&&(u.container===i||Sr(i,n.tabbableOptions)&&!Cr(i,n.tabbableOptions)&&!u.nextTabbableNode(i))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=cr(i)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!Lr(a)){c=u.nextTabbableNode(i)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var i=_r(e);if(l(i,e)>=0){return}if(Ur(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(Ur(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var i=_r(e);var a=l(i,e)>=0;if(a||i instanceof Document){if(a){o.mostRecentlyFocusedNode=i}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(cr(o.mostRecentlyFocusedNode)>0){var c=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[c].tabbableNodes;if(d.length>0){var f=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(f>=0){if(n.isKeyForward(o.recentNavEvent)){if(f+1=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return cr(t)>0}))}))){s=false}}}else{s=false}if(s){r=m({target:o.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(o.recentNavEvent)})}if(r){p(r)}else{p(o.mostRecentlyFocusedNode||h())}}o.recentNavEvent=undefined};var y=function t(e){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var a=m({event:e,isBackward:i});if(a){if(Lr(e)){e.preventDefault()}p(a)}};var k=function t(e){if(Wr(e)&&Ur(n.escapeDeactivates,e)!==false){e.preventDefault();s.deactivate();return}if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){var i=_r(e);if(l(i,e)>=0){return}if(Ur(n.clickOutsideDeactivates,e)){return}if(Ur(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}Or.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?Yr((function(){p(h())})):p(h());a.addEventListener("focusin",v,true);a.addEventListener("mousedown",g,{capture:true,passive:false});a.addEventListener("touchstart",g,{capture:true,passive:false});a.addEventListener("click",x,{capture:true,passive:false});a.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}a.removeEventListener("focusin",v,true);a.removeEventListener("mousedown",g,true);a.removeEventListener("touchstart",g,true);a.removeEventListener("click",x,true);a.removeEventListener("keydown",k,true);return s};var D=function t(e){var i=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(i){p(h())}};var I=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var M=function t(){if(!I){return}I.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){I.observe(t,{subtree:true,childList:true})}))}};s={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var i=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=a.activeElement;i===null||i===void 0||i();var s=function t(){if(n){f()}w();M();r===null||r===void 0||r()};if(n){n(o.containers.concat()).then(s,s);return this}s();return this},deactivate:function t(e){if(!o.active){return this}var i=Fr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();Or.deactivateTrap(r,s);var a=c(i,"onDeactivate");var l=c(i,"onPostDeactivate");var d=c(i,"checkCanReturnFocus");var h=c(i,"returnFocus","returnFocusOnDeactivate");a===null||a===void 0||a();var f=function t(){Yr((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===void 0||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(f,f);return this}f();return this},pause:function t(e){if(o.paused||!o.active){return this}var i=c(e,"onPause");var a=c(e,"onPostPause");o.paused=true;i===null||i===void 0||i();z();M();a===null||a===void 0||a();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var i=c(e,"onUnpause");var a=c(e,"onPostUnpause");o.paused=false;i===null||i===void 0||i();f();w();M();a===null||a===void 0||a();return this},updateContainerElements:function t(e){var i=[].concat(e).filter(Boolean);o.containers=i.map((function(t){return typeof t==="string"?a.querySelector(t):t}));if(o.active){f()}M();return this}};s.updateContainerElements(e);return s};const qr=t=>(t?Mr(t,{includeContainer:true,getShadowRoot:true}):[]).shift();const Jr=":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding:0.25rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);display:none;opacity:0;transform:scale(0.9);transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform-origin:bottom}.content[data-placement^=top-start]{transform-origin:bottom left}.content[data-placement^=top-end]{transform-origin:bottom right}.content[data-placement^=left]{transform-origin:right}.content[data-placement^=left-start]{transform-origin:right top}.content[data-placement^=left-end]{transform-origin:right bottom}.content[data-placement^=right]{transform-origin:left}.content[data-placement^=right-start]{transform-origin:left top}.content[data-placement^=right-end]{transform-origin:left bottom}.content[data-placement^=bottom]{transform-origin:top}.content[data-placement^=bottom-start]{transform-origin:top left}.content[data-placement^=bottom-end]{transform-origin:top right}.content.show{opacity:1;transform:scale(1);transition:transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 250ms cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";const Gr=Jr;let Zr=0;const Xr=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=Zr++;this.isOpen=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false}clickHandler(t){if(!this.trigger){this.initTrigger();this.toggle()}const e=t.composedPath();if(!this.noAutoClose&&e.includes(this.content)&&t.target?.slot!=="trigger"&&!e.slice(0,e.indexOf(this.content)).find((t=>this.hasAttribute(t,"data-dropdown-no-close")))){this.close()}}async toggle(){this.isOpen?this.close():this.open()}async open(){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):Vr(this.content,{tabbableOptions:{getShadowRoot:true},allowOutsideClick:true,clickOutsideDeactivates:t=>!this.noAutoClose&&!t.composedPath().includes(this.content)&&!t.composedPath().find((t=>this.hasAttribute(t,"data-dropdown-no-close"))),onPostDeactivate:()=>this.close(),onPostActivate:()=>this.catOpen.emit(),setReturnFocus:t=>this.trigger||t,isKeyForward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowRight"||this.arrowNavigation==="vertical"&&t.key==="ArrowDown"){t.preventDefault();return true}return t.key==="Tab"},isKeyBackward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowLeft"||this.arrowNavigation==="vertical"&&t.key==="ArrowUp"){t.preventDefault();return true}return t.key==="Tab"&&t.shiftKey},initialFocus:()=>this.noInitialFocus?false:undefined});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;this.content.classList.remove("show");setTimeout((()=>{this.isOpen=false;this.content.classList.remove("show");this.content.style.display="";this.trigger?.setAttribute("aria-expanded","false");this.trap?.deactivate();this.catClose.emit()}),Za)}render(){return e(i,{key:"6cde42e7f7bfc2df858b7179157a1f52e0c23e0e"},e("slot",{key:"91633464f448a8142f52b6e1e62420974a929e84",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"2ed9bd2dcc58b83ec1e7781959456e67d9397c48",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"a91710cd8455cb006f60e48dd49aee7f6d114877",name:"content"})))}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();this.trigger.setAttribute("aria-haspopup","true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));ja(this.trigger,this.content,(()=>this.update()))}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const i=e.shift();t=i?.hasAttribute("data-trigger")?i:i?.querySelector("[data-trigger]")??undefined}if(!t){t=qr(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(){if(this.trigger){const t=this.noResize?[]:[Ha({padding:Xr.OFFSET,apply({availableWidth:t,availableHeight:e,elements:i}){Object.assign(i.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Ua(this.trigger,this.content,{strategy:"fixed",placement:this.placement,middleware:[Ki(Xr.OFFSET),Ya(),...t]}).then((({x:t,y:e,placement:i})=>{this.content.dataset.placement=i;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};Xr.OFFSET=4;Xr.style=Gr;const Qr=":host{display:block}";const tn=Qr;const en=class{constructor(e){t(this,e);this.formElements=[];this.requiredMarker="auto";this.horizontal=false;this.labelSize=undefined}onRequiredMarkerChanged(t){const e=t==="auto"?this.calculate(this.formElements):t;this.formElements.forEach((t=>!t.requiredMarker?.endsWith("!")&&(t.requiredMarker=e)))}onHorizontalChanged(t){this.formElements.forEach((e=>{e.horizontal=t}))}render(){return e(i,{key:"6892a4f36f418d431b6006518c44bf2b58e70f70",style:{"--label-size":this.labelSize}},e("slot",{key:"908b2720b504ce9dfb3a491aa3bbe092a3d2e0cf",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-input, cat-textarea, cat-select, cat-datepicker"));this.onRequiredMarkerChanged(this.requiredMarker);this.onHorizontalChanged(this.horizontal)}calculate(t){const e=t.filter((t=>!t.required)).length;const i=t.length-e;return i>=e?"optional":"required"}get hostElement(){return a(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};en.style=tn;const an=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;height:1em;width:calc(var(--cat-icon-ratio, 1) * 1em)}.icon-xs svg{font-size:0.75rem}.icon-s svg{font-size:1rem}.icon-m svg{font-size:1.25rem}.icon-l svg{font-size:1.5rem}.icon-xl svg{font-size:1.75rem}";const rn=an;const nn=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"66938702e645f5bc12ca9a4592af24ac46b40c52",innerHTML:this.iconSrc||(this.icon?M.getIcon(this.icon):""),"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",part:"icon",class:{icon:true,[`icon-${this.size}`]:this.size!=="inline"}})}};nn.style=rn;var on=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var sn=function(t,e,i,a,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=i>=0?i:2;d.numeralThousandsGroupStyle=a||sn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!s;d.tailPrefix=!!c;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};sn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};sn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,i,a,r,n,o="";t=t.replace(/[A-Za-z]/g,"").replace(e.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",e.numeralPositiveOnly?"":"-").replace("M",e.numeralDecimalMark);if(e.stripLeadingZeroes){t=t.replace(/^(-)?0+(?=\d)/,"$1")}a=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=a+e.prefix}else{r=e.prefix+a}}else{r=a}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){i=t.split(e.numeralDecimalMark);n=i[0];o=e.numeralDecimalMark+i[1].slice(0,e.numeralDecimalScale)}if(a==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case sn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case sn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case sn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return a+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var cn=sn;var ln=function(t,e,i){var a=this;a.date=[];a.blocks=[];a.datePattern=t;a.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(a.dateMin.length===2)a.dateMin.unshift(0);a.dateMax=i.split("-").reverse().map((function(t){return parseInt(t,10)}));if(a.dateMax.length===2)a.dateMax.unshift(0);a.initBlocks()};ln.prototype={initBlocks:function(){var t=this;t.datePattern.forEach((function(e){if(e==="Y"){t.blocks.push(4)}else{t.blocks.push(2)}}))},getISOFormatDate:function(){var t=this,e=t.date;return e[2]?e[2]+"-"+t.addLeadingZero(e[1])+"-"+t.addLeadingZero(e[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(t){var e=this,i="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(a,r){if(t.length>0){var n=t.slice(0,a),o=n.slice(0,1),s=t.slice(a);switch(e.datePattern[r]){case"d":if(n==="00"){n="01"}else if(parseInt(o,10)>3){n="0"+o}else if(parseInt(n,10)>31){n="31"}break;case"m":if(n==="00"){n="01"}else if(parseInt(o,10)>1){n="0"+o}else if(parseInt(n,10)>12){n="12"}break}i+=n;t=s}}));return this.getFixedDateString(i)},getFixedDateString:function(t){var e=this,i=e.datePattern,a=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&i[0].toLowerCase()!=="y"&&i[1].toLowerCase()!=="y"){s=i[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);a=this.getFixedDate(d,h,0)}if(t.length===8){i.forEach((function(t,e){switch(t){case"d":r=e;break;case"m":n=e;break;default:o=e;break}}));l=o*2;s=r<=o?r*2:r*2+2;c=n<=o?n*2:n*2+2;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;a=this.getFixedDate(d,h,f)}if(t.length===4&&(i[0]==="y"||i[1]==="y")){c=i[0]==="m"?0:2;l=2-c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);u=t.slice(l,l+2).length===2;a=[0,h,f]}if(t.length===6&&(i[0]==="Y"||i[1]==="Y")){c=i[0]==="m"?0:4;l=2-.5*c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;a=[0,h,f]}a=e.getRangeFixedDate(a);e.date=a;var p=a.length===0?t:i.reduce((function(t,i){switch(i){case"d":return t+(a[0]===0?"":e.addLeadingZero(a[0]));case"m":return t+(a[1]===0?"":e.addLeadingZero(a[1]));case"y":return t+(u?e.addLeadingZeroForYear(a[2],false):"");case"Y":return t+(u?e.addLeadingZeroForYear(a[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,i=e.datePattern,a=e.dateMin||[],r=e.dateMax||[];if(!t.length||a.length<3&&r.length<3)return t;if(i.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]t[2]||a[2]===t[2]&&(a[1]>t[1]||a[1]===t[1]&&a[0]>t[0])))return a;return t},getFixedDate:function(t,e,i){t=Math.min(t,31);e=Math.min(e,12);i=parseInt(i||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(i)?29:28:30)}return[t,e,i]},isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},addLeadingZero:function(t){return(t<10?"0":"")+t},addLeadingZeroForYear:function(t,e){if(e){return(t<10?"000":t<100?"00":t<1e3?"0":"")+t}return(t<10?"0":"")+t}};var dn=ln;var hn=function(t,e){var i=this;i.time=[];i.blocks=[];i.timePattern=t;i.timeFormat=e;i.initBlocks()};hn.prototype={initBlocks:function(){var t=this;t.timePattern.forEach((function(){t.blocks.push(2)}))},getISOFormatTime:function(){var t=this,e=t.time;return e[2]?t.addLeadingZero(e[0])+":"+t.addLeadingZero(e[1])+":"+t.addLeadingZero(e[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var t=this;if(String(t.timeFormat)==="12"){return{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}}return{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(t){var e=this,i="";t=t.replace(/[^\d]/g,"");var a=e.getTimeFormatOptions();e.blocks.forEach((function(r,n){if(t.length>0){var o=t.slice(0,r),s=o.slice(0,1),c=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(s,10)>a.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>a.maxHours){o=a.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>a.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>a.maxMinutes){o=a.maxMinutes+""}break}i+=o;t=c}}));return this.getFixedTimeString(i)},getFixedTimeString:function(t){var e=this,i=e.timePattern,a=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;if(t.length===6){i.forEach((function(t,e){switch(t){case"s":r=e*2;break;case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;c=n;s=r;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);a=this.getFixedTime(f,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){i.forEach((function(t,e){switch(t){case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;c=n;d=0;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);a=this.getFixedTime(f,h,d)}e.time=a;return a.length===0?t:i.reduce((function(t,i){switch(i){case"s":return t+e.addLeadingZero(a[2]);case"m":return t+e.addLeadingZero(a[1]);case"h":return t+e.addLeadingZero(a[0])}}),"")},getFixedTime:function(t,e,i){i=Math.min(parseInt(i||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,i]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var fn=hn;var un=function(t,e){var i=this;i.delimiter=e||e===""?e:" ";i.delimiterRE=e?new RegExp("\\"+e,"g"):"";i.formatter=t};un.prototype={setFormatter:function(t){this.formatter=t},format:function(t){var e=this;e.formatter.clear();t=t.replace(/[^\d+]/g,"");t=t.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+");t=t.replace(e.delimiterRE,"");var i="",a,r=false;for(var n=0,o=t.length;n0,c="";if(i===0){return t}e.forEach((function(e,l){if(t.length>0){var d=t.slice(0,e),h=t.slice(e);if(s){c=r[n?l-1:l]||c}else{c=a}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l0?e.numeralIntegerScale:0;t.numeralDecimalScale=e.numeralDecimalScale>=0?e.numeralDecimalScale:2;t.numeralDecimalMark=e.numeralDecimalMark||".";t.numeralThousandsGroupStyle=e.numeralThousandsGroupStyle||"thousand";t.numeralPositiveOnly=!!e.numeralPositiveOnly;t.stripLeadingZeroes=e.stripLeadingZeroes!==false;t.signBeforePrefix=!!e.signBeforePrefix;t.tailPrefix=!!e.tailPrefix;t.swapHiddenInput=!!e.swapHiddenInput;t.numericOnly=t.creditCard||t.date||!!e.numericOnly;t.uppercase=!!e.uppercase;t.lowercase=!!e.lowercase;t.prefix=t.creditCard||t.date?"":e.prefix||"";t.noImmediatePrefix=!!e.noImmediatePrefix;t.prefixLength=t.prefix.length;t.rawValueTrimPrefix=!!e.rawValueTrimPrefix;t.copyDelimiter=!!e.copyDelimiter;t.initValue=e.initValue!==undefined&&e.initValue!==null?e.initValue.toString():"";t.delimiter=e.delimiter||e.delimiter===""?e.delimiter:e.date?"/":e.time?":":e.numeral?",":e.phone?" ":" ";t.delimiterLength=t.delimiter.length;t.delimiterLazyShow=!!e.delimiterLazyShow;t.delimiters=e.delimiters||[];t.blocks=e.blocks||[];t.blocksLength=t.blocks.length;t.root=typeof on==="object"&&on?on:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var kn=yn;var xn=function(t,e){var i=this;var a=false;if(typeof t==="string"){i.element=document.querySelector(t);a=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){i.element=t[0];a=t.length>1}else{i.element=t}}if(!i.element){throw new Error("[cleave.js] Please check the element")}if(a){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=i.element.value;i.properties=xn.DefaultProperties.assign({},e);i.init()};xn.prototype={init:function(){var t=this,e=t.properties;if(!e.numeral&&!e.phone&&!e.creditCard&&!e.time&&!e.date&&(e.blocksLength===0&&!e.prefix)){t.onInput(e.initValue);return}e.maxLength=xn.Util.getMaxLength(e.blocks);t.isAndroid=xn.Util.isAndroid();t.lastInputValue="";t.isBackward="";t.onChangeListener=t.onChange.bind(t);t.onKeyDownListener=t.onKeyDown.bind(t);t.onFocusListener=t.onFocus.bind(t);t.onCutListener=t.onCut.bind(t);t.onCopyListener=t.onCopy.bind(t);t.initSwapHiddenInput();t.element.addEventListener("input",t.onChangeListener);t.element.addEventListener("keydown",t.onKeyDownListener);t.element.addEventListener("focus",t.onFocusListener);t.element.addEventListener("cut",t.onCutListener);t.element.addEventListener("copy",t.onCopyListener);t.initPhoneFormatter();t.initDateFormatter();t.initTimeFormatter();t.initNumeralFormatter();if(e.initValue||e.prefix&&!e.noImmediatePrefix){t.onInput(e.initValue)}},initSwapHiddenInput:function(){var t=this,e=t.properties;if(!e.swapHiddenInput)return;var i=t.element.cloneNode(true);t.element.parentNode.insertBefore(i,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=i;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new xn.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter)},initTimeFormatter:function(){var t=this,e=t.properties;if(!e.time){return}e.timeFormatter=new xn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=xn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new xn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=xn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new xn.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch(t){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(t){var e=this,i=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=i===8},onChange:function(t){var e=this,i=e.properties,a=xn.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=a.getPostDelimiter(e.lastInputValue,i.delimiter,i.delimiters);if(e.isBackward&&r){i.postDelimiterBackspace=r}else{i.postDelimiterBackspace=false}this.onInput(this.element.value)},onFocus:function(){var t=this,e=t.properties;t.lastInputValue=t.element.value;if(e.prefix&&e.noImmediatePrefix&&!t.element.value){this.onInput(e.prefix)}xn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!xn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!xn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,i=e.properties,a=xn.Util,r=e.element.value,n="";if(!i.copyDelimiter){n=a.stripDelimiters(r,i.delimiter,i.delimiters)}else{n=r}try{if(t.clipboardData){t.clipboardData.setData("Text",n)}else{window.clipboardData.setData("Text",n)}t.preventDefault()}catch(t){}},onInput:function(t){var e=this,i=e.properties,a=xn.Util;var r=a.getPostDelimiter(t,i.delimiter,i.delimiters);if(!i.numeral&&i.postDelimiterBackspace&&!r){t=a.headStr(t,t.length-i.postDelimiterBackspace.length)}if(i.phone){if(i.prefix&&(!i.noImmediatePrefix||t.length)){i.result=i.prefix+i.phoneFormatter.format(t).slice(i.prefix.length)}else{i.result=i.phoneFormatter.format(t)}e.updateValueState();return}if(i.numeral){if(i.prefix&&i.noImmediatePrefix&&t.length===0){i.result=""}else{i.result=i.numeralFormatter.format(t)}e.updateValueState();return}if(i.date){t=i.dateFormatter.getValidatedDate(t)}if(i.time){t=i.timeFormatter.getValidatedTime(t)}t=a.stripDelimiters(t,i.delimiter,i.delimiters);t=a.getPrefixStrippedValue(t,i.prefix,i.prefixLength,i.result,i.delimiter,i.delimiters,i.noImmediatePrefix,i.tailPrefix,i.signBeforePrefix);t=i.numericOnly?a.strip(t,/[^\d]/g):t;t=i.uppercase?t.toUpperCase():t;t=i.lowercase?t.toLowerCase():t;if(i.prefix){if(i.tailPrefix){t=t+i.prefix}else{t=i.prefix+t}if(i.blocksLength===0){i.result=t;e.updateValueState();return}}if(i.creditCard){e.updateCreditCardPropsByValue(t)}t=a.headStr(t,i.maxLength);i.result=a.getFormattedValue(t,i.blocks,i.blocksLength,i.delimiter,i.delimiters,i.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,i=e.properties,a=xn.Util,r;if(a.headStr(i.result,4)===a.headStr(t,4)){return}r=xn.CreditCardDetector.getInfo(t,i.creditCardStrictMode);i.blocks=r.blocks;i.blocksLength=i.blocks.length;i.maxLength=a.getMaxLength(i.blocks);if(i.creditCardType!==r.type){i.creditCardType=r.type;i.onCreditCardTypeChanged.call(e,i.creditCardType)}},updateValueState:function(){var t=this,e=xn.Util,i=t.properties;if(!t.element){return}var a=t.element.selectionEnd;var r=t.element.value;var n=i.result;a=e.getNextCursorPosition(a,r,n,i.delimiter,i.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,a,i.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(i.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,a,i.document,false);t.callOnValueChanged()},callOnValueChanged:function(){var t=this,e=t.properties;e.onValueChanged.call(t,{target:{name:t.element.name,value:e.result,rawValue:t.getRawValue()}})},setPhoneRegionCode:function(t){var e=this,i=e.properties;i.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,i=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(i.numeral){t=t.replace(".",i.numeralDecimalMark)}i.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,i=xn.Util,a=t.element.value;if(e.rawValueTrimPrefix){a=i.getPrefixStrippedValue(a,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){a=e.numeralFormatter.getRawValue(a)}else{a=i.stripDelimiters(a,e.delimiter,e.delimiters)}return a},getISOFormatDate:function(){var t=this,e=t.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this,e=t.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var t=this;t.element.removeEventListener("input",t.onChangeListener);t.element.removeEventListener("keydown",t.onKeyDownListener);t.element.removeEventListener("focus",t.onFocusListener);t.element.removeEventListener("cut",t.onCutListener);t.element.removeEventListener("copy",t.onCopyListener)},toString:function(){return"[Cleave Object]"}};xn.NumeralFormatter=cn;xn.DateFormatter=dn;xn.TimeFormatter=fn;xn.PhoneFormatter=pn;xn.CreditCardDetector=mn;xn.Util=vn;xn.DefaultProperties=kn;(typeof on==="object"&&on?on:window)["Cleave"]=xn;var wn=xn;function zn(t){return t!=null&&`${t}`!=="false"}function Dn(t,e=0){return In(t)?Number(t):e}function In(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Mn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";const Rn=Mn;let Cn=0;const An=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Cn++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.isPasswordShown=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.togglePassword=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.maxLength=undefined;this.min=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.round=false;this.type="text";this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on input",this)}}async doFocus(t){const e=this.input.type==="hidden"?this.findSiblingInput(this.input.nextSibling):this.input;e?.focus(t)}async doBlur(){this.input.blur()}async clear(){this.value="";this.catChange.emit(this.value)}async mask(t){new wn(this.input,t)}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e("div",{key:"34152d1627e62e4852531f9afdb2b0abc3894a78",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"89c3e91d9d041a68389e776f38647aa6360e5ea5",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"ceed5e06d5bfb6eaf425c562422a6cb470c3dea4",class:"input-container"},e("div",{key:"bbd90f6b705d2e9213a45f5f7839370fce830c89",class:"input-outer-wrapper"},e("div",{key:"7fa315fbb8421e0466d7bceba57c9f158d08c476",class:{"input-wrapper":true,"input-round":this.round,"input-readonly":this.readonly,"input-disabled":this.disabled,"input-invalid":this.invalid},onClick:()=>this.input.focus()},this.textPrefix&&e("span",{class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"d8db1f7ab01afe94166fc4f6a6d37a595941c0e5",class:"input-inner-wrapper"},e("input",{key:"af383fe0a04ca8a41e9d9595ee4f422cebb5d99d",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,class:{"has-clearable":this.clearable&&!this.disabled&&!this.readonly&&!!this.value,"has-toggle-password":this.togglePassword&&!this.disabled&&!this.readonly&&!!this.value},autocomplete:this.autoComplete,disabled:this.disabled,max:this.max,maxlength:this.maxLength,min:this.min,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,type:this.isPasswordShown?"text":this.type,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.clearable&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":D.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":D.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"5d318f9d6eeeebcef42b5d7abb000f0e51375303",name:"addon"})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.input.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}findSiblingInput(t){if(t instanceof HTMLInputElement){return t}else if(t?.nextSibling){return this.findSiblingInput(t.nextSibling)}return undefined}get hostElement(){return a(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};An.style=Rn;const Sn=":host{display:inline-block}:host([hidden]){display:none}ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}li{display:inline-flex;justify-content:center}li.dots{-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([variant=outlined]) ol{gap:0.75rem}.cat-pagination-xs li.dots,.cat-pagination-xs li.text{height:1.5rem;line-height:1.5rem;font-size:0.875rem}.cat-pagination-xs li.dots{width:1.5rem}:host([variant=outlined]) .cat-pagination-xs{gap:0.375rem}.cat-pagination-s li.dots,.cat-pagination-s li.text{height:2rem;line-height:2rem;font-size:0.9375rem}.cat-pagination-s li.dots{width:2rem}:host([variant=outlined]) .cat-pagination-s{gap:0.5rem}.cat-pagination-m li.dots,.cat-pagination-m li.text{height:2.5rem;line-height:2.5rem;font-size:0.9375rem}.cat-pagination-m li.dots{width:2.5rem}:host([variant=outlined]) .cat-pagination-m{gap:0.625rem}.cat-pagination-l li.dots,.cat-pagination-l li.text{height:3rem;line-height:3rem;font-size:0.9375rem}.cat-pagination-l li.dots{width:3rem}:host([variant=outlined]) .cat-pagination-l{gap:0.75rem}.cat-pagination-xl li.dots,.cat-pagination-xl li.text{height:3.5rem;line-height:3.5rem;font-size:1.125rem}.cat-pagination-xl li.dots{width:3.5rem}:host([variant=outlined]) .cat-pagination-xl{gap:0.875rem}";const Tn=Sn;const Fn=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.page=0;this.pageCount=1;this.activePadding=1;this.sidePadding=1;this.size="m";this.variant="text";this.round=false;this.compact=false;this.iconPrev="$cat:pagination-left";this.iconNext="$cat:pagination-right"}render(){return e("nav",{key:"ede4b30a483fb729428b8d2bfdd4d67b1b5f1022",role:"navigation"},e("ol",{key:"04fd80b91e33c55a23d010e5fa108b10a08e2bdb",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"cd98373b4a9a69b25e9df8185b808561336c9a75"},e("cat-button",{key:"ec601998cd4ba8a2007e1f1dcecad86f36633095",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:D.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"8ff7654e0087ece5cb4f81205083ea8f13af7112"},e("cat-button",{key:"3ca4cf8fa48d650472e20efc09cbed49b55d33bf",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:D.t("pagination.next"),icon:this.iconNext,iconOnly:true,onClick:()=>this.setPage(this.page+1)}))))}get isFirst(){return this.page===0}get isLast(){return this.page===this.pageCount-1}setPage(t){this.page=t;this.catChange.emit(this.page)}get pages(){if(!this.sidePadding&&!this.activePadding){return[this.page]}const t=new Set;const e=this.page<=this.sidePadding+this.activePadding+1;const i=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const a=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=a?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,i);if(!e&&!a){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,i){const a=this.clamp(e,0,this.pageCount);const r=this.clamp(i,0,this.pageCount);Array(r-a).fill(0).forEach(((e,i)=>t.add(a+i)))}clamp(t,e,i){return Math.min(Math.max(t,e),i)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,i)=>[i>0&&this.pages[i-1]!==t-1?e("li",{class:"dots"},"…"):null,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,color:this.page===t?"primary":undefined,active:this.page===t,a11yLabel:D.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}};Fn.style=Tn;const Bn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";const $n=Bn;let En=0;const On=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-radio-${++En}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value="";this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on radio",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"1f5432c0800e82741e2786146b728403157eb874"},e("label",{key:"cac427f0f10635bd03a799d25ac0160b721cfcdb",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"6a8598e54d46eb976717faf125c58a675b79ad99",class:"radio"},e("input",{key:"7b5dea2ce070d83a1a1f16375d3d782f8b3d1459",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.identifier||this.id,type:"radio",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"e6f1802e164c2b74f84f413fd351ea6a9f10c9a2",class:"circle"})),e("span",{key:"95e951a221d6b36d980a6619fa501a409555e981",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"circle-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=true;this.catChange.emit(this.value)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return a(this)}};On.style=$n;const Nn=":host{display:block}:host([hidden]){display:none}";const Wn=Nn;const Ln=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.catRadioGroup=[];this.name=undefined;this.value=undefined;this.disabled=false;this.a11yLabel=undefined;this.labelLeft=false}onNameChanged(t){this.catRadioGroup.forEach((e=>e.name=t))}onValueChanged(t){this.catRadioGroup.forEach((e=>e.checked=e.value===t));this.updateTabIndex()}onDisabledChanged(t){this.catRadioGroup.forEach((e=>e.disabled=e.disabled||t))}onLabelLeftChanged(t){this.catRadioGroup.forEach((e=>e.labelLeft=e.labelLeft||t))}componentDidLoad(){this.init();this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-RADIO"))&&this.init()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)&&this.catRadioGroup.length){const e=this.catRadioGroup.filter((t=>!t.disabled));const i=document.activeElement;const a=this.catRadioGroup.findIndex((t=>t===i));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=a<0?0:(a+r+e.length)%e.length;e[n].doFocus();e[n].shadowRoot?.querySelector("input")?.click();this.updateTabIndex();t.preventDefault()}}onInput(t){const e=this.catRadioGroup.find((e=>e===t.target));if(e?.localName==="cat-radio"){this.value=e?.checked?e?.value:undefined;this.catChange.emit(this.value)}}onFocus(t){if(!t.relatedTarget){this.catBlur.emit(t)}}onBlur(t){if(!t.relatedTarget){this.catBlur.emit(t)}}render(){return e("div",{key:"5608e54b1bb857a4068a6287b072bd71081d51d2",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"8e62283745589e94e99650f7fe85afeea39fa253"}))}init(){this.catRadioGroup=Array.from(this.hostElement.querySelectorAll(`cat-radio`));this.onNameChanged(this.name);this.onValueChanged(this.value);this.onDisabledChanged(this.disabled);this.onLabelLeftChanged(this.labelLeft)}updateTabIndex(){if(this.catRadioGroup.length){this.catRadioGroup.forEach((t=>t.shadowRoot?.querySelector("input")?.setAttribute("tabindex","-1")));const t=this.catRadioGroup.findIndex((t=>t.checked));this.catRadioGroup[t>=0?t:0].shadowRoot?.querySelector("input")?.setAttribute("tabindex","0")}}get hostElement(){return a(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};Ln.style=Wn;const jn=":host{overflow:hidden;position:relative;display:flex}:host([hidden]){display:none}.shadow-bottom,.shadow-right,.shadow-left,.shadow-top{position:absolute;transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}.shadow-top{z-index:2;width:100%;top:0}.shadow-left{z-index:4;height:100%;left:0}.shadow-right{z-index:4;height:100%;right:0}.shadow-bottom{z-index:2;width:100%;bottom:0}.scrollable-wrapper{position:absolute;inset:0;pointer-events:none}.scrollable-wrapper.cat-scrollable-top .shadow-top,.scrollable-wrapper.cat-scrollable-bottom .shadow-bottom,.scrollable-wrapper.cat-scrollable-left .shadow-left,.scrollable-wrapper.cat-scrollable-right .shadow-right{box-shadow:0 0 4px 1px rgba(16, 29, 48, 0.2)}.scrollable-content{width:100%;overflow:hidden}.scrollable-content.scroll-x{overflow-x:auto}.scrollable-content.scroll-y{overflow-y:auto}.scrollable-content.no-overscroll{overscroll-behavior:contain}";const Pn=jn;const Yn=class{constructor(e){t(this,e);this.scrolledTop=r(this,"scrolledTop",7);this.scrolledLeft=r(this,"scrolledLeft",7);this.scrolledRight=r(this,"scrolledRight",7);this.scrolledBottom=r(this,"scrolledBottom",7);this.init=new A;this.destroyed=new A;this.resizedEntries=new A;this.resizedObserver=new ResizeObserver((t=>this.resizedEntries.next(t)));this.noShadowX=false;this.noShadowY=false;this.noOverflowX=false;this.noOverflowY=false;this.noOverscroll=false;this.noScrolledInit=false;this.scrolledBuffer=0}componentDidRender(){if(this.scrollElement){this.scrolled=tt(this.scrollElement,"scroll").pipe(Rt(this.destroyed));this.resizedObserver.observe(this.scrollElement)}if(this.scrollWrapperElement){this.resizedObserver.observe(this.scrollWrapperElement)}this.attachEmitter("left",this.scrolledLeft);this.attachEmitter("right",this.scrolledRight);this.attachEmitter("bottom",this.scrolledBottom);this.attachEmitter("top",this.scrolledTop);ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(Yn.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Rt(this.destroyed)).subscribe((({top:t,left:e,right:i,bottom:a})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",i);this.toggleClass("cat-scrollable-bottom",a)}))}componentDidLoad(){if(!this.noScrolledInit){this.init.next()}}disconnectedCallback(){this.init.complete();this.destroyed.next();this.destroyed.complete();this.resizedObserver.disconnect()}render(){return[e("div",{key:"b8d4abf49b6747e516f23bc4e16bbc1b7b9e2efe",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{class:"shadow-top"}),!this.noShadowX&&e("div",{class:"shadow-left"}),!this.noShadowX&&e("div",{class:"shadow-right"}),!this.noShadowY&&e("div",{class:"shadow-bottom"})),e("div",{key:"9552a4a4a86713effab40df3f95310dae5863f78",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"acc0afcb95539ad6db29c6a96b2673892f2d9153"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(Yn.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Rt(this.destroyed)).subscribe((()=>e.emit()))}getScrollOffset(t){if(this.scrollElement){switch(t){case"top":return this.scrollElement.scrollTop;case"left":return this.scrollElement.scrollLeft;case"right":return this.scrollElement.scrollWidth-this.scrollElement.clientWidth-this.scrollElement.scrollLeft;case"bottom":return this.scrollElement.scrollHeight-this.scrollElement.clientHeight-this.scrollElement.scrollTop;default:return 0}}return 0}toggleClass(t,e){if(e){this.scrollWrapperElement?.classList.add(t)}else{this.scrollWrapperElement?.classList.remove(t)}}};Yn.THROTTLE=50;Yn.style=Pn;var Hn="__autosizeInputGhost";var Un={" ":"nbsp","<":"lt",">":"gt"};function _n(t){return"&"+Un[t]+";"}function Kn(t){return t.replace(/\s|<|>/g,_n)}function Vn(){var t=document.createElement("div");t.id=Hn;t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;";document.body.appendChild(t);return t}var qn=function(t,e){var i=window.getComputedStyle(t);var a="box-sizing:"+i.boxSizing+";border-left:"+i.borderLeftWidth+" solid red"+";border-right:"+i.borderRightWidth+" solid red"+";font-family:"+i.fontFamily+";font-feature-settings:"+i.fontFeatureSettings+";font-kerning:"+i.fontKerning+";font-size:"+i.fontSize+";font-stretch:"+i.fontStretch+";font-style:"+i.fontStyle+";font-variant:"+i.fontVariant+";font-variant-caps:"+i.fontVariantCaps+";font-variant-ligatures:"+i.fontVariantLigatures+";font-variant-numeric:"+i.fontVariantNumeric+";font-weight:"+i.fontWeight+";letter-spacing:"+i.letterSpacing+";margin-left:"+i.marginLeft+";margin-right:"+i.marginRight+";padding-left:"+i.paddingLeft+";padding-right:"+i.paddingRight+";text-indent:"+i.textIndent+";text-transform:"+i.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var i=document.getElementById(Hn)||Vn();i.style.cssText+=a;i.innerHTML=Kn(e);var r=window.getComputedStyle(i).width;t.style.width=r;return r}t.addEventListener("input",r);var n=r();if(e&&e.minWidth&&n!=="0px"){t.style.minWidth=n}return function(){t.removeEventListener("input",r);var e=document.getElementById(Hn);if(e){e.parentNode.removeChild(e)}}};const Jn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-multiple .select-wrapper-inner{flex-wrap:wrap}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const Gn=Jn;const Zn={term:"",isOpen:false,isLoading:false,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let Xn=0;let Qn=0;const to=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.catChange=r(this,"catChange",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Xn++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=Zn;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.multiple=false;this.debounce=250;this.placement="bottom-start";this.value=undefined;this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.clearable=false;this.tags=false;this.tagHint=undefined;this.noItems=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}onStateChanged(t,e){const i=i=>t[i]!==e[i];if(i("isOpen")){this.update()}if(i("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(i("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const i=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=i}else{t=i.length?i[0]:""}}else{const e=i.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const a=this.state.selection.filter((t=>t.item.id.startsWith(`select-${this.id}-tag`))).map((t=>t.render.label));if(this.multiple){t={ids:e,tags:a}}else{t={id:e.length?e[0]:"",tag:a.length?a[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){qn(this.input)}if(this.trigger&&this.dropdown){ja(this.trigger,this.dropdown,(()=>this.update()))}}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on select",this)}}onBlur(t){if(!this.multiple&&this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}this.hide();if(!this.multiple&&(!this.tags||!this.state.selection?.length)){if(this.state.tempSelection?.length){this.patchState({activeSelectionIndex:-1,selection:this.state.tempSelection,tempSelection:[],options:[],term:this.state.tempSelection[0].render.label})}else if(!this.state.selection?.length){this.patchState({activeSelectionIndex:-1,selection:[],tempSelection:[],options:[],term:""})}}else{this.patchState({activeSelectionIndex:-1})}this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t.key)){this.onArrowKeyDown(t)}else if(["Enter"," "].includes(t.key)&&e){if(this.tags&&this.state.activeOptionIndex===0&&this.state.options[0].item.id===`select-${this.id}-option-tag`){t.preventDefault();if(this.multiple){this.toggleTag(this.state.options[0])}else{this.createTag(this.state.options[0].render.label)}}else if(this.state.activeOptionIndex>=0){t.preventDefault();if(this.multiple){this.toggle(this.state.options[this.state.activeOptionIndex])}else{this.select(this.state.options[this.state.activeOptionIndex])}}else if(this.tags&&t.key==="Enter"&&this.state.activeOptionIndex<0){this.createTag(this.state.term)}}else if(t.key==="Escape"){if(this.hide()){t.stopPropagation()}}else if(t.key==="Backspace"||t.key==="Delete"){this.input?.focus();if(!this.multiple||!this.state.term||this.input?.selectionStart===0&&t.key==="Backspace"){if(this.state.activeSelectionIndex>=0){this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id)}else if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:this.state.term?[...this.state.selection]:[]})}}}else if(t.key==="Tab"){this.trigger?.setAttribute("tabindex","-1");if(this.multiple){this.patchState({activeSelectionIndex:-1,activeOptionIndex:-1})}else if(this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}}else if(t.key.length===1){this.input?.focus()}}onKeyUp(t){if(t.key==="Tab"&&!t.shiftKey){this.hostElement.shadowRoot?.activeElement===this.trigger&&this.input?.focus();if(this.hostElement.shadowRoot?.activeElement===this.input){this.show()}}else if(t.key==="Tab"&&t.shiftKey){const t=this.trigger?.querySelector(`#select-clear-btn-${this.id}`);if(t){this.hostElement.shadowRoot?.activeElement===t&&this.show()}else{this.show()}}}async doFocus(t){this.input?.focus(t)}async doBlur(){this.input?.blur()}async clear(){this.clearInput()}async connect(t){this.connector=t;let e;this.subscription?.unsubscribe();this.subscription=this.term$.asObservable().pipe(ft((t=>t?nt(this.debounce):R(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),Dt((t=>t+1),0),It(0)))),At((()=>this.patchState({options:[]}))),Mt((i=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(i,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements}))),Ct((t=>!t.last),true),Dt(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!i.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))){let t;if(this.isTagSelected(this.state.term)){t=this.state.selection.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))?.render.label}i.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:i})}))}render(){return e(i,{key:"062a85c7c55fa74a196cbca508dd12c08f329922"},e("div",{key:"c4d7213f5c5d8098053f740128d07faeaa8a96bf",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"75573825fa123e453a5f2877d163faecdb6fd5c5",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"))))),e("div",{key:"1f78a80916cf895f76bd318b03d575ed87789a49",class:"select-container"},e("div",{key:"5998ad61fb04fbbc242883b39049b083c89fdbcf",class:{"select-wrapper":true,"select-disabled":this.disabled,"select-invalid":this.invalid},ref:t=>this.trigger=t,id:this.id,role:"combobox","aria-expanded":this.state.isOpen||this.isPillboxActive(),"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-required":this.required?"true":false,"aria-activedescendant":this.activeDescendant,onClick:t=>this.onClick(t)},e("div",{key:"b251a7ec629213881100fe8a22cfe963e9e3ca0f",class:"select-wrapper-inner"},this.multiple&&this.state.selection.length?e("div",{id:`select-pillbox-${this.id}`,role:"listbox","aria-orientation":"horizontal",class:"select-pills"},this.state.selection.map(((t,i)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===i},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${i}`},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",null,t.render.label),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:D.t("select.deselect"),onClick:()=>this.deselect(t.item.id),tabIndex:-1,"data-dropdown-no-close":true}))))):this.state.selection.length&&this.state.selection[0].render.avatar?e("cat-avatar",{label:this.state.selection[0].render.label,round:this.state.selection[0].render.avatar.round,src:this.state.selection[0].render.avatar.src,icon:this.state.selection[0].render.avatar.icon,initials:this.state.selection[0].render.avatar.initials??""}):null,e("input",{key:"148ddd23d61a93bc56c1d7944bae37cd174038a8",...this.nativeAttributes,part:"input",class:"select-input",ref:t=>this.input=t,"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-activedescendant":this.activeDescendant,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),value:!this.multiple?this.state.term:undefined,placeholder:this.placeholder,disabled:this.disabled||this.state.isResolving})),this.state.isResolving&&e("cat-spinner",null),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),(this.state.selection.length||this.state.term.length)&&!this.disabled&&!this.state.isResolving&&this.clearable?e("cat-button",{id:`select-clear-btn-${this.id}`,iconOnly:true,icon:"$cat:input-close",variant:"text",size:"s",a11yLabel:D.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?D.t("select.close"):D.t("select.open"),"aria-controls":`select-listbox-${this.id}`,"aria-expanded":this.state.isOpen,tabIndex:-1,disabled:this.disabled||this.state.isResolving,"data-dropdown-no-close":true})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"5d1f9bbcdd97d67a67da30715b6eb558c8828846",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isLoading?Array.from(Array(to.SKELETON_COUNT)).map((()=>e("li",{class:"select-option-loading"},e("cat-skeleton",{variant:"body",lines:1}),e("cat-skeleton",{variant:"body",lines:1})))):!this.state.options.length&&!this.tags&&e("li",{class:"select-option-empty"},this.noItems?this.noItems:D.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,i)=>{const a=this.tags&&t.item.id===`select-${this.id}-option-tag`;const r=this.isSelected(t.item.id)||this.tags&&this.isTagSelected(t.render.label);const n=()=>{if(a){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${i}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===i},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!a?this.toggle(t):this.toggleTag(t);e.stopPropagation()}},e("span",{slot:"label",class:"select-option-inner"},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description)))):e("div",{class:{"select-option-inner":true,"select-option-single":true,"select-option-active":this.state.activeOptionIndex===i},onFocus:()=>this.input?.focus(),onClick:()=>a?this.createTag(t.render.label):this.select(t),tabIndex:-1},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description))))}))}resolve(){const t=this.connector;if(!t){return}this.patchState({isResolving:true});const e=this.initIds();let i;if(this.tags){i=this.initTags()}const a=e.length?t.resolve(e).pipe(zt()):R([]);a.pipe(dt((()=>R([])))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags){i.filter((t=>!this.isTagSelected(t,a))).forEach(((t,e)=>{const i={id:`select-${this.id}-tag-${e}`,name:t};a.push({item:i,render:{label:i.name}})}))}this.patchState({isResolving:false,selection:a,term:!this.multiple&&a.length?a[0].render.label:""})}))}toSelectItems(t,e){return e.map((e=>({item:{...e,id:t.customId?t.customId(e):e.id},render:t.render(e)})))}show(){if(!this.state.isOpen&&this.connector){this.connect(this.connector);this.patchState({isOpen:true});this.catOpen.emit();this.term$.next("");this.input?.classList.remove("select-input-transparent-caret")}}hide(){if(this.state.isOpen){this.patchState({isOpen:false,activeOptionIndex:-1});this.catClose.emit();return true}return false}search(t){this.patchState({term:t,activeOptionIndex:-1,activeSelectionIndex:-1});this.term$.next(t)}isSelected(t){return this.state.selection.findIndex((e=>e.item.id===t))>=0}select(t){if(!this.isSelected(t.item.id)){let e;if(this.multiple){e=[...this.state.selection,t]}else{e=[t];this.search(t.render.label)}this.patchState({selection:e,tempSelection:[]});if(this.multiple&&this.state.term.trim()&&this.input){this.patchState({term:"",activeOptionIndex:-1});this.term$.next("");this.input.value=""}}this.setTransparentCaret()}deselect(t){if(this.isSelected(t)){this.patchState({selection:this.state.selection.filter((e=>e.item.id!==t)),activeSelectionIndex:-1})}}toggle(t){this.isSelected(t.item.id)?this.deselect(t.item.id):this.tags&&this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.select(t)}clearInput(){if(this.input&&this.state.term){this.patchState({selection:[],term:"",activeOptionIndex:-1,tempSelection:[]});this.term$.next("");this.input.value=""}else{this.patchState({selection:[],tempSelection:[]})}}reset(t){this.connector=t??this.connector;this.subscription?.unsubscribe();this.subscription=undefined;this.state=Zn}onClick(t){if(this.disabled){return}const e=t.target;this.trigger?.setAttribute("tabindex","0");this.input?.focus();if(e===this.trigger||e===this.input||e.classList.contains("select-btn")||e.nodeName==="SPAN"){this.state.isOpen?this.hide():this.show()}}onInput(){this.search(this.input?.value.trim()||"");if(!this.multiple){if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:[...this.state.selection]})}if(!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Ua(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Ki(to.DROPDOWN_OFFSET),Ya()]}).then((({x:t,y:e,placement:i})=>{if(this.dropdown){this.dropdown.dataset.placement=i;Object.assign(this.dropdown.style,{width:`${this.trigger?.clientWidth}px`,left:`${t}px`,top:`${e}px`})}}))}}patchState(t){this.state={...this.state,...t}}isPillboxActive(){return this.state.activeSelectionIndex>=0}get activeDescendant(){let t=undefined;if(this.state.activeOptionIndex>=0){t=`select-${this.id}-option-${this.state.activeOptionIndex}`}else if(this.state.activeSelectionIndex>=0){t=`select-${this.id}-selection-${this.state.activeSelectionIndex}`}return t}onArrowKeyDown(t){let e=false;this.input?.focus();switch(t.key){case"ArrowDown":e=true;this.state.isOpen?this.patchState({activeOptionIndex:Math.min(this.state.activeOptionIndex+1,this.state.options.length-1),activeSelectionIndex:-1}):this.show();break;case"ArrowUp":e=true;this.state.activeOptionIndex>=0?this.patchState({activeOptionIndex:Math.max(this.state.activeOptionIndex-1,-1),activeSelectionIndex:-1}):this.hide();break;case"ArrowLeft":if(this.input?.selectionStart===0){e=true;let t;this.state.activeSelectionIndex>0?t=Math.max(this.state.activeSelectionIndex-1,-1):t=this.state.selection.length-1;this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}break;case"ArrowRight":if(this.state.activeSelectionIndex>=0){e=true;let t=-1;if(this.state.activeSelectionIndexe.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const i=e?.tags;const a={id:`select-${this.id}-tag-${i?.length?i?.length+Qn++:0}`,name:t};this.select({item:a,render:{label:a.name}})}this.setTransparentCaret()}removeTag(t){if(this.isTagSelected(t)){const e=this.state.selection.find((e=>e.render.label.toLowerCase()===t.toLowerCase()));e&&this.deselect(e.item.id)}}toggleTag(t){this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.createTag(t.render.label)}initIds(){let t=[];if(this.value){if(!this.tags){if(this.multiple){t=this.value}else{t=[this.value]}}else{if(this.multiple){const e=this.value;t=e.ids?e.ids:[]}else{const e=this.value;t=e.id?[e.id]:[]}}}return t}initTags(){let t=[];if(this.value){if(this.multiple){const e=this.value;t=e.tags?e.tags:[]}else{const e=this.value;t=e.tag?[e.tag]:[]}}return t}setTransparentCaret(){if(!this.multiple){this.hide();this.input?.classList.add("select-input-transparent-caret")}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}get hostElement(){return a(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};to.SKELETON_COUNT=4;to.DROPDOWN_OFFSET=4;to.style=Gn;const eo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})});this.multipleSelectAvatarInitials?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{round:true,initials:`JD`}})});this.multipleSelectTagging?.connect(this.countryConnector);this.singleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.singleSelectAvatar?.connect(this.countryConnector);this.singleSelectAvatarInitials?.connect({...this.countryConnector,render:t=>({label:t.country,description:t.capital||"No capital",avatar:{round:true,initials:`${t.country.charAt(0)?.toUpperCase()??"J"}${t.capital?.charAt(0)?.toUpperCase()??"D"}`}})});this.singleSelectTagging?.connect(this.countryConnector);setTimeout((()=>this.multipleSelect&&(this.multipleSelect.value=[])),5e3)}render(){return e(i,{key:"fbbdfc05bd034597b84d235445b70c526ed17dd4",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"e88f94e3022868b3ec6ca75a704a45edac6dedc6",label:"Multiple Select",hint:"This is a hint!",ref:t=>this.multipleSelect=t,value:["1"],placeholder:"Hello World",onCatChange:()=>console.log("Multiple change",this.multipleSelect?.value),onCatBlur:t=>console.log("Multiple blur",t),multiple:true,noItems:"No results",clearable:true,errorUpdate:false},e("span",{key:"a5e00768df01e4f91dfd2b4b3f62a998df32bf7d",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"935aacbe810131079d95d61d9e6fd2efbec03d01",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"0b8fbe7e2ec42acf7cbd01fd216d0909befd30a2",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"509741cf8a8f6438649f2a4debe0829fd3b905eb",label:"Multiple with tagging support",hint:"This is a hint!",ref:t=>this.multipleSelectTagging=t,value:{ids:["1"],tags:["Test","Albania","Algeria"]},placeholder:"Select country",onCatChange:()=>console.log("Multiple tagging change",this.multipleSelectTagging?.value),multiple:true,tags:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"a42ff7c4b8f1686fa0cdbd5a202b4bff59f7e599",label:"Single Select",hint:"This is a hint!",ref:t=>this.singleSelect=t,placeholder:"Search for a country or capital",onCatBlur:t=>console.log("Single blur",t),clearable:true,errorUpdate:false}),e("cat-select",{key:"e29353e92663b785844080bf6ef6937348c80379",label:"Single with img",ref:t=>this.singleSelectAvatar=t,value:"1",placeholder:"Search for a country or capital",clearable:true,errorUpdate:false}),e("cat-select",{key:"a53e0848faed0a98be3d2bc6e81c1e21c82cbc9c",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"f6173b84ec5d84401dbc7190c6e09719c0412f26",overflow:true},e("cat-button",{key:"4d45f4bd17867cb4d54078f503e8613441e04374",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"2736181440e085cf623c2c3c875edaab23f71a3e",slot:"content",style:{width:"400px"}},e("cat-select",{key:"9fa27d270fc984bd22ef82de2e54e7ac952f71a2",label:"Single with tagging support",ref:t=>this.singleSelectTagging=t,value:{id:"",tag:"Albania"},placeholder:"Search for a country or capital",onCatChange:()=>console.log("Single change",this.singleSelectTagging?.value),tagHint:"new country",tags:true,clearable:true,errorUpdate:false,style:{width:"90%"}}))))}get countryConnector(){return{resolve:t=>R(t.map((t=>io.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const i=io.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const a=i.slice(e*10,e*10+10);return R({last:a.length<10,totalElements:i.length,content:a}).pipe(vt(500))},render:t=>({label:t.country,description:t.capital||"No capital",avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})}}};const io=[{id:"0",country:"Afghanistan Extra extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large ",capital:"Kabul"},{id:"1",country:"Albania",capital:"Tirana"},{id:"2",country:"Algeria",capital:"Alger"},{id:"3",country:"American Samoa",capital:"Fagatogo"},{id:"4",country:"Andorra",capital:"Andorra la Vella"},{id:"5",country:"Angola",capital:"Luanda"},{id:"6",country:"Anguilla",capital:"The Valley"},{id:"7",country:"Antarctica"},{id:"8",country:"Antigua and Barbuda",capital:"Saint John's"},{id:"9",country:"Argentina",capital:"Buenos Aires"},{id:"10",country:"Armenia",capital:"Yerevan"},{id:"11",country:"Aruba",capital:"Oranjestad"},{id:"12",country:"Australia",capital:"Canberra"},{id:"13",country:"Austria",capital:"Wien"},{id:"14",country:"Azerbaijan",capital:"Baku"},{id:"15",country:"Bahamas",capital:"Nassau"},{id:"16",country:"Bahrain",capital:"al-Manama"},{id:"17",country:"Bangladesh",capital:"Dhaka"},{id:"18",country:"Barbados",capital:"Bridgetown"},{id:"19",country:"Belarus",capital:"Minsk"},{id:"20",country:"Belgium",capital:"Bruxelles [Brussel]"},{id:"21",country:"Belize",capital:"Belmopan"},{id:"22",country:"Benin",capital:"Porto-Novo"},{id:"23",country:"Bermuda",capital:"Hamilton"},{id:"24",country:"Bhutan",capital:"Thimphu"},{id:"25",country:"Bolivia",capital:"La Paz"},{id:"26",country:"Bosnia and Herzegovina",capital:"Sarajevo"},{id:"27",country:"Botswana",capital:"Gaborone"},{id:"28",country:"Bouvet Island"},{id:"29",country:"Brazil",capital:"Brasília"},{id:"30",country:"British Indian Ocean Territory"},{id:"31",country:"Brunei",capital:"Bandar Seri Begawan"},{id:"32",country:"Bulgaria",capital:"Sofia"},{id:"33",country:"Burkina Faso",capital:"Ouagadougou"},{id:"34",country:"Burundi",capital:"Bujumbura"},{id:"35",country:"Cambodia",capital:"Phnom Penh"},{id:"36",country:"Cameroon",capital:"Yaound"},{id:"37",country:"Canada",capital:"Ottawa"},{id:"38",country:"Cape Verde",capital:"Praia"},{id:"39",country:"Cayman Islands",capital:"George Town"},{id:"40",country:"Central African Republic",capital:"Bangui"},{id:"41",country:"Chad",capital:"N'Djam"},{id:"42",country:"Chile",capital:"Santiago de Chile"},{id:"43",country:"China",capital:"Peking"},{id:"44",country:"Christmas Island",capital:"Flying Fish Cove"},{id:"45",country:"Cocos (Keeling) Islands",capital:"West Island"},{id:"46",country:"Colombia",capital:"Santaf"},{id:"47",country:"Comoros",capital:"Moroni"},{id:"48",country:"Congo",capital:"Brazzaville"},{id:"49",country:"Cook Islands",capital:"Avarua"},{id:"50",country:"Costa Rica",capital:"San José"},{id:"51",country:"Croatia",capital:"Zagreb"},{id:"52",country:"Cuba",capital:"La Habana"},{id:"53",country:"Cyprus",capital:"Nicosia"},{id:"54",country:"Czech Republic",capital:"Praha"},{id:"55",country:"Denmark",capital:"Copenhagen"},{id:"56",country:"Djibouti",capital:"Djibouti"},{id:"57",country:"Dominica",capital:"Roseau"},{id:"58",country:"Dominican Republic",capital:"Santo Domingo de Guzm"},{id:"59",country:"East Timor",capital:"Dili"},{id:"60",country:"Ecuador",capital:"Quito"},{id:"61",country:"Egypt",capital:"Cairo"},{id:"62",country:"El Salvador",capital:"San Salvador"},{id:"63",country:"England",capital:"London"},{id:"64",country:"Equatorial Guinea",capital:"Malabo"},{id:"65",country:"Eritrea",capital:"Asmara"},{id:"66",country:"Estonia",capital:"Tallinn"},{id:"67",country:"Ethiopia",capital:"Addis Abeba"},{id:"68",country:"Falkland Islands",capital:"Stanley"},{id:"69",country:"Faroe Islands",capital:"Tórshavn"},{id:"70",country:"Fiji Islands",capital:"Suva"},{id:"71",country:"Finland",capital:"Helsinki [Helsingfors]"},{id:"72",country:"France",capital:"Paris"},{id:"73",country:"French Guiana",capital:"Cayenne"},{id:"74",country:"French Polynesia",capital:"Papeete"},{id:"75",country:"French Southern territories"},{id:"76",country:"Gabon",capital:"Libreville"},{id:"77",country:"Gambia",capital:"Banjul"},{id:"78",country:"Georgia",capital:"Tbilisi"},{id:"79",country:"Germany",capital:"Berlin"},{id:"80",country:"Ghana",capital:"Accra"},{id:"81",country:"Gibraltar",capital:"Gibraltar"},{id:"82",country:"Greece",capital:"Athenai"},{id:"83",country:"Greenland",capital:"Nuuk"},{id:"84",country:"Grenada",capital:"Saint George's"},{id:"85",country:"Guadeloupe",capital:"Basse-Terre"},{id:"86",country:"Guam",capital:"Aga"},{id:"87",country:"Guatemala",capital:"Ciudad de Guatemala"},{id:"88",country:"Guinea",capital:"Conakry"},{id:"89",country:"Guinea-Bissau",capital:"Bissau"},{id:"90",country:"Guyana",capital:"Georgetown"},{id:"91",country:"Haiti",capital:"Port-au-Prince"},{id:"92",country:"Heard Island and McDonald Islands"},{id:"93",country:"Holy See (Vatican City State)",capital:"Citt"},{id:"94",country:"Honduras",capital:"Tegucigalpa"},{id:"95",country:"Hong Kong",capital:"Victoria"},{id:"96",country:"Hungary",capital:"Budapest"},{id:"97",country:"Iceland",capital:"Reykjavík"},{id:"98",country:"India",capital:"New Delhi"},{id:"99",country:"Indonesia",capital:"Jakarta"},{id:"100",country:"Iran",capital:"Tehran"},{id:"101",country:"Iraq",capital:"Baghdad"},{id:"102",country:"Ireland",capital:"Dublin"},{id:"103",country:"Israel",capital:"Jerusalem"},{id:"104",country:"Italy",capital:"Roma"},{id:"105",country:"Ivory Coast",capital:"Yamoussoukro"},{id:"106",country:"Jamaica",capital:"Kingston"},{id:"107",country:"Japan",capital:"Tokyo"},{id:"108",country:"Jordan",capital:"Amman"},{id:"109",country:"Kazakhstan",capital:"Astana"},{id:"110",country:"Kenya",capital:"Nairobi"},{id:"111",country:"Kiribati",capital:"Bairiki"},{id:"112",country:"Kuwait",capital:"Kuwait"},{id:"113",country:"Kyrgyzstan",capital:"Bishkek"},{id:"114",country:"Laos",capital:"Vientiane"},{id:"115",country:"Latvia",capital:"Riga"},{id:"116",country:"Lebanon",capital:"Beirut"},{id:"117",country:"Lesotho",capital:"Maseru"},{id:"118",country:"Liberia",capital:"Monrovia"},{id:"119",country:"Libyan Arab Jamahiriya",capital:"Tripoli"},{id:"120",country:"Liechtenstein",capital:"Vaduz"},{id:"121",country:"Lithuania",capital:"Vilnius"},{id:"122",country:"Luxembourg",capital:"Luxembourg [Luxemburg/L"},{id:"123",country:"Macao",capital:"Macao"},{id:"124",country:"North Macedonia",capital:"Skopje"},{id:"125",country:"Madagascar",capital:"Antananarivo"},{id:"126",country:"Malawi",capital:"Lilongwe"},{id:"127",country:"Malaysia",capital:"Kuala Lumpur"},{id:"128",country:"Maldives",capital:"Male"},{id:"129",country:"Mali",capital:"Bamako"},{id:"130",country:"Malta",capital:"Valletta"},{id:"131",country:"Marshall Islands",capital:"Dalap-Uliga-Darrit"},{id:"132",country:"Martinique",capital:"Fort-de-France"},{id:"133",country:"Mauritania",capital:"Nouakchott"},{id:"134",country:"Mauritius",capital:"Port-Louis"},{id:"135",country:"Mayotte",capital:"Mamoutzou"},{id:"136",country:"Mexico",capital:"Ciudad de M"},{id:"137",country:"Micronesia, Federated States of",capital:"Palikir"},{id:"138",country:"Moldova",capital:"Chisinau"},{id:"139",country:"Monaco",capital:"Monaco-Ville"},{id:"140",country:"Mongolia",capital:"Ulan Bator"},{id:"141",country:"Montenegro",capital:"Podgorica"},{id:"142",country:"Montserrat",capital:"Plymouth"},{id:"143",country:"Morocco",capital:"Rabat"},{id:"144",country:"Mozambique",capital:"Maputo"},{id:"145",country:"Myanmar",capital:"Rangoon (Yangon)"},{id:"146",country:"Namibia",capital:"Windhoek"},{id:"147",country:"Nauru",capital:"Yaren"},{id:"148",country:"Nepal",capital:"Kathmandu"},{id:"149",country:"Netherlands",capital:"Amsterdam"},{id:"150",country:"Netherlands Antilles",capital:"Willemstad"},{id:"151",country:"New Caledonia",capital:"Noum"},{id:"152",country:"New Zealand",capital:"Wellington"},{id:"153",country:"Nicaragua",capital:"Managua"},{id:"154",country:"Niger",capital:"Niamey"},{id:"155",country:"Nigeria",capital:"Abuja"},{id:"156",country:"Niue",capital:"Alofi"},{id:"157",country:"Norfolk Island",capital:"Kingston"},{id:"158",country:"North Korea",capital:"Pyongyang"},{id:"159",country:"Northern Ireland",capital:"Belfast"},{id:"160",country:"Northern Mariana Islands",capital:"Garapan"},{id:"161",country:"Norway",capital:"Oslo"},{id:"162",country:"Oman",capital:"Masqat"},{id:"163",country:"Pakistan",capital:"Islamabad"},{id:"164",country:"Palau",capital:"Koror"},{id:"165",country:"Palestine",capital:"Gaza"},{id:"166",country:"Panama",capital:"Ciudad de Panamá"},{id:"167",country:"Papua New Guinea",capital:"Port Moresby"},{id:"168",country:"Paraguay",capital:"Asunción"},{id:"169",country:"Peru",capital:"Lima"},{id:"170",country:"Philippines",capital:"Manila"},{id:"171",country:"Pitcairn",capital:"Adamstown"},{id:"172",country:"Poland",capital:"Warszawa"},{id:"173",country:"Portugal",capital:"Lisboa"},{id:"174",country:"Puerto Rico",capital:"San Juan"},{id:"175",country:"Qatar",capital:"Doha"},{id:"176",country:"Reunion",capital:"Saint-Denis"},{id:"177",country:"Romania",capital:"Bucuresti"},{id:"178",country:"Russian Federation",capital:"Moscow"},{id:"179",country:"Rwanda",capital:"Kigali"},{id:"180",country:"Saint Helena",capital:"Jamestown"},{id:"181",country:"Saint Kitts and Nevis",capital:"Basseterre"},{id:"182",country:"Saint Lucia",capital:"Castries"},{id:"183",country:"Saint Pierre and Miquelon",capital:"Saint-Pierre"},{id:"184",country:"Saint Vincent and the Grenadines",capital:"Kingstown"},{id:"185",country:"Samoa",capital:"Apia"},{id:"186",country:"San Marino",capital:"San Marino"},{id:"187",country:"Sao Tome and Principe",capital:"São Tomé"},{id:"188",country:"Saudi Arabia",capital:"Riyadh"},{id:"189",country:"Scotland",capital:"Edinburgh"},{id:"190",country:"Senegal",capital:"Dakar"},{id:"191",country:"Serbia",capital:"Belgrade"},{id:"192",country:"Seychelles",capital:"Victoria"},{id:"193",country:"Sierra Leone",capital:"Freetown"},{id:"194",country:"Singapore",capital:"Singapore"},{id:"195",country:"Slovakia",capital:"Bratislava"},{id:"196",country:"Slovenia",capital:"Ljubljana"},{id:"197",country:"Solomon Islands",capital:"Honiara"},{id:"198",country:"Somalia",capital:"Mogadishu"},{id:"199",country:"South Africa",capital:"Pretoria"},{id:"200",country:"South Georgia and the South Sandwich Islands"},{id:"201",country:"South Korea",capital:"Seoul"},{id:"202",country:"South Sudan",capital:"Juba"},{id:"203",country:"Spain",capital:"Madrid"},{id:"204",country:"Sri Lanka",capital:"Colombo, Sri Jayawardenepura Kotte"},{id:"205",country:"Sudan",capital:"Khartum"},{id:"206",country:"Suriname",capital:"Paramaribo"},{id:"207",country:"Svalbard and Jan Mayen",capital:"Longyearbyen"},{id:"208",country:"Swaziland",capital:"Mbabane"},{id:"209",country:"Sweden",capital:"Stockholm"},{id:"210",country:"Switzerland",capital:"Bern"},{id:"211",country:"Syria",capital:"Damascus"},{id:"212",country:"Tajikistan",capital:"Dushanbe"},{id:"213",country:"Tanzania",capital:"Dodoma"},{id:"214",country:"Thailand",capital:"Bangkok"},{id:"215",country:"The Democratic Republic of Congo",capital:"Kinshasa"},{id:"216",country:"Togo",capital:"Lomé"},{id:"217",country:"Tokelau",capital:"Fakaofo"},{id:"218",country:"Tonga",capital:"Nuku'alofa"},{id:"219",country:"Trinidad and Tobago",capital:"Port-of-Spain"},{id:"220",country:"Tunisia",capital:"Tunis"},{id:"221",country:"Turkey",capital:"Ankara"},{id:"222",country:"Turkmenistan",capital:"Ashgabat"},{id:"223",country:"Turks and Caicos Islands",capital:"Cockburn Town"},{id:"224",country:"Tuvalu",capital:"Funafuti"},{id:"225",country:"Uganda",capital:"Kampala"},{id:"226",country:"Ukraine",capital:"Kyiv"},{id:"227",country:"United Arab Emirates",capital:"Abu Dhabi"},{id:"228",country:"United Kingdom",capital:"London"},{id:"229",country:"United States",capital:"Washington"},{id:"230",country:"United States Minor Outlying Islands"},{id:"231",country:"Uruguay",capital:"Montevideo"},{id:"232",country:"Uzbekistan",capital:"Toskent"},{id:"233",country:"Vanuatu",capital:"Port-Vila"},{id:"234",country:"Venezuela",capital:"Caracas"},{id:"235",country:"Vietnam",capital:"Hanoi"},{id:"236",country:"Virgin Islands, British",capital:"Road Town"},{id:"237",country:"Virgin Islands, U.S.",capital:"Charlotte Amalie"},{id:"238",country:"Wales",capital:"Cardiff"},{id:"239",country:"Wallis and Futuna",capital:"Mata-Utu"},{id:"240",country:"Western Sahara",capital:"El-Aai"},{id:"241",country:"Yemen",capital:"Sanaa"},{id:"242",country:"Zambia",capital:"Lusaka"},{id:"243",country:"Zimbabwe",capital:"Harare"}];const ao=':host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]:not(:last-child)){margin-bottom:1rem}:host([variant=body]:not(:last-child)){margin-bottom:2rem}.skeleton{display:block;border-radius:var(--cat-border-radius-m, 0.25rem);background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1.125rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}';const ro=ao;const no=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(i,{key:"8f1e4584c050cc8b6d1341efd3d8b04ca7223a73"},Array.from(Array(this.count)).map((()=>e("div",{style:this.style,class:{skeleton:true,[`skeleton-${this.effect}`]:Boolean(this.effect),[`skeleton-${this.variant}`]:Boolean(this.variant),[`skeleton-${this.size}`]:Boolean(this.size)}}))))}get count(){switch(this.variant){case"head":return Math.max(1,this.lines||1);case"body":return Math.max(1,this.lines||3);default:return 1}}get style(){return this.variant==="head"||this.variant==="body"?{"--line-width":`${this.random(50,100)}%`}:undefined}random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}};no.style=ro;const oo=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";const so=oo;const co=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"cf1110c7ae2c653c87f44f2668aa3bcc757ed0c9","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"22d1a1c15575274a75d4203ae9a1c945a199759d",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"f067c870a5699603761b7d8d6e4a32354cef6f7e",cx:"24",cy:"24",r:"21.5"})))}};co.style=so;const lo=":host{display:block}:host([hidden]){display:none}";const ho=lo;let fo=0;const uo=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.label="";this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.url=undefined;this.urlTarget=undefined;this.deactivated=false;this.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${fo++}`}}onClick(t){this.catClick.emit(t)}render(){return e(i,{key:"e0b1e0562a35130f4b0de08530eb66c9df5ec145"})}get hostElement(){return a(this)}};uo.style=ho;const po=':host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:"";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-error{color:rgb(var(--cat-danger-text-active, 174, 42, 10))}.cat-tab.cat-tab-active::after{opacity:1}';const bo=po;const mo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.tabs=[];this.activeTab="";this.tabsAlign="left"}componentWillLoad(){this.syncTabs()}componentDidLoad(){this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-TAB"))&&this.syncTabs()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onActiveTabChange(t){const e=this.tabs.findIndex((e=>e.id===t));this.catChange.emit({id:t,index:e})}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)){const e=this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');const i=Array.from(e??[]).filter((t=>!t.disabled));const a=this.hostElement.shadowRoot?.activeElement;const r=a?i.indexOf(a):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+i.length)%i.length;i[o].doFocus();t.preventDefault()}}async setActive(t){this.activate(this.tabs.find((e=>e.id===t)))}async setActiveIndex(t){this.activate(this.tabs[t])}render(){return e(i,{key:"05969fc6e983159aaad4a36ab07b6326c5c85589"},this.tabs.map((t=>e("cat-button",{buttonId:t.id,role:"tab",part:"tab",class:{"cat-tab":true,"cat-tab-active":t.id===this.activeTab,"cat-tab-error":t.error},active:t.id===this.activeTab,color:t.error?"danger":t.id===this.activeTab?"primary":"secondary",variant:"text",icon:t.icon?t.error?"$cat:input-error":t.icon:undefined,iconOnly:t.iconOnly,iconRight:t.iconRight,url:t.url,disabled:t.deactivated,urlTarget:t.urlTarget,onCatClick:()=>this.click(t),nativeAttributes:{...t.nativeAttributes},nativeContentAttributes:{"data-text":t.label},"data-dropdown-no-close":true},t.label))))}syncTabs(){this.tabs=Array.from(this.hostElement.querySelectorAll("cat-tab"));this.activeTab=this.activeTab||this.tabs.filter((t=>this.canActivate(t)))[0]?.id}canActivate(t){return!!t&&!t.deactivated&&!t.url&&t.id!==this.activeTab}click(t){if(this.canActivate(t)){t.click();this.activate(t)}}activate(t){if(this.canActivate(t)){this.activeTab=t.id}}get hostElement(){return a(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};mo.style=bo;var go=new Map;function vo(t){var e=go.get(t);e&&e.destroy()}function yo(t){var e=go.get(t);e&&e.update()}var ko=null;"undefined"==typeof window?((ko=function(t){return t}).destroy=function(t){return t},ko.update=function(t){return t}):((ko=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!go.has(t)){var e,i=null,a=window.getComputedStyle(t),r=(e=t.value,function(){o({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),n=function(e){t.removeEventListener("autosize:destroy",n),t.removeEventListener("autosize:update",s),t.removeEventListener("input",r),window.removeEventListener("resize",s),Object.keys(e).forEach((function(i){return t.style[i]=e[i]})),go.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",n),t.addEventListener("autosize:update",s),t.addEventListener("input",r),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",go.set(t,{destroy:n,update:s}),s()}function o(e){var r,n,s=e.restoreTextAlign,c=void 0===s?null:s,l=e.testForHeightReduction,d=void 0===l||l,h=a.overflowY;if(0!==t.scrollHeight&&("vertical"===a.resize?t.style.resize="none":"both"===a.resize&&(t.style.resize="horizontal"),d&&(r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],i=t[1];e.style.scrollBehavior="auto",e.scrollTop=i,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===a.boxSizing?t.scrollHeight-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):t.scrollHeight+parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),"none"!==a.maxHeight&&n>parseFloat(a.maxHeight)?("hidden"===a.overflowY&&(t.style.overflow="scroll"),n=parseFloat(a.maxHeight)):"hidden"!==a.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",c&&(t.style.textAlign=c),r&&r(),i!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=n),h!==a.overflow&&!c)){var f=a.textAlign;"hidden"===a.overflow&&(t.style.textAlign="start"===f?"end":"start"),o({restoreTextAlign:f,testForHeightReduction:!0})}}function s(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],vo),t},ko.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],yo),t});var xo=ko;const wo=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}:host([hidden]){display:none}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";const zo=wo;let Do=0;const Io=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-textarea-${Do++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.disabled=false;this.hint=undefined;this.identifier=undefined;this.label="";this.labelHidden=false;this.maxLength=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=3;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on textarea",this)}}componentDidLoad(){xo(this.textarea)}async doFocus(t){this.textarea.focus(t)}async doBlur(){this.textarea.blur()}async clear(){this.value="";this.catChange.emit(this.value)}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e(i,{key:"2fac5152cbeeb9d4a9c4dc0f9539bb1a1503c9e8"},e("div",{key:"88d992d98f72a0862b3736ad102a0124363e17b6",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"ab23b2ebcc13b7511c4e951041817bb8b1952c0c",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"30a02b82d605c5e416a63b8eef5205d41139ce6d",class:"textarea-container"},e("div",{key:"32aad8e1e15134dad90e991cc3e471b06dcbc9fd",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"96d5a02bfdb1c7feb85ce02380a59ff63a7d1760",...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.textarea.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.textarea;if(!t){this.showErrors()}}get hostElement(){return a(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Io.style=zo;function Mo(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function Ro(t){return{change:D.t("timepicker.change"),choose:D.t("timepicker.choose"),timeFormat:Mo(t)?"12":"24"}}function Co(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function Ao(t,e,i){const[,a,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=i?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let s=-Infinity;let c=Infinity;if(a!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),a,r).getTime()}if(n!==undefined&&o!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),s),c))}function So(t,e){const[,i,a]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(i===undefined||a===undefined){return false}return t.getHours()i||t.getHours()===i&&t.getMinutes()>a}const Fo=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.cat-time-addon{margin-left:-1px}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const Bo=Fo;const $o=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=Ro(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}componentWillLoad(){this.syncValue(this.value??"")}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){this.input?.mask({time:true,timeFormat:this.locale.timeFormat,timePattern:["h","m"]})}onOpen(){const t=t=>this.hostElement.shadowRoot?.querySelector(t);const e=Ao(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const i=t(`[data-time="${Co(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const a=t(`[data-time="${Co(e)}"]`);setTimeout((()=>{(a??i)?.doFocus();(a??i)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;if(!t){this.selectionTime=null;this.value=undefined}else{const e=Ao(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;this.value=Co(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==this.value){this.catChange.emit(this.value)}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"c7ebe7c00d372720ce9c34907438f47150df0820"},e("cat-input",{key:"e83d9bddbdff4d1e0c97531f3684618e0f4251a8",class:"cat-time-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.format(this.selectionTime,false),errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatFocus:t=>this.catFocus.emit(t.detail),onCatBlur:t=>this.onInputBlur(t.detail)},e("span",{key:"504e24bcf7d7fa3e0eddb7df91261778e720cc87",slot:"label"},this.hasSlottedLabel&&e("slot",{name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"c617e13394f44bd851beae13e809f791a56dfa42",class:"label-aria"}," (HH:mm)")),e("div",{key:"601bd57b6137a44901a3d32ce10f881aae67a2a8",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"ecdd2fb5987eb30890c9258ece4bd1e176b2d6c6",slot:"addon",placement:this.placement},e("cat-button",{key:"a38158d199940ff276b5263833c39cdbea04d194",slot:"trigger",class:"cat-time-toggle",disabled:this.disabled||this.readonly,icon:"$cat:timepicker-clock",iconOnly:true,a11yLabel:this.selectionTime?`${this.locale.change}, ${this.format(this.selectionTime)}`:this.locale.choose}),e("nav",{key:"e2e77112f74467cc2db37d24f38165389888978a",slot:"content",class:"cat-nav"},e("ul",{key:"c005ac2b43037f3e5953117e968a967ce60be477"},this.timeArray().map((t=>{const i=Co(t);const a=So(t,this.min??null)||To(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":a},disabled:a,active:i===this.value,color:i===this.value?"primary":"secondary",variant:i===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":i},this.format(t)))})))))),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let i=new Date(e.getTime());while(i.getDate()===e.getDate()){t.push(i);i=new Date(i.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,i]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||i===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,i,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),i,0))}toggleAm(){if(this.selectionTime){this.select(new Date(this.selectionTime.getTime()+(this.isAm?12:-12)*36e5))}else{this.isAm=!this.isAm}}onInputBlur(t){this.syncValue(this.input?.value??"");this.catBlur.emit(t)}format(t,e=true){const i=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?i:i.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const i=(t==="min"?e:this.min)??null;const a=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const s=r?Co(Ao(i,new Date(2e3,5,1,Number(n),Number(o)),a)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};$o.style=Bo;const Eo='.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:"";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}';const Oo=Eo;let No=0;const Wo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-toggle-${No++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on toggle",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"08337e6aece1d072c3c4540e4c5e97562a0c1f4c"},e("label",{key:"79b0b9d2d136125ba7f15be32a3a34da73488a2f",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"0c22754e817b0d6eab349583287c8d30f25f84ad",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,class:"form-check-input",role:"switch",onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"7a08a4ec1fc79d18c16065697f672bf7f4e35908",class:"toggle"}),e("span",{key:"b78eacbcb262452ba33972f2647dc69b01c1bd20",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"toggle-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};Wo.style=Oo;const Lo="ontouchstart"in window||navigator.maxTouchPoints>0;const jo=":host{display:contents}:host([hidden]){display:none}.tooltip{--cat-font-color-head:var(--cat-font-color-tooltip, 255, 255, 255);--cat-font-color-body:var(--cat-font-color-tooltip, 255, 255, 255);position:fixed;width:max-content;top:0;left:0;box-sizing:border-box;font-size:0.875rem;line-height:1.125rem;font-weight:500;background-color:rgb(var(--cat-bg-tooltip, 0, 0, 0));border-radius:var(--cat-border-radius-m, 0.25rem);color:rgb(var(--cat-font-color-tooltip, 255, 255, 255));transition:opacity 250ms linear, visibility 250ms linear;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;z-index:calc(var(--cat-z-index, 1000) + 200);max-width:min(100vw - 0.5rem, 20rem)}.tooltip-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.tooltip-show{opacity:1;visibility:visible}.tooltip p{margin:0}.tooltip-round{border-radius:10rem}.tooltip-s{padding:0.375rem 0.5rem}.tooltip-s.tooltip-round{padding:0.375rem 0.75rem}.tooltip-m{padding:0.75rem}.tooltip-m.tooltip-round{padding:0.75rem 1rem}.tooltip-l{padding:1rem}.tooltip-l.tooltip-round{padding:1rem 1.5rem}";const Po=jo;let Yo=0;const Ho=class{constructor(e){t(this,e);this.id=`cat-tooltip-${Yo++}`;this.inactive=false;this.open=false;this.content="";this.disabled=false;this.placement="top";this.round=false;this.size="m";this.showDelay=250;this.hideDelay=0;this.longTouchDuration=1e3;this.boundShowListener=this.showListener.bind(this);this.boundHideListener=this.hideListener.bind(this);this.boundWindowTouchStartListener=this.windowTouchStartListener.bind(this);this.boundTouchStartListener=this.touchStartListener.bind(this);this.boundTouchEndListener=this.touchEndListener.bind(this)}handleKeyDown({key:t}){t==="Escape"&&this.hideTooltip()}componentDidLoad(){const t=this.hostElement.shadowRoot?.querySelector("slot");this.trigger=t?.assignedElements?.()?.[0];if(this.trigger&&!this.trigger.hasAttribute("aria-describedby")){this.trigger.setAttribute("aria-describedby",this.id)}if(Lo){window.addEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.addEventListener("touchstart",this.boundTouchStartListener);this.trigger?.addEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.addEventListener("focusin",this.boundShowListener);this.trigger?.addEventListener("focusout",this.boundHideListener);this.trigger?.addEventListener("mouseenter",this.boundShowListener);this.trigger?.addEventListener("mouseleave",this.boundHideListener)}}componentWillRender(){this.inactive=this.disabled||!this.content&&!this.hostElement.querySelector('[slot="content"]')}disconnectedCallback(){if(Lo){window.removeEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.removeEventListener("touchstart",this.boundTouchStartListener);this.trigger?.removeEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.removeEventListener("mouseenter",this.boundShowListener);this.trigger?.removeEventListener("mouseleave",this.boundHideListener);this.trigger?.removeEventListener("focusin",this.boundShowListener);this.trigger?.removeEventListener("focusout",this.boundHideListener)}}render(){return e(i,{key:"742d0c7f6203b8e685886f1c272562176b348fa9"},e("slot",{key:"0e7bf66c6aadcf0b87fbbadf2d3e357ebb9b98c0"}),e("div",{key:"14eaa638d2f3170be57188d32841e22c98f1319b",ref:t=>this.tooltip=t,id:this.id,role:"tooltip","aria-hidden":!this.open,"aria-live":this.open?"polite":"off",class:{tooltip:true,"tooltip-hidden":this.inactive,"tooltip-round":this.round,[`tooltip-${this.size}`]:Boolean(this.size)}},e("slot",{key:"724fac6b27719c0cb9d243aab8ab4485fa72fc43",name:"content"},e("p",{key:"2d6c325c46035725ac8c81330038888eefeb0c89"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Ua(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Ki(Ho.OFFSET),Ya({fallbackAxisSideDirection:"start"}),Pa({padding:Ho.SHIFT_PADDING})]}).then((({x:t,y:e})=>{if(this.tooltip){Object.assign(this.tooltip.style,{left:`${Math.max(0,t)}px`,top:`${e}px`})}}))}}showListener(){window.clearTimeout(this.hideTimeout);this.hideTimeout=undefined;if(!this.showTimeout){this.showTimeout=window.setTimeout((()=>{this.showTimeout=undefined;this.showTooltip()}),this.showDelay)}}hideListener(){window.clearTimeout(this.showTimeout);this.showTimeout=undefined;if(!this.hideTimeout){this.hideTimeout=window.setTimeout((()=>{this.hideTimeout=undefined;this.hideTooltip()}),this.hideDelay)}}touchStartListener(t){t.stopPropagation();if(!this.touchTimeout){this.touchTimeout=window.setTimeout((()=>{this.touchTimeout=undefined;this.showTooltip()}),this.longTouchDuration)}}touchEndListener(){window.clearTimeout(this.touchTimeout);this.touchTimeout=undefined;this.hideTooltip()}windowTouchStartListener(){this.hideTooltip()}showTooltip(){if(this.trigger&&this.tooltip){this.cleanupFloatingUi=ja(this.trigger,this.tooltip,(()=>this.update()))}if(!this.inactive){this.open=true;this.tooltip?.classList.add("tooltip-show")}}hideTooltip(){this.open=false;this.tooltip?.classList.remove("tooltip-show");this.cleanupFloatingUi?.();this.cleanupFloatingUi=undefined}get hostElement(){return a(this)}};Ho.OFFSET=4;Ho.SHIFT_PADDING=4;Ho.style=Po;export{Bt as cat_alert,Nt as cat_avatar,jt as cat_badge,Xt as cat_button,ee as cat_button_group,re as cat_card,le as cat_checkbox,De as cat_date,Re as cat_date_inline,Va as cat_datepicker,Ga as cat_datepicker_inline,Xr as cat_dropdown,en as cat_form_group,nn as cat_icon,An as cat_input,Fn as cat_pagination,On as cat_radio,Ln as cat_radio_group,Yn as cat_scrollable,to as cat_select,eo as cat_select_demo,no as cat_skeleton,co as cat_spinner,uo as cat_tab,mo as cat_tabs,Io as cat_textarea,$o as cat_time,Wo as cat_toggle,Ho as cat_tooltip}; -//# sourceMappingURL=p-ff4075a2.entry.js.map \ No newline at end of file +*/function Tr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Fr(t){for(var e=1;e0){var a=e[e.length-1];if(a!==i){a.pause()}}var r=e.indexOf(i);if(r===-1){e.push(i)}else{e.splice(r,1);e.push(i)}},deactivateTrap:function t(e,i){var a=e.indexOf(i);if(a!==-1){e.splice(a,1)}if(e.length>0){e[e.length-1].unpause()}}};var Nr=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var Wr=function t(e){return(e===null||e===void 0?void 0:e.key)==="Escape"||(e===null||e===void 0?void 0:e.key)==="Esc"||(e===null||e===void 0?void 0:e.keyCode)===27};var Lr=function t(e){return(e===null||e===void 0?void 0:e.key)==="Tab"||(e===null||e===void 0?void 0:e.keyCode)===9};var jr=function t(e){return Lr(e)&&!e.shiftKey};var Pr=function t(e){return Lr(e)&&e.shiftKey};var Yr=function t(e){return setTimeout(e,0)};var Hr=function t(e,i){var a=-1;e.every((function(t,e){if(i(t)){a=e;return false}return true}));return a};var Ur=function t(e){for(var i=arguments.length,a=new Array(i>1?i-1:0),r=1;r1?r-1:0),s=1;s=0){e=a.activeElement}else{var i=o.tabbableGroups[0];var r=i&&i.firstTabbableNode;e=r||d("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var f=function t(){o.containerGroups=o.containers.map((function(t){var e=Mr(t,n.tabbableOptions);var i=Rr(t,n.tabbableOptions);var a=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=i.find((function(t){return Cr(t)}));var s=i.slice().reverse().find((function(t){return Cr(t)}));var c=!!e.find((function(t){return cr(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:i,posTabIndexesFound:c,firstTabbableNode:a,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function t(a){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(a);if(n<0){if(r){return i.slice(i.indexOf(a)+1).find((function(t){return Cr(t)}))}return i.slice(0,i.indexOf(a)).reverse().find((function(t){return Cr(t)}))}return e[n+(r?1:-1)]}}}));o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0}));if(o.tabbableGroups.length<=0&&!d("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(o.containerGroups.find((function(t){return t.posTabIndexesFound}))&&o.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var u=function t(e){var i=e.activeElement;if(!i){return}if(i.shadowRoot&&i.shadowRoot.activeElement!==null){return t(i.shadowRoot)}return i};var p=function t(e){if(e===false){return}if(e===u(document)){return}if(!e||!e.focus){t(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(Nr(e)){e.select()}};var b=function t(e){var i=d("setReturnFocus",e);return i?i:i===false?false:e};var m=function t(e){var i=e.target,a=e.event,r=e.isBackward,s=r===void 0?false:r;i=i||_r(a);f();var c=null;if(o.tabbableGroups.length>0){var h=l(i,a);var u=h>=0?o.containerGroups[h]:undefined;if(h<0){if(s){c=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{c=o.tabbableGroups[0].firstTabbableNode}}else if(s){var p=Hr(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return i===e}));if(p<0&&(u.container===i||Sr(i,n.tabbableOptions)&&!Cr(i,n.tabbableOptions)&&!u.nextTabbableNode(i,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=cr(i)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!Lr(a)){c=u.nextTabbableNode(i,false)}}else{var g=Hr(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return i===e}));if(g<0&&(u.container===i||Sr(i,n.tabbableOptions)&&!Cr(i,n.tabbableOptions)&&!u.nextTabbableNode(i))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=cr(i)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!Lr(a)){c=u.nextTabbableNode(i)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var i=_r(e);if(l(i,e)>=0){return}if(Ur(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(Ur(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var i=_r(e);var a=l(i,e)>=0;if(a||i instanceof Document){if(a){o.mostRecentlyFocusedNode=i}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(cr(o.mostRecentlyFocusedNode)>0){var c=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[c].tabbableNodes;if(d.length>0){var f=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(f>=0){if(n.isKeyForward(o.recentNavEvent)){if(f+1=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return cr(t)>0}))}))){s=false}}}else{s=false}if(s){r=m({target:o.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(o.recentNavEvent)})}if(r){p(r)}else{p(o.mostRecentlyFocusedNode||h())}}o.recentNavEvent=undefined};var y=function t(e){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var a=m({event:e,isBackward:i});if(a){if(Lr(e)){e.preventDefault()}p(a)}};var k=function t(e){if(Wr(e)&&Ur(n.escapeDeactivates,e)!==false){e.preventDefault();s.deactivate();return}if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){var i=_r(e);if(l(i,e)>=0){return}if(Ur(n.clickOutsideDeactivates,e)){return}if(Ur(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}Or.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?Yr((function(){p(h())})):p(h());a.addEventListener("focusin",v,true);a.addEventListener("mousedown",g,{capture:true,passive:false});a.addEventListener("touchstart",g,{capture:true,passive:false});a.addEventListener("click",x,{capture:true,passive:false});a.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}a.removeEventListener("focusin",v,true);a.removeEventListener("mousedown",g,true);a.removeEventListener("touchstart",g,true);a.removeEventListener("click",x,true);a.removeEventListener("keydown",k,true);return s};var D=function t(e){var i=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(i){p(h())}};var I=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var M=function t(){if(!I){return}I.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){I.observe(t,{subtree:true,childList:true})}))}};s={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var i=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=a.activeElement;i===null||i===void 0||i();var s=function t(){if(n){f()}w();M();r===null||r===void 0||r()};if(n){n(o.containers.concat()).then(s,s);return this}s();return this},deactivate:function t(e){if(!o.active){return this}var i=Fr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();Or.deactivateTrap(r,s);var a=c(i,"onDeactivate");var l=c(i,"onPostDeactivate");var d=c(i,"checkCanReturnFocus");var h=c(i,"returnFocus","returnFocusOnDeactivate");a===null||a===void 0||a();var f=function t(){Yr((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===void 0||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(f,f);return this}f();return this},pause:function t(e){if(o.paused||!o.active){return this}var i=c(e,"onPause");var a=c(e,"onPostPause");o.paused=true;i===null||i===void 0||i();z();M();a===null||a===void 0||a();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var i=c(e,"onUnpause");var a=c(e,"onPostUnpause");o.paused=false;i===null||i===void 0||i();f();w();M();a===null||a===void 0||a();return this},updateContainerElements:function t(e){var i=[].concat(e).filter(Boolean);o.containers=i.map((function(t){return typeof t==="string"?a.querySelector(t):t}));if(o.active){f()}M();return this}};s.updateContainerElements(e);return s};const qr=t=>(t?Mr(t,{includeContainer:true,getShadowRoot:true}):[]).shift();const Jr=":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding:0.25rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);display:none;opacity:0;transform:scale(0.9);transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform-origin:bottom}.content[data-placement^=top-start]{transform-origin:bottom left}.content[data-placement^=top-end]{transform-origin:bottom right}.content[data-placement^=left]{transform-origin:right}.content[data-placement^=left-start]{transform-origin:right top}.content[data-placement^=left-end]{transform-origin:right bottom}.content[data-placement^=right]{transform-origin:left}.content[data-placement^=right-start]{transform-origin:left top}.content[data-placement^=right-end]{transform-origin:left bottom}.content[data-placement^=bottom]{transform-origin:top}.content[data-placement^=bottom-start]{transform-origin:top left}.content[data-placement^=bottom-end]{transform-origin:top right}.content.show{opacity:1;transform:scale(1);transition:transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 250ms cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";const Gr=Jr;let Zr=0;const Xr=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=Zr++;this.isOpen=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false}clickHandler(t){if(!this.trigger){this.initTrigger();this.toggle()}const e=t.composedPath();if(!this.noAutoClose&&e.includes(this.content)&&t.target?.slot!=="trigger"&&!e.slice(0,e.indexOf(this.content)).find((t=>this.hasAttribute(t,"data-dropdown-no-close")))){this.close()}}async toggle(){this.isOpen?this.close():this.open()}async open(){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):Vr(this.content,{tabbableOptions:{getShadowRoot:true},allowOutsideClick:true,clickOutsideDeactivates:t=>!this.noAutoClose&&!t.composedPath().includes(this.content)&&!t.composedPath().find((t=>this.hasAttribute(t,"data-dropdown-no-close"))),onPostDeactivate:()=>this.close(),onPostActivate:()=>this.catOpen.emit(),setReturnFocus:t=>this.trigger||t,isKeyForward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowRight"||this.arrowNavigation==="vertical"&&t.key==="ArrowDown"){t.preventDefault();return true}return t.key==="Tab"},isKeyBackward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowLeft"||this.arrowNavigation==="vertical"&&t.key==="ArrowUp"){t.preventDefault();return true}return t.key==="Tab"&&t.shiftKey},initialFocus:()=>this.noInitialFocus?false:undefined});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;this.content.classList.remove("show");setTimeout((()=>{this.isOpen=false;this.content.classList.remove("show");this.content.style.display="";this.trigger?.setAttribute("aria-expanded","false");this.trap?.deactivate();this.catClose.emit()}),Za)}render(){return e(i,{key:"6cde42e7f7bfc2df858b7179157a1f52e0c23e0e"},e("slot",{key:"91633464f448a8142f52b6e1e62420974a929e84",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"2ed9bd2dcc58b83ec1e7781959456e67d9397c48",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"a91710cd8455cb006f60e48dd49aee7f6d114877",name:"content"})))}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();this.trigger.setAttribute("aria-haspopup","true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));ja(this.trigger,this.content,(()=>this.update()))}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const i=e.shift();t=i?.hasAttribute("data-trigger")?i:i?.querySelector("[data-trigger]")??undefined}if(!t){t=qr(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(){if(this.trigger){const t=this.noResize?[]:[Ha({padding:Xr.OFFSET,apply({availableWidth:t,availableHeight:e,elements:i}){Object.assign(i.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Ua(this.trigger,this.content,{strategy:"fixed",placement:this.placement,middleware:[Ki(Xr.OFFSET),Ya(),...t]}).then((({x:t,y:e,placement:i})=>{this.content.dataset.placement=i;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};Xr.OFFSET=4;Xr.style=Gr;const Qr=":host{display:block}";const tn=Qr;const en=class{constructor(e){t(this,e);this.formElements=[];this.requiredMarker="auto";this.horizontal=false;this.labelSize=undefined}onRequiredMarkerChanged(t){const e=t==="auto"?this.calculate(this.formElements):t;this.formElements.forEach((t=>!t.requiredMarker?.endsWith("!")&&(t.requiredMarker=e)))}onHorizontalChanged(t){this.formElements.forEach((e=>{e.horizontal=t}))}render(){return e(i,{key:"6892a4f36f418d431b6006518c44bf2b58e70f70",style:{"--label-size":this.labelSize}},e("slot",{key:"908b2720b504ce9dfb3a491aa3bbe092a3d2e0cf",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-input, cat-textarea, cat-select, cat-datepicker"));this.onRequiredMarkerChanged(this.requiredMarker);this.onHorizontalChanged(this.horizontal)}calculate(t){const e=t.filter((t=>!t.required)).length;const i=t.length-e;return i>=e?"optional":"required"}get hostElement(){return a(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};en.style=tn;const an=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;height:1em;width:calc(var(--cat-icon-ratio, 1) * 1em)}.icon-xs svg{font-size:0.75rem}.icon-s svg{font-size:1rem}.icon-m svg{font-size:1.25rem}.icon-l svg{font-size:1.5rem}.icon-xl svg{font-size:1.75rem}";const rn=an;const nn=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"66938702e645f5bc12ca9a4592af24ac46b40c52",innerHTML:this.iconSrc||(this.icon?M.getIcon(this.icon):""),"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",part:"icon",class:{icon:true,[`icon-${this.size}`]:this.size!=="inline"}})}};nn.style=rn;var on=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var sn=function(t,e,i,a,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=i>=0?i:2;d.numeralThousandsGroupStyle=a||sn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!s;d.tailPrefix=!!c;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};sn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};sn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,i,a,r,n,o="";t=t.replace(/[A-Za-z]/g,"").replace(e.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",e.numeralPositiveOnly?"":"-").replace("M",e.numeralDecimalMark);if(e.stripLeadingZeroes){t=t.replace(/^(-)?0+(?=\d)/,"$1")}a=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=a+e.prefix}else{r=e.prefix+a}}else{r=a}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){i=t.split(e.numeralDecimalMark);n=i[0];o=e.numeralDecimalMark+i[1].slice(0,e.numeralDecimalScale)}if(a==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case sn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case sn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case sn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return a+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var cn=sn;var ln=function(t,e,i){var a=this;a.date=[];a.blocks=[];a.datePattern=t;a.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(a.dateMin.length===2)a.dateMin.unshift(0);a.dateMax=i.split("-").reverse().map((function(t){return parseInt(t,10)}));if(a.dateMax.length===2)a.dateMax.unshift(0);a.initBlocks()};ln.prototype={initBlocks:function(){var t=this;t.datePattern.forEach((function(e){if(e==="Y"){t.blocks.push(4)}else{t.blocks.push(2)}}))},getISOFormatDate:function(){var t=this,e=t.date;return e[2]?e[2]+"-"+t.addLeadingZero(e[1])+"-"+t.addLeadingZero(e[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(t){var e=this,i="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(a,r){if(t.length>0){var n=t.slice(0,a),o=n.slice(0,1),s=t.slice(a);switch(e.datePattern[r]){case"d":if(n==="00"){n="01"}else if(parseInt(o,10)>3){n="0"+o}else if(parseInt(n,10)>31){n="31"}break;case"m":if(n==="00"){n="01"}else if(parseInt(o,10)>1){n="0"+o}else if(parseInt(n,10)>12){n="12"}break}i+=n;t=s}}));return this.getFixedDateString(i)},getFixedDateString:function(t){var e=this,i=e.datePattern,a=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&i[0].toLowerCase()!=="y"&&i[1].toLowerCase()!=="y"){s=i[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);a=this.getFixedDate(d,h,0)}if(t.length===8){i.forEach((function(t,e){switch(t){case"d":r=e;break;case"m":n=e;break;default:o=e;break}}));l=o*2;s=r<=o?r*2:r*2+2;c=n<=o?n*2:n*2+2;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;a=this.getFixedDate(d,h,f)}if(t.length===4&&(i[0]==="y"||i[1]==="y")){c=i[0]==="m"?0:2;l=2-c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);u=t.slice(l,l+2).length===2;a=[0,h,f]}if(t.length===6&&(i[0]==="Y"||i[1]==="Y")){c=i[0]==="m"?0:4;l=2-.5*c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;a=[0,h,f]}a=e.getRangeFixedDate(a);e.date=a;var p=a.length===0?t:i.reduce((function(t,i){switch(i){case"d":return t+(a[0]===0?"":e.addLeadingZero(a[0]));case"m":return t+(a[1]===0?"":e.addLeadingZero(a[1]));case"y":return t+(u?e.addLeadingZeroForYear(a[2],false):"");case"Y":return t+(u?e.addLeadingZeroForYear(a[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,i=e.datePattern,a=e.dateMin||[],r=e.dateMax||[];if(!t.length||a.length<3&&r.length<3)return t;if(i.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]t[2]||a[2]===t[2]&&(a[1]>t[1]||a[1]===t[1]&&a[0]>t[0])))return a;return t},getFixedDate:function(t,e,i){t=Math.min(t,31);e=Math.min(e,12);i=parseInt(i||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(i)?29:28:30)}return[t,e,i]},isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},addLeadingZero:function(t){return(t<10?"0":"")+t},addLeadingZeroForYear:function(t,e){if(e){return(t<10?"000":t<100?"00":t<1e3?"0":"")+t}return(t<10?"0":"")+t}};var dn=ln;var hn=function(t,e){var i=this;i.time=[];i.blocks=[];i.timePattern=t;i.timeFormat=e;i.initBlocks()};hn.prototype={initBlocks:function(){var t=this;t.timePattern.forEach((function(){t.blocks.push(2)}))},getISOFormatTime:function(){var t=this,e=t.time;return e[2]?t.addLeadingZero(e[0])+":"+t.addLeadingZero(e[1])+":"+t.addLeadingZero(e[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var t=this;if(String(t.timeFormat)==="12"){return{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}}return{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(t){var e=this,i="";t=t.replace(/[^\d]/g,"");var a=e.getTimeFormatOptions();e.blocks.forEach((function(r,n){if(t.length>0){var o=t.slice(0,r),s=o.slice(0,1),c=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(s,10)>a.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>a.maxHours){o=a.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>a.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>a.maxMinutes){o=a.maxMinutes+""}break}i+=o;t=c}}));return this.getFixedTimeString(i)},getFixedTimeString:function(t){var e=this,i=e.timePattern,a=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;if(t.length===6){i.forEach((function(t,e){switch(t){case"s":r=e*2;break;case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;c=n;s=r;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);a=this.getFixedTime(f,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){i.forEach((function(t,e){switch(t){case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;c=n;d=0;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);a=this.getFixedTime(f,h,d)}e.time=a;return a.length===0?t:i.reduce((function(t,i){switch(i){case"s":return t+e.addLeadingZero(a[2]);case"m":return t+e.addLeadingZero(a[1]);case"h":return t+e.addLeadingZero(a[0])}}),"")},getFixedTime:function(t,e,i){i=Math.min(parseInt(i||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,i]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var fn=hn;var un=function(t,e){var i=this;i.delimiter=e||e===""?e:" ";i.delimiterRE=e?new RegExp("\\"+e,"g"):"";i.formatter=t};un.prototype={setFormatter:function(t){this.formatter=t},format:function(t){var e=this;e.formatter.clear();t=t.replace(/[^\d+]/g,"");t=t.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+");t=t.replace(e.delimiterRE,"");var i="",a,r=false;for(var n=0,o=t.length;n0,c="";if(i===0){return t}e.forEach((function(e,l){if(t.length>0){var d=t.slice(0,e),h=t.slice(e);if(s){c=r[n?l-1:l]||c}else{c=a}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l0?e.numeralIntegerScale:0;t.numeralDecimalScale=e.numeralDecimalScale>=0?e.numeralDecimalScale:2;t.numeralDecimalMark=e.numeralDecimalMark||".";t.numeralThousandsGroupStyle=e.numeralThousandsGroupStyle||"thousand";t.numeralPositiveOnly=!!e.numeralPositiveOnly;t.stripLeadingZeroes=e.stripLeadingZeroes!==false;t.signBeforePrefix=!!e.signBeforePrefix;t.tailPrefix=!!e.tailPrefix;t.swapHiddenInput=!!e.swapHiddenInput;t.numericOnly=t.creditCard||t.date||!!e.numericOnly;t.uppercase=!!e.uppercase;t.lowercase=!!e.lowercase;t.prefix=t.creditCard||t.date?"":e.prefix||"";t.noImmediatePrefix=!!e.noImmediatePrefix;t.prefixLength=t.prefix.length;t.rawValueTrimPrefix=!!e.rawValueTrimPrefix;t.copyDelimiter=!!e.copyDelimiter;t.initValue=e.initValue!==undefined&&e.initValue!==null?e.initValue.toString():"";t.delimiter=e.delimiter||e.delimiter===""?e.delimiter:e.date?"/":e.time?":":e.numeral?",":e.phone?" ":" ";t.delimiterLength=t.delimiter.length;t.delimiterLazyShow=!!e.delimiterLazyShow;t.delimiters=e.delimiters||[];t.blocks=e.blocks||[];t.blocksLength=t.blocks.length;t.root=typeof on==="object"&&on?on:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var kn=yn;var xn=function(t,e){var i=this;var a=false;if(typeof t==="string"){i.element=document.querySelector(t);a=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){i.element=t[0];a=t.length>1}else{i.element=t}}if(!i.element){throw new Error("[cleave.js] Please check the element")}if(a){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=i.element.value;i.properties=xn.DefaultProperties.assign({},e);i.init()};xn.prototype={init:function(){var t=this,e=t.properties;if(!e.numeral&&!e.phone&&!e.creditCard&&!e.time&&!e.date&&(e.blocksLength===0&&!e.prefix)){t.onInput(e.initValue);return}e.maxLength=xn.Util.getMaxLength(e.blocks);t.isAndroid=xn.Util.isAndroid();t.lastInputValue="";t.isBackward="";t.onChangeListener=t.onChange.bind(t);t.onKeyDownListener=t.onKeyDown.bind(t);t.onFocusListener=t.onFocus.bind(t);t.onCutListener=t.onCut.bind(t);t.onCopyListener=t.onCopy.bind(t);t.initSwapHiddenInput();t.element.addEventListener("input",t.onChangeListener);t.element.addEventListener("keydown",t.onKeyDownListener);t.element.addEventListener("focus",t.onFocusListener);t.element.addEventListener("cut",t.onCutListener);t.element.addEventListener("copy",t.onCopyListener);t.initPhoneFormatter();t.initDateFormatter();t.initTimeFormatter();t.initNumeralFormatter();if(e.initValue||e.prefix&&!e.noImmediatePrefix){t.onInput(e.initValue)}},initSwapHiddenInput:function(){var t=this,e=t.properties;if(!e.swapHiddenInput)return;var i=t.element.cloneNode(true);t.element.parentNode.insertBefore(i,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=i;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new xn.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter)},initTimeFormatter:function(){var t=this,e=t.properties;if(!e.time){return}e.timeFormatter=new xn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=xn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new xn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=xn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new xn.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch(t){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(t){var e=this,i=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=i===8},onChange:function(t){var e=this,i=e.properties,a=xn.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=a.getPostDelimiter(e.lastInputValue,i.delimiter,i.delimiters);if(e.isBackward&&r){i.postDelimiterBackspace=r}else{i.postDelimiterBackspace=false}this.onInput(this.element.value)},onFocus:function(){var t=this,e=t.properties;t.lastInputValue=t.element.value;if(e.prefix&&e.noImmediatePrefix&&!t.element.value){this.onInput(e.prefix)}xn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!xn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!xn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,i=e.properties,a=xn.Util,r=e.element.value,n="";if(!i.copyDelimiter){n=a.stripDelimiters(r,i.delimiter,i.delimiters)}else{n=r}try{if(t.clipboardData){t.clipboardData.setData("Text",n)}else{window.clipboardData.setData("Text",n)}t.preventDefault()}catch(t){}},onInput:function(t){var e=this,i=e.properties,a=xn.Util;var r=a.getPostDelimiter(t,i.delimiter,i.delimiters);if(!i.numeral&&i.postDelimiterBackspace&&!r){t=a.headStr(t,t.length-i.postDelimiterBackspace.length)}if(i.phone){if(i.prefix&&(!i.noImmediatePrefix||t.length)){i.result=i.prefix+i.phoneFormatter.format(t).slice(i.prefix.length)}else{i.result=i.phoneFormatter.format(t)}e.updateValueState();return}if(i.numeral){if(i.prefix&&i.noImmediatePrefix&&t.length===0){i.result=""}else{i.result=i.numeralFormatter.format(t)}e.updateValueState();return}if(i.date){t=i.dateFormatter.getValidatedDate(t)}if(i.time){t=i.timeFormatter.getValidatedTime(t)}t=a.stripDelimiters(t,i.delimiter,i.delimiters);t=a.getPrefixStrippedValue(t,i.prefix,i.prefixLength,i.result,i.delimiter,i.delimiters,i.noImmediatePrefix,i.tailPrefix,i.signBeforePrefix);t=i.numericOnly?a.strip(t,/[^\d]/g):t;t=i.uppercase?t.toUpperCase():t;t=i.lowercase?t.toLowerCase():t;if(i.prefix){if(i.tailPrefix){t=t+i.prefix}else{t=i.prefix+t}if(i.blocksLength===0){i.result=t;e.updateValueState();return}}if(i.creditCard){e.updateCreditCardPropsByValue(t)}t=a.headStr(t,i.maxLength);i.result=a.getFormattedValue(t,i.blocks,i.blocksLength,i.delimiter,i.delimiters,i.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,i=e.properties,a=xn.Util,r;if(a.headStr(i.result,4)===a.headStr(t,4)){return}r=xn.CreditCardDetector.getInfo(t,i.creditCardStrictMode);i.blocks=r.blocks;i.blocksLength=i.blocks.length;i.maxLength=a.getMaxLength(i.blocks);if(i.creditCardType!==r.type){i.creditCardType=r.type;i.onCreditCardTypeChanged.call(e,i.creditCardType)}},updateValueState:function(){var t=this,e=xn.Util,i=t.properties;if(!t.element){return}var a=t.element.selectionEnd;var r=t.element.value;var n=i.result;a=e.getNextCursorPosition(a,r,n,i.delimiter,i.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,a,i.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(i.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,a,i.document,false);t.callOnValueChanged()},callOnValueChanged:function(){var t=this,e=t.properties;e.onValueChanged.call(t,{target:{name:t.element.name,value:e.result,rawValue:t.getRawValue()}})},setPhoneRegionCode:function(t){var e=this,i=e.properties;i.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,i=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(i.numeral){t=t.replace(".",i.numeralDecimalMark)}i.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,i=xn.Util,a=t.element.value;if(e.rawValueTrimPrefix){a=i.getPrefixStrippedValue(a,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){a=e.numeralFormatter.getRawValue(a)}else{a=i.stripDelimiters(a,e.delimiter,e.delimiters)}return a},getISOFormatDate:function(){var t=this,e=t.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this,e=t.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var t=this;t.element.removeEventListener("input",t.onChangeListener);t.element.removeEventListener("keydown",t.onKeyDownListener);t.element.removeEventListener("focus",t.onFocusListener);t.element.removeEventListener("cut",t.onCutListener);t.element.removeEventListener("copy",t.onCopyListener)},toString:function(){return"[Cleave Object]"}};xn.NumeralFormatter=cn;xn.DateFormatter=dn;xn.TimeFormatter=fn;xn.PhoneFormatter=pn;xn.CreditCardDetector=mn;xn.Util=vn;xn.DefaultProperties=kn;(typeof on==="object"&&on?on:window)["Cleave"]=xn;var wn=xn;function zn(t){return t!=null&&`${t}`!=="false"}function Dn(t,e=0){return In(t)?Number(t):e}function In(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Mn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";const Rn=Mn;let Cn=0;const An=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Cn++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.isPasswordShown=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.togglePassword=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.maxLength=undefined;this.min=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.round=false;this.type="text";this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on input",this)}}async doFocus(t){const e=this.input.type==="hidden"?this.findSiblingInput(this.input.nextSibling):this.input;e?.focus(t)}async doBlur(){this.input.blur()}async clear(){this.value="";this.catChange.emit(this.value)}async mask(t){new wn(this.input,t)}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e("div",{key:"34152d1627e62e4852531f9afdb2b0abc3894a78",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"89c3e91d9d041a68389e776f38647aa6360e5ea5",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"ceed5e06d5bfb6eaf425c562422a6cb470c3dea4",class:"input-container"},e("div",{key:"bbd90f6b705d2e9213a45f5f7839370fce830c89",class:"input-outer-wrapper"},e("div",{key:"7fa315fbb8421e0466d7bceba57c9f158d08c476",class:{"input-wrapper":true,"input-round":this.round,"input-readonly":this.readonly,"input-disabled":this.disabled,"input-invalid":this.invalid},onClick:()=>this.input.focus()},this.textPrefix&&e("span",{class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"d8db1f7ab01afe94166fc4f6a6d37a595941c0e5",class:"input-inner-wrapper"},e("input",{key:"af383fe0a04ca8a41e9d9595ee4f422cebb5d99d",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,class:{"has-clearable":this.clearable&&!this.disabled&&!this.readonly&&!!this.value,"has-toggle-password":this.togglePassword&&!this.disabled&&!this.readonly&&!!this.value},autocomplete:this.autoComplete,disabled:this.disabled,max:this.max,maxlength:this.maxLength,min:this.min,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,type:this.isPasswordShown?"text":this.type,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.clearable&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":D.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":D.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"5d318f9d6eeeebcef42b5d7abb000f0e51375303",name:"addon"})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.input.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}findSiblingInput(t){if(t instanceof HTMLInputElement){return t}else if(t?.nextSibling){return this.findSiblingInput(t.nextSibling)}return undefined}get hostElement(){return a(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};An.style=Rn;const Sn=":host{display:inline-block}:host([hidden]){display:none}ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}li{display:inline-flex;justify-content:center}li.dots{-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([variant=outlined]) ol{gap:0.75rem}.cat-pagination-xs li.dots,.cat-pagination-xs li.text{height:1.5rem;line-height:1.5rem;font-size:0.875rem}.cat-pagination-xs li.dots{width:1.5rem}:host([variant=outlined]) .cat-pagination-xs{gap:0.375rem}.cat-pagination-s li.dots,.cat-pagination-s li.text{height:2rem;line-height:2rem;font-size:0.9375rem}.cat-pagination-s li.dots{width:2rem}:host([variant=outlined]) .cat-pagination-s{gap:0.5rem}.cat-pagination-m li.dots,.cat-pagination-m li.text{height:2.5rem;line-height:2.5rem;font-size:0.9375rem}.cat-pagination-m li.dots{width:2.5rem}:host([variant=outlined]) .cat-pagination-m{gap:0.625rem}.cat-pagination-l li.dots,.cat-pagination-l li.text{height:3rem;line-height:3rem;font-size:0.9375rem}.cat-pagination-l li.dots{width:3rem}:host([variant=outlined]) .cat-pagination-l{gap:0.75rem}.cat-pagination-xl li.dots,.cat-pagination-xl li.text{height:3.5rem;line-height:3.5rem;font-size:1.125rem}.cat-pagination-xl li.dots{width:3.5rem}:host([variant=outlined]) .cat-pagination-xl{gap:0.875rem}";const Tn=Sn;const Fn=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.page=0;this.pageCount=1;this.activePadding=1;this.sidePadding=1;this.size="m";this.variant="text";this.round=false;this.compact=false;this.iconPrev="$cat:pagination-left";this.iconNext="$cat:pagination-right"}render(){return e("nav",{key:"ede4b30a483fb729428b8d2bfdd4d67b1b5f1022",role:"navigation"},e("ol",{key:"04fd80b91e33c55a23d010e5fa108b10a08e2bdb",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"cd98373b4a9a69b25e9df8185b808561336c9a75"},e("cat-button",{key:"ec601998cd4ba8a2007e1f1dcecad86f36633095",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:D.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"8ff7654e0087ece5cb4f81205083ea8f13af7112"},e("cat-button",{key:"3ca4cf8fa48d650472e20efc09cbed49b55d33bf",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:D.t("pagination.next"),icon:this.iconNext,iconOnly:true,onClick:()=>this.setPage(this.page+1)}))))}get isFirst(){return this.page===0}get isLast(){return this.page===this.pageCount-1}setPage(t){this.page=t;this.catChange.emit(this.page)}get pages(){if(!this.sidePadding&&!this.activePadding){return[this.page]}const t=new Set;const e=this.page<=this.sidePadding+this.activePadding+1;const i=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const a=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=a?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,i);if(!e&&!a){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,i){const a=this.clamp(e,0,this.pageCount);const r=this.clamp(i,0,this.pageCount);Array(r-a).fill(0).forEach(((e,i)=>t.add(a+i)))}clamp(t,e,i){return Math.min(Math.max(t,e),i)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,i)=>[i>0&&this.pages[i-1]!==t-1?e("li",{class:"dots"},"…"):null,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,color:this.page===t?"primary":undefined,active:this.page===t,a11yLabel:D.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}};Fn.style=Tn;const Bn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}";const $n=Bn;let En=0;const On=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-radio-${++En}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value="";this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on radio",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"1f5432c0800e82741e2786146b728403157eb874"},e("label",{key:"cac427f0f10635bd03a799d25ac0160b721cfcdb",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"6a8598e54d46eb976717faf125c58a675b79ad99",class:"radio"},e("input",{key:"7b5dea2ce070d83a1a1f16375d3d782f8b3d1459",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.identifier||this.id,type:"radio",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"e6f1802e164c2b74f84f413fd351ea6a9f10c9a2",class:"circle"})),e("span",{key:"95e951a221d6b36d980a6619fa501a409555e981",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"circle-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=true;this.catChange.emit(this.value)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return a(this)}};On.style=$n;const Nn=":host{display:block}:host([hidden]){display:none}";const Wn=Nn;const Ln=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.catRadioGroup=[];this.name=undefined;this.value=undefined;this.disabled=false;this.a11yLabel=undefined;this.labelLeft=false}onNameChanged(t){this.catRadioGroup.forEach((e=>e.name=t))}onValueChanged(t){this.catRadioGroup.forEach((e=>e.checked=e.value===t));this.updateTabIndex()}onDisabledChanged(t){this.catRadioGroup.forEach((e=>e.disabled=e.disabled||t))}onLabelLeftChanged(t){this.catRadioGroup.forEach((e=>e.labelLeft=e.labelLeft||t))}componentDidLoad(){this.init();this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-RADIO"))&&this.init()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)&&this.catRadioGroup.length){const e=this.catRadioGroup.filter((t=>!t.disabled));const i=document.activeElement;const a=this.catRadioGroup.findIndex((t=>t===i));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=a<0?0:(a+r+e.length)%e.length;e[n].doFocus();e[n].shadowRoot?.querySelector("input")?.click();this.updateTabIndex();t.preventDefault()}}onInput(t){const e=this.catRadioGroup.find((e=>e===t.target));if(e?.localName==="cat-radio"){this.value=e?.checked?e?.value:undefined;this.catChange.emit(this.value)}}onFocus(t){if(!t.relatedTarget){this.catBlur.emit(t)}}onBlur(t){if(!t.relatedTarget){this.catBlur.emit(t)}}render(){return e("div",{key:"5608e54b1bb857a4068a6287b072bd71081d51d2",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"8e62283745589e94e99650f7fe85afeea39fa253"}))}init(){this.catRadioGroup=Array.from(this.hostElement.querySelectorAll(`cat-radio`));this.onNameChanged(this.name);this.onValueChanged(this.value);this.onDisabledChanged(this.disabled);this.onLabelLeftChanged(this.labelLeft)}updateTabIndex(){if(this.catRadioGroup.length){this.catRadioGroup.forEach((t=>t.shadowRoot?.querySelector("input")?.setAttribute("tabindex","-1")));const t=this.catRadioGroup.findIndex((t=>t.checked));this.catRadioGroup[t>=0?t:0].shadowRoot?.querySelector("input")?.setAttribute("tabindex","0")}}get hostElement(){return a(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};Ln.style=Wn;const jn=":host{overflow:hidden;position:relative;display:flex}:host([hidden]){display:none}.shadow-bottom,.shadow-right,.shadow-left,.shadow-top{position:absolute;transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}.shadow-top{z-index:2;width:100%;top:0}.shadow-left{z-index:4;height:100%;left:0}.shadow-right{z-index:4;height:100%;right:0}.shadow-bottom{z-index:2;width:100%;bottom:0}.scrollable-wrapper{position:absolute;inset:0;pointer-events:none}.scrollable-wrapper.cat-scrollable-top .shadow-top,.scrollable-wrapper.cat-scrollable-bottom .shadow-bottom,.scrollable-wrapper.cat-scrollable-left .shadow-left,.scrollable-wrapper.cat-scrollable-right .shadow-right{box-shadow:0 0 4px 1px rgba(16, 29, 48, 0.2)}.scrollable-content{width:100%;overflow:hidden}.scrollable-content.scroll-x{overflow-x:auto}.scrollable-content.scroll-y{overflow-y:auto}.scrollable-content.no-overscroll{overscroll-behavior:contain}";const Pn=jn;const Yn=class{constructor(e){t(this,e);this.scrolledTop=r(this,"scrolledTop",7);this.scrolledLeft=r(this,"scrolledLeft",7);this.scrolledRight=r(this,"scrolledRight",7);this.scrolledBottom=r(this,"scrolledBottom",7);this.init=new A;this.destroyed=new A;this.resizedEntries=new A;this.resizedObserver=new ResizeObserver((t=>this.resizedEntries.next(t)));this.noShadowX=false;this.noShadowY=false;this.noOverflowX=false;this.noOverflowY=false;this.noOverscroll=false;this.noScrolledInit=false;this.scrolledBuffer=0}componentDidRender(){if(this.scrollElement){this.scrolled=tt(this.scrollElement,"scroll").pipe(Rt(this.destroyed));this.resizedObserver.observe(this.scrollElement)}if(this.scrollWrapperElement){this.resizedObserver.observe(this.scrollWrapperElement)}this.attachEmitter("left",this.scrolledLeft);this.attachEmitter("right",this.scrolledRight);this.attachEmitter("bottom",this.scrolledBottom);this.attachEmitter("top",this.scrolledTop);ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(Yn.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Rt(this.destroyed)).subscribe((({top:t,left:e,right:i,bottom:a})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",i);this.toggleClass("cat-scrollable-bottom",a)}))}componentDidLoad(){if(!this.noScrolledInit){this.init.next()}}disconnectedCallback(){this.init.complete();this.destroyed.next();this.destroyed.complete();this.resizedObserver.disconnect()}render(){return[e("div",{key:"b8d4abf49b6747e516f23bc4e16bbc1b7b9e2efe",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{class:"shadow-top"}),!this.noShadowX&&e("div",{class:"shadow-left"}),!this.noShadowX&&e("div",{class:"shadow-right"}),!this.noShadowY&&e("div",{class:"shadow-bottom"})),e("div",{key:"9552a4a4a86713effab40df3f95310dae5863f78",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"acc0afcb95539ad6db29c6a96b2673892f2d9153"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(Yn.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Rt(this.destroyed)).subscribe((()=>e.emit()))}getScrollOffset(t){if(this.scrollElement){switch(t){case"top":return this.scrollElement.scrollTop;case"left":return this.scrollElement.scrollLeft;case"right":return this.scrollElement.scrollWidth-this.scrollElement.clientWidth-this.scrollElement.scrollLeft;case"bottom":return this.scrollElement.scrollHeight-this.scrollElement.clientHeight-this.scrollElement.scrollTop;default:return 0}}return 0}toggleClass(t,e){if(e){this.scrollWrapperElement?.classList.add(t)}else{this.scrollWrapperElement?.classList.remove(t)}}};Yn.THROTTLE=50;Yn.style=Pn;var Hn="__autosizeInputGhost";var Un={" ":"nbsp","<":"lt",">":"gt"};function _n(t){return"&"+Un[t]+";"}function Kn(t){return t.replace(/\s|<|>/g,_n)}function Vn(){var t=document.createElement("div");t.id=Hn;t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;";document.body.appendChild(t);return t}var qn=function(t,e){var i=window.getComputedStyle(t);var a="box-sizing:"+i.boxSizing+";border-left:"+i.borderLeftWidth+" solid red"+";border-right:"+i.borderRightWidth+" solid red"+";font-family:"+i.fontFamily+";font-feature-settings:"+i.fontFeatureSettings+";font-kerning:"+i.fontKerning+";font-size:"+i.fontSize+";font-stretch:"+i.fontStretch+";font-style:"+i.fontStyle+";font-variant:"+i.fontVariant+";font-variant-caps:"+i.fontVariantCaps+";font-variant-ligatures:"+i.fontVariantLigatures+";font-variant-numeric:"+i.fontVariantNumeric+";font-weight:"+i.fontWeight+";letter-spacing:"+i.letterSpacing+";margin-left:"+i.marginLeft+";margin-right:"+i.marginRight+";padding-left:"+i.paddingLeft+";padding-right:"+i.paddingRight+";text-indent:"+i.textIndent+";text-transform:"+i.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var i=document.getElementById(Hn)||Vn();i.style.cssText+=a;i.innerHTML=Kn(e);var r=window.getComputedStyle(i).width;t.style.width=r;return r}t.addEventListener("input",r);var n=r();if(e&&e.minWidth&&n!=="0px"){t.style.minWidth=n}return function(){t.removeEventListener("input",r);var e=document.getElementById(Hn);if(e){e.parentNode.removeChild(e)}}};const Jn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-multiple .select-wrapper-inner{flex-wrap:wrap}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const Gn=Jn;const Zn={term:"",isOpen:false,isLoading:false,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let Xn=0;let Qn=0;const to=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.catChange=r(this,"catChange",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Xn++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=Zn;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.multiple=false;this.debounce=250;this.placement="bottom-start";this.value=undefined;this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.clearable=false;this.tags=false;this.tagHint=undefined;this.noItems=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}onStateChanged(t,e){const i=i=>t[i]!==e[i];if(i("isOpen")){this.update()}if(i("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(i("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const i=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=i}else{t=i.length?i[0]:""}}else{const e=i.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const a=this.state.selection.filter((t=>t.item.id.startsWith(`select-${this.id}-tag`))).map((t=>t.render.label));if(this.multiple){t={ids:e,tags:a}}else{t={id:e.length?e[0]:"",tag:a.length?a[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){qn(this.input)}if(this.trigger&&this.dropdown){ja(this.trigger,this.dropdown,(()=>this.update()))}}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on select",this)}}onBlur(t){if(!this.multiple&&this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}this.hide();if(!this.multiple&&(!this.tags||!this.state.selection?.length)){if(this.state.tempSelection?.length){this.patchState({activeSelectionIndex:-1,selection:this.state.tempSelection,tempSelection:[],options:[],term:this.state.tempSelection[0].render.label})}else if(!this.state.selection?.length){this.patchState({activeSelectionIndex:-1,selection:[],tempSelection:[],options:[],term:""})}}else{this.patchState({activeSelectionIndex:-1})}this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t.key)){this.onArrowKeyDown(t)}else if(["Enter"," "].includes(t.key)&&e){if(this.tags&&this.state.activeOptionIndex===0&&this.state.options[0].item.id===`select-${this.id}-option-tag`){t.preventDefault();if(this.multiple){this.toggleTag(this.state.options[0])}else{this.createTag(this.state.options[0].render.label)}}else if(this.state.activeOptionIndex>=0){t.preventDefault();if(this.multiple){this.toggle(this.state.options[this.state.activeOptionIndex])}else{this.select(this.state.options[this.state.activeOptionIndex])}}else if(this.tags&&t.key==="Enter"&&this.state.activeOptionIndex<0){this.createTag(this.state.term)}}else if(t.key==="Escape"){if(this.hide()){t.stopPropagation()}}else if(t.key==="Backspace"||t.key==="Delete"){this.input?.focus();if(!this.multiple||!this.state.term||this.input?.selectionStart===0&&t.key==="Backspace"){if(this.state.activeSelectionIndex>=0){this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id)}else if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:this.state.term?[...this.state.selection]:[]})}}}else if(t.key==="Tab"){this.trigger?.setAttribute("tabindex","-1");if(this.multiple){this.patchState({activeSelectionIndex:-1,activeOptionIndex:-1})}else if(this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}}else if(t.key.length===1){this.input?.focus()}}onKeyUp(t){if(t.key==="Tab"&&!t.shiftKey){this.hostElement.shadowRoot?.activeElement===this.trigger&&this.input?.focus();if(this.hostElement.shadowRoot?.activeElement===this.input){this.show()}}else if(t.key==="Tab"&&t.shiftKey){const t=this.trigger?.querySelector(`#select-clear-btn-${this.id}`);if(t){this.hostElement.shadowRoot?.activeElement===t&&this.show()}else{this.show()}}}async doFocus(t){this.input?.focus(t)}async doBlur(){this.input?.blur()}async clear(){this.clearInput()}async connect(t){this.connector=t;let e;this.subscription?.unsubscribe();this.subscription=this.term$.asObservable().pipe(ft((t=>t?nt(this.debounce):R(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),Dt((t=>t+1),0),It(0)))),At((()=>this.patchState({options:[]}))),Mt((i=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(i,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements}))),Ct((t=>!t.last),true),Dt(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!i.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))){let t;if(this.isTagSelected(this.state.term)){t=this.state.selection.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))?.render.label}i.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:i})}))}render(){return e(i,{key:"062a85c7c55fa74a196cbca508dd12c08f329922"},e("div",{key:"c4d7213f5c5d8098053f740128d07faeaa8a96bf",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"75573825fa123e453a5f2877d163faecdb6fd5c5",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"))))),e("div",{key:"1f78a80916cf895f76bd318b03d575ed87789a49",class:"select-container"},e("div",{key:"5998ad61fb04fbbc242883b39049b083c89fdbcf",class:{"select-wrapper":true,"select-disabled":this.disabled,"select-invalid":this.invalid},ref:t=>this.trigger=t,id:this.id,role:"combobox","aria-expanded":this.state.isOpen||this.isPillboxActive(),"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-required":this.required?"true":false,"aria-activedescendant":this.activeDescendant,onClick:t=>this.onClick(t)},e("div",{key:"b251a7ec629213881100fe8a22cfe963e9e3ca0f",class:"select-wrapper-inner"},this.multiple&&this.state.selection.length?e("div",{id:`select-pillbox-${this.id}`,role:"listbox","aria-orientation":"horizontal",class:"select-pills"},this.state.selection.map(((t,i)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===i},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${i}`},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",null,t.render.label),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:D.t("select.deselect"),onClick:()=>this.deselect(t.item.id),tabIndex:-1,"data-dropdown-no-close":true}))))):this.state.selection.length&&this.state.selection[0].render.avatar?e("cat-avatar",{label:this.state.selection[0].render.label,round:this.state.selection[0].render.avatar.round,src:this.state.selection[0].render.avatar.src,icon:this.state.selection[0].render.avatar.icon,initials:this.state.selection[0].render.avatar.initials??""}):null,e("input",{key:"148ddd23d61a93bc56c1d7944bae37cd174038a8",...this.nativeAttributes,part:"input",class:"select-input",ref:t=>this.input=t,"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-activedescendant":this.activeDescendant,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),value:!this.multiple?this.state.term:undefined,placeholder:this.placeholder,disabled:this.disabled||this.state.isResolving})),this.state.isResolving&&e("cat-spinner",null),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),(this.state.selection.length||this.state.term.length)&&!this.disabled&&!this.state.isResolving&&this.clearable?e("cat-button",{id:`select-clear-btn-${this.id}`,iconOnly:true,icon:"$cat:input-close",variant:"text",size:"s",a11yLabel:D.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?D.t("select.close"):D.t("select.open"),"aria-controls":`select-listbox-${this.id}`,"aria-expanded":this.state.isOpen,tabIndex:-1,disabled:this.disabled||this.state.isResolving,"data-dropdown-no-close":true})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"5d1f9bbcdd97d67a67da30715b6eb558c8828846",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isLoading?Array.from(Array(to.SKELETON_COUNT)).map((()=>e("li",{class:"select-option-loading"},e("cat-skeleton",{variant:"body",lines:1}),e("cat-skeleton",{variant:"body",lines:1})))):!this.state.options.length&&!this.tags&&e("li",{class:"select-option-empty"},this.noItems?this.noItems:D.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,i)=>{const a=this.tags&&t.item.id===`select-${this.id}-option-tag`;const r=this.isSelected(t.item.id)||this.tags&&this.isTagSelected(t.render.label);const n=()=>{if(a){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${i}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===i},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!a?this.toggle(t):this.toggleTag(t);e.stopPropagation()}},e("span",{slot:"label",class:"select-option-inner"},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description)))):e("div",{class:{"select-option-inner":true,"select-option-single":true,"select-option-active":this.state.activeOptionIndex===i},onFocus:()=>this.input?.focus(),onClick:()=>a?this.createTag(t.render.label):this.select(t),tabIndex:-1},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description))))}))}resolve(){const t=this.connector;if(!t){return}this.patchState({isResolving:true});const e=this.initIds();let i;if(this.tags){i=this.initTags()}const a=e.length?t.resolve(e).pipe(zt()):R([]);a.pipe(dt((()=>R([])))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags){i.filter((t=>!this.isTagSelected(t,a))).forEach(((t,e)=>{const i={id:`select-${this.id}-tag-${e}`,name:t};a.push({item:i,render:{label:i.name}})}))}this.patchState({isResolving:false,selection:a,term:!this.multiple&&a.length?a[0].render.label:""})}))}toSelectItems(t,e){return e.map((e=>({item:{...e,id:t.customId?t.customId(e):e.id},render:t.render(e)})))}show(){if(!this.state.isOpen&&this.connector){this.connect(this.connector);this.patchState({isOpen:true});this.catOpen.emit();this.term$.next("");this.input?.classList.remove("select-input-transparent-caret")}}hide(){if(this.state.isOpen){this.patchState({isOpen:false,activeOptionIndex:-1});this.catClose.emit();return true}return false}search(t){this.patchState({term:t,activeOptionIndex:-1,activeSelectionIndex:-1});this.term$.next(t)}isSelected(t){return this.state.selection.findIndex((e=>e.item.id===t))>=0}select(t){if(!this.isSelected(t.item.id)){let e;if(this.multiple){e=[...this.state.selection,t]}else{e=[t];this.search(t.render.label)}this.patchState({selection:e,tempSelection:[]});if(this.multiple&&this.state.term.trim()&&this.input){this.patchState({term:"",activeOptionIndex:-1});this.term$.next("");this.input.value=""}}this.setTransparentCaret()}deselect(t){if(this.isSelected(t)){this.patchState({selection:this.state.selection.filter((e=>e.item.id!==t)),activeSelectionIndex:-1})}}toggle(t){this.isSelected(t.item.id)?this.deselect(t.item.id):this.tags&&this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.select(t)}clearInput(){if(this.input&&this.state.term){this.patchState({selection:[],term:"",activeOptionIndex:-1,tempSelection:[]});this.term$.next("");this.input.value=""}else{this.patchState({selection:[],tempSelection:[]})}}reset(t){this.connector=t??this.connector;this.subscription?.unsubscribe();this.subscription=undefined;this.state=Zn}onClick(t){if(this.disabled){return}const e=t.target;this.trigger?.setAttribute("tabindex","0");this.input?.focus();if(e===this.trigger||e===this.input||e.classList.contains("select-btn")||e.nodeName==="SPAN"){this.state.isOpen?this.hide():this.show()}}onInput(){this.search(this.input?.value.trim()||"");if(!this.multiple){if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:[...this.state.selection]})}if(!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Ua(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Ki(to.DROPDOWN_OFFSET),Ya()]}).then((({x:t,y:e,placement:i})=>{if(this.dropdown){this.dropdown.dataset.placement=i;Object.assign(this.dropdown.style,{width:`${this.trigger?.clientWidth}px`,left:`${t}px`,top:`${e}px`})}}))}}patchState(t){this.state={...this.state,...t}}isPillboxActive(){return this.state.activeSelectionIndex>=0}get activeDescendant(){let t=undefined;if(this.state.activeOptionIndex>=0){t=`select-${this.id}-option-${this.state.activeOptionIndex}`}else if(this.state.activeSelectionIndex>=0){t=`select-${this.id}-selection-${this.state.activeSelectionIndex}`}return t}onArrowKeyDown(t){let e=false;this.input?.focus();switch(t.key){case"ArrowDown":e=true;this.state.isOpen?this.patchState({activeOptionIndex:Math.min(this.state.activeOptionIndex+1,this.state.options.length-1),activeSelectionIndex:-1}):this.show();break;case"ArrowUp":e=true;this.state.activeOptionIndex>=0?this.patchState({activeOptionIndex:Math.max(this.state.activeOptionIndex-1,-1),activeSelectionIndex:-1}):this.hide();break;case"ArrowLeft":if(this.input?.selectionStart===0){e=true;let t;this.state.activeSelectionIndex>0?t=Math.max(this.state.activeSelectionIndex-1,-1):t=this.state.selection.length-1;this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}break;case"ArrowRight":if(this.state.activeSelectionIndex>=0){e=true;let t=-1;if(this.state.activeSelectionIndexe.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const i=e?.tags;const a={id:`select-${this.id}-tag-${i?.length?i?.length+Qn++:0}`,name:t};this.select({item:a,render:{label:a.name}})}this.setTransparentCaret()}removeTag(t){if(this.isTagSelected(t)){const e=this.state.selection.find((e=>e.render.label.toLowerCase()===t.toLowerCase()));e&&this.deselect(e.item.id)}}toggleTag(t){this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.createTag(t.render.label)}initIds(){let t=[];if(this.value){if(!this.tags){if(this.multiple){t=this.value}else{t=[this.value]}}else{if(this.multiple){const e=this.value;t=e.ids?e.ids:[]}else{const e=this.value;t=e.id?[e.id]:[]}}}return t}initTags(){let t=[];if(this.value){if(this.multiple){const e=this.value;t=e.tags?e.tags:[]}else{const e=this.value;t=e.tag?[e.tag]:[]}}return t}setTransparentCaret(){if(!this.multiple){this.hide();this.input?.classList.add("select-input-transparent-caret")}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}get hostElement(){return a(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};to.SKELETON_COUNT=4;to.DROPDOWN_OFFSET=4;to.style=Gn;const eo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})});this.multipleSelectAvatarInitials?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{round:true,initials:`JD`}})});this.multipleSelectTagging?.connect(this.countryConnector);this.singleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({last:false,totalElements:1e4,content:Array.from({length:10},((i,a)=>({id:""+(a+e*10),firstName:"John",lastName:`Doe (${a+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.singleSelectAvatar?.connect(this.countryConnector);this.singleSelectAvatarInitials?.connect({...this.countryConnector,render:t=>({label:t.country,description:t.capital||"No capital",avatar:{round:true,initials:`${t.country.charAt(0)?.toUpperCase()??"J"}${t.capital?.charAt(0)?.toUpperCase()??"D"}`}})});this.singleSelectTagging?.connect(this.countryConnector);setTimeout((()=>this.multipleSelect&&(this.multipleSelect.value=[])),5e3)}render(){return e(i,{key:"fbbdfc05bd034597b84d235445b70c526ed17dd4",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"e88f94e3022868b3ec6ca75a704a45edac6dedc6",label:"Multiple Select",hint:"This is a hint!",ref:t=>this.multipleSelect=t,value:["1"],placeholder:"Hello World",onCatChange:()=>console.log("Multiple change",this.multipleSelect?.value),onCatBlur:t=>console.log("Multiple blur",t),multiple:true,noItems:"No results",clearable:true,errorUpdate:false},e("span",{key:"a5e00768df01e4f91dfd2b4b3f62a998df32bf7d",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"935aacbe810131079d95d61d9e6fd2efbec03d01",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"0b8fbe7e2ec42acf7cbd01fd216d0909befd30a2",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"509741cf8a8f6438649f2a4debe0829fd3b905eb",label:"Multiple with tagging support",hint:"This is a hint!",ref:t=>this.multipleSelectTagging=t,value:{ids:["1"],tags:["Test","Albania","Algeria"]},placeholder:"Select country",onCatChange:()=>console.log("Multiple tagging change",this.multipleSelectTagging?.value),multiple:true,tags:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"a42ff7c4b8f1686fa0cdbd5a202b4bff59f7e599",label:"Single Select",hint:"This is a hint!",ref:t=>this.singleSelect=t,placeholder:"Search for a country or capital",onCatBlur:t=>console.log("Single blur",t),clearable:true,errorUpdate:false}),e("cat-select",{key:"e29353e92663b785844080bf6ef6937348c80379",label:"Single with img",ref:t=>this.singleSelectAvatar=t,value:"1",placeholder:"Search for a country or capital",clearable:true,errorUpdate:false}),e("cat-select",{key:"a53e0848faed0a98be3d2bc6e81c1e21c82cbc9c",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"f6173b84ec5d84401dbc7190c6e09719c0412f26",overflow:true},e("cat-button",{key:"4d45f4bd17867cb4d54078f503e8613441e04374",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"2736181440e085cf623c2c3c875edaab23f71a3e",slot:"content",style:{width:"400px"}},e("cat-select",{key:"9fa27d270fc984bd22ef82de2e54e7ac952f71a2",label:"Single with tagging support",ref:t=>this.singleSelectTagging=t,value:{id:"",tag:"Albania"},placeholder:"Search for a country or capital",onCatChange:()=>console.log("Single change",this.singleSelectTagging?.value),tagHint:"new country",tags:true,clearable:true,errorUpdate:false,style:{width:"90%"}}))))}get countryConnector(){return{resolve:t=>R(t.map((t=>io.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const i=io.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const a=i.slice(e*10,e*10+10);return R({last:a.length<10,totalElements:i.length,content:a}).pipe(vt(500))},render:t=>({label:t.country,description:t.capital||"No capital",avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})}}};const io=[{id:"0",country:"Afghanistan Extra extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large ",capital:"Kabul"},{id:"1",country:"Albania",capital:"Tirana"},{id:"2",country:"Algeria",capital:"Alger"},{id:"3",country:"American Samoa",capital:"Fagatogo"},{id:"4",country:"Andorra",capital:"Andorra la Vella"},{id:"5",country:"Angola",capital:"Luanda"},{id:"6",country:"Anguilla",capital:"The Valley"},{id:"7",country:"Antarctica"},{id:"8",country:"Antigua and Barbuda",capital:"Saint John's"},{id:"9",country:"Argentina",capital:"Buenos Aires"},{id:"10",country:"Armenia",capital:"Yerevan"},{id:"11",country:"Aruba",capital:"Oranjestad"},{id:"12",country:"Australia",capital:"Canberra"},{id:"13",country:"Austria",capital:"Wien"},{id:"14",country:"Azerbaijan",capital:"Baku"},{id:"15",country:"Bahamas",capital:"Nassau"},{id:"16",country:"Bahrain",capital:"al-Manama"},{id:"17",country:"Bangladesh",capital:"Dhaka"},{id:"18",country:"Barbados",capital:"Bridgetown"},{id:"19",country:"Belarus",capital:"Minsk"},{id:"20",country:"Belgium",capital:"Bruxelles [Brussel]"},{id:"21",country:"Belize",capital:"Belmopan"},{id:"22",country:"Benin",capital:"Porto-Novo"},{id:"23",country:"Bermuda",capital:"Hamilton"},{id:"24",country:"Bhutan",capital:"Thimphu"},{id:"25",country:"Bolivia",capital:"La Paz"},{id:"26",country:"Bosnia and Herzegovina",capital:"Sarajevo"},{id:"27",country:"Botswana",capital:"Gaborone"},{id:"28",country:"Bouvet Island"},{id:"29",country:"Brazil",capital:"Brasília"},{id:"30",country:"British Indian Ocean Territory"},{id:"31",country:"Brunei",capital:"Bandar Seri Begawan"},{id:"32",country:"Bulgaria",capital:"Sofia"},{id:"33",country:"Burkina Faso",capital:"Ouagadougou"},{id:"34",country:"Burundi",capital:"Bujumbura"},{id:"35",country:"Cambodia",capital:"Phnom Penh"},{id:"36",country:"Cameroon",capital:"Yaound"},{id:"37",country:"Canada",capital:"Ottawa"},{id:"38",country:"Cape Verde",capital:"Praia"},{id:"39",country:"Cayman Islands",capital:"George Town"},{id:"40",country:"Central African Republic",capital:"Bangui"},{id:"41",country:"Chad",capital:"N'Djam"},{id:"42",country:"Chile",capital:"Santiago de Chile"},{id:"43",country:"China",capital:"Peking"},{id:"44",country:"Christmas Island",capital:"Flying Fish Cove"},{id:"45",country:"Cocos (Keeling) Islands",capital:"West Island"},{id:"46",country:"Colombia",capital:"Santaf"},{id:"47",country:"Comoros",capital:"Moroni"},{id:"48",country:"Congo",capital:"Brazzaville"},{id:"49",country:"Cook Islands",capital:"Avarua"},{id:"50",country:"Costa Rica",capital:"San José"},{id:"51",country:"Croatia",capital:"Zagreb"},{id:"52",country:"Cuba",capital:"La Habana"},{id:"53",country:"Cyprus",capital:"Nicosia"},{id:"54",country:"Czech Republic",capital:"Praha"},{id:"55",country:"Denmark",capital:"Copenhagen"},{id:"56",country:"Djibouti",capital:"Djibouti"},{id:"57",country:"Dominica",capital:"Roseau"},{id:"58",country:"Dominican Republic",capital:"Santo Domingo de Guzm"},{id:"59",country:"East Timor",capital:"Dili"},{id:"60",country:"Ecuador",capital:"Quito"},{id:"61",country:"Egypt",capital:"Cairo"},{id:"62",country:"El Salvador",capital:"San Salvador"},{id:"63",country:"England",capital:"London"},{id:"64",country:"Equatorial Guinea",capital:"Malabo"},{id:"65",country:"Eritrea",capital:"Asmara"},{id:"66",country:"Estonia",capital:"Tallinn"},{id:"67",country:"Ethiopia",capital:"Addis Abeba"},{id:"68",country:"Falkland Islands",capital:"Stanley"},{id:"69",country:"Faroe Islands",capital:"Tórshavn"},{id:"70",country:"Fiji Islands",capital:"Suva"},{id:"71",country:"Finland",capital:"Helsinki [Helsingfors]"},{id:"72",country:"France",capital:"Paris"},{id:"73",country:"French Guiana",capital:"Cayenne"},{id:"74",country:"French Polynesia",capital:"Papeete"},{id:"75",country:"French Southern territories"},{id:"76",country:"Gabon",capital:"Libreville"},{id:"77",country:"Gambia",capital:"Banjul"},{id:"78",country:"Georgia",capital:"Tbilisi"},{id:"79",country:"Germany",capital:"Berlin"},{id:"80",country:"Ghana",capital:"Accra"},{id:"81",country:"Gibraltar",capital:"Gibraltar"},{id:"82",country:"Greece",capital:"Athenai"},{id:"83",country:"Greenland",capital:"Nuuk"},{id:"84",country:"Grenada",capital:"Saint George's"},{id:"85",country:"Guadeloupe",capital:"Basse-Terre"},{id:"86",country:"Guam",capital:"Aga"},{id:"87",country:"Guatemala",capital:"Ciudad de Guatemala"},{id:"88",country:"Guinea",capital:"Conakry"},{id:"89",country:"Guinea-Bissau",capital:"Bissau"},{id:"90",country:"Guyana",capital:"Georgetown"},{id:"91",country:"Haiti",capital:"Port-au-Prince"},{id:"92",country:"Heard Island and McDonald Islands"},{id:"93",country:"Holy See (Vatican City State)",capital:"Citt"},{id:"94",country:"Honduras",capital:"Tegucigalpa"},{id:"95",country:"Hong Kong",capital:"Victoria"},{id:"96",country:"Hungary",capital:"Budapest"},{id:"97",country:"Iceland",capital:"Reykjavík"},{id:"98",country:"India",capital:"New Delhi"},{id:"99",country:"Indonesia",capital:"Jakarta"},{id:"100",country:"Iran",capital:"Tehran"},{id:"101",country:"Iraq",capital:"Baghdad"},{id:"102",country:"Ireland",capital:"Dublin"},{id:"103",country:"Israel",capital:"Jerusalem"},{id:"104",country:"Italy",capital:"Roma"},{id:"105",country:"Ivory Coast",capital:"Yamoussoukro"},{id:"106",country:"Jamaica",capital:"Kingston"},{id:"107",country:"Japan",capital:"Tokyo"},{id:"108",country:"Jordan",capital:"Amman"},{id:"109",country:"Kazakhstan",capital:"Astana"},{id:"110",country:"Kenya",capital:"Nairobi"},{id:"111",country:"Kiribati",capital:"Bairiki"},{id:"112",country:"Kuwait",capital:"Kuwait"},{id:"113",country:"Kyrgyzstan",capital:"Bishkek"},{id:"114",country:"Laos",capital:"Vientiane"},{id:"115",country:"Latvia",capital:"Riga"},{id:"116",country:"Lebanon",capital:"Beirut"},{id:"117",country:"Lesotho",capital:"Maseru"},{id:"118",country:"Liberia",capital:"Monrovia"},{id:"119",country:"Libyan Arab Jamahiriya",capital:"Tripoli"},{id:"120",country:"Liechtenstein",capital:"Vaduz"},{id:"121",country:"Lithuania",capital:"Vilnius"},{id:"122",country:"Luxembourg",capital:"Luxembourg [Luxemburg/L"},{id:"123",country:"Macao",capital:"Macao"},{id:"124",country:"North Macedonia",capital:"Skopje"},{id:"125",country:"Madagascar",capital:"Antananarivo"},{id:"126",country:"Malawi",capital:"Lilongwe"},{id:"127",country:"Malaysia",capital:"Kuala Lumpur"},{id:"128",country:"Maldives",capital:"Male"},{id:"129",country:"Mali",capital:"Bamako"},{id:"130",country:"Malta",capital:"Valletta"},{id:"131",country:"Marshall Islands",capital:"Dalap-Uliga-Darrit"},{id:"132",country:"Martinique",capital:"Fort-de-France"},{id:"133",country:"Mauritania",capital:"Nouakchott"},{id:"134",country:"Mauritius",capital:"Port-Louis"},{id:"135",country:"Mayotte",capital:"Mamoutzou"},{id:"136",country:"Mexico",capital:"Ciudad de M"},{id:"137",country:"Micronesia, Federated States of",capital:"Palikir"},{id:"138",country:"Moldova",capital:"Chisinau"},{id:"139",country:"Monaco",capital:"Monaco-Ville"},{id:"140",country:"Mongolia",capital:"Ulan Bator"},{id:"141",country:"Montenegro",capital:"Podgorica"},{id:"142",country:"Montserrat",capital:"Plymouth"},{id:"143",country:"Morocco",capital:"Rabat"},{id:"144",country:"Mozambique",capital:"Maputo"},{id:"145",country:"Myanmar",capital:"Rangoon (Yangon)"},{id:"146",country:"Namibia",capital:"Windhoek"},{id:"147",country:"Nauru",capital:"Yaren"},{id:"148",country:"Nepal",capital:"Kathmandu"},{id:"149",country:"Netherlands",capital:"Amsterdam"},{id:"150",country:"Netherlands Antilles",capital:"Willemstad"},{id:"151",country:"New Caledonia",capital:"Noum"},{id:"152",country:"New Zealand",capital:"Wellington"},{id:"153",country:"Nicaragua",capital:"Managua"},{id:"154",country:"Niger",capital:"Niamey"},{id:"155",country:"Nigeria",capital:"Abuja"},{id:"156",country:"Niue",capital:"Alofi"},{id:"157",country:"Norfolk Island",capital:"Kingston"},{id:"158",country:"North Korea",capital:"Pyongyang"},{id:"159",country:"Northern Ireland",capital:"Belfast"},{id:"160",country:"Northern Mariana Islands",capital:"Garapan"},{id:"161",country:"Norway",capital:"Oslo"},{id:"162",country:"Oman",capital:"Masqat"},{id:"163",country:"Pakistan",capital:"Islamabad"},{id:"164",country:"Palau",capital:"Koror"},{id:"165",country:"Palestine",capital:"Gaza"},{id:"166",country:"Panama",capital:"Ciudad de Panamá"},{id:"167",country:"Papua New Guinea",capital:"Port Moresby"},{id:"168",country:"Paraguay",capital:"Asunción"},{id:"169",country:"Peru",capital:"Lima"},{id:"170",country:"Philippines",capital:"Manila"},{id:"171",country:"Pitcairn",capital:"Adamstown"},{id:"172",country:"Poland",capital:"Warszawa"},{id:"173",country:"Portugal",capital:"Lisboa"},{id:"174",country:"Puerto Rico",capital:"San Juan"},{id:"175",country:"Qatar",capital:"Doha"},{id:"176",country:"Reunion",capital:"Saint-Denis"},{id:"177",country:"Romania",capital:"Bucuresti"},{id:"178",country:"Russian Federation",capital:"Moscow"},{id:"179",country:"Rwanda",capital:"Kigali"},{id:"180",country:"Saint Helena",capital:"Jamestown"},{id:"181",country:"Saint Kitts and Nevis",capital:"Basseterre"},{id:"182",country:"Saint Lucia",capital:"Castries"},{id:"183",country:"Saint Pierre and Miquelon",capital:"Saint-Pierre"},{id:"184",country:"Saint Vincent and the Grenadines",capital:"Kingstown"},{id:"185",country:"Samoa",capital:"Apia"},{id:"186",country:"San Marino",capital:"San Marino"},{id:"187",country:"Sao Tome and Principe",capital:"São Tomé"},{id:"188",country:"Saudi Arabia",capital:"Riyadh"},{id:"189",country:"Scotland",capital:"Edinburgh"},{id:"190",country:"Senegal",capital:"Dakar"},{id:"191",country:"Serbia",capital:"Belgrade"},{id:"192",country:"Seychelles",capital:"Victoria"},{id:"193",country:"Sierra Leone",capital:"Freetown"},{id:"194",country:"Singapore",capital:"Singapore"},{id:"195",country:"Slovakia",capital:"Bratislava"},{id:"196",country:"Slovenia",capital:"Ljubljana"},{id:"197",country:"Solomon Islands",capital:"Honiara"},{id:"198",country:"Somalia",capital:"Mogadishu"},{id:"199",country:"South Africa",capital:"Pretoria"},{id:"200",country:"South Georgia and the South Sandwich Islands"},{id:"201",country:"South Korea",capital:"Seoul"},{id:"202",country:"South Sudan",capital:"Juba"},{id:"203",country:"Spain",capital:"Madrid"},{id:"204",country:"Sri Lanka",capital:"Colombo, Sri Jayawardenepura Kotte"},{id:"205",country:"Sudan",capital:"Khartum"},{id:"206",country:"Suriname",capital:"Paramaribo"},{id:"207",country:"Svalbard and Jan Mayen",capital:"Longyearbyen"},{id:"208",country:"Swaziland",capital:"Mbabane"},{id:"209",country:"Sweden",capital:"Stockholm"},{id:"210",country:"Switzerland",capital:"Bern"},{id:"211",country:"Syria",capital:"Damascus"},{id:"212",country:"Tajikistan",capital:"Dushanbe"},{id:"213",country:"Tanzania",capital:"Dodoma"},{id:"214",country:"Thailand",capital:"Bangkok"},{id:"215",country:"The Democratic Republic of Congo",capital:"Kinshasa"},{id:"216",country:"Togo",capital:"Lomé"},{id:"217",country:"Tokelau",capital:"Fakaofo"},{id:"218",country:"Tonga",capital:"Nuku'alofa"},{id:"219",country:"Trinidad and Tobago",capital:"Port-of-Spain"},{id:"220",country:"Tunisia",capital:"Tunis"},{id:"221",country:"Turkey",capital:"Ankara"},{id:"222",country:"Turkmenistan",capital:"Ashgabat"},{id:"223",country:"Turks and Caicos Islands",capital:"Cockburn Town"},{id:"224",country:"Tuvalu",capital:"Funafuti"},{id:"225",country:"Uganda",capital:"Kampala"},{id:"226",country:"Ukraine",capital:"Kyiv"},{id:"227",country:"United Arab Emirates",capital:"Abu Dhabi"},{id:"228",country:"United Kingdom",capital:"London"},{id:"229",country:"United States",capital:"Washington"},{id:"230",country:"United States Minor Outlying Islands"},{id:"231",country:"Uruguay",capital:"Montevideo"},{id:"232",country:"Uzbekistan",capital:"Toskent"},{id:"233",country:"Vanuatu",capital:"Port-Vila"},{id:"234",country:"Venezuela",capital:"Caracas"},{id:"235",country:"Vietnam",capital:"Hanoi"},{id:"236",country:"Virgin Islands, British",capital:"Road Town"},{id:"237",country:"Virgin Islands, U.S.",capital:"Charlotte Amalie"},{id:"238",country:"Wales",capital:"Cardiff"},{id:"239",country:"Wallis and Futuna",capital:"Mata-Utu"},{id:"240",country:"Western Sahara",capital:"El-Aai"},{id:"241",country:"Yemen",capital:"Sanaa"},{id:"242",country:"Zambia",capital:"Lusaka"},{id:"243",country:"Zimbabwe",capital:"Harare"}];const ao=':host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]:not(:last-child)){margin-bottom:1rem}:host([variant=body]:not(:last-child)){margin-bottom:2rem}.skeleton{display:block;border-radius:var(--cat-border-radius-m, 0.25rem);background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1.125rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}';const ro=ao;const no=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(i,{key:"8f1e4584c050cc8b6d1341efd3d8b04ca7223a73"},Array.from(Array(this.count)).map((()=>e("div",{style:this.style,class:{skeleton:true,[`skeleton-${this.effect}`]:Boolean(this.effect),[`skeleton-${this.variant}`]:Boolean(this.variant),[`skeleton-${this.size}`]:Boolean(this.size)}}))))}get count(){switch(this.variant){case"head":return Math.max(1,this.lines||1);case"body":return Math.max(1,this.lines||3);default:return 1}}get style(){return this.variant==="head"||this.variant==="body"?{"--line-width":`${this.random(50,100)}%`}:undefined}random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}};no.style=ro;const oo=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";const so=oo;const co=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"cf1110c7ae2c653c87f44f2668aa3bcc757ed0c9","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"22d1a1c15575274a75d4203ae9a1c945a199759d",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"f067c870a5699603761b7d8d6e4a32354cef6f7e",cx:"24",cy:"24",r:"21.5"})))}};co.style=so;const lo=":host{display:block}:host([hidden]){display:none}";const ho=lo;let fo=0;const uo=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.label="";this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.url=undefined;this.urlTarget=undefined;this.deactivated=false;this.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${fo++}`}}onClick(t){this.catClick.emit(t)}render(){return e(i,{key:"e0b1e0562a35130f4b0de08530eb66c9df5ec145"})}get hostElement(){return a(this)}};uo.style=ho;const po=':host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:"";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-error{color:rgb(var(--cat-danger-text-active, 174, 42, 10))}.cat-tab.cat-tab-active::after{opacity:1}';const bo=po;const mo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.tabs=[];this.activeTab="";this.tabsAlign="left"}componentWillLoad(){this.syncTabs()}componentDidLoad(){this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-TAB"))&&this.syncTabs()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onActiveTabChange(t){const e=this.tabs.findIndex((e=>e.id===t));this.catChange.emit({id:t,index:e})}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)){const e=this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');const i=Array.from(e??[]).filter((t=>!t.disabled));const a=this.hostElement.shadowRoot?.activeElement;const r=a?i.indexOf(a):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+i.length)%i.length;i[o].doFocus();t.preventDefault()}}async setActive(t){this.activate(this.tabs.find((e=>e.id===t)))}async setActiveIndex(t){this.activate(this.tabs[t])}render(){return e(i,{key:"05969fc6e983159aaad4a36ab07b6326c5c85589"},this.tabs.map((t=>e("cat-button",{buttonId:t.id,role:"tab",part:"tab",class:{"cat-tab":true,"cat-tab-active":t.id===this.activeTab,"cat-tab-error":t.error},active:t.id===this.activeTab,color:t.error?"danger":t.id===this.activeTab?"primary":"secondary",variant:"text",icon:t.icon?t.error?"$cat:input-error":t.icon:undefined,iconOnly:t.iconOnly,iconRight:t.iconRight,url:t.url,disabled:t.deactivated,urlTarget:t.urlTarget,onCatClick:()=>this.click(t),nativeAttributes:{...t.nativeAttributes},nativeContentAttributes:{"data-text":t.label},"data-dropdown-no-close":true},t.label))))}syncTabs(){this.tabs=Array.from(this.hostElement.querySelectorAll("cat-tab"));this.activeTab=this.activeTab||this.tabs.filter((t=>this.canActivate(t)))[0]?.id}canActivate(t){return!!t&&!t.deactivated&&!t.url&&t.id!==this.activeTab}click(t){if(this.canActivate(t)){t.click();this.activate(t)}}activate(t){if(this.canActivate(t)){this.activeTab=t.id}}get hostElement(){return a(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};mo.style=bo;var go=new Map;function vo(t){var e=go.get(t);e&&e.destroy()}function yo(t){var e=go.get(t);e&&e.update()}var ko=null;"undefined"==typeof window?((ko=function(t){return t}).destroy=function(t){return t},ko.update=function(t){return t}):((ko=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!go.has(t)){var e,i=null,a=window.getComputedStyle(t),r=(e=t.value,function(){o({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),n=function(e){t.removeEventListener("autosize:destroy",n),t.removeEventListener("autosize:update",s),t.removeEventListener("input",r),window.removeEventListener("resize",s),Object.keys(e).forEach((function(i){return t.style[i]=e[i]})),go.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",n),t.addEventListener("autosize:update",s),t.addEventListener("input",r),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",go.set(t,{destroy:n,update:s}),s()}function o(e){var r,n,s=e.restoreTextAlign,c=void 0===s?null:s,l=e.testForHeightReduction,d=void 0===l||l,h=a.overflowY;if(0!==t.scrollHeight&&("vertical"===a.resize?t.style.resize="none":"both"===a.resize&&(t.style.resize="horizontal"),d&&(r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],i=t[1];e.style.scrollBehavior="auto",e.scrollTop=i,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===a.boxSizing?t.scrollHeight-(parseFloat(a.paddingTop)+parseFloat(a.paddingBottom)):t.scrollHeight+parseFloat(a.borderTopWidth)+parseFloat(a.borderBottomWidth),"none"!==a.maxHeight&&n>parseFloat(a.maxHeight)?("hidden"===a.overflowY&&(t.style.overflow="scroll"),n=parseFloat(a.maxHeight)):"hidden"!==a.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",c&&(t.style.textAlign=c),r&&r(),i!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=n),h!==a.overflow&&!c)){var f=a.textAlign;"hidden"===a.overflow&&(t.style.textAlign="start"===f?"end":"start"),o({restoreTextAlign:f,testForHeightReduction:!0})}}function s(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],vo),t},ko.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],yo),t});var xo=ko;const wo=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}:host([hidden]){display:none}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";const zo=wo;let Do=0;const Io=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-textarea-${Do++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.disabled=false;this.hint=undefined;this.identifier=undefined;this.label="";this.labelHidden=false;this.maxLength=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=3;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on textarea",this)}}componentDidLoad(){xo(this.textarea)}async doFocus(t){this.textarea.focus(t)}async doBlur(){this.textarea.blur()}async clear(){this.value="";this.catChange.emit(this.value)}onErrorsChanged(t){if(!zn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e(i,{key:"2fac5152cbeeb9d4a9c4dc0f9539bb1a1503c9e8"},e("div",{key:"88d992d98f72a0862b3736ad102a0124363e17b6",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"ab23b2ebcc13b7511c4e951041817bb8b1952c0c",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,part:"label"},e("span",{class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"30a02b82d605c5e416a63b8eef5205d41139ce6d",class:"textarea-container"},e("div",{key:"32aad8e1e15134dad90e991cc3e471b06dcbc9fd",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"96d5a02bfdb1c7feb85ce02380a59ff63a7d1760",...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.textarea.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(zn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Dn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.textarea;if(!t){this.showErrors()}}get hostElement(){return a(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Io.style=zo;function Mo(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function Ro(t){return{change:D.t("timepicker.change"),choose:D.t("timepicker.choose"),timeFormat:Mo(t)?"12":"24"}}function Co(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function Ao(t,e,i){const[,a,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=i?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let s=-Infinity;let c=Infinity;if(a!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),a,r).getTime()}if(n!==undefined&&o!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),s),c))}function So(t,e){const[,i,a]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(i===undefined||a===undefined){return false}return t.getHours()i||t.getHours()===i&&t.getMinutes()>a}const Fo=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.cat-time-addon{margin-left:-1px}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const Bo=Fo;const $o=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=D.getLocale();this.locale=Ro(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}componentWillLoad(){this.syncValue(this.value??"")}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){this.input?.mask({time:true,timeFormat:this.locale.timeFormat,timePattern:["h","m"]})}onOpen(){const t=t=>this.hostElement.shadowRoot?.querySelector(t);const e=Ao(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const i=t(`[data-time="${Co(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const a=t(`[data-time="${Co(e)}"]`);setTimeout((()=>{(a??i)?.doFocus();(a??i)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;if(!t){this.selectionTime=null;this.value=undefined}else{const e=Ao(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;this.value=Co(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==this.value){this.catChange.emit(this.value)}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(i,{key:"c7ebe7c00d372720ce9c34907438f47150df0820"},e("cat-input",{key:"e83d9bddbdff4d1e0c97531f3684618e0f4251a8",class:"cat-time-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.format(this.selectionTime,false),errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatFocus:t=>this.catFocus.emit(t.detail),onCatBlur:t=>this.onInputBlur(t.detail)},e("span",{key:"504e24bcf7d7fa3e0eddb7df91261778e720cc87",slot:"label"},this.hasSlottedLabel&&e("slot",{name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"c617e13394f44bd851beae13e809f791a56dfa42",class:"label-aria"}," (HH:mm)")),e("div",{key:"601bd57b6137a44901a3d32ce10f881aae67a2a8",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"ecdd2fb5987eb30890c9258ece4bd1e176b2d6c6",slot:"addon",placement:this.placement},e("cat-button",{key:"a38158d199940ff276b5263833c39cdbea04d194",slot:"trigger",class:"cat-time-toggle",disabled:this.disabled||this.readonly,icon:"$cat:timepicker-clock",iconOnly:true,a11yLabel:this.selectionTime?`${this.locale.change}, ${this.format(this.selectionTime)}`:this.locale.choose}),e("nav",{key:"e2e77112f74467cc2db37d24f38165389888978a",slot:"content",class:"cat-nav"},e("ul",{key:"c005ac2b43037f3e5953117e968a967ce60be477"},this.timeArray().map((t=>{const i=Co(t);const a=So(t,this.min??null)||To(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":a},disabled:a,active:i===this.value,color:i===this.value?"primary":"secondary",variant:i===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":i},this.format(t)))})))))),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let i=new Date(e.getTime());while(i.getDate()===e.getDate()){t.push(i);i=new Date(i.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,i]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||i===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,i,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),i,0))}toggleAm(){if(this.selectionTime){this.select(new Date(this.selectionTime.getTime()+(this.isAm?12:-12)*36e5))}else{this.isAm=!this.isAm}}onInputBlur(t){this.syncValue(this.input?.value??"");this.catBlur.emit(t)}format(t,e=true){const i=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?i:i.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const i=(t==="min"?e:this.min)??null;const a=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const s=r?Co(Ao(i,new Date(2e3,5,1,Number(n),Number(o)),a)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}get hostElement(){return a(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};$o.style=Bo;const Eo='.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:"";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}';const Oo=Eo;let No=0;const Wo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-toggle-${No++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){z.warn("[A11y] Missing ARIA label on toggle",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){return e(i,{key:"08337e6aece1d072c3c4540e4c5e97562a0c1f4c"},e("label",{key:"79b0b9d2d136125ba7f15be32a3a34da73488a2f",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"0c22754e817b0d6eab349583287c8d30f25f84ad",...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,class:"form-check-input",role:"switch",onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"7a08a4ec1fc79d18c16065697f672bf7f4e35908",class:"toggle"}),e("span",{key:"b78eacbcb262452ba33972f2647dc69b01c1bd20",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),this.hasHint&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"toggle-placeholder"}),e(ne,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}get hostElement(){return a(this)}};Wo.style=Oo;const Lo="ontouchstart"in window||navigator.maxTouchPoints>0;const jo=":host{display:contents}:host([hidden]){display:none}.tooltip{--cat-font-color-head:var(--cat-font-color-tooltip, 255, 255, 255);--cat-font-color-body:var(--cat-font-color-tooltip, 255, 255, 255);position:fixed;width:max-content;top:0;left:0;box-sizing:border-box;font-size:0.875rem;line-height:1.125rem;font-weight:500;background-color:rgb(var(--cat-bg-tooltip, 0, 0, 0));border-radius:var(--cat-border-radius-m, 0.25rem);color:rgb(var(--cat-font-color-tooltip, 255, 255, 255));transition:opacity 250ms linear, visibility 250ms linear;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;z-index:calc(var(--cat-z-index, 1000) + 200);max-width:min(100vw - 0.5rem, 20rem)}.tooltip-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.tooltip-show{opacity:1;visibility:visible}.tooltip p{margin:0}.tooltip-round{border-radius:10rem}.tooltip-s{padding:0.375rem 0.5rem}.tooltip-s.tooltip-round{padding:0.375rem 0.75rem}.tooltip-m{padding:0.75rem}.tooltip-m.tooltip-round{padding:0.75rem 1rem}.tooltip-l{padding:1rem}.tooltip-l.tooltip-round{padding:1rem 1.5rem}";const Po=jo;let Yo=0;const Ho=class{constructor(e){t(this,e);this.id=`cat-tooltip-${Yo++}`;this.inactive=false;this.open=false;this.content="";this.disabled=false;this.placement="top";this.round=false;this.size="m";this.showDelay=250;this.hideDelay=0;this.longTouchDuration=1e3;this.boundShowListener=this.showListener.bind(this);this.boundHideListener=this.hideListener.bind(this);this.boundWindowTouchStartListener=this.windowTouchStartListener.bind(this);this.boundTouchStartListener=this.touchStartListener.bind(this);this.boundTouchEndListener=this.touchEndListener.bind(this)}handleKeyDown({key:t}){t==="Escape"&&this.hideTooltip()}componentDidLoad(){const t=this.hostElement.shadowRoot?.querySelector("slot");this.trigger=t?.assignedElements?.()?.[0];if(this.trigger&&!this.trigger.hasAttribute("aria-describedby")){this.trigger.setAttribute("aria-describedby",this.id)}if(Lo){window.addEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.addEventListener("touchstart",this.boundTouchStartListener);this.trigger?.addEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.addEventListener("focusin",this.boundShowListener);this.trigger?.addEventListener("focusout",this.boundHideListener);this.trigger?.addEventListener("mouseenter",this.boundShowListener);this.trigger?.addEventListener("mouseleave",this.boundHideListener)}}componentWillRender(){this.inactive=this.disabled||!this.content&&!this.hostElement.querySelector('[slot="content"]')}disconnectedCallback(){if(Lo){window.removeEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.removeEventListener("touchstart",this.boundTouchStartListener);this.trigger?.removeEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.removeEventListener("mouseenter",this.boundShowListener);this.trigger?.removeEventListener("mouseleave",this.boundHideListener);this.trigger?.removeEventListener("focusin",this.boundShowListener);this.trigger?.removeEventListener("focusout",this.boundHideListener)}}render(){return e(i,{key:"89f7c5c154be4c86c2d5570d16449e20ae81528a"},e("slot",{key:"35a1fa867cad91a3025713cab9a88206fabe41d8"}),e("div",{key:"91aca336caf767b6deaf624cbc8e1d4ea084a74d",ref:t=>this.tooltip=t,id:this.id,role:"tooltip","aria-hidden":!this.open,"aria-live":this.open?"polite":"off",class:{tooltip:true,"tooltip-hidden":this.inactive,"tooltip-round":this.round,[`tooltip-${this.size}`]:Boolean(this.size)}},e("slot",{key:"44350ab48846c9447255a08d7f8f7aeb20305ae5",name:"content"},e("p",{key:"5513b56576c270906e079ea7b94e13d9afb7e3ed"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Ua(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Ki(Ho.OFFSET),Ya({fallbackAxisSideDirection:"start"}),Pa({padding:Ho.SHIFT_PADDING})]}).then((({x:t,y:e})=>{if(this.tooltip){Object.assign(this.tooltip.style,{left:`${Math.max(0,t)}px`,top:`${e}px`})}}))}}showListener(){window.clearTimeout(this.hideTimeout);this.hideTimeout=undefined;if(!this.showTimeout){this.showTimeout=window.setTimeout((()=>{this.showTimeout=undefined;this.showTooltip()}),this.showDelay)}}hideListener(){window.clearTimeout(this.showTimeout);this.showTimeout=undefined;if(!this.hideTimeout){this.hideTimeout=window.setTimeout((()=>{this.hideTimeout=undefined;this.hideTooltip()}),this.hideDelay)}}touchStartListener(t){t.stopPropagation();if(!this.touchTimeout){this.touchTimeout=window.setTimeout((()=>{this.touchTimeout=undefined;this.showTooltip()}),this.longTouchDuration)}}touchEndListener(){window.clearTimeout(this.touchTimeout);this.touchTimeout=undefined;this.hideTooltip()}windowTouchStartListener(){this.hideTooltip()}showTooltip(){if(this.trigger&&this.tooltip){this.cleanupFloatingUi=ja(this.trigger,this.tooltip,(()=>this.update()))}if(!this.inactive){this.open=true;this.tooltip?.classList.add("tooltip-show")}}hideTooltip(){this.open=false;this.tooltip?.classList.remove("tooltip-show");this.cleanupFloatingUi?.();this.cleanupFloatingUi=undefined}get hostElement(){return a(this)}};Ho.OFFSET=4;Ho.SHIFT_PADDING=4;Ho.style=Po;export{Bt as cat_alert,Nt as cat_avatar,jt as cat_badge,Xt as cat_button,ee as cat_button_group,re as cat_card,le as cat_checkbox,De as cat_date,Re as cat_date_inline,Va as cat_datepicker,Ga as cat_datepicker_inline,Xr as cat_dropdown,en as cat_form_group,nn as cat_icon,An as cat_input,Fn as cat_pagination,On as cat_radio,Ln as cat_radio_group,Yn as cat_scrollable,to as cat_select,eo as cat_select_demo,no as cat_skeleton,co as cat_spinner,uo as cat_tab,mo as cat_tabs,Io as cat_textarea,$o as cat_time,Wo as cat_toggle,Ho as cat_tooltip}; +//# sourceMappingURL=p-deb69820.entry.js.map \ No newline at end of file diff --git a/build/p-ff4075a2.entry.js.map b/build/p-deb69820.entry.js.map similarity index 73% rename from build/p-ff4075a2.entry.js.map rename to build/p-deb69820.entry.js.map index 75bfac984..e09aee415 100644 --- a/build/p-ff4075a2.entry.js.map +++ b/build/p-deb69820.entry.js.map @@ -1 +1 @@ -{"version":3,"names":["ObjectUnsubscribedError","createErrorClass","_super","ObjectUnsubscribedErrorImpl","this","name","message","Subject","Observable","constructor","super","closed","currentObservers","observers","isStopped","hasError","thrownError","lift","operator","subject","AnonymousSubject","_throwIfClosed","next","value","errorContext","Array","from","observer","error","err","length","shift","complete","unsubscribe","observed","_a","_trySubscribe","subscriber","_subscribe","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","push","Subscription","arrRemove","asObservable","observable","source","create","destination","_b","call","subscribe","dateTimestampProvider","now","delegate","Date","undefined","Action","scheduler","work","schedule","state","delay","intervalProvider","setInterval","handler","timeout","args","clearInterval","handle","AsyncAction","pending","id","recycleAsyncId","requestAsyncId","_id","flush","bind","_scheduler","execute","Error","_execute","_delay","errored","errorValue","e","actions","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","async","EMPTY","EmptyError","EmptyErrorImpl","isValidDate","isNaN","map","project","thisArg","operate","index","createOperatorSubscriber","isArray","callOrApply","fn","mapOneOrManyArgs","mergeInternals","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","active","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerFrom","innerValue","bufferedValue","executeSchedule","mergeMap","resultSelector","Infinity","isFunction","a","i","b","ii","mergeAll","identity","concatAll","concat","popScheduler","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","target","eventName","options","pipe","add","remove","isEventTarget","methodName","isNodeStyleEventEmitter","toCommonHandlerRegistry","isJQueryStyleEventEmitter","isArrayLike","subTarget","TypeError","addListener","removeListener","on","off","addEventListener","removeEventListener","timer","dueTime","intervalOrScheduler","intervalDuration","isScheduler","due","n","merge","popNumber","sources","filter","predicate","audit","durationSelector","hasValue","lastValue","durationSubscriber","endDuration","cleanupDuration","auditTime","duration","catchError","selector","innerSub","syncUnsub","handledResult","scanInternals","accumulator","seed","hasSeed","emitOnNext","emitBeforeComplete","hasState","debounce","emit","noop","defaultIfEmpty","defaultValue","take","count","seen","ignoreElements","mapTo","delayWhen","delayDurationSelector","subscriptionDelay","distinctUntilChanged","comparator","keySelector","defaultCompare","previousKey","first","currentKey","throwIfEmpty","errorFactory","defaultErrorFactory","hasDefaultValue","arguments","v","scan","startWith","values","switchMap","innerSubscriber","innerIndex","outerIndex","takeUntil","notifier","takeWhile","inclusive","result","tap","observerOrNext","tapObserver","isUnsub","finalize","setAttributeDefault","host","attr","hostElement","hasAttribute","setAttribute","String","catAlertCss","CatAlertStyle0","CatAlert","mapIcon","Map","mapRole","connectedCallback","get","color","render","h","Host","key","noIcon","size","icon","class","loadImg","src","Promise","resolve","reject","image","Image","catAvatarCss","CatAvatarStyle0","CatAvatar","onSrcChanged","then","backgroundImage","componentWillLoad","componentWillRender","label","log","warn","url","href","urlTarget","style","cssStyle","cssClass","content","getInitials","avatar","round","Boolean","initials","split","join","catBadgeCss","CatBadgeStyle0","CatBadge","_breakpoints","Breakpoints","xs","s","m","l","xl","isBreakpoint","includes","hasV8BreakIterator","Intl","v8BreakIterator","Platform","EDGE","test","navigator","userAgent","TRIDENT","BLINK","window","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","mediaQueriesForWebkitCompatibility","Set","mediaQueryStyleNode","MediaMatcher","_platform","_matchMedia","matchMedia","query","createEmptyStyleRule","has","document","createElement","head","appendChild","sheet","insertRule","catButtonCss","CatButtonStyle0","CatButton","onIconOnlyChanged","mediaQueryList","mediaQueryListener","mediaMatcher","event","_iconOnly","matches","iconOnly","isIconButton","a11yLabel","haltDisabledEvents","disabled","loading","preventDefault","stopImmediatePropagation","doFocus","button","focus","doBlur","blur","doClick","click","nativeAttributes","ref","el","a11yCurrent","buttonId","part","noEllipsis","variant","onClick","onFocus","onBlur","type","submit","buttonGroupPosition","iconSize","spinnerSize","hasPrefixIcon","iconRight","hasSuffixIcon","nativeContentAttributes","catClick","catFocus","catBlur","catButtonGroupCss","CatButtonGroupStyle0","CatButtonGroup","formElements","role","onSlotchange","onSlotChange","querySelectorAll","forEach","element","catCardCss","CatCardStyle0","CatCard","componentDidLoad","catLoad","CatFormHint","props","hint","slottedHint","errorMap","errors","Object","entries","params","i18n","t","item","catCheckboxCss","CatCheckboxStyle0","nextUniqueId","CatCheckbox","identifier","updateResolved","hasSlottedLabel","querySelector","hasSlottedHint","input","htmlFor","labelHidden","labelLeft","checked","required","indeterminate","onInput","hasHint","viewBox","points","catChange","resolvedValue","noValue","getDays","language","weekday","date","firstDayOfWeek","getUTCDate","getUTCDay","format","DateTimeFormat","keys","day","getTime","setUTCDate","getMonths","month","setUTCMonth","getWeekInfo","locale","Locale","weekInfo","firstDay","minDays","weekend","getFormat","year","replace","getLocale","prevYear","nextYear","prevMonth","nextMonth","arrowKeys","today","change","choose","clear","formatStr","days","short","long","months","getFullYear","getMonth","getDate","fromLocalISO","match","Number","toLocalISO","toString","padStart","toLocalStr","isLeapYear","addDays","addMonth","maxDays","newDate","setDate","setMonth","Math","min","isSameYear","date1","date2","isSameMonth","isSameDay","clampDate","max","catDateCss","CatDateStyle0","CatDate","onMinChanged","oldMin","reclamp","onMaxChanged","oldMax","inputValue","p1","d1","p2","p3","exec","mask","dateMin","dateMax","delimiter","datePattern","requiredMarker","horizontal","autoComplete","clearable","placeholder","textPrefix","textSuffix","readonly","errorUpdate","onCatFocus","stopPropagation","detail","onCatBlur","onInputBlur","slot","placement","arrowNavigation","noResize","onCatOpen","dateInline","resetView","getTriggerA11yLabel","weeks","noClear","onCatChange","onDateChange","oldValue","dateParsed","parse","select","formatParts","parts","indexOf","isInteger","mode","limit","oldDate","limitDate","newValue","catDateInlineCss","CatDateInlineStyle0","CatDateInline","focusDate","focusedDate","all","shadowRoot","dataset","startDate","endDate","getValue","componentDidRender","onKeyDown","shiftKey","minDate","maxDate","getMinMaxDate","range","toRangeValue","dateStart","viewDate","dateGrid","dateEnd","picker","navigate","getHeadline","onFocusin","setAriaLive","_","title","getWeekNumber","isStartDate","isEndDate","isRange","isToday","isWeekend","getDay","canFocus","canClick","tabindex","noToday","direction","period","setFullYear","text","node","innerHTML","daysOffset","daysInMonth","daysBefore","getLastDaysOfMonth","daysAfter","x","lastDayOfMonth","daysOfMonth","slice","iso8601","currentDate","dayNum","yearStart","ceil","minDay","JSON","stringify","HOOKS","defaults","_disable","allowInput","allowInvalidPreload","altFormat","altInput","altInputClass","animate","ariaDateFormat","autoFillDefaultTime","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disable","disableMobile","enableSeconds","enableTime","errorHandler","console","getWeek","givenDate","setHours","week1","hourIncrement","ignoredFocusElements","inline","minuteIncrement","monthSelectorType","nextArrow","noCalendar","onChange","onClose","onDayCreate","onDestroy","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","plugins","position","positionElement","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","wrap","english","weekdays","shorthand","longhand","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","monthAriaLabel","hourAriaLabel","minuteAriaLabel","pad","number","int","bool","wait","_this","clearTimeout","setTimeout","apply","arrayify","obj","toggleClass","elem","className","classList","tag","textContent","clearNode","firstChild","removeChild","findParent","condition","parentNode","createNumberInput","inputClassName","opts","wrapper","numInput","arrowUp","arrowDown","pattern","getEventTarget","composedPath","path","doNothing","monthToStr","monthNumber","revFormat","D","F","dateObj","monthName","G","hour","getHours","parseFloat","H","J","K","RegExp","M","shortMonth","S","seconds","setSeconds","U","unixSeconds","W","weekNum","weekNumber","parseInt","Y","Z","ISODate","d","minutes","setMinutes","j","u","unixMillSeconds","w","y","tokenRegex","formats","toISOString","getSeconds","getMinutes","substring","createDateFormatter","config","_c","l10n","_d","isMobile","frmt","overrideLocale","formatDate","c","arr","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","toFixed","datestr","trim","parseDate","matched","ops","matchIndex","regexStr","token","isBackSlash","escaped","val","compareDates","isBetween","ts","ts1","ts2","calculateSecondsSinceMidnight","hours","parseSeconds","secondsSinceMidnight","floor","DAY","getDefaultHours","minHour","minMinutes","minSeconds","maxHr","maxMinutes","assign","_i","_loop_1","args_1","__assign","p","prototype","hasOwnProperty","__spreadArrays","il","r","k","jl","DEBOUNCED_CHANGE_MS","FlatpickrInstance","instanceConfig","self","defaultOptions","flatpickr","defaultConfig","English","_handlers","pluginElements","loadedPlugins","_bind","_setHoursFromDate","setHoursFromDate","_positionCalendar","positionCalendar","changeMonth","changeYear","close","onMouseOver","_createElement","createDay","destroy","isEnabled","jumpToDate","updateValue","open","redraw","set","toggle","setupHelperFunctions","utils","getDaysInMonth","yr","currentMonth","currentYear","init","isOpen","parseConfig","setupLocale","setupInputs","setupDates","build","bindEvents","selectedDates","latestSelectedDateObj","setCalendarWidth","isSafari","triggerEvent","getClosestActiveElement","calendarContainer","getRootNode","activeElement","bindToInstance","requestAnimationFrame","visibility","display","daysContainer","daysWidth","offsetWidth","width","weekWrapper","removeProperty","updateTime","defaultDate","getMilliseconds","timeWrapper","prevValue","_input","setHoursFromInputs","_debouncedChange","ampm2military","military2ampm","hourElement","minuteElement","secondElement","limitMinHours","minTime","minDateHasTime","limitMaxHours","maxTime","maxDateHasTime","minBound","maxBound","currentTime","onYearInput","eventTarget","delta","ev","triggerChange","evt","setupMobile","debouncedResize","onResize","ontouchstart","documentClick","capture","monthNav","onMonthNavClick","selectDate","timeContainer","selText","timeIncrement","jumpDate","jumpTo","oldYear","oldMonth","buildMonthSwitch","incrementNumInput","contains","inputElem","createEvent","dispatchEvent","fragment","createDocumentFragment","tabIndex","buildMonthNav","innerContainer","buildWeeks","rContainer","buildWeekdays","buildDays","buildTime","customAppend","appendTo","nodeType","insertBefore","nextSibling","body","_dayNumber","dateIsEnabled","dayElement","$i","todayDateElem","isDateSelected","selectedDateElem","isDateInRange","insertAdjacentHTML","focusOnDayElem","targetNode","getFirstAvailableDay","startMonth","endMonth","children","startIndex","endIndex","getNextAvailableDay","current","givenMonth","loopDelta","numMonthDays","abs","focusOnDay","offset","dayFocused","isInView","startElem","buildMonthDays","firstOfMonth","prevMonthDays","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayNumber","dayIndex","dayContainer","frag","shouldBuildMonth","monthsDropdownContainer","selected","buildMonth","container","monthNavFragment","monthElement","selectedMonth","yearInput","yearElement","getElementsByTagName","buildMonths","prevMonthNav","yearElements","monthElements","nextMonthNav","defineProperty","__hidePrevMonthArrow","__hideNextMonthArrow","currentYearElement","updateNavigationCurrentMonth","separator","hourInput","minuteInput","secondInput","getAttribute","weekdayContainer","updateWeekdays","splice","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","triggerChangeEvent","toInitial","mobileInput","_initialDate","lastChild","_type","removeAttribute","isCalendarElem","eventTarget_1","isCalendarElement","isInput","lostFocus","relatedTarget","isIgnored","some","newYear","newYearNum","isNewYear","dateToCheck","enable","array","parsed","to","valueChanged","trimEnd","getDateStr","allowKeydown","allowInlineKeydown","keyCode","isTimeObj","focusAndClose","delta_1","ctrlKey","elems","charAt","toLowerCase","cellClass","hoverDate","firstElementChild","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","hoverableCells","dayElem","timestamp","outOfRange","_positionElement","wasOpen","minMaxDateSetter","inverseDateObj","boolOpts","userConfig","_enable","dates","parseDateRules","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","hook","pluginConf","getInputElem","l10ns","default","customPositionElement","calendarHeight","reduce","acc","child","offsetHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","getBoundingClientRect","distanceFromBottom","innerHeight","bottom","showOnTop","top","pageYOffset","left","pageXOffset","isCenter","isRight","right","rightMost","centerMost","doc","getDocumentStyleSheet","bodyWidth","centerLeft","centerBefore","centerAfter","centerIndex","cssRules","centerStyle","editableSheet","styleSheets","createStyleSheet","msMaxTouchPoints","isSelectable","selectedDate","shouldChangeMonth","selectedIndex","sort","single","CALLBACKS","updatePositionElement","option","setSelectedDate","inputDate","rule","preloadedDate","nodeName","inputType","mobileFormatStr","step","data","hooks","initEvent","specificFormat","dObj","isPrevMonth","isNextMonth","isKeyDown","curValue","which","isHourElem","isMinuteElem","_flatpickr","nodeList","nodes","HTMLElement","instances","HTMLCollection","NodeList","Node","en","localize","setDefaults","jQuery","fp_incr","findClosest","Element","nextElement","ShadowRoot","parentElement","global","factory","module","exports","weekSelectPlugin","fp","onDayHover","childNodes","dayIndSeven","weekStartDay","weekEndDay","day_1","highlightWeek","selDate","clearHover","getConfig","more","_dates","_dateStr","nativePickerAttributes","instance","dateStr","start","end","applyChange","formatTime","minute","time","datetime","daterange","getHour12","getFirstDayOfWeek","daysForLocale","monthsForLocale","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","evaluate","param","getSide","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","reference","floating","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","height","computeCoordsFromPlacement","_ref","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","isRTL","getElementRects","statefulPlacement","middlewareData","resetCount","nextX","nextY","reset","initialPlacement","elements","detectOverflow","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","altContext","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","flip","_middlewareData$arrow","_middlewareData$flip","mainAxis","checkMainAxis","crossAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","detectOverflowOptions","arrow","alignmentOffset","isBasePlacement","placements","overflow","overflows","overflowsData","sides","every","_middlewareData$flip2","_overflowsData$filter","nextIndex","nextPlacement","resetPlacement","_overflowsData$map$so","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","_middlewareData$offse","diffCoords","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","isYAxis","heightSide","widthSide","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","maximumClippingWidth","maximumClippingHeight","xMin","xMax","yMin","yMax","nextDimensions","getDimensions","getNodeName","isNode","getWindow","_node$ownerDocument","ownerDocument","defaultView","documentElement","isHTMLElement","isShadowRoot","isOverflowElement","overflowX","overflowY","getComputedStyle","isTableElement","isContainingBlock","webkit","isWebKit","css","transform","perspective","containerType","backdropFilter","willChange","contain","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","supports","getNodeScroll","scrollLeft","scrollTop","assignedSlot","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","visualViewport","frameElement","getCssDimensions","hasOffset","shouldFallback","$","unwrapElement","domElement","isFinite","noOffsets","getVisualOffsets","offsetLeft","offsetTop","shouldAddVisualOffsets","isFixed","floatingOffsetParent","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","topLayerSelectors","isTopLayer","topLayer","scroll","offsets","isOffsetParentAnElement","offsetRect","getClientRects","getWindowScrollBarX","getDocumentRect","html","scrollWidth","clientWidth","scrollHeight","clientHeight","getViewportRect","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","shouldDropCurrentNode","ancestor","elementClippingAncestors","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getRectRelativeToOffsetParent","getTrueOffsetParent","polyfill","getOffsetParentFn","getDimensionsFn","observeMove","onMove","io","timeoutId","root","cleanup","_io","disconnect","refresh","skip","threshold","insetTop","insetRight","insetBottom","insetLeft","rootMargin","isFirstUpdate","handleObserve","ratio","intersectionRatio","IntersectionObserver","observe","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","passive","cleanupIo","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","shift$1","flip$1","size$1","mergedOptions","platformWithCache","computePosition$1","catDatepickerCss","CatDatepickerStyle0","CatDatepickerFlat","onValueChanged","pickr","onDisabledChanged","initDatepicker","_calendarWrapper","withinDropdown","attachToElement","updatePosition","catDatepickerInlineCss","CatDatepickerInlineStyle0","CatDatepickerInline","timeTransitionS","candidateSelectors","candidateSelector","NoElement","msMatchesSelector","webkitMatchesSelector","_element$getRootNode","isInert","lookUp","_node$getAttribute","inertAtt","inert","isContentEditable","_node$getAttribute2","attValue","getCandidates","includeContainer","candidates","unshift","getCandidatesIteratively","elementsToCheck","tagName","assigned","assignedElements","nestedCandidates","flatten","scopeParent","validCandidate","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","sortOrderedTabbables","documentOrder","isHiddenInput","isDetailsWithSummary","getCheckedRadio","form","isTabbableRadio","radioScope","queryRadios","radioSet","escape","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","isHidden","displayCheck","isDirectSummary","nodeUnderDetails","originalNode","rootNode","isDisabledFromFieldset","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","focusable","isTabbable","focusableCandidateSelector","isFocusable","ownKeys","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","configurable","writable","_toPrimitive","prim","Symbol","toPrimitive","res","arg","activeFocusTraps","activateTrap","trapStack","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","isSelectableInput","isEscapeEvent","isTabEvent","isKeyForward","isKeyBackward","findIndex","idx","valueOrHandler","_len","_key","getActualTarget","internalTrapStack","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","paused","delayInitialFocusTimer","recentNavEvent","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","find","getNodeForOption","optionValue","_len2","_key2","getInitialFocusNode","tabbableOptions","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","focusableNodes","lastTabbableNode","firstDomTabbableNode","lastDomTabbableNode","reverse","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","group","g","getActiveElement","tryFocus","preventScroll","getReturnFocusNode","previousActiveElement","findNextNavNode","_ref2","_ref2$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref3","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_ref4","_destinationGroupIndex","_destinationGroup","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","nextNode","navAcrossContainers","mruContainerIdx","mruTabIdx","checkKeyNav","checkKey","checkClick","addListeners","removeListeners","checkDomRemoval","mutations","isFocusedNodeRemoved","mutation","removedNodes","mutationObserver","MutationObserver","updateObservedNodes","subtree","childList","activate","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","pauseOptions","onPause","onPostPause","unpauseOptions","onUnpause","onPostUnpause","updateContainerElements","containerElements","elementsAsArray","firstTabbable","catDropdownCss","CatDropdownStyle0","CatDropdown","clickHandler","trigger","initTrigger","noAutoClose","focusTrap.createFocusTrap","catOpen","setReturnFocus","initialFocus","noInitialFocus","catClose","triggerSlot","contentId","findTrigger","resize","OFFSET","maxWidth","maxHeight","catFormGroupCss","CatFormGroupStyle0","CatFormGroup","onRequiredMarkerChanged","newRequiredMarker","updateMarker","calculate","endsWith","onHorizontalChanged","newHorizontal","labelSize","optionalFields","requiredFields","catIconCss","CatIconStyle0","CatIcon","iconSrc","icons","getIcon","commonjsGlobal","NumeralFormatter","numeralDecimalMark","numeralIntegerScale","numeralDecimalScale","numeralThousandsGroupStyle","numeralPositiveOnly","stripLeadingZeroes","prefix","signBeforePrefix","tailPrefix","owner","groupStyle","thousand","delimiterRE","lakh","wan","none","getRawValue","partSign","partSignAndPrefix","partInteger","partDecimal","NumeralFormatter_1","DateFormatter","blocks","initBlocks","getISOFormatDate","addLeadingZero","getBlocks","getValidatedDate","sub","sub0","rest","getFixedDateString","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","getFixedDate","getRangeFixedDate","previous","addLeadingZeroForYear","fullYearMode","DateFormatter_1","TimeFormatter","timePattern","timeFormat","getISOFormatTime","getTimeFormatOptions","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","getValidatedTime","timeFormatOptions","getFixedTimeString","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","second","getFixedTime","TimeFormatter_1","PhoneFormatter","formatter","setFormatter","phoneNumber","validated","iMax","inputDigit","PhoneFormatter_1","CreditCardDetector","uatp","amex","diners","discover","mastercard","dankort","instapayment","jcb15","jcb","maestro","visa","mir","unionPay","general","re","getStrictBlocks","block","total","prev","getInfo","strictMode","matchedBlocks","CreditCardDetector_1","Util","strip","getPostDelimiter","delimiters","matchedDelimiter","getDelimiterREByDelimiter","getNextCursorPosition","prevPos","getPositionOffset","oldRawValue","newRawValue","lengthOffset","stripDelimiters","letter","headStr","str","getMaxLength","getPrefixStrippedValue","prefixLength","prevResult","noImmediatePrefix","getFirstDiffIndex","getFormattedValue","blocksLength","delimiterLazyShow","multipleDelimiters","currentDelimiter","fixPrefixCursor","appendix","setSelectionRange","len","checkFullSelection","selection","getSelection","ex","setSelection","createTextRange","move","parent","isAndroid","isAndroidBackspaceKeydown","lastInputValue","currentInputValue","Util_1","DefaultProperties","creditCard","creditCardStrictMode","creditCardType","onCreditCardTypeChanged","phone","phoneRegionCode","phoneFormatter","timeFormatter","dateFormatter","numeral","swapHiddenInput","numericOnly","uppercase","lowercase","rawValueTrimPrefix","copyDelimiter","initValue","delimiterLength","maxLength","backspace","DefaultProperties_1","Cleave","hasMultipleElements","properties","pps","onChangeListener","onKeyDownListener","onFocusListener","onCutListener","onCut","onCopyListener","onCopy","initSwapHiddenInput","initPhoneFormatter","initDateFormatter","initTimeFormatter","initNumeralFormatter","inputFormatter","cloneNode","elementSwapHidden","numeralFormatter","AsYouTypeFormatter","charCode","postDelimiter","postDelimiterBackspace","copyClipboardData","textToCopy","clipboardData","setData","postDelimiterAfter","updateValueState","toUpperCase","updateCreditCardPropsByValue","creditCardInfo","endPos","selectionEnd","callOnValueChanged","setPhoneRegionCode","setRawValue","Cleave_1","coerceBoolean","coerceNumber","fallbackValue","isNumberValue","catInputCss","CatInputStyle0","CatInput","onErrorsChanged","findSiblingInput","errorMapSrc","showErrorsIfTimeout","showErrorsIfNoFocus","hidden","startsWith","invalid","togglePassword","autocomplete","maxlength","minlength","minLength","isPasswordShown","doTogglePassword","showErrors","errorUpdateTimeoutId","hasFocus","HTMLInputElement","catPaginationCss","CatPaginationStyle0","CatPagination","isFirst","iconPrev","setPage","page","isLast","iconNext","pageCount","pages","sidePadding","activePadding","minPage","minActivepage","maxPage","maxActivepage","addSeq","_start","_end","fill","num","compact","catRadioCss","CatRadioStyle0","CatRadio","catRadioGroupCss","CatRadioGroupStyle0","CatRadioGroup","catRadioGroup","onNameChanged","newName","catRadio","updateTabIndex","onLabelLeftChanged","attributes","disconnectedCallback","onKeydown","targetElements","activeIdx","activeOff","targetIdx","radio","localName","checkedRadioIndex","catScrollableCss","CatScrollableStyle0","CatScrollable","destroyed","resizedEntries","resizedObserver","scrollElement","scrolled","scrollWrapperElement","attachEmitter","scrolledLeft","scrolledRight","scrolledBottom","scrolledTop","THROTTLE","getScrollOffset","noScrolledInit","noShadowY","noShadowX","noOverflowX","noOverflowY","noOverscroll","emitter","scrolledBuffer","isLower","GHOST_ELEMENT_ID","characterEntities","mapSpecialCharacterToCharacterEntity","specialCharacter","escapeSpecialCharacters","string","createGhostElement","ghostElement","cssText","autosizeInput","elementStyle","elementCssText","boxSizing","borderLeftWidth","borderRightWidth","fontFamily","fontFeatureSettings","fontKerning","fontSize","fontStretch","fontStyle","fontVariant","fontVariantCaps","fontVariantLigatures","fontVariantNumeric","fontWeight","letterSpacing","marginLeft","marginRight","paddingRight","textIndent","textTransform","setWidth","getElementById","minWidth","catSelectCss","CatSelectStyle0","INIT_STATE","term","isLoading","isResolving","tempSelection","activeOptionIndex","activeSelectionIndex","nextTagUniqueId","CatSelect","term$","more$","valueChangedBySelection","onConnectorChanged","connector","onStateChanged","newState","oldState","changed","dropdown","scrollIntoView","multiple","hide","idsSelected","tags","ids","createTag","patchState","isInputFocused","onArrowKeyDown","toggleTag","selectionStart","deselect","selectionClone","pop","onKeyUp","show","clearButton","clearInput","connect","number$","subscription","of","retrieve","totalElements","last","items","toSelectItems","value1","isTagSelected","isPillboxActive","activeDescendant","pill","onCatClick","onScrolledBottom","optionsList","SKELETON_COUNT","lines","noItems","isTagOption","isOptionSelected","isSelected","getLabel","tagTextHelp","description","initIds","initTags","data$","customId","search","newSelection","setTransparentCaret","removeTag","DROPDOWN_OFFSET","tagHint","CatSelectTest","multipleSelect","firstName","lastName","desc","user","multipleSelectAvatar","random","multipleSelectAvatarInitials","multipleSelectTagging","countryConnector","singleSelect","singleSelectAvatar","singleSelectAvatarInitials","country","capital","singleSelectTagging","flexDirection","countries","catSkeletonCss","CatSkeletonStyle0","CatSkeleton","skeleton","effect","catSpinnerCss","CatSpinnerStyle0","CatSpinner","xmlns","cx","cy","catTabCss","CatTabStyle0","CatTab","catTabsCss","CatTabsStyle0","CatTabs","syncTabs","onActiveTabChange","tabs","tab","setActive","setActiveIndex","activeTab","deactivated","canActivate","testForHeightReduction","restoreTextAlign","delete","textAlign","wordWrap","scrollBehavior","paddingBottom","borderTopWidth","borderBottomWidth","Event","bubbles","catTextareaCss","CatTextareaStyle0","CatTextarea","autosize","textarea","rows","formatIso","clampTime","hhMin","mmMin","hhMax","mmMax","isBefore","hh","mm","isAfter","catTimeCss","CatTimeStyle0","CatTime","syncValue","selectionTime","elem1","elem2","isAm","toggleAm","timeArray","isoTime","includeAmPm","catToggleCss","CatToggleStyle0","CatToggle","isTouchDevice","maxTouchPoints","catTooltipCss","CatTooltipStyle0","CatTooltip","hostRef","inactive","boundShowListener","showListener","boundHideListener","hideListener","boundWindowTouchStartListener","windowTouchStartListener","boundTouchStartListener","touchStartListener","boundTouchEndListener","touchEndListener","handleKeyDown","hideTooltip","isTouchScreen","tooltip","SHIFT_PADDING","hideTimeout","showTimeout","showTooltip","showDelay","hideDelay","touchTimeout","longTouchDuration","cleanupFloatingUi"],"sources":["../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Subject.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/Action.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Scheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/async.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/empty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/EmptyError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/isDate.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/map.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/concatAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/concat.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/timer.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/merge.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/filter.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/audit.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/auditTime.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/catchError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/debounce.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/take.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mapTo.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delay.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/first.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scan.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/startWith.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/switchMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/tap.js","src/utils/setDefault.ts","src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","src/components/cat-alert/cat-alert.tsx","src/utils/load-img.ts","src/components/cat-avatar/cat-avatar.scss?tag=cat-avatar&encapsulation=shadow","src/components/cat-avatar/cat-avatar.tsx","src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","src/components/cat-badge/cat-badge.tsx","src/utils/breakpoints.ts","src/utils/platform.ts","src/utils/media-matcher.ts","src/components/cat-button/cat-button.scss?tag=cat-button&encapsulation=shadow","src/components/cat-button/cat-button.tsx","src/components/cat-button-group/cat-button-group.scss?tag=cat-button-group&encapsulation=shadow","src/components/cat-button-group/cat-button-group.tsx","src/components/cat-card/cat-card.scss?tag=cat-card&encapsulation=shadow","src/components/cat-card/cat-card.tsx","src/components/cat-form-hint/cat-form-hint.tsx","src/components/cat-checkbox/cat-checkbox.scss?tag=cat-checkbox&encapsulation=shadow","src/components/cat-checkbox/cat-checkbox.tsx","src/components/cat-date-inline/cat-date-locale.ts","src/components/cat-date-inline/cat-date-math.ts","src/components/cat-date/cat-date.scss?tag=cat-date&encapsulation=shadow","src/components/cat-date/cat-date.tsx","src/components/cat-date-inline/cat-date-inline.scss?tag=cat-date-inline&encapsulation=shadow","src/components/cat-date-inline/cat-date-inline.tsx","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/types/options.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/l10n/default.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/index.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dom.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/formatting.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dates.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/polyfills.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/index.js","src/utils/find-closest.ts","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/plugins/weekSelect/weekSelect.js","src/components/cat-datepicker/cat-datepicker.config.ts","src/components/cat-datepicker/cat-datepicker.format.ts","src/components/cat-datepicker/cat-datepicker.locale.ts","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","../node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","../node_modules/.pnpm/@floating-ui+dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","src/components/cat-datepicker/cat-datepicker.scss?tag=cat-datepicker&encapsulation=shadow","src/components/cat-datepicker/cat-datepicker.tsx","src/components/cat-datepicker-inline/cat-datepicker-inline.scss?tag=cat-datepicker-inline&encapsulation=shadow","src/components/cat-datepicker-inline/cat-datepicker-inline.tsx","../tokens/dist/js/variables.js","../node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js","../node_modules/.pnpm/focus-trap@7.5.4/node_modules/focus-trap/dist/focus-trap.esm.js","src/utils/first-tabbable.ts","src/components/cat-dropdown/cat-dropdown.scss?tag=cat-dropdown&encapsulation=shadow","src/components/cat-dropdown/cat-dropdown.tsx","src/components/cat-form-group/cat-form-group.scss?tag=cat-form-group&encapsulation=shadow","src/components/cat-form-group/cat-form-group.tsx","src/components/cat-icon/cat-icon.scss?tag=cat-icon&encapsulation=shadow","src/components/cat-icon/cat-icon.tsx","../node_modules/.pnpm/cleave.js@1.6.0/node_modules/cleave.js/dist/cleave-esm.js","src/utils/coerce.ts","src/components/cat-input/cat-input.scss?tag=cat-input&encapsulation=shadow","src/components/cat-input/cat-input.tsx","src/components/cat-pagination/cat-pagination.scss?tag=cat-pagination&encapsulation=shadow","src/components/cat-pagination/cat-pagination.tsx","src/components/cat-radio/cat-radio.scss?tag=cat-radio&encapsulation=shadow","src/components/cat-radio/cat-radio.tsx","src/components/cat-radio-group/cat-radio-group.scss?tag=cat-radio-group&encapsulation=shadow","src/components/cat-radio-group/cat-radio-group.tsx","src/components/cat-scrollable/cat-scrollable.scss?tag=cat-scrollable&encapsulation=shadow","src/components/cat-scrollable/cat-scrollable.tsx","../node_modules/.pnpm/autosize-input@1.0.2/node_modules/autosize-input/index.js","src/components/cat-select/cat-select.scss?tag=cat-select&encapsulation=shadow","src/components/cat-select/cat-select.tsx","src/components/cat-select-demo/cat-select-demo.tsx","src/components/cat-skeleton/cat-skeleton.scss?tag=cat-skeleton&encapsulation=shadow","src/components/cat-skeleton/cat-skeleton.tsx","src/components/cat-spinner/cat-spinner.scss?tag=cat-spinner&encapsulation=shadow","src/components/cat-spinner/cat-spinner.tsx","src/components/cat-tab/cat-tab.scss?tag=cat-tab&encapsulation=shadow","src/components/cat-tab/cat-tab.tsx","src/components/cat-tabs/cat-tabs.scss?tag=cat-tabs&encapsulation=shadow","src/components/cat-tabs/cat-tabs.tsx","../node_modules/.pnpm/autosize@6.0.1/node_modules/autosize/dist/autosize.esm.js","src/components/cat-textarea/cat-textarea.scss?tag=cat-textarea&encapsulation=shadow","src/components/cat-textarea/cat-textarea.tsx","src/components/cat-time/cat-time-locale.ts","src/components/cat-time/cat-time-math.ts","src/components/cat-time/cat-time.scss?tag=cat-time&encapsulation=shadow","src/components/cat-time/cat-time.tsx","src/components/cat-toggle/cat-toggle.scss?tag=cat-toggle&encapsulation=shadow","src/components/cat-toggle/cat-toggle.tsx","src/utils/is-touch-screen.ts","src/components/cat-tooltip/cat-tooltip.scss?tag=cat-tooltip&encapsulation=shadow","src/components/cat-tooltip/cat-tooltip.tsx"],"sourcesContent":["import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n//# sourceMappingURL=Subject.js.map","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n//# sourceMappingURL=Action.js.map","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { Observable } from '../Observable';\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n//# sourceMappingURL=empty.js.map","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n//# sourceMappingURL=EmptyError.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n//# sourceMappingURL=filter.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n let isComplete = false;\n const endDuration = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n return audit(() => timer(duration, scheduler));\n}\n//# sourceMappingURL=auditTime.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n const emit = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n//# sourceMappingURL=delay.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=first.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","export function setAttributeDefault(\n host: T,\n attr: string,\n value: unknown\n): void {\n if (!host.hostElement.hasAttribute(attr) && value != null) {\n host.hostElement.setAttribute(attr, String(value));\n }\n}\n\nexport function setAttribute(host: T, attr: string, value: unknown): void {\n host.hostElement.setAttribute(attr, String(value));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n:host {\n display: flex;\n gap: 0.5rem;\n padding: 1.25rem;\n border-radius: cat-border-radius('l');\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n.content {\n align-self: center;\n width: 100%;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n background-color: cat-token('color.theme.#{$theme}.bg');\n color: cat-token('color.theme.#{$theme}.fill');\n // adjust nested links\n --cat-primary-text: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --cat-primary-text-hover: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --cat-primary-text-active: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --cat-link-decoration: underline;\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\nimport { setAttributeDefault } from '../../utils/setDefault';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n private readonly mapIcon: Map = new Map([\n ['primary', '$cat:alert-primary'],\n ['secondary', '$cat:alert-secondary'],\n ['info', '$cat:alert-info'],\n ['success', '$cat:alert-success'],\n ['warning', '$cat:alert-warning'],\n ['danger', '$cat:alert-danger']\n ]);\n private readonly mapRole: Map = new Map([\n ['primary', 'status'],\n ['secondary', 'status'],\n ['info', 'status'],\n ['success', 'status'],\n ['warning', 'alert'],\n ['danger', 'alert']\n ]);\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * The color palette of the alert.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The name of an icon to be displayed in the alert.\n */\n @Prop() icon?: string;\n\n /**\n * Whether the icon of the alert is deactivated.\n */\n @Prop() noIcon = false;\n\n connectedCallback() {\n setAttributeDefault(this, 'tabindex', 0);\n setAttributeDefault(this, 'role', this.mapRole.get(this.color));\n }\n\n render() {\n return (\n \n {!this.noIcon && }\n
\n \n
\n
\n );\n }\n}\n","/**\n * Loads an image and wraps the result in a promise.\n *\n * @param src the image URL\n * @returns a promise\n */\nconst loadImg = (src: string): Promise => {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.addEventListener('load', resolve);\n image.addEventListener('error', reject);\n image.src = src;\n });\n};\n\nexport default loadImg;\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-background-color: cat-token('color.base.neutral.100');\n$-color: cat-token('color.base.neutral.500');\n$-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n// -----\n\n:host {\n /**\n * @prop --cat-avatar-bg: The background color of the avatar.\n * @prop --cat-avatar-fill: The text color of the avatar.\n * @prop --cat-avatar-size: The size of the avatar.\n * @prop --cat-avatar-font-size: The font size of the avatar.\n */\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: inherit;\n color: var(--cat-avatar-fill, $-color);\n background-color: var(--cat-avatar-bg, $-background-color);\n background-size: cover;\n background-position: center;\n white-space: nowrap;\n overflow: hidden;\n vertical-align: middle;\n font-weight: 600;\n @include cat-select(none);\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.avatar-round {\n border-radius: 50%;\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .avatar-#{$size} {\n width: var(--cat-avatar-size, map.get($-sizes, $size));\n height: var(--cat-avatar-size, map.get($-sizes, $size));\n line-height: var(--cat-avatar-size, map.get($-sizes, $size));\n font-size: var(--cat-avatar-font-size, cat-body-font-size($fontSize));\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 's');\n@include size('m', 'm');\n@include size('l', 'l');\n@include size('xl', 'xl');\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n \n {this.content}\n \n );\n } else {\n return (\n \n {this.content}\n \n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-sizes: (\n 'xl': 3rem,\n 'l': 2.5rem,\n 'm': 2rem,\n 's': 1.5rem,\n 'xs': 1rem\n);\n$-paddings: (\n 'xl': 0 1rem,\n 'l': 0 1rem,\n 'm': 0 0.75rem,\n 's': 0 0.5rem,\n 'xs': 0 0.25rem\n);\n\n// -----\n\n:host([hidden]) {\n display: none;\n}\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n line-height: 1.5;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n:host([round]) {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--text), $alpha: 0.2);\n\n:host([variant='filled']) {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n:host([variant='outlined']) {\n background-color: cat-token('color.ui.background.surface');\n color: cat-token-wrap(var(--text));\n box-shadow: $-outline;\n}\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n :host([size='#{$size}']) {\n height: map.get($-sizes, $size);\n min-width: map.get($-sizes, $size);\n font-size: cat-body-font-size($fontSize);\n padding: map.get($-paddings, $size);\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 's');\n@include size('l', 'm');\n@include size('xl', 'l');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n:host([pulse][variant='filled']) {\n animation: 1.5s ease 0s infinite normal none running pulse;\n}\n\n:host([pulse][variant='outlined']) {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The rendering style of the badge.\n */\n @Prop({ reflect: true }) variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop({ reflect: true }) size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop({ reflect: true }) round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop({ reflect: true }) pulse = false;\n\n render() {\n return ;\n }\n}\n","const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = (typeof _breakpoints)[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n","// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set = new Set();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$button-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-button {\n position: relative;\n font: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n transition:\n color cat-token('time.transition.s') linear,\n border-color cat-token('time.transition.s') linear,\n background-color cat-token('time.transition.s') linear,\n box-shadow cat-token('time.transition.s') linear;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n// ----- content\n\n.cat-button-content {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.cat-button-content-inner {\n @include cat-break-word;\n\n .cat-button-ellipsed & {\n @include cat-ellipsis;\n }\n}\n\n// ----- disabled\n\n.cat-button-disabled {\n cursor: not-allowed;\n}\n\n// ----- round\n\n.cat-button-round {\n border-radius: 10rem;\n}\n\n// ----- loading\n\n.cat-button-loading {\n cursor: default;\n\n cat-spinner {\n position: absolute;\n }\n\n > *:not(cat-spinner) {\n visibility: hidden;\n }\n}\n\n// ----- group button\n\n.cat-group-button {\n &-first {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &-middle {\n border-radius: 0;\n }\n\n &-last {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n}\n\n// ----- theme\n\n.cat-button-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: var(--cat-font-weight-button, 600);\n @include cat-font-smooth;\n\n &.cat-button-disabled {\n --bg: #{cat-token('color.ui.background.muted', $wrap: false)};\n --fill: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n}\n\n.cat-button-outlined {\n background-color: cat-token('color.ui.background.surface');\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--base), $alpha: 0.2);\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --base: #{cat-token('color.ui.font.muted', $wrap: false)};\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n}\n\n.cat-button-text {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n text-decoration: cat-token('font.decoration.linkButton');\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n}\n\n.cat-button-link {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n}\n\n@mixin theme($theme) {\n .cat-button-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --base: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --base: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgHover', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textHover', $wrap: false)};\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgActive', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textActive', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize, $padding) {\n $-line-height: cat-body-line-height($fontSize);\n\n $-total-height: map.get($button-sizes, $size);\n $-padding-v: ($-total-height - $-line-height) * 0.5;\n $-padding-h: $padding;\n\n .cat-button-#{$size} {\n min-width: map.get($button-sizes, $size);\n padding: $-padding-v $-padding-h;\n @include cat-body($fontSize, null);\n gap: 0.25rem;\n\n // normalize icon size for line height\n @if $fontSize == 'm' {\n cat-icon {\n margin-top: -0.125rem;\n margin-bottom: -0.125rem;\n }\n }\n\n &.cat-button-icon {\n width: $-total-height;\n height: $-total-height;\n padding: 0;\n }\n }\n\n :host(.cat-button-pull[size='#{$size}']) {\n margin: $-padding-v * -1 $-padding-h * -1;\n }\n\n :host(.cat-button-pull-h[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n margin-right: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-v[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-t[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-l[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-b[size='#{$size}']) {\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-r[size='#{$size}']) {\n margin-right: $-padding-h * -1;\n }\n}\n\n:host(.cat-button-pull:not([size])) {\n margin: -0.625rem -0.75rem;\n}\n\n:host(.cat-button-pull-h:not([size])) {\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n}\n\n:host(.cat-button-pull-v:not([size])) {\n margin-top: -0.625rem;\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-t:not([size])) {\n margin-top: -0.625rem;\n}\n\n:host(.cat-button-pull-l:not([size])) {\n margin-left: -0.75rem;\n}\n\n:host(.cat-button-pull-b:not([size])) {\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-r:not([size])) {\n margin-right: -0.75rem;\n}\n\n@include size('xs', 's', 0.25rem);\n@include size('s', 'm', 0.5rem);\n@include size('m', 'm', 0.75rem);\n@include size('l', 'm', 1rem);\n@include size('xl', 'l', 1.25rem);\n\n// ----- tabs\n\n:host(.cat-tab) {\n &::part(button) {\n padding: 1.125rem 0.75rem;\n --cat-secondary-bg: transparent;\n --cat-primary-text: transparent;\n --cat-danger-text: transparent;\n }\n\n &::part(content) {\n &::before {\n content: attr(data-text);\n content: attr(data-text) / '';\n height: 0;\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n font-weight: 700;\n }\n }\n}\n\n// ----- alignment\n\n:host(.cat-text-left) .cat-button {\n justify-content: left;\n}\n\n:host(.cat-text-right) .cat-button {\n justify-content: right;\n}\n\n// ----- navigation\n\n:host(.cat-nav-item) {\n width: 100%;\n\n .cat-button {\n box-shadow: none;\n justify-content: left;\n gap: 0.5rem;\n\n &:focus-visible {\n outline-offset: -2px;\n }\n }\n}\n\n// ----- datepicker\n\n:host(.cat-time-format) {\n .cat-button {\n border-radius: 0;\n }\n}\n\n:host(.cat-date-toggle),\n:host(.cat-time-toggle) {\n .cat-button {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n\n:host(.cat-date-item),\n:host(.cat-date-toggle),\n:host(.cat-time-format),\n:host(.cat-time-toggle) {\n .cat-button {\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n }\n}\n\n:host(.cat-date-item) {\n .cat-button {\n padding: 0;\n min-width: 2rem;\n max-height: 3rem;\n aspect-ratio: 1;\n }\n}\n\n:host(.date-start:not(.date-end)) {\n .cat-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n\n:host(.date-end:not(.date-start)) {\n .cat-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport { Breakpoint, Breakpoints, isBreakpoint } from '../../utils/breakpoints';\nimport { MediaMatcher } from '../../utils/media-matcher';\n\n/**\n * Buttons are used for interface actions. Primary style should be used only\n * once per view for main call-to-action.\n *\n * @part button - The native anchor or button element.\n * @part content - The textual content of the button.\n * @part prefix - The prefix icon.\n * @part suffix - The suffix icon.\n */\n@Component({\n tag: 'cat-button',\n styleUrl: 'cat-button.scss',\n shadow: true\n})\nexport class CatButton {\n private button!: HTMLButtonElement | HTMLAnchorElement;\n private mediaMatcher?: MediaMatcher;\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n @State() _iconOnly = true;\n\n /**\n * The rendering style of the button.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' | 'link' = 'outlined';\n\n /**\n * The color palette of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'secondary';\n\n /**\n * Set the button into an active state.\n */\n @Prop() active = false;\n\n /**\n * The size of the button.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The name of the button, which gets paired with the button's value when\n * submitted as part of a form. Corresponds with the native HTML name\n * attribute.\n */\n @Prop() name?: string;\n\n /**\n * The value of the button, which gets paired with the button's name when\n * submitted as part of a form. Corresponds with the native HTML value\n * attribute.\n */\n @Prop() value?: string;\n\n /**\n * Specifies that the button should be disabled. A disabled button is unusable\n * and un-clickable. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the button in a loading state with a spinner. Just like a disabled\n * button, an inactive button is unusable and un-clickable. However, it\n * retains the current focus state.\n */\n @Prop() loading = false;\n\n /**\n * Allows the button to submit a form.\n */\n @Prop() submit = false;\n\n /**\n * Disables ellipse overflowing button content.\n */\n @Prop() noEllipsis = false;\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n /**\n * The name of an icon to be displayed in the button.\n */\n @Prop() icon?: string;\n\n /**\n * Hide the actual button content and only display the icon.\n */\n @Prop() iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * Adds a unique identifier for the button. Please note that with this\n * particular component this ID is added inside the web component. If you need\n * an ID on the HTML element, use the regular `id` attribute instead.\n */\n @Prop() buttonId?: string;\n\n /**\n * Adds accessible label for the button that is only shown for screen\n * readers. Typically, this label text replaces the visible text on the\n * button for users who use assistive technology.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n /**\n * Sets the `aria-current` attribute on the button.\n */\n @Prop({ attribute: 'a11y-current' }) a11yCurrent?: string;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Attributes that will be added to the native HTML button content element\n */\n @Prop() nativeContentAttributes?: { [key: string]: string };\n\n /**\n * The index of a button that is used inside a cat-button-group component\n */\n @Prop() buttonGroupPosition?: 'first' | 'last' | 'middle';\n\n @Watch('iconOnly')\n onIconOnlyChanged(value: boolean | Breakpoint): void {\n // teardown\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener!);\n this.mediaQueryList = undefined;\n this.mediaQueryListener = undefined;\n // setup\n if (isBreakpoint(value)) {\n this.mediaMatcher ??= new MediaMatcher();\n this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);\n this.mediaQueryListener = (event: MediaQueryListEvent) => (this._iconOnly = event.matches);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n this._iconOnly = this.mediaQueryList.matches;\n } else {\n this._iconOnly = value;\n }\n }\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() catClick!: EventEmitter;\n\n /**\n * Emitted when the button received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the button loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad(): void {\n this.onIconOnlyChanged(this.iconOnly);\n }\n\n componentWillRender(): void {\n if (this.isIconButton && !this.a11yLabel) {\n log.warn('[A11y] Missing ARIA label on icon button', this);\n }\n }\n\n @Listen('click')\n haltDisabledEvents(event: Event): void {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Programmatically move focus to the button. Use this method instead of\n * `button.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.button.focus(options);\n }\n\n /**\n * Programmatically remove focus from the button. Use this method instead of\n * `button.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.button.blur();\n }\n\n /**\n * Programmatically simulate a click on the button.\n */\n @Method()\n async doClick(): Promise {\n this.button.click();\n }\n\n render() {\n if (this.url) {\n return (\n (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? undefined : this.url}\n target={this.urlTarget}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n } else {\n return (\n (this.button = el as HTMLButtonElement)}\n type={this.submit ? 'submit' : 'button'}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round ?? this.isIconButton,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size),\n [`cat-group-button-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition),\n 'cat-group-button': Boolean(this.buttonGroupPosition)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n }\n }\n\n private get iconSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 's';\n default:\n return 'l';\n }\n }\n\n private get spinnerSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 'xs';\n default:\n return 'm';\n }\n }\n\n private get isIconButton() {\n return Boolean(this.icon) && this._iconOnly;\n }\n\n private get hasPrefixIcon() {\n return Boolean(this.icon) && !this._iconOnly && !this.iconRight;\n }\n\n private get hasSuffixIcon() {\n return Boolean(this.icon) && !this._iconOnly && this.iconRight;\n }\n\n private get content() {\n return [\n this.hasPrefixIcon ? : null,\n this.isIconButton ? (\n \n ) : (\n \n \n \n \n \n ),\n this.hasSuffixIcon ? : null,\n this.loading ? : null\n ];\n }\n\n private onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n",":host {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n}\n\n::slotted(cat-button[variant='outlined']),\n::slotted(cat-button:not([variant])) {\n margin-right: -1px;\n}\n\n::slotted(cat-button[variant='outlined']:last-child),\n::slotted(cat-button:not([variant]):last-child) {\n margin-right: 0;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * Button groups are designed to bring together button controls that are of a\n * similar nature. For example text formatting controls.\n */\n@Component({\n tag: 'cat-button-group',\n styleUrl: 'cat-button-group.scss',\n shadow: true\n})\nexport class CatButtonGroup {\n private formElements: HTMLCatButtonElement[] = [];\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Adds an accessible label for the button group that\n * it is only shown in assistive technologies, like screen readers.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n \n \n );\n }\n\n private onSlotChange(): void {\n this.formElements = Array.from(this.hostElement.querySelectorAll('cat-button'));\n this.formElements.forEach((element, index) => {\n element.buttonGroupPosition = index === 0 ? 'first' : index === this.formElements.length - 1 ? 'last' : 'middle';\n });\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n$-padding: 1.25rem;\n\n:host {\n display: block;\n border-radius: cat-border-radius('l');\n background-color: cat-token('color.ui.background.surface');\n padding: $-padding;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n::slotted(nav),\n::slotted(nav:last-child) {\n margin: #{0.25rem - $-padding} #{0.25rem - $-padding} !important;\n}\n\n// --- pull out helper classes\n\n::slotted(.cat-card-pull) {\n margin: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-h) {\n margin-left: -$-padding !important;\n margin-right: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-v) {\n margin-top: -$-padding !important;\n margin-bottom: -$-padding !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-t) {\n margin-top: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-l) {\n margin-left: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-r) {\n margin-right: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-b) {\n margin-bottom: -$-padding !important;\n}\n","import { Component, Event, EventEmitter, h } from '@stencil/core';\n\n/**\n * Cards are surfaces that display content and actions on a single topic. They\n * should be easy to scan for relevant and actionable information.\n */\n@Component({\n tag: 'cat-card',\n styleUrl: 'cat-card.scss',\n shadow: true\n})\nexport class CatCard {\n /**\n * Emitted when the card and all the children are fully loaded.\n */\n @Event() catLoad!: EventEmitter;\n\n render() {\n return ;\n }\n\n componentDidLoad() {\n this.catLoad.emit();\n }\n}\n","import { h, FunctionalComponent } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ErrorMap = { [key: string]: any };\n\n/**\n * Properties of CatFormHint.\n *\n * @property hint - Optional hint text(s) of the form field.\n * @property slottedHint - Optional hint element of the form field.\n */\ninterface CatFormHintProps {\n id: string;\n hint?: string | string[];\n slottedHint?: HTMLSlotElement;\n class?: string;\n errorMap?: ErrorMap;\n}\n\n/**\n * CatFormHint is a functional component that represents the hint area of form elements.\n *\n * @param props - {@link CatFormHintProps}\n * @return a JSX.Element\n */\nexport const CatFormHint: FunctionalComponent = props => {\n const { id, hint, slottedHint, errorMap } = props;\n const errors = Object.entries(errorMap || {});\n return (\n
\n {errors.length\n ? errors.map(([key, params]) => (\n

{i18n.t(`error.${key}`, params)}

\n ))\n : [\n hint &&\n (Array.isArray(hint) ? (\n hint.map(item =>

{item}

)\n ) : (\n

{hint}

\n )),\n slottedHint\n ]}\n
\n );\n};\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n\n$checkbox-width: 1.25rem;\n$checkbox-height: 1.25rem;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n flex: 0 1 auto;\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n @include cat-select(none);\n cursor: pointer;\n position: relative;\n}\n\n.label-left {\n flex-direction: row-reverse;\n\n input {\n right: 1px;\n left: unset;\n }\n}\n\ninput {\n position: absolute;\n width: $checkbox-width;\n height: $checkbox-height;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n left: 1px;\n top: 0.5px;\n}\n\n.box-placeholder {\n width: calc($checkbox-width + 2px);\n flex-shrink: 0;\n}\n\n.box {\n flex: 0 0 auto;\n display: flex;\n position: relative;\n height: $checkbox-height;\n width: $checkbox-width;\n background-color: cat-token('color.ui.background.input');\n border: 1px solid cat-token('color.ui.border.dark');\n border-radius: cat-border-radius(s);\n transition:\n background-color cat-token('time.transition.s') ease,\n border-color cat-token('time.transition.s') ease;\n pointer-events: none;\n box-sizing: border-box;\n\n svg {\n fill: none;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 16px;\n stroke-dashoffset: 16px;\n transition: all cat-token('time.transition.s') ease;\n width: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.99);\n }\n\n :checked + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 0;\n }\n }\n\n :indeterminate + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 16px;\n }\n\n .dash {\n stroke-dashoffset: 0;\n }\n }\n\n :focus-visible + & {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n\n .is-disabled & {\n background-color: cat-token('color.ui.background.muted');\n border-color: cat-token('color.ui.border.dark');\n stroke: cat-token('color.ui.font.muted');\n }\n}\n\n:host(.cat-error) {\n .box {\n border: 1px solid cat-token('color.theme.danger.bg');\n }\n\n :checked + .box,\n :indeterminate + .box {\n background-color: cat-token('color.theme.danger.bg');\n border-color: cat-token('color.theme.danger.bg');\n stroke: cat-token('color.theme.danger.fill');\n }\n}\n\n.label {\n flex: 1 1 auto;\n min-width: 0;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport log from 'loglevel';\nimport { CatFormHint } from '../cat-form-hint/cat-form-hint';\n\nlet nextUniqueId = 0;\n\n/**\n * Checkboxes are used to let a user choose one or more options from a limited\n * number of options.\n *\n * @slot hint - Optional hint element to be displayed with the checkbox.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The label content.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-checkbox',\n styleUrls: ['cat-checkbox.scss'],\n shadow: true\n})\nexport class CatCheckbox {\n private readonly _id = `cat-checkbox-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n @State() hasSlottedHint = false;\n\n /**\n * Checked state of the checkbox\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Indeterminate state of the checkbox\n */\n @Prop({ mutable: true }) indeterminate = false;\n\n /**\n * Disabled state of the checkbox\n */\n @Prop() disabled = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * Label of the checkbox which is presented in the UI\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * The name of the input.\n */\n @Prop() name?: string;\n\n /**\n * Required state of the checkbox.\n */\n @Prop() required = false;\n\n /**\n * The value of the checked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() value?: any;\n\n /**\n * The value of the unchecked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() noValue?: any;\n\n /**\n * The resolved value of the checkbox, based on the checked state and value.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop({ mutable: true }) resolvedValue: any = null;\n\n /**\n * Optional hint text(s) to be displayed with the checkbox.\n */\n @Prop() hint?: string | string[];\n\n /**\n * Whether the label should appear to the left of the checkbox.\n */\n @Prop() labelLeft = false;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the checked status of the checkbox is changed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the checkbox received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad() {\n this.updateResolved();\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n if (!this.label && !this.hasSlottedLabel) {\n log.warn('[A11y] Missing ARIA label on checkbox', this);\n }\n }\n\n /**\n * Programmatically move focus to the checkbox. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input.focus(options);\n }\n\n /**\n * Programmatically remove focus from the checkbox. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n render() {\n return (\n \n \n (this.input = el as HTMLInputElement)}\n id={this.id}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n />\n \n \n \n \n \n \n \n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n \n {this.hasHint && (\n
\n
\n } />\n
\n )}\n
\n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint;\n }\n\n private onInput() {\n this.checked = this.input.checked;\n this.indeterminate = this.input.indeterminate;\n this.updateResolved();\n this.catChange.emit(this.resolvedValue);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n\n private updateResolved() {\n this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;\n }\n}\n","import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nfunction getDays(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction getMonths(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nfunction getWeekInfo(language: string) {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return {\n firstDay: weekInfo?.firstDay ?? 1,\n minDays: weekInfo?.minDays ?? 4,\n weekend: weekInfo?.weekend ?? [6, 7]\n };\n}\n\nfunction getFormat(language: string) {\n const format = new Intl.DateTimeFormat(language, { year: 'numeric', month: '2-digit', day: '2-digit' })\n .format(new Date(3456, 10, 22))\n .replace('3456', 'YYYY')\n .replace('56', 'YY')\n .replace('11', 'MM')\n .replace('22', 'DD');\n return /^(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)$/.test(format) ? format : 'DD-MM-YYYY';\n}\n\nexport function getLocale(language: string) {\n return {\n prevYear: i18n.t('datepicker.prevYear'),\n nextYear: i18n.t('datepicker.nextYear'),\n prevMonth: i18n.t('datepicker.prevMonth'),\n nextMonth: i18n.t('datepicker.nextMonth'),\n arrowKeys: i18n.t('datepicker.arrowKeys'),\n today: i18n.t('datepicker.today'),\n change: i18n.t('datepicker.change'),\n choose: i18n.t('datepicker.choose'),\n clear: i18n.t('datepicker.clear'),\n formatStr: getFormat(language),\n weekInfo: getWeekInfo(language),\n days: {\n short: getDays(language, 'short'),\n long: getDays(language, 'long')\n },\n months: {\n short: getMonths(language, 'short'),\n long: getMonths(language, 'long')\n },\n now: () => {\n const date = new Date();\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n },\n fromLocalISO: (date?: string | null) => {\n const [match, year, month, day] = date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return match ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n },\n toLocalISO: (date: Date) => {\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n return `${year}-${month}-${day}`;\n },\n toLocalStr: (date: Date) =>\n new Intl.DateTimeFormat(language, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long'\n }).format(date)\n };\n}\n","export function isLeapYear(year: number): boolean {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nexport function addDays(date: Date, n: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + n);\n}\n\nexport function addMonth(date: Date, n: number): Date {\n const [year, month, day] = [date.getFullYear(), date.getMonth(), date.getDate()];\n const maxDays = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n const newDate = new Date(date);\n newDate.setDate(1);\n newDate.setMonth(newDate.getMonth() + n);\n newDate.setDate(Math.min(day, maxDays[(month + (n % 12) + 12) % 12]));\n return newDate;\n}\n\nexport function isSameYear(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getFullYear() === date2.getFullYear();\n}\n\nexport function isSameMonth(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getMonth() === date2.getMonth() && isSameYear(date1, date2);\n}\n\nexport function isSameDay(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getDate() === date2.getDate() && isSameMonth(date1, date2);\n}\n\nexport function clampDate(min: Date | null, date: Date, max: Date | null): Date {\n return new Date(Math.min(Math.max(date.getTime(), min?.getTime() ?? -Infinity), max?.getTime() ?? Infinity));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-aria {\n @include cat-visually-hidden;\n}\n\ncat-date-inline {\n margin: 1rem;\n width: 20rem;\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: true\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n componentDidLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.input?.mask({\n date: true,\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1, p2, p3]\n });\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.input?.clear();\n }\n\n render() {\n return (\n \n (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n \n {this.label}\n ({this.locale.formatStr})\n \n this.dateInline?.resetView()}\n >\n \n
\n (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n >\n
\n \n \n
\n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input) {\n return;\n }\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? new Date(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n\n > :not(:last-child) {\n // we use margin here instead of gap to be able to properly adjust by container query\n margin-right: 0.25rem;\n }\n\n h3 {\n @include cat-head(5);\n flex: 1;\n text-align: center;\n margin-block: 0;\n }\n\n @container (min-width: 20rem) {\n h3 {\n @include cat-head(4);\n }\n\n > :not(:last-child) {\n margin-right: 0.5rem;\n }\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas:\n 'h h h h h h h'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d'\n 'd d d d d d d';\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n\n .picker-weeks & {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas:\n '. h h h h h h h'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d'\n 'w d d d d d d d';\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n }\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n @include cat-body('xs', 600);\n color: cat-token('color.ui.font.muted') !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n\n > :not(:last-child) {\n // we use margin here instead of gap to be able to properly adjust by container query\n margin-right: 0.25rem;\n }\n\n @container (min-width: 20rem) {\n > :not(:last-child) {\n margin-right: 0.5rem;\n }\n\n .cursor-help {\n @include cat-body('s');\n }\n }\n}\n\n.cursor-help {\n margin-block: 0;\n @include cat-body('xs');\n color: cat-token('color.ui.font.muted') !important;\n text-align: center;\n flex: 1;\n\n &:first-child {\n text-align: left;\n }\n\n &:last-child {\n text-align: right;\n }\n\n &:only-child {\n text-align: center;\n }\n}\n\n.cursor-aria {\n @include cat-visually-hidden;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, h } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\nimport { getLocale } from './cat-date-locale';\nimport { addDays, addMonth, clampDate, isSameDay, isSameMonth, isSameYear } from './cat-date-math';\n\n/**\n * An inline date picker component to select a date.\n */\n@Component({\n tag: 'cat-date-inline',\n styleUrl: 'cat-date-inline.scss',\n shadow: true\n})\nexport class CatDateInline {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n // additonally store the focus date to ensure correct focus after potential re-render\n private focusDate: Date | null = null;\n\n @Element() hostElement!: HTMLElement;\n\n @State() viewDate: Date = this.locale.now();\n\n /**\n * Hides the clear button.\n */\n @Prop() noClear = false;\n\n /**\n * Shows an arrow keys navigation hint.\n */\n @Prop() hint = false;\n\n /**\n * Hides the today button.\n */\n @Prop() noToday = false;\n\n /**\n * Show week numbers.\n */\n @Prop() weeks = false;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * Allow the selection of a range of dates, i.e. start and end date.\n */\n @Prop() range = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n private get focusedDate() {\n const [all, year, month, day] =\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date]:focus`)\n ?.dataset.date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n }\n\n componentWillLoad() {\n const [startDate, endDate] = this.getValue();\n if (endDate) {\n this.focus(endDate);\n } else if (startDate) {\n this.focus(startDate);\n }\n }\n\n componentDidRender() {\n if (this.focusDate) {\n // re-focus the previously focused date after re-render\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date=\"${this.locale.toLocalISO(this.focusDate)}\"]`)\n ?.doFocus();\n this.focusDate = null;\n }\n }\n\n @Listen('keydown')\n onKeyDown(e: KeyboardEvent) {\n if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) {\n return;\n }\n const focusedDate = this.focusedDate;\n if (!focusedDate) {\n e.preventDefault();\n const [startDate] = this.getValue();\n this.focus(startDate || this.locale.now());\n } else if (e.key === 'ArrowLeft') {\n e.preventDefault();\n this.focus(e.shiftKey ? addMonth(focusedDate, -1) : addDays(focusedDate, -1));\n } else if (e.key === 'ArrowRight') {\n e.preventDefault();\n this.focus(e.shiftKey ? addMonth(focusedDate, 1) : addDays(focusedDate, 1));\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n this.focus(addDays(focusedDate, -7));\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n this.focus(addDays(focusedDate, 7));\n }\n }\n\n /**\n * Select a date in the picker.\n *\n * @param date The date to select.\n */\n @Method()\n async select(date: Date | null): Promise {\n if (!date) {\n return this.clear();\n }\n const oldValue = this.value;\n const [minDate, maxDate] = this.getMinMaxDate();\n const newDate = clampDate(minDate, new Date(date.getFullYear(), date.getMonth(), date.getDate()), maxDate);\n this.focus(newDate);\n\n if (this.range) {\n const [startDate, endDate] = this.getValue();\n if (!startDate || endDate || newDate < startDate) {\n this.value = this.toRangeValue(newDate, null);\n } else {\n this.value = this.toRangeValue(startDate, newDate);\n }\n } else {\n this.value = this.locale.toLocalISO(newDate);\n }\n\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Clear the picker.\n */\n @Method()\n async clear(): Promise {\n const oldValue = this.value;\n this.value = undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n /**\n * Resets the view of the picker.\n */\n @Method()\n async resetView(): Promise {\n const [minDate, maxDate] = this.getMinMaxDate();\n const [dateStart] = this.getValue();\n this.viewDate = dateStart ?? clampDate(minDate, this.locale.now(), maxDate);\n }\n\n render() {\n const [minDate, maxDate] = this.getMinMaxDate();\n const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());\n const [dateStart, dateEnd] = this.getValue();\n return (\n \n
\n
\n this.navigate('prev', 'year')}\n data-dropdown-no-close\n >\n this.navigate('prev', 'month')}\n data-dropdown-no-close\n >\n

{this.getHeadline()}

\n this.navigate('next', 'month')}\n data-dropdown-no-close\n >\n this.navigate('next', 'year')}\n data-dropdown-no-close\n >\n
\n
this.setAriaLive(this.locale.arrowKeys)}>\n
\n {Array.from(Array(7), (_, i) => {\n const day = (i + this.locale.weekInfo.firstDay) % 7;\n return {this.locale.days.short[day]};\n })}\n
\n {this.weeks && (\n
\n {dateGrid\n .filter((_, i) => i % 7 === 0)\n .map(day => (\n
{this.getWeekNumber(day)}
\n ))}\n
\n )}\n
\n {dateGrid.map(day => {\n const isStartDate = isSameDay(dateStart, day);\n const isEndDate = isSameDay(dateEnd, day);\n const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;\n const isToday = isSameDay(this.locale.now(), day);\n const isWeekend = this.locale.weekInfo.weekend.includes(day.getDay() || 7);\n return (\n this.select(day)}\n data-date={this.locale.toLocalISO(day)}\n >\n {day.getDate()}\n \n );\n })}\n
\n
\n
\n {!this.noToday && this.canClick(this.locale.now()) && (\n this.select(this.locale.now())}>\n {this.locale.today}\n \n )}\n {this.hint &&

{this.locale.arrowKeys}

}\n {!this.noClear && (\n this.clear()}>\n {this.locale.clear}\n \n )}\n
\n
\n

\n
\n );\n }\n\n private focus(date: Date) {\n const [minDate, maxDate] = this.getMinMaxDate();\n this.focusDate = clampDate(minDate, date, maxDate);\n this.viewDate = new Date(this.focusDate.getFullYear(), this.focusDate.getMonth());\n this.hostElement.shadowRoot\n ?.querySelector(`[data-date=\"${this.locale.toLocalISO(this.focusDate)}\"]`)\n ?.doFocus();\n }\n\n private navigate(direction: 'prev' | 'next', period: 'year' | 'month') {\n this.viewDate = new Date(\n direction === 'prev'\n ? period === 'year'\n ? this.viewDate.setFullYear(this.viewDate.getFullYear() - 1)\n : this.viewDate.setMonth(this.viewDate.getMonth() - 1)\n : period === 'year'\n ? this.viewDate.setFullYear(this.viewDate.getFullYear() + 1)\n : this.viewDate.setMonth(this.viewDate.getMonth() + 1)\n );\n // announce the new month and year\n this.setAriaLive(this.getHeadline());\n }\n\n private setAriaLive(text: string) {\n const node = this.hostElement.shadowRoot?.querySelector('.cursor-aria');\n if (node) {\n node.innerHTML = text;\n }\n }\n\n private dateGrid(year: number, month: number) {\n const daysOffset = (new Date(year, month, 1).getDay() - this.locale.weekInfo.firstDay + 7) % 7;\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n const days = [...Array(daysInMonth).keys()];\n const daysBefore = this.getLastDaysOfMonth(year, month, daysOffset);\n const daysAfter = [...Array(42 - days.length - daysBefore.length).keys()];\n return [\n ...daysBefore.map(day => new Date(year, month - 1, day + 1)),\n ...days.map(day => new Date(year, month, day + 1)),\n ...daysAfter.map(day => new Date(year, month + 1, day + 1))\n ];\n }\n\n private getLastDaysOfMonth(year: number, month: number, x: number): number[] {\n const lastDayOfMonth = new Date(year, month, 0).getDate();\n const daysOfMonth = Array.from({ length: lastDayOfMonth }, (_, index) => index);\n return x ? daysOfMonth.slice(-x) : [];\n }\n\n private getHeadline() {\n return `${this.locale.months.long[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()}`;\n }\n\n private getWeekNumber(date: Date, iso8601 = true) {\n const currentDate = new Date(date.getTime());\n const dayNum = iso8601 ? currentDate.getDay() || 7 : currentDate.getDay();\n currentDate.setDate(currentDate.getDate() + 4 - dayNum);\n const yearStart = new Date(currentDate.getFullYear(), 0, 1);\n return Math.ceil(((+currentDate - +yearStart) / 86400000 + 1) / 7);\n }\n\n private canFocus(date: Date): boolean {\n const now = this.locale.now();\n const [minDate] = this.getMinMaxDate();\n const focusedDate = this.focusedDate;\n const [startDate] = this.getValue();\n if (focusedDate && isSameMonth(focusedDate, this.viewDate)) {\n return isSameMonth(focusedDate, date) && isSameDay(focusedDate, date);\n } else if (startDate && isSameMonth(startDate, this.viewDate)) {\n return isSameMonth(startDate, date) && isSameDay(startDate, date);\n } else if (isSameMonth(this.viewDate, now) && (!minDate || minDate <= now)) {\n return isSameMonth(this.viewDate, date) && isSameDay(now, date);\n }\n const minDay = isSameMonth(date, minDate) ? minDate?.getDate() ?? 1 : 1;\n return isSameMonth(this.viewDate, date) && date.getDate() === minDay;\n }\n\n private canClick(date: Date) {\n const [minDate, maxDate] = this.getMinMaxDate();\n return (!minDate || minDate <= date) && (!maxDate || maxDate >= date);\n }\n\n private getMinMaxDate() {\n const minDate = this.locale.fromLocalISO(this.min);\n const maxDate = this.locale.fromLocalISO(this.max);\n return [minDate, maxDate];\n }\n\n private getValue(): [Date | null, Date | null] {\n if (this.range) {\n const [startDate, endDate] = JSON.parse(this.value || '[]') as [string | null, string | null];\n return [this.locale.fromLocalISO(startDate), this.locale.fromLocalISO(endDate)];\n } else {\n return [this.locale.fromLocalISO(this.value), null];\n }\n }\n\n private toRangeValue(startDate: Date | null, endDate: Date | null): string {\n return JSON.stringify([startDate, endDate].map(date => (date ? this.locale.toLocalISO(date) : null)));\n }\n}\n","export var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport var defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","export var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export var pad = function (number, length) {\n if (length === void 0) { length = 2; }\n return (\"000\" + number).slice(length * -1);\n};\nexport var int = function (bool) { return (bool === true ? 1 : 0); };\nexport function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n}\nexport var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n};\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nvar doNothing = function () { return undefined; };\nexport var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\nexport var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport var tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport var formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: function (date) { return pad(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: function (date) { return pad(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return pad(date.getFullYear(), 4); },\n d: function (date) { return pad(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return pad(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return pad(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n};\nexport var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n};\nexport function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n};\nexport var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n};\nexport var duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n}\n","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n}\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nimport { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, calculateSecondsSinceMidnight, parseSeconds, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nvar DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = calculateSecondsSinceMidnight(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = calculateSecondsSinceMidnight(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = calculateSecondsSinceMidnight(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = parseSeconds(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n var eventTarget = getEventTarget(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return getEventTarget(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && getEventTarget(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = getEventTarget(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = getDefaultHours(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = getEventTarget(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) { cellClass = \"flatpickr-day\"; }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n compareDates(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = getEventTarget(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: __assign({}, English),\n default: __assign({}, English),\n};\nflatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","/**\n * Find the closest parent element matching the given selector while traversing\n * up the DOM tree (including Shadow DOM).\n */\nexport function findClosest(selector: string, element: Element | ShadowRoot): Element | null {\n if (element instanceof Element && element.matches(selector)) {\n return element;\n }\n\n // Search in parent element or Shadow DOM host\n const nextElement =\n element instanceof ShadowRoot ? element.host : element.parentElement || (element.getRootNode() as ShadowRoot).host;\n return nextElement ? findClosest(selector, nextElement) : null;\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.weekSelect = factory());\n}(this, (function () { 'use strict';\n\n function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n }\n\n function weekSelectPlugin() {\n return function (fp) {\n function onDayHover(event) {\n var day = getEventTarget(event);\n if (!day.classList.contains(\"flatpickr-day\"))\n return;\n var days = fp.days.childNodes;\n var dayIndex = day.$i;\n var dayIndSeven = dayIndex / 7;\n var weekStartDay = days[7 * Math.floor(dayIndSeven)]\n .dateObj;\n var weekEndDay = days[7 * Math.ceil(dayIndSeven + 0.01) - 1].dateObj;\n for (var i = days.length; i--;) {\n var day_1 = days[i];\n var date = day_1.dateObj;\n if (date > weekEndDay || date < weekStartDay)\n day_1.classList.remove(\"inRange\");\n else\n day_1.classList.add(\"inRange\");\n }\n }\n function highlightWeek() {\n var selDate = fp.latestSelectedDateObj;\n if (selDate !== undefined &&\n selDate.getMonth() === fp.currentMonth &&\n selDate.getFullYear() === fp.currentYear) {\n fp.weekStartDay = fp.days.childNodes[7 * Math.floor(fp.selectedDateElem.$i / 7)].dateObj;\n fp.weekEndDay = fp.days.childNodes[7 * Math.ceil(fp.selectedDateElem.$i / 7 + 0.01) - 1].dateObj;\n }\n var days = fp.days.childNodes;\n for (var i = days.length; i--;) {\n var date = days[i].dateObj;\n if (date >= fp.weekStartDay && date <= fp.weekEndDay)\n days[i].classList.add(\"week\", \"selected\");\n }\n }\n function clearHover() {\n var days = fp.days.childNodes;\n for (var i = days.length; i--;)\n days[i].classList.remove(\"inRange\");\n }\n function onReady() {\n if (fp.daysContainer !== undefined)\n fp.daysContainer.addEventListener(\"mouseover\", onDayHover);\n }\n function onDestroy() {\n if (fp.daysContainer !== undefined)\n fp.daysContainer.removeEventListener(\"mouseover\", onDayHover);\n }\n return {\n onValueUpdate: highlightWeek,\n onMonthChange: highlightWeek,\n onYearChange: highlightWeek,\n onOpen: highlightWeek,\n onClose: clearHover,\n onParseConfig: function () {\n fp.config.mode = \"single\";\n fp.config.enableTime = false;\n fp.config.dateFormat = fp.config.dateFormat\n ? fp.config.dateFormat\n : \"\\\\W\\\\e\\\\e\\\\k #W, Y\";\n fp.config.altFormat = fp.config.altFormat\n ? fp.config.altFormat\n : \"\\\\W\\\\e\\\\e\\\\k #W, Y\";\n },\n onReady: [\n onReady,\n highlightWeek,\n function () {\n fp.loadedPlugins.push(\"weekSelect\");\n },\n ],\n onDestroy: onDestroy,\n };\n };\n }\n\n return weekSelectPlugin;\n\n})));\n","import flatpickr from 'flatpickr';\nimport weekSelectPlugin from 'flatpickr/dist/plugins/weekSelect/weekSelect';\nimport { CatDatepickerMode } from './cat-datepicker.mode';\nimport { BaseOptions, Hook } from 'flatpickr/dist/types/options';\n\nexport function getConfig(\n options: {\n locale: flatpickr.CustomLocale;\n format: string;\n mode: CatDatepickerMode;\n min: string | undefined;\n max: string | undefined;\n step: number;\n disabled: boolean;\n readonly: boolean;\n nativePickerAttributes: { [key: string]: string };\n applyChange: (value?: string) => void;\n appendTo?: HTMLElement | undefined;\n position?: BaseOptions['position'];\n onReady?: Hook;\n },\n more: flatpickr.Options.Options = {}\n): flatpickr.Options.Options {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const plugins = options.mode === 'week' ? [new (weekSelectPlugin as any)({})] : [];\n const format = dateFormat(options.mode);\n\n return {\n ...more,\n locale: options.locale,\n plugins,\n allowInput: true,\n altInput: true,\n prevArrow: '←',\n nextArrow: '→',\n dateFormat: format,\n altFormat: options.format,\n ariaDateFormat: options.format,\n mode: options.mode === 'daterange' ? 'range' : 'single',\n minDate: options.min,\n maxDate: options.max,\n enableTime: options.mode === 'time' || options.mode === 'datetime',\n noCalendar: options.mode === 'time',\n weekNumbers: true,\n minuteIncrement: options.step,\n clickOpens: !options.disabled && !options.readonly,\n appendTo: options.appendTo,\n position: options.position ? options.position : 'auto',\n onReady: (_dates, _dateStr, flatpickr) => {\n for (const key in options.nativePickerAttributes) {\n const value = options.nativePickerAttributes[key];\n flatpickr.calendarContainer.setAttribute(key, value);\n }\n if (options.appendTo && typeof options.onReady === 'function') {\n options.onReady(_dates, _dateStr, flatpickr);\n }\n },\n onClose: function (dates, _dateStr, instance) {\n if (options.mode === 'daterange' && dates.length < 2) {\n instance.clear();\n }\n },\n onChange: (dates, dateStr, flatpickr) => {\n let value = dateStr || undefined;\n if (options.mode === 'daterange') {\n if (dates.length < 2) {\n return;\n } else {\n const start = dates[0];\n const end = dates[1];\n end.setHours(23);\n end.setMinutes(59);\n end.setSeconds(59);\n value = `${flatpickr.formatDate(start, format)} - ${flatpickr.formatDate(end, format)}`;\n }\n } else if (options.mode === 'week') {\n value = dates[0] ? flatpickr.config.getWeek(dates[0]).toString() : undefined;\n }\n options.applyChange(value);\n }\n };\n}\n\nfunction dateFormat(mode: CatDatepickerMode): string {\n if (mode === 'week') {\n return 'W';\n } else if (mode === 'time') {\n return 'H:i';\n } else {\n return 'Z';\n }\n}\n","import { CatDatepickerMode } from './cat-datepicker.mode';\n\nexport function getFormat(language: string, mode: CatDatepickerMode): string {\n const date = new Date(2000, 1, 3, 16, 5, 6);\n const formatDate: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit' };\n const formatTime: Intl.DateTimeFormatOptions = { hour: '2-digit', minute: '2-digit' };\n return mode === 'week'\n ? 'W'\n : new Intl.DateTimeFormat(\n language,\n {\n date: formatDate,\n time: formatTime,\n datetime: { ...formatDate, ...formatTime },\n daterange: formatDate\n }[mode]\n )\n .format(date)\n .replace('2000', 'Y')\n .replace('00', 'y')\n .replace('02', 'm')\n .replace('03', 'd')\n .replace('04', 'h')\n .replace('16', 'H')\n .replace('05', 'i')\n .replace(/AM|PM/i, 'K');\n}\n","import flatpickr from 'flatpickr';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nexport function getHour12(language: string): boolean {\n const dateStr = new Intl.DateTimeFormat(language, { hour: '2-digit', minute: '2-digit' })\n .format(new Date())\n .toLowerCase();\n return dateStr.includes('am') || dateStr.includes('pm');\n}\n\nfunction getFirstDayOfWeek(language: string): number {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return weekInfo?.firstDay ?? 1;\n}\n\nfunction daysForLocale(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction monthsForLocale(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nexport function getLocale(language: string): flatpickr.CustomLocale {\n return {\n firstDayOfWeek: getFirstDayOfWeek(language),\n rangeSeparator: ' - ',\n weekAbbreviation: '',\n yearAriaLabel: i18n.t('datepicker.year'),\n monthAriaLabel: i18n.t('datepicker.month'),\n hourAriaLabel: i18n.t('datepicker.hour'),\n minuteAriaLabel: i18n.t('datepicker.minute'),\n toggleTitle: i18n.t('datepicker.toggle'),\n scrollTitle: i18n.t('datepicker.scroll'),\n time_24hr: !getHour12(language),\n weekdays: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shorthand: daysForLocale(language, 'short') as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n longhand: daysForLocale(language, 'long') as any\n },\n months: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n shorthand: monthsForLocale(language, 'short') as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n longhand: monthsForLocale(language, 'long') as any\n }\n };\n}\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle