@supersoniks/concorde 3.1.16 → 3.1.19

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 (61) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +3725 -0
  3. package/concorde-core.es.js +11916 -0
  4. package/dist/concorde-core.bundle.js +3725 -0
  5. package/dist/concorde-core.es.js +11916 -0
  6. package/dist/css/docs.css +0 -0
  7. package/dist/fonts/ClashGrotesk-Bold.eot +0 -0
  8. package/dist/fonts/ClashGrotesk-Bold.ttf +0 -0
  9. package/dist/fonts/ClashGrotesk-Bold.woff +0 -0
  10. package/dist/fonts/ClashGrotesk-Bold.woff2 +0 -0
  11. package/dist/fonts/ClashGrotesk-Extralight.eot +0 -0
  12. package/dist/fonts/ClashGrotesk-Extralight.ttf +0 -0
  13. package/dist/fonts/ClashGrotesk-Extralight.woff +0 -0
  14. package/dist/fonts/ClashGrotesk-Extralight.woff2 +0 -0
  15. package/dist/fonts/ClashGrotesk-Light.eot +0 -0
  16. package/dist/fonts/ClashGrotesk-Light.ttf +0 -0
  17. package/dist/fonts/ClashGrotesk-Light.woff +0 -0
  18. package/dist/fonts/ClashGrotesk-Light.woff2 +0 -0
  19. package/dist/fonts/ClashGrotesk-Medium.eot +0 -0
  20. package/dist/fonts/ClashGrotesk-Medium.ttf +0 -0
  21. package/dist/fonts/ClashGrotesk-Medium.woff +0 -0
  22. package/dist/fonts/ClashGrotesk-Medium.woff2 +0 -0
  23. package/dist/fonts/ClashGrotesk-Regular.eot +0 -0
  24. package/dist/fonts/ClashGrotesk-Regular.ttf +0 -0
  25. package/dist/fonts/ClashGrotesk-Regular.woff +0 -0
  26. package/dist/fonts/ClashGrotesk-Regular.woff2 +0 -0
  27. package/dist/fonts/ClashGrotesk-Semibold.eot +0 -0
  28. package/dist/fonts/ClashGrotesk-Semibold.ttf +0 -0
  29. package/dist/fonts/ClashGrotesk-Semibold.woff +0 -0
  30. package/dist/fonts/ClashGrotesk-Semibold.woff2 +0 -0
  31. package/dist/fonts/ClashGrotesk-Variable.eot +0 -0
  32. package/dist/fonts/ClashGrotesk-Variable.ttf +0 -0
  33. package/dist/fonts/ClashGrotesk-Variable.woff +0 -0
  34. package/dist/fonts/ClashGrotesk-Variable.woff2 +0 -0
  35. package/dist/img/concorde-icon.svg +5 -0
  36. package/dist/img/concorde-logo.svg +1 -0
  37. package/dist/img/concorde.png +0 -0
  38. package/dist/img/concorde_def.png +0 -0
  39. package/dist/img/concorde_seuil.png.webp +0 -0
  40. package/dist/img/concorde_seuil_invert.png +0 -0
  41. package/dist/img/paul_metrand.jpg +0 -0
  42. package/dist/img/paul_metrand_xs.jpg +0 -0
  43. package/dist/svg/regular/plane.svg +1 -0
  44. package/dist/svg/solid/plane.svg +1 -0
  45. package/package.json +3 -2
  46. package/scripts/pre-publish.mjs +24 -0
  47. package/src/core/components/functional/submit/submit.md +35 -0
  48. package/src/core/components/functional/submit/submit.ts +12 -1
  49. package/src/core/components/ui/button/button.ts +94 -43
  50. package/src/core/components/ui/form/fieldset/fieldset.ts +0 -0
  51. package/src/core/components/ui/form/input/password-helper.ts +32 -12
  52. package/src/core/components/ui/form/input/same-value-helper.ts +32 -13
  53. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +5 -1
  54. package/src/core/components/ui/form/select/select.ts +1 -4
  55. package/src/core/components/ui/modal/modal.ts +0 -0
  56. package/src/core/mixins/FormCheckable.ts +57 -33
  57. package/src/core/mixins/FormElement.ts +44 -12
  58. package/src/core/utils/LocationHandler.ts +28 -12
  59. package/src/core/utils/Objects.ts +10 -0
  60. package/src/core/utils/PublisherProxy.ts +111 -21
  61. package/src/docs/search/docs-search.json +30 -0
@@ -0,0 +1,3725 @@
1
+ (function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var It,k,L,Nr,t,G;let Q=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},os=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=Q.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Te(r){return typeof r=="object"&&r!=null}const jr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let $e="sonic";typeof __SONIC_PREFIX__>"u"&&($e="sonic"+Math.floor(Math.random()*1e6));const Es=$e=="sonic"?"publisher-proxies-data":$e+"-publisher-proxies-data";let Ns=(It=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),It.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await jr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var o,n,l;if(this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;this._value_=Te(t)?t:{__value:t},this._cachedGet_=void 0;const e=Object.prototype.hasOwnProperty.call(this._value_,"__value");if(this._parentKey_&&this.parent){const c=e?this._value_.__value:this._value_;if(((o=this.parent)==null?void 0:o.get())==null&&((n=this.parent)==null?void 0:n.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:c});else{const h=[];h[Number(this._parentKey_)]=c,this.parent.set(h)}else this.parent._value_[this._parentKey_]=c}if(e)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const c in this._value_)this._value_[c]===void 0&&delete this._value_[c];if(this._proxies_.forEach((c,h)=>{this._value_[h]===void 0&&h!="_parent_"&&i[h]&&(this._value_[h]=null)}),this._publishAssignement_(),Te(this._value_))for(const c in this._value_){const h=t[c],f=Te(h)?h:{__value:h};if(!this._proxies_.has(c)){this._publishDynamicFilling_(c,h);continue}(l=this._proxies_.get(c))==null||l.set(f,!0),this._publishDynamicFilling_(c,h)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(It.instancesCounter++,this._instanceCounter_=It.instancesCounter),It.instances.set(this._instanceCounter_,this),"<"+$e+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+$e+"-publisher-proxy>"}},It.instances=new Map,It.instancesCounter=0,It),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Es),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(Es,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+Q.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Me(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+Q.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Es,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Fri Aug 30 2024 15:19:45 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);const Ts=window;Ts.SonicPublisherManager||(Ts.SonicPublisherManager=N),Ts.SonicPublisherManager.registerInstance(N.getInstance());const Ir=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Me extends Ns{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Ir.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new Me(Te(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new Me({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Te(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Fr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ns.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define($e+"-publisher-proxy",Fr)}catch{}let ns=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=Q.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,v={publisher:f,onAssign:()=>{const b=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(b.length==1&&l.variables[0].join(".")==P.substring(1)){let D=b[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<b.length;D++){let p=b[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=os.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=os[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ns.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ns);let X=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=X.traverseDotNotation;/**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */const _=r=>(t,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
6
+ * @license
7
+ * Copyright 2019 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */const as=globalThis,Ms=as.ShadowRoot&&(as.ShadyCSS===void 0||as.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,js=Symbol(),Si=new WeakMap;let Oi=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==js)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(Ms&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=Si.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Si.set(s,t))}return t}toString(){return this.cssText}};const zr=r=>new Oi(typeof r=="string"?r:r+"",void 0,js),$=(r,...t)=>{const s=r.length===1?r[0]:t.reduce((i,e,o)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+r[o+1],r[0]);return new Oi(s,r,js)},Rr=(r,t)=>{if(Ms)r.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of t){const i=document.createElement("style"),e=as.litNonce;e!==void 0&&i.setAttribute("nonce",e),i.textContent=s.cssText,r.appendChild(i)}},Di=Ms?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return zr(s)})(r):r;/**
10
+ * @license
11
+ * Copyright 2017 Google LLC
12
+ * SPDX-License-Identifier: BSD-3-Clause
13
+ */const{is:Ur,defineProperty:Vr,getOwnPropertyDescriptor:Br,getOwnPropertyNames:Hr,getOwnPropertySymbols:qr,getPrototypeOf:Wr}=Object,qt=globalThis,ki=qt.trustedTypes,Kr=ki?ki.emptyScript:"",Is=qt.reactiveElementPolyfillSupport,je=(r,t)=>r,ls={toAttribute(r,t){switch(t){case Boolean:r=r?Kr:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let s=r;switch(t){case Boolean:s=r!==null;break;case Number:s=r===null?null:Number(r);break;case Object:case Array:try{s=JSON.parse(r)}catch{s=null}}return s}},Fs=(r,t)=>!Ur(r,t),Li={attribute:!0,type:String,converter:ls,reflect:!1,hasChanged:Fs};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),qt.litPropertyMetadata??(qt.litPropertyMetadata=new WeakMap);let Ce=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=Li){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),e=this.getPropertyDescriptor(t,i,s);e!==void 0&&Vr(this.prototype,t,e)}}static getPropertyDescriptor(t,s,i){const{get:e,set:o}=Br(this.prototype,t)??{get(){return this[s]},set(n){this[s]=n}};return{get(){return e==null?void 0:e.call(this)},set(n){const l=e==null?void 0:e.call(this);o.call(this,n),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Li}static _$Ei(){if(this.hasOwnProperty(je("elementProperties")))return;const t=Wr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(je("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(je("properties"))){const s=this.properties,i=[...Hr(s),...qr(s)];for(const e of i)this.createProperty(e,s[e])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,e]of s)this.elementProperties.set(i,e)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const e=this._$Eu(s,i);e!==void 0&&this._$Eh.set(e,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const e of i)s.unshift(Di(e))}else t!==void 0&&s.push(Di(t));return s}static _$Eu(t,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(s=>s(this))}addController(t){var s;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var s;(s=this._$EO)==null||s.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Rr(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){var o;const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(e!==void 0&&i.reflect===!0){const n=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:ls).toAttribute(s,i.type);this._$Em=t,n==null?this.removeAttribute(e):this.setAttribute(e,n),this._$Em=null}}_$AK(t,s){var o;const i=this.constructor,e=i._$Eh.get(t);if(e!==void 0&&this._$Em!==e){const n=i.getPropertyOptions(e),l=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:ls;this._$Em=e,this[e]=l.fromAttribute(s,n.type),this._$Em=null}}requestUpdate(t,s,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Fs)(this[t],s))return;this.P(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[o,n]of e)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(e=>{var o;return(o=e.hostUpdate)==null?void 0:o.call(e)}),this.update(s)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(s)}willUpdate(t){}_$AE(t){var s;(s=this._$EO)==null||s.forEach(i=>{var e;return(e=i.hostUpdated)==null?void 0:e.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(s=>this._$EC(s,this[s]))),this._$EU()}updated(t){}firstUpdated(t){}};Ce.elementStyles=[],Ce.shadowRootOptions={mode:"open"},Ce[je("elementProperties")]=new Map,Ce[je("finalized")]=new Map,Is==null||Is({ReactiveElement:Ce}),(qt.reactiveElementVersions??(qt.reactiveElementVersions=[])).push("2.0.4");/**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */const Zr={attribute:!0,type:String,converter:ls,reflect:!1,hasChanged:Fs},Yr=(r=Zr,t,s)=>{const{kind:i,metadata:e}=s;let o=globalThis.litPropertyMetadata.get(e);if(o===void 0&&globalThis.litPropertyMetadata.set(e,o=new Map),o.set(s.name,r),i==="accessor"){const{name:n}=s;return{set(l){const c=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,c,r)},init(l){return l!==void 0&&this.P(n,void 0,r),l}}}if(i==="setter"){const{name:n}=s;return function(l){const c=this[n];t.call(this,l),this.requestUpdate(n,c,r)}}throw Error("Unsupported decorator location: "+i)};function a(r){return(t,s)=>typeof s=="object"?Yr(r,t,s):((i,e,o)=>{const n=e.hasOwnProperty(o);return e.constructor.createProperty(o,n?{...i,wrapped:!0}:i),n?Object.getOwnPropertyDescriptor(e,o):void 0})(r,t,s)}/**
18
+ * @license
19
+ * Copyright 2017 Google LLC
20
+ * SPDX-License-Identifier: BSD-3-Clause
21
+ */function M(r){return a({...r,state:!0,attribute:!1})}/**
22
+ * @license
23
+ * Copyright 2017 Google LLC
24
+ * SPDX-License-Identifier: BSD-3-Clause
25
+ */const zs=(r,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,s),s);/**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */function ie(r,t){return(s,i,e)=>{const o=n=>{var l;return((l=n.renderRoot)==null?void 0:l.querySelector(r))??null};return zs(s,i,{get(){return o(this)}})}}/**
30
+ * @license
31
+ * Copyright 2021 Google LLC
32
+ * SPDX-License-Identifier: BSD-3-Clause
33
+ */function re(r){return(t,s)=>{const{slot:i,selector:e}=r??{},o="slot"+(i?`[name=${i}]`:":not([name])");return zs(t,s,{get(){var c;const n=(c=this.renderRoot)==null?void 0:c.querySelector(o),l=(n==null?void 0:n.assignedElements(r))??[];return e===void 0?l:l.filter(h=>h.matches(e))}})}}/**
34
+ * @license
35
+ * Copyright 2017 Google LLC
36
+ * SPDX-License-Identifier: BSD-3-Clause
37
+ */function it(r){return(t,s)=>{const{slot:i}=r??{},e="slot"+(i?`[name=${i}]`:":not([name])");return zs(t,s,{get(){var n;const o=(n=this.renderRoot)==null?void 0:n.querySelector(e);return(o==null?void 0:o.assignedNodes(r))??[]}})}}/**
38
+ * @license
39
+ * Copyright 2017 Google LLC
40
+ * SPDX-License-Identifier: BSD-3-Clause
41
+ */const Ie=globalThis,cs=Ie.trustedTypes,Ei=cs?cs.createPolicy("lit-html",{createHTML:r=>r}):void 0,Rs="$lit$",zt=`lit$${Math.random().toFixed(9).slice(2)}$`,Us="?"+zt,Gr=`<${Us}>`,oe=document,Fe=()=>oe.createComment(""),ze=r=>r===null||typeof r!="object"&&typeof r!="function",Vs=Array.isArray,Ni=r=>Vs(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",Bs=`[
42
+ \f\r]`,Re=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ti=/-->/g,Mi=/>/g,ne=RegExp(`>|${Bs}(?:([^\\s"'>=/]+)(${Bs}*=${Bs}*(?:[^
43
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ji=/'/g,Ii=/"/g,Fi=/^(?:script|style|textarea|title)$/i,Qr=r=>(t,...s)=>({_$litType$:r,strings:t,values:s}),g=Qr(1),bt=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),zi=new WeakMap,ae=oe.createTreeWalker(oe,129);function Ri(r,t){if(!Vs(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ei!==void 0?Ei.createHTML(t):t}const Ui=(r,t)=>{const s=r.length-1,i=[];let e,o=t===2?"<svg>":t===3?"<math>":"",n=Re;for(let l=0;l<s;l++){const c=r[l];let h,d,f=-1,m=0;for(;m<c.length&&(n.lastIndex=m,d=n.exec(c),d!==null);)m=n.lastIndex,n===Re?d[1]==="!--"?n=Ti:d[1]!==void 0?n=Mi:d[2]!==void 0?(Fi.test(d[2])&&(e=RegExp("</"+d[2],"g")),n=ne):d[3]!==void 0&&(n=ne):n===ne?d[0]===">"?(n=e??Re,f=-1):d[1]===void 0?f=-2:(f=n.lastIndex-d[2].length,h=d[1],n=d[3]===void 0?ne:d[3]==='"'?Ii:ji):n===Ii||n===ji?n=ne:n===Ti||n===Mi?n=Re:(n=ne,e=void 0);const v=n===ne&&r[l+1].startsWith("/>")?" ":"";o+=n===Re?c+Gr:f>=0?(i.push(h),c.slice(0,f)+Rs+c.slice(f)+zt+v):c+zt+(f===-2?l:v)}return[Ri(r,o+(r[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Ue{constructor({strings:t,_$litType$:s},i){let e;this.parts=[];let o=0,n=0;const l=t.length-1,c=this.parts,[h,d]=Ui(t,s);if(this.el=Ue.createElement(h,i),ae.currentNode=this.el.content,s===2||s===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(e=ae.nextNode())!==null&&c.length<l;){if(e.nodeType===1){if(e.hasAttributes())for(const f of e.getAttributeNames())if(f.endsWith(Rs)){const m=d[n++],v=e.getAttribute(f).split(zt),b=/([.?@])?(.*)/.exec(m);c.push({type:1,index:o,name:b[2],strings:v,ctor:b[1]==="."?Bi:b[1]==="?"?Hi:b[1]==="@"?qi:Ve}),e.removeAttribute(f)}else f.startsWith(zt)&&(c.push({type:6,index:o}),e.removeAttribute(f));if(Fi.test(e.tagName)){const f=e.textContent.split(zt),m=f.length-1;if(m>0){e.textContent=cs?cs.emptyScript:"";for(let v=0;v<m;v++)e.append(f[v],Fe()),ae.nextNode(),c.push({type:2,index:++o});e.append(f[m],Fe())}}}else if(e.nodeType===8)if(e.data===Us)c.push({type:2,index:o});else{let f=-1;for(;(f=e.data.indexOf(zt,f+1))!==-1;)c.push({type:7,index:o}),f+=zt.length-1}o++}}static createElement(t,s){const i=oe.createElement("template");return i.innerHTML=t,i}}function le(r,t,s=r,i){var n,l;if(t===bt)return t;let e=i!==void 0?(n=s.o)==null?void 0:n[i]:s.l;const o=ze(t)?void 0:t._$litDirective$;return(e==null?void 0:e.constructor)!==o&&((l=e==null?void 0:e._$AO)==null||l.call(e,!1),o===void 0?e=void 0:(e=new o(r),e._$AT(r,s,i)),i!==void 0?(s.o??(s.o=[]))[i]=e:s.l=e),e!==void 0&&(t=le(r,e._$AS(r,t.values),e,i)),t}let Vi=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,e=((t==null?void 0:t.creationScope)??oe).importNode(s,!0);ae.currentNode=e;let o=ae.nextNode(),n=0,l=0,c=i[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new hs(o,o.nextSibling,this,t):c.type===1?h=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(h=new Wi(o,this,t)),this._$AV.push(h),c=i[++l]}n!==(c==null?void 0:c.index)&&(o=ae.nextNode(),n++)}return ae.currentNode=oe,e}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}},hs=class Mr{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,s,i,e){this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=e,this.v=(e==null?void 0:e.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=le(this,t,s),ze(t)?t===C||t==null||t===""?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==bt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ni(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==C&&ze(this._$AH)?this._$AA.nextSibling.data=t:this.T(oe.createTextNode(t)),this._$AH=t}$(t){var o;const{values:s,_$litType$:i}=t,e=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Ue.createElement(Ri(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===e)this._$AH.p(s);else{const n=new Vi(e,this),l=n.u(this.options);n.p(s),this.T(l),this._$AH=n}}_$AC(t){let s=zi.get(t.strings);return s===void 0&&zi.set(t.strings,s=new Ue(t)),s}k(t){Vs(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,e=0;for(const o of t)e===s.length?s.push(i=new Mr(this.O(Fe()),this.O(Fe()),this,this.options)):i=s[e],i._$AI(o),e++;e<s.length&&(this._$AR(i&&i._$AB.nextSibling,e),s.length=e)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var s;this._$AM===void 0&&(this.v=t,(s=this._$AP)==null||s.call(this,t))}};class Ve{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,e,o){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=s,this._$AM=e,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=C}_$AI(t,s=this,i,e){const o=this.strings;let n=!1;if(o===void 0)t=le(this,t,s,0),n=!ze(t)||t!==this._$AH&&t!==bt,n&&(this._$AH=t);else{const l=t;let c,h;for(t=o[0],c=0;c<o.length-1;c++)h=le(this,l[i+c],s,c),h===bt&&(h=this._$AH[c]),n||(n=!ze(h)||h!==this._$AH[c]),h===C?t=C:t!==C&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!e&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Bi extends Ve{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}class Hi extends Ve{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==C)}}class qi extends Ve{constructor(t,s,i,e,o){super(t,s,i,e,o),this.type=5}_$AI(t,s=this){if((t=le(this,t,s,0)??C)===bt)return;const i=this._$AH,e=t===C&&i!==C||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==C&&(i===C||e);e&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class Wi{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){le(this,t)}}const Jr={M:Rs,P:zt,A:Us,C:1,L:Ui,R:Vi,D:Ni,V:le,I:hs,H:Ve,N:Hi,U:qi,B:Bi,F:Wi},Hs=Ie.litHtmlPolyfillSupport;Hs==null||Hs(Ue,hs),(Ie.litHtmlVersions??(Ie.litHtmlVersions=[])).push("3.2.0");const Xr=(r,t,s)=>{const i=(s==null?void 0:s.renderBefore)??t;let e=i._$litPart$;if(e===void 0){const o=(s==null?void 0:s.renderBefore)??null;i._$litPart$=e=new hs(t.insertBefore(Fe(),o),o,void 0,s??{})}return e._$AI(r),e};/**
44
+ * @license
45
+ * Copyright 2020 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */const{I:to}=Jr,eo=r=>r.strings===void 0,Ki=()=>document.createComment(""),Be=(r,t,s)=>{var o;const i=r._$AA.parentNode,e=t===void 0?r._$AB:t._$AA;if(s===void 0){const n=i.insertBefore(Ki(),e),l=i.insertBefore(Ki(),e);s=new to(n,l,r,r.options)}else{const n=s._$AB.nextSibling,l=s._$AM,c=l!==r;if(c){let h;(o=s._$AQ)==null||o.call(s,r),s._$AM=r,s._$AP!==void 0&&(h=r._$AU)!==l._$AU&&s._$AP(h)}if(n!==e||c){let h=s._$AA;for(;h!==n;){const d=h.nextSibling;i.insertBefore(h,e),h=d}}}return s},ce=(r,t,s=r)=>(r._$AI(t,s),r),so={},io=(r,t=so)=>r._$AH=t,ro=r=>r._$AH,qs=r=>{var i;(i=r._$AP)==null||i.call(r,!1,!0);let t=r._$AA;const s=r._$AB.nextSibling;for(;t!==s;){const e=t.nextSibling;t.remove(),t=e}};/**
48
+ * @license
49
+ * Copyright 2017 Google LLC
50
+ * SPDX-License-Identifier: BSD-3-Clause
51
+ */const he={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},de=r=>(...t)=>({_$litDirective$:r,values:t});let Ae=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this.t=t,this._$AM=s,this.i=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};/**
52
+ * @license
53
+ * Copyright 2017 Google LLC
54
+ * SPDX-License-Identifier: BSD-3-Clause
55
+ */const He=(r,t)=>{var i;const s=r._$AN;if(s===void 0)return!1;for(const e of s)(i=e._$AO)==null||i.call(e,t,!1),He(e,t);return!0},ds=r=>{let t,s;do{if((t=r._$AM)===void 0)break;s=t._$AN,s.delete(r),r=t}while((s==null?void 0:s.size)===0)},Zi=r=>{for(let t;t=r._$AM;r=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(r))break;s.add(r),ao(t)}};function oo(r){this._$AN!==void 0?(ds(this),this._$AM=r,Zi(this)):this._$AM=r}function no(r,t=!1,s=0){const i=this._$AH,e=this._$AN;if(e!==void 0&&e.size!==0)if(t)if(Array.isArray(i))for(let o=s;o<i.length;o++)He(i[o],!1),ds(i[o]);else i!=null&&(He(i,!1),ds(i));else He(this,r)}const ao=r=>{r.type==he.CHILD&&(r._$AP??(r._$AP=no),r._$AQ??(r._$AQ=oo))};class Ws extends Ae{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),Zi(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,e;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(e=this.disconnected)==null||e.call(this)),s&&(He(this,t),ds(this))}setValue(t){if(eo(this.t))this.t._$AI(t,this);else{const s=[...this.t._$AH];s[this.i]=t,this.t._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
56
+ * @license
57
+ * Copyright 2017 Google LLC
58
+ * SPDX-License-Identifier: BSD-3-Clause
59
+ */let w=class extends Ce{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Xr(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return bt}};w._$litElement$=!0,w.finalized=!0,(Nr=globalThis.litElementHydrateSupport)==null||Nr.call(globalThis,{LitElement:w});const Ks=globalThis.litElementPolyfillSupport;Ks==null||Ks({LitElement:w}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");function ps(r){if(typeof r=="function"){const t=r;return N.collectModifiedPublisher(),t(),N.getModifiedPublishers()||new Set}if(typeof r=="string"){const t=r.split("."),s=t.shift()||"";let i=N.get(s);i=X.traverse(i,t);const e=new Set;return e.add(i),e}return new Set([r])}class lo extends Ws{constructor(t){var s;super(t),this.observables=new Set,this.onAssign=i=>{this.setValue(i)},this.node=(s=t.options)==null?void 0:s.host}unsubscribe(){this.observables.forEach(t=>t.offAssign(this.onAssign))}render(t){return this.observable!==t&&(this.observable=t,this.isConnected&&this.subscribe(t)),bt}subscribe(t){this.unsubscribe(),typeof t=="function"?this.onAssign=()=>{this.setValue(t())}:this.onAssign=s=>{this.setValue(s)},this.observables=ps(t),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}disconnected(){this.unsubscribe()}reconnected(){this.observable&&this.subscribe(this.observable)}}const Yi=de(lo),co=Yi,ho=Yi,po=r=>ps(r).values().next().value.get(),Gi=(r,t)=>{const s=ps(r).values().next().value;if(t!==void 0){const i=s.get();X.isEmpty(i)&&s.set(t)}return s},uo=Gi,Qi=Gi,fo=(r,t)=>{ps(r).values().next().value.set(t)},F=class F{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.serviceURL=t.serviceURL,this.blockUntilDone=t.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,t.token&&(this.token=t.token),this.tokenProvider=t.tokenProvider,this.authToken=t.authToken,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials,this.cache=t.cache||"default"}set token(t){if(this._token=t,!t){F.tokens.delete(this.serviceURL);return}F.invalidTokens.includes(t)||F.tokens.set(this.serviceURL,t)}get token(){return F.invalidTokens.includes(this._token)?F.tokens.get(this.serviceURL):this._token}handleInvalidToken(t){t&&(F.invalidTokens.includes(t)||(F.invalidTokens.push(t),this.token=null))}async handleResult(t,s){var n;F.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=t;const i=(n=t.headers.get("content-type"))==null?void 0:n.toLowerCase(),e=t.status;let o={};if(!i||i.indexOf("text/")==0)o={text:await t.text()};else try{o=await t.json()}catch{o={}}return this.addHTTPResponse&&X.isObject(o)&&(o._sonic_http_response_=t),e===498&&!F.failledTokenUpdates.has(this.serviceURL)&&(this.handleInvalidToken(this.token),s.apiMethod==="get"?o=await this[s.apiMethod](s.path,s.additionalHeaders):o=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders)),o}async auth(){if(this.token)return;if(F.tokens.has(this.serviceURL)){this.token=F.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let t={};this.userName&&this.password?t={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(t={Authorization:"Bearer "+this.authToken});const s=new URL(this.serviceURL),i=s.protocol+"//"+s.host,e=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:t,credentials:this.credentials});try{const o=await e.json();o.token?this.token=o.token:F.failledTokenUpdates.set(this.serviceURL,!0)}catch{F.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,s){var f;const i=N.get(t),e=new URLSearchParams(s.split("?")[1]||""),o=i.get();let n=[];Array.isArray(o)?n=o:n=[o];const l=[];let c=Number.POSITIVE_INFINITY,h=0,d=0;if(e.has("limit")&&(c=parseInt(e.get("limit")||"0"),d++),e.has("offset")&&(h=parseInt(e.get("offset")||"0"),d++),d>0&&(e.delete("limit"),e.delete("offset")),e.size===0)return n.slice(h,h+c);for(const[m,v]of e.entries()){const b=v.split(",").map(P=>P.trim());for(const P of b)for(const S of n)if(typeof S!="object")isNaN(+S)?S.toString().toLowerCase().includes(v.toLowerCase())&&l.push(S):S===v&&l.push(S);else{const D=S;if(!D[m])continue;isNaN(+D[m])?(f=D[m])!=null&&f.toString().toLowerCase().includes(P.toLowerCase())&&l.push(S):D[m]===P&&l.push(S)}}return l.slice(h,h+c)}firstCallDone(){return new Promise(t=>{if(!F.firstCallDoneFlags.has(this.serviceURL))F.firstCallDoneFlags.set(this.serviceURL,"loading"),t(!0);else{const s=()=>{[void 0,"loading"].includes(F.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):t(!0)};s()}})}async get(t,s){await this.firstCallDone(),this.blockUntilDone&&F.firstCallDoneFlags.set(this.serviceURL,"loading");const i=/dataProvider\((.*?)\)(.*?)$/;if(i.test(t)){const h=t.match(i);if(!h)throw new Error("dataProvider path is not valid");return await this.localGet(h[1],h[2])}const e={apiMethod:"get",path:t,additionalHeaders:s},o=await this.createHeaders(s),n=this.computeURL(t),l=JSON.stringify({url:n,headers:o});if(!F.loadingGetPromises.has(l)){const h=new Promise(async d=>{try{const f=await fetch(n,{headers:o,credentials:this.credentials,cache:this.cache}),m=await this.handleResult(f,e);d(m)}catch{d(null)}});F.loadingGetPromises.set(l,h)}const c=await F.loadingGetPromises.get(l);return F.loadingGetPromises.delete(l),c}async createHeaders(t){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=Q.getLanguage(),t&&Object.assign(s,t),s}computeURL(t,s={}){let i="";t.startsWith("http")?i=t:i=this.serviceURL+"/"+t,i.startsWith("http")||(i=window.location.origin+i);const e=new URL(i);for(const o in s)e.searchParams.set(o,s[o]);return e.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,s,i="POST",e){const o={apiMethod:"send",path:t,additionalHeaders:e,method:i,data:s},n=await this.createHeaders(e);n.Accept="application/json",n["Content-Type"]="application/json";const l=await fetch(this.computeURL(t),{headers:n,credentials:this.credentials,method:i,body:JSON.stringify(s)});return await this.handleResult(l,o)}async submitFormData(t,s,i="POST",e){const o={apiMethod:"submitFormData",path:t,additionalHeaders:e,method:i,data:s},n=await this.createHeaders(e);n.Accept="application/json";const l=new FormData,c=s;for(const d in c)l.set(d,c[d]);const h=await fetch(this.computeURL(t),{headers:n,credentials:this.credentials,method:i,body:l});return await this.handleResult(h,o)}async put(t,s,i){return this.send(t,s,"PUT",i)}async post(t,s,i){return this.send(t,s,"POST",i)}async patch(t,s,i){return this.send(t,s,"PATCH",i)}async delete(t,s,i){return this.send(t,s,"delete",i)}};F.loadingGetPromises=new Map,F.tokens=new Map,F.invalidTokens=[],F.failledTokenUpdates=new Map,F.firstCallDoneFlags=new Map;let Se=F;/**
60
+ * @license
61
+ * Copyright 2017 Google LLC
62
+ * SPDX-License-Identifier: BSD-3-Clause
63
+ */class Zs extends Ae{constructor(t){if(super(t),this.it=C,t.type!==he.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===C||t==null)return this._t=void 0,this.it=t;if(t===bt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const s=[t];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}Zs.directiveName="unsafeHTML",Zs.resultType=1;const I=de(Zs),Ys=new Map,Ji=r=>{if(!r)return null;const t=Q.getApiConfiguration(r),s=Q.getAncestorAttributeValue(r,"wordingProvider"),i=Q.getAncestorAttributeValue(r,"wordingVersionProvider"),e={apiConfiguration:t,wordingProvider:s,wordingVersionProvider:i};let o=null;for(const[n,l]of Ys)if(X.deepEqual(n,e)){o=l;break}return o||(o={api:new Se(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:i,apiCallKey:e},Ys.set(e,o)),o},Xi="",H=class H extends Ws{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=s=>{const i=this.useUnsafeHTML?I(s):s;this.setValue(i)},this.node=t.options.host}unsubscribe(){H.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,s=!1){return this.useUnsafeHTML=s,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),bt}static async callApi(t,s,i=!0,e){if(await N.getInstance().isLocalStrorageReady,H.firstCall){H.firstCall=!1;const d=Object.keys(H.publisher.get());for(const f of d)H.publisher.get()[f]===Xi&&delete H.publisher[f]}if(t){const d=Q.getAncestorAttributeValue(t,"wordingVersionProvider");d&&Qi(d).onAssign(H.handleVersionProvider(t))}let o=H.publisher.get()["wording_"+s]!=null;const n=e||Ji(t);if(!n)return;if(o&&s!==""){n.translatedKeys.add(s);return}n.callIndex++;const l=n.callIndex,c=n.wordingProvider??"";if(!c&&i){window.setTimeout(async()=>{H.callApi(null,s,!1,n)},1e3);return}const h=n.api;window.queueMicrotask(async()=>{if(o=H.publisher["wording_"+s].get()!=null,!o&&s!==""&&(n.keysToTranslate.add(s),H.publisher["wording_"+s]=Xi),l!==n.callIndex)return;const d=Array.from(n.keysToTranslate);if(!d.length)return;const f=c.split("?"),m=f.shift(),v=(f.length>0?f.join("?")+"&":"")+"labels[]="+d.join("&labels[]="),b=m+"?"+v;n.translatedKeys=new Set([...n.translatedKeys,...n.keysToTranslate]),n.keysToTranslate.clear();const P=await h.get(b);for(const S in P)H.publisher["wording_"+S]=P[S]})}static handleVersionProvider(t){const s=Ji(t);if(!s)return;if(H.versionProviderHandlers.has(s))return H.versionProviderHandlers.get(s);const i=function(e){if(!s.wordingVersionProvider)return;const n=H.publisher.get().__wording_versions__??[];if(e==null)return;const l=n.find(c=>c.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};if(n.includes(l)||n.push(l),e!==l.version){l.version=e,H.publisher.set({__wording_versions__:n});for(const c of Ys.values())c.keysToTranslate=new Set(c.translatedKeys),c.keysToTranslate.size>0&&H.callApi(null,"",!1,c)}};return H.versionProviderHandlers.set(s,i),i}subscribe(t){this.unsubscribe(),H.publisher["wording_"+t].onAssign(this.onAssign),H.callApi(this.node,t)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};H.publisher=N.get("sonic-wording",{localStorageMode:"enabled"}),H.firstCall=!0,H.versionProviderHandlers=new Map;let qe=H;var go=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,Rt=(r,t,s,i)=>{for(var e=i>1?void 0:i?mo(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&go(t,s,e),e};let us=!1,Gs=new Set;const Y=(r,t)=>{var e;const s=(e=class extends r{constructor(...n){super(),this.collectDependenciesVersion=0,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=l=>{this.props=l}}hasAncestorAttribute(n){return this.getAncestorAttributeValue(n)!=null}getAncestorAttributeValue(n){return Q.getAncestorAttributeValue(this,n)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(n){typeof n=="string"&&["{","["].includes(n.trim().charAt(0))&&(n=JSON.parse(n)),n!=this._props&&(this._props=n,this.publisher&&this.publisher.get()!=n&&this.publisher.set(n),this.requestUpdate())}updated(n){super.updated(n);const c=[...(this.shadowRoot||this).children].filter(d=>d.tagName!="STYLE"),h=this.displayContents?"contents":c.length==0?"none":null;h?this.style.display=h:this.style.removeProperty("display")}connectedCallback(){if(e.instanceCounter++,this.hasAttribute("lazyRendering")){const n={root:null,threshold:.9};let l=!0;const c=new IntersectionObserver(h=>{for(const d of h)if(l&&d.isIntersecting){this.addDebugger(),l=!1,this.initWording(),this.initPublisher(),c.disconnect();break}},n);c.observe(this)}else this.initWording(),this.initPublisher(),this.addDebugger();super.connectedCallback()}disconnectedCallback(){var n;this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),qe.publisher.stopTemplateFilling(this),this.onAssign&&((n=this.publisher)==null||n.offAssign(this.onAssign))}addDebugger(){var n;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const l=this.debug.style;l.position="fixed",l.top="0",l.right="0",l.margin="auto",l.borderRadius=".7rem",l.backgroundColor="#0f1729",l.color="#c5d4f9",l.padding="16px 16px",l.margin="16px 16px",l.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",l.overflowY="auto",l.zIndex="99999999",l.maxHeight="calc(100vh - 32px)",l.fontFamily="Consolas, monospace",l.maxWidth="min(50vw,25rem)",l.fontSize="12px",l.minWidth="300px",l.overflowWrap="break-word",l.resize="vertical"}this.addEventListener("click",l=>{l.ctrlKey&&(l.preventDefault(),us=!us)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{us||this.removeDebugger(),document.body.appendChild(this.debug),Gs.add(this.debug)}),this.addEventListener("mouseout",()=>{us||this.removeDebugger()}),(n=this.publisher)==null||n.onInternalMutation(()=>{var l;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
64
+ <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
65
+ Variable disponible dans la console<br>
66
+ ctrl + Clique : épingler / désépingler
67
+ </div>
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify((l=this.publisher)==null?void 0:l.get(),null," ")}</pre>`})}}removeDebugger(){Gs.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),Gs=new Set}getApiConfiguration(){return Q.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of n)l.indexOf("wording_")==0&&qe.callApi(this,l.substring(8));qe.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return ns.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=N.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+e.instanceCounter),l){this.bindPublisher&&n.set(l,this.bindPublisher());let c=n.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=X.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}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))}},e.instanceCounter=0,e);return Rt([a({type:Number})],s.prototype,"collectDependenciesVersion",2),Rt([a({type:Boolean})],s.prototype,"displayContents",2),Rt([a({type:Boolean})],s.prototype,"noAutoFill",2),Rt([a({type:Boolean})],s.prototype,"forceAutoFill",2),Rt([a({type:Object})],s.prototype,"propertyMap",2),Rt([a({type:String,attribute:"data-title"})],s.prototype,"title",2),Rt([a({reflect:!0})],s.prototype,"dataProvider",2),Rt([a()],s.prototype,"bindPublisher",2),Rt([a()],s.prototype,"props",1),s};var bo=Object.defineProperty,vo=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&bo(t,s,e),e};const We=r=>{class t extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return vo([a({type:Array})],t.prototype,"templates"),t};var yo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,K=(r,t,s,i)=>{for(var e=i>1?void 0:i?wo(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&yo(t,s,e),e};const _o="sonic-date";let q=class extends Y(We(w)){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.hide_hours=!1,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,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(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.split("%s").map(s=>s.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=Q.getLanguage(),super.connectedCallback()}getDatesParts(r,t,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=os.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}render(){if(!this.renderIf||(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 C;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const s=this.start_date;this.start_date=this.end_date,this.end_date=s}const r={year:this.year,month:this.month,day:this.day,hour12:this.hour12};this.weekday!=="hidden"&&(r.weekday=this.weekday),this.hour!=="hidden"&&(r.hour=this.hour),this.minute!=="hidden"&&(r.minute=this.minute),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.start_date,this.end_date,r);return I(`${t.map(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};K([a()],q.prototype,"wording_billet_periode_validite",1),K([a({type:Boolean})],q.prototype,"designMode",2),K([a({type:String})],q.prototype,"time_zone",2),K([a({type:Number})],q.prototype,"date",2),K([a({type:String})],q.prototype,"date_string",2),K([a({type:String})],q.prototype,"start_date_string",2),K([a({type:String})],q.prototype,"end_date_string",2),K([a({type:Number})],q.prototype,"start_date",2),K([a({type:Boolean})],q.prototype,"hide_hours",2),K([a({type:Number})],q.prototype,"end_date",2),K([a({type:String})],q.prototype,"era",2),K([a({type:String})],q.prototype,"year",2),K([a({type:String})],q.prototype,"month",2),K([a({type:String})],q.prototype,"day",2),K([a({type:String})],q.prototype,"weekday",2),K([a({type:String})],q.prototype,"hour",2),K([a({type:Boolean})],q.prototype,"hour12",2),K([a({type:String})],q.prototype,"minute",2),K([a({type:String})],q.prototype,"language",2),K([a({type:Boolean})],q.prototype,"renderIf",2),K([a({type:Boolean})],q.prototype,"now",2),q=K([_(_o)],q);let rt=(G=class{static listen(){var s;if(!G.listening)return;const t=(s=document.location)==null?void 0:s.href.replace(document.location.origin,"");G.prevURL&&G.prevURL!=t&&(G.prevURL=t,G.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(G.listen)}static offChange(t){const s=G.listeners.indexOf(t);s!=-1&&(G.listeners.splice(s,1),G.listeners.length==0&&(G.listening=!1))}static onChange(t){G.listening||(G.listening=!0,G.listen()),G.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,f=(s||d).toString(),v=i.indexOf("http")==0?new URL(i).origin!=d:!1,b=i=="",P=history.length<3,S=b&&P,D=f!=document.location.href;if(v&&D||S){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(f)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),l=[];let c="";for(const d of n)d!=c&&l.push(d),c=d;e="/"+l.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:n=o.href.indexOf(e.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},G.listeners=[],G.listening=!1,G.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),G);/**
69
+ * @license
70
+ * Copyright 2018 Google LLC
71
+ * SPDX-License-Identifier: BSD-3-Clause
72
+ */const tr="important",xo=" !"+tr,ut=de(class extends Ae{constructor(r){var t;if(super(r),r.type!==he.ATTRIBUTE||r.name!=="style"||((t=r.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((t,s)=>{const i=r[s];return i==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(r,[t]){const{style:s}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in t){const e=t[i];if(e!=null){this.ft.add(i);const o=typeof e=="string"&&e.endsWith(xo);i.includes("-")||o?s.setProperty(i,o?e.slice(0,-11):e,o?tr:""):s[i]=e}}return bt}});var Po=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,St=(r,t,s,i)=>{for(var e=i>1?void 0:i?$o(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Po(t,s,e),e};const fs=new Map,Oe=r=>{class t extends r{constructor(...i){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=e=>{this.setValueFromPublisher(e)},this.onFormValueAssign=async e=>{this.setFormValueFromPublisher(e)},this.onFormDataInValidate=()=>{const e=this.getFormPublisher();e&&e.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(i){this.hasAttribute("name")&&!this.forceAutoFill&&(i=this.getAttribute("name")),this._name=i,this.requestUpdate()}validateFormElement(){}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?N.get(this.formDataProvider):null}setFormPublisherValue(i){const e=this.getFormPublisher();e&&ht(e,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?ht(i,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(i){this.value=i}setFormValueFromPublisher(i){this.value=i}get value(){return this._value}set value(i){i==null&&(i=""),X.isObject(i)&&Object.prototype.hasOwnProperty.call(i,"__value")&&i._value==null&&(i=""),this._value!=i&&(this._value=i,this.updateDataValue(),this.requestUpdate())}initPublisher(){let i=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&ht(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&i&&ht(i,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&&ht(this.publisher,this._name).onAssign(this.onValueAssign),i=this.getFormPublisher(),this._name&&i&&(ht(i,this._name).onAssign(this.onFormValueAssign),i.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav");if(!i)return;const e=i.split(" "),o=e[0];if(!o)return;for(const l of e){fs.has(l)||fs.set(l,[]);const c=fs.get(l);(c==null?void 0:c.indexOf(this))==-1&&c.push(this)}const n=fs.get(o);this.addEventListener("keydown",l=>{var v;const c=l;if(!["ArrowDown","ArrowUp"].includes(c.key))return;const h="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",d=n==null?void 0:n.filter(b=>{var D;const P=(D=b.shadowRoot)==null?void 0:D.querySelector(h);if(!P)return!1;const S=window.getComputedStyle(P);return S.display!=="none"&&S.display!==""&&S.pointerEvents!="none"&&S.visibility!=="hidden"&&P.getBoundingClientRect().width>0});let f=null;if(c.key=="ArrowDown"&&d){const b=d.indexOf(this);b==d.length-1?f=d[0]:f=d[b+1]}else if(c.key=="ArrowUp"&&d){const b=d.indexOf(this);b==0?f=d[d.length-1]:f=d[b-1]}const m=(v=f==null?void 0:f.shadowRoot)==null?void 0:v.querySelector(h);m&&m.focus&&(m.focus(),l.preventDefault(),l.stopPropagation())})}focus(){var e;const i=(e=this.shadowRoot)==null?void 0:e.querySelector("[data-form-element]");i==null||i.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),this.value&&this.setAttribute("value",this.value),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&ht(this.publisher,this._name).offAssign(this.onValueAssign);const i=this.getFormPublisher();this._name&&i&&(ht(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return St([a({type:Boolean,reflect:!0})],t.prototype,"touched",2),St([a({type:Boolean})],t.prototype,"error",2),St([a({type:Boolean})],t.prototype,"autofocus",2),St([a({type:Boolean})],t.prototype,"required",2),St([a({type:Boolean})],t.prototype,"forceAutoFill",2),St([a({type:Boolean})],t.prototype,"disabled",2),St([a({type:String,attribute:"data-aria-label"})],t.prototype,"ariaLabel",2),St([a({type:String,attribute:"data-aria-labelledby"})],t.prototype,"ariaLabelledby",2),St([a()],t.prototype,"name",1),St([a()],t.prototype,"value",1),t};let Co=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},Ao=class Pe{static areEqual(t,s){return t.length===s.length?t.every((i,e)=>i===s[e]):!1}static from2d(t){return{to1D:()=>{let s=[];return t.forEach(i=>s=s.concat(i)),this.from(s)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(t.length<1)return!0;const i=(t[0]||{})[s];return t.every(e=>(e||{})[s]==i)}})})}),value:()=>({forKey:s=>Pe.from(t.map(i=>i[s]))}),copy:()=>({fromKey:s=>({toKey:i=>{t.forEach(e=>{e[i]=Array.isArray(e[s])?[...e[s]]:typeof e[s]=="object"&&e[s]!=null?{...e[s]}:e[s]})}})})}),map:s=>Pe.from(t.map(s)),filter:s=>Pe.from(t.filter(s)),find:s=>t.find(s),some:s=>t.some(s),every:s=>t.every(s),group:()=>({byKey:s=>{const i=[],e=new Map;for(const o of t){const n=o[s];if(!e.has(n)){const l=i.length;e.set(n,l);const c={items:[]};c[s]=n,i.push(c)}i[e.get(n)].items.push(o)}return Pe.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(t.map(e=>e[s]))];return Pe.from(i.map(e=>t.find(o=>o[s]==e)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>{const e=(o,n)=>l=>o[n]!=l[n];return Pe.from(t.filter(o=>s.every(e(o,i))))}})})})}}};var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oo(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Qs={exports:{}};(function(r,t){var s=[].slice;(function(i,e){return t!==null?r.exports=e():i.UrlPattern=e()})(So,function(){var i,e,o,n,l,c,h,d,f,m,v,b,P,S,D;return f=function(p){return p.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(p,u){var y,A,O;for(O=[],y=-1,A=p.length;++y<A;)O=O.concat(u(p[y]));return O},S=function(p,u){var y,A,O;for(O="",y=-1,A=p.length;++y<A;)O+=u(p[y]);return O},P=function(p){return new RegExp(p.toString()+"|").exec("").length-1},v=function(p,u){var y,A,O,E,V;for(E={},y=-1,O=p.length;++y<O;)A=p[y],V=u[y],V!=null&&(E[A]!=null?(Array.isArray(E[A])||(E[A]=[E[A]]),E[A].push(V)):E[A]=V);return E},i={},i.Result=function(p,u){this.value=p,this.rest=u},i.Tagged=function(p,u){this.tag=p,this.value=u},i.tag=function(p,u){return function(y){var A,O;if(A=u(y),A!=null)return O=new i.Tagged(p,A.value),new i.Result(O,A.rest)}},i.regex=function(p){return function(u){var y,A;if(y=p.exec(u),y!=null)return A=y[0],new i.Result(A,u.slice(A.length))}},i.sequence=function(){var p;return p=1<=arguments.length?s.call(arguments,0):[],function(u){var y,A,O,E,V,W;for(y=-1,A=p.length,W=[],E=u;++y<A;){if(O=p[y],V=O(E),V==null)return;W.push(V.value),E=V.rest}return new i.Result(W,E)}},i.pick=function(){var p,u;return p=arguments[0],u=2<=arguments.length?s.call(arguments,1):[],function(y){var A,O;if(O=i.sequence.apply(i,u)(y),O!=null)return A=O.value,O.value=A[p],O}},i.string=function(p){var u;return u=p.length,function(y){if(y.slice(0,u)===p)return new i.Result(p,y.slice(u))}},i.lazy=function(p){var u;return u=null,function(y){return u==null&&(u=p()),u(y)}},i.baseMany=function(p,u,y,A,O){var E,V,W,_t;for(W=O,_t=y?"":[];!(u!=null&&(E=u(W),E!=null)||(V=p(W),V==null));)y?_t+=V.value:_t.push(V.value),W=V.rest;if(!(A&&_t.length===0))return new i.Result(_t,W)},i.many1=function(p){return function(u){return i.baseMany(p,null,!1,!0,u)}},i.concatMany1Till=function(p,u){return function(y){return i.baseMany(p,u,!0,!0,y)}},i.firstChoice=function(){var p;return p=1<=arguments.length?s.call(arguments,0):[],function(u){var y,A,O,E;for(y=-1,A=p.length;++y<A;)if(O=p[y],E=O(u),E!=null)return E}},b=function(p){var u;return u={},u.wildcard=i.tag("wildcard",i.string(p.wildcardChar)),u.optional=i.tag("optional",i.pick(1,i.string(p.optionalSegmentStartChar),i.lazy(function(){return u.pattern}),i.string(p.optionalSegmentEndChar))),u.name=i.regex(new RegExp("^["+p.segmentNameCharset+"]+")),u.named=i.tag("named",i.pick(1,i.string(p.segmentNameStartChar),i.lazy(function(){return u.name}))),u.escapedChar=i.pick(1,i.string(p.escapeChar),i.regex(/^./)),u.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return u.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(p.segmentNameStartChar),i.string(p.optionalSegmentStartChar),i.string(p.optionalSegmentEndChar),u.wildcard))),u.token=i.lazy(function(){return i.firstChoice(u.wildcard,u.optional,u.named,u.static)}),u.pattern=i.many1(i.lazy(function(){return u.token})),u},d={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(p,u){if(Array.isArray(p))return S(p,function(y){return c(y,u)});switch(p.tag){case"wildcard":return"(.*?)";case"named":return"(["+u+"]+)";case"static":return f(p.value);case"optional":return"(?:"+c(p.value,u)+")?"}},l=function(p,u){return u==null&&(u=d.segmentValueCharset),"^"+c(p,u)+"$"},n=function(p){if(Array.isArray(p))return h(p,n);switch(p.tag){case"wildcard":return["_"];case"named":return[p.value];case"static":return[];case"optional":return n(p.value)}},m=function(p,u,y,A){var O,E,V,W;if(A==null&&(A=!1),W=p[u],W==null){if(A)throw new Error("no values provided for key `"+u+"`");return}if(O=y[u]||0,E=Array.isArray(W)?W.length-1:0,O>E){if(A)throw new Error("too few values provided for key `"+u+"`");return}return V=Array.isArray(W)?W[O]:W,A&&(y[u]=O+1),V},o=function(p,u,y){var A,O;if(Array.isArray(p)){for(A=-1,O=p.length;++A<O;)if(o(p[A],u,y))return!0;return!1}switch(p.tag){case"wildcard":return m(u,"_",y,!1)!=null;case"named":return m(u,p.value,y,!1)!=null;case"static":return!1;case"optional":return o(p.value,u,y)}},D=function(p,u,y){if(Array.isArray(p))return S(p,function(A){return D(A,u,y)});switch(p.tag){case"wildcard":return m(u,"_",y,!0);case"named":return m(u,p.value,y,!0);case"static":return p.value;case"optional":return o(p.value,u,y)?D(p.value,u,y):""}},e=function(p,u){var y,A,O,E,V;if(p instanceof e){this.isRegex=p.isRegex,this.regex=p.regex,this.ast=p.ast,this.names=p.names;return}if(this.isRegex=p instanceof RegExp,!(typeof p=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=p,u!=null){if(!Array.isArray(u))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(y=P(this.regex),u.length!==y)throw new Error("regex contains "+y+" groups but array of group names contains "+u.length);this.names=u}return}if(p==="")throw new Error("argument must not be the empty string");if(V=p.replace(/\s+/g,""),V!==p)throw new Error("argument must not contain whitespace");if(A={escapeChar:(u!=null?u.escapeChar:void 0)||d.escapeChar,segmentNameStartChar:(u!=null?u.segmentNameStartChar:void 0)||d.segmentNameStartChar,segmentNameCharset:(u!=null?u.segmentNameCharset:void 0)||d.segmentNameCharset,segmentValueCharset:(u!=null?u.segmentValueCharset:void 0)||d.segmentValueCharset,optionalSegmentStartChar:(u!=null?u.optionalSegmentStartChar:void 0)||d.optionalSegmentStartChar,optionalSegmentEndChar:(u!=null?u.optionalSegmentEndChar:void 0)||d.optionalSegmentEndChar,wildcardChar:(u!=null?u.wildcardChar:void 0)||d.wildcardChar},E=b(A),O=E.pattern(p),O==null)throw new Error("couldn't parse pattern");if(O.rest!=="")throw new Error("could only partially parse pattern");this.ast=O.value,this.regex=new RegExp(l(this.ast,A.segmentValueCharset)),this.names=n(this.ast)},e.prototype.match=function(p){var u,y;return y=this.regex.exec(p),y==null?null:(u=y.slice(1),this.names?v(this.names,u):u)},e.prototype.stringify=function(p){if(p==null&&(p={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(p!==Object(p))throw new Error("argument must be an object or undefined");return D(this.ast,p,{})},e.escapeForRegex=f,e.concatMap=h,e.stringConcatMap=S,e.regexGroupCount=P,e.keysAndValuesToObject=v,e.P=i,e.newParser=b,e.defaultOptions=d,e.astNodeToRegexString=l,e.astNodeToNames=n,e.getParam=m,e.astNodeContainsSegmentsForProvidedParams=o,e.stringify=D,e})})(Qs,Qs.exports);var Do=Qs.exports;const pe=Oo(Do),ko=Co,Lo=Ao,Eo=ns,No=os,ue=Q,To=rt,Ke=X,Mo=Me,tt=N,jo=Se,Io=pe;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:ko,Arrays:Lo,DataBindObserver:Eo,Format:No,HTML:ue,LocationHandler:To,Objects:Ke,PublisherProxy:Mo,PublisherManager:tt,api:jo,URLPattern:Io};var Fo=Object.defineProperty,zo=Object.getOwnPropertyDescriptor,De=(r,t,s,i)=>{for(var e=i>1?void 0:i?zo(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Fo(t,s,e),e};const Js=r=>{class t extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{var n;const i=this.getAttribute("name"),e=this.getCheckAllPublisher(),o=this.getFormPublisher();if(e!=null&&e.hasCheckAll.get()&&!this.checksAll()&&e&&o&&i){if((n=this.getFormPublisherValue())!=null&&n.length)(this.checked===null||e.checkMode.get()=="noneChecked"||e.checkMode.get()==null)&&(e.checkMode="someUnchecked");else{e.checkMode="noneChecked";return}const l=this.getFormPublisherValue(),c=e.values.get();if(c&&c.length){let h=c.length;for(const d of c)l.indexOf(d)==-1&&(h-=1);h==c.length&&(e.checkMode="allChecked"),h==0&&(e.checkMode="noneChecked")}c.indexOf(this.value)==-1&&(this.checked=null)}},this.onChecksAllRequest=i=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),i=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),i=="noneChecked"&&(this.checked=null),i=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(i){if(this.value==i||(this.hasAttribute("value")&&!this.forceAutoFill&&(i=this.getAttribute("value")),this._value==i)||i==null||(this._value=i,!this.value))return;if(this.getFormPublisher()&&this.name){let o=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=o==i?!0:null),Array.isArray(o)||(o=[]),o.indexOf(i)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(i){if(this.setCheckedValue(i),this.checksAll()){const e=this.getCheckAllPublisher();e&&(this.checked===!0?e.checkMode="allChecked":this.checked===null&&(e.checkMode="noneChecked",this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector("input");if(!i||i.checkValidity())return;const e=this.getFormPublisher();if(e){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;e.isFormValid=!1,i.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(i){this._checked!=i&&(this._checked=i,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const i=this.checked===!0?this.radio?!0:null:!0;this.checked=i;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){if(!this.getFormPublisher())return null;let e=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:e;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(e)||(e=[]);const o=e.slice(0),n=o.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&o.push(this.value),this.checked===null&&n!==-1&&o.splice(n,1),o}setFormValueFromPublisher(i){if(this.unique||this.radio){this.checked=this.value==i?!0:null;return}Array.isArray(i)||(i=[]),!this.checksAll()&&(this.checked=i.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const i=this.formDataProvider,e=this.getAttribute("name");return!i||!e?null:tt.get(i+"/"+e+"/_available_values_")}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=i.values.get().slice(0),o=e.indexOf(this.value);o!=-1&&(e.splice(o,1),i.values=e)}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const o=this.getFormPublisherValue();o&&Array.isArray(o)&&o.indexOf(this.value)!==-1&&(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||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return De([a()],t.prototype,"value",1),De([a()],t.prototype,"forceAutoFill",2),De([a({type:Boolean})],t.prototype,"unique",2),De([a({type:Boolean})],t.prototype,"radio",2),De([a({type:Boolean})],t.prototype,"unCheckOnDisconnect",2),De([a()],t.prototype,"checked",1),t};/**
73
+ * @license
74
+ * Copyright 2018 Google LLC
75
+ * SPDX-License-Identifier: BSD-3-Clause
76
+ */const x=r=>r??C,Ot=$`
77
+ /*SIZES*/
78
+ :host {
79
+ --sc-fs: 1rem;
80
+ --sc-lh: 1.15;
81
+ font-size: var(--sc-fs);
82
+ line-height: var(--sc-lh);
83
+ }
84
+
85
+ :host([size="2xs"]) {
86
+ --sc-fs: 0.625rem;
87
+ }
88
+ :host([size="xs"]) {
89
+ --sc-fs: 0.75rem;
90
+ }
91
+ :host([size="sm"]) {
92
+ --sc-fs: 0.875rem;
93
+ }
94
+ :host([size="md"]) {
95
+ --sc-fs: 1rem;
96
+ }
97
+ :host([size="lg"]) {
98
+ --sc-fs: 1.125rem;
99
+ }
100
+ :host([size="xl"]) {
101
+ --sc-fs: 1.25rem;
102
+ }
103
+ :host([size="2xl"]) {
104
+ --sc-fs: 1.5rem;
105
+ }
106
+ :host([size="inherit"]) {
107
+ --sc-fs: 1em;
108
+ }
109
+ `;var Ro=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,z=(r,t,s,i)=>{for(var e=i>1?void 0:i?Uo(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ro(t,s,e),e};const Vo="sonic-button";let j=class extends Js(Oe(Y(w))){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.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(r){this._href=r;const t=this._href.toString();t&&t.indexOf("http")!=0?rt.onChange(this):rt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(r){r.preventDefault(),rt.changeFromComponent(this)}handleChange(r){if(!((r==null?void 0:r.type)=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(r==null||r.preventDefault(),r==null||r.stopPropagation(),rt.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),s=t?tt.get(t):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(r){this.autoRepeat&&(this.handleChange(r),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(r){if(this.name){if(r?this.setAttribute("active","true"):this.removeAttribute("active"),r==this._checked)return;super.setCheckedValue(r)}}disconnectedCallback(){rt.offChange(this),super.disconnectedCallback()}willUpdate(r){(r.has("href")||r.has("autoActive"))&&rt.updateComponentActiveState(this),r.has("location")&&rt.updateComponentActiveState(this)}render(){const r={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},t=g`
110
+ <button
111
+ part="button"
112
+ class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
113
+ style=${ut(r)}
114
+ aria-controls=${x(this.ariaControls)}
115
+ aria-expanded=${x(this.sonicAriaExpanded)}
116
+ aria-label=${x(this.ariaLabel)}
117
+ aria-labelledby=${x(this.ariaLabelledby)}
118
+ @click=${this.handleChange}
119
+ @pointerdown=${this.handleRepeatStart}
120
+ >
121
+ <slot
122
+ @slotchange=${this.onSlotChange}
123
+ part="prefix"
124
+ name="prefix"
125
+ ></slot>
126
+ <slot part="main" class="main-slot"></slot>
127
+ <slot
128
+ @slotchange=${this.onSlotChange}
129
+ part="suffix"
130
+ name="suffix"
131
+ ></slot>
132
+ ${this.loading==!0?g`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
133
+ </button>
134
+ `;return this.href?g`<a
135
+ href="${this.href}"
136
+ download=${x(this.download)}
137
+ target=${x(this.target)}
138
+ aria-label=${x(this.ariaLabel)}
139
+ aria-labelledby=${x(this.ariaLabelledby)}
140
+ @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
141
+ >${t}</a
142
+ >`:g`${t}`}onSlotChange(){var r,t;this.hasPrefix=!!((r=this.prefixes)!=null&&r.length),this.hasSuffix=!!((t=this.suffixes)!=null&&t.length)}};j.styles=[Ot,$`
143
+ * {
144
+ box-sizing: border-box;
145
+ }
146
+ :host {
147
+ --sc-btn-gap: 0.35em;
148
+ --sc-btn-py: 0.25em;
149
+ --sc-btn-px: 1.1em;
150
+ --sc-btn-fs: var(--sc-fs, 1rem);
151
+ --sc-btn-fw: var(--sc-btn-font-weight);
152
+ --sc-btn-ff: var(--sc-btn-font-family);
153
+ --sc-btn-fw: var(--sc-btn-font-weight);
154
+
155
+ --sc-btn-height: var(--sc-form-height);
156
+ --btn-color: var(--sc-btn-color, var(--sc-base-content));
157
+ --btn-bg: var(--sc-btn-bg, var(--sc-base-100));
158
+
159
+ --sc-btn-border-style: solid;
160
+ --sc-btn-border-width: var(--sc-form-border-width);
161
+ --sc-btn-border-color: transparent;
162
+
163
+ --btn-outline-bg-hover: var(
164
+ --sc-btn-outline-bg-hover,
165
+ var(--sc-base-100)
166
+ );
167
+ --sc-btn-ghost-bg-hover: var(--sc-base-100);
168
+
169
+ --sc-btn-active-color: var(--sc-base);
170
+ --sc-btn-hover-filter: brightness(0.98);
171
+ --sc-btn-active-filter: brightness(0.97);
172
+ --sc-btn-active-bg: var(--sc-base-content);
173
+
174
+ --sc-item-rounded-tr: var(--sc-btn-rounded);
175
+ --sc-item-rounded-tl: var(--sc-btn-rounded);
176
+ --sc-item-rounded-bl: var(--sc-btn-rounded);
177
+ --sc-item-rounded-br: var(--sc-btn-rounded);
178
+
179
+ display: inline-flex;
180
+ vertical-align: middle;
181
+ box-sizing: border-box;
182
+ -webkit-print-color-adjust: exact;
183
+ }
184
+
185
+ :host a {
186
+ display: contents;
187
+ color: unset;
188
+ }
189
+
190
+ :host button {
191
+ display: flex;
192
+ flex: 1;
193
+ box-sizing: border-box;
194
+ align-items: center;
195
+ justify-content: center;
196
+
197
+ font-family: var(--sc-btn-ff);
198
+ font-weight: var(--sc-btn-fw);
199
+ font-size: var(--sc-btn-fs);
200
+
201
+ cursor: pointer;
202
+ text-align: center;
203
+ line-height: 1.1;
204
+ border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
205
+ var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
206
+
207
+ background: var(--btn-bg);
208
+ color: var(--btn-color);
209
+
210
+ padding-top: var(--sc-btn-py);
211
+ padding-bottom: var(--sc-btn-py);
212
+ padding-left: var(--sc-btn-px);
213
+ padding-right: var(--sc-btn-px);
214
+
215
+ border: var(--sc-btn-border-width) var(--sc-btn-border-style)
216
+ var(--sc-btn-border-color);
217
+ min-height: var(--sc-btn-height);
218
+ }
219
+
220
+ :host button.has-prefix-or-suffix {
221
+ gap: var(--sc-btn-gap);
222
+ }
223
+
224
+ :host button:focus,
225
+ :host button:hover {
226
+ filter: var(--sc-btn-hover-filter);
227
+ }
228
+
229
+ :host button:active {
230
+ filter: var(--sc-btn-active-filter);
231
+ }
232
+
233
+ /*TYPES*/
234
+ :host([type="default"]) button {
235
+ --btn-color: var(--sc-base-content);
236
+ --btn-bg: var(--sc-base-100);
237
+ }
238
+
239
+ :host([type="primary"]) button {
240
+ --btn-color: var(--sc-primary-content);
241
+ --btn-bg: var(--sc-primary);
242
+ }
243
+ :host([type="warning"]) button {
244
+ --btn-color: var(--sc-warning-content);
245
+ --btn-bg: var(--sc-warning);
246
+ }
247
+ :host([type="danger"]) button {
248
+ --btn-color: var(--sc-danger-content);
249
+ --btn-bg: var(--sc-danger);
250
+ }
251
+ :host([type="info"]) button {
252
+ --btn-color: var(--sc-info-content);
253
+ --btn-bg: var(--sc-info);
254
+ }
255
+ :host([type="success"]) button {
256
+ --btn-color: var(--sc-success-content);
257
+ --btn-bg: var(--sc-success);
258
+ }
259
+ :host([type="neutral"]) button {
260
+ --btn-color: var(--sc-base);
261
+ --btn-bg: var(--sc-base-600);
262
+ }
263
+ :host([type="custom"]) button {
264
+ --btn-color: var(--sc-btn-custom-color);
265
+ --btn-bg: var(--sc-btn-custom-bg);
266
+ }
267
+
268
+ /*UNSTYLED*/
269
+ :host([variant="unstyled"]) {
270
+ display: inline-block;
271
+ }
272
+
273
+ :host([variant="unstyled"]) button {
274
+ all: unset;
275
+ display: contents;
276
+ cursor: pointer;
277
+ --sc-btn-height: auto;
278
+ --sc-btn-width: auto;
279
+ }
280
+
281
+ /*GESTION DU FOCUS*/
282
+ :host(:not([disabled])) button:focus {
283
+ box-shadow: 0 0 0 0.18rem var(--sc-base-300);
284
+ border-color: var(--sc-base-300) !important;
285
+ outline: none;
286
+ }
287
+
288
+ /*GHOST*/
289
+ :host([variant="ghost"][type]) button {
290
+ color: var(--btn-bg);
291
+ background: transparent;
292
+ }
293
+
294
+ :host([variant="ghost"][type="default"]) button {
295
+ color: var(--btn-color);
296
+ background: transparent;
297
+ }
298
+
299
+ /*:host([variant="ghost"]) button:focus,*/
300
+ :host([variant="ghost"]) button:hover {
301
+ background: var(--sc-btn-ghost-bg-hover);
302
+ filter: none;
303
+ }
304
+
305
+ :host([active][variant="ghost"]) button {
306
+ background: var(--sc-btn-ghost-bg-hover);
307
+ filter: none;
308
+ }
309
+
310
+ :host([active][variant="ghost"]) button:hover {
311
+ filter: var(--sc-btn-hover-filter);
312
+ }
313
+
314
+ /*OUTLINE*/
315
+ :host([variant="outline"][type]) button {
316
+ border-color: var(--btn-bg);
317
+ color: var(--btn-bg);
318
+ background: transparent;
319
+ }
320
+
321
+ :host([variant="outline"][type="default"]) button {
322
+ border-color: var(--sc-base-content);
323
+ color: var(--sc-base-content);
324
+ background: transparent;
325
+ }
326
+
327
+ /*:host([variant="outline"]) button:focus,*/
328
+ :host([variant="outline"]) button:hover {
329
+ background: var(--btn-outline-bg-hover);
330
+ }
331
+
332
+ /*OUTLINE*/
333
+ :host([variant="link"]:not([size])) {
334
+ vertical-align: baseline;
335
+ margin-left: 0.25em;
336
+ margin-right: 0.25em;
337
+ }
338
+
339
+ :host([variant="link"]:not([size])) {
340
+ font-size: inherit;
341
+ }
342
+
343
+ :host([variant="link"]) button {
344
+ text-decoration: underline;
345
+ padding: 0;
346
+ background: none;
347
+ border: none;
348
+ font-size: inherit;
349
+ min-height: 0;
350
+ color: inherit;
351
+ }
352
+
353
+ :host([variant="link"][type]) button {
354
+ color: var(--btn-bg);
355
+ }
356
+ :host([variant="link"][type="default"]) button {
357
+ color: inherit;
358
+ }
359
+
360
+ :host([variant="link"]) button:focus,
361
+ :host([variant="link"]) button:hover {
362
+ text-decoration: none;
363
+ }
364
+
365
+ /* Alignement */
366
+ :host([align="left"]) button {
367
+ text-align: left !important;
368
+ }
369
+
370
+ :host([align="right"]) button {
371
+ text-align: right;
372
+ }
373
+
374
+ /*SHAPE*/
375
+ :host([shape="circle"]) button {
376
+ border-radius: 50%;
377
+ }
378
+ :host([shape="circle"]) .main-slot {
379
+ line-height: 1;
380
+ }
381
+
382
+ :host([shape="circle"]) button,
383
+ :host([shape="square"]) button {
384
+ width: var(--sc-btn-height);
385
+ height: var(--sc-btn-height);
386
+ /*overflow: hidden;*/ /* fix bug #42622 */
387
+ padding: 0;
388
+ align-items: center;
389
+ justify-content: 0;
390
+ text-align: center !important;
391
+ }
392
+
393
+ :host([shape="block"]),
394
+ :host([shape="block"]) button {
395
+ width: 100%;
396
+ }
397
+
398
+ :host([disabled]) {
399
+ opacity: 0.3;
400
+ pointer-events: none;
401
+ user-select: none;
402
+ }
403
+
404
+ /*ACTIVE*/
405
+
406
+ :host([active]:not([variant="ghost"]):not([variant="unstyled"])) button {
407
+ background: var(--sc-btn-active-bg);
408
+ color: var(--sc-btn-active-color);
409
+ border-color: var(--sc-btn-active-bg);
410
+ }
411
+
412
+ .main-slot {
413
+ flex-grow: 1;
414
+ display: block;
415
+ }
416
+
417
+ :host([minWidth]:not([shape="block"])) .main-slot {
418
+ flex-grow: 0;
419
+ }
420
+
421
+ slot[name="suffix"],
422
+ slot[name="prefix"] {
423
+ flex-shrink: 0;
424
+ }
425
+
426
+ /*ALIGNEMENT DES ICONES
427
+ permet de tous les avoir alignés dans un menu
428
+ */
429
+ ::slotted(sonic-icon) {
430
+ min-width: 1em;
431
+ text-align: center;
432
+ }
433
+
434
+ /*BOUTON Avec icone seulement*/
435
+ :host([icon]) ::slotted(:only-child),
436
+ :host([icon]) ::slotted(sonic-icon) {
437
+ font-size: 1.2em;
438
+ vertical-align: middle;
439
+ }
440
+
441
+ /*Tooltip ne joue pas sur le layout*/
442
+ sonic-tooltip {
443
+ display: contents;
444
+ }
445
+
446
+ /*OUTLINE*/
447
+ :host(:not([active])) ::slotted([swap="on"]) {
448
+ display: none !important;
449
+ }
450
+
451
+ :host([active]) ::slotted([swap="off"]) {
452
+ display: none !important;
453
+ }
454
+
455
+ /*Loading*/
456
+ :host([loading]) {
457
+ pointer-events: none;
458
+ position: relative;
459
+ }
460
+
461
+ :host([loading]) slot {
462
+ opacity: 0 !important;
463
+ pointer-events: none;
464
+ }
465
+ /*Loading*/
466
+ :host([loading]) .loader {
467
+ position: absolute;
468
+ top: 50%;
469
+ left: 50%;
470
+ transform: translate(-50%, -50%);
471
+ display: flex;
472
+ align-items: center;
473
+ justify-content: center;
474
+ line-height: 0;
475
+ height: var(--sc-btn-ff);
476
+ width: var(--sc-btn-ff);
477
+ animation: rotation 2s infinite linear;
478
+ }
479
+
480
+ @keyframes rotation {
481
+ from {
482
+ transform-origin: 50% 50%;
483
+ transform: translate(-50%, -50%) rotate(0deg);
484
+ }
485
+ to {
486
+ transform-origin: 50% 50%;
487
+ transform: translate(-50%, -50%) rotate(359deg);
488
+ }
489
+ }
490
+ `],z([a({type:String,reflect:!0})],j.prototype,"type",2),z([a({type:String,reflect:!0})],j.prototype,"variant",2),z([a({type:String,reflect:!0})],j.prototype,"size",2),z([a({type:String,reflect:!0})],j.prototype,"shape",2),z([a({type:String})],j.prototype,"direction",2),z([a({type:String,reflect:!0})],j.prototype,"alignItems",2),z([a({type:String})],j.prototype,"justify",2),z([a({type:String,reflect:!0})],j.prototype,"align",2),z([a({type:String})],j.prototype,"minWidth",2),z([a({type:Boolean,reflect:!0})],j.prototype,"icon",2),z([a({type:String})],j.prototype,"download",2),z([a({type:String})],j.prototype,"autoActive",2),z([a({type:Boolean,reflect:!0})],j.prototype,"loading",2),z([M()],j.prototype,"hasPrefix",2),z([M()],j.prototype,"hasSuffix",2),z([re({flatten:!0,slot:"prefix"})],j.prototype,"prefixes",2),z([re({flatten:!0,slot:"suffix"})],j.prototype,"suffixes",2),z([a({type:String})],j.prototype,"target",2),z([a({type:String})],j.prototype,"href",1),z([a({type:String})],j.prototype,"goBack",2),z([a({type:Boolean})],j.prototype,"pushState",2),z([a({type:Boolean,reflect:!0})],j.prototype,"active",2),z([a({type:Boolean,reflect:!0})],j.prototype,"autoRepeat",2),z([a({type:String,attribute:"data-aria-controls"})],j.prototype,"ariaControls",2),z([a({type:Boolean,attribute:"data-aria-expanded"})],j.prototype,"sonicAriaExpanded",2),z([M()],j.prototype,"location",2),j=z([_(Vo)],j);/**
491
+ * @license
492
+ * Copyright 2017 Google LLC
493
+ * SPDX-License-Identifier: BSD-3-Clause
494
+ */const er=(r,t,s)=>{const i=new Map;for(let e=t;e<=s;e++)i.set(r[e],e);return i},gs=de(class extends Ae{constructor(r){if(super(r),r.type!==he.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,s){let i;s===void 0?s=t:t!==void 0&&(i=t);const e=[],o=[];let n=0;for(const l of r)e[n]=i?i(l,n):n,o[n]=s(l,n),n++;return{values:o,keys:e}}render(r,t,s){return this.dt(r,t,s).values}update(r,[t,s,i]){const e=ro(r),{values:o,keys:n}=this.dt(t,s,i);if(!Array.isArray(e))return this.ut=n,o;const l=this.ut??(this.ut=[]),c=[];let h,d,f=0,m=e.length-1,v=0,b=o.length-1;for(;f<=m&&v<=b;)if(e[f]===null)f++;else if(e[m]===null)m--;else if(l[f]===n[v])c[v]=ce(e[f],o[v]),f++,v++;else if(l[m]===n[b])c[b]=ce(e[m],o[b]),m--,b--;else if(l[f]===n[b])c[b]=ce(e[f],o[b]),Be(r,c[b+1],e[f]),f++,b--;else if(l[m]===n[v])c[v]=ce(e[m],o[v]),Be(r,e[f],e[m]),m--,v++;else if(h===void 0&&(h=er(n,v,b),d=er(l,f,m)),h.has(l[f]))if(h.has(l[m])){const P=d.get(n[v]),S=P!==void 0?e[P]:null;if(S===null){const D=Be(r,e[f]);ce(D,o[v]),c[v]=D}else c[v]=ce(S,o[v]),Be(r,e[f],S),e[P]=null;v++}else qs(e[m]),m--;else qs(e[f]),f++;for(;v<=b;){const P=Be(r,c[b+1]);ce(P,o[v]),c[v++]=P}for(;f<=m;){const P=e[f++];P!==null&&qs(P)}return this.ut=n,io(r,c),bt}}),Bo=new WeakMap;let sr=0;const Xs=new Map,ir=new WeakSet,rr=()=>new Promise(r=>requestAnimationFrame(r)),Ho=[{opacity:0}],qo=[{opacity:0},{opacity:1}],or=(r,t)=>{const s=r-t;return s===0?void 0:s},nr=(r,t)=>{const s=r/t;return s===1?void 0:s},ti={left:(r,t)=>{const s=or(r,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(r,t)=>{const s=or(r,t);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(r,t)=>{let s;t===0&&(t=1,s={width:"1px"});const i=nr(r,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(r,t)=>{let s;t===0&&(t=1,s={height:"1px"});const i=nr(r,t);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},Wo={duration:333,easing:"ease-in-out"},Ko=["left","top","width","height","opacity","color","background"],ar=new WeakMap;class Zo extends Ws{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===he.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;(t=this.resolveFinished)==null||t.call(this),this.finished=new Promise(s=>{this.l=s})}async resolveFinished(){var t;(t=this.l)==null||t.call(this),this.l=void 0}render(t){return C}getController(){return Bo.get(this.u)}isDisabled(){var t;return this.options.disabled||((t=this.getController())==null?void 0:t.disabled)}update(t,[s]){var e;const i=this.u===void 0;return i&&(this.u=(e=t.options)==null?void 0:e.host,this.u.addController(this),this.u.updateComplete.then(o=>this.t=!0),this.element=t.element,ar.set(this.element,this)),this.optionsOrCallback=s,(i||typeof s!="function")&&this.p(s),this.render(s)}p(t){t=t??{};const s=this.getController();s!==void 0&&((t={...s.defaultOptions,...t}).keyframeOptions={...s.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??(t.properties=Ko),this.options=t}m(){const t={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach(e=>{const o=s[e]??(ti[e]?void 0:i[e]),n=Number(o);t[e]=isNaN(n)?o+"":n}),t}v(){let t,s=!0;return this.options.guard&&(t=this.options.guard(),s=((i,e)=>{if(Array.isArray(i)){if(Array.isArray(e)&&e.length===i.length&&i.every((o,n)=>o===e[n]))return!1}else if(e===i)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(t)?Array.from(t):t),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await rr;const s=this.O(),i=this.j(this.options.keyframeOptions,s),e=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,e,s);this.log("measured",[this.A,e,o,n]),t=this.calculateKeyframes(o,n)}else{const o=Xs.get(this.options.inId);if(o){Xs.delete(this.options.inId);const{from:n,to:l}=this.N(o,e,s);t=this.calculateKeyframes(n,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,sr++,t.forEach(c=>c.zIndex=sr)}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){var t,s;this.P=this.element.getAttribute("style"),(t=this.webAnimation)==null||t.commitStyles(),(s=this.webAnimation)==null||s.cancel()}reconnected(){}async disconnected(){var s;if(!this.h||(this.options.id!==void 0&&Xs.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await rr(),(s=this.i)==null?void 0:s.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const e=this.m();this.log("stabilizing out");const o=this.A.left-e.left,n=this.A.top-e.top;getComputedStyle(this.element).position!=="static"||o===0&&n===0||(this.element.style.position="relative"),o!==0&&(this.element.style.left=o+"px"),n!==0&&(this.element.style.top=n+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){var t,s;(s=(t=this.options).onStart)==null||s.call(t,this)}didFinish(t){var s,i;t&&((i=(s=this.options).onComplete)==null||i.call(s,this)),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let s=this.element.parentNode;s;s=s==null?void 0:s.parentNode){const i=ar.get(s);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=ir.has(this.u);return t||this.u.updateComplete.then(()=>{ir.add(this.u)}),t}j(t,s=this.O()){const i={...Wo};return s.forEach(e=>Object.assign(i,e.options.keyframeOptions)),Object.assign(i,t),i}N(t,s,i){t={...t},s={...s};const e=i.map(l=>l.animatingProperties).filter(l=>l!==void 0);let o=1,n=1;return e.length>0&&(e.forEach(l=>{l.width&&(o/=l.width),l.height&&(n/=l.height)}),t.left!==void 0&&s.left!==void 0&&(t.left=o*t.left,s.left=o*s.left),t.top!==void 0&&s.top!==void 0&&(t.top=n*t.top,s.top=n*s.top)),{from:t,to:s}}calculateKeyframes(t,s,i=!1){const e={},o={};let n=!1;const l={};for(const c in s){const h=t[c],d=s[c];if(c in ti){const f=ti[c];if(h===void 0||d===void 0)continue;const m=f(h,d);m.transform!==void 0&&(l[c]=m.value,n=!0,e.transform=`${e.transform??""} ${m.transform}`,m.overrideFrom!==void 0&&Object.assign(e,m.overrideFrom))}else h!==d&&h!==void 0&&d!==void 0&&(n=!0,e[c]=h,o[c]=d)}return e.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=l,n?[e,o]:void 0}async animate(t,s=this.options.keyframeOptions){this.start(),this.frames=t;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,s]),i=!0,this.webAnimation=this.element.animate(t,s);const e=this.getController();e==null||e.add(this);try{await this.webAnimation.finished}catch{}e==null||e.remove(this)}return this.didFinish(i),i}isAnimating(){var t,s;return((t=this.webAnimation)==null?void 0:t.playState)==="running"||((s=this.webAnimation)==null?void 0:s.pending)}log(t,s){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,s)}}const ms=de(Zo),Yo={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">
495
+ <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"/>
496
+ </svg>
497
+ `,"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">
498
+ <path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
499
+ <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"/>
500
+ </svg>
501
+ `,check:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
502
+ <path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
503
+ </svg>
504
+ `,"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">
505
+ <path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
506
+ <path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
507
+ <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"/>
508
+ </svg>
509
+ `,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">
510
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />
511
+ </svg>
512
+ `,"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">
513
+ <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"/>
514
+ <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"/>
515
+ <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"/>
516
+ </svg>
517
+ `,"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">
518
+ <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"/>
519
+ <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"/>
520
+ <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"/>
521
+ </svg>
522
+ `,"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">
523
+ <path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
524
+ </svg>
525
+ `,"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">
526
+ <path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
527
+ <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
528
+ <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"/>
529
+ </svg>
530
+ `}},bs=new Map,vs={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 lr=!1;function Go(){var r,t;lr||(lr=!0,vs.custom.url=((r=document.querySelector("[customIconLibraryPath]"))==null?void 0:r.getAttribute("customIconLibraryPath"))||"",vs.custom.defaultPrefix=((t=document.querySelector("[customIconDefaultPrefix]"))==null?void 0:t.getAttribute("customIconDefaultPrefix"))||"")}const cr=sessionStorage.getItem("sonicIconsCache"),Wt=cr?JSON.parse(cr):{icons:{},names:[]},Qo=100,Ai=class Ai{};Ai.default={get:async t=>{const s=t.library;if(!t.name)return"";const i=t.name,e=Yo;if(s=="custom"&&Go(),s&&s in vs){const o=vs[s],n=t.prefix||o.defaultPrefix||"",l=e[s]||{};e[s]=l;const c=n+"-"+i;if(l[c])return I(l[c]);const h=(o.url||"").replace("$prefix",n).replace("$name",i);if(Wt.icons[h])return l[c]=Wt.icons[h],I(Wt.icons[h]);if(!bs.has(h)){const f=new Promise(async m=>{const v=await fetch(h);if(!v.ok){m(`<b title="Erreur ${v.status}">😶</b>`);return}try{const b=await v.text();m(b)}catch{m(null)}});bs.set(h,f)}const d=await bs.get(h);if(bs.delete(h),l[c]=d||"",Wt.icons[h]=d||"",Wt.names.length>Qo){const f=Wt.names.shift();delete Wt.icons[f]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Wt)),I(d)}return I(e.core[t.name]||"")}};let ei=Ai;var Jo=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,Ze=(r,t,s,i)=>{for(var e=i>1?void 0:i?Xo(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Jo(t,s,e),e};const tn="sonic-icon";let fe=class extends w{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await ei.default.get({name:this.name,prefix:this.prefix,library:this.library})}willUpdate(r){(r.has("name")||r.has("prefix")||r.has("library"))&&this.updateIcon(),super.willUpdate(r)}render(){return this.iconText?this.iconText:C}};fe.styles=$`
531
+ :host {
532
+ line-height: 0.1em;
533
+ width: fit-content;
534
+ height: fit-content;
535
+ vertical-align: -0.125em;
536
+ flex-shrink: 0;
537
+ }
538
+ svg {
539
+ height: var(--sc-icon-size, 1em);
540
+ width: 1.4em;
541
+ overflow: visible;
542
+ }
543
+
544
+ svg:not([fill="none"]) {
545
+ fill: currentColor;
546
+ }
547
+
548
+ svg[fill="none"] {
549
+ stroke-width: 2;
550
+ }
551
+
552
+ :host([size="2xs"]) svg {
553
+ --sc-icon-size: 0.625em;
554
+ }
555
+
556
+ :host([size="xs"]) svg {
557
+ --sc-icon-size: 0.75em;
558
+ }
559
+
560
+ :host([size="sm"]) svg {
561
+ --sc-icon-size: 0.875em;
562
+ }
563
+
564
+ :host([size="lg"]) svg {
565
+ --sc-icon-size: 1.25em;
566
+ }
567
+
568
+ :host([size="xl"]) svg {
569
+ --sc-icon-size: 1.5em;
570
+ }
571
+
572
+ :host([size="2xl"]) svg {
573
+ --sc-icon-size: 2em;
574
+ }
575
+
576
+ :host([size="3xl"]) svg {
577
+ --sc-icon-size: 2.8em;
578
+ }
579
+ `,Ze([M()],fe.prototype,"iconText",2),Ze([a({type:String})],fe.prototype,"name",2),Ze([a({type:String})],fe.prototype,"prefix",2),Ze([a({type:String})],fe.prototype,"library",2),fe=Ze([_(tn)],fe);const Ye=$`
580
+ .custom-scroll {
581
+ overflow: auto !important;
582
+ overflow-y: overlay !important;
583
+ }
584
+
585
+ @media (hover: hover) {
586
+ .custom-scroll::-webkit-scrollbar {
587
+ width: 0.5rem;
588
+ height: 0.5rem;
589
+ border: solid 0.15rem transparent;
590
+ border-radius: var(--sc-rounded);
591
+ background: transparent;
592
+ }
593
+
594
+ .custom-scroll::-webkit-scrollbar-thumb {
595
+ box-shadow: inset 0 0 2rem 2rem
596
+ var(--sc-scrollbar-bg, var(--sc-base-400, #222));
597
+ border-radius: var(--sc-rounded);
598
+ border: solid 0.15rem transparent;
599
+ }
600
+ }
601
+ `;var en=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,Dt=(r,t,s,i)=>{for(var e=i>1?void 0:i?sn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&en(t,s,e),e};const rn={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},on="sonic-toast-item";let xt=class extends w{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 r=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(r)[this.id])return C}return this.visible?g`<div
602
+ class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
603
+ >
604
+ <button
605
+ aria-label="Close"
606
+ class="sonic-toast-close"
607
+ @click=${()=>this.hide()}
608
+ >
609
+ <sonic-icon name="cancel" size="lg"></sonic-icon>
610
+ </button>
611
+ <div
612
+ class="sonic-toast-content custom-scroll"
613
+ style="max-height: ${this.maxHeight} ;"
614
+ >
615
+ ${this.status&&g`<sonic-icon
616
+ name=${rn[this.status]}
617
+ class="sonic-toast-icon"
618
+ size="2xl"
619
+ ></sonic-icon>`}
620
+
621
+ <div class="sonic-toast-text">
622
+ ${this.title?g`<div class="sonic-toast-title">${this.title}</div>`:""}
623
+ ${this.text?I(this.text):""}
624
+ <slot></slot>
625
+ </div>
626
+
627
+ ${this.preserve?"":this.autoHide()}
628
+ </div>
629
+ </div>`:C}hide(){if(ue.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const r=localStorage.getItem("sonic-toast-dismissed")||"{}",t=JSON.parse(r);t[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(t))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}};xt.styles=[Ye,$`
630
+ * {
631
+ box-sizing: border-box;
632
+ }
633
+ :host {
634
+ display: block;
635
+ pointer-events: auto;
636
+ position: relative;
637
+ --sc-toast-status-color: transparent;
638
+ --sc-toast-color: var(--sc-base-content);
639
+ --sc-toast-bg: var(--sc-base);
640
+ --sc-toast-rounded: var(--sc-rounded-md);
641
+ --sc-toast-shadow: var(--sc-shadow-lg);
642
+ }
643
+
644
+ .fixed-area {
645
+ position: fixed;
646
+ bottom: 1.25rem;
647
+ right: 1.25rem;
648
+ z-index: 10000;
649
+ display: flex;
650
+ flex-direction: column-reverse;
651
+ }
652
+
653
+ .sonic-toast {
654
+ position: relative;
655
+ pointer-events: auto;
656
+ overflow: hidden;
657
+ line-height: 1.25;
658
+ color: var(--sc-toast-color);
659
+ box-shadow: var(--sc-toast-shadow);
660
+ border-radius: var(--sc-toast-rounded);
661
+ background: var(--sc-toast-bg);
662
+ }
663
+
664
+ .sonic-toast-content {
665
+ padding: 1em 2.5rem 1em 1em;
666
+ display: flex;
667
+ gap: 0.5rem;
668
+ overflow: auto;
669
+ position: relative;
670
+ }
671
+
672
+ .sonic-toast-text {
673
+ align-self: center;
674
+ margin-top: auto;
675
+ margin-bottom: auto;
676
+ max-width: 70ch;
677
+ line-height: 1.2;
678
+ }
679
+
680
+ ::slotted(a:not(.btn)),
681
+ .sonic-toast-text a {
682
+ color: inherit !important;
683
+ text-decoration: underline !important;
684
+ text-underline-offset: 0.15rem;
685
+ }
686
+
687
+ ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6)),
688
+ .sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6) {
689
+ margin: 0 0 0.3em !important;
690
+ }
691
+
692
+ ::slotted(li),
693
+ .sonic-toast-text li {
694
+ margin-bottom: 0.15em !important;
695
+ }
696
+
697
+ ::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child),
698
+ .sonic-toast-text
699
+ > :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child {
700
+ margin-bottom: 0 !important;
701
+ }
702
+
703
+ /*BUTTON CLOSE*/
704
+ .sonic-toast-close {
705
+ all: unset;
706
+ position: absolute;
707
+ z-index: 4;
708
+ pointer-events: initial;
709
+ right: 0.5em;
710
+ top: 0.5em;
711
+ width: 1.5rem;
712
+ height: 1.5rem;
713
+ cursor: pointer;
714
+ display: inline-flex;
715
+ align-items: center;
716
+ justify-content: center;
717
+ border-radius: 50%;
718
+ text-align: center;
719
+ opacity: 0.5;
720
+ background: rgba(0, 0, 0, 0);
721
+ }
722
+
723
+ .sonic-toast-close:focus,
724
+ .sonic-toast-close:hover {
725
+ opacity: 1;
726
+ background: rgba(0, 0, 0, 0.075);
727
+ }
728
+
729
+ .sonic-toast-close svg {
730
+ width: 1rem;
731
+ height: 1rem;
732
+ object-fit: contain;
733
+ object-position: center center;
734
+ }
735
+
736
+ /*Title*/
737
+ .sonic-toast-title {
738
+ font-weight: bold;
739
+ font-size: 1.15rem;
740
+ margin: 0.15em 0 0.25em;
741
+ line-height: 1.2;
742
+ }
743
+
744
+ /*STATUS*/
745
+ .success {
746
+ --sc-toast-status-color: var(--sc-success);
747
+ --sc-toast-title-color: var(--sc-toast-status-color);
748
+ }
749
+
750
+ .error {
751
+ --sc-toast-status-color: var(--sc-danger);
752
+ --sc-toast-title-color: var(--sc-toast-status-color);
753
+ }
754
+
755
+ .warning {
756
+ --sc-toast-status-color: var(--sc-warning);
757
+ --sc-toast-title-color: var(--sc-toast-status-color);
758
+ }
759
+
760
+ .info {
761
+ --sc-toast-status-color: var(--sc-info);
762
+ --sc-toast-title-color: var(--sc-toast-status-color);
763
+ }
764
+
765
+ .success,
766
+ .error,
767
+ .info,
768
+ .warning {
769
+ border-top: 3px solid var(--sc-toast-status-color, currentColor);
770
+ }
771
+
772
+ .sonic-toast:before {
773
+ content: "";
774
+ display: block;
775
+ position: absolute;
776
+ left: 0;
777
+ top: 0;
778
+ right: 0;
779
+ bottom: 0;
780
+ opacity: 0.05;
781
+ pointer-events: none;
782
+ transition: 0.2s;
783
+ border-radius: var(--sc-toast-rounded);
784
+ background-color: var(--sc-toast-status-color);
785
+ }
786
+
787
+ .sonic-toast:hover:before {
788
+ opacity: 0.025;
789
+ }
790
+
791
+ .info .sonic-toast-icon,
792
+ .error .sonic-toast-icon,
793
+ .success .sonic-toast-icon,
794
+ .warning .sonic-toast-icon {
795
+ color: var(--sc-toast-status-color, currentColor);
796
+ }
797
+
798
+ .sonic-toast-icon {
799
+ position: sticky;
800
+ top: 0;
801
+ }
802
+
803
+ .ghost {
804
+ opacity: 0.85;
805
+ pointer-events: none;
806
+ }
807
+ `],Dt([a({type:String})],xt.prototype,"title",2),Dt([a({type:String})],xt.prototype,"id",2),Dt([a({type:String})],xt.prototype,"text",2),Dt([a({type:String})],xt.prototype,"status",2),Dt([a({type:Boolean})],xt.prototype,"ghost",2),Dt([a({type:Boolean})],xt.prototype,"preserve",2),Dt([a({type:Boolean})],xt.prototype,"dismissForever",2),Dt([a({type:String})],xt.prototype,"maxHeight",2),Dt([M()],xt.prototype,"visible",2),xt=Dt([_(on)],xt);const nn=$`
808
+ :host {
809
+ /* polices*/
810
+ --sc-font-family-base: "Inter var", "Inter", -apple-system, system-ui,
811
+ BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
812
+ sans-serif;
813
+ --sc-font-weight-base: 400;
814
+ --sc-font-style-base: normal;
815
+
816
+ --sc-headings-font-family: var(--sc-font-family-base), sans-serif;
817
+ --sc-headings-font-style: var(--sc-font-style-base);
818
+ --sc-headings-line-height: 1.1;
819
+ --sc-headings-font-weight: 700;
820
+ --sc-headings-text-transform: none;
821
+
822
+ /* Button*/
823
+ --sc-btn-font-weight: var(--sc-font-weight-base);
824
+ --sc-btn-font-family: var(--sc-font-family-base);
825
+ --sc-btn-font-style: var(--sc-font-style-base);
826
+
827
+ /* ROUNDED*/
828
+ --sc-rounded-sm: calc(var(--sc-rounded) * 0.5);
829
+ --sc-rounded: 0.375rem;
830
+ --sc-rounded-md: calc(var(--sc-rounded) * 1.8);
831
+ --sc-rounded-lg: calc(var(--sc-rounded) * 3);
832
+ --sc-rounded-xl: calc(var(--sc-rounded) * 7);
833
+ --sc-rounded-size-intensity: calc((1em - 1rem) * 0.4);
834
+
835
+ /* 4 for rounded full*/
836
+ --sc-btn-rounded-intensity: 1.4;
837
+ --sc-btn-font-weight: 500;
838
+ --sc-btn-rounded: calc(
839
+ (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
840
+ var(--sc-btn-rounded-intensity)
841
+ );
842
+
843
+ /* Placeholder */
844
+ --sc-placeholder-bg: rgba(17, 24, 39, 0.05);
845
+
846
+ /* OMBRES */
847
+ --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1),
848
+ 0 1px 2px -1px rgb(0 0 0 / 0.1);
849
+ --sc-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1),
850
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
851
+ --sc-shadow-lg: 0 10px 15px 0px rgb(0 0 0 / 0.1),
852
+ 0 4px 6px -4px rgb(0 0 0 / 0.1);
853
+ --sc-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
854
+ 0 8px 10px -6px rgb(0 0 0 / 0.1);
855
+ --sc-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
856
+
857
+ /* Forms */
858
+ --sc-border-width: max(1px, 0.12rem);
859
+ --sc-border-color: var(--sc-base-100);
860
+ --sc-form-height: 2.5em;
861
+ --sc-form-border-width: var(--sc-border-width);
862
+ --sc-input-bg: var(--sc-base-100);
863
+ --sc-input-border-color: var(--sc-input-bg);
864
+ --sc-input-rounded-intensity: 1.4;
865
+ --sc-input-rounded: calc(
866
+ (var(--sc-rounded) + var(--sc-rounded-size-intensity)) *
867
+ var(--sc-input-rounded-intensity)
868
+ );
869
+ --sc-label-font-weight: 500;
870
+
871
+ /* Contrast -- ex : Text on images */
872
+ --sc-contrast-content: #fff;
873
+ --sc-contrast: #000000;
874
+
875
+ /*Body*/
876
+ --sc-body-bg: var(--sc-base);
877
+ }
878
+ `,an=$`
879
+ :host {
880
+ /*Boutons*/
881
+ --sc-primary: var(--sc-base-800);
882
+ --sc-info: #2563eb;
883
+ --sc-danger: #f43f5e;
884
+ --sc-warning: #f97316;
885
+ --sc-success: #14b8a6;
886
+
887
+ --sc-primary-content: var(--sc-base);
888
+ --sc-info-content: var(--sc-base);
889
+ --sc-danger-content: var(--sc-base);
890
+ --sc-warning-content: var(--sc-base);
891
+ --sc-success-content: var(--sc-base);
892
+
893
+ /*Bases*/
894
+ --sc-base: #fff;
895
+ --sc-base-50: #f8fafc;
896
+ --sc-base-100: #f1f5f9;
897
+ --sc-base-200: #e2e8f0;
898
+ --sc-base-300: #cbd5e1;
899
+ --sc-base-400: #94a3b8;
900
+ --sc-base-500: #64748b;
901
+ --sc-base-600: #475569;
902
+ --sc-base-700: #334155;
903
+ --sc-base-800: #1e293b;
904
+ --sc-base-900: #0f172a;
905
+ --sc-base-content: var(--sc-base-700);
906
+
907
+ /*formulaires*/
908
+ --sc-input-bg: var(--sc-base-100);
909
+ --sc-input-color: var(--sc-base-content);
910
+ }
911
+ `,hr=$`
912
+ --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
913
+ --sc-info: var(--sc-dark-info, #3abff8);
914
+ --sc-danger: var(--sc-dark-danger, #f87272);
915
+ --sc-warning: var(--sc-dark-warning, #fbbd23);
916
+ --sc-success: var(--sc-dark-success, #36d399);
917
+
918
+ --sc-primary-content: var(--sc-dark-primary-content, #002b3d);
919
+ --sc-info-content: var(--sc-dark-info-content, #002b3d);
920
+ --sc-danger-content: var(--sc-dark-danger-content, #382800);
921
+ --sc-warning-content: var(--sc-dark-warning-content, #382800);
922
+ --sc-success-content: var(--sc-dark-success-content, #003320);
923
+
924
+ --sc-base: var(--sc-dark-base, #1d2634);
925
+ --sc-base-50: var(--sc-dark-base-50, #1f2937);
926
+ --sc-base-100: var(--sc-dark-base-100, #252c36);
927
+ --sc-base-200: var(--sc-dark-base-200, #2c3543);
928
+ --sc-base-300: var(--sc-dark-base-300, #38414e);
929
+ --sc-base-400: var(--sc-dark-base-400, #515964);
930
+ --sc-base-500: var(--sc-dark-base-500, #828891);
931
+ --sc-base-600: var(--sc-dark-base-600, #b4b8be);
932
+ --sc-base-700: var(--sc-dark-base-700, #cdd0d5);
933
+ --sc-base-800: var(--sc-dark-base-800, #d9dce0);
934
+ --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
935
+ --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
936
+ `,ln=$`
937
+ :host([theme="dark"]) {
938
+ ${hr}
939
+ }
940
+
941
+ @media (prefers-color-scheme: dark) {
942
+ :host([theme="auto"]) {
943
+ ${hr}
944
+ }
945
+ }
946
+ `;var cn=Object.defineProperty,hn=Object.getOwnPropertyDescriptor,Ge=(r,t,s,i)=>{for(var e=i>1?void 0:i?hn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&cn(t,s,e),e};const dn="sonic-theme";let vt=class extends w{constructor(){super(),this.theme="light",this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var e;const r=document.styleSheets,t=r.length,s=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};(e=tt.get("sonic-theme"))==null||e.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[...vt.styles.map(e=>e.styleSheet),...Array.from(document.styleSheets)];for(const e of t)try{if(!e)continue;const o=e.cssRules;for(const n of o){if(!("style"in n))continue;const l=n.style;for(const c of l)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return r.forEach(e=>i[e]=s.getPropertyValue(e)),i}render(){return g`<slot></slot>`}};vt.styles=[an,ln,nn,$`
947
+ :host([color]) {
948
+ color: var(--sc-base-content);
949
+ }
950
+
951
+ :host([font]) {
952
+ font-family: var(--sc-font-family-base), sans-serif;
953
+ font-weight: var(--sc-font-weight-base);
954
+ font-style: var(--sc-font-style-base);
955
+ }
956
+ ::slotted(.sonic-pop-content) {
957
+ max-width: 80vw;
958
+ background-color: var(--sc-base);
959
+ position: fixed;
960
+ z-index: 99999;
961
+ display: block;
962
+ transform: translateY(1rem) scale(0.95);
963
+ pointer-events: none;
964
+ transition-duration: 0.15s;
965
+ transition-timing-function: ease;
966
+
967
+ transition-property: scale, opacity;
968
+ border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
969
+ }
970
+
971
+ ::slotted(.sonic-pop-content).is-open:not(.is-empty) {
972
+ transform: translateY(0) scale(1);
973
+ opacity: 1;
974
+ pointer-events: auto;
975
+ transition-property: scale, opacity;
976
+ transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
977
+ }
978
+ `],Ge([a({type:String,reflect:!0})],vt.prototype,"theme",2),Ge([a({type:Boolean,reflect:!0})],vt.prototype,"background",2),Ge([a({type:Boolean,reflect:!0})],vt.prototype,"color",2),Ge([a({type:Boolean,reflect:!0})],vt.prototype,"font",2),vt=Ge([_(dn)],vt);var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,dr=(r,t,s,i)=>{for(var e=i>1?void 0:i?un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&pn(t,s,e),e};const fn="sonic-toast";let T=class extends w{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return t||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),T.handleExistingToastDelegation(),this.toasts?g`<div aria-live="polite" style=${ut(s)}>
979
+ ${gs(this.toasts,i=>i.id,i=>g`
980
+ <sonic-toast-item
981
+ maxHeight=${t?"none":"10rem"}
982
+ status=${x(i.status)}
983
+ title=${x(i.title)}
984
+ ?ghost=${i.ghost}
985
+ ?dismissForever=${i.dismissForever}
986
+ ?preserve=${i.preserve}
987
+ id=${x(i.id)}
988
+ @hide=${()=>this.removeItem(i)}
989
+ ${ms({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})}
990
+ >
991
+ <!-- Le texte est passé dans le slot et non pas en propriété pour contrer des problèmatiques de shadow-dom et d'appel exterieur (exemple: fancybox) -->
992
+ ${i.text?I(i.text):""}
993
+ </sonic-toast-item>
994
+ `)}
995
+ </div>`:C}static removeAll(){if(T.delegateToasts){T.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const t=T.getInstance();t&&(t.toasts=t.toasts.filter(s=>s.ghost))}static getInstance(){return T.instance||(T.instance=document.createElement("sonic-toast"),vt.getPopContainer().prepend(T.instance)),T.instance}static add(t){if(T.delegateToasts){T.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:t},"*");return}const s=T.getInstance(),i=t.id??new Date().valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:i,text:t.text,title:t.title,status:t.status,preserve:o?!0:t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const l=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(l)[t.id])return null}if(s!=null&&s.toasts.length){const l={...n};for(const c of s.toasts){const h={...c};if(l.id=h.id=0,X.shallowEqual(l,h))return null}}return s&&(s.toasts=[...s.toasts,n]),n}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=T.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(T.delegateToasts){T.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:t},"*");return}const s=T.getInstance();s&&s.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!X.shallowEqual(s,t,!1))))}};T.delegateToasts=!1,dr([a({type:Array})],T.prototype,"toasts",2),T=dr([_(fn)],T),typeof window<"u"&&(window.SonicToast=window.SonicToast||T);function gn(){var s;const r=i=>{i.data.type=="querySonicToastAvailability"&&i.source.postMessage({type:"sonicToastAvailable"},"*"),i.data.type=="sonicToastAvailable"&&(T.delegateToasts=!0,T.handleExistingToastDelegation()),i.data.type=="addToasts"&&(T.getInstance().toasts=[...T.getInstance().toasts,...i.data.toasts]),i.data.type=="removeAllToasts"&&T.removeAll(),i.data.type=="removeToast"&&T.removeItem(i.data.toast),i.data.type=="addToast"&&T.add(i.data.toast)},t=window.parent!=window;if(window.addEventListener("message",r,!1),t&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!t)for(const i of document.querySelectorAll("iframe"))(s=i.contentWindow)==null||s.postMessage({type:"sonicToastAvailable"},"*")}gn();var mn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,Qe=(r,t,s,i)=>{for(var e=i>1?void 0:i?bn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&mn(t,s,e),e};const vn=new Set,yn=new Set,wn=r=>{for(const t of yn)t(r)},si=(r,t)=>{class s extends r{constructor(...e){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(e){super.props=e}set endPoint(e){this._endPoint=e,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Se(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await tt.getInstance().isLocalStrorageReady,!this.isConnected))return;const e=tt.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();this.isLoading=!0,X.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1});let o=await this.api.get(this.endPoint||this.dataProvider||"",e);if(this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||vn.add(this),wn(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&T.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const n=o._sonic_http_response_,l=this.key.split(".");o=X.traverse(o,l,this.hasAttribute("preserveOtherKeys")),o&&X.isObject(o)&&n&&(o._sonic_http_response_=n)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.publisher)==null||e.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var e;this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),(e=this.publisher)==null||e.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const e=this.getBoundingClientRect();if(e.x<window.innerWidth&&e.right>0&&e.y<window.innerHeight&&e.right>0){this._fetchData();return}const o=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*o,window.innerHeight*o)+"px",threshold:.9};this.iObserver=new IntersectionObserver(h=>this.onIntersection(h),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(h=>h.nodeName.toLowerCase()!="style")[0];if((c==null?void 0:c.nodeName.toLocaleLowerCase())=="slot"&&(c=[...c.children].filter(h=>h.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("span");const h=c.style;h.pointerEvents="none",this.lazyLoadSpan=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(e){var o,n;for(const l of e)if(l.isIntersecting&&this.isFirstLoad){this._fetchData(),(o=this.lazyLoadSpan)==null||o.remove(),this.lazyLoadSpan=void 0,(n=this.iObserver)==null||n.disconnect();break}}}return Qe([a()],s.prototype,"noErrorsRecordings",2),Qe([a()],s.prototype,"props",1),Qe([a({type:String})],s.prototype,"endPoint",1),Qe([a()],s.prototype,"requestId",2),Qe([a({type:Number})],s.prototype,"refetchEveryMs",2),s};var _n=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,ge=(r,t,s,i)=>{for(var e=i>1?void 0:i?xn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&_n(t,s,e),e};const ys=r=>{class t extends r{constructor(...i){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){var o;const i=(o=this.shadowRoot)==null?void 0:o.querySelector("input");if(!i||i.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),i.reportValidity()}set type(i){this.hasAttribute("type")&&!this.forceAutoFill&&(i=this.getAttribute("type")),this._type=i,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(i){this.hasAttribute("description")&&!this.forceAutoFill&&(i=this.getAttribute("description")),this._description=i,this.requestUpdate()}get label(){return this._label}set label(i){this.hasAttribute("label")&&!this.forceAutoFill&&(i=this.getAttribute("label")),this._label=i,this.requestUpdate()}}return ge([a()],t.prototype,"forceAutoFill",2),ge([a({type:String})],t.prototype,"type",1),ge([a()],t.prototype,"description",1),ge([a()],t.prototype,"label",1),ge([a({type:String,reflect:!0})],t.prototype,"status",2),ge([a({type:Number})],t.prototype,"tabindex",2),ge([a({type:String})],t.prototype,"autocomplete",2),t},pr=si,Pn=Js,ur=Oe,fr=ys,Kt=Y,ii=We;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:pr,FormCheckable:Pn,FormElement:ur,FormInput:fr,Subscriber:Kt,TemplatesContainer:ii};/**
996
+ * @license
997
+ * Copyright 2020 Google LLC
998
+ * SPDX-License-Identifier: BSD-3-Clause
999
+ */const kt=de(class extends Ae{constructor(r){if(super(r),r.type!==he.CHILD)throw Error("templateContent can only be used in child bindings")}render(r){return this.vt===r?bt:(this.vt=r,document.importNode(r.content,!0))}});var $n=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,gr=(r,t,s,i)=>{for(var e=i>1?void 0:i?Cn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&$n(t,s,e),e};const An="sonic-fetch";let ws=class extends si(Y(ii(w))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return C;const r=this.loader===!0||this.loader===""?"fixed":this.loader;return g`<sonic-loader mode=${r}></sonic-loader>`}renderSkeleton(){const r=this.templateParts.skeleton;return this.isLoading&&r?kt(r):C}render(){return g`
1000
+ ${this.renderSkeleton()} ${this.renderLoader()}
1001
+ ${this.isLoading?C:g`<slot></slot>`}
1002
+ `}};ws.styles=[$`
1003
+ :host {
1004
+ display: contents;
1005
+ }
1006
+ `],gr([a()],ws.prototype,"loader",2),ws=gr([_(An)],ws);var Sn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,mr=(r,t,s,i)=>{for(var e=i>1?void 0:i?On(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Sn(t,s,e),e};const Dn="sonic-if";let _s=class extends w{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?g` <slot></slot> `:C}};_s.styles=$`
1007
+ :host {
1008
+ display: contents;
1009
+ }
1010
+ `,mr([a({type:Boolean})],_s.prototype,"condition",2),_s=mr([_(Dn)],_s);const kn=$`
1011
+ :host([align="left"]) .sonic-loader--inline {
1012
+ margin-left: 0;
1013
+ }
1014
+
1015
+ :host([align="right"]) .sonic-loader--inline {
1016
+ margin-left: auto;
1017
+ margin-right: 0;
1018
+ }
1019
+ .sonic-loader--inline {
1020
+ display: block;
1021
+ position: relative;
1022
+ width: 80px;
1023
+ height: 24px;
1024
+ margin: auto;
1025
+ z-index: 20;
1026
+ }
1027
+ .sonic-loader--inline div {
1028
+ position: absolute;
1029
+ top: 5px;
1030
+ width: 13px;
1031
+ height: 13px;
1032
+ border-radius: 50%;
1033
+ background: var(--sc-loader-bg);
1034
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
1035
+ }
1036
+ .sonic-loader--inline div:nth-child(1) {
1037
+ left: 8px;
1038
+ animation: lds-ellipsis1 0.6s infinite;
1039
+ }
1040
+ .sonic-loader--inline div:nth-child(2) {
1041
+ left: 8px;
1042
+ animation: lds-ellipsis2 0.6s infinite;
1043
+ }
1044
+ .sonic-loader--inline div:nth-child(3) {
1045
+ left: 32px;
1046
+ animation: lds-ellipsis2 0.6s infinite;
1047
+ }
1048
+ .sonic-loader--inline div:nth-child(4) {
1049
+ left: 56px;
1050
+ animation: lds-ellipsis3 0.6s infinite;
1051
+ }
1052
+
1053
+ @keyframes lds-ellipsis1 {
1054
+ 0% {
1055
+ transform: scale(0);
1056
+ }
1057
+ 100% {
1058
+ transform: scale(1);
1059
+ }
1060
+ }
1061
+ @keyframes lds-ellipsis3 {
1062
+ 0% {
1063
+ transform: scale(1);
1064
+ }
1065
+ 100% {
1066
+ transform: scale(0);
1067
+ }
1068
+ }
1069
+ @keyframes lds-ellipsis2 {
1070
+ 0% {
1071
+ transform: translate(0, 0);
1072
+ }
1073
+ 100% {
1074
+ transform: translate(24px, 0);
1075
+ }
1076
+ }
1077
+ `,Ln=$`
1078
+
1079
+ @keyframes sonic-loader--fixed {
1080
+ 0% {
1081
+ transform: scale(0);
1082
+ opacity: 0;
1083
+ }
1084
+ 5% {
1085
+ opacity: 1;
1086
+ }
1087
+ 70% {
1088
+ opacity:90%;
1089
+ }
1090
+ 100% {
1091
+ transform: scale(1);
1092
+ opacity: 0;
1093
+ }
1094
+ }
1095
+
1096
+ .sonic-loader--fixed {
1097
+ position: fixed;
1098
+ top:50%;
1099
+ left:50%;
1100
+ transform:transateY(-50%) translateX(-50%);
1101
+ z-index:999;
1102
+ }
1103
+
1104
+ .sonic-loader--fixed > div:nth-child(2) {
1105
+ animation-delay: -0.5s;
1106
+ }
1107
+ .sonic-loader--fixed > div:nth-child(3) {
1108
+ animation-delay: -0.2s;
1109
+ }
1110
+
1111
+ .sonic-loader--fixed > div:nth-child(4) {
1112
+ display:none !important;
1113
+ }
1114
+ .sonic-loader--fixed > div {
1115
+ background-color: var(--sc-loader-bg);
1116
+ width: 5rem;
1117
+ height: 5rem;
1118
+ border-radius: 100%;
1119
+ margin: 2px;
1120
+ animation-fill-mode: both;
1121
+ position: absolute;
1122
+ top: 0px;
1123
+ opacity: 0;
1124
+ margin: 0;
1125
+ top: -2.5rem;
1126
+ left: -2.5rem;
1127
+ width: 5rem;
1128
+ height: 5rem;
1129
+ animation: sonic-loader--fixed 1s 0s linear infinite;
1130
+ }
1131
+
1132
+ `;var En=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,ri=(r,t,s,i)=>{for(var e=i>1?void 0:i?Nn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&En(t,s,e),e};const Tn="sonic-loader";let ot=class extends w{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(r){ot.loader||(ot.loader=document.createElement("sonic-loader"));const t=ot.loader;r||(r={}),r.mode&&t.setAttribute("mode",r.mode),r.noDelay&&t.setAttribute("noDelay",""),r.container||(r.container=vt.getPopContainer(),r.mode="fixed"),r.container.appendChild(t),ot.callCounter++}static hide(){ot.callCounter--,!(ot.callCounter>0)&&ot.loader&&ot.loader.remove()}render(){return g`<div class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} ">
1133
+ <div></div>
1134
+ <div></div>
1135
+ <div></div>
1136
+ <div></div>
1137
+ </div>`}};ot.styles=[kn,Ln,$`
1138
+ :host {
1139
+ --sc-loader-bg: var(--sc-primary, currentColor);
1140
+ pointer-events: none;
1141
+ }
1142
+
1143
+ .sonic-loader {
1144
+ opacity: 0;
1145
+ animation: showLoader 0.5s 0.5s forwards;
1146
+ }
1147
+ .sonic-loader--inline,
1148
+ .sonic-loader--nodelay {
1149
+ animation-delay: 0s;
1150
+ }
1151
+
1152
+ @keyframes showLoader {
1153
+ 0% {
1154
+ opacity: 0;
1155
+ }
1156
+
1157
+ 100% {
1158
+ opacity: 1;
1159
+ }
1160
+ }
1161
+ `],ot.callCounter=0,ri([a({type:String})],ot.prototype,"mode",2),ri([a({type:Boolean})],ot.prototype,"noDelay",2),ot=ri([_(Tn)],ot);var Mn=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,In=(r,t,s,i)=>{for(var e=i>1?void 0:i?jn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Mn(t,s,e),e};const Fn="sonic-subscriber";let br=class extends Y(w){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(r){super.updated(r),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return g`<slot></slot> `}};br=In([_(Fn)],br);var zn=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,me=(r,t,s,i)=>{for(var e=i>1?void 0:i?Rn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&zn(t,s,e),e};const Un="sonic-list";let Zt=class extends si(Y(We(w))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return C;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return g`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const r=this.templateParts.skeleton;return this.isLoading&&r?kt(r):C}renderLoadingState(){return g`${this.renderSkeleton()} ${this.renderLoader()}`}renderNoResultState(){return g` <div
1162
+ style="color: var(--sc-base-400);
1163
+ font-size: 1.5em;
1164
+ margin: 4rem 0;
1165
+ display: flex;
1166
+ gap: 0.5rem;"
1167
+ >
1168
+ <sonic-icon name="emoji-puzzled" size="lg"></sonic-icon
1169
+ ><span class="sonic-no-result-text"
1170
+ >${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
1171
+ >
1172
+ </div>`}formatProps(){let r=this.props;if(r==null)return null;const t=r._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(r)||(s?r=Object.entries(r).map(([i,e])=>({key:i,value:e})):X.isObject(r)&&Object.keys(r).length>0&&(!t||t.ok)?r=[r]:r=[]),r=r.filter(i=>i!=null),t&&(r._sonic_http_response_=t),r}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!X.isObject(this.props))return g`<div></div>`;const i=this.formatProps();if(((i==null?void 0:i.length)||0)==0&&this.templateParts["no-item"])return kt(this.templateParts["no-item"]);const e=this.templateList.length;let o=-1;const n=this.hasAttribute("extractValues"),l=this.templateParts.separator,c=(i==null?void 0:i.length)||0,h=i==null?void 0:i.slice(this.offset,this.offset+this.limit);return g`
1173
+ ${h==null?void 0:h.map((d,f)=>{if(d==null)return C;let m=null,v=f;if(typeof d=="object"&&!Array.isArray(d)){const D=d[this.templateKey];D&&typeof D=="string"&&(m=this.templateParts[D]),n&&(v=d==null?void 0:d.key)}if(v=="_sonic_http_response_"||typeof v!="string"&&typeof v!="number")return C;const b=f>=c-1,P=f%2,S=this.publisher[v];return S._key_=v+"",S._metadata_={...S._metadata_.get(),key:v,even:P==0,odd:P==1,onlyChild:c==1,firstChild:f==0,lastChild:b},o++,m&&(o=-1),d&&g`
1174
+ <sonic-subscriber
1175
+ ?debug=${this.defferedDebug===!0}
1176
+ .bindPublisher=${function(){return S}}
1177
+ .propertyMap?=${this.itemPropertyMap}
1178
+ dataProvider="${this.dataProvider}/list-item/${v}"
1179
+ >
1180
+ ${kt(m||this.templateList[o%e])}
1181
+ </sonic-subscriber>
1182
+ ${l&&!b?kt(l):C}
1183
+ `})}
1184
+ `}};me([a({type:Object})],Zt.prototype,"itemPropertyMap",2),me([a({type:String})],Zt.prototype,"templateKey",2),me([a({type:String})],Zt.prototype,"idKey",2),me([a()],Zt.prototype,"loader",2),me([a()],Zt.prototype,"limit",2),me([a()],Zt.prototype,"offset",2),Zt=me([_(Un)],Zt);/**
1185
+ * @license
1186
+ * Copyright 2021 Google LLC
1187
+ * SPDX-License-Identifier: BSD-3-Clause
1188
+ */function*Vn(r,t){if(r!==void 0){let s=0;for(const i of r)yield t(i,s++)}}var Bn=Object.defineProperty,Hn=Object.getOwnPropertyDescriptor,ft=(r,t,s,i)=>{for(var e=i>1?void 0:i?Hn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Bn(t,s,e),e};const qn="sonic-queue";let et=class extends Y(w){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.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{var n;const t=this.dataProviderExpression.split("?");t.shift();const s=new URLSearchParams(t.join("?")),i=(n=this.filterPublisher)==null?void 0:n.get(),e=this.filteredFields.split(" ");for(const l in i){let c=i[l];Array.isArray(c)&&(c=c.filter(h=>h!==null)),!(this.filteredFields&&!e.includes(l)||c==null||c.toString()==="")&&s.set(l,i[l].toString())}const o=s.toString();if(!(o==this.searchHash&&!this.isFirstRequest)){this.searchHash=o;for(const l of this.listDataProviders)N.delete(l);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const l=this.resultCount;this.props=null,this.requestId++,this.resultCount=l,await N.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.dataProviderExpression="",this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){var r;for(const t of this.listDataProviders)N.delete(t),this.listDataProviders=[];(r=this.filterPublisher)==null||r.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=et.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),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=ue.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await N.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){var t;const r=this.getAncestorAttributeValue("dataFilterProvider");if(!r){this.next();return}this.filterPublisher=N.getInstance().get(r),(t=this.filterPublisher)==null||t.onInternalMutation(this.updateFilteredContent)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(r){var f,m,v;let t=this.offset;const i=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&r&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!r,r){if(this.publisher.lastFetchedData=r.detail.fetchedData,r.detail.requestId<this.requestId)return;if(this.resultCount+=((f=r.detail.props)==null?void 0:f.length)||0,!r.detail.isFirstLoad||!((m=r.detail.props)!=null&&m.length)||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const b=this.props,P=b[b.length-1];t=parseInt(P.offset.toString())+parseInt(P.limit.toString())}else{const b=[];b.resultCount=this.resultCount,b.lastFetchedData=(r==null?void 0:r.detail.fetchedData)||{},this.props=b}i>0&&r&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let e=this.dataProviderExpression.replace("$offset",t+"").replace("$limit",this.limit+"");const o=e.split("?");let n=o.shift();const l=new URLSearchParams(o.join("?")),c=(v=this.filterPublisher)==null?void 0:v.get(),h=this.filteredFields.split(" ");for(const b in c)this.filteredFields&&h.includes(b)||c[b]==null||c[b]==""||l.set(b,c[b]);this.searchHash||(this.searchHash=l.toString()),n=n+"?"+l.toString(),e=e+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(e);const d=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:e,endPoint:n,offset:t,limit:this.limit}];d.resultCount=this.resultCount,d.lastFetchedData=(r==null?void 0:r.detail.fetchedData)||{},this.props=d,this.lastRequestTime=new Date().getTime()}render(){if(!Array.isArray(this.props))return C;let r=!this.noLazyload;return this.props.length==1&&(r=!1),g`
1189
+ ${Vn(this.props,(t,s)=>{var e;const i=s==0?this.templates:(e=this.templates)==null?void 0:e.filter(o=>o.getAttribute("data-value")!="no-item");return g`
1190
+ <sonic-list
1191
+ fetch
1192
+ loader="${this.loader}"
1193
+ cache=${this.cache}
1194
+ displayContents
1195
+ lazyBoundsRatio=${this.lazyBoundsRatio}
1196
+ ?lazyload=${r}
1197
+ localStorage=${this.localStorage}
1198
+ requestId=${this.requestId}
1199
+ .itemPropertyMap=${this.itemPropertyMap}
1200
+ ?debug=${this.defferedDebug===!0}
1201
+ @load=${this.next}
1202
+ key=${this.key}
1203
+ @loading=${this.resetDuration}
1204
+ dataProvider="${t.dataProvider}"
1205
+ endPoint="${t.endPoint}"
1206
+ idKey=${this.idKey}
1207
+ .templates=${i}
1208
+ >
1209
+ </sonic-list>
1210
+ `})}
1211
+ `}};et.instanceCounter=0,ft([a({type:Array})],et.prototype,"templates",2),ft([a({type:Object})],et.prototype,"itemPropertyMap",2),ft([a()],et.prototype,"cache",2),ft([a()],et.prototype,"targetRequestDuration",2),ft([a()],et.prototype,"limit",2),ft([a()],et.prototype,"lazyBoundsRatio",2),ft([a()],et.prototype,"offset",2),ft([a()],et.prototype,"resultCount",2),ft([a({type:Boolean})],et.prototype,"noLazyload",2),ft([a({type:String})],et.prototype,"loader",2),ft([a()],et.prototype,"filteredFields",2),ft([a({type:String})],et.prototype,"dataProviderExpression",2),ft([a({type:String})],et.prototype,"idKey",2),et=ft([_(qn)],et);var Wn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,ke=(r,t,s,i)=>{for(var e=i>1?void 0:i?Kn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wn(t,s,e),e};const Zn="sonic-submit";let Yt=class extends Y(w){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",r=>{r.key==="Enter"&&this.submit()}),super.connectedCallback(),this.api=new Se(this.getApiConfiguration())}submitNativeForm(){const r=ue.getClosestForm(this);if(!r)return;const t=this.getAncestorAttributeValue("formDataProvider"),s=N.get(t).get();for(const e in s){if(e=="isFormValid")continue;let o=r.querySelector('input[name="'+e+'"], select[name="'+e+'"], textarea[name="'+e+'"]');o||(o=document.createElement("input"),o.type="hidden",o.name=e,r.appendChild(o));let n=s[e];Array.isArray(n)&&(n=n.join(",")),o.type==="checkbox"||o.type==="radio"?n&&(o.checked=!0):o.value=n}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",r.appendChild(i),i&&i.click()}async submit(){var v;const r=N.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(r.isFormValid=!0,r.invalidateForm(),!r.isFormValid.get())return;if(this.disabled=!0,r.isFormValid,this.hasAttribute("native")){this.submitNativeForm();return}const s=((v=this.getAttribute("method"))==null?void 0:v.toLocaleLowerCase())||"post",i=this.hasAttribute("sendAsFormData"),e=r.get();delete e.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),n=o?N.getInstance().get(o):null;let l={};n&&(l=n.get());let c=null;const h=this.getAncestorAttributeValue("dataProvider"),d=this.endPoint||h;ot.show();const f=async()=>{var p,u,y,A,O,E,V,W;if(i)c=await((p=this.api)==null?void 0:p.submitFormData(d,e,s,l));else switch(s){case"put":c=await((u=this.api)==null?void 0:u.put(d,e,l));break;case"patch":c=await((y=this.api)==null?void 0:y.patch(d,e,l));break;case"delete":c=await((A=this.api)==null?void 0:A.delete(d,e,l));break;case"get":const _t=new URLSearchParams;if(e)for(const Tr in e)_t.append(Tr,e[Tr]);const mh="?"+_t.toString();c=await((O=this.api)==null?void 0:O.get(d+mh,l));break;default:c=await((E=this.api)==null?void 0:E.post(d,e,l));break}ot.hide(),c?c._sonic_http_response_&&!c._sonic_http_response_.ok&&Object.keys(c).length===1&&(c.messages=[{content:"Network Error",status:"error"}]):c={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach(_t=>N.get(_t).set({}));const P=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",S=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(W=(V=this.api)==null?void 0:V.lastResult)!=null&&W.ok&&e[P]&&e[S]&&this.saveCredentials(e[P],e[S]),this.submitResultKey&&(c=X.traverse(c,this.submitResultKey.split("."),!0));const D=this.getAncestorAttributeValue("submitResultDataProvider");D&&N.get(D).set(c),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:c,bubbles:!0,composed:!0}))},m=n!=null&&n.needsCaptchaValidation.get()?n:r.needsCaptchaValidation.get()?r:null;if(m){m.captchaMethod=s,m.captchaAction=(h==null?void 0:h.split("?")[0])??this.getAncestorAttributeValue("formDataProvider")??"submit",m.captchaToken="request_token";const b=P=>{P&&P!="request_token"&&(f(),m.captchaToken.offAssign(b))};m.captchaToken.onAssign(b)}else f()}async saveCredentials(r,t){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:r,password:t});await navigator.credentials.store(s)}}render(){return g`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Yt.styles=$`
1212
+ [data-disabled] {
1213
+ opacity: 0.3;
1214
+ pointer-events: none;
1215
+ user-select: none;
1216
+ }
1217
+ `,ke([a({type:String})],Yt.prototype,"submitResultKey",2),ke([a({type:Boolean})],Yt.prototype,"disabled",2),ke([a({type:String})],Yt.prototype,"endPoint",2),ke([a()],Yt.prototype,"name",2),ke([a()],Yt.prototype,"value",2),Yt=ke([_(Zn)],Yt);var Yn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,oi=(r,t,s,i)=>{for(var e=i>1?void 0:i?Gn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Yn(t,s,e),e};const Qn="sonic-router";let xs=class extends Y(We(w)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",rt.onChange(this),super.connectedCallback()}disconnectedCallback(){rt.offChange(this),super.disconnectedCallback()}set location(r){this._location=r,this.requestUpdate()}get location(){return this._location}render(){const r=[];for(const t of this.templatePartsList){const s=t.getAttribute(this.templateValueAttribute)||"";if(new RegExp(s).test(this.location))r.push(t);else try{new pe("(/)*"+s+"*").match(this.location)&&(t.setAttribute("mode","patternMatching"),r.push(t))}catch{this.location.indexOf(s.replace(document.location.origin,""))!=-1&&r.push(t)}}if(r.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const t=this.templatePartsList.find(s=>s.hasAttribute("data-fallback"));t&&r.push(t)}return g`${gs(r,(t,s)=>s+new Date().getTime(),t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let i="";const e=t.getAttribute("dataProviderExpression")||"";if(t.getAttribute("mode")=="patternMatching"){const o=new pe("(/)*"+(t.getAttribute(this.templateValueAttribute)||"")+"*");i=new pe(e).stringify(o.match(this.location))}else{const o=new RegExp(t.getAttribute(this.templateValueAttribute)||""),n=(this.location+"").match(o);n&&(i=((s=n.shift())==null?void 0:s.replace(o,e))||"")}return g`<div
1218
+ style="display:contents"
1219
+ dataProvider="${i}"
1220
+ >
1221
+ ${kt(t)}
1222
+ </div>`}return kt(t)})}`}};oi([a({type:String})],xs.prototype,"fallBackRoute",2),oi([a()],xs.prototype,"location",1),xs=oi([_(Qn)],xs);var Jn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor,ta=(r,t,s,i)=>{for(var e=i>1?void 0:i?Xn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Jn(t,s,e),e};const ea="sonic-redirect";let vr=class extends Y(w){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")){rt.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=X.traverse(this.props,r);t&&!(X.isObject(t)&&t)&&rt.changeFromComponent(this)}};vr=ta([_(ea)],vr);var sa=Object.defineProperty,ia=Object.getOwnPropertyDescriptor,ni=(r,t,s,i)=>{for(var e=i>1?void 0:i?ia(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&sa(t,s,e),e};const ra="sonic-states";let Ps=class extends Y(We(w)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=r=>{this.state=r,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 r=this.statePath.split(".");for(const t of r)this.statePublisher=this.statePublisher[t];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var r;this.statePath&&((r=this.statePublisher)==null||r.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const r=[];let t=this.state;(!Array.isArray(t)&&X.isObject(t)||t===void 0)&&(t="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),e=t;if(this.inverted&&(e=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(e))r.push(s),s.removeAttribute("mode");else{const n=new pe(i);n.names.length>0&&n.match(e)&&(s.setAttribute("mode","patternMatching"),r.push(s))}}return g`${gs(r,(s,i)=>i+new Date().getTime(),s=>{var i;if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){const e=s.getAttribute("dataProviderExpression");let o="",n=t,l=s.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=l,l=t),l==""&&(l=this.inverted?"*":"^$"),s.getAttribute("mode")=="patternMatching"){const c=new pe(l);o=new pe(e).stringify(c.match(n))}else{const c=new RegExp(l),h=(n+"").match(c);h&&(o=(i=h.shift())==null?void 0:i.replace(c,e))}return g`<div
1223
+ style="display:contents"
1224
+ dataProvider="${o}"
1225
+ >
1226
+ ${kt(s)}
1227
+ </div>`}return kt(s)})}`}};ni([a()],Ps.prototype,"state",2),ni([a({type:Boolean,reflect:!0})],Ps.prototype,"inverted",2),Ps=ni([_(ra)],Ps);var oa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,aa=(r,t,s,i)=>{for(var e=i>1?void 0:i?na(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&oa(t,s,e),e};const la="sonic-scope";let yr=class extends w{createRenderRoot(){return this}render(){return g`<slot></slot>`}};yr=aa([_(la)],yr);var ca=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,wr=(r,t,s,i)=>{for(var e=i>1?void 0:i?ha(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ca(t,s,e),e};const da="sonic-example";let ai=class extends Y(w){constructor(){super(...arguments),this.text="Example"}render(){return g`<div>${this.text}</div>`}};wr([a()],ai.prototype,"text",2),ai=wr([_(da)],ai);const pa={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 ua{async transform(t,s){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(t){const s=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,s)}getNodesMatchingPatterns(t,s){if(!t)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let e=[],o=0;for(const n of t)for(const l of i)this.nodeMatchesPattern(n,l)&&e.push({parent:s,child:l,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],l)),o++;return e}stringMatchesExpression(t,s){return!s||t&&t.match(s)}nodeMatchesPattern(t,s){const i=t,e=s,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(e[c],i[c]))return!1;const n=t.attributes,l=s.attributes;if(n&&!l)return!1;if(n){for(const c in n)if(!l||!this.stringMatchesExpression(l[c],n[c]))return!1}return!0}unwrap(t,s){var i,e;for(const o of s)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((e=o.parent.nodes)==null||e.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,s){var n,l,c,h,d,f;const i={...t.ui};i.nodes||(i.nodes=[]);let e=0;for(const m of s)(n=i.nodes)==null||n.push(m.child),e>0&&((l=m.parent.nodes)==null||l.splice(m.parent.nodes.indexOf(m.child),1)),e++;const o=(h=(c=s[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(s[0].child);o&&((d=s[0].parent.nodes)==null||d.splice(o,1),(f=s[0].parent.nodes)==null||f.splice(o,0,i))}move(t,s){var i,e;for(const o of s){(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1);let n=[];t.after&&(n=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(n=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const l=n[0];l&&((e=l.parent.nodes)==null||e.splice(l.parent.nodes.indexOf(l.child)+(t.after?1:0),0,o.child))}}remap(t,s){var i,e,o;for(const n of s){const l={...t.ui};l.attributes||(l.attributes={});const c=n.child.attributes;if(c)for(const b in c)Object.prototype.hasOwnProperty.call(l.attributes,"key")||(l.attributes[b]=c[b]);const h=["libraryKey","innerHTML","prefix","suffix","markup"],d=n.child,f=l;for(const b of h)!Object.prototype.hasOwnProperty.call(l,b)&&d[b]&&(f[b]=d[b]);l.nodes||(l.nodes=[]);const m=n.child.nodes;if(m)for(const b of m)l.nodes.push(b);const v=((i=n.parent.nodes)==null?void 0:i.indexOf(n.child))||-1;v!=-1&&((e=n.parent.nodes)==null||e.splice(v,1),(o=n.parent.nodes)==null||o.splice(v,0,l))}}delete(t,s){var i;for(const e of s)(i=e.parent.nodes)==null||i.splice(e.parent.nodes.indexOf(e.child),1)}insert(t,s){var o;const i=t.after?"after":t.before?"before":"in";s=[],t.after?s=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?s=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(s=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=s[0];e&&(i=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):(o=e.parent.nodes)==null||o.splice(e.parent.nodes.indexOf(e.child)+(i=="after"?1:0),0,{...t.ui}))}}var fa=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,li=(r,t,s,i)=>{for(var e=i>1?void 0:i?ga(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&fa(t,s,e),e};const ma="sonic-sdui";let $s=class extends pr(Kt(w)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(r){this.props==null&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(r)}async updateContents(){if(!this.sduiDescriptor)return;const r={};Object.assign(r,pa,this.sduiDescriptor.library),this.sduiDescriptor.library=r,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(r=>r.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const r of this.sduiDescriptor.js)ue.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)ue.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new ua().transform(this.sduiDescriptor,t)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=t}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let r=this.sduiDescriptor.nodes;r||(r=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),r.push(t),r.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(r){const t=r.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,s),s=this.handleMarkup(r,s),i||(i=s),this.handleChildNodes(r,i,s),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,s):s}handlePrefixSuffix(r,t){const s=document.createElement("div");return s.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),s.style.display="contents",s}handleChildNodes(r,t,s){if(r.nodes){const i=r.nodes;for(const e of i){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=s.querySelector(e.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let s,i;if(r.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(t);return{element:s,contentElement:i}}handleAttributes(r,t){const s=r.attributes;for(const i in s){const e=s[i],o=Ke.isObject(e)?JSON.stringify(e):e;t.setAttribute(i,o)}}handleMarkup(r,t){return r.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=r.markup),t}handleInnerHTML(r,t){var s;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(s=this.api)==null||s.post(i,{labels:[r.innerHTML.substring(8)]}).then(e=>{t&&(t.innerHTML+=e)})}else t&&(t.innerHTML+=r.innerHTML)}};li([a()],$s.prototype,"sduiKey",2),li([a()],$s.prototype,"messagesKey",2),$s=li([_(ma)],$s);var ba=Object.defineProperty,va=Object.getOwnPropertyDescriptor,_r=(r,t,s,i)=>{for(var e=i>1?void 0:i?va(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ba(t,s,e),e};let Cs=class extends Kt(w){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(r){this._composition=r,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 r=this.listeners;this.listeners=[],r.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(r,t){if(r)for(const s in r){const i=r[s];if(typeof i=="string"){const e=i.split("."),o=e.shift();if(!o)continue;let n=tt.get(o);n=Ke.traverse(n,e);const l={publisher:n,subscriber:c=>{t[s]=c}};this.listeners.push(l),n.onAssign(l.subscriber),t._proxies_.set(s,n)}else{this.publisher[s]={};const e=new Ns({},t);t._proxies_.set(s,e);const o={publisher:e,subscriber:n=>{t[s]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(i,e)}}}render(){return g`<slot></slot>`}};Cs.styles=[$`
1228
+ :host {
1229
+ display: contents;
1230
+ }
1231
+ `],_r([a({type:Object})],Cs.prototype,"composition",1),Cs=_r([_("sonic-mix")],Cs);var ya=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,_a=(r,t,s,i)=>{for(var e=i>1?void 0:i?wa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ya(t,s,e),e};const xa="sonic-value";let xr=class extends Kt(w){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?g`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:g`${I(this.props.toString())}<slot name="prefix"></slot><slot></slot
1232
+ ><slot name="suffix"></slot>`}};xr=_a([_(xa)],xr);var Pa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Je=(r,t,s,i)=>{for(var e=i>1?void 0:i?$a(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pa(t,s,e),e};const Ca="sonic-badge";let be=class extends w{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return g`
1233
+ <slot name="prefix"></slot>
1234
+ <slot></slot>
1235
+ <slot name="suffix"></slot>
1236
+ `}};be.styles=[Ot,$`
1237
+ :host {
1238
+ --sc-badge-gap: 0.3em;
1239
+ --sc-badge-py: 0.35em;
1240
+ --sc-badge-px: 0.67em;
1241
+ --sc-fs: 1rem;
1242
+
1243
+ --sc-badge-color: var(--sc-base-content, #1f2937);
1244
+ --sc-badge-bg: var(--sc-base-100, #e5e7eb);
1245
+
1246
+ /*--sc-badge-border-with: var(--sc-form-border-width, 0.1rem);*/
1247
+ --sc-badge-border-with: 1px;
1248
+ --sc-badge-border-color: transparent;
1249
+ --sc-badge-border: var(--sc-badge-border-with) solid var(--sc-badge-border-color);
1250
+
1251
+ --sc-badge-rounded: 0.85em;
1252
+ --sc-badge-fw: var(--sc-font-weight-base);
1253
+
1254
+ display: inline-flex;
1255
+ align-items: center;
1256
+ box-sizing: border-box;
1257
+ line-height: var(--sc-lh);
1258
+ border-radius: var(--sc-badge-rounded);
1259
+
1260
+ background: var(--sc-badge-bg);
1261
+ color: var(--sc-badge-color);
1262
+
1263
+ font-family: var(--sc-badge-ff, var(--sc-font-family-base, inherit));
1264
+ font-weight: var(--sc-badge-fw);
1265
+ line-height: 1;
1266
+
1267
+ padding-top: var(--sc-badge-py);
1268
+ padding-bottom: var(--sc-badge-py);
1269
+ padding-left: var(--sc-badge-px);
1270
+ padding-right: var(--sc-badge-px);
1271
+ min-height: calc(var(--sc-badge-px) * 2);
1272
+ border: var(--sc-badge-border);
1273
+ -webkit-print-color-adjust: exact;
1274
+ }
1275
+
1276
+ /*TYPES*/
1277
+ :host([type="primary"]) {
1278
+ --sc-badge-color: var(--sc-primary-content);
1279
+ --sc-badge-bg: var(--sc-primary);
1280
+ }
1281
+ :host([type="warning"]) {
1282
+ --sc-badge-color: var(--sc-warning-content);
1283
+ --sc-badge-bg: var(--sc-warning);
1284
+ }
1285
+ :host([type="danger"]) {
1286
+ --sc-badge-color: var(--sc-danger-content);
1287
+ --sc-badge-bg: var(--sc-danger);
1288
+ }
1289
+ :host([type="info"]) {
1290
+ --sc-badge-color: var(--sc-info-content);
1291
+ --sc-badge-bg: var(--sc-info);
1292
+ }
1293
+ :host([type="success"]) {
1294
+ --sc-badge-color: var(--sc-success-content);
1295
+ --sc-badge-bg: var(--sc-success);
1296
+ }
1297
+ :host([type="neutral"]) {
1298
+ --sc-badge-color: var(--sc-base);
1299
+ --sc-badge-bg: var(--sc-base-content);
1300
+ }
1301
+
1302
+ /*SIZE*/
1303
+ :host {
1304
+ font-size: var(--sc-fs);
1305
+ gap: var(--sc-badge-gap);
1306
+ }
1307
+
1308
+ :host([size="2xs"]) {
1309
+ --sc-badge-gap: 0.35em;
1310
+ }
1311
+ :host([size="xs"]) {
1312
+ --sc-badge-gap: 0.35em;
1313
+ }
1314
+
1315
+ :host([size="sm"]) {
1316
+ --sc-badge-gap: 0.35em;
1317
+ }
1318
+
1319
+ :host([size="lg"]) {
1320
+ --sc-lh: 1.2;
1321
+ --sc-badge-gap: 0.5em;
1322
+ }
1323
+
1324
+ :host([size="xl"]) {
1325
+ --sc-lh: 1.2;
1326
+ --sc-badge-gap: 0.5em;
1327
+ }
1328
+
1329
+ :host([contrast]) {
1330
+ --sc-badge-color: var(--sc-contrast-content);
1331
+ --sc-badge-bg: var(--sc-contrast);
1332
+ }
1333
+
1334
+ /*OUTLINE*/
1335
+ :host([variant="outline"][type]) {
1336
+ border-width: var(--sc-badge-border-with) !important;
1337
+ border-color: var(--sc-badge-bg);
1338
+ color: var(--sc-badge-bg);
1339
+ background: transparent;
1340
+ }
1341
+
1342
+ :host([variant="outline"][type="default"]) {
1343
+ border-color: var(--sc-base-400);
1344
+ color: var(--sc-base-500);
1345
+ background: transparent;
1346
+ }
1347
+
1348
+ /*GHOST*/
1349
+ :host([variant="ghost"][type]) {
1350
+ color: var(--sc-badge-bg);
1351
+ background: transparent;
1352
+ padding: 0;
1353
+ }
1354
+ @media (forced-colors: active) {
1355
+ :host([variant="ghost"][type]) {
1356
+ padding: var(--sc-badge-py) var(--sc-badge-px);
1357
+ }
1358
+ }
1359
+
1360
+ :host([variant="ghost"][type="default"]) {
1361
+ color: var(--sc-badge-color);
1362
+ background: transparent;
1363
+ }
1364
+
1365
+ :host([ellipsis]) {
1366
+ flex-wrap: nowrap;
1367
+ white-space: nowrap;
1368
+ max-width: 100%;
1369
+ }
1370
+ :host([ellipsis]) slot {
1371
+ overflow: hidden;
1372
+ display: block;
1373
+ text-overflow: ellipsis;
1374
+ white-space: nowrap;
1375
+ max-width: 100%;
1376
+ }
1377
+
1378
+ slot[name="suffix"],
1379
+ slot[name="prefix"] {
1380
+ flex-shrink: 0;
1381
+ }
1382
+ `],Je([a({type:String,reflect:!0})],be.prototype,"type",2),Je([a({type:String,reflect:!0})],be.prototype,"variant",2),Je([a({type:String,reflect:!0})],be.prototype,"size",2),Je([a({type:Boolean,reflect:!0})],be.prototype,"ellipsis",2),be=Je([_(Ca)],be);class Aa{static fixBlankLink(t){const i=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{i==null||i.shell.openExternal(t.href)})}}var Sa=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,Le=(r,t,s,i)=>{for(var e=i>1?void 0:i?Oa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Sa(t,s,e),e};const Da="sonic-link";let Gt=class extends w{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(r){this._location=r,rt.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(rt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{var t,s;r.key==="Enter"&&((s=(t=this.shadowRoot)==null?void 0:t.querySelector("a"))==null||s.click())}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){rt.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,Aa.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),rt.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?g`
1383
+ <a
1384
+ href="${this.href}"
1385
+ aria-label=${this.ariaLabel||C}
1386
+ target=${x(this.target)}
1387
+ @click=${this.pushState?this.handlePushState:null}
1388
+ >
1389
+ <slot></slot>
1390
+ </a>
1391
+ `:g`<slot></slot>`}};Gt.styles=[$`
1392
+ a {
1393
+ color: inherit;
1394
+ text-decoration: none;
1395
+ display: contents;
1396
+ }
1397
+ `],Le([a({type:String})],Gt.prototype,"href",2),Le([a({type:String,attribute:"data-aria-label"})],Gt.prototype,"ariaLabel",2),Le([a({type:String})],Gt.prototype,"autoActive",2),Le([a({type:String})],Gt.prototype,"target",1),Le([a({type:Boolean})],Gt.prototype,"pushState",2),Gt=Le([_(Da)],Gt);var ka=Object.defineProperty,La=Object.getOwnPropertyDescriptor,Ee=(r,t,s,i)=>{for(var e=i>1?void 0:i?La(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ka(t,s,e),e};const Ea="sonic-progress";let Qt=class extends w{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return g`
1398
+ <progress value=${x(this.value)} max=${this.max}></progress>
1399
+ <div class="slot-container">
1400
+ <slot></slot>
1401
+ <slot name="remaining"></slot>
1402
+ </div>
1403
+ `}};Qt.styles=[Ot,$`
1404
+ :host {
1405
+ --sc-progress-bg: var(--sc-input-bg, var(--sc-base-100, #f5f5f5));
1406
+ --sc-progress-color: var(--sc-base-content, #1f2937);
1407
+ --sc-progress-height: 0.6em;
1408
+ --sc-progress-fs: var(--sc-fs, 1rem);
1409
+ --sc-progress-fw: 500;
1410
+ --sc-progress-rounded: var(--sc-rounded-lg);
1411
+ display: block;
1412
+ line-height: 1.2;
1413
+ font-weight: var(--sc-progress-fw);
1414
+ font-size: var(--sc-progress-fs);
1415
+ }
1416
+
1417
+ progress {
1418
+ position: relative;
1419
+ width: 100%;
1420
+ -webkit-appearance: none;
1421
+ appearance: none;
1422
+ overflow: hidden;
1423
+ border: none;
1424
+ height: var(--sc-progress-height);
1425
+ border-radius: var(--sc-progress-rounded);
1426
+ background-color: var(--sc-progress-bg);
1427
+ color: var(--sc-progress-color);
1428
+ }
1429
+ progress::-moz-progress-bar {
1430
+ background-color: var(--sc-progress-color);
1431
+ border-radius: var(--sc-progress-rounded);
1432
+ }
1433
+
1434
+ progress:not([value])::-moz-progress-bar {
1435
+ background-color: var(--sc-progress-bg);
1436
+ }
1437
+
1438
+ progress::-webkit-progress-bar {
1439
+ background-color: var(--sc-progress-bg);
1440
+ }
1441
+ progress::-webkit-progress-value {
1442
+ background-color: var(--sc-progress-color);
1443
+ border-radius: var(--sc-progress-rounded);
1444
+ }
1445
+
1446
+ /* Indeterminate */
1447
+ progress:indeterminate:after {
1448
+ background-color: var(--sc-progress-color);
1449
+ content: "";
1450
+ position: absolute;
1451
+ top: 0;
1452
+ bottom: 0;
1453
+ left: -40%;
1454
+ width: 33.333333%;
1455
+ border-radius: var(--sc-progress-rounded);
1456
+ animation: progress-loading 3s infinite ease-in-out;
1457
+ }
1458
+
1459
+ @keyframes progress-loading {
1460
+ 50% {
1461
+ left: 107%;
1462
+ }
1463
+ }
1464
+
1465
+ /* COLOR TYPES */
1466
+ :host([type="warning"]) {
1467
+ --sc-progress-color: var(--sc-warning);
1468
+ }
1469
+ :host([type="danger"]) {
1470
+ --sc-progress-color: var(--sc-danger);
1471
+ }
1472
+ :host([type="info"]) {
1473
+ --sc-progress-color: var(--sc-info);
1474
+ }
1475
+ :host([type="success"]) {
1476
+ --sc-progress-color: var(--sc-success);
1477
+ }
1478
+
1479
+ :host([type="invert"]) {
1480
+ --sc-progress-bg: rgba(190, 190, 190, 0.125);
1481
+ --sc-progress-color: var(--sc-base);
1482
+ }
1483
+
1484
+ :host([invert]) {
1485
+ --sc-progress-bg: rgba(190, 190, 190, 0.125);
1486
+ }
1487
+
1488
+ :host([type="default"][invert]) {
1489
+ --sc-progress-color: var(--sc-base);
1490
+ }
1491
+
1492
+ slot[name="remaining"] {
1493
+ font-weight: var(--sc-font-weight-base);
1494
+ font-size: 0.85em;
1495
+ margin-top: 0.5em;
1496
+ }
1497
+ slot[name="remaining"]::slotted(*) {
1498
+ margin-left: auto;
1499
+ }
1500
+
1501
+ slot:not([name]) {
1502
+ color: var(--sc-progress-color);
1503
+ }
1504
+
1505
+ .slot-container {
1506
+ display: flex;
1507
+ justify-content: space-between;
1508
+ gap: 0.5em;
1509
+ margin-top: 0.15em;
1510
+ }
1511
+ `],Ee([a({type:Number})],Qt.prototype,"value",2),Ee([a({type:Number})],Qt.prototype,"max",2),Ee([a({type:Boolean})],Qt.prototype,"invert",2),Ee([a({type:String,reflect:!0})],Qt.prototype,"type",2),Ee([a({type:String,reflect:!0})],Qt.prototype,"size",2),Qt=Ee([_(Ea)],Qt);const Na=$`
1512
+ .password-toggle {
1513
+ color: var(--sc-input-c);
1514
+ font-size: var(--sc-input-fs);
1515
+ cursor: pointer;
1516
+ margin-right: calc(-0.5 * var(--sc-input-px));
1517
+ }
1518
+
1519
+ :host([inlineContent]) .has-suffix .password-toggle {
1520
+ margin-right: 0;
1521
+ }
1522
+ `,As=$`
1523
+ :host {
1524
+ --sc-label-fs: var(--sc-fs, 1rem);
1525
+ --sc-label-fw: var(--sc-label-font-weight);
1526
+ }
1527
+ label {
1528
+ font-size: var(--sc-label-fs);
1529
+ font-weight: var(--sc-label-fw);
1530
+ line-height: 1.2;
1531
+ }
1532
+ .form-label {
1533
+ margin-bottom: 0.22em;
1534
+ display: block;
1535
+ }
1536
+ `,Ss=$`
1537
+ .form-description {
1538
+ color: var(--sc-base-400);
1539
+ font-size: 0.85em;
1540
+ margin-top: 0.2em;
1541
+ display: block;
1542
+ }
1543
+ `,ci=$`
1544
+ * {
1545
+ box-sizing: border-box;
1546
+ }
1547
+
1548
+ :host {
1549
+ --sc-input-height: var(--sc-form-height);
1550
+ --sc-input-c: var(--sc-input-color, var(--sc-base-content));
1551
+ --sc-input-b-width: var(--sc-form-border-width);
1552
+ --sc-input-b-color: var(--sc-input-border-color);
1553
+
1554
+ --sc-item-rounded-tr: var(--sc-input-rounded);
1555
+ --sc-item-rounded-tl: var(--sc-input-rounded);
1556
+ --sc-item-rounded-bl: var(--sc-input-rounded);
1557
+ --sc-item-rounded-br: var(--sc-input-rounded);
1558
+
1559
+ --sc-input-fs: var(--sc-fs, 1rem);
1560
+ --sc-input-ff: inherit;
1561
+ --sc-input-py: 0.55em;
1562
+ --sc-input-px: clamp(0.3em, 8%, 1.1em);
1563
+
1564
+ --sc-input-background: var(--sc-input-bg);
1565
+ --sc-input-addon-c: var(--sc-input-addon-color, var(--sc-base));
1566
+ --sc-input-addon-bg: var(--sc-input-c);
1567
+ }
1568
+
1569
+ .form-element {
1570
+ display: block;
1571
+ flex-grow: 1;
1572
+ width: 100%;
1573
+
1574
+ line-height: 1.1;
1575
+ color: var(--sc-input-c);
1576
+ border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
1577
+ var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
1578
+
1579
+ font-family: var(--sc-input-ff);
1580
+ background-color: var(--sc-input-background);
1581
+ border: var(--sc-input-b-width) solid
1582
+ var(--sc-input-b-color, var(--sc-base-300, #aaa));
1583
+ width: 100%;
1584
+ font-size: var(--sc-input-fs);
1585
+
1586
+ padding-top: var(--sc-input-py);
1587
+ padding-bottom: var(--sc-input-py);
1588
+ padding-left: var(--sc-input-px);
1589
+ padding-right: var(--sc-input-px);
1590
+
1591
+ transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out,
1592
+ box-shadow 0.15s ease-in-out;
1593
+ min-height: var(--sc-input-height);
1594
+ }
1595
+
1596
+ .form-control {
1597
+ display: flex;
1598
+ width: 100%;
1599
+ }
1600
+
1601
+ /*Suffix*/
1602
+ :host(:not([inlineContent])) .has-suffix slot[name="suffix"],
1603
+ :host(:not([inlineContent])) .has-prefix slot[name="prefix"] {
1604
+ min-width: var(--sc-input-height);
1605
+ box-sizing: border-box;
1606
+ display: flex;
1607
+ align-items: center;
1608
+ justify-content: center;
1609
+ line-height: 1.1;
1610
+ flex-shrink: 0;
1611
+ border: var(--sc-input-b-width) solid transparent;
1612
+ padding-left: clamp(0.25em, 3%, calc(0.33 * var(--sc-input-px)));
1613
+ padding-right: clamp(0.25em, 3%, calc(0.33 * var(--sc-input-px)));
1614
+ }
1615
+
1616
+ :host(:not([inlineContent])) slot[name="prefix"] {
1617
+ border-radius: var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);
1618
+ background-color: var(--sc-input-addon-bg);
1619
+ color: var(--sc-input-addon-c);
1620
+ /*margin-right: calc(-1 * var(--sc-input-b-width));
1621
+ border: none;*/
1622
+ }
1623
+
1624
+ :host(:not([inlineContent])) slot[name="suffix"] {
1625
+ border-radius: 0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;
1626
+ background-color: var(--sc-input-addon-bg);
1627
+ color: var(--sc-input-addon-c);
1628
+ /*margin-left: calc(-1 * var(--sc-input-b-width));
1629
+ border: none;*/
1630
+ }
1631
+
1632
+ :host(:not([inlineContent])[disabled]) .has-suffix slot[name="suffix"],
1633
+ :host(:not([inlineContent])[disabled]) .has-prefix slot[name="prefix"] {
1634
+ opacity: 0.43;
1635
+ }
1636
+
1637
+ :host(:not([inlineContent])) .has-prefix .form-element {
1638
+ border-top-left-radius: 0;
1639
+ border-bottom-left-radius: 0;
1640
+ }
1641
+
1642
+ :host(:not([inlineContent])) .has-suffix .form-element {
1643
+ border-top-right-radius: 0;
1644
+ border-bottom-right-radius: 0;
1645
+ }
1646
+
1647
+ slot[name="suffix"]::slotted(sonic-icon),
1648
+ slot[name="prefix"]::slotted(sonic-icon) {
1649
+ font-size: 1.2em;
1650
+ }
1651
+
1652
+ /*InlineCONTENT */
1653
+
1654
+ .form-element > slot,
1655
+ .form-element .form-element {
1656
+ all: unset;
1657
+ }
1658
+
1659
+ :host([inlineContent]) .form-element {
1660
+ display: flex;
1661
+ align-items: center;
1662
+ gap: 0.35em;
1663
+ min-height: var(--sc-form-height);
1664
+ }
1665
+
1666
+ :host([inlineContent]) .form-element .form-element {
1667
+ appearance: none;
1668
+ background: transparent;
1669
+ border: none;
1670
+ padding: 0;
1671
+ display: block;
1672
+ width: 50%;
1673
+ min-width: 0;
1674
+ flex: 1 1 auto;
1675
+ height: auto;
1676
+ min-height: auto;
1677
+ border-radius: 0;
1678
+ }
1679
+ :host([inlineContent]) slot[name="prefix"]::slotted(*),
1680
+ :host([inlineContent]) slot[name="suffix"]::slotted(*) {
1681
+ display: block;
1682
+ flex: 0 0 auto;
1683
+ max-width: 100%;
1684
+ max-width: 100%;
1685
+ white-space: nowrap;
1686
+ }
1687
+
1688
+ :host([inlineContent]) .has-suffix slot[name="suffix"] {
1689
+ margin-right: calc(-0.5 * var(--sc-input-px));
1690
+ }
1691
+ :host([inlineContent]) .has-prefix slot[name="prefix"] {
1692
+ margin-left: calc(-0.5 * var(--sc-input-px));
1693
+ }
1694
+
1695
+ :host([inlineContent]) slot[name="suffix"]::slotted(*) {
1696
+ margin-left: auto;
1697
+ }
1698
+
1699
+ :host([inlineContent]) .no-suffix slot[name="suffix"],
1700
+ :host([inlineContent]) .no-prefix slot[name="prefix"] {
1701
+ display: none;
1702
+ }
1703
+
1704
+ /* :host([inlineContent]) .input {
1705
+
1706
+ }*/
1707
+ /*Disabled */
1708
+ :host([disabled]) .form-control {
1709
+ cursor: not-allowed;
1710
+ }
1711
+
1712
+ :host([variant="ghost"]) .form-element {
1713
+ --sc-input-bg: transparent;
1714
+ }
1715
+
1716
+ /*Disbaled*/
1717
+ :host([disabled]) .form-element {
1718
+ pointer-events: none;
1719
+ opacity: 0.43;
1720
+ /* border-color: transparent;*/
1721
+ }
1722
+ :host([disabled]) .select-chevron {
1723
+ display: none;
1724
+ /* border-color: transparent;*/
1725
+ }
1726
+
1727
+ /*PLACEHOLDER*/
1728
+ ::placeholder {
1729
+ color: inherit;
1730
+ opacity: 0.45;
1731
+ }
1732
+
1733
+ :host([placehoderAsLabel]) ::placeholder {
1734
+ opacity: 1;
1735
+ }
1736
+
1737
+ :focus::placeholder {
1738
+ opacity: 0 !important;
1739
+ }
1740
+
1741
+ /*HOVER*/
1742
+ :host(:not([disabled])) .form-element:hover,
1743
+ .form-element:focus-visible,
1744
+ .form-element:focus {
1745
+ filter: brightness(0.97);
1746
+ outline: none;
1747
+ }
1748
+
1749
+ .form-label {
1750
+ margin-bottom: 0.22em;
1751
+ display: block;
1752
+ }
1753
+
1754
+ .form-description {
1755
+ color: var(--sc-base-400);
1756
+ font-size: 0.85em;
1757
+ margin-top: 0.2em;
1758
+ display: block;
1759
+ }
1760
+
1761
+ /*Utilitaires*/
1762
+ .hidden {
1763
+ display: none;
1764
+ }
1765
+ .contents {
1766
+ display: contents;
1767
+ }
1768
+
1769
+ /*ERROR*/
1770
+ :host([error]) {
1771
+ --sc-input-b-color: var(--sc-danger);
1772
+ }
1773
+
1774
+ :host input:visited {
1775
+ display: none;
1776
+ }
1777
+
1778
+ :host([touched][required]) :not(:focus):invalid {
1779
+ --sc-input-b-color: var(--sc-danger);
1780
+ --sc-input-c: var(--sc-danger);
1781
+ }
1782
+
1783
+ :host([touched][required]) :not(:focus):invalid + .select-chevron {
1784
+ --sc-input-c: var(--sc-danger);
1785
+ }
1786
+
1787
+ /*VALID*/
1788
+ :host([touched][required]) :not([value=""]):not(:focus):valid {
1789
+ --sc-input-b-color: var(--sc-success);
1790
+ --sc-input-c: var(--sc-success);
1791
+ }
1792
+
1793
+ :host([touched][required]) :not(:focus):valid + .select-chevron {
1794
+ --sc-input-c: var(--sc-success);
1795
+ }
1796
+
1797
+ /*Input COLOR*/
1798
+ :host([type="color"]) .form-element {
1799
+ padding: 0;
1800
+ border: 0;
1801
+ min-width: var(--sc-input-height);
1802
+ }
1803
+ input[type="color"]::-webkit-color-swatch-wrapper {
1804
+ padding: 0;
1805
+ }
1806
+ input[type="color"]::-webkit-color-swatch {
1807
+ border: none;
1808
+ border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
1809
+ var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
1810
+ }
1811
+
1812
+ /*Input Image*/
1813
+ :host([type="image"]) .form-element {
1814
+ padding: 0;
1815
+ border: none;
1816
+ }
1817
+
1818
+ /*Input reset & image*/
1819
+ input[type="reset"],
1820
+ input[type="submit"] {
1821
+ cursor: pointer;
1822
+ }
1823
+
1824
+ /*Input search*/
1825
+ :host([type="search"]) {
1826
+ appearance: none !important;
1827
+ }
1828
+
1829
+ input[type="search"]::-webkit-search-cancel-button {
1830
+ appearance: none;
1831
+ cursor: pointer;
1832
+ height: 0.65em;
1833
+ width: 0.65em;
1834
+ background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);
1835
+ background-size: contain;
1836
+ background-repeat: no-repeat;
1837
+ }
1838
+
1839
+ /* Text align */
1840
+ :host([align="center"]) .form-element {
1841
+ text-align: center;
1842
+ }
1843
+ :host([align="left"]) .form-element {
1844
+ text-align: left;
1845
+ }
1846
+ :host([align="right"]) .form-element {
1847
+ text-align: right;
1848
+ }
1849
+
1850
+ /* No arrows ion input Number */
1851
+ :host([noAppearance]) input[type="number"]::-webkit-outer-spin-button,
1852
+ :host([noAppearance]) input[type="number"]::-webkit-inner-spin-button {
1853
+ -webkit-appearance: none;
1854
+ margin: 0;
1855
+ }
1856
+
1857
+ :host([noAppearance]) input[type="number"] {
1858
+ -moz-appearance: textfield !important;
1859
+ }
1860
+
1861
+ /*type color "default" | "success" | "error" | "warning" | "info" */
1862
+ :host([status="success"]) {
1863
+ --sc-input-b-color: var(--sc-success);
1864
+ --sc-input-c: var(--sc-success);
1865
+ --sc-input-addon-bg: var(--sc-success);
1866
+ --sc-input-addon-color: var(--sc-success-content);
1867
+ }
1868
+ :host([status="error"]) {
1869
+ --sc-input-b-color: var(--sc-danger);
1870
+ --sc-input-c: var(--sc-danger);
1871
+ --sc-input-addon-bg: var(--sc-danger);
1872
+ --sc-input-addon-color: var(--sc-danger-content);
1873
+ }
1874
+ :host([status="warning"]) {
1875
+ --sc-input-b-color: var(--sc-warning);
1876
+ --sc-input-c: var(--sc-warning);
1877
+ --sc-input-addon-bg: var(--sc-warning);
1878
+ --sc-input-addon-color: var(--sc-warning-content);
1879
+ }
1880
+ :host([status="info"]) {
1881
+ --sc-input-b-color: var(--sc-info);
1882
+ --sc-input-c: var(--sc-info);
1883
+ --sc-input-addon-bg: var(--sc-info);
1884
+ --sc-input-addon-color: var(--sc-info-content);
1885
+ }
1886
+ :host([status="primary"]) {
1887
+ --sc-input-b-color: var(--sc-primary);
1888
+ --sc-input-c: var(--sc-primary);
1889
+ --sc-input-addon-bg: var(--sc-primary);
1890
+ --sc-input-addon-color: var(--sc-primary-content);
1891
+ }
1892
+ `;/**
1893
+ * @license
1894
+ * Copyright 2018 Google LLC
1895
+ * SPDX-License-Identifier: BSD-3-Clause
1896
+ */const hi=de(class extends Ae{constructor(r){var t;if(super(r),r.type!==he.ATTRIBUTE||r.name!=="class"||((t=r.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var i,e;if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!((i=this.nt)!=null&&i.has(o))&&this.st.add(o);return this.render(t)}const s=r.element.classList;for(const o of this.st)o in t||(s.remove(o),this.st.delete(o));for(const o in t){const n=!!t[o];n===this.st.has(o)||(e=this.nt)!=null&&e.has(o)||(n?(s.add(o),this.st.add(o)):(s.remove(o),this.st.delete(o)))}return bt}});var Ta=Object.defineProperty,Ma=Object.getOwnPropertyDescriptor,B=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ma(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ta(t,s,e),e};const ja="sonic-input";let R=class extends ys(Oe(Y(w))){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=this.escapeRegExp(t);const r=this.getFormPublisher();if(!r)return;r[this.sameValueAsName].onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const r=this.getFormPublisher();if(!r)return;r[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}setSelectionRange(r,t){this.input.setSelectionRange(r,t)}hasSlotOrProps(){var r,t,s,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}inlineContentFocus(){var r;!this.inlineContent||this.disableInlineContentFocus||(r=this.input)==null||r.focus()}handleChange(r){if(!this.hasAttribute("inputDelayMs")){super.handleChange(r);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(r),parseInt(this.getAttribute("inputDelayMs")))}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const r={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return g`
1897
+ <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
1898
+ >${this.label?I(this.label):""}<slot
1899
+ name="label"
1900
+ @slotchange=${this.hasSlotOrProps}
1901
+ ></slot
1902
+ ></label>
1903
+
1904
+ <div @click=${this.inlineContentFocus} class="form-control ${hi(r)}">
1905
+ <div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
1906
+ <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1907
+ <input
1908
+ data-form-element
1909
+ part="input"
1910
+ id=${x(this.id||"form-element")}
1911
+ part="input"
1912
+ class="form-element input"
1913
+ @input=${this.handleChange}
1914
+ @blur=${this.handleBlur}
1915
+ type=${this.type}
1916
+ disabled=${x(this.disabled)}
1917
+ ?readonly=${this.readonly}
1918
+ ?autofocus=${this.autofocus}
1919
+ list=${x(this.list)}
1920
+ tabindex=${x(this.tabindex)}
1921
+ pattern=${x(this.pattern)}
1922
+ min=${x(this.min)}
1923
+ max=${x(this.max)}
1924
+ step=${x(this.step)}
1925
+ src=${x(this.src)}
1926
+ minlength=${x(this.minlength)}
1927
+ maxlength=${x(this.maxlength)}
1928
+ placeholder=${x(this.placeholder)}
1929
+ required=${x(this.required)}
1930
+ autocomplete=${x(this.autocomplete)}
1931
+ aria-label=${x(this.ariaLabel)}
1932
+ aria-labelledby=${x(this.ariaLabelledby)}
1933
+ .name=${this.name}
1934
+ .value=${this.value}
1935
+ />
1936
+ ${this.showPasswordToggle?g`<sonic-button
1937
+ shape="circle"
1938
+ class="password-toggle"
1939
+ @click=${this.togglePasswordVisibility}
1940
+ aria-label="Toggle password visibility"
1941
+ variant="unstyled"
1942
+ >
1943
+ <sonic-icon
1944
+ library="heroicons"
1945
+ name=${this.isPassword?"eye":"eye-slash"}
1946
+ ></sonic-icon>
1947
+ </sonic-button>`:""}
1948
+ <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
1949
+ </div>
1950
+ </div>
1951
+
1952
+ <!-- le slot ne doit pas avoir d'espace-->
1953
+ <slot
1954
+ name="description"
1955
+ @slotchange=${this.hasSlotOrProps}
1956
+ class="${this.hasDescription?"form-description":"hidden"}"
1957
+ >${this.description?g`${I(this.description)}`:C}</slot>
1958
+ <slot name="list"></slot>
1959
+ </div>
1960
+ `}};R.styles=[Ot,ci,As,Ss,Na,$`
1961
+ :host([type="hidden"]) {
1962
+ appearance: none !important;
1963
+ display: none !important;
1964
+ }
1965
+ :host > .form-control {
1966
+ position: relative;
1967
+ }
1968
+ `],B([a({type:String,reflect:!0})],R.prototype,"size",2),B([a({type:String})],R.prototype,"list",2),B([a({type:String})],R.prototype,"placeholder",2),B([a({type:String})],R.prototype,"pattern",2),B([a({type:String})],R.prototype,"min",2),B([a({type:String})],R.prototype,"max",2),B([a({type:Boolean})],R.prototype,"readonly",2),B([a({type:Number})],R.prototype,"step",2),B([a({type:Number})],R.prototype,"minlength",2),B([a({type:Number})],R.prototype,"maxlength",2),B([a({type:String})],R.prototype,"src",2),B([a({type:Boolean,reflect:!0})],R.prototype,"inlineContent",2),B([a({type:Boolean})],R.prototype,"disableInlineContentFocus",2),B([a({type:Boolean})],R.prototype,"showPasswordToggle",2),B([it({slot:"label",flatten:!0})],R.prototype,"slotLabelNodes",2),B([it({slot:"description",flatten:!0})],R.prototype,"slotDescriptionNodes",2),B([it({slot:"suffix",flatten:!0})],R.prototype,"slotSuffixNodes",2),B([it({slot:"prefix",flatten:!0})],R.prototype,"slotPrefixNodes",2),B([ie("input")],R.prototype,"input",2),B([M()],R.prototype,"hasDescription",2),B([M()],R.prototype,"hasLabel",2),B([M()],R.prototype,"hasSuffix",2),B([M()],R.prototype,"hasPrefix",2),B([M()],R.prototype,"isPassword",2),R=B([_(ja)],R);var Ia=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,Jt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Fa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ia(t,s,e),e};const za="sonic-pop";let nt=class extends w{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)),this.ancestorsHavingZIndex=new Set}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),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.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){Q.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const s=t.style;s.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),s=t[0];nt.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=Q.getAncestorAttributeValue(s,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),nt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),nt.pops.add(this)}firstUpdated(r){super.firstUpdated(r),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),nt.pops.delete(this),nt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}computePosition(r){var E,V,W,_t;const t=r.split(" "),s=t[0];let i=t[1],e=(E=this.popContent)==null?void 0:E.getBoundingClientRect();const o=5,n=this.getBoundingClientRect(),l=Q.getScrollableAncestor(this.popContent),c=l==null?void 0:l.getBoundingClientRect(),h=Math.max(0,(c==null?void 0:c.left)||0)+o,d=Math.max(0,(c==null?void 0:c.top)||0)+o,f=Math.min(window.innerWidth,(c==null?void 0:c.right)||window.innerWidth)-o,m=Math.min(window.innerHeight,(c==null?void 0:c.bottom)||window.innerHeight)-o,v=n.left,b=n.top;let P=v,S=b;const D=b-e.height,p=v-e.width,u=v+n.width,y=b+n.height,A=v+(n.width-e.width)*.5,O=b+(n.height-e.height)*.5;switch(s){case"bottom":S=y,i=="center"&&(P=A);break;case"top":S=D,i=="center"&&(P=A);break;case"left":P=p,i=="center"&&(S=O);break;case"right":P=u,i=="center"&&(S=O);break}this.lastContentX+=P-e.x,this.lastContentY+=S-e.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),e=(V=this.popContent)==null?void 0:V.getBoundingClientRect(),e.x<h&&s=="left"&&(P=u),e.y<d&&s=="top"&&(S=y),e.x+e.width>f&&s=="right"&&(P=p),e.y+e.height>m&&s=="bottom"&&(S=D),this.lastContentX+=P-e.x,this.lastContentY+=S-e.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),e=(W=this.popContent)==null?void 0:W.getBoundingClientRect(),e.x<h&&(this.lastContentX+=h-e.x),e.y<d&&(this.lastContentY+=d-e.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),e=(_t=this.popContent)==null?void 0:_t.getBoundingClientRect(),e.x+e.width>f&&(this.lastContentX+=f-(e.x+e.width)),e.y+e.height>m&&(this.lastContentY+=m-(e.y+e.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return g`
1969
+ <slot
1970
+ @click=${this.toggle}
1971
+ @keydown=${this.toggle}
1972
+ class="contents"
1973
+ ></slot>
1974
+ <slot
1975
+ name="content"
1976
+ tabindex="-1"
1977
+ part="content"
1978
+ style="display: none;"
1979
+ class="
1980
+ ${this.open?"is-open":""}"
1981
+ ></slot>
1982
+ `}};nt.pops=new Set,nt.styles=[$`
1983
+ :host {
1984
+ display: inline-block;
1985
+ vertical-align: middle;
1986
+ }
1987
+
1988
+ slot[name="content"] {
1989
+ max-width: 80vw;
1990
+ background-color: var(--sc-base);
1991
+ position: fixed;
1992
+ z-index: 99999;
1993
+ display: block;
1994
+ transform: translateY(1rem) scale(0.95);
1995
+ opacity: 0;
1996
+ pointer-events: none;
1997
+ transition-duration: 0.15s;
1998
+ transition-timing-function: ease;
1999
+ transition-property: all;
2000
+ border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
2001
+ }
2002
+
2003
+ slot[name="content"].is-open:not(.is-empty) {
2004
+ transform: translateY(0) scale(1);
2005
+ opacity: 1;
2006
+ pointer-events: auto;
2007
+ transition-property: scale, opacity;
2008
+ transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
2009
+ }
2010
+
2011
+ /*OMBRE*/
2012
+ :host([shadow]) slot[name="content"],
2013
+ :host([shadow="md"]) slot[name="content"],
2014
+ :host([shadow="true"]) slot[name="content"] {
2015
+ box-shadow: var(--sc-shadow);
2016
+ }
2017
+
2018
+ :host([shadow="sm"]) slot[name="content"] {
2019
+ box-shadow: var(--sc-shadow-sm);
2020
+ }
2021
+
2022
+ :host([shadow="none"]) slot[name="content"] {
2023
+ box-shadow: none;
2024
+ }
2025
+
2026
+ :host([shadow="lg"]) slot[name="content"] {
2027
+ box-shadow: var(--sc-shadow-lg);
2028
+ }
2029
+
2030
+ :host([inline]) {
2031
+ vertical-align: baseline;
2032
+ }
2033
+ `],Jt([M()],nt.prototype,"open",2),Jt([ie("slot:not([name=content])")],nt.prototype,"popBtn",2),Jt([ie("slot[name=content]")],nt.prototype,"popContent",2),Jt([a({type:Boolean})],nt.prototype,"noToggle",2),Jt([a({type:Boolean,reflect:!0})],nt.prototype,"inline",2),Jt([a({type:String,reflect:!0})],nt.prototype,"shadow",2),Jt([a({type:String})],nt.prototype,"placement",2),nt=Jt([_(za)],nt);var Ra=Object.defineProperty,Ua=Object.getOwnPropertyDescriptor,Va=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ua(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ra(t,s,e),e};const Ba="sonic-menu-item";let Pr=class extends j{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const r=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!r&&(this.align="left"),super.connectedCallback()}};Pr=Va([_(Ba)],Pr);/**
2034
+ * @license
2035
+ * Copyright 2021 Google LLC
2036
+ * SPDX-License-Identifier: BSD-3-Clause
2037
+ */class $r{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var s;this.value=(s=this.callback)==null?void 0:s.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 Ha=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,gt=(r,t,s,i)=>{for(var e=i>1?void 0:i?qa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ha(t,s,e),e};let at=class extends ii(fr(ur(Kt(w)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new $r(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var s;if(r==""){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&(this.lastValidSearch=r,(s=this.searchPublisher)==null||s.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var s;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(s=this.formValuePublisher)==null||s.set(t)},this.findSearchedItem=r=>{var s;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((s=this.searchPublisher)==null?void 0:s.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],(t=this.searchPublisher)==null||t.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var r,t,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((s=this.formValuePublisher)==null||s.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}connectedCallback(){var e,o,n,l;console.log(this.value,this.getAttribute("value")),super.connectedCallback(),console.log(this.value,this.getAttribute("value"));const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),s=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const i=tt.get;this.searchPublisher=i(this.searchDataProvider)[r],this.formValuePublisher=ht(i(t),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&(tt.get(this.initSearchDataProvider)[this.name]=this.value),(e=this.initCountPublisher)==null||e.onAssign(this.initSearchParameter),(o=this.formValuePublisher)==null||o.onAssign(this.updateSearchParameter),(n=this.countPublisher)==null||n.onAssign(this.updateActiveSelection),(l=this.searchPublisher)==null||l.onAssign(this.updatePopContentVisibility)}disconnectedCallback(){var t,s,i,e;super.disconnectedCallback(),(t=this.initCountPublisher)==null||t.offAssign(this.initSearchParameter),(s=this.formValuePublisher)==null||s.offAssign(this.updateSearchParameter),(i=this.countPublisher)==null||i.offAssign(this.updateActiveSelection);const r=tt.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),(e=this.searchPublisher)==null||e.offAssign(this.updatePopContentVisibility)}queryQueueListItem(r,t,s){const i=tt.get(r);let e;const o=i.get();if(Array.isArray(o)){for(const n of o){const l=tt.get(n.dataProvider).get();if(Array.isArray(l)&&(e=l.find(t),e))break}return e?(s(e),!0):!1}}setSelectionRange(r,t){var s;(s=this.querySelector("sonic-input"))==null||s.setSelectionRange(r,t)}handleHide(){var r,t,s;if(this.select){if(((r=this.searchPublisher)==null?void 0:r.get())==""){this.lastValidSearch="",(t=this.formValuePublisher)==null||t.set("");return}(s=this.searchPublisher)==null||s.set(this.lastValidSearch)}}render(){var r;return g`
2038
+ <sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
2039
+ <sonic-input
2040
+ dataProvider="${this.initSearchDataProvider+Math.random()}"
2041
+ formDataProvider="${this.searchDataProvider}"
2042
+ type="search"
2043
+ data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
2044
+ label="${x(this.label)}"
2045
+ description="${x(this.description)}"
2046
+ name="${x(this.searchParameter||this.name)}"
2047
+ placeholder="${x(this.placeholder)}"
2048
+ ?readonly="${this.readonly}"
2049
+ autocomplete="${Math.random()}"
2050
+ clearable
2051
+ inlineContent
2052
+ size=${this.size}
2053
+ value="${x(((r=this.searchPublisher)==null?void 0:r.get())||this.value)}"
2054
+ >
2055
+ <slot
2056
+ name="prefix"
2057
+ slot="prefix"
2058
+ @slotchange=${this.hasSlotOrProps}
2059
+ ></slot>
2060
+
2061
+ ${this.select?g`
2062
+ <sonic-icon
2063
+ slot="suffix"
2064
+ class="select-chevron"
2065
+ name="nav-arrow-down"
2066
+ .size=${this.size}
2067
+ ></sonic-icon>
2068
+ `:C}
2069
+ </sonic-input>
2070
+ <sonic-menu
2071
+ slot="content"
2072
+ class="custom-scroll"
2073
+ style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}; display:${this.isPopVisible?"block":"none"};"
2074
+ >
2075
+ <sonic-queue
2076
+ dataProvider="${this.queueDataProvider}"
2077
+ filteredFields=${this.filteredFields}
2078
+ dataProviderExpression="${this.dataProviderExpression}"
2079
+ dataFilterProvider="${this.searchDataProvider}"
2080
+ key="${this.key}"
2081
+ .templates=${this.templateList.concat(this.templatePartsList)}
2082
+ displayContents
2083
+ >
2084
+ </sonic-queue>
2085
+ <sonic-queue
2086
+ noLazyload
2087
+ loader="no-loader"
2088
+ dataProvider="${this.initQueueDataProvider}"
2089
+ filteredFields=${this.filteredFields}
2090
+ dataProviderExpression="${this.dataProviderExpression}"
2091
+ dataFilterProvider="${this.initSearchDataProvider}"
2092
+ key="${this.key}"
2093
+ displayContents
2094
+ >
2095
+ </sonic-queue>
2096
+ </sonic-menu>
2097
+ </sonic-pop>
2098
+ `}};at.styles=[Ye,$`
2099
+ :host {
2100
+ display: block;
2101
+ }
2102
+
2103
+ sonic-menu {
2104
+ display: block;
2105
+ max-height: clamp(12rem, 20vh, 20rem);
2106
+ min-width: 14rem;
2107
+ width: 100%;
2108
+ }
2109
+ `],gt([a({type:String})],at.prototype,"size",2),gt([a({type:String})],at.prototype,"placeholder",2),gt([a()],at.prototype,"filteredFields",2),gt([a({type:Boolean})],at.prototype,"readonly",2),gt([a({type:String})],at.prototype,"dataProviderExpression",2),gt([a({type:Number})],at.prototype,"minSearchLength",2),gt([a({type:Boolean})],at.prototype,"select",2),gt([a({type:String})],at.prototype,"key",2),gt([a({type:String})],at.prototype,"searchParameter",2),gt([a({type:String})],at.prototype,"propertyName",2),gt([it({slot:"prefix",flatten:!0})],at.prototype,"slotInputPrefixNodes",2),gt([M()],at.prototype,"hasInputPrefix",2),gt([M()],at.prototype,"isPopVisible",2),at=gt([_("sonic-input-autocomplete")],at);var Wa=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,dt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ka(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wa(t,s,e),e};const Za="sonic-password-helper";let lt=class extends Kt(w){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=t.length==0,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)},tt.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&tt.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?g`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:g`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?C:g`
2110
+ <div>${this.wording_password_helper_decription}</div>
2111
+ <div>
2112
+ ${this.getIcon(this.hasEnoughChars)}
2113
+ ${this.wording_password_helper_min_length}
2114
+ </div>
2115
+ <div>
2116
+ ${this.getIcon(this.hasMinuscule)}
2117
+ ${this.wording_password_helper_lower_case}
2118
+ </div>
2119
+ <div>
2120
+ ${this.getIcon(this.hasMajuscule)}
2121
+ ${this.wording_password_helper_upper_case}
2122
+ </div>
2123
+ <div>
2124
+ ${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}
2125
+ </div>
2126
+ <div>
2127
+ ${this.getIcon(this.hasSpecialChar)}
2128
+ ${this.wording_password_helper_special_char}
2129
+ </div>
2130
+ `}};dt([a()],lt.prototype,"name",2),dt([a()],lt.prototype,"minChars",2),dt([M()],lt.prototype,"hasNoChar",2),dt([M()],lt.prototype,"hasEnoughChars",2),dt([M()],lt.prototype,"hasMinuscule",2),dt([M()],lt.prototype,"hasMajuscule",2),dt([M()],lt.prototype,"hasNumber",2),dt([M()],lt.prototype,"hasSpecialChar",2),dt([a()],lt.prototype,"wording_password_helper_decription",2),dt([a()],lt.prototype,"wording_password_helper_min_length",2),dt([a()],lt.prototype,"wording_password_helper_lower_case",2),dt([a()],lt.prototype,"wording_password_helper_upper_case",2),dt([a()],lt.prototype,"wording_password_helper_number",2),dt([a()],lt.prototype,"wording_password_helper_special_char",2),lt=dt([_(Za)],lt);var Ya=Object.defineProperty,Ga=Object.getOwnPropertyDescriptor,ve=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ga(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ya(t,s,e),e};const Qa="sonic-same-value-helper";let Xt=class extends Kt(w){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const r=tt.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=t=>{t?this.hasNoChar=t.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=ht(r,this.name).get()==ht(r,this.sameValueAs).get())},ht(r,this.name).onAssign(this.checkValue),ht(r,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const r=tt.get(this.getAncestorAttributeValue("formDataProvider"));ht(r,this.name).offAssign(this.checkValue),ht(r,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?C:g`
2131
+ <span>
2132
+ ${this.areEqual?I(this.descriptionWhenEqual):I(this.descriptionWhenNotEqual)}
2133
+ </span>
2134
+ `}};ve([a()],Xt.prototype,"name",2),ve([a()],Xt.prototype,"sameValueAs",2),ve([a()],Xt.prototype,"descriptionWhenEqual",2),ve([a()],Xt.prototype,"descriptionWhenNotEqual",2),ve([M()],Xt.prototype,"areEqual",2),ve([M()],Xt.prototype,"hasNoChar",2),Xt=ve([_(Qa)],Xt);var Ja=Object.defineProperty,Xa=Object.getOwnPropertyDescriptor,Ut=(r,t,s,i)=>{for(var e=i>1?void 0:i?Xa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ja(t,s,e),e};const tl="sonic-checkbox";let yt=class extends Js(ys(Oe(Y(w)))){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(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}render(){return g`
2135
+ <label class="checkbox-container ${this.disabled?"disabled":""}">
2136
+
2137
+ <span class="icon-container">
2138
+ <input
2139
+ type="${this.type}"
2140
+ @click=${this.handleChange}
2141
+ @blur=${this.handleBlur}
2142
+ ?required=${this.required}
2143
+ ?data-indeterminate=${this.showAsIndeterminate}
2144
+ .disabled=${x(this.disabled)}
2145
+ .checked=${x(this.checked)}
2146
+ .name=${this.name}
2147
+ .value=${this.value}
2148
+ ?autofocus=${this.autofocus}
2149
+ aria-label=${x(this.ariaLabel)}
2150
+ aria-labelledby=${x(this.ariaLabelledby)}
2151
+ />
2152
+ <sonic-icon name="${this.checked=="indeterminate"||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
2153
+ </span>
2154
+
2155
+ <div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
2156
+ ${this.label?I(this.label):""}
2157
+ <slot @slotchange=${this.hasSlotOrProps}></slot>
2158
+ <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?g`${I(this.description)}`:""}</slot>
2159
+ </div>
2160
+ </label>
2161
+ </label>
2162
+ `}};yt.styles=[Ot,$`
2163
+ :host {
2164
+ --sc-checkbox-border-width: var(--sc-form-border-width);
2165
+ --sc-checkbox-border-color: var(--sc-input-border-color);
2166
+ --sc-checkbox-bg: var(--sc-input-bg);
2167
+ --sc-checkbox-color: transparent;
2168
+ }
2169
+
2170
+ * {
2171
+ box-sizing: border-box;
2172
+ }
2173
+
2174
+ .checkbox-container {
2175
+ min-height: 1.4em;
2176
+ display: flex;
2177
+ gap: 0.5em;
2178
+ line-height: 1.2;
2179
+ align-items: flex-start;
2180
+ font-size: var(--sc-fs);
2181
+ }
2182
+
2183
+ .icon-container {
2184
+ position: relative;
2185
+ display: flex;
2186
+ flex-shrink: 0;
2187
+ }
2188
+
2189
+ input {
2190
+ box-sizing: border-box;
2191
+ appearance: none;
2192
+ flex-shrink: 0;
2193
+ height: calc(var(--sc-fs) * 1.25);
2194
+ width: calc(var(--sc-fs) * 1.25);
2195
+ display: block;
2196
+ cursor: pointer;
2197
+ border-radius: 0.25em;
2198
+ transition: 0.2s;
2199
+ outline: none;
2200
+ margin: 0;
2201
+ background-color: var(--sc-checkbox-bg);
2202
+ border: var(--sc-checkbox-border-width) solid
2203
+ var(--sc-checkbox-border-color);
2204
+ }
2205
+
2206
+ input:focus,
2207
+ :host(:not([disabled])) input:active {
2208
+ box-shadow: 0 0 0 2px var(--sc-primary);
2209
+ }
2210
+
2211
+ :host(:not([disabled])) label {
2212
+ cursor: pointer;
2213
+ }
2214
+
2215
+ sonic-icon {
2216
+ line-height: 0;
2217
+ position: absolute;
2218
+ top: 50%;
2219
+ left: 50%;
2220
+ transform: translateX(-50%) translateY(-50%) scale(0);
2221
+ transition: transform 0.2s ease-in-out;
2222
+ color: var(--sc-checkbox-color);
2223
+ }
2224
+
2225
+ /* .checkbox-text {
2226
+ align-self: center;
2227
+ } */
2228
+
2229
+ .description {
2230
+ color: var(--sc-base-400);
2231
+ font-size: 0.85em;
2232
+ margin-top: 0.2em;
2233
+ display: block;
2234
+ }
2235
+
2236
+ /*Active */
2237
+ input:checked,
2238
+ input[data-indeterminate],
2239
+ input[checked] {
2240
+ --sc-checkbox-border-color: var(--sc-primary);
2241
+ --sc-checkbox-bg: var(--sc-primary);
2242
+ }
2243
+ input:checked + sonic-icon,
2244
+ input[data-indeterminate] + sonic-icon,
2245
+ input[checked] + sonic-icon {
2246
+ --sc-checkbox-color: var(--sc-primary-content);
2247
+ transform: translateX(-50%) translateY(-50%) scale(1);
2248
+ }
2249
+ /*DISABLED */
2250
+ .disabled {
2251
+ cursor: not-allowed;
2252
+ }
2253
+ .disabled input {
2254
+ opacity: 0.4;
2255
+ }
2256
+
2257
+ .disabled .checkbox-text {
2258
+ opacity: 0.6;
2259
+ }
2260
+
2261
+ /*INPUT HOVER*/
2262
+ :host(:not([disabled])) label:hover input {
2263
+ filter: brightness(0.97);
2264
+ }
2265
+
2266
+ ::slotted(a) {
2267
+ color: inherit;
2268
+ text-decoration: underline !important;
2269
+ }
2270
+
2271
+ ::slotted(a:hover) {
2272
+ text-decoration: none !important;
2273
+ }
2274
+ /*Utils */
2275
+ .hidden {
2276
+ display: none;
2277
+ }
2278
+
2279
+ /*ERROR*/
2280
+ /*
2281
+ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) {
2282
+ --sc-checkbox-border-color:var(--sc-danger);
2283
+ }
2284
+ :host([touched]) .checkbox-container:has(input:not(:focus):invalid) .checkbox-text{
2285
+ color:var(--sc-danger);
2286
+ }
2287
+ */
2288
+ `],Ut([a({type:Boolean,reflect:!0})],yt.prototype,"touched",2),Ut([a({type:String})],yt.prototype,"iconName",2),Ut([a({type:String})],yt.prototype,"indeterminateIconName",2),Ut([a({type:Boolean})],yt.prototype,"showAsIndeterminate",2),Ut([a({type:Boolean})],yt.prototype,"hasDescription",2),Ut([a({type:Boolean})],yt.prototype,"hasLabel",2),Ut([it({flatten:!0})],yt.prototype,"slotLabelNodes",2),Ut([it({slot:"description",flatten:!0})],yt.prototype,"slotDescriptionNodes",2),yt=Ut([_(tl)],yt);var el=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,il=(r,t,s,i)=>{for(var e=i>1?void 0:i?sl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&el(t,s,e),e};const rl="sonic-radio";let di=class extends yt{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};di.styles=[yt.styles,$`
2289
+ :host input {
2290
+ border-radius: 50%;
2291
+ }
2292
+ :host sonic-icon {
2293
+ border-radius: 50%;
2294
+ overflow: hidden;
2295
+ background-color: var(--sc-primary-content);
2296
+ line-height: 0;
2297
+ display: block;
2298
+ font-size: 1em;
2299
+ height: 0.6em;
2300
+ width: 0.6em;
2301
+ }
2302
+ `],di=il([_(rl)],di);var ol=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,J=(r,t,s,i)=>{for(var e=i>1?void 0:i?nl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ol(t,s,e),e};const al="sonic-select";let Z=class extends Oe(Y(w)){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const r=this.querySelectorAll("option");r.length>0&&(this.options=Array.from(r).map(t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(r){this._options=r;for(const s of r)s.selected&&(this.value=s.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(r){this.hasDoneFirstUpdate=!0,super.firstUpdated(r)}set value(r){r==null&&!this.hasDoneFirstUpdate||(r||(r=""),this._value!=r&&(this._value=r,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t,s,i;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length),this.hasSuffix=!!((s=this.slotSuffixNodes)!=null&&s.length),this.hasPrefix=!!((i=this.slotPrefixNodes)!=null&&i.length)}validateFormElement(){var s;const r=(s=this.shadowRoot)==null?void 0:s.querySelector("select");if(!r||r.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),r.reportValidity()}render(){const r={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return g`
2303
+ <label
2304
+ for="form-element"
2305
+ class="${this.hasLabel?"form-label":"hidden"}"
2306
+ >${this.label?I(this.label):""}<slot
2307
+ name="label"
2308
+ @slotchange=${this.hasSlotOrProps}
2309
+ ></slot
2310
+ ></label>
2311
+
2312
+ <div class="form-control ${hi(r)}">
2313
+ <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2314
+ <div class="form-select-wrapper">
2315
+ <select
2316
+ data-form-element
2317
+ id="form-element"
2318
+ @change=${this.handleChange}
2319
+ @blur=${this.handleBlur}
2320
+ ?disabled=${this.disabled}
2321
+ ?required=${this.required}
2322
+ ?multiple=${this.multiple}
2323
+ size=${x(this.selectSize)}
2324
+ ?autofocus=${this.autofocus}
2325
+ .value="${this.value}"
2326
+ class="form-element"
2327
+ aria-label=${x(this.ariaLabel)}
2328
+ aria-labelledby=${x(this.ariaLabelledby)}
2329
+ >
2330
+ ${gs(this.options,t=>t[this.valueKey],t=>{const s=this.value==t[this.valueKey];return g`<option
2331
+ ?selected=${s}
2332
+ value="${t[this.valueKey]}"
2333
+ >
2334
+ ${t[this.wordingKey]}
2335
+ </option>`})}
2336
+ <slot></slot>
2337
+ </select>
2338
+ <sonic-icon
2339
+ class="select-chevron"
2340
+ name="nav-arrow-down"
2341
+ .size=${this.size}
2342
+ ></sonic-icon>
2343
+ </div>
2344
+ <slot name="suffix" @slotchange=${this.hasSlotOrProps}></slot>
2345
+ </div>
2346
+
2347
+ <slot
2348
+ name="description"
2349
+ @slotchange=${this.hasSlotOrProps}
2350
+ class="${this.hasDescription?"form-description":"hidden"}"
2351
+ >${this.description?g`${I(this.description)}`:""}</slot
2352
+ >
2353
+ `}};Z.styles=[Ot,ci,As,Ss,$`
2354
+ .form-element {
2355
+ appearance: none;
2356
+ }
2357
+
2358
+ :host([disabled]) sonic-icon {
2359
+ opacity: 0;
2360
+ }
2361
+
2362
+ @supports selector(:has(*)) {
2363
+ :host(:not([disabled])) .form-element:not(:has(option:only-child)) {
2364
+ padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
2365
+ }
2366
+ }
2367
+ /*Firefox etc.*/
2368
+ @supports not selector(:has(*)) {
2369
+ :host(:not([disabled])) .form-element {
2370
+ padding-right: max(1.275em, calc(1.5 * var(--sc-input-px)));
2371
+ }
2372
+ }
2373
+
2374
+ .form-select-wrapper {
2375
+ position: relative;
2376
+ width: 100%;
2377
+ }
2378
+
2379
+ sonic-icon {
2380
+ position: absolute;
2381
+ right: calc(0.8 * var(--sc-input-px));
2382
+ top: 50%;
2383
+ pointer-events: none;
2384
+ transform: translateY(-50%);
2385
+ color: var(--sc-input-c);
2386
+ }
2387
+
2388
+ option {
2389
+ padding: 0.1rem var(--sc-input-px);
2390
+ color: var(--sc-base-content);
2391
+ background: var(--sc-base);
2392
+ }
2393
+
2394
+ select[multiple] option {
2395
+ background: transparent;
2396
+ padding: 0;
2397
+ }
2398
+ `],J([a({type:String})],Z.prototype,"valueKey",2),J([a({type:String})],Z.prototype,"wordingKey",2),J([a({type:Boolean})],Z.prototype,"multiple",2),J([a({type:String,reflect:!0})],Z.prototype,"size",2),J([a({type:Number})],Z.prototype,"selectSize",2),J([a({type:String,reflect:!0})],Z.prototype,"status",2),J([a({type:Array})],Z.prototype,"options",1),J([a({reflect:!0})],Z.prototype,"value",1),J([a({type:Boolean})],Z.prototype,"forceAutoFill",2),J([a()],Z.prototype,"description",1),J([a()],Z.prototype,"label",1),J([it({slot:"label",flatten:!0})],Z.prototype,"slotLabelNodes",2),J([it({slot:"description",flatten:!0})],Z.prototype,"slotDescriptionNodes",2),J([it({slot:"suffix",flatten:!0})],Z.prototype,"slotSuffixNodes",2),J([it({slot:"prefix",flatten:!0})],Z.prototype,"slotPrefixNodes",2),J([M()],Z.prototype,"hasDescription",2),J([M()],Z.prototype,"hasLabel",2),J([M()],Z.prototype,"hasSuffix",2),J([M()],Z.prototype,"hasPrefix",2),Z=J([_(al)],Z);var ll=Object.defineProperty,cl=Object.getOwnPropertyDescriptor,mt=(r,t,s,i)=>{for(var e=i>1?void 0:i?cl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ll(t,s,e),e};const hl="sonic-textarea";let ct=class extends ys(Oe(Y(w))){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}validateFormElement(){var s;const r=(s=this.shadowRoot)==null?void 0:s.querySelector("textarea");if(!r||r.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),r.reportValidity()}render(){const r={resize:this.resize};return g`
2399
+ <label
2400
+ for="${this.id||"form-element"}"
2401
+ class="${this.hasLabel?"form-label":"hidden"}"
2402
+ >${this.label?I(this.label):""}<slot
2403
+ name="label"
2404
+ @slotchange=${this.hasSlotOrProps}
2405
+ ></slot
2406
+ ></label>
2407
+
2408
+ <div class="form-control">
2409
+ <textarea
2410
+ data-form-element
2411
+ id="${this.id||"form-element"}"
2412
+ @input=${this.handleChange}
2413
+ @blur=${this.handleBlur}
2414
+ disabled=${x(this.disabled)}
2415
+ ?required=${this.required}
2416
+ ?autofocus=${this.autofocus}
2417
+ rows=${x(this.rows)}
2418
+ cols=${x(this.cols)}
2419
+ maxlength=${x(this.maxlength)}
2420
+ minlength=${x(this.minlength)}
2421
+ ?readonly=${this.readonly}
2422
+ spellcheck=${x(this.spellcheck)}
2423
+ autocomplete=${x(this.autocomplete)}
2424
+ tabindex=${x(this.tabindex)}
2425
+ wrap=${x(this.wrap)}
2426
+ placeholder="${this.placeholder}"
2427
+ class="form-element textarea custom-scroll"
2428
+ aria-label=${x(this.ariaLabel)}
2429
+ aria-labelledby=${x(this.ariaLabelledby)}
2430
+ style=${ut(r)}
2431
+ >
2432
+ ${this.value}</textarea
2433
+ >
2434
+ </div>
2435
+
2436
+ <slot
2437
+ name="description"
2438
+ @slotchange=${this.hasSlotOrProps}
2439
+ class="${this.hasDescription?"form-description":"hidden"}"
2440
+ >${this.description?g`${I(this.description)}`:""}</slot
2441
+ >
2442
+ `}};ct.styles=[Ot,ci,As,Ss,Ye,$`
2443
+ textarea {
2444
+ overflow-y: auto !important;
2445
+ font-size: inherit;
2446
+ }
2447
+ `],mt([a({type:String})],ct.prototype,"size",2),mt([a({type:Number})],ct.prototype,"rows",2),mt([a({type:Number})],ct.prototype,"cols",2),mt([a({type:Number})],ct.prototype,"maxlength",2),mt([a({type:Number})],ct.prototype,"minlength",2),mt([a({type:String})],ct.prototype,"wrap",2),mt([a({type:Boolean})],ct.prototype,"readonly",2),mt([a({type:String})],ct.prototype,"placeholder",2),mt([a({type:String})],ct.prototype,"resize",2),mt([it({slot:"label",flatten:!0})],ct.prototype,"slotLabelNodes",2),mt([it({slot:"description",flatten:!0})],ct.prototype,"slotDescriptionNodes",2),mt([M()],ct.prototype,"hasDescription",2),mt([M()],ct.prototype,"hasLabel",2),ct=mt([_(hl)],ct);var dl=Object.defineProperty,pl=Object.getOwnPropertyDescriptor,ul=(r,t,s,i)=>{for(var e=i>1?void 0:i?pl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&dl(t,s,e),e};let pi=class extends w{render(){return g`<slot></slot>`}};pi.styles=[$`
2448
+ :host {
2449
+ font-size: 1.15rem;
2450
+ line-height: 1.2;
2451
+ display: block;
2452
+ color: var(--sc-base-500);
2453
+ font-weight: var(--sc-font-weight-base);
2454
+ font-style: var(--sc-font-style-base);
2455
+ margin-top: 0.2em;
2456
+ }
2457
+ `],pi=ul([_("sonic-legend-description")],pi);var fl=Object.defineProperty,gl=Object.getOwnPropertyDescriptor,ye=(r,t,s,i)=>{for(var e=i>1?void 0:i?gl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&fl(t,s,e),e};const ml="sonic-legend";let Vt=class extends w{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(r){this.hasAttribute("description")&&!this.forceAutoFill&&(r=this.getAttribute("description")),this._description=r,this.requestUpdate()}get label(){return this._label}set label(r){this.hasAttribute("label")&&!this.forceAutoFill&&(r=this.getAttribute("label")),this._label=r,this.requestUpdate()}render(){return g`<legend part="legend">
2458
+ ${this.iconName?g`<div class="icon">
2459
+ <sonic-icon name=${this.iconName} prefix=${x(this.iconPrefix)} library=${x(this.iconLibrary)}></sonic-icon>
2460
+ </div>`:""}
2461
+
2462
+ <div class="legend-content">
2463
+ ${I(this.label?this.label:"")}
2464
+ ${this.description?g`<sonic-legend-description>${I(this.description)}</sonic-legend-description>`:""}
2465
+ <slot></slot>
2466
+ </div>
2467
+ <slot name="suffix"></slot>
2468
+ </legend>`}};Vt.styles=[$`
2469
+ :host {
2470
+ --sc-legend-font-size: 1.5rem;
2471
+ --sc-legend-font-weight: var(--sc-font-weight-base);
2472
+ --sc-legend-font-style: var(--sc-headings-font-style);
2473
+ --sc-legend-family: var(--sc-headings-font-family);
2474
+ --sc-legend-line-height: var(--sc-headings-line-height);
2475
+ --sc-legend-color: var(--sc-base-content);
2476
+ display: flex;
2477
+ width: 100%;
2478
+ }
2479
+
2480
+ legend {
2481
+ font-size: var(--sc-legend-font-size);
2482
+ font-weight: var(--sc-legend-font-weight);
2483
+ font-style: var(--sc-legend-font-style);
2484
+ font-family: var(--sc-legend-font-family);
2485
+ line-height: var(--sc-legend-line-height);
2486
+ color: var(--sc-legend-color);
2487
+ padding: 0;
2488
+ display: flex;
2489
+ width: 100%;
2490
+ align-items: flex-start;
2491
+ gap: 0.5em;
2492
+ }
2493
+
2494
+ slot[name="suffix"] {
2495
+ display: block;
2496
+ margin-left: auto;
2497
+ flex-shrink: 0;
2498
+ }
2499
+
2500
+ .legend-content {
2501
+ flex-grow: 1;
2502
+ }
2503
+ `],ye([a({type:Boolean})],Vt.prototype,"forceAutoFill",2),ye([a()],Vt.prototype,"description",1),ye([a()],Vt.prototype,"label",1),ye([a({type:String})],Vt.prototype,"iconName",2),ye([a({type:String})],Vt.prototype,"iconLibrary",2),ye([a({type:String})],Vt.prototype,"iconPrefix",2),Vt=ye([_(ml)],Vt);var bl=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,Lt=(r,t,s,i)=>{for(var e=i>1?void 0:i?vl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&bl(t,s,e),e};const yl="sonic-fieldset";let Pt=class extends Y(w){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return g`<fieldset
2504
+ form="${x(this.form)}"
2505
+ ?disabled="${this.disabled}"
2506
+ >
2507
+ ${this.label?g` <sonic-legend
2508
+ label=${x(this.label)}
2509
+ description=${x(this.description)}
2510
+ iconName=${x(this.iconName)}
2511
+ iconPrefix=${x(this.iconPrefix)}
2512
+ iconLibrary=${x(this.iconLibrary)}
2513
+ ></sonic-legend>`:C}
2514
+ <slot></slot>
2515
+ </fieldset>`}};Pt.styles=[$`
2516
+ :host {
2517
+ --sc-fieldset-mt: 0;
2518
+ --sc-fieldset-mb: 1rem;
2519
+ --sc-fieldset-border-color: var(--sc-border-color);
2520
+ --sc-fieldset-border-width: var(--sc-form-border-width);
2521
+ --sc-fieldset-px: 1.25rem;
2522
+ --sc-fieldset-py: 1.8rem;
2523
+
2524
+ margin-top: var(--sc-fieldset-mt);
2525
+ margin-bottom: var(--sc-fieldset-mb);
2526
+ display: block;
2527
+ border: var(--sc-fieldset-border-width) solid
2528
+ var(--sc-fieldset-border-color) !important;
2529
+ padding: var(--sc-fieldset-py) var(--sc-fieldset-px);
2530
+ border-radius: var(--sc-rounded-lg);
2531
+ }
2532
+
2533
+ fieldset {
2534
+ all: unset;
2535
+ display: contents;
2536
+ }
2537
+
2538
+ :host([variant="shadow"]),
2539
+ :host([variant="ghost"]) {
2540
+ --sc-fieldset-border-color: transparent;
2541
+ }
2542
+ :host([variant="shadow"]) {
2543
+ --sc-fieldset-border-color: transparent;
2544
+ box-shadow: var(--sc-shadow-lg);
2545
+ }
2546
+
2547
+ :host([tight]) {
2548
+ --sc-fieldset-px: 0;
2549
+ border-left: none !important;
2550
+ border-right: none !important;
2551
+ border-radius: 0;
2552
+ }
2553
+
2554
+ sonic-legend,
2555
+ ::slotted(sonic-legend) {
2556
+ margin-bottom: 1.5rem;
2557
+ display: block;
2558
+ }
2559
+
2560
+ sonic-legend:last-child,
2561
+ ::slotted(sonic-legend:last-child) {
2562
+ margin-bottom: 0;
2563
+ }
2564
+ `],Lt([a({type:Boolean,reflect:!0})],Pt.prototype,"disabled",2),Lt([a({type:String})],Pt.prototype,"form",2),Lt([a({type:String})],Pt.prototype,"label",2),Lt([a({type:String})],Pt.prototype,"description",2),Lt([a({type:String})],Pt.prototype,"iconName",2),Lt([a({type:String})],Pt.prototype,"iconLibrary",2),Lt([a({type:String})],Pt.prototype,"iconPrefix",2),Lt([a({type:Boolean,reflect:!0})],Pt.prototype,"tight",2),Lt([a({type:String,reflect:!0})],Pt.prototype,"variant",2),Pt=Lt([_(yl)],Pt);var wl=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,ui=(r,t,s,i)=>{for(var e=i>1?void 0:i?_l(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&wl(t,s,e),e};const xl="sonic-form-layout";let Xe=class extends Y(w){constructor(){super(...arguments),this._resizeController=new $r(this,{}),this.oneFormElement=!1}onSlotChange(){let r=this.slottedElements;const t=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];r=r.filter(s=>t.includes(s.nodeName.toLowerCase())),this.oneFormElement=r.length==1}render(){const r={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return g`<div class=${hi(r)}>
2565
+ <slot @slotchange=${this.onSlotChange}></slot>
2566
+ </div>`}};Xe.styles=[$`
2567
+ :host {
2568
+ display: block;
2569
+ }
2570
+
2571
+ div {
2572
+ display: grid;
2573
+ grid-gap: 1.5rem;
2574
+ align-items: flex-start;
2575
+ }
2576
+
2577
+ .cq--md {
2578
+ grid-gap: 1.75rem;
2579
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2580
+ }
2581
+ .one-form-element {
2582
+ grid-template-columns: 1fr;
2583
+ }
2584
+ /*::slotted(sonic-radio),
2585
+ ::slotted(sonic-checkbox),
2586
+ ::slotted(sonic-form-actions),
2587
+ ::slotted(sonic-divider),
2588
+ ::slotted(sonic-textarea) {
2589
+ grid-column: 1 / -1;
2590
+ }*/
2591
+ ::slotted(sonic-submit) {
2592
+ display: contents;
2593
+ }
2594
+ ::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)) {
2595
+ grid-column: 1 / -1;
2596
+ }
2597
+
2598
+ ::slotted(sonic-divider) {
2599
+ --sc-divider-my: 0;
2600
+ }
2601
+ `],ui([re({flatten:!0})],Xe.prototype,"slottedElements",2),ui([a({type:Boolean})],Xe.prototype,"oneFormElement",2),Xe=ui([_(xl)],Xe);var Pl=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,fi=(r,t,s,i)=>{for(var e=i>1?void 0:i?$l(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pl(t,s,e),e};const Cl="sonic-form-actions";let ts=class extends w{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const r={flexDirection:this.direction,justifyContent:this.justify};return g`<slot style=${ut(r)}></slot>`}};ts.styles=[$`
2602
+ :host {
2603
+ display: block;
2604
+ }
2605
+ slot {
2606
+ display: flex;
2607
+ flex-wrap: wrap;
2608
+ gap: 0.3rem;
2609
+ }
2610
+ `],fi([a({type:String})],ts.prototype,"direction",2),fi([a({type:String})],ts.prototype,"justify",2),ts=fi([_(Cl)],ts);var Al=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,te=(r,t,s,i)=>{for(var e=i>1?void 0:i?Sl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Al(t,s,e),e};const Ol="sonic-group";let Et=class extends w{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const r=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),t=r.length;t>1&&r.forEach((s,i)=>{const e=s;i===0?(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0")):i===t-1?(e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0")):(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0"),e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}render(){const r={alignItems:this.alignItems};return g`<span class="${this.hasLabel?"form-label":"hidden"}"
2611
+ >${this.label?I(this.label):""}<slot name="label" @slotchange=${this.hasSlotOrProps}></slot
2612
+ ></span>
2613
+ <slot class="main-slot" style=${ut(r)}></slot>
2614
+ <slot name="description" @slotchange=${this.hasSlotOrProps} class="${this.hasDescription?"form-description":"hidden"}">
2615
+ ${this.description?g`${I(this.description)}`:""}
2616
+ </slot>`}};Et.styles=[Ot,As,Ss,$`
2617
+ :host {
2618
+ display: inline-block;
2619
+ vertical-align: middle;
2620
+ }
2621
+
2622
+ .main-slot {
2623
+ width: 100%;
2624
+ display: flex;
2625
+ }
2626
+ .hidden {
2627
+ display: none;
2628
+ }
2629
+
2630
+ ::slotted(sonic-button),
2631
+ ::slotted(sonic-input),
2632
+ ::slotted(sonic-select) {
2633
+ flex-grow: 1;
2634
+ }
2635
+ `],te([a({type:String})],Et.prototype,"alignItems",2),te([a({type:String})],Et.prototype,"label",2),te([a({type:String})],Et.prototype,"description",2),te([it({slot:"label",flatten:!0})],Et.prototype,"slotLabelNodes",2),te([it({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),te([M()],Et.prototype,"hasDescription",2),te([M()],Et.prototype,"hasLabel",2),Et=te([_(Ol)],Et);var Dl=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Nt=(r,t,s,i)=>{for(var e=i>1?void 0:i?kl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Dl(t,s,e),e};const Ll="sonic-image";let $t=class extends w{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(r){var t;if(this.transition){const s=(t=this.shadowRoot)==null?void 0:t.querySelector("img");if(!s)return;s.onload=function(){s.classList.add("loaded")}}super.firstUpdated(r)}render(){const r={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return g`<div part="image">
2636
+ <picture part="picture"
2637
+ ><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style=${ut(r)}
2638
+ /></picture>
2639
+ </div>`}};$t.styles=[$`
2640
+ :host {
2641
+ --sc-img-radius: 0;
2642
+ --sc-img-bg: var(--sc-placeholder-bg);
2643
+ border-radius: var(--sc-img-radius);
2644
+ display: block;
2645
+ width: 100%;
2646
+ background: var(--sc-img-bg);
2647
+ }
2648
+
2649
+ img {
2650
+ width: 100%;
2651
+ vertical-align: middle;
2652
+ object-fit: cover;
2653
+ }
2654
+
2655
+ img[src=""] {
2656
+ visibility: hidden;
2657
+ }
2658
+
2659
+ /*Rounded*/
2660
+ :host([rounded]) {
2661
+ --sc-img-radius: var(--sc-rounded);
2662
+ overflow: hidden;
2663
+ }
2664
+ :host([rounded="sm"]) {
2665
+ --sc-img-radius: var(--sc-rounded-sm);
2666
+ }
2667
+
2668
+ :host([rounded="md"]) {
2669
+ --sc-img-radius: var(--sc-rounded-md);
2670
+ }
2671
+
2672
+ :host([rounded="lg"]) {
2673
+ --sc-img-radius: var(--sc-rounded-lg);
2674
+ }
2675
+ :host([rounded="xl"]) {
2676
+ --sc-img-radius: var(--sc-rounded-xl);
2677
+ }
2678
+
2679
+ /*Cercle*/
2680
+ :host([rounded="full"]) {
2681
+ --sc-img-radius: 50% !important;
2682
+ }
2683
+ :host([rounded="none"]) {
2684
+ --sc-img-radius: 0 !important;
2685
+ }
2686
+
2687
+ :host([cover]),
2688
+ :host([cover]) > div,
2689
+ :host([cover]) img {
2690
+ position: absolute !important;
2691
+ left: 0 !important;
2692
+ top: 0 !important;
2693
+ right: 0 !important;
2694
+ bottom: 0 !important;
2695
+ height: 100% !important;
2696
+ width: 100% !important;
2697
+ }
2698
+
2699
+ :host([transition]) img {
2700
+ opacity: 0;
2701
+ transition: 0.25s;
2702
+ }
2703
+
2704
+ :host([transition="fade-scale-out"]) img {
2705
+ scale: 1.08;
2706
+ transition: opacity 0.3s linear, scale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
2707
+ }
2708
+ :host([transition]) img.loaded {
2709
+ opacity: 1;
2710
+ scale: 1;
2711
+ }
2712
+ `],Nt([a({type:String})],$t.prototype,"rounded",2),Nt([a({type:String})],$t.prototype,"src",2),Nt([a({type:String})],$t.prototype,"alt",2),Nt([a({type:String})],$t.prototype,"loading",2),Nt([a({type:String,reflect:!0})],$t.prototype,"transition",2),Nt([a({type:String})],$t.prototype,"ratio",2),Nt([a({type:String})],$t.prototype,"objectPosition",2),Nt([a({type:String})],$t.prototype,"imageRendering",2),Nt([a({type:Boolean,reflect:!0})],$t.prototype,"cover",2),$t=Nt([_(Ll)],$t);var El=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor,wt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Nl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&El(t,s,e),e};const Tl="sonic-menu";let pt=class extends w{constructor(){super(...arguments),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 r;this.hasMoreElements=!!((r=this.moreElements)!=null&&r.length)}updated(r){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(i=>{i.hasAttribute("size")||i.setAttribute("size","xs")}),super.updated(r)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var r;(r=this.observer)==null||r.disconnect(),super.disconnectedCallback()}initScrollable(){let r=!1,t,s;this.scrollable&&(this.addEventListener("mousedown",i=>{r=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,s=this.scrollLeft}),this.addEventListener("mouseleave",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mousemove",i=>{if(!r)return;i.preventDefault();const o=(i.pageX-this.offsetLeft-t)*1.5;this.scrollLeft=s-o,this.setScrollShadow(this,this.direction)}),this.addEventListener("scroll",i=>{i.preventDefault(),this.setScrollShadow(this,this.direction)}))}setScrollShadow(r,t){t=="row"?(r.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),r.scrollLeft<r.scrollWidth-r.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):t=="column"&&(r.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),r.scrollTop<r.scrollHeight-(r.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(r){r.forEach(t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.getAttribute("shape")!="square"&&t.getAttribute("shape")!="circle"&&t.setAttribute("align",this.align),this.direction=="row"&&t.getAttribute("shape")=="block"&&t.setAttribute("shape","default")})}render(){const r={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},t=this.direction=="row",s={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:t?"":".55em"};return g`<menu
2713
+ part="menu"
2714
+ class="shadowable"
2715
+ style=${ut(r)}
2716
+ >
2717
+ <slot @slotchange=${this.mainSlotChange}></slot>
2718
+ <sonic-pop
2719
+ style=${ut(s)}
2720
+ class=${this.hasMoreElements?"":"hidden"}
2721
+ >
2722
+ <sonic-menu-item
2723
+ style=${ut(i)}
2724
+ class="more-btn"
2725
+ shape=${this.moreShape}
2726
+ align="center"
2727
+ >
2728
+ <sonic-icon
2729
+ size="xl"
2730
+ name=${t?"more-vert":"more-horiz"}
2731
+ ></sonic-icon>
2732
+ </sonic-menu-item>
2733
+ <slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
2734
+ </sonic-pop>
2735
+ </menu>`}};pt.styles=[$`
2736
+ :host {
2737
+ display: block;
2738
+ --sc-menu-gap: 0.15rem;
2739
+ }
2740
+
2741
+ :host > menu {
2742
+ display: flex;
2743
+ border-radius: min(calc(var(--sc-btn-rounded) * 2), 0.4em);
2744
+ margin: 0;
2745
+ padding: 0.35em;
2746
+ }
2747
+
2748
+ .hidden {
2749
+ display: none !important;
2750
+ }
2751
+
2752
+ /*OMBRE*/
2753
+ :host([shadow]) .shadowable,
2754
+ :host([shadow="md"]) .shadowable,
2755
+ :host([shadow="true"]) .shadowable {
2756
+ box-shadow: var(--sc-shadow);
2757
+ }
2758
+
2759
+ :host([shadow="sm"]) .shadowable {
2760
+ box-shadow: var(--sc-shadow-sm);
2761
+ }
2762
+
2763
+ :host([shadow="lg"]) .shadowable {
2764
+ box-shadow: var(--sc-shadow-lg);
2765
+ }
2766
+
2767
+ :host([shadow="none"]) .shadowable {
2768
+ box-shadow: none;
2769
+ }
2770
+
2771
+ /* SCROLLABLE*/
2772
+ :host([scrollable]) {
2773
+ scrollbar-width: none;
2774
+ -ms-overflow-style: none;
2775
+ }
2776
+ :host([scrollable]) menu > * {
2777
+ scroll-snap-align: start;
2778
+ white-space: nowrap;
2779
+ }
2780
+ :host([scrollable][direction="row"]) {
2781
+ overflow-x: scroll;
2782
+ scroll-snap-type: x mandatory;
2783
+ }
2784
+ :host([scrollable][direction="column"]) {
2785
+ overflow-y: scroll;
2786
+ scroll-snap-type: y mandatory;
2787
+ }
2788
+ :host([scrollable])::-webkit-scrollbar {
2789
+ display: none !important;
2790
+ }
2791
+ :host([scrollable][direction="row"].shadow-right) {
2792
+ -webkit-mask-image: linear-gradient(
2793
+ to left,
2794
+ rgba(0, 0, 0, 0),
2795
+ rgba(0, 0, 0, 1) 10%
2796
+ );
2797
+ mask-image: linear-gradient(
2798
+ to left,
2799
+ rgba(0, 0, 0, 0),
2800
+ rgba(0, 0, 0, 1) 10%
2801
+ );
2802
+ }
2803
+ :host([scrollable][direction="row"].shadow-left) {
2804
+ -webkit-mask-image: linear-gradient(
2805
+ to right,
2806
+ rgba(0, 0, 0, 0),
2807
+ rgba(0, 0, 0, 1) 10%
2808
+ );
2809
+ mask-image: linear-gradient(
2810
+ to right,
2811
+ rgba(0, 0, 0, 0),
2812
+ rgba(0, 0, 0, 1) 10%
2813
+ );
2814
+ }
2815
+ :host([scrollable][direction="row"].shadow-left.shadow-right) {
2816
+ -webkit-mask-image: linear-gradient(
2817
+ to right,
2818
+ rgba(0, 0, 0, 0) 0%,
2819
+ rgba(0, 0, 0, 1) 10%,
2820
+ rgba(0, 0, 0, 1) 90%,
2821
+ rgba(0, 0, 0, 0) 100%
2822
+ );
2823
+ mask-image: linear-gradient(
2824
+ to right,
2825
+ rgba(0, 0, 0, 0) 0%,
2826
+ rgba(0, 0, 0, 1) 10%,
2827
+ rgba(0, 0, 0, 1) 90%,
2828
+ rgba(0, 0, 0, 0) 100%
2829
+ );
2830
+ }
2831
+ :host([scrollable][direction="column"].shadow-top) {
2832
+ -webkit-mask-image: linear-gradient(
2833
+ to bottom,
2834
+ rgba(0, 0, 0, 0),
2835
+ rgba(0, 0, 0, 1) 10%
2836
+ );
2837
+ mask-image: linear-gradient(
2838
+ to bottom,
2839
+ rgba(0, 0, 0, 0),
2840
+ rgba(0, 0, 0, 1) 10%
2841
+ );
2842
+ }
2843
+ :host([scrollable][direction="column"].shadow-bottom) {
2844
+ -webkit-mask-image: linear-gradient(
2845
+ to top,
2846
+ rgba(0, 0, 0, 0),
2847
+ rgba(0, 0, 0, 1) 10%
2848
+ );
2849
+ mask-image: linear-gradient(
2850
+ to top,
2851
+ rgba(0, 0, 0, 0),
2852
+ rgba(0, 0, 0, 1) 10%
2853
+ );
2854
+ }
2855
+ :host([scrollable][direction="column"].shadow-top.shadow-bottom) {
2856
+ -webkit-mask-image: linear-gradient(
2857
+ to top,
2858
+ rgba(0, 0, 0, 0) 0%,
2859
+ rgba(0, 0, 0, 1) 10%,
2860
+ rgba(0, 0, 0, 1) 90%,
2861
+ rgba(0, 0, 0, 0) 100%
2862
+ );
2863
+ mask-image: linear-gradient(
2864
+ to bottom,
2865
+ rgba(0, 0, 0, 0) 0%,
2866
+ rgba(0, 0, 0, 1) 10%,
2867
+ rgba(0, 0, 0, 1) 90%,
2868
+ rgba(0, 0, 0, 0) 100%
2869
+ );
2870
+ }
2871
+ `],wt([a({type:String,reflect:!0})],pt.prototype,"size",2),wt([a({type:String,reflect:!0})],pt.prototype,"direction",2),wt([a({type:String})],pt.prototype,"gap",2),wt([a({type:String,reflect:!0})],pt.prototype,"align",2),wt([a({type:String,reflect:!0})],pt.prototype,"shadow",2),wt([a({type:String})],pt.prototype,"moreShape",2),wt([a({type:Boolean})],pt.prototype,"scrollable",2),wt([a({type:String})],pt.prototype,"minWidth",2),wt([ie("menu")],pt.prototype,"menu",2),wt([re({selector:"sonic-menu-item"})],pt.prototype,"menuChildren",2),wt([re({slot:"more",selector:"*"})],pt.prototype,"moreElements",2),wt([M()],pt.prototype,"hasMoreElements",2),pt=wt([_(Tl)],pt);var Ml=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,Cr=(r,t,s,i)=>{for(var e=i>1?void 0:i?jl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ml(t,s,e),e};const Il="sonic-modal-actions";let Os=class extends w{firstUpdated(r){var t;(t=this.buttons)==null||t.forEach(s=>{s.addEventListener("click",()=>{if(s.getAttribute("hideModal")!="false"){const i=ue.getClosestElement(this,"sonic-modal");i==null||i.hide()}})}),super.firstUpdated(r)}render(){return g`<slot></slot>`}};Os.styles=[$`
2872
+ :host {
2873
+ display: flex;
2874
+ gap: 0.5rem;
2875
+ margin-top: auto;
2876
+ padding-top: 1.5rem;
2877
+ }
2878
+ `],Cr([re({selector:"sonic-button"})],Os.prototype,"buttons",2),Os=Cr([_(Il)],Os);var Fl=Object.defineProperty,zl=Object.getOwnPropertyDescriptor,Ar=(r,t,s,i)=>{for(var e=i>1?void 0:i?zl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Fl(t,s,e),e};const Rl="sonic-modal-close";let Ds=class extends w{render(){return g`<sonic-button reset=${x(this.reset)} shape="circle" @click=${this.handleClick}
2879
+ ><sonic-icon name="cancel" size="lg"></sonic-icon
2880
+ ></sonic-button>`}handleClick(){Q.getClosestElement(this,"sonic-modal").hide()}};Ds.styles=[$`
2881
+ :host {
2882
+ position: sticky;
2883
+ display: block;
2884
+ align-self: flex-end;
2885
+ height: 0;
2886
+ top: 0.5rem;
2887
+ right: 0.5rem;
2888
+ transform: translate3d(calc(var(--sc-modal-px)), calc(-1 * var(--sc-modal-py)), 0);
2889
+ z-index: 20;
2890
+ }
2891
+ `],Ar([a()],Ds.prototype,"reset",2),Ds=Ar([_(Rl)],Ds);var Ul=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,Bl=(r,t,s,i)=>{for(var e=i>1?void 0:i?Vl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ul(t,s,e),e};const Hl="sonic-modal-content";let gi=class extends w{render(){return g`<slot></slot>`}};gi.styles=[$`
2892
+ :host {
2893
+ display: block;
2894
+ width: 100%;
2895
+ }
2896
+ `],gi=Bl([_(Hl)],gi);var ql=Object.defineProperty,Wl=Object.getOwnPropertyDescriptor,Kl=(r,t,s,i)=>{for(var e=i>1?void 0:i?Wl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ql(t,s,e),e};const Zl="sonic-modal-subtitle";let mi=class extends w{render(){return g`<slot></slot>`}};mi.styles=[$`
2897
+ :host {
2898
+ font-size: 1.1rem;
2899
+ display: block;
2900
+ line-height: 1.1rem;
2901
+ line-height: var(--sc-headings-line-height);
2902
+ font-family: var(--sc-headings-font-family);
2903
+ font-weight: var(--sc-headings-font-weight);
2904
+ }
2905
+ `],mi=Kl([_(Zl)],mi);var Yl=Object.defineProperty,Gl=Object.getOwnPropertyDescriptor,Ql=(r,t,s,i)=>{for(var e=i>1?void 0:i?Gl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Yl(t,s,e),e};const Jl="sonic-modal-title";let bi=class extends w{render(){return g`<slot></slot>`}};bi.styles=[$`
2906
+ :host {
2907
+ font-weight: bold;
2908
+ font-size: 1.5rem;
2909
+ display: block;
2910
+ line-height: var(--sc-headings-line-height);
2911
+ font-family: var(--sc-headings-font-family);
2912
+ }
2913
+ `],bi=Ql([_(Jl)],bi);var Xl=Object.defineProperty,tc=Object.getOwnPropertyDescriptor,st=(r,t,s,i)=>{for(var e=i>1?void 0:i?tc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Xl(t,s,e),e};const Sr="sonic-modal";let U=class extends Y(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!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(r){const t=document.createElement(Sr);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),vt.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){U.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){U.modals.splice(U.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(r)}render(){var s;if(this.visible==!1)return C;const r={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)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return g`<div
2914
+ class="modal-wrapper"
2915
+ style=${ut(t)}
2916
+ ${ms({out:Ho})}
2917
+ tabindex="0"
2918
+ >
2919
+ <div
2920
+ part="modal"
2921
+ class="modal custom-scroll"
2922
+ style=${ut(r)}
2923
+ ${ms({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}]})}
2924
+ >
2925
+ <div class="modal-content">
2926
+ ${(s=this.options)!=null&&s.forceAction?C:g`<sonic-modal-close></sonic-modal-close>`}
2927
+ ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
2928
+ ${this.modalFragment("content")} ${this.modalFragment("actions")}
2929
+
2930
+ <slot></slot>
2931
+ </div>
2932
+ </div>
2933
+ </div>
2934
+ <div
2935
+ class="overlay"
2936
+ @click="${this.forceAction?null:this.hide}"
2937
+ ${ms({keyframeOptions:{duration:500},in:qo,out:[{opacity:0,pointerEvents:"none"}]})}
2938
+ ></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return C;let s;switch(t instanceof Object?s=t:s=I(t),r){case"title":return g`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return g`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return g`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return g`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return C}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&tt.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove(),setTimeout(()=>{this.dispatchEvent(new CustomEvent("hidden")),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname)},480)}dispose(){this.hide(),this.remove()}static disposeAll(){U.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&U.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};U.styles=[Ye,$`
2939
+ :host {
2940
+ --sc-modal-py: 2.5rem;
2941
+ --sc-modal-px: 1.5rem;
2942
+ --sc-modal-max-w: min(100vw, 40rem);
2943
+ --sc-modal-max-h: 85vh;
2944
+ --sc-modal-rounded: var(--sc-rounded-lg);
2945
+ --sc-modal-z-index: 990;
2946
+ }
2947
+
2948
+ * {
2949
+ box-sizing: border-box;
2950
+ }
2951
+
2952
+ .modal-wrapper {
2953
+ position: fixed;
2954
+ bottom: 0;
2955
+ left: 0;
2956
+ width: 100%;
2957
+ z-index: calc(var(--sc-modal-z-index) + 1);
2958
+ align-items: center;
2959
+ justify-content: center;
2960
+ flex-direction: column;
2961
+ display: flex;
2962
+ pointer-events: none;
2963
+ }
2964
+
2965
+ .modal-content {
2966
+ display: flex;
2967
+ flex-direction: column;
2968
+ min-height: 10rem;
2969
+ line-height: 1.25;
2970
+ }
2971
+
2972
+ .modal {
2973
+ background: var(--sc-base);
2974
+ color: var(--sc-base-content);
2975
+ width: 100%;
2976
+ box-shadow: var(--sc-shadow-lg);
2977
+ border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;
2978
+ pointer-events: auto;
2979
+ /*overflow: hidden;*/
2980
+ transform: translateZ(0);
2981
+ }
2982
+
2983
+ .overlay {
2984
+ background: var(--sc-modal-overlay-bg, var(--sc-base-200));
2985
+ left: 0;
2986
+ top: 0;
2987
+ right: 0;
2988
+ bottom: 0;
2989
+ z-index: var(--sc-modal-z-index);
2990
+ opacity: 0.8;
2991
+ position: fixed;
2992
+ }
2993
+
2994
+ ::slotted(sonic-modal-title),
2995
+ sonic-modal-title {
2996
+ margin-bottom: 1.25rem;
2997
+ }
2998
+ :host([align="left"]) ::slotted(sonic-modal-title),
2999
+ :host([align="left"]) sonic-modal-title {
3000
+ padding-right: 1em;
3001
+ }
3002
+
3003
+ ::slotted(sonic-modal-subtitle),
3004
+ sonic-modal-subtitle {
3005
+ margin-top: -0.9rem;
3006
+ margin-bottom: 1.25rem;
3007
+ }
3008
+
3009
+ @media (max-width: 767.5px) {
3010
+ .modal-wrapper,
3011
+ .modal {
3012
+ max-width: none !important;
3013
+ width: 100% !important;
3014
+ border-radius: var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0 !important;
3015
+ }
3016
+ }
3017
+
3018
+ @media (min-width: 768px) {
3019
+ .modal-wrapper {
3020
+ top: 50%;
3021
+ left: 50%;
3022
+ bottom: auto;
3023
+ right: auto;
3024
+ transform: translateX(-50%) translateY(-50%);
3025
+ }
3026
+
3027
+ .modal {
3028
+ top: 50%;
3029
+ bottom: auto;
3030
+ right: auto;
3031
+ border-radius: var(--sc-modal-rounded);
3032
+ }
3033
+ }
3034
+
3035
+ :host([align="left"]) .modal-content {
3036
+ text-align: left;
3037
+ align-items: flex-start;
3038
+ }
3039
+
3040
+ :host([align="center"]) .modal-content {
3041
+ text-align: center;
3042
+ align-items: center;
3043
+ }
3044
+
3045
+ :host([align="right"]) .modal-content {
3046
+ text-align: right;
3047
+ align-items: flex-end;
3048
+ }
3049
+
3050
+ /* Border radius */
3051
+ :host([rounded="none"]) modal {
3052
+ --sc-img-radius: 0 !important;
3053
+ }
3054
+ `],U.modals=[],st([a({type:Boolean})],U.prototype,"forceAction",2),st([a({type:Boolean})],U.prototype,"removeOnHide",2),st([a({type:Boolean})],U.prototype,"removeHashOnHide",2),st([a({type:String,reflect:!0})],U.prototype,"align",2),st([a({type:String})],U.prototype,"padding",2),st([a({type:String})],U.prototype,"maxWidth",2),st([a({type:String})],U.prototype,"maxHeight",2),st([a({type:String})],U.prototype,"width",2),st([a({type:String})],U.prototype,"height",2),st([a({type:String})],U.prototype,"zIndex",2),st([a({type:Object})],U.prototype,"options",2),st([a({type:Boolean,reflect:!0})],U.prototype,"fullScreen",2),st([a({type:Boolean,reflect:!0})],U.prototype,"visible",2),st([ie(".modal-wrapper")],U.prototype,"modalWrapper",2),st([ie(".modal")],U.prototype,"modalElement",2),st([re({selector:"sonic-modal-close"})],U.prototype,"closeBtn",2),U=st([_(Sr)],U),typeof window<"u"&&(window.SonicModal=U);var ec=Object.defineProperty,sc=Object.getOwnPropertyDescriptor,Tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?sc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ec(t,s,e),e};const ic={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},rc="sonic-alert";let Ct=class extends w{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=new Date().getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}render(){if(this.dismissForever){const r=localStorage.getItem("sonic-alert-dismissed")||"{}";if(JSON.parse(r)[this.id])return C}return g`<div part="alert" class="alert">
3055
+ <slot name="icon" class="${this.noIcon?"hidden":C}"
3056
+ >${this.noIcon?C:g`<div>${this.status&&g`<sonic-icon name=${ic[this.status]}></sonic-icon>`}</div>`}</slot
3057
+ >
3058
+ <div>
3059
+ ${this.label?g`<span class="label">${I(this.label)}</span>`:C}
3060
+ <div>${this.text}<slot></slot></div>
3061
+ </div>
3062
+ ${this.dismissible?g`<sonic-button @click=${this.close} class="close-btn" variant="unstyled" shape="circle">
3063
+ <sonic-icon name="cancel" size="lg"></sonic-icon>
3064
+ </sonic-button>`:C}
3065
+ </div>`}close(){if(this.remove(),this.dismissForever){const r=localStorage.getItem("sonic-alert-dismissed")||"{}",t=JSON.parse(r);t[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(t))}}};Ct.styles=[Ot,$`
3066
+ :host {
3067
+ --sc-alert-color: var(--sc-base-content);
3068
+ --sc-alert-rounded: var(--sc-rounded);
3069
+ --sc-alert-fw: var(--sc-font-weight-base);
3070
+ --sc-alert-fst: var(--sc-font-style-base);
3071
+ --sc-alert-label-fw: bold;
3072
+ display: block;
3073
+ font-weight: var(--sc-alert-fw);
3074
+ font-style: var(--sc-alert-fst);
3075
+ }
3076
+
3077
+ .alert {
3078
+ color: var(--sc-alert-color);
3079
+ position: relative;
3080
+ display: flex;
3081
+ gap: 0.4em;
3082
+ border-radius: var(--sc-alert-rounded);
3083
+ overflow: hidden;
3084
+ }
3085
+
3086
+ .label {
3087
+ font-weight: var(--sc-alert-label-fw);
3088
+ margin-bottom: 0.15em;
3089
+ display: block;
3090
+ }
3091
+
3092
+ :host([status="warning"]) {
3093
+ --sc-alert-color: var(--sc-warning);
3094
+ }
3095
+ :host([status="error"]) {
3096
+ --sc-alert-color: var(--sc-danger);
3097
+ }
3098
+ :host([status="info"]) {
3099
+ --sc-alert-color: var(--sc-info);
3100
+ }
3101
+ :host([status="success"]) {
3102
+ --sc-alert-color: var(--sc-success);
3103
+ }
3104
+
3105
+ /*background*/
3106
+ :host([dismissible]) .alert,
3107
+ :host([background]) .alert {
3108
+ background: var(--sc-base);
3109
+ padding: 0.8em 1.15em;
3110
+ }
3111
+ :host([dismissible]) .alert:before,
3112
+ :host([background]) .alert:before {
3113
+ background-color: currentColor;
3114
+ content: "";
3115
+ display: block;
3116
+ position: absolute;
3117
+ left: 0;
3118
+ top: 0;
3119
+ right: 0;
3120
+ bottom: 0;
3121
+ opacity: 0.08;
3122
+ border-radius: var(--sc-alert-rounded);
3123
+ pointer-events: none;
3124
+ }
3125
+ :host([dismissible]) > div,
3126
+ :host([background]) > div {
3127
+ z-index: 2;
3128
+ position: relative;
3129
+ }
3130
+
3131
+ slot {
3132
+ display: block;
3133
+ }
3134
+
3135
+ .hidden {
3136
+ display: none !important;
3137
+ }
3138
+
3139
+ /*Rounded*/
3140
+ :host([size="xs"]) .alert {
3141
+ --sc-alert-rounded: var(--sc-rounded-sm);
3142
+ }
3143
+ :host([size="sm"]) .alert {
3144
+ --sc-alert-rounded: var(--sc-rounded-sm);
3145
+ }
3146
+
3147
+ /*Dismissible*/
3148
+ :host([dismissible]) .alert {
3149
+ padding-right: 3rem;
3150
+ }
3151
+ :host([dismissible]) .close-btn {
3152
+ padding: 0.5em;
3153
+ position: absolute;
3154
+ top: 0.25rem;
3155
+ right: 0.25rem;
3156
+ }
3157
+ `],Tt([a({type:String})],Ct.prototype,"label",2),Tt([a({type:Boolean,reflect:!0})],Ct.prototype,"noIcon",2),Tt([a({type:String})],Ct.prototype,"text",2),Tt([a({type:String})],Ct.prototype,"id",2),Tt([a({type:String,reflect:!0})],Ct.prototype,"size",2),Tt([a({type:Boolean,reflect:!0})],Ct.prototype,"dismissible",2),Tt([a({type:Boolean,reflect:!0})],Ct.prototype,"background",2),Tt([a({type:String,reflect:!0})],Ct.prototype,"status",2),Tt([a({type:Boolean,reflect:!0})],Ct.prototype,"dismissForever",2),Ct=Tt([_(rc)],Ct);var oc=Object.defineProperty,nc=Object.getOwnPropertyDescriptor,Or=(r,t,s,i)=>{for(var e=i>1?void 0:i?nc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&oc(t,s,e),e};const ac="sonic-toast-message-subscriber";let vi=class extends Y(w){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(r){this._messages=r,this.messages&&r.forEach(t=>{t.type=="public"&&T.add({text:t.content||"",status:t.status})})}render(){return C}};Or([a({type:Array})],vi.prototype,"messages",1),vi=Or([_(ac)],vi);var lc=Object.defineProperty,cc=Object.getOwnPropertyDescriptor,es=(r,t,s,i)=>{for(var e=i>1?void 0:i?cc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&lc(t,s,e),e};const hc="sonic-tooltip";let we=class extends w{constructor(){super(...arguments),this.label="",this.disabled=!1,this.focusable=!1}connectedCallback(){this.focusable&&this.setAttribute("tabindex","0"),super.connectedCallback()}render(){const r=this.disabled||this.label==""?"disabled":"";return g`<div
3158
+ data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}"
3159
+ class="tooltip ${r}"
3160
+ >
3161
+ <slot></slot>
3162
+ </div>`}};we.styles=[$`
3163
+ :host {
3164
+ position: relative;
3165
+ display: inline-flex;
3166
+ align-items: center;
3167
+ text-align: center;
3168
+ --sc-tooltip-fw: var(--sc-font-weight-base);
3169
+ --sc-tooltip-position: calc(100% + 0.25rem);
3170
+ }
3171
+
3172
+ .tooltip:before {
3173
+ position: absolute;
3174
+ content: attr(data-tooltip-text);
3175
+ font-size: 0.85rem;
3176
+ display: block;
3177
+ opacity: 0;
3178
+ pointer-events: none;
3179
+ background: var(--sc-base-content, #111827);
3180
+ padding: 0.32rem 0.55rem;
3181
+ border-radius: var(--sc-rounded);
3182
+ color: var(--sc-base, #fff);
3183
+ z-index: 999;
3184
+ line-height: 1.1;
3185
+ width: max-content;
3186
+ max-width: 18rem;
3187
+ white-space: pre-line;
3188
+ font-weight: var(--sc-tooltip-fw);
3189
+ transition: 0.2s;
3190
+ scale: 0.9;
3191
+ will-change: opacity, transform;
3192
+ }
3193
+ :host(:focus-within) .tooltip:not(.disabled):before,
3194
+ .tooltip:not(.disabled):hover:before {
3195
+ opacity: 1;
3196
+ scale: 1;
3197
+ }
3198
+
3199
+ :host(:not([placement])) .tooltip:before,
3200
+ :host([placement="top"]) .tooltip:before {
3201
+ bottom: var(--sc-tooltip-position);
3202
+ left: 50%;
3203
+ transform: translateX(-50%);
3204
+ }
3205
+
3206
+ :host([placement="top-end"]) .tooltip:before {
3207
+ bottom: var(--sc-tooltip-position);
3208
+ right: 0;
3209
+ }
3210
+ :host([placement="top-start"]) .tooltip:before {
3211
+ bottom: var(--sc-tooltip-position);
3212
+ left: 0;
3213
+ }
3214
+
3215
+ :host([placement="bottom"]) .tooltip:before {
3216
+ top: var(--sc-tooltip-position);
3217
+ left: 50%;
3218
+ transform: translateX(-50%);
3219
+ }
3220
+
3221
+ :host([placement="bottom-start"]) .tooltip:before {
3222
+ top: var(--sc-tooltip-position);
3223
+ left: 0;
3224
+ }
3225
+ :host([placement="bottom-end"]) .tooltip:before {
3226
+ top: var(--sc-tooltip-position);
3227
+ right: 0;
3228
+ }
3229
+
3230
+ :host([placement="left"]) .tooltip:before {
3231
+ top: 50%;
3232
+ right: var(--sc-tooltip-position);
3233
+ transform: translateY(-50%);
3234
+ }
3235
+
3236
+ :host([placement="left-start"]) .tooltip:before {
3237
+ top: 0;
3238
+ right: var(--sc-tooltip-position);
3239
+ }
3240
+
3241
+ :host([placement="left-end"]) .tooltip:before {
3242
+ bottom: 0;
3243
+ right: var(--sc-tooltip-position);
3244
+ }
3245
+
3246
+ :host([placement="right"]) .tooltip:before {
3247
+ top: 50%;
3248
+ transform: translateY(-50%);
3249
+ left: var(--sc-tooltip-position);
3250
+ }
3251
+
3252
+ :host([placement="right-start"]) .tooltip:before {
3253
+ top: 0;
3254
+ left: var(--sc-tooltip-position);
3255
+ }
3256
+
3257
+ :host([placement="right-end"]) .tooltip:before {
3258
+ bottom: 0;
3259
+ left: var(--sc-tooltip-position);
3260
+ }
3261
+ `],es([a({type:String})],we.prototype,"label",2),es([a({type:String,reflect:!0})],we.prototype,"placement",2),es([a({type:Boolean})],we.prototype,"disabled",2),es([a({type:Boolean})],we.prototype,"focusable",2),we=es([_(hc)],we);var dc=Object.defineProperty,pc=Object.getOwnPropertyDescriptor,Mt=(r,t,s,i)=>{for(var e=i>1?void 0:i?pc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&dc(t,s,e),e};const uc="sonic-divider";let At=class extends w{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(r){var t,s;super.firstUpdated(r),(this.label||(t=this.slotNodes)!=null&&t.length)&&((s=this.divider)==null||s.classList.add("has-text"))}render(){return g`<div part="divider">
3262
+ <span class="text">${I(this.label?this.label:"")}<slot></slot></span>
3263
+ </div>`}};At.styles=[$`
3264
+ :host {
3265
+ --sc-divider-my: 0.5rem;
3266
+ --sc-divider-mx: 0;
3267
+ --sc-divider-border-width: max(1px, var(--sc-border-width));
3268
+ --sc-divider-border-color: var(--sc-border-color);
3269
+ --sc-divider-border-style: solid;
3270
+ --sc-divider-color: currentColor;
3271
+ --sc-divider-ff: var(--sc-font-family-base);
3272
+ --sc-divider-fs: 1rem;
3273
+ --sc-divider-fw: var(--sc-font-weight-base);
3274
+ --sc-divider-fst: var(--sc-font-style-base);
3275
+
3276
+ margin: var(--sc-divider-my) var(--sc-divider-mx);
3277
+ font-size: var(--sc-divider-fs);
3278
+ font-style: var(--sc-divider-fst);
3279
+ font-family: var(--sc-divider-ff);
3280
+ font-weight: var(--sc-divider-fw);
3281
+ color: var(--sc-divider-color);
3282
+ display: block;
3283
+ }
3284
+
3285
+ /*SIZE*/
3286
+ :host([size="2xs"]) {
3287
+ --sc-divider-my: 0.35rem;
3288
+ --sc-divider-fs: 0.68rem;
3289
+ }
3290
+
3291
+ :host([size="xs"]) {
3292
+ --sc-divider-my: 0.5rem;
3293
+ --sc-divider-fs: 0.75rem;
3294
+ }
3295
+
3296
+ :host([size="sm"]) {
3297
+ --sc-divider-my: 0.75rem;
3298
+ --sc-divider-fs: 0.875rem;
3299
+ }
3300
+
3301
+ :host([size="md"]) {
3302
+ --sc-divider-my: 1.25rem;
3303
+ }
3304
+
3305
+ :host([size="lg"]) {
3306
+ --sc-divider-my: 1.85rem;
3307
+ }
3308
+
3309
+ :host([size="xl"]) {
3310
+ --sc-divider-my: 2.25rem;
3311
+ }
3312
+
3313
+ :host([size="2xl"]) {
3314
+ --sc-divider-my: 3.35rem;
3315
+ }
3316
+
3317
+ div {
3318
+ display: flex;
3319
+ align-items: center;
3320
+ width: 100%;
3321
+ }
3322
+
3323
+ div::before,
3324
+ div::after {
3325
+ content: "";
3326
+ flex-grow: 1;
3327
+ border-top: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);
3328
+ width: 100%;
3329
+ opacity: var(--sc-divider-opacity, 1);
3330
+ }
3331
+
3332
+ /*ALIGNEMENT*/
3333
+ :host([align="left"]) div:before {
3334
+ display: none;
3335
+ }
3336
+
3337
+ :host([align="right"]) div:after {
3338
+ display: none;
3339
+ }
3340
+
3341
+ :host([vertical]) {
3342
+ margin: var(--sc-divider-mx) var(--sc-divider-my);
3343
+ }
3344
+
3345
+ :host([vertical]) div {
3346
+ flex-direction: column;
3347
+ height: 100%;
3348
+ min-height: var(--sc-form-height);
3349
+ }
3350
+
3351
+ :host([vertical]) .has-text {
3352
+ gap: 0.25rem;
3353
+ }
3354
+
3355
+ :host([vertical]) div::before,
3356
+ :host([vertical]) div::after {
3357
+ border-top: none;
3358
+ border-left: var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);
3359
+ width: auto;
3360
+ height: 100%;
3361
+ opacity: var(--sc-divider-opacity, 1);
3362
+ }
3363
+
3364
+ :host([noMargin]) {
3365
+ margin: 0;
3366
+ }
3367
+
3368
+ /*TEXT*/
3369
+ .text {
3370
+ flex-shrink: 0;
3371
+ line-height: 1.1;
3372
+ max-width: 80%;
3373
+ }
3374
+
3375
+ .no-text .text {
3376
+ display: none;
3377
+ }
3378
+
3379
+ .has-text {
3380
+ gap: 0.5rem;
3381
+ }
3382
+
3383
+ :host([dotted]) {
3384
+ --sc-divider-border-style: dotted;
3385
+ }
3386
+ :host([dashed]) {
3387
+ --sc-divider-border-style: dashed;
3388
+ }
3389
+ `],Mt([it({flatten:!0})],At.prototype,"slotNodes",2),Mt([ie("div")],At.prototype,"divider",2),Mt([a({type:String})],At.prototype,"label",2),Mt([a({type:String,reflect:!0})],At.prototype,"size",2),Mt([a({type:String,reflect:!0})],At.prototype,"align",2),Mt([a({type:Boolean,reflect:!0})],At.prototype,"vertical",2),Mt([a({type:Boolean,reflect:!0})],At.prototype,"noMargin",2),Mt([a({type:Boolean,reflect:!0})],At.prototype,"dashed",2),Mt([a({type:Boolean,reflect:!0})],At.prototype,"dotted",2),At=Mt([_(uc)],At);var fc=Object.defineProperty,gc=Object.getOwnPropertyDescriptor,mc=(r,t,s,i)=>{for(var e=i>1?void 0:i?gc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&fc(t,s,e),e};const bc="sonic-card-header-description";let yi=class extends w{render(){return g`
3390
+ <div>
3391
+ <slot></slot>
3392
+ </div>
3393
+ `}};yi.styles=[$`
3394
+ div {
3395
+ margin-top: 0.1em;
3396
+ font-family: var(--sc-font-family-base);
3397
+ font-size: 0.7em;
3398
+ font-weight: var(--sc-font-style-base);
3399
+ }
3400
+ `],yi=mc([_(bc)],yi);var vc=Object.defineProperty,yc=Object.getOwnPropertyDescriptor,wi=(r,t,s,i)=>{for(var e=i>1?void 0:i?yc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&vc(t,s,e),e};const wc="sonic-card-header";let ss=class extends w{render(){return g`
3401
+ <div class="header">
3402
+ <div class="header-content">
3403
+ ${I(this.label)}
3404
+ ${this.description?g`<sonic-card-header-description>${I(this.description)}</sonic-card-header-description>`:""}
3405
+ <slot></slot>
3406
+ </div>
3407
+ <slot name="suffix"></slot>
3408
+ </div>
3409
+ `}};ss.styles=[$`
3410
+ :host {
3411
+ --sc-card-header-mb: 1.35rem;
3412
+ --sc-card-header-font-size: 1.875rem;
3413
+ --sc-card-header-font-weight: var(--sc-headings-font-weight);
3414
+ --sc-card-header-font-style: var(--sc-headings-font-style);
3415
+ --sc-card-header-family: var(--sc-headings-font-family);
3416
+ --sc-card-header-line-height: var(--sc-headings-line-height);
3417
+ }
3418
+ @media print {
3419
+ :host {
3420
+ --sc-card-header-font-size: 1.45rem;
3421
+ }
3422
+ }
3423
+ .header {
3424
+ display: flex;
3425
+ align-items: flex-start;
3426
+ gap: 0.5em 1em;
3427
+ margin-bottom: var(--sc-card-header-mb);
3428
+ line-height: var(--sc-card-header-line-height);
3429
+ font-family: var(--sc-card-header-font-family);
3430
+ font-size: var(--sc-card-header-font-size);
3431
+ font-style: var(--sc-card-header-font-style);
3432
+ font-weight: var(--sc-card-header-font-weight);
3433
+ }
3434
+
3435
+ .header-content {
3436
+ flex-grow: 1;
3437
+ }
3438
+
3439
+ slot[name="suffix"] {
3440
+ flex-shrink: 0;
3441
+ }
3442
+ `],wi([a()],ss.prototype,"label",2),wi([a()],ss.prototype,"description",2),ss=wi([_(wc)],ss);var _c=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,Pc=(r,t,s,i)=>{for(var e=i>1?void 0:i?xc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&_c(t,s,e),e};const $c="sonic-card-main";let Dr=class extends w{render(){return g`
3443
+ <div>
3444
+ <slot></slot>
3445
+ </div>
3446
+ `}};Dr=Pc([_($c)],Dr);var Cc=Object.defineProperty,Ac=Object.getOwnPropertyDescriptor,Sc=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ac(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Cc(t,s,e),e};const Oc="sonic-card-footer";let kr=class extends w{render(){return g` <slot></slot> `}};kr=Sc([_(Oc)],kr);var Dc=Object.defineProperty,kc=Object.getOwnPropertyDescriptor,Lr=(r,t,s,i)=>{for(var e=i>1?void 0:i?kc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Dc(t,s,e),e};const Lc="sonic-card";let ks=class extends w{constructor(){super(...arguments),this.type="default"}render(){return g`
3447
+ <div part="card" class="card">
3448
+ <slot></slot>
3449
+ </div>
3450
+ `}};ks.styles=[$`
3451
+ * {
3452
+ box-sizing: border-box;
3453
+ }
3454
+ :host {
3455
+ --sc-card-padding: 1.5rem;
3456
+ --sc-card-color: var(--sc-base-content);
3457
+ --sc-card-bg: var(--sc-base);
3458
+ --sc-card-rounded: var(--sc-rounded-lg);
3459
+ --sc-card-shadow: var(--sc-shadow-lg);
3460
+ -webkit-print-color-adjust: exact;
3461
+ }
3462
+
3463
+ @media print {
3464
+ .card {
3465
+ page-break-inside: avoid;
3466
+ break-inside: avoid;
3467
+ box-shadow: none !important;
3468
+ border: 1px solid var(--sc-base-200);
3469
+ }
3470
+ }
3471
+
3472
+ .card {
3473
+ padding: var(--sc-card-padding);
3474
+ background-color: var(--sc-card-bg);
3475
+ border-radius: var(--sc-card-rounded);
3476
+ box-shadow: var(--sc-card-shadow);
3477
+ color: var(--sc-card-color);
3478
+ }
3479
+
3480
+ /*TYPES*/
3481
+ :host([type="primary"]) {
3482
+ --sc-card-bg: var(--sc-primary);
3483
+ --sc-card-color: var(--sc-primary-content);
3484
+ --sc-border-color: var(--sc-primary-content);
3485
+ --sc-divider-opacity: 0.2;
3486
+ }
3487
+ :host([type="warning"]) {
3488
+ --sc-card-bg: var(--sc-warning);
3489
+ --sc-card-color: var(--sc-warning-content);
3490
+ --sc-border-color: var(--sc-primary-content);
3491
+ --sc-divider-opacity: 0.2;
3492
+ }
3493
+ :host([type="danger"]) {
3494
+ --sc-card-bg: var(--sc-danger);
3495
+ --sc-card-color: var(--sc-danger-content);
3496
+ --sc-border-color: var(--sc-primary-content);
3497
+ --sc-divider-opacity: 0.2;
3498
+ }
3499
+ :host([type="info"]) {
3500
+ --sc-card-bg: var(--sc-info);
3501
+ --sc-card-color: var(--sc-info-content);
3502
+ --sc-border-color: var(--sc-primary-content);
3503
+ --sc-divider-opacity: 0.2;
3504
+ }
3505
+ :host([type="success"]) {
3506
+ --sc-card-bg: var(--sc-success);
3507
+ --sc-card-color: var(--sc-success-content);
3508
+ --sc-border-color: var(--sc-primary-content);
3509
+ --sc-divider-opacity: 0.2;
3510
+ }
3511
+
3512
+ :host([type="light"]) {
3513
+ --sc-card-bg: var(--sc-base-100);
3514
+ --sc-card-color: var(--sc-base-content);
3515
+ }
3516
+
3517
+ :host([type="neutral"]) {
3518
+ --sc-card-bg: var(--sc-base-content);
3519
+ --sc-card-color: var(--sc-base);
3520
+ }
3521
+
3522
+ :host([type="invert"]) {
3523
+ --sc-card-color: var(--sc-base);
3524
+ --sc-card-bg: var(--sc-base-900);
3525
+ }
3526
+ `],Lr([a({type:String,reflect:!0})],ks.prototype,"type",2),ks=Lr([_(Lc)],ks);const _i=$`
3527
+ :host {
3528
+ --sc-color: inherit;
3529
+ color: var(--sc-color);
3530
+ }
3531
+
3532
+ :host([type="primary"]) {
3533
+ --sc-color: var(--sc-primary);
3534
+ }
3535
+ :host([type="warning"]) {
3536
+ --sc-color: var(--sc-warning);
3537
+ }
3538
+ :host([type="danger"]) {
3539
+ --sc-color: var(--sc-danger);
3540
+ }
3541
+ :host([type="info"]) {
3542
+ --sc-color: var(--sc-info);
3543
+ }
3544
+ :host([type="success"]) {
3545
+ --sc-color: var(--sc-success);
3546
+ }
3547
+
3548
+ .inherit-color {
3549
+ color: var(--sc-color);
3550
+ }
3551
+ `;$`
3552
+ :host {
3553
+ --sc-color: inherit;
3554
+ --sc-bg: inherit;
3555
+ color: var(--sc-color);
3556
+ background: var(--sc-bg);
3557
+ }
3558
+
3559
+ :host([type="primary"]) {
3560
+ --sc-color: var(--sc-primary-content);
3561
+ --sc-bg: var(--sc-primary);
3562
+ }
3563
+ :host([type="warning"]) {
3564
+ --sc-color: var(--sc-warning-content);
3565
+ --sc-bg: var(--sc-warning);
3566
+ }
3567
+ :host([type="danger"]) {
3568
+ --sc-color: var(--sc-danger-content);
3569
+ --sc-bg: var(--sc-danger);
3570
+ }
3571
+ :host([type="info"]) {
3572
+ --sc-color: var(--sc-info-content);
3573
+ --sc-bg: var(--sc-info);
3574
+ }
3575
+ :host([type="success"]) {
3576
+ --sc-color: var(--sc-success-content);
3577
+ --sc-bg: var(--sc-success);
3578
+ }
3579
+
3580
+ .inherit-bg {
3581
+ color: inherit;
3582
+ }
3583
+ `;var Ec=Object.defineProperty,Nc=Object.getOwnPropertyDescriptor,is=(r,t,s,i)=>{for(var e=i>1?void 0:i?Nc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ec(t,s,e),e};const Tc="sonic-tr";let _e=class extends Y(w){constructor(){super(...arguments),this._metadata_={}}willUpdate(r){r.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(r)}render(){return g`<slot></slot>`}};_e.styles=[_i,$`
3584
+ :host {
3585
+ display: table-row;
3586
+ }
3587
+
3588
+ :host([odd]) {
3589
+ background: var(--sc-table-accent-bg) !important;
3590
+ }
3591
+ :host([even]) {
3592
+ background: var(--sc-table-bg) !important;
3593
+ }
3594
+
3595
+ :host([last]) {
3596
+ --sc-table-td-border-b: none;
3597
+ }
3598
+ :host(:hover) {
3599
+ background: var(--sc-table-hover-bg) !important;
3600
+ }
3601
+ `],is([a({type:Object})],_e.prototype,"_metadata_",2),is([a({type:Boolean,reflect:!0})],_e.prototype,"even",2),is([a({type:Boolean,reflect:!0})],_e.prototype,"odd",2),is([a({type:Boolean,reflect:!0})],_e.prototype,"last",2),_e=is([_(Tc)],_e);var Mc=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,xe=(r,t,s,i)=>{for(var e=i>1?void 0:i?jc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Mc(t,s,e),e};const Ic="sonic-th";let Bt=class extends w{render(){const r={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return g`<th part="th" style=${ut(r)} colspan=${x(this.colSpan)} rowspan=${x(this.rowSpan)}>
3602
+ <slot></slot>
3603
+ </th> `}};Bt.styles=[_i,$`
3604
+ :host {
3605
+ display: contents;
3606
+ background: var(--sc-table-bg);
3607
+ position: sticky;
3608
+ top: 0;
3609
+ z-index: 20;
3610
+ }
3611
+
3612
+ th {
3613
+ all: inherit;
3614
+ display: table-cell;
3615
+ border-bottom: calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);
3616
+ text-transform: var(--sc-table-th-tt);
3617
+ font-weight: var(--sc-table-th-fw);
3618
+ font-size: var(--sc-table-th-fs);
3619
+ padding: var(--sc-table-th-py) var(--sc-table-th-px);
3620
+ }
3621
+
3622
+ :host([noBorder]) th {
3623
+ border-bottom: none;
3624
+ }
3625
+ `],xe([a({type:Number})],Bt.prototype,"colSpan",2),xe([a({type:Number})],Bt.prototype,"rowSpan",2),xe([a({type:String})],Bt.prototype,"align",2),xe([a({type:String})],Bt.prototype,"minWidth",2),xe([a({type:String})],Bt.prototype,"maxWidth",2),xe([a({type:String})],Bt.prototype,"width",2),Bt=xe([_(Ic)],Bt);var Fc=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,ee=(r,t,s,i)=>{for(var e=i>1?void 0:i?zc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Fc(t,s,e),e};const Rc="sonic-td";let jt=class extends w{render(){const r={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return g`<td part="td" style=${ut(r)} colspan=${x(this.colSpan)} rowspan=${x(this.rowSpan)}>
3626
+ <slot></slot>
3627
+ </td>`}};jt.styles=[_i,$`
3628
+ :host {
3629
+ display: contents;
3630
+ }
3631
+ td {
3632
+ all: inherit;
3633
+ display: table-cell;
3634
+ padding: var(--sc-table-td-py) var(--sc-table-td-px);
3635
+ border-top: var(--sc-table-td-border-t, none);
3636
+ border-bottom: var(--sc-table-td-border-b, none);
3637
+ border-right: var(--sc-table-td-border-r, none);
3638
+ border-left: var(--sc-table-td-border-l, none);
3639
+ }
3640
+ `],ee([a({type:Number})],jt.prototype,"colSpan",2),ee([a({type:Number})],jt.prototype,"rowSpan",2),ee([a({type:String})],jt.prototype,"align",2),ee([a({type:String})],jt.prototype,"vAlign",2),ee([a({type:String})],jt.prototype,"minWidth",2),ee([a({type:String})],jt.prototype,"maxWidth",2),ee([a({type:String})],jt.prototype,"width",2),jt=ee([_(Rc)],jt);var Uc=Object.defineProperty,Vc=Object.getOwnPropertyDescriptor,Bc=(r,t,s,i)=>{for(var e=i>1?void 0:i?Vc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Uc(t,s,e),e};const Hc="sonic-thead";let xi=class extends w{render(){return g`<slot></slot>`}};xi.styles=[$`
3641
+ :host {
3642
+ display: table-header-group;
3643
+ }
3644
+ `],xi=Bc([_(Hc)],xi);var qc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,Kc=(r,t,s,i)=>{for(var e=i>1?void 0:i?Wc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&qc(t,s,e),e};const Zc="sonic-tbody";let Pi=class extends w{render(){return g`<tbody part="tbody">
3645
+ <slot></slot>
3646
+ </tbody>`}};Pi.styles=[$`
3647
+ :host {
3648
+ display: table-row-group;
3649
+ }
3650
+
3651
+ ::slotted(sonic-tr:nth-child(odd)) {
3652
+ background: var(--sc-table-accent-bg);
3653
+ }
3654
+
3655
+ ::slotted(sonic-tr:hover) {
3656
+ background: var(--sc-table-hover-bg);
3657
+ }
3658
+
3659
+ ::slotted(sonic-tr:not(:last-child)) {
3660
+ border-bottom: var(--sc-form-border-width) solid var(--sc-base-200) !important;
3661
+ }
3662
+ `],Pi=Kc([_(Zc)],Pi);var Yc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,Qc=(r,t,s,i)=>{for(var e=i>1?void 0:i?Gc(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Yc(t,s,e),e};const Jc="sonic-tfoot";let $i=class extends w{render(){return g`<tfoot>
3663
+ <slot></slot>
3664
+ </tfoot>`}};$i.styles=[$`
3665
+ :host {
3666
+ display: contents;
3667
+ }
3668
+ `],$i=Qc([_(Jc)],$i);var Xc=Object.defineProperty,th=Object.getOwnPropertyDescriptor,eh=(r,t,s,i)=>{for(var e=i>1?void 0:i?th(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Xc(t,s,e),e};const sh="sonic-caption";let Ci=class extends w{render(){return g`<slot></slot>`}};Ci.styles=[$`
3669
+ :host {
3670
+ display: table-caption;
3671
+ font-size: 0.75rem;
3672
+ color: var(--sc-table-caption-color);
3673
+ padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3674
+ }
3675
+ `],Ci=eh([_(sh)],Ci);var ih=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,Ne=(r,t,s,i)=>{for(var e=i>1?void 0:i?rh(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ih(t,s,e),e};const oh="sonic-table";let se=class extends w{render(){const r={maxHeight:this.maxHeight};return g`
3676
+ <div
3677
+ class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
3678
+ style=${ut(r)}
3679
+ >
3680
+ <div class="table">
3681
+ <slot></slot>
3682
+ </div>
3683
+ </div>
3684
+ `}};se.styles=[Ye,Ot,$`
3685
+ :host {
3686
+ --sc-table-fw: var(--sc-font-weight-base);
3687
+ --sc-table-fst: var(--sc-font-style-base);
3688
+ --sc-table-fs: 1rem;
3689
+ --sc-table-border-color: var(--sc-border-color);
3690
+ --sc-table-caption-color: var(--sc-base-500);
3691
+ --sc-table-bg: var(--sc-base);
3692
+ --sc-table-accent-bg: var(--sc-base-50);
3693
+ --sc-table-hover-bg: var(--sc-base-100);
3694
+ --sc-table-th-fs: 0.85em;
3695
+ --sc-table-th-fw: bold;
3696
+ --sc-table-th-tt: uppercase;
3697
+ --sc-table-th-px: var(--sc-table-td-px);
3698
+ --sc-table-th-py: calc(1.8 * var(--sc-table-td-py));
3699
+ --sc-table-td-px: 0.5em;
3700
+ --sc-table-td-py: 0.5em;
3701
+ display: block;
3702
+ }
3703
+
3704
+ .table-container {
3705
+ overflow-x: auto;
3706
+ -webkit-overflow-scrolling: touch;
3707
+ }
3708
+
3709
+ :host([noCustomScroll]) .table-container {
3710
+ overflow: initial;
3711
+ }
3712
+
3713
+ .table {
3714
+ width: 100%;
3715
+ display: table;
3716
+ box-sizing: border-box;
3717
+ }
3718
+
3719
+ :host([bordered]) .table-container {
3720
+ border: var(--sc-border-width) solid var(--sc-table-border-color);
3721
+ border-radius: var(--sc-rounded);
3722
+ --sc-table-td-border-b: var(--sc-border-width) solid
3723
+ var(--sc-table-border-color);
3724
+ }
3725
+ `],Ne([a({type:String,reflect:!0})],se.prototype,"size",2),Ne([a({type:Boolean,reflect:!0})],se.prototype,"bordered",2),Ne([a({type:Boolean,reflect:!0})],se.prototype,"rounded",2),Ne([a({type:Boolean,reflect:!0})],se.prototype,"noCustomScroll",2),Ne([a({type:String})],se.prototype,"maxHeight",2),se=Ne([_(oh)],se);var nh=Object.defineProperty,ah=Object.getOwnPropertyDescriptor,Ls=(r,t,s,i)=>{for(var e=i>1?void 0:i?ah(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&nh(t,s,e),e};const lh="sonic-captcha";let rs=class extends Kt(w){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=r=>{r=="request_token"&&(this.formPublisher&&(this.formPublisher.captchaToken=""),this.requestToken())}}connectedCallback(){if(!document.getElementById("captcha-"+this.key)){const r=document.createElement("script");r.src="https://www.google.com/recaptcha/api.js?render="+this.key,r.id="captcha-"+this.key,document.head.appendChild(r)}if(super.connectedCallback(),this.formPublisher=tt.get(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),!document.getElementById("concorde-recaptcha-css")){const r=document.createElement("style");r.innerHTML=".grecaptcha-badge {z-index: 9999;}",r.id="concorde-recaptcha-css",document.head.appendChild(r)}this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken=""),super.disconnectedCallback()}requestToken(){var s,i;if(!this.formPublisher)return;const r=(this.action??((s=this.formPublisher.captchaAction)==null?void 0:s.get())??"submit").replace(/[^\w_/]/g,"_"),t=(((i=this.formPublisher.captchaMethod)==null?void 0:i.get())??"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready(()=>{window.grecaptcha.execute(this.key,{action:t+"//"+r}).then(e=>{this.formPublisher&&(this.formPublisher.captchaToken=e)})})}render(){return g` <slot></slot> `}};Ls([a()],rs.prototype,"key",2),Ls([a()],rs.prototype,"action",2),Ls([a({type:Number})],rs.prototype,"zIndex",2),rs=Ls([_(lh)],rs),window.queueMicrotask=window.queueMicrotask||function(r){Promise.resolve().then(r).catch(t=>setTimeout(()=>{throw t}))};function ch(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function hh(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Er(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onConnected__=ch,r.__onDisconnected__=hh;const t=r.connectedCallback;r.connectedCallback=function(){t.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const s=r.disconnectedCallback;r.disconnectedCallback=function(){s.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function dh(r){const t=r.split(".");if(t.length==0)return function(){};const s=t.shift()||"";let i=N.get(s);return i=Ke.traverse(i,t),function(e,o){if(!e)return;let n;Er(e),e.__onConnected__(l=>{n=c=>{l[o]=c},i.onAssign(n)}),e.__onDisconnected__(()=>{i.offAssign(n)})}}function ph(...r){const t=[],s=[];for(let i=0;i<r.length;i++){const o=r[i].split(".");if(o.length==0)continue;const n=o.shift()||"";let l=N.get(n);l=Ke.traverse(l,o);const c=new Set,h=d=>{t[i]=d,t.filter(f=>f!==null).length==r.length&&c.forEach(f=>f(...t))};s.push({publisher:l,onAssign:h,callbacks:c})}return function(i,e,o){Er(i);let n;i.__onConnected__(l=>{for(const c of s)n=o.value.bind(l),c.callbacks.add(n),c.publisher.onAssign(c.onAssign)}),i.__onDisconnected__(()=>{for(const l of s)l.callbacks.delete(n),l.publisher.offAssign(l.onAssign)})}}window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:dh,onAssing:ph},window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:Qi,dataProvider:uo,sub:ho,subscribe:co,get:po,set:fo};const uh=T,fh=U;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:uh,SonicModal:fh};const gh=window;gh.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))});