@haiilo/catalyst 5.3.0 → 5.4.0

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.
Files changed (169) hide show
  1. package/dist/catalyst/catalyst.css +56 -39
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/index.cdn.js +1 -0
  5. package/dist/catalyst/index.esm.js +2 -2
  6. package/dist/catalyst/index.esm.js.map +1 -1
  7. package/dist/catalyst/p-34e0cbba.entry.js +10 -0
  8. package/dist/catalyst/p-34e0cbba.entry.js.map +1 -0
  9. package/dist/catalyst/{p-d1fb9d96.js → p-ce6a1db2.js} +1 -1
  10. package/dist/catalyst/p-ce6a1db2.js.map +1 -0
  11. package/dist/catalyst/p-cf32399c.js +2 -0
  12. package/dist/catalyst/p-cf32399c.js.map +1 -0
  13. package/dist/catalyst/scss/_snippets/_checkbox-hint.scss +20 -0
  14. package/dist/catalyst/scss/utils/_border.scss +14 -0
  15. package/dist/catalyst/scss/utils/_media.mixins.scss +0 -1
  16. package/dist/catalyst/scss/utils/_typography.mixins.scss +1 -0
  17. package/dist/cjs/{cat-alert_25.cjs.entry.js → cat-alert_27.cjs.entry.js} +3628 -185
  18. package/dist/cjs/cat-alert_27.cjs.entry.js.map +1 -0
  19. package/dist/cjs/{cat-icon-registry-671af264.js → cat-icon-registry-228164a1.js} +43 -2
  20. package/dist/cjs/cat-icon-registry-228164a1.js.map +1 -0
  21. package/dist/cjs/catalyst.cjs.js +3 -3
  22. package/dist/cjs/catalyst.cjs.js.map +1 -1
  23. package/dist/cjs/{index-01312a2e.js → index-4258b31e.js} +8 -1
  24. package/dist/{catalyst/p-d1fb9d96.js.map → cjs/index-4258b31e.js.map} +1 -1
  25. package/dist/cjs/index.cjs.js +2 -2
  26. package/dist/cjs/index.cjs.js.map +1 -1
  27. package/dist/cjs/loader.cjs.js +3 -3
  28. package/dist/cjs/loader.cjs.js.map +1 -1
  29. package/dist/collection/collection-manifest.json +4 -2
  30. package/dist/collection/components/cat-alert/cat-alert.js +5 -5
  31. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  32. package/dist/collection/components/cat-button/cat-button.css +7 -7
  33. package/dist/collection/components/cat-button/cat-button.js +6 -24
  34. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  35. package/dist/collection/components/cat-checkbox/cat-checkbox.css +24 -1
  36. package/dist/collection/components/cat-checkbox/cat-checkbox.js +8 -4
  37. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  38. package/dist/collection/components/cat-datepicker/cat-datepicker.css +381 -0
  39. package/dist/collection/components/cat-datepicker/cat-datepicker.js +873 -0
  40. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -0
  41. package/dist/collection/components/cat-datepicker/datepicker-type.js +8 -0
  42. package/dist/collection/components/cat-datepicker/datepicker-type.js.map +1 -0
  43. package/dist/collection/components/cat-datepicker/dayjs.config.js +8 -0
  44. package/dist/collection/components/cat-datepicker/dayjs.config.js.map +1 -0
  45. package/dist/collection/components/cat-datepicker/vanillajs-datepicker.config.js +46 -0
  46. package/dist/collection/components/cat-datepicker/vanillajs-datepicker.config.js.map +1 -0
  47. package/dist/collection/components/cat-dropdown/cat-dropdown.css +1 -0
  48. package/dist/collection/components/cat-dropdown/cat-dropdown.js +12 -5
  49. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  50. package/dist/collection/components/cat-form-group/cat-form-group.js +1 -1
  51. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  52. package/dist/collection/components/cat-icon/cat-icon-registry.js +29 -1
  53. package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
  54. package/dist/collection/components/cat-input/cat-input.css +384 -11
  55. package/dist/collection/components/cat-input/cat-input.js +8 -4
  56. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  57. package/dist/collection/components/cat-notification/cat-notification.js +1 -1
  58. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  59. package/dist/collection/components/cat-pagination/cat-pagination.js +28 -6
  60. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  61. package/dist/collection/components/cat-radio/cat-radio.css +24 -1
  62. package/dist/collection/components/cat-radio/cat-radio.js +8 -4
  63. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  64. package/dist/collection/components/cat-radio-group/cat-radio-group.js +7 -3
  65. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  66. package/dist/collection/components/cat-scrollable/cat-scrollable.css +1 -4
  67. package/dist/collection/components/cat-select/cat-select.css +8 -11
  68. package/dist/collection/components/cat-select/cat-select.js +43 -18
  69. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  70. package/dist/collection/components/cat-skeleton/cat-skeleton.css +1 -1
  71. package/dist/collection/components/cat-textarea/cat-textarea.css +9 -12
  72. package/dist/collection/components/cat-textarea/cat-textarea.js +8 -4
  73. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  74. package/dist/collection/components/cat-timepicker/cat-timepicker.css +5 -0
  75. package/dist/collection/components/cat-timepicker/cat-timepicker.js +668 -0
  76. package/dist/collection/components/cat-timepicker/cat-timepicker.js.map +1 -0
  77. package/dist/collection/components/cat-toggle/cat-toggle.css +24 -1
  78. package/dist/collection/components/cat-toggle/cat-toggle.js +8 -4
  79. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  80. package/dist/collection/components/cat-tooltip/cat-tooltip.css +1 -1
  81. package/dist/collection/index.cdn.js +1 -0
  82. package/dist/collection/scss/_snippets/_checkbox-hint.scss +20 -0
  83. package/dist/collection/scss/utils/_border.scss +14 -0
  84. package/dist/collection/scss/utils/_media.mixins.scss +0 -1
  85. package/dist/collection/scss/utils/_typography.mixins.scss +1 -0
  86. package/dist/components/cat-alert.js +5 -5
  87. package/dist/components/cat-alert.js.map +1 -1
  88. package/dist/components/cat-button2.js +7 -9
  89. package/dist/components/cat-button2.js.map +1 -1
  90. package/dist/components/cat-checkbox2.js +2 -2
  91. package/dist/components/cat-checkbox2.js.map +1 -1
  92. package/dist/components/cat-datepicker.d.ts +11 -0
  93. package/dist/components/cat-datepicker.js +3210 -0
  94. package/dist/components/cat-datepicker.js.map +1 -0
  95. package/dist/components/cat-dropdown2.js +182 -57
  96. package/dist/components/cat-dropdown2.js.map +1 -1
  97. package/dist/components/cat-form-group.js +1 -1
  98. package/dist/components/cat-form-group.js.map +1 -1
  99. package/dist/components/cat-icon-registry.js +42 -1
  100. package/dist/components/cat-icon-registry.js.map +1 -1
  101. package/dist/components/cat-input.js +1 -226
  102. package/dist/components/cat-input.js.map +1 -1
  103. package/dist/components/cat-input2.js +230 -0
  104. package/dist/components/cat-input2.js.map +1 -0
  105. package/dist/components/cat-pagination.js +10 -5
  106. package/dist/components/cat-pagination.js.map +1 -1
  107. package/dist/components/cat-radio-group.js.map +1 -1
  108. package/dist/components/cat-radio.js +2 -2
  109. package/dist/components/cat-radio.js.map +1 -1
  110. package/dist/components/cat-scrollable2.js +7 -5
  111. package/dist/components/cat-scrollable2.js.map +1 -1
  112. package/dist/components/cat-select-demo.js +2 -2
  113. package/dist/components/cat-select-demo.js.map +1 -1
  114. package/dist/components/cat-select2.js +37 -16
  115. package/dist/components/cat-select2.js.map +1 -1
  116. package/dist/components/cat-skeleton2.js +1 -1
  117. package/dist/components/cat-skeleton2.js.map +1 -1
  118. package/dist/components/cat-textarea.js +3 -3
  119. package/dist/components/cat-textarea.js.map +1 -1
  120. package/dist/components/cat-timepicker.d.ts +11 -0
  121. package/dist/components/cat-timepicker.js +258 -0
  122. package/dist/components/cat-timepicker.js.map +1 -0
  123. package/dist/components/cat-toggle.js +2 -2
  124. package/dist/components/cat-toggle.js.map +1 -1
  125. package/dist/components/cat-tooltip.js +1 -1
  126. package/dist/components/cat-tooltip.js.map +1 -1
  127. package/dist/components/floating-ui.dom.esm.js +64 -62
  128. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  129. package/dist/components/index.js +1 -1
  130. package/dist/components/index.js.map +1 -1
  131. package/dist/esm/{cat-alert_25.entry.js → cat-alert_27.entry.js} +3627 -186
  132. package/dist/esm/cat-alert_27.entry.js.map +1 -0
  133. package/dist/esm/{cat-icon-registry-d6b80490.js → cat-icon-registry-4bd597f4.js} +43 -2
  134. package/dist/esm/cat-icon-registry-4bd597f4.js.map +1 -0
  135. package/dist/esm/catalyst.js +4 -4
  136. package/dist/esm/catalyst.js.map +1 -1
  137. package/dist/esm/{index-fc2f91a4.js → index-636ce8d6.js} +8 -1
  138. package/dist/esm/index-636ce8d6.js.map +1 -0
  139. package/dist/esm/index.js +3 -3
  140. package/dist/esm/index.js.map +1 -1
  141. package/dist/esm/loader.js +4 -4
  142. package/dist/esm/loader.js.map +1 -1
  143. package/dist/types/components/cat-button/cat-button.d.ts +0 -5
  144. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +1 -1
  145. package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +187 -0
  146. package/dist/types/components/cat-datepicker/datepicker-type.d.ts +7 -0
  147. package/dist/types/components/cat-datepicker/datepicker.d.ts +1 -0
  148. package/dist/types/components/cat-datepicker/dayjs.config.d.ts +3 -0
  149. package/dist/types/components/cat-datepicker/vanillajs-datepicker.config.d.ts +4 -0
  150. package/dist/types/components/cat-input/cat-input.d.ts +1 -1
  151. package/dist/types/components/cat-pagination/cat-pagination.d.ts +6 -0
  152. package/dist/types/components/cat-radio/cat-radio.d.ts +1 -1
  153. package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +1 -1
  154. package/dist/types/components/cat-select/cat-select.d.ts +6 -1
  155. package/dist/types/components/cat-textarea/cat-textarea.d.ts +1 -1
  156. package/dist/types/components/cat-timepicker/cat-timepicker.d.ts +158 -0
  157. package/dist/types/components/cat-toggle/cat-toggle.d.ts +1 -1
  158. package/dist/types/components.d.ts +532 -17
  159. package/package.json +22 -18
  160. package/dist/catalyst/p-ba081831.entry.js +0 -10
  161. package/dist/catalyst/p-ba081831.entry.js.map +0 -1
  162. package/dist/catalyst/p-ccfebe33.js +0 -2
  163. package/dist/catalyst/p-ccfebe33.js.map +0 -1
  164. package/dist/cjs/cat-alert_25.cjs.entry.js.map +0 -1
  165. package/dist/cjs/cat-icon-registry-671af264.js.map +0 -1
  166. package/dist/cjs/index-01312a2e.js.map +0 -1
  167. package/dist/esm/cat-alert_25.entry.js.map +0 -1
  168. package/dist/esm/cat-icon-registry-d6b80490.js.map +0 -1
  169. package/dist/esm/index-fc2f91a4.js.map +0 -1
@@ -0,0 +1,10 @@
1
+ import{r as t,h as e,H as i,g as r,c as n}from"./p-ce6a1db2.js";import{l as o,b as a,c as s,a as c,d as l}from"./p-cf32399c.js";function d(t,e,i){if(!t.hostElement.hasAttribute(e)&&i!=null){t.hostElement.setAttribute(e,String(i))}}const h=":host{display:flex;gap:0.5rem;padding:1.25rem;border-radius:var(--cat-border-radius-l, 0.5rem);margin-bottom:1rem}: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}::slotted(:last-child){margin-bottom:0 !important}:host([color=primary]){background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}:host([color=primary]) cat-icon{color:rgb(var(--cat-primary-text, 0, 129, 148))}:host([color=secondary]){background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.1)}:host([color=secondary]) cat-icon{color:#697687}:host([color=success]){background-color:rgba(var(--cat-success-bg-, 0, 132, 88), 0.1)}:host([color=success]) cat-icon{color:#008458}:host([color=warning]){background-color:rgba(var(--cat-warning-bg, 255, 206, 128), 0.1)}:host([color=warning]) cat-icon{color:#ebb663}:host([color=danger]){background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.1)}:host([color=danger]) cat-icon{color:#d9340d}";const u=class{constructor(e){t(this,e);this.mapIcon=new Map([["primary","$cat:alert-primary"],["secondary","$cat:alert-secondary"],["success","$cat:alert-success"],["warning","$cat:alert-warning"],["danger","$cat:alert-danger"]]);this.mapRole=new Map([["primary","status"],["secondary","status"],["success","status"],["warning","alert"],["danger","alert"]]);this.color="primary";this.icon=undefined;this.noIcon=false}connectedCallback(){d(this,"tabindex",0);d(this,"role",this.mapRole.get(this.color))}render(){return e(i,null,!this.noIcon&&e("cat-icon",{size:"l",icon:this.icon?this.icon:this.mapIcon.get(this.color)}),e("div",{class:"content"},e("slot",null)))}get hostElement(){return r(this)}};u.style=h;const f=t=>new Promise(((e,i)=>{const r=new Image;r.addEventListener("load",e);r.addEventListener("error",i);r.src=t}));const p=":host{display:contents}:host([hidden]){display:none}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:inherit;color:var(--cat-avatar-fill, white);background-color:var(--cat-avatar-bg, #697687);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 b=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){f(t).then((()=>this.backgroundImage=`url(${t})`),(()=>this.backgroundImage=undefined))}else{this.backgroundImage=undefined}}componentWillLoad(){this.onSrcChanged(this.src)}componentWillRender(){if(!this.label){o.warn("[A11y] Missing ARIA label on avatar",this)}}render(){if(this.url){return e("a",{href:this.url,target:this.urlTarget,style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}else{return e("span",{style:this.cssStyle,class:this.cssClass,"aria-label":this.label},this.content)}}get content(){return!this.backgroundImage?[this.icon?e("cat-icon",{icon:this.icon,size:this.size}):this.getInitials()]:[]}get cssStyle(){return{"background-image":this.backgroundImage}}get cssClass(){return{avatar:true,"avatar-round":this.round,[`avatar-${this.size}`]:Boolean(this.size)}}getInitials(){var t,e;return(t=this.initials)!==null&&t!==void 0?t:((e=this.label)!==null&&e!==void 0?e:"").split(" ").map((t=>t[0])).join("")}static get watchers(){return{src:["onSrcChanged"]}}};b.style=p;const v=":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;line-height:1.5}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgba(var(--bg), 0.1);color:rgb(var(--text));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}: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);--border: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);--border:var(--cat-secondary-bg, 105, 118, 135)}: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);--border: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);--border: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);--border:var(--cat-danger-text, 217, 52, 13)}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--border), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2)}}";const g=class{constructor(e){t(this,e);this.variant="filled";this.color="primary";this.size="m";this.round=false;this.pulse=false}render(){return e("slot",null)}get hostElement(){return r(this)}};g.style=v;const m=["xs","s","m","l","xl"];const y={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 w(t){return typeof t==="string"&&m.includes(t)}let k;try{k=typeof Intl!=="undefined"&&Intl.v8BreakIterator}catch(Re){k=false}class x{constructor(){this.EDGE=/(edge)/i.test(navigator.userAgent);this.TRIDENT=/(msie|trident)/i.test(navigator.userAgent);this.BLINK=!!(window.chrome||k)&&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 z=new Set;let S;class D{constructor(){this._platform=new x;this._matchMedia=window.matchMedia.bind(window)}matchMedia(t){if(this._platform.WEBKIT||this._platform.BLINK){A(t)}return this._matchMedia(t)}}function A(t){if(z.has(t)){return}try{if(!S){S=document.createElement("style");S.setAttribute("type","text/css");document.head.appendChild(S)}if(S.sheet){S.sheet.insertRule(`@media ${t} {body{ }}`,0);z.add(t)}}catch(t){o.error(t)}}const I=":host{display:inline-block;max-width:100%;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}.cat-button{position:relative;font:inherit;display:flex;align-items:center;justify-content:center;border:none;border-radius:var(--cat-border-radius-m, 0.25rem);text-decoration:none;width:100%;box-sizing:border-box;cursor:pointer;transition:color 0.13s linear, border-color 0.13s linear, background-color 0.13s linear, box-shadow 0.13s linear}.cat-button:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-button-content{word-wrap:break-word;word-break:break-word}.cat-button-ellipsed .cat-button-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.cat-button-disabled{cursor:not-allowed}.cat-button-round{border-radius:10rem}.cat-button-loading{cursor:default}.cat-button-loading cat-spinner{position:absolute}.cat-button-loading>*:not(cat-spinner){visibility:hidden}.cat-group-button-first{border-top-right-radius:0;border-bottom-right-radius:0}.cat-group-button-middle{border-radius:0}.cat-group-button-last{border-top-left-radius:0;border-bottom-left-radius:0}.cat-group-button:hover{z-index:1}.cat-group-button:focus-visible{z-index:2}.cat-button-filled{background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}.cat-button-filled.cat-button-disabled{--bg:242, 244, 247;--fill:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined{background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--base), 0.2);color:rgb(var(--text))}.cat-button-outlined.cat-button-disabled{--base:var(--cat-font-color-muted, 81, 92, 108);--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-outlined:hover:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-outlined:active:not(.cat-button-disabled):not(.cat-button-loading){background-color:rgba(var(--base), 0.1)}.cat-button-text{background-color:transparent;color:rgb(var(--text));text-decoration:var(--cat-link-button-decoration, none)}.cat-button-text.cat-button-disabled{--text:var(--cat-font-color-muted, 81, 92, 108)}.cat-button-text:hover:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-button-decoration-hover, none);background-color:rgba(var(--base), 0.1)}.cat-button-text.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading){text-decoration:var(--cat-link-button-decoration-hover, none);background-color:rgba(var(--base), 0.1)}.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-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;padding-left:0;padding-right: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;padding-left:0;padding-right: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;padding-left:0;padding-right: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;padding-left:0;padding-right: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;padding-left:0;padding-right: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-active:not(:hover)){--cat-primary-text:transparent}:host(.cat-text-left) .cat-button{justify-content:left}:host(.cat-text-right) .cat-button{justify-content:right}:host(.cat-nav-item){width:100%}:host(.cat-nav-item) .cat-button{box-shadow:none;border-radius:0;justify-content:left;padding-left:1.25rem;padding-right:1.25rem;gap:0.5rem}:host(.cat-nav-item) .cat-button:focus-visible{outline-offset:-2px}";const C=class{constructor(e){t(this,e);this.catClick=n(this,"catClick",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this._iconOnly=true;this.variant="outlined";this.color="secondary";this.active=false;this.size="m";this.name=undefined;this.value=undefined;this.disabled=false;this.loading=false;this.submit=false;this.noEllipsis=false;this.round=false;this.url=undefined;this.urlTarget=undefined;this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.buttonId=undefined;this.a11yLabel=undefined;this.a11yCurrent=undefined;this.nativeAttributes=undefined;this.buttonGroupPosition=undefined}onIconOnlyChanged(t){var e,i;(e=this.mediaQueryList)===null||e===void 0?void 0:e.removeEventListener("change",this.mediaQueryListener);this.mediaQueryList=undefined;this.mediaQueryListener=undefined;if(w(t)){(i=this.mediaMatcher)!==null&&i!==void 0?i:this.mediaMatcher=new D;this.mediaQueryList=this.mediaMatcher.matchMedia(y[t]);this.mediaQueryListener=t=>this._iconOnly=t.matches;this.mediaQueryList.addEventListener("change",this.mediaQueryListener);this._iconOnly=this.mediaQueryList.matches}else{this._iconOnly=t}}componentWillLoad(){this.onIconOnlyChanged(this.iconOnly)}componentWillRender(){if(this.isIconButton&&!this.a11yLabel){o.warn("[A11y] Missing ARIA label on icon button",this)}}haltDisabledEvents(t){if(this.disabled||this.loading){t.preventDefault();t.stopImmediatePropagation()}}async doFocus(t){this.button.focus(t)}async doBlur(){this.button.blur()}async doClick(){this.button.click()}render(){var t;if(this.url){return e("a",{ref:t=>this.button=t,href:this.disabled?undefined:this.url,target:this.urlTarget,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":this.round,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)},this.content)}else{return e("button",Object.assign({},this.nativeAttributes,{ref:t=>this.button=t,type:this.submit?"submit":"button",name:this.name,value:this.value,disabled:this.disabled,"aria-disabled":this.disabled?"true":null,"aria-label":this.a11yLabel,"aria-current":this.a11yCurrent,id:this.buttonId,part:"button",class:{"cat-button":true,"cat-button-active":this.active,"cat-button-icon":this.isIconButton,"cat-button-round":(t=this.round)!==null&&t!==void 0?t:this.isIconButton,"cat-button-loading":this.loading,"cat-button-disabled":this.disabled,"cat-button-ellipsed":!this.noEllipsis&&!this.isIconButton,[`cat-button-${this.variant}`]:Boolean(this.variant),[`cat-button-${this.color}`]:Boolean(this.color),[`cat-button-${this.size}`]:Boolean(this.size),[`cat-group-button-${this.buttonGroupPosition}`]:Boolean(this.buttonGroupPosition),"cat-group-button":Boolean(this.buttonGroupPosition)},onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)}),this.content)}}get iconSize(){switch(this.size){case"xs":return"s";default:return"l"}}get spinnerSize(){switch(this.size){case"xs":return"xs";default:return"m"}}get isIconButton(){return Boolean(this.icon)&&this._iconOnly}get hasPrefixIcon(){return Boolean(this.icon)&&!this._iconOnly&&!this.iconRight}get hasSuffixIcon(){return Boolean(this.icon)&&!this._iconOnly&&this.iconRight}get content(){return[this.hasPrefixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"prefix"}):null,this.isIconButton?e("cat-icon",{icon:this.icon,size:this.iconSize}):e("span",{class:"cat-button-content",part:"content"},e("slot",null)),this.hasSuffixIcon?e("cat-icon",{icon:this.icon,size:this.iconSize,part:"suffix"}):null,this.loading?e("cat-spinner",{size:this.spinnerSize}):null]}onClick(t){this.catClick.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get watchers(){return{iconOnly:["onIconOnlyChanged"]}}};C.style=I;const M=":host{position:relative;display:inline-flex;vertical-align:middle}::slotted(cat-button[variant=outlined]),::slotted(cat-button:not([variant])){margin-right:-1px}::slotted(cat-button[variant=outlined]:last-child),::slotted(cat-button:not([variant]):last-child){margin-right:0}";const B=class{constructor(e){t(this,e);this.formElements=[];this.a11yLabel=undefined}render(){return e(i,{role:"group","aria-label":this.a11yLabel},e("slot",{onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-button"));this.formElements.forEach(((t,e)=>{t.buttonGroupPosition=e===0?"first":e===this.formElements.length-1?"last":"middle"}))}get hostElement(){return r(this)}};B.style=M;const $=":host{display:block;margin-bottom:1rem;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:-0.75rem -1.25rem !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 O=class{constructor(e){t(this,e)}render(){return e("slot",null)}};O.style=$;const T=t=>{var i;const{id:r,hint:n,slottedHint:o,errorMap:s}=t;const c=Object.entries(s||{});return e("div",{id:r+"-hint",class:"hint-section"},c.length?c.map((([i,r])=>{var n;return e("p",{class:((n=t.class)!==null&&n!==void 0?n:"")+" input-hint cat-text-danger"},a.t(`error.${i}`,r))})):[n&&(Array.isArray(n)?n.map((i=>{var r;return e("p",{class:((r=t.class)!==null&&r!==void 0?r:"")+" input-hint"},i)})):e("p",{class:((i=t.class)!==null&&i!==void 0?i:"")+" input-hint"},n)),o])};const E=".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;min-width:0}.input-hint,::slotted([slot=hint]){color:rgb(var(--cat-font-color-muted, 81, 92, 108));line-height:1.5;flex:1 1 auto;min-width:0}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}: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 + 1px)}.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 0.13s ease, border-color 0.13s ease;pointer-events:none}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 0.13s 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 .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))}";let N=0;const F=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this._id=`cat-checkbox-${N++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.indeterminate=false;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentDidLoad(){if(this.input&&this.indeterminate){this.input.indeterminate=true}}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){o.warn("[A11y] Missing ARIA label on checkbox",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}async doClick(){this.input.click()}render(){return e(i,null,e("label",{htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",Object.assign({},this.nativeAttributes,{ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value!==undefined?String(this.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)})),e("span",{class:"box","aria-hidden":"true",part:"checkbox"},e("svg",{class:"check",viewBox:"0 0 12 10"},e("polyline",{points:"1.5 6 4.5 9 10.5 1"})),e("svg",{class:"dash",viewBox:"0 0 12 10"},e("polyline",{points:"1.5 5 10.5 5"}))),e("span",{class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),(this.hint||this.hasSlottedHint)&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"box-placeholder"}),e(T,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}onInput(t){this.checked=this.input.checked;if(!this.value||typeof this.value==="boolean"){this.value=this.checked}this.catChange.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return r(this)}};F.style=E;var j=s((function(t,e){!function(e,i){t.exports=i()}(c,(function(){var t=1e3,e=6e4,i=36e5,r="millisecond",n="second",o="minute",a="hour",s="day",c="week",l="month",d="quarter",h="year",u="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},g=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},m={s:g,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(n,2,"0")},m:function t(e,i){if(e.date()<i.date())return-t(i,e);var r=12*(i.year()-e.year())+(i.month()-e.month()),n=e.clone().add(r,l),o=i-n<0,a=e.clone().add(r+(o?-1:1),l);return+(-(r+(i-n)/(o?n-a:a-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:h,w:c,d:s,D:u,h:a,m:o,s:n,ms:r,Q:d}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",w={};w[y]=v;var k=function(t){return t instanceof D},x=function t(e,i,r){var n;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();w[o]&&(n=o),i&&(w[o]=i,n=o);var a=e.split("-");if(!n&&a.length>1)return t(a[0])}else{var s=e.name;w[s]=e,n=s}return!r&&n&&(y=n),n||!r&&y},z=function(t,e){if(k(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new D(i)},S=m;S.l=x,S.i=k,S.w=function(t,e){return z(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function v(t){this.$L=x(t.locale,null,!0),this.parse(t)}var g=v.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(t,e){var i=z(t);return this.startOf(e)<=i&&i<=this.endOf(e)},g.isAfter=function(t,e){return z(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<z(t)},g.$g=function(t,e,i){return S.u(t)?this[e]:this.set(i,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var i=this,r=!!S.u(e)||e,d=S.p(t),f=function(t,e){var n=S.w(i.$u?Date.UTC(i.$y,e,t):new Date(i.$y,e,t),i);return r?n:n.endOf(s)},p=function(t,e){return S.w(i.toDate()[t].apply(i.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),i)},b=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(d){case h:return r?f(1,0):f(31,11);case l:return r?f(1,v):f(0,v+1);case c:var y=this.$locale().weekStart||0,w=(b<y?b+7:b)-y;return f(r?g-w:g+(6-w),v);case s:case u:return p(m+"Hours",0);case a:return p(m+"Minutes",1);case o:return p(m+"Seconds",2);case n:return p(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var i,c=S.p(t),d="set"+(this.$u?"UTC":""),f=(i={},i[s]=d+"Date",i[u]=d+"Date",i[l]=d+"Month",i[h]=d+"FullYear",i[a]=d+"Hours",i[o]=d+"Minutes",i[n]=d+"Seconds",i[r]=d+"Milliseconds",i)[c],p=c===s?this.$D+(e-this.$W):e;if(c===l||c===h){var b=this.clone().set(u,1);b.$d[f](p),b.init(),this.$d=b.set(u,Math.min(this.$D,b.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[S.p(t)]()},g.add=function(r,d){var u,f=this;r=Number(r);var p=S.p(d),b=function(t){var e=z(f);return S.w(e.date(e.date()+Math.round(t*r)),f)};if(p===l)return this.set(l,this.$M+r);if(p===h)return this.set(h,this.$y+r);if(p===s)return b(1);if(p===c)return b(7);var v=(u={},u[o]=e,u[a]=i,u[n]=t,u)[p]||1,g=this.$d.getTime()+r*v;return S.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,i=this.$locale();if(!this.isValid())return i.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",n=S.z(this),o=this.$H,a=this.$m,s=this.$M,c=i.weekdays,l=i.months,d=function(t,i,n,o){return t&&(t[i]||t(e,r))||n[i].slice(0,o)},h=function(t){return S.s(o%12||12,t,"0")},u=i.meridiem||function(t,e,i){var r=t<12?"AM":"PM";return i?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:d(i.monthsShort,s,l,3),MMMM:d(l,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:d(i.weekdaysMin,this.$W,c,2),ddd:d(i.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:S.s(o,2,"0"),h:h(1),hh:h(2),a:u(o,a,!0),A:u(o,a,!1),m:String(a),mm:S.s(a,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:n};return r.replace(b,(function(t,e){return e||p[t]||n.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,u,f){var p,b=S.p(u),v=z(r),g=(v.utcOffset()-this.utcOffset())*e,m=this-v,y=S.m(this,v);return y=(p={},p[h]=y/12,p[l]=y,p[d]=y/3,p[c]=(m-g)/6048e5,p[s]=(m-g)/864e5,p[a]=m/i,p[o]=m/e,p[n]=m/t,p)[b]||m,f?y:S.a(y)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return w[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var i=this.clone(),r=x(t,e,!0);return r&&(i.$L=r),i},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),A=D.prototype;return z.prototype=A,[["$ms",r],["$s",n],["$m",o],["$H",a],["$W",s],["$M",l],["$y",h],["$D",u]].forEach((function(t){A[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),z.extend=function(t,e){return t.$i||(t(e,D,z),t.$i=!0),z},z.locale=x,z.isDayjs=k,z.unix=function(t){return z(1e3*t)},z.en=w[y],z.Ls=w,z.p={},z}))}));var L=s((function(t,e){!function(e,i){t.exports=i()}(c,(function(){var t="day";return function(e,i,r){var n=function(e){return e.add(4-e.isoWeekday(),t)},o=i.prototype;o.isoWeekYear=function(){return n(this).year()},o.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var i,o,a,s,c=n(this),l=(i=this.isoWeekYear(),o=this.$u,a=(o?r.utc:r)().year(i).startOf("year"),s=4-a.isoWeekday(),a.isoWeekday()>4&&(s+=7),a.add(s,t));return c.diff(l,"week")+1},o.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=o.startOf;o.startOf=function(t,e){var i=this.$utils(),r=!!i.u(e)||e;return"isoweek"===i.p(t)?r?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}))}));var R=s((function(t,e){!function(e,i){t.exports=i()}(c,(function(){var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(r,n,o){var a=n.prototype;o.utc=function(t){var e={date:t,utc:!0,args:arguments};return new n(e)},a.utc=function(e){var i=o(this.toDate(),{locale:this.$L,utc:!0});return e?i.add(this.utcOffset(),t):i},a.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),s.call(this,t)};var c=a.init;a.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(r,n){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?l.call(this):this.$offset;if("string"==typeof r&&(r=function(t){void 0===t&&(t="");var r=t.match(e);if(!r)return null;var n=(""+r[0]).match(i)||["-",0,0],o=n[0],a=60*+n[1]+ +n[2];return 0===a?0:"+"===o?a:-a}(r),null===r))return this;var a=Math.abs(r)<=16?60*r:r,s=this;if(n)return s.$offset=a,s.$u=0===r,s;if(0!==r){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(a+c,t)).$offset=a,s.$x.$localOffset=c}else s=this.utc();return s};var d=a.format;a.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,e)},a.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(t){return"s"===t&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var u=a.diff;a.diff=function(t,e,i){if(t&&this.$u===t.$u)return u.call(this,t,e,i);var r=this.local(),n=o(t).local();return u.call(r,n,e,i)}}}))}));j.extend(L);j.extend(R);const P=()=>j().utc().startOf("day").toDate();function _(t){return t[t.length-1]}function H(t,...e){e.forEach((e=>{if(t.includes(e)){return}t.push(e)}));return t}function W(t,e){return t?t.split(e):[]}function K(t,e,i){const r=e===undefined||t>=e;const n=i===undefined||t<=i;return r&&n}function U(t,e,i){if(t<e){return e}if(t>i){return i}return t}function V(t,e,i={},r=0,n=""){const o=Object.keys(i).reduce(((t,e)=>{let n=i[e];if(typeof n==="function"){n=n(r)}return`${t} ${e}="${n}"`}),t);n+=`<${o}></${t}>`;const a=r+1;return a<e?V(t,e,i,a,n):n}function q(t){return t.replace(/>\s+/g,">").replace(/\s+</,"<")}function Y(t){return new Date(t).setHours(0,0,0,0)}function G(){return(new Date).setHours(0,0,0,0)}function J(...t){switch(t.length){case 0:return G();case 1:return Y(t[0])}const e=new Date(0);e.setFullYear(...t);return e.setHours(0,0,0,0)}function X(t,e){const i=new Date(t);return i.setDate(i.getDate()+e)}function Z(t,e){return X(t,e*7)}function Q(t,e){const i=new Date(t);const r=i.getMonth()+e;let n=r%12;if(n<0){n+=12}const o=i.setMonth(r);return i.getMonth()!==n?i.setDate(0):o}function tt(t,e){const i=new Date(t);const r=i.getMonth();const n=i.setFullYear(i.getFullYear()+e);return r===1&&i.getMonth()===2?i.setDate(0):n}function et(t,e){return(t-e+7)%7}function it(t,e,i=0){const r=new Date(t).getDay();return X(t,et(e,i)-et(r,i))}function rt(t,e){return Math.round((t-e)/6048e5)+1}function nt(t){const e=it(t,4,1);const i=it(new Date(e).setMonth(0,4),4,1);return rt(e,i)}function ot(t,e){const i=it(new Date(t).setMonth(0,1),e,e);const r=it(t,e,e);const n=rt(r,i);if(n<53){return n}const o=it(new Date(t).setDate(32),e,e);return r===o?1:n}function at(t){return ot(t,0)}function st(t){return ot(t,6)}function ct(t,e){const i=new Date(t).getFullYear();return Math.floor(i/e)*e}function lt(t,e,i){if(e!==1&&e!==2){return t}const r=new Date(t);if(e===1){i?r.setMonth(r.getMonth()+1,0):r.setDate(1)}else{i?r.setFullYear(r.getFullYear()+1,0,0):r.setMonth(0,1)}return r.setHours(0,0,0,0)}const dt=/dd?|DD?|mm?|MM?|yy?(?:yy)?/;const ht=/[\s!-/:-@[-`{-~年月日]+/;let ut={};const ft={y(t,e){return new Date(t).setFullYear(parseInt(e,10))},m(t,e,i){const r=new Date(t);let n=parseInt(e,10)-1;if(isNaN(n)){if(!e){return NaN}const t=e.toLowerCase();const r=e=>e.toLowerCase().startsWith(t);n=i.monthsShort.findIndex(r);if(n<0){n=i.months.findIndex(r)}if(n<0){return NaN}}r.setMonth(n);return r.getMonth()!==bt(n)?r.setDate(0):r.getTime()},d(t,e){return new Date(t).setDate(parseInt(e,10))}};const pt={d(t){return t.getDate()},dd(t){return vt(t.getDate(),2)},D(t,e){return e.daysShort[t.getDay()]},DD(t,e){return e.days[t.getDay()]},m(t){return t.getMonth()+1},mm(t){return vt(t.getMonth()+1,2)},M(t,e){return e.monthsShort[t.getMonth()]},MM(t,e){return e.months[t.getMonth()]},y(t){return t.getFullYear()},yy(t){return vt(t.getFullYear(),2).slice(-2)},yyyy(t){return vt(t.getFullYear(),4)}};function bt(t){return t>-1?t%12:bt(t+12)}function vt(t,e){return t.toString().padStart(e,"0")}function gt(t){if(typeof t!=="string"){throw new Error("Invalid date format.")}if(t in ut){return ut[t]}const e=t.split(dt);const i=t.match(new RegExp(dt,"g"));if(e.length===0||!i){throw new Error("Invalid date format.")}const r=i.map((t=>pt[t]));const n=Object.keys(ft).reduce(((t,e)=>{const r=i.find((t=>t[0]!=="D"&&t[0].toLowerCase()===e));if(r){t.push(e)}return t}),[]);return ut[t]={parser(t,e){const r=t.split(ht).reduce(((t,e,r)=>{if(e.length>0&&i[r]){const n=i[r][0];if(n==="M"){t.m=e}else if(n!=="D"){t[n]=e}}return t}),{});return n.reduce(((t,i)=>{const n=ft[i](t,r[i],e);return isNaN(n)?t:n}),G())},formatter(t,i){let n=r.reduce(((r,n,o)=>r+=`${e[o]}${n(t,i)}`),"");return n+=_(e)}}}function mt(t,e,i){if(t instanceof Date||typeof t==="number"){const e=Y(t);return isNaN(e)?undefined:e}if(!t){return undefined}if(t==="today"){return G()}if(e&&e.toValue){const r=e.toValue(t,e,i);return isNaN(r)?undefined:Y(r)}return gt(e).parser(t,i)}function yt(t,e,i){if(isNaN(t)||!t&&t!==0){return""}const r=typeof t==="number"?new Date(t):t;if(e.toDisplay){return e.toDisplay(r,e,i)}return gt(e).formatter(r,i)}const wt=document.createRange();function kt(t){return wt.createContextualFragment(t)}function xt(t){return t.parentElement||(t.parentNode instanceof ShadowRoot?t.parentNode.host:undefined)}function zt(t){return t.getRootNode().activeElement===t}function St(t){if(t.style.display==="none"){return}if(t.style.display){t.dataset.styleDisplay=t.style.display}t.style.display="none"}function Dt(t){if(t.style.display!=="none"){return}if(t.dataset.styleDisplay){t.style.display=t.dataset.styleDisplay;delete t.dataset.styleDisplay}else{t.style.display=""}}function At(t){if(t.firstChild){t.removeChild(t.firstChild);At(t)}}function It(t,e){At(t);if(e instanceof DocumentFragment){t.appendChild(e)}else if(typeof e==="string"){t.appendChild(kt(e))}else if(typeof e.forEach==="function"){e.forEach((e=>{t.appendChild(e)}))}}const Ct=new WeakMap;const{addEventListener:Mt,removeEventListener:Bt}=EventTarget.prototype;function $t(t,e){let i=Ct.get(t);if(!i){i=[];Ct.set(t,i)}e.forEach((t=>{Mt.call(...t);i.push(t)}))}function Ot(t){let e=Ct.get(t);if(!e){return}e.forEach((t=>{Bt.call(...t)}));Ct.delete(t)}if(!Event.prototype.composedPath){const t=(e,i=[])=>{i.push(e);let r;if(e.parentNode){r=e.parentNode}else if(e.host){r=e.host}else if(e.defaultView){r=e.defaultView}return r?t(r,i):i};Event.prototype.composedPath=function(){return t(this.target)}}function Tt(t,e,i){const[r,...n]=t;if(e(r)){return r}if(r===i||r.tagName==="HTML"||n.length===0){return}return Tt(n,e,i)}function Et(t,e){const i=typeof e==="function"?e:t=>t instanceof Element&&t.matches(e);return Tt(t.composedPath(),i,t.currentTarget)}const Nt={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}};const Ft={autohide:false,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,clearButton:false,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:undefined,disableTouchKeyboard:false,enableOnReadonly:true,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"»",orientation:"auto",pickLevel:0,prevArrow:"«",showDaysOfWeek:true,showOnClick:true,showOnFocus:true,startView:0,title:"",todayButton:false,todayButtonMode:0,todayHighlight:false,updateOnBlur:true,weekNumbers:0,weekStart:0};const{language:jt,format:Lt,weekStart:Rt}=Ft;function Pt(t,e){return t.length<6&&e>=0&&e<7?H(t,e):t}function _t(t,e){const i=t===4?e===6?3:!e+1:t;switch(i){case 1:return nt;case 2:return at;case 3:return st}}function Ht(t,e,i){e.weekStart=t;e.weekEnd=(t+6)%7;if(i===4){e.getWeekNumber=_t(4,t)}return t}function Wt(t,e,i,r){const n=mt(t,e,i);return n!==undefined?n:r}function Kt(t,e,i=3){const r=parseInt(t,10);return r>=0&&r<=i?r:e}function Ut(t,e,i,r=undefined){if(e in t){if(!(i in t)){t[i]=r?r(t[e]):t[e]}delete t[e]}}function Vt(t,e){const i=Object.assign({},t);const r={};const n=e.constructor.locales;const o=!!e.rangeSideIndex;let{datesDisabled:a,format:s,language:c,locale:l,maxDate:d,maxView:h,minDate:u,pickLevel:f,startView:p,weekNumbers:b,weekStart:v}=e.config||{};Ut(i,"calendarWeeks","weekNumbers",(t=>t?1:0));Ut(i,"clearBtn","clearButton");Ut(i,"todayBtn","todayButton");Ut(i,"todayBtnMode","todayButtonMode");if(i.language){let t;if(i.language!==c){if(n[i.language]){t=i.language}else{t=i.language.split("-")[0];if(!n[t]){t=false}}}delete i.language;if(t){c=r.language=t;const e=l||n[jt];l=Object.assign({format:Lt,weekStart:Rt},n[jt]);if(c!==jt){Object.assign(l,n[c])}r.locale=l;if(s===e.format){s=r.format=l.format}if(v===e.weekStart){v=Ht(l.weekStart,r,b)}}}if(i.format){const t=typeof i.format.toDisplay==="function";const e=typeof i.format.toValue==="function";const n=dt.test(i.format);if(t&&e||n){s=r.format=i.format}delete i.format}let g=f;if("pickLevel"in i){g=Kt(i.pickLevel,f,2);delete i.pickLevel}if(g!==f){if(g>f){if(!("minDate"in i)){i.minDate=u}if(!("maxDate"in i)){i.maxDate=d}}if(a&&!i.datesDisabled){i.datesDisabled=[]}f=r.pickLevel=g}let m=u;let y=d;if("minDate"in i){const t=J(0,0,1);m=i.minDate===null?t:Wt(i.minDate,s,l,m);if(m!==t){m=lt(m,f,false)}delete i.minDate}if("maxDate"in i){y=i.maxDate===null?undefined:Wt(i.maxDate,s,l,y);if(y!==undefined){y=lt(y,f,true)}delete i.maxDate}if(y<m){u=r.minDate=y;d=r.maxDate=m}else{if(u!==m){u=r.minDate=m}if(d!==y){d=r.maxDate=y}}if(i.datesDisabled){const t=i.datesDisabled;if(typeof t==="function"){r.datesDisabled=null;r.checkDisabled=(e,i)=>t(new Date(e),i,o)}else{const e=r.datesDisabled=t.reduce(((t,e)=>{const i=mt(e,s,l);return i!==undefined?H(t,lt(i,f,o)):t}),[]);r.checkDisabled=t=>e.includes(t)}delete i.datesDisabled}if("defaultViewDate"in i){const t=mt(i.defaultViewDate,s,l);if(t!==undefined){r.defaultViewDate=t}delete i.defaultViewDate}if("weekStart"in i){const t=Number(i.weekStart)%7;if(!isNaN(t)){v=Ht(t,r,b)}delete i.weekStart}if(i.daysOfWeekDisabled){r.daysOfWeekDisabled=i.daysOfWeekDisabled.reduce(Pt,[]);delete i.daysOfWeekDisabled}if(i.daysOfWeekHighlighted){r.daysOfWeekHighlighted=i.daysOfWeekHighlighted.reduce(Pt,[]);delete i.daysOfWeekHighlighted}if("weekNumbers"in i){let t=i.weekNumbers;if(t){const e=typeof t==="function"?(e,i)=>t(new Date(e),i):_t(t=parseInt(t,10),v);if(e){b=r.weekNumbers=t;r.getWeekNumber=e}}else{b=r.weekNumbers=0;r.getWeekNumber=null}delete i.weekNumbers}if("maxNumberOfDates"in i){const t=parseInt(i.maxNumberOfDates,10);if(t>=0){r.maxNumberOfDates=t;r.multidate=t!==1}delete i.maxNumberOfDates}if(i.dateDelimiter){r.dateDelimiter=String(i.dateDelimiter);delete i.dateDelimiter}let w=h;if("maxView"in i){w=Kt(i.maxView,h);delete i.maxView}w=f>w?f:w;if(w!==h){h=r.maxView=w}let k=p;if("startView"in i){k=Kt(i.startView,k);delete i.startView}if(k<f){k=f}else if(k>h){k=h}if(k!==p){r.startView=k}if(i.prevArrow){const t=kt(i.prevArrow);if(t.childNodes.length>0){r.prevArrow=t.childNodes}delete i.prevArrow}if(i.nextArrow){const t=kt(i.nextArrow);if(t.childNodes.length>0){r.nextArrow=t.childNodes}delete i.nextArrow}if("disableTouchKeyboard"in i){r.disableTouchKeyboard="ontouchstart"in document&&!!i.disableTouchKeyboard;delete i.disableTouchKeyboard}if(i.orientation){const t=i.orientation.toLowerCase().split(/\s+/g);r.orientation={x:t.find((t=>t==="left"||t==="right"))||"auto",y:t.find((t=>t==="top"||t==="bottom"))||"auto"};delete i.orientation}if("todayButtonMode"in i){switch(i.todayButtonMode){case 0:case 1:r.todayButtonMode=i.todayButtonMode}delete i.todayButtonMode}Object.entries(i).forEach((([t,e])=>{if(e!==undefined&&t in Ft){r[t]=e}}));return r}const qt={show:{key:"ArrowDown"},hide:null,toggle:{key:"Escape"},prevButton:{key:"ArrowLeft",ctrlOrMetaKey:true},nextButton:{key:"ArrowRight",ctrlOrMetaKey:true},viewSwitch:{key:"ArrowUp",ctrlOrMetaKey:true},clearButton:{key:"Backspace",ctrlOrMetaKey:true},todayButton:{key:".",ctrlOrMetaKey:true},exitEditMode:{key:"ArrowDown",ctrlOrMetaKey:true}};function Yt(t){return Object.keys(qt).reduce(((e,i)=>{const r=t[i]===undefined?qt[i]:t[i];const n=r&&r.key;if(!n||typeof n!=="string"){return e}const o={key:n,ctrlOrMetaKey:!!(r.ctrlOrMetaKey||r.ctrlKey||r.metaKey)};if(n.length>1){o.altKey=!!r.altKey;o.shiftKey=!!r.shiftKey}e[i]=o;return e}),{})}const Gt=q(`<div class="datepicker">\n <div class="datepicker-picker">\n <div class="datepicker-header">\n <div class="datepicker-title"></div>\n <div class="datepicker-controls">\n <button type="button" class="%buttonClass% prev-button prev-btn"></button>\n <button type="button" class="%buttonClass% view-switch"></button>\n <button type="button" class="%buttonClass% next-button next-btn"></button>\n </div>\n </div>\n <div class="datepicker-main"></div>\n <div class="datepicker-footer">\n <div class="datepicker-controls">\n <button type="button" class="%buttonClass% today-button today-btn"></button>\n <button type="button" class="%buttonClass% clear-button clear-btn"></button>\n </div>\n </div>\n </div>\n</div>`);const Jt=q(`<div class="days">\n <div class="days-of-week">${V("span",7,{class:"dow"})}</div>\n <div class="datepicker-grid">${V("span",42)}</div>\n</div>`);const Xt=q(`<div class="week-numbers calendar-weeks">\n <div class="days-of-week"><span class="dow"></span></div>\n <div class="weeks">${V("span",6,{class:"week"})}</div>\n</div>`);class Zt{constructor(t,e){Object.assign(this,e,{picker:t,element:kt(`<div class="datepicker-view"></div>`).firstChild,selected:[],isRangeEnd:!!t.datepicker.rangeSideIndex});this.init(this.picker.datepicker.config)}init(t){if("pickLevel"in t){this.isMinView=this.id===t.pickLevel}this.setOptions(t);this.updateFocus();this.updateSelection()}prepareForRender(t,e,i){this.disabled=[];const r=this.picker;r.setViewSwitchLabel(t);r.setPrevButtonDisabled(e);r.setNextButtonDisabled(i)}setDisabled(t,e){e.add("disabled");H(this.disabled,t)}performBeforeHook(t,e){let i=this.beforeShow(new Date(e));switch(typeof i){case"boolean":i={enabled:i};break;case"string":i={classes:i}}if(i){const r=t.classList;if(i.enabled===false){this.setDisabled(e,r)}if(i.classes){const t=i.classes.split(/\s+/);r.add(...t);if(t.includes("disabled")){this.setDisabled(e,r)}}if(i.content){It(t,i.content)}}}renderCell(t,e,i,r,{selected:n,range:o},a,s=[]){t.textContent=e;if(this.isMinView){t.dataset.date=r}const c=t.classList;t.className=`datepicker-cell ${this.cellClass}`;if(i<this.first){c.add("prev")}else if(i>this.last){c.add("next")}c.add(...s);if(a||this.checkDisabled(r,this.id)){this.setDisabled(r,c)}if(o){const[t,e]=o;if(i>t&&i<e){c.add("range")}if(i===t){c.add("range-start")}if(i===e){c.add("range-end")}}if(n.includes(i)){c.add("selected")}if(i===this.focused){c.add("focused")}if(this.beforeShow){this.performBeforeHook(t,r)}}refreshCell(t,e,i,[r,n]){const o=t.classList;o.remove("range","range-start","range-end","selected","focused");if(e>r&&e<n){o.add("range")}if(e===r){o.add("range-start")}if(e===n){o.add("range-end")}if(i.includes(e)){o.add("selected")}if(e===this.focused){o.add("focused")}}changeFocusedCell(t){this.grid.querySelectorAll(".focused").forEach((t=>{t.classList.remove("focused")}));this.grid.children[t].classList.add("focused")}}class Qt extends Zt{constructor(t){super(t,{id:0,name:"days",cellClass:"day"})}init(t,e=true){if(e){const t=kt(Jt).firstChild;this.dow=t.firstChild;this.grid=t.lastChild;this.element.appendChild(t)}super.init(t)}setOptions(t){let e;if("minDate"in t){this.minDate=t.minDate}if("maxDate"in t){this.maxDate=t.maxDate}if(t.checkDisabled){this.checkDisabled=t.checkDisabled}if(t.daysOfWeekDisabled){this.daysOfWeekDisabled=t.daysOfWeekDisabled;e=true}if(t.daysOfWeekHighlighted){this.daysOfWeekHighlighted=t.daysOfWeekHighlighted}if("todayHighlight"in t){this.todayHighlight=t.todayHighlight}if("weekStart"in t){this.weekStart=t.weekStart;this.weekEnd=t.weekEnd;e=true}if(t.locale){const i=this.locale=t.locale;this.dayNames=i.daysMin;this.switchLabelFormat=i.titleFormat;e=true}if("beforeShowDay"in t){this.beforeShow=typeof t.beforeShowDay==="function"?t.beforeShowDay:undefined}if("weekNumbers"in t){if(t.weekNumbers&&!this.weekNumbers){const t=kt(Xt).firstChild;this.weekNumbers={element:t,dow:t.firstChild,weeks:t.lastChild};this.element.insertBefore(t,this.element.firstChild)}else if(this.weekNumbers&&!t.weekNumbers){this.element.removeChild(this.weekNumbers.element);this.weekNumbers=null}}if("getWeekNumber"in t){this.getWeekNumber=t.getWeekNumber}if("showDaysOfWeek"in t){if(t.showDaysOfWeek){Dt(this.dow);if(this.weekNumbers){Dt(this.weekNumbers.dow)}}else{St(this.dow);if(this.weekNumbers){St(this.weekNumbers.dow)}}}if(e){Array.from(this.dow.children).forEach(((t,e)=>{const i=(this.weekStart+e)%7;t.textContent=this.dayNames[i];t.className=this.daysOfWeekDisabled.includes(i)?"dow disabled":"dow"}))}}updateFocus(){const t=new Date(this.picker.viewDate);const e=t.getFullYear();const i=t.getMonth();const r=J(e,i,1);const n=it(r,this.weekStart,this.weekStart);this.first=r;this.last=J(e,i+1,0);this.start=n;this.focused=this.picker.viewDate}updateSelection(){const{dates:t,rangepicker:e}=this.picker.datepicker;this.selected=t;if(e){this.range=e.dates}}render(){this.today=this.todayHighlight?G():undefined;this.prepareForRender(yt(this.focused,this.switchLabelFormat,this.locale),this.first<=this.minDate,this.last>=this.maxDate);if(this.weekNumbers){const t=this.weekStart;const e=it(this.first,t,t);Array.from(this.weekNumbers.weeks.children).forEach(((i,r)=>{const n=Z(e,r);i.textContent=this.getWeekNumber(n,t);if(r>3){i.classList[n>this.last?"add":"remove"]("next")}}))}Array.from(this.grid.children).forEach(((t,e)=>{const i=X(this.start,e);const r=new Date(i);const n=r.getDay();const o=[];if(this.today===i){o.push("today")}if(this.daysOfWeekHighlighted.includes(n)){o.push("highlighted")}this.renderCell(t,r.getDate(),i,i,this,i<this.minDate||i>this.maxDate||this.daysOfWeekDisabled.includes(n),o)}))}refresh(){const t=this.range||[];Array.from(this.grid.children).forEach((e=>{this.refreshCell(e,Number(e.dataset.date),this.selected,t)}))}refreshFocus(){this.changeFocusedCell(Math.round((this.focused-this.start)/864e5))}}function te(t,e){if(!t||!t[0]||!t[1]){return}const[[i,r],[n,o]]=t;if(i>e||n<e){return}return[i===e?r:-1,n===e?o:12]}class ee extends Zt{constructor(t){super(t,{id:1,name:"months",cellClass:"month"})}init(t,e=true){if(e){this.grid=this.element;this.element.classList.add("months","datepicker-grid");this.grid.appendChild(kt(V("span",12,{"data-month":t=>t})));this.first=0;this.last=11}super.init(t)}setOptions(t){if(t.locale){this.monthNames=t.locale.monthsShort}if("minDate"in t){if(t.minDate===undefined){this.minYear=this.minMonth=this.minDate=undefined}else{const e=new Date(t.minDate);this.minYear=e.getFullYear();this.minMonth=e.getMonth();this.minDate=e.setDate(1)}}if("maxDate"in t){if(t.maxDate===undefined){this.maxYear=this.maxMonth=this.maxDate=undefined}else{const e=new Date(t.maxDate);this.maxYear=e.getFullYear();this.maxMonth=e.getMonth();this.maxDate=J(this.maxYear,this.maxMonth+1,0)}}if(t.checkDisabled){this.checkDisabled=this.isMinView||t.datesDisabled===null?t.checkDisabled:()=>false}if("beforeShowMonth"in t){this.beforeShow=typeof t.beforeShowMonth==="function"?t.beforeShowMonth:undefined}}updateFocus(){const t=new Date(this.picker.viewDate);this.year=t.getFullYear();this.focused=t.getMonth()}updateSelection(){const{dates:t,rangepicker:e}=this.picker.datepicker;this.selected=t.reduce(((t,e)=>{const i=new Date(e);const r=i.getFullYear();const n=i.getMonth();if(t[r]===undefined){t[r]=[n]}else{H(t[r],n)}return t}),{});if(e&&e.dates){this.range=e.dates.map((t=>{const e=new Date(t);return isNaN(e)?undefined:[e.getFullYear(),e.getMonth()]}))}}render(){this.prepareForRender(this.year,this.year<=this.minYear,this.year>=this.maxYear);const t=this.selected[this.year]||[];const e=this.year<this.minYear||this.year>this.maxYear;const i=this.year===this.minYear;const r=this.year===this.maxYear;const n=te(this.range,this.year);Array.from(this.grid.children).forEach(((o,a)=>{const s=lt(new Date(this.year,a,1),1,this.isRangeEnd);this.renderCell(o,this.monthNames[a],a,s,{selected:t,range:n},e||i&&a<this.minMonth||r&&a>this.maxMonth)}))}refresh(){const t=this.selected[this.year]||[];const e=te(this.range,this.year)||[];Array.from(this.grid.children).forEach(((i,r)=>{this.refreshCell(i,r,t,e)}))}refreshFocus(){this.changeFocusedCell(this.focused)}}function ie(t){return[...t].reduce(((t,e,i)=>t+=i?e:e.toUpperCase()),"")}class re extends Zt{constructor(t,e){super(t,e)}init(t,e=true){if(e){this.navStep=this.step*10;this.beforeShowOption=`beforeShow${ie(this.cellClass)}`;this.grid=this.element;this.element.classList.add(this.name,"datepicker-grid");this.grid.appendChild(kt(V("span",12)))}super.init(t)}setOptions(t){if("minDate"in t){if(t.minDate===undefined){this.minYear=this.minDate=undefined}else{this.minYear=ct(t.minDate,this.step);this.minDate=J(this.minYear,0,1)}}if("maxDate"in t){if(t.maxDate===undefined){this.maxYear=this.maxDate=undefined}else{this.maxYear=ct(t.maxDate,this.step);this.maxDate=J(this.maxYear,11,31)}}if(t.checkDisabled){this.checkDisabled=this.isMinView||t.datesDisabled===null?t.checkDisabled:()=>false}if(this.beforeShowOption in t){const e=t[this.beforeShowOption];this.beforeShow=typeof e==="function"?e:undefined}}updateFocus(){const t=new Date(this.picker.viewDate);const e=ct(t,this.navStep);const i=e+9*this.step;this.first=e;this.last=i;this.start=e-this.step;this.focused=ct(t,this.step)}updateSelection(){const{dates:t,rangepicker:e}=this.picker.datepicker;this.selected=t.reduce(((t,e)=>H(t,ct(e,this.step))),[]);if(e&&e.dates){this.range=e.dates.map((t=>{if(t!==undefined){return ct(t,this.step)}}))}}render(){this.prepareForRender(`${this.first}-${this.last}`,this.first<=this.minYear,this.last>=this.maxYear);Array.from(this.grid.children).forEach(((t,e)=>{const i=this.start+e*this.step;const r=lt(new Date(i,0,1),2,this.isRangeEnd);t.dataset.year=i;this.renderCell(t,i,i,r,this,i<this.minYear||i>this.maxYear)}))}refresh(){const t=this.range||[];Array.from(this.grid.children).forEach((e=>{this.refreshCell(e,Number(e.textContent),this.selected,t)}))}refreshFocus(){this.changeFocusedCell(Math.round((this.focused-this.start)/this.step))}}function ne(t,e){const i={date:t.getDate(),viewDate:new Date(t.picker.viewDate),viewId:t.picker.currentView.id,datepicker:t};t.element.dispatchEvent(new CustomEvent(e,{detail:i}))}function oe(t,e){const{config:i,picker:r}=t;const{currentView:n,viewDate:o}=r;let a;switch(n.id){case 0:a=Q(o,e);break;case 1:a=tt(o,e);break;default:a=tt(o,e*n.navStep)}a=U(a,i.minDate,i.maxDate);r.changeFocus(a).render()}function ae(t){const e=t.picker.currentView.id;if(e===t.config.maxView){return}t.picker.changeView(e+1).render()}function se(t){t.setDate({clear:true})}function ce(t){const e=G();if(t.config.todayButtonMode===1){t.setDate(e,{forceRefresh:true,viewDate:e})}else{t.setFocusedDate(e,true)}}function le(t){const e=()=>{if(t.config.updateOnBlur){t.update({revert:true})}else{t.refresh("input")}t.hide()};const i=t.element;if(zt(i)){i.addEventListener("blur",e,{once:true})}else{e()}}function de(t,e){const i=t.picker;const r=new Date(i.viewDate);const n=i.currentView.id;const o=n===1?Q(r,e-r.getMonth()):tt(r,e-r.getFullYear());i.changeFocus(o).changeView(n-1).render()}function he(t){ae(t)}function ue(t){oe(t,-1)}function fe(t){oe(t,1)}function pe(t,e){const i=Et(e,".datepicker-cell");if(!i||i.classList.contains("disabled")){return}const{id:r,isMinView:n}=t.picker.currentView;const o=i.dataset;if(n){t.setDate(Number(o.date))}else if(r===1){de(t,Number(o.month))}else{de(t,Number(o.year))}}function be(t){t.preventDefault()}const ve=["left","top","right","bottom"].reduce(((t,e)=>{t[e]=`datepicker-orient-${e}`;return t}),{});const ge=t=>t?`${t}px`:t;function me(t,e){if("title"in e){if(e.title){t.controls.title.textContent=e.title;Dt(t.controls.title)}else{t.controls.title.textContent="";St(t.controls.title)}}if(e.prevArrow){const i=t.controls.prevButton;At(i);e.prevArrow.forEach((t=>{i.appendChild(t.cloneNode(true))}))}if(e.nextArrow){const i=t.controls.nextButton;At(i);e.nextArrow.forEach((t=>{i.appendChild(t.cloneNode(true))}))}if(e.locale){t.controls.todayButton.textContent=e.locale.today;t.controls.clearButton.textContent=e.locale.clear}if("todayButton"in e){if(e.todayButton){Dt(t.controls.todayButton)}else{St(t.controls.todayButton)}}if("minDate"in e||"maxDate"in e){const{minDate:e,maxDate:i}=t.datepicker.config;t.controls.todayButton.disabled=!K(G(),e,i)}if("clearButton"in e){if(e.clearButton){Dt(t.controls.clearButton)}else{St(t.controls.clearButton)}}}function ye(t){const{dates:e,config:i,rangeSideIndex:r}=t;const n=e.length>0?_(e):lt(i.defaultViewDate,i.pickLevel,r);return U(n,i.minDate,i.maxDate)}function we(t,e){if(!("_oldViewDate"in t)&&e!==t.viewDate){t._oldViewDate=t.viewDate}t.viewDate=e;const{id:i,year:r,first:n,last:o}=t.currentView;const a=new Date(e).getFullYear();switch(i){case 0:return e<n||e>o;case 1:return a!==r;default:return a<n||a>o}}function ke(t){return window.getComputedStyle(t).direction}function xe(t){const e=xt(t);if(e===document.body||!e){return}return window.getComputedStyle(e).overflow!=="visible"?e:xe(e)}class ze{constructor(t){const{config:e,inputField:i}=this.datepicker=t;const r=Gt.replace(/%buttonClass%/g,e.buttonClass);const n=this.element=kt(r).firstChild;const[o,a,s]=n.firstChild.children;const c=o.firstElementChild;const[l,d,h]=o.lastElementChild.children;const[u,f]=s.firstChild.children;const p={title:c,prevButton:l,viewSwitch:d,nextButton:h,todayButton:u,clearButton:f};this.main=a;this.controls=p;const b=i?"dropdown":"inline";n.classList.add(`datepicker-${b}`);me(this,e);this.viewDate=ye(t);$t(t,[[n,"mousedown",be],[a,"click",pe.bind(null,t)],[p.viewSwitch,"click",he.bind(null,t)],[p.prevButton,"click",ue.bind(null,t)],[p.nextButton,"click",fe.bind(null,t)],[p.todayButton,"click",ce.bind(null,t)],[p.clearButton,"click",se.bind(null,t)]]);this.views=[new Qt(this),new ee(this),new re(this,{id:2,name:"years",cellClass:"year",step:1}),new re(this,{id:3,name:"decades",cellClass:"decade",step:10})];this.currentView=this.views[e.startView];this.currentView.render();this.main.appendChild(this.currentView.element);if(e.container){e.container.appendChild(this.element)}else{i.after(this.element)}}setOptions(t){me(this,t);this.views.forEach((e=>{e.init(t,false)}));this.currentView.render()}detach(){this.element.remove()}show(){if(this.active){return}const{datepicker:t,element:e}=this;const i=t.inputField;if(i){const r=ke(i);if(r!==ke(xt(e))){e.dir=r}else if(e.dir){e.removeAttribute("dir")}e.style.visibility="hidden";e.classList.add("active");this.place();e.style.visibility="";if(t.config.disableTouchKeyboard){i.blur()}}else{e.classList.add("active")}this.active=true;ne(t,"show")}hide(){if(!this.active){return}this.datepicker.exitEditMode();this.element.classList.remove("active");this.active=false;ne(this.datepicker,"hide")}place(){const{classList:t,offsetParent:e,style:i}=this.element;const{config:r,inputField:n}=this.datepicker;const{width:o,height:a}=this.element.getBoundingClientRect();const{left:s,top:c,right:l,bottom:d,width:h,height:u}=n.getBoundingClientRect();let{x:f,y:p}=r.orientation;let b=s;let v=c;if(e===document.body||!e){b+=window.scrollX;v+=window.scrollY}else{const t=e.getBoundingClientRect();b-=t.left-e.scrollLeft;v-=t.top-e.scrollTop}const g=xe(n);let m=0;let y=0;let{clientWidth:w,clientHeight:k}=document.documentElement;if(g){const t=g.getBoundingClientRect();if(t.top>0){y=t.top}if(t.left>0){m=t.left}if(t.right<w){w=t.right}if(t.bottom<k){k=t.bottom}}let x=0;if(f==="auto"){if(s<m){f="left";x=m-s}else if(s+o>w){f="right";if(w<l){x=w-l}}else if(ke(n)==="rtl"){f=l-o<m?"left":"right"}else{f="left"}}if(f==="right"){b+=h-o}b+=x;if(p==="auto"){if(c-a>y){p=d+a>k?"top":"bottom"}else{p="bottom"}}if(p==="top"){v-=a}else{v+=u}t.remove(...Object.values(ve));t.add(ve[f],ve[p]);i.left=ge(b);i.top=ge(v)}setViewSwitchLabel(t){this.controls.viewSwitch.textContent=t}setPrevButtonDisabled(t){this.controls.prevButton.disabled=t}setNextButtonDisabled(t){this.controls.nextButton.disabled=t}changeView(t){const e=this.currentView;if(t!==e.id){if(!this._oldView){this._oldView=e}this.currentView=this.views[t];this._renderMethod="render"}return this}changeFocus(t){this._renderMethod=we(this,t)?"render":"refreshFocus";this.views.forEach((t=>{t.updateFocus()}));return this}update(t=undefined){const e=t===undefined?ye(this.datepicker):t;this._renderMethod=we(this,e)?"render":"refresh";this.views.forEach((t=>{t.updateFocus();t.updateSelection()}));return this}render(t=true){const{currentView:e,datepicker:i,_oldView:r}=this;const n=new Date(this._oldViewDate);const o=t&&this._renderMethod||"render";delete this._oldView;delete this._oldViewDate;delete this._renderMethod;e[o]();if(r){this.main.replaceChild(e.element,r.element);ne(i,"changeView")}if(!isNaN(n)){const t=new Date(this.viewDate);if(t.getFullYear()!==n.getFullYear()){ne(i,"changeYear")}if(t.getMonth()!==n.getMonth()){ne(i,"changeMonth")}}}}function Se(t,e,i,r,n,o){if(!K(t,n,o)){return}if(r(t)){const a=e(t,i);return Se(a,e,i,r,n,o)}return t}function De(t,e,i){const r=t.picker;const n=r.currentView;const o=n.step||1;let a=r.viewDate;let s;switch(n.id){case 0:a=X(a,i?e*7:e);s=X;break;case 1:a=Q(a,i?e*4:e);s=Q;break;default:a=tt(a,e*(i?4:1)*o);s=tt}a=Se(a,s,e<0?-o:o,(t=>n.disabled.includes(t)),n.minDate,n.maxDate);if(a!==undefined){r.changeFocus(a).render()}}function Ae(t,e){const{config:i,picker:r,editMode:n}=t;const o=r.active;const{key:a,altKey:s,shiftKey:c}=e;const l=e.ctrlKey||e.metaKey;const d=()=>{e.preventDefault();e.stopPropagation()};if(a==="Tab"){le(t);return}if(a==="Enter"){if(!o){t.update()}else if(n){t.exitEditMode({update:true,autohide:i.autohide})}else{const e=r.currentView;if(e.isMinView){t.setDate(r.viewDate)}else{r.changeView(e.id-1).render();d()}}return}const h=i.shortcutKeys;const u={key:a,ctrlOrMetaKey:l,altKey:s,shiftKey:c};const f=Object.keys(h).find((t=>{const e=h[t];return!Object.keys(e).find((t=>e[t]!==u[t]))}));if(f){let e;if(f==="toggle"){e=f}else if(n){if(f==="exitEditMode"){e=f}}else if(o){if(f==="hide"){e=f}else if(f==="prevButton"){e=[oe,[t,-1]]}else if(f==="nextButton"){e=[oe,[t,1]]}else if(f==="viewSwitch"){e=[ae,[t]]}else if(i.clearButton&&f==="clearButton"){e=[se,[t]]}else if(i.todayButton&&f==="todayButton"){e=[ce,[t]]}}else if(f==="show"){e=f}if(e){if(Array.isArray(e)){e[0].apply(null,e[1])}else{t[e]()}d();return}}if(!o||n){return}const p=(i,r)=>{if(c||l||s){t.enterEditMode()}else{De(t,i,r);e.preventDefault()}};if(a==="ArrowLeft"){p(-1,false)}else if(a==="ArrowRight"){p(1,false)}else if(a==="ArrowUp"){p(-1,true)}else if(a==="ArrowDown"){p(1,true)}else if(a==="Backspace"||a==="Delete"||a&&a.length===1&&!l){t.enterEditMode()}}function Ie(t){if(t.config.showOnFocus&&!t._showing){t.show()}}function Ce(t,e){const i=e.target;if(t.picker.active||t.config.showOnClick){i._active=zt(i);i._clicking=setTimeout((()=>{delete i._active;delete i._clicking}),2e3)}}function Me(t,e){const i=e.target;if(!i._clicking){return}clearTimeout(i._clicking);delete i._clicking;if(i._active){t.enterEditMode()}delete i._active;if(t.config.showOnClick){t.show()}}function Be(t,e){if(e.clipboardData.types.includes("text/plain")){t.enterEditMode()}}function $e(t,e){const{element:i,picker:r}=t;if(!r.active&&!zt(i)){return}const n=r.element;if(Et(e,(t=>t===i||t===n))){return}le(t)}function Oe(t,e){return t.map((t=>yt(t,e.format,e.locale))).join(e.dateDelimiter)}function Te(t,e,i=false){if(e.length===0){return i?[]:undefined}const{config:r,dates:n,rangeSideIndex:o}=t;const{pickLevel:a,maxNumberOfDates:s}=r;let c=e.reduce(((t,e)=>{let i=mt(e,r.format,r.locale);if(i===undefined){return t}i=lt(i,a,o);if(K(i,r.minDate,r.maxDate)&&!t.includes(i)&&!r.checkDisabled(i,a)&&(a>0||!r.daysOfWeekDisabled.includes(new Date(i).getDay()))){t.push(i)}return t}),[]);if(c.length===0){return}if(r.multidate&&!i){c=c.reduce(((t,e)=>{if(!n.includes(e)){t.push(e)}return t}),n.filter((t=>!c.includes(t))))}return s&&c.length>s?c.slice(s*-1):c}function Ee(t,e=3,i=true,r=undefined){const{config:n,picker:o,inputField:a}=t;if(e&2){const t=o.active?n.pickLevel:n.startView;o.update(r).changeView(t).render(i)}if(e&1&&a){a.value=Oe(t.dates,n)}}function Ne(t,e,i){const r=t.config;let{clear:n,render:o,autohide:a,revert:s,forceRefresh:c,viewDate:l}=i;if(o===undefined){o=true}if(!o){a=c=false}else if(a===undefined){a=r.autohide}l=mt(l,r.format,r.locale);const d=Te(t,e,n);if(!d&&!s){return}if(d&&d.toString()!==t.dates.toString()){t.dates=d;Ee(t,o?3:1,true,l);ne(t,"changeDate")}else{Ee(t,c?3:1,true,l)}if(a){t.hide()}}function Fe(t,e){return e?i=>yt(i,e,t.config.locale):t=>new Date(t)}class je{constructor(t,e={},i=undefined){t.datepicker=this;this.element=t;this.dates=[];const r=this.config=Object.assign({buttonClass:e.buttonClass&&String(e.buttonClass)||"button",container:null,defaultViewDate:G(),maxDate:undefined,minDate:undefined},Vt(Ft,this));let n;if(t.tagName==="INPUT"){n=this.inputField=t;n.classList.add("datepicker-input");if(e.container){r.container=e.container instanceof HTMLElement?e.container:document.querySelector(e.container)}}else{r.container=t}if(i){const t=i.inputs.indexOf(n);const e=i.datepickers;if(t<0||t>1||!Array.isArray(e)){throw Error("Invalid rangepicker object.")}e[t]=this;this.rangepicker=i;this.rangeSideIndex=t}this._options=e;Object.assign(r,Vt(e,this));r.shortcutKeys=Yt(e.shortcutKeys||{});const o=W(t.value||t.dataset.date,r.dateDelimiter);delete t.dataset.date;const a=Te(this,o);if(a&&a.length>0){this.dates=a}if(n){n.value=Oe(this.dates,r)}const s=this.picker=new ze(this);const c=[t,"keydown",Ae.bind(null,this)];if(n){$t(this,[c,[n,"focus",Ie.bind(null,this)],[n,"mousedown",Ce.bind(null,this)],[n,"click",Me.bind(null,this)],[n,"paste",Be.bind(null,this)],[document,"mousedown",$e.bind(null,this)],[window,"resize",s.place.bind(s)]])}else{$t(this,[c]);this.show()}}static formatDate(t,e,i){return yt(t,e,i&&Nt[i]||Nt.en)}static parseDate(t,e,i){return mt(t,e,i&&Nt[i]||Nt.en)}static get locales(){return Nt}get active(){return!!(this.picker&&this.picker.active)}get pickerElement(){return this.picker?this.picker.element:undefined}setOptions(t){const e=Vt(t,this);Object.assign(this._options,t);Object.assign(this.config,e);this.picker.setOptions(e);Ee(this,3)}show(){if(this.inputField){const{config:t,inputField:e}=this;if(e.disabled||e.readOnly&&!t.enableOnReadonly){return}if(!zt(e)&&!t.disableTouchKeyboard){this._showing=true;e.focus();delete this._showing}}this.picker.show()}hide(){if(!this.inputField){return}this.picker.hide();this.picker.update().changeView(this.config.startView).render()}toggle(){if(!this.picker.active){this.show()}else if(this.inputField){this.picker.hide()}}destroy(){this.hide();Ot(this);this.picker.detach();const t=this.element;t.classList.remove("datepicker-input");delete t.datepicker;return this}getDate(t=undefined){const e=Fe(this,t);if(this.config.multidate){return this.dates.map(e)}if(this.dates.length>0){return e(this.dates[0])}}setDate(...t){const e=[...t];const i={};const r=_(t);if(r&&typeof r==="object"&&!Array.isArray(r)&&!(r instanceof Date)){Object.assign(i,e.pop())}const n=Array.isArray(e[0])?e[0]:e;Ne(this,n,i)}update(t=undefined){if(!this.inputField){return}const e=Object.assign(t||{},{clear:true,render:true,viewDate:undefined});const i=W(this.inputField.value,this.config.dateDelimiter);Ne(this,i,e)}getFocusedDate(t=undefined){return Fe(this,t)(this.picker.viewDate)}setFocusedDate(t,e=false){const{config:i,picker:r,active:n,rangeSideIndex:o}=this;const a=i.pickLevel;const s=mt(t,i.format,i.locale);if(s===undefined){return}r.changeFocus(lt(s,a,o));if(n&&e){r.changeView(a)}r.render()}refresh(t=undefined,e=false){if(t&&typeof t!=="string"){e=t;t=undefined}let i;if(t==="picker"){i=2}else if(t==="input"){i=1}else{i=3}Ee(this,i,!e)}enterEditMode(){const t=this.inputField;if(!t||t.readOnly||!this.picker.active||this.editMode){return}this.editMode=true;t.classList.add("in-edit")}exitEditMode(t=undefined){if(!this.inputField||!this.editMode){return}const e=Object.assign({update:false},t);delete this.editMode;this.inputField.classList.remove("in-edit");if(e.update){this.update(e)}}}var Le;(function(t){t[t["date"]=0]="date";t[t["month"]=1]="month";t[t["year"]=2]="year";t[t["week"]=3]="week"})(Le||(Le={}));var Re,Pe,_e;const He=(Pe=(Re=window===null||window===void 0?void 0:window.navigator)===null||Re===void 0?void 0:Re.language)!==null&&Pe!==void 0?Pe:"en";const We=(t,e)=>{const i=e?j(e).toDate():P();return t==="week"?j(i).startOf("isoWeek").toDate():i};function Ke(t,e){const i={enableOnReadonly:false,pickLevel:Le[t],todayButton:true,todayButtonMode:1,todayHighlight:true,weekStart:1,language:"browser",defaultViewDate:We(t,e)};return i}function Ue(t="long"){const e=new Date;const i=new Date(e.setUTCDate(e.getUTCDate()-e.getUTCDay()));const r=new Intl.DateTimeFormat(He,{weekday:t}).format;return[...Array(7).keys()].map((t=>r(i.setUTCDate(i.getUTCDate()+t))))}function Ve(t="long"){const e=new Date;const i=new Intl.DateTimeFormat(He,{month:t}).format;return[...Array(12).keys()].map((t=>i(e.setUTCMonth(t))))}if((_e=je===null||je===void 0?void 0:je.locales)===null||_e===void 0?void 0:_e.browser){je.locales.browser={days:Ue("long"),daysShort:Ue("short"),daysMin:Ue("narrow"),months:Ve("long"),monthsShort:Ve("short"),today:a.t("input.today")}}const qe='.datepicker{width:min-content}.datepicker:not(.active){display:none}.datepicker-dropdown{position:absolute;z-index:20;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:flex;flex-direction:column;border-radius:var(--cat-border-radius-m, 0.25rem);background-color:white}.datepicker-dropdown .datepicker-picker{box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08)}.datepicker-main{flex:auto;padding:2px}.datepicker-footer{box-shadow:none;background-color:transparent}.datepicker-title{box-shadow:none;background-color:hsl(0, 0%, 96%);padding:0.375rem 0.75rem;text-align:center;font-weight:700}.datepicker-controls{display:flex}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .button{display:inline-flex;position:relative;align-items:center;justify-content:center;margin:0;border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:none;background-color:hsl(0, 0%, 100%);cursor:pointer;padding:calc(0.375em - 1px) 0.75em;height:2.25em;vertical-align:top;text-align:center;line-height:1.5;white-space:nowrap;color:hsl(0, 0%, 21%);font-size:0.9375rem}.datepicker-controls .button:focus,.datepicker-controls .button:active{outline:none}.datepicker-controls .button:hover{border-color:#b8b8b8;color:hsl(0, 0%, 21%)}.datepicker-controls .button:focus{border-color:hsl(217, 71%, 53%);color:hsl(0, 0%, 21%)}.datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 0.125em rgba(50, 115, 220, 0.25)}.datepicker-controls .button:active{border-color:#474747;color:hsl(0, 0%, 21%)}.datepicker-controls .button[disabled]{cursor:not-allowed}.datepicker-header .datepicker-controls .button{border-color:transparent;font-weight:bold}.datepicker-header .datepicker-controls .button:hover{background-color:#f2f4f7}.datepicker-header .datepicker-controls .button:active{background-color:#f2f4f7}.datepicker-footer .datepicker-controls .button{flex:auto;margin:calc(0.375rem - 1px) 0.375rem;border-radius:var(--cat-border-radius-s, 0.125rem);font-size:0.875rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .prev-button,.datepicker-controls .next-button{padding-right:0.375rem;padding-left:0.375rem;flex:0 0 14.2857142857%}.datepicker-controls .prev-button.disabled,.datepicker-controls .next-button.disabled{visibility:hidden}.datepicker-view,.datepicker-grid{display:flex}.datepicker-view{align-items:stretch;width:17.5rem}.datepicker-grid{flex-wrap:wrap;flex:auto}.datepicker .days{display:flex;flex-direction:column;flex:auto}.datepicker .days-of-week{display:flex}.datepicker .week-numbers{display:flex;flex-direction:column;flex:0 0 9.6774193548%}.datepicker .weeks{display:flex;flex-direction:column;align-items:stretch;flex:auto}.datepicker span{display:flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);cursor:default;-webkit-touch-callout:none;user-select:none}.datepicker .dow{height:2rem;font-size:0.875rem0.9375rem/2;font-weight:700}.datepicker .week{flex:auto;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem}.datepicker-cell,.datepicker .days .dow{flex-basis:14.2857142857%}.datepicker-cell{height:2.5rem}.datepicker-cell:not(.day){flex-basis:25%;height:5rem}.datepicker-cell:not(.disabled):hover{background-color:transparent;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#f2f4f7}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));color:rgb(var(--cat-primary-fill, 255, 255, 255));font-weight:700}.datepicker-cell.disabled{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.datepicker-cell.prev:not(.disabled),.datepicker-cell.next:not(.disabled){color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.datepicker-cell.prev.selected,.datepicker-cell.next.selected{color:rgb(var(--cat-primary-fill, 255, 255, 255))}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f2f4f7}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#f2f4f7}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#f2f4f7}.datepicker-cell.today:not(.selected){background-color:transparent}.datepicker-cell.today:not(.selected):not(.disabled){color:rgb(var(--cat-primary-text, 0, 129, 148))}.datepicker-cell.today.focused:not(.selected){background-color:#f2f4f7}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#b8b8b8;color:rgb(var(--cat-primary-fill, 255, 255, 255))}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#b3b3b3}.datepicker-cell.range-start:not(.range-end){border-radius:var(--cat-border-radius-m, 0.25rem) 0 0 var(--cat-border-radius-m, 0.25rem)}.datepicker-cell.range-end:not(.range-start){border-radius:0 var(--cat-border-radius-m, 0.25rem) var(--cat-border-radius-m, 0.25rem) 0}.datepicker-cell.range{border-radius:0;background-color:gainsboro}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#d7d7d7}.datepicker-cell.range.disabled{color:#c6c6c6}.datepicker-cell.range.focused{background-color:#d1d1d1}.datepicker-input.in-edit{border-color:#276bda}.datepicker-input.in-edit:focus,.datepicker-input.in-edit:active{box-shadow:none}.datepicker-picker{border:1px solid rgb(var(--cat-border-color, 235, 236, 240))}.datepicker-main{padding:0.5rem 1rem}.datepicker-view:has(.week-numbers){width:19.375rem}.datepicker-view.months,.datepicker-view.years{width:20rem}.datepicker .dow,.datepicker .week{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.datepicker-cell.today:not(.selected){box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-bg, 0, 129, 148))}.datepicker-cell.focused:not(.selected),.datepicker-cell:not(.selected):not(.disabled):hover{background-color:#f2f4f7}.datepicker-controls{gap:0.5rem}.datepicker-header .datepicker-controls{padding:1rem 1rem 0}.datepicker-header .datepicker-controls .button{height:2.5rem}.datepicker-header .datepicker-controls .prev-button,.datepicker-header .datepicker-controls .next-button{flex-basis:2.5rem;font-size:1.25rem}.datepicker-footer .datepicker-controls{padding:0 1rem 1rem}.datepicker-footer .datepicker-controls .button{margin:0;height:2.5rem;font-size:0.9375rem}.datepicker-footer .datepicker-controls .button:hover,.datepicker-footer .datepicker-controls .button:active{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1)::before{content:"";width:700%;height:100%;border-radius:var(--cat-border-radius-m, 0.25rem);position:absolute;top:0;left:0;opacity:0;z-index:1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).today:not(.selected)::before{box-shadow:inset 0 0 0 1.5px #008194;border-radius:var(--cat-border-radius-m, 0.25rem);opacity:1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1):not(:hover)::before{background:none}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1):hover::before{opacity:1;background-color:transparent}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected,.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected.focused{color:white}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected::before,.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected.focused::before{opacity:1;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));z-index:-1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).focused{background:none}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).focused::before{opacity:1;background-color:#f2f4f7;z-index:-1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell{position:relative}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.selected,.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.focused{z-index:2}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.today:not(.selected){box-shadow:none}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell:not(.disabled):hover{background-color:inherit}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.focused{background:none}';const Ye=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconLeft=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.format="mm/dd/yyyy";this.weekNumbers=true;this.type="date";this.datesDisabled=undefined;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}async doClick(){this.input.click()}async clear(){this.value=""}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}render(){return e(i,null,e("cat-input",{ref:t=>this.catInput=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:!this.iconLeft,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.value,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatChange:t=>this.onCatChange(t),onCatFocus:t=>this.onCatFocus(t.detail),onCatBlur:t=>this.onCatBlur(t.detail)},this.hasSlottedLabel&&e("span",{slot:"label"},e("slot",{name:"label"})),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))))}componentDidLoad(){var t;if(this.hostElement){const e=(t=this.catInput.shadowRoot)===null||t===void 0?void 0:t.querySelector(".input-wrapper");const i=e===null||e===void 0?void 0:e.querySelector("input");if(i){this.input=i}else{o.error("[CatInput] Missing input element",this);return}this.datepicker=new je(i,Object.assign(Object.assign({},Ke(this.type,this.value)),{container:e,maxDate:this.max,minDate:this.min,datesDisabled:this.datesDisabled,prevArrow:"←",nextArrow:"→",weekNumbers:this.weekNumbers?1:0,format:{toValue:t=>this.type==="week"?this.fromISOWeek(t):je.parseDate(t,this.dateFormat),toDisplay:t=>this.type==="week"?this.toISOWeek(t).toString():je.formatDate(t,this.dateFormat)},beforeShowDay:t=>this.shouldHighlightAsToday(t)?"today":null,beforeShowMonth:t=>this.shouldHighlightAsToday(t)?"today":null,beforeShowYear:t=>this.shouldHighlightAsToday(t)?"today":null}));if(this.type==="week"){this.datepicker.pickerElement.classList.add("weekly")}this.input.addEventListener("show",this.handleWeekDays.bind(this));this.input.addEventListener("changeDate",this.handleDateChange.bind(this));this.input.addEventListener("changeMonth",this.handleWeekDays.bind(this));this.input.addEventListener("changeView",this.handleWeekDays.bind(this));this.input.addEventListener("keydown",this.focusAllWeekDays.bind(this))}}disconnectedCallback(){this.input.removeEventListener("show",this.handleWeekDays.bind(this));this.input.removeEventListener("changeDate",this.handleDateChange.bind(this));this.input.removeEventListener("changeMonth",this.handleWeekDays.bind(this));this.input.removeEventListener("changeView",this.handleWeekDays.bind(this));this.input.removeEventListener("keydown",this.focusAllWeekDays.bind(this))}handleDateChange(t){this.selectAllWeekDays(t.detail.date);this.value=this.input.value;this.catChange.emit()}handleWeekDays(t){this.selectAllWeekDays(t);this.focusAllWeekDays()}selectAllWeekDays(t){var e,i;const r=t instanceof Date?t:(e=t.detail)===null||e===void 0?void 0:e.date;if(this.type!=="week"){return}if((i=this.input)===null||i===void 0?void 0:i.value){const t=j(r).startOf("isoWeek");if(!t.isSame(j(r).startOf("day"))){this.datepicker.setDate(t.toDate())}else{this.addClassToAllWeekDays("selected")}}}focusAllWeekDays(){const t=j(this.datepicker.picker.viewDate);if(this.type!=="week"||!t){return}const e=j(t).startOf("isoWeek");if(!e.isSame(j(t).startOf("day"))){this.datepicker.setFocusedDate(e.toDate())}this.addClassToAllWeekDays("focused")}addClassToAllWeekDays(t){let e=7;const i=this.datepicker.pickerElement;let r=i.querySelector(`.datepicker-cell:not(.month):not(.year).${t}`);while(e>1){if(r){r=r.nextElementSibling;r===null||r===void 0?void 0:r.classList.add(t);e--}else{break}}}onCatChange(t){this.value=this.input.value;this.catChange.emit(t)}onCatFocus(t){this.catFocus.emit(t)}onCatBlur(t){this.catBlur.emit(t)}shouldHighlightAsToday(t){const e=new Date;const i=e.getFullYear()===t.getFullYear();const r=e.getMonth()===t.getMonth();const n=e.getDate()===t.getDate();switch(this.type){case"date":return i&&r&&n;case"week":return i&&this.toISOWeek(e)===this.toISOWeek(t);case"month":return i&&r;case"year":return i;default:return false}}get dateFormat(){const t=new Date(Date.UTC(3333,10,22));const e=new Intl.DateTimeFormat("en-US",{year:"numeric",month:this.type!=="year"?"numeric":undefined,day:this.type==="date"||this.type==="week"?"numeric":undefined}).format(t);return e.replace("22","dd").replace("11","mm").replace("3333","yyyy")}fromISOWeek(t){if(typeof t==="string"||typeof t==="number"){const e=parseInt(t.toString(),10);return isNaN(e)?new Date:this.fromISOWeekNumber(e)}return t}fromISOWeekNumber(t,e=(new Date).getFullYear()){const i=new Date(Date.UTC(e,0,4));const r=(t-1)*7-(i.getUTCDay()||7)+1;const n=new Date(i);n.setUTCDate(n.getUTCDate()+r);return n}toISOWeek(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()));e.setUTCDate(e.getUTCDate()+4-(e.getUTCDay()||7));const i=new Date(Date.UTC(e.getUTCFullYear(),0,1));return Math.ceil(((e.getTime()-i.getTime())/864e5+1)/7)}get hostElement(){return r(this)}};Ye.style=qe;function Ge(t){return t.split("-")[1]}function Je(t){return t==="y"?"height":"width"}function Xe(t){return t.split("-")[0]}function Ze(t){return["top","bottom"].includes(Xe(t))?"x":"y"}function Qe(t,e,i){let{reference:r,floating:n}=t;const o=r.x+r.width/2-n.width/2;const a=r.y+r.height/2-n.height/2;const s=Ze(e);const c=Je(s);const l=r[c]/2-n[c]/2;const d=Xe(e);const h=s==="x";let u;switch(d){case"top":u={x:o,y:r.y-n.height};break;case"bottom":u={x:o,y:r.y+r.height};break;case"right":u={x:r.x+r.width,y:a};break;case"left":u={x:r.x-n.width,y:a};break;default:u={x:r.x,y:r.y}}switch(Ge(e)){case"start":u[s]-=l*(i&&h?-1:1);break;case"end":u[s]+=l*(i&&h?-1:1);break}return u}const ti=async(t,e,i)=>{const{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:a}=i;const s=o.filter(Boolean);const c=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:n});let{x:d,y:h}=Qe(l,r,c);let u=r;let f={};let p=0;for(let i=0;i<s.length;i++){const{name:o,fn:b}=s[i];const{x:v,y:g,data:m,reset:y}=await b({x:d,y:h,initialPlacement:r,placement:u,strategy:n,middlewareData:f,rects:l,platform:a,elements:{reference:t,floating:e}});d=v!=null?v:d;h=g!=null?g:h;f={...f,[o]:{...f[o],...m}};if(y&&p<=50){p++;if(typeof y==="object"){if(y.placement){u=y.placement}if(y.rects){l=y.rects===true?await a.getElementRects({reference:t,floating:e,strategy:n}):y.rects}({x:d,y:h}=Qe(l,u,c))}i=-1;continue}}return{x:d,y:h,placement:u,strategy:n,middlewareData:f}};function ei(t){return{top:0,right:0,bottom:0,left:0,...t}}function ii(t){return typeof t!=="number"?ei(t):{top:t,right:t,bottom:t,left:t}}function ri(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function ni(t,e){var i;if(e===void 0){e={}}const{x:r,y:n,platform:o,rects:a,elements:s,strategy:c}=t;const{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=false,padding:f=0}=e;const p=ii(f);const b=h==="floating"?"reference":"floating";const v=s[u?b:h];const g=ri(await o.getClippingRect({element:((i=await(o.isElement==null?void 0:o.isElement(v)))!=null?i:true)?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c}));const m=h==="floating"?{...a.floating,x:r,y:n}:a.reference;const y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating));const w=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1};const k=ri(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:y,strategy:c}):m);return{top:(g.top-k.top+p.top)/w.y,bottom:(k.bottom-g.bottom+p.bottom)/w.y,left:(g.left-k.left+p.left)/w.x,right:(k.right-g.right+p.right)/w.x}}const oi=Math.min;const ai=Math.max;function si(t,e,i){return ai(t,oi(e,i))}const ci={left:"right",right:"left",bottom:"top",top:"bottom"};function li(t){return t.replace(/left|right|bottom|top/g,(t=>ci[t]))}function di(t,e,i){if(i===void 0){i=false}const r=Ge(t);const n=Ze(t);const o=Je(n);let a=n==="x"?r===(i?"end":"start")?"right":"left":r==="start"?"bottom":"top";if(e.reference[o]>e.floating[o]){a=li(a)}return{main:a,cross:li(a)}}const hi={start:"end",end:"start"};function ui(t){return t.replace(/start|end/g,(t=>hi[t]))}function fi(t){const e=li(t);return[ui(t),e,ui(e)]}function pi(t,e,i){const r=["left","right"];const n=["right","left"];const o=["top","bottom"];const a=["bottom","top"];switch(t){case"top":case"bottom":if(i)return e?n:r;return e?r:n;case"left":case"right":return e?o:a;default:return[]}}function bi(t,e,i,r){const n=Ge(t);let o=pi(Xe(t),i==="start",r);if(n){o=o.map((t=>t+"-"+n));if(e){o=o.concat(o.map(ui))}}return o}const vi=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(e){var i;const{placement:r,middlewareData:n,rects:o,initialPlacement:a,platform:s,elements:c}=e;const{mainAxis:l=true,crossAxis:d=true,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=true,...b}=t;const v=Xe(r);const g=Xe(a)===a;const m=await(s.isRTL==null?void 0:s.isRTL(c.floating));const y=h||(g||!p?[li(a)]:fi(a));if(!h&&f!=="none"){y.push(...bi(a,p,f,m))}const w=[a,...y];const k=await ni(e,b);const x=[];let z=((i=n.flip)==null?void 0:i.overflows)||[];if(l){x.push(k[v])}if(d){const{main:t,cross:e}=di(r,o,m);x.push(k[t],k[e])}z=[...z,{placement:r,overflows:x}];if(!x.every((t=>t<=0))){var S,D;const t=(((S=n.flip)==null?void 0:S.index)||0)+1;const e=w[t];if(e){return{data:{index:t,overflows:z},reset:{placement:e}}}let i=(D=z.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])==null?void 0:D.placement;if(!i){switch(u){case"bestFit":{var A;const t=(A=z.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])==null?void 0:A[0];if(t){i=t}break}case"initialPlacement":i=a;break}}if(r!==i){return{reset:{placement:i}}}}return{}}}};async function gi(t,e){const{placement:i,platform:r,elements:n}=t;const o=await(r.isRTL==null?void 0:r.isRTL(n.floating));const a=Xe(i);const s=Ge(i);const c=Ze(i)==="x";const l=["left","top"].includes(a)?-1:1;const d=o&&c?-1:1;const h=typeof e==="function"?e(t):e;let{mainAxis:u,crossAxis:f,alignmentAxis:p}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};if(s&&typeof p==="number"){f=s==="end"?p*-1:p}return c?{x:f*d,y:u*l}:{x:u*l,y:f*d}}const mi=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(e){const{x:i,y:r}=e;const n=await gi(e,t);return{x:i+n.x,y:r+n.y,data:n}}}};function yi(t){return t==="x"?"y":"x"}const wi=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(e){const{x:i,y:r,placement:n}=e;const{mainAxis:o=true,crossAxis:a=false,limiter:s={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...c}=t;const l={x:i,y:r};const d=await ni(e,c);const h=Ze(Xe(n));const u=yi(h);let f=l[h];let p=l[u];if(o){const t=h==="y"?"top":"left";const e=h==="y"?"bottom":"right";const i=f+d[t];const r=f-d[e];f=si(i,f,r)}if(a){const t=u==="y"?"top":"left";const e=u==="y"?"bottom":"right";const i=p+d[t];const r=p-d[e];p=si(i,p,r)}const b=s.fn({...e,[h]:f,[u]:p});return{...b,data:{x:b.x-i,y:b.y-r}}}}};const ki=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(e){const{placement:i,rects:r,platform:n,elements:o}=e;const{apply:a=(()=>{}),...s}=t;const c=await ni(e,s);const l=Xe(i);const d=Ge(i);const h=Ze(i);const u=h==="x";const{width:f,height:p}=r.floating;let b;let v;if(l==="top"||l==="bottom"){b=l;v=d===(await(n.isRTL==null?void 0:n.isRTL(o.floating))?"start":"end")?"left":"right"}else{v=l;b=d==="end"?"top":"bottom"}const g=p-c[b];const m=f-c[v];const y=!e.middlewareData.shift;let w=g;let k=m;if(u){const t=f-c.left-c.right;k=d||y?oi(m,t):t}else{const t=p-c.top-c.bottom;w=d||y?oi(g,t):t}if(y&&!d){const t=ai(c.left,0);const e=ai(c.right,0);const i=ai(c.top,0);const r=ai(c.bottom,0);if(u){k=f-2*(t!==0||e!==0?t+e:ai(c.left,c.right))}else{w=p-2*(i!==0||r!==0?i+r:ai(c.top,c.bottom))}}await a({...e,availableWidth:k,availableHeight:w});const x=await n.getDimensions(o.floating);if(f!==x.width||p!==x.height){return{reset:{rects:true}}}return{}}}};function xi(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function zi(t){return xi(t).getComputedStyle(t)}function Si(t){return t instanceof xi(t).Node}function Di(t){return Si(t)?(t.nodeName||"").toLowerCase():""}let Ai;function Ii(){if(Ai){return Ai}const t=navigator.userAgentData;if(t&&Array.isArray(t.brands)){Ai=t.brands.map((t=>t.brand+"/"+t.version)).join(" ");return Ai}return navigator.userAgent}function Ci(t){return t instanceof xi(t).HTMLElement}function Mi(t){return t instanceof xi(t).Element}function Bi(t){if(typeof ShadowRoot==="undefined"){return false}const e=xi(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function $i(t){const{overflow:e,overflowX:i,overflowY:r,display:n}=zi(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+i)&&!["inline","contents"].includes(n)}function Oi(t){return["table","td","th"].includes(Di(t))}function Ti(t){const e=/firefox/i.test(Ii());const i=zi(t);const r=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||(r?r!=="none":false)||e&&i.willChange==="filter"||e&&(i.filter?i.filter!=="none":false)||["transform","perspective"].some((t=>i.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=i.contain;return e!=null?e.includes(t):false}))}function Ei(){return/^((?!chrome|android).)*safari/i.test(Ii())}function Ni(t){return["html","body","#document"].includes(Di(t))}const Fi=Math.min;const ji=Math.max;const Li=Math.round;function Ri(t){const e=zi(t);let i=parseFloat(e.width)||0;let r=parseFloat(e.height)||0;const n=Ci(t);const o=n?t.offsetWidth:i;const a=n?t.offsetHeight:r;const s=Li(i)!==o||Li(r)!==a;if(s){i=o;r=a}return{width:i,height:r,fallback:s}}function Pi(t){return!Mi(t)?t.contextElement:t}const _i={x:1,y:1};function Hi(t){const e=Pi(t);if(!Ci(e)){return _i}const i=e.getBoundingClientRect();const{width:r,height:n,fallback:o}=Ri(e);let a=(o?Li(i.width):i.width)/r;let s=(o?Li(i.height):i.height)/n;if(!a||!Number.isFinite(a)){a=1}if(!s||!Number.isFinite(s)){s=1}return{x:a,y:s}}function Wi(t,e,i,r){var n,o;if(e===void 0){e=false}if(i===void 0){i=false}const a=t.getBoundingClientRect();const s=Pi(t);let c=_i;if(e){if(r){if(Mi(r)){c=Hi(r)}}else{c=Hi(t)}}const l=s?xi(s):window;const d=Ei()&&i;let h=(a.left+(d?((n=l.visualViewport)==null?void 0:n.offsetLeft)||0:0))/c.x;let u=(a.top+(d?((o=l.visualViewport)==null?void 0:o.offsetTop)||0:0))/c.y;let f=a.width/c.x;let p=a.height/c.y;if(s){const t=xi(s);const e=r&&Mi(r)?xi(r):r;let i=t.frameElement;while(i&&r&&e!==t){const t=Hi(i);const e=i.getBoundingClientRect();const r=getComputedStyle(i);e.x+=(i.clientLeft+parseFloat(r.paddingLeft))*t.x;e.y+=(i.clientTop+parseFloat(r.paddingTop))*t.y;h*=t.x;u*=t.y;f*=t.x;p*=t.y;h+=e.x;u+=e.y;i=xi(i).frameElement}}return ri({width:f,height:p,x:h,y:u})}function Ki(t){return((Si(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ui(t){if(Mi(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Vi(t){let{rect:e,offsetParent:i,strategy:r}=t;const n=Ci(i);const o=Ki(i);if(i===o){return e}let a={scrollLeft:0,scrollTop:0};let s={x:1,y:1};const c={x:0,y:0};if(n||!n&&r!=="fixed"){if(Di(i)!=="body"||$i(o)){a=Ui(i)}if(Ci(i)){const t=Wi(i);s=Hi(i);c.x=t.x+i.clientLeft;c.y=t.y+i.clientTop}}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+c.x,y:e.y*s.y-a.scrollTop*s.y+c.y}}function qi(t){return Wi(Ki(t)).left+Ui(t).scrollLeft}function Yi(t){const e=Ki(t);const i=Ui(t);const r=t.ownerDocument.body;const n=ji(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth);const o=ji(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-i.scrollLeft+qi(t);const s=-i.scrollTop;if(zi(r).direction==="rtl"){a+=ji(e.clientWidth,r.clientWidth)-n}return{width:n,height:o,x:a,y:s}}function Gi(t){if(Di(t)==="html"){return t}const e=t.assignedSlot||t.parentNode||Bi(t)&&t.host||Ki(t);return Bi(e)?e.host:e}function Ji(t){const e=Gi(t);if(Ni(e)){return e.ownerDocument.body}if(Ci(e)&&$i(e)){return e}return Ji(e)}function Xi(t,e){var i;if(e===void 0){e=[]}const r=Ji(t);const n=r===((i=t.ownerDocument)==null?void 0:i.body);const o=xi(r);if(n){return e.concat(o,o.visualViewport||[],$i(r)?r:[])}return e.concat(r,Xi(r))}function Zi(t,e){const i=xi(t);const r=Ki(t);const n=i.visualViewport;let o=r.clientWidth;let a=r.clientHeight;let s=0;let c=0;if(n){o=n.width;a=n.height;const t=Ei();if(!t||t&&e==="fixed"){s=n.offsetLeft;c=n.offsetTop}}return{width:o,height:a,x:s,y:c}}function Qi(t,e){const i=Wi(t,true,e==="fixed");const r=i.top+t.clientTop;const n=i.left+t.clientLeft;const o=Ci(t)?Hi(t):{x:1,y:1};const a=t.clientWidth*o.x;const s=t.clientHeight*o.y;const c=n*o.x;const l=r*o.y;return{width:a,height:s,x:c,y:l}}function tr(t,e,i){let r;if(e==="viewport"){r=Zi(t,i)}else if(e==="document"){r=Yi(Ki(t))}else if(Mi(e)){r=Qi(e,i)}else{const i={...e};if(Ei()){var n,o;const e=xi(t);i.x-=((n=e.visualViewport)==null?void 0:n.offsetLeft)||0;i.y-=((o=e.visualViewport)==null?void 0:o.offsetTop)||0}r=i}return ri(r)}function er(t,e){const i=Gi(t);if(i===e||!Mi(i)||Ni(i)){return false}return zi(i).position==="fixed"||er(i,e)}function ir(t,e){const i=e.get(t);if(i){return i}let r=Xi(t).filter((t=>Mi(t)&&Di(t)!=="body"));let n=null;const o=zi(t).position==="fixed";let a=o?Gi(t):t;while(Mi(a)&&!Ni(a)){const e=zi(a);const i=Ti(a);if(!i&&e.position==="fixed"){n=null}const s=o?!i&&!n:!i&&e.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||$i(a)&&!i&&er(t,a);if(s){r=r.filter((t=>t!==a))}else{n=e}a=Gi(a)}e.set(t,r);return r}function rr(t){let{element:e,boundary:i,rootBoundary:r,strategy:n}=t;const o=i==="clippingAncestors"?ir(e,this._c):[].concat(i);const a=[...o,r];const s=a[0];const c=a.reduce(((t,i)=>{const r=tr(e,i,n);t.top=ji(r.top,t.top);t.right=Fi(r.right,t.right);t.bottom=Fi(r.bottom,t.bottom);t.left=ji(r.left,t.left);return t}),tr(e,s,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function nr(t){return Ri(t)}function or(t,e){if(!Ci(t)||zi(t).position==="fixed"){return null}if(e){return e(t)}return t.offsetParent}function ar(t){let e=Gi(t);while(Ci(e)&&!Ni(e)){if(Ti(e)){return e}else{e=Gi(e)}}return null}function sr(t,e){const i=xi(t);if(!Ci(t)){return i}let r=or(t,e);while(r&&Oi(r)&&zi(r).position==="static"){r=or(r,e)}if(r&&(Di(r)==="html"||Di(r)==="body"&&zi(r).position==="static"&&!Ti(r))){return i}return r||ar(t)||i}function cr(t,e,i){const r=Ci(e);const n=Ki(e);const o=Wi(t,true,i==="fixed",e);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&i!=="fixed"){if(Di(e)!=="body"||$i(n)){a=Ui(e)}if(Ci(e)){const t=Wi(e,true);s.x=t.x+e.clientLeft;s.y=t.y+e.clientTop}else if(n){s.x=qi(n)}}return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}const lr={getClippingRect:rr,convertOffsetParentRelativeRectToViewportRelativeRect:Vi,isElement:Mi,getDimensions:nr,getOffsetParent:sr,getDocumentElement:Ki,getScale:Hi,async getElementRects(t){let{reference:e,floating:i,strategy:r}=t;const n=this.getOffsetParent||sr;const o=this.getDimensions;return{reference:cr(e,await n(i),r),floating:{x:0,y:0,...await o(i)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>zi(t).direction==="rtl"};function dr(t,e,i,r){if(r===void 0){r={}}const{ancestorScroll:n=true,ancestorResize:o=true,elementResize:a=true,animationFrame:s=false}=r;const c=n||o?[...Mi(t)?Xi(t):t.contextElement?Xi(t.contextElement):[],...Xi(e)]:[];c.forEach((t=>{const e=!Mi(t)&&t.toString().includes("V");if(n&&(s?e:true)){t.addEventListener("scroll",i,{passive:true})}o&&t.addEventListener("resize",i)}));let l=null;if(a){l=new ResizeObserver((()=>{i()}));Mi(t)&&!s&&l.observe(t);if(!Mi(t)&&t.contextElement&&!s){l.observe(t.contextElement)}l.observe(e)}let d;let h=s?Wi(t):null;if(s){u()}function u(){const e=Wi(t);if(h&&(e.x!==h.x||e.y!==h.y||e.width!==h.width||e.height!==h.height)){i()}h=e;d=requestAnimationFrame(u)}i();return()=>{var t;c.forEach((t=>{n&&t.removeEventListener("scroll",i);o&&t.removeEventListener("resize",i)}));(t=l)==null?void 0:t.disconnect();l=null;if(s){cancelAnimationFrame(d)}}}const hr=(t,e,i)=>{const r=new Map;const n={platform:lr,...i};const o={...n.platform,_c:r};return ti(t,e,{...n,platform:o})};const ur=125;
2
+ /*!
3
+ * tabbable 6.1.2
4
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
+ */var fr=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"];var pr=fr.join(",");var br=typeof Element==="undefined";var vr=br?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;var gr=!br&&Element.prototype.getRootNode?function(t){var e;return t===null||t===void 0?void 0:(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t===null||t===void 0?void 0:t.ownerDocument};var mr=function t(e,i){var r;if(i===void 0){i=true}var n=e===null||e===void 0?void 0:(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert");var o=n===""||n==="true";var a=o||i&&e&&t(e.parentNode);return a};var yr=function t(e){var i;var r=e===null||e===void 0?void 0:(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"contenteditable");return r===""||r==="true"};var wr=function t(e,i,r){if(mr(e)){return[]}var n=Array.prototype.slice.apply(e.querySelectorAll(pr));if(i&&vr.call(e,pr)){n.unshift(e)}n=n.filter(r);return n};var kr=function t(e,i,r){var n=[];var o=Array.from(e);while(o.length){var a=o.shift();if(mr(a,false)){continue}if(a.tagName==="SLOT"){var s=a.assignedElements();var c=s.length?s:a.children;var l=t(c,true,r);if(r.flatten){n.push.apply(n,l)}else{n.push({scopeParent:a,candidates:l})}}else{var d=vr.call(a,pr);if(d&&r.filter(a)&&(i||!e.includes(a))){n.push(a)}var h=a.shadowRoot||typeof r.getShadowRoot==="function"&&r.getShadowRoot(a);var u=!mr(h,false)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(h&&u){var f=t(h===true?a.children:h.children,true,r);if(r.flatten){n.push.apply(n,f)}else{n.push({scopeParent:a,candidates:f})}}else{o.unshift.apply(o,a.children)}}}return n};var xr=function t(e,i){if(e.tabIndex<0){if((i||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||yr(e))&&isNaN(parseInt(e.getAttribute("tabindex"),10))){return 0}}return e.tabIndex};var zr=function t(e,i){return e.tabIndex===i.tabIndex?e.documentOrder-i.documentOrder:e.tabIndex-i.tabIndex};var Sr=function t(e){return e.tagName==="INPUT"};var Dr=function t(e){return Sr(e)&&e.type==="hidden"};var Ar=function t(e){var i=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some((function(t){return t.tagName==="SUMMARY"}));return i};var Ir=function t(e,i){for(var r=0;r<e.length;r++){if(e[r].checked&&e[r].form===i){return e[r]}}};var Cr=function t(e){if(!e.name){return true}var i=e.form||gr(e);var r=function t(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};var n;if(typeof window!=="undefined"&&typeof window.CSS!=="undefined"&&typeof window.CSS.escape==="function"){n=r(window.CSS.escape(e.name))}else{try{n=r(e.name)}catch(t){console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message);return false}}var o=Ir(n,e.form);return!o||o===e};var Mr=function t(e){return Sr(e)&&e.type==="radio"};var Br=function t(e){return Mr(e)&&!Cr(e)};var $r=function t(e){var i;var r=e&&gr(e);var n=(i=r)===null||i===void 0?void 0:i.host;var o=false;if(r&&r!==e){var a,s,c;o=!!((a=n)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(n)||e!==null&&e!==void 0&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));while(!o&&n){var l,d,h;r=gr(n);n=(l=r)===null||l===void 0?void 0:l.host;o=!!((d=n)!==null&&d!==void 0&&(h=d.ownerDocument)!==null&&h!==void 0&&h.contains(n))}}return o};var Or=function t(e){var i=e.getBoundingClientRect(),r=i.width,n=i.height;return r===0&&n===0};var Tr=function t(e,i){var r=i.displayCheck,n=i.getShadowRoot;if(getComputedStyle(e).visibility==="hidden"){return true}var o=vr.call(e,"details>summary:first-of-type");var a=o?e.parentElement:e;if(vr.call(a,"details:not([open]) *")){return true}if(!r||r==="full"||r==="legacy-full"){if(typeof n==="function"){var s=e;while(e){var c=e.parentElement;var l=gr(e);if(c&&!c.shadowRoot&&n(c)===true){return Or(e)}else if(e.assignedSlot){e=e.assignedSlot}else if(!c&&l!==e.ownerDocument){e=l.host}else{e=c}}e=s}if($r(e)){return!e.getClientRects().length}if(r!=="legacy-full"){return true}}else if(r==="non-zero-area"){return Or(e)}return false};var Er=function t(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)){var i=e.parentElement;while(i){if(i.tagName==="FIELDSET"&&i.disabled){for(var r=0;r<i.children.length;r++){var n=i.children.item(r);if(n.tagName==="LEGEND"){return vr.call(i,"fieldset[disabled] *")?true:!n.contains(e)}}return true}i=i.parentElement}}return false};var Nr=function t(e,i){if(i.disabled||mr(i)||Dr(i)||Tr(i,e)||Ar(i)||Er(i)){return false}return true};var Fr=function t(e,i){if(Br(i)||xr(i)<0||!Nr(e,i)){return false}return true};var jr=function t(e){var i=parseInt(e.getAttribute("tabindex"),10);if(isNaN(i)||i>=0){return true}return false};var Lr=function t(e){var i=[];var r=[];e.forEach((function(e,n){var o=!!e.scopeParent;var a=o?e.scopeParent:e;var s=xr(a,o);var c=o?t(e.candidates):a;if(s===0){o?i.push.apply(i,c):i.push(a)}else{r.push({documentOrder:n,tabIndex:s,item:e,isScope:o,content:c})}}));return r.sort(zr).reduce((function(t,e){e.isScope?t.push.apply(t,e.content):t.push(e.content);return t}),[]).concat(i)};var Rr=function t(e,i){i=i||{};var r;if(i.getShadowRoot){r=kr([e],i.includeContainer,{filter:Fr.bind(null,i),flatten:false,getShadowRoot:i.getShadowRoot,shadowRootFilter:jr})}else{r=wr(e,i.includeContainer,Fr.bind(null,i))}return Lr(r)};var Pr=function t(e,i){i=i||{};var r;if(i.getShadowRoot){r=kr([e],i.includeContainer,{filter:Nr.bind(null,i),flatten:true,getShadowRoot:i.getShadowRoot})}else{r=wr(e,i.includeContainer,Nr.bind(null,i))}return r};var _r=function t(e,i){i=i||{};if(!e){throw new Error("No node provided")}if(vr.call(e,pr)===false){return false}return Fr(i,e)};var Hr=fr.concat("iframe").join(",");var Wr=function t(e,i){i=i||{};if(!e){throw new Error("No node provided")}if(vr.call(e,Hr)===false){return false}return Nr(i,e)};
6
+ /*!
7
+ * focus-trap 7.4.3
8
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
9
+ */function Kr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,r)}return i}function Ur(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Kr(Object(i),!0).forEach((function(e){Vr(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Kr(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Vr(t,e,i){e=Yr(e);if(e in t){Object.defineProperty(t,e,{value:i,enumerable:true,configurable:true,writable:true})}else{t[e]=i}return t}function qr(t,e){if(typeof t!=="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==undefined){var r=i.call(t,e||"default");if(typeof r!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yr(t){var e=qr(t,"string");return typeof e==="symbol"?e:String(e)}var Gr={activateTrap:function t(e,i){if(e.length>0){var r=e[e.length-1];if(r!==i){r.pause()}}var n=e.indexOf(i);if(n===-1){e.push(i)}else{e.splice(n,1);e.push(i)}},deactivateTrap:function t(e,i){var r=e.indexOf(i);if(r!==-1){e.splice(r,1)}if(e.length>0){e[e.length-1].unpause()}}};var Jr=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var Xr=function t(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27};var Zr=function t(e){return e.key==="Tab"||e.keyCode===9};var Qr=function t(e){return Zr(e)&&!e.shiftKey};var tn=function t(e){return Zr(e)&&e.shiftKey};var en=function t(e){return setTimeout(e,0)};var rn=function t(e,i){var r=-1;e.every((function(t,e){if(i(t)){r=e;return false}return true}));return r};var nn=function t(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),n=1;n<i;n++){r[n-1]=arguments[n]}return typeof e==="function"?e.apply(void 0,r):e};var on=function t(e){return e.target.shadowRoot&&typeof e.composedPath==="function"?e.composedPath()[0]:e.target};var an=[];var sn=function t(e,i){var r=(i===null||i===void 0?void 0:i.document)||document;var n=(i===null||i===void 0?void 0:i.trapStack)||an;var o=Ur({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,isKeyForward:Qr,isKeyBackward:tn},i);var a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,delayInitialFocusTimer:undefined};var s;var c=function t(e,i,r){return e&&e[i]!==undefined?e[i]:o[r||i]};var l=function t(e,i){var r=typeof(i===null||i===void 0?void 0:i.composedPath)==="function"?i.composedPath():undefined;return a.containerGroups.findIndex((function(t){var i=t.container,n=t.tabbableNodes;return i.contains(e)||(r===null||r===void 0?void 0:r.includes(i))||n.find((function(t){return t===e}))}))};var d=function t(e){var i=o[e];if(typeof i==="function"){for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++){a[s-1]=arguments[s]}i=i.apply(void 0,a)}if(i===true){i=undefined}if(!i){if(i===undefined||i===false){return i}throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var c=i;if(typeof i==="string"){c=r.querySelector(i);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||!Wr(e,o.tabbableOptions)){if(l(r.activeElement)>=0){e=r.activeElement}else{var i=a.tabbableGroups[0];var n=i&&i.firstTabbableNode;e=n||d("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var u=function t(){a.containerGroups=a.containers.map((function(t){var e=Rr(t,o.tabbableOptions);var i=Pr(t,o.tabbableOptions);return{container:t,tabbableNodes:e,focusableNodes:i,firstTabbableNode:e.length>0?e[0]:null,lastTabbableNode:e.length>0?e[e.length-1]:null,nextTabbableNode:function t(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=i.findIndex((function(t){return t===e}));if(n<0){return undefined}if(r){return i.slice(n+1).find((function(t){return _r(t,o.tabbableOptions)}))}return i.slice(0,n).reverse().find((function(t){return _r(t,o.tabbableOptions)}))}}}));a.tabbableGroups=a.containerGroups.filter((function(t){return t.tabbableNodes.length>0}));if(a.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")}};var f=function t(e){if(e===false){return}if(e===r.activeElement){return}if(!e||!e.focus){t(h());return}e.focus({preventScroll:!!o.preventScroll});a.mostRecentlyFocusedNode=e;if(Jr(e)){e.select()}};var p=function t(e){var i=d("setReturnFocus",e);return i?i:i===false?false:e};var b=function t(e){var i=on(e);if(l(i,e)>=0){return}if(nn(o.clickOutsideDeactivates,e)){s.deactivate({returnFocus:o.returnFocusOnDeactivate});return}if(nn(o.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var i=on(e);var r=l(i,e)>=0;if(r||i instanceof Document){if(r){a.mostRecentlyFocusedNode=i}}else{e.stopImmediatePropagation();f(a.mostRecentlyFocusedNode||h())}};var g=function t(e){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var r=on(e);u();var n=null;if(a.tabbableGroups.length>0){var s=l(r,e);var c=s>=0?a.containerGroups[s]:undefined;if(s<0){if(i){n=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode}else{n=a.tabbableGroups[0].firstTabbableNode}}else if(i){var h=rn(a.tabbableGroups,(function(t){var e=t.firstTabbableNode;return r===e}));if(h<0&&(c.container===r||Wr(r,o.tabbableOptions)&&!_r(r,o.tabbableOptions)&&!c.nextTabbableNode(r,false))){h=s}if(h>=0){var p=h===0?a.tabbableGroups.length-1:h-1;var b=a.tabbableGroups[p];n=b.lastTabbableNode}else if(!Zr(e)){n=c.nextTabbableNode(r,false)}}else{var v=rn(a.tabbableGroups,(function(t){var e=t.lastTabbableNode;return r===e}));if(v<0&&(c.container===r||Wr(r,o.tabbableOptions)&&!_r(r,o.tabbableOptions)&&!c.nextTabbableNode(r))){v=s}if(v>=0){var g=v===a.tabbableGroups.length-1?0:v+1;var m=a.tabbableGroups[g];n=m.firstTabbableNode}else if(!Zr(e)){n=c.nextTabbableNode(r)}}}else{n=d("fallbackFocus")}if(n){if(Zr(e)){e.preventDefault()}f(n)}};var m=function t(e){if(Xr(e)&&nn(o.escapeDeactivates,e)!==false){e.preventDefault();s.deactivate();return}if(o.isKeyForward(e)||o.isKeyBackward(e)){g(e,o.isKeyBackward(e))}};var y=function t(e){var i=on(e);if(l(i,e)>=0){return}if(nn(o.clickOutsideDeactivates,e)){return}if(nn(o.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!a.active){return}Gr.activateTrap(n,s);a.delayInitialFocusTimer=o.delayInitialFocus?en((function(){f(h())})):f(h());r.addEventListener("focusin",v,true);r.addEventListener("mousedown",b,{capture:true,passive:false});r.addEventListener("touchstart",b,{capture:true,passive:false});r.addEventListener("click",y,{capture:true,passive:false});r.addEventListener("keydown",m,{capture:true,passive:false});return s};var k=function t(){if(!a.active){return}r.removeEventListener("focusin",v,true);r.removeEventListener("mousedown",b,true);r.removeEventListener("touchstart",b,true);r.removeEventListener("click",y,true);r.removeEventListener("keydown",m,true);return s};var x=function t(e){var i=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===a.mostRecentlyFocusedNode}))}));if(i){f(h())}};var z=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(x):undefined;var S=function t(){if(!z){return}z.disconnect();if(a.active&&!a.paused){a.containers.map((function(t){z.observe(t,{subtree:true,childList:true})}))}};s={get active(){return a.active},get paused(){return a.paused},activate:function t(e){if(a.active){return this}var i=c(e,"onActivate");var n=c(e,"onPostActivate");var o=c(e,"checkCanFocusTrap");if(!o){u()}a.active=true;a.paused=false;a.nodeFocusedBeforeActivation=r.activeElement;i===null||i===void 0?void 0:i();var s=function t(){if(o){u()}w();S();n===null||n===void 0?void 0:n()};if(o){o(a.containers.concat()).then(s,s);return this}s();return this},deactivate:function t(e){if(!a.active){return this}var i=Ur({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(a.delayInitialFocusTimer);a.delayInitialFocusTimer=undefined;k();a.active=false;a.paused=false;S();Gr.deactivateTrap(n,s);var r=c(i,"onDeactivate");var l=c(i,"onPostDeactivate");var d=c(i,"checkCanReturnFocus");var h=c(i,"returnFocus","returnFocusOnDeactivate");r===null||r===void 0?void 0:r();var u=function t(){en((function(){if(h){f(p(a.nodeFocusedBeforeActivation))}l===null||l===void 0?void 0:l()}))};if(h&&d){d(p(a.nodeFocusedBeforeActivation)).then(u,u);return this}u();return this},pause:function t(e){if(a.paused||!a.active){return this}var i=c(e,"onPause");var r=c(e,"onPostPause");a.paused=true;i===null||i===void 0?void 0:i();k();S();r===null||r===void 0?void 0:r();return this},unpause:function t(e){if(!a.paused||!a.active){return this}var i=c(e,"onUnpause");var r=c(e,"onPostUnpause");a.paused=false;i===null||i===void 0?void 0:i();u();w();S();r===null||r===void 0?void 0:r();return this},updateContainerElements:function t(e){var i=[].concat(e).filter(Boolean);a.containers=i.map((function(t){return typeof t==="string"?r.querySelector(t):t}));if(a.active){u()}S();return this}};s.updateContainerElements(e);return s};const cn=t=>(t?Rr(t,{includeContainer:true,getShadowRoot:true}):[]).shift();const ln=":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding-top:0.5rem;padding-bottom:0.5rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;display:none;-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:100;opacity:0;transition:transform 0.13s cubic-bezier(0.3, 0, 0.8, 0.15), opacity 0.13s cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform:translateY(1rem)}.content[data-placement^=left]{transform:translateX(1rem)}.content[data-placement^=right]{transform:translateX(-1rem)}.content[data-placement^=bottom]{transform:translateY(-1rem)}.content.show{opacity:1;transform:translateX(0);transform:translateY(0);transition:transform 0.5s cubic-bezier(0.05, 0.7, 0.1, 1), opacity 0.5s cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";let dn=0;const hn=class{constructor(e){t(this,e);this.catOpen=n(this,"catOpen",7);this.catClose=n(this,"catClose",7);this.id=dn++;this.isOpen=false;this.placement="bottom-start";this.noAutoClose=false;this.overflow=false}clickHandler(t){if(!this.trigger){this.initTrigger();this.toggle()}const e=t.target;if(!this.noAutoClose&&t.composedPath().includes(this.content)&&e.slot!=="trigger"){this.close()}}async toggle(){this.isOpen?this.close():this.open()}async open(){if(this.isOpen===null){return}this.isOpen=null;this.content.style.display="block";setTimeout((()=>{var t;this.isOpen=true;this.content.classList.add("show");(t=this.trigger)===null||t===void 0?void 0:t.setAttribute("aria-expanded","true");this.catOpen.emit();this.trap=this.trap?this.trap.updateContainerElements(this.content):sn(this.content,{tabbableOptions:{getShadowRoot:true},allowOutsideClick:true,clickOutsideDeactivates:t=>{const e=!this.noAutoClose&&!t.composedPath().includes(this.content)&&(!this.trigger||!t.composedPath().includes(this.trigger));if(e){this.close()}return e},onPostDeactivate:()=>this.close()});this.trap.activate()}))}async close(){if(this.isOpen===null||!this.isOpen){return}this.isOpen=null;this.content.classList.remove("show");setTimeout((()=>{var t,e;this.isOpen=false;this.content.classList.remove("show");this.content.style.display="";(t=this.trigger)===null||t===void 0?void 0:t.setAttribute("aria-expanded","false");(e=this.trap)===null||e===void 0?void 0:e.deactivate();this.catClose.emit()}),ur)}componentDidLoad(){this.keyListener=t=>{if(this.isOpen&&["ArrowDown","ArrowUp"].includes(t.key)){const e=Rr(this.content,{includeContainer:false,getShadowRoot:true});const i=cn(document.activeElement);const r=i?e.indexOf(i):-1;const n=t.key==="ArrowDown"?1:-1;const o=r<0?0:(r+n+e.length)%e.length;e[o].focus();t.preventDefault()}};document.addEventListener("keydown",this.keyListener)}disconnectedCallback(){if(this.keyListener){document.removeEventListener("keydown",this.keyListener)}}render(){return e(i,null,e("slot",{name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{name:"content"})))}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();this.trigger.setAttribute("aria-haspopup","true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));dr(this.trigger,this.content,(()=>this.update()))}findTrigger(){var t,e,i;let r;const n=((e=(t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements)===null||e===void 0?void 0:e.call(t))||[];while(!r&&n.length){const t=n.shift();r=(t===null||t===void 0?void 0:t.hasAttribute("data-trigger"))?t:(i=t===null||t===void 0?void 0:t.querySelector("[data-trigger]"))!==null&&i!==void 0?i:undefined}if(!r){r=cn(this.triggerSlot)}if(!r){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return r}update(){if(this.trigger){hr(this.trigger,this.content,{strategy:"fixed",placement:this.placement,middleware:[mi(hn.OFFSET),vi(),ki({padding:hn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:i}){Object.assign(i.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})]}).then((({x:t,y:e,placement:i})=>{this.content.dataset.placement=i;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}};hn.OFFSET=4;hn.style=ln;const un=":host{display:block}";const fn=class{constructor(e){t(this,e);this.formElements=[];this.requiredMarker="auto";this.horizontal=false;this.labelSize=undefined}onRequiredMarker(t){const e=t==="auto"?this.calculate(this.formElements):t;this.formElements.forEach((t=>{var i;return!((i=t.requiredMarker)===null||i===void 0?void 0:i.endsWith("!"))&&(t.requiredMarker=e)}))}onHorizontal(t){this.formElements.forEach((e=>{e.horizontal=t}))}render(){return e(i,{style:{"--label-size":this.labelSize}},e("slot",{onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-textarea, cat-input, cat-select, cat-label, cat-datepicker"));this.onRequiredMarker(this.requiredMarker);this.onHorizontal(this.horizontal)}calculate(t){const e=t.filter((t=>t.tagName!=="CAT-LABEL"));const i=e.filter((t=>!t.required)).length;const r=e.length-i;return r>=i?"optional":"required"}get hostElement(){return r(this)}static get watchers(){return{requiredMarker:["onRequiredMarker"],horizontal:["onHorizontal"]}}};fn.style=un;const pn=":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 bn=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{innerHTML:this.iconSrc||(this.icon?l.getIcon(this.icon):""),"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",part:"icon",class:{icon:true,[`icon-${this.size}`]:this.size!=="inline"}})}};bn.style=pn;function vn(t){return t!=null&&`${t}`!=="false"}function gn(t,e=0){return mn(t)?Number(t):e}function mn(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const yn='.hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);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-bg-primary-hover{transition:background-color 0.13s, color 0.13s}.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-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 0.13s}.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-bg-primaryInverted-hover{transition:background-color 0.13s, color 0.13s}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 0.13s}.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-bg-secondary-hover{transition:background-color 0.13s, color 0.13s}.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-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 0.13s}.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-bg-secondaryInverted-hover{transition:background-color 0.13s, color 0.13s}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 0.13s}.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-success{background-color:rgb(var(--cat-success-bg-, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 0.13s, color 0.13s}.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-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 0.13s}.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-bg-warning-hover{transition:background-color 0.13s, color 0.13s}.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-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 0.13s}.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-bg-danger-hover{transition:background-color 0.13s, color 0.13s}.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-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 0.13s}.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-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !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}.label-container{flex-basis:var(--label-size, 33.33%)}.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 .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.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}.datepicker{width:min-content}.datepicker:not(.active){display:none}.datepicker-dropdown{position:absolute;z-index:20;padding-top:4px}.datepicker-dropdown.datepicker-orient-top{padding-top:0;padding-bottom:4px}.datepicker-picker{display:flex;flex-direction:column;border-radius:var(--cat-border-radius-m, 0.25rem);background-color:white}.datepicker-dropdown .datepicker-picker{box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08)}.datepicker-main{flex:auto;padding:2px}.datepicker-footer{box-shadow:none;background-color:transparent}.datepicker-title{box-shadow:none;background-color:hsl(0, 0%, 96%);padding:0.375rem 0.75rem;text-align:center;font-weight:700}.datepicker-controls{display:flex}.datepicker-header .datepicker-controls{padding:2px 2px 0}.datepicker-controls .button{display:inline-flex;position:relative;align-items:center;justify-content:center;margin:0;border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:none;background-color:hsl(0, 0%, 100%);cursor:pointer;padding:calc(0.375em - 1px) 0.75em;height:2.25em;vertical-align:top;text-align:center;line-height:1.5;white-space:nowrap;color:hsl(0, 0%, 21%);font-size:0.9375rem}.datepicker-controls .button:focus,.datepicker-controls .button:active{outline:none}.datepicker-controls .button:hover{border-color:#b8b8b8;color:hsl(0, 0%, 21%)}.datepicker-controls .button:focus{border-color:hsl(217, 71%, 53%);color:hsl(0, 0%, 21%)}.datepicker-controls .button:focus:not(:active){box-shadow:0 0 0 0.125em rgba(50, 115, 220, 0.25)}.datepicker-controls .button:active{border-color:#474747;color:hsl(0, 0%, 21%)}.datepicker-controls .button[disabled]{cursor:not-allowed}.datepicker-header .datepicker-controls .button{border-color:transparent;font-weight:bold}.datepicker-header .datepicker-controls .button:hover{background-color:#f2f4f7}.datepicker-header .datepicker-controls .button:active{background-color:#f2f4f7}.datepicker-footer .datepicker-controls .button{flex:auto;margin:calc(0.375rem - 1px) 0.375rem;border-radius:var(--cat-border-radius-s, 0.125rem);font-size:0.875rem}.datepicker-controls .view-switch{flex:auto}.datepicker-controls .prev-button,.datepicker-controls .next-button{padding-right:0.375rem;padding-left:0.375rem;flex:0 0 14.2857142857%}.datepicker-controls .prev-button.disabled,.datepicker-controls .next-button.disabled{visibility:hidden}.datepicker-view,.datepicker-grid{display:flex}.datepicker-view{align-items:stretch;width:17.5rem}.datepicker-grid{flex-wrap:wrap;flex:auto}.datepicker .days{display:flex;flex-direction:column;flex:auto}.datepicker .days-of-week{display:flex}.datepicker .week-numbers{display:flex;flex-direction:column;flex:0 0 9.6774193548%}.datepicker .weeks{display:flex;flex-direction:column;align-items:stretch;flex:auto}.datepicker span{display:flex;align-items:center;justify-content:center;border-radius:var(--cat-border-radius-m, 0.25rem);cursor:default;-webkit-touch-callout:none;user-select:none}.datepicker .dow{height:2rem;font-size:0.875rem0.9375rem/2;font-weight:700}.datepicker .week{flex:auto;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem}.datepicker-cell,.datepicker .days .dow{flex-basis:14.2857142857%}.datepicker-cell{height:2.5rem}.datepicker-cell:not(.day){flex-basis:25%;height:5rem}.datepicker-cell:not(.disabled):hover{background-color:transparent;cursor:pointer}.datepicker-cell.focused:not(.selected){background-color:#f2f4f7}.datepicker-cell.selected,.datepicker-cell.selected:hover{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));color:rgb(var(--cat-primary-fill, 255, 255, 255));font-weight:700}.datepicker-cell.disabled{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.datepicker-cell.prev:not(.disabled),.datepicker-cell.next:not(.disabled){color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.datepicker-cell.prev.selected,.datepicker-cell.next.selected{color:rgb(var(--cat-primary-fill, 255, 255, 255))}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today){border-radius:0;background-color:#f2f4f7}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today):not(.disabled):hover{background-color:#f2f4f7}.datepicker-cell.highlighted:not(.selected):not(.range):not(.today).focused{background-color:#f2f4f7}.datepicker-cell.today:not(.selected){background-color:transparent}.datepicker-cell.today:not(.selected):not(.disabled){color:rgb(var(--cat-primary-text, 0, 129, 148))}.datepicker-cell.today.focused:not(.selected){background-color:#f2f4f7}.datepicker-cell.range-end:not(.selected),.datepicker-cell.range-start:not(.selected){background-color:#b8b8b8;color:rgb(var(--cat-primary-fill, 255, 255, 255))}.datepicker-cell.range-end.focused:not(.selected),.datepicker-cell.range-start.focused:not(.selected){background-color:#b3b3b3}.datepicker-cell.range-start:not(.range-end){border-radius:var(--cat-border-radius-m, 0.25rem) 0 0 var(--cat-border-radius-m, 0.25rem)}.datepicker-cell.range-end:not(.range-start){border-radius:0 var(--cat-border-radius-m, 0.25rem) var(--cat-border-radius-m, 0.25rem) 0}.datepicker-cell.range{border-radius:0;background-color:gainsboro}.datepicker-cell.range:not(.disabled):not(.focused):not(.today):hover{background-color:#d7d7d7}.datepicker-cell.range.disabled{color:#c6c6c6}.datepicker-cell.range.focused{background-color:#d1d1d1}.datepicker-input.in-edit{border-color:#276bda}.datepicker-input.in-edit:focus,.datepicker-input.in-edit:active{box-shadow:none}.datepicker-picker{border:1px solid rgb(var(--cat-border-color, 235, 236, 240))}.datepicker-main{padding:0.5rem 1rem}.datepicker-view:has(.week-numbers){width:19.375rem}.datepicker-view.months,.datepicker-view.years{width:20rem}.datepicker .dow,.datepicker .week{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.datepicker-cell.today:not(.selected){box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-bg, 0, 129, 148))}.datepicker-cell.focused:not(.selected),.datepicker-cell:not(.selected):not(.disabled):hover{background-color:#f2f4f7}.datepicker-controls{gap:0.5rem}.datepicker-header .datepicker-controls{padding:1rem 1rem 0}.datepicker-header .datepicker-controls .button{height:2.5rem}.datepicker-header .datepicker-controls .prev-button,.datepicker-header .datepicker-controls .next-button{flex-basis:2.5rem;font-size:1.25rem}.datepicker-footer .datepicker-controls{padding:0 1rem 1rem}.datepicker-footer .datepicker-controls .button{margin:0;height:2.5rem;font-size:0.9375rem}.datepicker-footer .datepicker-controls .button:hover,.datepicker-footer .datepicker-controls .button:active{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1)::before{content:"";width:700%;height:100%;border-radius:var(--cat-border-radius-m, 0.25rem);position:absolute;top:0;left:0;opacity:0;z-index:1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).today:not(.selected)::before{box-shadow:inset 0 0 0 1.5px #008194;border-radius:var(--cat-border-radius-m, 0.25rem);opacity:1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1):not(:hover)::before{background:none}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1):hover::before{opacity:1;background-color:transparent}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected,.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected.focused{color:white}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected::before,.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).selected.focused::before{opacity:1;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));z-index:-1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).focused{background:none}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid :nth-child(7n+1).focused::before{opacity:1;background-color:#f2f4f7;z-index:-1}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell{position:relative}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.selected,.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.focused{z-index:2}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.today:not(.selected){box-shadow:none}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell:not(.disabled):hover{background-color:inherit}.datepicker.weekly .datepicker-view:not(.months):not(.years) .datepicker-grid .datepicker-cell.focused{background:none}:host{display:flex;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);margin-bottom:1rem}: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{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 0.13s linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.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.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-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;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable{padding-right:1.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}';let wn=0;const kn=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this._id=`cat-input-${wn++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;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.maxLength=undefined;this.min=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.round=false;this.type="text";this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.watchErrorsHandler(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){o.warn("[A11y] Missing ARIA label on input",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}async doClick(){this.input.click()}async clear(){this.value=""}watchErrorsHandler(t){if(!vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){var t,i,r;return e("div",{class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{class:{hidden:this.labelHidden,"label-container":true}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id},e("span",{class:"label-wrapper",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&this.requiredMarker.startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",a.t("input.optional"),")"),this.required&&this.requiredMarker.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",a.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},(i=(t=this.value)===null||t===void 0?void 0:t.toString().length)!==null&&i!==void 0?i:0,"/",this.maxLength))))),e("div",{class:"input-container"},e("div",{class:{"input-wrapper":true,"input-round":this.round,"input-disabled":this.disabled,"input-invalid":this.invalid},onClick:()=>this.input.focus()},this.textPrefix&&e("span",{class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-prefix",size:"l"}),e("div",{class:"input-inner-wrapper"},e("input",Object.assign({},this.nativeAttributes,{ref:t=>this.input=t,id:this.id,class:{"has-clearable":this.clearable&&!this.disabled},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.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":((r=this.hint)===null||r===void 0?void 0:r.length)?this.id+"-hint":undefined})),this.clearable&&!this.disabled&&this.value&&e("cat-button",{class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":a.t("input.clear"),onClick:this.clear.bind(this)})),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{icon:this.icon,class:"icon-suffix",size:"l"}),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{class:"text-suffix",part:"suffix"},this.textSuffix)),(this.hint||this.hasSlottedHint||!!Object.keys(this.errorMap||{}).length)&&e(T,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap})))}get invalid(){return!!this.errorMap}onInput(t){this.value=this.input.value;this.catChange.emit(t);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(vn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=gn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}get hostElement(){return r(this)}static get watchers(){return{errors:["watchErrorsHandler"]}}};kn.style=yn;const xn=":host{display:inline-flex;align-items:center;min-height:2.5rem}:host([hidden]){display:none}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const zn=class{constructor(e){t(this,e);this.requiredMarker="optional";this.horizontal=false;this.for=undefined;this.required=false}onClick(){var t;if(this.for){(t=document.getElementById(this.for)||this.findShadowTarget(this.for))===null||t===void 0?void 0:t.focus()}}render(){return e(i,null,e("label",{htmlFor:this.for,onClick:this.onClick.bind(this)},e("slot",null),!this.required&&this.requiredMarker.startsWith("optional")&&e("span",{class:"input-optional","aria-hidden":"true"},"(",a.t("input.optional"),")"),this.required&&this.requiredMarker.startsWith("required")&&e("span",{class:"input-optional","aria-hidden":"true"},"(",a.t("input.required"),")")))}findShadowTarget(t){var e;for(let i=0;i<zn.SHADOW_TARGETS.length;i++){const r=document.getElementsByTagName(zn.SHADOW_TARGETS[i]);for(let i=0;i<r.length;i++){const n=(e=r[i].shadowRoot)===null||e===void 0?void 0:e.getElementById(t);if(n){return n}}}return null}};zn.SHADOW_TARGETS=["CAT-INPUT","CAT-TEXTAREA","CAT-CHECKBOX","CAT-TOGGLE","CAT-RADIO","CAT-SELECT"];zn.style=xn;const Sn=":host{display:inline-block}:host([hidden]){display:none}ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}li{display:inline-flex;justify-content:center}li.dots{-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([variant=outlined]) ol{gap:0.75rem}.cat-pagination-xs li.dots,.cat-pagination-xs li.text{height:1.5rem;line-height:1.5rem;font-size:0.875rem}.cat-pagination-xs li.dots{width:1.5rem}:host([variant=outlined]) .cat-pagination-xs{gap:0.375rem}.cat-pagination-s li.dots,.cat-pagination-s li.text{height:2rem;line-height:2rem;font-size:0.9375rem}.cat-pagination-s li.dots{width:2rem}:host([variant=outlined]) .cat-pagination-s{gap:0.5rem}.cat-pagination-m li.dots,.cat-pagination-m li.text{height:2.5rem;line-height:2.5rem;font-size:0.9375rem}.cat-pagination-m li.dots{width:2.5rem}:host([variant=outlined]) .cat-pagination-m{gap:0.625rem}.cat-pagination-l li.dots,.cat-pagination-l li.text{height:3rem;line-height:3rem;font-size:0.9375rem}.cat-pagination-l li.dots{width:3rem}:host([variant=outlined]) .cat-pagination-l{gap:0.75rem}.cat-pagination-xl li.dots,.cat-pagination-xl li.text{height:3.5rem;line-height:3.5rem;font-size:1.125rem}.cat-pagination-xl li.dots{width:3.5rem}:host([variant=outlined]) .cat-pagination-xl{gap:0.875rem}";const Dn=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.page=0;this.pageCount=1;this.activePadding=1;this.sidePadding=1;this.size="m";this.variant="text";this.round=false;this.compact=false;this.iconPrev="$cat:pagination-left";this.iconNext="$cat:pagination-right"}render(){return e("nav",{role:"navigation"},e("ol",{class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:a.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:a.t("pagination.next"),icon:this.iconNext,iconOnly:true,onClick:()=>this.setPage(this.page+1)}))))}get isFirst(){return this.page===0}get isLast(){return this.page===this.pageCount-1}setPage(t){this.page=t;this.catChange.emit(this.page)}get pages(){if(!this.sidePadding&&!this.activePadding){return[this.page]}const t=new Set;const e=this.page<=this.sidePadding+this.activePadding+1;const i=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const r=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const n=r?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,i);if(!e&&!r){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,n,this.pageCount);return[...t]}addSeq(t,e,i){const r=this.clamp(e,0,this.pageCount);const n=this.clamp(i,0,this.pageCount);Array(n-r).fill(0).forEach(((e,i)=>t.add(r+i)))}clamp(t,e,i){return Math.min(Math.max(t,e),i)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,i)=>[i>0&&this.pages[i-1]!==t-1?e("li",{class:"dots"},"…"):null,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,color:this.page===t?"primary":undefined,active:this.page===t,a11yLabel:a.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}};Dn.style=Sn;const An=".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;min-width:0}.input-hint,::slotted([slot=hint]){color:rgb(var(--cat-font-color-muted, 81, 92, 108));line-height:1.5;flex:1 1 auto;min-width:0}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}: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)}.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))}";let In=0;const Cn=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this._id=`cat-radio-${++In}`;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.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){o.warn("[A11y] Missing ARIA label on radio",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}async doClick(){this.input.click()}render(){return e(i,null,e("label",{htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{class:"radio"},e("input",Object.assign({},this.nativeAttributes,{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.onChange.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this)})),e("span",{class:"circle"})),e("span",{class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),(this.hint||this.hasSlottedHint)&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"circle-placeholder"}),e(T,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}onChange(t){this.checked=true;this.catChange.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return r(this)}};Cn.style=An;const Mn=":host{display:block}:host([hidden]){display:none}";const Bn=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catBlur=n(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=t))}onLabelLeftChanged(t){this.catRadioGroup.forEach((e=>{if(t){e.labelLeft=t}}))}componentDidLoad(){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)}onKeydown(t){var e,i;if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)&&this.catRadioGroup.length){const r=this.catRadioGroup.filter((t=>!t.disabled));const n=document.activeElement;const o=this.catRadioGroup.findIndex((t=>t===n));const a=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const s=o<0?0:(o+a+r.length)%r.length;r[s].doFocus();(i=(e=r[s].shadowRoot)===null||e===void 0?void 0:e.querySelector("input"))===null||i===void 0?void 0:i.click();this.updateTabIndex();t.preventDefault()}}onInput(t){const e=this.catRadioGroup.find((e=>e===t.target));this.value=e===null||e===void 0?void 0:e.value;this.catChange.emit()}onBlur(t){if(!t.relatedTarget){this.catBlur.emit(t)}}render(){return e("div",{role:"radiogroup","aria-label":this.a11yLabel},e("slot",null))}updateTabIndex(){var t,e;if(this.catRadioGroup.length){this.catRadioGroup.forEach((t=>{var e,i;return(i=(e=t.shadowRoot)===null||e===void 0?void 0:e.querySelector("input"))===null||i===void 0?void 0:i.setAttribute("tabindex","-1")}));const i=this.catRadioGroup.findIndex((t=>t.checked));(e=(t=this.catRadioGroup[i>=0?i:0].shadowRoot)===null||t===void 0?void 0:t.querySelector("input"))===null||e===void 0?void 0:e.setAttribute("tabindex","0")}}get hostElement(){return r(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};Bn.style=Mn;function $n(t){return typeof t==="function"}function On(t){const e=t=>{Error.call(t);t.stack=(new Error).stack};const i=t(e);i.prototype=Object.create(Error.prototype);i.prototype.constructor=i;return i}const Tn=On((t=>function e(i){t(this);this.message=i?`${i.length} errors occurred during unsubscription:\n${i.map(((t,e)=>`${e+1}) ${t.toString()}`)).join("\n ")}`:"";this.name="UnsubscriptionError";this.errors=i}));function En(t,e){if(t){const i=t.indexOf(e);0<=i&&t.splice(i,1)}}class Nn{constructor(t){this.initialTeardown=t;this.closed=false;this._parentage=null;this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=true;const{_parentage:e}=this;if(e){this._parentage=null;if(Array.isArray(e)){for(const t of e){t.remove(this)}}else{e.remove(this)}}const{initialTeardown:i}=this;if($n(i)){try{i()}catch(e){t=e instanceof Tn?e.errors:[e]}}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const e of r){try{Ln(e)}catch(e){t=t!==null&&t!==void 0?t:[];if(e instanceof Tn){t=[...t,...e.errors]}else{t.push(e)}}}}if(t){throw new Tn(t)}}}add(t){var e;if(t&&t!==this){if(this.closed){Ln(t)}else{if(t instanceof Nn){if(t.closed||t._hasParent(this)){return}t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;if(e===t){this._parentage=null}else if(Array.isArray(e)){En(e,t)}}remove(t){const{_finalizers:e}=this;e&&En(e,t);if(t instanceof Nn){t._removeParent(this)}}}Nn.EMPTY=(()=>{const t=new Nn;t.closed=true;return t})();const Fn=Nn.EMPTY;function jn(t){return t instanceof Nn||t&&"closed"in t&&$n(t.remove)&&$n(t.add)&&$n(t.unsubscribe)}function Ln(t){if($n(t)){t()}else{t.unsubscribe()}}const Rn={onUnhandledError:null,onStoppedNotification:null,Promise:undefined,useDeprecatedSynchronousErrorHandling:false,useDeprecatedNextContext:false};const Pn={setTimeout(t,e,...i){const{delegate:r}=Pn;if(r===null||r===void 0?void 0:r.setTimeout){return r.setTimeout(t,e,...i)}return setTimeout(t,e,...i)},clearTimeout(t){const{delegate:e}=Pn;return((e===null||e===void 0?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:undefined};function _n(t){Pn.setTimeout((()=>{const{onUnhandledError:e}=Rn;if(e){e(t)}else{throw t}}))}function Hn(){}const Wn=(()=>Vn("C",undefined,undefined))();function Kn(t){return Vn("E",undefined,t)}function Un(t){return Vn("N",t,undefined)}function Vn(t,e,i){return{kind:t,value:e,error:i}}function qn(t){{t()}}class Yn extends Nn{constructor(t){super();this.isStopped=false;if(t){this.destination=t;if(jn(t)){t.add(this)}}else{this.destination=io}}static create(t,e,i){return new Zn(t,e,i)}next(t){if(this.isStopped){eo(Un(t),this)}else{this._next(t)}}error(t){if(this.isStopped){eo(Kn(t),this)}else{this.isStopped=true;this._error(t)}}complete(){if(this.isStopped){eo(Wn,this)}else{this.isStopped=true;this._complete()}}unsubscribe(){if(!this.closed){this.isStopped=true;super.unsubscribe();this.destination=null}}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Gn=Function.prototype.bind;function Jn(t,e){return Gn.call(t,e)}class Xn{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next){try{e.next(t)}catch(t){Qn(t)}}}error(t){const{partialObserver:e}=this;if(e.error){try{e.error(t)}catch(t){Qn(t)}}else{Qn(t)}}complete(){const{partialObserver:t}=this;if(t.complete){try{t.complete()}catch(t){Qn(t)}}}}class Zn extends Yn{constructor(t,e,i){super();let r;if($n(t)||!t){r={next:t!==null&&t!==void 0?t:undefined,error:e!==null&&e!==void 0?e:undefined,complete:i!==null&&i!==void 0?i:undefined}}else{let e;if(this&&Rn.useDeprecatedNextContext){e=Object.create(t);e.unsubscribe=()=>this.unsubscribe();r={next:t.next&&Jn(t.next,e),error:t.error&&Jn(t.error,e),complete:t.complete&&Jn(t.complete,e)}}else{r=t}}this.destination=new Xn(r)}}function Qn(t){{_n(t)}}function to(t){throw t}function eo(t,e){const{onStoppedNotification:i}=Rn;i&&Pn.setTimeout((()=>i(t,e)))}const io={closed:true,next:Hn,error:to,complete:Hn};const ro=(()=>typeof Symbol==="function"&&Symbol.observable||"@@observable")();function no(t){return t}function oo(t){if(t.length===0){return no}if(t.length===1){return t[0]}return function e(i){return t.reduce(((t,e)=>e(t)),i)}}class ao{constructor(t){if(t){this._subscribe=t}}lift(t){const e=new ao;e.source=this;e.operator=t;return e}subscribe(t,e,i){const r=lo(t)?t:new Zn(t,e,i);qn((()=>{const{operator:t,source:e}=this;r.add(t?t.call(r,e):e?this._subscribe(r):this._trySubscribe(r))}));return r}_trySubscribe(t){try{return this._subscribe(t)}catch(e){t.error(e)}}forEach(t,e){e=so(e);return new e(((e,i)=>{const r=new Zn({next:e=>{try{t(e)}catch(t){i(t);r.unsubscribe()}},error:i,complete:e});this.subscribe(r)}))}_subscribe(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)}[ro](){return this}pipe(...t){return oo(t)(this)}toPromise(t){t=so(t);return new t(((t,e)=>{let i;this.subscribe((t=>i=t),(t=>e(t)),(()=>t(i)))}))}}ao.create=t=>new ao(t);function so(t){var e;return(e=t!==null&&t!==void 0?t:Rn.Promise)!==null&&e!==void 0?e:Promise}function co(t){return t&&$n(t.next)&&$n(t.error)&&$n(t.complete)}function lo(t){return t&&t instanceof Yn||co(t)&&jn(t)}function ho(t){return $n(t===null||t===void 0?void 0:t.lift)}function uo(t){return e=>{if(ho(e)){return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}))}throw new TypeError("Unable to lift unknown Observable type")}}function fo(t,e,i,r,n){return new po(t,e,i,r,n)}class po extends Yn{constructor(t,e,i,r,n,o){super(t);this.onFinalize=n;this.shouldUnsubscribe=o;this._next=e?function(i){try{e(i)}catch(e){t.error(e)}}:super._next;this._error=r?function(e){try{r(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:super._error;this._complete=i?function(){try{i()}catch(e){t.error(e)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:e}=this;super.unsubscribe();!e&&((t=this.onFinalize)===null||t===void 0?void 0:t.call(this))}}}const bo=On((t=>function e(){t(this);this.name="ObjectUnsubscribedError";this.message="object unsubscribed"}));class vo extends ao{constructor(){super();this.closed=false;this.currentObservers=null;this.observers=[];this.isStopped=false;this.hasError=false;this.thrownError=null}lift(t){const e=new go(this,this);e.operator=t;return e}_throwIfClosed(){if(this.closed){throw new bo}}next(t){qn((()=>{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){qn((()=>{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(){qn((()=>{this._throwIfClosed();if(!this.isStopped){this.isStopped=true;const{observers:t}=this;while(t.length){t.shift().complete()}}}))}unsubscribe(){this.isStopped=this.closed=true;this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){this._throwIfClosed();return super._trySubscribe(t)}_subscribe(t){this._throwIfClosed();this._checkFinalizedStatuses(t);return this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:r}=this;if(e||i){return Fn}this.currentObservers=null;r.push(t);return new Nn((()=>{this.currentObservers=null;En(r,t)}))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:r}=this;if(e){t.error(i)}else if(r){t.complete()}}asObservable(){const t=new ao;t.source=this;return t}}vo.create=(t,e)=>new go(t,e);class go extends vo{constructor(t,e){super();this.destination=t;this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0?void 0:i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0?void 0:i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0?void 0:e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:Fn}}const mo={now(){return(mo.delegate||Date).now()},delegate:undefined};class yo extends Nn{constructor(t,e){super()}schedule(t,e=0){return this}}const wo={setInterval(t,e,...i){const{delegate:r}=wo;if(r===null||r===void 0?void 0:r.setInterval){return r.setInterval(t,e,...i)}return setInterval(t,e,...i)},clearInterval(t){const{delegate:e}=wo;return((e===null||e===void 0?void 0:e.clearInterval)||clearInterval)(t)},delegate:undefined};class ko extends yo{constructor(t,e){super(t,e);this.scheduler=t;this.work=e;this.pending=false}schedule(t,e=0){var i;if(this.closed){return this}this.state=t;const r=this.id;const n=this.scheduler;if(r!=null){this.id=this.recycleAsyncId(n,r,e)}this.pending=true;this.delay=e;this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(n,this.id,e);return this}requestAsyncId(t,e,i=0){return wo.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===false){return e}if(e!=null){wo.clearInterval(e)}return undefined}execute(t,e){if(this.closed){return new Error("executing a cancelled action")}this.pending=false;const i=this._execute(t,e);if(i){return i}else if(this.pending===false&&this.id!=null){this.id=this.recycleAsyncId(this.scheduler,this.id,null)}}_execute(t,e){let i=false;let r;try{this.work(t)}catch(t){i=true;r=t?t:new Error("Scheduled action threw falsy error")}if(i){this.unsubscribe();return r}}unsubscribe(){if(!this.closed){const{id:t,scheduler:e}=this;const{actions:i}=e;this.work=this.state=this.scheduler=null;this.pending=false;En(i,this);if(t!=null){this.id=this.recycleAsyncId(e,t,null)}this.delay=null;super.unsubscribe()}}}class xo{constructor(t,e=xo.now){this.schedulerActionCtor=t;this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}}xo.now=mo.now;class zo extends xo{constructor(t,e=xo.now){super(t,e);this.actions=[];this._active=false}flush(t){const{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=true;do{if(i=t.execute(t.state,t.delay)){break}}while(t=e.shift());this._active=false;if(i){while(t=e.shift()){t.unsubscribe()}throw i}}}const So=new zo(ko);const Do=So;const Ao=new ao((t=>t.complete()));function Io(t){return t&&$n(t.schedule)}function Co(t){return t[t.length-1]}function Mo(t){return Io(Co(t))?t.pop():undefined}function Bo(t,e){return typeof Co(t)==="number"?t.pop():e}function $o(t,e,i,r){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r["throw"](t))}catch(t){o(t)}}function c(t){t.done?i(t.value):n(t.value).then(a,s)}c((r=r.apply(t,e||[])).next())}))}function Oo(t){var e=typeof Symbol==="function"&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function To(t){return this instanceof To?(this.v=t,this):new To(t)}function Eo(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=i.apply(t,e||[]),n,o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(t){if(r[t])n[t]=function(e){return new Promise((function(i,r){o.push([t,e,i,r])>1||s(t,e)}))}}function s(t,e){try{c(r[t](e))}catch(t){h(o[0][3],t)}}function c(t){t.value instanceof To?Promise.resolve(t.value.v).then(l,d):h(o[0][2],t)}function l(t){s("next",t)}function d(t){s("throw",t)}function h(t,e){if(t(e),o.shift(),o.length)s(o[0][0],o[0][1])}}function No(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],i;return e?e.call(t):(t=typeof Oo==="function"?Oo(t):t[Symbol.iterator](),i={},r("next"),r("throw"),r("return"),i[Symbol.asyncIterator]=function(){return this},i);function r(e){i[e]=t[e]&&function(i){return new Promise((function(r,o){i=t[e](i),n(r,o,i.done,i.value)}))}}function n(t,e,i,r){Promise.resolve(r).then((function(e){t({value:e,done:i})}),e)}}const Fo=t=>t&&typeof t.length==="number"&&typeof t!=="function";function jo(t){return $n(t===null||t===void 0?void 0:t.then)}function Lo(t){return $n(t[ro])}function Ro(t){return Symbol.asyncIterator&&$n(t===null||t===void 0?void 0:t[Symbol.asyncIterator])}function Po(t){return new TypeError(`You provided ${t!==null&&typeof t==="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function _o(){if(typeof Symbol!=="function"||!Symbol.iterator){return"@@iterator"}return Symbol.iterator}const Ho=_o();function Wo(t){return $n(t===null||t===void 0?void 0:t[Ho])}function Ko(t){return Eo(this,arguments,(function*e(){const i=t.getReader();try{while(true){const{value:t,done:e}=yield To(i.read());if(e){return yield To(void 0)}yield yield To(t)}}finally{i.releaseLock()}}))}function Uo(t){return $n(t===null||t===void 0?void 0:t.getReader)}function Vo(t){if(t instanceof ao){return t}if(t!=null){if(Lo(t)){return qo(t)}if(Fo(t)){return Yo(t)}if(jo(t)){return Go(t)}if(Ro(t)){return Xo(t)}if(Wo(t)){return Jo(t)}if(Uo(t)){return Zo(t)}}throw Po(t)}function qo(t){return new ao((e=>{const i=t[ro]();if($n(i.subscribe)){return i.subscribe(e)}throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function Yo(t){return new ao((e=>{for(let i=0;i<t.length&&!e.closed;i++){e.next(t[i])}e.complete()}))}function Go(t){return new ao((e=>{t.then((t=>{if(!e.closed){e.next(t);e.complete()}}),(t=>e.error(t))).then(null,_n)}))}function Jo(t){return new ao((e=>{for(const i of t){e.next(i);if(e.closed){return}}e.complete()}))}function Xo(t){return new ao((e=>{Qo(t,e).catch((t=>e.error(t)))}))}function Zo(t){return Xo(Ko(t))}function Qo(t,e){var i,r;var n,o;return $o(this,void 0,void 0,(function*(){try{for(i=No(t);r=yield i.next(),!r.done;){const t=r.value;e.next(t);if(e.closed){return}}}catch(t){n={error:t}}finally{try{if(r&&!r.done&&(o=i.return))yield o.call(i)}finally{if(n)throw n.error}}e.complete()}))}function ta(t,e,i,r=0,n=false){const o=e.schedule((function(){i();if(n){t.add(this.schedule(null,r))}else{this.unsubscribe()}}),r);t.add(o);if(!n){return o}}function ea(t,e=0){return uo(((i,r)=>{i.subscribe(fo(r,(i=>ta(r,t,(()=>r.next(i)),e)),(()=>ta(r,t,(()=>r.complete()),e)),(i=>ta(r,t,(()=>r.error(i)),e))))}))}function ia(t,e=0){return uo(((i,r)=>{r.add(t.schedule((()=>i.subscribe(r)),e))}))}function ra(t,e){return Vo(t).pipe(ia(e),ea(e))}function na(t,e){return Vo(t).pipe(ia(e),ea(e))}function oa(t,e){return new ao((i=>{let r=0;return e.schedule((function(){if(r===t.length){i.complete()}else{i.next(t[r++]);if(!i.closed){this.schedule()}}}))}))}function aa(t,e){return new ao((i=>{let r;ta(i,e,(()=>{r=t[Ho]();ta(i,e,(()=>{let t;let e;try{({value:t,done:e}=r.next())}catch(t){i.error(t);return}if(e){i.complete()}else{i.next(t)}}),0,true)}));return()=>$n(r===null||r===void 0?void 0:r.return)&&r.return()}))}function sa(t,e){if(!t){throw new Error("Iterable cannot be null")}return new ao((i=>{ta(i,e,(()=>{const r=t[Symbol.asyncIterator]();ta(i,e,(()=>{r.next().then((t=>{if(t.done){i.complete()}else{i.next(t.value)}}))}),0,true)}))}))}function ca(t,e){return sa(Ko(t),e)}function la(t,e){if(t!=null){if(Lo(t)){return ra(t,e)}if(Fo(t)){return oa(t,e)}if(jo(t)){return na(t,e)}if(Ro(t)){return sa(t,e)}if(Wo(t)){return aa(t,e)}if(Uo(t)){return ca(t,e)}}throw Po(t)}function da(t,e){return e?la(t,e):Vo(t)}function ha(...t){const e=Mo(t);return da(t,e)}const ua=On((t=>function e(){t(this);this.name="EmptyError";this.message="no elements in sequence"}));function fa(t){return t instanceof Date&&!isNaN(t)}function pa(t,e){return uo(((i,r)=>{let n=0;i.subscribe(fo(r,(i=>{r.next(t.call(e,i,n++))})))}))}const{isArray:ba}=Array;function va(t,e){return ba(e)?t(...e):t(e)}function ga(t){return pa((e=>va(t,e)))}function ma(t,e,i,r,n,o,a,s){const c=[];let l=0;let d=0;let h=false;const u=()=>{if(h&&!c.length&&!l){e.complete()}};const f=t=>l<r?p(t):c.push(t);const p=t=>{o&&e.next(t);l++;let s=false;Vo(i(t,d++)).subscribe(fo(e,(t=>{n===null||n===void 0?void 0:n(t);if(o){f(t)}else{e.next(t)}}),(()=>{s=true}),undefined,(()=>{if(s){try{l--;while(c.length&&l<r){const t=c.shift();if(a){ta(e,a,(()=>p(t)))}else{p(t)}}u()}catch(t){e.error(t)}}})))};t.subscribe(fo(e,f,(()=>{h=true;u()})));return()=>{s===null||s===void 0?void 0:s()}}function ya(t,e,i=Infinity){if($n(e)){return ya(((i,r)=>pa(((t,n)=>e(i,t,r,n)))(Vo(t(i,r)))),i)}else if(typeof e==="number"){i=e}return uo(((e,r)=>ma(e,r,t,i)))}function wa(t=Infinity){return ya(no,t)}function ka(){return wa(1)}function xa(...t){return ka()(da(t,Mo(t)))}const za=["addListener","removeListener"];const Sa=["addEventListener","removeEventListener"];const Da=["on","off"];function Aa(t,e,i,r){if($n(i)){r=i;i=undefined}if(r){return Aa(t,e,i).pipe(ga(r))}const[n,o]=Ba(t)?Sa.map((r=>n=>t[r](e,n,i))):Ca(t)?za.map(Ia(t,e)):Ma(t)?Da.map(Ia(t,e)):[];if(!n){if(Fo(t)){return ya((t=>Aa(t,e,i)))(Vo(t))}}if(!n){throw new TypeError("Invalid event target")}return new ao((t=>{const e=(...e)=>t.next(1<e.length?e:e[0]);n(e);return()=>o(e)}))}function Ia(t,e){return i=>r=>t[i](e,r)}function Ca(t){return $n(t.addListener)&&$n(t.removeListener)}function Ma(t){return $n(t.on)&&$n(t.off)}function Ba(t){return $n(t.addEventListener)&&$n(t.removeEventListener)}function $a(t=0,e,i=Do){let r=-1;if(e!=null){if(Io(e)){i=e}else{r=e}}return new ao((e=>{let n=fa(t)?+t-i.now():t;if(n<0){n=0}let o=0;return i.schedule((function(){if(!e.closed){e.next(o++);if(0<=r){this.schedule(undefined,r)}else{e.complete()}}}),n)}))}function Oa(...t){const e=Mo(t);const i=Bo(t,Infinity);const r=t;return!r.length?Ao:r.length===1?Vo(r[0]):wa(i)(da(r,e))}function Ta(t,e){return uo(((i,r)=>{let n=0;i.subscribe(fo(r,(i=>t.call(e,i,n++)&&r.next(i))))}))}function Ea(t){return uo(((e,i)=>{let r=false;let n=null;let o=null;let a=false;const s=()=>{o===null||o===void 0?void 0:o.unsubscribe();o=null;if(r){r=false;const t=n;n=null;i.next(t)}a&&i.complete()};const c=()=>{o=null;a&&i.complete()};e.subscribe(fo(i,(e=>{r=true;n=e;if(!o){Vo(t(e)).subscribe(o=fo(i,s,c))}}),(()=>{a=true;(!r||!o||o.closed)&&i.complete()})))}))}function Na(t,e=So){return Ea((()=>$a(t,e)))}function Fa(t){return uo(((e,i)=>{let r=null;let n=false;let o;r=e.subscribe(fo(i,undefined,undefined,(a=>{o=Vo(t(a,Fa(t)(e)));if(r){r.unsubscribe();r=null;o.subscribe(i)}else{n=true}})));if(n){r.unsubscribe();r=null;o.subscribe(i)}}))}function ja(t,e,i,r,n){return(o,a)=>{let s=i;let c=e;let l=0;o.subscribe(fo(a,(e=>{const i=l++;c=s?t(c,e,i):(s=true,e);r&&a.next(c)}),n&&(()=>{s&&a.next(c);a.complete()})))}}function La(t){return uo(((e,i)=>{let r=false;let n=null;let o=null;const a=()=>{o===null||o===void 0?void 0:o.unsubscribe();o=null;if(r){r=false;const t=n;n=null;i.next(t)}};e.subscribe(fo(i,(e=>{o===null||o===void 0?void 0:o.unsubscribe();r=true;n=e;o=fo(i,a,Hn);Vo(t(e)).subscribe(o)}),(()=>{a();i.complete()}),undefined,(()=>{n=o=null})))}))}function Ra(t){return uo(((e,i)=>{let r=false;e.subscribe(fo(i,(t=>{r=true;i.next(t)}),(()=>{if(!r){i.next(t)}i.complete()})))}))}function Pa(t){return t<=0?()=>Ao:uo(((e,i)=>{let r=0;e.subscribe(fo(i,(e=>{if(++r<=t){i.next(e);if(t<=r){i.complete()}}})))}))}function _a(){return uo(((t,e)=>{t.subscribe(fo(e,Hn))}))}function Ha(t){return pa((()=>t))}function Wa(t,e){if(e){return i=>xa(e.pipe(Pa(1),_a()),i.pipe(Wa(t)))}return ya(((e,i)=>Vo(t(e,i)).pipe(Pa(1),Ha(e))))}function Ka(t,e=So){const i=$a(t,e);return Wa((()=>i))}function Ua(t,e=no){t=t!==null&&t!==void 0?t:Va;return uo(((i,r)=>{let n;let o=true;i.subscribe(fo(r,(i=>{const a=e(i);if(o||!t(n,a)){o=false;n=a;r.next(i)}})))}))}function Va(t,e){return t===e}function qa(t=Ya){return uo(((e,i)=>{let r=false;e.subscribe(fo(i,(t=>{r=true;i.next(t)}),(()=>r?i.complete():i.error(t()))))}))}function Ya(){return new ua}function Ga(t,e){const i=arguments.length>=2;return r=>r.pipe(t?Ta(((e,i)=>t(e,i,r))):no,Pa(1),i?Ra(e):qa((()=>new ua)))}function Ja(t,e){return uo(ja(t,e,arguments.length>=2,true))}function Xa(...t){const e=Mo(t);return uo(((i,r)=>{(e?xa(t,i,e):xa(t,i)).subscribe(r)}))}function Za(t,e){return uo(((i,r)=>{let n=null;let o=0;let a=false;const s=()=>a&&!n&&r.complete();i.subscribe(fo(r,(i=>{n===null||n===void 0?void 0:n.unsubscribe();let a=0;const c=o++;Vo(t(i,c)).subscribe(n=fo(r,(t=>r.next(e?e(i,t,c,a++):t)),(()=>{n=null;s()})))}),(()=>{a=true;s()})))}))}function Qa(t){return uo(((e,i)=>{Vo(t).subscribe(fo(i,(()=>i.complete()),Hn));!i.closed&&e.subscribe(i)}))}function ts(t,e=false){return uo(((i,r)=>{let n=0;i.subscribe(fo(r,(i=>{const o=t(i,n++);(o||e)&&r.next(i);!o&&r.complete()})))}))}function es(t,e,i){const r=$n(t)||e||i?{next:t,error:e,complete:i}:t;return r?uo(((t,e)=>{var i;(i=r.subscribe)===null||i===void 0?void 0:i.call(r);let n=true;t.subscribe(fo(e,(t=>{var i;(i=r.next)===null||i===void 0?void 0:i.call(r,t);e.next(t)}),(()=>{var t;n=false;(t=r.complete)===null||t===void 0?void 0:t.call(r);e.complete()}),(t=>{var i;n=false;(i=r.error)===null||i===void 0?void 0:i.call(r,t);e.error(t)}),(()=>{var t,e;if(n){(t=r.unsubscribe)===null||t===void 0?void 0:t.call(r)}(e=r.finalize)===null||e===void 0?void 0:e.call(r)})))})):no}const is=":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 rs=class{constructor(e){t(this,e);this.scrolledTop=n(this,"scrolledTop",7);this.scrolledLeft=n(this,"scrolledLeft",7);this.scrolledRight=n(this,"scrolledRight",7);this.scrolledBottom=n(this,"scrolledBottom",7);this.init=new vo;this.destroyed=new vo;this.resizedEntries=new vo;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=Aa(this.scrollElement,"scroll").pipe(Qa(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);Oa(this.init,this.scrolled,this.resizedEntries).pipe(Na(rs.THROTTLE),pa((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),Ua(),Qa(this.destroyed)).subscribe((({top:t,left:e,right:i,bottom:r})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",i);this.toggleClass("cat-scrollable-bottom",r)}))}componentDidLoad(){if(!this.noScrolledInit){this.init.next()}}disconnectedCallback(){this.init.complete();this.destroyed.next();this.destroyed.complete();this.resizedObserver.disconnect()}render(){return[e("div",{class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{class:"shadow-top"}),!this.noShadowX&&e("div",{class:"shadow-left"}),!this.noShadowX&&e("div",{class:"shadow-right"}),!this.noShadowY&&e("div",{class:"shadow-bottom"})),e("div",{ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",null))]}attachEmitter(t,e){Oa(this.init,this.scrolled,this.resizedEntries).pipe(Na(rs.THROTTLE),pa((()=>this.getScrollOffset(t))),pa((t=>t<=this.scrolledBuffer)),Ua(),Ta((t=>t)),Qa(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){var i,r;if(e){(i=this.scrollWrapperElement)===null||i===void 0?void 0:i.classList.add(t)}else{(r=this.scrollWrapperElement)===null||r===void 0?void 0:r.classList.remove(t)}}};rs.THROTTLE=50;rs.style=is;var ns="__autosizeInputGhost";var os={" ":"nbsp","<":"lt",">":"gt"};function as(t){return"&"+os[t]+";"}function ss(t){return t.replace(/\s|<|>/g,as)}function cs(){var t=document.createElement("div");t.id=ns;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 ls=function(t,e){var i=window.getComputedStyle(t);var r="box-sizing:"+i.boxSizing+";border-left:"+i.borderLeftWidth+" solid red"+";border-right:"+i.borderRightWidth+" solid red"+";font-family:"+i.fontFamily+";font-feature-settings:"+i.fontFeatureSettings+";font-kerning:"+i.fontKerning+";font-size:"+i.fontSize+";font-stretch:"+i.fontStretch+";font-style:"+i.fontStyle+";font-variant:"+i.fontVariant+";font-variant-caps:"+i.fontVariantCaps+";font-variant-ligatures:"+i.fontVariantLigatures+";font-variant-numeric:"+i.fontVariantNumeric+";font-weight:"+i.fontWeight+";letter-spacing:"+i.letterSpacing+";margin-left:"+i.marginLeft+";margin-right:"+i.marginRight+";padding-left:"+i.paddingLeft+";padding-right:"+i.paddingRight+";text-indent:"+i.textIndent+";text-transform:"+i.textTransform;function n(){var e=t.value||t.getAttribute("placeholder")||"";var i=document.getElementById(ns)||cs();i.style.cssText+=r;i.innerHTML=ss(e);var n=window.getComputedStyle(i).width;t.style.width=n;return n}t.addEventListener("input",n);var o=n();if(e&&e.minWidth&&o!=="0px"){t.style.minWidth=o}return function(){t.removeEventListener("input",n);var e=document.getElementById(ns);if(e){e.parentNode.removeChild(e)}}};const ds=".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);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-bg-primary-hover{transition:background-color 0.13s, color 0.13s}.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-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 0.13s}.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-bg-primaryInverted-hover{transition:background-color 0.13s, color 0.13s}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 0.13s}.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-bg-secondary-hover{transition:background-color 0.13s, color 0.13s}.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-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 0.13s}.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-bg-secondaryInverted-hover{transition:background-color 0.13s, color 0.13s}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 0.13s}.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-success{background-color:rgb(var(--cat-success-bg-, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 0.13s, color 0.13s}.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-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 0.13s}.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-bg-warning-hover{transition:background-color 0.13s, color 0.13s}.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-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 0.13s}.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-bg-danger-hover{transition:background-color 0.13s, color 0.13s}.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-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 0.13s}.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-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !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}.label-container{flex-basis:var(--label-size, 33.33%)}.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 .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.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;margin-bottom:1rem}: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}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.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 0.13s 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;flex-wrap:wrap;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-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-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 0.13s 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:absolute;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:100}.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 hs={term:"",isOpen:false,isLoading:false,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let us=0;const fs=class{constructor(e){t(this,e);this.catOpen=n(this,"catOpen",7);this.catClose=n(this,"catClose",7);this.catChange=n(this,"catChange",7);this.catBlur=n(this,"catBlur",7);this._id=`cat-input-${us++}`;this.term$=new vo;this.more$=new vo;this.valueChangedBySelection=false;this.connector=undefined;this.state=hs;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}onConnectorChange(t){this.reset(t);this.resolve()}onValueChange(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}watchErrorsHandler(t){if(!vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}onStateChange(t,e){var i,r;const n=i=>t[i]!==e[i];if(n("isOpen")){this.update()}if(n("activeOptionIndex")&&this.state.activeOptionIndex>=0){(r=(i=this.dropdown)===null||i===void 0?void 0:i.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`))===null||r===void 0?void 0:r.scrollIntoView({block:"nearest"})}if(n("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const i=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=i}else{t=i.length?i[0]:""}}else{const e=i.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const r=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:r}}else{t={id:e.length?e[0]:"",tag:r.length?r[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){ls(this.input)}if(this.trigger&&this.dropdown){dr(this.trigger,this.dropdown,(()=>this.update()))}}componentWillRender(){this.watchErrorsHandler(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){o.warn("[A11y] Missing ARIA label on select",this)}}onBlur(t){var e;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&&((e=this.state.tempSelection)===null||e===void 0?void 0:e.length)){this.patchState({activeSelectionIndex:-1,selection:this.state.tempSelection,tempSelection:[],options:[],term:this.state.tempSelection[0].render.label})}else{this.patchState({activeSelectionIndex:-1})}this.catBlur.emit(t);if(vn(this.errorUpdate)){this.showErrors()}}onKeyDown(t){var e,i,r,n,o;const a=((e=this.hostElement.shadowRoot)===null||e===void 0?void 0:e.activeElement)===this.input;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t.key)){this.onArrowKeyDown(t)}else if(["Enter"," "].includes(t.key)&&a){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"){this.hide()}else if(t.key==="Backspace"||t.key==="Delete"){(i=this.input)===null||i===void 0?void 0:i.focus();if(!this.multiple||!this.state.term||((r=this.input)===null||r===void 0?void 0:r.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"){(n=this.trigger)===null||n===void 0?void 0:n.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){(o=this.input)===null||o===void 0?void 0:o.focus()}}onKeyUp(t){var e,i,r,n,o;if(t.key==="Tab"&&!t.shiftKey){((e=this.hostElement.shadowRoot)===null||e===void 0?void 0:e.activeElement)===this.trigger&&((i=this.input)===null||i===void 0?void 0:i.focus());if(((r=this.hostElement.shadowRoot)===null||r===void 0?void 0:r.activeElement)===this.input){this.show()}}else if(t.key==="Tab"&&t.shiftKey){const t=(n=this.trigger)===null||n===void 0?void 0:n.querySelector(`#select-clear-btn-${this.id}`);if(t){((o=this.hostElement.shadowRoot)===null||o===void 0?void 0:o.activeElement)===t&&this.show()}else{this.show()}}}async connect(t){var e;this.connector=t;let i;(e=this.subscription)===null||e===void 0?void 0:e.unsubscribe();this.subscription=this.term$.asObservable().pipe(La((t=>t?$a(this.debounce):ha(0))),Ua(),es((()=>i=this.more$.pipe(Ta((()=>!this.state.isLoading)),Ja((t=>t+1),0),Xa(0)))),es((()=>this.patchState({options:[]}))),Za((e=>i.pipe(es((()=>this.patchState({isLoading:true}))),Za((i=>t.retrieve(e,i))),es((t=>this.patchState({isLoading:false,totalElements:t.totalElements}))),ts((t=>!t.last),true),Ja(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{var i;const r=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!r.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))){let t;if(this.isTagSelected(this.state.term)){t=(i=this.state.selection.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase())))===null||i===void 0?void 0:i.render.label}r.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:r})}))}render(){var t,r;return e(i,null,e("div",{class:{"select-field":true,"select-horizontal":this.horizontal}},e("div",{class:{hidden:this.labelHidden,"label-container":true}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id},e("span",{class:"label-wrapper",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&this.requiredMarker.startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",a.t("input.optional"),")"),this.required&&this.requiredMarker.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",a.t("input.required"),")"))))),e("div",{class:"select-container"},e("div",{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",{class:"select-wrapper-inner"},this.multiple&&this.state.selection.length?e("div",{id:`select-pillbox-${this.id}`,role:"listbox","aria-orientation":"horizontal",class:"select-pills"},this.state.selection.map(((t,i)=>{var r;return e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===i},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${i}`},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:(r=t.render.avatar.initials)!==null&&r!==void 0?r:""}):null,e("span",null,t.render.label),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:a.t("select.deselect"),onClick:()=>this.deselect(t.item.id),tabIndex:-1}))}))):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:(t=this.state.selection[0].render.avatar.initials)!==null&&t!==void 0?t:""}):null,e("input",Object.assign({},this.nativeAttributes,{class:"select-input",ref:t=>this.input=t,"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-activedescendant":this.activeDescendant,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":((r=this.hint)===null||r===void 0?void 0:r.length)?this.id+"-hint":undefined,onInput:this.onInput.bind(this),value:!this.multiple?this.state.term:undefined,placeholder:this.placeholder,disabled:this.disabled||this.state.isResolving}))),this.state.isResolving&&e("cat-spinner",null),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),(this.state.selection.length||this.state.term.length)&&!this.disabled&&!this.state.isResolving&&this.clearable?e("cat-button",{id:`select-clear-btn-${this.id}`,iconOnly:true,icon:"$cat:input-close",variant:"text",size:"s",a11yLabel:a.t("input.clear"),onClick:()=>this.clear()}):null,!this.state.isResolving&&e("cat-button",{iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?a.t("select.close"):a.t("select.open"),"aria-controls":`select-listbox-${this.id}`,"aria-expanded":this.state.isOpen,tabIndex:-1,disabled:this.disabled||this.state.isResolving})),(this.hint||this.hasSlottedHint||!!Object.keys(this.errorMap||{}).length)&&e(T,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isLoading?Array.from(Array(fs.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:a.t("select.empty"))))))}get invalid(){return!!this.errorMap}get optionsList(){return this.state.options.map(((t,i)=>{var r,n;const o=this.tags&&t.item.id===`select-${this.id}-option-tag`;const a=this.isSelected(t.item.id)||this.tags&&this.isTagSelected(t.render.label);const s=()=>{if(o){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${i}`,"aria-selected":a?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===i},checked:a,tabIndex:-1,labelLeft:true,onFocus:()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()},onCatChange:e=>{!o?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:(r=t.render.avatar.initials)!==null&&r!==void 0?r:""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},s()),e("span",{class:"select-option-description"},t.render.description)))):e("div",{class:{"select-option-inner":true,"select-option-single":true,"select-option-active":this.state.activeOptionIndex===i},onFocus:()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()},onClick:()=>o?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:(n=t.render.avatar.initials)!==null&&n!==void 0?n:""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},s()),e("span",{class:"select-option-description"},t.render.description))))}))}resolve(){const t=this.connector;if(!t){return}this.patchState({isResolving:true});const e=this.initIds();let i;if(this.tags){i=this.initTags()}const r=e.length?t.resolve(e).pipe(Ga()):ha([]);r.pipe(Fa((()=>ha([])))).subscribe((e=>{const r=this.toSelectItems(t,e);if(this.tags){i.filter((t=>!this.isTagSelected(t,r))).forEach(((t,e)=>{const i={id:`select-${this.id}-tag-${e}`,name:t};r.push({item:i,render:{label:i.name}})}))}this.patchState({isResolving:false,selection:r,term:!this.multiple&&r.length?r[0].render.label:""})}))}toSelectItems(t,e){return e.map((e=>({item:Object.assign(Object.assign({},e),{id:t.customId?t.customId(e):e.id}),render:t.render(e)})))}show(){var t;if(!this.state.isOpen){this.patchState({isOpen:true});this.catOpen.emit();this.term$.next("");(t=this.input)===null||t===void 0?void 0:t.classList.remove("select-input-transparent-caret")}}hide(){if(this.state.isOpen){this.patchState({isOpen:false,activeOptionIndex:-1});this.catClose.emit()}}search(t){this.patchState({term:t,activeOptionIndex:-1,activeSelectionIndex:-1});this.term$.next(t)}isSelected(t){return this.state.selection.findIndex((e=>e.item.id===t))>=0}select(t){if(!this.isSelected(t.item.id)){let e;if(this.multiple){e=[...this.state.selection,t]}else{e=[t];this.search(t.render.label)}this.patchState({selection:e});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)}clear(){if(this.input&&this.state.term){this.patchState({selection:[],options:[],term:"",activeOptionIndex:-1,tempSelection:[]});this.term$.next("");this.input.value=""}else{this.patchState({selection:[],tempSelection:[]})}}reset(t){var e;this.connector=t!==null&&t!==void 0?t:this.connector;(e=this.subscription)===null||e===void 0?void 0:e.unsubscribe();this.subscription=undefined;this.state=hs}onClick(t){var e,i;if(this.disabled){return}const r=t.target;(e=this.trigger)===null||e===void 0?void 0:e.setAttribute("tabindex","0");(i=this.input)===null||i===void 0?void 0:i.focus();if(r===this.trigger||r===this.input||r.classList.contains("select-btn")||r.nodeName==="SPAN"){this.state.isOpen?this.hide():this.show()}}onInput(){var t,e;this.search(((t=this.input)===null||t===void 0?void 0:t.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(!((e=this.input)===null||e===void 0?void 0:e.value.trim())){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){hr(this.trigger,this.dropdown,{placement:this.placement,middleware:[mi(fs.DROPDOWN_OFFSET)]}).then((({x:t,y:e})=>{if(this.dropdown){Object.assign(this.dropdown.style,{left:`${t}px`,top:`${e}px`})}}))}}patchState(t){this.state=Object.assign(Object.assign({},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){var e,i;let r=false;(e=this.input)===null||e===void 0?void 0:e.focus();switch(t.key){case"ArrowDown":r=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":r=true;this.state.activeOptionIndex>=0?this.patchState({activeOptionIndex:Math.max(this.state.activeOptionIndex-1,-1),activeSelectionIndex:-1}):this.hide();break;case"ArrowLeft":if(((i=this.input)===null||i===void 0?void 0:i.selectionStart)===0){r=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){r=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(r){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 i=e===null||e===void 0?void 0:e.tags;const r={id:`select-${this.id}-tag-${i?i.length:0}`,name:t};this.select({item:r,render:{label:r.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(){var t;if(!this.multiple){this.hide();(t=this.input)===null||t===void 0?void 0:t.classList.add("select-input-transparent-caret")}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=gn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}get hostElement(){return r(this)}static get watchers(){return{connector:["onConnectorChange"],value:["onValueChange"],errors:["watchErrorsHandler"],state:["onStateChange"]}}};fs.SKELETON_COUNT=4;fs.DROPDOWN_OFFSET=4;fs.style=ds;const ps=class{constructor(e){t(this,e)}componentDidLoad(){var t,e,i,r,n,o,a,s;(t=this.multipleSelect)===null||t===void 0?void 0:t.connect({resolve:t=>ha(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(Ka(500)),retrieve:(t,e)=>t==="no"?ha({last:true,content:[],totalElements:0}):ha({last:false,totalElements:1e4,content:Array.from({length:10},((i,r)=>({id:""+(r+e*10),firstName:"John",lastName:`Doe (${r+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(Ka(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});(e=this.multipleSelectAvatar)===null||e===void 0?void 0:e.connect({resolve:t=>ha(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(Ka(500)),retrieve:(t,e)=>t==="no"?ha({last:true,content:[],totalElements:0}):ha({last:false,totalElements:1e4,content:Array.from({length:10},((i,r)=>({id:""+(r+e*10),firstName:"John",lastName:`Doe (${r+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(Ka(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}})});(i=this.multipleSelectAvatarInitials)===null||i===void 0?void 0:i.connect({resolve:t=>ha(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(Ka(500)),retrieve:(t,e)=>t==="no"?ha({last:true,content:[],totalElements:0}):ha({last:false,totalElements:1e4,content:Array.from({length:10},((i,r)=>({id:""+(r+e*10),firstName:"John",lastName:`Doe (${r+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(Ka(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{round:true,initials:`JD`}})});(r=this.multipleSelectTagging)===null||r===void 0?void 0:r.connect(this.countryConnector);(n=this.singleSelect)===null||n===void 0?void 0:n.connect({resolve:t=>ha(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(Ka(500)),retrieve:(t,e)=>t==="no"?ha({last:true,content:[],totalElements:0}):ha({last:false,totalElements:1e4,content:Array.from({length:10},((i,r)=>({id:""+(r+e*10),firstName:"John",lastName:`Doe (${r+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(Ka(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});(o=this.singleSelectAvatar)===null||o===void 0?void 0:o.connect(this.countryConnector);(a=this.singleSelectAvatarInitials)===null||a===void 0?void 0:a.connect(Object.assign(Object.assign({},this.countryConnector),{render:t=>{var e,i,r,n,o;return{label:t.country,description:t.capital||"No capital",avatar:{round:true,initials:`${(i=(e=t.country.charAt(0))===null||e===void 0?void 0:e.toUpperCase())!==null&&i!==void 0?i:"J"}${(o=(n=(r=t.capital)===null||r===void 0?void 0:r.charAt(0))===null||n===void 0?void 0:n.toUpperCase())!==null&&o!==void 0?o:"D"}`}}}}));(s=this.singleSelectTagging)===null||s===void 0?void 0:s.connect(this.countryConnector);setTimeout((()=>this.multipleSelect&&(this.multipleSelect.value=[])),5e3)}render(){return e(i,{style:{display:"flex",flexDirection:"column"}},e("cat-select",{label:"Multiple Select",hint:"This is a hint!",ref:t=>this.multipleSelect=t,value:["1"],placeholder:"Hello World",onCatChange:()=>{var t;return console.log("Multiple change",(t=this.multipleSelect)===null||t===void 0?void 0:t.value)},onCatBlur:t=>console.log("Multiple blur",t),multiple:true,noItems:"No results",clearable:true,errorUpdate:false},e("span",{slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{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:()=>{var t;return console.log("Multiple tagging change",(t=this.multipleSelectTagging)===null||t===void 0?void 0:t.value)},multiple:true,tags:true,clearable:true,errorUpdate:false}),e("cat-select",{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",{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",{label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{overflow:true,noAutoClose:true},e("cat-button",{slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{slot:"content",style:{width:"400px"}},e("cat-select",{label:"Single with tagging support",ref:t=>this.singleSelectTagging=t,value:{id:"",tag:"Albania"},placeholder:"Search for a country or capital",onCatChange:()=>{var t;return console.log("Single change",(t=this.singleSelectTagging)===null||t===void 0?void 0:t.value)},tagHint:"new country",tags:true,clearable:true,errorUpdate:false,style:{width:"90%"}}))))}get countryConnector(){return{resolve:t=>ha(t.map((t=>bs.find((e=>e.id===t))))).pipe(Ka(500)),retrieve:(t,e)=>{const i=bs.filter((e=>{var i;return e.country.toLowerCase().indexOf(t.toLowerCase())===0||((i=e.capital)===null||i===void 0?void 0:i.toLowerCase().indexOf(t.toLowerCase()))===0}));const r=i.slice(e*10,e*10+10);return ha({last:r.length<10,totalElements:i.length,content:r}).pipe(Ka(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 bs=[{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 vs=':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]){margin-bottom:0.5rem}:host([variant=body]){margin-bottom:1rem}.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 gs=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(i,null,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)}};gs.style=vs;const ms=":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 ys=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined}render(){return e("span",{"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{cx:"24",cy:"24",r:"21.5"})))}};ys.style=ms;const ws=":host{display:block}:host([hidden]){display:none}";let ks=0;const xs=class{constructor(e){t(this,e);this.tabClick=n(this,"tabClick",7);this.label="";this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.url=undefined;this.urlTarget=undefined;this.deactivated=false}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${ks++}`}}onClick(t){this.tabClick.emit(t)}render(){return e(i,null)}get hostElement(){return r(this)}};xs.style=ws;const zs=":host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color-dark, 215, 219, 224))}: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{padding:0.5rem 0}.cat-tab.cat-tab-active{box-shadow:inset 0 -3px 0 0 rgb(var(--cat-primary-bg, 0, 129, 148))}";const Ss=class{constructor(e){t(this,e);this.buttons=[];this.tabs=[];this.activeTabId=undefined;this.activeTab="";this.tabsAlign="left"}onActiveTabChanged(t){const e=this.tabs.find((e=>e.id===t));e===null||e===void 0?void 0:e.click()}componentWillLoad(){this.syncTabs();if(this.tabs.length){this.activeTabId=this.activeTab}}componentDidLoad(){var t;this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-TAB"))&&this.syncTabs()));(t=this.mutationObserver)===null||t===void 0?void 0:t.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){var t;(t=this.mutationObserver)===null||t===void 0?void 0:t.disconnect()}onKeydown(t){var e;if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)){const i=this.buttons.filter((t=>!t.disabled));const r=(e=this.hostElement.shadowRoot)===null||e===void 0?void 0:e.activeElement;const n=r?i.indexOf(r):-1;const o=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const a=n<0?0:(n+o+i.length)%i.length;i[a].doFocus();t.preventDefault()}}render(){return e(i,null,this.tabs.map((t=>e("cat-button",{ref:t=>t&&this.updateButtonsRef(t),buttonId:t.id,role:"tab",part:"tab",class:{"cat-tab":true,"cat-tab-active":Boolean(this.activeTabId&&t.id===this.activeTabId)},active:Boolean(this.activeTabId&&t.id===this.activeTabId),color:this.activeTabId&&t.id===this.activeTabId?"primary":"secondary",variant:"text",icon:t.icon,iconOnly:t.iconOnly,iconRight:t.iconRight,url:t.url,disabled:t.deactivated,urlTarget:t.urlTarget,onCatClick:()=>this.activeTabId=t.id},t.label))))}updateButtonsRef(t){const e=this.buttons.indexOf(t);if(e>=0){this.buttons[e]=t}else{this.buttons.push(t)}}syncTabs(){this.tabs=Array.from(this.hostElement.querySelectorAll("cat-tab"))}get hostElement(){return r(this)}static get watchers(){return{activeTabId:["onActiveTabChanged"]}}};Ss.style=zs;var Ds=new Map;function As(t){var e=Ds.get(t);e&&e.destroy()}function Is(t){var e=Ds.get(t);e&&e.update()}var Cs=null;"undefined"==typeof window?((Cs=function(t){return t}).destroy=function(t){return t},Cs.update=function(t){return t}):((Cs=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&&!Ds.has(t)){var e,i=null,r=window.getComputedStyle(t),n=(e=t.value,function(){a({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),o=function(e){t.removeEventListener("autosize:destroy",o),t.removeEventListener("autosize:update",s),t.removeEventListener("input",n),window.removeEventListener("resize",s),Object.keys(e).forEach((function(i){return t.style[i]=e[i]})),Ds.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",o),t.addEventListener("autosize:update",s),t.addEventListener("input",n),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",Ds.set(t,{destroy:o,update:s}),s()}function a(e){var n,o,s=e.restoreTextAlign,c=void 0===s?null:s,l=e.testForHeightReduction,d=void 0===l||l,h=r.overflowY;if(0!==t.scrollHeight&&("vertical"===r.resize?t.style.resize="none":"both"===r.resize&&(t.style.resize="horizontal"),d&&(n=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],i=t[1];e.style.scrollBehavior="auto",e.scrollTop=i,e.style.scrollBehavior=null}))}}(t),t.style.height=""),o="content-box"===r.boxSizing?t.scrollHeight-(parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)):t.scrollHeight+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),"none"!==r.maxHeight&&o>parseFloat(r.maxHeight)?("hidden"===r.overflowY&&(t.style.overflow="scroll"),o=parseFloat(r.maxHeight)):"hidden"!==r.overflowY&&(t.style.overflow="hidden"),t.style.height=o+"px",c&&(t.style.textAlign=c),n&&n(),i!==o&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=o),h!==r.overflow&&!c)){var u=r.textAlign;"hidden"===r.overflow&&(t.style.textAlign="start"===u?"end":"start"),a({restoreTextAlign:u,testForHeightReduction:!0})}}function s(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],As),t},Cs.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Is),t});var Ms=Cs;const Bs=".hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);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-bg-primary-hover{transition:background-color 0.13s, color 0.13s}.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-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 0.13s}.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-bg-primaryInverted-hover{transition:background-color 0.13s, color 0.13s}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 0.13s}.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-bg-secondary-hover{transition:background-color 0.13s, color 0.13s}.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-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 0.13s}.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-bg-secondaryInverted-hover{transition:background-color 0.13s, color 0.13s}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 0.13s}.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-success{background-color:rgb(var(--cat-success-bg-, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important}.cat-bg-success-hover{transition:background-color 0.13s, color 0.13s}.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-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 0.13s}.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-bg-warning-hover{transition:background-color 0.13s, color 0.13s}.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-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 0.13s}.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-bg-danger-hover{transition:background-color 0.13s, color 0.13s}.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-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 0.13s}.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-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !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}.label-container{flex-basis:var(--label-size, 33.33%)}.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 .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem}.label-optional{display:flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-character-count{display:flex;align-items:center;margin-left:auto;max-height:1.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.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);margin-bottom:1rem}: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-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 0.13s 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}";let $s=0;const Os=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this._id=`cat-textarea-${$s++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.disabled=false;this.hint=undefined;this.identifier=undefined;this.label="";this.labelHidden=false;this.maxLength=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=3;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.watchErrorsHandler(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){o.warn("[A11y] Missing ARIA label on textarea",this)}}componentDidLoad(){Ms(this.textarea)}async doFocus(t){this.textarea.focus(t)}async doBlur(){this.textarea.blur()}async doClick(){this.textarea.click()}watchErrorsHandler(t){if(!vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>Object.assign(Object.assign({},t),{[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){var t,r,n;return e(i,null,e("div",{class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{class:{hidden:this.labelHidden,"label-container":true}},(this.hasSlottedLabel||this.label)&&e("label",{htmlFor:this.id,class:{hidden:this.labelHidden}},e("span",{class:"label-wrapper",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label,e("div",{class:"label-metadata"},!this.required&&this.requiredMarker.startsWith("optional")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",a.t("input.optional"),")"),this.required&&this.requiredMarker.startsWith("required")&&e("span",{class:"label-optional","aria-hidden":"true"},"(",a.t("input.required"),")"),this.maxLength&&e("div",{class:"label-character-count","aria-hidden":"true"},(r=(t=this.value)===null||t===void 0?void 0:t.toString().length)!==null&&r!==void 0?r:0,"/",this.maxLength))))),e("div",{class:"textarea-container"},e("div",{class:{"textarea-wrapper":true,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",Object.assign({},this.nativeAttributes,{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":((n=this.hint)===null||n===void 0?void 0:n.length)?this.id+"-hint":undefined})),this.invalid&&e("cat-icon",{icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),(this.hint||this.hasSlottedHint||!!Object.keys(this.errorMap||{}).length)&&e(T,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))))}get invalid(){return!!this.errorMap}onInput(t){this.value=this.textarea.value;this.catChange.emit(t);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(vn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=gn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.textarea;if(!t){this.showErrors()}}get hostElement(){return r(this)}static get watchers(){return{errors:["watchErrorsHandler"]}}};Os.style=Bs;const Ts="";const Es=class{constructor(e){t(this,e);this.catOpen=n(this,"catOpen",7);this.catClose=n(this,"catClose",7);this.catChange=n(this,"catChange",7);this.catBlur=n(this,"catBlur",7);this.state=undefined;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.multiple=false;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.max=undefined;this.min=undefined;this.noItems=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.minutesStep=30;this.hourShort=this.isBrowserHour12()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){var t;(t=this.timeSelect)===null||t===void 0?void 0:t.connect(this.timeConnector)}render(){return e(i,null,e("cat-select",{requiredMarker:this.requiredMarker,horizontal:this.horizontal,clearable:this.clearable,disabled:this.disabled,hint:this.hint,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,multiple:this.multiple,placeholder:this.placeholder,placement:this.placement,required:this.required,noItems:this.noItems,ref:t=>this.timeSelect=t,value:this.value,errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatChange:t=>this.onCatChange(t),onCatOpen:this.onCatOpen.bind(this),onCatClose:this.onCatClose.bind(this),onCatBlur:this.onCatBlur.bind(this)},this.hasSlottedLabel&&e("span",{slot:"label"},e("slot",{name:"label"})),this.hasSlottedHint&&e("span",{slot:"hint"},e("slot",{name:"hint"}))))}get timeConnector(){return{resolve:t=>ha(t.map((t=>this.timeArray.find((e=>e.hour===this.getHour(t)&&e.minutes===this.getMinutes(t)))))),retrieve:t=>{const e=this.timeArray.filter((e=>{if(!t)return true;const i=this.hourShort?this.formatAMPM(e.hour,e.minutes):this.formatTime(e.hour,e.minutes);return i.toUpperCase().includes(t.toUpperCase())}));return ha({last:true,totalElements:e.length,content:e})},render:({hour:t,minutes:e})=>({label:this.hourShort?this.formatAMPM(t,e):this.formatTime(t,e)})}}get timeArray(){const t=[];for(let e=0;e<24;e++){for(let i=0;i<60;i+=this.minutesStep){if(this.isHigherThanMinValue(e,i)&&this.isLowerThanMaxValue(e,i)){t.push({id:this.hourShort?this.formatAMPM(e,i):this.formatTime(e,i),hour:e,minutes:i})}}}return t}isBrowserHour12(){var t,e;const i=(e=(t=window===null||window===void 0?void 0:window.navigator)===null||t===void 0?void 0:t.language)!==null&&e!==void 0?e:"en";const r=new Intl.DateTimeFormat(i,{hour:"numeric"}).format((new Date).setHours(16));return r.toLowerCase().includes("pm")}getHour(t){let e=Number(t.split(":")[0]);if(t.toLowerCase().includes("pm")&&e<12)e=e+12;if(t.toLowerCase().includes("am")&&e==12)e=e-12;return e}getMinutes(t){const e=t.match(/:(\d+)/);return Number(e?e[1]:0)}isHigherThanMinValue(t,e){if(this.min){const i=this.getHour(this.min);const r=this.getMinutes(this.min);return t>i||t===i&&e>=r}return true}isLowerThanMaxValue(t,e){if(this.max){const i=this.getHour(this.max);const r=this.getMinutes(this.max);return t<i||t===i&&e<=r}return true}formatAMPM(t,e){if(t===0){return`12:${e<10?`0${e}`:e} AM`}else if(t<12){return`${t<10?`0${t}`:t}:${e<10?`0${e}`:e} AM`}else{return`${t%12<10?`0${t%12}`:t%12}:${e<10?`0${e}`:e} PM`}}formatTime(t,e){return`${t<10?`0${t}`:t}:${e<10?`0${e}`:e}`}onCatChange(t){var e;t.stopPropagation();this.value=(e=this.timeSelect)===null||e===void 0?void 0:e.value;this.catChange.emit(t)}onCatOpen(t){t.stopPropagation();this.catOpen.emit(t)}onCatClose(t){t.stopPropagation();this.catClose.emit(t)}onCatBlur(t){t.stopPropagation();this.catBlur.emit(t)}get hostElement(){return r(this)}};Es.style=Ts;const Ns='.hint-section{display:flex;gap:0.5rem;flex-direction:column;color:rgb(var(--cat-hint-color, inherit))}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;min-width:0}.input-hint,::slotted([slot=hint]){color:rgb(var(--cat-font-color-muted, 81, 92, 108));line-height:1.5;flex:1 1 auto;min-width:0}:host{display:flex;flex-direction:column;gap:0.5rem;margin-bottom:1rem}: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)}.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 0.13s 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 0.13s 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))}';let Fs=0;const js=class{constructor(e){t(this,e);this.catChange=n(this,"catChange",7);this.catFocus=n(this,"catFocus",7);this.catBlur=n(this,"catBlur",7);this._id=`cat-toggle-${Fs++}`;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.hint=undefined;this.labelLeft=false;this.nativeAttributes=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');if(!this.label&&!this.hasSlottedLabel){o.warn("[A11y] Missing ARIA label on toggle",this)}}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}async doClick(){this.input.click()}render(){return e(i,null,e("label",{htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",Object.assign({},this.nativeAttributes,{ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value!==undefined?String(this.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)})),e("span",{class:"toggle",part:"toggle"}),e("span",{class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{name:"label"})||this.label)),(this.hint||this.hasSlottedHint)&&e("div",{class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{class:"toggle-placeholder"}),e(T,{id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}onInput(t){this.checked=this.input.checked;if(!this.value||typeof this.value==="boolean"){this.value=this.checked}this.catChange.emit(t)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}get hostElement(){return r(this)}};js.style=Ns;const Ls="ontouchstart"in window||navigator.maxTouchPoints>0;const Rs=':host{display:contents}:host([hidden]){display:none}.tooltip{--cat-font-color-head:cat-token("color.ui.font.tooltip", $wrap: false);--cat-font-color-body:cat-token("color.ui.font.tooltip", $wrap: false);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 0.25s linear, visibility 0.25s linear;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;z-index: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-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}';let Ps=0;const _s=class{constructor(e){t(this,e);this.id=`cat-tooltip-${Ps++}`;this.hidden=false;this.hasSlottedContent=false;this.content="";this.disabled=false;this.placement="top";this.round=false;this.size="m";this.showDelay=250;this.hideDelay=0;this.longTouchDuration=1e3}handleKeyDown({key:t}){t==="Escape"&&this.hideListener()}componentDidLoad(){var t,e,i,r,n,o,a,s,c;const l=(t=this.hostElement.shadowRoot)===null||t===void 0?void 0:t.querySelector("slot");this.trigger=(i=(e=l===null||l===void 0?void 0:l.assignedElements)===null||e===void 0?void 0:e.call(l))===null||i===void 0?void 0:i[0];if(this.trigger&&!this.trigger.hasAttribute("aria-describedby")){this.trigger.setAttribute("aria-describedby",this.id)}if(Ls){window.addEventListener("touchstart",this.windowTouchStartListener.bind(this));(r=this.trigger)===null||r===void 0?void 0:r.addEventListener("touchstart",this.touchStartListener.bind(this));(n=this.trigger)===null||n===void 0?void 0:n.addEventListener("touchend",this.touchEndListener.bind(this))}else{(o=this.trigger)===null||o===void 0?void 0:o.addEventListener("focusin",this.showListener.bind(this));(a=this.trigger)===null||a===void 0?void 0:a.addEventListener("focusout",this.hideListener.bind(this));(s=this.trigger)===null||s===void 0?void 0:s.addEventListener("mouseenter",this.showListener.bind(this));(c=this.trigger)===null||c===void 0?void 0:c.addEventListener("mouseleave",this.hideListener.bind(this))}}componentWillRender(){this.hasSlottedContent=!!this.hostElement.querySelector('[slot="content"]');this.hidden=this.disabled||!this.content&&!this.hasSlottedContent}disconnectedCallback(){var t,e,i,r,n,o;if(Ls){window.removeEventListener("touchstart",this.windowTouchStartListener.bind(this));(t=this.trigger)===null||t===void 0?void 0:t.removeEventListener("touchstart",this.touchStartListener.bind(this));(e=this.trigger)===null||e===void 0?void 0:e.removeEventListener("touchend",this.touchEndListener.bind(this))}else{(i=this.trigger)===null||i===void 0?void 0:i.removeEventListener("mouseenter",this.showListener.bind(this));(r=this.trigger)===null||r===void 0?void 0:r.removeEventListener("mouseleave",this.hideListener.bind(this));(n=this.trigger)===null||n===void 0?void 0:n.removeEventListener("focusin",this.showListener.bind(this));(o=this.trigger)===null||o===void 0?void 0:o.removeEventListener("focusout",this.hideListener.bind(this))}}render(){return e(i,null,e("slot",null),e("div",{ref:t=>this.tooltip=t,id:this.id,"aria-hidden":this.hidden,class:{tooltip:true,"tooltip-hidden":this.hidden,"tooltip-round":this.round,[`tooltip-${this.size}`]:Boolean(this.size)}},this.hasSlottedContent?e("slot",{name:"content"}):this.content))}async update(){if(this.trigger&&this.tooltip){await hr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[mi(_s.OFFSET),vi(),wi({padding:_s.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.showTimeout=window.setTimeout((()=>{this.showTooltip()}),this.showDelay)}hideListener(){window.clearTimeout(this.showTimeout);this.hideTimeout=window.setTimeout((()=>{var t;(t=this.tooltip)===null||t===void 0?void 0:t.classList.remove("tooltip-show");this.hideTooltip()}),this.hideDelay)}touchStartListener(t){t.stopPropagation();this.touchTimeout=window.setTimeout((()=>{this.showTooltip()}),this.longTouchDuration)}touchEndListener(){if(this.touchTimeout){window.clearTimeout(this.touchTimeout);this.hideTooltip()}}windowTouchStartListener(){var t;(t=this.tooltip)===null||t===void 0?void 0:t.classList.remove("tooltip-show")}showTooltip(){var t;if(this.trigger&&this.tooltip){this.cleanupFloatingUi=dr(this.trigger,this.tooltip,(()=>this.update()))}!this.hidden&&((t=this.tooltip)===null||t===void 0?void 0:t.classList.add("tooltip-show"))}hideTooltip(){if(this.cleanupFloatingUi){this.cleanupFloatingUi()}}get hostElement(){return r(this)}};_s.OFFSET=4;_s.SHIFT_PADDING=4;_s.style=Rs;export{u as cat_alert,b as cat_avatar,g as cat_badge,C as cat_button,B as cat_button_group,O as cat_card,F as cat_checkbox,Ye as cat_datepicker,hn as cat_dropdown,fn as cat_form_group,bn as cat_icon,kn as cat_input,zn as cat_label,Dn as cat_pagination,Cn as cat_radio,Bn as cat_radio_group,rs as cat_scrollable,fs as cat_select,ps as cat_select_demo,gs as cat_skeleton,ys as cat_spinner,xs as cat_tab,Ss as cat_tabs,Os as cat_textarea,Es as cat_timepicker,js as cat_toggle,_s as cat_tooltip};
10
+ //# sourceMappingURL=p-34e0cbba.entry.js.map