@supersoniks/concorde 1.1.47 → 1.1.48

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 (33) hide show
  1. package/concorde-core.bundle.js +16 -16
  2. package/concorde-core.es.js +254 -96
  3. package/core/components/functional/fetch/fetch.d.ts +4 -0
  4. package/core/components/functional/list/list.d.ts +4 -0
  5. package/core/components/functional/queue/queue.d.ts +2 -0
  6. package/core/components/functional/queue/queue.js +37 -11
  7. package/core/components/functional/sdui/sdui.d.ts +4 -0
  8. package/core/components/ui/badge/badge.js +3 -4
  9. package/core/components/ui/button/button.d.ts +4 -0
  10. package/core/components/ui/form/checkbox/checkbox.d.ts +8 -0
  11. package/core/components/ui/form/css/form-control.js +7 -5
  12. package/core/components/ui/form/form-layout/form-layout.js +3 -1
  13. package/core/components/ui/form/input/input.d.ts +8 -1
  14. package/core/components/ui/form/input/input.js +10 -3
  15. package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +102 -13
  16. package/core/components/ui/form/input-autocomplete/input-autocomplete.js +212 -53
  17. package/core/components/ui/form/textarea/textarea.d.ts +4 -0
  18. package/core/components/ui/modal/modal.d.ts +2 -0
  19. package/core/components/ui/modal/modal.js +6 -3
  20. package/core/components/ui/pop/pop.js +17 -6
  21. package/core/decorators/Subscriber.d.ts +3 -0
  22. package/core/decorators/Subscriber.js +78 -0
  23. package/core/mixins/Fetcher.d.ts +7 -1
  24. package/core/mixins/FormCheckable.d.ts +4 -0
  25. package/core/mixins/FormElement.d.ts +1 -0
  26. package/core/mixins/FormElement.js +6 -2
  27. package/core/mixins/FormInput.d.ts +5 -4
  28. package/core/mixins/Subscriber.d.ts +4 -0
  29. package/core/mixins/Subscriber.js +30 -4
  30. package/mixins.d.ts +12 -0
  31. package/package.json +2 -2
  32. package/concorde-customer.bundle.js +0 -129
  33. package/concorde-customer.es.js +0 -22004
@@ -33,7 +33,7 @@
33
33
  * @license
34
34
  * Copyright 2017 Google LLC
35
35
  * SPDX-License-Identifier: BSD-3-Clause
36
- */function A(t,e,s){let i,r=t;return"object"==typeof t?(r=t.slot,i=t):i={flatten:e},s?k({slot:r,flatten:e,selector:s}):y({descriptor:t=>({get(){var t,e;const s="slot"+(r?`[name=${r}]`:":not([name])"),o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(s);return null!==(e=null==o?void 0:o.assignedNodes(i))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}var C=Object.defineProperty,P=Object.getOwnPropertyDescriptor,S=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?P(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&C(e,s,o),o};let $=!1,O=new Set;const L=(t,i)=>{const o=class extends t{constructor(...t){super(),this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=t=>{this.props=t}}hasAncestorAttribute(t){return null!=this.getAncestorAttributeValue(t)}getAncestorAttributeValue(t){return e.getAncestorAttributeValue(this,t)}get props(){return null===this._props&&this.publisher?this.publisher.get():this._props}set props(t){"string"==typeof t&&["{","["].includes(t.trim().charAt(0))&&(t=JSON.parse(t)),t!=this._props&&(this._props=t,this.publisher&&this.publisher.get()!=t&&this.publisher.set(t),this.requestUpdate())}updated(t){super.updated(t);const e=[...(this.shadowRoot||this).children].filter((t=>"STYLE"!=t.tagName)),s=this.displayContents?"contents":0==e.length?"none":null;s?this.style.display=s:this.style.removeProperty("display")}connectedCallback(){if(o.instanceCounter++,this.hasAttribute("lazyRendering")){const t={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};let e=!0;const s=new IntersectionObserver((t=>{for(const i of t)if(e&&i.isIntersecting){this.addDebugger(),e=!1,this.initWording(),this.initPublisher(),s.disconnect();break}}),t);s.observe(this)}else this.initWording(),this.initPublisher(),this.addDebugger();super.connectedCallback()}disconnectedCallback(){var t;this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&(null==(t=this.publisher)||t.offAssign(this.onAssign))}addDebugger(){var t;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const t=this.debug.style;t.position="fixed",t.top="0",t.right="0",t.margin="auto",t.borderRadius=".7rem",t.backgroundColor="#0f1729",t.color="#c5d4f9",t.padding="16px 16px",t.margin="16px 16px",t.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",t.overflowY="auto",t.zIndex="99999999",t.maxHeight="calc(100vh - 32px)",t.fontFamily="Consolas, monospace",t.maxWidth="min(50vw,25rem)",t.fontSize="12px",t.minWidth="300px",t.overflowWrap="break-word",t.resize="vertical"}this.addEventListener("click",(t=>{t.ctrlKey&&(t.preventDefault(),$=!$)})),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",(()=>{$||this.removeDebugger(),document.body.appendChild(this.debug),O.add(this.debug)})),this.addEventListener("mouseout",(()=>{$||this.removeDebugger()})),null==(t=this.publisher)||t.onInternalMutation((()=>{var t;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : épingler / désépingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(null==(t=this.publisher)?void 0:t.get(),null," ")}</pre>`}))}}removeDebugger(){O.forEach((t=>{document.body.contains(t)&&document.body.removeChild(t)})),O=new Set}getApiConfiguration(){const t=this.getAncestorAttributeValue("token"),e=null!=this.getAncestorAttributeValue("addHTTPResponse"),s=this.getAncestorAttributeValue("serviceURL");let i=null,r=null;const o=this.getAncestorAttributeValue("tokenProvider"),n=this.getAncestorAttributeValue("eventsApiToken");t||(i=this.getAncestorAttributeValue("userName"),r=this.getAncestorAttributeValue("password"));return{serviceURL:s,token:t,userName:i,password:r,authToken:n,tokenProvider:o,addHTTPResponse:e,credentials:this.getAncestorAttributeValue("credentials")||void 0,cache:this.getAttribute("cache")||void 0}}async initWording(){let t=!1;const e=Object.getOwnPropertyNames(this.constructor.prototype);for(const r of e)if(0==r.indexOf("wording_")){t=!0;break}if(!t)return;const s=h.get("sonic-wording"),i=this.getAncestorAttributeValue("wordingProvider"),o=new r(this.getApiConfiguration());if(i){const t=[],r=s.get();for(const i of e)if(0==i.indexOf("wording_")){const e=i.substring(8);r[i]||(s[i]="...",t.push(e))}if(t.length>0){const e=await o.post(i,{labels:t});for(const t in e)s["wording_"+t]=e[t]}s.startTemplateFilling(this),this.wordingPublisher=s}}createRenderRoot(){if(""===this.noShadowDom||""===this.getAttribute("noShadowDom"))return this;const t=super.createRenderRoot();return g.observe(t),t}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const t=h.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let e=this.dataProvider;if(!e&&this._props&&(this.dataProvider=e="__subscriber__"+o.instanceCounter),e){this.bindPublisher&&t.set(e,this.bindPublisher());let i=t.get(e,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=e,this.hasAttribute("subDataProvider")){const r=this.getAttribute("subDataProvider");this.dataProvider=e+"/"+r,i=s.traverse(i,r.split(".")),t.set(this.dataProvider,i),this.publisher=i}this.publisher=i}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}};let n=o;return n.instanceCounter=0,S([f({type:Boolean})],n.prototype,"displayContents",2),S([f({type:Boolean})],n.prototype,"noAutoFill",2),S([f({type:Boolean})],n.prototype,"forceAutoFill",2),S([f({type:Object})],n.prototype,"propertyMap",2),S([f({type:String,attribute:"data-title"})],n.prototype,"title",2),S([f({reflect:!0})],n.prototype,"dataProvider",2),S([f()],n.prototype,"bindPublisher",2),S([f()],n.prototype,"props",1),n};window.SonicPublisherManager||(window.SonicPublisherManager=h);var D=Object.defineProperty,j=Object.getOwnPropertyDescriptor;const E=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const t=this.templates||[...this.querySelectorAll("template")];for(const e of t)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e));this.templateList=t.filter((t=>!t.getAttribute("data-value"))),0==this.templateList.length&&(this.templateList=t),super.connectedCallback()}}return((t,e,s,i)=>{for(var r,o=i>1?void 0:i?j(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);i&&o&&D(e,s,o)})([f({type:Array})],e.prototype,"templates",2),e},M=window,z=M.ShadowRoot&&(void 0===M.ShadyCSS||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,N=Symbol(),I=new WeakMap;
36
+ */function A(t,e,s){let i,r=t;return"object"==typeof t?(r=t.slot,i=t):i={flatten:e},s?k({slot:r,flatten:e,selector:s}):y({descriptor:t=>({get(){var t,e;const s="slot"+(r?`[name=${r}]`:":not([name])"),o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(s);return null!==(e=null==o?void 0:o.assignedNodes(i))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}var P=Object.defineProperty,C=Object.getOwnPropertyDescriptor,S=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?C(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&P(e,s,o),o};let $=!1,O=new Set;const D=(t,i)=>{const o=class extends t{constructor(...t){super(),this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=t=>{this.props=t}}onConnected(t){this.connectedCallbackCalls||(this.connectedCallbackCalls=new Set),this.connectedCallbackCalls.add(t)}onDisconnected(t){this.disconnectedCallbackCalls||(this.disconnectedCallbackCalls=new Set),this.disconnectedCallbackCalls.add(t)}offConnected(t){this.connectedCallbackCalls||(this.connectedCallbackCalls=new Set),this.connectedCallbackCalls.delete(t)}offDisconnected(t){this.disconnectedCallbackCalls||(this.disconnectedCallbackCalls=new Set),this.disconnectedCallbackCalls.delete(t)}hasAncestorAttribute(t){return null!=this.getAncestorAttributeValue(t)}getAncestorAttributeValue(t){return e.getAncestorAttributeValue(this,t)}get props(){return null===this._props&&this.publisher?this.publisher.get():this._props}set props(t){"string"==typeof t&&["{","["].includes(t.trim().charAt(0))&&(t=JSON.parse(t)),t!=this._props&&(this._props=t,this.publisher&&this.publisher.get()!=t&&this.publisher.set(t),this.requestUpdate())}updated(t){super.updated(t);const e=[...(this.shadowRoot||this).children].filter((t=>"STYLE"!=t.tagName)),s=this.displayContents?"contents":0==e.length?"none":null;s?this.style.display=s:this.style.removeProperty("display")}connectedCallback(){var t;if(o.instanceCounter++,this.hasAttribute("lazyRendering")){const t={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};let e=!0;const s=new IntersectionObserver((t=>{for(const i of t)if(e&&i.isIntersecting){this.addDebugger(),e=!1,this.initWording(),this.initPublisher(),s.disconnect();break}}),t);s.observe(this)}else this.initWording(),this.initPublisher(),this.addDebugger();super.connectedCallback(),null==(t=this.connectedCallbackCalls)||t.forEach((t=>t(this)))}disconnectedCallback(){var t,e;null==(t=this.disconnectedCallbackCalls)||t.forEach((t=>t(this))),this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&(null==(e=this.publisher)||e.offAssign(this.onAssign))}addDebugger(){var t;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const t=this.debug.style;t.position="fixed",t.top="0",t.right="0",t.margin="auto",t.borderRadius=".7rem",t.backgroundColor="#0f1729",t.color="#c5d4f9",t.padding="16px 16px",t.margin="16px 16px",t.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",t.overflowY="auto",t.zIndex="99999999",t.maxHeight="calc(100vh - 32px)",t.fontFamily="Consolas, monospace",t.maxWidth="min(50vw,25rem)",t.fontSize="12px",t.minWidth="300px",t.overflowWrap="break-word",t.resize="vertical"}this.addEventListener("click",(t=>{t.ctrlKey&&(t.preventDefault(),$=!$)})),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",(()=>{$||this.removeDebugger(),document.body.appendChild(this.debug),O.add(this.debug)})),this.addEventListener("mouseout",(()=>{$||this.removeDebugger()})),null==(t=this.publisher)||t.onInternalMutation((()=>{var t;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : épingler / désépingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(null==(t=this.publisher)?void 0:t.get(),null," ")}</pre>`}))}}removeDebugger(){O.forEach((t=>{document.body.contains(t)&&document.body.removeChild(t)})),O=new Set}getApiConfiguration(){const t=this.getAncestorAttributeValue("token"),e=null!=this.getAncestorAttributeValue("addHTTPResponse"),s=this.getAncestorAttributeValue("serviceURL");let i=null,r=null;const o=this.getAncestorAttributeValue("tokenProvider"),n=this.getAncestorAttributeValue("eventsApiToken");t||(i=this.getAncestorAttributeValue("userName"),r=this.getAncestorAttributeValue("password"));return{serviceURL:s,token:t,userName:i,password:r,authToken:n,tokenProvider:o,addHTTPResponse:e,credentials:this.getAncestorAttributeValue("credentials")||void 0,cache:this.getAttribute("cache")||void 0}}async initWording(){let t=!1;const e=Object.getOwnPropertyNames(this.constructor.prototype);for(const r of e)if(0==r.indexOf("wording_")){t=!0;break}if(!t)return;const s=h.get("sonic-wording",{localStorageMode:"enabled"});await h.getInstance().isLocalStrorageReady;const i=this.getAncestorAttributeValue("wordingProvider"),o=new r(this.getApiConfiguration());if(i){const t=[],r=s.get();for(const i of e)if(0==i.indexOf("wording_")){const e=i.substring(8);r[i]||(s[i]="...",t.push(e))}if(t.length>0){const e=i+"?labels[]="+t.join("&labels[]="),r=await o.get(e);for(const t in r)s["wording_"+t]=r[t]}s.startTemplateFilling(this),this.wordingPublisher=s}}createRenderRoot(){if(""===this.noShadowDom||""===this.getAttribute("noShadowDom"))return this;const t=super.createRenderRoot();return g.observe(t),t}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const t=h.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let e=this.dataProvider;if(!e&&this._props&&(this.dataProvider=e="__subscriber__"+o.instanceCounter),e){this.bindPublisher&&t.set(e,this.bindPublisher());let i=t.get(e,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=e,this.hasAttribute("subDataProvider")){const r=this.getAttribute("subDataProvider");this.dataProvider=e+"/"+r,i=s.traverse(i,r.split(".")),t.set(this.dataProvider,i),this.publisher=i}this.publisher=i}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}};let n=o;return n.instanceCounter=0,S([f({type:Boolean})],n.prototype,"displayContents",2),S([f({type:Boolean})],n.prototype,"noAutoFill",2),S([f({type:Boolean})],n.prototype,"forceAutoFill",2),S([f({type:Object})],n.prototype,"propertyMap",2),S([f({type:String,attribute:"data-title"})],n.prototype,"title",2),S([f({reflect:!0})],n.prototype,"dataProvider",2),S([f()],n.prototype,"bindPublisher",2),S([f()],n.prototype,"props",1),n};window.SonicPublisherManager||(window.SonicPublisherManager=h);var L=Object.defineProperty,E=Object.getOwnPropertyDescriptor;const j=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const t=this.templates||[...this.querySelectorAll("template")];for(const e of t)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e));this.templateList=t.filter((t=>!t.getAttribute("data-value"))),0==this.templateList.length&&(this.templateList=t),super.connectedCallback()}}return((t,e,s,i)=>{for(var r,o=i>1?void 0:i?E(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);i&&o&&L(e,s,o)})([f({type:Array})],e.prototype,"templates",2),e},M=window,z=M.ShadowRoot&&(void 0===M.ShadyCSS||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,N=Symbol(),I=new WeakMap;
37
37
  /**
38
38
  * @license
39
39
  * Copyright 2019 Google LLC
@@ -43,75 +43,75 @@
43
43
  * @license
44
44
  * Copyright 2017 Google LLC
45
45
  * SPDX-License-Identifier: BSD-3-Clause
46
- */;var U;const V=window,B=V.trustedTypes,q=B?B.emptyScript:"",H=V.reactiveElementPolyfillSupport,W={toAttribute(t,e){switch(e){case Boolean:t=t?q:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(i){s=null}}return s}},K=(t,e)=>e!==t&&(e==e||t==t),Z={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:K};class Y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=Z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(R(t))}else void 0!==t&&e.push(R(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{z?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const s=document.createElement("style"),i=M.litNonce;void 0!==i&&s.setAttribute("nonce",i),s.textContent=e.cssText,t.appendChild(s)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=Z){var i;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:W).toAttribute(e,s.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:W;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||K)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
46
+ */;var V;const U=window,q=U.trustedTypes,B=q?q.emptyScript:"",H=U.reactiveElementPolyfillSupport,W={toAttribute(t,e){switch(e){case Boolean:t=t?B:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(i){s=null}}return s}},K=(t,e)=>e!==t&&(e==e||t==t),Z={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:K};class Q extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=Z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Z}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(R(t))}else void 0!==t&&e.push(R(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{z?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const s=document.createElement("style"),i=M.litNonce;void 0!==i&&s.setAttribute("nonce",i),s.textContent=e.cssText,t.appendChild(s)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=Z){var i;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:W).toAttribute(e,s.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:W;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||K)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
47
47
  /**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
51
  */
52
- var Q;Y.finalized=!0,Y.elementProperties=new Map,Y.elementStyles=[],Y.shadowRootOptions={mode:"open"},null==H||H({ReactiveElement:Y}),(null!==(U=V.reactiveElementVersions)&&void 0!==U?U:V.reactiveElementVersions=[]).push("1.6.1");const G=window,J=G.trustedTypes,X=J?J.createPolicy("lit-html",{createHTML:t=>t}):void 0,tt=`lit$${(Math.random()+"").slice(9)}$`,et="?"+tt,st=`<${et}>`,it=document,rt=(t="")=>it.createComment(t),ot=t=>null===t||"object"!=typeof t&&"function"!=typeof t,nt=Array.isArray,at=t=>nt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,ht=/>/g,dt=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),pt=/'/g,ut=/"/g,gt=/^(?:script|style|textarea|title)$/i,bt=(xt=1,(t,...e)=>({_$litType$:xt,strings:t,values:e})),mt=Symbol.for("lit-noChange"),ft=Symbol.for("lit-nothing"),vt=new WeakMap,yt=it.createTreeWalker(it,129,null,!1),wt=(t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":"",n=lt;for(let l=0;l<s;l++){const e=t[l];let s,a,c=-1,h=0;for(;h<e.length&&(n.lastIndex=h,a=n.exec(e),null!==a);)h=n.lastIndex,n===lt?"!--"===a[1]?n=ct:void 0!==a[1]?n=ht:void 0!==a[2]?(gt.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=dt):void 0!==a[3]&&(n=dt):n===dt?">"===a[0]?(n=null!=r?r:lt,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,s=a[1],n=void 0===a[3]?dt:'"'===a[3]?ut:pt):n===ut||n===pt?n=dt:n===ct||n===ht?n=lt:(n=dt,r=void 0);const d=n===dt&&t[l+1].startsWith("/>")?" ":"";o+=n===lt?e+st:c>=0?(i.push(s),e.slice(0,c)+"$lit$"+e.slice(c)+tt+d):e+tt+(-2===c?(i.push(void 0),l):d)}const a=o+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==X?X.createHTML(a):a,i]};var xt;class _t{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,c]=wt(t,e);if(this.el=_t.createElement(l,s),yt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=yt.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(tt)){const s=c[o++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(tt),e=/([.?@])?(.*)/.exec(s);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?St:"?"===e[1]?Ot:"@"===e[1]?Lt:Pt})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(gt.test(i.tagName)){const t=i.textContent.split(tt),e=t.length-1;if(e>0){i.textContent=J?J.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],rt()),yt.nextNode(),a.push({type:2,index:++r});i.append(t[e],rt())}}}else if(8===i.nodeType)if(i.data===et)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(tt,t+1));)a.push({type:7,index:r}),t+=tt.length-1}r++}}static createElement(t,e){const s=it.createElement("template");return s.innerHTML=t,s}}function kt(t,e,s=t,i){var r,o,n,a;if(e===mt)return e;let l=void 0!==i?null===(r=s._$Co)||void 0===r?void 0:r[i]:s._$Cl;const c=ot(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,s,i)),void 0!==i?(null!==(n=(a=s)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:s._$Cl=l),void 0!==l&&(e=kt(t,l._$AS(t,e.values),l,i)),e}class At{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:it).importNode(s,!0);yt.currentNode=r;let o=yt.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new Ct(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new Dt(o,this,t)),this.u.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(o=yt.nextNode(),n++)}return r}p(t){let e=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Ct{constructor(t,e,s,i){var r;this.type=2,this._$AH=ft,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cm=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=kt(this,t,e),ot(t)?t===ft||null==t||""===t?(this._$AH!==ft&&this._$AR(),this._$AH=ft):t!==this._$AH&&t!==mt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):at(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==ft&&ot(this._$AH)?this._$AA.nextSibling.data=t:this.T(it.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=_t.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(s);else{const t=new At(r,this),e=t.v(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let e=vt.get(t.strings);return void 0===e&&vt.set(t.strings,e=new _t(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new Ct(this.O(rt()),this.O(rt()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Pt{constructor(t,e,s,i,r){this.type=1,this._$AH=ft,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=ft}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=kt(this,t,e,0),o=!ot(t)||t!==this._$AH&&t!==mt,o&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=kt(this,i[s+n],e,n),a===mt&&(a=this._$AH[n]),o||(o=!ot(a)||a!==this._$AH[n]),a===ft?t=ft:t!==ft&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!i&&this.j(t)}j(t){t===ft?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class St extends Pt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ft?void 0:t}}const $t=J?J.emptyScript:"";class Ot extends Pt{constructor(){super(...arguments),this.type=4}j(t){t&&t!==ft?this.element.setAttribute(this.name,$t):this.element.removeAttribute(this.name)}}class Lt extends Pt{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=kt(this,t,e,0))&&void 0!==s?s:ft)===mt)return;const i=this._$AH,r=t===ft&&i!==ft||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==ft&&(i===ft||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Dt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){kt(this,t)}}const jt={P:"$lit$",A:tt,M:et,C:1,L:wt,R:At,D:at,V:kt,I:Ct,H:Pt,N:Ot,U:Lt,B:St,F:Dt},Et=G.litHtmlPolyfillSupport;null==Et||Et(_t,Ct),(null!==(Q=G.litHtmlVersions)&&void 0!==Q?Q:G.litHtmlVersions=[]).push("2.6.1");
52
+ var Y;Q.finalized=!0,Q.elementProperties=new Map,Q.elementStyles=[],Q.shadowRootOptions={mode:"open"},null==H||H({ReactiveElement:Q}),(null!==(V=U.reactiveElementVersions)&&void 0!==V?V:U.reactiveElementVersions=[]).push("1.6.1");const G=window,J=G.trustedTypes,X=J?J.createPolicy("lit-html",{createHTML:t=>t}):void 0,tt=`lit$${(Math.random()+"").slice(9)}$`,et="?"+tt,st=`<${et}>`,it=document,rt=(t="")=>it.createComment(t),ot=t=>null===t||"object"!=typeof t&&"function"!=typeof t,nt=Array.isArray,at=t=>nt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,ht=/>/g,dt=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),pt=/'/g,ut=/"/g,gt=/^(?:script|style|textarea|title)$/i,bt=(xt=1,(t,...e)=>({_$litType$:xt,strings:t,values:e})),mt=Symbol.for("lit-noChange"),ft=Symbol.for("lit-nothing"),vt=new WeakMap,yt=it.createTreeWalker(it,129,null,!1),wt=(t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":"",n=lt;for(let l=0;l<s;l++){const e=t[l];let s,a,c=-1,h=0;for(;h<e.length&&(n.lastIndex=h,a=n.exec(e),null!==a);)h=n.lastIndex,n===lt?"!--"===a[1]?n=ct:void 0!==a[1]?n=ht:void 0!==a[2]?(gt.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=dt):void 0!==a[3]&&(n=dt):n===dt?">"===a[0]?(n=null!=r?r:lt,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,s=a[1],n=void 0===a[3]?dt:'"'===a[3]?ut:pt):n===ut||n===pt?n=dt:n===ct||n===ht?n=lt:(n=dt,r=void 0);const d=n===dt&&t[l+1].startsWith("/>")?" ":"";o+=n===lt?e+st:c>=0?(i.push(s),e.slice(0,c)+"$lit$"+e.slice(c)+tt+d):e+tt+(-2===c?(i.push(void 0),l):d)}const a=o+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==X?X.createHTML(a):a,i]};var xt;class _t{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,c]=wt(t,e);if(this.el=_t.createElement(l,s),yt.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=yt.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(tt)){const s=c[o++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(tt),e=/([.?@])?(.*)/.exec(s);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?St:"?"===e[1]?Ot:"@"===e[1]?Dt:Ct})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(gt.test(i.tagName)){const t=i.textContent.split(tt),e=t.length-1;if(e>0){i.textContent=J?J.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],rt()),yt.nextNode(),a.push({type:2,index:++r});i.append(t[e],rt())}}}else if(8===i.nodeType)if(i.data===et)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(tt,t+1));)a.push({type:7,index:r}),t+=tt.length-1}r++}}static createElement(t,e){const s=it.createElement("template");return s.innerHTML=t,s}}function kt(t,e,s=t,i){var r,o,n,a;if(e===mt)return e;let l=void 0!==i?null===(r=s._$Co)||void 0===r?void 0:r[i]:s._$Cl;const c=ot(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,s,i)),void 0!==i?(null!==(n=(a=s)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:s._$Cl=l),void 0!==l&&(e=kt(t,l._$AS(t,e.values),l,i)),e}class At{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:it).importNode(s,!0);yt.currentNode=r;let o=yt.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new Pt(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new Lt(o,this,t)),this.u.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(o=yt.nextNode(),n++)}return r}p(t){let e=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Pt{constructor(t,e,s,i){var r;this.type=2,this._$AH=ft,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cm=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=kt(this,t,e),ot(t)?t===ft||null==t||""===t?(this._$AH!==ft&&this._$AR(),this._$AH=ft):t!==this._$AH&&t!==mt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):at(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==ft&&ot(this._$AH)?this._$AA.nextSibling.data=t:this.T(it.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=_t.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(s);else{const t=new At(r,this),e=t.v(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let e=vt.get(t.strings);return void 0===e&&vt.set(t.strings,e=new _t(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new Pt(this.O(rt()),this.O(rt()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Ct{constructor(t,e,s,i,r){this.type=1,this._$AH=ft,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=ft}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=kt(this,t,e,0),o=!ot(t)||t!==this._$AH&&t!==mt,o&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=kt(this,i[s+n],e,n),a===mt&&(a=this._$AH[n]),o||(o=!ot(a)||a!==this._$AH[n]),a===ft?t=ft:t!==ft&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!i&&this.j(t)}j(t){t===ft?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class St extends Ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ft?void 0:t}}const $t=J?J.emptyScript:"";class Ot extends Ct{constructor(){super(...arguments),this.type=4}j(t){t&&t!==ft?this.element.setAttribute(this.name,$t):this.element.removeAttribute(this.name)}}class Dt extends Ct{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=kt(this,t,e,0))&&void 0!==s?s:ft)===mt)return;const i=this._$AH,r=t===ft&&i!==ft||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==ft&&(i===ft||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Lt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){kt(this,t)}}const Et={P:"$lit$",A:tt,M:et,C:1,L:wt,R:At,D:at,V:kt,I:Pt,H:Ct,N:Ot,U:Dt,B:St,F:Lt},jt=G.litHtmlPolyfillSupport;null==jt||jt(_t,Pt),(null!==(Y=G.litHtmlVersions)&&void 0!==Y?Y:G.litHtmlVersions=[]).push("2.6.1");
53
53
  /**
54
54
  * @license
55
55
  * Copyright 2017 Google LLC
56
56
  * SPDX-License-Identifier: BSD-3-Clause
57
57
  */
58
- var Mt,zt;class Nt extends Y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{var i,r;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==s?void 0:s.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new Ct(e.insertBefore(rt(),t),t,void 0,null!=s?s:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return mt}}Nt.finalized=!0,Nt._$litElement$=!0,null===(Mt=globalThis.litElementHydrateSupport)||void 0===Mt||Mt.call(globalThis,{LitElement:Nt});const It=globalThis.litElementPolyfillSupport;null==It||It({LitElement:Nt}),(null!==(zt=globalThis.litElementVersions)&&void 0!==zt?zt:globalThis.litElementVersions=[]).push("3.2.2");var Ft=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Rt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ft(e,s,o),o};let Ut=class extends(L(E(Nt))){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite.split("%s").map((t=>t.trim())),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=e.getLanguage(),super.connectedCallback()}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(1e3*t);let r=[];if(e>0){const t=this.endDateObject;t.setTime(1e3*e);const o=i.toDateString()==t.toDateString();o||(delete s.hour,delete s.minute);if(r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,t),!o){const t=r.find((t=>"literal"==t.type&&"shared"==t.source&&t.value.trim().length>0));t&&(t.value=" "+this.duAu[1]+" ",t.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else{r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i)}return this.designMode&&r.forEach((t=>t.hidden=","==t.value.trim())),r[0].value=o.ucFirst(r[0].value),r.filter((t=>!0!==t.hidden))}dateStringToSeconds(t){return new Date(t).getTime()/1e3}render(){if(!this.renderIf)return ft;if(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date)return ft;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const t=this.start_date;this.start_date=this.end_date,this.end_date=t}const t={year:this.year,month:this.month,day:this.day};"hidden"!==this.weekday&&(t.weekday=this.weekday),"hidden"!==this.hour&&(t.hour=this.hour),"hidden"!==this.minute&&(t.minute=this.minute),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.start_date,this.end_date,t);return bt`${e.map((t=>{const e=this.templateParts[t.type];if(e){const s=document.importNode(e.content,!0),i=s.children[0];return""==i.innerText.trim()&&(i.innerText=t.value),s}return bt`<span class="${t.type}">${t.value}</span>`}))}`}};Rt([f()],Ut.prototype,"wording_billet_periode_validite",1),Rt([f({type:Boolean})],Ut.prototype,"designMode",2),Rt([f({type:String})],Ut.prototype,"time_zone",2),Rt([f({type:Number})],Ut.prototype,"date",2),Rt([f({type:String})],Ut.prototype,"date_string",2),Rt([f({type:String})],Ut.prototype,"start_date_string",2),Rt([f({type:String})],Ut.prototype,"end_date_string",2),Rt([f({type:Number})],Ut.prototype,"start_date",2),Rt([f({type:Number})],Ut.prototype,"end_date",2),Rt([f({type:String})],Ut.prototype,"era",2),Rt([f({type:String})],Ut.prototype,"year",2),Rt([f({type:String})],Ut.prototype,"month",2),Rt([f({type:String})],Ut.prototype,"day",2),Rt([f({type:String})],Ut.prototype,"weekday",2),Rt([f({type:String})],Ut.prototype,"hour",2),Rt([f({type:String})],Ut.prototype,"minute",2),Rt([f({type:String})],Ut.prototype,"language",2),Rt([f({type:Boolean})],Ut.prototype,"renderIf",2),Rt([f({type:Boolean})],Ut.prototype,"now",2),Ut=Rt([b("sonic-date")],Ut);const Vt=class{static listen(){var t;if(!Vt.listening)return;const e=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");Vt.prevURL&&Vt.prevURL!=e&&(Vt.prevURL=e,Vt.listeners.forEach((t=>{t.location=e}))),window.requestAnimationFrame(Vt.listen)}static offChange(t){const e=Vt.listeners.indexOf(t);-1!=e&&(Vt.listeners.splice(e,1),0==Vt.listeners.length&&(Vt.listening=!1))}static onChange(t){Vt.listening||(Vt.listening=!0,Vt.listen()),Vt.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const e=t.goBack,s=document.referrer;if(null!=e){const t=document.location.origin,i=e||t,r=!!(0==s.indexOf("http"))&&new URL(s).origin!=t,o=""==s,n=history.length<3,a=o&&n,l=i!=document.location.href;if(r&&l||a){const t=history.state||{};t.concorde=t.concorde||{},t.concorde.hasDoneHistoryBack=!0,history.pushState(t,document.title),history.back(),document.location.replace(i)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href||""),!i)return;if(0==i.indexOf("#"))return void(document.location.hash=i.substring(1));const r=new URL(i,document.location.href),o=r.pathname.split("/"),n=[];let a="";for(const l of o)l!=a&&n.push(l),a=l;i="/"+n.join("/")+r.search+(r.hash?+r.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if("disabled"!=t.autoActive&&t.href&&0!=t.href.indexOf("http")){const e=new URL(t.href,document.location.href),s=new URL(t.location||"",document.location.origin);let i=!1;i="strict"==t.autoActive?e.pathname==s.pathname&&e.hash==s.hash&&e.search==s.search:0==s.href.indexOf(e.href),i?t.setAttribute("active","true"):t.removeAttribute("active")}}};let Bt=Vt;Bt.listeners=[],Bt.listening=!1,Bt.prevURL=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");
58
+ var Mt,zt;class Nt extends Q{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{var i,r;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==s?void 0:s.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new Pt(e.insertBefore(rt(),t),t,void 0,null!=s?s:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return mt}}Nt.finalized=!0,Nt._$litElement$=!0,null===(Mt=globalThis.litElementHydrateSupport)||void 0===Mt||Mt.call(globalThis,{LitElement:Nt});const It=globalThis.litElementPolyfillSupport;null==It||It({LitElement:Nt}),(null!==(zt=globalThis.litElementVersions)&&void 0!==zt?zt:globalThis.litElementVersions=[]).push("3.2.2");var Ft=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Rt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ft(e,s,o),o};let Vt=class extends(D(j(Nt))){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite.split("%s").map((t=>t.trim())),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=e.getLanguage(),super.connectedCallback()}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(1e3*t);let r=[];if(e>0){const t=this.endDateObject;t.setTime(1e3*e);const o=i.toDateString()==t.toDateString();o||(delete s.hour,delete s.minute);if(r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,t),!o){const t=r.find((t=>"literal"==t.type&&"shared"==t.source&&t.value.trim().length>0));t&&(t.value=" "+this.duAu[1]+" ",t.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else{r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i)}return this.designMode&&r.forEach((t=>t.hidden=","==t.value.trim())),r[0].value=o.ucFirst(r[0].value),r.filter((t=>!0!==t.hidden))}dateStringToSeconds(t){return new Date(t).getTime()/1e3}render(){if(!this.renderIf)return ft;if(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date)return ft;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const t=this.start_date;this.start_date=this.end_date,this.end_date=t}const t={year:this.year,month:this.month,day:this.day};"hidden"!==this.weekday&&(t.weekday=this.weekday),"hidden"!==this.hour&&(t.hour=this.hour),"hidden"!==this.minute&&(t.minute=this.minute),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.start_date,this.end_date,t);return bt`${e.map((t=>{const e=this.templateParts[t.type];if(e){const s=document.importNode(e.content,!0),i=s.children[0];return""==i.innerText.trim()&&(i.innerText=t.value),s}return bt`<span class="${t.type}">${t.value}</span>`}))}`}};Rt([f()],Vt.prototype,"wording_billet_periode_validite",1),Rt([f({type:Boolean})],Vt.prototype,"designMode",2),Rt([f({type:String})],Vt.prototype,"time_zone",2),Rt([f({type:Number})],Vt.prototype,"date",2),Rt([f({type:String})],Vt.prototype,"date_string",2),Rt([f({type:String})],Vt.prototype,"start_date_string",2),Rt([f({type:String})],Vt.prototype,"end_date_string",2),Rt([f({type:Number})],Vt.prototype,"start_date",2),Rt([f({type:Number})],Vt.prototype,"end_date",2),Rt([f({type:String})],Vt.prototype,"era",2),Rt([f({type:String})],Vt.prototype,"year",2),Rt([f({type:String})],Vt.prototype,"month",2),Rt([f({type:String})],Vt.prototype,"day",2),Rt([f({type:String})],Vt.prototype,"weekday",2),Rt([f({type:String})],Vt.prototype,"hour",2),Rt([f({type:String})],Vt.prototype,"minute",2),Rt([f({type:String})],Vt.prototype,"language",2),Rt([f({type:Boolean})],Vt.prototype,"renderIf",2),Rt([f({type:Boolean})],Vt.prototype,"now",2),Vt=Rt([b("sonic-date")],Vt);const Ut=class{static listen(){var t;if(!Ut.listening)return;const e=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");Ut.prevURL&&Ut.prevURL!=e&&(Ut.prevURL=e,Ut.listeners.forEach((t=>{t.location=e}))),window.requestAnimationFrame(Ut.listen)}static offChange(t){const e=Ut.listeners.indexOf(t);-1!=e&&(Ut.listeners.splice(e,1),0==Ut.listeners.length&&(Ut.listening=!1))}static onChange(t){Ut.listening||(Ut.listening=!0,Ut.listen()),Ut.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const e=t.goBack,s=document.referrer;if(null!=e){const t=document.location.origin,i=e||t,r=!!(0==s.indexOf("http"))&&new URL(s).origin!=t,o=""==s,n=history.length<3,a=o&&n,l=i!=document.location.href;if(r&&l||a){const t=history.state||{};t.concorde=t.concorde||{},t.concorde.hasDoneHistoryBack=!0,history.pushState(t,document.title),history.back(),document.location.replace(i)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href||""),!i)return;if(0==i.indexOf("#"))return void(document.location.hash=i.substring(1));const r=new URL(i,document.location.href),o=r.pathname.split("/"),n=[];let a="";for(const l of o)l!=a&&n.push(l),a=l;i="/"+n.join("/")+r.search+(r.hash?+r.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if("disabled"!=t.autoActive&&t.href&&0!=t.href.indexOf("http")){const e=new URL(t.href,document.location.href),s=new URL(t.location||"",document.location.origin);let i=!1;i="strict"==t.autoActive?e.pathname==s.pathname&&e.hash==s.hash&&e.search==s.search:0==s.href.indexOf(e.href),i?t.setAttribute("active","true"):t.removeAttribute("active")}}};let qt=Ut;qt.listeners=[],qt.listening=!1,qt.prevURL=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");
59
59
  /**
60
60
  * @license
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
63
  */
64
- const qt=1,Ht=2,Wt=t=>(...e)=>({_$litDirective$:t,values:e});class Kt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
64
+ const Bt=1,Ht=2,Wt=t=>(...e)=>({_$litDirective$:t,values:e});class Kt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
65
65
  /**
66
66
  * @license
67
67
  * Copyright 2018 Google LLC
68
68
  * SPDX-License-Identifier: BSD-3-Clause
69
- */const Zt=Wt(class extends Kt{constructor(t){var e;if(super(t),t.type!==qt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const i in e){const t=e[i];null!=t&&(this.vt.add(i),i.includes("-")?s.setProperty(i,t):s[i]=t)}return mt}});var Yt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,Gt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yt(e,s,o),o};const Jt=new Map,Xt=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{const t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){const t=this.getAttribute("name");if(t){const e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?h.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){null==t&&(t=""),s.isObject(t)&&Object.prototype.hasOwnProperty.call(t,"__value")&&null==t._value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;const e=t.split(" "),s=e[0];if(!s)return;for(const r of e){Jt.has(r)||Jt.set(r,[]);const t=Jt.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}const i=Jt.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;const r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;const s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;const i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0}));let n=null;if("ArrowDown"==s.key&&o){const t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){const t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}const a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);const t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return Gt([f({type:Boolean,reflect:!0})],e.prototype,"touched",2),Gt([f({type:Boolean})],e.prototype,"error",2),Gt([f({type:Boolean})],e.prototype,"autofocus",2),Gt([f({type:Boolean})],e.prototype,"required",2),Gt([f()],e.prototype,"forceAutoFill",2),Gt([f({type:Boolean})],e.prototype,"disabled",2),Gt([f({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Gt([f({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Gt([f()],e.prototype,"name",1),Gt([f()],e.prototype,"value",1),e};class te{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;const s=(t[0]||{})[e];return t.every((t=>(t||{})[e]==s))}})})}),value:()=>({forKey:e=>te.from(t.map((t=>t[e])))}),copy:()=>({fromKey:e=>({toKey:s=>{t.forEach((t=>{t[s]=Array.isArray(t[e])?[...t[e]]:"object"==typeof t[e]&&null!=t[e]?{...t[e]}:t[e]}))}})})}),map:e=>te.from(t.map(e)),filter:e=>te.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{const s=[],i=new Map;for(const r of t){const t=r[e];if(!i.has(t)){const r=s.length;i.set(t,r);const o={items:[]};o[e]=t,s.push(o)}s[i.get(t)].items.push(r)}return te.from(s)}}),without:()=>({duplicates:()=>({forKey:e=>{const s=[...new Set(t.map((t=>t[e])))];return te.from(s.map((s=>t.find((t=>t[e]==s)))))}}),itemsIn:e=>({havingSameValue:()=>({forKey:s=>te.from(t.filter((t=>{return e.every((i=t,r=s,t=>i[r]!=t[r]));var i,r})))})})})}}}const ee=class{static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},se=te,ie=g,re=o,oe=e,ne=Bt,ae=s,le=d,ce=h,he=r;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:ee,Arrays:se,DataBindObserver:ie,Format:re,HTML:oe,LocationHandler:ne,Objects:ae,PublisherProxy:le,PublisherManager:ce,api:he};var de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&de(e,s,o),o};const ge=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{const t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");const i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(const e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;const e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){const t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";const e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();if(s){const t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){const t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);const s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider,e=this.getAttribute("name");return t&&e?ce.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();const t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=t.values.get().slice(0),s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){const e=t[this.name].get();e&&Array.isArray(e)&&-1!==e.indexOf(this.value)&&(this.checked=!0)}const e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return ue([f()],e.prototype,"value",1),ue([f()],e.prototype,"forceAutoFill",2),ue([f({type:Boolean})],e.prototype,"unique",2),ue([f({type:Boolean})],e.prototype,"radio",2),ue([f({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),ue([f()],e.prototype,"checked",1),e},be=t=>null!=t?t:ft,me=T`:host{--sc-fs:1rem;--sc-lh:1.2;font-size:var(--sc-fs);line-height:var(--sc-lh)}:host([size="2xs"]){--sc-fs:0.625rem}:host([size=xs]){--sc-fs:0.75rem}:host([size=sm]){--sc-fs:0.875rem}:host([size=lg]){--sc-fs:1.125rem}:host([size=xl]){--sc-fs:1.25rem}:host([size="2xl"]){--sc-fs:1.5rem}`;
69
+ */const Zt=Wt(class extends Kt{constructor(t){var e;if(super(t),t.type!==Bt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const i in e){const t=e[i];null!=t&&(this.vt.add(i),i.includes("-")?s.setProperty(i,t):s[i]=t)}return mt}});var Qt=Object.defineProperty,Yt=Object.getOwnPropertyDescriptor,Gt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qt(e,s,o),o};const Jt=new Map,Xt=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{const t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){const t=this.getAttribute("name");if(t){const e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?h.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){null==t&&(t=""),s.isObject(t)&&Object.prototype.hasOwnProperty.call(t,"__value")&&null==t._value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;const e=t.split(" "),s=e[0];if(!s)return;for(const r of e){Jt.has(r)||Jt.set(r,[]);const t=Jt.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}const i=Jt.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;const r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;const s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;const i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0}));let n=null;if("ArrowDown"==s.key&&o){const t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){const t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}const a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault(),t.stopPropagation())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);const t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return Gt([f({type:Boolean,reflect:!0})],e.prototype,"touched",2),Gt([f({type:Boolean})],e.prototype,"error",2),Gt([f({type:Boolean})],e.prototype,"autofocus",2),Gt([f({type:Boolean})],e.prototype,"required",2),Gt([f()],e.prototype,"forceAutoFill",2),Gt([f({type:Boolean})],e.prototype,"disabled",2),Gt([f({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Gt([f({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Gt([f()],e.prototype,"name",1),Gt([f()],e.prototype,"value",1),e};class te{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;const s=(t[0]||{})[e];return t.every((t=>(t||{})[e]==s))}})})}),value:()=>({forKey:e=>te.from(t.map((t=>t[e])))}),copy:()=>({fromKey:e=>({toKey:s=>{t.forEach((t=>{t[s]=Array.isArray(t[e])?[...t[e]]:"object"==typeof t[e]&&null!=t[e]?{...t[e]}:t[e]}))}})})}),map:e=>te.from(t.map(e)),filter:e=>te.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{const s=[],i=new Map;for(const r of t){const t=r[e];if(!i.has(t)){const r=s.length;i.set(t,r);const o={items:[]};o[e]=t,s.push(o)}s[i.get(t)].items.push(r)}return te.from(s)}}),without:()=>({duplicates:()=>({forKey:e=>{const s=[...new Set(t.map((t=>t[e])))];return te.from(s.map((s=>t.find((t=>t[e]==s)))))}}),itemsIn:e=>({havingSameValue:()=>({forKey:s=>te.from(t.filter((t=>{return e.every((i=t,r=s,t=>i[r]!=t[r]));var i,r})))})})})}}}const ee=class{static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},se=te,ie=g,re=o,oe=e,ne=qt,ae=s,le=d,ce=h,he=r;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:ee,Arrays:se,DataBindObserver:ie,Format:re,HTML:oe,LocationHandler:ne,Objects:ae,PublisherProxy:le,PublisherManager:ce,api:he};var de=Object.defineProperty,pe=Object.getOwnPropertyDescriptor,ue=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&de(e,s,o),o};const ge=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{const t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");const i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(const e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;const e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){const t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";const e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();if(s){const t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){const t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);const s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider,e=this.getAttribute("name");return t&&e?ce.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();const t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=t.values.get().slice(0),s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){const e=t[this.name].get();e&&Array.isArray(e)&&-1!==e.indexOf(this.value)&&(this.checked=!0)}const e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return ue([f()],e.prototype,"value",1),ue([f()],e.prototype,"forceAutoFill",2),ue([f({type:Boolean})],e.prototype,"unique",2),ue([f({type:Boolean})],e.prototype,"radio",2),ue([f({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),ue([f()],e.prototype,"checked",1),e},be=t=>null!=t?t:ft,me=T`:host{--sc-fs:1rem;--sc-lh:1.2;font-size:var(--sc-fs);line-height:var(--sc-lh)}:host([size="2xs"]){--sc-fs:0.625rem}:host([size=xs]){--sc-fs:0.75rem}:host([size=sm]){--sc-fs:0.875rem}:host([size=lg]){--sc-fs:1.125rem}:host([size=xl]){--sc-fs:1.25rem}:host([size="2xl"]){--sc-fs:1.5rem}`;
70
70
  /**
71
71
  * @license
72
72
  * Copyright 2018 Google LLC
73
73
  * SPDX-License-Identifier: BSD-3-Clause
74
- */var fe=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,ye=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ve(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fe(e,s,o),o};let we=class extends(ge(Xt(L(Nt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?Bt.onChange(this):Bt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),Bt.changeFromComponent(this)}handleChange(t){if(super.handleChange(),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),Bt.changeFromComponent(this)),this.hasAttribute("reset")){const t=this.getAttribute("reset"),e=t?ce.get(t):this.getFormPublisher();e&&e.set({})}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){Bt.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(t){this._location=t,this.requestUpdate()}updated(t){(t.has("location")||t.has("href")||t.has("autoActive"))&&Bt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=bt`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${Zt(t)}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${1==this.loading?bt`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?bt`<a href="${this.href}" target="${be(this.target)}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}" @click="${this.pushState||null!==this.goBack?this.handleNavigation:null}">${e}</a>`:bt`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};we.styles=[me,T`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--btn-color:var(--sc-btn-color, var(--sc-base-content));--btn-bg:var(--sc-btn-bg, var(--sc-base-100));--sc-btn-border-style:solid;--sc-btn-border-width:var(--sc-form-border-width);--sc-btn-border-color:transparent;--btn-outline-bg-hover:var(
74
+ */var fe=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,ye=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ve(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fe(e,s,o),o};let we=class extends(ge(Xt(D(Nt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?qt.onChange(this):qt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),qt.changeFromComponent(this)}handleChange(t){if(super.handleChange(),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),qt.changeFromComponent(this)),this.hasAttribute("reset")){const t=this.getAttribute("reset"),e=t?ce.get(t):this.getFormPublisher();e&&e.set({})}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){qt.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(t){this._location=t,this.requestUpdate()}updated(t){(t.has("location")||t.has("href")||t.has("autoActive"))&&qt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=bt`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${Zt(t)}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${1==this.loading?bt`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?bt`<a href="${this.href}" target="${be(this.target)}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}" @click="${this.pushState||null!==this.goBack?this.handleNavigation:null}">${e}</a>`:bt`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};we.styles=[me,T`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--btn-color:var(--sc-btn-color, var(--sc-base-content));--btn-bg:var(--sc-btn-bg, var(--sc-base-100));--sc-btn-border-style:solid;--sc-btn-border-width:var(--sc-form-border-width);--sc-btn-border-color:transparent;--btn-outline-bg-hover:var(
75
75
  --sc-btn-outline-bg-hover,
76
76
  var(--sc-base-100)
77
- );--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--btn-bg);color:var(--btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--btn-color:var(--sc-base-content);--btn-bg:var(--sc-base-100)}:host([type=primary]) button{--btn-color:var(--sc-primary-content);--btn-bg:var(--sc-primary)}:host([type=warning]) button{--btn-color:var(--sc-warning-content);--btn-bg:var(--sc-warning)}:host([type=danger]) button{--btn-color:var(--sc-danger-content);--btn-bg:var(--sc-danger)}:host([type=info]) button{--btn-color:var(--sc-info-content);--btn-bg:var(--sc-info)}:host([type=success]) button{--btn-color:var(--sc-success-content);--btn-bg:var(--sc-success)}:host([type=neutral]) button{--btn-color:var(--sc-base);--btn-bg:var(--sc-base-600)}:host([type=custom]) button{--btn-color:var(--sc-btn-custom-color);--btn-bg:var(--sc-btn-custom-bg)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--btn-bg);color:var(--btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em;vertical-align:middle}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`],ye([f({type:String,reflect:!0})],we.prototype,"type",2),ye([f({type:String,reflect:!0})],we.prototype,"variant",2),ye([f({type:String,reflect:!0})],we.prototype,"size",2),ye([f({type:String,reflect:!0})],we.prototype,"shape",2),ye([f({type:String})],we.prototype,"direction",2),ye([f({type:String,reflect:!0})],we.prototype,"alignItems",2),ye([f({type:String})],we.prototype,"justify",2),ye([f({type:String,reflect:!0})],we.prototype,"align",2),ye([f({type:String})],we.prototype,"minWidth",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"icon",2),ye([f({type:String})],we.prototype,"autoActive",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"loading",2),ye([v()],we.prototype,"hasPrefix",2),ye([v()],we.prototype,"hasSuffix",2),ye([k({flatten:!0,slot:"prefix"})],we.prototype,"prefixes",2),ye([k({flatten:!0,slot:"suffix"})],we.prototype,"suffixes",2),ye([f({type:String})],we.prototype,"target",2),ye([f({type:String})],we.prototype,"href",1),ye([f({type:String})],we.prototype,"goBack",2),ye([f({type:Boolean})],we.prototype,"pushState",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"active",2),we=ye([b("sonic-button")],we);const xe=T`:host([align=left]) .sonic-loader--inline{margin-left:0}:host([align=right]) .sonic-loader--inline{margin-left:auto;margin-right:0}.sonic-loader--inline{display:block;position:relative;width:80px;height:80px;margin:auto;z-index:20}.sonic-loader--inline div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--sc-loader-bg);animation-timing-function:cubic-bezier(0,1,1,0)}.sonic-loader--inline div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.sonic-loader--inline div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}`,_e=T`@keyframes sonic-loader--fixed{0%{transform:scale(0);opacity:0}5%{opacity:1}70%{opacity:90%}100%{transform:scale(1);opacity:0}}.sonic-loader--fixed{position:fixed;top:50%;left:50%;transform:transateY(-50%) translateX(-50%);z-index:999}.sonic-loader--fixed>div:nth-child(2){animation-delay:-.5s}.sonic-loader--fixed>div:nth-child(3){animation-delay:-.2s}.sonic-loader--fixed>div:nth-child(4){display:none!important}.sonic-loader--fixed>div{background-color:var(--sc-loader-bg);width:5rem;height:5rem;border-radius:100%;margin:2px;animation-fill-mode:both;position:absolute;top:0;opacity:0;margin:0;top:-2.5rem;left:-2.5rem;width:5rem;height:5rem;animation:sonic-loader--fixed 1s 0s linear infinite}`;var ke=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,Ce=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ae(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ke(e,s,o),o};let Pe=class extends Nt{constructor(){super(...arguments),this.mode="fixed"}static show(t){Pe.loader||(Pe.loader=document.createElement("sonic-loader"));const e=Pe.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.container||(t.container=document.querySelector("sonic-theme")||document.body,t.mode="fixed"),t.container.appendChild(e),Pe.callCounter++}static hide(){Pe.callCounter--,Pe.callCounter>0||Pe.loader&&Pe.loader.remove()}render(){return bt`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Pe.styles=[xe,_e,T`:host{--sc-loader-bg:var(--sc-primary, currentColor);pointer-events:none}.sonic-loader{opacity:0;animation:showLoader .5s .5s forwards}.sonic-loader--inline{animation-delay:0s}@keyframes showLoader{0%{opacity:0}100%{opacity:1}}`],Pe.callCounter=0,Ce([f({type:String})],Pe.prototype,"mode",2),Pe=Ce([b("sonic-loader")],Pe);
77
+ );--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--btn-bg);color:var(--btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-width) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--btn-color:var(--sc-base-content);--btn-bg:var(--sc-base-100)}:host([type=primary]) button{--btn-color:var(--sc-primary-content);--btn-bg:var(--sc-primary)}:host([type=warning]) button{--btn-color:var(--sc-warning-content);--btn-bg:var(--sc-warning)}:host([type=danger]) button{--btn-color:var(--sc-danger-content);--btn-bg:var(--sc-danger)}:host([type=info]) button{--btn-color:var(--sc-info-content);--btn-bg:var(--sc-info)}:host([type=success]) button{--btn-color:var(--sc-success-content);--btn-bg:var(--sc-success)}:host([type=neutral]) button{--btn-color:var(--sc-base);--btn-bg:var(--sc-base-600)}:host([type=custom]) button{--btn-color:var(--sc-btn-custom-color);--btn-bg:var(--sc-btn-custom-bg)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--btn-bg);color:var(--btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em;vertical-align:middle}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`],ye([f({type:String,reflect:!0})],we.prototype,"type",2),ye([f({type:String,reflect:!0})],we.prototype,"variant",2),ye([f({type:String,reflect:!0})],we.prototype,"size",2),ye([f({type:String,reflect:!0})],we.prototype,"shape",2),ye([f({type:String})],we.prototype,"direction",2),ye([f({type:String,reflect:!0})],we.prototype,"alignItems",2),ye([f({type:String})],we.prototype,"justify",2),ye([f({type:String,reflect:!0})],we.prototype,"align",2),ye([f({type:String})],we.prototype,"minWidth",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"icon",2),ye([f({type:String})],we.prototype,"autoActive",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"loading",2),ye([v()],we.prototype,"hasPrefix",2),ye([v()],we.prototype,"hasSuffix",2),ye([k({flatten:!0,slot:"prefix"})],we.prototype,"prefixes",2),ye([k({flatten:!0,slot:"suffix"})],we.prototype,"suffixes",2),ye([f({type:String})],we.prototype,"target",2),ye([f({type:String})],we.prototype,"href",1),ye([f({type:String})],we.prototype,"goBack",2),ye([f({type:Boolean})],we.prototype,"pushState",2),ye([f({type:Boolean,reflect:!0})],we.prototype,"active",2),we=ye([b("sonic-button")],we);const xe=T`:host([align=left]) .sonic-loader--inline{margin-left:0}:host([align=right]) .sonic-loader--inline{margin-left:auto;margin-right:0}.sonic-loader--inline{display:block;position:relative;width:80px;height:80px;margin:auto;z-index:20}.sonic-loader--inline div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--sc-loader-bg);animation-timing-function:cubic-bezier(0,1,1,0)}.sonic-loader--inline div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.sonic-loader--inline div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}`,_e=T`@keyframes sonic-loader--fixed{0%{transform:scale(0);opacity:0}5%{opacity:1}70%{opacity:90%}100%{transform:scale(1);opacity:0}}.sonic-loader--fixed{position:fixed;top:50%;left:50%;transform:transateY(-50%) translateX(-50%);z-index:999}.sonic-loader--fixed>div:nth-child(2){animation-delay:-.5s}.sonic-loader--fixed>div:nth-child(3){animation-delay:-.2s}.sonic-loader--fixed>div:nth-child(4){display:none!important}.sonic-loader--fixed>div{background-color:var(--sc-loader-bg);width:5rem;height:5rem;border-radius:100%;margin:2px;animation-fill-mode:both;position:absolute;top:0;opacity:0;margin:0;top:-2.5rem;left:-2.5rem;width:5rem;height:5rem;animation:sonic-loader--fixed 1s 0s linear infinite}`;var ke=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,Pe=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ae(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ke(e,s,o),o};let Ce=class extends Nt{constructor(){super(...arguments),this.mode="fixed"}static show(t){Ce.loader||(Ce.loader=document.createElement("sonic-loader"));const e=Ce.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.container||(t.container=document.querySelector("sonic-theme")||document.body,t.mode="fixed"),t.container.appendChild(e),Ce.callCounter++}static hide(){Ce.callCounter--,Ce.callCounter>0||Ce.loader&&Ce.loader.remove()}render(){return bt`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Ce.styles=[xe,_e,T`:host{--sc-loader-bg:var(--sc-primary, currentColor);pointer-events:none}.sonic-loader{opacity:0;animation:showLoader .5s .5s forwards}.sonic-loader--inline{animation-delay:0s}@keyframes showLoader{0%{opacity:0}100%{opacity:1}}`],Ce.callCounter=0,Pe([f({type:String})],Ce.prototype,"mode",2),Ce=Pe([b("sonic-loader")],Ce);
78
78
  /**
79
79
  * @license
80
80
  * Copyright 2020 Google LLC
81
81
  * SPDX-License-Identifier: BSD-3-Clause
82
82
  */
83
- const{I:Se}=jt,$e=()=>document.createComment(""),Oe=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore($e(),o),i=r.insertBefore($e(),o);s=new Se(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},Le=(t,e,s=t)=>(t._$AI(e,s),t),De={},je=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},Ee=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Me=Wt(class extends Kt{constructor(t){if(super(t),t.type!==Ht)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const r=[],o=[];let n=0;for(const a of t)r[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:r}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){var r;const o=t._$AH,{values:n,keys:a}=this.ht(e,s,i);if(!Array.isArray(o))return this.ut=a,n;const l=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],c=[];let h,d,p=0,u=o.length-1,g=0,b=n.length-1;for(;p<=u&&g<=b;)if(null===o[p])p++;else if(null===o[u])u--;else if(l[p]===a[g])c[g]=Le(o[p],n[g]),p++,g++;else if(l[u]===a[b])c[b]=Le(o[u],n[b]),u--,b--;else if(l[p]===a[b])c[b]=Le(o[p],n[b]),Oe(t,c[b+1],o[p]),p++,b--;else if(l[u]===a[g])c[g]=Le(o[u],n[g]),Oe(t,o[p],o[u]),u--,g++;else if(void 0===h&&(h=Ee(a,g,b),d=Ee(l,p,u)),h.has(l[p]))if(h.has(l[u])){const e=d.get(a[g]),s=void 0!==e?o[e]:null;if(null===s){const e=Oe(t,o[p]);Le(e,n[g]),c[g]=e}else c[g]=Le(s,n[g]),Oe(t,o[p],s),o[e]=null;g++}else je(o[u]),u--;else je(o[p]),p++;for(;g<=b;){const e=Oe(t,c[b+1]);Le(e,n[g]),c[g++]=e}for(;p<=u;){const t=o[p++];null!==t&&je(t)}return this.ut=a,((t,e=De)=>{t._$AH=e})(t,c),mt}}),ze=(t,e)=>{var s,i;const r=t._$AN;if(void 0===r)return!1;for(const o of r)null===(i=(s=o)._$AO)||void 0===i||i.call(s,e,!1),ze(o,e);return!0},Ne=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Ie=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Re(e)}};
83
+ const{I:Se}=Et,$e=()=>document.createComment(""),Oe=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore($e(),o),i=r.insertBefore($e(),o);s=new Se(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},De=(t,e,s=t)=>(t._$AI(e,s),t),Le={},Ee=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},je=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Me=Wt(class extends Kt{constructor(t){if(super(t),t.type!==Ht)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const r=[],o=[];let n=0;for(const a of t)r[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:r}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){var r;const o=t._$AH,{values:n,keys:a}=this.ht(e,s,i);if(!Array.isArray(o))return this.ut=a,n;const l=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],c=[];let h,d,p=0,u=o.length-1,g=0,b=n.length-1;for(;p<=u&&g<=b;)if(null===o[p])p++;else if(null===o[u])u--;else if(l[p]===a[g])c[g]=De(o[p],n[g]),p++,g++;else if(l[u]===a[b])c[b]=De(o[u],n[b]),u--,b--;else if(l[p]===a[b])c[b]=De(o[p],n[b]),Oe(t,c[b+1],o[p]),p++,b--;else if(l[u]===a[g])c[g]=De(o[u],n[g]),Oe(t,o[p],o[u]),u--,g++;else if(void 0===h&&(h=je(a,g,b),d=je(l,p,u)),h.has(l[p]))if(h.has(l[u])){const e=d.get(a[g]),s=void 0!==e?o[e]:null;if(null===s){const e=Oe(t,o[p]);De(e,n[g]),c[g]=e}else c[g]=De(s,n[g]),Oe(t,o[p],s),o[e]=null;g++}else Ee(o[u]),u--;else Ee(o[p]),p++;for(;g<=b;){const e=Oe(t,c[b+1]);De(e,n[g]),c[g++]=e}for(;p<=u;){const t=o[p++];null!==t&&Ee(t)}return this.ut=a,((t,e=Le)=>{t._$AH=e})(t,c),mt}}),ze=(t,e)=>{var s,i;const r=t._$AN;if(void 0===r)return!1;for(const o of r)null===(i=(s=o)._$AO)||void 0===i||i.call(s,e,!1),ze(o,e);return!0},Ne=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Ie=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Re(e)}};
84
84
  /**
85
85
  * @license
86
86
  * Copyright 2017 Google LLC
87
87
  * SPDX-License-Identifier: BSD-3-Clause
88
- */function Fe(t){void 0!==this._$AN?(Ne(this),this._$AM=t,Ie(this)):this._$AM=t}function Te(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)ze(i[o],!1),Ne(i[o]);else null!=i&&(ze(i,!1),Ne(i));else ze(this,t)}const Re=t=>{var e,s,i,r;t.type==Ht&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Te),null!==(s=(r=t)._$AQ)&&void 0!==s||(r._$AQ=Fe))};class Ue extends Kt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ie(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(ze(this,t),Ne(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Ve=new WeakMap;let Be=0;const qe=new Map,He=new WeakSet,We=()=>new Promise((t=>requestAnimationFrame(t))),Ke=[{opacity:0}],Ze=[{opacity:0},{opacity:1}],Ye=(t,e)=>{const s=t-e;return 0===s?void 0:s},Qe=(t,e)=>{const s=t/e;return 1===s?void 0:s},Ge={left:(t,e)=>{const s=Ye(t,e);return{value:s,transform:s&&`translateX(${s}px)`}},top:(t,e)=>{const s=Ye(t,e);return{value:s,transform:s&&`translateY(${s}px)`}},width:(t,e)=>{const s=Qe(t,e);return{value:s,transform:s&&`scaleX(${s})`}},height:(t,e)=>{const s=Qe(t,e);return{value:s,transform:s&&`scaleY(${s})`}}},Je={duration:333,easing:"ease-in-out"},Xe=["left","top","width","height","opacity","color","background"],ts=new WeakMap;const es=Wt(class extends Ue{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===Ht)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return ft}getController(){return Ve.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this),this.element=t.element,ts.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,s;t=null!=t?t:{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(e=(s=t).properties)&&void 0!==e||(s.properties=Xe),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{var r;const o=null!==(r=e[i])&&void 0!==r?r:Ge[i]?void 0:s[i],n=Number(o);t[i]=isNaN(n)?o+"":n})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await We;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.v();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=qe.get(this.options.inId);if(s){qe.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Be++,t.forEach((t=>t.zIndex=Be))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&qe.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await We(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,s;t&&(null===(s=(e=this.options).onComplete)||void 0===s||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=ts.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=He.has(this.l);return t||this.l.updateComplete.then((()=>{He.add(this.l)})),t}A(t,e=this._()){const s={...Je};return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t={...t},e={...e};const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){var i;const r={},o={};let n=!1;const a={};for(const l in e){const s=t[l],c=e[l];if(l in Ge){const t=Ge[l];if(void 0===s||void 0===c)continue;const e=t(s,c);void 0!==e.transform&&(a[l]=e.value,n=!0,r.transform=`${null!==(i=r.transform)&&void 0!==i?i:""} ${e.transform}`)}else s!==c&&void 0!==s&&void 0!==c&&(n=!0,r[l]=s,o[l]=c)}return r.transformOrigin=o.transformOrigin=s?"center center":"top left",this.animatingProperties=a,n?[r,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}});var ss={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}};
88
+ */function Fe(t){void 0!==this._$AN?(Ne(this),this._$AM=t,Ie(this)):this._$AM=t}function Te(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)ze(i[o],!1),Ne(i[o]);else null!=i&&(ze(i,!1),Ne(i));else ze(this,t)}const Re=t=>{var e,s,i,r;t.type==Ht&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Te),null!==(s=(r=t)._$AQ)&&void 0!==s||(r._$AQ=Fe))};class Ve extends Kt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ie(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(ze(this,t),Ne(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Ue=new WeakMap;let qe=0;const Be=new Map,He=new WeakSet,We=()=>new Promise((t=>requestAnimationFrame(t))),Ke=[{opacity:0}],Ze=[{opacity:0},{opacity:1}],Qe=(t,e)=>{const s=t-e;return 0===s?void 0:s},Ye=(t,e)=>{const s=t/e;return 1===s?void 0:s},Ge={left:(t,e)=>{const s=Qe(t,e);return{value:s,transform:s&&`translateX(${s}px)`}},top:(t,e)=>{const s=Qe(t,e);return{value:s,transform:s&&`translateY(${s}px)`}},width:(t,e)=>{const s=Ye(t,e);return{value:s,transform:s&&`scaleX(${s})`}},height:(t,e)=>{const s=Ye(t,e);return{value:s,transform:s&&`scaleY(${s})`}}},Je={duration:333,easing:"ease-in-out"},Xe=["left","top","width","height","opacity","color","background"],ts=new WeakMap;const es=Wt(class extends Ve{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===Ht)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return ft}getController(){return Ue.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this),this.element=t.element,ts.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,s;t=null!=t?t:{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(e=(s=t).properties)&&void 0!==e||(s.properties=Xe),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{var r;const o=null!==(r=e[i])&&void 0!==r?r:Ge[i]?void 0:s[i],n=Number(o);t[i]=isNaN(n)?o+"":n})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await We;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.v();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=Be.get(this.options.inId);if(s){Be.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,qe++,t.forEach((t=>t.zIndex=qe))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&Be.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await We(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,s;t&&(null===(s=(e=this.options).onComplete)||void 0===s||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=ts.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=He.has(this.l);return t||this.l.updateComplete.then((()=>{He.add(this.l)})),t}A(t,e=this._()){const s={...Je};return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t={...t},e={...e};const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){var i;const r={},o={};let n=!1;const a={};for(const l in e){const s=t[l],c=e[l];if(l in Ge){const t=Ge[l];if(void 0===s||void 0===c)continue;const e=t(s,c);void 0!==e.transform&&(a[l]=e.value,n=!0,r.transform=`${null!==(i=r.transform)&&void 0!==i?i:""} ${e.transform}`)}else s!==c&&void 0!==s&&void 0!==c&&(n=!0,r[l]=s,o[l]=c)}return r.transformOrigin=o.transformOrigin=s?"center center":"top left",this.animatingProperties=a,n?[r,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}});var ss={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}};
89
89
  /**
90
90
  * @license
91
91
  * Copyright 2017 Google LLC
92
92
  * SPDX-License-Identifier: BSD-3-Clause
93
- */class is extends Kt{constructor(t){if(super(t),this.it=ft,t.type!==Ht)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ft||null==t)return this._t=void 0,this.it=t;if(t===mt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}is.directiveName="unsafeHTML",is.resultType=1;const rs=Wt(is),os=new Map,ns={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let as=!1;const ls=class{static registerIcons(t){const e=ss;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};let cs=ls;cs.fontAwesomeNext={get:async t=>{const e=t.library,s=t.name||"",i=ss;var r,o;if("custom"==e&&(as||(as=!0,ns.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",ns.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&ns[e]){const r=ns[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return rs(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(!os.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));os.set(l,t)}const c=await os.get(l);return os.delete(l),n[a]=c||"",rs(c)}return rs(i.core[t.name]||"")}},cs.default=ls.fontAwesomeNext;var hs=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,ps=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ds(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&hs(e,s,o),o};let us=class extends Nt{constructor(){super(...arguments),this.renderId=0,this.iconText="",this._name="",this._prefix="",this._library=""}updateIcon(){if(!this.name)return;this.renderId++;const t=this.renderId;(window.queueMicrotask||window.requestAnimationFrame)((async()=>{t==this.renderId&&(this.iconText=await cs.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}))}get name(){return this._name}set name(t){this._name=t,this.updateIcon()}get prefix(){return this._prefix}set prefix(t){this._prefix=t,this.updateIcon()}get library(){return this._library}set library(t){this._library=t,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",ft)}};us.styles=T`:host{line-height:0;width:fit-content;height:fit-content;vertical-align:-.125em}svg{height:var(--sc-icon-size,1em);width:var(--sc-icon-size,1em)}svg:not([fill=none]){fill:currentColor}svg[fill=none]{stroke-width:2}:host([size="2xs"]) svg{--sc-icon-size:0.625em}:host([size=xs]) svg{--sc-icon-size:0.75em}:host([size=sm]) svg{--sc-icon-size:0.875em}:host([size=lg]) svg{--sc-icon-size:1.25em}:host([size=xl]) svg{--sc-icon-size:1.5em}:host([size="2xl"]) svg{--sc-icon-size:2em}:host([size="3xl"]) svg{--sc-icon-size:2.8em}`,ps([f({type:String})],us.prototype,"name",1),ps([f({type:String})],us.prototype,"prefix",1),ps([f({type:String})],us.prototype,"library",1),us=ps([b("sonic-icon")],us);const gs=T`.custom-scroll{overflow:auto!important;overflow-y:overlay!important}.custom-scroll::-webkit-scrollbar{width:.5rem;height:.5rem;border:solid .15rem transparent;border-radius:var(--sc-rounded);background:0 0}.custom-scroll::-webkit-scrollbar-thumb{box-shadow:inset 0 0 2rem 2rem var(--sc-scrollbar-bg);border-radius:var(--sc-rounded);border:solid .15rem transparent}`;var bs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,fs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ms(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bs(e,s,o),o};const vs={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let ys=class extends Nt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return ft}return this.visible?bt`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&bt`<sonic-icon name="${vs[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?bt`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?rs(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:ft}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),4200)}};ys.styles=[gs,T`*{box-sizing:border-box}:host{display:block;pointer-events:auto;position:relative;--sc-toast-status-color:transparent;--sc-toast-color:var(--sc-base-content);--sc-toast-bg:var(--sc-base);--sc-toast-rounded:var(--sc-rounded-md);--sc-toast-shadow:var(--sc-shadow-lg)}.fixed-area{position:fixed;bottom:1.25rem;right:1.25rem;z-index:10000;display:flex;flex-direction:column-reverse}.sonic-toast{position:relative;pointer-events:auto;overflow:hidden;line-height:1.25;color:var(--sc-toast-color);box-shadow:var(--sc-toast-shadow);border-radius:var(--sc-toast-rounded);background:var(--sc-toast-bg)}.sonic-toast-content{padding:1em 2.5rem 1em 1em;display:flex;gap:.5rem;overflow:auto;position:relative}.sonic-toast-text{align-self:center;margin-top:auto;margin-bottom:auto;max-width:70ch;line-height:1.2}.sonic-toast-text a,::slotted(a:not(.btn)){color:inherit!important;text-decoration:underline!important;text-underline-offset:.15rem}.sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6),::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6)){margin:0 0 .3em!important}.sonic-toast-text li,::slotted(li){margin-bottom:.15em!important}.sonic-toast-text>:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child,::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child){margin-bottom:0!important}.sonic-toast-close{all:unset;position:absolute;z-index:4;pointer-events:initial;right:.5em;top:.5em;width:1.5rem;height:1.5rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;text-align:center;opacity:.5;background:rgba(0,0,0,0)}.sonic-toast-close:focus,.sonic-toast-close:hover{opacity:1;background:rgba(0,0,0,.075)}.sonic-toast-close svg{width:1rem;height:1rem;object-fit:contain;object-position:center center}.sonic-toast-title{font-weight:700;font-size:1.15rem;margin:.15em 0 .25em;line-height:1.2}.success{--sc-toast-status-color:var(--sc-success);--sc-toast-title-color:var(--sc-toast-status-color)}.error{--sc-toast-status-color:var(--sc-danger);--sc-toast-title-color:var(--sc-toast-status-color)}.warning{--sc-toast-status-color:var(--sc-warning);--sc-toast-title-color:var(--sc-toast-status-color)}.info{--sc-toast-status-color:var(--sc-info);--sc-toast-title-color:var(--sc-toast-status-color)}.error,.info,.success,.warning{border-top:3px solid var(--sc-toast-status-color,currentColor)}.sonic-toast:before{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.05;pointer-events:none;transition:.2s;border-radius:var(--sc-toast-rounded);background-color:var(--sc-toast-status-color)}.sonic-toast:hover:before{opacity:.025}.error .sonic-toast-icon,.info .sonic-toast-icon,.success .sonic-toast-icon,.warning .sonic-toast-icon{color:var(--sc-toast-status-color,currentColor)}.sonic-toast-icon{position:sticky;top:0}.ghost{opacity:.85;pointer-events:none}`],fs([f({type:String})],ys.prototype,"title",2),fs([f({type:String})],ys.prototype,"id",2),fs([f({type:String})],ys.prototype,"text",2),fs([f({type:String})],ys.prototype,"status",2),fs([f({type:Boolean})],ys.prototype,"ghost",2),fs([f({type:Boolean})],ys.prototype,"preserve",2),fs([f({type:Boolean})],ys.prototype,"dismissForever",2),fs([f({type:String})],ys.prototype,"maxHeight",2),fs([v()],ys.prototype,"visible",2),ys=fs([b("sonic-toast-item")],ys);var ws=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,_s=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ws(e,s,o),o};let ks=class extends Nt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),this.toasts?bt`<div aria-live="polite" style="${Zt(e)}">${Me(this.toasts,(t=>t.id),(e=>bt`<sonic-toast-item maxHeight="${t?"none":"10rem"}" status="${be(e.status)}" title="${be(e.title)}" ?ghost="${e.ghost}" ?dismissForever="${e.dismissForever}" ?preserve="${e.preserve}" id="${be(e.id)}" @hide="${()=>this.removeItem(e)}" ${es({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${e.text?rs(e.text):""}</sonic-toast-item>`))}</div>`:ft}static removeAll(){const t=document.querySelector("sonic-toast");t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static add(t){var e;if(!document.querySelector("sonic-toast")){const t=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(t)}const i=document.querySelector("sonic-toast"),r=null!=(e=t.id)?e:(new Date).valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:r,text:t.text,title:t.title,status:t.status,preserve:!!o||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(i.toasts.length>0){const t={...n};for(const e of i.toasts){const i={...e};if(t.id=i.id=0,s.shallowEqual(t,i))return null}}return i.toasts=[...i.toasts,n],n}static removeItem(t){const e=document.querySelector("sonic-toast");e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e={...e}).id,!s.shallowEqual(e,t,!1)))))}};_s([f({type:Array})],ks.prototype,"toasts",2),ks=_s([b("sonic-toast")],ks),"undefined"!=typeof window&&(window.SonicToast=ks);var As=Object.defineProperty,Cs=Object.getOwnPropertyDescriptor,Ps=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Cs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&As(e,s,o),o};const Ss=(t,e)=>{class i extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(t){super.props=t}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled)return;if(this.api=new r(this.getApiConfiguration()),!this.api)return;if(this.dispatchEvent(new CustomEvent("loading",{detail:this})),"enabled"===this.getAttribute("localStorage")&&await ce.getInstance().isLocalStrorageReady,!this.isConnected)return;const t=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");t&&Pe.show();const e=ce.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,s.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&(this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1);let i=await this.api.get(this.endPoint||this.dataProvider||"",e);if(this.isConnected){if(!i)return ks.add({text:"Network Error",status:"error"}),this.isLoading=!1,void(t&&Pe.hide());if(i._sonic_http_response_&&!i._sonic_http_response_.ok&&1===Object.keys(i).length&&ks.add({text:"Network Error",status:"error"}),t&&Pe.hide(),this.key){const t=i._sonic_http_response_;i=s.traverse(i,this.key.split("."),this.hasAttribute("preserveOtherKeys")),i&&s.isObject(i)&&t&&(i._sonic_http_response_=t)}this.props=i,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}else t&&Pe.hide()}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;if(super.connectedCallback(),!this.isFetchEnabled)return;this.key=this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate);null===this.getAttribute("lazyload")?this._fetchData():this.handleLazyLoad()}handleLazyLoad(){if(null===this.getAttribute("lazyload"))return;const t=this.getBoundingClientRect();if(t.x<window.innerWidth&&t.right>0&&t.y<window.innerHeight&&t.right>0)return void this._fetchData();const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),s={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px"};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),s);let i=this.shadowRoot?this.shadowRoot.children[0]:this.children[0];if("slot"==(null==i?void 0:i.nodeName.toLocaleLowerCase())&&(i=i.children[0]),!i||"template"==i.nodeName.toLocaleLowerCase()){i=document.createElement("span");const t=i.style;t.position="absolute",t.pointerEvents="none",this.lazyLoadSpan=i,this.appendChild(i)}i?this.iObserver.observe(i):this.isFirstLoad&&this._fetchData()}onIntersection(t){var e,s;for(const i of t)if(i.isIntersecting&&this.isFirstLoad){this._fetchData(),null==(e=this.lazyLoadSpan)||e.remove(),this.lazyLoadSpan=void 0,null==(s=this.iObserver)||s.disconnect();break}}}return Ps([f()],i.prototype,"props",1),Ps([f({type:String})],i.prototype,"endPoint",1),Ps([f()],i.prototype,"requestId",2),Ps([f({type:Number})],i.prototype,"refetchEveryMs",2),i};var $s=Object.defineProperty,Os=Object.getOwnPropertyDescriptor;let Ls=class extends(Ss(L(Nt))){render(){return bt`<slot></slot>`}};Ls.styles=[T`:host{display:contents}`],Ls=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Os(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$s(e,s,o),o})([b("sonic-fetch")],Ls);var Ds=Object.defineProperty,js=Object.getOwnPropertyDescriptor,Es=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?js(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ds(e,s,o),o};let Ms=class extends Nt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?bt`<slot></slot>`:ft}};Ms.styles=T`:host{display:contents}`,Es([f({type:Boolean})],Ms.prototype,"condition",2),Ms=Es([b("sonic-if")],Ms);
93
+ */class is extends Kt{constructor(t){if(super(t),this.it=ft,t.type!==Ht)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ft||null==t)return this._t=void 0,this.it=t;if(t===mt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}is.directiveName="unsafeHTML",is.resultType=1;const rs=Wt(is),os=new Map,ns={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let as=!1;const ls=class{static registerIcons(t){const e=ss;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};let cs=ls;cs.fontAwesomeNext={get:async t=>{const e=t.library,s=t.name||"",i=ss;var r,o;if("custom"==e&&(as||(as=!0,ns.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",ns.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&ns[e]){const r=ns[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return rs(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(!os.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));os.set(l,t)}const c=await os.get(l);return os.delete(l),n[a]=c||"",rs(c)}return rs(i.core[t.name]||"")}},cs.default=ls.fontAwesomeNext;var hs=Object.defineProperty,ds=Object.getOwnPropertyDescriptor,ps=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ds(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&hs(e,s,o),o};let us=class extends Nt{constructor(){super(...arguments),this.renderId=0,this.iconText="",this._name="",this._prefix="",this._library=""}updateIcon(){if(!this.name)return;this.renderId++;const t=this.renderId;(window.queueMicrotask||window.requestAnimationFrame)((async()=>{t==this.renderId&&(this.iconText=await cs.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}))}get name(){return this._name}set name(t){this._name=t,this.updateIcon()}get prefix(){return this._prefix}set prefix(t){this._prefix=t,this.updateIcon()}get library(){return this._library}set library(t){this._library=t,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",ft)}};us.styles=T`:host{line-height:0;width:fit-content;height:fit-content;vertical-align:-.125em}svg{height:var(--sc-icon-size,1em);width:var(--sc-icon-size,1em)}svg:not([fill=none]){fill:currentColor}svg[fill=none]{stroke-width:2}:host([size="2xs"]) svg{--sc-icon-size:0.625em}:host([size=xs]) svg{--sc-icon-size:0.75em}:host([size=sm]) svg{--sc-icon-size:0.875em}:host([size=lg]) svg{--sc-icon-size:1.25em}:host([size=xl]) svg{--sc-icon-size:1.5em}:host([size="2xl"]) svg{--sc-icon-size:2em}:host([size="3xl"]) svg{--sc-icon-size:2.8em}`,ps([f({type:String})],us.prototype,"name",1),ps([f({type:String})],us.prototype,"prefix",1),ps([f({type:String})],us.prototype,"library",1),us=ps([b("sonic-icon")],us);const gs=T`.custom-scroll{overflow:auto!important;overflow-y:overlay!important}.custom-scroll::-webkit-scrollbar{width:.5rem;height:.5rem;border:solid .15rem transparent;border-radius:var(--sc-rounded);background:0 0}.custom-scroll::-webkit-scrollbar-thumb{box-shadow:inset 0 0 2rem 2rem var(--sc-scrollbar-bg);border-radius:var(--sc-rounded);border:solid .15rem transparent}`;var bs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,fs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ms(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bs(e,s,o),o};const vs={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let ys=class extends Nt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return ft}return this.visible?bt`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&bt`<sonic-icon name="${vs[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?bt`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?rs(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:ft}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),4200)}};ys.styles=[gs,T`*{box-sizing:border-box}:host{display:block;pointer-events:auto;position:relative;--sc-toast-status-color:transparent;--sc-toast-color:var(--sc-base-content);--sc-toast-bg:var(--sc-base);--sc-toast-rounded:var(--sc-rounded-md);--sc-toast-shadow:var(--sc-shadow-lg)}.fixed-area{position:fixed;bottom:1.25rem;right:1.25rem;z-index:10000;display:flex;flex-direction:column-reverse}.sonic-toast{position:relative;pointer-events:auto;overflow:hidden;line-height:1.25;color:var(--sc-toast-color);box-shadow:var(--sc-toast-shadow);border-radius:var(--sc-toast-rounded);background:var(--sc-toast-bg)}.sonic-toast-content{padding:1em 2.5rem 1em 1em;display:flex;gap:.5rem;overflow:auto;position:relative}.sonic-toast-text{align-self:center;margin-top:auto;margin-bottom:auto;max-width:70ch;line-height:1.2}.sonic-toast-text a,::slotted(a:not(.btn)){color:inherit!important;text-decoration:underline!important;text-underline-offset:.15rem}.sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6),::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6)){margin:0 0 .3em!important}.sonic-toast-text li,::slotted(li){margin-bottom:.15em!important}.sonic-toast-text>:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child,::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child){margin-bottom:0!important}.sonic-toast-close{all:unset;position:absolute;z-index:4;pointer-events:initial;right:.5em;top:.5em;width:1.5rem;height:1.5rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;text-align:center;opacity:.5;background:rgba(0,0,0,0)}.sonic-toast-close:focus,.sonic-toast-close:hover{opacity:1;background:rgba(0,0,0,.075)}.sonic-toast-close svg{width:1rem;height:1rem;object-fit:contain;object-position:center center}.sonic-toast-title{font-weight:700;font-size:1.15rem;margin:.15em 0 .25em;line-height:1.2}.success{--sc-toast-status-color:var(--sc-success);--sc-toast-title-color:var(--sc-toast-status-color)}.error{--sc-toast-status-color:var(--sc-danger);--sc-toast-title-color:var(--sc-toast-status-color)}.warning{--sc-toast-status-color:var(--sc-warning);--sc-toast-title-color:var(--sc-toast-status-color)}.info{--sc-toast-status-color:var(--sc-info);--sc-toast-title-color:var(--sc-toast-status-color)}.error,.info,.success,.warning{border-top:3px solid var(--sc-toast-status-color,currentColor)}.sonic-toast:before{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.05;pointer-events:none;transition:.2s;border-radius:var(--sc-toast-rounded);background-color:var(--sc-toast-status-color)}.sonic-toast:hover:before{opacity:.025}.error .sonic-toast-icon,.info .sonic-toast-icon,.success .sonic-toast-icon,.warning .sonic-toast-icon{color:var(--sc-toast-status-color,currentColor)}.sonic-toast-icon{position:sticky;top:0}.ghost{opacity:.85;pointer-events:none}`],fs([f({type:String})],ys.prototype,"title",2),fs([f({type:String})],ys.prototype,"id",2),fs([f({type:String})],ys.prototype,"text",2),fs([f({type:String})],ys.prototype,"status",2),fs([f({type:Boolean})],ys.prototype,"ghost",2),fs([f({type:Boolean})],ys.prototype,"preserve",2),fs([f({type:Boolean})],ys.prototype,"dismissForever",2),fs([f({type:String})],ys.prototype,"maxHeight",2),fs([v()],ys.prototype,"visible",2),ys=fs([b("sonic-toast-item")],ys);var ws=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,_s=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ws(e,s,o),o};let ks=class extends Nt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),this.toasts?bt`<div aria-live="polite" style="${Zt(e)}">${Me(this.toasts,(t=>t.id),(e=>bt`<sonic-toast-item maxHeight="${t?"none":"10rem"}" status="${be(e.status)}" title="${be(e.title)}" ?ghost="${e.ghost}" ?dismissForever="${e.dismissForever}" ?preserve="${e.preserve}" id="${be(e.id)}" @hide="${()=>this.removeItem(e)}" ${es({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${e.text?rs(e.text):""}</sonic-toast-item>`))}</div>`:ft}static removeAll(){const t=document.querySelector("sonic-toast");t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static add(t){var e;if(!document.querySelector("sonic-toast")){const t=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(t)}const i=document.querySelector("sonic-toast"),r=null!=(e=t.id)?e:(new Date).valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:r,text:t.text,title:t.title,status:t.status,preserve:!!o||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(i.toasts.length>0){const t={...n};for(const e of i.toasts){const i={...e};if(t.id=i.id=0,s.shallowEqual(t,i))return null}}return i.toasts=[...i.toasts,n],n}static removeItem(t){const e=document.querySelector("sonic-toast");e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e={...e}).id,!s.shallowEqual(e,t,!1)))))}};_s([f({type:Array})],ks.prototype,"toasts",2),ks=_s([b("sonic-toast")],ks),"undefined"!=typeof window&&(window.SonicToast=ks);var As=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,Cs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ps(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&As(e,s,o),o};const Ss=(t,e)=>{class i extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(t){super.props=t}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled)return;if(this.api=new r(this.getApiConfiguration()),!this.api)return;if(this.dispatchEvent(new CustomEvent("loading",{detail:this})),"enabled"===this.getAttribute("localStorage")&&await ce.getInstance().isLocalStrorageReady,!this.isConnected)return;const t=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");t&&Ce.show();const e=ce.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,s.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&(this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1);let i=await this.api.get(this.endPoint||this.dataProvider||"",e);if(this.isConnected){if(!i)return ks.add({text:"Network Error",status:"error"}),this.isLoading=!1,void(t&&Ce.hide());if(i._sonic_http_response_&&!i._sonic_http_response_.ok&&1===Object.keys(i).length&&ks.add({text:"Network Error",status:"error"}),t&&Ce.hide(),this.key){const t=i._sonic_http_response_;i=s.traverse(i,this.key.split("."),this.hasAttribute("preserveOtherKeys")),i&&s.isObject(i)&&t&&(i._sonic_http_response_=t)}this.props=i,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}else t&&Ce.hide()}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;if(super.connectedCallback(),!this.isFetchEnabled)return;this.key=this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate);null===this.getAttribute("lazyload")?this._fetchData():this.handleLazyLoad()}handleLazyLoad(){if(null===this.getAttribute("lazyload"))return;const t=this.getBoundingClientRect();if(t.x<window.innerWidth&&t.right>0&&t.y<window.innerHeight&&t.right>0)return void this._fetchData();const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),s={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px"};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),s);let i=this.shadowRoot?this.shadowRoot.children[0]:this.children[0];if("slot"==(null==i?void 0:i.nodeName.toLocaleLowerCase())&&(i=i.children[0]),!i||"template"==i.nodeName.toLocaleLowerCase()){i=document.createElement("span");const t=i.style;t.position="absolute",t.pointerEvents="none",this.lazyLoadSpan=i,this.appendChild(i)}i?this.iObserver.observe(i):this.isFirstLoad&&this._fetchData()}onIntersection(t){var e,s;for(const i of t)if(i.isIntersecting&&this.isFirstLoad){this._fetchData(),null==(e=this.lazyLoadSpan)||e.remove(),this.lazyLoadSpan=void 0,null==(s=this.iObserver)||s.disconnect();break}}}return Cs([f()],i.prototype,"props",1),Cs([f({type:String})],i.prototype,"endPoint",1),Cs([f()],i.prototype,"requestId",2),Cs([f({type:Number})],i.prototype,"refetchEveryMs",2),i};var $s=Object.defineProperty,Os=Object.getOwnPropertyDescriptor;let Ds=class extends(Ss(D(Nt))){render(){return bt`<slot></slot>`}};Ds.styles=[T`:host{display:contents}`],Ds=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Os(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$s(e,s,o),o})([b("sonic-fetch")],Ds);var Ls=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Es(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ls(e,s,o),o};let Ms=class extends Nt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?bt`<slot></slot>`:ft}};Ms.styles=T`:host{display:contents}`,js([f({type:Boolean})],Ms.prototype,"condition",2),Ms=js([b("sonic-if")],Ms);
94
94
  /**
95
95
  * @license
96
96
  * Copyright 2020 Google LLC
97
97
  * SPDX-License-Identifier: BSD-3-Clause
98
98
  */
99
- const zs=Wt(class extends Kt{constructor(t){if(super(t),t.type!==Ht)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?mt:(this.ft=t,document.importNode(t.content,!0))}});var Ns=Object.defineProperty,Is=Object.getOwnPropertyDescriptor;let Fs=class extends(L(Nt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return bt`<slot></slot>`}};Fs=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Is(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ns(e,s,o),o})([b("sonic-subscriber")],Fs);var Ts=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,Us=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Rs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ts(e,s,o),o};let Vs=class extends(Ss(L(E(Nt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoadingState(){return this.templateParts.skeleton?zs(this.templateParts.skeleton):bt`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return bt`<div style="color:var(--sc-base-400);font-size:1.5em;margin:4rem 0;display:flex;gap:.5rem"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span></div>`}formatProps(){let t=this.props;if(null==t)return null;const e=t._sonic_http_response_,i=this.hasAttribute("extractValues");return Array.isArray(t)||(t=i?Object.entries(t).map((([t,e])=>({key:t,value:e}))):s.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!s.isObject(this.props))return bt`<div></div>`;const t=this.formatProps();if(0==((null==t?void 0:t.length)||0)&&this.templateParts["no-item"])return zs(this.templateParts["no-item"]);const e=this.templateList.length;let i=-1;const r=this.hasAttribute("extractValues"),o=this.templateParts.separator,n=(null==t?void 0:t.length)||0;return bt`${null==t?void 0:t.map(((t,s)=>{if(null==t)return ft;let a=null,l=s;if("object"==typeof t&&!Array.isArray(t)){const e=t[this.templateKey];e&&"string"==typeof e&&(a=this.templateParts[e]),r&&(l=null==t?void 0:t.key)}if("_sonic_http_response_"==l)return ft;if("string"!=typeof l&&"number"!=typeof l)return ft;const c=s>=n-1,h=s%2,d=this.publisher[l];return d._key_=l+"",d._metadata_={...d._metadata_.get(),key:l,even:0==h,odd:1==h,onlyChild:1==n,firstChild:0==s,lastChild:c},i++,a&&(i=-1),t&&bt`<sonic-subscriber ?debug="${!0===this.defferedDebug}" .bindPublisher="${function(){return d}}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${l}">${zs(a||this.templateList[i%e])}</sonic-subscriber>${o&&!c?zs(o):ft}`}))}`}};Us([f({type:Object})],Vs.prototype,"itemPropertyMap",2),Us([f({type:String})],Vs.prototype,"templateKey",2),Us([f({type:String})],Vs.prototype,"idKey",2),Vs=Us([b("sonic-list")],Vs);var Bs=Object.defineProperty,qs=Object.getOwnPropertyDescriptor,Hs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?qs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Bs(e,s,o),o};let Ws=class extends(L(Nt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.localStorage="disabled",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)h.delete(t);super.disconnectedCallback()}async connectedCallback(){this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+Ws.instanceCounter+++"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=oe.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),await h.getInstance().isLocalStrorageReady,this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=h.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{this.updateFilteredContent()}))):this.next()}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)h.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await h.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:400),this.isFirstRequest=!1}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?"),n=o.shift(),a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&!c.includes(d)||null==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),r=n+"?"+a.toString(),this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r,offset:s,limit:this.limit}];h.resultCount=this.resultCount,this.props=h,this.lastRequestTime=(new Date).getTime()}render(){return Array.isArray(this.props)?bt`${
99
+ const zs=Wt(class extends Kt{constructor(t){if(super(t),t.type!==Ht)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?mt:(this.ft=t,document.importNode(t.content,!0))}});var Ns=Object.defineProperty,Is=Object.getOwnPropertyDescriptor;let Fs=class extends(D(Nt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return bt`<slot></slot>`}};Fs=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Is(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ns(e,s,o),o})([b("sonic-subscriber")],Fs);var Ts=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,Vs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Rs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ts(e,s,o),o};let Us=class extends(Ss(D(j(Nt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoadingState(){return this.templateParts.skeleton?zs(this.templateParts.skeleton):bt`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return bt`<div style="color:var(--sc-base-400);font-size:1.5em;margin:4rem 0;display:flex;gap:.5rem"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span></div>`}formatProps(){let t=this.props;if(null==t)return null;const e=t._sonic_http_response_,i=this.hasAttribute("extractValues");return Array.isArray(t)||(t=i?Object.entries(t).map((([t,e])=>({key:t,value:e}))):s.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!s.isObject(this.props))return bt`<div></div>`;const t=this.formatProps();if(0==((null==t?void 0:t.length)||0)&&this.templateParts["no-item"])return zs(this.templateParts["no-item"]);const e=this.templateList.length;let i=-1;const r=this.hasAttribute("extractValues"),o=this.templateParts.separator,n=(null==t?void 0:t.length)||0;return bt`${null==t?void 0:t.map(((t,s)=>{if(null==t)return ft;let a=null,l=s;if("object"==typeof t&&!Array.isArray(t)){const e=t[this.templateKey];e&&"string"==typeof e&&(a=this.templateParts[e]),r&&(l=null==t?void 0:t.key)}if("_sonic_http_response_"==l)return ft;if("string"!=typeof l&&"number"!=typeof l)return ft;const c=s>=n-1,h=s%2,d=this.publisher[l];return d._key_=l+"",d._metadata_={...d._metadata_.get(),key:l,even:0==h,odd:1==h,onlyChild:1==n,firstChild:0==s,lastChild:c},i++,a&&(i=-1),t&&bt`<sonic-subscriber ?debug="${!0===this.defferedDebug}" .bindPublisher="${function(){return d}}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${l}">${zs(a||this.templateList[i%e])}</sonic-subscriber>${o&&!c?zs(o):ft}`}))}`}};Vs([f({type:Object})],Us.prototype,"itemPropertyMap",2),Vs([f({type:String})],Us.prototype,"templateKey",2),Vs([f({type:String})],Us.prototype,"idKey",2),Us=Vs([b("sonic-list")],Us);var qs=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,Hs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qs(e,s,o),o};let Ws=class extends(D(Nt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)h.delete(t);super.disconnectedCallback()}async connectedCallback(){this.instanceId=Ws.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=oe.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),await h.getInstance().isLocalStrorageReady,this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=h.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{this.updateFilteredContent()}))):this.next()}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)h.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await h.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:400),this.isFirstRequest=!1}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?"),n=o.shift(),a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&c.includes(d)||null==l[d]||""==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),r=n+"?"+a.toString(),this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r+"_item_from_queue_"+this.instanceId,endPoint:r,offset:s,limit:this.limit}];h.resultCount=this.resultCount,this.props=h,this.lastRequestTime=(new Date).getTime()}render(){if(!Array.isArray(this.props))return ft;let t=!this.noLazyload;return 1==this.props.length&&(t=!1),bt`${
100
100
  /**
101
101
  * @license
102
102
  * Copyright 2021 Google LLC
103
103
  * SPDX-License-Identifier: BSD-3-Clause
104
104
  */
105
- function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.props,((t,e)=>{var s;const i=0==e?this.templates:null==(s=this.templates)?void 0:s.filter((t=>"no-item"!=t.getAttribute("data-value")));return bt`<sonic-list fetch cache="${this.cache}" displayContents lazyBoundsRatio="${this.lazyBoundsRatio}" ?lazyload="${!this.noLazyload}" localStorage="${this.localStorage}" requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${!0===this.defferedDebug}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${t.dataProvider}" idKey="${this.idKey}" .templates="${i}"></sonic-list>`}))}`:ft}};Ws.instanceCounter=0,Hs([f({type:Array})],Ws.prototype,"templates",2),Hs([f({type:Object})],Ws.prototype,"itemPropertyMap",2),Hs([f()],Ws.prototype,"cache",2),Hs([f()],Ws.prototype,"targetRequestDuration",2),Hs([f()],Ws.prototype,"limit",2),Hs([f()],Ws.prototype,"lazyBoundsRatio",2),Hs([f()],Ws.prototype,"offset",2),Hs([f()],Ws.prototype,"resultCount",2),Hs([f({type:Boolean})],Ws.prototype,"noLazyload",2),Hs([f()],Ws.prototype,"filteredFields",2),Hs([f({type:String})],Ws.prototype,"dataProviderExpression",2),Hs([f({type:String})],Ws.prototype,"idKey",2),Ws=Hs([b("sonic-queue")],Ws);var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Ys=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ks(e,s,o),o};let Qs=class extends(L(Nt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new r(this.getApiConfiguration())}submitNativeForm(){const t=oe.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s=h.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t,e,i;const r=h.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(r.isFormValid=!0,r.invalidate(),!r.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),r.isFormValid;if(this.hasAttribute("native"))return void this.submitNativeForm();const o=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",n=this.hasAttribute("sendAsFormData"),a=r.get();delete a.isFormValid;const l=this.getAncestorAttributeValue("headersDataProvider"),c=l?h.getInstance().get(l):null;let d={};c&&(d=c.get());let p=null;const u=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||u;Pe.show();const b=async()=>{var t,e,i,r,l,c,u;if(n)p=await(null==(t=this.api)?void 0:t.submitFormData(g,a,o,d));else switch(o){case"put":p=await(null==(e=this.api)?void 0:e.put(g,a,d));break;case"delete":p=await(null==(i=this.api)?void 0:i.delete(g,a,d));break;case"get":p=await(null==(r=this.api)?void 0:r.get(g,d));break;default:p=await(null==(l=this.api)?void 0:l.post(g,a,d))}Pe.hide(),p?p._sonic_http_response_&&!p._sonic_http_response_.ok&&1===Object.keys(p).length&&(p.messages=[{content:"Network Error",status:"error"}]):p={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach((t=>h.get(t).set({})));const m=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(u=null==(c=this.api)?void 0:c.lastResult)?void 0:u.ok)&&a[m]&&a[f]&&this.saveCredentials(a[m],a[f]),this.submitResultKey&&(p=s.traverse(p,this.submitResultKey.split("."),!0));const v=this.getAncestorAttributeValue("submitResultDataProvider");v&&h.get(v).set(p),this.publisher&&(this.publisher.disabled=null)},m=(null==c?void 0:c.needsCaptchaValidation.get())?c:r.needsCaptchaValidation.get()?r:null;if(m){m.captchaMethod=o,m.captchaAction=null!=(i=null!=(e=null==u?void 0:u.split("?")[0])?e:this.getAncestorAttributeValue("formDataProvider"))?i:"submit",m.captchaToken="request_token";const t=e=>{"request_token"!=e&&(b(),m.captchaToken.offAssign(t))};m.captchaToken.onAssign(t)}else b()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return bt`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Qs.styles=T`[data-disabled]{opacity:.3;pointer-events:none;user-select:none}`,Ys([f({type:String})],Qs.prototype,"submitResultKey",2),Ys([f({type:Boolean})],Qs.prototype,"disabled",2),Ys([f({type:String})],Qs.prototype,"endPoint",2),Ys([f()],Qs.prototype,"name",2),Ys([f()],Qs.prototype,"value",2),Qs=Ys([b("sonic-submit")],Qs);var Gs,Js,Xs,ti,ei="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},si={exports:{}};Gs=si,ti=[].slice,Js=ei,Xs=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?ti.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?ti.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?ti.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==si.exports?Gs.exports=Xs():Js.UrlPattern=Xs();var ii=si.exports,ri=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ni=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ri(e,s,o),o};let ai=class extends(L(E(Nt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",Bt.onChange(this),super.connectedCallback()}disconnectedCallback(){Bt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){const t=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(i).test(this.location))t.push(s);else try{new ii(i).match(this.location)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch(e){-1!=this.location.indexOf(i.replace(document.location.origin,""))&&t.push(s)}}return bt`${Me(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="";const i=t.getAttribute("dataProviderExpression")||"";if("patternMatching"==t.getAttribute("mode")){const e=new ii(t.getAttribute(this.templateValueAttribute)||"");s=new ii(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute)||""),o=(this.location+"").match(r);o&&(s=(null==(e=o.shift())?void 0:e.replace(r,i))||"")}return bt`<div style="display:contents" dataProvider="${s}">${zs(t)}</div>`}return zs(t)}))}`}};ni([f()],ai.prototype,"location",1),ai=ni([b("sonic-router")],ai);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor;let hi=class extends(L(Nt)){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void Bt.changeFromComponent(this);if(!this.props)return;const t=this.getAttribute("onData").split("."),e=s.traverse(this.props,t);!e||s.isObject(e)&&e||Bt.changeFromComponent(this)}};hi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ci(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&li(e,s,o),o})([b("sonic-redirect")],hi);var di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,ui=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&di(e,s,o),o};let gi=class extends(L(E(Nt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const t=[];let e=this.state;(!Array.isArray(e)&&s.isObject(e)||void 0===e)&&(e="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$");if(new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{const e=new ii(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return bt`${Me(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){const i=t.getAttribute("dataProviderExpression");let r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new ii(n);r=new ii(i).stringify(t.match(o))}else{const t=new RegExp(n),e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return bt`<div style="display:contents" dataProvider="${r}">${zs(t)}</div>`}return zs(t)}))}`}};ui([f()],gi.prototype,"state",2),ui([f({type:Boolean,reflect:!0})],gi.prototype,"inverted",2),gi=ui([b("sonic-states")],gi);var bi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor;let fi=class extends Nt{createRenderRoot(){return this}render(){return bt`<slot></slot>`}};fi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?mi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bi(e,s,o),o})([b("sonic-scope")],fi);var vi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,wi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?yi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vi(e,s,o),o};let xi=class extends(L(Nt)){constructor(){super(...arguments),this.text="Example"}render(){return bt`<div>${this.text}</div>`}};wi([f()],xi.prototype,"text",2),xi=wi([b("sonic-example")],xi);var _i={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class ki{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(const s of e.transforms)this.transformAction(s)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const s=e.nodes;if(!s)return[];let i=[],r=0;for(const o of t)for(const t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(const a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;const o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(const a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(const r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;const l={...t.ui};l.nodes||(l.nodes=[]);let c=0;for(const d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;const h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(const r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(const o of e){const e={...t.ui};e.attributes||(e.attributes={});const n=o.child.attributes;if(n)for(const t in n)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[t]=n[t]);const a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(const t of a)!Object.prototype.hasOwnProperty.call(e,t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);const h=o.child.nodes;if(h)for(const t of h)e.nodes.push(t);const d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(const i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...t.ui})):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,{...t.ui}))}}var Ai=Object.defineProperty,Ci=Object.getOwnPropertyDescriptor,Pi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ci(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ai(e,s,o),o};const Si=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return Pi([f()],e.prototype,"forceAutoFill",2),Pi([f({type:String})],e.prototype,"type",1),Pi([f()],e.prototype,"description",1),Pi([f()],e.prototype,"label",1),Pi([f({type:Number})],e.prototype,"tabindex",2),Pi([f({type:String})],e.prototype,"autocomplete",2),e},$i=Ss,Oi=ge,Li=Xt,Di=Si,ji=L,Ei=E;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:$i,FormCheckable:Oi,FormElement:Li,FormInput:Di,Subscriber:ji,TemplatesContainer:Ei};var Mi=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Ni=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?zi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mi(e,s,o),o};let Ii=class extends($i(ji(Nt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){null==this.props&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,_i,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)oe.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)oe.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new ki;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const t of i){const i=this.parseChild(t);let r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const t=s[i],r=ae.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){const i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};Ni([f()],Ii.prototype,"sduiKey",2),Ni([f()],Ii.prototype,"messagesKey",2),Ii=Ni([b("sonic-sdui")],Ii);var Fi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ri=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ti(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Fi(e,s,o),o};let Ui=class extends(ji(Nt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if("string"==typeof i){const t=i.split("."),r=t.shift();if(!r)continue;let o=ce.get(r);o=ae.traverse(o,t);const n={publisher:o,subscriber:t=>{e[s]=t}};this.listeners.push(n),o.onAssign(n.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const t=new l({},e);e._proxies_.set(s,t);const r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return bt`<slot></slot>`}};Ui.styles=[T`:host{display:contents}`],Ri([f({type:Object})],Ui.prototype,"composition",1),Ui=Ri([b("sonic-mix")],Ui);var Vi=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor;let qi=class extends(ji(Nt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"object"==typeof this.props||void 0===this.props?bt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:bt`${rs(this.props.toString())}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};qi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Bi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vi(e,s,o),o})([b("sonic-value")],qi);const Hi=T`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base),sans-serif;--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc(
105
+ function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.props,((e,s)=>{var i;const r=0==s?this.templates:null==(i=this.templates)?void 0:i.filter((t=>"no-item"!=t.getAttribute("data-value")));return bt`<sonic-list fetch cache="${this.cache}" displayContents lazyBoundsRatio="${this.lazyBoundsRatio}" ?lazyload="${t}" localStorage="${this.localStorage}" requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${!0===this.defferedDebug}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${e.dataProvider}" endPoint="${e.endPoint}" idKey="${this.idKey}" .templates="${r}"></sonic-list>`}))}`}};Ws.instanceCounter=0,Hs([f({type:Array})],Ws.prototype,"templates",2),Hs([f({type:Object})],Ws.prototype,"itemPropertyMap",2),Hs([f()],Ws.prototype,"cache",2),Hs([f()],Ws.prototype,"targetRequestDuration",2),Hs([f()],Ws.prototype,"limit",2),Hs([f()],Ws.prototype,"lazyBoundsRatio",2),Hs([f()],Ws.prototype,"offset",2),Hs([f()],Ws.prototype,"resultCount",2),Hs([f({type:Boolean})],Ws.prototype,"noLazyload",2),Hs([f()],Ws.prototype,"filteredFields",2),Hs([f({type:String})],Ws.prototype,"dataProviderExpression",2),Hs([f({type:String})],Ws.prototype,"idKey",2),Ws=Hs([b("sonic-queue")],Ws);var Ks=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Qs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ks(e,s,o),o};let Ys=class extends(D(Nt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new r(this.getApiConfiguration())}submitNativeForm(){const t=oe.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s=h.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t,e,i;const r=h.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(r.isFormValid=!0,r.invalidate(),!r.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),r.isFormValid;if(this.hasAttribute("native"))return void this.submitNativeForm();const o=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",n=this.hasAttribute("sendAsFormData"),a=r.get();delete a.isFormValid;const l=this.getAncestorAttributeValue("headersDataProvider"),c=l?h.getInstance().get(l):null;let d={};c&&(d=c.get());let p=null;const u=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||u;Ce.show();const b=async()=>{var t,e,i,r,l,c,u;if(n)p=await(null==(t=this.api)?void 0:t.submitFormData(g,a,o,d));else switch(o){case"put":p=await(null==(e=this.api)?void 0:e.put(g,a,d));break;case"delete":p=await(null==(i=this.api)?void 0:i.delete(g,a,d));break;case"get":p=await(null==(r=this.api)?void 0:r.get(g,d));break;default:p=await(null==(l=this.api)?void 0:l.post(g,a,d))}Ce.hide(),p?p._sonic_http_response_&&!p._sonic_http_response_.ok&&1===Object.keys(p).length&&(p.messages=[{content:"Network Error",status:"error"}]):p={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach((t=>h.get(t).set({})));const m=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(u=null==(c=this.api)?void 0:c.lastResult)?void 0:u.ok)&&a[m]&&a[f]&&this.saveCredentials(a[m],a[f]),this.submitResultKey&&(p=s.traverse(p,this.submitResultKey.split("."),!0));const v=this.getAncestorAttributeValue("submitResultDataProvider");v&&h.get(v).set(p),this.publisher&&(this.publisher.disabled=null)},m=(null==c?void 0:c.needsCaptchaValidation.get())?c:r.needsCaptchaValidation.get()?r:null;if(m){m.captchaMethod=o,m.captchaAction=null!=(i=null!=(e=null==u?void 0:u.split("?")[0])?e:this.getAncestorAttributeValue("formDataProvider"))?i:"submit",m.captchaToken="request_token";const t=e=>{"request_token"!=e&&(b(),m.captchaToken.offAssign(t))};m.captchaToken.onAssign(t)}else b()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return bt`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Ys.styles=T`[data-disabled]{opacity:.3;pointer-events:none;user-select:none}`,Qs([f({type:String})],Ys.prototype,"submitResultKey",2),Qs([f({type:Boolean})],Ys.prototype,"disabled",2),Qs([f({type:String})],Ys.prototype,"endPoint",2),Qs([f()],Ys.prototype,"name",2),Qs([f()],Ys.prototype,"value",2),Ys=Qs([b("sonic-submit")],Ys);var Gs,Js,Xs,ti,ei="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},si={exports:{}};Gs=si,ti=[].slice,Js=ei,Xs=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?ti.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?ti.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?ti.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==si.exports?Gs.exports=Xs():Js.UrlPattern=Xs();var ii=si.exports,ri=Object.defineProperty,oi=Object.getOwnPropertyDescriptor,ni=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ri(e,s,o),o};let ai=class extends(D(j(Nt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",qt.onChange(this),super.connectedCallback()}disconnectedCallback(){qt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){const t=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(i).test(this.location))t.push(s);else try{new ii(i).match(this.location)&&(s.setAttribute("mode","patternMatching"),t.push(s))}catch(e){-1!=this.location.indexOf(i.replace(document.location.origin,""))&&t.push(s)}}return bt`${Me(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="";const i=t.getAttribute("dataProviderExpression")||"";if("patternMatching"==t.getAttribute("mode")){const e=new ii(t.getAttribute(this.templateValueAttribute)||"");s=new ii(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute)||""),o=(this.location+"").match(r);o&&(s=(null==(e=o.shift())?void 0:e.replace(r,i))||"")}return bt`<div style="display:contents" dataProvider="${s}">${zs(t)}</div>`}return zs(t)}))}`}};ni([f()],ai.prototype,"location",1),ai=ni([b("sonic-router")],ai);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor;let hi=class extends(D(Nt)){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void qt.changeFromComponent(this);if(!this.props)return;const t=this.getAttribute("onData").split("."),e=s.traverse(this.props,t);!e||s.isObject(e)&&e||qt.changeFromComponent(this)}};hi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ci(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&li(e,s,o),o})([b("sonic-redirect")],hi);var di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,ui=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&di(e,s,o),o};let gi=class extends(D(j(Nt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const t=[];let e=this.state;(!Array.isArray(e)&&s.isObject(e)||void 0===e)&&(e="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$");if(new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{const e=new ii(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return bt`${Me(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){const i=t.getAttribute("dataProviderExpression");let r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new ii(n);r=new ii(i).stringify(t.match(o))}else{const t=new RegExp(n),e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return bt`<div style="display:contents" dataProvider="${r}">${zs(t)}</div>`}return zs(t)}))}`}};ui([f()],gi.prototype,"state",2),ui([f({type:Boolean,reflect:!0})],gi.prototype,"inverted",2),gi=ui([b("sonic-states")],gi);var bi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor;let fi=class extends Nt{createRenderRoot(){return this}render(){return bt`<slot></slot>`}};fi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?mi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bi(e,s,o),o})([b("sonic-scope")],fi);var vi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,wi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?yi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vi(e,s,o),o};let xi=class extends(D(Nt)){constructor(){super(...arguments),this.text="Example"}render(){return bt`<div>${this.text}</div>`}};wi([f()],xi.prototype,"text",2),xi=wi([b("sonic-example")],xi);var _i={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class ki{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(const s of e.transforms)this.transformAction(s)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const s=e.nodes;if(!s)return[];let i=[],r=0;for(const o of t)for(const t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(const a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;const o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(const a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(const r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;const l={...t.ui};l.nodes||(l.nodes=[]);let c=0;for(const d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;const h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(const r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(const o of e){const e={...t.ui};e.attributes||(e.attributes={});const n=o.child.attributes;if(n)for(const t in n)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[t]=n[t]);const a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(const t of a)!Object.prototype.hasOwnProperty.call(e,t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);const h=o.child.nodes;if(h)for(const t of h)e.nodes.push(t);const d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(const i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...t.ui})):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,{...t.ui}))}}var Ai=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,Ci=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ai(e,s,o),o};const Si=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return Ci([f()],e.prototype,"forceAutoFill",2),Ci([f({type:String})],e.prototype,"type",1),Ci([f()],e.prototype,"description",1),Ci([f()],e.prototype,"label",1),Ci([f({type:Number})],e.prototype,"tabindex",2),Ci([f({type:String})],e.prototype,"autocomplete",2),e},$i=Ss,Oi=ge,Di=Xt,Li=Si,Ei=D,ji=j;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:$i,FormCheckable:Oi,FormElement:Di,FormInput:Li,Subscriber:Ei,TemplatesContainer:ji};var Mi=Object.defineProperty,zi=Object.getOwnPropertyDescriptor,Ni=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?zi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mi(e,s,o),o};let Ii=class extends($i(Ei(Nt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){null==this.props&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,_i,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)oe.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)oe.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new ki;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const t of i){const i=this.parseChild(t);let r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const t=s[i],r=ae.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){const i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};Ni([f()],Ii.prototype,"sduiKey",2),Ni([f()],Ii.prototype,"messagesKey",2),Ii=Ni([b("sonic-sdui")],Ii);var Fi=Object.defineProperty,Ti=Object.getOwnPropertyDescriptor,Ri=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ti(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Fi(e,s,o),o};let Vi=class extends(Ei(Nt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if("string"==typeof i){const t=i.split("."),r=t.shift();if(!r)continue;let o=ce.get(r);o=ae.traverse(o,t);const n={publisher:o,subscriber:t=>{e[s]=t}};this.listeners.push(n),o.onAssign(n.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const t=new l({},e);e._proxies_.set(s,t);const r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return bt`<slot></slot>`}};Vi.styles=[T`:host{display:contents}`],Ri([f({type:Object})],Vi.prototype,"composition",1),Vi=Ri([b("sonic-mix")],Vi);var Ui=Object.defineProperty,qi=Object.getOwnPropertyDescriptor;let Bi=class extends(Ei(Nt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"object"==typeof this.props||void 0===this.props?bt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:bt`${rs(this.props.toString())}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Bi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ui(e,s,o),o})([b("sonic-value")],Bi);const Hi=T`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base),sans-serif;--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc(
106
106
  (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
107
107
  var(--sc-btn-rounded-intensity)
108
108
  );--sc-placeholder-bg:rgba(17, 24, 39, 0.05);--sc-shadow-sm:0 1px 3px 0 rgb(0 0 0 / 0.1),0 1px 2px -1px rgb(0 0 0 / 0.1);--sc-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);--sc-shadow-lg:0 10px 15px 0px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);--sc-shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);--sc-shadow-2xl:0 25px 50px -12px rgb(0 0 0 / 0.25);--sc-border-width:max(1px, 0.12rem);--sc-border-color:var(--sc-base-200);--sc-form-height:2.5em;--sc-form-border-width:var(--sc-border-width);--sc-input-bg:var(--sc-base-100);--sc-input-border-color:var(--sc-input-bg);--sc-input-rounded-intensity:1.4;--sc-input-rounded:calc(
109
109
  (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
110
110
  var(--sc-input-rounded-intensity)
111
- );--sc-label-font-weight:500;--sc-contrast-content:#fff;--sc-contrast:#11151f;--sc-scrollbar-bg:var(--sc-base-400);--sc-body-bg:var(--sc-base)}`,Wi=T`:host{--sc-primary:var(--sc-base-800);--sc-info:#2563eb;--sc-danger:#f43f5e;--sc-warning:#f97316;--sc-success:#14b8a6;--sc-primary-content:var(--sc-base);--sc-info-content:var(--sc-base);--sc-danger-content:var(--sc-base);--sc-warning-content:var(--sc-base);--sc-success-content:var(--sc-base);--sc-base:#fff;--sc-base-50:#f8fafc;--sc-base-100:#f1f5f9;--sc-base-200:#e2e8f0;--sc-base-300:#cbd5e1;--sc-base-400:#94a3b8;--sc-base-500:#64748b;--sc-base-600:#475569;--sc-base-700:#334155;--sc-base-800:#1e293b;--sc-base-900:#0f172a;--sc-base-content:var(--sc-base-700);--sc-input-bg:var(--sc-base-100);--sc-input-color:var(--sc-base-content)}`,Ki=T``,Zi=T`:host([theme=dark]){${Ki}}@media (prefers-color-scheme:dark){:host([theme=auto]){${Ki}}}`;var Yi=Object.defineProperty,Qi=Object.getOwnPropertyDescriptor,Gi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yi(e,s,o),o};let Ji=class extends Nt{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),this.postCSSVars()}postCSSVars(){var t;const e=document.styleSheets,s=e.length,i=[];for(let o=0;o<s;o++){const t=e[o];t.href&&(t.href.includes("googleapis")||t.href.includes("typekit.net"))&&i.push(t.href)}const r={variables:this.getCssVariables(),fonts:i};null==(t=ce.get("sonic-theme"))||t.set(r),document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",...r},"*")}))}receiveMessage(t){const e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){const t=[],e=[...Ji.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(const o of e)try{if(!o)continue;const e=o.cssRules;for(const s of e){if(!("style"in s))continue;const e=s.style;for(const s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return bt`<slot></slot>`}};Ji.styles=[Wi,Zi,Hi,T`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base),sans-serif;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`],Gi([f({type:String,reflect:!0})],Ji.prototype,"theme",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"background",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"color",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"font",2),Ji=Gi([b("sonic-theme")],Ji);var Xi=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,er=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xi(e,s,o),o};let sr=class extends Nt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return bt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};sr.styles=[me,T`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-200, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:0.85em;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([contrast]){--sc-badge-color:var(--sc-contrast-content);--sc-badge-bg:var(--sc-contrast)}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`],er([f({type:String,reflect:!0})],sr.prototype,"type",2),er([f({type:String,reflect:!0})],sr.prototype,"variant",2),er([f({type:String,reflect:!0})],sr.prototype,"size",2),er([f({type:Boolean,reflect:!0})],sr.prototype,"ellipsis",2),sr=er([b("sonic-badge")],sr);var ir=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,or=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ir(e,s,o),o};let nr=class extends Nt{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,Bt.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(Bt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){Bt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,class{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),Bt.changeFromComponent(this)}render(){return this.href?bt`<a href="${this.href}" target="${be(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:bt`<slot></slot>`}};nr.styles=[T`a{color:inherit;text-decoration:none;display:contents}`],or([f({type:String})],nr.prototype,"href",2),or([f({type:String})],nr.prototype,"autoActive",2),or([f({type:String})],nr.prototype,"target",1),or([f({type:Boolean})],nr.prototype,"pushState",2),nr=or([b("sonic-link")],nr);var ar=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,cr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?lr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ar(e,s,o),o};let hr=class extends Nt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return bt`<progress value="${be(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};hr.styles=[me,T`:host{--sc-progress-bg:var(--sc-input-bg, var(--sc-base-100, #f5f5f5));--sc-progress-color:var(--sc-base-content, #1f2937);--sc-progress-height:0.6em;--sc-progress-fs:var(--sc-fs, 1rem);--sc-progress-fw:500;--sc-progress-rounded:var(--sc-rounded-lg);display:block;line-height:1.2;font-weight:var(--sc-progress-fw);font-size:var(--sc-progress-fs)}progress{position:relative;width:100%;-webkit-appearance:none;appearance:none;overflow:hidden;border:none;height:var(--sc-progress-height);border-radius:var(--sc-progress-rounded);background-color:var(--sc-progress-bg);color:var(--sc-progress-color)}progress::-moz-progress-bar{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:not([value])::-moz-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-value{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:indeterminate:after{background-color:var(--sc-progress-color);content:"";position:absolute;top:0;bottom:0;left:-40%;width:33.333333%;border-radius:var(--sc-progress-rounded);animation:progress-loading 3s infinite ease-in-out}@keyframes progress-loading{50%{left:107%}}:host([type=warning]){--sc-progress-color:var(--sc-warning)}:host([type=danger]){--sc-progress-color:var(--sc-danger)}:host([type=info]){--sc-progress-color:var(--sc-info)}:host([type=success]){--sc-progress-color:var(--sc-success)}:host([invert]){--sc-progress-bg:rgba(200, 200, 200, 0.1)}:host([type=default][invert]){--sc-progress-color:var(--sc-base)}slot[name=remaining]{font-weight:var(--sc-font-weight-base);font-size:.85em;margin-top:.5em}slot[name=remaining]::slotted(*){margin-left:auto}slot:not([name]){color:var(--sc-progress-color)}.slot-container{display:flex;justify-content:space-between;gap:.5em;margin-top:.15em}`],cr([f({type:Number})],hr.prototype,"value",2),cr([f({type:Number})],hr.prototype,"max",2),cr([f({type:Boolean})],hr.prototype,"invert",2),cr([f({type:String,reflect:!0})],hr.prototype,"type",2),cr([f({type:String,reflect:!0})],hr.prototype,"size",2),hr=cr([b("sonic-progress")],hr);const dr=T`.password-toggle{color:var(--sc-input-c);font-size:var(--sc-input-fs);cursor:pointer;margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-suffix .password-toggle{margin-right:0}`,pr=T`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`,ur=T`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`,gr=T`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([inlineContent]) .no-prefix slot[name=prefix],:host([inlineContent]) .no-suffix slot[name=suffix]{display:none}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`
111
+ );--sc-label-font-weight:500;--sc-contrast-content:#fff;--sc-contrast:#11151f;--sc-scrollbar-bg:var(--sc-base-400);--sc-body-bg:var(--sc-base)}`,Wi=T`:host{--sc-primary:var(--sc-base-800);--sc-info:#2563eb;--sc-danger:#f43f5e;--sc-warning:#f97316;--sc-success:#14b8a6;--sc-primary-content:var(--sc-base);--sc-info-content:var(--sc-base);--sc-danger-content:var(--sc-base);--sc-warning-content:var(--sc-base);--sc-success-content:var(--sc-base);--sc-base:#fff;--sc-base-50:#f8fafc;--sc-base-100:#f1f5f9;--sc-base-200:#e2e8f0;--sc-base-300:#cbd5e1;--sc-base-400:#94a3b8;--sc-base-500:#64748b;--sc-base-600:#475569;--sc-base-700:#334155;--sc-base-800:#1e293b;--sc-base-900:#0f172a;--sc-base-content:var(--sc-base-700);--sc-input-bg:var(--sc-base-100);--sc-input-color:var(--sc-base-content)}`,Ki=T``,Zi=T`:host([theme=dark]){${Ki}}@media (prefers-color-scheme:dark){:host([theme=auto]){${Ki}}}`;var Qi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor,Gi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qi(e,s,o),o};let Ji=class extends Nt{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),this.postCSSVars()}postCSSVars(){var t;const e=document.styleSheets,s=e.length,i=[];for(let o=0;o<s;o++){const t=e[o];t.href&&(t.href.includes("googleapis")||t.href.includes("typekit.net"))&&i.push(t.href)}const r={variables:this.getCssVariables(),fonts:i};null==(t=ce.get("sonic-theme"))||t.set(r),document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",...r},"*")}))}receiveMessage(t){const e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){const t=[],e=[...Ji.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(const o of e)try{if(!o)continue;const e=o.cssRules;for(const s of e){if(!("style"in s))continue;const e=s.style;for(const s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return bt`<slot></slot>`}};Ji.styles=[Wi,Zi,Hi,T`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base),sans-serif;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`],Gi([f({type:String,reflect:!0})],Ji.prototype,"theme",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"background",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"color",2),Gi([f({type:Boolean,reflect:!0})],Ji.prototype,"font",2),Ji=Gi([b("sonic-theme")],Ji);var Xi=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,er=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Xi(e,s,o),o};let sr=class extends Nt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return bt`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};sr.styles=[me,T`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-100, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:0.85em;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([contrast]){--sc-badge-color:var(--sc-contrast-content);--sc-badge-bg:var(--sc-contrast)}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`],er([f({type:String,reflect:!0})],sr.prototype,"type",2),er([f({type:String,reflect:!0})],sr.prototype,"variant",2),er([f({type:String,reflect:!0})],sr.prototype,"size",2),er([f({type:Boolean,reflect:!0})],sr.prototype,"ellipsis",2),sr=er([b("sonic-badge")],sr);var ir=Object.defineProperty,rr=Object.getOwnPropertyDescriptor,or=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ir(e,s,o),o};let nr=class extends Nt{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,qt.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(qt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){qt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,class{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),qt.changeFromComponent(this)}render(){return this.href?bt`<a href="${this.href}" target="${be(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:bt`<slot></slot>`}};nr.styles=[T`a{color:inherit;text-decoration:none;display:contents}`],or([f({type:String})],nr.prototype,"href",2),or([f({type:String})],nr.prototype,"autoActive",2),or([f({type:String})],nr.prototype,"target",1),or([f({type:Boolean})],nr.prototype,"pushState",2),nr=or([b("sonic-link")],nr);var ar=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,cr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?lr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ar(e,s,o),o};let hr=class extends Nt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return bt`<progress value="${be(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};hr.styles=[me,T`:host{--sc-progress-bg:var(--sc-input-bg, var(--sc-base-100, #f5f5f5));--sc-progress-color:var(--sc-base-content, #1f2937);--sc-progress-height:0.6em;--sc-progress-fs:var(--sc-fs, 1rem);--sc-progress-fw:500;--sc-progress-rounded:var(--sc-rounded-lg);display:block;line-height:1.2;font-weight:var(--sc-progress-fw);font-size:var(--sc-progress-fs)}progress{position:relative;width:100%;-webkit-appearance:none;appearance:none;overflow:hidden;border:none;height:var(--sc-progress-height);border-radius:var(--sc-progress-rounded);background-color:var(--sc-progress-bg);color:var(--sc-progress-color)}progress::-moz-progress-bar{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:not([value])::-moz-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-value{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:indeterminate:after{background-color:var(--sc-progress-color);content:"";position:absolute;top:0;bottom:0;left:-40%;width:33.333333%;border-radius:var(--sc-progress-rounded);animation:progress-loading 3s infinite ease-in-out}@keyframes progress-loading{50%{left:107%}}:host([type=warning]){--sc-progress-color:var(--sc-warning)}:host([type=danger]){--sc-progress-color:var(--sc-danger)}:host([type=info]){--sc-progress-color:var(--sc-info)}:host([type=success]){--sc-progress-color:var(--sc-success)}:host([invert]){--sc-progress-bg:rgba(200, 200, 200, 0.1)}:host([type=default][invert]){--sc-progress-color:var(--sc-base)}slot[name=remaining]{font-weight:var(--sc-font-weight-base);font-size:.85em;margin-top:.5em}slot[name=remaining]::slotted(*){margin-left:auto}slot:not([name]){color:var(--sc-progress-color)}.slot-container{display:flex;justify-content:space-between;gap:.5em;margin-top:.15em}`],cr([f({type:Number})],hr.prototype,"value",2),cr([f({type:Number})],hr.prototype,"max",2),cr([f({type:Boolean})],hr.prototype,"invert",2),cr([f({type:String,reflect:!0})],hr.prototype,"type",2),cr([f({type:String,reflect:!0})],hr.prototype,"size",2),hr=cr([b("sonic-progress")],hr);const dr=T`.password-toggle{color:var(--sc-input-c);font-size:var(--sc-input-fs);cursor:pointer;margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-suffix .password-toggle{margin-right:0}`,pr=T`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`,ur=T`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`,gr=T`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%;white-space:nowrap}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([inlineContent]) .no-prefix slot[name=prefix],:host([inlineContent]) .no-suffix slot[name=suffix]{display:none}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`
112
112
  /**
113
113
  * @license
114
114
  * Copyright 2018 Google LLC
115
115
  * SPDX-License-Identifier: BSD-3-Clause
116
- */,br=Wt(class extends Kt{constructor(t){var e;if(super(t),t.type!==qt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const o in e){const t=!!e[o];t===this.nt.has(o)||(null===(i=this.st)||void 0===i?void 0:i.has(o))||(t?(r.add(o),this.nt.add(o)):(r.remove(o),this.nt.delete(o)))}return mt}});var mr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,vr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mr(e,s,o),o};let yr=class extends(Si(Xt(L(Nt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text",console.log(this.isPassword)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return bt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${br(t)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${be(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${be(this.list)}" tabindex="${be(this.tabindex)}" pattern="${be(this.pattern)}" min="${be(this.min)}" max="${be(this.max)}" step="${be(this.step)}" src="${be(this.src)}" minlength="${be(this.minlength)}" maxlength="${be(this.maxlength)}" placeholder="${be(this.placeholder)}" required="${be(this.required)}" autocomplete="${be(this.autocomplete)}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"> ${this.showPasswordToggle?bt`<sonic-button shape="circle" class="password-toggle" @click="${this.togglePasswordVisibility}" aria-label="Toggle password visibility" variant="unstyled"><sonic-icon library="heroicons" name="${this.isPassword?"eye":"eye-slash"}"></sonic-icon></sonic-button>`:""}<slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot><slot name="list"></slot>`}};yr.styles=[me,gr,pr,ur,dr,T`:host([type=hidden]){appearance:none!important;display:none!important}:host>.form-control{position:relative}`],vr([f({type:String,reflect:!0})],yr.prototype,"size",2),vr([f({type:String})],yr.prototype,"list",2),vr([f({type:String})],yr.prototype,"placeholder",2),vr([f({type:String})],yr.prototype,"pattern",2),vr([f({type:String})],yr.prototype,"min",2),vr([f({type:String})],yr.prototype,"max",2),vr([f({type:Boolean})],yr.prototype,"readonly",2),vr([f({type:Number})],yr.prototype,"step",2),vr([f({type:Number})],yr.prototype,"minlength",2),vr([f({type:Number})],yr.prototype,"maxlength",2),vr([f({type:String})],yr.prototype,"src",2),vr([f({type:Boolean,reflect:!0})],yr.prototype,"inlineContent",2),vr([f({type:Boolean})],yr.prototype,"disableInlineContentFocus",2),vr([f({type:Boolean})],yr.prototype,"showPasswordToggle",2),vr([A({slot:"label"})],yr.prototype,"slotLabelNodes",2),vr([A({slot:"description"})],yr.prototype,"slotDescriptionNodes",2),vr([A({slot:"suffix"})],yr.prototype,"slotSuffixNodes",2),vr([A({slot:"prefix"})],yr.prototype,"slotPrefixNodes",2),vr([w("input")],yr.prototype,"input",2),vr([v()],yr.prototype,"hasDescription",2),vr([v()],yr.prototype,"hasLabel",2),vr([v()],yr.prototype,"hasSuffix",2),vr([v()],yr.prototype,"hasPrefix",2),vr([v()],yr.prototype,"isPassword",2),yr=vr([b("sonic-input")],yr);var wr=Object.defineProperty,xr=Object.getOwnPropertyDescriptor,_r=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wr(e,s,o),o};let kr=class extends Nt{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver((()=>this.computePosition(this.placement)))}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame((()=>this.runPositioningLoop())))}_toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(t){const s=t.composedPath(),i=s[0];kr.pops.forEach((r=>{const o=s.includes(r),n=s.includes(r.querySelector('[slot="content"]')),a="keep"===e.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r._hide()}))}connectedCallback(){super.connectedCallback(),0==kr.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),kr.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){super.disconnectedCallback(),kr.pops.delete(this),0==kr.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop)),this.resizeObserver.unobserve(this.popContent)}computePosition(t){var e,s,i;let r=null==(e=this.popContent)?void 0:e.getBoundingClientRect();const o=this.getBoundingClientRect(),n=o.left,a=o.top;let l=n,c=a;const h=a-r.height-8,d=n-r.width-8,p=n+o.width+8,u=a+o.height+8;switch(t){case"bottom":c=u;break;case"top":c=h;break;case"left":l=d;break;case"right":l=p}this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(s=this.popContent)?void 0:s.getBoundingClientRect(),r.x<5&&"left"==t&&(l=p),r.y<5&&"top"==t&&(c=u),r.x+r.width>window.innerWidth-5&&"right"==t&&(l=d),r.y+r.height>window.innerHeight-5&&"bottom"==t&&(c=h),this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(i=this.popContent)?void 0:i.getBoundingClientRect(),r.x<0&&(this.lastContentX+=-r.x),r.y<0&&(this.lastContentY+=-r.y),r.x+r.width>window.innerWidth&&(this.lastContentX+=window.innerWidth-(r.x+r.width)),r.y+r.height>window.innerHeight&&(this.lastContentY+=window.innerHeight-(r.y+r.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return bt`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" style="display:none" class="${this.open?"is-open":""}"></slot>`}};kr.pops=new Set,kr.styles=[T`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open:not(.is-empty){transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`],_r([v()],kr.prototype,"open",2),_r([w("slot:not([name=content])")],kr.prototype,"popBtn",2),_r([w("slot[name=content]")],kr.prototype,"popContent",2),_r([f({type:Boolean})],kr.prototype,"noToggle",2),_r([f({type:Boolean,reflect:!0})],kr.prototype,"inline",2),_r([f({type:String,reflect:!0})],kr.prototype,"shadow",2),_r([f({type:String})],kr.prototype,"placement",2),kr=_r([b("sonic-pop")],kr);var Ar=Object.defineProperty,Cr=Object.getOwnPropertyDescriptor;let Pr=class extends we{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Pr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Cr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ar(e,s,o),o})([b("sonic-menu-item")],Pr);var Sr=Object.defineProperty,$r=Object.getOwnPropertyDescriptor,Or=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?$r(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Sr(e,s,o),o};let Lr=class extends(Ei(ji(Nt))){constructor(){super(...arguments),this._name="",this.forceAutoFill=!1,this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.value="",this.formDataProvider=""}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback()}render(){return bt`<sonic-pop noToggle style="display:block"><sonic-input type="search" data-keyboard-nav="nav-autocomplete" label="${be(this.label)}" description="${be(this.description)}" name="${be(this.name)}" value="${be(this.value)}" autocomplete="off" clearable></sonic-input><sonic-menu slot="content"><sonic-queue filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.formDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue></sonic-menu></sonic-pop>`}};Lr.styles=[T`:host{display:block}`],Or([f()],Lr.prototype,"name",1),Or([f()],Lr.prototype,"forceAutoFill",2),Or([f()],Lr.prototype,"description",1),Or([f()],Lr.prototype,"label",1),Or([f({type:String})],Lr.prototype,"placeholder",2),Or([f()],Lr.prototype,"filteredFields",2),Or([f({type:Boolean})],Lr.prototype,"readonly",2),Or([f({type:String})],Lr.prototype,"dataProviderExpression",2),Or([f({type:String})],Lr.prototype,"key",2),Or([f({type:String})],Lr.prototype,"value",2),Lr=Or([b("sonic-input-autocomplete")],Lr);var Dr=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Er=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Dr(e,s,o),o};let Mr=class extends(ji(Nt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ce.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ce.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?bt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:bt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?ft:bt`<div>${this.wording_password_helper_decription}</div><div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div><div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div><div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div><div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div><div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>`}};Er([f()],Mr.prototype,"name",2),Er([f()],Mr.prototype,"minChars",2),Er([v()],Mr.prototype,"hasNoChar",2),Er([v()],Mr.prototype,"hasEnoughChars",2),Er([v()],Mr.prototype,"hasMinuscule",2),Er([v()],Mr.prototype,"hasMajuscule",2),Er([v()],Mr.prototype,"hasNumber",2),Er([v()],Mr.prototype,"hasSpecialChar",2),Er([f()],Mr.prototype,"wording_password_helper_decription",2),Er([f()],Mr.prototype,"wording_password_helper_min_length",2),Er([f()],Mr.prototype,"wording_password_helper_lower_case",2),Er([f()],Mr.prototype,"wording_password_helper_upper_case",2),Er([f()],Mr.prototype,"wording_password_helper_number",2),Er([f()],Mr.prototype,"wording_password_helper_special_char",2),Mr=Er([b("sonic-password-helper")],Mr);var zr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,Ir=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Nr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zr(e,s,o),o};let Fr=class extends(ji(Nt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ce.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ce.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?ft:bt`<span>${this.areEqual?rs(this.descriptionWhenEqual):rs(this.descriptionWhenNotEqual)}</span>`}};Ir([f()],Fr.prototype,"name",2),Ir([f()],Fr.prototype,"sameValueAs",2),Ir([f()],Fr.prototype,"descriptionWhenEqual",2),Ir([f()],Fr.prototype,"descriptionWhenNotEqual",2),Ir([v()],Fr.prototype,"areEqual",2),Ir([v()],Fr.prototype,"hasNoChar",2),Fr=Ir([b("sonic-same-value-helper")],Fr);var Tr=Object.defineProperty,Rr=Object.getOwnPropertyDescriptor,Ur=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Tr(e,s,o),o};let Vr=class extends(ge(Si(Xt(L(Nt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return bt`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" ?data-indeterminate="${this.showAsIndeterminate}" .disabled="${be(this.disabled)}" .checked="${be(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}"><sonic-icon name="${"indeterminate"==this.checked||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">${this.label?rs(this.label):""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot></div></label>`}};Vr.styles=[me,T`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked],input[data-indeterminate]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon,input[data-indeterminate]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`],Ur([f({type:Boolean,reflect:!0})],Vr.prototype,"touched",2),Ur([f({type:String})],Vr.prototype,"iconName",2),Ur([f({type:String})],Vr.prototype,"indeterminateIconName",2),Ur([f({type:Boolean})],Vr.prototype,"showAsIndeterminate",2),Ur([f({type:Boolean})],Vr.prototype,"hasDescription",2),Ur([f({type:Boolean})],Vr.prototype,"hasLabel",2),Ur([A()],Vr.prototype,"slotLabelNodes",2),Ur([A({slot:"description"})],Vr.prototype,"slotDescriptionNodes",2),Vr=Ur([b("sonic-checkbox")],Vr);var Br=Object.defineProperty,qr=Object.getOwnPropertyDescriptor;let Hr=class extends Vr{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};Hr.styles=[Vr.styles,T`:host input{border-radius:50%}:host sonic-icon{border-radius:50%;overflow:hidden;background-color:var(--sc-primary-content);line-height:0;display:block;font-size:1em;height:.6em;width:.6em}`],Hr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Br(e,s,o),o})([b("sonic-radio")],Hr);var Wr=Object.defineProperty,Kr=Object.getOwnPropertyDescriptor,Zr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Kr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wr(e,s,o),o};let Yr=class extends(Xt(L(Nt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(){this.hasDoneFirstUpdate=!0}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){const t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps();const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return bt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${br(t)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${be(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}">${Me(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey];return bt`<option ?selected="${e}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot>`}};Yr.styles=[me,gr,pr,ur,T`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}@supports selector(:has(*)){:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}@supports not selector(:has(*)){:host(:not([disabled])) .form-element{padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem var(--sc-input-px);color:var(--sc-base-content);background:var(--sc-base)}select[multiple] option{background:0 0;padding:0}`],Zr([f({type:String})],Yr.prototype,"valueKey",2),Zr([f({type:String})],Yr.prototype,"wordingKey",2),Zr([f({type:Boolean})],Yr.prototype,"multiple",2),Zr([f({type:String,reflect:!0})],Yr.prototype,"size",2),Zr([f({type:Number})],Yr.prototype,"selectSize",2),Zr([f({type:Array})],Yr.prototype,"options",1),Zr([f({reflect:!0})],Yr.prototype,"value",1),Zr([f({type:Boolean})],Yr.prototype,"forceAutoFill",2),Zr([f()],Yr.prototype,"description",1),Zr([f()],Yr.prototype,"label",1),Zr([A({slot:"label"})],Yr.prototype,"slotLabelNodes",2),Zr([A({slot:"description"})],Yr.prototype,"slotDescriptionNodes",2),Zr([A({slot:"suffix"})],Yr.prototype,"slotSuffixNodes",2),Zr([A({slot:"prefix"})],Yr.prototype,"slotPrefixNodes",2),Zr([v()],Yr.prototype,"hasDescription",2),Zr([v()],Yr.prototype,"hasLabel",2),Zr([v()],Yr.prototype,"hasSuffix",2),Zr([v()],Yr.prototype,"hasPrefix",2),Yr=Zr([b("sonic-select")],Yr);var Qr=Object.defineProperty,Gr=Object.getOwnPropertyDescriptor,Jr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Gr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qr(e,s,o),o};let Xr=class extends(Si(Xt(L(Nt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){return bt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${be(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${be(this.rows)}" cols="${be(this.cols)}" maxlength="${be(this.maxlength)}" minlength="${be(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${be(this.spellcheck)}" autocomplete="${be(this.autocomplete)}" tabindex="${be(this.tabindex)}" wrap="${be(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}">
117
- ${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot>`}};Xr.styles=[me,gr,pr,ur,gs,T`textarea{font-size:inherit}`],Jr([f({type:String})],Xr.prototype,"size",2),Jr([f({type:Number})],Xr.prototype,"rows",2),Jr([f({type:Number})],Xr.prototype,"cols",2),Jr([f({type:Number})],Xr.prototype,"maxlength",2),Jr([f({type:Number})],Xr.prototype,"minlength",2),Jr([f({type:String})],Xr.prototype,"wrap",2),Jr([f({type:Boolean})],Xr.prototype,"readonly",2),Jr([f({type:String})],Xr.prototype,"placeholder",2),Jr([A({slot:"label"})],Xr.prototype,"slotLabelNodes",2),Jr([A({slot:"description"})],Xr.prototype,"slotDescriptionNodes",2),Jr([v()],Xr.prototype,"hasDescription",2),Jr([v()],Xr.prototype,"hasLabel",2),Xr=Jr([b("sonic-textarea")],Xr);var to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor;let so=class extends Nt{render(){return bt`<slot></slot>`}};so.styles=[T`:host{color:var(--sc-neutral-500);font-size:1.25rem;line-height:1.2;display:block;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base);margin-top:.25em}`],so=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?eo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&to(e,s,o),o})([b("sonic-legend-description")],so);var io=Object.defineProperty,ro=Object.getOwnPropertyDescriptor,oo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ro(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&io(e,s,o),o};let no=class extends Nt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return bt`<legend part="legend">${this.iconName?bt`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${be(this.iconPrefix)}" library="${be(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${rs(this.label?this.label:"")} ${this.description?bt`<sonic-legend-description>${rs(this.description)}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};no.styles=[T`:host{--sc-legend-font-size:1.5rem;--sc-legend-font-weight:var(--sc-font-weight-base);--sc-legend-font-style:var(--sc-headings-font-style);--sc-legend-family:var(--sc-headings-font-family);--sc-legend-line-height:var(--sc-headings-line-height);--sc-legend-color:var(--sc-base-content);display:flex;width:100%}legend{font-size:var(--sc-legend-font-size);font-weight:var(--sc-legend-font-weight);font-style:var(--sc-legend-font-style);font-family:var(--sc-legend-font-family);line-height:var(--sc-legend-line-height);color:var(--sc-legend-color);padding:0;display:flex;width:100%;align-items:flex-start;gap:.5em}slot[name=suffix]{display:block;margin-left:auto;flex-shrink:0}.legend-content{flex-grow:1}`],oo([f({type:Boolean})],no.prototype,"forceAutoFill",2),oo([f()],no.prototype,"description",1),oo([f()],no.prototype,"label",1),oo([f({type:String})],no.prototype,"iconName",2),oo([f({type:String})],no.prototype,"iconLibrary",2),oo([f({type:String})],no.prototype,"iconPrefix",2),no=oo([b("sonic-legend")],no);var ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,co=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?lo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ao(e,s,o),o};let ho=class extends(L(Nt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return bt`<fieldset form="${be(this.form)}" ?disabled="${this.disabled}">${this.label?bt`<sonic-legend label="${be(this.label)}" description="${be(this.description)}" iconName="${be(this.iconName)}" iconPrefix="${be(this.iconPrefix)}" iconLibrary="${be(this.iconLibrary)}"></sonic-legend>`:ft}<slot></slot></fieldset>`}};ho.styles=[T`:host{--sc-fieldset-mt:0;--sc-fieldset-mb:1rem;--sc-fieldset-border-color:var(--sc-border-color);--sc-fieldset-border-width:var(--sc-form-border-width);margin-top:var(--sc-fieldset-mt);margin-bottom:var(--sc-fieldset-mb);display:block;border:var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color)!important;padding:1.8rem 1.25rem;border-radius:var(--sc-rounded-lg)}fieldset{all:unset;display:contents}:host([variant=ghost]),:host([variant=shadow]){--sc-fieldset-border-color:transparent}:host([variant=shadow]){--sc-fieldset-border-color:transparent;box-shadow:var(--sc-shadow-lg)}::slotted(sonic-legend),sonic-legend{margin-bottom:1.5rem;display:block}::slotted(sonic-legend:last-child){margin-bottom:0}`],co([f({type:Boolean,reflect:!0})],ho.prototype,"disabled",2),co([f({type:String})],ho.prototype,"form",2),co([f({type:String})],ho.prototype,"label",2),co([f({type:String})],ho.prototype,"description",2),co([f({type:String})],ho.prototype,"iconName",2),co([f({type:String})],ho.prototype,"iconLibrary",2),co([f({type:String})],ho.prototype,"iconPrefix",2),co([f({type:String,reflect:!0})],ho.prototype,"variant",2),ho=co([b("sonic-fieldset")],ho);class po{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=s,this.o=null!=r?r:this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var uo=Object.defineProperty,go=Object.getOwnPropertyDescriptor,bo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&uo(e,s,o),o};let mo=class extends(L(Nt)){constructor(){super(...arguments),this._resizeController=new po(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return bt`<div class="${br(t)}"><slot @slotchange="${this.onSlotChange}"></slot></div>`}};mo.styles=[T`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`],bo([k({flatten:!0})],mo.prototype,"slottedElements",2),bo([f({type:Boolean})],mo.prototype,"oneFormElement",2),mo=bo([b("sonic-form-layout")],mo);var fo=Object.defineProperty,vo=Object.getOwnPropertyDescriptor,yo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fo(e,s,o),o};let wo=class extends Nt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return bt`<slot style="${Zt(t)}"></slot>`}};wo.styles=[T`:host{display:block}slot{display:flex;flex-wrap:wrap;gap:.3rem}`],yo([f({type:String})],wo.prototype,"direction",2),yo([f({type:String})],wo.prototype,"justify",2),wo=yo([b("sonic-form-actions")],wo);var xo=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,ko=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?_o(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xo(e,s,o),o};let Ao=class extends Nt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){const t={alignItems:this.alignItems};return bt`<span class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${Zt(t)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot>`}};Ao.styles=[me,pr,ur,T`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}::slotted(sonic-button),::slotted(sonic-input),::slotted(sonic-select){flex-grow:1}`],ko([f({type:String})],Ao.prototype,"alignItems",2),ko([f({type:String})],Ao.prototype,"label",2),ko([f({type:String})],Ao.prototype,"description",2),ko([A({slot:"label"})],Ao.prototype,"slotLabelNodes",2),ko([A({slot:"description"})],Ao.prototype,"slotDescriptionNodes",2),ko([v()],Ao.prototype,"hasDescription",2),ko([v()],Ao.prototype,"hasLabel",2),Ao=ko([b("sonic-group")],Ao);var Co=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,So=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Po(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Co(e,s,o),o};let $o=class extends Nt{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(){var t;if(this.transition){const e=null==(t=this.shadowRoot)?void 0:t.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return bt`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${Zt(t)}"></picture></div>`}};$o.styles=[T`:host{--sc-img-radius:0;--sc-img-bg:var(--sc-placeholder-bg);border-radius:var(--sc-img-radius);display:block;width:100%;background:var(--sc-img-bg)}img{width:100%;vertical-align:middle;object-fit:cover}img[src=""]{visibility:hidden}:host([rounded]){--sc-img-radius:var(--sc-rounded);overflow:hidden}:host([rounded=sm]){--sc-img-radius:var(--sc-rounded-sm)}:host([rounded=md]){--sc-img-radius:var(--sc-rounded-md)}:host([rounded=lg]){--sc-img-radius:var(--sc-rounded-lg)}:host([rounded=xl]){--sc-img-radius:var(--sc-rounded-xl)}:host([rounded=full]){--sc-img-radius:50%!important}:host([rounded=none]){--sc-img-radius:0!important}:host([cover]),:host([cover]) img,:host([cover])>div{position:absolute!important;left:0!important;top:0!important;right:0!important;bottom:0!important;height:100%!important;width:100%!important}:host([transition]) img{opacity:0;transition:.25s}:host([transition=fade-scale-out]) img{scale:1.08;transition:opacity .3s linear,scale .3s cubic-bezier(.16,1,.3,1)}:host([transition]) img.loaded{opacity:1;scale:1}`],So([f({type:String})],$o.prototype,"rounded",2),So([f({type:String})],$o.prototype,"src",2),So([f({type:String})],$o.prototype,"alt",2),So([f({type:String})],$o.prototype,"loading",2),So([f({type:String,reflect:!0})],$o.prototype,"transition",2),So([f({type:String})],$o.prototype,"ratio",2),So([f({type:String})],$o.prototype,"objectPosition",2),So([f({type:String})],$o.prototype,"imageRendering",2),So([f({type:Boolean,reflect:!0})],$o.prototype,"cover",2),$o=So([b("sonic-image")],$o);var Oo=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Do=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Lo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Oo(e,s,o),o};let jo=class extends Nt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){let t,e,s=!1;this.scrollable&&(this.addEventListener("mousedown",(i=>{s=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft})),this.addEventListener("mouseleave",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mouseup",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mousemove",(i=>{if(!s)return;i.preventDefault();const r=1.5*(i.pageX-this.offsetLeft-t);this.scrollLeft=e-r,this.setScrollShadow(this,this.direction)})),this.addEventListener("scroll",(t=>{t.preventDefault(),this.setScrollShadow(this,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return bt`<menu part="menu" class="shadowable" style="${Zt(t)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${Zt(s)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${Zt(i)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${e?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};jo.styles=[T`:host{display:block;--sc-menu-gap:0.15rem}:host>menu{display:flex;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em);margin:0;padding:.35em}.hidden{display:none!important}:host([shadow=md]) .shadowable,:host([shadow=true]) .shadowable,:host([shadow]) .shadowable{box-shadow:var(--sc-shadow)}:host([shadow=sm]) .shadowable{box-shadow:var(--sc-shadow-sm)}:host([shadow=lg]) .shadowable{box-shadow:var(--sc-shadow-lg)}:host([shadow=none]) .shadowable{box-shadow:none}:host([scrollable]){scrollbar-width:none;-ms-overflow-style:none}:host([scrollable]) menu>*{scroll-snap-align:start;white-space:nowrap}:host([scrollable][direction=row]){overflow-x:scroll;scroll-snap-type:x mandatory}:host([scrollable][direction=column]){overflow-y:scroll;scroll-snap-type:y mandatory}:host([scrollable])::-webkit-scrollbar{display:none!important}:host([scrollable][direction=row].shadow-right){-webkit-mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left.shadow-right){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}:host([scrollable][direction=column].shadow-top){-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-top.shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}`],Do([f({type:String,reflect:!0})],jo.prototype,"size",2),Do([f({type:String,reflect:!0})],jo.prototype,"direction",2),Do([f({type:String})],jo.prototype,"gap",2),Do([f({type:String,reflect:!0})],jo.prototype,"align",2),Do([f({type:String,reflect:!0})],jo.prototype,"shadow",2),Do([f({type:String})],jo.prototype,"moreShape",2),Do([f({type:Boolean})],jo.prototype,"scrollable",2),Do([f({type:String})],jo.prototype,"minWidth",2),Do([w("menu")],jo.prototype,"menu",2),Do([k({selector:"sonic-menu-item"})],jo.prototype,"menuChildren",2),Do([k({slot:"more",selector:"*"})],jo.prototype,"moreElements",2),Do([v()],jo.prototype,"hasMoreElements",2),jo=Do([b("sonic-menu")],jo);var Eo=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Eo(e,s,o),o};let No=class extends Nt{firstUpdated(){var t;null==(t=this.buttons)||t.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))}))}render(){return bt`<slot></slot>`}};No.styles=[T`:host{display:flex;gap:.5rem;margin-top:auto;padding-top:1.5rem}`],zo([k({selector:"sonic-button"})],No.prototype,"buttons",2),No=zo([b("sonic-modal-actions")],No);var Io=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,To=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Io(e,s,o),o};let Ro=class extends Nt{render(){return bt`<sonic-button reset="${be(this.reset)}" shape="circle" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};Ro.styles=[T`:host{position:sticky;display:block;align-self:flex-end;height:0;top:.5rem;right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`],To([f()],Ro.prototype,"reset",2),Ro=To([b("sonic-modal-close")],Ro);var Uo=Object.defineProperty,Vo=Object.getOwnPropertyDescriptor;let Bo=class extends Nt{render(){return bt`<slot></slot>`}};Bo.styles=[T`:host{display:block;width:100%}`],Bo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Uo(e,s,o),o})([b("sonic-modal-content")],Bo);var qo=Object.defineProperty,Ho=Object.getOwnPropertyDescriptor;let Wo=class extends Nt{render(){return bt`<slot></slot>`}};Wo.styles=[T`:host{font-size:1.1rem;display:block;line-height:1.1rem;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family);font-weight:var(--sc-headings-font-weight)}`],Wo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ho(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qo(e,s,o),o})([b("sonic-modal-subtitle")],Wo);var Ko=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor;let Yo=class extends Nt{render(){return bt`<slot></slot>`}};Yo.styles=[T`:host{font-weight:700;font-size:1.5rem;display:block;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family)}`],Yo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ko(e,s,o),o})([b("sonic-modal-title")],Yo);var Qo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Jo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qo(e,s,o),o};const Xo="sonic-modal";let tn=class extends(L(Nt)){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(Xo);!0===t.removeOnHide&&e.setAttribute("removeOnHide","true"),t.maxWidth&&(e.maxWidth=null==t?void 0:t.maxWidth),t.width&&(e.width=null==t?void 0:t.width),t.paddingX&&e.style.setProperty("--sc-modal-px",null==t?void 0:t.paddingX),t.paddingY&&e.style.setProperty("--sc-modal-py",null==t?void 0:t.paddingY),t.zIndex&&e.style.setProperty("--sc-modal-z-index",null==t?void 0:t.zIndex),e.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${t.content}</sonic-modal-content>`||"";return(document.querySelector("sonic-theme")||document.body).appendChild(e),e.show(),e}connectedCallback(){super.connectedCallback(),this.handleFullsceen()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){if(0==this.visible)return ft;const t={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return bt`<div class="modal-wrapper" style="${Zt(e)}" ${es({out:Ke})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${Zt(t)}" ${es({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.forceAction?null:this.hide}" ${es({keyframeOptions:{duration:500},in:Ze,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&ce.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove()}dispose(){this.hide(),this.remove()}handleEscape(t){if("Escape"===t.key){[...document.querySelectorAll(Xo)].forEach((t=>{t.forceAction||t.hide()}))}}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};tn.styles=[gs,T`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:80vh;--sc-modal-rounded:var(--sc-rounded-lg);--sc-modal-z-index:990}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:calc(var(--sc-modal-z-index) + 1);align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:var(--sc-modal-z-index);opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important;border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`],Jo([f({type:Boolean})],tn.prototype,"forceAction",2),Jo([f({type:Boolean})],tn.prototype,"removeOnHide",2),Jo([f({type:String,reflect:!0})],tn.prototype,"align",2),Jo([f({type:String})],tn.prototype,"padding",2),Jo([f({type:String})],tn.prototype,"maxWidth",2),Jo([f({type:String})],tn.prototype,"maxHeight",2),Jo([f({type:String})],tn.prototype,"width",2),Jo([f({type:String})],tn.prototype,"height",2),Jo([f({type:String})],tn.prototype,"zIndex",2),Jo([f({type:Boolean,reflect:!0})],tn.prototype,"fullScreen",2),Jo([f({type:Boolean,reflect:!0})],tn.prototype,"visible",2),Jo([w(".modal-wrapper")],tn.prototype,"modalWrapper",2),Jo([w(".modal")],tn.prototype,"modalElement",2),Jo([k({selector:"sonic-modal-close"})],tn.prototype,"closeBtn",2),tn=Jo([b(Xo)],tn),"undefined"!=typeof window&&(window.SonicModal=tn);var en=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,rn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&en(e,s,o),o};const on={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let nn=class extends Nt{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default"}render(){return bt`<div part="alert" class="alert">${this.noIcon?ft:bt`<div>${this.status&&bt`<sonic-icon name="${on[this.status]}"></sonic-icon>`}</div>`}<div>${this.label?bt`<span class="label">${rs(this.label)}</span>`:ft}<slot>${this.text}</slot></div>${this.dismissible?bt`<sonic-button @click="${this.close}" class="close-btn" variant="unstyled" shape="circle"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`:ft}</div>`}close(){this.remove()}};nn.styles=[me,T`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert,:host([dismissible]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before,:host([dismissible]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div,:host([dismissible])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([dismissible]) .alert{padding-right:3rem}:host([dismissible]) .close-btn{padding:.5em;position:absolute;top:.25rem;right:.25rem}`],rn([f({type:String})],nn.prototype,"label",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"noIcon",2),rn([f({type:String})],nn.prototype,"text",2),rn([f({type:String,reflect:!0})],nn.prototype,"size",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"dismissible",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"background",2),rn([f({type:String,reflect:!0})],nn.prototype,"status",2),nn=rn([b("sonic-alert")],nn);var an=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,cn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ln(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&an(e,s,o),o};let hn=class extends(L(Nt)){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&ks.add({text:t.content||"",status:t.status})}))}get message(){return this._message}set message(t){var e,s;this._message=t,this.message&&!1===(null==(e=this.props)?void 0:e.success)&&((null==(s=this.props)?void 0:s.public_message)||ks.add({text:this.message,status:"error"}))}get data(){return this._data}set data(t){var e,s,i,r;this._data=t;const o={text:"Votre produit a bien été ajouté",status:"success"};Array.isArray(this.data)&&!0===(null==(e=this.props)?void 0:e.success)&&ks.add(o),""==this.data&&!0===(null==(s=this.props)?void 0:s.status)&&ks.add(o),!1===(null==(i=this.props)?void 0:i.success)&&((null==(r=this.props)?void 0:r.public_message)||ks.add({text:this.data,status:"error"}))}render(){return ft}};cn([f({type:Boolean})],hn.prototype,"success",2),cn([f({type:Boolean})],hn.prototype,"status",2),cn([f({type:Array})],hn.prototype,"messages",1),cn([f({type:String})],hn.prototype,"message",1),cn([f()],hn.prototype,"data",1),hn=cn([b("sonic-toast-message-subscriber")],hn);var dn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,un=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&dn(e,s,o),o};let gn=class extends Nt{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){const t=this.disabled||""==this.label?"disabled":"";return bt`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${t}"><slot></slot></div>`}};gn.styles=[T`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.32rem .25rem;border-radius:var(--sc-rounded);color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:18rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`],un([f({type:String})],gn.prototype,"label",2),un([f({type:String,reflect:!0})],gn.prototype,"placement",2),un([f({type:Boolean})],gn.prototype,"disabled",2),gn=un([b("sonic-tooltip")],gn);var bn=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,fn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?mn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bn(e,s,o),o};let vn=class extends Nt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1}firstUpdated(){var t,e;(this.label||(null==(t=this.slotNodes)?void 0:t.length))&&(null==(e=this.divider)||e.classList.add("has-text"))}render(){return bt`<div part="divider"><span class="text">${rs(this.label?this.label:"")}<slot></slot></span></div>`}};vn.styles=[T`:host{--sc-divider-my:0.5rem;--sc-divider-mx:0;--sc-divider-border-width:max(1px, var(--sc-border-width));--sc-divider-border-color:var(--sc-border-color);--sc-divider-border-style:solid;--sc-divider-color:currentColor;--sc-divider-ff:var(--sc-font-family-base);--sc-divider-fs:1rem;--sc-divider-fw:var(--sc-font-weight-base);--sc-divider-fst:var(--sc-font-style-base);margin:var(--sc-divider-my) var(--sc-divider-mx);font-size:var(--sc-divider-fs);font-style:var(--sc-divider-fst);font-family:var(--sc-divider-ff);font-weight:var(--sc-divider-fw);color:var(--sc-divider-color);display:block}:host([size="2xs"]){--sc-divider-my:0.35rem;--sc-divider-fs:0.68rem}:host([size=xs]){--sc-divider-my:0.5rem;--sc-divider-fs:0.75rem}:host([size=sm]){--sc-divider-my:0.75rem;--sc-divider-fs:0.875rem}:host([size=md]){--sc-divider-my:1.25rem}:host([size=lg]){--sc-divider-my:1.85rem}:host([size=xl]){--sc-divider-my:2.25rem}:host([size="2xl"]){--sc-divider-my:3.35rem}div{display:flex;align-items:center;width:100%}div::after,div::before{content:"";flex-grow:1;border-top:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:100%;opacity:var(--sc-divider-opacity,1)}:host([align=left]) div:before{display:none}:host([align=right]) div:after{display:none}:host([vertical]){margin:var(--sc-divider-mx) var(--sc-divider-my)}:host([vertical]) div{flex-direction:column;height:100%;min-height:var(--sc-form-height)}:host([vertical]) .has-text{gap:.25rem}:host([vertical]) div::after,:host([vertical]) div::before{border-top:none;border-left:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:auto;height:100%;opacity:var(--sc-divider-opacity,1)}:host([noMargin]){margin:0}.text{flex-shrink:0;line-height:1.1;max-width:80%}.no-text .text{display:none}.has-text{gap:.5rem}`],fn([A()],vn.prototype,"slotNodes",2),fn([w("div")],vn.prototype,"divider",2),fn([f({type:String})],vn.prototype,"label",2),fn([f({type:String,reflect:!0})],vn.prototype,"size",2),fn([f({type:String,reflect:!0})],vn.prototype,"align",2),fn([f({type:Boolean,reflect:!0})],vn.prototype,"vertical",2),fn([f({type:Boolean,reflect:!0})],vn.prototype,"noMargin",2),vn=fn([b("sonic-divider")],vn);var yn=Object.defineProperty,wn=Object.getOwnPropertyDescriptor;let xn=class extends Nt{render(){return bt`<div><slot></slot></div>`}};xn.styles=[T`div{margin-top:.1em;font-family:var(--sc-font-family-base);font-size:.7em;font-weight:var(--sc-font-style-base)}`],xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?wn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&yn(e,s,o),o})([b("sonic-card-header-description")],xn);var _n=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_n(e,s,o),o};let Cn=class extends Nt{render(){return bt`<div class="header"><div class="header-content">${rs(this.label)} ${this.description?bt`<sonic-card-header-description>${rs(this.description)}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};Cn.styles=[T`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}@media print{:host{--sc-card-header-font-size:1.45rem}}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`],An([f()],Cn.prototype,"label",2),An([f()],Cn.prototype,"description",2),Cn=An([b("sonic-card-header")],Cn);var Pn=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor;let $n=class extends Nt{render(){return bt`<div><slot></slot></div>`}};$n=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Pn(e,s,o),o})([b("sonic-card-main")],$n);var On=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor;let Dn=class extends Nt{render(){return bt`<slot></slot>`}};Dn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ln(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&On(e,s,o),o})([b("sonic-card-footer")],Dn);var jn=Object.defineProperty,En=Object.getOwnPropertyDescriptor,Mn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?En(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jn(e,s,o),o};let zn=class extends Nt{constructor(){super(...arguments),this.type="default"}render(){return bt`<div part="card" class="card"><slot></slot></div>`}};zn.styles=[T`*{box-sizing:border-box}:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{.card{page-break-inside:avoid;break-inside:avoid;box-shadow:none!important;border:1px solid var(--sc-base-200)}}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`],Mn([f({type:String,reflect:!0})],zn.prototype,"type",2),zn=Mn([b("sonic-card")],zn);const Nn=T`:host{--sc-color:inherit;color:var(--sc-color)}:host([type=primary]){--sc-color:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success)}.inherit-color{color:var(--sc-color)}`;T`:host{--sc-color:inherit;--sc-bg:inherit;color:var(--sc-color);background:var(--sc-bg)}:host([type=primary]){--sc-color:var(--sc-primary-content);--sc-bg:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning-content);--sc-bg:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger-content);--sc-bg:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info-content);--sc-bg:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success-content);--sc-bg:var(--sc-success)}.inherit-bg{color:inherit}`;var In=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor;let Tn=class extends Nt{render(){return bt`<slot></slot>`}};Tn.styles=[Nn,T`:host{display:table-row}:host([odd]){background:var(--sc-table-accent-bg)}`],Tn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&In(e,s,o),o})([b("sonic-tr")],Tn);var Rn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,Vn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Un(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rn(e,s,o),o};let Bn=class extends Nt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return bt`<th part="th" style="${Zt(t)}" colspan="${be(this.colSpan)}" rowspan="${be(this.rowSpan)}"><slot></slot></th>`}};Bn.styles=[Nn,T`:host{display:contents;background:var(--sc-table-bg);position:sticky;top:0;z-index:20}th{all:inherit;display:table-cell;border-bottom:calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);text-transform:var(--sc-table-th-tt);font-weight:var(--sc-table-th-fw);font-size:var(--sc-table-th-fs);padding:var(--sc-table-th-py) var(--sc-table-th-px)}`],Vn([f({type:Number})],Bn.prototype,"colSpan",2),Vn([f({type:Number})],Bn.prototype,"rowSpan",2),Vn([f({type:String})],Bn.prototype,"align",2),Vn([f({type:String})],Bn.prototype,"minWidth",2),Vn([f({type:String})],Bn.prototype,"maxWidth",2),Vn([f({type:String})],Bn.prototype,"width",2),Bn=Vn([b("sonic-th")],Bn);var qn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,Wn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Hn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qn(e,s,o),o};let Kn=class extends Nt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return bt`<td part="td" style="${Zt(t)}" colspan="${be(this.colSpan)}" rowspan="${be(this.rowSpan)}"><slot></slot></td>`}};Kn.styles=[Nn,T`:host{display:contents}td{all:inherit;display:table-cell;padding:var(--sc-table-td-py) var(--sc-table-td-px)}`],Wn([f({type:Number})],Kn.prototype,"colSpan",2),Wn([f({type:Number})],Kn.prototype,"rowSpan",2),Wn([f({type:String})],Kn.prototype,"align",2),Wn([f({type:String})],Kn.prototype,"vAlign",2),Wn([f({type:String})],Kn.prototype,"minWidth",2),Wn([f({type:String})],Kn.prototype,"maxWidth",2),Wn([f({type:String})],Kn.prototype,"width",2),Kn=Wn([b("sonic-td")],Kn);var Zn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor;let Qn=class extends Nt{render(){return bt`<slot></slot>`}};Qn.styles=[T`:host{display:table-header-group}`],Qn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Zn(e,s,o),o})([b("sonic-thead")],Qn);var Gn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor;let Xn=class extends Nt{render(){return bt`<tbody part="tbody"><slot></slot></tbody>`}};Xn.styles=[T`:host{display:table-row-group}::slotted(sonic-tr:nth-child(odd)){background:var(--sc-table-accent-bg)}::slotted(sonic-tr:hover){background:var(--sc-table-hover-bg)}::slotted(sonic-tr:not(:last-child)){border-bottom:var(--sc-form-border-width) solid var(--sc-base-200)!important}`],Xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gn(e,s,o),o})([b("sonic-tbody")],Xn);var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor;let sa=class extends Nt{render(){return bt`<tfoot><slot></slot></tfoot>`}};sa.styles=[T`:host{display:contents}`],sa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ea(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ta(e,s,o),o})([b("sonic-tfoot")],sa);var ia=Object.defineProperty,ra=Object.getOwnPropertyDescriptor;let oa=class extends Nt{render(){return bt`<slot></slot>`}};oa.styles=[T`:host{display:table-caption;font-size:.75rem;color:var(--sc-table-caption-color);padding:var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py))}`],oa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ra(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ia(e,s,o),o})([b("sonic-caption")],oa);var na=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,la=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?aa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&na(e,s,o),o};let ca=class extends Nt{constructor(){super(...arguments),this.bordered=!1}render(){const t={maxHeight:this.maxHeight};return bt`<div class="table-container custom-scroll" style="${Zt(t)}"><div class="table"><slot></slot></div></div>`}};ca.styles=[gs,me,T`:host{--sc-table-fw:var(--sc-font-weight-base);--sc-table-fst:var(--sc-font-style-base);--sc-table-fs:1rem;--sc-table-border-color:var(--sc-border-color);--sc-table-caption-color:var(--sc-base-500);--sc-table-bg:var(--sc-base);--sc-table-accent-bg:var(--sc-base-50);--sc-table-hover-bg:var(--sc-base-100);--sc-table-th-fs:0.85em;--sc-table-th-fw:bold;--sc-table-th-tt:uppercase;--sc-table-th-px:var(--sc-table-td-px);--sc-table-th-py:calc(1.8 * var(--sc-table-td-py));--sc-table-td-px:0.5em;--sc-table-td-py:0.5em;display:block}:host([maxHeight]) .table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.table{width:100%;display:table;box-sizing:border-box}:host([bordered]) .table-container{border:var(--sc-border-width) solid var(--sc-table-border-color)!important}`],la([f({type:String,reflect:!0})],ca.prototype,"size",2),la([f({type:Boolean,reflect:!0})],ca.prototype,"bordered",2),la([f({type:String})],ca.prototype,"maxHeight",2),ca=la([b("sonic-table")],ca);var ha=Object.defineProperty,da=Object.getOwnPropertyDescriptor,pa=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?da(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ha(e,s,o),o};let ua=class extends(ji(Nt)){constructor(){super(...arguments),this.key="",this.action=null}connectedCallback(){var t;const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(e),super.connectedCallback(),this.formPublisher=ce.get(null!=(t=this.getAncestorAttributeValue("headersDataProvider"))?t:this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign((t=>{"request_token"==t&&this.requestToken()})))}requestToken(){var t,e,s,i,r;if(!this.formPublisher)return;const o=(null!=(s=null!=(e=this.action)?e:null==(t=this.formPublisher.captchaAction)?void 0:t.get())?s:"submit").replace(/[^\w_/]/g,"_"),n=(null!=(r=null==(i=this.formPublisher.captchaMethod)?void 0:i.get())?r:"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:n+"//"+o}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return bt`<slot></slot>`}};pa([f()],ua.prototype,"key",2),pa([f()],ua.prototype,"action",2),ua=pa([b("sonic-captcha")],ua),window.SonicPublisherManager||(window.SonicPublisherManager=h),window.SonicDataBindObserver||(window.SonicDataBindObserver=g);const ga=ks,ba=tn;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ga,SonicModal:ba}}));
116
+ */,br=Wt(class extends Kt{constructor(t){var e;if(super(t),t.type!==Bt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const o in e){const t=!!e[o];t===this.nt.has(o)||(null===(i=this.st)||void 0===i?void 0:i.has(o))||(t?(r.add(o),this.nt.add(o)):(r.remove(o),this.nt.delete(o)))}return mt}});var mr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,vr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mr(e,s,o),o};let yr=class extends(Si(Xt(D(Nt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text",console.log(this.isPassword)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return bt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${br(t)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${be(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${be(this.list)}" tabindex="${be(this.tabindex)}" pattern="${be(this.pattern)}" min="${be(this.min)}" max="${be(this.max)}" step="${be(this.step)}" src="${be(this.src)}" minlength="${be(this.minlength)}" maxlength="${be(this.maxlength)}" placeholder="${be(this.placeholder)}" required="${be(this.required)}" autocomplete="${be(this.autocomplete)}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"> ${this.showPasswordToggle?bt`<sonic-button shape="circle" class="password-toggle" @click="${this.togglePasswordVisibility}" aria-label="Toggle password visibility" variant="unstyled"><sonic-icon library="heroicons" name="${this.isPassword?"eye":"eye-slash"}"></sonic-icon></sonic-button>`:""}<slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot><slot name="list"></slot>`}};yr.styles=[me,gr,pr,ur,dr,T`:host([type=hidden]){appearance:none!important;display:none!important}:host>.form-control{position:relative}`],vr([f({type:String,reflect:!0})],yr.prototype,"size",2),vr([f({type:String})],yr.prototype,"list",2),vr([f({type:String})],yr.prototype,"placeholder",2),vr([f({type:String})],yr.prototype,"pattern",2),vr([f({type:String})],yr.prototype,"min",2),vr([f({type:String})],yr.prototype,"max",2),vr([f({type:Boolean})],yr.prototype,"readonly",2),vr([f({type:Number})],yr.prototype,"step",2),vr([f({type:Number})],yr.prototype,"minlength",2),vr([f({type:Number})],yr.prototype,"maxlength",2),vr([f({type:String})],yr.prototype,"src",2),vr([f({type:Boolean,reflect:!0})],yr.prototype,"inlineContent",2),vr([f({type:Boolean})],yr.prototype,"disableInlineContentFocus",2),vr([f({type:Boolean})],yr.prototype,"showPasswordToggle",2),vr([A({slot:"label"})],yr.prototype,"slotLabelNodes",2),vr([A({slot:"description"})],yr.prototype,"slotDescriptionNodes",2),vr([A({slot:"suffix"})],yr.prototype,"slotSuffixNodes",2),vr([A({slot:"prefix"})],yr.prototype,"slotPrefixNodes",2),vr([w("input")],yr.prototype,"input",2),vr([v()],yr.prototype,"hasDescription",2),vr([v()],yr.prototype,"hasLabel",2),vr([v()],yr.prototype,"hasSuffix",2),vr([v()],yr.prototype,"hasPrefix",2),vr([v()],yr.prototype,"isPassword",2),yr=vr([b("sonic-input")],yr);var wr=Object.defineProperty,xr=Object.getOwnPropertyDescriptor,_r=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wr(e,s,o),o};let kr=class extends Nt{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver((()=>this.computePosition(this.placement)))}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame((()=>this.runPositioningLoop())))}_toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.dispatchEvent(new CustomEvent("hide"))}_handleClosePop(t){const s=t.composedPath(),i=s[0];kr.pops.forEach((r=>{const o=s.includes(r),n=s.includes(r.querySelector('[slot="content"]')),a="keep"===e.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r._hide()}))}connectedCallback(){super.connectedCallback(),0==kr.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),kr.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){super.disconnectedCallback(),kr.pops.delete(this),0==kr.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop)),this.resizeObserver.unobserve(this.popContent)}computePosition(t){var e,s,i;let r=null==(e=this.popContent)?void 0:e.getBoundingClientRect();const o=this.getBoundingClientRect(),n=o.left,a=o.top;let l=n,c=a;const h=a-r.height-8,d=n-r.width-8,p=n+o.width+8,u=a+o.height+8;switch(t){case"bottom":c=u;break;case"top":c=h;break;case"left":l=d;break;case"right":l=p}this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(s=this.popContent)?void 0:s.getBoundingClientRect(),r.x<5&&"left"==t&&(l=p),r.y<5&&"top"==t&&(c=u),r.x+r.width>window.innerWidth-5&&"right"==t&&(l=d),r.y+r.height>window.innerHeight-5&&"bottom"==t&&(c=h),this.lastContentX+=l-r.x,this.lastContentY+=c-r.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),r=null==(i=this.popContent)?void 0:i.getBoundingClientRect(),r.x<0&&(this.lastContentX+=-r.x),r.y<0&&(this.lastContentY+=-r.y),r.x+r.width>window.innerWidth&&(this.lastContentX+=window.innerWidth-(r.x+r.width)),r.y+r.height>window.innerHeight&&(this.lastContentY+=window.innerHeight-(r.y+r.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return bt`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" style="display:none" class="${this.open?"is-open":""}"></slot>`}};kr.pops=new Set,kr.styles=[T`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open:not(.is-empty){transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`],_r([v()],kr.prototype,"open",2),_r([w("slot:not([name=content])")],kr.prototype,"popBtn",2),_r([w("slot[name=content]")],kr.prototype,"popContent",2),_r([f({type:Boolean})],kr.prototype,"noToggle",2),_r([f({type:Boolean,reflect:!0})],kr.prototype,"inline",2),_r([f({type:String,reflect:!0})],kr.prototype,"shadow",2),_r([f({type:String})],kr.prototype,"placement",2),kr=_r([b("sonic-pop")],kr);var Ar=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor;let Cr=class extends we{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Cr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ar(e,s,o),o})([b("sonic-menu-item")],Cr);class Sr{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=s,this.o=null!=r?r:this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var $r=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Dr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Or(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$r(e,s,o),o};let Lr=class extends(ji(Li(Di(Ei(Nt))))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.searchParameter="",this.hasInputPrefix=!1,this._resizeController=new Sr(this,{}),this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{""!=t?this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection):this.lastValidSearch=""},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{var e;null==(e=this.formValuePublisher)||e.set(t[this.name])},this.findSearchedItem=t=>{var e;return t[this.searchParameter||this.name]==(null==(e=this.searchPublisher)?void 0:e.get())},this.findSelection=t=>t[this.name]==this.value,this.setSearchFromSelection=t=>{var e;this.lastValidSearch=t[this.searchParameter||this.name],null==(e=this.searchPublisher)||e.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var t,e,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=(null==(t=this.searchPublisher)?void 0:t.get())&&(null==(e=this.formValuePublisher)?void 0:e.get())&&(null==(s=this.formValuePublisher)||s.set(""))}}hasSlotOrProps(){var t;this.hasInputPrefix=!!(null==(t=this.slotInputPrefixNodes)?void 0:t.length)}connectedCallback(){var t,e,s;super.connectedCallback();const i=this.searchParameter||this.name,r=this.getAncestorAttributeValue("formDataProvider"),o=r+"__autocomplete";this.initSearchDataProvider=`${o}_init_search__`,this.initQueueDataProvider=`${o}_init_queue__`,this.searchDataProvider=`${o}_search__`,this.queueDataProvider=`${o}_queue__`;const n=ce.get;this.searchPublisher=n(this.searchDataProvider)[i],this.formValuePublisher=n(r)[this.name],this.countPublisher=n(this.queueDataProvider).resultCount,this.initCountPublisher=n(this.initQueueDataProvider).resultCount,this.value&&(ce.get(this.initSearchDataProvider)[this.name]=this.value),null==(t=this.initCountPublisher)||t.onAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.onAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.onAssign(this.updateActiveSelection)}disconnectedCallback(){var t,e,s;super.disconnectedCallback(),null==(t=this.initCountPublisher)||t.offAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.offAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.offAssign(this.updateActiveSelection);const i=ce.get;i(this.initSearchDataProvider).delete(),i(this.initQueueDataProvider).delete(),i(this.searchDataProvider).delete(),i(this.queueDataProvider).delete()}queryQueueListItem(t,e,s){let i;const r=ce.get(t).get();if(Array.isArray(r)){for(const t of r){const s=ce.get(t.dataProvider).get();if(Array.isArray(s)&&(i=s.find(e),i))break}i&&s(i)}}setSelectionRange(t,e){var s;null==(s=this.querySelector("sonic-input"))||s.setSelectionRange(t,e)}handleHide(){var t,e,s;if(this.select)return""==(null==(t=this.searchPublisher)?void 0:t.get())?(this.lastValidSearch="",void(null==(e=this.formValuePublisher)||e.set(""))):void(null==(s=this.searchPublisher)||s.set(this.lastValidSearch))}render(){return bt`<sonic-pop noToggle style="display:block" @hide="${this.handleHide}"><sonic-input dataProvider="${this.initSearchDataProvider+Math.random()}" formDataProvider="${this.searchDataProvider}" type="search" data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}" label="${be(this.label)}" description="${be(this.description)}" name="${be(this.searchParameter||this.name)}" placeholder="${be(this.placeholder)}" ?readonly="${this.readonly}" autocomplete="off" clearable inlineContent size="${this.size}"><slot name="prefix" slot="prefix" @slotchange="${this.hasSlotOrProps}"></slot>${this.select?bt`<sonic-icon slot="suffix" class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon>`:ft}</sonic-input><sonic-menu slot="content" class="custom-scroll" style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}"><sonic-queue dataProvider="${this.queueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.searchDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue><sonic-queue noLazyload dataProvider="${this.initQueueDataProvider}" filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.initSearchDataProvider}" key="${this.key}" displayContents></sonic-queue></sonic-menu></sonic-pop>`}};Lr.styles=[gs,T`:host{display:block}sonic-menu{display:block;max-height:clamp(20rem,55vh,35rem);min-width:14rem;width:100%}`],Dr([f({type:String})],Lr.prototype,"size",2),Dr([f({type:String})],Lr.prototype,"placeholder",2),Dr([f()],Lr.prototype,"filteredFields",2),Dr([f({type:Boolean})],Lr.prototype,"readonly",2),Dr([f({type:String})],Lr.prototype,"dataProviderExpression",2),Dr([f({type:Boolean})],Lr.prototype,"select",2),Dr([f({type:String})],Lr.prototype,"key",2),Dr([f({type:String})],Lr.prototype,"searchParameter",2),Dr([A({slot:"prefix"})],Lr.prototype,"slotInputPrefixNodes",2),Dr([v()],Lr.prototype,"hasInputPrefix",2),Lr=Dr([b("sonic-input-autocomplete")],Lr);var Er=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Mr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Er(e,s,o),o};let zr=class extends(Ei(Nt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ce.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ce.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?bt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:bt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?ft:bt`<div>${this.wording_password_helper_decription}</div><div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div><div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div><div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div><div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div><div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>`}};Mr([f()],zr.prototype,"name",2),Mr([f()],zr.prototype,"minChars",2),Mr([v()],zr.prototype,"hasNoChar",2),Mr([v()],zr.prototype,"hasEnoughChars",2),Mr([v()],zr.prototype,"hasMinuscule",2),Mr([v()],zr.prototype,"hasMajuscule",2),Mr([v()],zr.prototype,"hasNumber",2),Mr([v()],zr.prototype,"hasSpecialChar",2),Mr([f()],zr.prototype,"wording_password_helper_decription",2),Mr([f()],zr.prototype,"wording_password_helper_min_length",2),Mr([f()],zr.prototype,"wording_password_helper_lower_case",2),Mr([f()],zr.prototype,"wording_password_helper_upper_case",2),Mr([f()],zr.prototype,"wording_password_helper_number",2),Mr([f()],zr.prototype,"wording_password_helper_special_char",2),zr=Mr([b("sonic-password-helper")],zr);var Nr=Object.defineProperty,Ir=Object.getOwnPropertyDescriptor,Fr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ir(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Nr(e,s,o),o};let Tr=class extends(Ei(Nt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ce.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ce.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?ft:bt`<span>${this.areEqual?rs(this.descriptionWhenEqual):rs(this.descriptionWhenNotEqual)}</span>`}};Fr([f()],Tr.prototype,"name",2),Fr([f()],Tr.prototype,"sameValueAs",2),Fr([f()],Tr.prototype,"descriptionWhenEqual",2),Fr([f()],Tr.prototype,"descriptionWhenNotEqual",2),Fr([v()],Tr.prototype,"areEqual",2),Fr([v()],Tr.prototype,"hasNoChar",2),Tr=Fr([b("sonic-same-value-helper")],Tr);var Rr=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Ur=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rr(e,s,o),o};let qr=class extends(ge(Si(Xt(D(Nt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return bt`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" ?data-indeterminate="${this.showAsIndeterminate}" .disabled="${be(this.disabled)}" .checked="${be(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}"><sonic-icon name="${"indeterminate"==this.checked||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">${this.label?rs(this.label):""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot></div></label>`}};qr.styles=[me,T`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked],input[data-indeterminate]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon,input[data-indeterminate]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`],Ur([f({type:Boolean,reflect:!0})],qr.prototype,"touched",2),Ur([f({type:String})],qr.prototype,"iconName",2),Ur([f({type:String})],qr.prototype,"indeterminateIconName",2),Ur([f({type:Boolean})],qr.prototype,"showAsIndeterminate",2),Ur([f({type:Boolean})],qr.prototype,"hasDescription",2),Ur([f({type:Boolean})],qr.prototype,"hasLabel",2),Ur([A()],qr.prototype,"slotLabelNodes",2),Ur([A({slot:"description"})],qr.prototype,"slotDescriptionNodes",2),qr=Ur([b("sonic-checkbox")],qr);var Br=Object.defineProperty,Hr=Object.getOwnPropertyDescriptor;let Wr=class extends qr{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};Wr.styles=[qr.styles,T`:host input{border-radius:50%}:host sonic-icon{border-radius:50%;overflow:hidden;background-color:var(--sc-primary-content);line-height:0;display:block;font-size:1em;height:.6em;width:.6em}`],Wr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Hr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Br(e,s,o),o})([b("sonic-radio")],Wr);var Kr=Object.defineProperty,Zr=Object.getOwnPropertyDescriptor,Qr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Kr(e,s,o),o};let Yr=class extends(Xt(D(Nt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(){this.hasDoneFirstUpdate=!0}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){const t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps();const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return bt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${br(t)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${be(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}">${Me(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey];return bt`<option ?selected="${e}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot>`}};Yr.styles=[me,gr,pr,ur,T`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}@supports selector(:has(*)){:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}@supports not selector(:has(*)){:host(:not([disabled])) .form-element{padding-right:max(1.275em,calc(1.5 * var(--sc-input-px)))}}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem var(--sc-input-px);color:var(--sc-base-content);background:var(--sc-base)}select[multiple] option{background:0 0;padding:0}`],Qr([f({type:String})],Yr.prototype,"valueKey",2),Qr([f({type:String})],Yr.prototype,"wordingKey",2),Qr([f({type:Boolean})],Yr.prototype,"multiple",2),Qr([f({type:String,reflect:!0})],Yr.prototype,"size",2),Qr([f({type:Number})],Yr.prototype,"selectSize",2),Qr([f({type:Array})],Yr.prototype,"options",1),Qr([f({reflect:!0})],Yr.prototype,"value",1),Qr([f({type:Boolean})],Yr.prototype,"forceAutoFill",2),Qr([f()],Yr.prototype,"description",1),Qr([f()],Yr.prototype,"label",1),Qr([A({slot:"label"})],Yr.prototype,"slotLabelNodes",2),Qr([A({slot:"description"})],Yr.prototype,"slotDescriptionNodes",2),Qr([A({slot:"suffix"})],Yr.prototype,"slotSuffixNodes",2),Qr([A({slot:"prefix"})],Yr.prototype,"slotPrefixNodes",2),Qr([v()],Yr.prototype,"hasDescription",2),Qr([v()],Yr.prototype,"hasLabel",2),Qr([v()],Yr.prototype,"hasSuffix",2),Qr([v()],Yr.prototype,"hasPrefix",2),Yr=Qr([b("sonic-select")],Yr);var Gr=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor,Xr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gr(e,s,o),o};let to=class extends(Si(Xt(D(Nt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){return bt`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${be(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${be(this.rows)}" cols="${be(this.cols)}" maxlength="${be(this.maxlength)}" minlength="${be(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${be(this.spellcheck)}" autocomplete="${be(this.autocomplete)}" tabindex="${be(this.tabindex)}" wrap="${be(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${be(this.ariaLabel)}" aria-labelledby="${be(this.ariaLabelledby)}">
117
+ ${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot>`}};to.styles=[me,gr,pr,ur,gs,T`textarea{font-size:inherit}`],Xr([f({type:String})],to.prototype,"size",2),Xr([f({type:Number})],to.prototype,"rows",2),Xr([f({type:Number})],to.prototype,"cols",2),Xr([f({type:Number})],to.prototype,"maxlength",2),Xr([f({type:Number})],to.prototype,"minlength",2),Xr([f({type:String})],to.prototype,"wrap",2),Xr([f({type:Boolean})],to.prototype,"readonly",2),Xr([f({type:String})],to.prototype,"placeholder",2),Xr([A({slot:"label"})],to.prototype,"slotLabelNodes",2),Xr([A({slot:"description"})],to.prototype,"slotDescriptionNodes",2),Xr([v()],to.prototype,"hasDescription",2),Xr([v()],to.prototype,"hasLabel",2),to=Xr([b("sonic-textarea")],to);var eo=Object.defineProperty,so=Object.getOwnPropertyDescriptor;let io=class extends Nt{render(){return bt`<slot></slot>`}};io.styles=[T`:host{color:var(--sc-neutral-500);font-size:1.25rem;line-height:1.2;display:block;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base);margin-top:.25em}`],io=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?so(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&eo(e,s,o),o})([b("sonic-legend-description")],io);var ro=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,no=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ro(e,s,o),o};let ao=class extends Nt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return bt`<legend part="legend">${this.iconName?bt`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${be(this.iconPrefix)}" library="${be(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${rs(this.label?this.label:"")} ${this.description?bt`<sonic-legend-description>${rs(this.description)}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};ao.styles=[T`:host{--sc-legend-font-size:1.5rem;--sc-legend-font-weight:var(--sc-font-weight-base);--sc-legend-font-style:var(--sc-headings-font-style);--sc-legend-family:var(--sc-headings-font-family);--sc-legend-line-height:var(--sc-headings-line-height);--sc-legend-color:var(--sc-base-content);display:flex;width:100%}legend{font-size:var(--sc-legend-font-size);font-weight:var(--sc-legend-font-weight);font-style:var(--sc-legend-font-style);font-family:var(--sc-legend-font-family);line-height:var(--sc-legend-line-height);color:var(--sc-legend-color);padding:0;display:flex;width:100%;align-items:flex-start;gap:.5em}slot[name=suffix]{display:block;margin-left:auto;flex-shrink:0}.legend-content{flex-grow:1}`],no([f({type:Boolean})],ao.prototype,"forceAutoFill",2),no([f()],ao.prototype,"description",1),no([f()],ao.prototype,"label",1),no([f({type:String})],ao.prototype,"iconName",2),no([f({type:String})],ao.prototype,"iconLibrary",2),no([f({type:String})],ao.prototype,"iconPrefix",2),ao=no([b("sonic-legend")],ao);var lo=Object.defineProperty,co=Object.getOwnPropertyDescriptor,ho=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?co(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&lo(e,s,o),o};let po=class extends(D(Nt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return bt`<fieldset form="${be(this.form)}" ?disabled="${this.disabled}">${this.label?bt`<sonic-legend label="${be(this.label)}" description="${be(this.description)}" iconName="${be(this.iconName)}" iconPrefix="${be(this.iconPrefix)}" iconLibrary="${be(this.iconLibrary)}"></sonic-legend>`:ft}<slot></slot></fieldset>`}};po.styles=[T`:host{--sc-fieldset-mt:0;--sc-fieldset-mb:1rem;--sc-fieldset-border-color:var(--sc-border-color);--sc-fieldset-border-width:var(--sc-form-border-width);margin-top:var(--sc-fieldset-mt);margin-bottom:var(--sc-fieldset-mb);display:block;border:var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color)!important;padding:1.8rem 1.25rem;border-radius:var(--sc-rounded-lg)}fieldset{all:unset;display:contents}:host([variant=ghost]),:host([variant=shadow]){--sc-fieldset-border-color:transparent}:host([variant=shadow]){--sc-fieldset-border-color:transparent;box-shadow:var(--sc-shadow-lg)}::slotted(sonic-legend),sonic-legend{margin-bottom:1.5rem;display:block}::slotted(sonic-legend:last-child){margin-bottom:0}`],ho([f({type:Boolean,reflect:!0})],po.prototype,"disabled",2),ho([f({type:String})],po.prototype,"form",2),ho([f({type:String})],po.prototype,"label",2),ho([f({type:String})],po.prototype,"description",2),ho([f({type:String})],po.prototype,"iconName",2),ho([f({type:String})],po.prototype,"iconLibrary",2),ho([f({type:String})],po.prototype,"iconPrefix",2),ho([f({type:String,reflect:!0})],po.prototype,"variant",2),po=ho([b("sonic-fieldset")],po);var uo=Object.defineProperty,go=Object.getOwnPropertyDescriptor,bo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&uo(e,s,o),o};let mo=class extends(D(Nt)){constructor(){super(...arguments),this._resizeController=new Sr(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return bt`<div class="${br(t)}"><slot @slotchange="${this.onSlotChange}"></slot></div>`}};mo.styles=[T`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(sonic-submit){display:contents}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`],bo([k({flatten:!0})],mo.prototype,"slottedElements",2),bo([f({type:Boolean})],mo.prototype,"oneFormElement",2),mo=bo([b("sonic-form-layout")],mo);var fo=Object.defineProperty,vo=Object.getOwnPropertyDescriptor,yo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fo(e,s,o),o};let wo=class extends Nt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return bt`<slot style="${Zt(t)}"></slot>`}};wo.styles=[T`:host{display:block}slot{display:flex;flex-wrap:wrap;gap:.3rem}`],yo([f({type:String})],wo.prototype,"direction",2),yo([f({type:String})],wo.prototype,"justify",2),wo=yo([b("sonic-form-actions")],wo);var xo=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,ko=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?_o(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xo(e,s,o),o};let Ao=class extends Nt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){const t={alignItems:this.alignItems};return bt`<span class="${this.hasLabel?"form-label":"hidden"}">${this.label?rs(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${Zt(t)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?bt`${rs(this.description)}`:""}</slot>`}};Ao.styles=[me,pr,ur,T`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}::slotted(sonic-button),::slotted(sonic-input),::slotted(sonic-select){flex-grow:1}`],ko([f({type:String})],Ao.prototype,"alignItems",2),ko([f({type:String})],Ao.prototype,"label",2),ko([f({type:String})],Ao.prototype,"description",2),ko([A({slot:"label"})],Ao.prototype,"slotLabelNodes",2),ko([A({slot:"description"})],Ao.prototype,"slotDescriptionNodes",2),ko([v()],Ao.prototype,"hasDescription",2),ko([v()],Ao.prototype,"hasLabel",2),Ao=ko([b("sonic-group")],Ao);var Po=Object.defineProperty,Co=Object.getOwnPropertyDescriptor,So=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Co(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Po(e,s,o),o};let $o=class extends Nt{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(){var t;if(this.transition){const e=null==(t=this.shadowRoot)?void 0:t.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return bt`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${Zt(t)}"></picture></div>`}};$o.styles=[T`:host{--sc-img-radius:0;--sc-img-bg:var(--sc-placeholder-bg);border-radius:var(--sc-img-radius);display:block;width:100%;background:var(--sc-img-bg)}img{width:100%;vertical-align:middle;object-fit:cover}img[src=""]{visibility:hidden}:host([rounded]){--sc-img-radius:var(--sc-rounded);overflow:hidden}:host([rounded=sm]){--sc-img-radius:var(--sc-rounded-sm)}:host([rounded=md]){--sc-img-radius:var(--sc-rounded-md)}:host([rounded=lg]){--sc-img-radius:var(--sc-rounded-lg)}:host([rounded=xl]){--sc-img-radius:var(--sc-rounded-xl)}:host([rounded=full]){--sc-img-radius:50%!important}:host([rounded=none]){--sc-img-radius:0!important}:host([cover]),:host([cover]) img,:host([cover])>div{position:absolute!important;left:0!important;top:0!important;right:0!important;bottom:0!important;height:100%!important;width:100%!important}:host([transition]) img{opacity:0;transition:.25s}:host([transition=fade-scale-out]) img{scale:1.08;transition:opacity .3s linear,scale .3s cubic-bezier(.16,1,.3,1)}:host([transition]) img.loaded{opacity:1;scale:1}`],So([f({type:String})],$o.prototype,"rounded",2),So([f({type:String})],$o.prototype,"src",2),So([f({type:String})],$o.prototype,"alt",2),So([f({type:String})],$o.prototype,"loading",2),So([f({type:String,reflect:!0})],$o.prototype,"transition",2),So([f({type:String})],$o.prototype,"ratio",2),So([f({type:String})],$o.prototype,"objectPosition",2),So([f({type:String})],$o.prototype,"imageRendering",2),So([f({type:Boolean,reflect:!0})],$o.prototype,"cover",2),$o=So([b("sonic-image")],$o);var Oo=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,Lo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Do(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Oo(e,s,o),o};let Eo=class extends Nt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){let t,e,s=!1;this.scrollable&&(this.addEventListener("mousedown",(i=>{s=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft})),this.addEventListener("mouseleave",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mouseup",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mousemove",(i=>{if(!s)return;i.preventDefault();const r=1.5*(i.pageX-this.offsetLeft-t);this.scrollLeft=e-r,this.setScrollShadow(this,this.direction)})),this.addEventListener("scroll",(t=>{t.preventDefault(),this.setScrollShadow(this,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return bt`<menu part="menu" class="shadowable" style="${Zt(t)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${Zt(s)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${Zt(i)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${e?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};Eo.styles=[T`:host{display:block;--sc-menu-gap:0.15rem}:host>menu{display:flex;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em);margin:0;padding:.35em}.hidden{display:none!important}:host([shadow=md]) .shadowable,:host([shadow=true]) .shadowable,:host([shadow]) .shadowable{box-shadow:var(--sc-shadow)}:host([shadow=sm]) .shadowable{box-shadow:var(--sc-shadow-sm)}:host([shadow=lg]) .shadowable{box-shadow:var(--sc-shadow-lg)}:host([shadow=none]) .shadowable{box-shadow:none}:host([scrollable]){scrollbar-width:none;-ms-overflow-style:none}:host([scrollable]) menu>*{scroll-snap-align:start;white-space:nowrap}:host([scrollable][direction=row]){overflow-x:scroll;scroll-snap-type:x mandatory}:host([scrollable][direction=column]){overflow-y:scroll;scroll-snap-type:y mandatory}:host([scrollable])::-webkit-scrollbar{display:none!important}:host([scrollable][direction=row].shadow-right){-webkit-mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left.shadow-right){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}:host([scrollable][direction=column].shadow-top){-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-top.shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}`],Lo([f({type:String,reflect:!0})],Eo.prototype,"size",2),Lo([f({type:String,reflect:!0})],Eo.prototype,"direction",2),Lo([f({type:String})],Eo.prototype,"gap",2),Lo([f({type:String,reflect:!0})],Eo.prototype,"align",2),Lo([f({type:String,reflect:!0})],Eo.prototype,"shadow",2),Lo([f({type:String})],Eo.prototype,"moreShape",2),Lo([f({type:Boolean})],Eo.prototype,"scrollable",2),Lo([f({type:String})],Eo.prototype,"minWidth",2),Lo([w("menu")],Eo.prototype,"menu",2),Lo([k({selector:"sonic-menu-item"})],Eo.prototype,"menuChildren",2),Lo([k({slot:"more",selector:"*"})],Eo.prototype,"moreElements",2),Lo([v()],Eo.prototype,"hasMoreElements",2),Eo=Lo([b("sonic-menu")],Eo);var jo=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jo(e,s,o),o};let No=class extends Nt{firstUpdated(){var t;null==(t=this.buttons)||t.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))}))}render(){return bt`<slot></slot>`}};No.styles=[T`:host{display:flex;gap:.5rem;margin-top:auto;padding-top:1.5rem}`],zo([k({selector:"sonic-button"})],No.prototype,"buttons",2),No=zo([b("sonic-modal-actions")],No);var Io=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,To=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Io(e,s,o),o};let Ro=class extends Nt{render(){return bt`<sonic-button reset="${be(this.reset)}" shape="circle" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};Ro.styles=[T`:host{position:sticky;display:block;align-self:flex-end;height:0;top:.5rem;right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`],To([f()],Ro.prototype,"reset",2),Ro=To([b("sonic-modal-close")],Ro);var Vo=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor;let qo=class extends Nt{render(){return bt`<slot></slot>`}};qo.styles=[T`:host{display:block;width:100%}`],qo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Uo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vo(e,s,o),o})([b("sonic-modal-content")],qo);var Bo=Object.defineProperty,Ho=Object.getOwnPropertyDescriptor;let Wo=class extends Nt{render(){return bt`<slot></slot>`}};Wo.styles=[T`:host{font-size:1.1rem;display:block;line-height:1.1rem;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family);font-weight:var(--sc-headings-font-weight)}`],Wo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ho(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Bo(e,s,o),o})([b("sonic-modal-subtitle")],Wo);var Ko=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor;let Qo=class extends Nt{render(){return bt`<slot></slot>`}};Qo.styles=[T`:host{font-weight:700;font-size:1.5rem;display:block;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family)}`],Qo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ko(e,s,o),o})([b("sonic-modal-title")],Qo);var Yo=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Jo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Go(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Yo(e,s,o),o};const Xo="sonic-modal";let tn=class extends(D(Nt)){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(Xo);!0===t.removeOnHide&&e.setAttribute("removeOnHide","true"),t.maxWidth&&(e.maxWidth=null==t?void 0:t.maxWidth),t.width&&(e.width=null==t?void 0:t.width),t.maxHeight&&(e.maxHeight=null==t?void 0:t.maxHeight),t.height&&(e.height=null==t?void 0:t.height),t.paddingX&&e.style.setProperty("--sc-modal-px",null==t?void 0:t.paddingX),t.paddingY&&e.style.setProperty("--sc-modal-py",null==t?void 0:t.paddingY),t.zIndex&&e.style.setProperty("--sc-modal-z-index",null==t?void 0:t.zIndex),e.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${t.content}</sonic-modal-content>`||"";return(document.querySelector("sonic-theme")||document.body).appendChild(e),e.show(),e}connectedCallback(){super.connectedCallback(),this.handleFullsceen()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){if(0==this.visible)return ft;const t={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return bt`<div class="modal-wrapper" style="${Zt(e)}" ${es({out:Ke})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${Zt(t)}" ${es({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.forceAction?null:this.hide}" ${es({keyframeOptions:{duration:500},in:Ze,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&ce.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove()}dispose(){this.hide(),this.remove()}handleEscape(t){if("Escape"===t.key){[...document.querySelectorAll(Xo)].forEach((t=>{t.forceAction||t.hide()}))}}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};tn.styles=[gs,T`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:85vh;--sc-modal-rounded:var(--sc-rounded-lg);--sc-modal-z-index:990}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:calc(var(--sc-modal-z-index) + 1);align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:var(--sc-modal-z-index);opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important;border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`],Jo([f({type:Boolean})],tn.prototype,"forceAction",2),Jo([f({type:Boolean})],tn.prototype,"removeOnHide",2),Jo([f({type:String,reflect:!0})],tn.prototype,"align",2),Jo([f({type:String})],tn.prototype,"padding",2),Jo([f({type:String})],tn.prototype,"maxWidth",2),Jo([f({type:String})],tn.prototype,"maxHeight",2),Jo([f({type:String})],tn.prototype,"width",2),Jo([f({type:String})],tn.prototype,"height",2),Jo([f({type:String})],tn.prototype,"zIndex",2),Jo([f({type:Boolean,reflect:!0})],tn.prototype,"fullScreen",2),Jo([f({type:Boolean,reflect:!0})],tn.prototype,"visible",2),Jo([w(".modal-wrapper")],tn.prototype,"modalWrapper",2),Jo([w(".modal")],tn.prototype,"modalElement",2),Jo([k({selector:"sonic-modal-close"})],tn.prototype,"closeBtn",2),tn=Jo([b(Xo)],tn),"undefined"!=typeof window&&(window.SonicModal=tn);var en=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,rn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&en(e,s,o),o};const on={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let nn=class extends Nt{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.dismissible=!1,this.background=!1,this.status="default"}render(){return bt`<div part="alert" class="alert">${this.noIcon?ft:bt`<div>${this.status&&bt`<sonic-icon name="${on[this.status]}"></sonic-icon>`}</div>`}<div>${this.label?bt`<span class="label">${rs(this.label)}</span>`:ft}<slot>${this.text}</slot></div>${this.dismissible?bt`<sonic-button @click="${this.close}" class="close-btn" variant="unstyled" shape="circle"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`:ft}</div>`}close(){this.remove()}};nn.styles=[me,T`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert,:host([dismissible]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before,:host([dismissible]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div,:host([dismissible])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([dismissible]) .alert{padding-right:3rem}:host([dismissible]) .close-btn{padding:.5em;position:absolute;top:.25rem;right:.25rem}`],rn([f({type:String})],nn.prototype,"label",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"noIcon",2),rn([f({type:String})],nn.prototype,"text",2),rn([f({type:String,reflect:!0})],nn.prototype,"size",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"dismissible",2),rn([f({type:Boolean,reflect:!0})],nn.prototype,"background",2),rn([f({type:String,reflect:!0})],nn.prototype,"status",2),nn=rn([b("sonic-alert")],nn);var an=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,cn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ln(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&an(e,s,o),o};let hn=class extends(D(Nt)){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&ks.add({text:t.content||"",status:t.status})}))}get message(){return this._message}set message(t){var e,s;this._message=t,this.message&&!1===(null==(e=this.props)?void 0:e.success)&&((null==(s=this.props)?void 0:s.public_message)||ks.add({text:this.message,status:"error"}))}get data(){return this._data}set data(t){var e,s,i,r;this._data=t;const o={text:"Votre produit a bien été ajouté",status:"success"};Array.isArray(this.data)&&!0===(null==(e=this.props)?void 0:e.success)&&ks.add(o),""==this.data&&!0===(null==(s=this.props)?void 0:s.status)&&ks.add(o),!1===(null==(i=this.props)?void 0:i.success)&&((null==(r=this.props)?void 0:r.public_message)||ks.add({text:this.data,status:"error"}))}render(){return ft}};cn([f({type:Boolean})],hn.prototype,"success",2),cn([f({type:Boolean})],hn.prototype,"status",2),cn([f({type:Array})],hn.prototype,"messages",1),cn([f({type:String})],hn.prototype,"message",1),cn([f()],hn.prototype,"data",1),hn=cn([b("sonic-toast-message-subscriber")],hn);var dn=Object.defineProperty,pn=Object.getOwnPropertyDescriptor,un=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&dn(e,s,o),o};let gn=class extends Nt{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){const t=this.disabled||""==this.label?"disabled":"";return bt`<div data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}" class="tooltip ${t}"><slot></slot></div>`}};gn.styles=[T`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.32rem .25rem;border-radius:var(--sc-rounded);color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:18rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`],un([f({type:String})],gn.prototype,"label",2),un([f({type:String,reflect:!0})],gn.prototype,"placement",2),un([f({type:Boolean})],gn.prototype,"disabled",2),gn=un([b("sonic-tooltip")],gn);var bn=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,fn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?mn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bn(e,s,o),o};let vn=class extends Nt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1}firstUpdated(){var t,e;(this.label||(null==(t=this.slotNodes)?void 0:t.length))&&(null==(e=this.divider)||e.classList.add("has-text"))}render(){return bt`<div part="divider"><span class="text">${rs(this.label?this.label:"")}<slot></slot></span></div>`}};vn.styles=[T`:host{--sc-divider-my:0.5rem;--sc-divider-mx:0;--sc-divider-border-width:max(1px, var(--sc-border-width));--sc-divider-border-color:var(--sc-border-color);--sc-divider-border-style:solid;--sc-divider-color:currentColor;--sc-divider-ff:var(--sc-font-family-base);--sc-divider-fs:1rem;--sc-divider-fw:var(--sc-font-weight-base);--sc-divider-fst:var(--sc-font-style-base);margin:var(--sc-divider-my) var(--sc-divider-mx);font-size:var(--sc-divider-fs);font-style:var(--sc-divider-fst);font-family:var(--sc-divider-ff);font-weight:var(--sc-divider-fw);color:var(--sc-divider-color);display:block}:host([size="2xs"]){--sc-divider-my:0.35rem;--sc-divider-fs:0.68rem}:host([size=xs]){--sc-divider-my:0.5rem;--sc-divider-fs:0.75rem}:host([size=sm]){--sc-divider-my:0.75rem;--sc-divider-fs:0.875rem}:host([size=md]){--sc-divider-my:1.25rem}:host([size=lg]){--sc-divider-my:1.85rem}:host([size=xl]){--sc-divider-my:2.25rem}:host([size="2xl"]){--sc-divider-my:3.35rem}div{display:flex;align-items:center;width:100%}div::after,div::before{content:"";flex-grow:1;border-top:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:100%;opacity:var(--sc-divider-opacity,1)}:host([align=left]) div:before{display:none}:host([align=right]) div:after{display:none}:host([vertical]){margin:var(--sc-divider-mx) var(--sc-divider-my)}:host([vertical]) div{flex-direction:column;height:100%;min-height:var(--sc-form-height)}:host([vertical]) .has-text{gap:.25rem}:host([vertical]) div::after,:host([vertical]) div::before{border-top:none;border-left:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:auto;height:100%;opacity:var(--sc-divider-opacity,1)}:host([noMargin]){margin:0}.text{flex-shrink:0;line-height:1.1;max-width:80%}.no-text .text{display:none}.has-text{gap:.5rem}`],fn([A()],vn.prototype,"slotNodes",2),fn([w("div")],vn.prototype,"divider",2),fn([f({type:String})],vn.prototype,"label",2),fn([f({type:String,reflect:!0})],vn.prototype,"size",2),fn([f({type:String,reflect:!0})],vn.prototype,"align",2),fn([f({type:Boolean,reflect:!0})],vn.prototype,"vertical",2),fn([f({type:Boolean,reflect:!0})],vn.prototype,"noMargin",2),vn=fn([b("sonic-divider")],vn);var yn=Object.defineProperty,wn=Object.getOwnPropertyDescriptor;let xn=class extends Nt{render(){return bt`<div><slot></slot></div>`}};xn.styles=[T`div{margin-top:.1em;font-family:var(--sc-font-family-base);font-size:.7em;font-weight:var(--sc-font-style-base)}`],xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?wn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&yn(e,s,o),o})([b("sonic-card-header-description")],xn);var _n=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_n(e,s,o),o};let Pn=class extends Nt{render(){return bt`<div class="header"><div class="header-content">${rs(this.label)} ${this.description?bt`<sonic-card-header-description>${rs(this.description)}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};Pn.styles=[T`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}@media print{:host{--sc-card-header-font-size:1.45rem}}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`],An([f()],Pn.prototype,"label",2),An([f()],Pn.prototype,"description",2),Pn=An([b("sonic-card-header")],Pn);var Cn=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor;let $n=class extends Nt{render(){return bt`<div><slot></slot></div>`}};$n=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Cn(e,s,o),o})([b("sonic-card-main")],$n);var On=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor;let Ln=class extends Nt{render(){return bt`<slot></slot>`}};Ln=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Dn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&On(e,s,o),o})([b("sonic-card-footer")],Ln);var En=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,Mn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&En(e,s,o),o};let zn=class extends Nt{constructor(){super(...arguments),this.type="default"}render(){return bt`<div part="card" class="card"><slot></slot></div>`}};zn.styles=[T`*{box-sizing:border-box}:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{.card{page-break-inside:avoid;break-inside:avoid;box-shadow:none!important;border:1px solid var(--sc-base-200)}}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`],Mn([f({type:String,reflect:!0})],zn.prototype,"type",2),zn=Mn([b("sonic-card")],zn);const Nn=T`:host{--sc-color:inherit;color:var(--sc-color)}:host([type=primary]){--sc-color:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success)}.inherit-color{color:var(--sc-color)}`;T`:host{--sc-color:inherit;--sc-bg:inherit;color:var(--sc-color);background:var(--sc-bg)}:host([type=primary]){--sc-color:var(--sc-primary-content);--sc-bg:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning-content);--sc-bg:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger-content);--sc-bg:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info-content);--sc-bg:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success-content);--sc-bg:var(--sc-success)}.inherit-bg{color:inherit}`;var In=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor;let Tn=class extends Nt{render(){return bt`<slot></slot>`}};Tn.styles=[Nn,T`:host{display:table-row}:host([odd]){background:var(--sc-table-accent-bg)}`],Tn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&In(e,s,o),o})([b("sonic-tr")],Tn);var Rn=Object.defineProperty,Vn=Object.getOwnPropertyDescriptor,Un=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rn(e,s,o),o};let qn=class extends Nt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return bt`<th part="th" style="${Zt(t)}" colspan="${be(this.colSpan)}" rowspan="${be(this.rowSpan)}"><slot></slot></th>`}};qn.styles=[Nn,T`:host{display:contents;background:var(--sc-table-bg);position:sticky;top:0;z-index:20}th{all:inherit;display:table-cell;border-bottom:calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);text-transform:var(--sc-table-th-tt);font-weight:var(--sc-table-th-fw);font-size:var(--sc-table-th-fs);padding:var(--sc-table-th-py) var(--sc-table-th-px)}`],Un([f({type:Number})],qn.prototype,"colSpan",2),Un([f({type:Number})],qn.prototype,"rowSpan",2),Un([f({type:String})],qn.prototype,"align",2),Un([f({type:String})],qn.prototype,"minWidth",2),Un([f({type:String})],qn.prototype,"maxWidth",2),Un([f({type:String})],qn.prototype,"width",2),qn=Un([b("sonic-th")],qn);var Bn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,Wn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Hn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Bn(e,s,o),o};let Kn=class extends Nt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return bt`<td part="td" style="${Zt(t)}" colspan="${be(this.colSpan)}" rowspan="${be(this.rowSpan)}"><slot></slot></td>`}};Kn.styles=[Nn,T`:host{display:contents}td{all:inherit;display:table-cell;padding:var(--sc-table-td-py) var(--sc-table-td-px)}`],Wn([f({type:Number})],Kn.prototype,"colSpan",2),Wn([f({type:Number})],Kn.prototype,"rowSpan",2),Wn([f({type:String})],Kn.prototype,"align",2),Wn([f({type:String})],Kn.prototype,"vAlign",2),Wn([f({type:String})],Kn.prototype,"minWidth",2),Wn([f({type:String})],Kn.prototype,"maxWidth",2),Wn([f({type:String})],Kn.prototype,"width",2),Kn=Wn([b("sonic-td")],Kn);var Zn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;let Yn=class extends Nt{render(){return bt`<slot></slot>`}};Yn.styles=[T`:host{display:table-header-group}`],Yn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Zn(e,s,o),o})([b("sonic-thead")],Yn);var Gn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor;let Xn=class extends Nt{render(){return bt`<tbody part="tbody"><slot></slot></tbody>`}};Xn.styles=[T`:host{display:table-row-group}::slotted(sonic-tr:nth-child(odd)){background:var(--sc-table-accent-bg)}::slotted(sonic-tr:hover){background:var(--sc-table-hover-bg)}::slotted(sonic-tr:not(:last-child)){border-bottom:var(--sc-form-border-width) solid var(--sc-base-200)!important}`],Xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gn(e,s,o),o})([b("sonic-tbody")],Xn);var ta=Object.defineProperty,ea=Object.getOwnPropertyDescriptor;let sa=class extends Nt{render(){return bt`<tfoot><slot></slot></tfoot>`}};sa.styles=[T`:host{display:contents}`],sa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ea(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ta(e,s,o),o})([b("sonic-tfoot")],sa);var ia=Object.defineProperty,ra=Object.getOwnPropertyDescriptor;let oa=class extends Nt{render(){return bt`<slot></slot>`}};oa.styles=[T`:host{display:table-caption;font-size:.75rem;color:var(--sc-table-caption-color);padding:var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py))}`],oa=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ra(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ia(e,s,o),o})([b("sonic-caption")],oa);var na=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,la=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?aa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&na(e,s,o),o};let ca=class extends Nt{constructor(){super(...arguments),this.bordered=!1}render(){const t={maxHeight:this.maxHeight};return bt`<div class="table-container custom-scroll" style="${Zt(t)}"><div class="table"><slot></slot></div></div>`}};ca.styles=[gs,me,T`:host{--sc-table-fw:var(--sc-font-weight-base);--sc-table-fst:var(--sc-font-style-base);--sc-table-fs:1rem;--sc-table-border-color:var(--sc-border-color);--sc-table-caption-color:var(--sc-base-500);--sc-table-bg:var(--sc-base);--sc-table-accent-bg:var(--sc-base-50);--sc-table-hover-bg:var(--sc-base-100);--sc-table-th-fs:0.85em;--sc-table-th-fw:bold;--sc-table-th-tt:uppercase;--sc-table-th-px:var(--sc-table-td-px);--sc-table-th-py:calc(1.8 * var(--sc-table-td-py));--sc-table-td-px:0.5em;--sc-table-td-py:0.5em;display:block}:host([maxHeight]) .table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.table{width:100%;display:table;box-sizing:border-box}:host([bordered]) .table-container{border:var(--sc-border-width) solid var(--sc-table-border-color)!important}`],la([f({type:String,reflect:!0})],ca.prototype,"size",2),la([f({type:Boolean,reflect:!0})],ca.prototype,"bordered",2),la([f({type:String})],ca.prototype,"maxHeight",2),ca=la([b("sonic-table")],ca);var ha=Object.defineProperty,da=Object.getOwnPropertyDescriptor,pa=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?da(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ha(e,s,o),o};let ua=class extends(Ei(Nt)){constructor(){super(...arguments),this.key="",this.action=null}connectedCallback(){var t;const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(e),super.connectedCallback(),this.formPublisher=ce.get(null!=(t=this.getAncestorAttributeValue("headersDataProvider"))?t:this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign((t=>{"request_token"==t&&this.requestToken()})))}requestToken(){var t,e,s,i,r;if(!this.formPublisher)return;const o=(null!=(s=null!=(e=this.action)?e:null==(t=this.formPublisher.captchaAction)?void 0:t.get())?s:"submit").replace(/[^\w_/]/g,"_"),n=(null!=(r=null==(i=this.formPublisher.captchaMethod)?void 0:i.get())?r:"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:n+"//"+o}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return bt`<slot></slot>`}};pa([f()],ua.prototype,"key",2),pa([f()],ua.prototype,"action",2),ua=pa([b("sonic-captcha")],ua),window.SonicPublisherManager||(window.SonicPublisherManager=h),window.SonicDataBindObserver||(window.SonicDataBindObserver=g);const ga=ks,ba=tn;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ga,SonicModal:ba}}));