@haiilo/catalyst 10.28.0 → 10.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{r as t,h as e,H as a,g as i,c as r}from"./p-c3a9aef7.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 I,c as D,d as M,o as C}from"./p-e5aee21d.js";const R=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 R}}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:a,observers:i}=this;if(e||a){return c}this.currentObservers=null;i.push(t);return new l((()=>{this.currentObservers=null;d(i,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:a,isStopped:i}=this;if(e){t.error(a)}else if(i){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,a;(a=(e=this.destination)===null||e===void 0?void 0:e.next)===null||a===void 0?void 0:a.call(e,t)}error(t){var e,a;(a=(e=this.destination)===null||e===void 0?void 0:e.error)===null||a===void 0?void 0:a.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,a;return(a=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&a!==void 0?a:c}}const F={now(){return(F.delegate||Date).now()},delegate:undefined};class T extends l{constructor(t,e){super()}schedule(t,e=0){return this}}const $={setInterval(t,e,...a){const{delegate:i}=$;if(i===null||i===void 0?void 0:i.setInterval){return i.setInterval(t,e,...a)}return setInterval(t,e,...a)},clearInterval(t){const{delegate:e}=$;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class B extends T{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var a;if(this.closed){return this}this.state=t;const i=this.id;const r=this.scheduler;if(i!=null){this.id=this.recycleAsyncId(r,i,e)}this.pending=true;this.delay=e;this.id=(a=this.id)!==null&&a!==void 0?a:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,a=0){return $.setInterval(t.flush.bind(t,this),a)}recycleAsyncId(t,e,a=0){if(a!=null&&this.delay===a&&this.pending===false){return e}if(e!=null){$.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const a=this._execute(t,e);if(a){return a}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let a=false;let i;try{this.work(t)}catch(t){a=true;i=t?t:new Error("Scheduled action threw falsy error")}if(a){this.unsubscribe();return i}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:a}=e;this.work=this.state=this.scheduler=null;this.pending=false;d(a,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,a){return new this.schedulerActionCtor(this,t).schedule(a,e)}}E.now=F.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 a;this._active=true;do{if(a=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(a){while(t=e.shift()){t.unsubscribe()}throw a}}}const N=new O(B);const L=N;const W=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(((a,i)=>{let r=0;a.subscribe(f(i,(a=>{i.next(t.call(e,a,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,a,i,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<i?g(t):c.push(t);const g=t=>{n&&e.next(t);l++;let s=false;u(a(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&&l<i){const t=c.shift();if(o){p(e,o,(()=>g(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,a=Infinity){if(b(e)){return V(((a,i)=>Y(((t,r)=>e(a,t,i,r)))(u(t(a,i)))),a)}else if(typeof e==="number"){a=e}return h(((e,i)=>K(e,i,t,a)))}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,a,i){if(b(a)){i=a;a=undefined}if(i){return tt(t,e,a).pipe(_(i))}const[r,n]=rt(t)?X.map((i=>r=>t[i](e,r,a))):at(t)?Z.map(et(t,e)):it(t)?Q.map(et(t,e)):[];if(!r){if(y(t)){return V((t=>tt(t,e,a)))(u(t))}}if(!r){throw new TypeError("Invalid event target")}return new o((t=>{const e=(...e)=>t.next(1<e.length?e:e[0]);r(e);return()=>n(e)}))}function et(t,e){return a=>i=>t[a](e,i)}function at(t){return b(t.addListener)&&b(t.removeListener)}function it(t){return b(t.on)&&b(t.off)}function rt(t){return b(t.addEventListener)&&b(t.removeEventListener)}function nt(t=0,e,a=L){let i=-1;if(e!=null){if(k(e)){a=e}else{i=e}}return new o((e=>{let r=P(t)?+t-a.now():t;if(r<0){r=0}let n=0;return a.schedule((function(){if(!e.closed){e.next(n++);if(0<=i){this.schedule(undefined,i)}else{e.complete()}}}),r)}))}function ot(...t){const e=v(t);const a=x(t,Infinity);const i=t;return!i.length?W:i.length===1?u(i[0]):q(a)(g(i,e))}function st(t,e){return h(((a,i)=>{let r=0;a.subscribe(f(i,(a=>t.call(e,a,r++)&&i.next(a))))}))}function ct(t){return h(((e,a)=>{let i=false;let r=null;let n=null;let o=false;const s=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(i){i=false;const t=r;r=null;a.next(t)}o&&a.complete()};const c=()=>{n=null;o&&a.complete()};e.subscribe(f(a,(e=>{i=true;r=e;if(!n){u(t(e)).subscribe(n=f(a,s,c))}}),(()=>{o=true;(!i||!n||n.closed)&&a.complete()})))}))}function lt(t,e=N){return ct((()=>nt(t,e)))}function dt(t){return h(((e,a)=>{let i=null;let r=false;let n;i=e.subscribe(f(a,undefined,undefined,(o=>{n=u(t(o,dt(t)(e)));if(i){i.unsubscribe();i=null;n.subscribe(a)}else{r=true}})));if(r){i.unsubscribe();i=null;n.subscribe(a)}}))}function ht(t,e,a,i,r){return(n,o)=>{let s=a;let c=e;let l=0;n.subscribe(f(o,(e=>{const a=l++;c=s?t(c,e,a):(s=true,e);i&&o.next(c)}),r&&(()=>{s&&o.next(c);o.complete()})))}}function ft(t){return h(((e,a)=>{let i=false;let r=null;let n=null;const o=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(i){i=false;const t=r;r=null;a.next(t)}};e.subscribe(f(a,(e=>{n===null||n===void 0?void 0:n.unsubscribe();i=true;r=e;n=f(a,o,w);u(t(e)).subscribe(n)}),(()=>{o();a.complete()}),undefined,(()=>{r=n=null})))}))}function ut(t){return h(((e,a)=>{let i=false;e.subscribe(f(a,(t=>{i=true;a.next(t)}),(()=>{if(!i){a.next(t)}a.complete()})))}))}function pt(t){return t<=0?()=>W:h(((e,a)=>{let i=0;e.subscribe(f(a,(e=>{if(++i<=t){a.next(e);if(t<=i){a.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 a=>G(e.pipe(pt(1),bt()),a.pipe(gt(t)))}return V(((e,a)=>u(t(e,a)).pipe(pt(1),mt(e))))}function vt(t,e=N){const a=nt(t,e);return gt((()=>a))}function yt(t,e=m){t=t!==null&&t!==void 0?t:kt;return h(((a,i)=>{let r;let n=true;a.subscribe(f(i,(a=>{const o=e(a);if(n||!t(r,o)){n=false;r=o;i.next(a)}})))}))}function kt(t,e){return t===e}function xt(t=wt){return h(((e,a)=>{let i=false;e.subscribe(f(a,(t=>{i=true;a.next(t)}),(()=>i?a.complete():a.error(t()))))}))}function wt(){return new j}function zt(t,e){const a=arguments.length>=2;return i=>i.pipe(t?st(((e,a)=>t(e,a,i))):m,pt(1),a?ut(e):xt((()=>new j)))}function It(t,e){return h(ht(t,e,arguments.length>=2,true))}function Dt(...t){const e=v(t);return h(((a,i)=>{(e?G(t,a,e):G(t,a)).subscribe(i)}))}function Mt(t,e){return h(((a,i)=>{let r=null;let n=0;let o=false;const s=()=>o&&!r&&i.complete();a.subscribe(f(i,(a=>{r===null||r===void 0?void 0:r.unsubscribe();let o=0;const c=n++;u(t(a,c)).subscribe(r=f(i,(t=>i.next(e?e(a,t,c,o++):t)),(()=>{r=null;s()})))}),(()=>{o=true;s()})))}))}function Ct(t){return h(((e,a)=>{u(t).subscribe(f(a,(()=>a.complete()),w));!a.closed&&e.subscribe(a)}))}function Rt(t,e=false){return h(((a,i)=>{let r=0;a.subscribe(f(i,(a=>{const n=t(a,r++);(n||e)&&i.next(a);!n&&i.complete()})))}))}function At(t,e,a){const i=b(t)||e||a?{next:t,error:e,complete:a}:t;return i?h(((t,e)=>{var a;(a=i.subscribe)===null||a===void 0?void 0:a.call(i);let r=true;t.subscribe(f(e,(t=>{var a;(a=i.next)===null||a===void 0?void 0:a.call(i,t);e.next(t)}),(()=>{var t;r=false;(t=i.complete)===null||t===void 0?void 0:t.call(i);e.complete()}),(t=>{var a;r=false;(a=i.error)===null||a===void 0?void 0:a.call(i,t);e.error(t)}),(()=>{var t,e;if(r){(t=i.unsubscribe)===null||t===void 0?void 0:t.call(i)}(e=i.finalize)===null||e===void 0?void 0:e.call(i)})))})):m}function St(t,e,a){if(!t.hostElement.hasAttribute(e)&&a!=null){t.hostElement.setAttribute(e,String(a))}}const Ft=":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 Tt=Ft;const $t=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(a,{key:"c02988c259d20cfb381b69a43cd9800a075f9c97"},!this.noIcon&&e("cat-icon",{key:"fee7a2b021437de0c7617187e48c3e436218b50f",size:"l",icon:this.icon||this.mapIcon.get(this.color)}),e("div",{key:"4bb19866ff246d7ec956c213e39f8d09080f02da",class:"content"},e("slot",{key:"a3356a8b51747570f01c33cd77106156aed5c404"})))}get hostElement(){return i(this)}};$t.style=Tt;const Bt=t=>new Promise(((e,a)=>{const i=new Image;i.addEventListener("load",e);i.addEventListener("error",a);i.src=t}));const Et=":host{display:contents}:host([hidden]){display:none}.avatar{flex:none;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){Bt(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}render(){if(this.url){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;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 delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{src:["onSrcChanged"]}}};Nt.style=Ot;const Lt=["xs","s","m","l","xl"];const Wt={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 jt(t){return typeof t==="string"&&Lt.includes(t)}let Pt;try{Pt=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch{Pt=false}class Yt{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||Pt)&&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 Ht=new Set;let Ut;class _t{constructor(){this._platform=new Yt;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){Kt(t)}return this._matchMedia(t)}}function Kt(t){if(Ht.has(t)){return}try{if(!Ut){Ut=document.createElement("style");Ut.setAttribute("type","text/css");document.head.appendChild(Ut)}if(Ut.sheet){Ut.sheet.insertRule(`@media ${t} {body{ }}`,0);Ht.add(t)}}catch(t){z.error(t)}}const Vt=":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;flex-shrink:0}: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;gap:0.25rem}:host([data-icon-badge=xs]){width:1rem;height:1rem;padding:0}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem;gap:0.25rem}:host([data-icon-badge=s]){width:1.5rem;height:1.5rem;padding:0}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem;gap:0.25rem}:host([data-icon-badge=m]){width:2rem;height:2rem;padding:0}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem;gap:0.25rem}:host([data-icon-badge=l]){width:2.5rem;height:2.5rem;padding:0}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem;gap:0.25rem}:host([data-icon-badge=xl]){width:3rem;height:3rem;padding:0}: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 qt=Vt;const Jt=class{constructor(e){t(this,e);this._iconOnly=true;this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false;this.icon=undefined;this.iconOnly=false;this.iconRight=false}onIconOnlyChanged(t){this.mediaQueryList?.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(jt(t)){this.mediaMatcher??(this.mediaMatcher=new _t);this.mediaQueryList=this.mediaMatcher.matchMedia(Wt[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)}get isIconBadge(){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 iconSize(){switch(this.size){case"xs":case"s":return"xs";case"l":case"xl":return"l";default:return"m"}}render(){return e(a,{key:"2c10a8da896b2fe6b7637ec871386da6ee9dc132","data-icon-badge":this.isIconBadge?this.size:null},this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconBadge?e("cat-icon",{icon:this.icon,size:this.iconSize,class:"icon-only"}):e("slot",null),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null)}get hostElement(){return i(this)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Jt.style=qt;function Gt(t,e){if(e instanceof Element&&e.matches(t)){return e}const a=e instanceof ShadowRoot?e.host:e.parentElement||e.getRootNode().host;return a?Gt(t,a):null}const Zt=':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}:host([data-button-group=middle]),:host([data-button-group=last]){margin-left:-1px}.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-empty .cat-button-content{display:none}.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-button-group-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-button-group-middle{border-radius:0}.cat-button-group-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-button-group:hover{z-index:1}.cat-button-group: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 color-mix(in srgb, rgb(var(--base)) 20%, #fff);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:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.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;text-align:left}:host(.cat-text-right) .cat-button{justify-content:right;text-align: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 Xt=Zt;const Qt=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.hasSlottedContent=false;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(jt(t)){this.mediaMatcher??(this.mediaMatcher=new _t);this.mediaQueryList=this.mediaMatcher.matchMedia(Wt[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(){this.hasSlottedContent=this.hostElement.hasChildNodes()}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}else if(this.submit){const t=Gt("form",this.hostElement);if(t&&t instanceof HTMLFormElement){t.requestSubmit()}}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;if(this.url){return e(a,{"data-button-group":this.buttonGroupPosition},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-empty":!this.hasSlottedContent,"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),[`cat-button-group-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content))}else{return e(a,{"data-button-group":this.buttonGroupPosition},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-empty":!this.hasSlottedContent,"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-button-group-${this.buttonGroupPosition}`]: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 delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Qt.style=Xt;const te=":host{position:relative;display:inline-flex;vertical-align:middle}";const ee=te;const ae=class{constructor(e){t(this,e);this.buttonElements=[];this.a11yLabel=undefined}render(){return e(a,{key:"2b9aeb09c4290a27751f568e596a3de21f8deeb3",role:"group","aria-label":this.a11yLabel},e("slot",{key:"5a6afa70513843b8c201a649ed0edb30fea9b7fc",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.buttonElements=Array.from(this.hostElement.querySelectorAll(':scope > cat-button, :scope > cat-tooltip > cat-button, :scope > cat-dropdown cat-button[slot="trigger"]'));this.buttonElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.buttonElements.length-1?"last":"middle"}))}get hostElement(){return i(this)}};ae.style=ee;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 re=ie;const ne=class{constructor(e){t(this,e);this.catLoad=r(this,"catLoad",7)}render(){return e("slot",{key:"4d88ab8e5cf1e13a3242b646314f034f5fa0fdfe"})}componentDidLoad(){this.catLoad.emit()}};ne.style=re;const oe=t=>{const{id:a,hint:i,slottedHint:r,errorMap:n}=t;const o=Object.entries(n||{});return e("div",{"aria-live":"polite",id:a+"-hint",class:"hint-section"},o.length?o.map((([a,i])=>e("p",{class:(t.class??"")+" input-hint cat-text-danger"},I.t(`error.${a}`,i)))):[i&&(Array.isArray(i)?i.map((a=>e("p",{class:(t.class??"")+" input-hint"},a))):e("p",{class:(t.class??"")+" input-hint"},i)),r])};const se=".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}.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-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.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))}.align-center{align-items:center}.align-end{align-items:flex-end}";const ce=se;let le=0;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._id=`cat-checkbox-${le++}`;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.alignment="top";this.nativeAttributes=undefined;this.requiredMarker="none"}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"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"ab6bd1bb1b74998b5202e57ba6b32da9dd0135c8"},e("label",{key:"5554806b29bbdea219869d043f9c41469390720d",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"}},e("input",{key:"cccc0ef488d141b6eb4859fcc58433174f7ce21b",...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:"c6c568ebc80618b4acc3e28793c1844284d4a831",class:"box","aria-hidden":"true"},e("svg",{key:"5c8c2ae933fecab8b9c826ef2493b2dec129f49c",class:"check",viewBox:"0 0 12 10"},e("polyline",{key:"4ed298a1e0377c4ca771940b7da867c5e72017af",points:"1.5 6 4.5 9 10.5 1"})),e("svg",{key:"4ca83993e600c99f4651333ce9f86c0f2b85754a",class:"dash",viewBox:"0 0 12 10"},e("polyline",{key:"32d6a98f6247ce1605baa1c0fcb66325300d0118",points:"1.5 5 10.5 5"}))),e("span",{key:"cdf8717a98a756e4ae204d08fd186cf49ea7d101",class:{label:true,"label-wrapper":!this.hasSlottedLabel},part:"label"},this.hasSlottedLabel&&e("slot",{key:"967c87e44e4bb119b46ae70edf2eb47d63177a90",name:"label"})||this.label,e("span",{key:"04a85b99e78e8db04e4080d54ff1690051ce2a50",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"caf9a8682262079edf06957ca2a2c9d14abc9130",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"d073fb49348c5561984c73bafbf7fd7e17f01ba5",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")")))),this.hasHint&&e("div",{key:"9fb0531829e03683accb07fdc675975feb709577",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"e72ad8ae3b9048ef6a58d74eb9593d511fad03c6",class:"box-placeholder"}),e(oe,{key:"b10a09f94fe13f1cc7602191c0e7b3d2066a8364",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}static get delegatesFocus(){return true}get hostElement(){return i(this)}};de.style=ce;function he(t,e="long"){const a=new Date;const i=(a.getUTCDate()-a.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(a.getTime()).setUTCDate(i+t))))}function fe(t,e="long"){const a=new Date(0);const i=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>i(new Date(a.getTime()).setUTCMonth(t))))}function ue(t){const e=new Intl.Locale(t);const a=e.getWeekInfo?.()??e.weekInfo;return{firstDay:a?.firstDay??1,minDays:a?.minDays??4,weekend:a?.weekend??[6,7]}}function pe(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 be(t){return{prevYear:I.t("datepicker.prevYear"),nextYear:I.t("datepicker.nextYear"),prevMonth:I.t("datepicker.prevMonth"),nextMonth:I.t("datepicker.nextMonth"),arrowKeys:I.t("datepicker.arrowKeys"),today:I.t("datepicker.today"),change:I.t("datepicker.change"),choose:I.t("datepicker.choose"),clear:I.t("datepicker.clear"),formatStr:pe(t),weekInfo:ue(t),days:{short:he(t,"short"),long:he(t,"long")},months:{short:fe(t,"short"),long:fe(t,"long")},now:()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fromLocalISO:t=>{const[e,a,i,r]=t?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return e?new Date(Number(a),Number(i)-1,Number(r)):null},toLocalISO:t=>{const e=t.getFullYear();const a=(t.getMonth()+1).toString().padStart(2,"0");const i=t.getDate().toString().padStart(2,"0");return`${e}-${a}-${i}`},toLocalStr:e=>new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric",weekday:"long"}).format(e)}}function me(t){return t%4===0&&t%100!==0||t%400===0}function ge(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function ve(t,e){const[a,i,r]=[t.getFullYear(),t.getMonth(),t.getDate()];const n=[31,me(a)?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[(i+e%12+12)%12]));return o}function ye(t,e){return!!t&&!!e&&t.getFullYear()===e.getFullYear()}function ke(t,e){return!!t&&!!e&&t.getMonth()===e.getMonth()&&ye(t,e)}function xe(t,e){return!!t&&!!e&&t.getDate()===e.getDate()&&ke(t,e)}function we(t,e,a){return new Date(Math.min(Math.max(e.getTime(),t?.getTime()??-Infinity),a?.getTime()??Infinity))}const ze=":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 Ie=ze;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=I.getLocale();this.locale=be(this.language);this.inputFocused=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,a,i]=this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];if(t){const t=new Date(Number(e),Number(a)-1,Number(i));const r=new Intl.DateTimeFormat(this.language,{year:"numeric",month:"2-digit",day:"2-digit"});return r.format(t)}return""}componentDidLoad(){const t=this.locale.formatStr.replace("YYYY","Y").replace("YY","y").replace("MM","m").replace("DD","d");const[,e,a,i,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(t)||[];this.input?.mask({date:true,dateMin:this.min,dateMax:this.max,delimiter:a,datePattern:[e,i,r]})}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"6cb5833dd0f95cf170ad74d3841eee067e315df1"},e("cat-input",{key:"a97d7b5f9ee3a6f63a648e491182b2ab9287bedf",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=>{this.inputFocused=t.target===this.input;t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.onInputBlur(t.detail)}},e("span",{key:"c7d342b0fa3b522af5d0368e590345a2524c40ee",slot:"label"},this.label,e("span",{key:"44d02ddce886497f9f93dc8bb73b943ae7317d07",class:"label-aria"}," (",this.locale.formatStr,")")),e("cat-dropdown",{key:"a4b84508af92334d93b406f767f8080ab28a831b",slot:"addon",placement:this.placement,arrowNavigation:"none",noResize:true,onCatOpen:()=>this.dateInline?.resetView()},e("cat-button",{key:"0e48c43b6bb3b34bb70c97e7ed2bae01664c3d4e",slot:"trigger",icon:"$cat:datepicker-calendar",iconOnly:true,class:"cat-date-toggle",disabled:this.disabled,a11yLabel:this.getTriggerA11yLabel()}),e("div",{key:"976f8aa393d60c1425a63198baeabf7522bc38c4",slot:"content"},e("cat-date-inline",{key:"08d8833fef723d80000c330fa58a3eb30d57d211",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||!this.inputFocused){return}this.inputFocused=false;const e=this.value;const a=this.parse(this.input.value??"");const i=this.locale.fromLocalISO(this.min);const r=this.locale.fromLocalISO(this.max);const n=a?we(i,a,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 a=t.detail?this.locale.fromLocalISO(t.detail):null;this.value=a?this.locale.toLocalISO(a):undefined;if(e!==this.value){this.catChange.emit(this.value)}}parse(t){const[,e,a,i,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr)||[];const n=[e,i,r];const o=t.split(a).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 a=this.value;const i=this.locale.fromLocalISO(a);const r=this.locale.fromLocalISO(e);if(!i||!r){return}const n=we(t==="min"?r:null,i,t==="max"?r:null);const o=this.locale.toLocalISO(n);if(a!==o){this.value=o;this.catChange.emit(o)}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};De.style=Ie;
1
+ import{r as t,h as e,H as a,g as i,c as r}from"./p-c3a9aef7.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 I,c as D,d as M,o as C}from"./p-e5aee21d.js";const R=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 R}}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:a,observers:i}=this;if(e||a){return c}this.currentObservers=null;i.push(t);return new l((()=>{this.currentObservers=null;d(i,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:a,isStopped:i}=this;if(e){t.error(a)}else if(i){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,a;(a=(e=this.destination)===null||e===void 0?void 0:e.next)===null||a===void 0?void 0:a.call(e,t)}error(t){var e,a;(a=(e=this.destination)===null||e===void 0?void 0:e.error)===null||a===void 0?void 0:a.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,a;return(a=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&a!==void 0?a:c}}const F={now(){return(F.delegate||Date).now()},delegate:undefined};class T extends l{constructor(t,e){super()}schedule(t,e=0){return this}}const $={setInterval(t,e,...a){const{delegate:i}=$;if(i===null||i===void 0?void 0:i.setInterval){return i.setInterval(t,e,...a)}return setInterval(t,e,...a)},clearInterval(t){const{delegate:e}=$;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class B extends T{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var a;if(this.closed){return this}this.state=t;const i=this.id;const r=this.scheduler;if(i!=null){this.id=this.recycleAsyncId(r,i,e)}this.pending=true;this.delay=e;this.id=(a=this.id)!==null&&a!==void 0?a:this.requestAsyncId(r,this.id,e);return this}requestAsyncId(t,e,a=0){return $.setInterval(t.flush.bind(t,this),a)}recycleAsyncId(t,e,a=0){if(a!=null&&this.delay===a&&this.pending===false){return e}if(e!=null){$.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const a=this._execute(t,e);if(a){return a}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let a=false;let i;try{this.work(t)}catch(t){a=true;i=t?t:new Error("Scheduled action threw falsy error")}if(a){this.unsubscribe();return i}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:a}=e;this.work=this.state=this.scheduler=null;this.pending=false;d(a,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,a){return new this.schedulerActionCtor(this,t).schedule(a,e)}}E.now=F.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 a;this._active=true;do{if(a=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(a){while(t=e.shift()){t.unsubscribe()}throw a}}}const N=new O(B);const L=N;const W=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(((a,i)=>{let r=0;a.subscribe(f(i,(a=>{i.next(t.call(e,a,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,a,i,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<i?g(t):c.push(t);const g=t=>{n&&e.next(t);l++;let s=false;u(a(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&&l<i){const t=c.shift();if(o){p(e,o,(()=>g(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,a=Infinity){if(b(e)){return V(((a,i)=>Y(((t,r)=>e(a,t,i,r)))(u(t(a,i)))),a)}else if(typeof e==="number"){a=e}return h(((e,i)=>K(e,i,t,a)))}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,a,i){if(b(a)){i=a;a=undefined}if(i){return tt(t,e,a).pipe(_(i))}const[r,n]=rt(t)?X.map((i=>r=>t[i](e,r,a))):at(t)?Z.map(et(t,e)):it(t)?Q.map(et(t,e)):[];if(!r){if(y(t)){return V((t=>tt(t,e,a)))(u(t))}}if(!r){throw new TypeError("Invalid event target")}return new o((t=>{const e=(...e)=>t.next(1<e.length?e:e[0]);r(e);return()=>n(e)}))}function et(t,e){return a=>i=>t[a](e,i)}function at(t){return b(t.addListener)&&b(t.removeListener)}function it(t){return b(t.on)&&b(t.off)}function rt(t){return b(t.addEventListener)&&b(t.removeEventListener)}function nt(t=0,e,a=L){let i=-1;if(e!=null){if(k(e)){a=e}else{i=e}}return new o((e=>{let r=P(t)?+t-a.now():t;if(r<0){r=0}let n=0;return a.schedule((function(){if(!e.closed){e.next(n++);if(0<=i){this.schedule(undefined,i)}else{e.complete()}}}),r)}))}function ot(...t){const e=v(t);const a=x(t,Infinity);const i=t;return!i.length?W:i.length===1?u(i[0]):q(a)(g(i,e))}function st(t,e){return h(((a,i)=>{let r=0;a.subscribe(f(i,(a=>t.call(e,a,r++)&&i.next(a))))}))}function ct(t){return h(((e,a)=>{let i=false;let r=null;let n=null;let o=false;const s=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(i){i=false;const t=r;r=null;a.next(t)}o&&a.complete()};const c=()=>{n=null;o&&a.complete()};e.subscribe(f(a,(e=>{i=true;r=e;if(!n){u(t(e)).subscribe(n=f(a,s,c))}}),(()=>{o=true;(!i||!n||n.closed)&&a.complete()})))}))}function lt(t,e=N){return ct((()=>nt(t,e)))}function dt(t){return h(((e,a)=>{let i=null;let r=false;let n;i=e.subscribe(f(a,undefined,undefined,(o=>{n=u(t(o,dt(t)(e)));if(i){i.unsubscribe();i=null;n.subscribe(a)}else{r=true}})));if(r){i.unsubscribe();i=null;n.subscribe(a)}}))}function ht(t,e,a,i,r){return(n,o)=>{let s=a;let c=e;let l=0;n.subscribe(f(o,(e=>{const a=l++;c=s?t(c,e,a):(s=true,e);i&&o.next(c)}),r&&(()=>{s&&o.next(c);o.complete()})))}}function ft(t){return h(((e,a)=>{let i=false;let r=null;let n=null;const o=()=>{n===null||n===void 0?void 0:n.unsubscribe();n=null;if(i){i=false;const t=r;r=null;a.next(t)}};e.subscribe(f(a,(e=>{n===null||n===void 0?void 0:n.unsubscribe();i=true;r=e;n=f(a,o,w);u(t(e)).subscribe(n)}),(()=>{o();a.complete()}),undefined,(()=>{r=n=null})))}))}function ut(t){return h(((e,a)=>{let i=false;e.subscribe(f(a,(t=>{i=true;a.next(t)}),(()=>{if(!i){a.next(t)}a.complete()})))}))}function pt(t){return t<=0?()=>W:h(((e,a)=>{let i=0;e.subscribe(f(a,(e=>{if(++i<=t){a.next(e);if(t<=i){a.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 a=>G(e.pipe(pt(1),bt()),a.pipe(gt(t)))}return V(((e,a)=>u(t(e,a)).pipe(pt(1),mt(e))))}function vt(t,e=N){const a=nt(t,e);return gt((()=>a))}function yt(t,e=m){t=t!==null&&t!==void 0?t:kt;return h(((a,i)=>{let r;let n=true;a.subscribe(f(i,(a=>{const o=e(a);if(n||!t(r,o)){n=false;r=o;i.next(a)}})))}))}function kt(t,e){return t===e}function xt(t=wt){return h(((e,a)=>{let i=false;e.subscribe(f(a,(t=>{i=true;a.next(t)}),(()=>i?a.complete():a.error(t()))))}))}function wt(){return new j}function zt(t,e){const a=arguments.length>=2;return i=>i.pipe(t?st(((e,a)=>t(e,a,i))):m,pt(1),a?ut(e):xt((()=>new j)))}function It(t,e){return h(ht(t,e,arguments.length>=2,true))}function Dt(...t){const e=v(t);return h(((a,i)=>{(e?G(t,a,e):G(t,a)).subscribe(i)}))}function Mt(t,e){return h(((a,i)=>{let r=null;let n=0;let o=false;const s=()=>o&&!r&&i.complete();a.subscribe(f(i,(a=>{r===null||r===void 0?void 0:r.unsubscribe();let o=0;const c=n++;u(t(a,c)).subscribe(r=f(i,(t=>i.next(e?e(a,t,c,o++):t)),(()=>{r=null;s()})))}),(()=>{o=true;s()})))}))}function Ct(t){return h(((e,a)=>{u(t).subscribe(f(a,(()=>a.complete()),w));!a.closed&&e.subscribe(a)}))}function Rt(t,e=false){return h(((a,i)=>{let r=0;a.subscribe(f(i,(a=>{const n=t(a,r++);(n||e)&&i.next(a);!n&&i.complete()})))}))}function At(t,e,a){const i=b(t)||e||a?{next:t,error:e,complete:a}:t;return i?h(((t,e)=>{var a;(a=i.subscribe)===null||a===void 0?void 0:a.call(i);let r=true;t.subscribe(f(e,(t=>{var a;(a=i.next)===null||a===void 0?void 0:a.call(i,t);e.next(t)}),(()=>{var t;r=false;(t=i.complete)===null||t===void 0?void 0:t.call(i);e.complete()}),(t=>{var a;r=false;(a=i.error)===null||a===void 0?void 0:a.call(i,t);e.error(t)}),(()=>{var t,e;if(r){(t=i.unsubscribe)===null||t===void 0?void 0:t.call(i)}(e=i.finalize)===null||e===void 0?void 0:e.call(i)})))})):m}function St(t,e,a){if(!t.hostElement.hasAttribute(e)&&a!=null){t.hostElement.setAttribute(e,String(a))}}const Ft=":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 Tt=Ft;const $t=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(a,{key:"c02988c259d20cfb381b69a43cd9800a075f9c97"},!this.noIcon&&e("cat-icon",{key:"fee7a2b021437de0c7617187e48c3e436218b50f",size:"l",icon:this.icon||this.mapIcon.get(this.color)}),e("div",{key:"4bb19866ff246d7ec956c213e39f8d09080f02da",class:"content"},e("slot",{key:"a3356a8b51747570f01c33cd77106156aed5c404"})))}get hostElement(){return i(this)}};$t.style=Tt;const Bt=t=>new Promise(((e,a)=>{const i=new Image;i.addEventListener("load",e);i.addEventListener("error",a);i.src=t}));const Et=":host{display:contents}:host([hidden]){display:none}.avatar{flex:none;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){Bt(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}render(){if(this.url){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;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 delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{src:["onSrcChanged"]}}};Nt.style=Ot;const Lt=["xs","s","m","l","xl"];const Wt={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 jt(t){return typeof t==="string"&&Lt.includes(t)}let Pt;try{Pt=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch{Pt=false}class Yt{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||Pt)&&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 Ht=new Set;let Ut;class _t{constructor(){this._platform=new Yt;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){Kt(t)}return this._matchMedia(t)}}function Kt(t){if(Ht.has(t)){return}try{if(!Ut){Ut=document.createElement("style");Ut.setAttribute("type","text/css");document.head.appendChild(Ut)}if(Ut.sheet){Ut.sheet.insertRule(`@media ${t} {body{ }}`,0);Ht.add(t)}}catch(t){z.error(t)}}const Vt=":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;flex-shrink:0}: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;gap:0.25rem}:host([data-icon-badge=xs]){width:1rem;height:1rem;padding:0}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem;gap:0.25rem}:host([data-icon-badge=s]){width:1.5rem;height:1.5rem;padding:0}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem;gap:0.25rem}:host([data-icon-badge=m]){width:2rem;height:2rem;padding:0}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem;gap:0.25rem}:host([data-icon-badge=l]){width:2.5rem;height:2.5rem;padding:0}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem;gap:0.25rem}:host([data-icon-badge=xl]){width:3rem;height:3rem;padding:0}: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 qt=Vt;const Jt=class{constructor(e){t(this,e);this._iconOnly=true;this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false;this.icon=undefined;this.iconOnly=false;this.iconRight=false}onIconOnlyChanged(t){this.mediaQueryList?.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(jt(t)){this.mediaMatcher??(this.mediaMatcher=new _t);this.mediaQueryList=this.mediaMatcher.matchMedia(Wt[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)}get isIconBadge(){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 iconSize(){switch(this.size){case"xs":case"s":return"xs";case"l":case"xl":return"l";default:return"m"}}render(){return e(a,{key:"2c10a8da896b2fe6b7637ec871386da6ee9dc132","data-icon-badge":this.isIconBadge?this.size:null},this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconBadge?e("cat-icon",{icon:this.icon,size:this.iconSize,class:"icon-only"}):e("slot",null),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null)}get hostElement(){return i(this)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Jt.style=qt;function Gt(t,e){if(e instanceof Element&&e.matches(t)){return e}const a=e instanceof ShadowRoot?e.host:e.parentElement||e.getRootNode().host;return a?Gt(t,a):null}const Zt=':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}:host([data-button-group=middle]),:host([data-button-group=last]){margin-left:-1px}.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-empty .cat-button-content{display:none}.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-button-group-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-button-group-middle{border-radius:0}.cat-button-group-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-button-group:hover{z-index:1}.cat-button-group: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 color-mix(in srgb, rgb(var(--base)) 20%, #fff);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:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:color-mix(in srgb, rgb(var(--base)) 10%, #fff)}.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;text-align:left}:host(.cat-text-right) .cat-button{justify-content:right;text-align: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 Xt=Zt;const Qt=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.hasSlottedContent=false;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(jt(t)){this.mediaMatcher??(this.mediaMatcher=new _t);this.mediaQueryList=this.mediaMatcher.matchMedia(Wt[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(){this.hasSlottedContent=this.hostElement.hasChildNodes()}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}else if(this.submit){const t=Gt("form",this.hostElement);if(t&&t instanceof HTMLFormElement){t.requestSubmit()}}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;if(this.url){return e(a,{"data-button-group":this.buttonGroupPosition},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-empty":!this.hasSlottedContent,"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),[`cat-button-group-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content))}else{return e(a,{"data-button-group":this.buttonGroupPosition},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-empty":!this.hasSlottedContent,"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-button-group-${this.buttonGroupPosition}`]: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 delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};Qt.style=Xt;const te=":host{position:relative;display:inline-flex;vertical-align:middle}";const ee=te;const ae=class{constructor(e){t(this,e);this.buttonElements=[];this.a11yLabel=undefined}render(){return e(a,{key:"2b9aeb09c4290a27751f568e596a3de21f8deeb3",role:"group","aria-label":this.a11yLabel},e("slot",{key:"5a6afa70513843b8c201a649ed0edb30fea9b7fc",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.buttonElements=Array.from(this.hostElement.querySelectorAll(':scope > cat-button, :scope > cat-tooltip > cat-button, :scope > cat-dropdown cat-button[slot="trigger"]'));this.buttonElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.buttonElements.length-1?"last":"middle"}))}get hostElement(){return i(this)}};ae.style=ee;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 re=ie;const ne=class{constructor(e){t(this,e);this.catLoad=r(this,"catLoad",7)}render(){return e("slot",{key:"4d88ab8e5cf1e13a3242b646314f034f5fa0fdfe"})}componentDidLoad(){this.catLoad.emit()}};ne.style=re;const oe=t=>{const{id:a,hint:i,slottedHint:r,errorMap:n}=t;const o=Object.entries(n||{});return e("div",{"aria-live":"polite",id:a+"-hint",class:"hint-section"},o.length?o.map((([a,i])=>e("p",{class:(t.class??"")+" input-hint cat-text-danger"},I.t(`error.${a}`,i)))):[i&&(Array.isArray(i)?i.map((a=>e("p",{class:(t.class??"")+" input-hint"},a))):e("p",{class:(t.class??"")+" input-hint"},i)),r])};const se=".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}.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-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.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))}.align-center{align-items:center}.align-end{align-items:flex-end}";const ce=se;let le=0;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._id=`cat-checkbox-${le++}`;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.alignment="top";this.nativeAttributes=undefined;this.requiredMarker="none"}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"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"ab6bd1bb1b74998b5202e57ba6b32da9dd0135c8"},e("label",{key:"5554806b29bbdea219869d043f9c41469390720d",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"}},e("input",{key:"cccc0ef488d141b6eb4859fcc58433174f7ce21b",...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:"c6c568ebc80618b4acc3e28793c1844284d4a831",class:"box","aria-hidden":"true"},e("svg",{key:"5c8c2ae933fecab8b9c826ef2493b2dec129f49c",class:"check",viewBox:"0 0 12 10"},e("polyline",{key:"4ed298a1e0377c4ca771940b7da867c5e72017af",points:"1.5 6 4.5 9 10.5 1"})),e("svg",{key:"4ca83993e600c99f4651333ce9f86c0f2b85754a",class:"dash",viewBox:"0 0 12 10"},e("polyline",{key:"32d6a98f6247ce1605baa1c0fcb66325300d0118",points:"1.5 5 10.5 5"}))),e("span",{key:"cdf8717a98a756e4ae204d08fd186cf49ea7d101",class:{label:true,"label-wrapper":!this.hasSlottedLabel},part:"label"},this.hasSlottedLabel&&e("slot",{key:"967c87e44e4bb119b46ae70edf2eb47d63177a90",name:"label"})||this.label,e("span",{key:"04a85b99e78e8db04e4080d54ff1690051ce2a50",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"caf9a8682262079edf06957ca2a2c9d14abc9130",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"d073fb49348c5561984c73bafbf7fd7e17f01ba5",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")")))),this.hasHint&&e("div",{key:"9fb0531829e03683accb07fdc675975feb709577",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"e72ad8ae3b9048ef6a58d74eb9593d511fad03c6",class:"box-placeholder"}),e(oe,{key:"b10a09f94fe13f1cc7602191c0e7b3d2066a8364",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}static get delegatesFocus(){return true}get hostElement(){return i(this)}};de.style=ce;function he(t,e="long"){const a=new Date;const i=(a.getUTCDate()-a.getUTCDay()+7)%7;const r=new Intl.DateTimeFormat(t,{weekday:e}).format;return[...Array(7).keys()].map((t=>r(new Date(a.getTime()).setUTCDate(i+t))))}function fe(t,e="long"){const a=new Intl.DateTimeFormat(t,{month:e}).format;return[...Array(12).keys()].map((t=>a(new Date(2e3,t,1))))}function ue(t){const e=new Intl.Locale(t);const a=e.getWeekInfo?.()??e.weekInfo;return{firstDay:a?.firstDay??1,minDays:a?.minDays??4,weekend:a?.weekend??[6,7]}}function pe(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 be(t){return{prevYear:I.t("datepicker.prevYear"),nextYear:I.t("datepicker.nextYear"),prevMonth:I.t("datepicker.prevMonth"),nextMonth:I.t("datepicker.nextMonth"),arrowKeys:I.t("datepicker.arrowKeys"),today:I.t("datepicker.today"),change:I.t("datepicker.change"),choose:I.t("datepicker.choose"),clear:I.t("datepicker.clear"),formatStr:pe(t),weekInfo:ue(t),days:{short:he(t,"short"),long:he(t,"long")},months:{short:fe(t,"short"),long:fe(t,"long")},now:()=>{const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())},fromLocalISO:t=>{const[e,a,i,r]=t?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];return e?new Date(Number(a),Number(i)-1,Number(r)):null},toLocalISO:t=>{const e=t.getFullYear();const a=(t.getMonth()+1).toString().padStart(2,"0");const i=t.getDate().toString().padStart(2,"0");return`${e}-${a}-${i}`},toLocalStr:e=>new Intl.DateTimeFormat(t,{year:"numeric",month:"long",day:"numeric",weekday:"long"}).format(e)}}function me(t){return t%4===0&&t%100!==0||t%400===0}function ge(t,e){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+e)}function ve(t,e){const[a,i,r]=[t.getFullYear(),t.getMonth(),t.getDate()];const n=[31,me(a)?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[(i+e%12+12)%12]));return o}function ye(t,e){return!!t&&!!e&&t.getFullYear()===e.getFullYear()}function ke(t,e){return!!t&&!!e&&t.getMonth()===e.getMonth()&&ye(t,e)}function xe(t,e){return!!t&&!!e&&t.getDate()===e.getDate()&&ke(t,e)}function we(t,e,a){return new Date(Math.min(Math.max(e.getTime(),t?.getTime()??-Infinity),a?.getTime()??Infinity))}const ze=":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 Ie=ze;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=I.getLocale();this.locale=be(this.language);this.inputFocused=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,a,i]=this.value?.match(/^(\d{4})-(\d{2})-(\d{2})/)??[];if(t){const t=new Date(Number(e),Number(a)-1,Number(i));const r=new Intl.DateTimeFormat(this.language,{year:"numeric",month:"2-digit",day:"2-digit"});return r.format(t)}return""}componentDidLoad(){const t=this.locale.formatStr.replace("YYYY","Y").replace("YY","y").replace("MM","m").replace("DD","d");const[,e,a,i,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(t)||[];this.input?.mask({date:true,dateMin:this.min,dateMax:this.max,delimiter:a,datePattern:[e,i,r]})}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"6cb5833dd0f95cf170ad74d3841eee067e315df1"},e("cat-input",{key:"a97d7b5f9ee3a6f63a648e491182b2ab9287bedf",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=>{this.inputFocused=t.target===this.input;t.stopPropagation();this.catFocus.emit(t.detail)},onCatBlur:t=>{t.stopPropagation();this.onInputBlur(t.detail)}},e("span",{key:"c7d342b0fa3b522af5d0368e590345a2524c40ee",slot:"label"},this.label,e("span",{key:"44d02ddce886497f9f93dc8bb73b943ae7317d07",class:"label-aria"}," (",this.locale.formatStr,")")),e("cat-dropdown",{key:"a4b84508af92334d93b406f767f8080ab28a831b",slot:"addon",placement:this.placement,arrowNavigation:"none",noResize:true,onCatOpen:()=>this.dateInline?.resetView()},e("cat-button",{key:"0e48c43b6bb3b34bb70c97e7ed2bae01664c3d4e",slot:"trigger",icon:"$cat:datepicker-calendar",iconOnly:true,class:"cat-date-toggle",disabled:this.disabled,a11yLabel:this.getTriggerA11yLabel()}),e("div",{key:"976f8aa393d60c1425a63198baeabf7522bc38c4",slot:"content"},e("cat-date-inline",{key:"08d8833fef723d80000c330fa58a3eb30d57d211",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||!this.inputFocused){return}this.inputFocused=false;const e=this.value;const a=this.parse(this.input.value??"");const i=this.locale.fromLocalISO(this.min);const r=this.locale.fromLocalISO(this.max);const n=a?we(i,a,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 a=t.detail?this.locale.fromLocalISO(t.detail):null;this.value=a?this.locale.toLocalISO(a):undefined;if(e!==this.value){this.catChange.emit(this.value)}}parse(t){const[,e,a,i,r]=/(\w+)([^\w]+)(\w+)[^\w]+(\w+)/.exec(this.locale.formatStr)||[];const n=[e,i,r];const o=t.split(a).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 a=this.value;const i=this.locale.fromLocalISO(a);const r=this.locale.fromLocalISO(e);if(!i||!r){return}const n=we(t==="min"?r:null,i,t==="max"?r:null);const o=this.locale.toLocalISO(n);if(a!==o){this.value=o;this.catChange.emit(o)}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};De.style=Ie;
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
@@ -6,5 +6,5 @@ import{r as t,h as e,H as a,g as i,c as r}from"./p-c3a9aef7.js";import{e as n,O
6
6
  /*!
7
7
  * focus-trap 7.5.4
8
8
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
9
- */function Zr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function Xr(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?Zr(Object(a),!0).forEach((function(e){Qr(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Zr(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function Qr(t,e,a){e=en(e);if(e in t){Object.defineProperty(t,e,{value:a,enumerable:true,configurable:true,writable:true})}else{t[e]=a}return t}function tn(t,e){if(typeof t!=="object"||t===null)return t;var a=t[Symbol.toPrimitive];if(a!==undefined){var i=a.call(t,e||"default");if(typeof i!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function en(t){var e=tn(t,"string");return typeof e==="symbol"?e:String(e)}var an={activateTrap:function t(e,a){if(e.length>0){var i=e[e.length-1];if(i!==a){i.pause()}}var r=e.indexOf(a);if(r===-1){e.push(a)}else{e.splice(r,1);e.push(a)}},deactivateTrap:function t(e,a){var i=e.indexOf(a);if(i!==-1){e.splice(i,1)}if(e.length>0){e[e.length-1].unpause()}}};var rn=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var nn=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 on=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 sn=function t(e){return on(e)&&!e.shiftKey};var cn=function t(e){return on(e)&&e.shiftKey};var ln=function t(e){return setTimeout(e,0)};var dn=function t(e,a){var i=-1;e.every((function(t,e){if(a(t)){i=e;return false}return true}));return i};var hn=function t(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++){i[r-1]=arguments[r]}return typeof e==="function"?e.apply(void 0,i):e};var fn=function t(e){return e.target.shadowRoot&&typeof e.composedPath==="function"?e.composedPath()[0]:e.target};var un=[];var pn=function t(e,a){var i=(a===null||a===void 0?void 0:a.document)||document;var r=(a===null||a===void 0?void 0:a.trapStack)||un;var n=Xr({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,isKeyForward:sn,isKeyBackward:cn},a);var o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,delayInitialFocusTimer:undefined,recentNavEvent:undefined};var s;var c=function t(e,a,i){return e&&e[a]!==undefined?e[a]:n[i||a]};var l=function t(e,a){var i=typeof(a===null||a===void 0?void 0:a.composedPath)==="function"?a.composedPath():undefined;return o.containerGroups.findIndex((function(t){var a=t.container,r=t.tabbableNodes;return a.contains(e)||(i===null||i===void 0?void 0:i.includes(a))||r.find((function(t){return t===e}))}))};var d=function t(e){var a=n[e];if(typeof a==="function"){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++){o[s-1]=arguments[s]}a=a.apply(void 0,o)}if(a===true){a=undefined}if(!a){if(a===undefined||a===false){return a}throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=a;if(typeof a==="string"){c=i.querySelector(a);if(!c){throw new Error("`".concat(e,"` as selector refers to no known node"))}}return c};var h=function t(){var e=d("initialFocus");if(e===false){return false}if(e===undefined||!ra(e,n.tabbableOptions)){if(l(i.activeElement)>=0){e=i.activeElement}else{var a=o.tabbableGroups[0];var r=a&&a.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=ta(t,n.tabbableOptions);var a=ea(t,n.tabbableOptions);var i=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=a.find((function(t){return aa(t)}));var s=a.slice().reverse().find((function(t){return aa(t)}));var c=!!e.find((function(t){return Oe(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:a,posTabIndexesFound:c,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function t(i){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(i);if(n<0){if(r){return a.slice(a.indexOf(i)+1).find((function(t){return aa(t)}))}return a.slice(0,a.indexOf(i)).reverse().find((function(t){return aa(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 a=e.activeElement;if(!a){return}if(a.shadowRoot&&a.shadowRoot.activeElement!==null){return t(a.shadowRoot)}return a};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(rn(e)){e.select()}};var b=function t(e){var a=d("setReturnFocus",e);return a?a:a===false?false:e};var m=function t(e){var a=e.target,i=e.event,r=e.isBackward,s=r===void 0?false:r;a=a||fn(i);f();var c=null;if(o.tabbableGroups.length>0){var h=l(a,i);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=dn(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return a===e}));if(p<0&&(u.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!u.nextTabbableNode(a,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=Oe(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!on(i)){c=u.nextTabbableNode(a,false)}}else{var g=dn(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return a===e}));if(g<0&&(u.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!u.nextTabbableNode(a))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=Oe(a)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!on(i)){c=u.nextTabbableNode(a)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var a=fn(e);if(l(a,e)>=0){return}if(hn(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(hn(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var a=fn(e);var i=l(a,e)>=0;if(i||a instanceof Document){if(i){o.mostRecentlyFocusedNode=a}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(Oe(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<d.length){r=d[f+1];s=false}}else{if(f-1>=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return Oe(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 a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var i=m({event:e,isBackward:a});if(i){if(on(e)){e.preventDefault()}p(i)}};var k=function t(e){if(nn(e)&&hn(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 a=fn(e);if(l(a,e)>=0){return}if(hn(n.clickOutsideDeactivates,e)){return}if(hn(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}an.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?ln((function(){p(h())})):p(h());i.addEventListener("focusin",v,true);i.addEventListener("mousedown",g,{capture:true,passive:false});i.addEventListener("touchstart",g,{capture:true,passive:false});i.addEventListener("click",x,{capture:true,passive:false});i.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}i.removeEventListener("focusin",v,true);i.removeEventListener("mousedown",g,true);i.removeEventListener("touchstart",g,true);i.removeEventListener("click",x,true);i.removeEventListener("keydown",k,true);return s};var I=function t(e){var a=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(a){p(h())}};var D=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(I):undefined;var M=function t(){if(!D){return}D.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){D.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 a=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=i.activeElement;a===null||a===void 0||a();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 a=Xr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();an.deactivateTrap(r,s);var i=c(a,"onDeactivate");var l=c(a,"onPostDeactivate");var d=c(a,"checkCanReturnFocus");var h=c(a,"returnFocus","returnFocusOnDeactivate");i===null||i===void 0||i();var f=function t(){ln((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 a=c(e,"onPause");var i=c(e,"onPostPause");o.paused=true;a===null||a===void 0||a();z();M();i===null||i===void 0||i();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var a=c(e,"onUnpause");var i=c(e,"onPostUnpause");o.paused=false;a===null||a===void 0||a();f();w();M();i===null||i===void 0||i();return this},updateContainerElements:function t(e){var a=[].concat(e).filter(Boolean);o.containers=a.map((function(t){return typeof t==="string"?i.querySelector(t):t}));if(o.active){f()}M();return this}};s.updateContainerElements(e);return s};const bn=":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 mn=bn;let gn=0;const vn=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=gn++;this.isOpen=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false;this.noReturnFocus=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):pn(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.noReturnFocus?false: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.trap?.deactivate();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.catClose.emit()}),Gr)}render(){return e(a,{key:"3ead90dae1ac492a0cb592d7cf7a50fd42f26ca7"},e("slot",{key:"b91bba7772b2a90850be2ac85b82ec7691ae031d",name:"anchor",ref:t=>this.anchorSlot=t}),e("slot",{key:"f7e07ffed988133cbccafb8f8c73fdb52757d9fb",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"868a0578cd30cac249959e0961b0425e56048af9",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"19fb6b5b92599ed1ae21aac591271957a6e7b060",name:"content"})))}componentDidLoad(){this.initAnchor()}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();const t=this.trigger.getAttribute("aria-haspopup");this.trigger.setAttribute("aria-haspopup",t??"true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));if(!this.anchor){Lr(this.trigger,this.content,(()=>this.update(this.trigger)))}}initAnchor(){this.anchor=(this.anchorSlot?.assignedElements?.()||[])[0];if(this.anchor){Lr(this.anchor,this.content,(()=>this.update(this.anchor)))}}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const a=e.shift();t=a?.hasAttribute("data-trigger")?a:a?.querySelector("[data-trigger]")??undefined}if(!t){t=na(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(t){if(t){const e=this.noResize?[]:[Yr({padding:vn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:a}){Object.assign(a.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Hr(t,this.content,{strategy:"fixed",placement:this.placement,middleware:[Wr(vn.OFFSET),Pr(),...e]}).then((({x:t,y:e,placement:a})=>{this.content.dataset.placement=a;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};vn.OFFSET=4;vn.style=mn;const yn=":host{display:block}";const kn=yn;const xn=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(a,{key:"c9fe233663c9967b3e78334e6994ceb62653c19c",style:{"--label-size":this.labelSize}},e("slot",{key:"49274e5e31644d6f7d042033e975d8b91d6aaea6",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 a=t.length-e;return a>=e?"optional":"required"}get hostElement(){return i(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};xn.style=kn;const wn=":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 zn=wn;const In=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"1e1698413feaee8ca810b50370fc44a5a9f229dc",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"}})}};In.style=zn;var Dn=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var Mn=function(t,e,a,i,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=a>=0?a:2;d.numeralThousandsGroupStyle=i||Mn.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"):""};Mn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};Mn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,a,i,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")}i=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=i+e.prefix}else{r=e.prefix+i}}else{r=i}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){a=t.split(e.numeralDecimalMark);n=a[0];o=e.numeralDecimalMark+a[1].slice(0,e.numeralDecimalScale)}if(i==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case Mn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case Mn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case Mn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return i+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var Cn=Mn;var Rn=function(t,e,a){var i=this;i.date=[];i.blocks=[];i.datePattern=t;i.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMin.length===2)i.dateMin.unshift(0);i.dateMax=a.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMax.length===2)i.dateMax.unshift(0);i.initBlocks()};Rn.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,a="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(i,r){if(t.length>0){var n=t.slice(0,i),o=n.slice(0,1),s=t.slice(i);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}a+=n;t=s}}));return this.getFixedDateString(a)},getFixedDateString:function(t){var e=this,a=e.datePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&a[0].toLowerCase()!=="y"&&a[1].toLowerCase()!=="y"){s=a[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);i=this.getFixedDate(d,h,0)}if(t.length===8){a.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;i=this.getFixedDate(d,h,f)}if(t.length===4&&(a[0]==="y"||a[1]==="y")){c=a[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;i=[0,h,f]}if(t.length===6&&(a[0]==="Y"||a[1]==="Y")){c=a[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;i=[0,h,f]}i=e.getRangeFixedDate(i);e.date=i;var p=i.length===0?t:a.reduce((function(t,a){switch(a){case"d":return t+(i[0]===0?"":e.addLeadingZero(i[0]));case"m":return t+(i[1]===0?"":e.addLeadingZero(i[1]));case"y":return t+(u?e.addLeadingZeroForYear(i[2],false):"");case"Y":return t+(u?e.addLeadingZeroForYear(i[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,a=e.datePattern,i=e.dateMin||[],r=e.dateMax||[];if(!t.length||i.length<3&&r.length<3)return t;if(a.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]<t[2]||r[2]===t[2]&&(r[1]<t[1]||r[1]===t[1]&&r[0]<t[0])))return r;if(i.length&&(i[2]>t[2]||i[2]===t[2]&&(i[1]>t[1]||i[1]===t[1]&&i[0]>t[0])))return i;return t},getFixedDate:function(t,e,a){t=Math.min(t,31);e=Math.min(e,12);a=parseInt(a||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(a)?29:28:30)}return[t,e,a]},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 An=Rn;var Sn=function(t,e){var a=this;a.time=[];a.blocks=[];a.timePattern=t;a.timeFormat=e;a.initBlocks()};Sn.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,a="";t=t.replace(/[^\d]/g,"");var i=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)>i.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxHours){o=i.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>i.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxMinutes){o=i.maxMinutes+""}break}a+=o;t=c}}));return this.getFixedTimeString(a)},getFixedTimeString:function(t){var e=this,a=e.timePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;if(t.length===6){a.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);i=this.getFixedTime(f,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){a.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);i=this.getFixedTime(f,h,d)}e.time=i;return i.length===0?t:a.reduce((function(t,a){switch(a){case"s":return t+e.addLeadingZero(i[2]);case"m":return t+e.addLeadingZero(i[1]);case"h":return t+e.addLeadingZero(i[0])}}),"")},getFixedTime:function(t,e,a){a=Math.min(parseInt(a||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,a]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var Fn=Sn;var Tn=function(t,e){var a=this;a.delimiter=e||e===""?e:" ";a.delimiterRE=e?new RegExp("\\"+e,"g"):"";a.formatter=t};Tn.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 a="",i,r=false;for(var n=0,o=t.length;n<o;n++){i=e.formatter.inputDigit(t.charAt(n));if(/[\s()-]/g.test(i)){a=i;r=true}else{if(!r){a=i}}}a=a.replace(/[()]/g,"");a=a.replace(/[\s-]/g,e.delimiter);return a}};var $n=Tn;var Bn={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(t){var e=t.reduce((function(t,e){return t+e}),0);return t.concat(19-e)},getInfo:function(t,e){var a=Bn.blocks,i=Bn.re;e=!!e;for(var r in i){if(i[r].test(t)){var n=a[r];return{type:r,blocks:e?this.getStrictBlocks(n):n}}}return{type:"unknown",blocks:e?this.getStrictBlocks(a.general):a.general}}};var En=Bn;var On={noop:function(){},strip:function(t,e){return t.replace(e,"")},getPostDelimiter:function(t,e,a){if(a.length===0){return t.slice(-e.length)===e?e:""}var i="";a.forEach((function(e){if(t.slice(-e.length)===e){i=e}}));return i},getDelimiterREByDelimiter:function(t){return new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(t,e,a,i,r){if(e.length===t){return a.length}return t+this.getPositionOffset(t,e,a,i,r)},getPositionOffset:function(t,e,a,i,r){var n,o,s;n=this.stripDelimiters(e.slice(0,t),i,r);o=this.stripDelimiters(a.slice(0,t),i,r);s=n.length-o.length;return s!==0?s/Math.abs(s):0},stripDelimiters:function(t,e,a){var i=this;if(a.length===0){var r=e?i.getDelimiterREByDelimiter(e):"";return t.replace(r,"")}a.forEach((function(e){e.split("").forEach((function(e){t=t.replace(i.getDelimiterREByDelimiter(e),"")}))}));return t},headStr:function(t,e){return t.slice(0,e)},getMaxLength:function(t){return t.reduce((function(t,e){return t+e}),0)},getPrefixStrippedValue:function(t,e,a,i,r,n,o,s,c){if(a===0){return t}if(t===e&&t!==""){return""}if(c&&t.slice(0,1)=="-"){var l=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(t.slice(1),e,a,l,r,n,o,s,c)}if(i.slice(0,a)!==e&&!s){if(o&&!i&&t)return t;return""}else if(i.slice(-a)!==e&&s){if(o&&!i&&t)return t;return""}var d=this.stripDelimiters(i,r,n);if(t.slice(0,a)!==e&&!s){return d.slice(a)}else if(t.slice(-a)!==e&&s){return d.slice(0,-a-1)}return s?t.slice(0,-a):t.slice(a)},getFirstDiffIndex:function(t,e){var a=0;while(t.charAt(a)===e.charAt(a)){if(t.charAt(a++)===""){return-1}}return a},getFormattedValue:function(t,e,a,i,r,n){var o="",s=r.length>0,c="";if(a===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=i}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l<a-1){o+=c}}t=h}}));return o},fixPrefixCursor:function(t,e,a,i){if(!t){return}var r=t.value,n=a||(i[0]||" ");if(!t.setSelectionRange||!e||e.length+n.length<=r.length){return}var o=r.length*2;setTimeout((function(){t.setSelectionRange(o,o)}),1)},checkFullSelection:function(t){try{var e=window.getSelection()||document.getSelection()||{};return e.toString().length===t.length}catch(t){}return false},setSelection:function(t,e,a){if(t!==this.getActiveElement(a)){return}if(t&&t.value.length<=e){return}if(t.createTextRange){var i=t.createTextRange();i.move("character",e);i.select()}else{try{t.setSelectionRange(e,e)}catch(t){console.warn("The input element type does not support selection")}}},getActiveElement:function(t){var e=t.activeElement;if(e&&e.shadowRoot){return this.getActiveElement(e.shadowRoot)}return e},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(t,e){if(!this.isAndroid()||!t||!e){return false}return e===t.slice(0,-1)}};var Nn=On;var Ln={assign:function(t,e){t=t||{};e=e||{};t.creditCard=!!e.creditCard;t.creditCardStrictMode=!!e.creditCardStrictMode;t.creditCardType="";t.onCreditCardTypeChanged=e.onCreditCardTypeChanged||function(){};t.phone=!!e.phone;t.phoneRegionCode=e.phoneRegionCode||"AU";t.phoneFormatter={};t.time=!!e.time;t.timePattern=e.timePattern||["h","m","s"];t.timeFormat=e.timeFormat||"24";t.timeFormatter={};t.date=!!e.date;t.datePattern=e.datePattern||["d","m","Y"];t.dateMin=e.dateMin||"";t.dateMax=e.dateMax||"";t.dateFormatter={};t.numeral=!!e.numeral;t.numeralIntegerScale=e.numeralIntegerScale>0?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 Dn==="object"&&Dn?Dn:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var Wn=Ln;var jn=function(t,e){var a=this;var i=false;if(typeof t==="string"){a.element=document.querySelector(t);i=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){a.element=t[0];i=t.length>1}else{a.element=t}}if(!a.element){throw new Error("[cleave.js] Please check the element")}if(i){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=a.element.value;a.properties=jn.DefaultProperties.assign({},e);a.init()};jn.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=jn.Util.getMaxLength(e.blocks);t.isAndroid=jn.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 a=t.element.cloneNode(true);t.element.parentNode.insertBefore(a,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=a;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new jn.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 jn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=jn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new jn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=jn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new jn.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,a=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=a===8},onChange:function(t){var e=this,a=e.properties,i=jn.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=i.getPostDelimiter(e.lastInputValue,a.delimiter,a.delimiters);if(e.isBackward&&r){a.postDelimiterBackspace=r}else{a.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)}jn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!jn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!jn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,a=e.properties,i=jn.Util,r=e.element.value,n="";if(!a.copyDelimiter){n=i.stripDelimiters(r,a.delimiter,a.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,a=e.properties,i=jn.Util;var r=i.getPostDelimiter(t,a.delimiter,a.delimiters);if(!a.numeral&&a.postDelimiterBackspace&&!r){t=i.headStr(t,t.length-a.postDelimiterBackspace.length)}if(a.phone){if(a.prefix&&(!a.noImmediatePrefix||t.length)){a.result=a.prefix+a.phoneFormatter.format(t).slice(a.prefix.length)}else{a.result=a.phoneFormatter.format(t)}e.updateValueState();return}if(a.numeral){if(a.prefix&&a.noImmediatePrefix&&t.length===0){a.result=""}else{a.result=a.numeralFormatter.format(t)}e.updateValueState();return}if(a.date){t=a.dateFormatter.getValidatedDate(t)}if(a.time){t=a.timeFormatter.getValidatedTime(t)}t=i.stripDelimiters(t,a.delimiter,a.delimiters);t=i.getPrefixStrippedValue(t,a.prefix,a.prefixLength,a.result,a.delimiter,a.delimiters,a.noImmediatePrefix,a.tailPrefix,a.signBeforePrefix);t=a.numericOnly?i.strip(t,/[^\d]/g):t;t=a.uppercase?t.toUpperCase():t;t=a.lowercase?t.toLowerCase():t;if(a.prefix){if(a.tailPrefix){t=t+a.prefix}else{t=a.prefix+t}if(a.blocksLength===0){a.result=t;e.updateValueState();return}}if(a.creditCard){e.updateCreditCardPropsByValue(t)}t=i.headStr(t,a.maxLength);a.result=i.getFormattedValue(t,a.blocks,a.blocksLength,a.delimiter,a.delimiters,a.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,a=e.properties,i=jn.Util,r;if(i.headStr(a.result,4)===i.headStr(t,4)){return}r=jn.CreditCardDetector.getInfo(t,a.creditCardStrictMode);a.blocks=r.blocks;a.blocksLength=a.blocks.length;a.maxLength=i.getMaxLength(a.blocks);if(a.creditCardType!==r.type){a.creditCardType=r.type;a.onCreditCardTypeChanged.call(e,a.creditCardType)}},updateValueState:function(){var t=this,e=jn.Util,a=t.properties;if(!t.element){return}var i=t.element.selectionEnd;var r=t.element.value;var n=a.result;i=e.getNextCursorPosition(i,r,n,a.delimiter,a.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,i,a.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(a.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,i,a.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,a=e.properties;a.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,a=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(a.numeral){t=t.replace(".",a.numeralDecimalMark)}a.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,a=jn.Util,i=t.element.value;if(e.rawValueTrimPrefix){i=a.getPrefixStrippedValue(i,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){i=e.numeralFormatter.getRawValue(i)}else{i=a.stripDelimiters(i,e.delimiter,e.delimiters)}return i},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]"}};jn.NumeralFormatter=Cn;jn.DateFormatter=An;jn.TimeFormatter=Fn;jn.PhoneFormatter=$n;jn.CreditCardDetector=En;jn.Util=Nn;jn.DefaultProperties=Wn;(typeof Dn==="object"&&Dn?Dn:window)["Cleave"]=jn;var Pn=jn;function Yn(t){return t!=null&&`${t}`!=="false"}function Hn(t,e=0){return Un(t)?Number(t):e}function Un(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const _n=".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-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;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.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-loading,.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 Kn=_n;let Vn=0;const qn=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-${Vn++}`;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.loading=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}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}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 Pn(this.input,t)}onErrorsChanged(t,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("div",{key:"ffbaf104a60dbf73cb59e07e3164fe0c421540a5",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"e6139d1d950c2d8c2674bb90f0acbe9333ace2eb",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"fce898969b37f4579f780c1a62354ccb0da5a73e",htmlFor:this.id,part:"label"},e("span",{key:"8a4d0f653bae9a75db600080ad7d0b9199c14db5",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"6073eadb00b587d1f3ba22d212e5235d21826b08",name:"label"})||this.label,e("div",{key:"fc4be508caec71287f275873d49adb5c16931289",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"c1010a473d4bfadb8ada56825db91f0c4d2b7871",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"8b2184a224afa6857f207aeaf71d83e12c92ef9a",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),this.maxLength&&e("div",{key:"6aee4428a06faba6ecf6a82963f0ecf3ca0d5d7b",class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"9c88a62af0c4083162bea13dc1fd5ead5708efbb",class:"input-container"},e("div",{key:"556a7b1bc45da66739d8a7afec3d4e1b64f12e77",class:"input-outer-wrapper"},e("div",{key:"16d000652a934588fa87c71929565aa5cc15069b",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",{key:"de3b5da6a0a09c1f66caeb2fb3c9772a2426778a",class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{key:"f950a57fa6060b9f82629d26b91dcb449b86cd2a",icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"b98cd1a805712c454262bfa8fae92f1e92b33f09",class:"input-inner-wrapper"},e("input",{key:"9bd8bc8f345c80ced98a06728d9d09bc462e0823",...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",{key:"255d4760d151bfb36f0217295ee378b5cec26647",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{key:"d5e62dccaaa64370723d4721d567789b06c94b11",class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":I.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),this.loading&&e("cat-spinner",{key:"22218dd7cd48b2599d2125ec080467c925b04a4d",size:"m",class:"icon-loading"}),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{key:"c9e5f18bfc54321ad9b18df56a199d0096739621",icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{key:"307c0d5f2a1dff6efb7d6bf05a035c487f947994",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{key:"3216d4e278951898d9a96ad48b2df7c17d54c6a3",class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"d996aab9325a2eb77401490c3fa2a9e8eaf0ffc6",name:"addon"})),this.hasHint&&e(oe,{key:"84980cbf543e9405c70d481bce339cd9c743da43",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 this.errorMap===true||!!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(Yn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Hn(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}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};qn.style=Kn;const Jn=":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 Gn=Jn;const Zn=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(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("nav",{key:"ed5098e1578e2157e0f5b8c539f313e2892c5f05",role:"navigation"},e("ol",{key:"6f63a5c0a79722913dafbf1b6391ab586a20695a",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"0dd989fa017490749141ab2029546b115a34ce27"},e("cat-button",{key:"8614e9e1ebfc2ff3aeda2cec8be07aeff6e592eb",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:I.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"b864788a70e125ae93a34e705522e537b359a12a"},e("cat-button",{key:"93f6d89967b6f6b93b733fbcb628cf4a3663dbf0",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:I.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 a=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const i=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=i?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,a);if(!e&&!i){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,a){const i=this.clamp(e,0,this.pageCount);const r=this.clamp(a,0,this.pageCount);Array(r-i).fill(0).forEach(((e,a)=>t.add(i+a)))}clamp(t,e,a){return Math.min(Math.max(t,e),a)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,a)=>[a>0&&this.pages[a-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:I.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}static get delegatesFocus(){return true}get hostElement(){return i(this)}};Zn.style=Gn;const Xn=".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))}.align-center .radio{align-self:center}.align-end .radio{align-self:flex-end}";const Qn=Xn;let to=0;const eo=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-${++to}`;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.alignment="top";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"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"875be66c1a340d478bb55b15822415df919591ad"},e("label",{key:"dc4577b45f79f373d621b83a83c09d214cd01251",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"5c9bc1aa0f3746f29a4dbf219e241b6c1779a5c7",class:"radio"},e("input",{key:"bb633c685be46657acae7a7376069b7a95de7401",...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:"d6863f415ce0999c31276e8dc6e05b3ed7298193",class:"circle"})),e("span",{key:"c82183168cd245b781f2a4273c38ef20247d10c1",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"d5a556eff95f4471371c6162a0b101c1fb82e0cc",name:"label"})||this.label)),this.hasHint&&e("div",{key:"a236fefd50ea65e63643e5747a72a1f0b0dfbbb2",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"77ae0d9af2ff86becdb0b3a487c37689fe63af66",class:"circle-placeholder"}),e(oe,{key:"5e90f290fe70136ee19fe287db749abc8e7ec024",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)}static get delegatesFocus(){return true}get hostElement(){return i(this)}};eo.style=Qn;const ao=":host{display:block}:host([hidden]){display:none}";const io=ao;const ro=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 a=document.activeElement;const i=this.catRadioGroup.findIndex((t=>t===a));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=i<0?0:(i+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:"af9aff52c285bb32986d27c4f062f7ca8dbe394e",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"e4542e17427cdd2d31e38276afe5d240f5b9e6cf"}))}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 i(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};ro.style=io;const no=":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 oo=no;const so=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(Ct(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(so.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Ct(this.destroyed)).subscribe((({top:t,left:e,right:a,bottom:i})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",a);this.toggleClass("cat-scrollable-bottom",i)}))}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:"d2c0966e736fe4da66b4ff4c17ce51b914bc4b8d",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{key:"a0b25b995b5f75d1c09d4dc982ceebe9a8c904b8",class:"shadow-top"}),!this.noShadowX&&e("div",{key:"02e550e37511bff64e9c8c2bd09c41858fdd3930",class:"shadow-left"}),!this.noShadowX&&e("div",{key:"debb835bfcf815837e14b1378190e90a243a1af5",class:"shadow-right"}),!this.noShadowY&&e("div",{key:"d646f92372ab80246f0164c672812854d6c1c946",class:"shadow-bottom"})),e("div",{key:"e24d26d9c11070b8b0d5a66da3bcaeb12bf3532c",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"6923a1a06201e1997c80af316d57d0654312dca4"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(so.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Ct(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)}}};so.THROTTLE=50;so.style=oo;var co="__autosizeInputGhost";var lo={" ":"nbsp","<":"lt",">":"gt"};function ho(t){return"&"+lo[t]+";"}function fo(t){return t.replace(/\s|<|>/g,ho)}function uo(){var t=document.createElement("div");t.id=co;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 po=function(t,e){var a=window.getComputedStyle(t);var i="box-sizing:"+a.boxSizing+";border-left:"+a.borderLeftWidth+" solid red"+";border-right:"+a.borderRightWidth+" solid red"+";font-family:"+a.fontFamily+";font-feature-settings:"+a.fontFeatureSettings+";font-kerning:"+a.fontKerning+";font-size:"+a.fontSize+";font-stretch:"+a.fontStretch+";font-style:"+a.fontStyle+";font-variant:"+a.fontVariant+";font-variant-caps:"+a.fontVariantCaps+";font-variant-ligatures:"+a.fontVariantLigatures+";font-variant-numeric:"+a.fontVariantNumeric+";font-weight:"+a.fontWeight+";letter-spacing:"+a.letterSpacing+";margin-left:"+a.marginLeft+";margin-right:"+a.marginRight+";padding-left:"+a.paddingLeft+";padding-right:"+a.paddingRight+";text-indent:"+a.textIndent+";text-transform:"+a.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var a=document.getElementById(co)||uo();a.style.cssText+=i;a.innerHTML=fo(e);var r=window.getComputedStyle(a).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(co);if(e){e.parentNode.removeChild(e)}}};const bo=".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-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 mo=bo;const go={term:"",isOpen:false,isLoading:false,isFirstLoading:true,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let vo=0;let yo=0;const ko=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-${vo++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=go;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,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}onStateChanged(t,e){const a=a=>t[a]!==e[a];if(a("isOpen")){this.update()}if(a("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(a("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const a=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=a}else{t=a.length?a[0]:""}}else{const e=a.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const i=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:i}}else{t={id:e.length?e[0]:"",tag:i.length?i[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){po(this.input,{minWidth:true})}if(this.trigger&&this.dropdown){Lr(this.trigger,this.dropdown,(()=>this.update()))}}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}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(Yn(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):C(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),It((t=>t+1),0),Dt(0)))),Mt((a=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(a,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements,isFirstLoading:false}))),Rt((t=>!t.last),true),It(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!a.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}a.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:a})}))}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"1ecf402adc273d133bfe829aea9fc28c6f63bc79"},e("div",{key:"5c209d893e31472fabda8dc0aab1294693ba4b0b",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"51755c54effe1bd8216e656bc95f6bf57814219a",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"e4835aa21b0bde58f40e9130122826e6ade1e739",htmlFor:`select-${this.id}-input`,part:"label"},e("span",{key:"8bdbd5c021b0c4fd864cc7b8d84e0230707cd016",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"6e7ad3025b1cee315cf10c85e907cca128ec3922",name:"label"})||this.label,e("div",{key:"1536c12184aec8b8825d24a0635bb08baa976b6d",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"f90e3b62becfab3e586718ef201f9596e78c820b",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"db0bfd7582529e57fb18266f5014a73c92584c84",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"ce84b362fe92abcd2e65388b457a5ed25def1e3e",class:"select-container"},e("div",{key:"1a0d2031a1f71d77b371e96d27ad608da1f3d1a4",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:"5b92f786919140fe0f4329a3b846e24007b980e7",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,a)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===a},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${a}`},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:I.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:"61d9e8ae5063a517ca57dc796273284ae15cad31",...this.nativeAttributes,part:"input",id:`select-${this.id}-input`,class:"select-input",role:"combobox",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,"aria-autocomplete":"list",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",{key:"e4d0a6073a1af4480c116bd1525c56716976da24"}),this.invalid&&e("cat-icon",{key:"bb894fea7607b7b6b3dc950dde171faac3627a07",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:I.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{key:"6179bb7c28759db151265a35be142e1e89749d61",iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?I.t("select.close"):I.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(oe,{key:"5d449c11b58c01c1f6760448bc46474d8bb889cb",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"e50a9fa50cc46fc444fd3ec1b52c409fcfb0278f",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{key:"dd07d6ef4fbd6352b88cb2d15802a4b382c3409f",class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{key:"bac0e34fa3603ed07a3f9cc2d9346349c2b31201",class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isFirstLoading?Array.from(Array(ko.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:I.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,a)=>{const i=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(i){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${a}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===a},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!i?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===a},onFocus:()=>this.input?.focus(),onClick:()=>i?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 a;if(this.tags){a=this.initTags()}const i=e.length?t.resolve(e).pipe(zt()):C([]);i.pipe(dt((()=>C([])))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags){a.filter((t=>!this.isTagSelected(t,i))).forEach(((t,e)=>{const a={id:`select-${this.id}-tag-${e}`,name:t};i.push({item:a,render:{label:a.name}})}))}const r=!this.multiple&&i.length?i[0].render.label:"";this.patchState({isResolving:false,selection:i,term:r,activeOptionIndex:-1});this.term$.next(r);this.input&&(this.input.value=r)}))}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,isFirstLoading:true,options:[]});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.patchState({term:t.render.label,activeOptionIndex:-1,activeSelectionIndex:-1})}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=go}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.required&&!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Hr(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Wr(ko.DROPDOWN_OFFSET),Pr()]}).then((({x:t,y:e,placement:a})=>{if(this.dropdown){this.dropdown.dataset.placement=a;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.activeSelectionIndex<this.state.selection.length-1){t=Math.min(this.state.activeSelectionIndex+1,this.state.selection.length-1)}else if(!this.state.term){t=0}this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}}if(e){t.preventDefault();t.stopPropagation()}}get tagTextHelp(){return this.tagHint&&!this.isTagSelected(this.state.term)?" ("+this.tagHint+")":""}isTagSelected(t,e=this.state.selection){return e.findIndex((e=>e.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const a=e?.tags;const i={id:`select-${this.id}-tag-${a?.length?a?.length+yo++:0}`,name:t};this.select({item:i,render:{label:i.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=Hn(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()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};ko.SKELETON_COUNT=4;ko.DROPDOWN_OFFSET=4;ko.style=mo;const xo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+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=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+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=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+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(a,{key:"0427cd222f128124aa5b7304ecc56f98f82ad601",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"20731907f24cecd4f79bc2b8fb55bf4ca2a8781d",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:"b4284b5fa7bd3c80c49900cc901a67ce87b02fba",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"1ae920c166bcffb8c417887ab01830bc9704d82b",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"6928bbfea0b54d3a2d82bdc16de71208934cd4ab",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"ffa816a1e6f4e5e170aeed4c64f75aefb928e800",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:"a392acd00395251efe86deb5f95de439cb2e2947",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:"abe4098459cb27c12ecccd500080ed4b183d4221",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:"59e0e9df2329e1ee7f96a071462a58e7aac8c057",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"bfed29db8e502f705877dd79ad9f584569639a22",overflow:true},e("cat-button",{key:"fda80f359585e24f3fa9cff4567b4c6d0681cc9d",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"180ed85afb561a07ff346bd481503d57c336fbe6",slot:"content",style:{width:"400px"}},e("cat-select",{key:"12efa7508dfcb72cb897a160353958ef2c66a7a0",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=>C(t.map((t=>wo.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const a=wo.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const i=a.slice(e*10,e*10+10);return C({last:i.length<10,totalElements:a.length,content:i}).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 wo=[{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 zo=':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 Io=zo;const Do=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(a,{key:"95992890ce7b8c90068af979179fe6e512cd599c"},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)}};Do.style=Io;const Mo=":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 Co=Mo;const Ro=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined;this.value=0}render(){return e("span",{key:"8922d0ec7f5474084a39a8b3a4620bee426cea78",role:"progressbar",tabindex:"-1","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true","aria-valuenow":this.value,"aria-valuemin":"0","aria-valuemax":"100",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"6a649c21b27b3dbad3c73a71936566e7e9648254",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"3fb75a339ec6e18d0209e9da2cbf650f2dae4420",cx:"24",cy:"24",r:"21.5"})))}};Ro.style=Co;const Ao=":host{display:block}:host([hidden]){display:none}";const So=Ao;let Fo=0;const To=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.noActive=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(a,{key:"0db9a9f8449cb69691552450d653d86251a17954"})}get hostElement(){return i(this)}};To.style=So;const $o=':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=$o;const Eo=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 a=Array.from(e??[]).filter((t=>!t.disabled));const i=this.hostElement.shadowRoot?.activeElement;const r=i?a.indexOf(i):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+a.length)%a.length;a[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(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"057726c753ef2e4d5557736488fbffb92774f26f"},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)&&!t.noActive))[0]?.id}canActivate(t){return!!t&&!t.deactivated&&!t.url&&t.id!==this.activeTab}click(t){if(this.canActivate(t)){t.click();if(!t.noActive){this.activate(t)}}}activate(t){if(this.canActivate(t)){this.activeTab=t.id}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};Eo.style=Bo;const Oo=".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-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}.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}:host{display:flex;flex-direction:column;gap:0.5rem}input{font:inherit;margin:0;min-width:20rem;padding:0.375rem 0;flex:1 1 auto;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::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}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.25rem;padding:0.25rem 0.75rem;min-height:2rem;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);flex-wrap:wrap;}.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}.tag-pill{display: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}.tag-pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0}.tag-pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.icon-suffix{align-self:center}.input-inner-wrapper{flex:1 1 auto;display:flex}";const No=Oo;let Lo=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-input-${Lo++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.tags=[];this.errorMap=undefined;this.requiredMarker="optional";this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.nativeAttributes=undefined;this.value=undefined;this.clearable=false;this.errors=undefined;this.errorUpdate=0;this.tagCreationChars=[" "];this.addOnBlur=false}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["Enter",...this.tagCreationChars].includes(t.key)&&e){t.preventDefault();this.addInputValue()}else if(["Backspace"].includes(t.key)&&this.input?.selectionStart===0&&(this.value?.length??0)>0&&e){this.value=this.value?.slice(0,-1)??[];this.catChange.emit(this.value)}}onErrorsChanged(t,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"c30f59f0da021ea37a9b94904da318ff28d9d699"},e("div",{key:"6f837dcf33c6b726d4d9755b384815552f4b597f",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"78f5ce85bda81da097187483121d23f9779f96c9",htmlFor:`tags-${this.id}-input`,part:"label"},e("span",{key:"dae093aaa4cc7bb26ff015bf389361fda1fd6d5c",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"9eef396375eaff2e21613a79640bd1692a0a7fe8",name:"label"})||this.label,e("div",{key:"6045ab7f98162d8d32fb5ef72c515661750aa844",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"1fb2271ffe1ddeb4acac516a2dfde5bf96265e5b",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"2ae27a41f03a9bcf5899064fe482a127221e3c10",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"5b0dacaa15194f59ad7ac76b5435debf7b8bc3fa",class:{"input-wrapper":true,"input-disabled":this.disabled,"input-invalid":this.invalid}},this.value?.map((t=>e("div",{class:"tag-pill"},e("span",null,t),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:I.t("select.deselect"),onClick:()=>this.deselect(t),tabIndex:-1})))),e("div",{key:"9869bd7ec1de2d7ef45cfd747fbccc7b9e1a0558",class:"input-inner-wrapper"},e("input",{key:"1c61ce7e90f374e7442c888bab489c956d02d774",...this.nativeAttributes,part:"input",id:`tags-${this.id}-input`,class:"tags-input",role:"combobox",ref:t=>this.input=t,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),onBlur:this.onBlur.bind(this),placeholder:this.placeholder,disabled:this.disabled}),this.clearable&&!this.disabled&&(this.value?.length??0)>0&&e("cat-button",{key:"8c61da4726d290f06cb1452ab9f34a2ee291ceac",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.invalid&&e("cat-icon",{key:"ef3ba1cc1c2eaec1562fcff5f64d15ae9b8290e1",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}))),this.hasHint&&e(oe,{key:"2f92bb6d804a45328af1efb97750b5ae79b0c0b1",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 this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){const t=[...new Set(this.input?.value?.split(this.createSplitRegex(this.tagCreationChars))??[])].filter((t=>!!t&&!this.value?.includes(t)));if(t.length>1){this.value=[...this.value??[],...t];this.catChange.emit(this.value);if(this.input){this.input.value=""}}}onBlur(){if(this.addOnBlur){this.addInputValue()}}addInputValue(){const t=this.input?.value.trim();if(t&&!this.value?.includes(t)){this.value=[...this.value??[],t];this.catChange.emit(this.value)}if(this.input){this.input.value=""}}clear(){this.value=[];this.catChange.emit(this.value);if(this.input){this.input.value=""}}deselect(t){this.value=this.value?.filter((e=>e!==t));this.catChange.emit(this.value)}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Hn(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()}}createSplitRegex(t){const e=t.map((t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")));e.push("\\n","\\r");const a=`[${e.join("")}]`;return new RegExp(a,"g")}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Wo.style=No;var jo=new Map;function Po(t){var e=jo.get(t);e&&e.destroy()}function Yo(t){var e=jo.get(t);e&&e.update()}var Ho=null;"undefined"==typeof window?((Ho=function(t){return t}).destroy=function(t){return t},Ho.update=function(t){return t}):((Ho=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&&!jo.has(t)){var e,a=null,i=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(a){return t.style[a]=e[a]})),jo.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",jo.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=i.overflowY;if(0!==t.scrollHeight&&("vertical"===i.resize?t.style.resize="none":"both"===i.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],a=t[1];e.style.scrollBehavior="auto",e.scrollTop=a,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===i.boxSizing?t.scrollHeight-(parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)):t.scrollHeight+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),"none"!==i.maxHeight&&n>parseFloat(i.maxHeight)?("hidden"===i.overflowY&&(t.style.overflow="scroll"),n=parseFloat(i.maxHeight)):"hidden"!==i.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",c&&(t.style.textAlign=c),r&&r(),a!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=n),h!==i.overflow&&!c)){var f=i.textAlign;"hidden"===i.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],Po),t},Ho.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Yo),t});var Uo=Ho;const _o=".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-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 Ko=_o;let Vo=0;const qo=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-${Vo++}`;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}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){Uo(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,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"7baa83d9d2722e629503623daa7d64f669d9d14b"},e("div",{key:"7e23d71bea6eb4b3c1f512ce6e6052c4d0c93675",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"51da73044afe3fb0100c921556f4bc60f4823597",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"21efe02e678b15577efbd4e6889ed278e519f6e1",htmlFor:this.id,part:"label"},e("span",{key:"35e58dc082d073296563ec6473734ec7bb995b5e",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"f32da2b24d1d50b06a7d55d4d15185441feb285a",name:"label"})||this.label,e("div",{key:"ed4abb4e4b492130a990fca89699fea9838c758c",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"97dfc883e7a8af4d2090bb4b40208e0886585da6",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"9c74951359ccab83ec46bbd868bccefaf1356f6f",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),this.maxLength&&e("div",{key:"702c2c4a8238430927882a11490cd5be399bd3f5",class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"3f2aa62a32dd8b775b9826fe8c92129219135dcb",class:"textarea-container"},e("div",{key:"270d8f0b27b99f7388e17edc88affe7daab15438",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"a0091c3f756c983d416ee12bf777cf7101c07b48",...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",{key:"9ff1a0a8b7bf6ae5deb8b489f4426053d5ff54b9",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(oe,{key:"badc9780d07df9f6645c7f4bbdcfe97610db6741",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 this.errorMap===true||!!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(Yn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Hn(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()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};qo.style=Ko;function Jo(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 Go(t){return{change:I.t("timepicker.change"),choose:I.t("timepicker.choose"),timeFormat:Jo(t)?"12":"24"}}function Zo(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function Xo(t,e,a){const[,i,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=a?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let s=-Infinity;let c=Infinity;if(i!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,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 Qo(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()<a||t.getHours()===a&&t.getMinutes()<i}function ts(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()>a||t.getHours()===a&&t.getMinutes()>i}const es=":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;display:flex}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const as=es;const is=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=I.getLocale();this.locale=Go(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.valueChangedBySelection=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";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}onValueChanged(t,e){if(this.valueChangedBySelection){this.valueChangedBySelection=false}else if(t!==e){this.set12hFormat();this.syncValue(t??"")}}componentWillLoad(){this.set12hFormat();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=Xo(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const a=t(`[data-time="${Zo(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const i=t(`[data-time="${Zo(e)}"]`);setTimeout((()=>{(i??a)?.doFocus();(i??a)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;let a=this.value;if(!t){this.selectionTime=null;a=undefined}else{const e=Xo(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;a=Zo(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==a){this.valueChangedBySelection=true;this.value=a;this.catChange.emit(this.value)}else{this.valueChangedBySelection=false}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"9f7564ec41354b98ec0779dde23198a18689f1a3"},e("cat-input",{key:"776a76b393d92278a5afd389602c767c319c9238",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:"016bab3b23282fa4a5aeb764e4b80b337d2f9cca",slot:"label"},this.hasSlottedLabel&&e("slot",{key:"233b40757fe0c822716b87c23538b5b02371d9d2",name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"6ae7d40f0fbf4cf729e29ad124df6f3cdd8b22f8",class:"label-aria"}," (HH:mm)")),e("div",{key:"7aaab9d8ee9e06a8a68a9f94e664ba12422a18c5",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{key:"9130d436847a0fb250b28d5630e7c3a403ec494a",class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"10948ba2be73ffcde722fb22c5a4b9f3891b329d",slot:"addon",placement:this.placement},e("cat-button",{key:"3e4d74066110ca2b7141d809a1a276f78d0382a1",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:"27a2a17080a09e8148b5cae0af36d03735b8afcf",slot:"content",class:"cat-nav"},e("ul",{key:"8181974cae0ed2c3cc99c43d51f3ccbc5e188592"},this.timeArray().map((t=>{const a=Zo(t);const i=Qo(t,this.min??null)||ts(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":i},disabled:i,active:a===this.value,color:a===this.value?"primary":"secondary",variant:a===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":a},this.format(t)))})))))),this.hasSlottedHint&&e("span",{key:"cd316e5045ad3298aac0e4056c865f7bd6b1dcf3",slot:"hint"},e("slot",{key:"7fa90c7b83032013bfc9d1626bc8b53072e9aa85",name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let a=new Date(e.getTime());while(a.getDate()===e.getDate()){t.push(a);a=new Date(a.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,a]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||a===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,a,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),a,0))}set12hFormat(){const[,t]=this.value?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(this.locale.timeFormat==="12"){this.isAm=t===0||t<12}}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 a=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?a:a.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const a=(t==="min"?e:this.min)??null;const i=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const s=r?Zo(Xo(a,new Date(2e3,5,1,Number(n),Number(o)),i)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"],value:["onValueChanged"]}}};is.style=as;const rs='.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))}.align-center{align-items:center}.align-end{align-items:flex-end}';const ns=rs;let os=0;const ss=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-${os++}`;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.alignment="top";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"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"fd406b8ecbbbfd82d9872a01893129e570d3b9a1"},e("label",{key:"7159c14116061024c7388909f2dff6bb07e6ba74",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"}},e("input",{key:"89cbd5d08dba8b652243d6bc2ff2877421536b3c",...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:"405bfdd36ec78874840cd3e8d03838b20115aa00",class:"toggle"}),e("span",{key:"d9bd13f8b2281d1b1be44c552262f69282f89bab",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"be3dc6b41973cfd3c372757632768a8f73668c50",name:"label"})||this.label)),this.hasHint&&e("div",{key:"090ad02728fa1ace69abfcfdc0b2d31f7b00150d",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"4ade49db31fd0bae7d0efb4c5169aacd9e30b94c",class:"toggle-placeholder"}),e(oe,{key:"3859a49004b782b069673289fc5e8548eded00d5",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}static get delegatesFocus(){return true}get hostElement(){return i(this)}};ss.style=ns;const cs="ontouchstart"in window||navigator.maxTouchPoints>0;const ls=":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 ds=ls;let hs=0;const fs=class{constructor(e){t(this,e);this.id=`cat-tooltip-${hs++}`;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(cs){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(cs){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(a,{key:"340e9ed5613717d88fc8dde858d16716d0d100e8"},e("slot",{key:"af044aaa5e320540463d1318ba8cf8ed1b02b7e4"}),e("div",{key:"117ed1ce275f03f879aa2f320d9c0b28bfc953bd",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:"af0986e70f3d6ba0ad2f791cfa327ae9ebf768f5",name:"content"},e("p",{key:"bfcca7d936fa6e05719a88ace8bacf806b8f423b"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Hr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Wr(fs.OFFSET),Pr({fallbackAxisSideDirection:"start"}),jr({padding:fs.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=Lr(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 i(this)}};fs.OFFSET=4;fs.SHIFT_PADDING=4;fs.style=ds;export{$t as cat_alert,Nt as cat_avatar,Jt as cat_badge,Qt as cat_button,ae as cat_button_group,ne as cat_card,de as cat_checkbox,De as cat_date,la as cat_date_inline,Kr as cat_datepicker,Jr as cat_datepicker_inline,vn as cat_dropdown,xn as cat_form_group,In as cat_icon,qn as cat_input,Zn as cat_pagination,eo as cat_radio,ro as cat_radio_group,so as cat_scrollable,ko as cat_select,xo as cat_select_demo,Do as cat_skeleton,Ro as cat_spinner,To as cat_tab,Eo as cat_tabs,Wo as cat_tag,qo as cat_textarea,is as cat_time,ss as cat_toggle,fs as cat_tooltip};
10
- //# sourceMappingURL=p-a0e69279.entry.js.map
9
+ */function Zr(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function Xr(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?Zr(Object(a),!0).forEach((function(e){Qr(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):Zr(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function Qr(t,e,a){e=en(e);if(e in t){Object.defineProperty(t,e,{value:a,enumerable:true,configurable:true,writable:true})}else{t[e]=a}return t}function tn(t,e){if(typeof t!=="object"||t===null)return t;var a=t[Symbol.toPrimitive];if(a!==undefined){var i=a.call(t,e||"default");if(typeof i!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function en(t){var e=tn(t,"string");return typeof e==="symbol"?e:String(e)}var an={activateTrap:function t(e,a){if(e.length>0){var i=e[e.length-1];if(i!==a){i.pause()}}var r=e.indexOf(a);if(r===-1){e.push(a)}else{e.splice(r,1);e.push(a)}},deactivateTrap:function t(e,a){var i=e.indexOf(a);if(i!==-1){e.splice(i,1)}if(e.length>0){e[e.length-1].unpause()}}};var rn=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var nn=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 on=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 sn=function t(e){return on(e)&&!e.shiftKey};var cn=function t(e){return on(e)&&e.shiftKey};var ln=function t(e){return setTimeout(e,0)};var dn=function t(e,a){var i=-1;e.every((function(t,e){if(a(t)){i=e;return false}return true}));return i};var hn=function t(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++){i[r-1]=arguments[r]}return typeof e==="function"?e.apply(void 0,i):e};var fn=function t(e){return e.target.shadowRoot&&typeof e.composedPath==="function"?e.composedPath()[0]:e.target};var un=[];var pn=function t(e,a){var i=(a===null||a===void 0?void 0:a.document)||document;var r=(a===null||a===void 0?void 0:a.trapStack)||un;var n=Xr({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,isKeyForward:sn,isKeyBackward:cn},a);var o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,delayInitialFocusTimer:undefined,recentNavEvent:undefined};var s;var c=function t(e,a,i){return e&&e[a]!==undefined?e[a]:n[i||a]};var l=function t(e,a){var i=typeof(a===null||a===void 0?void 0:a.composedPath)==="function"?a.composedPath():undefined;return o.containerGroups.findIndex((function(t){var a=t.container,r=t.tabbableNodes;return a.contains(e)||(i===null||i===void 0?void 0:i.includes(a))||r.find((function(t){return t===e}))}))};var d=function t(e){var a=n[e];if(typeof a==="function"){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++){o[s-1]=arguments[s]}a=a.apply(void 0,o)}if(a===true){a=undefined}if(!a){if(a===undefined||a===false){return a}throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=a;if(typeof a==="string"){c=i.querySelector(a);if(!c){throw new Error("`".concat(e,"` as selector refers to no known node"))}}return c};var h=function t(){var e=d("initialFocus");if(e===false){return false}if(e===undefined||!ra(e,n.tabbableOptions)){if(l(i.activeElement)>=0){e=i.activeElement}else{var a=o.tabbableGroups[0];var r=a&&a.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=ta(t,n.tabbableOptions);var a=ea(t,n.tabbableOptions);var i=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=a.find((function(t){return aa(t)}));var s=a.slice().reverse().find((function(t){return aa(t)}));var c=!!e.find((function(t){return Oe(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:a,posTabIndexesFound:c,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,nextTabbableNode:function t(i){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(i);if(n<0){if(r){return a.slice(a.indexOf(i)+1).find((function(t){return aa(t)}))}return a.slice(0,a.indexOf(i)).reverse().find((function(t){return aa(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 a=e.activeElement;if(!a){return}if(a.shadowRoot&&a.shadowRoot.activeElement!==null){return t(a.shadowRoot)}return a};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(rn(e)){e.select()}};var b=function t(e){var a=d("setReturnFocus",e);return a?a:a===false?false:e};var m=function t(e){var a=e.target,i=e.event,r=e.isBackward,s=r===void 0?false:r;a=a||fn(i);f();var c=null;if(o.tabbableGroups.length>0){var h=l(a,i);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=dn(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return a===e}));if(p<0&&(u.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!u.nextTabbableNode(a,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=Oe(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!on(i)){c=u.nextTabbableNode(a,false)}}else{var g=dn(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return a===e}));if(g<0&&(u.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!u.nextTabbableNode(a))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=Oe(a)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!on(i)){c=u.nextTabbableNode(a)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var a=fn(e);if(l(a,e)>=0){return}if(hn(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(hn(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var a=fn(e);var i=l(a,e)>=0;if(i||a instanceof Document){if(i){o.mostRecentlyFocusedNode=a}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(Oe(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<d.length){r=d[f+1];s=false}}else{if(f-1>=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return Oe(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 a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var i=m({event:e,isBackward:a});if(i){if(on(e)){e.preventDefault()}p(i)}};var k=function t(e){if(nn(e)&&hn(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 a=fn(e);if(l(a,e)>=0){return}if(hn(n.clickOutsideDeactivates,e)){return}if(hn(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}an.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?ln((function(){p(h())})):p(h());i.addEventListener("focusin",v,true);i.addEventListener("mousedown",g,{capture:true,passive:false});i.addEventListener("touchstart",g,{capture:true,passive:false});i.addEventListener("click",x,{capture:true,passive:false});i.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}i.removeEventListener("focusin",v,true);i.removeEventListener("mousedown",g,true);i.removeEventListener("touchstart",g,true);i.removeEventListener("click",x,true);i.removeEventListener("keydown",k,true);return s};var I=function t(e){var a=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(a){p(h())}};var D=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(I):undefined;var M=function t(){if(!D){return}D.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){D.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 a=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=i.activeElement;a===null||a===void 0||a();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 a=Xr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();an.deactivateTrap(r,s);var i=c(a,"onDeactivate");var l=c(a,"onPostDeactivate");var d=c(a,"checkCanReturnFocus");var h=c(a,"returnFocus","returnFocusOnDeactivate");i===null||i===void 0||i();var f=function t(){ln((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 a=c(e,"onPause");var i=c(e,"onPostPause");o.paused=true;a===null||a===void 0||a();z();M();i===null||i===void 0||i();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var a=c(e,"onUnpause");var i=c(e,"onPostUnpause");o.paused=false;a===null||a===void 0||a();f();w();M();i===null||i===void 0||i();return this},updateContainerElements:function t(e){var a=[].concat(e).filter(Boolean);o.containers=a.map((function(t){return typeof t==="string"?i.querySelector(t):t}));if(o.active){f()}M();return this}};s.updateContainerElements(e);return s};const bn=":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 mn=bn;let gn=0;const vn=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=gn++;this.isOpen=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false;this.noReturnFocus=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):pn(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.noReturnFocus?false: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.trap?.deactivate();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.catClose.emit()}),Gr)}render(){return e(a,{key:"3ead90dae1ac492a0cb592d7cf7a50fd42f26ca7"},e("slot",{key:"b91bba7772b2a90850be2ac85b82ec7691ae031d",name:"anchor",ref:t=>this.anchorSlot=t}),e("slot",{key:"f7e07ffed988133cbccafb8f8c73fdb52757d9fb",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"868a0578cd30cac249959e0961b0425e56048af9",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"19fb6b5b92599ed1ae21aac591271957a6e7b060",name:"content"})))}componentDidLoad(){this.initAnchor()}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();const t=this.trigger.getAttribute("aria-haspopup");this.trigger.setAttribute("aria-haspopup",t??"true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));if(!this.anchor){Lr(this.trigger,this.content,(()=>this.update(this.trigger)))}}initAnchor(){this.anchor=(this.anchorSlot?.assignedElements?.()||[])[0];if(this.anchor){Lr(this.anchor,this.content,(()=>this.update(this.anchor)))}}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const a=e.shift();t=a?.hasAttribute("data-trigger")?a:a?.querySelector("[data-trigger]")??undefined}if(!t){t=na(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(t){if(t){const e=this.noResize?[]:[Yr({padding:vn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:a}){Object.assign(a.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Hr(t,this.content,{strategy:"fixed",placement:this.placement,middleware:[Wr(vn.OFFSET),Pr(),...e]}).then((({x:t,y:e,placement:a})=>{this.content.dataset.placement=a;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};vn.OFFSET=4;vn.style=mn;const yn=":host{display:block}";const kn=yn;const xn=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(a,{key:"c9fe233663c9967b3e78334e6994ceb62653c19c",style:{"--label-size":this.labelSize}},e("slot",{key:"49274e5e31644d6f7d042033e975d8b91d6aaea6",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 a=t.length-e;return a>=e?"optional":"required"}get hostElement(){return i(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};xn.style=kn;const wn=":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 zn=wn;const In=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"1e1698413feaee8ca810b50370fc44a5a9f229dc",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"}})}};In.style=zn;var Dn=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var Mn=function(t,e,a,i,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=a>=0?a:2;d.numeralThousandsGroupStyle=i||Mn.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"):""};Mn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};Mn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,a,i,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")}i=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=i+e.prefix}else{r=e.prefix+i}}else{r=i}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){a=t.split(e.numeralDecimalMark);n=a[0];o=e.numeralDecimalMark+a[1].slice(0,e.numeralDecimalScale)}if(i==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case Mn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case Mn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case Mn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return i+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var Cn=Mn;var Rn=function(t,e,a){var i=this;i.date=[];i.blocks=[];i.datePattern=t;i.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMin.length===2)i.dateMin.unshift(0);i.dateMax=a.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMax.length===2)i.dateMax.unshift(0);i.initBlocks()};Rn.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,a="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(i,r){if(t.length>0){var n=t.slice(0,i),o=n.slice(0,1),s=t.slice(i);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}a+=n;t=s}}));return this.getFixedDateString(a)},getFixedDateString:function(t){var e=this,a=e.datePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&a[0].toLowerCase()!=="y"&&a[1].toLowerCase()!=="y"){s=a[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);i=this.getFixedDate(d,h,0)}if(t.length===8){a.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;i=this.getFixedDate(d,h,f)}if(t.length===4&&(a[0]==="y"||a[1]==="y")){c=a[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;i=[0,h,f]}if(t.length===6&&(a[0]==="Y"||a[1]==="Y")){c=a[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;i=[0,h,f]}i=e.getRangeFixedDate(i);e.date=i;var p=i.length===0?t:a.reduce((function(t,a){switch(a){case"d":return t+(i[0]===0?"":e.addLeadingZero(i[0]));case"m":return t+(i[1]===0?"":e.addLeadingZero(i[1]));case"y":return t+(u?e.addLeadingZeroForYear(i[2],false):"");case"Y":return t+(u?e.addLeadingZeroForYear(i[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,a=e.datePattern,i=e.dateMin||[],r=e.dateMax||[];if(!t.length||i.length<3&&r.length<3)return t;if(a.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]<t[2]||r[2]===t[2]&&(r[1]<t[1]||r[1]===t[1]&&r[0]<t[0])))return r;if(i.length&&(i[2]>t[2]||i[2]===t[2]&&(i[1]>t[1]||i[1]===t[1]&&i[0]>t[0])))return i;return t},getFixedDate:function(t,e,a){t=Math.min(t,31);e=Math.min(e,12);a=parseInt(a||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(a)?29:28:30)}return[t,e,a]},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 An=Rn;var Sn=function(t,e){var a=this;a.time=[];a.blocks=[];a.timePattern=t;a.timeFormat=e;a.initBlocks()};Sn.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,a="";t=t.replace(/[^\d]/g,"");var i=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)>i.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxHours){o=i.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>i.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxMinutes){o=i.maxMinutes+""}break}a+=o;t=c}}));return this.getFixedTimeString(a)},getFixedTimeString:function(t){var e=this,a=e.timePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;if(t.length===6){a.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);i=this.getFixedTime(f,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){a.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);i=this.getFixedTime(f,h,d)}e.time=i;return i.length===0?t:a.reduce((function(t,a){switch(a){case"s":return t+e.addLeadingZero(i[2]);case"m":return t+e.addLeadingZero(i[1]);case"h":return t+e.addLeadingZero(i[0])}}),"")},getFixedTime:function(t,e,a){a=Math.min(parseInt(a||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,a]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var Fn=Sn;var Tn=function(t,e){var a=this;a.delimiter=e||e===""?e:" ";a.delimiterRE=e?new RegExp("\\"+e,"g"):"";a.formatter=t};Tn.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 a="",i,r=false;for(var n=0,o=t.length;n<o;n++){i=e.formatter.inputDigit(t.charAt(n));if(/[\s()-]/g.test(i)){a=i;r=true}else{if(!r){a=i}}}a=a.replace(/[()]/g,"");a=a.replace(/[\s-]/g,e.delimiter);return a}};var $n=Tn;var Bn={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(t){var e=t.reduce((function(t,e){return t+e}),0);return t.concat(19-e)},getInfo:function(t,e){var a=Bn.blocks,i=Bn.re;e=!!e;for(var r in i){if(i[r].test(t)){var n=a[r];return{type:r,blocks:e?this.getStrictBlocks(n):n}}}return{type:"unknown",blocks:e?this.getStrictBlocks(a.general):a.general}}};var En=Bn;var On={noop:function(){},strip:function(t,e){return t.replace(e,"")},getPostDelimiter:function(t,e,a){if(a.length===0){return t.slice(-e.length)===e?e:""}var i="";a.forEach((function(e){if(t.slice(-e.length)===e){i=e}}));return i},getDelimiterREByDelimiter:function(t){return new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(t,e,a,i,r){if(e.length===t){return a.length}return t+this.getPositionOffset(t,e,a,i,r)},getPositionOffset:function(t,e,a,i,r){var n,o,s;n=this.stripDelimiters(e.slice(0,t),i,r);o=this.stripDelimiters(a.slice(0,t),i,r);s=n.length-o.length;return s!==0?s/Math.abs(s):0},stripDelimiters:function(t,e,a){var i=this;if(a.length===0){var r=e?i.getDelimiterREByDelimiter(e):"";return t.replace(r,"")}a.forEach((function(e){e.split("").forEach((function(e){t=t.replace(i.getDelimiterREByDelimiter(e),"")}))}));return t},headStr:function(t,e){return t.slice(0,e)},getMaxLength:function(t){return t.reduce((function(t,e){return t+e}),0)},getPrefixStrippedValue:function(t,e,a,i,r,n,o,s,c){if(a===0){return t}if(t===e&&t!==""){return""}if(c&&t.slice(0,1)=="-"){var l=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(t.slice(1),e,a,l,r,n,o,s,c)}if(i.slice(0,a)!==e&&!s){if(o&&!i&&t)return t;return""}else if(i.slice(-a)!==e&&s){if(o&&!i&&t)return t;return""}var d=this.stripDelimiters(i,r,n);if(t.slice(0,a)!==e&&!s){return d.slice(a)}else if(t.slice(-a)!==e&&s){return d.slice(0,-a-1)}return s?t.slice(0,-a):t.slice(a)},getFirstDiffIndex:function(t,e){var a=0;while(t.charAt(a)===e.charAt(a)){if(t.charAt(a++)===""){return-1}}return a},getFormattedValue:function(t,e,a,i,r,n){var o="",s=r.length>0,c="";if(a===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=i}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l<a-1){o+=c}}t=h}}));return o},fixPrefixCursor:function(t,e,a,i){if(!t){return}var r=t.value,n=a||(i[0]||" ");if(!t.setSelectionRange||!e||e.length+n.length<=r.length){return}var o=r.length*2;setTimeout((function(){t.setSelectionRange(o,o)}),1)},checkFullSelection:function(t){try{var e=window.getSelection()||document.getSelection()||{};return e.toString().length===t.length}catch(t){}return false},setSelection:function(t,e,a){if(t!==this.getActiveElement(a)){return}if(t&&t.value.length<=e){return}if(t.createTextRange){var i=t.createTextRange();i.move("character",e);i.select()}else{try{t.setSelectionRange(e,e)}catch(t){console.warn("The input element type does not support selection")}}},getActiveElement:function(t){var e=t.activeElement;if(e&&e.shadowRoot){return this.getActiveElement(e.shadowRoot)}return e},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(t,e){if(!this.isAndroid()||!t||!e){return false}return e===t.slice(0,-1)}};var Nn=On;var Ln={assign:function(t,e){t=t||{};e=e||{};t.creditCard=!!e.creditCard;t.creditCardStrictMode=!!e.creditCardStrictMode;t.creditCardType="";t.onCreditCardTypeChanged=e.onCreditCardTypeChanged||function(){};t.phone=!!e.phone;t.phoneRegionCode=e.phoneRegionCode||"AU";t.phoneFormatter={};t.time=!!e.time;t.timePattern=e.timePattern||["h","m","s"];t.timeFormat=e.timeFormat||"24";t.timeFormatter={};t.date=!!e.date;t.datePattern=e.datePattern||["d","m","Y"];t.dateMin=e.dateMin||"";t.dateMax=e.dateMax||"";t.dateFormatter={};t.numeral=!!e.numeral;t.numeralIntegerScale=e.numeralIntegerScale>0?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 Dn==="object"&&Dn?Dn:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var Wn=Ln;var jn=function(t,e){var a=this;var i=false;if(typeof t==="string"){a.element=document.querySelector(t);i=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){a.element=t[0];i=t.length>1}else{a.element=t}}if(!a.element){throw new Error("[cleave.js] Please check the element")}if(i){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=a.element.value;a.properties=jn.DefaultProperties.assign({},e);a.init()};jn.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=jn.Util.getMaxLength(e.blocks);t.isAndroid=jn.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 a=t.element.cloneNode(true);t.element.parentNode.insertBefore(a,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=a;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new jn.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 jn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=jn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new jn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=jn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new jn.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,a=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=a===8},onChange:function(t){var e=this,a=e.properties,i=jn.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=i.getPostDelimiter(e.lastInputValue,a.delimiter,a.delimiters);if(e.isBackward&&r){a.postDelimiterBackspace=r}else{a.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)}jn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!jn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!jn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,a=e.properties,i=jn.Util,r=e.element.value,n="";if(!a.copyDelimiter){n=i.stripDelimiters(r,a.delimiter,a.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,a=e.properties,i=jn.Util;var r=i.getPostDelimiter(t,a.delimiter,a.delimiters);if(!a.numeral&&a.postDelimiterBackspace&&!r){t=i.headStr(t,t.length-a.postDelimiterBackspace.length)}if(a.phone){if(a.prefix&&(!a.noImmediatePrefix||t.length)){a.result=a.prefix+a.phoneFormatter.format(t).slice(a.prefix.length)}else{a.result=a.phoneFormatter.format(t)}e.updateValueState();return}if(a.numeral){if(a.prefix&&a.noImmediatePrefix&&t.length===0){a.result=""}else{a.result=a.numeralFormatter.format(t)}e.updateValueState();return}if(a.date){t=a.dateFormatter.getValidatedDate(t)}if(a.time){t=a.timeFormatter.getValidatedTime(t)}t=i.stripDelimiters(t,a.delimiter,a.delimiters);t=i.getPrefixStrippedValue(t,a.prefix,a.prefixLength,a.result,a.delimiter,a.delimiters,a.noImmediatePrefix,a.tailPrefix,a.signBeforePrefix);t=a.numericOnly?i.strip(t,/[^\d]/g):t;t=a.uppercase?t.toUpperCase():t;t=a.lowercase?t.toLowerCase():t;if(a.prefix){if(a.tailPrefix){t=t+a.prefix}else{t=a.prefix+t}if(a.blocksLength===0){a.result=t;e.updateValueState();return}}if(a.creditCard){e.updateCreditCardPropsByValue(t)}t=i.headStr(t,a.maxLength);a.result=i.getFormattedValue(t,a.blocks,a.blocksLength,a.delimiter,a.delimiters,a.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,a=e.properties,i=jn.Util,r;if(i.headStr(a.result,4)===i.headStr(t,4)){return}r=jn.CreditCardDetector.getInfo(t,a.creditCardStrictMode);a.blocks=r.blocks;a.blocksLength=a.blocks.length;a.maxLength=i.getMaxLength(a.blocks);if(a.creditCardType!==r.type){a.creditCardType=r.type;a.onCreditCardTypeChanged.call(e,a.creditCardType)}},updateValueState:function(){var t=this,e=jn.Util,a=t.properties;if(!t.element){return}var i=t.element.selectionEnd;var r=t.element.value;var n=a.result;i=e.getNextCursorPosition(i,r,n,a.delimiter,a.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,i,a.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(a.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,i,a.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,a=e.properties;a.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,a=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(a.numeral){t=t.replace(".",a.numeralDecimalMark)}a.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,a=jn.Util,i=t.element.value;if(e.rawValueTrimPrefix){i=a.getPrefixStrippedValue(i,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){i=e.numeralFormatter.getRawValue(i)}else{i=a.stripDelimiters(i,e.delimiter,e.delimiters)}return i},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]"}};jn.NumeralFormatter=Cn;jn.DateFormatter=An;jn.TimeFormatter=Fn;jn.PhoneFormatter=$n;jn.CreditCardDetector=En;jn.Util=Nn;jn.DefaultProperties=Wn;(typeof Dn==="object"&&Dn?Dn:window)["Cleave"]=jn;var Pn=jn;function Yn(t){return t!=null&&`${t}`!=="false"}function Hn(t,e=0){return Un(t)?Number(t):e}function Un(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const _n=".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-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;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.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-loading,.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 Kn=_n;let Vn=0;const qn=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-${Vn++}`;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.loading=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}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}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 Pn(this.input,t)}onErrorsChanged(t,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("div",{key:"ffbaf104a60dbf73cb59e07e3164fe0c421540a5",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"e6139d1d950c2d8c2674bb90f0acbe9333ace2eb",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"fce898969b37f4579f780c1a62354ccb0da5a73e",htmlFor:this.id,part:"label"},e("span",{key:"8a4d0f653bae9a75db600080ad7d0b9199c14db5",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"6073eadb00b587d1f3ba22d212e5235d21826b08",name:"label"})||this.label,e("div",{key:"fc4be508caec71287f275873d49adb5c16931289",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"c1010a473d4bfadb8ada56825db91f0c4d2b7871",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"8b2184a224afa6857f207aeaf71d83e12c92ef9a",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),this.maxLength&&e("div",{key:"6aee4428a06faba6ecf6a82963f0ecf3ca0d5d7b",class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"9c88a62af0c4083162bea13dc1fd5ead5708efbb",class:"input-container"},e("div",{key:"556a7b1bc45da66739d8a7afec3d4e1b64f12e77",class:"input-outer-wrapper"},e("div",{key:"16d000652a934588fa87c71929565aa5cc15069b",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",{key:"de3b5da6a0a09c1f66caeb2fb3c9772a2426778a",class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{key:"f950a57fa6060b9f82629d26b91dcb449b86cd2a",icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"b98cd1a805712c454262bfa8fae92f1e92b33f09",class:"input-inner-wrapper"},e("input",{key:"9bd8bc8f345c80ced98a06728d9d09bc462e0823",...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",{key:"255d4760d151bfb36f0217295ee378b5cec26647",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{key:"d5e62dccaaa64370723d4721d567789b06c94b11",class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":I.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),this.loading&&e("cat-spinner",{key:"22218dd7cd48b2599d2125ec080467c925b04a4d",size:"m",class:"icon-loading"}),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{key:"c9e5f18bfc54321ad9b18df56a199d0096739621",icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{key:"307c0d5f2a1dff6efb7d6bf05a035c487f947994",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{key:"3216d4e278951898d9a96ad48b2df7c17d54c6a3",class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"d996aab9325a2eb77401490c3fa2a9e8eaf0ffc6",name:"addon"})),this.hasHint&&e(oe,{key:"84980cbf543e9405c70d481bce339cd9c743da43",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 this.errorMap===true||!!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(Yn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Hn(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}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};qn.style=Kn;const Jn=":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 Gn=Jn;const Zn=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(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("nav",{key:"ed5098e1578e2157e0f5b8c539f313e2892c5f05",role:"navigation"},e("ol",{key:"6f63a5c0a79722913dafbf1b6391ab586a20695a",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"0dd989fa017490749141ab2029546b115a34ce27"},e("cat-button",{key:"8614e9e1ebfc2ff3aeda2cec8be07aeff6e592eb",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:I.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"b864788a70e125ae93a34e705522e537b359a12a"},e("cat-button",{key:"93f6d89967b6f6b93b733fbcb628cf4a3663dbf0",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:I.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 a=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const i=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=i?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,a);if(!e&&!i){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,a){const i=this.clamp(e,0,this.pageCount);const r=this.clamp(a,0,this.pageCount);Array(r-i).fill(0).forEach(((e,a)=>t.add(i+a)))}clamp(t,e,a){return Math.min(Math.max(t,e),a)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,a)=>[a>0&&this.pages[a-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:I.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}static get delegatesFocus(){return true}get hostElement(){return i(this)}};Zn.style=Gn;const Xn=".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))}.align-center .radio{align-self:center}.align-end .radio{align-self:flex-end}";const Qn=Xn;let to=0;const eo=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-${++to}`;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.alignment="top";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"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"875be66c1a340d478bb55b15822415df919591ad"},e("label",{key:"dc4577b45f79f373d621b83a83c09d214cd01251",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"5c9bc1aa0f3746f29a4dbf219e241b6c1779a5c7",class:"radio"},e("input",{key:"bb633c685be46657acae7a7376069b7a95de7401",...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:"d6863f415ce0999c31276e8dc6e05b3ed7298193",class:"circle"})),e("span",{key:"c82183168cd245b781f2a4273c38ef20247d10c1",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"d5a556eff95f4471371c6162a0b101c1fb82e0cc",name:"label"})||this.label)),this.hasHint&&e("div",{key:"a236fefd50ea65e63643e5747a72a1f0b0dfbbb2",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"77ae0d9af2ff86becdb0b3a487c37689fe63af66",class:"circle-placeholder"}),e(oe,{key:"5e90f290fe70136ee19fe287db749abc8e7ec024",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)}static get delegatesFocus(){return true}get hostElement(){return i(this)}};eo.style=Qn;const ao=":host{display:block}:host([hidden]){display:none}";const io=ao;const ro=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 a=document.activeElement;const i=this.catRadioGroup.findIndex((t=>t===a));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=i<0?0:(i+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:"af9aff52c285bb32986d27c4f062f7ca8dbe394e",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"e4542e17427cdd2d31e38276afe5d240f5b9e6cf"}))}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 i(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};ro.style=io;const no=":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 oo=no;const so=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(Ct(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(so.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Ct(this.destroyed)).subscribe((({top:t,left:e,right:a,bottom:i})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",a);this.toggleClass("cat-scrollable-bottom",i)}))}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:"d2c0966e736fe4da66b4ff4c17ce51b914bc4b8d",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{key:"a0b25b995b5f75d1c09d4dc982ceebe9a8c904b8",class:"shadow-top"}),!this.noShadowX&&e("div",{key:"02e550e37511bff64e9c8c2bd09c41858fdd3930",class:"shadow-left"}),!this.noShadowX&&e("div",{key:"debb835bfcf815837e14b1378190e90a243a1af5",class:"shadow-right"}),!this.noShadowY&&e("div",{key:"d646f92372ab80246f0164c672812854d6c1c946",class:"shadow-bottom"})),e("div",{key:"e24d26d9c11070b8b0d5a66da3bcaeb12bf3532c",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"6923a1a06201e1997c80af316d57d0654312dca4"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(so.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Ct(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)}}};so.THROTTLE=50;so.style=oo;var co="__autosizeInputGhost";var lo={" ":"nbsp","<":"lt",">":"gt"};function ho(t){return"&"+lo[t]+";"}function fo(t){return t.replace(/\s|<|>/g,ho)}function uo(){var t=document.createElement("div");t.id=co;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 po=function(t,e){var a=window.getComputedStyle(t);var i="box-sizing:"+a.boxSizing+";border-left:"+a.borderLeftWidth+" solid red"+";border-right:"+a.borderRightWidth+" solid red"+";font-family:"+a.fontFamily+";font-feature-settings:"+a.fontFeatureSettings+";font-kerning:"+a.fontKerning+";font-size:"+a.fontSize+";font-stretch:"+a.fontStretch+";font-style:"+a.fontStyle+";font-variant:"+a.fontVariant+";font-variant-caps:"+a.fontVariantCaps+";font-variant-ligatures:"+a.fontVariantLigatures+";font-variant-numeric:"+a.fontVariantNumeric+";font-weight:"+a.fontWeight+";letter-spacing:"+a.letterSpacing+";margin-left:"+a.marginLeft+";margin-right:"+a.marginRight+";padding-left:"+a.paddingLeft+";padding-right:"+a.paddingRight+";text-indent:"+a.textIndent+";text-transform:"+a.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var a=document.getElementById(co)||uo();a.style.cssText+=i;a.innerHTML=fo(e);var r=window.getComputedStyle(a).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(co);if(e){e.parentNode.removeChild(e)}}};const bo=".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-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 mo=bo;const go={term:"",isOpen:false,isLoading:false,isFirstLoading:true,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let vo=0;let yo=0;const ko=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-${vo++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=go;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,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}onStateChanged(t,e){const a=a=>t[a]!==e[a];if(a("isOpen")){this.update()}if(a("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(a("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const a=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=a}else{t=a.length?a[0]:""}}else{const e=a.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const i=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:i}}else{t={id:e.length?e[0]:"",tag:i.length?i[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){po(this.input,{minWidth:true})}if(this.trigger&&this.dropdown){Lr(this.trigger,this.dropdown,(()=>this.update()))}}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}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(Yn(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):C(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),It((t=>t+1),0),Dt(0)))),Mt((a=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(a,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements,isFirstLoading:false}))),Rt((t=>!t.last),true),It(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!a.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}a.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:a})}))}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"1ecf402adc273d133bfe829aea9fc28c6f63bc79"},e("div",{key:"5c209d893e31472fabda8dc0aab1294693ba4b0b",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"51755c54effe1bd8216e656bc95f6bf57814219a",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"e4835aa21b0bde58f40e9130122826e6ade1e739",htmlFor:`select-${this.id}-input`,part:"label"},e("span",{key:"8bdbd5c021b0c4fd864cc7b8d84e0230707cd016",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"6e7ad3025b1cee315cf10c85e907cca128ec3922",name:"label"})||this.label,e("div",{key:"1536c12184aec8b8825d24a0635bb08baa976b6d",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"f90e3b62becfab3e586718ef201f9596e78c820b",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"db0bfd7582529e57fb18266f5014a73c92584c84",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"ce84b362fe92abcd2e65388b457a5ed25def1e3e",class:"select-container"},e("div",{key:"1a0d2031a1f71d77b371e96d27ad608da1f3d1a4",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:"5b92f786919140fe0f4329a3b846e24007b980e7",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,a)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===a},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${a}`},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:I.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:"61d9e8ae5063a517ca57dc796273284ae15cad31",...this.nativeAttributes,part:"input",id:`select-${this.id}-input`,class:"select-input",role:"combobox",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,"aria-autocomplete":"list",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",{key:"e4d0a6073a1af4480c116bd1525c56716976da24"}),this.invalid&&e("cat-icon",{key:"bb894fea7607b7b6b3dc950dde171faac3627a07",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:I.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{key:"6179bb7c28759db151265a35be142e1e89749d61",iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?I.t("select.close"):I.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(oe,{key:"5d449c11b58c01c1f6760448bc46474d8bb889cb",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"e50a9fa50cc46fc444fd3ec1b52c409fcfb0278f",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{key:"dd07d6ef4fbd6352b88cb2d15802a4b382c3409f",class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{key:"bac0e34fa3603ed07a3f9cc2d9346349c2b31201",class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isFirstLoading?Array.from(Array(ko.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:I.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,a)=>{const i=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(i){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${a}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===a},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!i?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===a},onFocus:()=>this.input?.focus(),onClick:()=>i?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 a;if(this.tags){a=this.initTags()}const i=e.length?t.resolve(e).pipe(zt()):C([]);i.pipe(dt((()=>C([])))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags){a.filter((t=>!this.isTagSelected(t,i))).forEach(((t,e)=>{const a={id:`select-${this.id}-tag-${e}`,name:t};i.push({item:a,render:{label:a.name}})}))}const r=!this.multiple&&i.length?i[0].render.label:"";this.patchState({isResolving:false,selection:i,term:r,activeOptionIndex:-1});this.term$.next(r);this.input&&(this.input.value=r)}))}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,isFirstLoading:true,options:[]});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.patchState({term:t.render.label,activeOptionIndex:-1,activeSelectionIndex:-1})}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=go}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.required&&!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Hr(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Wr(ko.DROPDOWN_OFFSET),Pr()]}).then((({x:t,y:e,placement:a})=>{if(this.dropdown){this.dropdown.dataset.placement=a;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.activeSelectionIndex<this.state.selection.length-1){t=Math.min(this.state.activeSelectionIndex+1,this.state.selection.length-1)}else if(!this.state.term){t=0}this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}}if(e){t.preventDefault();t.stopPropagation()}}get tagTextHelp(){return this.tagHint&&!this.isTagSelected(this.state.term)?" ("+this.tagHint+")":""}isTagSelected(t,e=this.state.selection){return e.findIndex((e=>e.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const a=e?.tags;const i={id:`select-${this.id}-tag-${a?.length?a?.length+yo++:0}`,name:t};this.select({item:i,render:{label:i.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=Hn(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()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};ko.SKELETON_COUNT=4;ko.DROPDOWN_OFFSET=4;ko.style=mo;const xo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+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=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+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=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+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(a,{key:"0427cd222f128124aa5b7304ecc56f98f82ad601",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"20731907f24cecd4f79bc2b8fb55bf4ca2a8781d",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:"b4284b5fa7bd3c80c49900cc901a67ce87b02fba",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"1ae920c166bcffb8c417887ab01830bc9704d82b",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"6928bbfea0b54d3a2d82bdc16de71208934cd4ab",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"ffa816a1e6f4e5e170aeed4c64f75aefb928e800",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:"a392acd00395251efe86deb5f95de439cb2e2947",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:"abe4098459cb27c12ecccd500080ed4b183d4221",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:"59e0e9df2329e1ee7f96a071462a58e7aac8c057",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"bfed29db8e502f705877dd79ad9f584569639a22",overflow:true},e("cat-button",{key:"fda80f359585e24f3fa9cff4567b4c6d0681cc9d",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"180ed85afb561a07ff346bd481503d57c336fbe6",slot:"content",style:{width:"400px"}},e("cat-select",{key:"12efa7508dfcb72cb897a160353958ef2c66a7a0",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=>C(t.map((t=>wo.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const a=wo.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const i=a.slice(e*10,e*10+10);return C({last:i.length<10,totalElements:a.length,content:i}).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 wo=[{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 zo=':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 Io=zo;const Do=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(a,{key:"95992890ce7b8c90068af979179fe6e512cd599c"},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)}};Do.style=Io;const Mo=":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 Co=Mo;const Ro=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined;this.value=0}render(){return e("span",{key:"8922d0ec7f5474084a39a8b3a4620bee426cea78",role:"progressbar",tabindex:"-1","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true","aria-valuenow":this.value,"aria-valuemin":"0","aria-valuemax":"100",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"6a649c21b27b3dbad3c73a71936566e7e9648254",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"3fb75a339ec6e18d0209e9da2cbf650f2dae4420",cx:"24",cy:"24",r:"21.5"})))}};Ro.style=Co;const Ao=":host{display:block}:host([hidden]){display:none}";const So=Ao;let Fo=0;const To=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.noActive=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(a,{key:"0db9a9f8449cb69691552450d653d86251a17954"})}get hostElement(){return i(this)}};To.style=So;const $o=':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=$o;const Eo=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 a=Array.from(e??[]).filter((t=>!t.disabled));const i=this.hostElement.shadowRoot?.activeElement;const r=i?a.indexOf(i):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+a.length)%a.length;a[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(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"057726c753ef2e4d5557736488fbffb92774f26f"},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)&&!t.noActive))[0]?.id}click(t){if(this.canActivate(t)){t.click();if(!t.noActive){this.activate(t)}}}activate(t){if(!t){this.activeTab=""}else if(this.canActivate(t)){this.activeTab=t.id}}canActivate(t){return!t.deactivated&&!t.url&&t.id!==this.activeTab}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};Eo.style=Bo;const Oo=".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-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}.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}:host{display:flex;flex-direction:column;gap:0.5rem}input{font:inherit;margin:0;min-width:20rem;padding:0.375rem 0;flex:1 1 auto;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::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}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.25rem;padding:0.25rem 0.75rem;min-height:2rem;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);flex-wrap:wrap;}.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}.tag-pill{display: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}.tag-pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0}.tag-pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.icon-suffix{align-self:center}.input-inner-wrapper{flex:1 1 auto;display:flex}";const No=Oo;let Lo=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-input-${Lo++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.tags=[];this.errorMap=undefined;this.requiredMarker="optional";this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.nativeAttributes=undefined;this.value=undefined;this.clearable=false;this.errors=undefined;this.errorUpdate=0;this.tagCreationChars=[" "];this.addOnBlur=false}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["Enter",...this.tagCreationChars].includes(t.key)&&e){t.preventDefault();this.addInputValue()}else if(["Backspace"].includes(t.key)&&this.input?.selectionStart===0&&(this.value?.length??0)>0&&e){this.value=this.value?.slice(0,-1)??[];this.catChange.emit(this.value)}}onErrorsChanged(t,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"c30f59f0da021ea37a9b94904da318ff28d9d699"},e("div",{key:"6f837dcf33c6b726d4d9755b384815552f4b597f",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"78f5ce85bda81da097187483121d23f9779f96c9",htmlFor:`tags-${this.id}-input`,part:"label"},e("span",{key:"dae093aaa4cc7bb26ff015bf389361fda1fd6d5c",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"9eef396375eaff2e21613a79640bd1692a0a7fe8",name:"label"})||this.label,e("div",{key:"6045ab7f98162d8d32fb5ef72c515661750aa844",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"1fb2271ffe1ddeb4acac516a2dfde5bf96265e5b",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"2ae27a41f03a9bcf5899064fe482a127221e3c10",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"5b0dacaa15194f59ad7ac76b5435debf7b8bc3fa",class:{"input-wrapper":true,"input-disabled":this.disabled,"input-invalid":this.invalid}},this.value?.map((t=>e("div",{class:"tag-pill"},e("span",null,t),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:I.t("select.deselect"),onClick:()=>this.deselect(t),tabIndex:-1})))),e("div",{key:"9869bd7ec1de2d7ef45cfd747fbccc7b9e1a0558",class:"input-inner-wrapper"},e("input",{key:"1c61ce7e90f374e7442c888bab489c956d02d774",...this.nativeAttributes,part:"input",id:`tags-${this.id}-input`,class:"tags-input",role:"combobox",ref:t=>this.input=t,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),onBlur:this.onBlur.bind(this),placeholder:this.placeholder,disabled:this.disabled}),this.clearable&&!this.disabled&&(this.value?.length??0)>0&&e("cat-button",{key:"8c61da4726d290f06cb1452ab9f34a2ee291ceac",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.invalid&&e("cat-icon",{key:"ef3ba1cc1c2eaec1562fcff5f64d15ae9b8290e1",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}))),this.hasHint&&e(oe,{key:"2f92bb6d804a45328af1efb97750b5ae79b0c0b1",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 this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){const t=[...new Set(this.input?.value?.split(this.createSplitRegex(this.tagCreationChars))??[])].filter((t=>!!t&&!this.value?.includes(t)));if(t.length>1){this.value=[...this.value??[],...t];this.catChange.emit(this.value);if(this.input){this.input.value=""}}}onBlur(){if(this.addOnBlur){this.addInputValue()}}addInputValue(){const t=this.input?.value.trim();if(t&&!this.value?.includes(t)){this.value=[...this.value??[],t];this.catChange.emit(this.value)}if(this.input){this.input.value=""}}clear(){this.value=[];this.catChange.emit(this.value);if(this.input){this.input.value=""}}deselect(t){this.value=this.value?.filter((e=>e!==t));this.catChange.emit(this.value)}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Hn(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()}}createSplitRegex(t){const e=t.map((t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")));e.push("\\n","\\r");const a=`[${e.join("")}]`;return new RegExp(a,"g")}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Wo.style=No;var jo=new Map;function Po(t){var e=jo.get(t);e&&e.destroy()}function Yo(t){var e=jo.get(t);e&&e.update()}var Ho=null;"undefined"==typeof window?((Ho=function(t){return t}).destroy=function(t){return t},Ho.update=function(t){return t}):((Ho=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&&!jo.has(t)){var e,a=null,i=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(a){return t.style[a]=e[a]})),jo.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",jo.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=i.overflowY;if(0!==t.scrollHeight&&("vertical"===i.resize?t.style.resize="none":"both"===i.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],a=t[1];e.style.scrollBehavior="auto",e.scrollTop=a,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===i.boxSizing?t.scrollHeight-(parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)):t.scrollHeight+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),"none"!==i.maxHeight&&n>parseFloat(i.maxHeight)?("hidden"===i.overflowY&&(t.style.overflow="scroll"),n=parseFloat(i.maxHeight)):"hidden"!==i.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",c&&(t.style.textAlign=c),r&&r(),a!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=n),h!==i.overflow&&!c)){var f=i.textAlign;"hidden"===i.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],Po),t},Ho.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Yo),t});var Uo=Ho;const _o=".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-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 Ko=_o;let Vo=0;const qo=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-${Vo++}`;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}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){Uo(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,e,a=true){if(!Yn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"7baa83d9d2722e629503623daa7d64f669d9d14b"},e("div",{key:"7e23d71bea6eb4b3c1f512ce6e6052c4d0c93675",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"51da73044afe3fb0100c921556f4bc60f4823597",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"21efe02e678b15577efbd4e6889ed278e519f6e1",htmlFor:this.id,part:"label"},e("span",{key:"35e58dc082d073296563ec6473734ec7bb995b5e",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"f32da2b24d1d50b06a7d55d4d15185441feb285a",name:"label"})||this.label,e("div",{key:"ed4abb4e4b492130a990fca89699fea9838c758c",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"97dfc883e7a8af4d2090bb4b40208e0886585da6",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"9c74951359ccab83ec46bbd868bccefaf1356f6f",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),this.maxLength&&e("div",{key:"702c2c4a8238430927882a11490cd5be399bd3f5",class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"3f2aa62a32dd8b775b9826fe8c92129219135dcb",class:"textarea-container"},e("div",{key:"270d8f0b27b99f7388e17edc88affe7daab15438",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"a0091c3f756c983d416ee12bf777cf7101c07b48",...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",{key:"9ff1a0a8b7bf6ae5deb8b489f4426053d5ff54b9",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(oe,{key:"badc9780d07df9f6645c7f4bbdcfe97610db6741",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 this.errorMap===true||!!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(Yn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=Hn(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()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};qo.style=Ko;function Jo(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 Go(t){return{change:I.t("timepicker.change"),choose:I.t("timepicker.choose"),timeFormat:Jo(t)?"12":"24"}}function Zo(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function Xo(t,e,a){const[,i,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=a?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let s=-Infinity;let c=Infinity;if(i!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,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 Qo(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()<a||t.getHours()===a&&t.getMinutes()<i}function ts(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()>a||t.getHours()===a&&t.getMinutes()>i}const es=":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;display:flex}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const as=es;const is=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=I.getLocale();this.locale=Go(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.valueChangedBySelection=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";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}onValueChanged(t,e){if(this.valueChangedBySelection){this.valueChangedBySelection=false}else if(t!==e){this.set12hFormat();this.syncValue(t??"")}}componentWillLoad(){this.set12hFormat();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=Xo(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const a=t(`[data-time="${Zo(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const i=t(`[data-time="${Zo(e)}"]`);setTimeout((()=>{(i??a)?.doFocus();(i??a)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;let a=this.value;if(!t){this.selectionTime=null;a=undefined}else{const e=Xo(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;a=Zo(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==a){this.valueChangedBySelection=true;this.value=a;this.catChange.emit(this.value)}else{this.valueChangedBySelection=false}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"9f7564ec41354b98ec0779dde23198a18689f1a3"},e("cat-input",{key:"776a76b393d92278a5afd389602c767c319c9238",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:"016bab3b23282fa4a5aeb764e4b80b337d2f9cca",slot:"label"},this.hasSlottedLabel&&e("slot",{key:"233b40757fe0c822716b87c23538b5b02371d9d2",name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"6ae7d40f0fbf4cf729e29ad124df6f3cdd8b22f8",class:"label-aria"}," (HH:mm)")),e("div",{key:"7aaab9d8ee9e06a8a68a9f94e664ba12422a18c5",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{key:"9130d436847a0fb250b28d5630e7c3a403ec494a",class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"10948ba2be73ffcde722fb22c5a4b9f3891b329d",slot:"addon",placement:this.placement},e("cat-button",{key:"3e4d74066110ca2b7141d809a1a276f78d0382a1",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:"27a2a17080a09e8148b5cae0af36d03735b8afcf",slot:"content",class:"cat-nav"},e("ul",{key:"8181974cae0ed2c3cc99c43d51f3ccbc5e188592"},this.timeArray().map((t=>{const a=Zo(t);const i=Qo(t,this.min??null)||ts(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":i},disabled:i,active:a===this.value,color:a===this.value?"primary":"secondary",variant:a===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":a},this.format(t)))})))))),this.hasSlottedHint&&e("span",{key:"cd316e5045ad3298aac0e4056c865f7bd6b1dcf3",slot:"hint"},e("slot",{key:"7fa90c7b83032013bfc9d1626bc8b53072e9aa85",name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let a=new Date(e.getTime());while(a.getDate()===e.getDate()){t.push(a);a=new Date(a.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,a]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||a===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,a,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),a,0))}set12hFormat(){const[,t]=this.value?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(this.locale.timeFormat==="12"){this.isAm=t===0||t<12}}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 a=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?a:a.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const a=(t==="min"?e:this.min)??null;const i=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const s=r?Zo(Xo(a,new Date(2e3,5,1,Number(n),Number(o)),i)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"],value:["onValueChanged"]}}};is.style=as;const rs='.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))}.align-center{align-items:center}.align-end{align-items:flex-end}';const ns=rs;let os=0;const ss=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-${os++}`;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.alignment="top";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"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"fd406b8ecbbbfd82d9872a01893129e570d3b9a1"},e("label",{key:"7159c14116061024c7388909f2dff6bb07e6ba74",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"}},e("input",{key:"89cbd5d08dba8b652243d6bc2ff2877421536b3c",...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:"405bfdd36ec78874840cd3e8d03838b20115aa00",class:"toggle"}),e("span",{key:"d9bd13f8b2281d1b1be44c552262f69282f89bab",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"be3dc6b41973cfd3c372757632768a8f73668c50",name:"label"})||this.label)),this.hasHint&&e("div",{key:"090ad02728fa1ace69abfcfdc0b2d31f7b00150d",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"4ade49db31fd0bae7d0efb4c5169aacd9e30b94c",class:"toggle-placeholder"}),e(oe,{key:"3859a49004b782b069673289fc5e8548eded00d5",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}static get delegatesFocus(){return true}get hostElement(){return i(this)}};ss.style=ns;const cs="ontouchstart"in window||navigator.maxTouchPoints>0;const ls=":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 ds=ls;let hs=0;const fs=class{constructor(e){t(this,e);this.id=`cat-tooltip-${hs++}`;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(cs){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(cs){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(a,{key:"340e9ed5613717d88fc8dde858d16716d0d100e8"},e("slot",{key:"af044aaa5e320540463d1318ba8cf8ed1b02b7e4"}),e("div",{key:"117ed1ce275f03f879aa2f320d9c0b28bfc953bd",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:"af0986e70f3d6ba0ad2f791cfa327ae9ebf768f5",name:"content"},e("p",{key:"bfcca7d936fa6e05719a88ace8bacf806b8f423b"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Hr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Wr(fs.OFFSET),Pr({fallbackAxisSideDirection:"start"}),jr({padding:fs.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=Lr(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 i(this)}};fs.OFFSET=4;fs.SHIFT_PADDING=4;fs.style=ds;export{$t as cat_alert,Nt as cat_avatar,Jt as cat_badge,Qt as cat_button,ae as cat_button_group,ne as cat_card,de as cat_checkbox,De as cat_date,la as cat_date_inline,Kr as cat_datepicker,Jr as cat_datepicker_inline,vn as cat_dropdown,xn as cat_form_group,In as cat_icon,qn as cat_input,Zn as cat_pagination,eo as cat_radio,ro as cat_radio_group,so as cat_scrollable,ko as cat_select,xo as cat_select_demo,Do as cat_skeleton,Ro as cat_spinner,To as cat_tab,Eo as cat_tabs,Wo as cat_tag,qo as cat_textarea,is as cat_time,ss as cat_toggle,fs as cat_tooltip};
10
+ //# sourceMappingURL=p-ee89e395.entry.js.map