@supersoniks/concorde 4.7.3 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/README.md +1 -1
  2. package/ai/AGENTS.md +4 -0
  3. package/ai/cursor/rules/concorde.mdc +11 -1
  4. package/ai/jetbrains/rules/concorde.md +8 -0
  5. package/ai/skills/concorde/SKILL.md +29 -2
  6. package/ai/skills/concorde-scope/SKILL.md +2 -2
  7. package/build-infos.json +1 -1
  8. package/concorde-core.bundle.js +289 -289
  9. package/concorde-core.es.js +4839 -4546
  10. package/dist/concorde-core.bundle.js +289 -289
  11. package/dist/concorde-core.es.js +4839 -4546
  12. package/dist/docs-mock-api-sw.js +19 -0
  13. package/dist/docs-mock-api-sw.js.map +2 -2
  14. package/dist/robots.txt +2 -0
  15. package/docs/assets/index-wyNMyWT9.js +11196 -0
  16. package/docs/docs-mock-api-sw.js +19 -0
  17. package/docs/docs-mock-api-sw.js.map +2 -2
  18. package/docs/index.html +1 -1
  19. package/docs/robots.txt +2 -0
  20. package/package.json +9 -1
  21. package/public/docs-mock-api-sw.js +19 -0
  22. package/public/docs-mock-api-sw.js.map +2 -2
  23. package/public/robots.txt +2 -0
  24. package/src/core/components/functional/example/example.ts +3 -3
  25. package/src/core/components/ui/captcha/captcha.md +0 -12
  26. package/src/core/components/ui/icon/icon.ts +17 -2
  27. package/src/core/components/ui/menu/menu.ts +12 -3
  28. package/src/core/decorators/api.post.spec.ts +293 -0
  29. package/src/core/decorators/api.spec.ts +7 -14
  30. package/src/core/decorators/api.ts +648 -15
  31. package/src/core/decorators/subscriber/bind.ts +13 -5
  32. package/src/core/decorators/subscriber/dynamicPath.spec.ts +53 -0
  33. package/src/core/decorators/subscriber/dynamicPath.ts +23 -1
  34. package/src/core/decorators/subscriber/handle.ts +3 -1
  35. package/src/core/decorators/subscriber/onAssign.ts +10 -2
  36. package/src/core/decorators/subscriber/publish.ts +12 -2
  37. package/src/core/utils/PublisherProxy.ts +95 -11
  38. package/src/core/utils/api.ts +72 -3
  39. package/src/core/utils/dpOptions.spec.ts +56 -0
  40. package/src/core/utils/endpoint.ts +3 -3
  41. package/src/decorators.ts +17 -1
  42. package/src/docs/_core-concept/dataFlow.md +9 -3
  43. package/src/docs/_decorators/bind.md +2 -2
  44. package/src/docs/_decorators/get.md +13 -4
  45. package/src/docs/_decorators/handle.md +5 -1
  46. package/src/docs/_decorators/on-assign.md +2 -0
  47. package/src/docs/_decorators/patch.md +45 -0
  48. package/src/docs/_decorators/post.md +93 -0
  49. package/src/docs/_decorators/publish.md +1 -1
  50. package/src/docs/_decorators/put.md +43 -0
  51. package/src/docs/_decorators/subscribe.md +4 -1
  52. package/src/docs/_directives/sub.md +1 -1
  53. package/src/docs/_getting-started/my-first-component.md +1 -1
  54. package/src/docs/_misc/api-configuration.md +3 -1
  55. package/src/docs/_misc/dataProviderKey.md +2 -2
  56. package/src/docs/_misc/dynamic-path.md +71 -0
  57. package/src/docs/_misc/endpoint.md +5 -3
  58. package/src/docs/components/docs-demo-sources.ts +102 -3
  59. package/src/docs/components/docs-lit-demo-raw.ts +2 -26
  60. package/src/docs/components/docs-lit-demo.ts +9 -42
  61. package/src/docs/components/docs-source-excerpt.ts +53 -0
  62. package/src/docs/components/docs-source-link.ts +24 -8
  63. package/src/docs/components/docs-source-raw.ts +34 -0
  64. package/src/docs/example/decorators-demo-geo.ts +2 -2
  65. package/src/docs/example/decorators-demo-post.ts +249 -0
  66. package/src/docs/example/decorators-demo-subscribe-publish-get-demos.ts +5 -5
  67. package/src/docs/example/decorators-demo.ts +1 -0
  68. package/src/docs/example/docs-api-config-demos.ts +5 -5
  69. package/src/docs/mock-api/router.ts +20 -0
  70. package/src/docs/navigation/navigation.ts +16 -0
  71. package/src/docs/search/docs-search.json +540 -15
  72. package/src/tsconfig.json +24 -0
  73. package/src/tsconfig.tsbuildinfo +1 -1
  74. package/vite.config.mts +1 -1
  75. package/docs/assets/index-D9pxaQYK.js +0 -7508
  76. package/docs/src/core/components/functional/date/date.md +0 -290
  77. package/docs/src/core/components/functional/fetch/fetch.md +0 -125
  78. package/docs/src/core/components/functional/if/if.md +0 -9
  79. package/docs/src/core/components/functional/list/list.md +0 -65
  80. package/docs/src/core/components/functional/mix/mix.md +0 -41
  81. package/docs/src/core/components/functional/queue/queue.md +0 -72
  82. package/docs/src/core/components/functional/router/router.md +0 -94
  83. package/docs/src/core/components/functional/sdui/default-library.json +0 -108
  84. package/docs/src/core/components/functional/sdui/example.json +0 -99
  85. package/docs/src/core/components/functional/sdui/sdui.md +0 -356
  86. package/docs/src/core/components/functional/states/states.md +0 -87
  87. package/docs/src/core/components/functional/submit/submit.md +0 -114
  88. package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
  89. package/docs/src/core/components/functional/value/value.md +0 -35
  90. package/docs/src/core/components/ui/alert/alert.md +0 -121
  91. package/docs/src/core/components/ui/alert-messages/alert-messages.md +0 -0
  92. package/docs/src/core/components/ui/badge/badge.md +0 -127
  93. package/docs/src/core/components/ui/button/button.md +0 -182
  94. package/docs/src/core/components/ui/captcha/captcha.md +0 -24
  95. package/docs/src/core/components/ui/card/card.md +0 -97
  96. package/docs/src/core/components/ui/divider/divider.md +0 -35
  97. package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -77
  98. package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
  99. package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
  100. package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -44
  101. package/docs/src/core/components/ui/form/input/input.md +0 -142
  102. package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -133
  103. package/docs/src/core/components/ui/form/radio/radio.md +0 -57
  104. package/docs/src/core/components/ui/form/select/select.md +0 -71
  105. package/docs/src/core/components/ui/form/switch/switch.md +0 -57
  106. package/docs/src/core/components/ui/form/textarea/textarea.md +0 -65
  107. package/docs/src/core/components/ui/group/group.md +0 -75
  108. package/docs/src/core/components/ui/icon/icon.md +0 -125
  109. package/docs/src/core/components/ui/icon/icons.json +0 -1
  110. package/docs/src/core/components/ui/image/image.md +0 -107
  111. package/docs/src/core/components/ui/link/link.md +0 -43
  112. package/docs/src/core/components/ui/loader/loader.md +0 -55
  113. package/docs/src/core/components/ui/menu/menu.md +0 -329
  114. package/docs/src/core/components/ui/modal/modal.md +0 -119
  115. package/docs/src/core/components/ui/pop/pop.md +0 -96
  116. package/docs/src/core/components/ui/progress/progress.md +0 -63
  117. package/docs/src/core/components/ui/table/table.md +0 -455
  118. package/docs/src/core/components/ui/toast/toast.md +0 -166
  119. package/docs/src/core/components/ui/tooltip/tooltip.md +0 -82
  120. package/docs/src/docs/_core-concept/dataFlow.md +0 -73
  121. package/docs/src/docs/_core-concept/overview.md +0 -57
  122. package/docs/src/docs/_core-concept/subscriber.md +0 -75
  123. package/docs/src/docs/_decorators/ancestor-attribute.md +0 -79
  124. package/docs/src/docs/_decorators/auto-subscribe.md +0 -202
  125. package/docs/src/docs/_decorators/bind.md +0 -167
  126. package/docs/src/docs/_decorators/get.md +0 -68
  127. package/docs/src/docs/_decorators/handle.md +0 -171
  128. package/docs/src/docs/_decorators/on-assign.md +0 -388
  129. package/docs/src/docs/_decorators/publish.md +0 -55
  130. package/docs/src/docs/_decorators/subscribe.md +0 -97
  131. package/docs/src/docs/_decorators/wait-for-ancestors.md +0 -163
  132. package/docs/src/docs/_directives/sub.md +0 -91
  133. package/docs/src/docs/_getting-started/ai-agents.md +0 -56
  134. package/docs/src/docs/_getting-started/concorde-manual-install.md +0 -133
  135. package/docs/src/docs/_getting-started/concorde-outside.md +0 -33
  136. package/docs/src/docs/_getting-started/create-a-component.md +0 -139
  137. package/docs/src/docs/_getting-started/my-first-component.md +0 -236
  138. package/docs/src/docs/_getting-started/my-first-subscriber.md +0 -120
  139. package/docs/src/docs/_getting-started/pubsub.md +0 -37
  140. package/docs/src/docs/_getting-started/start.md +0 -47
  141. package/docs/src/docs/_getting-started/theming.md +0 -91
  142. package/docs/src/docs/_misc/api-configuration.md +0 -79
  143. package/docs/src/docs/_misc/dataProviderKey.md +0 -168
  144. package/docs/src/docs/_misc/docs-mock-api.md +0 -60
  145. package/docs/src/docs/_misc/endpoint.md +0 -43
  146. package/docs/src/docs/_misc/html-integration.md +0 -13
  147. package/docs/src/docs/search/docs-search.json +0 -8532
  148. package/docs/src/tag-list.json +0 -1
  149. package/docs/src/tsconfig-model.json +0 -23
  150. package/docs/src/tsconfig.json +0 -1050
  151. package/php/get-challenge.php +0 -34
  152. package/php/some-service.php +0 -42
@@ -1,79 +1,79 @@
1
- (function(q){typeof define=="function"&&define.amd?define(q):q()})((function(){"use strict";var N,Z;let q=class St{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,i)=>{const s=i.indexOf("=");return t[i.substring(0,s).trim()]=i.substring(s+1),t},{})}static everyAncestors(t,i){for(;t;){if(!i(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const i=t;if(i.nodeType===1){const s=window.getComputedStyle(i);if(s?.overflowY==="auto"||s?.overflowY==="scroll"||s?.overflowY==="hidden"||s?.overflowX==="auto"||s?.overflowX==="scroll"||s?.overflowX==="hidden")return t}t=t.parentNode||t.host}return null}static scopeAttributeNames(t){const i=t.toLowerCase();return i===t?[t]:[t,i]}static readScopeValueOnElement(t,i){const s=t[i];if(typeof s=="string"&&s.length>0)return s;for(const e of St.scopeAttributeNames(i))if(t.hasAttribute(e)){const o=t.getAttribute(e);if(o!=null&&o.length>0)return o}return null}static getAncestorAttributeValue(t,i){if(!t)return null;let s=t;for(;s;){if(s instanceof HTMLElement){const o=St.readScopeValueOnElement(s,i);if(o!=null&&o.length>0)return o}const e=s.parentNode||s.host;if(!e)break;s=e}return null}static getApiConfiguration(t){const i=St.getAncestorAttributeValue(t,"token"),s=St.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=St.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=St.getAncestorAttributeValue(t,"tokenProvider"),c=St.getAncestorAttributeValue(t,"eventsApiToken");i||(o=St.getAncestorAttributeValue(t,"userName"),n=St.getAncestorAttributeValue(t,"password"));const h=St.getAncestorAttributeValue(t,"credentials")||void 0,u=t.getAttribute("cache"),d=t.hasAttribute("blockUntilDone"),m=t.hasAttribute("keepAlive");return{serviceURL:e,token:i,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:s,credentials:h,cache:u,blockUntilDone:d,keepAlive:m}}static getClosestElement(t,i){for(;!(t.nodeName&&t.nodeName.toLowerCase()===i)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return St.getClosestElement(t,"form")}static getAncestorsByTagNames(t,i){const s=new Set(i.map(n=>n.toLowerCase())),e=[];let o=t.parentNode||t.host;for(;o;)o instanceof Element&&s.has(o.tagName.toLowerCase())&&e.push(o),o=o.parentNode||o.host;return e}static getAncestorsBySelectors(t,i){const s=[];let e=t.parentNode||t.host;for(;e;){if(e instanceof Element)for(const o of i)try{if(e.matches(o)){s.push(e);break}}catch{}e=e.parentNode||e.host}return s}static async loadJS(t){return new Promise(async s=>{const e=document.createElement("script");e.src=t,e.onload=()=>s(!0),e.onerror=()=>s(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async s=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>s(!0),e.onerror=()=>s(!0),document.head.appendChild(e)})}};const Qs=r=>{const t=document.documentElement,i=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),s={attributes:!0,attributeFilter:["lang"]};i.observe(t,s)};let ys=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,i="",s="long"){i||(i=q.getLanguage());const e=(h,u)=>[Math.floor(h/u),h%u];function o(h,u,d){return new Intl.NumberFormat(h,{style:"unit",unit:u,unitDisplay:d}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(i,"hour",s)(n)),l&&c.push(o(i,"minute",s)(l)),new Intl.ListFormat(i,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};class Gi{constructor(t){this.path=t}toString(){return this.path}}function Xi(r){return new Proxy(r,{get(t,i){if(i==="path")return t.path;if(i==="toString")return t.toString.bind(t);if(i===Symbol.toStringTag)return"DataProviderKey";if(typeof i=="symbol")return t[i];const s=t.path?`${t.path}.${String(i)}`:String(i);return Xi(new Gi(s))}})}const vo=/\$\{|\{\$/;function yo(r){return vo.test(r)}function Js(r){const t=typeof r=="string"?r:r.path;if(yo(t))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return t}const Ue=function(r){return this instanceof Ue?Xi(new Gi(r)):new Ue(r)};let tt=class qt{static shallowEqual(t,i,s=!0){const e=Object.keys(t),o=Object.keys(i);if(e.length!==o.length&&s)return!1;for(const n of e){const l=t[n],c=i[n];if(s?l!==c:l!=c)return!1}return!0}static deepEqual(t,i,s=!0){const e=Object.keys(t),o=Object.keys(i);if(e.length!==o.length&&s)return!1;for(const n of e){const l=t[n],c=i[n],h=qt.isObject(l)&&qt.isObject(c),u=s?l!==c:l!=c;if(h&&!qt.deepEqual(l,c)||!h&&u)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return qt.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,i,s=!1){for(const e of i){const o=t[e];if(o===void 0)return;s&&qt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,i,s=!1){return qt.traverse(t,i.split("."),s)}static getURLSearchArray(t,i=""){let s=[];for(let e in t){const o=t[e];i&&(e=i+"["+e+"]"),qt.isObject(o)?s=[...s,...this.getURLSearchArray(o,e)]:s.push(`${e}=${o}`)}return s}static getURLSearchString(t){return qt.getURLSearchArray(t,"").join("&")}};const ut=tt.traverseDotNotation;let _o=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(i=>{setTimeout(i,t)})}},Qi="sonic";typeof __SONIC_PREFIX__<"u"&&(Qi=__SONIC_PREFIX__);let Ji=Qi.replace(/-([a-z])/g,r=>r[1].toUpperCase());const _s=Ji.charAt(0).toUpperCase()+Ji.slice(1);function ws(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Wt(r){return typeof r=="object"&&r!==null}let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic");const ti=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data",oe=class oe{constructor(t,i,s){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!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=i||null,this._parentKey_=s,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const t in this._proxies_.keys())t!="_parent_"&&this._proxies_.get(t)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),oe.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(i=>i()),this._is_savable_&&!k.changed){k.changed=!0,k.saveId++;const i=k.saveId;setTimeout(()=>k.getInstance().saveToLocalStorage(i),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const s=this.get();this._assignListeners_.forEach(e=>{e(s)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,i){this._fillListeners_.forEach(s=>{s[t]!==i&&(s[t]=i)}),this._publishTemplateFilling_(t,i)}_publishTemplateFilling_(t,i){this._templateFillListeners_.forEach(s=>{const e=Object.getOwnPropertyDescriptor(s,t);e&&!e.set&&!e.writable||(s.propertyMap&&s.propertyMap[t]&&(t=s.propertyMap[t]),typeof s[t]<"u"&&s[t]!==i&&(s[t]=i))})}onAssign(t,i=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),i&&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 i in this._value_){let s=i;const e=this._value_[i];t.propertyMap&&t.propertyMap[i]&&(s=t.propertyMap[i]),typeof t[i]<"u"&&t[i]!==e&&(t[s]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const i in this._value_){const s=this._value_[i];t[i]!==s&&(t[i]=s)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,i=!1){if(this._value_===t||Wt(this._value_)&&Wt(t)&&t&&ws(this._value_)&&ws(t)&&this._value_.__value===t.__value||!Wt(t)&&t===this._value_.__value)return!0;this._value_=Wt(t)?t:{__value:t},this._cachedGet_=void 0;const s=ws(this._value_);if(this._parentKey_&&this.parent){const e=ws(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:e});else{const o=[];o[Number(this._parentKey_)]=e,this.parent.set(o)}else this.parent._value_[this._parentKey_]=e}if(s)return this._proxies_.forEach((e,o)=>{o!="_parent_"&&(e.set(null),this._publishDynamicFilling_(o,null))}),this._publishAssignement_(i),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const e in this._value_)this._value_[e]===void 0&&delete this._value_[e];if(this._proxies_.forEach((e,o)=>{const n=this._value_[o];o!="_parent_"&&n===void 0&&n!==null&&isNaN(Number(o))&&(e.set(null),this._publishDynamicFilling_(o,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Wt(this._value_))for(const e in this._value_){const o=t[e],l=Wt(o)?o:{__value:o};if(!this._proxies_.has(e)){this._publishDynamicFilling_(e,o);continue}this._proxies_.get(e)?.set(l,!0),this._publishDynamicFilling_(e,o)}return!0}get(){if(k.modifiedCollectore.length>0&&k.modifiedCollectore[0].add(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(oe.instancesCounter++,this._instanceCounter_=oe.instancesCounter),oe.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}};oe.instances=new Map,oe.instancesCounter=0;let Ve=oe;const I=class I{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],I.instance!=null)throw"Singleton / use getInstance";I.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let s=localStorage.getItem(ti),e=null;if(s&&(e=await this.decompress(s,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else s=await this.compress("{}","gzip"),localStorage.setItem(ti,s),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const l=this.localStorageData[n],c=new Date().getTime()-(l.expirationDelayMs||o);l.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const i=I.instances.get(t);return i||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new I)}return I.instance==null?new I:I.instance}static registerInstance(t,i){I.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),I.instances.set(t,i)}static get(t,i){return I.getInstance().get(t,i)}static collectModifiedPublisher(){I.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return I.modifiedCollectore.shift()}static delete(t){return t?I.getInstance().delete(t):!1}async setLocalData(t,i){await this.isLocalStrorageReady,t.set(this.localStorageData[i+"¤lang_"+q.getLanguage()]?.data||t.get())}get(t,i){const s=i?.localStorageMode==="enabled",e=i?.invalidateOnPageShow===!0;if(!this.publishers.has(t)){const l=ei({});this.set(t,l)}const o=this.publishers.get(t);return s&&this.initialisedData.indexOf(t)===-1&&(i?.expirationDelayMs&&(o._expiration_delay_=i.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,i){this.publishers.set(t,i)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==I.saveId&&t%10!=0))try{if(!I.changed||I.saving)return;I.saving=!0,I.changed=!1;const i=Array.from(this.publishers.keys());let s=!1;for(const e of i){const o=this.publishers.get(e);if(!o?._is_savable_)continue;const n=o?.get();n&&(this.localStorageData[e+"¤lang_"+q.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},s=!0)}if(s){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ti,e)}if(I.saving=!1,I.changed){I.saveId++;const e=I.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{I.saving=!1}}async compress(t,i){const s=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(i),n=o.writable.getWriter();n.write(s),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let u=0;u<c.length;u++)h+=String.fromCharCode(c[u]);return btoa(h)}async decompress(t,i){const s=atob(t),o=Uint8Array.from(s,u=>u.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(i),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}};I.buildDate="Wed Jun 03 2026 19:26:21 GMT+0200 (Central European Summer Time)",I.changed=!1,I.saving=!1,I.saveId=0,I.instance=null,I.instances=new Map,I.modifiedCollectore=[];let k=I;if(typeof window<"u"){const r=window;r[_s+"PublisherManager"]=r[_s+"PublisherManager"]||k}const wo=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_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function xo(r,t){return{get:function(i,s){if(typeof s=="string"&&wo.has(s))return r[s];if(s==Symbol.toPrimitive)return()=>t().get();if(!r._proxies_.has(s)){const e=r._value_[s],o=ei(Wt(e)?e:{__value:e},r,s);o._proxies_.set("_parent_",t()),r._proxies_.set(s,o)}return r._proxies_.get(s)},set:function(i,s,e){if(s=="_value_")return r._value_=e,!0;if(s=="_cachedGet_")return r._cachedGet_=e,!0;if(s=="_assignmentId_")return r._assignmentId_=e,!0;if(s=="_is_savable_")return r._is_savable_=e,!0;if(s=="_expiration_delay_")return r._expiration_delay_=e,!0;if(s=="_invalidate_on_page_show_")return r._invalidate_on_page_show_=e,!0;if(s=="_instanceCounter_")return r._instanceCounter_=e,!0;if(!r._proxies_.has(s)){const n=ei({},r,s);n._proxies_.set("_parent_",t()),r._proxies_.set(s,n)}return r._value_[s]!==e&&(r._value_[s]=e,r._publishDynamicFilling_(s,e),r._proxies_.get(s)?.set(Wt(e)?e:{__value:e})),!0},deleteProperty:function(i,s){return r._publishDynamicFilling_(s,null),r._proxies_.get(s)?.set(null),delete r._value_[s]},has:function(i,s){return s in r._value_&&s!="_lockInternalMutationPublishing_"},defineProperty:function(i,s,e){return e&&"value"in e&&(r._value_[s]=e.value),!0},getOwnPropertyDescriptor:function(i,s){return{enumerable:!0,configurable:!0}},ownKeys:function(i){return r._value_.__value?Object.keys(r._value_.__value):Object.keys(r._value_)}}}function ei(r,t=null,i){const s=new Ve(r,t,i);let e=null;const o=xo(s,()=>e);return e=new Proxy(s,o),e}class Po extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ve.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Ce+"-publisher-proxy",Po)}catch{}const xs=r=>{if(typeof r=="function"){const t=r;return k.collectModifiedPublisher(),t(),k.getModifiedPublishers()}if(typeof r=="string"){const t=r.split("."),i=t.shift()||"";let s=k.get(i);s=tt.traverse(s,t);const e=new Set;return e.add(s),e}return new Set([r])};function Co(r){const t=Js(r);return xs(t).values().next().value?.get()}function tr(r,t){const i=Js(r);return xs(i).values().next().value}function $o(r,t){return tr(r)}function Ps(r,t){return tr(r)}function So(r,t){const i=Js(r);xs(i).values().next().value?.set(t)}window.addEventListener("pageshow",r=>{r.persisted&&k.getInstance().invalidateAll()});let Cs=(N=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(N.observedElements.keys()).forEach(t=>N.unObserve(t)))}static observe(t){if(!t||!N.enabled||N.observedElements.has(t))return;const i=new MutationObserver(N.onMutation),s={};s.childList=!0,s.subtree=!0,s.attributes=!0,s.attributeFilter=["data-bind"],i.observe(t,s),t.querySelectorAll("[data-bind]").forEach(e=>N.addPublisherListeners(e)),N.observedElements.set(t,i)}static unObserve(t){if(!t)return;const i=this.observedElements.get(t);i&&(i.disconnect(),t.querySelectorAll("[data-bind]").forEach(s=>N.removePublisherListeners(s)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&N.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(i=>N.addPublisherListeners(i)):t.childNodes.forEach(i=>N.onAdded(i))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&N.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(i=>N.removePublisherListeners(i)):t.childNodes.forEach(i=>N.onRemoved(i))}static onMutation(t){for(const i of t)switch(i.type){case"attributes":N.addPublisherListeners(i.target);break;case"childList":i.addedNodes.forEach(s=>{N.onAdded(s)}),i.removedNodes.forEach(s=>{N.onRemoved(s)});break}}static removePublisherListeners(t){const i=N.publisherListeners.get(t);i&&(N.publisherListeners.delete(t),i.forEach(s=>{s.publisher?.offAssign(s.onAssign)}))}static getVariablesDescriptor(t){let i=t.match(/(\$(?:\w+\\?\.?)+)/g);return i?i=i.map(s=>s.replace("$","")):i=[t],i=i.filter(s=>s.length>0),{expression:t.replace("\\",""),variables:i.map(s=>s.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(i=>i.name.indexOf("::")==0).map(i=>({propertyToUpdate:i.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:N.getVariablesDescriptor(i.value)})):[]}static getSubPublisher(t,i){if(!i)return t;for(const s of i)if(s!="_self_"){if(!t)return null;t=t[s]}return t}static addPublisherListeners(t){N.removePublisherListeners(t);const i=q.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!i)return;const s=k.getInstance().get(i),e=N.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const u=h;let d=s;d=N.getSubPublisher(s,u);const m=t,y={publisher:d,onAssign:()=>{const p=l.variables.map(D=>N.getSubPublisher(s,D)?.get());let v=l.expression,_=!1;if(p.length==1&&l.variables[0].join(".")==v.substring(1)){let D=p[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<p.length;D++){let f=p[D];const b=l.variables[D];f===null&&(_=!0,f=void 0),v=v.replace("$"+b.join("."),f)}if(v.indexOf("|")!=-1){const D=v.indexOf("|");if(D==0)v=ys.js(v.substring(1));else{const f=v.substring(0,D),b=v.substring(D+1),w=ys[f];v=_?"":w?w(b):v}}else v=_?"":v;m[c]=v}};d?.onAssign(y.onAssign),o.push(y)}}),N.publisherListeners.set(t,o)}},N.observedElements=new Map,N.enabled=!0,N.publisherListeners=new Map,N);Cs.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Cs);/**
1
+ (function(Y){typeof define=="function"&&define.amd?define(Y):Y()})((function(){"use strict";var F,Q;let Y=class Lt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,r)=>{const i=r.indexOf("=");return t[r.substring(0,i).trim()]=r.substring(i+1),t},{})}static everyAncestors(t,r){for(;t;){if(!r(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const r=t;if(r.nodeType===1){const i=window.getComputedStyle(r);if(i?.overflowY==="auto"||i?.overflowY==="scroll"||i?.overflowY==="hidden"||i?.overflowX==="auto"||i?.overflowX==="scroll"||i?.overflowX==="hidden")return t}t=t.parentNode||t.host}return null}static scopeAttributeNames(t){const r=t.toLowerCase();return r===t?[t]:[t,r]}static readScopeValueOnElement(t,r){const i=t[r];if(typeof i=="string"&&i.length>0)return i;for(const e of Lt.scopeAttributeNames(r))if(t.hasAttribute(e)){const o=t.getAttribute(e);if(o!=null&&o.length>0)return o}return null}static getAncestorAttributeValue(t,r){if(!t)return null;let i=t;for(;i;){if(i instanceof HTMLElement){const o=Lt.readScopeValueOnElement(i,r);if(o!=null&&o.length>0)return o}const e=i.parentNode||i.host;if(!e)break;i=e}return null}static getApiConfiguration(t){const r=Lt.getAncestorAttributeValue(t,"token"),i=Lt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Lt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Lt.getAncestorAttributeValue(t,"tokenProvider"),c=Lt.getAncestorAttributeValue(t,"eventsApiToken");r||(o=Lt.getAncestorAttributeValue(t,"userName"),n=Lt.getAncestorAttributeValue(t,"password"));const h=Lt.getAncestorAttributeValue(t,"credentials")||void 0,p=t.getAttribute("cache"),d=t.hasAttribute("blockUntilDone"),f=t.hasAttribute("keepAlive");return{serviceURL:e,token:r,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:p,blockUntilDone:d,keepAlive:f}}static getClosestElement(t,r){for(;!(t.nodeName&&t.nodeName.toLowerCase()===r)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Lt.getClosestElement(t,"form")}static getAncestorsByTagNames(t,r){const i=new Set(r.map(n=>n.toLowerCase())),e=[];let o=t.parentNode||t.host;for(;o;)o instanceof Element&&i.has(o.tagName.toLowerCase())&&e.push(o),o=o.parentNode||o.host;return e}static getAncestorsBySelectors(t,r){const i=[];let e=t.parentNode||t.host;for(;e;){if(e instanceof Element)for(const o of r)try{if(e.matches(o)){i.push(e);break}}catch{}e=e.parentNode||e.host}return i}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)})}};const hi=s=>{const t=document.documentElement,r=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&s()}),i={attributes:!0,attributeFilter:["lang"]};r.observe(t,i)};let Ds=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,r="",i="long"){r||(r=Y.getLanguage());const e=(h,p)=>[Math.floor(h/p),h%p];function o(h,p,d){return new Intl.NumberFormat(h,{style:"unit",unit:p,unitDisplay:d}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(r,"hour",i)(n)),l&&c.push(o(r,"minute",i)(l)),new Intl.ListFormat(r,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};class br{constructor(t){this.path=t}toString(){return this.path}}function gr(s){return new Proxy(s,{get(t,r){if(r==="path")return t.path;if(r==="toString")return t.toString.bind(t);if(r===Symbol.toStringTag)return"DataProviderKey";if(typeof r=="symbol")return t[r];const i=t.path?`${t.path}.${String(r)}`:String(r);return gr(new br(i))}})}const Wo=/\$\{|\{\$/;function Ko(s){return Wo.test(s)}function di(s){const t=typeof s=="string"?s:s.path;if(Ko(t))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return t}const Qe=function(s){return this instanceof Qe?gr(new br(s)):new Qe(s)};let rt=class ee{static shallowEqual(t,r,i=!0){const e=Object.keys(t),o=Object.keys(r);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=r[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,r,i=!0){const e=Object.keys(t),o=Object.keys(r);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=r[n],h=ee.isObject(l)&&ee.isObject(c),p=i?l!==c:l!=c;if(h&&!ee.deepEqual(l,c)||!h&&p)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return ee.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,r,i=!1){for(const e of r){const o=t[e];if(o===void 0)return;i&&ee.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,r,i=!1){return ee.traverse(t,r.split("."),i)}static getURLSearchArray(t,r=""){let i=[];for(let e in t){const o=t[e];r&&(e=r+"["+e+"]"),ee.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return ee.getURLSearchArray(t,"").join("&")}};const bt=rt.traverseDotNotation;let Yo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(r=>{setTimeout(r,t)})}},mr="sonic";typeof __SONIC_PREFIX__<"u"&&(mr=__SONIC_PREFIX__);let vr=mr.replace(/-([a-z])/g,s=>s[1].toUpperCase());const Os=vr.charAt(0).toUpperCase()+vr.slice(1),Go=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function yr(s){return s==null||typeof s!="object"||Array.isArray(s)?!1:Object.keys(s).some(t=>Go.has(t))}function Es(s){return Object.prototype.hasOwnProperty.call(s,"__value")}function se(s){return typeof s=="object"&&s!==null}let Fe="sonic";typeof __SONIC_PREFIX__>"u"&&(Fe="sonic");const ui=Fe=="sonic"?"publisher-proxies-data":Fe+"-publisher-proxies-data",ve=class ve{constructor(t,r,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!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=r||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const t in this._proxies_.keys())t!="_parent_"&&this._proxies_.get(t)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),ve.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(r=>r()),this._is_savable_&&!O.changed){O.changed=!0,O.saveId++;const r=O.saveId;setTimeout(()=>O.getInstance().saveToLocalStorage(r),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==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,r){this._fillListeners_.forEach(i=>{i[t]!==r&&(i[t]=r)}),this._publishTemplateFilling_(t,r)}_publishTemplateFilling_(t,r){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]!==r&&(i[t]=r))})}onAssign(t,r=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),r&&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 r in this._value_){let i=r;const e=this._value_[r];t.propertyMap&&t.propertyMap[r]&&(i=t.propertyMap[r]),typeof t[r]<"u"&&t[r]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const r in this._value_){const i=this._value_[r];t[r]!==i&&(t[r]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,r=!1){if(this._value_===t||se(this._value_)&&se(t)&&t&&Es(this._value_)&&Es(t)&&this._value_.__value===t.__value||!se(t)&&t===this._value_.__value)return!0;this._value_=se(t)?t:{__value:t},this._cachedGet_=void 0;const i=Es(this._value_);if(this._parentKey_&&this.parent){const e=Es(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:e});else{const o=[];o[Number(this._parentKey_)]=e,this.parent.set(o)}else this.parent._value_[this._parentKey_]=e}if(i)return this._proxies_.forEach((e,o)=>{o!="_parent_"&&(e.set(null),this._publishDynamicFilling_(o,null))}),this._publishAssignement_(r),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const e in this._value_)this._value_[e]===void 0&&delete this._value_[e];if(this._proxies_.forEach((e,o)=>{const n=this._value_[o];o!="_parent_"&&n===void 0&&n!==null&&isNaN(Number(o))&&(e.set(null),this._publishDynamicFilling_(o,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),se(this._value_))for(const e in this._value_){const o=t[e],l=se(o)?o:{__value:o};if(!this._proxies_.has(e)){this._publishDynamicFilling_(e,o);continue}this._proxies_.get(e)?.set(l,!0),this._publishDynamicFilling_(e,o)}return!0}get(){if(O.modifiedCollectore.length>0&&O.modifiedCollectore[0].add(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(ve.instancesCounter++,this._instanceCounter_=ve.instancesCounter),ve.instances.set(this._instanceCounter_,this),"<"+Fe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Fe+"-publisher-proxy>"}};ve.instances=new Map,ve.instancesCounter=0;let Je=ve;const j=class j{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],j.instance!=null)throw"Singleton / use getInstance";j.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ui),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(ui,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const l=this.localStorageData[n],c=new Date().getTime()-(l.expirationDelayMs||o);l.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const r=j.instances.get(t);return r||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new j)}return j.instance==null?new j:j.instance}static registerInstance(t,r){j.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),j.instances.set(t,r)}static get(t,r){return j.getInstance().get(t,r)}static collectModifiedPublisher(){j.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return j.modifiedCollectore.shift()}static delete(t){return t?j.getInstance().delete(t):!1}async setLocalData(t,r){await this.isLocalStrorageReady,t.set(this.localStorageData[r+"¤lang_"+Y.getLanguage()]?.data||t.get())}get(t,r){const i=r?.localStorageMode==="enabled",e=r?.invalidateOnPageShow===!0;if(!this.publishers.has(t)){const l=pi({});this.set(t,l)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(r?.expirationDelayMs&&(o._expiration_delay_=r.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,r){this.publishers.set(t,r)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==j.saveId&&t%10!=0))try{if(!j.changed||j.saving)return;j.saving=!0,j.changed=!1;const r=Array.from(this.publishers.keys());let i=!1;for(const e of r){const o=this.publishers.get(e);if(!o?._is_savable_)continue;const n=o?.get();n&&(this.localStorageData[e+"¤lang_"+Y.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ui,e)}if(j.saving=!1,j.changed){j.saveId++;const e=j.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{j.saving=!1}}async compress(t,r){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(r),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 p=0;p<c.length;p++)h+=String.fromCharCode(c[p]);return btoa(h)}async decompress(t,r){const i=atob(t),o=Uint8Array.from(i,p=>p.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(r),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}};j.buildDate="Thu Jun 11 2026 08:54:04 GMT+0200 (Central European Summer Time)",j.changed=!1,j.saving=!1,j.saveId=0,j.instance=null,j.instances=new Map,j.modifiedCollectore=[];let O=j;if(typeof window<"u"){const s=window;s[Os+"PublisherManager"]=s[Os+"PublisherManager"]||O}const Zo=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_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Xo(s,t){return{get:function(r,i){if(typeof i=="string"&&Zo.has(i))return s[i];if(i==Symbol.toPrimitive)return()=>t().get();if(!s._proxies_.has(i)){const e=s._value_[i],o=pi(se(e)?e:{__value:e},s,i);o._proxies_.set("_parent_",t()),s._proxies_.set(i,o)}return s._proxies_.get(i)},set:function(r,i,e){if(i=="_value_")return s._value_=e,!0;if(i=="_cachedGet_")return s._cachedGet_=e,!0;if(i=="_assignmentId_")return s._assignmentId_=e,!0;if(i=="_is_savable_")return s._is_savable_=e,!0;if(i=="_expiration_delay_")return s._expiration_delay_=e,!0;if(i=="_invalidate_on_page_show_")return s._invalidate_on_page_show_=e,!0;if(i=="_instanceCounter_")return s._instanceCounter_=e,!0;if(!s._proxies_.has(i)){const n=pi({},s,i);n._proxies_.set("_parent_",t()),s._proxies_.set(i,n)}return s._value_[i]!==e&&(s._value_[i]=e,s._publishDynamicFilling_(i,e),s._proxies_.get(i)?.set(se(e)?e:{__value:e})),!0},deleteProperty:function(r,i){return s._publishDynamicFilling_(i,null),s._proxies_.get(i)?.set(null),delete s._value_[i]},has:function(r,i){return i in s._value_&&i!="_lockInternalMutationPublishing_"},defineProperty:function(r,i,e){return e&&"value"in e&&(s._value_[i]=e.value),!0},getOwnPropertyDescriptor:function(r,i){return{enumerable:!0,configurable:!0}},ownKeys:function(r){return s._value_.__value?Object.keys(s._value_.__value):Object.keys(s._value_)}}}function pi(s,t=null,r){const i=new Je(s,t,r);let e=null;const o=Xo(i,()=>e);return e=new Proxy(i,o),e}class Qo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Je.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Fe+"-publisher-proxy",Qo)}catch{}const Ls=(s,t)=>{if(typeof s=="function"){const r=s;return O.collectModifiedPublisher(),r(),O.getModifiedPublishers()}if(typeof s=="string"){const r=s.split("."),i=r.shift()||"";let e=O.get(i,t);e=rt.traverse(e,r);const o=new Set;return o.add(e),o}return new Set([s])};function Jo(s){const t=di(s);return Ls(t).values().next().value?.get()}function Ts(s,t,r){const i=di(s);return Ls(i,r).values().next().value}function tn(s,t){return yr(t)?Ts(s,void 0,t):Ts(s)}function Ms(s,t){return yr(t)?Ts(s,void 0,t):Ts(s)}function en(s,t){const r=di(s);Ls(r).values().next().value?.set(t)}window.addEventListener("pageshow",s=>{s.persisted&&O.getInstance().invalidateAll()});let Is=(F=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(F.observedElements.keys()).forEach(t=>F.unObserve(t)))}static observe(t){if(!t||!F.enabled||F.observedElements.has(t))return;const r=new MutationObserver(F.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],r.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>F.addPublisherListeners(e)),F.observedElements.set(t,r)}static unObserve(t){if(!t)return;const r=this.observedElements.get(t);r&&(r.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>F.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&F.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(r=>F.addPublisherListeners(r)):t.childNodes.forEach(r=>F.onAdded(r))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&F.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(r=>F.removePublisherListeners(r)):t.childNodes.forEach(r=>F.onRemoved(r))}static onMutation(t){for(const r of t)switch(r.type){case"attributes":F.addPublisherListeners(r.target);break;case"childList":r.addedNodes.forEach(i=>{F.onAdded(i)}),r.removedNodes.forEach(i=>{F.onRemoved(i)});break}}static removePublisherListeners(t){const r=F.publisherListeners.get(t);r&&(F.publisherListeners.delete(t),r.forEach(i=>{i.publisher?.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let r=t.match(/(\$(?:\w+\\?\.?)+)/g);return r?r=r.map(i=>i.replace("$","")):r=[t],r=r.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:r.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(r=>r.name.indexOf("::")==0).map(r=>({propertyToUpdate:r.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:F.getVariablesDescriptor(r.value)})):[]}static getSubPublisher(t,r){if(!r)return t;for(const i of r)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){F.removePublisherListeners(t);const r=Y.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!r)return;const i=O.getInstance().get(r),e=F.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const p=h;let d=i;d=F.getSubPublisher(i,p);const f=t,_={publisher:d,onAssign:()=>{const y=l.variables.map(A=>F.getSubPublisher(i,A)?.get());let g=l.expression,v=!1;if(y.length==1&&l.variables[0].join(".")==g.substring(1)){let A=y[0];A===null&&(A=""),f[c]=A;return}for(let A=0;A<y.length;A++){let u=y[A];const b=l.variables[A];u===null&&(v=!0,u=void 0),g=g.replace("$"+b.join("."),u)}if(g.indexOf("|")!=-1){const A=g.indexOf("|");if(A==0)g=Ds.js(g.substring(1));else{const u=g.substring(0,A),b=g.substring(A+1),w=Ds[u];g=v?"":w?w(b):g}}else g=v?"":g;f[c]=g}};d?.onAssign(_.onAssign),o.push(_)}}),F.publisherListeners.set(t,o)}},F.observedElements=new Map,F.enabled=!0,F.publisherListeners=new Map,F);Is.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Is);/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const P=r=>(t,i)=>{i!==void 0?i.addInitializer((()=>{customElements.define(r,t)})):customElements.define(r,t)};/**
5
+ */const C=s=>(t,r)=>{r!==void 0?r.addInitializer((()=>{customElements.define(s,t)})):customElements.define(s,t)};/**
6
6
  * @license
7
7
  * Copyright 2019 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const $s=globalThis,si=$s.ShadowRoot&&($s.ShadyCSS===void 0||$s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ii=Symbol(),er=new WeakMap;let ri=class{constructor(t,i,s){if(this._$cssResult$=!0,s!==ii)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}get styleSheet(){let t=this.o;const i=this.t;if(si&&t===void 0){const s=i!==void 0&&i.length===1;s&&(t=er.get(i)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&er.set(i,t))}return t}toString(){return this.cssText}};const Ao=r=>new ri(typeof r=="string"?r:r+"",void 0,ii),C=(r,...t)=>{const i=r.length===1?r[0]:t.reduce(((s,e,o)=>s+(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 ri(i,r,ii)},ko=(r,t)=>{if(si)r.adoptedStyleSheets=t.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of t){const s=document.createElement("style"),e=$s.litNonce;e!==void 0&&s.setAttribute("nonce",e),s.textContent=i.cssText,r.appendChild(s)}},sr=si?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let i="";for(const s of t.cssRules)i+=s.cssText;return Ao(i)})(r):r;/**
9
+ */const Ns=globalThis,fi=Ns.ShadowRoot&&(Ns.ShadyCSS===void 0||Ns.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bi=Symbol(),_r=new WeakMap;let gi=class{constructor(t,r,i){if(this._$cssResult$=!0,i!==bi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(fi&&t===void 0){const i=r!==void 0&&r.length===1;i&&(t=_r.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&_r.set(r,t))}return t}toString(){return this.cssText}};const sn=s=>new gi(typeof s=="string"?s:s+"",void 0,bi),$=(s,...t)=>{const r=s.length===1?s[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)+s[o+1]),s[0]);return new gi(r,s,bi)},rn=(s,t)=>{if(fi)s.adoptedStyleSheets=t.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(const r of t){const i=document.createElement("style"),e=Ns.litNonce;e!==void 0&&i.setAttribute("nonce",e),i.textContent=r.cssText,s.appendChild(i)}},wr=fi?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let r="";for(const i of t.cssRules)r+=i.cssText;return sn(r)})(s):s;/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const{is:Do,defineProperty:Oo,getOwnPropertyDescriptor:Lo,getOwnPropertyNames:Eo,getOwnPropertySymbols:To,getPrototypeOf:No}=Object,Ss=globalThis,ir=Ss.trustedTypes,Io=ir?ir.emptyScript:"",Mo=Ss.reactiveElementPolyfillSupport,Be=(r,t)=>r,As={toAttribute(r,t){switch(t){case Boolean:r=r?Io:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let i=r;switch(t){case Boolean:i=r!==null;break;case Number:i=r===null?null:Number(r);break;case Object:case Array:try{i=JSON.parse(r)}catch{i=null}}return i}},oi=(r,t)=>!Do(r,t),rr={attribute:!0,type:String,converter:As,reflect:!1,useDefault:!1,hasChanged:oi};Symbol.metadata??=Symbol("metadata"),Ss.litPropertyMetadata??=new WeakMap;let $e=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,i=rr){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){const s=Symbol(),e=this.getPropertyDescriptor(t,s,i);e!==void 0&&Oo(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){const{get:e,set:o}=Lo(this.prototype,t)??{get(){return this[i]},set(n){this[i]=n}};return{get:e,set(n){const l=e?.call(this);o?.call(this,n),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??rr}static _$Ei(){if(this.hasOwnProperty(Be("elementProperties")))return;const t=No(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Be("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Be("properties"))){const i=this.properties,s=[...Eo(i),...To(i)];for(const e of s)this.createProperty(e,i[e])}const t=this[Symbol.metadata];if(t!==null){const i=litPropertyMetadata.get(t);if(i!==void 0)for(const[s,e]of i)this.elementProperties.set(s,e)}this._$Eh=new Map;for(const[i,s]of this.elementProperties){const e=this._$Eu(i,s);e!==void 0&&this._$Eh.set(e,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const i=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const e of s)i.unshift(sr(e))}else t!==void 0&&i.push(sr(t));return i}static _$Eu(t,i){const s=i.attribute;return s===!1?void 0:typeof s=="string"?s: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(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,i=this.constructor.elementProperties;for(const s of i.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ko(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$ET(t,i){const s=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,s);if(e!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:As).toAttribute(i,s.type);this._$Em=t,o==null?this.removeAttribute(e):this.setAttribute(e,o),this._$Em=null}}_$AK(t,i){const s=this.constructor,e=s._$Eh.get(t);if(e!==void 0&&this._$Em!==e){const o=s.getPropertyOptions(e),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:As;this._$Em=e;const l=n.fromAttribute(i,o.type);this[e]=l??this._$Ej?.get(e)??l,this._$Em=null}}requestUpdate(t,i,s){if(t!==void 0){const e=this.constructor,o=this[t];if(s??=e.getPropertyOptions(t),!((s.hasChanged??oi)(o,i)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,s))))return;this.C(t,i,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,i,{useDefault:s,reflect:e,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??i??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(i=void 0),this._$AL.set(t,i)),e===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,o]of this._$Ep)this[e]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[e,o]of s){const{wrapped:n}=o,l=this[e];n!==!0||this._$AL.has(e)||l===void 0||this.C(e,void 0,o,l)}}let t=!1;const i=this._$AL;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(i)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(i)}willUpdate(t){}_$AE(t){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((i=>this._$ET(i,this[i]))),this._$EM()}updated(t){}firstUpdated(t){}};$e.elementStyles=[],$e.shadowRootOptions={mode:"open"},$e[Be("elementProperties")]=new Map,$e[Be("finalized")]=new Map,Mo?.({ReactiveElement:$e}),(Ss.reactiveElementVersions??=[]).push("2.1.1");/**
13
+ */const{is:on,defineProperty:nn,getOwnPropertyDescriptor:an,getOwnPropertyNames:ln,getOwnPropertySymbols:cn,getPrototypeOf:hn}=Object,Fs=globalThis,xr=Fs.trustedTypes,dn=xr?xr.emptyScript:"",un=Fs.reactiveElementPolyfillSupport,ts=(s,t)=>s,js={toAttribute(s,t){switch(t){case Boolean:s=s?dn:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let r=s;switch(t){case Boolean:r=s!==null;break;case Number:r=s===null?null:Number(s);break;case Object:case Array:try{r=JSON.parse(s)}catch{r=null}}return r}},mi=(s,t)=>!on(s,t),Pr={attribute:!0,type:String,converter:js,reflect:!1,useDefault:!1,hasChanged:mi};Symbol.metadata??=Symbol("metadata"),Fs.litPropertyMetadata??=new WeakMap;let je=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Pr){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(t,r),!r.noAccessor){const i=Symbol(),e=this.getPropertyDescriptor(t,i,r);e!==void 0&&nn(this.prototype,t,e)}}static getPropertyDescriptor(t,r,i){const{get:e,set:o}=an(this.prototype,t)??{get(){return this[r]},set(n){this[r]=n}};return{get:e,set(n){const l=e?.call(this);o?.call(this,n),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Pr}static _$Ei(){if(this.hasOwnProperty(ts("elementProperties")))return;const t=hn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ts("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ts("properties"))){const r=this.properties,i=[...ln(r),...cn(r)];for(const e of i)this.createProperty(e,r[e])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[i,e]of r)this.elementProperties.set(i,e)}this._$Eh=new Map;for(const[r,i]of this.elementProperties){const e=this._$Eu(r,i);e!==void 0&&this._$Eh.set(e,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const e of i)r.unshift(wr(e))}else t!==void 0&&r.push(wr(t));return r}static _$Eu(t,r){const i=r.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(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const i of r.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 rn(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,r,i){this._$AK(t,i)}_$ET(t,r){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(e!==void 0&&i.reflect===!0){const o=(i.converter?.toAttribute!==void 0?i.converter:js).toAttribute(r,i.type);this._$Em=t,o==null?this.removeAttribute(e):this.setAttribute(e,o),this._$Em=null}}_$AK(t,r){const i=this.constructor,e=i._$Eh.get(t);if(e!==void 0&&this._$Em!==e){const o=i.getPropertyOptions(e),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:js;this._$Em=e;const l=n.fromAttribute(r,o.type);this[e]=l??this._$Ej?.get(e)??l,this._$Em=null}}requestUpdate(t,r,i){if(t!==void 0){const e=this.constructor,o=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??mi)(o,r)||i.useDefault&&i.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,r,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,r,{useDefault:i,reflect:e,wrapped:o},n){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??r??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(r=void 0),this._$AL.set(t,r)),e===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,o]of this._$Ep)this[e]=o;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[e,o]of i){const{wrapped:n}=o,l=this[e];n!==!0||this._$AL.has(e)||l===void 0||this.C(e,void 0,o,l)}}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(r)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((r=>this._$ET(r,this[r]))),this._$EM()}updated(t){}firstUpdated(t){}};je.elementStyles=[],je.shadowRootOptions={mode:"open"},je[ts("elementProperties")]=new Map,je[ts("finalized")]=new Map,un?.({ReactiveElement:je}),(Fs.reactiveElementVersions??=[]).push("2.1.1");/**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */const Fo={attribute:!0,type:String,converter:As,reflect:!1,hasChanged:oi},jo=(r=Fo,t,i)=>{const{kind:s,metadata:e}=i;let o=globalThis.litPropertyMetadata.get(e);if(o===void 0&&globalThis.litPropertyMetadata.set(e,o=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(i.name,r),s==="accessor"){const{name:n}=i;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.C(n,void 0,r,l),l}}}if(s==="setter"){const{name:n}=i;return function(l){const c=this[n];t.call(this,l),this.requestUpdate(n,c,r)}}throw Error("Unsupported decorator location: "+s)};function a(r){return(t,i)=>typeof i=="object"?jo(r,t,i):((s,e,o)=>{const n=e.hasOwnProperty(o);return e.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(e,o):void 0})(r,t,i)}/**
17
+ */const pn={attribute:!0,type:String,converter:js,reflect:!1,hasChanged:mi},fn=(s=pn,t,r)=>{const{kind:i,metadata:e}=r;let o=globalThis.litPropertyMetadata.get(e);if(o===void 0&&globalThis.litPropertyMetadata.set(e,o=new Map),i==="setter"&&((s=Object.create(s)).wrapped=!0),o.set(r.name,s),i==="accessor"){const{name:n}=r;return{set(l){const c=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,c,s)},init(l){return l!==void 0&&this.C(n,void 0,s,l),l}}}if(i==="setter"){const{name:n}=r;return function(l){const c=this[n];t.call(this,l),this.requestUpdate(n,c,s)}}throw Error("Unsupported decorator location: "+i)};function a(s){return(t,r)=>typeof r=="object"?fn(s,t,r):((i,e,o)=>{const n=e.hasOwnProperty(o);return e.constructor.createProperty(o,i),n?Object.getOwnPropertyDescriptor(e,o):void 0})(s,t,r)}/**
18
18
  * @license
19
19
  * Copyright 2017 Google LLC
20
20
  * SPDX-License-Identifier: BSD-3-Clause
21
- */function E(r){return a({...r,state:!0,attribute:!1})}/**
21
+ */function T(s){return a({...s,state:!0,attribute:!1})}/**
22
22
  * @license
23
23
  * Copyright 2017 Google LLC
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
- */const ni=(r,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,i),i);/**
25
+ */const vi=(s,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(s,t,r),r);/**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */function Kt(r,t){return(i,s,e)=>{const o=n=>n.renderRoot?.querySelector(r)??null;return ni(i,s,{get(){return o(this)}})}}/**
29
+ */function ie(s,t){return(r,i,e)=>{const o=n=>n.renderRoot?.querySelector(s)??null;return vi(r,i,{get(){return o(this)}})}}/**
30
30
  * @license
31
31
  * Copyright 2021 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */function Se(r){return(t,i)=>{const{slot:s,selector:e}=r??{},o="slot"+(s?`[name=${s}]`:":not([name])");return ni(t,i,{get(){const n=this.renderRoot?.querySelector(o),l=n?.assignedElements(r)??[];return e===void 0?l:l.filter((c=>c.matches(e)))}})}}/**
33
+ */function es(s){return(t,r)=>{const{slot:i,selector:e}=s??{},o="slot"+(i?`[name=${i}]`:":not([name])");return vi(t,r,{get(){const n=this.renderRoot?.querySelector(o),l=n?.assignedElements(s)??[];return e===void 0?l:l.filter((c=>c.matches(e)))}})}}/**
34
34
  * @license
35
35
  * Copyright 2017 Google LLC
36
36
  * SPDX-License-Identifier: BSD-3-Clause
37
- */function at(r){return(t,i)=>{const{slot:s}=r??{},e="slot"+(s?`[name=${s}]`:":not([name])");return ni(t,i,{get(){return this.renderRoot?.querySelector(e)?.assignedNodes(r)??[]}})}}/**
37
+ */function ht(s){return(t,r)=>{const{slot:i}=s??{},e="slot"+(i?`[name=${i}]`:":not([name])");return vi(t,r,{get(){return this.renderRoot?.querySelector(e)?.assignedNodes(s)??[]}})}}/**
38
38
  * @license
39
39
  * Copyright 2017 Google LLC
40
40
  * SPDX-License-Identifier: BSD-3-Clause
41
- */const ai=globalThis,ks=ai.trustedTypes,or=ks?ks.createPolicy("lit-html",{createHTML:r=>r}):void 0,nr="$lit$",Yt=`lit$${Math.random().toFixed(9).slice(2)}$`,ar="?"+Yt,Ro=`<${ar}>`,ne=document,He=()=>ne.createComment(""),qe=r=>r===null||typeof r!="object"&&typeof r!="function",li=Array.isArray,zo=r=>li(r)||typeof r?.[Symbol.iterator]=="function",ci=`[
42
- \f\r]`,We=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,lr=/-->/g,cr=/>/g,ae=RegExp(`>|${ci}(?:([^\\s"'>=/]+)(${ci}*=${ci}*(?:[^
43
- \f\r"'\`<>=]|("|')|))|$)`,"g"),hr=/'/g,dr=/"/g,ur=/^(?:script|style|textarea|title)$/i,Uo=r=>(t,...i)=>({_$litType$:r,strings:t,values:i}),g=Uo(1),vt=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),pr=new WeakMap,le=ne.createTreeWalker(ne,129);function fr(r,t){if(!li(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return or!==void 0?or.createHTML(t):t}const Vo=(r,t)=>{const i=r.length-1,s=[];let e,o=t===2?"<svg>":t===3?"<math>":"",n=We;for(let l=0;l<i;l++){const c=r[l];let h,u,d=-1,m=0;for(;m<c.length&&(n.lastIndex=m,u=n.exec(c),u!==null);)m=n.lastIndex,n===We?u[1]==="!--"?n=lr:u[1]!==void 0?n=cr:u[2]!==void 0?(ur.test(u[2])&&(e=RegExp("</"+u[2],"g")),n=ae):u[3]!==void 0&&(n=ae):n===ae?u[0]===">"?(n=e??We,d=-1):u[1]===void 0?d=-2:(d=n.lastIndex-u[2].length,h=u[1],n=u[3]===void 0?ae:u[3]==='"'?dr:hr):n===dr||n===hr?n=ae:n===lr||n===cr?n=We:(n=ae,e=void 0);const y=n===ae&&r[l+1].startsWith("/>")?" ":"";o+=n===We?c+Ro:d>=0?(s.push(h),c.slice(0,d)+nr+c.slice(d)+Yt+y):c+Yt+(d===-2?l:y)}return[fr(r,o+(r[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};let hi=class go{constructor({strings:t,_$litType$:i},s){let e;this.parts=[];let o=0,n=0;const l=t.length-1,c=this.parts,[h,u]=Vo(t,i);if(this.el=go.createElement(h,s),le.currentNode=this.el.content,i===2||i===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(e=le.nextNode())!==null&&c.length<l;){if(e.nodeType===1){if(e.hasAttributes())for(const d of e.getAttributeNames())if(d.endsWith(nr)){const m=u[n++],y=e.getAttribute(d).split(Yt),p=/([.?@])?(.*)/.exec(m);c.push({type:1,index:o,name:p[2],strings:y,ctor:p[1]==="."?Ho:p[1]==="?"?qo:p[1]==="@"?Wo:Ds}),e.removeAttribute(d)}else d.startsWith(Yt)&&(c.push({type:6,index:o}),e.removeAttribute(d));if(ur.test(e.tagName)){const d=e.textContent.split(Yt),m=d.length-1;if(m>0){e.textContent=ks?ks.emptyScript:"";for(let y=0;y<m;y++)e.append(d[y],He()),le.nextNode(),c.push({type:2,index:++o});e.append(d[m],He())}}}else if(e.nodeType===8)if(e.data===ar)c.push({type:2,index:o});else{let d=-1;for(;(d=e.data.indexOf(Yt,d+1))!==-1;)c.push({type:7,index:o}),d+=Yt.length-1}o++}}static createElement(t,i){const s=ne.createElement("template");return s.innerHTML=t,s}};function Ae(r,t,i=r,s){if(t===vt)return t;let e=s!==void 0?i._$Co?.[s]:i._$Cl;const o=qe(t)?void 0:t._$litDirective$;return e?.constructor!==o&&(e?._$AO?.(!1),o===void 0?e=void 0:(e=new o(r),e._$AT(r,i,s)),s!==void 0?(i._$Co??=[])[s]=e:i._$Cl=e),e!==void 0&&(t=Ae(r,e._$AS(r,t.values),e,s)),t}let Bo=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??ne).importNode(i,!0);le.currentNode=e;let o=le.nextNode(),n=0,l=0,c=s[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new ke(o,o.nextSibling,this,t):c.type===1?h=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(h=new Ko(o,this,t)),this._$AV.push(h),c=s[++l]}n!==c?.index&&(o=le.nextNode(),n++)}return le.currentNode=ne,e}p(t){let i=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}};class ke{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Ae(this,t,i),qe(t)?t===A||t==null||t===""?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==vt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):zo(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!==A&&qe(this._$AH)?this._$AA.nextSibling.data=t:this.T(ne.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=hi.createElement(fr(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const o=new Bo(e,this),n=o.u(this.options);o.p(i),this.T(n),this._$AH=o}}_$AC(t){let i=pr.get(t.strings);return i===void 0&&pr.set(t.strings,i=new hi(t)),i}k(t){li(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new ke(this.O(He()),this.O(He()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class Ds{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(o===void 0)t=Ae(this,t,i,0),n=!qe(t)||t!==this._$AH&&t!==vt,n&&(this._$AH=t);else{const l=t;let c,h;for(t=o[0],c=0;c<o.length-1;c++)h=Ae(this,l[s+c],i,c),h===vt&&(h=this._$AH[c]),n||=!qe(h)||h!==this._$AH[c],h===A?t=A:t!==A&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ho extends Ds{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class qo extends Ds{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class Wo extends Ds{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){if((t=Ae(this,t,i,0)??A)===vt)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ko{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Ae(this,t)}}const Yo={I:ke},Zo=ai.litHtmlPolyfillSupport;Zo?.(hi,ke),(ai.litHtmlVersions??=[]).push("3.3.1");const Go=(r,t,i)=>{const s=i?.renderBefore??t;let e=s._$litPart$;if(e===void 0){const o=i?.renderBefore??null;s._$litPart$=e=new ke(t.insertBefore(He(),o),o,void 0,i??{})}return e._$AI(r),e};/**
41
+ */const yi=globalThis,Rs=yi.trustedTypes,Cr=Rs?Rs.createPolicy("lit-html",{createHTML:s=>s}):void 0,$r="$lit$",re=`lit$${Math.random().toFixed(9).slice(2)}$`,Sr="?"+re,bn=`<${Sr}>`,we=document,ss=()=>we.createComment(""),is=s=>s===null||typeof s!="object"&&typeof s!="function",_i=Array.isArray,gn=s=>_i(s)||typeof s?.[Symbol.iterator]=="function",wi=`[
42
+ \f\r]`,rs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ar=/-->/g,kr=/>/g,xe=RegExp(`>|${wi}(?:([^\\s"'>=/]+)(${wi}*=${wi}*(?:[^
43
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Dr=/'/g,Or=/"/g,Er=/^(?:script|style|textarea|title)$/i,mn=s=>(t,...r)=>({_$litType$:s,strings:t,values:r}),m=mn(1),xt=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),Lr=new WeakMap,Pe=we.createTreeWalker(we,129);function Tr(s,t){if(!_i(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Cr!==void 0?Cr.createHTML(t):t}const vn=(s,t)=>{const r=s.length-1,i=[];let e,o=t===2?"<svg>":t===3?"<math>":"",n=rs;for(let l=0;l<r;l++){const c=s[l];let h,p,d=-1,f=0;for(;f<c.length&&(n.lastIndex=f,p=n.exec(c),p!==null);)f=n.lastIndex,n===rs?p[1]==="!--"?n=Ar:p[1]!==void 0?n=kr:p[2]!==void 0?(Er.test(p[2])&&(e=RegExp("</"+p[2],"g")),n=xe):p[3]!==void 0&&(n=xe):n===xe?p[0]===">"?(n=e??rs,d=-1):p[1]===void 0?d=-2:(d=n.lastIndex-p[2].length,h=p[1],n=p[3]===void 0?xe:p[3]==='"'?Or:Dr):n===Or||n===Dr?n=xe:n===Ar||n===kr?n=rs:(n=xe,e=void 0);const _=n===xe&&s[l+1].startsWith("/>")?" ":"";o+=n===rs?c+bn:d>=0?(i.push(h),c.slice(0,d)+$r+c.slice(d)+re+_):c+re+(d===-2?l:_)}return[Tr(s,o+(s[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};let xi=class qo{constructor({strings:t,_$litType$:r},i){let e;this.parts=[];let o=0,n=0;const l=t.length-1,c=this.parts,[h,p]=vn(t,r);if(this.el=qo.createElement(h,i),Pe.currentNode=this.el.content,r===2||r===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(e=Pe.nextNode())!==null&&c.length<l;){if(e.nodeType===1){if(e.hasAttributes())for(const d of e.getAttributeNames())if(d.endsWith($r)){const f=p[n++],_=e.getAttribute(d).split(re),y=/([.?@])?(.*)/.exec(f);c.push({type:1,index:o,name:y[2],strings:_,ctor:y[1]==="."?_n:y[1]==="?"?wn:y[1]==="@"?xn:zs}),e.removeAttribute(d)}else d.startsWith(re)&&(c.push({type:6,index:o}),e.removeAttribute(d));if(Er.test(e.tagName)){const d=e.textContent.split(re),f=d.length-1;if(f>0){e.textContent=Rs?Rs.emptyScript:"";for(let _=0;_<f;_++)e.append(d[_],ss()),Pe.nextNode(),c.push({type:2,index:++o});e.append(d[f],ss())}}}else if(e.nodeType===8)if(e.data===Sr)c.push({type:2,index:o});else{let d=-1;for(;(d=e.data.indexOf(re,d+1))!==-1;)c.push({type:7,index:o}),d+=re.length-1}o++}}static createElement(t,r){const i=we.createElement("template");return i.innerHTML=t,i}};function Re(s,t,r=s,i){if(t===xt)return t;let e=i!==void 0?r._$Co?.[i]:r._$Cl;const o=is(t)?void 0:t._$litDirective$;return e?.constructor!==o&&(e?._$AO?.(!1),o===void 0?e=void 0:(e=new o(s),e._$AT(s,r,i)),i!==void 0?(r._$Co??=[])[i]=e:r._$Cl=e),e!==void 0&&(t=Re(s,e._$AS(s,t.values),e,i)),t}let yn=class{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:i}=this._$AD,e=(t?.creationScope??we).importNode(r,!0);Pe.currentNode=e;let o=Pe.nextNode(),n=0,l=0,c=i[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new ze(o,o.nextSibling,this,t):c.type===1?h=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(h=new Pn(o,this,t)),this._$AV.push(h),c=i[++l]}n!==c?.index&&(o=Pe.nextNode(),n++)}return Pe.currentNode=we,e}p(t){let r=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,r),r+=i.strings.length-2):i._$AI(t[r])),r++}};class ze{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,r,i,e){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=i,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&t?.nodeType===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=Re(this,t,r),is(t)?t===D||t==null||t===""?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):gn(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!==D&&is(this._$AH)?this._$AA.nextSibling.data=t:this.T(we.createTextNode(t)),this._$AH=t}$(t){const{values:r,_$litType$:i}=t,e=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=xi.createElement(Tr(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===e)this._$AH.p(r);else{const o=new yn(e,this),n=o.u(this.options);o.p(r),this.T(n),this._$AH=o}}_$AC(t){let r=Lr.get(t.strings);return r===void 0&&Lr.set(t.strings,r=new xi(t)),r}k(t){_i(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let i,e=0;for(const o of t)e===r.length?r.push(i=new ze(this.O(ss()),this.O(ss()),this,this.options)):i=r[e],i._$AI(o),e++;e<r.length&&(this._$AR(i&&i._$AB.nextSibling,e),r.length=e)}_$AR(t=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class zs{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,i,e,o){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=r,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=D}_$AI(t,r=this,i,e){const o=this.strings;let n=!1;if(o===void 0)t=Re(this,t,r,0),n=!is(t)||t!==this._$AH&&t!==xt,n&&(this._$AH=t);else{const l=t;let c,h;for(t=o[0],c=0;c<o.length-1;c++)h=Re(this,l[i+c],r,c),h===xt&&(h=this._$AH[c]),n||=!is(h)||h!==this._$AH[c],h===D?t=D:t!==D&&(t+=(h??"")+o[c+1]),this._$AH[c]=h}n&&!e&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _n extends zs{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}class wn extends zs{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==D)}}class xn extends zs{constructor(t,r,i,e,o){super(t,r,i,e,o),this.type=5}_$AI(t,r=this){if((t=Re(this,t,r,0)??D)===xt)return;const i=this._$AH,e=t===D&&i!==D||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==D&&(i===D||e);e&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Pn{constructor(t,r,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Re(this,t)}}const Cn={I:ze},$n=yi.litHtmlPolyfillSupport;$n?.(xi,ze),(yi.litHtmlVersions??=[]).push("3.3.1");const Sn=(s,t,r)=>{const i=r?.renderBefore??t;let e=i._$litPart$;if(e===void 0){const o=r?.renderBefore??null;i._$litPart$=e=new ze(t.insertBefore(ss(),o),o,void 0,r??{})}return e._$AI(s),e};/**
44
44
  * @license
45
45
  * Copyright 2020 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */const{I:Xo}=Yo,Qo=r=>r.strings===void 0,br=()=>document.createComment(""),Ke=(r,t,i)=>{const s=r._$AA.parentNode,e=t===void 0?r._$AB:t._$AA;if(i===void 0){const o=s.insertBefore(br(),e),n=s.insertBefore(br(),e);i=new Xo(o,n,r,r.options)}else{const o=i._$AB.nextSibling,n=i._$AM,l=n!==r;if(l){let c;i._$AQ?.(r),i._$AM=r,i._$AP!==void 0&&(c=r._$AU)!==n._$AU&&i._$AP(c)}if(o!==e||l){let c=i._$AA;for(;c!==o;){const h=c.nextSibling;s.insertBefore(c,e),c=h}}}return i},ce=(r,t,i=r)=>(r._$AI(t,i),r),Jo={},tn=(r,t=Jo)=>r._$AH=t,en=r=>r._$AH,di=r=>{r._$AR(),r._$AA.remove()};/**
47
+ */const{I:An}=Cn,kn=s=>s.strings===void 0,Mr=()=>document.createComment(""),os=(s,t,r)=>{const i=s._$AA.parentNode,e=t===void 0?s._$AB:t._$AA;if(r===void 0){const o=i.insertBefore(Mr(),e),n=i.insertBefore(Mr(),e);r=new An(o,n,s,s.options)}else{const o=r._$AB.nextSibling,n=r._$AM,l=n!==s;if(l){let c;r._$AQ?.(s),r._$AM=s,r._$AP!==void 0&&(c=s._$AU)!==n._$AU&&r._$AP(c)}if(o!==e||l){let c=r._$AA;for(;c!==o;){const h=c.nextSibling;i.insertBefore(c,e),c=h}}}return r},Ce=(s,t,r=s)=>(s._$AI(t,r),s),Dn={},On=(s,t=Dn)=>s._$AH=t,En=s=>s._$AH,Pi=s=>{s._$AR(),s._$AA.remove()};/**
48
48
  * @license
49
49
  * Copyright 2017 Google LLC
50
50
  * SPDX-License-Identifier: BSD-3-Clause
51
- */const he={ATTRIBUTE:1,CHILD:2},Zt=r=>(...t)=>({_$litDirective$:r,values:t});let De=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,i,s){this._$Ct=t,this._$AM=i,this._$Ci=s}_$AS(t,i){return this.update(t,i)}update(t,i){return this.render(...i)}};/**
51
+ */const $e={ATTRIBUTE:1,CHILD:2},oe=s=>(...t)=>({_$litDirective$:s,values:t});let Ue=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,i){this._$Ct=t,this._$AM=r,this._$Ci=i}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/**
52
52
  * @license
53
53
  * Copyright 2017 Google LLC
54
54
  * SPDX-License-Identifier: BSD-3-Clause
55
- */const Ye=(r,t)=>{const i=r._$AN;if(i===void 0)return!1;for(const s of i)s._$AO?.(t,!1),Ye(s,t);return!0},Os=r=>{let t,i;do{if((t=r._$AM)===void 0)break;i=t._$AN,i.delete(r),r=t}while(i?.size===0)},mr=r=>{for(let t;t=r._$AM;r=t){let i=t._$AN;if(i===void 0)t._$AN=i=new Set;else if(i.has(r))break;i.add(r),on(t)}};function sn(r){this._$AN!==void 0?(Os(this),this._$AM=r,mr(this)):this._$AM=r}function rn(r,t=!1,i=0){const s=this._$AH,e=this._$AN;if(e!==void 0&&e.size!==0)if(t)if(Array.isArray(s))for(let o=i;o<s.length;o++)Ye(s[o],!1),Os(s[o]);else s!=null&&(Ye(s,!1),Os(s));else Ye(this,r)}const on=r=>{r.type==he.CHILD&&(r._$AP??=rn,r._$AQ??=sn)};class ui extends De{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,s){super._$AT(t,i,s),mr(this),this.isConnected=t._$AU}_$AO(t,i=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),i&&(Ye(this,t),Os(this))}setValue(t){if(Qo(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}/**
55
+ */const ns=(s,t)=>{const r=s._$AN;if(r===void 0)return!1;for(const i of r)i._$AO?.(t,!1),ns(i,t);return!0},Us=s=>{let t,r;do{if((t=s._$AM)===void 0)break;r=t._$AN,r.delete(s),s=t}while(r?.size===0)},Ir=s=>{for(let t;t=s._$AM;s=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(s))break;r.add(s),Mn(t)}};function Ln(s){this._$AN!==void 0?(Us(this),this._$AM=s,Ir(this)):this._$AM=s}function Tn(s,t=!1,r=0){const i=this._$AH,e=this._$AN;if(e!==void 0&&e.size!==0)if(t)if(Array.isArray(i))for(let o=r;o<i.length;o++)ns(i[o],!1),Us(i[o]);else i!=null&&(ns(i,!1),Us(i));else ns(this,s)}const Mn=s=>{s.type==$e.CHILD&&(s._$AP??=Tn,s._$AQ??=Ln)};class Ci extends Ue{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,i){super._$AT(t,r,i),Ir(this),this.isConnected=t._$AU}_$AO(t,r=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),r&&(ns(this,t),Us(this))}setValue(t){if(kn(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */const pi=globalThis;let x=class extends $e{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Go(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};x._$litElement$=!0,x.finalized=!0,pi.litElementHydrateSupport?.({LitElement:x});const nn=pi.litElementPolyfillSupport;nn?.({LitElement:x}),(pi.litElementVersions??=[]).push("4.2.1");function an(r){if(r==null||typeof r!="object"||Array.isArray(r))return r;const t={...r};return delete t._sonic_http_response_,t}const U=class U{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!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",this.keepAlive=t.keepAlive||!1}set token(t){if(this._token=t,!t){U.tokens.delete(this.serviceURL);return}U.invalidTokens.includes(t)||U.tokens.set(this.serviceURL,t)}get token(){return U.invalidTokens.includes(this._token)?U.tokens.get(this.serviceURL):this._token}handleInvalidToken(t){t&&(U.invalidTokens.includes(t)||(U.invalidTokens.push(t),this.token=null))}async handleResult(t,i){U.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=t;const s=t.headers.get("content-type")?.toLowerCase(),e=t.status;let o={};if(!s||s.indexOf("text/")==0)o={text:await t.text()};else try{o=await t.json()}catch{o={}}return this.addHTTPResponse&&tt.isObject(o)&&(o._sonic_http_response_=t),e===498&&!U.failledTokenUpdates.has(this.serviceURL)&&(this.handleInvalidToken(this.token),i.apiMethod==="get"?o=await this[i.apiMethod](i.path,i.additionalHeaders):o=await this[i.apiMethod](i.path,i.data,i.method,i.additionalHeaders)),Ps("sonic-api").lastResponse.set({http:t,processed:o}),o}async auth(){if(this.token)return;if(U.tokens.has(this.serviceURL)){this.token=U.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 i=new URL(this.serviceURL),s=i.protocol+"//"+i.host,e=await fetch(this.computeURL(this.tokenProvider,{serviceHost:s}),{headers:t,credentials:this.credentials,keepalive:this.keepAlive});try{const o=await e.json();o.token?this.token=o.token:U.failledTokenUpdates.set(this.serviceURL,!0)}catch{U.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,i){const s=k.get(t),e=new URLSearchParams(i.split("?")[1]||""),o=s.get();let n=[];Array.isArray(o)?n=o:n=[o];const l=[];let c=Number.POSITIVE_INFINITY,h=0,u=0;if(e.has("limit")&&(c=parseInt(e.get("limit")||"0"),u++),e.has("offset")&&(h=parseInt(e.get("offset")||"0"),u++),u>0&&(e.delete("limit"),e.delete("offset")),e.size===0)return n.slice(h,h+c);for(const[d,m]of e.entries()){const y=m.split(",").map(p=>p.trim());for(const p of y)for(const v of n)if(typeof v!="object")isNaN(+v)?v.toString().toLowerCase().includes(m.toLowerCase())&&l.push(v):v===m&&l.push(v);else{const _=v;if(!_[d])continue;isNaN(+_[d])?_[d]?.toString().toLowerCase().includes(p.toLowerCase())&&l.push(v):_[d]===p&&l.push(v)}}return l.slice(h,h+c)}firstCallDone(){return new Promise(t=>{if(!U.firstCallDoneFlags.has(this.serviceURL))U.firstCallDoneFlags.set(this.serviceURL,"loading"),t(!0);else{const i=()=>{[void 0,"loading"].includes(U.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(i):t(!0)};i()}})}async get(t,i){await this.firstCallDone(),this.blockUntilDone&&U.firstCallDoneFlags.set(this.serviceURL,"loading");const s=/dataProvider\((.*?)\)(.*?)$/;if(s.test(t)){const h=t.match(s);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:i},o=await this.createHeaders(i),n=this.computeURL(t),l=JSON.stringify({url:n,headers:o});if(!U.loadingGetPromises.has(l)){const h=new Promise(async u=>{try{const d=await fetch(n,{headers:o,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),m=await this.handleResult(d,e);u(m)}catch{u(null)}});U.loadingGetPromises.set(l,h)}const c=await U.loadingGetPromises.get(l);return U.loadingGetPromises.delete(l),c}async getDetailed(t,i){const s=/dataProvider\((.*?)\)(.*?)$/.test(t),e=await this.get(t,i);if(e==null)return;const o=an(e),n=this.computeURL(t);if(s)return{request:new Request(n,{method:"GET"}),result:o};const l=await this.createHeaders(i);return{request:new Request(n,{method:"GET",headers:new Headers(l),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:o}}async createHeaders(t){await this.auth();const i={};return this.token&&(i.Authorization="Bearer "+this.token),i["Accept-Language"]=q.getLanguage(),t&&Object.assign(i,t),i}computeURL(t,i={}){let s="";t.startsWith("http")?s=t:s=this.serviceURL+"/"+t,s.startsWith("http")||(s=window.location.origin+s);const e=new URL(s);for(const o in i)e.searchParams.set(o,i[o]);return e.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,i,s="POST",e){const o={apiMethod:"send",path:t,additionalHeaders:e,method:s,data:i},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:s,body:JSON.stringify(i),keepalive:this.keepAlive});return await this.handleResult(l,o)}async submitFormData(t,i,s="POST",e){const o={apiMethod:"submitFormData",path:t,additionalHeaders:e,method:s,data:i},n=await this.createHeaders(e);n.Accept="application/json";const l=new FormData,c=i;for(const u in c)l.set(u,c[u]);const h=await fetch(this.computeURL(t),{headers:n,credentials:this.credentials,method:s,body:l,keepalive:this.keepAlive});return await this.handleResult(h,o)}async put(t,i,s){return this.send(t,i,"PUT",s)}async post(t,i,s){return this.send(t,i,"POST",s)}async patch(t,i,s){return this.send(t,i,"PATCH",s)}async delete(t,i,s){return this.send(t,i,"delete",s)}};U.loadingGetPromises=new Map,U.tokens=new Map,U.invalidTokens=[],U.failledTokenUpdates=new Map,U.firstCallDoneFlags=new Map;let de=U;q.getApiConfiguration(document.body||document.documentElement);const ln=async(r,t)=>{};/**
59
+ */const $i=globalThis;let P=class extends je{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Sn(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return xt}};P._$litElement$=!0,P.finalized=!0,$i.litElementHydrateSupport?.({LitElement:P});const In=$i.litElementPolyfillSupport;In?.({LitElement:P}),($i.litElementVersions??=[]).push("4.2.1");function Nr(s){if(s==null||typeof s!="object"||Array.isArray(s))return s;const t={...s};return delete t._sonic_http_response_,t}const H=class H{constructor(t){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!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",this.keepAlive=t.keepAlive||!1}set token(t){if(this._token=t,!t){H.tokens.delete(this.serviceURL);return}H.invalidTokens.includes(t)||H.tokens.set(this.serviceURL,t)}get token(){return H.invalidTokens.includes(this._token)?H.tokens.get(this.serviceURL):this._token}handleInvalidToken(t){t&&(H.invalidTokens.includes(t)||(H.invalidTokens.push(t),this.token=null))}async handleResult(t,r){H.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=t;const i=t.headers.get("content-type")?.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&&rt.isObject(o)&&(o._sonic_http_response_=t),e===498&&!H.failledTokenUpdates.has(this.serviceURL)&&(this.handleInvalidToken(this.token),r.apiMethod==="get"?o=await this[r.apiMethod](r.path,r.additionalHeaders):o=await this[r.apiMethod](r.path,r.data,r.method,r.additionalHeaders)),Ms("sonic-api").lastResponse.set({http:t,processed:o}),o}async auth(){if(this.token)return;if(H.tokens.has(this.serviceURL)){this.token=H.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 r=new URL(this.serviceURL),i=r.protocol+"//"+r.host,e=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:t,credentials:this.credentials,keepalive:this.keepAlive});try{const o=await e.json();o.token?this.token=o.token:H.failledTokenUpdates.set(this.serviceURL,!0)}catch{H.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(t,r){const i=O.get(t),e=new URLSearchParams(r.split("?")[1]||""),o=i.get();let n=[];Array.isArray(o)?n=o:n=[o];const l=[];let c=Number.POSITIVE_INFINITY,h=0,p=0;if(e.has("limit")&&(c=parseInt(e.get("limit")||"0"),p++),e.has("offset")&&(h=parseInt(e.get("offset")||"0"),p++),p>0&&(e.delete("limit"),e.delete("offset")),e.size===0)return n.slice(h,h+c);for(const[d,f]of e.entries()){const _=f.split(",").map(y=>y.trim());for(const y of _)for(const g of n)if(typeof g!="object")isNaN(+g)?g.toString().toLowerCase().includes(f.toLowerCase())&&l.push(g):g===f&&l.push(g);else{const v=g;if(!v[d])continue;isNaN(+v[d])?v[d]?.toString().toLowerCase().includes(y.toLowerCase())&&l.push(g):v[d]===y&&l.push(g)}}return l.slice(h,h+c)}firstCallDone(){return new Promise(t=>{if(!H.firstCallDoneFlags.has(this.serviceURL))H.firstCallDoneFlags.set(this.serviceURL,"loading"),t(!0);else{const r=()=>{[void 0,"loading"].includes(H.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(r):t(!0)};r()}})}async get(t,r){await this.firstCallDone(),this.blockUntilDone&&H.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:r},o=await this.createHeaders(r),n=this.computeURL(t),l=JSON.stringify({url:n,headers:o});if(!H.loadingGetPromises.has(l)){const h=new Promise(async p=>{try{const d=await fetch(n,{headers:o,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(d,e);p(f)}catch{p(null)}});H.loadingGetPromises.set(l,h)}const c=await H.loadingGetPromises.get(l);return H.loadingGetPromises.delete(l),c}async getDetailed(t,r){const i=/dataProvider\((.*?)\)(.*?)$/.test(t),e=await this.get(t,r);if(e==null)return;const o=Nr(e),n=this.computeURL(t);if(i)return{request:new Request(n,{method:"GET"}),result:o};const l=await this.createHeaders(r);return{request:new Request(n,{method:"GET",headers:new Headers(l),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:o}}async sendDetailed(t,r,i,e){const o=await this.send(t,r,i,e);if(o==null)return;const n=Nr(o),l=this.computeURL(t),c=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...e});return{request:new Request(l,{method:i,headers:new Headers(c),credentials:this.credentials,body:JSON.stringify(r),keepalive:this.keepAlive}),response:this.lastResult,result:n}}async postDetailed(t,r,i){return this.sendDetailed(t,r,"POST",i)}async putDetailed(t,r,i){return this.sendDetailed(t,r,"PUT",i)}async patchDetailed(t,r,i){return this.sendDetailed(t,r,"PATCH",i)}async createHeaders(t){await this.auth();const r={};return this.token&&(r.Authorization="Bearer "+this.token),r["Accept-Language"]=Y.getLanguage(),t&&Object.assign(r,t),r}computeURL(t,r={}){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 r)e.searchParams.set(o,r[o]);return e.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,r,i="POST",e){const o={apiMethod:"send",path:t,additionalHeaders:e,method:i,data:r},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(r),keepalive:this.keepAlive});return await this.handleResult(l,o)}async submitFormData(t,r,i="POST",e){const o={apiMethod:"submitFormData",path:t,additionalHeaders:e,method:i,data:r},n=await this.createHeaders(e);n.Accept="application/json";const l=new FormData,c=r;for(const p in c)l.set(p,c[p]);const h=await fetch(this.computeURL(t),{headers:n,credentials:this.credentials,method:i,body:l,keepalive:this.keepAlive});return await this.handleResult(h,o)}async put(t,r,i){return this.send(t,r,"PUT",i)}async post(t,r,i){return this.send(t,r,"POST",i)}async patch(t,r,i){return this.send(t,r,"PATCH",i)}async delete(t,r,i){return this.send(t,r,"delete",i)}};H.loadingGetPromises=new Map,H.tokens=new Map,H.invalidTokens=[],H.failledTokenUpdates=new Map,H.firstCallDoneFlags=new Map;let ne=H;Y.getApiConfiguration(document.body||document.documentElement);const Nn=async(s,t)=>{};/**
60
60
  * @license
61
61
  * Copyright 2017 Google LLC
62
62
  * SPDX-License-Identifier: BSD-3-Clause
63
- */let fi=class extends De{constructor(t){if(super(t),this.it=A,t.type!==he.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===A||t==null)return this._t=void 0,this.it=t;if(t===vt)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 i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};fi.directiveName="unsafeHTML",fi.resultType=1;const j=Zt(fi),bi=new Map,gr=r=>{if(!r)return null;const t=q.getApiConfiguration(r),i=q.getAncestorAttributeValue(r,"wordingProvider"),s=q.getAncestorAttributeValue(r,"wordingVersionProvider"),e={apiConfiguration:t,wordingProvider:i,wordingVersionProvider:s};let o=null;for(const[n,l]of bi)if(tt.deepEqual(n,e)){o=l;break}return o||(o={api:new de(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:i,callIndex:0,wordingVersionProvider:s,apiCallKey:e},bi.set(e,o)),o},vr="",B=class B extends ui{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=i=>{const s=this.useUnsafeHTML?j(i):i;this.setValue(s)},this.node=t.options.host}unsubscribe(){B.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,i=!1){return this.useUnsafeHTML=i,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),vt}static async callApi(t,i,s=!0,e){if(await k.getInstance().isLocalStrorageReady,B.firstCall){B.firstCall=!1,Qs(B.reloadWordings);const u=Object.keys(B.publisher.get());for(const d of u)B.publisher.get()[d]===vr&&delete B.publisher[d]}if(t){const u=q.getAncestorAttributeValue(t,"wordingVersionProvider");u&&Ps(u).onAssign(B.handleVersionProvider(t))}let o=B.publisher.get()["wording_"+i]!=null;const n=e||gr(t);if(!n)return;if(o&&i!==""){n.translatedKeys.add(i);return}n.callIndex++;const l=n.callIndex,c=n.wordingProvider??"";if(!c&&s){window.setTimeout(async()=>{B.callApi(null,i,!1,n)},1e3);return}const h=n.api;window.queueMicrotask(async()=>{if(o=B.publisher["wording_"+i].get()!=null,!o&&i!==""&&(n.keysToTranslate.add(i),B.publisher["wording_"+i].set(vr)),l!==n.callIndex)return;const u=Array.from(n.keysToTranslate);if(!u.length)return;const d=c.split("?"),m=d.shift(),y=(d.length>0?d.join("?")+"&":"")+"labels[]="+u.join("&labels[]="),p=m+"?"+y;n.translatedKeys=new Set([...n.translatedKeys,...n.keysToTranslate]),n.keysToTranslate.clear();const v=await h.get(p);for(const _ in v)B.publisher["wording_"+_].set(v[_])})}static reloadWordings(){for(const t of bi.values())t.keysToTranslate=new Set(t.translatedKeys),t.keysToTranslate.size>0&&B.callApi(null,"",!1,t)}static handleVersionProvider(t){const i=gr(t),s=o=>{};if(!i)return s;if(B.versionProviderHandlers.has(i))return B.versionProviderHandlers.get(i)||s;const e=function(o){if(!i.wordingVersionProvider)return;const l=B.publisher.get().__wording_versions__??[];if(o==null)return;const c=l.find(h=>h.serviceURL===i.api.serviceURL)||{serviceURL:i.api.serviceURL,version:0};l.includes(c)||l.push(c),o!==c.version&&(c.version=o,B.publisher.set({__wording_versions__:l}),B.reloadWordings())};return B.versionProviderHandlers.set(i,e),e}subscribe(t){this.unsubscribe(),B.publisher["wording_"+t].onAssign(this.onAssign),B.callApi(this.node,t)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};B.publisher=k.get("sonic-wording",{localStorageMode:"enabled"}),B.firstCall=!0,B.versionProviderHandlers=new Map;let Oe=B;const cn=Zt(Oe);var hn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor,Dt=(r,t,i,s)=>{for(var e=s>1?void 0:s?dn(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&hn(t,i,e),e};let Ls=!1,mi=new Set;const Q=(r,t)=>{var e;const i=(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.shouldRenderLazy=!0,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(u=>u.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 u of h)if(l&&u.isIntersecting){l=!1,c.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},n);c.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),Oe.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const n=this.debug.style;n.position="fixed",n.top="0",n.right="0",n.margin="auto",n.borderRadius=".7rem",n.backgroundColor="#0f1729",n.color="#c5d4f9",n.padding="16px 16px",n.margin="16px 16px",n.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",n.overflowY="auto",n.zIndex="99999999",n.maxHeight="calc(100vh - 32px)",n.fontFamily="Consolas, monospace",n.maxWidth="min(50vw,25rem)",n.fontSize="12px",n.minWidth="300px",n.overflowWrap="break-word",n.resize="vertical"}this.addEventListener("click",n=>{n.ctrlKey&&(n.preventDefault(),Ls=!Ls)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ls||this.removeDebugger(),document.body.appendChild(this.debug),mi.add(this.debug)}),this.addEventListener("mouseout",()=>{Ls||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
63
+ */let Si=class extends Ue{constructor(t){if(super(t),this.it=D,t.type!==$e.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||t==null)return this._t=void 0,this.it=t;if(t===xt)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 r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Si.directiveName="unsafeHTML",Si.resultType=1;const U=oe(Si),Ai=new Map,Fr=s=>{if(!s)return null;const t=Y.getApiConfiguration(s),r=Y.getAncestorAttributeValue(s,"wordingProvider"),i=Y.getAncestorAttributeValue(s,"wordingVersionProvider"),e={apiConfiguration:t,wordingProvider:r,wordingVersionProvider:i};let o=null;for(const[n,l]of Ai)if(rt.deepEqual(n,e)){o=l;break}return o||(o={api:new ne(t),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:r,callIndex:0,wordingVersionProvider:i,apiCallKey:e},Ai.set(e,o)),o},jr="",W=class W extends Ci{constructor(t){super(t),this.useUnsafeHTML=!1,this.onAssign=r=>{const i=this.useUnsafeHTML?U(r):r;this.setValue(i)},this.node=t.options.host}unsubscribe(){W.publisher["wording_"+this.key].offAssign(this.onAssign)}render(t,r=!1){return this.useUnsafeHTML=r,this.key!==t&&(this.key=t,this.isConnected&&this.subscribe(t)),xt}static async callApi(t,r,i=!0,e){if(await O.getInstance().isLocalStrorageReady,W.firstCall){W.firstCall=!1,hi(W.reloadWordings);const p=Object.keys(W.publisher.get());for(const d of p)W.publisher.get()[d]===jr&&delete W.publisher[d]}if(t){const p=Y.getAncestorAttributeValue(t,"wordingVersionProvider");p&&Ms(p).onAssign(W.handleVersionProvider(t))}let o=W.publisher.get()["wording_"+r]!=null;const n=e||Fr(t);if(!n)return;if(o&&r!==""){n.translatedKeys.add(r);return}n.callIndex++;const l=n.callIndex,c=n.wordingProvider??"";if(!c&&i){window.setTimeout(async()=>{W.callApi(null,r,!1,n)},1e3);return}const h=n.api;window.queueMicrotask(async()=>{if(o=W.publisher["wording_"+r].get()!=null,!o&&r!==""&&(n.keysToTranslate.add(r),W.publisher["wording_"+r].set(jr)),l!==n.callIndex)return;const p=Array.from(n.keysToTranslate);if(!p.length)return;const d=c.split("?"),f=d.shift(),_=(d.length>0?d.join("?")+"&":"")+"labels[]="+p.join("&labels[]="),y=f+"?"+_;n.translatedKeys=new Set([...n.translatedKeys,...n.keysToTranslate]),n.keysToTranslate.clear();const g=await h.get(y);for(const v in g)W.publisher["wording_"+v].set(g[v])})}static reloadWordings(){for(const t of Ai.values())t.keysToTranslate=new Set(t.translatedKeys),t.keysToTranslate.size>0&&W.callApi(null,"",!1,t)}static handleVersionProvider(t){const r=Fr(t),i=o=>{};if(!r)return i;if(W.versionProviderHandlers.has(r))return W.versionProviderHandlers.get(r)||i;const e=function(o){if(!r.wordingVersionProvider)return;const l=W.publisher.get().__wording_versions__??[];if(o==null)return;const c=l.find(h=>h.serviceURL===r.api.serviceURL)||{serviceURL:r.api.serviceURL,version:0};l.includes(c)||l.push(c),o!==c.version&&(c.version=o,W.publisher.set({__wording_versions__:l}),W.reloadWordings())};return W.versionProviderHandlers.set(r,e),e}subscribe(t){this.unsubscribe(),W.publisher["wording_"+t].onAssign(this.onAssign),W.callApi(this.node,t)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};W.publisher=O.get("sonic-wording",{localStorageMode:"enabled"}),W.firstCall=!0,W.versionProviderHandlers=new Map;let Ve=W;const Fn=oe(Ve);var jn=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,jt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Rn(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&jn(t,r,e),e};let Vs=!1,ki=new Set;const et=(s,t)=>{var e;const r=(e=class extends s{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.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=l=>{this.props=l}}hasAncestorAttribute(n){return this.getAncestorAttributeValue(n)!=null}getAncestorAttributeValue(n){return Y.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(p=>p.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 p of h)if(l&&p.isIntersecting){l=!1,c.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},n);c.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),Ve.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const n=this.debug.style;n.position="fixed",n.top="0",n.right="0",n.margin="auto",n.borderRadius=".7rem",n.backgroundColor="#0f1729",n.color="#c5d4f9",n.padding="16px 16px",n.margin="16px 16px",n.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",n.overflowY="auto",n.zIndex="99999999",n.maxHeight="calc(100vh - 32px)",n.fontFamily="Consolas, monospace",n.maxWidth="min(50vw,25rem)",n.fontSize="12px",n.minWidth="300px",n.overflowWrap="break-word",n.resize="vertical"}this.addEventListener("click",n=>{n.ctrlKey&&(n.preventDefault(),Vs=!Vs)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Vs||this.removeDebugger(),document.body.appendChild(this.debug),ki.add(this.debug)}),this.addEventListener("mouseout",()=>{Vs||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
64
64
  <div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
65
65
  Variable disponible dans la console<br>
66
66
  ctrl + Clique : épingler / désépingler
67
67
  </div>
68
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){mi.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),mi=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&&Oe.callApi(this,l.substring(8));Oe.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return Cs.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=k.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",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=tt.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){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 Dt([a({type:Number})],i.prototype,"collectDependenciesVersion",2),Dt([a({type:Boolean})],i.prototype,"displayContents",2),Dt([a({type:Boolean})],i.prototype,"noAutoFill",2),Dt([a({type:Boolean})],i.prototype,"forceAutoFill",2),Dt([a({type:Object})],i.prototype,"propertyMap",2),Dt([a({type:String,attribute:"data-title"})],i.prototype,"title",2),Dt([a({reflect:!0})],i.prototype,"dataProvider",2),Dt([a()],i.prototype,"bindPublisher",2),Dt([a()],i.prototype,"props",1),Dt([E()],i.prototype,"shouldRenderLazy",2),i};var un=Object.defineProperty,pn=(r,t,i,s)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,i,e)||e);return e&&un(t,i,e),e};const Ze=r=>{class t extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const s=this.templates||[...this.querySelectorAll("template")];for(const e of s)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=s.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=s),super.connectedCallback()}}return pn([a({type:Array})],t.prototype,"templates"),t};var fn=Object.defineProperty,bn=Object.getOwnPropertyDescriptor,K=(r,t,i,s)=>{for(var e=s>1?void 0:s?bn(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&fn(t,i,e),e};const mn="sonic-date";Qs(()=>R.updateComponentsLanguage());let R=class extends Q(Ze(x)){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.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,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}static updateComponentsLanguage(){R.dateCompnents.forEach(r=>r.pageLanguage=q.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=this.wording_billet_periode_validite?.split("%s").map(t=>t.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=q.getLanguage(),R.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),R.dateCompnents.delete(this)}getDatesParts(r,t,i){const s=this.startDateObject;s.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=s.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete i.hour,delete i.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,i).formatRangeToParts(s,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,i).formatToParts(s);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=ys.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}willUpdate(r){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const t=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=t}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return A;const r={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(r.weekday=this.weekday||"short"),this.hour!=="hidden"&&(r.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(r.minute=this.minute||"2-digit"),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.computedStartDate,this.computedEndDate,r);return j(`${t.map(i=>{const s=this.templateParts[i.type];if(s){const n=document.importNode(s.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=i.value),n.outerHTML}const e=document.createElement("span");return e.innerText=i.value,e.className=i.type,`<span class="${i.type}">${i.value}</span>`}).join("")}`)}};R.dateCompnents=new Set,K([a()],R.prototype,"wording_billet_periode_validite",1),K([a({type:Boolean})],R.prototype,"designMode",2),K([a({type:String})],R.prototype,"time_zone",2),K([a({type:Number})],R.prototype,"date",2),K([a({type:String})],R.prototype,"date_string",2),K([a({type:String})],R.prototype,"start_date_string",2),K([a({type:String})],R.prototype,"end_date_string",2),K([a({type:Number})],R.prototype,"start_date",2),K([a({type:Number})],R.prototype,"end_date",2),K([a({type:Boolean})],R.prototype,"hide_hours",2),K([a({type:String})],R.prototype,"era",2),K([a({type:String})],R.prototype,"year",2),K([a({type:String})],R.prototype,"month",2),K([a({type:String})],R.prototype,"day",2),K([a({type:String})],R.prototype,"weekday",2),K([a({type:String})],R.prototype,"hour",2),K([a({type:Boolean})],R.prototype,"hour12",2),K([a({type:String})],R.prototype,"minute",2),K([a({type:String})],R.prototype,"language",2),K([a({type:Boolean})],R.prototype,"renderIf",2),K([a({type:Boolean})],R.prototype,"now",2),R=K([P(mn)],R);let et=(Z=class{static listen(){if(!Z.listening)return;const t=document.location?.href.replace(document.location.origin,"");Z.prevURL&&Z.prevURL!=t&&(Z.prevURL=t,Z.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(Z.listen)}static offChange(t){const i=Z.listeners.indexOf(t);i!=-1&&(Z.listeners.splice(i,1),Z.listeners.length==0&&(Z.listening=!1))}static onChange(t){Z.listening||(Z.listening=!0,Z.listen()),Z.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const i=t.goBack,s=document.referrer;if(i!=null){const h=document.location.origin,u=(i||h).toString(),m=s.indexOf("http")==0?new URL(s).origin!=h:!1,y=s=="",p=history.length<3,v=y&&p,_=u!=document.location.href;if(m&&_||v){const f=history.state||{};f.concorde=f.concorde||{},f.concorde.hasDoneHistoryBack=!0,history.pushState(f,document.title),history.back(),document.location.replace(u)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=t.href?.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 h of n)h!=c&&l.push(h),c=h;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){if(t.autoActive=="disabled")return;const i=t.href?.toString()||"";if(t.href&&i.indexOf("http")!=0){const s=new URL(i,document.location.href),e=new URL(t.location||"",document.location.origin);let o=!1;t.autoActive=="strict"?o=s.pathname==e.pathname&&s.hash==e.hash&&s.search==e.search:t.autoActive=="strict-path-only"?o=s.pathname==e.pathname&&s.hash==e.hash:o=e.href.indexOf(s.href)==0,o?t.setAttribute("active","true"):t.removeAttribute("active")}}},Z.listeners=[],Z.listening=!1,Z.prevURL=document.location?.href.replace(document.location.origin,""),Z);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){ki.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),ki=new Set}getApiConfiguration(){return Y.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of n)l.indexOf("wording_")==0&&Ve.callApi(this,l.substring(8));Ve.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return Is.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=O.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",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=rt.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){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 jt([a({type:Number})],r.prototype,"collectDependenciesVersion",2),jt([a({type:Boolean})],r.prototype,"displayContents",2),jt([a({type:Boolean})],r.prototype,"noAutoFill",2),jt([a({type:Boolean})],r.prototype,"forceAutoFill",2),jt([a({type:Object})],r.prototype,"propertyMap",2),jt([a({type:String,attribute:"data-title"})],r.prototype,"title",2),jt([a({reflect:!0})],r.prototype,"dataProvider",2),jt([a()],r.prototype,"bindPublisher",2),jt([a()],r.prototype,"props",1),jt([T()],r.prototype,"shouldRenderLazy",2),r};var zn=Object.defineProperty,Un=(s,t,r,i)=>{for(var e=void 0,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(t,r,e)||e);return e&&zn(t,r,e),e};const as=s=>{class t extends s{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 Un([a({type:Array})],t.prototype,"templates"),t};var Vn=Object.defineProperty,Bn=Object.getOwnPropertyDescriptor,Z=(s,t,r,i)=>{for(var e=i>1?void 0:i?Bn(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Vn(t,r,e),e};const Hn="sonic-date";hi(()=>V.updateComponentsLanguage());let V=class extends et(as(P)){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.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,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}static updateComponentsLanguage(){V.dateCompnents.forEach(s=>s.pageLanguage=Y.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(s){s||(s="Du %s au %s"),this._wording_billet_periode_validite=s,this.duAu=this.wording_billet_periode_validite?.split("%s").map(t=>t.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=Y.getLanguage(),V.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),V.dateCompnents.delete(this)}getDatesParts(s,t,r){const i=this.startDateObject;i.setTime(s*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 r.hour,delete r.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,r).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,r).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=Ds.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(s){return new Date(s).getTime()/1e3}willUpdate(s){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const t=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=t}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return D;const s={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(s.weekday=this.weekday||"short"),this.hour!=="hidden"&&(s.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(s.minute=this.minute||"2-digit"),this.era&&(s.era=this.era),this.time_zone&&(s.timeZone=this.time_zone);const t=this.getDatesParts(this.computedStartDate,this.computedEndDate,s);return U(`${t.map(r=>{const i=this.templateParts[r.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=r.value),n.outerHTML}const e=document.createElement("span");return e.innerText=r.value,e.className=r.type,`<span class="${r.type}">${r.value}</span>`}).join("")}`)}};V.dateCompnents=new Set,Z([a()],V.prototype,"wording_billet_periode_validite",1),Z([a({type:Boolean})],V.prototype,"designMode",2),Z([a({type:String})],V.prototype,"time_zone",2),Z([a({type:Number})],V.prototype,"date",2),Z([a({type:String})],V.prototype,"date_string",2),Z([a({type:String})],V.prototype,"start_date_string",2),Z([a({type:String})],V.prototype,"end_date_string",2),Z([a({type:Number})],V.prototype,"start_date",2),Z([a({type:Number})],V.prototype,"end_date",2),Z([a({type:Boolean})],V.prototype,"hide_hours",2),Z([a({type:String})],V.prototype,"era",2),Z([a({type:String})],V.prototype,"year",2),Z([a({type:String})],V.prototype,"month",2),Z([a({type:String})],V.prototype,"day",2),Z([a({type:String})],V.prototype,"weekday",2),Z([a({type:String})],V.prototype,"hour",2),Z([a({type:Boolean})],V.prototype,"hour12",2),Z([a({type:String})],V.prototype,"minute",2),Z([a({type:String})],V.prototype,"language",2),Z([a({type:Boolean})],V.prototype,"renderIf",2),Z([a({type:Boolean})],V.prototype,"now",2),V=Z([C(Hn)],V);let ot=(Q=class{static listen(){if(!Q.listening)return;const t=document.location?.href.replace(document.location.origin,"");Q.prevURL&&Q.prevURL!=t&&(Q.prevURL=t,Q.listeners.forEach(r=>{r.location=t})),window.requestAnimationFrame(Q.listen)}static offChange(t){const r=Q.listeners.indexOf(t);r!=-1&&(Q.listeners.splice(r,1),Q.listeners.length==0&&(Q.listening=!1))}static onChange(t){Q.listening||(Q.listening=!0,Q.listen()),Q.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const r=t.goBack,i=document.referrer;if(r!=null){const h=document.location.origin,p=(r||h).toString(),f=i.indexOf("http")==0?new URL(i).origin!=h:!1,_=i=="",y=history.length<3,g=_&&y,v=p!=document.location.href;if(f&&v||g){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(p)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=t.href?.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 h of n)h!=c&&l.push(h),c=h;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){if(t.autoActive=="disabled")return;const r=t.href?.toString()||"";if(t.href&&r.indexOf("http")!=0){const i=new URL(r,document.location.href),e=new URL(t.location||"",document.location.origin);let o=!1;t.autoActive=="strict"?o=i.pathname==e.pathname&&i.hash==e.hash&&i.search==e.search:t.autoActive=="strict-path-only"?o=i.pathname==e.pathname&&i.hash==e.hash:o=e.href.indexOf(i.href)==0,o?t.setAttribute("active","true"):t.removeAttribute("active")}}},Q.listeners=[],Q.listening=!1,Q.prevURL=document.location?.href.replace(document.location.origin,""),Q);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
72
- */const yr="important",gn=" !"+yr,pt=Zt(class extends De{constructor(r){if(super(r),r.type!==he.ATTRIBUTE||r.name!=="style"||r.strings?.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,i)=>{const s=r[i];return s==null?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(r,[t]){const{style:i}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?i.removeProperty(s):i[s]=null);for(const s in t){const e=t[s];if(e!=null){this.ft.add(s);const o=typeof e=="string"&&e.endsWith(gn);s.includes("-")||o?i.setProperty(s,o?e.slice(0,-11):e,o?yr:""):i[s]=e}}return vt}});var vn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,Ot=(r,t,i,s)=>{for(var e=s>1?void 0:s?yn(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&vn(t,i,e),e};const Es=new Map,Le=r=>{class t extends r{constructor(...s){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,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(s){this.hasAttribute("name")&&!this.forceAutoFill&&(s=this.getAttribute("name")),this._name=s,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}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?k.get(this.formDataProvider):null}setFormPublisherValue(s){const e=this.getFormPublisher();e&&ut(e,this.name).set(s)}getFormPublisherValue(){const s=this.getFormPublisher();return s?ut(s,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(s){this.value=s}setFormValueFromPublisher(s){this.value=s}get value(){return this._value}set value(s){s==null&&(s=""),tt.isObject(s)&&Object.prototype.hasOwnProperty.call(s,"__value")&&s._value==null&&(s=""),this._value!=s&&(this._value=s,this.updateDataValue(),this.requestUpdate())}initPublisher(){let s=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&ut(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&s&&ut(s,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&&ut(this.publisher,this._name).onAssign(this.onValueAssign),s=this.getFormPublisher(),this._name&&s&&(ut(s,this._name).onAssign(this.onFormValueAssign),s.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(s){this.value=s.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const s=this.getAncestorAttributeValue("data-keyboard-nav");if(!s)return;const e=s.split(" "),o=e[0];if(!o)return;for(const l of e){Es.has(l)||Es.set(l,[]);const c=Es.get(l);c?.indexOf(this)==-1&&c.push(this)}const n=Es.get(o);this.addEventListener("keydown",l=>{const c=l;if(!["ArrowDown","ArrowUp"].includes(c.key))return;const h="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",u=n?.filter(y=>{const p=y.shadowRoot?.querySelector(h);if(!p)return!1;const v=window.getComputedStyle(p);return v.display!=="none"&&v.display!==""&&v.pointerEvents!="none"&&v.visibility!=="hidden"&&p.getBoundingClientRect().width>0});let d=null;if(c.key=="ArrowDown"&&u){const y=u.indexOf(this);y==u.length-1?d=u[0]:d=u[y+1]}else if(c.key=="ArrowUp"&&u){const y=u.indexOf(this);y==0?d=u[u.length-1]:d=u[y-1]}const m=d?.shadowRoot?.querySelector(h);m&&m.focus&&(m.focus(),l.preventDefault(),l.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&ut(this.publisher,this._name).offAssign(this.onValueAssign);const s=this.getFormPublisher();this._name&&s&&(ut(s,this._name).offAssign(this.onFormValueAssign),s.offFormInvalidate(this.onFormDataInValidate))}}return Ot([a({type:Boolean,reflect:!0})],t.prototype,"touched",2),Ot([a({type:Boolean})],t.prototype,"error",2),Ot([a({type:Boolean})],t.prototype,"autofocus",2),Ot([a({type:Boolean})],t.prototype,"required",2),Ot([a({type:Boolean})],t.prototype,"forceAutoFill",2),Ot([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),Ot([a({type:String,attribute:"data-aria-label"})],t.prototype,"ariaLabel",2),Ot([a({type:String,attribute:"data-aria-labelledby"})],t.prototype,"ariaLabelledby",2),Ot([a()],t.prototype,"name",1),Ot([a()],t.prototype,"value",1),t};let _n=class Pe{static areEqual(t,i){return t.length===i.length?t.every((s,e)=>s===i[e]):!1}static from2d(t){return{to1D:()=>{let i=[];return t.forEach(s=>i=i.concat(s)),this.from(i)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:i=>{if(t.length<1)return!0;const s=(t[0]||{})[i];return t.every(e=>(e||{})[i]==s)}})})}),value:()=>({forKey:i=>Pe.from(t.map(s=>s[i]))}),copy:()=>({fromKey:i=>({toKey:s=>{t.forEach(e=>{e[s]=Array.isArray(e[i])?[...e[i]]:typeof e[i]=="object"&&e[i]!=null?{...e[i]}:e[i]})}})})}),map:i=>Pe.from(t.map(i)),filter:i=>Pe.from(t.filter(i)),find:i=>t.find(i),some:i=>t.some(i),every:i=>t.every(i),group:()=>({byKey:i=>{const s=[],e=new Map;for(const o of t){const n=o[i];if(!e.has(n)){const l=s.length;e.set(n,l);const c={items:[]};c[i]=n,s.push(c)}s[e.get(n)].items.push(o)}return Pe.from(s)}}),without:()=>({duplicates:()=>({forKey:i=>{const s=[...new Set(t.map(e=>e[i]))];return Pe.from(s.map(e=>t.find(o=>o[i]==e)))}}),itemsIn:i=>({havingSameValue:()=>({forKey:s=>{const e=(o,n)=>l=>o[n]!=l[n];return Pe.from(t.filter(o=>i.every(e(o,s))))}})})})}}};function wn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ge={exports:{}},xn=Ge.exports,_r;function Pn(){return _r||(_r=1,(function(r,t){var i=[].slice;(function(s,e){return t!==null?r.exports=e():s.UrlPattern=e()})(xn,function(){var s,e,o,n,l,c,h,u,d,m,y,p,v,_,D;return d=function(f){return f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(f,b){var w,S,O;for(O=[],w=-1,S=f.length;++w<S;)O=O.concat(b(f[w]));return O},_=function(f,b){var w,S,O;for(O="",w=-1,S=f.length;++w<S;)O+=b(f[w]);return O},v=function(f){return new RegExp(f.toString()+"|").exec("").length-1},y=function(f,b){var w,S,O,H,X;for(H={},w=-1,O=f.length;++w<O;)S=f[w],X=b[w],X!=null&&(H[S]!=null?(Array.isArray(H[S])||(H[S]=[H[S]]),H[S].push(X)):H[S]=X);return H},s={},s.Result=function(f,b){this.value=f,this.rest=b},s.Tagged=function(f,b){this.tag=f,this.value=b},s.tag=function(f,b){return function(w){var S,O;if(S=b(w),S!=null)return O=new s.Tagged(f,S.value),new s.Result(O,S.rest)}},s.regex=function(f){return function(b){var w,S;if(w=f.exec(b),w!=null)return S=w[0],new s.Result(S,b.slice(S.length))}},s.sequence=function(){var f;return f=1<=arguments.length?i.call(arguments,0):[],function(b){var w,S,O,H,X,nt;for(w=-1,S=f.length,nt=[],H=b;++w<S;){if(O=f[w],X=O(H),X==null)return;nt.push(X.value),H=X.rest}return new s.Result(nt,H)}},s.pick=function(){var f,b;return f=arguments[0],b=2<=arguments.length?i.call(arguments,1):[],function(w){var S,O;if(O=s.sequence.apply(s,b)(w),O!=null)return S=O.value,O.value=S[f],O}},s.string=function(f){var b;return b=f.length,function(w){if(w.slice(0,b)===f)return new s.Result(f,w.slice(b))}},s.lazy=function(f){var b;return b=null,function(w){return b==null&&(b=f()),b(w)}},s.baseMany=function(f,b,w,S,O){var H,X,nt,vs;for(nt=O,vs=w?"":[];!(b!=null&&(H=b(nt),H!=null)||(X=f(nt),X==null));)w?vs+=X.value:vs.push(X.value),nt=X.rest;if(!(S&&vs.length===0))return new s.Result(vs,nt)},s.many1=function(f){return function(b){return s.baseMany(f,null,!1,!0,b)}},s.concatMany1Till=function(f,b){return function(w){return s.baseMany(f,b,!0,!0,w)}},s.firstChoice=function(){var f;return f=1<=arguments.length?i.call(arguments,0):[],function(b){var w,S,O,H;for(w=-1,S=f.length;++w<S;)if(O=f[w],H=O(b),H!=null)return H}},p=function(f){var b;return b={},b.wildcard=s.tag("wildcard",s.string(f.wildcardChar)),b.optional=s.tag("optional",s.pick(1,s.string(f.optionalSegmentStartChar),s.lazy(function(){return b.pattern}),s.string(f.optionalSegmentEndChar))),b.name=s.regex(new RegExp("^["+f.segmentNameCharset+"]+")),b.named=s.tag("named",s.pick(1,s.string(f.segmentNameStartChar),s.lazy(function(){return b.name}))),b.escapedChar=s.pick(1,s.string(f.escapeChar),s.regex(/^./)),b.static=s.tag("static",s.concatMany1Till(s.firstChoice(s.lazy(function(){return b.escapedChar}),s.regex(/^./)),s.firstChoice(s.string(f.segmentNameStartChar),s.string(f.optionalSegmentStartChar),s.string(f.optionalSegmentEndChar),b.wildcard))),b.token=s.lazy(function(){return s.firstChoice(b.wildcard,b.optional,b.named,b.static)}),b.pattern=s.many1(s.lazy(function(){return b.token})),b},u={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(f,b){if(Array.isArray(f))return _(f,function(w){return c(w,b)});switch(f.tag){case"wildcard":return"(.*?)";case"named":return"(["+b+"]+)";case"static":return d(f.value);case"optional":return"(?:"+c(f.value,b)+")?"}},l=function(f,b){return b==null&&(b=u.segmentValueCharset),"^"+c(f,b)+"$"},n=function(f){if(Array.isArray(f))return h(f,n);switch(f.tag){case"wildcard":return["_"];case"named":return[f.value];case"static":return[];case"optional":return n(f.value)}},m=function(f,b,w,S){var O,H,X,nt;if(S==null&&(S=!1),nt=f[b],nt==null){if(S)throw new Error("no values provided for key `"+b+"`");return}if(O=w[b]||0,H=Array.isArray(nt)?nt.length-1:0,O>H){if(S)throw new Error("too few values provided for key `"+b+"`");return}return X=Array.isArray(nt)?nt[O]:nt,S&&(w[b]=O+1),X},o=function(f,b,w){var S,O;if(Array.isArray(f)){for(S=-1,O=f.length;++S<O;)if(o(f[S],b,w))return!0;return!1}switch(f.tag){case"wildcard":return m(b,"_",w,!1)!=null;case"named":return m(b,f.value,w,!1)!=null;case"static":return!1;case"optional":return o(f.value,b,w)}},D=function(f,b,w){if(Array.isArray(f))return _(f,function(S){return D(S,b,w)});switch(f.tag){case"wildcard":return m(b,"_",w,!0);case"named":return m(b,f.value,w,!0);case"static":return f.value;case"optional":return o(f.value,b,w)?D(f.value,b,w):""}},e=function(f,b){var w,S,O,H,X;if(f instanceof e){this.isRegex=f.isRegex,this.regex=f.regex,this.ast=f.ast,this.names=f.names;return}if(this.isRegex=f instanceof RegExp,!(typeof f=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=f,b!=null){if(!Array.isArray(b))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(w=v(this.regex),b.length!==w)throw new Error("regex contains "+w+" groups but array of group names contains "+b.length);this.names=b}return}if(f==="")throw new Error("argument must not be the empty string");if(X=f.replace(/\s+/g,""),X!==f)throw new Error("argument must not contain whitespace");if(S={escapeChar:b?.escapeChar||u.escapeChar,segmentNameStartChar:b?.segmentNameStartChar||u.segmentNameStartChar,segmentNameCharset:b?.segmentNameCharset||u.segmentNameCharset,segmentValueCharset:b?.segmentValueCharset||u.segmentValueCharset,optionalSegmentStartChar:b?.optionalSegmentStartChar||u.optionalSegmentStartChar,optionalSegmentEndChar:b?.optionalSegmentEndChar||u.optionalSegmentEndChar,wildcardChar:b?.wildcardChar||u.wildcardChar},H=p(S),O=H.pattern(f),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,S.segmentValueCharset)),this.names=n(this.ast)},e.prototype.match=function(f){var b,w;return w=this.regex.exec(f),w==null?null:(b=w.slice(1),this.names?y(this.names,b):b)},e.prototype.stringify=function(f){if(f==null&&(f={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(f!==Object(f))throw new Error("argument must be an object or undefined");return D(this.ast,f,{})},e.escapeForRegex=d,e.concatMap=h,e.stringConcatMap=_,e.regexGroupCount=v,e.keysAndValuesToObject=y,e.P=s,e.newParser=p,e.defaultOptions=u,e.astNodeToRegexString=l,e.astNodeToNames=n,e.getParam=m,e.astNodeContainsSegmentsForProvidedParams=o,e.stringify=D,e})})(Ge,Ge.exports)),Ge.exports}var Cn=Pn();const zt=wn(Cn);class Ts{constructor(t){this.path=Ts.normalizePath(t)}getDataProviderKey(){return new Ue(this.path)}static normalizePath(t){const i=String(t).trim();if(!i)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(i)){let c;try{c=new URL(i)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return c.pathname=c.pathname.replace(/\/+/g,"/"),c.href}const s=i.indexOf("?"),e=i.indexOf("#");let o=i.length;s>=0&&(o=Math.min(o,s)),e>=0&&(o=Math.min(o,e));let n=i.slice(0,o);const l=i.slice(o);if(n=n.replace(/^\/+/,""),n=n.replace(/\/+/g,"/"),!n&&l)throw new RangeError("Endpoint: path cannot be empty");return n+l}static isNonEmpty(t){return String(t).trim().length>0}static looksLikeDataProviderPath(t){return/^\s*dataProvider\s*\(/i.test(String(t))}toString(){return this.path}}const $n=_o,Sn=_n,An=Cs,kn=ys,Gt=q,Dn=et,Xe=tt,On=de,Ln=zt;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:$n,Arrays:Sn,DataBindObserver:An,Format:kn,HTML:Gt,LocationHandler:Dn,Objects:Xe,PublisherManager:k,api:On,URLPattern:Ln,Endpoint:Ts,DataProviderKey:Ue};var En=Object.defineProperty,Tn=Object.getOwnPropertyDescriptor,Qe=(r,t,i,s)=>{for(var e=s>1?void 0:s?Tn(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&En(t,i,e),e};const gi=r=>{class t extends r{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const s=this.getAttribute("name"),e=this.getCheckAllPublisher(),o=this.getFormPublisher();if(e?.hasCheckAll.get()&&!this.checksAll()&&e&&o&&s){if(this.getFormPublisherValue()?.length)(this.checked===null||e.checkMode.get()=="noneChecked"||e.checkMode.get()==null)&&e.checkMode.set("someUnchecked");else{e.checkMode.set("noneChecked");return}const n=this.getFormPublisherValue(),l=e.values.get();if(l&&l.length){let c=l.length;for(const h of l)n.indexOf(h)==-1&&(c-=1);c==l.length&&e.checkMode.set("allChecked"),c==0&&e.checkMode.set("noneChecked")}l.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=s=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),s=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),s=="noneChecked"&&(this.checked=null),s=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(s){if(this.value==s||(this.hasAttribute("value")&&!this.forceAutoFill&&(s=this.getAttribute("value")),this._value==s)||s==null||(this._value=s,!this.value))return;if(this.getFormPublisher()&&this.name){let o=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=o==s?!0:null),Array.isArray(o)||(o=[]),o.indexOf(s)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(s){if(this.setCheckedValue(s),this.checksAll()){const e=this.getCheckAllPublisher();e&&(this.checked===!0?e.checkMode.set("allChecked"):this.checked===null&&(e.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const e=this.getFormPublisher();if(e){const o=this.getFormPublisherValue();if((this.unique||this.radio)&&o!==null&&o!==void 0&&o.toString().length>0)return;e.isFormValid=!1,s.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(s){this._checked!=s&&(this._checked=s,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const s=this.checked===!0?this.radio?!0:null:!0;this.checked=s;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){let s=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:s;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(s)||(s=[]);const e=s.slice(0),o=e.indexOf(this.value);return this.checked===!0&&o===-1&&!this.checksAll()&&e.push(this.value),this.checked===null&&o!==-1&&e.splice(o,1),e}setFormValueFromPublisher(s){if(this.unique||this.radio){this.checked=this.value==s?!0:null;return}Array.isArray(s)||(s=[]),!this.checksAll()&&(this.checked=s.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const s=this.formDataProvider,e=this.getAttribute("name");return!s||!e?null:k.get(s+"/"+e+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const s=this.getCheckAllPublisher();if(s&&(s.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=s.values.get().slice(0),o=e.indexOf(this.value);o!=-1&&(e.splice(o,1),s.values.set(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.set(!0),e.values.get()||e.values.set([]),this.checksAll()||e.values.set([...e.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return Qe([a()],t.prototype,"value",1),Qe([a()],t.prototype,"forceAutoFill",2),Qe([a({type:Boolean})],t.prototype,"unique",2),Qe([a({type:Boolean})],t.prototype,"radio",2),Qe([a()],t.prototype,"checked",1),t};/**
72
+ */const Rr="important",qn=" !"+Rr,gt=oe(class extends Ue{constructor(s){if(super(s),s.type!==$e.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce(((t,r)=>{const i=s[r];return i==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(s,[t]){const{style:r}=s.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("-")?r.removeProperty(i):r[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(qn);i.includes("-")||o?r.setProperty(i,o?e.slice(0,-11):e,o?Rr:""):r[i]=e}}return xt}});var Wn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,Rt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Kn(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Wn(t,r,e),e};const Bs=new Map,Be=s=>{class t extends s{constructor(...i){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,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(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}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?O.get(this.formDataProvider):null}setFormPublisherValue(i){const e=this.getFormPublisher();e&&bt(e,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?bt(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=""),rt.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&&bt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&i&&bt(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&&bt(this.publisher,this._name).onAssign(this.onValueAssign),i=this.getFormPublisher(),this._name&&i&&(bt(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){Bs.has(l)||Bs.set(l,[]);const c=Bs.get(l);c?.indexOf(this)==-1&&c.push(this)}const n=Bs.get(o);this.addEventListener("keydown",l=>{const c=l;if(!["ArrowDown","ArrowUp"].includes(c.key))return;const h="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",p=n?.filter(_=>{const y=_.shadowRoot?.querySelector(h);if(!y)return!1;const g=window.getComputedStyle(y);return g.display!=="none"&&g.display!==""&&g.pointerEvents!="none"&&g.visibility!=="hidden"&&y.getBoundingClientRect().width>0});let d=null;if(c.key=="ArrowDown"&&p){const _=p.indexOf(this);_==p.length-1?d=p[0]:d=p[_+1]}else if(c.key=="ArrowUp"&&p){const _=p.indexOf(this);_==0?d=p[p.length-1]:d=p[_-1]}const f=d?.shadowRoot?.querySelector(h);f&&f.focus&&(f.focus(),l.preventDefault(),l.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&bt(this.publisher,this._name).offAssign(this.onValueAssign);const i=this.getFormPublisher();this._name&&i&&(bt(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return Rt([a({type:Boolean,reflect:!0})],t.prototype,"touched",2),Rt([a({type:Boolean})],t.prototype,"error",2),Rt([a({type:Boolean})],t.prototype,"autofocus",2),Rt([a({type:Boolean})],t.prototype,"required",2),Rt([a({type:Boolean})],t.prototype,"forceAutoFill",2),Rt([a({type:Boolean,reflect:!0})],t.prototype,"disabled",2),Rt([a({type:String,attribute:"data-aria-label"})],t.prototype,"ariaLabel",2),Rt([a({type:String,attribute:"data-aria-labelledby"})],t.prototype,"ariaLabelledby",2),Rt([a()],t.prototype,"name",1),Rt([a()],t.prototype,"value",1),t};let Yn=class Ne{static areEqual(t,r){return t.length===r.length?t.every((i,e)=>i===r[e]):!1}static from2d(t){return{to1D:()=>{let r=[];return t.forEach(i=>r=r.concat(i)),this.from(r)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:r=>{if(t.length<1)return!0;const i=(t[0]||{})[r];return t.every(e=>(e||{})[r]==i)}})})}),value:()=>({forKey:r=>Ne.from(t.map(i=>i[r]))}),copy:()=>({fromKey:r=>({toKey:i=>{t.forEach(e=>{e[i]=Array.isArray(e[r])?[...e[r]]:typeof e[r]=="object"&&e[r]!=null?{...e[r]}:e[r]})}})})}),map:r=>Ne.from(t.map(r)),filter:r=>Ne.from(t.filter(r)),find:r=>t.find(r),some:r=>t.some(r),every:r=>t.every(r),group:()=>({byKey:r=>{const i=[],e=new Map;for(const o of t){const n=o[r];if(!e.has(n)){const l=i.length;e.set(n,l);const c={items:[]};c[r]=n,i.push(c)}i[e.get(n)].items.push(o)}return Ne.from(i)}}),without:()=>({duplicates:()=>({forKey:r=>{const i=[...new Set(t.map(e=>e[r]))];return Ne.from(i.map(e=>t.find(o=>o[r]==e)))}}),itemsIn:r=>({havingSameValue:()=>({forKey:i=>{const e=(o,n)=>l=>o[n]!=l[n];return Ne.from(t.filter(o=>r.every(e(o,i))))}})})})}}};function Gn(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var ls={exports:{}},Zn=ls.exports,zr;function Xn(){return zr||(zr=1,(function(s,t){var r=[].slice;(function(i,e){return t!==null?s.exports=e():i.UrlPattern=e()})(Zn,function(){var i,e,o,n,l,c,h,p,d,f,_,y,g,v,A;return d=function(u){return u.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},h=function(u,b){var w,x,k;for(k=[],w=-1,x=u.length;++w<x;)k=k.concat(b(u[w]));return k},v=function(u,b){var w,x,k;for(k="",w=-1,x=u.length;++w<x;)k+=b(u[w]);return k},g=function(u){return new RegExp(u.toString()+"|").exec("").length-1},_=function(u,b){var w,x,k,M,K;for(M={},w=-1,k=u.length;++w<k;)x=u[w],K=b[w],K!=null&&(M[x]!=null?(Array.isArray(M[x])||(M[x]=[M[x]]),M[x].push(K)):M[x]=K);return M},i={},i.Result=function(u,b){this.value=u,this.rest=b},i.Tagged=function(u,b){this.tag=u,this.value=b},i.tag=function(u,b){return function(w){var x,k;if(x=b(w),x!=null)return k=new i.Tagged(u,x.value),new i.Result(k,x.rest)}},i.regex=function(u){return function(b){var w,x;if(w=u.exec(b),w!=null)return x=w[0],new i.Result(x,b.slice(x.length))}},i.sequence=function(){var u;return u=1<=arguments.length?r.call(arguments,0):[],function(b){var w,x,k,M,K,I;for(w=-1,x=u.length,I=[],M=b;++w<x;){if(k=u[w],K=k(M),K==null)return;I.push(K.value),M=K.rest}return new i.Result(I,M)}},i.pick=function(){var u,b;return u=arguments[0],b=2<=arguments.length?r.call(arguments,1):[],function(w){var x,k;if(k=i.sequence.apply(i,b)(w),k!=null)return x=k.value,k.value=x[u],k}},i.string=function(u){var b;return b=u.length,function(w){if(w.slice(0,b)===u)return new i.Result(u,w.slice(b))}},i.lazy=function(u){var b;return b=null,function(w){return b==null&&(b=u()),b(w)}},i.baseMany=function(u,b,w,x,k){var M,K,I,Nt;for(I=k,Nt=w?"":[];!(b!=null&&(M=b(I),M!=null)||(K=u(I),K==null));)w?Nt+=K.value:Nt.push(K.value),I=K.rest;if(!(x&&Nt.length===0))return new i.Result(Nt,I)},i.many1=function(u){return function(b){return i.baseMany(u,null,!1,!0,b)}},i.concatMany1Till=function(u,b){return function(w){return i.baseMany(u,b,!0,!0,w)}},i.firstChoice=function(){var u;return u=1<=arguments.length?r.call(arguments,0):[],function(b){var w,x,k,M;for(w=-1,x=u.length;++w<x;)if(k=u[w],M=k(b),M!=null)return M}},y=function(u){var b;return b={},b.wildcard=i.tag("wildcard",i.string(u.wildcardChar)),b.optional=i.tag("optional",i.pick(1,i.string(u.optionalSegmentStartChar),i.lazy(function(){return b.pattern}),i.string(u.optionalSegmentEndChar))),b.name=i.regex(new RegExp("^["+u.segmentNameCharset+"]+")),b.named=i.tag("named",i.pick(1,i.string(u.segmentNameStartChar),i.lazy(function(){return b.name}))),b.escapedChar=i.pick(1,i.string(u.escapeChar),i.regex(/^./)),b.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return b.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(u.segmentNameStartChar),i.string(u.optionalSegmentStartChar),i.string(u.optionalSegmentEndChar),b.wildcard))),b.token=i.lazy(function(){return i.firstChoice(b.wildcard,b.optional,b.named,b.static)}),b.pattern=i.many1(i.lazy(function(){return b.token})),b},p={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},c=function(u,b){if(Array.isArray(u))return v(u,function(w){return c(w,b)});switch(u.tag){case"wildcard":return"(.*?)";case"named":return"(["+b+"]+)";case"static":return d(u.value);case"optional":return"(?:"+c(u.value,b)+")?"}},l=function(u,b){return b==null&&(b=p.segmentValueCharset),"^"+c(u,b)+"$"},n=function(u){if(Array.isArray(u))return h(u,n);switch(u.tag){case"wildcard":return["_"];case"named":return[u.value];case"static":return[];case"optional":return n(u.value)}},f=function(u,b,w,x){var k,M,K,I;if(x==null&&(x=!1),I=u[b],I==null){if(x)throw new Error("no values provided for key `"+b+"`");return}if(k=w[b]||0,M=Array.isArray(I)?I.length-1:0,k>M){if(x)throw new Error("too few values provided for key `"+b+"`");return}return K=Array.isArray(I)?I[k]:I,x&&(w[b]=k+1),K},o=function(u,b,w){var x,k;if(Array.isArray(u)){for(x=-1,k=u.length;++x<k;)if(o(u[x],b,w))return!0;return!1}switch(u.tag){case"wildcard":return f(b,"_",w,!1)!=null;case"named":return f(b,u.value,w,!1)!=null;case"static":return!1;case"optional":return o(u.value,b,w)}},A=function(u,b,w){if(Array.isArray(u))return v(u,function(x){return A(x,b,w)});switch(u.tag){case"wildcard":return f(b,"_",w,!0);case"named":return f(b,u.value,w,!0);case"static":return u.value;case"optional":return o(u.value,b,w)?A(u.value,b,w):""}},e=function(u,b){var w,x,k,M,K;if(u instanceof e){this.isRegex=u.isRegex,this.regex=u.regex,this.ast=u.ast,this.names=u.names;return}if(this.isRegex=u instanceof RegExp,!(typeof u=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=u,b!=null){if(!Array.isArray(b))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(w=g(this.regex),b.length!==w)throw new Error("regex contains "+w+" groups but array of group names contains "+b.length);this.names=b}return}if(u==="")throw new Error("argument must not be the empty string");if(K=u.replace(/\s+/g,""),K!==u)throw new Error("argument must not contain whitespace");if(x={escapeChar:b?.escapeChar||p.escapeChar,segmentNameStartChar:b?.segmentNameStartChar||p.segmentNameStartChar,segmentNameCharset:b?.segmentNameCharset||p.segmentNameCharset,segmentValueCharset:b?.segmentValueCharset||p.segmentValueCharset,optionalSegmentStartChar:b?.optionalSegmentStartChar||p.optionalSegmentStartChar,optionalSegmentEndChar:b?.optionalSegmentEndChar||p.optionalSegmentEndChar,wildcardChar:b?.wildcardChar||p.wildcardChar},M=y(x),k=M.pattern(u),k==null)throw new Error("couldn't parse pattern");if(k.rest!=="")throw new Error("could only partially parse pattern");this.ast=k.value,this.regex=new RegExp(l(this.ast,x.segmentValueCharset)),this.names=n(this.ast)},e.prototype.match=function(u){var b,w;return w=this.regex.exec(u),w==null?null:(b=w.slice(1),this.names?_(this.names,b):b)},e.prototype.stringify=function(u){if(u==null&&(u={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(u!==Object(u))throw new Error("argument must be an object or undefined");return A(this.ast,u,{})},e.escapeForRegex=d,e.concatMap=h,e.stringConcatMap=v,e.regexGroupCount=g,e.keysAndValuesToObject=_,e.P=i,e.newParser=y,e.defaultOptions=p,e.astNodeToRegexString=l,e.astNodeToNames=n,e.getParam=f,e.astNodeContainsSegmentsForProvidedParams=o,e.stringify=A,e})})(ls,ls.exports)),ls.exports}var Qn=Xn();const Zt=Gn(Qn);class Hs{constructor(t){this.path=Hs.normalizePath(t)}getDataProviderKey(){return new Qe(this.path)}static normalizePath(t){const r=String(t).trim();if(!r)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(r)){let c;try{c=new URL(r)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return c.pathname=c.pathname.replace(/\/+/g,"/"),c.href}const i=r.indexOf("?"),e=r.indexOf("#");let o=r.length;i>=0&&(o=Math.min(o,i)),e>=0&&(o=Math.min(o,e));let n=r.slice(0,o);const l=r.slice(o);if(n=n.replace(/^\/+/,""),n=n.replace(/\/+/g,"/"),!n&&l)throw new RangeError("Endpoint: path cannot be empty");return n+l}static isNonEmpty(t){return String(t).trim().length>0}static looksLikeDataProviderPath(t){return/^\s*dataProvider\s*\(/i.test(String(t))}toString(){return this.path}}const Jn=Yo,ta=Yn,ea=Is,sa=Ds,ae=Y,ia=ot,cs=rt,ra=ne,oa=Zt;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Jn,Arrays:ta,DataBindObserver:ea,Format:sa,HTML:ae,LocationHandler:ia,Objects:cs,PublisherManager:O,api:ra,URLPattern:oa,Endpoint:Hs,DataProviderKey:Qe};var na=Object.defineProperty,aa=Object.getOwnPropertyDescriptor,hs=(s,t,r,i)=>{for(var e=i>1?void 0:i?aa(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&na(t,r,e),e};const Di=s=>{class t extends s{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const i=this.getAttribute("name"),e=this.getCheckAllPublisher(),o=this.getFormPublisher();if(e?.hasCheckAll.get()&&!this.checksAll()&&e&&o&&i){if(this.getFormPublisherValue()?.length)(this.checked===null||e.checkMode.get()=="noneChecked"||e.checkMode.get()==null)&&e.checkMode.set("someUnchecked");else{e.checkMode.set("noneChecked");return}const n=this.getFormPublisherValue(),l=e.values.get();if(l&&l.length){let c=l.length;for(const h of l)n.indexOf(h)==-1&&(c-=1);c==l.length&&e.checkMode.set("allChecked"),c==0&&e.checkMode.set("noneChecked")}l.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(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.set("allChecked"):this.checked===null&&(e.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const e=this.getFormPublisher();if(e){const o=this.getFormPublisherValue();if((this.unique||this.radio)&&o!==null&&o!==void 0&&o.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(){let i=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:i;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(i)||(i=[]);const e=i.slice(0),o=e.indexOf(this.value);return this.checked===!0&&o===-1&&!this.checksAll()&&e.push(this.value),this.checked===null&&o!==-1&&e.splice(o,1),e}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:O.get(i+"/"+e+"/_available_values_")}unset(){this.checked=null}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.set(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.set(!0),e.values.get()||e.values.set([]),this.checksAll()||e.values.set([...e.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return hs([a()],t.prototype,"value",1),hs([a()],t.prototype,"forceAutoFill",2),hs([a({type:Boolean})],t.prototype,"unique",2),hs([a({type:Boolean})],t.prototype,"radio",2),hs([a()],t.prototype,"checked",1),t};/**
73
73
  * @license
74
74
  * Copyright 2018 Google LLC
75
75
  * SPDX-License-Identifier: BSD-3-Clause
76
- */const $=r=>r??A,Lt=C`
76
+ */const S=s=>s??D,zt=$`
77
77
  /*SIZES*/
78
78
  :host {
79
79
  --sc-_fs: 1rem;
@@ -106,15 +106,15 @@
106
106
  :host([size="inherit"]) {
107
107
  --sc-_fs: 1em;
108
108
  }
109
- `;var Nn=Object.defineProperty,In=Object.getOwnPropertyDescriptor,V=(r,t,i,s)=>{for(var e=s>1?void 0:s?In(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Nn(t,i,e),e};const Mn="sonic-button";let M=class extends gi(Le(Q(x))){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?et.onChange(this):et.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(r){r.preventDefault(),et.changeFromComponent(this)}handleChange(r){if(!(r?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(r?.preventDefault(),r?.stopPropagation(),et.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),i=t?k.get(t):this.getFormPublisher();i&&i.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(){et.offChange(this),super.disconnectedCallback()}willUpdate(r){(r.has("href")||r.has("autoActive"))&&et.updateComponentActiveState(this),r.has("location")&&et.updateComponentActiveState(this)}render(){const r={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},t=g`
109
+ `;var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,q=(s,t,r,i)=>{for(var e=i>1?void 0:i?ca(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&la(t,r,e),e};const ha="sonic-button";let R=class extends Di(Be(et(P))){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(s){this._href=s;const t=this._href.toString();t&&t.indexOf("http")!=0?ot.onChange(this):ot.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(s){s.preventDefault(),ot.changeFromComponent(this)}handleChange(s){if(!(s?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(s?.preventDefault(),s?.stopPropagation(),ot.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),r=t?O.get(t):this.getFormPublisher();r&&r.set({})}}handleRepeatStart(s){this.autoRepeat&&(this.handleChange(s),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(s){if(this.name){if(s?this.setAttribute("active","true"):this.removeAttribute("active"),s==this._checked)return;super.setCheckedValue(s)}}disconnectedCallback(){ot.offChange(this),super.disconnectedCallback()}willUpdate(s){(s.has("href")||s.has("autoActive"))&&ot.updateComponentActiveState(this),s.has("location")&&ot.updateComponentActiveState(this)}render(){const s={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},t=m`
110
110
  <button
111
111
  part="button"
112
112
  class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
113
- style=${pt(r)}
114
- aria-controls=${$(this.ariaControls)}
115
- aria-expanded=${$(this.sonicAriaExpanded)}
116
- aria-label=${$(this.ariaLabel)}
117
- aria-labelledby=${$(this.ariaLabelledby)}
113
+ style=${gt(s)}
114
+ aria-controls=${S(this.ariaControls)}
115
+ aria-expanded=${S(this.sonicAriaExpanded)}
116
+ aria-label=${S(this.ariaLabel)}
117
+ aria-labelledby=${S(this.ariaLabelledby)}
118
118
  ?disabled=${this.disabled}
119
119
  @click=${this.handleChange}
120
120
  @pointerdown=${this.handleRepeatStart}
@@ -130,17 +130,17 @@
130
130
  part="suffix"
131
131
  name="suffix"
132
132
  ></slot>
133
- ${this.loading==!0?g`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
133
+ ${this.loading==!0?m`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
134
134
  </button>
135
- `;return this.href?g`<a
135
+ `;return this.href?m`<a
136
136
  href="${this.href}"
137
- download=${$(this.download)}
138
- target=${$(this.target)}
139
- aria-label=${$(this.ariaLabel)}
140
- aria-labelledby=${$(this.ariaLabelledby)}
137
+ download=${S(this.download)}
138
+ target=${S(this.target)}
139
+ aria-label=${S(this.ariaLabel)}
140
+ aria-labelledby=${S(this.ariaLabelledby)}
141
141
  @click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
142
142
  >${t}</a
143
- >`:g`${t}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};M.styles=[Lt,C`
143
+ >`:m`${t}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};R.styles=[zt,$`
144
144
  * {
145
145
  box-sizing: border-box;
146
146
  }
@@ -506,11 +506,11 @@
506
506
  transform: translate(-50%, -50%) rotate(359deg);
507
507
  }
508
508
  }
509
- `],V([a({type:String,reflect:!0})],M.prototype,"type",2),V([a({type:String,reflect:!0})],M.prototype,"variant",2),V([a({type:String,reflect:!0})],M.prototype,"size",2),V([a({type:String,reflect:!0})],M.prototype,"shape",2),V([a({type:String})],M.prototype,"direction",2),V([a({type:String,reflect:!0})],M.prototype,"alignItems",2),V([a({type:String})],M.prototype,"justify",2),V([a({type:String,reflect:!0})],M.prototype,"align",2),V([a({type:String})],M.prototype,"minWidth",2),V([a({type:Boolean,reflect:!0})],M.prototype,"icon",2),V([a({type:String})],M.prototype,"download",2),V([a({type:String})],M.prototype,"autoActive",2),V([a({type:Boolean,reflect:!0})],M.prototype,"loading",2),V([E()],M.prototype,"hasPrefix",2),V([E()],M.prototype,"hasSuffix",2),V([Se({flatten:!0,slot:"prefix"})],M.prototype,"prefixes",2),V([Se({flatten:!0,slot:"suffix"})],M.prototype,"suffixes",2),V([a({type:String})],M.prototype,"target",2),V([a({type:String})],M.prototype,"href",1),V([a({type:String})],M.prototype,"goBack",2),V([a({type:Boolean})],M.prototype,"pushState",2),V([a({type:Boolean,reflect:!0})],M.prototype,"active",2),V([a({type:Boolean,reflect:!0})],M.prototype,"autoRepeat",2),V([a({type:String,attribute:"data-aria-controls"})],M.prototype,"ariaControls",2),V([a({type:Boolean,attribute:"data-aria-expanded"})],M.prototype,"sonicAriaExpanded",2),V([E()],M.prototype,"location",2),M=V([P(Mn)],M);/**
509
+ `],q([a({type:String,reflect:!0})],R.prototype,"type",2),q([a({type:String,reflect:!0})],R.prototype,"variant",2),q([a({type:String,reflect:!0})],R.prototype,"size",2),q([a({type:String,reflect:!0})],R.prototype,"shape",2),q([a({type:String})],R.prototype,"direction",2),q([a({type:String,reflect:!0})],R.prototype,"alignItems",2),q([a({type:String})],R.prototype,"justify",2),q([a({type:String,reflect:!0})],R.prototype,"align",2),q([a({type:String})],R.prototype,"minWidth",2),q([a({type:Boolean,reflect:!0})],R.prototype,"icon",2),q([a({type:String})],R.prototype,"download",2),q([a({type:String})],R.prototype,"autoActive",2),q([a({type:Boolean,reflect:!0})],R.prototype,"loading",2),q([T()],R.prototype,"hasPrefix",2),q([T()],R.prototype,"hasSuffix",2),q([es({flatten:!0,slot:"prefix"})],R.prototype,"prefixes",2),q([es({flatten:!0,slot:"suffix"})],R.prototype,"suffixes",2),q([a({type:String})],R.prototype,"target",2),q([a({type:String})],R.prototype,"href",1),q([a({type:String})],R.prototype,"goBack",2),q([a({type:Boolean})],R.prototype,"pushState",2),q([a({type:Boolean,reflect:!0})],R.prototype,"active",2),q([a({type:Boolean,reflect:!0})],R.prototype,"autoRepeat",2),q([a({type:String,attribute:"data-aria-controls"})],R.prototype,"ariaControls",2),q([a({type:Boolean,attribute:"data-aria-expanded"})],R.prototype,"sonicAriaExpanded",2),q([T()],R.prototype,"location",2),R=q([C(ha)],R);/**
510
510
  * @license
511
511
  * Copyright 2017 Google LLC
512
512
  * SPDX-License-Identifier: BSD-3-Clause
513
- */const wr=(r,t,i)=>{const s=new Map;for(let e=t;e<=i;e++)s.set(r[e],e);return s},Ns=Zt(class extends De{constructor(r){if(super(r),r.type!==he.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,i){let s;i===void 0?i=t:t!==void 0&&(s=t);const e=[],o=[];let n=0;for(const l of r)e[n]=s?s(l,n):n,o[n]=i(l,n),n++;return{values:o,keys:e}}render(r,t,i){return this.dt(r,t,i).values}update(r,[t,i,s]){const e=en(r),{values:o,keys:n}=this.dt(t,i,s);if(!Array.isArray(e))return this.ut=n,o;const l=this.ut??=[],c=[];let h,u,d=0,m=e.length-1,y=0,p=o.length-1;for(;d<=m&&y<=p;)if(e[d]===null)d++;else if(e[m]===null)m--;else if(l[d]===n[y])c[y]=ce(e[d],o[y]),d++,y++;else if(l[m]===n[p])c[p]=ce(e[m],o[p]),m--,p--;else if(l[d]===n[p])c[p]=ce(e[d],o[p]),Ke(r,c[p+1],e[d]),d++,p--;else if(l[m]===n[y])c[y]=ce(e[m],o[y]),Ke(r,e[d],e[m]),m--,y++;else if(h===void 0&&(h=wr(n,y,p),u=wr(l,d,m)),h.has(l[d]))if(h.has(l[m])){const v=u.get(n[y]),_=v!==void 0?e[v]:null;if(_===null){const D=Ke(r,e[d]);ce(D,o[y]),c[y]=D}else c[y]=ce(_,o[y]),Ke(r,e[d],_),e[v]=null;y++}else di(e[m]),m--;else di(e[d]),d++;for(;y<=p;){const v=Ke(r,c[p+1]);ce(v,o[y]),c[y++]=v}for(;d<=m;){const v=e[d++];v!==null&&di(v)}return this.ut=n,tn(r,c),vt}}),Fn=new WeakMap;let xr=0;const vi=new Map,Pr=new WeakSet,Cr=()=>new Promise((r=>requestAnimationFrame(r))),$r=(r,t)=>{const i=r-t;return i===0?void 0:i},Sr=(r,t)=>{const i=r/t;return i===1?void 0:i},yi={left:(r,t)=>{const i=$r(r,t);return{value:i,transform:i==null||isNaN(i)?void 0:`translateX(${i}px)`}},top:(r,t)=>{const i=$r(r,t);return{value:i,transform:i==null||isNaN(i)?void 0:`translateY(${i}px)`}},width:(r,t)=>{let i;t===0&&(t=1,i={width:"1px"});const s=Sr(r,t);return{value:s,overrideFrom:i,transform:s==null||isNaN(s)?void 0:`scaleX(${s})`}},height:(r,t)=>{let i;t===0&&(t=1,i={height:"1px"});const s=Sr(r,t);return{value:s,overrideFrom:i,transform:s==null||isNaN(s)?void 0:`scaleY(${s})`}}},jn={duration:333,easing:"ease-in-out"},Rn=["left","top","width","height","opacity","color","background"],Ar=new WeakMap;class zn extends ui{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(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){this.l?.(),this.l=void 0}render(t){return A}getController(){return Fn.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[i]){const s=this.u===void 0;return s&&(this.u=t.options?.host,this.u.addController(this),this.u.updateComplete.then((e=>this.t=!0)),this.element=t.element,Ar.set(this.element,this)),this.optionsOrCallback=i,(s||typeof i!="function")&&this.p(i),this.render(i)}p(t){t=t??{};const i=this.getController();i!==void 0&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=Rn,this.options=t}m(){const t={},i=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((e=>{const o=i[e]??(yi[e]?void 0:s[e]),n=Number(o);t[e]=isNaN(n)?o+"":n})),t}v(){let t,i=!0;return this.options.guard&&(t=this.options.guard(),i=((s,e)=>{if(Array.isArray(s)){if(Array.isArray(e)&&e.length===s.length&&s.every(((o,n)=>o===e[n])))return!1}else if(e===s)return!1;return!0})(t,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&i&&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 Cr;const i=this.O(),s=this.j(this.options.keyframeOptions,i),e=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,e,i);this.log("measured",[this.A,e,o,n]),t=this.calculateKeyframes(o,n)}else{const o=vi.get(this.options.inId);if(o){vi.delete(this.options.inId);const{from:n,to:l}=this.N(o,e,i);t=this.calculateKeyframes(n,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,xr++,t.forEach((c=>c.zIndex=xr))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&vi.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Cr(),this.i?.isConnected){const i=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,i),this.options.stabilizeOut){const s=this.m();this.log("stabilizing out");const e=this.A.left-s.left,o=this.A.top-s.top;getComputedStyle(this.element).position!=="static"||e===0&&o===0||(this.element.style.position="relative"),e!==0&&(this.element.style.left=e+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(t){t&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let i=this.element.parentNode;i;i=i?.parentNode){const s=Ar.get(i);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=Pr.has(this.u);return t||this.u.updateComplete.then((()=>{Pr.add(this.u)})),t}j(t,i=this.O()){const s={...jn};return i.forEach((e=>Object.assign(s,e.options.keyframeOptions))),Object.assign(s,t),s}N(t,i,s){t={...t},i={...i};const e=s.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&&i.left!==void 0&&(t.left=o*t.left,i.left=o*i.left),t.top!==void 0&&i.top!==void 0&&(t.top=n*t.top,i.top=n*i.top)),{from:t,to:i}}calculateKeyframes(t,i,s=!1){const e={},o={};let n=!1;const l={};for(const c in i){const h=t[c],u=i[c];if(c in yi){const d=yi[c];if(h===void 0||u===void 0)continue;const m=d(h,u);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!==u&&h!==void 0&&u!==void 0&&(n=!0,e[c]=h,o[c]=u)}return e.transformOrigin=o.transformOrigin=s?"center center":"top left",this.animatingProperties=l,n?[e,o]:void 0}async animate(t,i=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),t!==void 0)){this.log("animate",[t,i]),s=!0,this.webAnimation=this.element.animate(t,i);const e=this.getController();e?.add(this);try{await this.webAnimation.finished}catch{}e?.remove(this)}return this.didFinish(s),s}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(t,i){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,i)}}const Un=Zt(zn),Vn={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">
513
+ */const Ur=(s,t,r)=>{const i=new Map;for(let e=t;e<=r;e++)i.set(s[e],e);return i},qs=oe(class extends Ue{constructor(s){if(super(s),s.type!==$e.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,t,r){let i;r===void 0?r=t:t!==void 0&&(i=t);const e=[],o=[];let n=0;for(const l of s)e[n]=i?i(l,n):n,o[n]=r(l,n),n++;return{values:o,keys:e}}render(s,t,r){return this.dt(s,t,r).values}update(s,[t,r,i]){const e=En(s),{values:o,keys:n}=this.dt(t,r,i);if(!Array.isArray(e))return this.ut=n,o;const l=this.ut??=[],c=[];let h,p,d=0,f=e.length-1,_=0,y=o.length-1;for(;d<=f&&_<=y;)if(e[d]===null)d++;else if(e[f]===null)f--;else if(l[d]===n[_])c[_]=Ce(e[d],o[_]),d++,_++;else if(l[f]===n[y])c[y]=Ce(e[f],o[y]),f--,y--;else if(l[d]===n[y])c[y]=Ce(e[d],o[y]),os(s,c[y+1],e[d]),d++,y--;else if(l[f]===n[_])c[_]=Ce(e[f],o[_]),os(s,e[d],e[f]),f--,_++;else if(h===void 0&&(h=Ur(n,_,y),p=Ur(l,d,f)),h.has(l[d]))if(h.has(l[f])){const g=p.get(n[_]),v=g!==void 0?e[g]:null;if(v===null){const A=os(s,e[d]);Ce(A,o[_]),c[_]=A}else c[_]=Ce(v,o[_]),os(s,e[d],v),e[g]=null;_++}else Pi(e[f]),f--;else Pi(e[d]),d++;for(;_<=y;){const g=os(s,c[y+1]);Ce(g,o[_]),c[_++]=g}for(;d<=f;){const g=e[d++];g!==null&&Pi(g)}return this.ut=n,On(s,c),xt}}),da=new WeakMap;let Vr=0;const Oi=new Map,Br=new WeakSet,Hr=()=>new Promise((s=>requestAnimationFrame(s))),qr=(s,t)=>{const r=s-t;return r===0?void 0:r},Wr=(s,t)=>{const r=s/t;return r===1?void 0:r},Ei={left:(s,t)=>{const r=qr(s,t);return{value:r,transform:r==null||isNaN(r)?void 0:`translateX(${r}px)`}},top:(s,t)=>{const r=qr(s,t);return{value:r,transform:r==null||isNaN(r)?void 0:`translateY(${r}px)`}},width:(s,t)=>{let r;t===0&&(t=1,r={width:"1px"});const i=Wr(s,t);return{value:i,overrideFrom:r,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(s,t)=>{let r;t===0&&(t=1,r={height:"1px"});const i=Wr(s,t);return{value:i,overrideFrom:r,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},ua={duration:333,easing:"ease-in-out"},pa=["left","top","width","height","opacity","color","background"],Kr=new WeakMap;class fa extends Ci{constructor(t){if(super(t),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,t.type===$e.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((t=>{this.l=t}))}async resolveFinished(){this.l?.(),this.l=void 0}render(t){return D}getController(){return da.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(t,[r]){const i=this.u===void 0;return i&&(this.u=t.options?.host,this.u.addController(this),this.u.updateComplete.then((e=>this.t=!0)),this.element=t.element,Kr.set(this.element,this)),this.optionsOrCallback=r,(i||typeof r!="function")&&this.p(r),this.render(r)}p(t){t=t??{};const r=this.getController();r!==void 0&&((t={...r.defaultOptions,...t}).keyframeOptions={...r.defaultOptions.keyframeOptions,...t.keyframeOptions}),t.properties??=pa,this.options=t}m(){const t={},r=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((e=>{const o=r[e]??(Ei[e]?void 0:i[e]),n=Number(o);t[e]=isNaN(n)?o+"":n})),t}v(){let t,r=!0;return this.options.guard&&(t=this.options.guard(),r=((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()&&r&&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 Hr;const r=this.O(),i=this.j(this.options.keyframeOptions,r),e=this.m();if(this.A!==void 0){const{from:o,to:n}=this.N(this.A,e,r);this.log("measured",[this.A,e,o,n]),t=this.calculateKeyframes(o,n)}else{const o=Oi.get(this.options.inId);if(o){Oi.delete(this.options.inId);const{from:n,to:l}=this.N(o,e,r);t=this.calculateKeyframes(n,l),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Vr++,t.forEach((c=>c.zIndex=Vr))}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(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&Oi.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await Hr(),this.i?.isConnected){const r=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,r),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const e=this.A.left-i.left,o=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||e===0&&o===0||(this.element.style.position="relative"),e!==0&&(this.element.style.left=e+"px"),o!==0&&(this.element.style.top=o+"px")}}const t=this.j(this.options.keyframeOptions);await this.animate(this.options.out,t),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(t){t&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const t=[];for(let r=this.element.parentNode;r;r=r?.parentNode){const i=Kr.get(r);i&&!i.isDisabled()&&i&&t.push(i)}return t}get isHostRendered(){const t=Br.has(this.u);return t||this.u.updateComplete.then((()=>{Br.add(this.u)})),t}j(t,r=this.O()){const i={...ua};return r.forEach((e=>Object.assign(i,e.options.keyframeOptions))),Object.assign(i,t),i}N(t,r,i){t={...t},r={...r};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&&r.left!==void 0&&(t.left=o*t.left,r.left=o*r.left),t.top!==void 0&&r.top!==void 0&&(t.top=n*t.top,r.top=n*r.top)),{from:t,to:r}}calculateKeyframes(t,r,i=!1){const e={},o={};let n=!1;const l={};for(const c in r){const h=t[c],p=r[c];if(c in Ei){const d=Ei[c];if(h===void 0||p===void 0)continue;const f=d(h,p);f.transform!==void 0&&(l[c]=f.value,n=!0,e.transform=`${e.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(e,f.overrideFrom))}else h!==p&&h!==void 0&&p!==void 0&&(n=!0,e[c]=h,o[c]=p)}return e.transformOrigin=o.transformOrigin=i?"center center":"top left",this.animatingProperties=l,n?[e,o]:void 0}async animate(t,r=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,r]),i=!0,this.webAnimation=this.element.animate(t,r);const e=this.getController();e?.add(this);try{await this.webAnimation.finished}catch{}e?.remove(this)}return this.didFinish(i),i}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(t,r){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,r)}}const ba=oe(fa),ga={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">
514
514
  <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"/>
515
515
  </svg>
516
516
  `,"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">
@@ -546,7 +546,7 @@
546
546
  <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
547
547
  <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"/>
548
548
  </svg>
549
- `}},Is=new Map,Je={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 kr=!1;function Bn(){kr||(Je.custom.url=document.querySelector("[customIconLibraryPath]")?.getAttribute("customIconLibraryPath")||"",Je.custom.defaultPrefix=document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")||"",Je.custom.url&&(kr=!0))}const Dr=sessionStorage.getItem("sonicIconsCache"),Ut=Dr?JSON.parse(Dr):{icons:{},names:[]},Hn=100,Zi=class Zi{};Zi.default={get:async t=>{const i=t.library;if(!t.name)return"";const s=t.name,e=Vn;if(i=="custom"&&Bn(),i&&i in Je){const o=Je[i],n=t.prefix||o.defaultPrefix||"",l=e[i]||{};e[i]=l;const c=n+"-"+s;if(l[c])return j(l[c]);const h=(o.url||"").replace("$prefix",n).replace("$name",s);if(Ut.icons[h]){const d=Ut.icons[h];if(/^\s*<svg[\s>]/i.test(d||""))return l[c]=d,j(d);delete Ut.icons[h]}if(!Is.has(h)){const d=new Promise(async m=>{try{const y=await fetch(h);if(!y.ok){m("");return}try{const p=y.headers.get("content-type")||"";if(!p.includes("image/svg+xml")&&!p.includes("svg")){m("");return}const v=await y.text(),_=/^\s*<svg[\s>]/i.test(v);m(_?v:"")}catch{m("")}}catch{ln(),m("")}});Is.set(h,d)}const u=await Is.get(h);if(Is.delete(h),l[c]=u||"",u&&/^\s*<svg[\s>]/i.test(u)&&(Ut.icons[h]=u,Ut.names.push(h)),Ut.names.length>Hn){const d=Ut.names.shift();delete Ut.icons[d]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Ut)),u?j(u):""}return j(e.core[t.name]||"")}};let _i=Zi;var qn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,ts=(r,t,i,s)=>{for(var e=s>1?void 0:s?Wn(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&qn(t,i,e),e};const Kn="sonic-icon";let ue=class extends x{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await _i.default.get({name:this.name,prefix:this.prefix,library:this.library})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(r){(r.has("name")||r.has("prefix")||r.has("library"))&&this.updateIcon(),super.willUpdate(r)}render(){return this.iconText?this.iconText:A}};ue.styles=C`
549
+ `}},Ws=new Map,ds={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 Yr=!1;function ma(){Yr||(ds.custom.url=document.querySelector("[customIconLibraryPath]")?.getAttribute("customIconLibraryPath")||"",ds.custom.defaultPrefix=document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")||"",ds.custom.url&&(Yr=!0))}const Gr=sessionStorage.getItem("sonicIconsCache"),Xt=Gr?JSON.parse(Gr):{icons:{},names:[]},va=100,ur=class ur{};ur.default={get:async t=>{const r=t.library;if(!t.name)return"";const i=t.name,e=ga;if(r=="custom"&&ma(),r&&r in ds){const o=ds[r],n=t.prefix||o.defaultPrefix||"",l=e[r]||{};e[r]=l;const c=n+"-"+i;if(l[c])return U(l[c]);const h=(o.url||"").replace("$prefix",n).replace("$name",i);if(Xt.icons[h]){const d=Xt.icons[h];if(/^\s*<svg[\s>]/i.test(d||""))return l[c]=d,U(d);delete Xt.icons[h]}if(!Ws.has(h)){const d=new Promise(async f=>{try{const _=await fetch(h);if(!_.ok){f("");return}try{const y=_.headers.get("content-type")||"";if(!y.includes("image/svg+xml")&&!y.includes("svg")){f("");return}const g=await _.text(),v=/^\s*<svg[\s>]/i.test(g);f(v?g:"")}catch{f("")}}catch{Nn(),f("")}});Ws.set(h,d)}const p=await Ws.get(h);if(Ws.delete(h),l[c]=p||"",p&&/^\s*<svg[\s>]/i.test(p)&&(Xt.icons[h]=p,Xt.names.push(h)),Xt.names.length>va){const d=Xt.names.shift();delete Xt.icons[d]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(Xt)),p?U(p):""}return U(e.core[t.name]||"")}};let Li=ur;var ya=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,us=(s,t,r,i)=>{for(var e=i>1?void 0:i?_a(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&ya(t,r,e),e};const Ti=s=>a(s),wa="sonic-icon";let Se=class extends P{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await Li.default.get({name:this.name,prefix:this.prefix,library:this.library})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(s){(s.has("name")||s.has("prefix")||s.has("library"))&&this.updateIcon(),super.willUpdate(s)}render(){return this.iconText?this.iconText:D}};Se.styles=$`
550
550
  :host {
551
551
  line-height: 0.1em;
552
552
  width: fit-content;
@@ -596,7 +596,7 @@
596
596
  :host([size="3xl"]) svg {
597
597
  --_sc-icon-size: 2.8em;
598
598
  }
599
- `,ts([E()],ue.prototype,"iconText",2),ts([a({type:String})],ue.prototype,"name",2),ts([a({type:String})],ue.prototype,"prefix",2),ts([a({type:String})],ue.prototype,"library",2),ue=ts([P(Kn)],ue);const es=C`
599
+ `,us([T()],Se.prototype,"iconText",2),us([Ti({type:String})],Se.prototype,"name",2),us([Ti({type:String})],Se.prototype,"prefix",2),us([Ti({type:String})],Se.prototype,"library",2),Se=us([C(wa)],Se);const ps=$`
600
600
  .custom-scroll {
601
601
  overflow: auto !important;
602
602
  overflow-y: overlay !important;
@@ -618,12 +618,12 @@
618
618
  border: solid 0.15rem transparent;
619
619
  }
620
620
  }
621
- `;var Yn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,At=(r,t,i,s)=>{for(var e=s>1?void 0:s?Zn(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Yn(t,i,e),e};const Gn={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},Xn="sonic-toast-item";let yt=class extends x{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,this._titleId=""}getAriaRole(){return this.status==="error"?"alert":"status"}getAriaLive(){return this.status==="error"?null:"polite"}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}getCloseButtonLabel(){const r={error:"Fermer le message d'erreur",warning:"Fermer l'avertissement",success:"Fermer le message de succès",info:"Fermer l'information"};return this.status&&r[this.status]||"Fermer la notification"}render(){if(this.dismissForever){const s=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(s)[this.id])return A}if(!this.visible)return A;const r=this.title?this.getTitleId():void 0,t=!this.title&&this.text?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,i=this.getAriaLive();return g`<div
621
+ `;var xa=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,Tt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Pa(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&xa(t,r,e),e};const Ca={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},$a="sonic-toast-item";let Pt=class extends P{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,this._titleId=""}getAriaRole(){return this.status==="error"?"alert":"status"}getAriaLive(){return this.status==="error"?null:"polite"}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}getCloseButtonLabel(){const s={error:"Fermer le message d'erreur",warning:"Fermer l'avertissement",success:"Fermer le message de succès",info:"Fermer l'information"};return this.status&&s[this.status]||"Fermer la notification"}render(){if(this.dismissForever){const i=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(i)[this.id])return D}if(!this.visible)return D;const s=this.title?this.getTitleId():void 0,t=!this.title&&this.text?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,r=this.getAriaLive();return m`<div
622
622
  class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
623
623
  role=${this.getAriaRole()}
624
- aria-live=${i||A}
624
+ aria-live=${r||D}
625
625
  aria-atomic="true"
626
- aria-label=${t||A}
626
+ aria-label=${t||D}
627
627
  >
628
628
  <button
629
629
  aria-label=${this.getCloseButtonLabel()}
@@ -636,24 +636,24 @@
636
636
  class="sonic-toast-content custom-scroll"
637
637
  style="max-height: ${this.maxHeight} ;"
638
638
  >
639
- ${this.status&&g`<sonic-icon
640
- name=${Gn[this.status]}
639
+ ${this.status&&m`<sonic-icon
640
+ name=${Ca[this.status]}
641
641
  class="sonic-toast-icon"
642
642
  size="2xl"
643
643
  aria-hidden="true"
644
644
  ></sonic-icon>`}
645
645
 
646
646
  <div class="sonic-toast-text">
647
- ${this.title?g`<div class="sonic-toast-title" id=${r}>
647
+ ${this.title?m`<div class="sonic-toast-title" id=${s}>
648
648
  ${this.title}
649
649
  </div>`:""}
650
- ${this.text?j(this.text):""}
650
+ ${this.text?U(this.text):""}
651
651
  <slot></slot>
652
652
  </div>
653
653
 
654
654
  ${this.preserve?"":this.autoHide()}
655
655
  </div>
656
- </div>`}hide(){if(Gt.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)}};yt.styles=[es,C`
656
+ </div>`}hide(){if(ae.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const s=localStorage.getItem("sonic-toast-dismissed")||"{}",t=JSON.parse(s);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)}};Pt.styles=[ps,$`
657
657
  * {
658
658
  box-sizing: border-box;
659
659
  }
@@ -833,7 +833,7 @@
833
833
  opacity: 0.85;
834
834
  pointer-events: none;
835
835
  }
836
- `],At([a({type:String})],yt.prototype,"title",2),At([a({type:String})],yt.prototype,"id",2),At([a({type:String})],yt.prototype,"text",2),At([a({type:String})],yt.prototype,"status",2),At([a({type:Boolean})],yt.prototype,"ghost",2),At([a({type:Boolean})],yt.prototype,"preserve",2),At([a({type:Boolean})],yt.prototype,"dismissForever",2),At([a({type:String})],yt.prototype,"maxHeight",2),At([E()],yt.prototype,"visible",2),At([E()],yt.prototype,"_titleId",2),yt=At([P(Xn)],yt);const Qn=C`
836
+ `],Tt([a({type:String})],Pt.prototype,"title",2),Tt([a({type:String})],Pt.prototype,"id",2),Tt([a({type:String})],Pt.prototype,"text",2),Tt([a({type:String})],Pt.prototype,"status",2),Tt([a({type:Boolean})],Pt.prototype,"ghost",2),Tt([a({type:Boolean})],Pt.prototype,"preserve",2),Tt([a({type:Boolean})],Pt.prototype,"dismissForever",2),Tt([a({type:String})],Pt.prototype,"maxHeight",2),Tt([T()],Pt.prototype,"visible",2),Tt([T()],Pt.prototype,"_titleId",2),Pt=Tt([C($a)],Pt);const Sa=$`
837
837
  :host {
838
838
  /* POLICES */
839
839
  /*
@@ -904,7 +904,7 @@
904
904
  --sc-contrast-content: #fff;
905
905
  --sc-contrast: #000000;
906
906
  }
907
- `,Jn=C`
907
+ `,Aa=$`
908
908
  :host([theme="light"]) {
909
909
  /*Boutons*/
910
910
  --sc-primary: var(--sc-base-800);
@@ -933,7 +933,7 @@
933
933
  --sc-base-900: #0f172a;
934
934
  --sc-base-content: var(--sc-base-700);
935
935
  }
936
- `,Or=C`
936
+ `,Zr=$`
937
937
  --sc-primary: var(--sc-dark-primary, var(--sc-base-700));
938
938
  --sc-info: var(--sc-dark-info, #3abff8);
939
939
  --sc-danger: var(--sc-dark-danger, #f87272);
@@ -958,17 +958,17 @@
958
958
  --sc-base-800: var(--sc-dark-base-800, #d9dce0);
959
959
  --sc-base-900: var(--sc-dark-base-900, #e5e7eb);
960
960
  --sc-base-content: var(--sc-dark-base-content, #e5e7eb);
961
- `,ta=C`
961
+ `,ka=$`
962
962
  :host([theme="dark"]) {
963
- ${Or}
963
+ ${Zr}
964
964
  }
965
965
 
966
966
  @media (prefers-color-scheme: dark) {
967
967
  :host([theme="auto"]) {
968
- ${Or}
968
+ ${Zr}
969
969
  }
970
970
  }
971
- `;var ea=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,ss=(r,t,i,s)=>{for(var e=s>1?void 0:s?sa(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&ea(t,i,e),e};const ia="sonic-theme";let _t=class extends x{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,_t.instance=this}static getPopContainer(){return _t.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const r=document.styleSheets,t=r.length,i=[];for(let e=0;e<t;e++){const o=r[e];o.href&&(o.href.includes("googleapis")||o.href.includes("typekit.net"))&&i.push(o.href)}const s={variables:this.getCssVariables(),fonts:i};k.get("sonic-theme")?.set(s),document.querySelectorAll("iframe").forEach(e=>e.contentWindow?.postMessage({type:"SonicTheme",...s},"*"))}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[..._t.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.warn("Erreur lors de la récupération des variables CSS")}const i=window.getComputedStyle(this),s={};return r.forEach(e=>s[e]=i.getPropertyValue(e)),s}render(){return g`<slot></slot>`}};_t.styles=[Jn,ta,Qn,C`
971
+ `;var Da=Object.defineProperty,Oa=Object.getOwnPropertyDescriptor,fs=(s,t,r,i)=>{for(var e=i>1?void 0:i?Oa(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Da(t,r,e),e};const Ea="sonic-theme";let Ct=class extends P{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,Ct.instance=this}static getPopContainer(){return Ct.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",s=>this.receiveMessage(s),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const s=document.styleSheets,t=s.length,r=[];for(let e=0;e<t;e++){const o=s[e];o.href&&(o.href.includes("googleapis")||o.href.includes("typekit.net"))&&r.push(o.href)}const i={variables:this.getCssVariables(),fonts:r};O.get("sonic-theme")?.set(i),document.querySelectorAll("iframe").forEach(e=>e.contentWindow?.postMessage({type:"SonicTheme",...i},"*"))}receiveMessage(s){const t=s.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const s=[],t=[...Ct.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)s.includes(c)||c.indexOf("--sc")!==0||s.push(c)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const r=window.getComputedStyle(this),i={};return s.forEach(e=>i[e]=r.getPropertyValue(e)),i}render(){return m`<slot></slot>`}};Ct.styles=[Aa,ka,Sa,$`
972
972
  :host([color]) {
973
973
  color: var(--sc-base-content, #000);
974
974
  }
@@ -1000,39 +1000,39 @@
1000
1000
  transition-property: scale, opacity;
1001
1001
  transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
1002
1002
  }
1003
- `],ss([a({type:String,reflect:!0})],_t.prototype,"theme",2),ss([a({type:Boolean,reflect:!0})],_t.prototype,"background",2),ss([a({type:Boolean,reflect:!0})],_t.prototype,"color",2),ss([a({type:Boolean,reflect:!0})],_t.prototype,"font",2),_t=ss([P(ia)],_t);var ra=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,Lr=(r,t,i,s)=>{for(var e=s>1?void 0:s?oa(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&ra(t,i,e),e};const na="sonic-toast";let L=class extends x{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=window.parent!=window;let i={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return t||(i={...i,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),L.handleExistingToastDelegation(),this.toasts?g`<div style=${pt(i)}>
1004
- ${Ns(this.toasts,s=>s.id,s=>g`
1003
+ `],fs([a({type:String,reflect:!0})],Ct.prototype,"theme",2),fs([a({type:Boolean,reflect:!0})],Ct.prototype,"background",2),fs([a({type:Boolean,reflect:!0})],Ct.prototype,"color",2),fs([a({type:Boolean,reflect:!0})],Ct.prototype,"font",2),Ct=fs([C(Ea)],Ct);var La=Object.defineProperty,Ta=Object.getOwnPropertyDescriptor,Xr=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ta(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&La(t,r,e),e};const Ma="sonic-toast";let L=class extends P{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=window.parent!=window;let r={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return t||(r={...r,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),L.handleExistingToastDelegation(),this.toasts?m`<div style=${gt(r)}>
1004
+ ${qs(this.toasts,i=>i.id,i=>m`
1005
1005
  <sonic-toast-item
1006
1006
  maxHeight=${t?"none":"10rem"}
1007
- status=${$(s.status)}
1008
- title=${$(s.title)}
1009
- ?ghost=${s.ghost}
1010
- ?dismissForever=${s.dismissForever}
1011
- ?preserve=${s.preserve}
1012
- id=${$(s.id)}
1013
- @hide=${()=>this.removeItem(s)}
1014
- ${Un({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})}
1007
+ status=${S(i.status)}
1008
+ title=${S(i.title)}
1009
+ ?ghost=${i.ghost}
1010
+ ?dismissForever=${i.dismissForever}
1011
+ ?preserve=${i.preserve}
1012
+ id=${S(i.id)}
1013
+ @hide=${()=>this.removeItem(i)}
1014
+ ${ba({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})}
1015
1015
  >
1016
1016
  <!-- 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) -->
1017
- ${s.text?j(s.text):""}
1017
+ ${i.text?U(i.text):""}
1018
1018
  </sonic-toast-item>
1019
1019
  `)}
1020
- </div>`:A}static removeAll(){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const t=L.getInstance();t&&(t.toasts=t.toasts.filter(i=>i.ghost))}static removeItemsByStatus(t){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:t},"*");return}const i=L.getInstance();i&&(i.toasts=i.toasts.filter(s=>s.status!==t))}static removeTemporaryItems(){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const t=L.getInstance();t&&(t.toasts=t.toasts.filter(i=>i.preserve))}static getInstance(){return L.instance||(L.instance=document.createElement("sonic-toast"),_t.getPopContainer().prepend(L.instance)),L.instance}static add(t){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:t},"*");return}const i=L.getInstance(),s=t.id??new Date().valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:s,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(i?.toasts.length){const l={...n};for(const c of i.toasts){const h={...c};if(l.id=h.id=0,tt.shallowEqual(l,h))return null}}return i&&(i.toasts=[...i.toasts,n]),n}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=L.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:t},"*");return}const i=L.getInstance();i&&i.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter(i=>(i={...i},delete i.id,!tt.shallowEqual(i,t,!1))))}};L.delegateToasts=!1,Lr([a({type:Array})],L.prototype,"toasts",2),L=Lr([P(na)],L),typeof window<"u"&&(window[_s+"Toast"]=window[_s+"Toast"]||L);function aa(){const r=i=>{i.data.type=="querySonicToastAvailability"&&i.source.postMessage({type:"sonicToastAvailable"},"*"),i.data.type=="removeItemsByStatus"&&L.removeItemsByStatus(i.data.status),i.data.type=="removeTemporaryItems"&&L.removeTemporaryItems(),i.data.type=="sonicToastAvailable"&&(L.delegateToasts=!0,L.handleExistingToastDelegation()),i.data.type=="addToasts"&&(L.getInstance().toasts=[...L.getInstance().toasts,...i.data.toasts]),i.data.type=="removeAllToasts"&&L.removeAll(),i.data.type=="removeToast"&&L.removeItem(i.data.toast),i.data.type=="addToast"&&L.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"))i.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}aa();var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,is=(r,t,i,s)=>{for(var e=s>1?void 0:s?ca(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&la(t,i,e),e};const ha=new Set,da=new Set,ua=r=>{for(const t of da)t(r)},wi=new Set;let xi=0;Qs(async()=>{xi++;const r=xi,t=Array.from(wi);for(;t.length>0;){if(r!=xi)return;const i=t.splice(0,4);await Promise.all(i.map(s=>s._fetchData()))}});const Pi=(r,t)=>{class i 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._isFetching=!1,this._mustRefetch=!1,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}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new de(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await k.getInstance().isLocalStrorageReady,!this.isConnected))return;const e=k.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,tt.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}),this.handleStartFetching()==="fetching")return;let n=null;try{n=await this.api.get(this.endPoint||this.dataProvider||"",e)}catch{}if(this.handleEndFetching(),this.fetchedData=n,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||ha.add(this),ua(this.api.lastResult)),!!this.isConnected){if(n)n._sonic_http_response_&&!n._sonic_http_response_.ok&&Object.keys(n).length===1&&L.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 l=n._sonic_http_response_,c=this.key.split(".");n=tt.traverse(n,c,this.hasAttribute("preserveOtherKeys")),n&&tt.isObject(n)&&l&&(n._sonic_http_response_=l)}this.props=n,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(){super.disconnectedCallback(),wi.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),wi.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),o={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px",threshold:.9};this.iObserver=new IntersectionObserver(c=>this.onIntersection(c),o);let l=[...(this.shadowRoot?this.shadowRoot:this).children].filter(c=>c.nodeName.toLowerCase()!="style")[0];if(l?.nodeName.toLocaleLowerCase()=="slot"&&(l=[...l.children].filter(c=>c.nodeName.toLowerCase()!="style")[0]),!l||l.nodeName.toLocaleLowerCase()=="template"){l=document.createElement("div");const c=l.style;c.pointerEvents="none",c.width="1px",c.height="1px",this.lazyLoadPlaceHolder=l,this.appendChild(l)}l?this.iObserver.observe(l):this.isFirstLoad&&this._fetchData()}onIntersection(e){for(const o of e)if(o.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return is([a()],i.prototype,"noErrorsRecordings",2),is([a()],i.prototype,"props",1),is([a({type:String})],i.prototype,"endPoint",1),is([a()],i.prototype,"requestId",2),is([a({type:Number})],i.prototype,"refetchEveryMs",2),i};var pa=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,pe=(r,t,i,s)=>{for(var e=s>1?void 0:s?fa(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&pa(t,i,e),e};const Ms=r=>{class t extends r{constructor(...s){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const s=this.shadowRoot?.querySelector("input");if(!s||s.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),s.reportValidity()}set type(s){this.hasAttribute("type")&&!this.forceAutoFill&&(s=this.getAttribute("type")),this._type=s,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(s){this.hasAttribute("description")&&!this.forceAutoFill&&(s=this.getAttribute("description")),this._description=s,this.requestUpdate()}get label(){return this._label}set label(s){this.hasAttribute("label")&&!this.forceAutoFill&&(s=this.getAttribute("label")),this._label=s,this.requestUpdate()}}return pe([a()],t.prototype,"forceAutoFill",2),pe([a({type:String})],t.prototype,"type",1),pe([a()],t.prototype,"description",1),pe([a()],t.prototype,"label",1),pe([a({type:String,reflect:!0})],t.prototype,"status",2),pe([a({type:Number})],t.prototype,"tabindex",2),pe([a({type:String})],t.prototype,"autocomplete",2),t},Er=Pi,ba=gi,Tr=Le,Nr=Ms,Xt=Q,Ci=Ze;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Er,FormCheckable:ba,FormElement:Tr,FormInput:Nr,Subscriber:Xt,TemplatesContainer:Ci};/**
1020
+ </div>`:D}static removeAll(){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const t=L.getInstance();t&&(t.toasts=t.toasts.filter(r=>r.ghost))}static removeItemsByStatus(t){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:t},"*");return}const r=L.getInstance();r&&(r.toasts=r.toasts.filter(i=>i.status!==t))}static removeTemporaryItems(){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const t=L.getInstance();t&&(t.toasts=t.toasts.filter(r=>r.preserve))}static getInstance(){return L.instance||(L.instance=document.createElement("sonic-toast"),Ct.getPopContainer().prepend(L.instance)),L.instance}static add(t){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:t},"*");return}const r=L.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(r?.toasts.length){const l={...n};for(const c of r.toasts){const h={...c};if(l.id=h.id=0,rt.shallowEqual(l,h))return null}}return r&&(r.toasts=[...r.toasts,n]),n}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const t=L.getInstance();window.parent.postMessage({type:"addToasts",toasts:t.toasts},"*"),t.toasts=[]}static removeItem(t){if(L.delegateToasts){L.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:t},"*");return}const r=L.getInstance();r&&r.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter(r=>(r={...r},delete r.id,!rt.shallowEqual(r,t,!1))))}};L.delegateToasts=!1,Xr([a({type:Array})],L.prototype,"toasts",2),L=Xr([C(Ma)],L),typeof window<"u"&&(window[Os+"Toast"]=window[Os+"Toast"]||L);function Ia(){const s=r=>{r.data.type=="querySonicToastAvailability"&&r.source.postMessage({type:"sonicToastAvailable"},"*"),r.data.type=="removeItemsByStatus"&&L.removeItemsByStatus(r.data.status),r.data.type=="removeTemporaryItems"&&L.removeTemporaryItems(),r.data.type=="sonicToastAvailable"&&(L.delegateToasts=!0,L.handleExistingToastDelegation()),r.data.type=="addToasts"&&(L.getInstance().toasts=[...L.getInstance().toasts,...r.data.toasts]),r.data.type=="removeAllToasts"&&L.removeAll(),r.data.type=="removeToast"&&L.removeItem(r.data.toast),r.data.type=="addToast"&&L.add(r.data.toast)},t=window.parent!=window;if(window.addEventListener("message",s,!1),t&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!t)for(const r of document.querySelectorAll("iframe"))r.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Ia();var Na=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,bs=(s,t,r,i)=>{for(var e=i>1?void 0:i?Fa(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Na(t,r,e),e};const ja=new Set,Ra=new Set,za=s=>{for(const t of Ra)t(s)},Mi=new Set;let Ii=0;hi(async()=>{Ii++;const s=Ii,t=Array.from(Mi);for(;t.length>0;){if(s!=Ii)return;const r=t.splice(0,4);await Promise.all(r.map(i=>i._fetchData()))}});const Ni=(s,t)=>{class r extends s{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._isFetching=!1,this._mustRefetch=!1,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}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new ne(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await O.getInstance().isLocalStrorageReady,!this.isConnected))return;const e=O.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,rt.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}),this.handleStartFetching()==="fetching")return;let n=null;try{n=await this.api.get(this.endPoint||this.dataProvider||"",e)}catch{}if(this.handleEndFetching(),this.fetchedData=n,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||ja.add(this),za(this.api.lastResult)),!!this.isConnected){if(n)n._sonic_http_response_&&!n._sonic_http_response_.ok&&Object.keys(n).length===1&&L.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 l=n._sonic_http_response_,c=this.key.split(".");n=rt.traverse(n,c,this.hasAttribute("preserveOtherKeys")),n&&rt.isObject(n)&&l&&(n._sonic_http_response_=l)}this.props=n,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(){super.disconnectedCallback(),Mi.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Mi.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const e=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),o={root:null,rootMargin:Math.max(window.innerWidth*e,window.innerHeight*e)+"px",threshold:.9};this.iObserver=new IntersectionObserver(c=>this.onIntersection(c),o);let l=[...(this.shadowRoot?this.shadowRoot:this).children].filter(c=>c.nodeName.toLowerCase()!="style")[0];if(l?.nodeName.toLocaleLowerCase()=="slot"&&(l=[...l.children].filter(c=>c.nodeName.toLowerCase()!="style")[0]),!l||l.nodeName.toLocaleLowerCase()=="template"){l=document.createElement("div");const c=l.style;c.pointerEvents="none",c.width="1px",c.height="1px",this.lazyLoadPlaceHolder=l,this.appendChild(l)}l?this.iObserver.observe(l):this.isFirstLoad&&this._fetchData()}onIntersection(e){for(const o of e)if(o.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return bs([a()],r.prototype,"noErrorsRecordings",2),bs([a()],r.prototype,"props",1),bs([a({type:String})],r.prototype,"endPoint",1),bs([a()],r.prototype,"requestId",2),bs([a({type:Number})],r.prototype,"refetchEveryMs",2),r};var Ua=Object.defineProperty,Va=Object.getOwnPropertyDescriptor,Ae=(s,t,r,i)=>{for(var e=i>1?void 0:i?Va(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Ua(t,r,e),e};const Ks=s=>{class t extends s{constructor(...i){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const i=this.shadowRoot?.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 Ae([a()],t.prototype,"forceAutoFill",2),Ae([a({type:String})],t.prototype,"type",1),Ae([a()],t.prototype,"description",1),Ae([a()],t.prototype,"label",1),Ae([a({type:String,reflect:!0})],t.prototype,"status",2),Ae([a({type:Number})],t.prototype,"tabindex",2),Ae([a({type:String})],t.prototype,"autocomplete",2),t},Qr=Ni,Ba=Di,Jr=Be,to=Ks,le=et,Fi=as;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Qr,FormCheckable:Ba,FormElement:Jr,FormInput:to,Subscriber:le,TemplatesContainer:Fi};/**
1021
1021
  * @license
1022
1022
  * Copyright 2020 Google LLC
1023
1023
  * SPDX-License-Identifier: BSD-3-Clause
1024
- */const Et=Zt(class extends De{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?vt:(this.vt=r,document.importNode(r.content,!0))}});var ma=Object.defineProperty,ga=Object.getOwnPropertyDescriptor,Ir=(r,t,i,s)=>{for(var e=s>1?void 0:s?ga(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&ma(t,i,e),e};const va="sonic-fetch";let Fs=class extends Pi(Q(Ci(x))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return A;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?Et(r):A}render(){return g`
1024
+ */const Ut=oe(class extends Ue{constructor(s){if(super(s),s.type!==$e.CHILD)throw Error("templateContent can only be used in child bindings")}render(s){return this.vt===s?xt:(this.vt=s,document.importNode(s.content,!0))}});var Ha=Object.defineProperty,qa=Object.getOwnPropertyDescriptor,eo=(s,t,r,i)=>{for(var e=i>1?void 0:i?qa(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Ha(t,r,e),e};const Wa="sonic-fetch";let Ys=class extends Ni(et(Fi(P))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return D;const s=this.loader===!0||this.loader===""?"fixed":this.loader;return m`<sonic-loader mode=${s}></sonic-loader>`}renderSkeleton(){const s=this.templateParts.skeleton;return this.isLoading&&s?Ut(s):D}render(){return m`
1025
1025
  ${this.renderSkeleton()} ${this.renderLoader()}
1026
- ${this.isLoading?A:g`<slot></slot>`}
1027
- `}};Fs.styles=[C`
1026
+ ${this.isLoading?D:m`<slot></slot>`}
1027
+ `}};Ys.styles=[$`
1028
1028
  :host {
1029
1029
  display: contents;
1030
1030
  }
1031
- `],Ir([a()],Fs.prototype,"loader",2),Fs=Ir([P(va)],Fs);var ya=Object.defineProperty,_a=Object.getOwnPropertyDescriptor,Mr=(r,t,i,s)=>{for(var e=s>1?void 0:s?_a(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&ya(t,i,e),e};const wa="sonic-if";let js=class extends x{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?g` <slot></slot> `:A}};js.styles=C`
1031
+ `],eo([a()],Ys.prototype,"loader",2),Ys=eo([C(Wa)],Ys);var Ka=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,so=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ya(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Ka(t,r,e),e};const Ga="sonic-if";let Gs=class extends P{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?m` <slot></slot> `:D}};Gs.styles=$`
1032
1032
  :host {
1033
1033
  display: contents;
1034
1034
  }
1035
- `,Mr([a({type:Boolean})],js.prototype,"condition",2),js=Mr([P(wa)],js);const xa=C`
1035
+ `,so([a({type:Boolean})],Gs.prototype,"condition",2),Gs=so([C(Ga)],Gs);const Za=$`
1036
1036
  :host([align="left"]) .sonic-loader--inline {
1037
1037
  margin-left: 0;
1038
1038
  }
@@ -1099,7 +1099,7 @@
1099
1099
  transform: translate(24px, 0);
1100
1100
  }
1101
1101
  }
1102
- `,Pa=C`
1102
+ `,Xa=$`
1103
1103
  @keyframes sonic-loader--fixed {
1104
1104
  0% {
1105
1105
  transform: scale(0);
@@ -1152,14 +1152,14 @@
1152
1152
  height: 5rem;
1153
1153
  animation: sonic-loader--fixed 1s 0s linear infinite;
1154
1154
  }
1155
- `;var Ca=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,$i=(r,t,i,s)=>{for(var e=s>1?void 0:s?$a(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Ca(t,i,e),e};const Sa="sonic-loader";let st=class extends x{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(r){st.loader||(st.loader=document.createElement("sonic-loader"));const t=st.loader;r||(r={}),r.mode&&t.setAttribute("mode",r.mode),r.noDelay&&t.setAttribute("noDelay",""),r.container||(r.container=_t.getPopContainer(),r.mode="fixed"),r.container.appendChild(t),st.callCounter++}static hide(){st.callCounter--,!(st.callCounter>0)&&st.loader&&st.loader.remove()}render(){return g`<div
1155
+ `;var Qa=Object.defineProperty,Ja=Object.getOwnPropertyDescriptor,ji=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ja(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Qa(t,r,e),e};const tl="sonic-loader";let nt=class extends P{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(s){nt.loader||(nt.loader=document.createElement("sonic-loader"));const t=nt.loader;s||(s={}),s.mode&&t.setAttribute("mode",s.mode),s.noDelay&&t.setAttribute("noDelay",""),s.container||(s.container=Ct.getPopContainer(),s.mode="fixed"),s.container.appendChild(t),nt.callCounter++}static hide(){nt.callCounter--,!(nt.callCounter>0)&&nt.loader&&nt.loader.remove()}render(){return m`<div
1156
1156
  class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
1157
1157
  >
1158
1158
  <div></div>
1159
1159
  <div></div>
1160
1160
  <div></div>
1161
1161
  <div></div>
1162
- </div>`}};st.styles=[xa,Pa,C`
1162
+ </div>`}};nt.styles=[Za,Xa,$`
1163
1163
  :host {
1164
1164
  --sc-_loader-bg: var(--sc-primary, currentColor);
1165
1165
  pointer-events: none;
@@ -1187,7 +1187,7 @@
1187
1187
  opacity: 1;
1188
1188
  }
1189
1189
  }
1190
- `],st.callCounter=0,$i([a({type:String})],st.prototype,"mode",2),$i([a({type:Boolean})],st.prototype,"noDelay",2),st=$i([P(Sa)],st);var Aa=Object.getOwnPropertyDescriptor,ka=(r,t,i,s)=>{for(var e=s>1?void 0:s?Aa(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Da="sonic-subscriber";let Fr=class extends Q(x){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> `}};Fr=ka([P(Da)],Fr);var Oa=Object.defineProperty,La=Object.getOwnPropertyDescriptor,kt=(r,t,i,s)=>{for(var e=s>1?void 0:s?La(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Oa(t,i,e),e};const Ea="sonic-list";let wt=class extends Pi(Q(Ze(x))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(r){typeof r!="function"&&r!==void 0||(this._items=r,this.requestUpdate())}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 A;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return g`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const r=this.templateParts.skeleton;return this.isLoading&&r?Et(r):A}renderSeparator(){if(this.separator)return this.separator();const r=this.templateParts.separator;return r?Et(r):A}renderLoadingState(){return g`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return g` <div
1190
+ `],nt.callCounter=0,ji([a({type:String})],nt.prototype,"mode",2),ji([a({type:Boolean})],nt.prototype,"noDelay",2),nt=ji([C(tl)],nt);var el=Object.getOwnPropertyDescriptor,sl=(s,t,r,i)=>{for(var e=i>1?void 0:i?el(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const il="sonic-subscriber";let io=class extends et(P){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(s){super.updated(s),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return m`<slot></slot> `}};io=sl([C(il)],io);var rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor,Mt=(s,t,r,i)=>{for(var e=i>1?void 0:i?ol(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&rl(t,r,e),e};const nl="sonic-list";let St=class extends Ni(et(as(P))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(s){typeof s!="function"&&s!==void 0||(this._items=s,this.requestUpdate())}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 D;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return m`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const s=this.templateParts.skeleton;return this.isLoading&&s?Ut(s):D}renderSeparator(){if(this.separator)return this.separator();const s=this.templateParts.separator;return s?Ut(s):D}renderLoadingState(){return m`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return m` <div
1191
1191
  style="color: var(--sc-base-400);
1192
1192
  font-size: 1.5em;
1193
1193
  margin: 4rem 0;
@@ -1198,43 +1198,43 @@
1198
1198
  ><span class="sonic-no-result-text"
1199
1199
  >${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
1200
1200
  >
1201
- </div>`}formatProps(){let r=this.props;if(r==null)return null;const t=r._sonic_http_response_,i=this.hasAttribute("extractValues");return Array.isArray(r)||(i?r=Object.entries(r).map(([s,e])=>({key:s,value:e})):tt.isObject(r)&&Object.keys(r).length>0&&(!t||t.ok)?r=[r]:r=[]),r=r.filter(s=>s!=null),t&&(r._sonic_http_response_=t),r}updated(r){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(r)}getAllRenderableElements(r){let t=[];function i(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s.getBoundingClientRect();(e.width>0||e.height>0)&&t.push(s),s.childNodes.forEach(i),s.shadowRoot&&s.shadowRoot.childNodes.forEach(i)}}return i(r),t}getDisplayContentsSize(r){const t=this.getAllRenderableElements(r);if(t.length===0)return{width:0,height:0};const i=t.map(l=>l.getBoundingClientRect()),s=Math.min(...i.map(l=>l.left)),e=Math.max(...i.map(l=>l.right)),o=Math.min(...i.map(l=>l.top)),n=Math.max(...i.map(l=>l.bottom));return{width:e-s,height:n-o}}render(){return g`
1201
+ </div>`}formatProps(){let s=this.props;if(s==null)return null;const t=s._sonic_http_response_,r=this.hasAttribute("extractValues");return Array.isArray(s)||(r?s=Object.entries(s).map(([i,e])=>({key:i,value:e})):rt.isObject(s)&&Object.keys(s).length>0&&(!t||t.ok)?s=[s]:s=[]),s=s.filter(i=>i!=null),t&&(s._sonic_http_response_=t),s}updated(s){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(s)}getAllRenderableElements(s){let t=[];function r(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i.getBoundingClientRect();(e.width>0||e.height>0)&&t.push(i),i.childNodes.forEach(r),i.shadowRoot&&i.shadowRoot.childNodes.forEach(r)}}return r(s),t}getDisplayContentsSize(s){const t=this.getAllRenderableElements(s);if(t.length===0)return{width:0,height:0};const r=t.map(l=>l.getBoundingClientRect()),i=Math.min(...r.map(l=>l.left)),e=Math.max(...r.map(l=>l.right)),o=Math.min(...r.map(l=>l.top)),n=Math.max(...r.map(l=>l.bottom));return{width:e-i,height:n-o}}render(){return m`
1202
1202
  ${this.renderContent()}
1203
1203
  <div
1204
1204
  style="grid-column: 1 / -1;min-height:${this.isLoading?0:this.loadingSize.height}px; width:0;float:left;display: var(--list-loader-height-display);"
1205
1205
  ></div>
1206
- `}handleProgrammaticTemplates(r,t,i){return this.items?g`<sonic-subscriber
1206
+ `}handleProgrammaticTemplates(s,t,r){return this.items?m`<sonic-subscriber
1207
1207
  ?debug=${this.defferedDebug===!0}
1208
- .bindPublisher=${()=>this.publisher[i]}
1208
+ .bindPublisher=${()=>this.publisher[r]}
1209
1209
  .propertyMap?=${this.itemPropertyMap}
1210
- dataProvider="${this.dataProvider}/list-item/${i}"
1210
+ dataProvider="${this.dataProvider}/list-item/${r}"
1211
1211
  >
1212
- ${this.items(r,t)}
1213
- </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!tt.isObject(this.props))return g`<div></div>`;const s=this.formatProps();if((s?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return Et(this.templateParts["no-items"])}const e=this.templateList.length;let o=-1;const n=this.hasAttribute("extractValues"),l=this.renderSeparator(),c=s?.length||0,h=s?.slice(this.offset,this.offset+this.limit);return g`
1214
- ${h?.map((u,d)=>{if(u==null)return A;let m=d,y=null;if(typeof u=="object"&&!Array.isArray(u)){n&&(m=u?.key);const b=u[this.templateKey];b&&typeof b=="string"&&(y=this.templateParts[b])}if(m=="_sonic_http_response_"||typeof m!="string"&&typeof m!="number")return A;const p=d>=c-1,v=d%2,_=this.publisher[m],D={key:m,even:v==0,odd:v==1,onlyChild:c==1,firstChild:d==0,lastChild:p};_._key_=m+"",_._metadata_={..._._metadata_.get(),...D};const f=this.handleProgrammaticTemplates(u,D,m);return f?g`${f}${p?A:l}`:(o++,y&&(o=-1),g`
1212
+ ${this.items(s,t)}
1213
+ </sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!rt.isObject(this.props))return m`<div></div>`;const i=this.formatProps();if((i?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return Ut(this.templateParts["no-items"])}const e=this.templateList.length;let o=-1;const n=this.hasAttribute("extractValues"),l=this.renderSeparator(),c=i?.length||0,h=i?.slice(this.offset,this.offset+this.limit);return m`
1214
+ ${h?.map((p,d)=>{if(p==null)return D;let f=d,_=null;if(typeof p=="object"&&!Array.isArray(p)){n&&(f=p?.key);const b=p[this.templateKey];b&&typeof b=="string"&&(_=this.templateParts[b])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return D;const y=d>=c-1,g=d%2,v=this.publisher[f],A={key:f,even:g==0,odd:g==1,onlyChild:c==1,firstChild:d==0,lastChild:y};v._key_=f+"",v._metadata_={...v._metadata_.get(),...A};const u=this.handleProgrammaticTemplates(p,A,f);return u?m`${u}${y?D:l}`:(o++,_&&(o=-1),m`
1215
1215
  <sonic-subscriber
1216
1216
  ?debug=${this.defferedDebug===!0}
1217
- .bindPublisher=${function(){return _}}
1217
+ .bindPublisher=${function(){return v}}
1218
1218
  .propertyMap?=${this.itemPropertyMap}
1219
- dataProvider="${this.dataProvider}/list-item/${m}"
1219
+ dataProvider="${this.dataProvider}/list-item/${f}"
1220
1220
  >
1221
- ${Et(y||this.templateList[o%e])}
1221
+ ${Ut(_||this.templateList[o%e])}
1222
1222
  </sonic-subscriber>
1223
- ${p?A:l}
1223
+ ${y?D:l}
1224
1224
  `)})}
1225
- `}};kt([a({type:Object})],wt.prototype,"itemPropertyMap",2),kt([a({type:String})],wt.prototype,"templateKey",2),kt([a({type:String})],wt.prototype,"idKey",2),kt([a()],wt.prototype,"loader",2),kt([a()],wt.prototype,"limit",2),kt([a()],wt.prototype,"offset",2),kt([a({type:Function,attribute:!1})],wt.prototype,"items",1),kt([a({type:Function,attribute:!1})],wt.prototype,"noItems",2),kt([a({type:Function,attribute:!1})],wt.prototype,"skeleton",2),kt([a({type:Function,attribute:!1})],wt.prototype,"separator",2),wt=kt([P(Ea)],wt);/**
1225
+ `}};Mt([a({type:Object})],St.prototype,"itemPropertyMap",2),Mt([a({type:String})],St.prototype,"templateKey",2),Mt([a({type:String})],St.prototype,"idKey",2),Mt([a()],St.prototype,"loader",2),Mt([a()],St.prototype,"limit",2),Mt([a()],St.prototype,"offset",2),Mt([a({type:Function,attribute:!1})],St.prototype,"items",1),Mt([a({type:Function,attribute:!1})],St.prototype,"noItems",2),Mt([a({type:Function,attribute:!1})],St.prototype,"skeleton",2),Mt([a({type:Function,attribute:!1})],St.prototype,"separator",2),St=Mt([C(nl)],St);/**
1226
1226
  * @license
1227
1227
  * Copyright 2021 Google LLC
1228
1228
  * SPDX-License-Identifier: BSD-3-Clause
1229
- */function*jr(r,t){if(r!==void 0){let i=0;for(const s of r)yield t(s,i++)}}var Ta=Object.defineProperty,Na=Object.getOwnPropertyDescriptor,it=(r,t,i,s)=>{for(var e=s>1?void 0:s?Na(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Ta(t,i,e),e};const Ia="sonic-queue";let G=class extends Q(x){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=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=()=>{const t=this.dataProviderExpression.split("?");t.shift();const i=new URLSearchParams(t.join("?")),s=this.filterPublisher?.get(),e=this.filteredFields.split(" ");for(const n in s){let l=s[n];Array.isArray(l)&&(l=l.filter(c=>c!==null)),!(this.filteredFields&&e.includes(n)||l==null||l.toString()==="")&&i.set(n,s[n].toString())}const o=i.toString();if(!(o==this.searchHash&&!this.isFirstRequest)){this.searchHash=o;for(const n of this.listDataProviders)k.delete(n);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const n=this.resultCount;this.props=null,this.requestId++,this.resultCount=n,await k.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1,this.storedScrollY=0,this.storedScrollX=0}disconnectedCallback(){for(const r of this.listDataProviders)k.delete(r),this.listDataProviders=[];this.filterPublisher?.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=G.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=Gt.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.storeScrollPosition(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await k.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const r=this.getAncestorAttributeValue("dataFilterProvider");if(!r){this.next();return}this.filterPublisher=k.getInstance().get(r),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}storeScrollPosition(){this.isSafari()&&(this.storedScrollX=window.scrollX,this.storedScrollY=window.scrollY)}isSafari(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}updated(r){this.isSafari()&&((Math.abs(this.storedScrollX-window.scrollX)>10||Math.abs(this.storedScrollY-window.scrollY)>10)&&window.scrollTo(this.storedScrollX,this.storedScrollY),window.requestAnimationFrame(()=>{(Math.abs(this.storedScrollX-window.scrollX)>10||Math.abs(this.storedScrollY-window.scrollY)>10)&&window.scrollTo(this.storedScrollX,this.storedScrollY)})),super.updated(r)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(r){let t=this.offset;const s=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+=r.detail.props?.length||0,!r.detail.isFirstLoad||!r.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const d=this.props,m=d[d.length-1];t=parseInt(m.offset.toString())+parseInt(m.limit.toString())}else{const d=[];d.resultCount=this.resultCount,d.lastFetchedData=r?.detail.fetchedData||{},this.props=d}s>0&&r&&!this.localStorage&&(this.limit=Math.round(this.limit/s*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=this.filterPublisher?.get(),h=this.filteredFields.split(" ");for(const d in c)this.filteredFields&&h.includes(d)||c[d]==null||c[d]==""||l.set(d,c[d]);this.searchHash||(this.searchHash=l.toString()),n=n+"?"+l.toString(),e=e+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(e);const u=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:e,endPoint:n,offset:t,limit:this.limit}];u.resultCount=this.resultCount,u.lastFetchedData=r?.detail.fetchedData||{},this.props=u,this.lastRequestTime=new Date().getTime()}render(){if(this.storeScrollPosition(),!Array.isArray(this.props))return A;let r=!this.noLazyload;return this.props.length==1&&(r=!1),this.style.display="block",g`
1230
- ${jr(this.props,(t,i)=>{const s=i==0?this.templates:this.templates?.filter(e=>e.getAttribute("data-value")!="no-item");return g`
1229
+ */function*ro(s,t){if(s!==void 0){let r=0;for(const i of s)yield t(i,r++)}}var al=Object.defineProperty,ll=Object.getOwnPropertyDescriptor,at=(s,t,r,i)=>{for(var e=i>1?void 0:i?ll(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&al(t,r,e),e};const cl="sonic-queue";let J=class extends et(P){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=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=()=>{const t=this.dataProviderExpression.split("?");t.shift();const r=new URLSearchParams(t.join("?")),i=this.filterPublisher?.get(),e=this.filteredFields.split(" ");for(const n in i){let l=i[n];Array.isArray(l)&&(l=l.filter(c=>c!==null)),!(this.filteredFields&&e.includes(n)||l==null||l.toString()==="")&&r.set(n,i[n].toString())}const o=r.toString();if(!(o==this.searchHash&&!this.isFirstRequest)){this.searchHash=o;for(const n of this.listDataProviders)O.delete(n);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const n=this.resultCount;this.props=null,this.requestId++,this.resultCount=n,await O.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1,this.storedScrollY=0,this.storedScrollX=0}disconnectedCallback(){for(const s of this.listDataProviders)O.delete(s),this.listDataProviders=[];this.filterPublisher?.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=J.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=ae.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.storeScrollPosition(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await O.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const s=this.getAncestorAttributeValue("dataFilterProvider");if(!s){this.next();return}this.filterPublisher=O.getInstance().get(s),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}storeScrollPosition(){this.isSafari()&&(this.storedScrollX=window.scrollX,this.storedScrollY=window.scrollY)}isSafari(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}updated(s){this.isSafari()&&((Math.abs(this.storedScrollX-window.scrollX)>10||Math.abs(this.storedScrollY-window.scrollY)>10)&&window.scrollTo(this.storedScrollX,this.storedScrollY),window.requestAnimationFrame(()=>{(Math.abs(this.storedScrollX-window.scrollX)>10||Math.abs(this.storedScrollY-window.scrollY)>10)&&window.scrollTo(this.storedScrollX,this.storedScrollY)})),super.updated(s)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(s){let t=this.offset;const i=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&s&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!s,s){if(this.publisher.lastFetchedData=s.detail.fetchedData,s.detail.requestId<this.requestId)return;if(this.resultCount+=s.detail.props?.length||0,!s.detail.isFirstLoad||!s.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const d=this.props,f=d[d.length-1];t=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const d=[];d.resultCount=this.resultCount,d.lastFetchedData=s?.detail.fetchedData||{},this.props=d}i>0&&s&&!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=this.filterPublisher?.get(),h=this.filteredFields.split(" ");for(const d in c)this.filteredFields&&h.includes(d)||c[d]==null||c[d]==""||l.set(d,c[d]);this.searchHash||(this.searchHash=l.toString()),n=n+"?"+l.toString(),e=e+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(e);const p=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:e,endPoint:n,offset:t,limit:this.limit}];p.resultCount=this.resultCount,p.lastFetchedData=s?.detail.fetchedData||{},this.props=p,this.lastRequestTime=new Date().getTime()}render(){if(this.storeScrollPosition(),!Array.isArray(this.props))return D;let s=!this.noLazyload;return this.props.length==1&&(s=!1),this.style.display="block",m`
1230
+ ${ro(this.props,(t,r)=>{const i=r==0?this.templates:this.templates?.filter(e=>e.getAttribute("data-value")!="no-item");return m`
1231
1231
  <sonic-list
1232
1232
  fetch
1233
1233
  loader="${this.loader}"
1234
1234
  cache=${this.cache}
1235
1235
  displayContents
1236
1236
  lazyBoundsRatio=${this.lazyBoundsRatio}
1237
- ?lazyload=${r}
1237
+ ?lazyload=${s}
1238
1238
  ?invalidateOnPageShow=${this.invalidateOnPageShow}
1239
1239
  localStorage=${this.localStorage}
1240
1240
  requestId=${this.requestId}
@@ -1246,43 +1246,43 @@
1246
1246
  dataProvider="${t.dataProvider}"
1247
1247
  endPoint="${t.endPoint}"
1248
1248
  idKey=${this.idKey}
1249
- .templates=${s}
1249
+ .templates=${i}
1250
1250
  .items=${this.items}
1251
- .noItems=${i==0?this.noItems:void 0}
1251
+ .noItems=${r==0?this.noItems:void 0}
1252
1252
  .skeleton=${this.skeleton}
1253
1253
  >
1254
1254
  </sonic-list>
1255
1255
  `})}
1256
- `}};G.instanceCounter=0,it([a({type:Array})],G.prototype,"templates",2),it([a({type:Function,attribute:!1})],G.prototype,"items",2),it([a({type:Function,attribute:!1})],G.prototype,"noItems",2),it([a({type:Function,attribute:!1})],G.prototype,"skeleton",2),it([a({type:Object})],G.prototype,"itemPropertyMap",2),it([a()],G.prototype,"cache",2),it([a()],G.prototype,"targetRequestDuration",2),it([a()],G.prototype,"limit",2),it([a()],G.prototype,"lazyBoundsRatio",2),it([a()],G.prototype,"offset",2),it([a()],G.prototype,"resultCount",2),it([a({type:Boolean})],G.prototype,"noLazyload",2),it([a({type:String})],G.prototype,"loader",2),it([a()],G.prototype,"filteredFields",2),it([a({type:String})],G.prototype,"dataProviderExpression",2),it([a({type:Boolean})],G.prototype,"invalidateOnPageShow",2),it([a({type:String})],G.prototype,"idKey",2),G=it([P(Ia)],G);var Ma=Object.defineProperty,Fa=Object.getOwnPropertyDescriptor,Ee=(r,t,i,s)=>{for(var e=s>1?void 0:s?Fa(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Ma(t,i,e),e};const ja="sonic-submit";let Qt=class extends Q(x){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async r=>{if(this.disabled||r instanceof KeyboardEvent&&r.key!=="Enter")return;r instanceof MouseEvent&&r.stopPropagation();const t=k.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid.set(!0),t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,st.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),st.hide(),this.disabled=!1;return}const s=this.getAttribute("method")?.toLocaleLowerCase()||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),l=n?k.getInstance().get(n):null;let c={};l&&(c=l.get());let h=null;const u=this.getAncestorAttributeValue("dataProvider"),d=this.endPoint||u,m=async()=>{const p={...o};if(delete p.needsCaptchaValidation,delete c.needsCaptchaValidation,e)h=await this.api?.submitFormData(d,p,s,c);else switch(s){case"put":h=await this.api?.put(d,p,c);break;case"patch":h=await this.api?.patch(d,p,c);break;case"delete":h=await this.api?.delete(d,p,c);break;case"get":const b=new URLSearchParams;if(p)for(const S in p)b.append(S,p[S]);const w="?"+b.toString();h=await this.api?.get(d+w,c);break;default:h=await this.api?.post(d,p,c);break}st.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network Error",status:"error"}]};const v=this.getAncestorAttributeValue("clearedDataOnSuccess");v&&v.split(" ").forEach(b=>k.get(b).set({}));const _=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",D=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&p[_]&&p[D]&&this.saveCredentials(p[_],p[D]),this.submitResultKey&&(h=tt.traverse(h,this.submitResultKey.split("."),!0));const f=this.getAncestorAttributeValue("submitResultDataProvider");f&&k.get(f).set(h),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:h,bubbles:!0,composed:!0}))},y=l?.needsCaptchaValidation.get()?l:t.needsCaptchaValidation.get()?t:null;if(y){y.captchaToken.set("request_token");const p=v=>{v!="request_token"?(m(),y.captchaToken.offAssign(p)):(st.hide(),this.disabled=!1)};y.captchaToken.onAssign(p)}else m()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new de(this.getApiConfiguration())}submitNativeForm(){const r=Gt.getClosestForm(this);if(!r)return;const t=this.getAncestorAttributeValue("formDataProvider"),i={...k.get(t).get()};delete i.needsCaptchaValidation;for(const e in i){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=i[e];Array.isArray(n)&&(n=n.join(",")),o.type==="checkbox"||o.type==="radio"?n&&(o.checked=!0):o.value=n}const s=document.createElement("input");s.name=this.name,s.style.display="none",s.value=this.value,s.type="submit",r.appendChild(s),s&&s.click()}async saveCredentials(r,t){if("PasswordCredential"in window){const i=new window.PasswordCredential({id:r,password:t});await navigator.credentials.store(i)}}render(){return g`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Qt.styles=C`
1256
+ `}};J.instanceCounter=0,at([a({type:Array})],J.prototype,"templates",2),at([a({type:Function,attribute:!1})],J.prototype,"items",2),at([a({type:Function,attribute:!1})],J.prototype,"noItems",2),at([a({type:Function,attribute:!1})],J.prototype,"skeleton",2),at([a({type:Object})],J.prototype,"itemPropertyMap",2),at([a()],J.prototype,"cache",2),at([a()],J.prototype,"targetRequestDuration",2),at([a()],J.prototype,"limit",2),at([a()],J.prototype,"lazyBoundsRatio",2),at([a()],J.prototype,"offset",2),at([a()],J.prototype,"resultCount",2),at([a({type:Boolean})],J.prototype,"noLazyload",2),at([a({type:String})],J.prototype,"loader",2),at([a()],J.prototype,"filteredFields",2),at([a({type:String})],J.prototype,"dataProviderExpression",2),at([a({type:Boolean})],J.prototype,"invalidateOnPageShow",2),at([a({type:String})],J.prototype,"idKey",2),J=at([C(cl)],J);var hl=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,He=(s,t,r,i)=>{for(var e=i>1?void 0:i?dl(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&hl(t,r,e),e};const ul="sonic-submit";let ce=class extends et(P){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async s=>{if(this.disabled||s instanceof KeyboardEvent&&s.key!=="Enter")return;s instanceof MouseEvent&&s.stopPropagation();const t=O.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(t.isFormValid.set(!0),t.invalidateForm(),!t.isFormValid.get())return;if(this.disabled=!0,nt.show(),t.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),nt.hide(),this.disabled=!1;return}const i=this.getAttribute("method")?.toLocaleLowerCase()||"post",e=this.hasAttribute("sendAsFormData"),o=t.get();delete o.isFormValid;const n=this.getAncestorAttributeValue("headersDataProvider"),l=n?O.getInstance().get(n):null;let c={};l&&(c=l.get());let h=null;const p=this.getAncestorAttributeValue("dataProvider"),d=this.endPoint||p,f=async()=>{const y={...o};if(delete y.needsCaptchaValidation,delete c.needsCaptchaValidation,e)h=await this.api?.submitFormData(d,y,i,c);else switch(i){case"put":h=await this.api?.put(d,y,c);break;case"patch":h=await this.api?.patch(d,y,c);break;case"delete":h=await this.api?.delete(d,y,c);break;case"get":const b=new URLSearchParams;if(y)for(const x in y)b.append(x,y[x]);const w="?"+b.toString();h=await this.api?.get(d+w,c);break;default:h=await this.api?.post(d,y,c);break}nt.hide(),h?h._sonic_http_response_&&!h._sonic_http_response_.ok&&Object.keys(h).length===1&&(h.messages=[{content:"Network Error",status:"error"}]):h={messages:[{content:"Network Error",status:"error"}]};const g=this.getAncestorAttributeValue("clearedDataOnSuccess");g&&g.split(" ").forEach(b=>O.get(b).set({}));const v=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",A=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&y[v]&&y[A]&&this.saveCredentials(y[v],y[A]),this.submitResultKey&&(h=rt.traverse(h,this.submitResultKey.split("."),!0));const u=this.getAncestorAttributeValue("submitResultDataProvider");u&&O.get(u).set(h),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:h,bubbles:!0,composed:!0}))},_=l?.needsCaptchaValidation.get()?l:t.needsCaptchaValidation.get()?t:null;if(_){_.captchaToken.set("request_token");const y=g=>{g!="request_token"?(f(),_.captchaToken.offAssign(y)):(nt.hide(),this.disabled=!1)};_.captchaToken.onAssign(y)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new ne(this.getApiConfiguration())}submitNativeForm(){const s=ae.getClosestForm(this);if(!s)return;const t=this.getAncestorAttributeValue("formDataProvider"),r={...O.get(t).get()};delete r.needsCaptchaValidation;for(const e in r){if(e=="isFormValid")continue;let o=s.querySelector('input[name="'+e+'"], select[name="'+e+'"], textarea[name="'+e+'"]');o||(o=document.createElement("input"),o.type="hidden",o.name=e,s.appendChild(o));let n=r[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",s.appendChild(i),i&&i.click()}async saveCredentials(s,t){if("PasswordCredential"in window){const r=new window.PasswordCredential({id:s,password:t});await navigator.credentials.store(r)}}render(){return m`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};ce.styles=$`
1257
1257
  [data-disabled] {
1258
1258
  opacity: 0.3;
1259
1259
  pointer-events: none;
1260
1260
  user-select: none;
1261
1261
  }
1262
- `,Ee([a({type:String})],Qt.prototype,"submitResultKey",2),Ee([a({type:Boolean})],Qt.prototype,"disabled",2),Ee([a({type:String})],Qt.prototype,"endPoint",2),Ee([a()],Qt.prototype,"name",2),Ee([a()],Qt.prototype,"value",2),Qt=Ee([P(ja)],Qt);var Ra=Object.defineProperty,za=Object.getOwnPropertyDescriptor,rs=(r,t,i,s)=>{for(var e=s>1?void 0:s?za(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Ra(t,i,e),e};const Ua="sonic-router";let Te=class extends Ze(x){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){et.onChange(this),super.connectedCallback()}disconnectedCallback(){et.offChange(this),super.disconnectedCallback()}set location(r){this._location=r,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const r=new URL(this.location,document.location.origin);return r.pathname+r.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const r=[];for(let[t,i]of Object.entries(this.routes)){if(t==="fallback"||!i)continue;const s=new RegExp(this.regExpBasePath+t);if(s.test(this.cleanLocation)){const e=s.exec(this.cleanLocation)||[t];e.shift(),r.push(i([...e]))}else try{const o=new zt(this.patternBasePath+t).match(this.cleanLocation);if(o){const n=o||{};r.push(i(n))}}catch{this.cleanLocation.indexOf((this.basePath||"")+t.replace(document.location.origin,""))!=-1&&r.push(i({}))}}return r.length==0&&this.routes?.fallback&&this.isConnected&&r.push(this.routes.fallback()),r}render(){const r=this.handleroutes();if(r.length>0)return g`${r}`;const t=[];for(const i of this.templatePartsList){const s=i.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+s).test(this.cleanLocation))t.push(i);else try{new zt(this.patternBasePath+s+"(/*)").match(this.cleanLocation)&&(i.setAttribute("mode","patternMatching"),t.push(i))}catch{this.cleanLocation.indexOf((this.basePath||"")+s.replace(document.location.origin,""))!=-1&&t.push(i)}}if(t.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const i=this.templateList.find(s=>s.hasAttribute("data-fallback"));i&&t.push(i)}return g`${Ns(t,(i,s)=>s+new Date().getTime(),i=>{if(i.title&&(document.title=i.title),i.hasAttribute("dataProviderExpression")){let s="";const e=i.getAttribute("dataProviderExpression")||"";if(i.getAttribute("mode")=="patternMatching"){const o=new zt("(/)*"+(i.getAttribute(this.templateValueAttribute)||"")+"*");s=new zt(e).stringify(o.match(this.cleanLocation))}else{const o=new RegExp(i.getAttribute(this.templateValueAttribute)||""),n=(this.cleanLocation+"").match(o);n&&(s=n.shift()?.replace(o,e)||"")}return g`<div
1262
+ `,He([a({type:String})],ce.prototype,"submitResultKey",2),He([a({type:Boolean})],ce.prototype,"disabled",2),He([a({type:String})],ce.prototype,"endPoint",2),He([a()],ce.prototype,"name",2),He([a()],ce.prototype,"value",2),ce=He([C(ul)],ce);var pl=Object.defineProperty,fl=Object.getOwnPropertyDescriptor,gs=(s,t,r,i)=>{for(var e=i>1?void 0:i?fl(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&pl(t,r,e),e};const bl="sonic-router";let qe=class extends as(P){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){ot.onChange(this),super.connectedCallback()}disconnectedCallback(){ot.offChange(this),super.disconnectedCallback()}set location(s){this._location=s,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const s=new URL(this.location,document.location.origin);return s.pathname+s.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const s=[];for(let[t,r]of Object.entries(this.routes)){if(t==="fallback"||!r)continue;const i=new RegExp(this.regExpBasePath+t);if(i.test(this.cleanLocation)){const e=i.exec(this.cleanLocation)||[t];e.shift(),s.push(r([...e]))}else try{const o=new Zt(this.patternBasePath+t).match(this.cleanLocation);if(o){const n=o||{};s.push(r(n))}}catch{this.cleanLocation.indexOf((this.basePath||"")+t.replace(document.location.origin,""))!=-1&&s.push(r({}))}}return s.length==0&&this.routes?.fallback&&this.isConnected&&s.push(this.routes.fallback()),s}render(){const s=this.handleroutes();if(s.length>0)return m`${s}`;const t=[];for(const r of this.templatePartsList){const i=r.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+i).test(this.cleanLocation))t.push(r);else try{new Zt(this.patternBasePath+i+"(/*)").match(this.cleanLocation)&&(r.setAttribute("mode","patternMatching"),t.push(r))}catch{this.cleanLocation.indexOf((this.basePath||"")+i.replace(document.location.origin,""))!=-1&&t.push(r)}}if(t.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const r=this.templateList.find(i=>i.hasAttribute("data-fallback"));r&&t.push(r)}return m`${qs(t,(r,i)=>i+new Date().getTime(),r=>{if(r.title&&(document.title=r.title),r.hasAttribute("dataProviderExpression")){let i="";const e=r.getAttribute("dataProviderExpression")||"";if(r.getAttribute("mode")=="patternMatching"){const o=new Zt("(/)*"+(r.getAttribute(this.templateValueAttribute)||"")+"*");i=new Zt(e).stringify(o.match(this.cleanLocation))}else{const o=new RegExp(r.getAttribute(this.templateValueAttribute)||""),n=(this.cleanLocation+"").match(o);n&&(i=n.shift()?.replace(o,e)||"")}return m`<div
1263
1263
  style="display:contents"
1264
- dataProvider="${s}"
1264
+ dataProvider="${i}"
1265
1265
  >
1266
- ${Et(i)}
1267
- </div>`}return Et(i)})}`}};rs([a({type:String})],Te.prototype,"fallBackRoute",2),rs([a({type:Object,attribute:!1})],Te.prototype,"routes",2),rs([a({type:String})],Te.prototype,"basePath",2),rs([a()],Te.prototype,"location",1),Te=rs([P(Ua)],Te);var Va=Object.getOwnPropertyDescriptor,Ba=(r,t,i,s)=>{for(var e=s>1?void 0:s?Va(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Ha="sonic-redirect";let Rr=class extends Q(x){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")){et.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=tt.traverse(this.props,r);t&&!(tt.isObject(t)&&t)&&et.changeFromComponent(this)}};Rr=Ba([P(Ha)],Rr);var qa=Object.defineProperty,Wa=Object.getOwnPropertyDescriptor,Rs=(r,t,i,s)=>{for(var e=s>1?void 0:s?Wa(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&qa(t,i,e),e};const Ka="sonic-states";let os=class extends Q(Ze(x)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=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.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(r){if(!this.states)return[];const t=[];for(const[i,s]of Object.entries(this.states)){if(i==="fallback"||!s)continue;const e=new RegExp(i);if(e.test(r)){const o=e.exec(r)||[i];o.shift(),t.push(s([...o]))}else try{const o=new zt("(/)*"+i+"*");if(o.match(r)){const n=o.match(r)||{};t.push(s(n))}}catch{r.indexOf(i.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.states?.fallback&&this.isConnected&&t.push(this.states.fallback()),t}render(){let r=this.state;(!Array.isArray(r)&&tt.isObject(r)||r===void 0)&&(r="");const t=this.handleStates(r);if(t.length>0)return g`${t}`;const i=[];for(const s of this.templatePartsList){let e=s.getAttribute(this.templateValueAttribute),o=r;if(this.inverted&&(o=e,e=r),e==""&&(e=this.inverted?".*?":"^$"),new RegExp(e).test(o+""))i.push(s),s.removeAttribute("mode");else{const l=new zt(e);l.names.length>0&&l.match(o)&&(s.setAttribute("mode","patternMatching"),i.push(s))}}return g`${Ns(i,(s,e)=>e+new Date().getTime(),s=>{if(s?.hasAttribute("dataProviderExpression")){const e=s.getAttribute("dataProviderExpression");let o="",n=r,l=s.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=l,l=r),l==""&&(l=this.inverted?"*":"^$"),s.getAttribute("mode")=="patternMatching"){const c=new zt(l);o=new zt(e).stringify(c.match(n))}else{const c=new RegExp(l),h=(n+"").match(c);h&&(o=h.shift()?.replace(c,e))}return g`<div
1266
+ ${Ut(r)}
1267
+ </div>`}return Ut(r)})}`}};gs([a({type:String})],qe.prototype,"fallBackRoute",2),gs([a({type:Object,attribute:!1})],qe.prototype,"routes",2),gs([a({type:String})],qe.prototype,"basePath",2),gs([a()],qe.prototype,"location",1),qe=gs([C(bl)],qe);var gl=Object.getOwnPropertyDescriptor,ml=(s,t,r,i)=>{for(var e=i>1?void 0:i?gl(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const vl="sonic-redirect";let oo=class extends et(P){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")){ot.changeFromComponent(this);return}if(!this.props)return;const s=this.getAttribute("onData").split("."),t=rt.traverse(this.props,s);t&&!(rt.isObject(t)&&t)&&ot.changeFromComponent(this)}};oo=ml([C(vl)],oo);var yl=Object.defineProperty,_l=Object.getOwnPropertyDescriptor,Zs=(s,t,r,i)=>{for(var e=i>1?void 0:i?_l(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&yl(t,r,e),e};const wl="sonic-states";let ms=class extends et(as(P)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=s=>{this.state=s,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 s=this.statePath.split(".");for(const t of s)this.statePublisher=this.statePublisher[t];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(s){if(!this.states)return[];const t=[];for(const[r,i]of Object.entries(this.states)){if(r==="fallback"||!i)continue;const e=new RegExp(r);if(e.test(s)){const o=e.exec(s)||[r];o.shift(),t.push(i([...o]))}else try{const o=new Zt("(/)*"+r+"*");if(o.match(s)){const n=o.match(s)||{};t.push(i(n))}}catch{s.indexOf(r.replace(document.location.origin,""))!=-1&&t.push(i({}))}}return t.length==0&&this.states?.fallback&&this.isConnected&&t.push(this.states.fallback()),t}render(){let s=this.state;(!Array.isArray(s)&&rt.isObject(s)||s===void 0)&&(s="");const t=this.handleStates(s);if(t.length>0)return m`${t}`;const r=[];for(const i of this.templatePartsList){let e=i.getAttribute(this.templateValueAttribute),o=s;if(this.inverted&&(o=e,e=s),e==""&&(e=this.inverted?".*?":"^$"),new RegExp(e).test(o+""))r.push(i),i.removeAttribute("mode");else{const l=new Zt(e);l.names.length>0&&l.match(o)&&(i.setAttribute("mode","patternMatching"),r.push(i))}}return m`${qs(r,(i,e)=>e+new Date().getTime(),i=>{if(i?.hasAttribute("dataProviderExpression")){const e=i.getAttribute("dataProviderExpression");let o="",n=s,l=i.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=l,l=s),l==""&&(l=this.inverted?"*":"^$"),i.getAttribute("mode")=="patternMatching"){const c=new Zt(l);o=new Zt(e).stringify(c.match(n))}else{const c=new RegExp(l),h=(n+"").match(c);h&&(o=h.shift()?.replace(c,e))}return m`<div
1268
1268
  style="display:contents"
1269
1269
  dataProvider="${o}"
1270
1270
  >
1271
- ${Et(s)}
1272
- </div>`}return Et(s)})}`}};Rs([a()],os.prototype,"state",2),Rs([a({type:Boolean,reflect:!0})],os.prototype,"inverted",2),Rs([a({type:Object})],os.prototype,"states",2),os=Rs([P(Ka)],os);var Ya=Object.getOwnPropertyDescriptor,Za=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ya(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Ga="sonic-scope";let zr=class extends x{createRenderRoot(){return this}render(){return g`<slot></slot>`}};zr=Za([P(Ga)],zr);function Xa(r){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(r)}function Qa(r){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(r)}function Ja(r){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(r)}function Ne(r){if(r.__is__setSubscribable__)return;r.__is__setSubscribable__=!0,r.__onBeforeConnected__=Xa,r.__onConnected__=Qa,r.__onDisconnected__=Ja;const t=r.connectedCallback;r.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(s=>s(this)),t?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(s=>s(this))};const i=r.disconnectedCallback;r.disconnectedCallback=function(){i?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(s=>s(this))}}function tl(r){return r.trim().replace(/^this\./,"")}function Si(r,t){if(!t)return;const i=t.split(".").filter(Boolean);if(i.length===0)return;let s=r;for(const e of i){if(s==null||typeof s!="object")return;s=s[e]}return s}function fe(r,t){let i=!1;const s=(n,l)=>{const c=tl(l),h=Si(r,c);return h==null?(i=!0,""):`${h}`},e=t.replace(/\$\{([^}]+)\}/g,s).replace(/\{\$([^}]+)\}/g,s).trim();if(i||!e.length)return{ready:!1,path:null};const o=e.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:e}}function be(r){const t=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],i=new Set;for(const s of t){let e;for(;(e=s.exec(r))!==null;){const o=(e[1]||"").trim().replace(/^this\./,"");if(!o)continue;const[n]=o.split(".");n&&i.add(n)}}return Array.from(i)}function Ur(r){return typeof r=="object"&&r!==null&&"path"in r&&typeof r.path=="string"}const ns=new WeakMap,as=new Set;let Ie=null;const el=8;function sl(r){let t=ns.get(r);return t||(t=new Map,ns.set(r,t)),t}function il(r,t){const i=new Set;for(const[s,e]of t){const o=Si(r,s);Object.is(e.lastValue,o)||(e.lastValue=o,e.onChangeHandlers.forEach(n=>i.add(n)))}return i}function rl(){Ie=null;let r=0,t=!0;for(;t&&r<el;){t=!1,r+=1;for(const i of as){const s=ns.get(i);if(!s||s.size===0)continue;const e=il(i,s);e.size!==0&&(t=!0,e.forEach(o=>o()))}}t&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),as.size>0&&Vr()}function Vr(){Ie===null&&(Ie=requestAnimationFrame(rl))}function ol(){as.size===0&&Ie!==null&&(cancelAnimationFrame(Ie),Ie=null)}function Me(r,t,i,s,e){const o=String(s),n=sl(i);let l=n.get(o);return l||(l={lastValue:Si(i,o),onChangeHandlers:new Set},n.set(o,l)),l.onChangeHandlers.add(e),as.add(i),Vr(),()=>{const c=ns.get(i);if(!c)return;const h=c.get(o);h&&(h.onChangeHandlers.delete(e),h.onChangeHandlers.size===0&&c.delete(o),c.size===0&&(ns.delete(i),as.delete(i),ol()))}}const zs={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},Br={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Us={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Hr={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function ls(r){const t=r.split(".").filter(e=>e.length>0);if(t.length===0)return null;const i=t.shift()||"";if(!i)return null;let s=k.get(i);return s?(s=Xe.traverse(s,t),s):null}function nl(r,t){const i=t?.reflect??!1,s=be(r),e=s.length>0;return function(o,n){if(!o)return;Ne(o);const l=`__bind_state_${n}`,c=`__bind_${n}_publisher__`,h=i?`__bind_${n}_updating_from_publisher__`:null;if(i){const u=Object.getOwnPropertyDescriptor(o,n),d=`__bind_${n}_value__`,m=`__bind_${n}_updating_from_publisher__`,y=u&&!u.get&&!u.set?u.value:void 0;Object.defineProperty(o,n,{get(){return u?.get?u.get.call(this):(!Object.prototype.hasOwnProperty.call(this,d)&&y!==void 0&&(this[d]=y),this[d])},set(p){u?.set?u.set.call(this,p):this[d]=p,!this[m]&&this[c]&&this[c].set(p)},enumerable:u?.enumerable??!0,configurable:u?.configurable??!0})}o.__onConnected__(u=>{const d=u[l]||(u[l]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});d.unsubscribePublisher&&(d.unsubscribePublisher(),d.unsubscribePublisher=null),d.cleanupWatchers.forEach(p=>p()),d.cleanupWatchers=[],d.currentPath=null;const m=p=>{if(!p){d.unsubscribePublisher&&(d.unsubscribePublisher(),d.unsubscribePublisher=null),d.currentPath=null,u[c]=null;return}if(p===d.currentPath)return;d.unsubscribePublisher&&(d.unsubscribePublisher(),d.unsubscribePublisher=null);const v=ls(p);if(!v){d.currentPath=null,u[c]=null;return}const _=D=>{i&&h&&(u[h]=!0),u[n]=D,i&&h&&(u[h]=!1)};v.onAssign(_),d.unsubscribePublisher=()=>{v.offAssign(_),u[c]===v&&(u[c]=null)},d.currentPath=p,u[c]=v},y=()=>{if(e){const p=fe(u,r);if(!p.ready){m(null);return}m(p.path);return}m(r)};if(e)for(const p of s){const v=Me(zs.watcherStore,zs.hooked,u,p,()=>y());d.cleanupWatchers.push(v)}y()}),o.__onDisconnected__(u=>{const d=u[l];d&&(d.unsubscribePublisher&&(d.unsubscribePublisher(),d.unsubscribePublisher=null),d.cleanupWatchers.forEach(m=>m()),d.cleanupWatchers=[],d.currentPath=null,u[c]=null)})}}function qr(r,t){const i=Ur(r)?r.path:r;return nl(i,t)}function Wr(r){const t=r.path,i=be(t);return function(s,e){Ne(s);const o=`__publish_${e}_publisher__`,n=`__publish_${e}_value__`,l=Object.getOwnPropertyDescriptor(s,e),c=l&&!l.get&&!l.set?l.value:void 0;Object.defineProperty(s,e,{get(){return l?.get?l.get.call(this):(!Object.prototype.hasOwnProperty.call(this,n)&&c!==void 0&&(this[n]=c),this[n])},set(h){l?.set?l.set.call(this,h):this[n]=h;const u=this[o];u&&u.set(h)},enumerable:l?.enumerable??!0,configurable:l?.configurable??!0}),s.__onConnected__(h=>{const u=h,d=`__publish_state_${e}`,m=u[d]||(u[d]={cleanupWatchers:[]}),y=()=>{let p;if(i.length){const _=fe(h,t);p=_.ready?_.path:null}else p=t;const v=p?ls(p):void 0;if(u[o]=v??null,v&&e in h){const _=u[e];_!==void 0&&v.set(_)}};if(m.cleanupWatchers.forEach(p=>p()),m.cleanupWatchers=[],i.length)for(const p of i)m.cleanupWatchers.push(Me(Br.watcherStore,Br.hooked,u,p,y));y()}),s.__onDisconnected__(h=>{const u=h,d=`__publish_state_${e}`,m=u[d];m?.cleanupWatchers&&m.cleanupWatchers.forEach(y=>y()),u[o]=void 0})}}function Kr(r){return qr(r)}const al={nullish:r=>r==null,emptyString:r=>r==="",emptyObject:r=>typeof r=="object"&&r!==null&&!Array.isArray(r)&&Object.keys(r).length===0,emptyArray:r=>Array.isArray(r)&&r.length===0};function ll(r,t){return t.some(i=>al[i](r))}function cl(r,t,i){if(!i.dispatchWhenUndefined&&r.slice(0,t).filter(e=>e!=null).length!==t)return!1;if(i.skip&&i.skip.length>0){for(let s=0;s<t;s++)if(ll(r[s],i.skip))return!1}return!0}function hl(...r){return Yr({},r)}function Yr(r,t){const i=t.map(s=>{const e=be(s);return{originalPath:s,dynamicDependencies:e,isDynamic:e.length>0}});return function(s,e,o){Ne(s);const n=`__onAssign_state_${e}__`;let l;s.__onConnected__(c=>{const h=c[n]||(c[n]={cleanupWatchers:[],configurations:[]});h.cleanupWatchers.forEach(p=>p()),h.cleanupWatchers=[],h.configurations.forEach(p=>{p.unsubscribePublisher&&p.unsubscribePublisher()}),h.configurations=[];const u=[],d=[];for(let p=0;p<t.length;p++){const v=i[p],_=new Set,D=f=>{u[p]=f,cl(u,t.length,r)&&_.forEach(b=>b(...u))};d.push({publisher:null,onAssign:D,callbacks:_,unsubscribePublisher:null,pathConfig:v,index:p})}const m=(p,v)=>{if(p.unsubscribePublisher&&(p.unsubscribePublisher(),p.unsubscribePublisher=null),u[p.index]=null,p.publisher=null,!v)return;const _=ls(v);_&&(_.onAssign(p.onAssign),p.unsubscribePublisher=()=>{_.offAssign(p.onAssign),p.publisher===_&&(p.publisher=null)},p.publisher=_)},y=()=>{for(const p of d)if(p.pathConfig.isDynamic){const v=fe(c,p.pathConfig.originalPath);if(!v.ready){m(p,null);continue}m(p,v.path)}else m(p,p.pathConfig.originalPath)};for(const p of d)if(p.pathConfig.isDynamic)for(const v of p.pathConfig.dynamicDependencies){const _=Me(Hr.watcherStore,Hr.hooked,c,v,()=>y());h.cleanupWatchers.push(_)}l=o.value.bind(c);for(const p of d)p.callbacks.add(l);y(),h.configurations=d}),s.__onDisconnected__(c=>{const h=c[n];h&&(h.cleanupWatchers.forEach(u=>u()),h.cleanupWatchers=[],h.configurations.forEach(u=>{u.unsubscribePublisher&&u.unsubscribePublisher(),u.callbacks.delete(l)}),h.configurations=[])})}}function dl(r){return Object.prototype.toString.call(r)==="[object DataProviderKey]"}function ul(...r){const t=r[r.length-1],i=t!==void 0&&!dl(t),s=i?t:{},o=(i?r.slice(0,-1):r).map(n=>n.path);return Yr({dispatchWhenUndefined:!s.waitForAllDefined,skip:s.skip},o)}function pl(){return function(r,t,i){let s=0;const e=i.value,o=r.constructor.prototype.disconnectedCallback;r.constructor.prototype.disconnectedCallback=function(){o?.apply(this),this.__removeAutoSubscribe__()};const n=r.connectedCallback;r.connectedCallback=function(){n?.call(this),this[t]()},i.value=function(...l){let c=new Set;const h=()=>{s++;const d=s;window.queueMicrotask(()=>{d===s&&this[t]()})};c.forEach(d=>{d.offAssign(h)}),k.collectModifiedPublisher();const u=e.apply(this,l);return c=k.getModifiedPublishers()||new Set,c.forEach(d=>{d.onAssign(h,!1)}),this.__removeAutoSubscribe__=()=>{c.forEach(d=>{d.offAssign(h)})},u}}}function fl(r){return function(t){Ne(t);for(const i of r){const s=i.split(".");if(s.length===0)continue;const e=s.shift()||"";let o=k.get(e);o=Xe.traverse(o,s),t.__onConnected__(n=>{o.startTemplateFilling(n)}),t.__onDisconnected__(()=>{})}}}function bl(r){return function(t,i){t&&(Ne(t),t.__onBeforeConnected__(s=>{const e=q.getAncestorAttributeValue(s,r);e!==null&&(s[i]=e)}))}}function Zr(r){return r instanceof HTMLElement||r instanceof ShadowRoot?r:null}function ml(r){if(!r||typeof r.get!="function")return null;const t=r.get();return!t||typeof t!="object"||!("serviceURL"in t)?null:t}function Gr(r){const t=Zr(r);return t?q.getApiConfiguration(t):null}function Xr(r){return typeof r?.serviceURL=="string"&&r.serviceURL.length>0}const gl=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function vl(r){return r instanceof HTMLElement&&typeof r.updateComplete<"u"}function yl(r,t){if(vl(r)){let s=!1;return r.updateComplete.then(()=>{s||t()}),()=>{s=!0}}const i=requestAnimationFrame(()=>t());return()=>cancelAnimationFrame(i)}function _l(r,t){const i=Zr(r);if(!i)return()=>{};let s=!1;const e=()=>{s||Xr(Gr(r))&&(s=!0,t())};if(e(),s)return()=>{};const o=[],n=requestAnimationFrame(()=>e());o.push(()=>cancelAnimationFrame(n)),queueMicrotask(()=>e());const l=new MutationObserver(()=>e());let c=i;for(;c;)c instanceof Element&&l.observe(c,{attributes:!0,attributeFilter:[...gl]}),c=c.parentNode||c.host;return o.push(()=>l.disconnect()),()=>{s=!0,o.forEach(h=>h())}}function Qr(r){r.configPublisher&&r.configMutationHandler&&r.configPublisher.offInternalMutation(r.configMutationHandler),r.configPublisher=null,r.configMutationHandler=null}function Jr(r,t){const i=r.path,s=t?.path,e=be(i),o=s?be(s):[],n=[...new Set([...e,...o])],l=e.length>0,c=!!s;return function(h,u){if(!h)return;Ne(h);const d=`__get_state_${u}`;h.__onConnected__(m=>{const y=m;let p=y[d];p||(p={cleanupWatchers:[],requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null},y[d]=p),p.cleanupWatchers.forEach(D=>D()),p.cleanupWatchers=[],p.requestGeneration++;const v=()=>{const D=l?fe(m,i):{ready:!0,path:i};if(!D.ready||!D.path){y[u]=void 0;return}let f=null;if(c&&s){const S=fe(m,s);if(!S.ready||!S.path){y[u]=void 0;return}const O=ls(S.path);f=ml(O)}else f=Gr(m);if(!Xr(f)){if(!c&&!p.scopeWatchCleanup){const S=_l(m,v);p.scopeWatchCleanup=S,p.cleanupWatchers.push(()=>{S(),p.scopeWatchCleanup=null})}return}const b=++p.requestGeneration;new de(f).getDetailed(D.path).then(S=>{b===p.requestGeneration&&(y[u]=S)})},_=()=>{if(!c||!s)return;Qr(p);const D=fe(m,s);if(!D.ready||!D.path){y[u]=void 0;return}const f=ls(D.path);if(!f){y[u]=void 0;return}const b=()=>{v()};f.onInternalMutation(b),p.configPublisher=f,p.configMutationHandler=b};if(c){for(const D of n){const f=Me(Us.watcherStore,Us.hooked,m,D,()=>_());p.cleanupWatchers.push(f)}_()}else{const D=()=>{if(l)for(const f of e){const b=Me(Us.watcherStore,Us.hooked,m,f,()=>v());p.cleanupWatchers.push(b)}v()};p.cleanupWatchers.push(yl(m,D))}}),h.__onDisconnected__(m=>{const y=m,p=y[d];p&&(Qr(p),p.cleanupWatchers.forEach(v=>v()),p.cleanupWatchers=[],p.requestGeneration++,y[u]=void 0)})}}const wl=Wr,xl=Kr,Pl=Jr;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:qr,publish:Wr,subscribe:Kr,onAssing:hl,handle:ul,ancestorAttribute:bl,autoSubscribe:pl,autoFill:fl,get:Jr};var Cl=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,Vs=(r,t,i,s)=>{for(var e=s>1?void 0:s?$l(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Cl(t,i,e),e};const to=new Ts("communes?limit=$limit&fields=nom,code"),eo=new Ue(to.path),Sl="sonic-example";let cs=class extends x{constructor(){super(...arguments),this.limit=5}render(){return g` <span part="api-get-demo">
1271
+ ${Ut(i)}
1272
+ </div>`}return Ut(i)})}`}};Zs([a()],ms.prototype,"state",2),Zs([a({type:Boolean,reflect:!0})],ms.prototype,"inverted",2),Zs([a({type:Object})],ms.prototype,"states",2),ms=Zs([C(wl)],ms);var xl=Object.getOwnPropertyDescriptor,Pl=(s,t,r,i)=>{for(var e=i>1?void 0:i?xl(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Cl="sonic-scope";let no=class extends P{createRenderRoot(){return this}render(){return m`<slot></slot>`}};no=Pl([C(Cl)],no);function $l(s){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(s)}function Sl(s){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(s)}function Al(s){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(s)}function ke(s){if(s.__is__setSubscribable__)return;s.__is__setSubscribable__=!0,s.__onBeforeConnected__=$l,s.__onConnected__=Sl,s.__onDisconnected__=Al;const t=s.connectedCallback;s.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(i=>i(this)),t?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const r=s.disconnectedCallback;s.disconnectedCallback=function(){r?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function kl(s){return s.trim().replace(/^this\./,"")}function Ri(s,t){if(!t)return;const r=t.split(".").filter(Boolean);if(r.length===0)return;let i=s;for(const e of r){if(i==null||typeof i!="object")return;i=i[e]}return i}function Dl(s,t){return!!(s==null||t?.skipEmptyPlaceholder&&s==="")}function $t(s,t,r){let i=!1;const e=(l,c)=>{const h=kl(c),p=Ri(s,h);return Dl(p,r)?(i=!0,""):`${p}`},o=t.replace(/\$\{([^}]+)\}/g,e).replace(/\{\$([^}]+)\}/g,e).trim();if(i||!o.length)return{ready:!1,path:null};const n=o.split(".").filter(Boolean);return n.length===0||!n[0]?{ready:!1,path:null}:{ready:!0,path:o}}function It(s){const t=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],r=new Set;for(const i of t){let e;for(;(e=i.exec(s))!==null;){const o=(e[1]||"").trim().replace(/^this\./,"");if(!o)continue;const[n]=o.split(".");n&&r.add(n)}}return Array.from(r)}function ao(s){return typeof s=="object"&&s!==null&&"path"in s&&typeof s.path=="string"}const vs=new WeakMap,ys=new Set;let We=null;const Ol=8;function El(s){let t=vs.get(s);return t||(t=new Map,vs.set(s,t)),t}function Ll(s,t){const r=new Set;for(const[i,e]of t){const o=Ri(s,i);Object.is(e.lastValue,o)||(e.lastValue=o,e.onChangeHandlers.forEach(n=>r.add(n)))}return r}function Tl(){We=null;let s=0,t=!0;for(;t&&s<Ol;){t=!1,s+=1;for(const r of ys){const i=vs.get(r);if(!i||i.size===0)continue;const e=Ll(r,i);e.size!==0&&(t=!0,e.forEach(o=>o()))}}t&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),ys.size>0&&lo()}function lo(){We===null&&(We=requestAnimationFrame(Tl))}function Ml(){ys.size===0&&We!==null&&(cancelAnimationFrame(We),We=null)}function he(s,t,r,i,e){const o=String(i),n=El(r);let l=n.get(o);return l||(l={lastValue:Ri(r,o),onChangeHandlers:new Set},n.set(o,l)),l.onChangeHandlers.add(e),ys.add(r),lo(),()=>{const c=vs.get(r);if(!c)return;const h=c.get(o);h&&(h.onChangeHandlers.delete(e),h.onChangeHandlers.size===0&&c.delete(o),c.size===0&&(vs.delete(r),ys.delete(r),Ml()))}}const Xs={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},co={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},de={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},ho={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Vt(s){const t=s.split(".").filter(e=>e.length>0);if(t.length===0)return null;const r=t.shift()||"";if(!r)return null;let i=O.get(r);return i?(i=cs.traverse(i,t),i):null}function Il(s,t){const r=t?.reflect??!1,i={skipEmptyPlaceholder:t?.skipEmptyPlaceholder},e=It(s),o=e.length>0;return function(n,l){if(!n)return;ke(n);const c=`__bind_state_${l}`,h=`__bind_${l}_publisher__`,p=r?`__bind_${l}_updating_from_publisher__`:null;if(r){const d=Object.getOwnPropertyDescriptor(n,l),f=`__bind_${l}_value__`,_=`__bind_${l}_updating_from_publisher__`,y=d&&!d.get&&!d.set?d.value:void 0;Object.defineProperty(n,l,{get(){return d?.get?d.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&y!==void 0&&(this[f]=y),this[f])},set(g){d?.set?d.set.call(this,g):this[f]=g,!this[_]&&this[h]&&this[h].set(g)},enumerable:d?.enumerable??!0,configurable:d?.configurable??!0})}n.__onConnected__(d=>{const f=d[c]||(d[c]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(g=>g()),f.cleanupWatchers=[],f.currentPath=null;const _=g=>{if(!g){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,d[h]=null;return}if(g===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const v=Vt(g);if(!v){f.currentPath=null,d[h]=null;return}const A=u=>{r&&p&&(d[p]=!0),d[l]=u,r&&p&&(d[p]=!1)};v.onAssign(A),f.unsubscribePublisher=()=>{v.offAssign(A),d[h]===v&&(d[h]=null)},f.currentPath=g,d[h]=v},y=()=>{if(o){const g=$t(d,s,i);if(!g.ready){_(null);return}_(g.path);return}_(s)};if(o)for(const g of e){const v=he(Xs.watcherStore,Xs.hooked,d,g,()=>y());f.cleanupWatchers.push(v)}y()}),n.__onDisconnected__(d=>{const f=d[c];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(_=>_()),f.cleanupWatchers=[],f.currentPath=null,d[h]=null)})}}function uo(s,t){const r=ao(s)?s.path:s;return Il(r,t)}function po(s,t){const r=s.path,i={skipEmptyPlaceholder:t?.skipEmptyPlaceholder},e=It(r);return function(o,n){ke(o);const l=`__publish_${n}_publisher__`,c=`__publish_${n}_value__`,h=Object.getOwnPropertyDescriptor(o,n),p=h&&!h.get&&!h.set?h.value:void 0;Object.defineProperty(o,n,{get(){return h?.get?h.get.call(this):(!Object.prototype.hasOwnProperty.call(this,c)&&p!==void 0&&(this[c]=p),this[c])},set(d){h?.set?h.set.call(this,d):this[c]=d;const f=this[l];f&&f.set(d)},enumerable:h?.enumerable??!0,configurable:h?.configurable??!0}),o.__onConnected__(d=>{const f=d,_=`__publish_state_${n}`,y=f[_]||(f[_]={cleanupWatchers:[]}),g=()=>{let v;if(e.length){const u=$t(d,r,i);v=u.ready?u.path:null}else v=r;const A=v?Vt(v):void 0;if(f[l]=A??null,A&&n in d){const u=f[n];u!==void 0&&A.set(u)}};if(y.cleanupWatchers.forEach(v=>v()),y.cleanupWatchers=[],e.length)for(const v of e)y.cleanupWatchers.push(he(co.watcherStore,co.hooked,f,v,g));g()}),o.__onDisconnected__(d=>{const f=d,_=`__publish_state_${n}`,y=f[_];y?.cleanupWatchers&&y.cleanupWatchers.forEach(g=>g()),f[l]=void 0})}}function fo(s){return uo(s)}const Nl={nullish:s=>s==null,emptyString:s=>s==="",emptyObject:s=>typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length===0,emptyArray:s=>Array.isArray(s)&&s.length===0};function Fl(s,t){return t.some(r=>Nl[r](s))}function jl(s,t,r){if(!r.dispatchWhenUndefined&&s.slice(0,t).filter(e=>e!=null).length!==t)return!1;if(r.skip&&r.skip.length>0){for(let i=0;i<t;i++)if(Fl(s[i],r.skip))return!1}return!0}function Rl(...s){return bo({},s)}function bo(s,t){const r=t.map(e=>{const o=It(e);return{originalPath:e,dynamicDependencies:o,isDynamic:o.length>0}}),i={skipEmptyPlaceholder:s.skipEmptyPlaceholder};return function(e,o,n){ke(e);const l=`__onAssign_state_${o}__`;let c;e.__onConnected__(h=>{const p=h[l]||(h[l]={cleanupWatchers:[],configurations:[]});p.cleanupWatchers.forEach(g=>g()),p.cleanupWatchers=[],p.configurations.forEach(g=>{g.unsubscribePublisher&&g.unsubscribePublisher()}),p.configurations=[];const d=[],f=[];for(let g=0;g<t.length;g++){const v=r[g],A=new Set,u=b=>{d[g]=b,jl(d,t.length,s)&&A.forEach(w=>w(...d))};f.push({publisher:null,onAssign:u,callbacks:A,unsubscribePublisher:null,pathConfig:v,index:g})}const _=(g,v)=>{if(g.unsubscribePublisher&&(g.unsubscribePublisher(),g.unsubscribePublisher=null),d[g.index]=null,g.publisher=null,!v)return;const A=Vt(v);A&&(A.onAssign(g.onAssign),g.unsubscribePublisher=()=>{A.offAssign(g.onAssign),g.publisher===A&&(g.publisher=null)},g.publisher=A)},y=()=>{for(const g of f)if(g.pathConfig.isDynamic){const v=$t(h,g.pathConfig.originalPath,i);if(!v.ready){_(g,null);continue}_(g,v.path)}else _(g,g.pathConfig.originalPath)};for(const g of f)if(g.pathConfig.isDynamic)for(const v of g.pathConfig.dynamicDependencies){const A=he(ho.watcherStore,ho.hooked,h,v,()=>y());p.cleanupWatchers.push(A)}c=n.value.bind(h);for(const g of f)g.callbacks.add(c);y(),p.configurations=f}),e.__onDisconnected__(h=>{const p=h[l];p&&(p.cleanupWatchers.forEach(d=>d()),p.cleanupWatchers=[],p.configurations.forEach(d=>{d.unsubscribePublisher&&d.unsubscribePublisher(),d.callbacks.delete(c)}),p.configurations=[])})}}function zl(s){return Object.prototype.toString.call(s)==="[object DataProviderKey]"}function Ul(...s){const t=s[s.length-1],r=t!==void 0&&!zl(t),i=r?t:{},o=(r?s.slice(0,-1):s).map(n=>n.path);return bo({dispatchWhenUndefined:!i.waitForAllDefined,skip:i.skip,skipEmptyPlaceholder:i.skipEmptyPlaceholder},o)}function Vl(){return function(s,t,r){let i=0;const e=r.value,o=s.constructor.prototype.disconnectedCallback;s.constructor.prototype.disconnectedCallback=function(){o?.apply(this),this.__removeAutoSubscribe__()};const n=s.connectedCallback;s.connectedCallback=function(){n?.call(this),this[t]()},r.value=function(...l){let c=new Set;const h=()=>{i++;const d=i;window.queueMicrotask(()=>{d===i&&this[t]()})};c.forEach(d=>{d.offAssign(h)}),O.collectModifiedPublisher();const p=e.apply(this,l);return c=O.getModifiedPublishers()||new Set,c.forEach(d=>{d.onAssign(h,!1)}),this.__removeAutoSubscribe__=()=>{c.forEach(d=>{d.offAssign(h)})},p}}}function Bl(s){return function(t){ke(t);for(const r of s){const i=r.split(".");if(i.length===0)continue;const e=i.shift()||"";let o=O.get(e);o=cs.traverse(o,i),t.__onConnected__(n=>{o.startTemplateFilling(n)}),t.__onDisconnected__(()=>{})}}}function Hl(s){return function(t,r){t&&(ke(t),t.__onBeforeConnected__(i=>{const e=Y.getAncestorAttributeValue(i,s);e!==null&&(i[r]=e)}))}}function go(s){return s instanceof HTMLElement||s instanceof ShadowRoot?s:null}function mo(s){if(!s||typeof s.get!="function")return null;const t=s.get();return!t||typeof t!="object"||!("serviceURL"in t)?null:t}function zi(s){const t=go(s);return t?Y.getApiConfiguration(t):null}function Ui(s){return typeof s?.serviceURL=="string"&&s.serviceURL.length>0}const ql=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Wl(s){return s instanceof HTMLElement&&typeof s.updateComplete<"u"}function Kl(s){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,s()}))}}function vo(s,t){if(Wl(s)){let r=!1;return s.updateComplete.then(()=>{r||t()}),()=>{r=!0}}return t(),()=>{}}function yo(s,t){const r=go(s);if(!r)return()=>{};let i=!1;const e=()=>{i||Ui(zi(s))&&(i=!0,t())};if(e(),i)return()=>{};const o=[],n=requestAnimationFrame(()=>e());o.push(()=>cancelAnimationFrame(n)),queueMicrotask(()=>e());const l=new MutationObserver(()=>e());let c=r;for(;c;)c instanceof Element&&l.observe(c,{attributes:!0,attributeFilter:[...ql]}),c=c.parentNode||c.host;return o.push(()=>l.disconnect()),()=>{i=!0,o.forEach(h=>h())}}function Qs(s){s.configPublisher&&s.configMutationHandler&&s.configPublisher.offInternalMutation(s.configMutationHandler),s.configPublisher=null,s.configMutationHandler=null}function _o(s,t,r){const i=s.path,e=wo(t)?void 0:t,n={skipEmptyPlaceholder:(wo(t)?t:r)?.skipEmptyPlaceholder},l=e?.path,c=It(i),h=l?It(l):[],p=[...new Set([...c,...h])],d=c.length>0,f=!!l;return function(_,y){if(!_)return;ke(_);const g=`__get_state_${y}`;_.__onConnected__(v=>{const A=v;let u=A[g];u||(u={cleanupWatchers:[],requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null},A[g]=u),u.cleanupWatchers.forEach(x=>x()),u.cleanupWatchers=[],u.requestGeneration++;const b=()=>{const x=d?$t(v,i,n):{ready:!0,path:i};if(!x.ready||!x.path){A[y]=void 0;return}let k=null;if(f&&l){const I=$t(v,l,n);if(!I.ready||!I.path){A[y]=void 0;return}const Nt=Vt(I.path);k=mo(Nt)}else k=zi(v);if(!Ui(k)){if(!f&&!u.scopeWatchCleanup){const I=yo(v,b);u.scopeWatchCleanup=I,u.cleanupWatchers.push(()=>{I(),u.scopeWatchCleanup=null})}return}const M=++u.requestGeneration;new ne(k).getDetailed(x.path).then(I=>{M===u.requestGeneration&&(A[y]=I)})},w=()=>{if(!f||!l)return;Qs(u);const x=$t(v,l,n);if(!x.ready||!x.path){A[y]=void 0;return}const k=Vt(x.path);if(!k){A[y]=void 0;return}const M=()=>{b()};k.onInternalMutation(M),u.configPublisher=k,u.configMutationHandler=M};if(f){for(const x of p){const k=he(de.watcherStore,de.hooked,v,x,()=>w());u.cleanupWatchers.push(k)}w()}else{const x=()=>{if(d)for(const k of c){const M=he(de.watcherStore,de.hooked,v,k,()=>b());u.cleanupWatchers.push(M)}b()};u.cleanupWatchers.push(vo(v,x))}}),_.__onDisconnected__(v=>{const A=v,u=A[g];u&&(Qs(u),u.cleanupWatchers.forEach(b=>b()),u.cleanupWatchers=[],u.requestGeneration++,A[y]=void 0)})}}function wo(s){return!s||typeof s!="object"?!1:"skipEmptyPlaceholder"in s}function xo(s){return!s||typeof s!="object"?!1:"refetchEveryMs"in s||"skipIfBodyMissing"in s||"autoPostOnBodyMutation"in s||"skipEmptyPlaceholder"in s||"triggerKey"in s}function Po(s){s.bodyPublisher&&s.bodyMutationHandler&&s.bodyPublisher.offInternalMutation(s.bodyMutationHandler),s.bodyPublisher=null,s.bodyMutationHandler=null}function Co(s){s.triggerPublisher&&s.triggerInvalidateHandler&&s.triggerPublisher.offInvalidate(s.triggerInvalidateHandler),s.triggerPublisher=null,s.triggerInvalidateHandler=null}function Vi(s){s.refetchTimeoutId&&(clearTimeout(s.refetchTimeoutId),s.refetchTimeoutId=null)}function Yl(s){if(!(!s||typeof s.get!="function"))return s.get()}function Bi(s,t){return function(r,i,e,o){const n=r.path,l=i.path,c=xo(e)?void 0:e,h=xo(e)?e:o,p=c?.path,d=h?.triggerKey?.path,f=It(n),_=It(l),y=p?It(p):[],g=d?It(d):[],v=[...new Set([...f,..._,...y,...g])],A=f.length>0,u=!!p,b=h?.refetchEveryMs??0,w=h?.skipIfBodyMissing??!0,x=h?.autoPostOnBodyMutation??!0,k={skipEmptyPlaceholder:h?.skipEmptyPlaceholder},M=`__${s.toLowerCase()}_state_`;return function(K,I){if(!K)return;ke(K);const Nt=`${M}${I}`;K.__onConnected__(wt=>{const Ft=wt;let E=Ft[Nt];E||(E={cleanupWatchers:[],requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:b,skipIfBodyMissing:w,autoPostOnBodyMutation:x},Ft[Nt]=E),E.cleanupWatchers.forEach(tt=>tt()),E.cleanupWatchers=[],E.requestGeneration++,E.refetchEveryMs=b,E.skipIfBodyMissing=w,E.autoPostOnBodyMutation=x,Vi(E);const ye=()=>{Vi(E),!(!E.refetchEveryMs||E.refetchEveryMs<=0)&&(E.refetchTimeoutId=setTimeout(()=>{E.refetchTimeoutId=null,pr()},E.refetchEveryMs))},pr=()=>{const tt=A?$t(wt,n,k):{ready:!0,path:n};if(!tt.ready||!tt.path){Ft[I]=void 0,ye();return}const it=$t(wt,l,k);if(!it.ready||!it.path){Ft[I]=void 0,ye();return}const Et=Vt(it.path),fr=Yl(Et);if(E.skipIfBodyMissing&&fr==null){ye();return}let ci=null;if(u&&p){const _e=$t(wt,p,k);if(!_e.ready||!_e.path){Ft[I]=void 0,ye();return}const bu=Vt(_e.path);ci=mo(bu)}else ci=zi(wt);if(!Ui(ci)){if(!u&&!E.scopeWatchCleanup){const _e=yo(wt,pr);E.scopeWatchCleanup=_e,E.cleanupWatchers.push(()=>{_e(),E.scopeWatchCleanup=null})}ye();return}const pu=++E.requestGeneration,fu=new ne(ci);t(fu,tt.path,fr).then(_e=>{pu===E.requestGeneration&&(Ft[I]=_e,ye())})},Xe=Kl(pr),Vo=()=>{if(Po(E),!E.autoPostOnBodyMutation)return;const tt=$t(wt,l,k);if(!tt.ready||!tt.path)return;const it=Vt(tt.path);if(!it)return;const Et=()=>Xe();it.onInternalMutation(Et),E.bodyPublisher=it,E.bodyMutationHandler=Et},Bo=()=>{if(Co(E),!d)return;const tt=$t(wt,d,k);if(!tt.ready||!tt.path)return;const it=Vt(tt.path);if(!it)return;const Et=()=>Xe();it.onInvalidate(Et),E.triggerPublisher=it,E.triggerInvalidateHandler=Et},uu=()=>{if(!u||!p)return;Qs(E);const tt=$t(wt,p,k);if(!tt.ready||!tt.path){Ft[I]=void 0;return}const it=Vt(tt.path);if(!it){Ft[I]=void 0;return}const Et=()=>Xe();it.onInternalMutation(Et),E.configPublisher=it,E.configMutationHandler=Et},Ho=()=>{Vo(),Bo(),uu(),E.autoPostOnBodyMutation&&Xe()};if(u||_.length||g.length){for(const tt of v){const it=he(de.watcherStore,de.hooked,wt,tt,()=>Ho());E.cleanupWatchers.push(it)}Ho()}else{const tt=()=>{if(A)for(const it of f){const Et=he(de.watcherStore,de.hooked,wt,it,()=>Xe());E.cleanupWatchers.push(Et)}Vo(),Bo(),E.autoPostOnBodyMutation&&Xe()};E.cleanupWatchers.push(vo(wt,tt))}}),K.__onDisconnected__(wt=>{const Ft=wt,E=Ft[Nt];E&&(Qs(E),Po(E),Co(E),Vi(E),E.cleanupWatchers.forEach(ye=>ye()),E.cleanupWatchers=[],E.requestGeneration++,Ft[I]=void 0)})}}}function Gl(s,t,r,i){return Bi("POST",(e,o,n)=>e.postDetailed(o,n))(s,t,r,i)}function Zl(s,t,r,i){return Bi("PUT",(e,o,n)=>e.putDetailed(o,n))(s,t,r,i)}function Xl(s,t,r,i){return Bi("PATCH",(e,o,n)=>e.patchDetailed(o,n))(s,t,r,i)}const Ql=po,Jl=fo,tc=_o;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:uo,publish:po,subscribe:fo,onAssing:Rl,handle:Ul,ancestorAttribute:Hl,autoSubscribe:Vl,autoFill:Bl,get:_o,post:Gl,put:Zl,patch:Xl};var ec=Object.defineProperty,sc=Object.getOwnPropertyDescriptor,Js=(s,t,r,i)=>{for(var e=i>1?void 0:i?sc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&ec(t,r,e),e};const $o=new Hs("communes?limit=$limit&fields=nom,code"),So=new Qe($o.path),ic="sonic-example";let _s=class extends P{constructor(){super(...arguments),this.limit=5}render(){return m` <span part="api-get-demo">
1273
1273
  · get: ${JSON.stringify(this.geoCommunesPayload?.result??null)} · HTTP
1274
1274
  ${this.geoCommunesPayload?.response?.status??"—"} · subscribe:
1275
1275
  ${JSON.stringify(this.geoCommunesResult??null)}</span
1276
- >`}};Vs([a({type:Number})],cs.prototype,"limit",2),Vs([Pl(to),wl(eo)],cs.prototype,"geoCommunesPayload",2),Vs([E(),xl(eo.result)],cs.prototype,"geoCommunesResult",2),cs=Vs([P(Sl)],cs);const Al={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 kl{async transform(t,i){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in i.library)this.sduiDescriptor.library[s]=i.library[s];for(const s of i.transforms)this.transformAction(s)}transformAction(t){const i=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,i)}getNodesMatchingPatterns(t,i){if(!t)return[];if(!i)return[];const s=i.nodes;if(!s)return[];let e=[],o=0;for(const n of t)for(const l of s)this.nodeMatchesPattern(n,l)&&e.push({parent:i,child:l,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],l)),o++;return e}stringMatchesExpression(t,i){return!i||t&&t.match(i)}nodeMatchesPattern(t,i){const s=t,e=i,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(e[c],s[c]))return!1;const n=t.attributes,l=i.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,i){for(const s of i)s.parent.nodes?.splice(s.parent.nodes.indexOf(s.child),1),s.child.nodes&&s.parent.nodes?.splice(s.parent.nodes.indexOf(s.child),0,...s.child.nodes)}wrap(t,i){const s={...t.ui};s.nodes||(s.nodes=[]);let e=0;for(const n of i)s.nodes?.push(n.child),e>0&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child),1),e++;const o=i[0]?.parent.nodes?.indexOf(i[0].child);o&&(i[0].parent.nodes?.splice(o,1),i[0].parent.nodes?.splice(o,0,s))}move(t,i){for(const s of i){s.parent.nodes?.splice(s.parent.nodes.indexOf(s.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,s.child)}}remap(t,i){for(const s of i){const e={...t.ui};e.attributes||(e.attributes={});const o=s.child.attributes;if(o)for(const d in o)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[d]=o[d]);const n=["libraryKey","innerHTML","prefix","suffix","markup"],l=s.child,c=e;for(const d of n)!Object.prototype.hasOwnProperty.call(e,d)&&l[d]&&(c[d]=l[d]);e.nodes||(e.nodes=[]);const h=s.child.nodes;if(h)for(const d of h)e.nodes.push(d);const u=s.parent.nodes?.indexOf(s.child)||-1;u!=-1&&(s.parent.nodes?.splice(u,1),s.parent.nodes?.splice(u,0,e))}}delete(t,i){for(const s of i)s.parent.nodes?.splice(s.parent.nodes.indexOf(s.child),1)}insert(t,i){const s=t.after?"after":t.before?"before":"in";i=[],t.after?i=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?i=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(i=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=i[0];e&&(s=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):e.parent.nodes?.splice(e.parent.nodes.indexOf(e.child)+(s=="after"?1:0),0,{...t.ui}))}}var Dl=Object.defineProperty,Ol=Object.getOwnPropertyDescriptor,Ai=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ol(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Dl(t,i,e),e};const Ll="sonic-sdui";let Bs=class extends Er(Xt(x)){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,Al,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)Gt.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)Gt.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new kl().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(i=>this.appendChild(this.parseChild(i)))}parseChild(r){const t=r.tagName||"div";let{element:i,contentElement:s}=this.handleLibrary(r,t);return this.handleAttributes(r,i),i=this.handleMarkup(r,i),s||(s=i),this.handleChildNodes(r,s,i),this.handleInnerHTML(r,s),r.prefix||r.suffix?this.handlePrefixSuffix(r,i):i}handlePrefixSuffix(r,t){const i=document.createElement("div");return i.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),i.style.display="contents",i}handleChildNodes(r,t,i){if(r.nodes){const s=r.nodes;for(const e of s){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=i.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 i,s;if(r.libraryKey&&this.sduiDescriptor.library){i=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;e&&(s=i.querySelector(e))}else i=document.createElement(t);return{element:i,contentElement:s}}handleAttributes(r,t){const i=r.attributes;for(const s in i){const e=i[s],o=Xe.isObject(e)?JSON.stringify(e):e;t.setAttribute(s,o)}}handleMarkup(r,t){return r.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=r.markup),t}handleInnerHTML(r,t){if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");this.api?.post(i,{labels:[r.innerHTML.substring(8)]}).then(s=>{t&&(t.innerHTML+=s)})}else t&&(t.innerHTML+=r.innerHTML)}};Ai([a()],Bs.prototype,"sduiKey",2),Ai([a()],Bs.prototype,"messagesKey",2),Bs=Ai([P(Ll)],Bs);var El=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor,so=(r,t,i,s)=>{for(var e=s>1?void 0:s?Tl(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&El(t,i,e),e};let Hs=class extends Xt(x){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 i in r){const s=r[i];if(typeof s=="string"){const e=s.split("."),o=e.shift();if(!o)continue;let n=k.get(o);n=Xe.traverse(n,e);const l={publisher:n,subscriber:c=>{t[i]=c}};this.listeners.push(l),n.onAssign(l.subscriber),t._proxies_.set(i,n)}else{this.publisher[i]={};const e=new Ve({},t);t._proxies_.set(i,e);const o={publisher:e,subscriber:n=>{t[i]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(s,e)}}}render(){return g`<slot></slot>`}};Hs.styles=[C`
1276
+ >`}};Js([a({type:Number})],_s.prototype,"limit",2),Js([tc($o),Ql(So)],_s.prototype,"geoCommunesPayload",2),Js([T(),Jl(So.result)],_s.prototype,"geoCommunesResult",2),_s=Js([C(ic)],_s);const rc={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 oc{async transform(t,r){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in r.library)this.sduiDescriptor.library[i]=r.library[i];for(const i of r.transforms)this.transformAction(i)}transformAction(t){const r=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,r)}getNodesMatchingPatterns(t,r){if(!t)return[];if(!r)return[];const i=r.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:r,child:l,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],l)),o++;return e}stringMatchesExpression(t,r){return!r||t&&t.match(r)}nodeMatchesPattern(t,r){const i=t,e=r,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=r.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,r){for(const i of r)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1),i.child.nodes&&i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),0,...i.child.nodes)}wrap(t,r){const i={...t.ui};i.nodes||(i.nodes=[]);let e=0;for(const n of r)i.nodes?.push(n.child),e>0&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child),1),e++;const o=r[0]?.parent.nodes?.indexOf(r[0].child);o&&(r[0].parent.nodes?.splice(o,1),r[0].parent.nodes?.splice(o,0,i))}move(t,r){for(const i of r){i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,i.child)}}remap(t,r){for(const i of r){const e={...t.ui};e.attributes||(e.attributes={});const o=i.child.attributes;if(o)for(const d in o)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[d]=o[d]);const n=["libraryKey","innerHTML","prefix","suffix","markup"],l=i.child,c=e;for(const d of n)!Object.prototype.hasOwnProperty.call(e,d)&&l[d]&&(c[d]=l[d]);e.nodes||(e.nodes=[]);const h=i.child.nodes;if(h)for(const d of h)e.nodes.push(d);const p=i.parent.nodes?.indexOf(i.child)||-1;p!=-1&&(i.parent.nodes?.splice(p,1),i.parent.nodes?.splice(p,0,e))}}delete(t,r){for(const i of r)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,r){const i=t.after?"after":t.before?"before":"in";r=[],t.after?r=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?r=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(r=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=r[0];e&&(i=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):e.parent.nodes?.splice(e.parent.nodes.indexOf(e.child)+(i=="after"?1:0),0,{...t.ui}))}}var nc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,Hi=(s,t,r,i)=>{for(var e=i>1?void 0:i?ac(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&nc(t,r,e),e};const lc="sonic-sdui";let ti=class extends Qr(le(P)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(s){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(s)}async updateContents(){if(!this.sduiDescriptor)return;const s={};Object.assign(s,rc,this.sduiDescriptor.library),this.sduiDescriptor.library=s,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(s=>s.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const s of this.sduiDescriptor.js)ae.loadJS(s);if(this.sduiDescriptor.css)for(const s of this.sduiDescriptor.css)ae.loadCSS(s)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new oc().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 s=this.sduiDescriptor.nodes;s||(s=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),s.push(t),s.forEach(r=>this.appendChild(this.parseChild(r)))}parseChild(s){const t=s.tagName||"div";let{element:r,contentElement:i}=this.handleLibrary(s,t);return this.handleAttributes(s,r),r=this.handleMarkup(s,r),i||(i=r),this.handleChildNodes(s,i,r),this.handleInnerHTML(s,i),s.prefix||s.suffix?this.handlePrefixSuffix(s,r):r}handlePrefixSuffix(s,t){const r=document.createElement("div");return r.innerHTML=(s.prefix||"")+t.outerHTML+(s.suffix||""),r.style.display="contents",r}handleChildNodes(s,t,r){if(s.nodes){const i=s.nodes;for(const e of i){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=r.querySelector(e.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(s,t){let r,i;if(s.libraryKey&&this.sduiDescriptor.library){r=this.parseChild(this.sduiDescriptor.library[s.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[s.libraryKey]||{}).contentElementSelector;e&&(i=r.querySelector(e))}else r=document.createElement(t);return{element:r,contentElement:i}}handleAttributes(s,t){const r=s.attributes;for(const i in r){const e=r[i],o=cs.isObject(e)?JSON.stringify(e):e;t.setAttribute(i,o)}}handleMarkup(s,t){return s.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=s.markup),t}handleInnerHTML(s,t){if(s.innerHTML)if(s.innerHTML.indexOf("wording_")!=-1){const r=this.getAncestorAttributeValue("wordingProvider");this.api?.post(r,{labels:[s.innerHTML.substring(8)]}).then(i=>{t&&(t.innerHTML+=i)})}else t&&(t.innerHTML+=s.innerHTML)}};Hi([a()],ti.prototype,"sduiKey",2),Hi([a()],ti.prototype,"messagesKey",2),ti=Hi([C(lc)],ti);var cc=Object.defineProperty,hc=Object.getOwnPropertyDescriptor,Ao=(s,t,r,i)=>{for(var e=i>1?void 0:i?hc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&cc(t,r,e),e};let ei=class extends le(P){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(s){this._composition=s,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 s=this.listeners;this.listeners=[],s.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(s,t){if(s)for(const r in s){const i=s[r];if(typeof i=="string"){const e=i.split("."),o=e.shift();if(!o)continue;let n=O.get(o);n=cs.traverse(n,e);const l={publisher:n,subscriber:c=>{t[r]=c}};this.listeners.push(l),n.onAssign(l.subscriber),t._proxies_.set(r,n)}else{this.publisher[r]={};const e=new Je({},t);t._proxies_.set(r,e);const o={publisher:e,subscriber:n=>{t[r]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(i,e)}}}render(){return m`<slot></slot>`}};ei.styles=[$`
1277
1277
  :host {
1278
1278
  display: contents;
1279
1279
  }
1280
- `],so([a({type:Object})],Hs.prototype,"composition",1),Hs=so([P("sonic-mix")],Hs);var Nl=Object.getOwnPropertyDescriptor,Il=(r,t,i,s)=>{for(var e=s>1?void 0:s?Nl(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Ml="sonic-value";let io=class extends Xt(x){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`${j(this.props.toString())}<slot name="prefix"></slot><slot></slot
1281
- ><slot name="suffix"></slot>`}};io=Il([P(Ml)],io);var Fl=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,ki=(r,t,i,s)=>{for(var e=s>1?void 0:s?jl(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Fl(t,i,e),e};const Rl="sonic-t";let qs=class extends x{render(){return this.key?g`${cn(this.key,this.unsafeHTML)}`:A}};ki([a({type:String})],qs.prototype,"key",2),ki([a({type:Boolean})],qs.prototype,"unsafeHTML",2),qs=ki([P(Rl)],qs);var zl=Object.defineProperty,Ul=Object.getOwnPropertyDescriptor,hs=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ul(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&zl(t,i,e),e};const Vl="sonic-badge";let me=class extends x{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return g`
1280
+ `],Ao([a({type:Object})],ei.prototype,"composition",1),ei=Ao([C("sonic-mix")],ei);var dc=Object.getOwnPropertyDescriptor,uc=(s,t,r,i)=>{for(var e=i>1?void 0:i?dc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const pc="sonic-value";let ko=class extends le(P){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?m`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:m`${U(this.props.toString())}<slot name="prefix"></slot><slot></slot
1281
+ ><slot name="suffix"></slot>`}};ko=uc([C(pc)],ko);var fc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,qi=(s,t,r,i)=>{for(var e=i>1?void 0:i?bc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&fc(t,r,e),e};const gc="sonic-t";let si=class extends P{render(){return this.key?m`${Fn(this.key,this.unsafeHTML)}`:D}};qi([a({type:String})],si.prototype,"key",2),qi([a({type:Boolean})],si.prototype,"unsafeHTML",2),si=qi([C(gc)],si);var mc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,ws=(s,t,r,i)=>{for(var e=i>1?void 0:i?vc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&mc(t,r,e),e};const yc="sonic-badge";let De=class extends P{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return m`
1282
1282
  <slot name="prefix"></slot>
1283
1283
  <slot></slot>
1284
1284
  <slot name="suffix"></slot>
1285
- `}};me.styles=[Lt,C`
1285
+ `}};De.styles=[zt,$`
1286
1286
  :host {
1287
1287
  --sc-badge-gap: 0.3em;
1288
1288
  --sc-badge-py: 0.35em;
@@ -1422,28 +1422,28 @@
1422
1422
  slot[name="prefix"] {
1423
1423
  flex-shrink: 0;
1424
1424
  }
1425
- `],hs([a({type:String,reflect:!0})],me.prototype,"type",2),hs([a({type:String,reflect:!0})],me.prototype,"variant",2),hs([a({type:String,reflect:!0})],me.prototype,"size",2),hs([a({type:Boolean,reflect:!0})],me.prototype,"ellipsis",2),me=hs([P(Vl)],me);class Bl{static fixBlankLink(t){const s=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{s?.shell.openExternal(t.href)})}}var Hl=Object.defineProperty,ql=Object.getOwnPropertyDescriptor,Fe=(r,t,i,s)=>{for(var e=s>1?void 0:s?ql(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Hl(t,i,e),e};const Wl="sonic-link";let Jt=class extends x{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,et.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(et.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{r.key==="Enter"&&this.shadowRoot?.querySelector("a")?.click()}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){et.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,Bl.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),et.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?g`
1425
+ `],ws([a({type:String,reflect:!0})],De.prototype,"type",2),ws([a({type:String,reflect:!0})],De.prototype,"variant",2),ws([a({type:String,reflect:!0})],De.prototype,"size",2),ws([a({type:Boolean,reflect:!0})],De.prototype,"ellipsis",2),De=ws([C(yc)],De);class _c{static fixBlankLink(t){const i=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{i?.shell.openExternal(t.href)})}}var wc=Object.defineProperty,xc=Object.getOwnPropertyDescriptor,Ke=(s,t,r,i)=>{for(var e=i>1?void 0:i?xc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&wc(t,r,e),e};const Pc="sonic-link";let ue=class extends P{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(s){this._location=s,ot.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(ot.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",s=>{s.key==="Enter"&&this.shadowRoot?.querySelector("a")?.click()}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){ot.offChange(this),super.disconnectedCallback()}set target(s){this._target=s,_c.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(s){s.preventDefault(),ot.changeFromComponent(this)}updated(s){s.has("href")&&this.setFocusable()}render(){return this.href?m`
1426
1426
  <a
1427
1427
  href="${this.href}"
1428
- aria-label=${this.ariaLabel||A}
1429
- target=${$(this.target)}
1428
+ aria-label=${this.ariaLabel||D}
1429
+ target=${S(this.target)}
1430
1430
  @click=${this.pushState?this.handlePushState:null}
1431
1431
  >
1432
1432
  <slot></slot>
1433
1433
  </a>
1434
- `:g`<slot></slot>`}};Jt.styles=[C`
1434
+ `:m`<slot></slot>`}};ue.styles=[$`
1435
1435
  a {
1436
1436
  color: inherit;
1437
1437
  text-decoration: none;
1438
1438
  display: contents;
1439
1439
  }
1440
- `],Fe([a({type:String})],Jt.prototype,"href",2),Fe([a({type:String,attribute:"data-aria-label"})],Jt.prototype,"ariaLabel",2),Fe([a({type:String})],Jt.prototype,"autoActive",2),Fe([a({type:String})],Jt.prototype,"target",1),Fe([a({type:Boolean})],Jt.prototype,"pushState",2),Jt=Fe([P(Wl)],Jt);var Kl=Object.defineProperty,Yl=Object.getOwnPropertyDescriptor,je=(r,t,i,s)=>{for(var e=s>1?void 0:s?Yl(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Kl(t,i,e),e};const Zl="sonic-progress";let te=class extends x{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return g`
1441
- <progress value=${$(this.value)} max=${this.max}></progress>
1440
+ `],Ke([a({type:String})],ue.prototype,"href",2),Ke([a({type:String,attribute:"data-aria-label"})],ue.prototype,"ariaLabel",2),Ke([a({type:String})],ue.prototype,"autoActive",2),Ke([a({type:String})],ue.prototype,"target",1),Ke([a({type:Boolean})],ue.prototype,"pushState",2),ue=Ke([C(Pc)],ue);var Cc=Object.defineProperty,$c=Object.getOwnPropertyDescriptor,Ye=(s,t,r,i)=>{for(var e=i>1?void 0:i?$c(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Cc(t,r,e),e};const Sc="sonic-progress";let pe=class extends P{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return m`
1441
+ <progress value=${S(this.value)} max=${this.max}></progress>
1442
1442
  <div class="slot-container">
1443
1443
  <slot></slot>
1444
1444
  <slot name="remaining"></slot>
1445
1445
  </div>
1446
- `}};te.styles=[Lt,C`
1446
+ `}};pe.styles=[zt,$`
1447
1447
  :host {
1448
1448
  --sc-progress-bg: var(
1449
1449
  --sc-input-bg,
@@ -1555,7 +1555,7 @@
1555
1555
  gap: 0.5em;
1556
1556
  margin-top: 0.15em;
1557
1557
  }
1558
- `],je([a({type:Number})],te.prototype,"value",2),je([a({type:Number})],te.prototype,"max",2),je([a({type:Boolean})],te.prototype,"invert",2),je([a({type:String,reflect:!0})],te.prototype,"type",2),je([a({type:String,reflect:!0})],te.prototype,"size",2),te=je([P(Zl)],te);const Gl=C`
1558
+ `],Ye([a({type:Number})],pe.prototype,"value",2),Ye([a({type:Number})],pe.prototype,"max",2),Ye([a({type:Boolean})],pe.prototype,"invert",2),Ye([a({type:String,reflect:!0})],pe.prototype,"type",2),Ye([a({type:String,reflect:!0})],pe.prototype,"size",2),pe=Ye([C(Sc)],pe);const Ac=$`
1559
1559
  .password-toggle {
1560
1560
  color: var(--sc-input-c);
1561
1561
  font-size: var(--sc-input-fs);
@@ -1566,7 +1566,7 @@
1566
1566
  :host([inlineContent]) .has-suffix .password-toggle {
1567
1567
  margin-right: 0;
1568
1568
  }
1569
- `,Ws=C`
1569
+ `,ii=$`
1570
1570
  :host {
1571
1571
  --sc-label-fs: var(--sc-_fs, 1rem);
1572
1572
  --sc-label-fw: var(--sc-label-font-weight, 500);
@@ -1580,14 +1580,14 @@
1580
1580
  margin-bottom: 0.22em;
1581
1581
  display: block;
1582
1582
  }
1583
- `,Ks=C`
1583
+ `,ri=$`
1584
1584
  .form-description {
1585
1585
  color: var(--sc-base-400, var(--sc-base-content, #000));
1586
1586
  font-size: 0.85em;
1587
1587
  margin-top: 0.2em;
1588
1588
  display: block;
1589
1589
  }
1590
- `,Di=C`
1590
+ `,Wi=$`
1591
1591
  * {
1592
1592
  box-sizing: border-box;
1593
1593
  }
@@ -1946,21 +1946,21 @@
1946
1946
  * @license
1947
1947
  * Copyright 2018 Google LLC
1948
1948
  * SPDX-License-Identifier: BSD-3-Clause
1949
- */const Oi=Zt(class extends De{constructor(r){if(super(r),r.type!==he.ATTRIBUTE||r.name!=="class"||r.strings?.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]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(const s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}const i=r.element.classList;for(const s of this.st)s in t||(i.remove(s),this.st.delete(s));for(const s in t){const e=!!t[s];e===this.st.has(s)||this.nt?.has(s)||(e?(i.add(s),this.st.add(s)):(i.remove(s),this.st.delete(s)))}return vt}});var Xl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,z=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ql(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Xl(t,i,e),e};const Jl="sonic-input";let F=class extends Ms(Le(Q(x))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!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(),this.autoActive&&r.has("value")&&(this.active=!!this.value),super.willUpdate(r)}setSelectionRange(r,t){this.input.setSelectionRange(r,t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.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(r){r.preventDefault(),r.stopPropagation(),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`
1949
+ */const Ki=oe(class extends Ue{constructor(s){if(super(s),s.type!==$e.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter((t=>s[t])).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in t)t[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(t)}const r=s.element.classList;for(const i of this.st)i in t||(r.remove(i),this.st.delete(i));for(const i in t){const e=!!t[i];e===this.st.has(i)||this.nt?.has(i)||(e?(r.add(i),this.st.add(i)):(r.remove(i),this.st.delete(i)))}return xt}});var kc=Object.defineProperty,Dc=Object.getOwnPropertyDescriptor,B=(s,t,r,i)=>{for(var e=i>1?void 0:i?Dc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&kc(t,r,e),e};const Oc="sonic-input";let z=class extends Ks(Be(et(P))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!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 s=this.getFormPublisher();if(!s)return;s[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 s=this.getFormPublisher();if(!s)return;s[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(s){this.hasSlotOrProps(),this.autoActive&&s.has("value")&&(this.active=!!this.value),super.willUpdate(s)}setSelectionRange(s,t){this.input.setSelectionRange(s,t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(s){if(!this.hasAttribute("inputDelayMs")){super.handleChange(s);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(s),parseInt(this.getAttribute("inputDelayMs")))}togglePasswordVisibility(s){s.preventDefault(),s.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const s={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return m`
1950
1950
  <label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
1951
- >${this.label?j(this.label):""}<slot
1951
+ >${this.label?U(this.label):""}<slot
1952
1952
  name="label"
1953
1953
  @slotchange=${this.hasSlotOrProps}
1954
1954
  ></slot
1955
1955
  ></label>
1956
1956
 
1957
- <div @click=${this.inlineContentFocus} class="form-control ${Oi(r)}">
1957
+ <div @click=${this.inlineContentFocus} class="form-control ${Ki(s)}">
1958
1958
  <div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
1959
1959
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
1960
1960
  <input
1961
1961
  data-form-element
1962
1962
  part="input"
1963
- id=${$(this.id||"form-element")}
1963
+ id=${S(this.id||"form-element")}
1964
1964
  part="input"
1965
1965
  class="form-element input"
1966
1966
  @input=${this.handleChange}
@@ -1969,25 +1969,25 @@
1969
1969
  ?disabled=${this.disabled}
1970
1970
  ?readonly=${this.readonly}
1971
1971
  ?autofocus=${this.autofocus}
1972
- list=${$(this.list)}
1973
- tabindex=${$(this.tabindex)}
1974
- pattern=${$(this.pattern)}
1975
- min=${$(this.min)}
1976
- max=${$(this.max)}
1977
- step=${$(this.step)}
1978
- inputmode=${$(this.inputmode)}
1979
- src=${$(this.src)}
1980
- minlength=${$(this.minlength)}
1981
- maxlength=${$(this.maxlength)}
1982
- placeholder=${$(this.placeholder)}
1972
+ list=${S(this.list)}
1973
+ tabindex=${S(this.tabindex)}
1974
+ pattern=${S(this.pattern)}
1975
+ min=${S(this.min)}
1976
+ max=${S(this.max)}
1977
+ step=${S(this.step)}
1978
+ inputmode=${S(this.inputmode)}
1979
+ src=${S(this.src)}
1980
+ minlength=${S(this.minlength)}
1981
+ maxlength=${S(this.maxlength)}
1982
+ placeholder=${S(this.placeholder)}
1983
1983
  ?required=${this.required}
1984
- autocomplete=${$(this.autocomplete)}
1985
- aria-label=${$(this.ariaLabel)}
1986
- aria-labelledby=${$(this.ariaLabelledby)}
1984
+ autocomplete=${S(this.autocomplete)}
1985
+ aria-label=${S(this.ariaLabel)}
1986
+ aria-labelledby=${S(this.ariaLabelledby)}
1987
1987
  .name=${this.name}
1988
1988
  .value=${this.value}
1989
1989
  />
1990
- ${this.showPasswordToggle?g`<sonic-button
1990
+ ${this.showPasswordToggle?m`<sonic-button
1991
1991
  shape="circle"
1992
1992
  class="password-toggle"
1993
1993
  @click=${this.togglePasswordVisibility}
@@ -2008,10 +2008,10 @@
2008
2008
  name="description"
2009
2009
  @slotchange=${this.hasSlotOrProps}
2010
2010
  class="${this.hasDescription?"form-description":"hidden"}"
2011
- >${this.description?g`${j(this.description)}`:A}</slot>
2011
+ >${this.description?m`${U(this.description)}`:D}</slot>
2012
2012
  <slot name="list"></slot>
2013
2013
  </div>
2014
- `}};F.styles=[Lt,Di,Ws,Ks,Gl,C`
2014
+ `}};z.styles=[zt,Wi,ii,ri,Ac,$`
2015
2015
  :host([type="hidden"]) {
2016
2016
  appearance: none !important;
2017
2017
  display: none !important;
@@ -2019,7 +2019,7 @@
2019
2019
  :host > .form-control {
2020
2020
  position: relative;
2021
2021
  }
2022
- `],z([a({type:String,reflect:!0})],F.prototype,"size",2),z([a({type:String})],F.prototype,"inputmode",2),z([a({type:String})],F.prototype,"list",2),z([a({type:String})],F.prototype,"placeholder",2),z([a({type:String})],F.prototype,"pattern",2),z([a({type:String})],F.prototype,"min",2),z([a({type:String})],F.prototype,"max",2),z([a({type:Boolean,reflect:!0})],F.prototype,"readonly",2),z([a({type:Number})],F.prototype,"step",2),z([a({type:Number})],F.prototype,"minlength",2),z([a({type:Number})],F.prototype,"maxlength",2),z([a({type:String})],F.prototype,"src",2),z([a({type:Boolean,reflect:!0})],F.prototype,"inlineContent",2),z([a({type:Boolean})],F.prototype,"disableInlineContentFocus",2),z([a({type:Boolean})],F.prototype,"showPasswordToggle",2),z([a({type:Boolean})],F.prototype,"autoActive",2),z([a({type:Boolean,reflect:!0})],F.prototype,"active",2),z([at({slot:"label",flatten:!0})],F.prototype,"slotLabelNodes",2),z([at({slot:"description",flatten:!0})],F.prototype,"slotDescriptionNodes",2),z([at({slot:"suffix",flatten:!0})],F.prototype,"slotSuffixNodes",2),z([at({slot:"prefix",flatten:!0})],F.prototype,"slotPrefixNodes",2),z([Kt("input")],F.prototype,"input",2),z([E()],F.prototype,"hasDescription",2),z([E()],F.prototype,"hasLabel",2),z([E()],F.prototype,"hasSuffix",2),z([E()],F.prototype,"hasPrefix",2),z([E()],F.prototype,"isPassword",2),F=z([P(Jl)],F);const ro=C`
2022
+ `],B([a({type:String,reflect:!0})],z.prototype,"size",2),B([a({type:String})],z.prototype,"inputmode",2),B([a({type:String})],z.prototype,"list",2),B([a({type:String})],z.prototype,"placeholder",2),B([a({type:String})],z.prototype,"pattern",2),B([a({type:String})],z.prototype,"min",2),B([a({type:String})],z.prototype,"max",2),B([a({type:Boolean,reflect:!0})],z.prototype,"readonly",2),B([a({type:Number})],z.prototype,"step",2),B([a({type:Number})],z.prototype,"minlength",2),B([a({type:Number})],z.prototype,"maxlength",2),B([a({type:String})],z.prototype,"src",2),B([a({type:Boolean,reflect:!0})],z.prototype,"inlineContent",2),B([a({type:Boolean})],z.prototype,"disableInlineContentFocus",2),B([a({type:Boolean})],z.prototype,"showPasswordToggle",2),B([a({type:Boolean})],z.prototype,"autoActive",2),B([a({type:Boolean,reflect:!0})],z.prototype,"active",2),B([ht({slot:"label",flatten:!0})],z.prototype,"slotLabelNodes",2),B([ht({slot:"description",flatten:!0})],z.prototype,"slotDescriptionNodes",2),B([ht({slot:"suffix",flatten:!0})],z.prototype,"slotSuffixNodes",2),B([ht({slot:"prefix",flatten:!0})],z.prototype,"slotPrefixNodes",2),B([ie("input")],z.prototype,"input",2),B([T()],z.prototype,"hasDescription",2),B([T()],z.prototype,"hasLabel",2),B([T()],z.prototype,"hasSuffix",2),B([T()],z.prototype,"hasPrefix",2),B([T()],z.prototype,"isPassword",2),z=B([C(Oc)],z);const Do=$`
2023
2023
  /*OMBRE*/
2024
2024
  :host([shadow]) .shadowable,
2025
2025
  :host([shadow="md"]) .shadowable,
@@ -2038,7 +2038,7 @@
2038
2038
  :host([shadow="none"]) .shadowable {
2039
2039
  box-shadow: none;
2040
2040
  }
2041
- `;var tc=Object.defineProperty,ec=Object.getOwnPropertyDescriptor,Tt=(r,t,i,s)=>{for(var e=s>1?void 0:s?ec(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&tc(t,i,e),e};const sc="sonic-pop";let rt=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!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.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}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.triggerElement=r.target),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.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){q.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const i=t.style;i.zIndex="999999999";const s=getComputedStyle(t);return s.position!=="relative"&&s.position!=="absolute"&&(i.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(),i=t[0];rt.pops.forEach(s=>{const e=t.includes(s),o=t.includes(s.querySelector('[slot="content"]')),n=q.getAncestorAttributeValue(i,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&n||!o)||s.hide()})}connectedCallback(){super.connectedCallback(),rt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),rt.pops.add(this)}firstUpdated(r){super.firstUpdated(r),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),rt.pops.delete(this),rt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(r){const t=r.split(" "),i=t[0];let s=t[1];const e=5,o=this.getBoundingClientRect(),l=q.getScrollableAncestor(this.popContent)?.getBoundingClientRect(),c=Math.max(0,l?.left||0)+e,h=Math.max(0,l?.top||0)+e,u=Math.min(window.innerWidth,l?.right||window.innerWidth)-e,d=Math.min(window.innerHeight,l?.bottom||window.innerHeight)-e,m=o.left,y=o.top;let p=m,v=y,_=this.popContent?.getBoundingClientRect();const D=y-_.height,f=m-_.width,b=m+o.width,w=y+o.height,S=m+(o.width-_.width)*.5,O=y+(o.height-_.height)*.5;switch(i){case"bottom":v=w,s=="center"&&(p=S);break;case"top":v=D,s=="center"&&(p=S);break;case"left":p=f,s=="center"&&(v=O);break;case"right":p=b,s=="center"&&(v=O);break}this.lastContentX+=p-_.x,this.lastContentY+=v-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=this.popContent?.getBoundingClientRect(),_.x<c&&i=="left"&&(p=b),_.y<h&&i=="top"&&(v=w),_.x+_.width>u&&i=="right"&&(p=f),_.y+_.height>d&&i=="bottom"&&(v=D),this.lastContentX+=p-_.x,this.lastContentY+=v-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=this.popContent?.getBoundingClientRect(),_.x<c&&(this.lastContentX+=c-_.x),_.y<h&&(this.lastContentY+=h-_.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=this.popContent?.getBoundingClientRect(),_.x+_.width>u&&(this.lastContentX+=u-(_.x+_.width)),_.y+_.height>d&&(this.lastContentY+=d-(_.y+_.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return g`
2041
+ `;var Ec=Object.defineProperty,Lc=Object.getOwnPropertyDescriptor,Bt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Lc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Ec(t,r,e),e};const Tc="sonic-pop";let lt=class extends P{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!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.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=s=>{s.key==="Escape"&&this.open&&(s.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(s){if(this.open&&this.noToggle)return;const t=s;s.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=s.target),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.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){Y.everyAncestors(this,s=>{const t=s;if(!t.className)return!0;if([...t.classList].includes("@container")){const r=t.style;r.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(r.position="relative"),this.ancestorsHavingZIndex.add(s),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(s=>{s.style.removeProperty("position"),s.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(s){const t=s.composedPath(),r=t[0];lt.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=Y.getAncestorAttributeValue(r,"data-on-select")==="keep";s.type=="pointerdown"&&e||s.type=="click"&&(e&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),lt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),lt.pops.add(this)}firstUpdated(s){super.firstUpdated(s),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),lt.pops.delete(this),lt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(s){const t=s.split(" "),r=t[0];let i=t[1];const e=5,o=this.getBoundingClientRect(),l=Y.getScrollableAncestor(this.popContent)?.getBoundingClientRect(),c=Math.max(0,l?.left||0)+e,h=Math.max(0,l?.top||0)+e,p=Math.min(window.innerWidth,l?.right||window.innerWidth)-e,d=Math.min(window.innerHeight,l?.bottom||window.innerHeight)-e,f=o.left,_=o.top;let y=f,g=_,v=this.popContent?.getBoundingClientRect();const A=_-v.height,u=f-v.width,b=f+o.width,w=_+o.height,x=f+(o.width-v.width)*.5,k=_+(o.height-v.height)*.5;switch(r){case"bottom":g=w,i=="center"&&(y=x);break;case"top":g=A,i=="center"&&(y=x);break;case"left":y=u,i=="center"&&(g=k);break;case"right":y=b,i=="center"&&(g=k);break}this.lastContentX+=y-v.x,this.lastContentY+=g-v.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),v=this.popContent?.getBoundingClientRect(),v.x<c&&r=="left"&&(y=b),v.y<h&&r=="top"&&(g=w),v.x+v.width>p&&r=="right"&&(y=u),v.y+v.height>d&&r=="bottom"&&(g=A),this.lastContentX+=y-v.x,this.lastContentY+=g-v.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),v=this.popContent?.getBoundingClientRect(),v.x<c&&(this.lastContentX+=c-v.x),v.y<h&&(this.lastContentY+=h-v.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),v=this.popContent?.getBoundingClientRect(),v.x+v.width>p&&(this.lastContentX+=p-(v.x+v.width)),v.y+v.height>d&&(this.lastContentY+=d-(v.y+v.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return m`
2042
2042
  <slot
2043
2043
  @click=${this.manual?()=>{}:this.toggle}
2044
2044
  @keydown=${this.manual?()=>{}:this.toggle}
@@ -2052,7 +2052,7 @@
2052
2052
  class="shadowable
2053
2053
  ${this.open?"is-open":""}"
2054
2054
  ></slot>
2055
- `}};rt.pops=new Set,rt.styles=[C`
2055
+ `}};lt.pops=new Set,lt.styles=[$`
2056
2056
  :host {
2057
2057
  display: inline-block;
2058
2058
  vertical-align: middle;
@@ -2084,11 +2084,11 @@
2084
2084
  :host([inline]) {
2085
2085
  vertical-align: baseline;
2086
2086
  }
2087
- `,ro],Tt([E()],rt.prototype,"open",2),Tt([Kt("slot:not([name=content])")],rt.prototype,"popBtn",2),Tt([Kt("slot[name=content]")],rt.prototype,"popContent",2),Tt([a({type:Boolean})],rt.prototype,"noToggle",2),Tt([a({type:Boolean,reflect:!0})],rt.prototype,"inline",2),Tt([a({type:Boolean})],rt.prototype,"manual",2),Tt([a({type:String,reflect:!0})],rt.prototype,"shadow",2),Tt([a({type:String})],rt.prototype,"placement",2),Tt([E()],rt.prototype,"triggerElement",2),rt=Tt([P(sc)],rt);var ic=Object.getOwnPropertyDescriptor,rc=(r,t,i,s)=>{for(var e=s>1?void 0:s?ic(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const oc="sonic-menu-item";let oo=class extends M{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()}};oo=rc([P(oc)],oo);/**
2087
+ `,Do],Bt([T()],lt.prototype,"open",2),Bt([ie("slot:not([name=content])")],lt.prototype,"popBtn",2),Bt([ie("slot[name=content]")],lt.prototype,"popContent",2),Bt([a({type:Boolean})],lt.prototype,"noToggle",2),Bt([a({type:Boolean,reflect:!0})],lt.prototype,"inline",2),Bt([a({type:Boolean})],lt.prototype,"manual",2),Bt([a({type:String,reflect:!0})],lt.prototype,"shadow",2),Bt([a({type:String})],lt.prototype,"placement",2),Bt([T()],lt.prototype,"triggerElement",2),lt=Bt([C(Tc)],lt);var Mc=Object.getOwnPropertyDescriptor,Ic=(s,t,r,i)=>{for(var e=i>1?void 0:i?Mc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Nc="sonic-menu-item";let Oo=class extends R{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const s=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!s&&(this.align="left"),super.connectedCallback()}};Oo=Ic([C(Nc)],Oo);/**
2088
2088
  * @license
2089
2089
  * Copyright 2021 Google LLC
2090
2090
  * SPDX-License-Identifier: BSD-3-Clause
2091
- */class no{constructor(t,{target:i,config:s,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,i!==null&&this.t.add(i??t),this.l=s,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){this.value=this.callback?.(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 nc=Object.defineProperty,ac=Object.getOwnPropertyDescriptor,lt=(r,t,i,s)=>{for(var e=s>1?void 0:s?ac(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&nc(t,i,e),e};let ot=class extends Ci(Nr(Tr(Xt(x)))){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 no(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{if(r==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=r,this.searchPublisher?.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=(r?.length||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];this.formValuePublisher?.set(t)},this.findSearchedItem=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==this.searchPublisher?.get(),this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],this.isSearchParameter()&&this.searchPublisher?.set(this.lastValidSearch)},this.updateActiveSelection=()=>{this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=this.searchPublisher?.get()&&this.formValuePublisher?.get()&&this.formValuePublisher?.set("")},this.handleFocusOut=r=>{setTimeout(()=>{const t=document.activeElement;if(!t){this.popElement.hide();return}const i=this.popElement.contains(t)||this.popElement.shadowRoot?.contains(t),s=this.contains(t)||this.shadowRoot?.contains(t);!i&&!s&&this.popElement.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){super.connectedCallback();const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),i=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${i}_init_search__`,this.initQueueDataProvider=`${i}_init_queue__`,this.searchDataProvider=`${i}_search__`,this.queueDataProvider=`${i}_queue__`;const s=k.get;this.searchPublisher=s(this.searchDataProvider)[r],this.formValuePublisher=ut(s(t),this.name),this.countPublisher=s(this.queueDataProvider).resultCount,this.initCountPublisher=s(this.initQueueDataProvider).resultCount,this.value&&k.get(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.countPublisher?.onAssign(this.updateActiveSelection),this.searchPublisher?.onAssign(this.updatePopContentVisibility)}firstUpdated(r){super.firstUpdated(r),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.countPublisher?.offAssign(this.updateActiveSelection);const r=k.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),this.searchPublisher?.offAssign(this.updatePopContentVisibility),this.popElement.removeEventListener("focusout",this.handleFocusOut)}queryQueueListItem(r,t,i){const s=k.get(r);let e,o=s.get();if(!o||!Array.isArray(o)||!o.length)return!1;for(const n of o){let l=k.get(n.dataProvider).get();if(Array.isArray(l)&&(e=l.find(t),e))break}return e?(i(e),!0):!1}setSelectionRange(r,t){this.querySelector("sonic-input")?.setSelectionRange(r,t)}handleHide(){if(this.select){if(this.searchPublisher?.get()==""){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.searchPublisher?.set(this.lastValidSearch)}}getInputValue(){return this.isSearchParameter()?this.searchPublisher?.get():this.lastValidSearch}handleFocus(){this.popElement.show()}render(){return g`
2091
+ */class Eo{constructor(t,{target:r,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,r!==null&&this.t.add(r??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){this.value=this.callback?.(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 Fc=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,dt=(s,t,r,i)=>{for(var e=i>1?void 0:i?jc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Fc(t,r,e),e};let ct=class extends Fi(to(Jr(le(P)))){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 Eo(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=s=>{if(s==""&&this.isSearchParameter()){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&this.isSearchParameter()&&(this.lastValidSearch=s,this.searchPublisher?.set(this.lastValidSearch))},this.updatePopContentVisibility=s=>{this.isPopVisible=(s?.length||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=s=>{const t=this.propertyName==="_self"?s:s[this.propertyName||this.name];this.formValuePublisher?.set(t)},this.findSearchedItem=s=>(this.propertyName==="_self"?s:s[this.propertyName||this.searchParameter||this.name])==this.searchPublisher?.get(),this.findSelection=s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==this.value,this.setSearchFromSelection=s=>{this.lastValidSearch=this.propertyName==="_self"?s:s[this.searchParameter||this.propertyName||this.name],this.isSearchParameter()&&this.searchPublisher?.set(this.lastValidSearch)},this.updateActiveSelection=()=>{this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=this.searchPublisher?.get()&&this.formValuePublisher?.get()&&this.formValuePublisher?.set("")},this.handleFocusOut=s=>{setTimeout(()=>{const t=document.activeElement;if(!t){this.popElement.hide();return}const r=this.popElement.contains(t)||this.popElement.shadowRoot?.contains(t),i=this.contains(t)||this.shadowRoot?.contains(t);!r&&!i&&this.popElement.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}connectedCallback(){super.connectedCallback();const s=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),r=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${r}_init_search__`,this.initQueueDataProvider=`${r}_init_queue__`,this.searchDataProvider=`${r}_search__`,this.queueDataProvider=`${r}_queue__`;const i=O.get;this.searchPublisher=i(this.searchDataProvider)[s],this.formValuePublisher=bt(i(t),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&O.get(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.countPublisher?.onAssign(this.updateActiveSelection),this.searchPublisher?.onAssign(this.updatePopContentVisibility)}firstUpdated(s){super.firstUpdated(s),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){super.disconnectedCallback(),this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.countPublisher?.offAssign(this.updateActiveSelection);const s=O.get;s(this.initSearchDataProvider).delete(),s(this.initQueueDataProvider).delete(),s(this.searchDataProvider).delete(),s(this.queueDataProvider).delete(),this.searchPublisher?.offAssign(this.updatePopContentVisibility),this.popElement.removeEventListener("focusout",this.handleFocusOut)}queryQueueListItem(s,t,r){const i=O.get(s);let e,o=i.get();if(!o||!Array.isArray(o)||!o.length)return!1;for(const n of o){let l=O.get(n.dataProvider).get();if(Array.isArray(l)&&(e=l.find(t),e))break}return e?(r(e),!0):!1}setSelectionRange(s,t){this.querySelector("sonic-input")?.setSelectionRange(s,t)}handleHide(){if(this.select){if(this.searchPublisher?.get()==""){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.searchPublisher?.set(this.lastValidSearch)}}getInputValue(){return this.isSearchParameter()?this.searchPublisher?.get():this.lastValidSearch}handleFocus(){this.popElement.show()}render(){return m`
2092
2092
  <sonic-pop manual style="display:block;" @hide=${this.handleHide}>
2093
2093
  <sonic-input
2094
2094
  class="form-element"
@@ -2097,18 +2097,18 @@
2097
2097
  formDataProvider="${this.searchDataProvider}"
2098
2098
  type="search"
2099
2099
  data-keyboard-nav="${this.getAttribute("data-keyboard-nav")||""}"
2100
- label="${$(this.label)}"
2101
- description="${$(this.description)}"
2102
- name="${$(this.searchParameter||this.name)}"
2100
+ label="${S(this.label)}"
2101
+ description="${S(this.description)}"
2102
+ name="${S(this.searchParameter||this.name)}"
2103
2103
  ?required=${this.required}
2104
- placeholder="${$(this.placeholder)}"
2104
+ placeholder="${S(this.placeholder)}"
2105
2105
  ?readonly="${this.readonly}"
2106
2106
  autocomplete="off"
2107
2107
  clearable
2108
2108
  inlineContent
2109
2109
  size=${this.size}
2110
2110
  @focus=${this.handleFocus}
2111
- value=${$(this.getInputValue())}
2111
+ value=${S(this.getInputValue())}
2112
2112
  >
2113
2113
  <slot
2114
2114
  name="prefix"
@@ -2116,14 +2116,14 @@
2116
2116
  @slotchange=${this.hasSlotOrProps}
2117
2117
  ></slot>
2118
2118
 
2119
- ${this.select?g`
2119
+ ${this.select?m`
2120
2120
  <sonic-icon
2121
2121
  slot="suffix"
2122
2122
  class="select-chevron"
2123
2123
  name="nav-arrow-down"
2124
2124
  .size=${this.size}
2125
2125
  ></sonic-icon>
2126
- `:A}
2126
+ `:D}
2127
2127
  </sonic-input>
2128
2128
  <sonic-menu
2129
2129
  slot="content"
@@ -2153,7 +2153,7 @@
2153
2153
  </sonic-queue>
2154
2154
  </sonic-menu>
2155
2155
  </sonic-pop>
2156
- `}};ot.styles=[es,C`
2156
+ `}};ct.styles=[ps,$`
2157
2157
  :host {
2158
2158
  display: block;
2159
2159
  }
@@ -2174,7 +2174,7 @@
2174
2174
  min-width: 14rem;
2175
2175
  width: 100%;
2176
2176
  }
2177
- `],lt([a({type:String})],ot.prototype,"size",2),lt([a({type:String})],ot.prototype,"placeholder",2),lt([a()],ot.prototype,"filteredFields",2),lt([a({type:Boolean,reflect:!0})],ot.prototype,"readonly",2),lt([a({type:String})],ot.prototype,"dataProviderExpression",2),lt([a({type:Number})],ot.prototype,"minSearchLength",2),lt([a({type:Boolean})],ot.prototype,"select",2),lt([a({type:String})],ot.prototype,"key",2),lt([a({type:String})],ot.prototype,"searchParameter",2),lt([a({type:String})],ot.prototype,"propertyName",2),lt([at({slot:"prefix",flatten:!0})],ot.prototype,"slotInputPrefixNodes",2),lt([E()],ot.prototype,"hasInputPrefix",2),lt([Kt("sonic-pop")],ot.prototype,"popElement",2),lt([E()],ot.prototype,"isPopVisible",2),lt([E()],ot.prototype,"lastValidSearch",2),ot=lt([P("sonic-input-autocomplete")],ot);var lc=Object.defineProperty,cc=Object.getOwnPropertyDescriptor,ft=(r,t,i,s)=>{for(var e=s>1?void 0:s?cc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&lc(t,i,e),e};const hc="sonic-password-helper";let ct=class extends Xt(x){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)},k.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&k.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?A:g`
2177
+ `],dt([a({type:String})],ct.prototype,"size",2),dt([a({type:String})],ct.prototype,"placeholder",2),dt([a()],ct.prototype,"filteredFields",2),dt([a({type:Boolean,reflect:!0})],ct.prototype,"readonly",2),dt([a({type:String})],ct.prototype,"dataProviderExpression",2),dt([a({type:Number})],ct.prototype,"minSearchLength",2),dt([a({type:Boolean})],ct.prototype,"select",2),dt([a({type:String})],ct.prototype,"key",2),dt([a({type:String})],ct.prototype,"searchParameter",2),dt([a({type:String})],ct.prototype,"propertyName",2),dt([ht({slot:"prefix",flatten:!0})],ct.prototype,"slotInputPrefixNodes",2),dt([T()],ct.prototype,"hasInputPrefix",2),dt([ie("sonic-pop")],ct.prototype,"popElement",2),dt([T()],ct.prototype,"isPopVisible",2),dt([T()],ct.prototype,"lastValidSearch",2),ct=dt([C("sonic-input-autocomplete")],ct);var Rc=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,mt=(s,t,r,i)=>{for(var e=i>1?void 0:i?zc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Rc(t,r,e),e};const Uc="sonic-password-helper";let ut=class extends le(P){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)},O.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&O.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?m`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:m`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?D:m`
2178
2178
  <div>${this.wording_password_helper_decription}</div>
2179
2179
  <div>
2180
2180
  ${this.getIcon(this.hasEnoughChars)}
@@ -2195,11 +2195,11 @@
2195
2195
  ${this.getIcon(this.hasSpecialChar)}
2196
2196
  ${this.wording_password_helper_special_char}
2197
2197
  </div>
2198
- `}};ft([a()],ct.prototype,"name",2),ft([a()],ct.prototype,"minChars",2),ft([E()],ct.prototype,"hasNoChar",2),ft([E()],ct.prototype,"hasEnoughChars",2),ft([E()],ct.prototype,"hasMinuscule",2),ft([E()],ct.prototype,"hasMajuscule",2),ft([E()],ct.prototype,"hasNumber",2),ft([E()],ct.prototype,"hasSpecialChar",2),ft([a()],ct.prototype,"wording_password_helper_decription",2),ft([a()],ct.prototype,"wording_password_helper_min_length",2),ft([a()],ct.prototype,"wording_password_helper_lower_case",2),ft([a()],ct.prototype,"wording_password_helper_upper_case",2),ft([a()],ct.prototype,"wording_password_helper_number",2),ft([a()],ct.prototype,"wording_password_helper_special_char",2),ct=ft([P(hc)],ct);var dc=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,ge=(r,t,i,s)=>{for(var e=s>1?void 0:s?uc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&dc(t,i,e),e};const pc="sonic-same-value-helper";let ee=class extends Xt(x){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const r=k.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=ut(r,this.name).get()==ut(r,this.sameValueAs).get())},ut(r,this.name).onAssign(this.checkValue),ut(r,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const r=k.get(this.getAncestorAttributeValue("formDataProvider"));ut(r,this.name).offAssign(this.checkValue),ut(r,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?A:g`
2198
+ `}};mt([a()],ut.prototype,"name",2),mt([a()],ut.prototype,"minChars",2),mt([T()],ut.prototype,"hasNoChar",2),mt([T()],ut.prototype,"hasEnoughChars",2),mt([T()],ut.prototype,"hasMinuscule",2),mt([T()],ut.prototype,"hasMajuscule",2),mt([T()],ut.prototype,"hasNumber",2),mt([T()],ut.prototype,"hasSpecialChar",2),mt([a()],ut.prototype,"wording_password_helper_decription",2),mt([a()],ut.prototype,"wording_password_helper_min_length",2),mt([a()],ut.prototype,"wording_password_helper_lower_case",2),mt([a()],ut.prototype,"wording_password_helper_upper_case",2),mt([a()],ut.prototype,"wording_password_helper_number",2),mt([a()],ut.prototype,"wording_password_helper_special_char",2),ut=mt([C(Uc)],ut);var Vc=Object.defineProperty,Bc=Object.getOwnPropertyDescriptor,Oe=(s,t,r,i)=>{for(var e=i>1?void 0:i?Bc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Vc(t,r,e),e};const Hc="sonic-same-value-helper";let fe=class extends le(P){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const s=O.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=bt(s,this.name).get()==bt(s,this.sameValueAs).get())},bt(s,this.name).onAssign(this.checkValue),bt(s,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const s=O.get(this.getAncestorAttributeValue("formDataProvider"));bt(s,this.name).offAssign(this.checkValue),bt(s,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?D:m`
2199
2199
  <span>
2200
- ${this.areEqual?j(this.descriptionWhenEqual):j(this.descriptionWhenNotEqual)}
2200
+ ${this.areEqual?U(this.descriptionWhenEqual):U(this.descriptionWhenNotEqual)}
2201
2201
  </span>
2202
- `}};ge([a()],ee.prototype,"name",2),ge([a()],ee.prototype,"sameValueAs",2),ge([a()],ee.prototype,"descriptionWhenEqual",2),ge([a()],ee.prototype,"descriptionWhenNotEqual",2),ge([E()],ee.prototype,"areEqual",2),ge([E()],ee.prototype,"hasNoChar",2),ee=ge([P(pc)],ee);var fc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,Vt=(r,t,i,s)=>{for(var e=s>1?void 0:s?bc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&fc(t,i,e),e};const mc="sonic-checkbox";let bt=class extends gi(Ms(Le(Q(x)))){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),r.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return g`
2202
+ `}};Oe([a()],fe.prototype,"name",2),Oe([a()],fe.prototype,"sameValueAs",2),Oe([a()],fe.prototype,"descriptionWhenEqual",2),Oe([a()],fe.prototype,"descriptionWhenNotEqual",2),Oe([T()],fe.prototype,"areEqual",2),Oe([T()],fe.prototype,"hasNoChar",2),fe=Oe([C(Hc)],fe);var qc=Object.defineProperty,Wc=Object.getOwnPropertyDescriptor,Qt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Wc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&qc(t,r,e),e};const Kc="sonic-checkbox";let vt=class extends Di(Ks(Be(et(P)))){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(s){this.hasSlotOrProps(),super.willUpdate(s),s.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return m`
2203
2203
  <label class="checkbox-container ${this.disabled?"disabled":""}">
2204
2204
 
2205
2205
  <span class="icon-container">
@@ -2210,24 +2210,24 @@
2210
2210
  ?required=${this.required}
2211
2211
  ?data-indeterminate=${this.showAsIndeterminate}
2212
2212
  ?disabled=${this.disabled}
2213
- .checked=${$(this.checked)}
2213
+ .checked=${S(this.checked)}
2214
2214
  .name=${this.name}
2215
2215
  .value=${this.value}
2216
2216
  ?autofocus=${this.autofocus}
2217
- aria-label=${$(this.ariaLabel)}
2218
- aria-labelledby=${$(this.ariaLabelledby)}
2217
+ aria-label=${S(this.ariaLabel)}
2218
+ aria-labelledby=${S(this.ariaLabelledby)}
2219
2219
  />
2220
2220
  <sonic-icon name="${this.checked=="indeterminate"||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
2221
2221
  </span>
2222
2222
 
2223
2223
  <div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
2224
- ${this.label?j(this.label):""}
2224
+ ${this.label?U(this.label):""}
2225
2225
  <slot @slotchange=${this.hasSlotOrProps}></slot>
2226
- <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?g`${j(this.description)}`:""}</slot>
2226
+ <slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?m`${U(this.description)}`:""}</slot>
2227
2227
  </div>
2228
2228
  </label>
2229
2229
  </label>
2230
- `}};bt.styles=[Lt,C`
2230
+ `}};vt.styles=[zt,$`
2231
2231
  :host {
2232
2232
  --sc-checkbox-border-width: var(--sc-form-border-width);
2233
2233
  --sc-checkbox-border-color: var(
@@ -2349,7 +2349,7 @@
2349
2349
  .hidden {
2350
2350
  display: none;
2351
2351
  }
2352
- `],Vt([a({type:Boolean,reflect:!0})],bt.prototype,"touched",2),Vt([a({type:String})],bt.prototype,"iconName",2),Vt([a({type:String})],bt.prototype,"indeterminateIconName",2),Vt([a({type:Boolean})],bt.prototype,"showAsIndeterminate",2),Vt([a({type:Boolean})],bt.prototype,"hasDescription",2),Vt([a({type:Boolean})],bt.prototype,"hasLabel",2),Vt([at({flatten:!0})],bt.prototype,"slotLabelNodes",2),Vt([at({slot:"description",flatten:!0})],bt.prototype,"slotDescriptionNodes",2),bt=Vt([P(mc)],bt);var gc=Object.getOwnPropertyDescriptor,vc=(r,t,i,s)=>{for(var e=s>1?void 0:s?gc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const yc="sonic-radio";let Li=class extends bt{constructor(){super(),this.radio=!0}willUpdate(r){const t=r.has("type");super.willUpdate(r),t&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};Li.styles=[bt.styles,C`
2352
+ `],Qt([a({type:Boolean,reflect:!0})],vt.prototype,"touched",2),Qt([a({type:String})],vt.prototype,"iconName",2),Qt([a({type:String})],vt.prototype,"indeterminateIconName",2),Qt([a({type:Boolean})],vt.prototype,"showAsIndeterminate",2),Qt([a({type:Boolean})],vt.prototype,"hasDescription",2),Qt([a({type:Boolean})],vt.prototype,"hasLabel",2),Qt([ht({flatten:!0})],vt.prototype,"slotLabelNodes",2),Qt([ht({slot:"description",flatten:!0})],vt.prototype,"slotDescriptionNodes",2),vt=Qt([C(Kc)],vt);var Yc=Object.getOwnPropertyDescriptor,Gc=(s,t,r,i)=>{for(var e=i>1?void 0:i?Yc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Zc="sonic-radio";let Yi=class extends vt{constructor(){super(),this.radio=!0}willUpdate(s){const t=s.has("type");super.willUpdate(s),t&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};Yi.styles=[vt.styles,$`
2353
2353
  :host input {
2354
2354
  border-radius: 50%;
2355
2355
  }
@@ -2365,7 +2365,7 @@
2365
2365
  width: 0.6em;
2366
2366
  width: round(0.6em, 1px);
2367
2367
  }
2368
- `],Li=vc([P(yc)],Li);var _c=Object.getOwnPropertyDescriptor,wc=(r,t,i,s)=>{for(var e=s>1?void 0:s?_c(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const xc="sonic-switch";let Ei=class extends bt{constructor(){super(),this.unique=!0}};Ei.styles=[bt.styles,C`
2368
+ `],Yi=Gc([C(Zc)],Yi);var Xc=Object.getOwnPropertyDescriptor,Qc=(s,t,r,i)=>{for(var e=i>1?void 0:i?Xc(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Jc="sonic-switch";let Gi=class extends vt{constructor(){super(),this.unique=!0}};Gi.styles=[vt.styles,$`
2369
2369
  sonic-icon {
2370
2370
  display: none;
2371
2371
  }
@@ -2430,17 +2430,17 @@
2430
2430
  input + sonic-icon {
2431
2431
  display: none;
2432
2432
  }
2433
- `],Ei=wc([P(xc)],Ei);var Pc=Object.defineProperty,Cc=Object.getOwnPropertyDescriptor,J=(r,t,i,s)=>{for(var e=s>1?void 0:s?Cc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Pc(t,i,e),e};const $c="sonic-select";let Y=class extends Le(Q(x)){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 i of r)i.selected&&(this.value=i[this.valueKey]||"");!(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(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const r=this.shadowRoot?.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`
2433
+ `],Gi=Qc([C(Jc)],Gi);var th=Object.defineProperty,eh=Object.getOwnPropertyDescriptor,st=(s,t,r,i)=>{for(var e=i>1?void 0:i?eh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&th(t,r,e),e};const sh="sonic-select";let X=class extends Be(et(P)){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 s=this.querySelectorAll("option");s.length>0&&(this.options=Array.from(s).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(s){this._options=s;for(const r of s)r.selected&&(this.value=r[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(s){this.hasDoneFirstUpdate=!0,super.firstUpdated(s)}set value(s){s==null&&!this.hasDoneFirstUpdate||(s||(s=""),this._value!=s&&(this._value=s,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(s){this.hasAttribute("description")&&!this.forceAutoFill&&(s=this.getAttribute("description")),this._description=s,this.requestUpdate()}get label(){return this._label}set label(s){this.hasAttribute("label")&&!this.forceAutoFill&&(s=this.getAttribute("label")),this._label=s,this.requestUpdate()}willUpdate(s){this.hasSlotOrProps(),super.willUpdate(s)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const s=this.shadowRoot?.querySelector("select");if(!s||s.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),s.reportValidity()}render(){const s={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return m`
2434
2434
  <label
2435
2435
  for="form-element"
2436
2436
  class="${this.hasLabel?"form-label":"hidden"}"
2437
- >${this.label?j(this.label):""}<slot
2437
+ >${this.label?U(this.label):""}<slot
2438
2438
  name="label"
2439
2439
  @slotchange=${this.hasSlotOrProps}
2440
2440
  ></slot
2441
2441
  ></label>
2442
2442
 
2443
- <div class="form-control ${Oi(r)}">
2443
+ <div class="form-control ${Ki(s)}">
2444
2444
  <slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
2445
2445
  <div class="form-select-wrapper">
2446
2446
  <select
@@ -2451,15 +2451,15 @@
2451
2451
  ?disabled=${this.disabled}
2452
2452
  ?required=${this.required}
2453
2453
  ?multiple=${this.multiple}
2454
- size=${$(this.selectSize)}
2454
+ size=${S(this.selectSize)}
2455
2455
  ?autofocus=${this.autofocus}
2456
2456
  .value="${this.value}"
2457
2457
  class="form-element"
2458
- aria-label=${$(this.ariaLabel)}
2459
- aria-labelledby=${$(this.ariaLabelledby)}
2458
+ aria-label=${S(this.ariaLabel)}
2459
+ aria-labelledby=${S(this.ariaLabelledby)}
2460
2460
  >
2461
- ${Ns(this.options,t=>t[this.valueKey],t=>{const i=this.value==t[this.valueKey];return g`<option
2462
- ?selected=${i}
2461
+ ${qs(this.options,t=>t[this.valueKey],t=>{const r=this.value==t[this.valueKey];return m`<option
2462
+ ?selected=${r}
2463
2463
  value="${t[this.valueKey]}"
2464
2464
  >
2465
2465
  ${t[this.wordingKey]}
@@ -2479,9 +2479,9 @@
2479
2479
  name="description"
2480
2480
  @slotchange=${this.hasSlotOrProps}
2481
2481
  class="${this.hasDescription?"form-description":"hidden"}"
2482
- >${this.description?g`${j(this.description)}`:""}</slot
2482
+ >${this.description?m`${U(this.description)}`:""}</slot
2483
2483
  >
2484
- `}};Y.styles=[Lt,Di,Ws,Ks,C`
2484
+ `}};X.styles=[zt,Wi,ii,ri,$`
2485
2485
  .form-element {
2486
2486
  appearance: none;
2487
2487
  white-space: nowrap;
@@ -2534,11 +2534,11 @@
2534
2534
  :host([multiple]) sonic-icon {
2535
2535
  display: none !important;
2536
2536
  }
2537
- `],J([a({type:String})],Y.prototype,"valueKey",2),J([a({type:String})],Y.prototype,"wordingKey",2),J([a({type:Boolean})],Y.prototype,"multiple",2),J([a({type:String,reflect:!0})],Y.prototype,"size",2),J([a({type:Number})],Y.prototype,"selectSize",2),J([a({type:String,reflect:!0})],Y.prototype,"status",2),J([a({type:Array})],Y.prototype,"options",1),J([a({reflect:!0})],Y.prototype,"value",1),J([a({type:Boolean})],Y.prototype,"forceAutoFill",2),J([a()],Y.prototype,"description",1),J([a()],Y.prototype,"label",1),J([at({slot:"label",flatten:!0})],Y.prototype,"slotLabelNodes",2),J([at({slot:"description",flatten:!0})],Y.prototype,"slotDescriptionNodes",2),J([at({slot:"suffix",flatten:!0})],Y.prototype,"slotSuffixNodes",2),J([at({slot:"prefix",flatten:!0})],Y.prototype,"slotPrefixNodes",2),J([E()],Y.prototype,"hasDescription",2),J([E()],Y.prototype,"hasLabel",2),J([E()],Y.prototype,"hasSuffix",2),J([E()],Y.prototype,"hasPrefix",2),Y=J([P($c)],Y);var Sc=Object.defineProperty,Ac=Object.getOwnPropertyDescriptor,mt=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ac(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Sc(t,i,e),e};const kc="sonic-textarea";let ht=class extends Ms(Le(Q(x))){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const r=this.shadowRoot?.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`
2537
+ `],st([a({type:String})],X.prototype,"valueKey",2),st([a({type:String})],X.prototype,"wordingKey",2),st([a({type:Boolean})],X.prototype,"multiple",2),st([a({type:String,reflect:!0})],X.prototype,"size",2),st([a({type:Number})],X.prototype,"selectSize",2),st([a({type:String,reflect:!0})],X.prototype,"status",2),st([a({type:Array})],X.prototype,"options",1),st([a({reflect:!0})],X.prototype,"value",1),st([a({type:Boolean})],X.prototype,"forceAutoFill",2),st([a()],X.prototype,"description",1),st([a()],X.prototype,"label",1),st([ht({slot:"label",flatten:!0})],X.prototype,"slotLabelNodes",2),st([ht({slot:"description",flatten:!0})],X.prototype,"slotDescriptionNodes",2),st([ht({slot:"suffix",flatten:!0})],X.prototype,"slotSuffixNodes",2),st([ht({slot:"prefix",flatten:!0})],X.prototype,"slotPrefixNodes",2),st([T()],X.prototype,"hasDescription",2),st([T()],X.prototype,"hasLabel",2),st([T()],X.prototype,"hasSuffix",2),st([T()],X.prototype,"hasPrefix",2),X=st([C(sh)],X);var ih=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,yt=(s,t,r,i)=>{for(var e=i>1?void 0:i?rh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&ih(t,r,e),e};const oh="sonic-textarea";let pt=class extends Ks(Be(et(P))){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(s){this.hasSlotOrProps(),super.willUpdate(s)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const s=this.shadowRoot?.querySelector("textarea");if(!s||s.checkValidity())return;const t=this.getFormPublisher();t&&(t.isFormValid=!1),s.reportValidity()}render(){const s={resize:this.resize};return m`
2538
2538
  <label
2539
2539
  for="${this.id||"form-element"}"
2540
2540
  class="${this.hasLabel?"form-label":"hidden"}"
2541
- >${this.label?j(this.label):""}<slot
2541
+ >${this.label?U(this.label):""}<slot
2542
2542
  name="label"
2543
2543
  @slotchange=${this.hasSlotOrProps}
2544
2544
  ></slot
@@ -2553,20 +2553,20 @@
2553
2553
  ?disabled=${this.disabled}
2554
2554
  ?required=${this.required}
2555
2555
  ?autofocus=${this.autofocus}
2556
- rows=${$(this.rows)}
2557
- cols=${$(this.cols)}
2558
- maxlength=${$(this.maxlength)}
2559
- minlength=${$(this.minlength)}
2556
+ rows=${S(this.rows)}
2557
+ cols=${S(this.cols)}
2558
+ maxlength=${S(this.maxlength)}
2559
+ minlength=${S(this.minlength)}
2560
2560
  ?readonly=${this.readonly}
2561
- spellcheck=${$(this.spellcheck)}
2562
- autocomplete=${$(this.autocomplete)}
2563
- tabindex=${$(this.tabindex)}
2564
- wrap=${$(this.wrap)}
2561
+ spellcheck=${S(this.spellcheck)}
2562
+ autocomplete=${S(this.autocomplete)}
2563
+ tabindex=${S(this.tabindex)}
2564
+ wrap=${S(this.wrap)}
2565
2565
  placeholder="${this.placeholder}"
2566
2566
  class="form-element textarea custom-scroll"
2567
- aria-label=${$(this.ariaLabel)}
2568
- aria-labelledby=${$(this.ariaLabelledby)}
2569
- style=${pt(r)}
2567
+ aria-label=${S(this.ariaLabel)}
2568
+ aria-labelledby=${S(this.ariaLabelledby)}
2569
+ style=${gt(s)}
2570
2570
  >
2571
2571
  ${this.value}</textarea
2572
2572
  >
@@ -2576,14 +2576,14 @@ ${this.value}</textarea
2576
2576
  name="description"
2577
2577
  @slotchange=${this.hasSlotOrProps}
2578
2578
  class="${this.hasDescription?"form-description":"hidden"}"
2579
- >${this.description?g`${j(this.description)}`:""}</slot
2579
+ >${this.description?m`${U(this.description)}`:""}</slot
2580
2580
  >
2581
- `}};ht.styles=[Lt,Di,Ws,Ks,es,C`
2581
+ `}};pt.styles=[zt,Wi,ii,ri,ps,$`
2582
2582
  textarea {
2583
2583
  overflow-y: auto !important;
2584
2584
  font-size: inherit;
2585
2585
  }
2586
- `],mt([a({type:String})],ht.prototype,"size",2),mt([a({type:Number})],ht.prototype,"rows",2),mt([a({type:Number})],ht.prototype,"cols",2),mt([a({type:Number})],ht.prototype,"maxlength",2),mt([a({type:Number})],ht.prototype,"minlength",2),mt([a({type:String})],ht.prototype,"wrap",2),mt([a({type:Boolean})],ht.prototype,"readonly",2),mt([a({type:String})],ht.prototype,"placeholder",2),mt([a({type:String})],ht.prototype,"resize",2),mt([at({slot:"label",flatten:!0})],ht.prototype,"slotLabelNodes",2),mt([at({slot:"description",flatten:!0})],ht.prototype,"slotDescriptionNodes",2),mt([E()],ht.prototype,"hasDescription",2),mt([E()],ht.prototype,"hasLabel",2),ht=mt([P(kc)],ht);var Dc=Object.getOwnPropertyDescriptor,Oc=(r,t,i,s)=>{for(var e=s>1?void 0:s?Dc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};let Ti=class extends x{render(){return g`<slot></slot>`}};Ti.styles=[C`
2586
+ `],yt([a({type:String})],pt.prototype,"size",2),yt([a({type:Number})],pt.prototype,"rows",2),yt([a({type:Number})],pt.prototype,"cols",2),yt([a({type:Number})],pt.prototype,"maxlength",2),yt([a({type:Number})],pt.prototype,"minlength",2),yt([a({type:String})],pt.prototype,"wrap",2),yt([a({type:Boolean})],pt.prototype,"readonly",2),yt([a({type:String})],pt.prototype,"placeholder",2),yt([a({type:String})],pt.prototype,"resize",2),yt([ht({slot:"label",flatten:!0})],pt.prototype,"slotLabelNodes",2),yt([ht({slot:"description",flatten:!0})],pt.prototype,"slotDescriptionNodes",2),yt([T()],pt.prototype,"hasDescription",2),yt([T()],pt.prototype,"hasLabel",2),pt=yt([C(oh)],pt);var nh=Object.getOwnPropertyDescriptor,ah=(s,t,r,i)=>{for(var e=i>1?void 0:i?nh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};let Zi=class extends P{render(){return m`<slot></slot>`}};Zi.styles=[$`
2587
2587
  :host {
2588
2588
  font-size: 1.15rem;
2589
2589
  line-height: 1.2;
@@ -2600,24 +2600,24 @@ ${this.value}</textarea
2600
2600
  font-size: 1rem;
2601
2601
  }
2602
2602
  }
2603
- `],Ti=Oc([P("sonic-legend-description")],Ti);var Lc=Object.defineProperty,Ec=Object.getOwnPropertyDescriptor,ve=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ec(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Lc(t,i,e),e};const Tc="sonic-legend";let Bt=class extends x{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">
2604
- ${this.iconName?g`<div class="icon">
2603
+ `],Zi=ah([C("sonic-legend-description")],Zi);var lh=Object.defineProperty,ch=Object.getOwnPropertyDescriptor,Ee=(s,t,r,i)=>{for(var e=i>1?void 0:i?ch(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&lh(t,r,e),e};const hh="sonic-legend";let Jt=class extends P{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(s){this.hasAttribute("description")&&!this.forceAutoFill&&(s=this.getAttribute("description")),this._description=s,this.requestUpdate()}get label(){return this._label}set label(s){this.hasAttribute("label")&&!this.forceAutoFill&&(s=this.getAttribute("label")),this._label=s,this.requestUpdate()}render(){return m`<legend part="legend">
2604
+ ${this.iconName?m`<div class="icon">
2605
2605
  <sonic-icon
2606
2606
  name=${this.iconName}
2607
- prefix=${$(this.iconPrefix)}
2608
- library=${$(this.iconLibrary)}
2607
+ prefix=${S(this.iconPrefix)}
2608
+ library=${S(this.iconLibrary)}
2609
2609
  ></sonic-icon>
2610
2610
  </div>`:""}
2611
2611
 
2612
2612
  <div class="legend-content">
2613
- ${j(this.label?this.label:"")}
2614
- ${this.description?g`<sonic-legend-description
2615
- >${j(this.description)}</sonic-legend-description
2613
+ ${U(this.label?this.label:"")}
2614
+ ${this.description?m`<sonic-legend-description
2615
+ >${U(this.description)}</sonic-legend-description
2616
2616
  >`:""}
2617
2617
  <slot></slot>
2618
2618
  </div>
2619
2619
  <slot name="suffix"></slot>
2620
- </legend>`}};Bt.styles=[C`
2620
+ </legend>`}};Jt.styles=[$`
2621
2621
  :host {
2622
2622
  --sc-legend-font-size: 1.5rem;
2623
2623
  --sc-legend-font-weight: var(--sc-font-weight-base, 400);
@@ -2661,19 +2661,19 @@ ${this.value}</textarea
2661
2661
  .legend-content {
2662
2662
  flex-grow: 1;
2663
2663
  }
2664
- `],ve([a({type:Boolean})],Bt.prototype,"forceAutoFill",2),ve([a()],Bt.prototype,"description",1),ve([a()],Bt.prototype,"label",1),ve([a({type:String})],Bt.prototype,"iconName",2),ve([a({type:String})],Bt.prototype,"iconLibrary",2),ve([a({type:String})],Bt.prototype,"iconPrefix",2),Bt=ve([P(Tc)],Bt);var Nc=Object.defineProperty,Ic=Object.getOwnPropertyDescriptor,Nt=(r,t,i,s)=>{for(var e=s>1?void 0:s?Ic(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Nc(t,i,e),e};const Mc="sonic-fieldset";let xt=class extends Q(x){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return g`<fieldset
2665
- form="${$(this.form)}"
2664
+ `],Ee([a({type:Boolean})],Jt.prototype,"forceAutoFill",2),Ee([a()],Jt.prototype,"description",1),Ee([a()],Jt.prototype,"label",1),Ee([a({type:String})],Jt.prototype,"iconName",2),Ee([a({type:String})],Jt.prototype,"iconLibrary",2),Ee([a({type:String})],Jt.prototype,"iconPrefix",2),Jt=Ee([C(hh)],Jt);var dh=Object.defineProperty,uh=Object.getOwnPropertyDescriptor,Ht=(s,t,r,i)=>{for(var e=i>1?void 0:i?uh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&dh(t,r,e),e};const ph="sonic-fieldset";let At=class extends et(P){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return m`<fieldset
2665
+ form="${S(this.form)}"
2666
2666
  ?disabled="${this.disabled}"
2667
2667
  >
2668
- ${this.label?g` <sonic-legend
2669
- label=${$(this.label)}
2670
- description=${$(this.description)}
2671
- iconName=${$(this.iconName)}
2672
- iconPrefix=${$(this.iconPrefix)}
2673
- iconLibrary=${$(this.iconLibrary)}
2674
- ></sonic-legend>`:A}
2668
+ ${this.label?m` <sonic-legend
2669
+ label=${S(this.label)}
2670
+ description=${S(this.description)}
2671
+ iconName=${S(this.iconName)}
2672
+ iconPrefix=${S(this.iconPrefix)}
2673
+ iconLibrary=${S(this.iconLibrary)}
2674
+ ></sonic-legend>`:D}
2675
2675
  <slot></slot>
2676
- </fieldset>`}};xt.styles=[C`
2676
+ </fieldset>`}};At.styles=[$`
2677
2677
  :host {
2678
2678
  --sc-fieldset-mt: 0;
2679
2679
  --sc-fieldset-mb: 1rem;
@@ -2722,9 +2722,9 @@ ${this.value}</textarea
2722
2722
  ::slotted(sonic-legend:last-child) {
2723
2723
  margin-bottom: 0;
2724
2724
  }
2725
- `],Nt([a({type:Boolean,reflect:!0})],xt.prototype,"disabled",2),Nt([a({type:String})],xt.prototype,"form",2),Nt([a({type:String})],xt.prototype,"label",2),Nt([a({type:String})],xt.prototype,"description",2),Nt([a({type:String})],xt.prototype,"iconName",2),Nt([a({type:String})],xt.prototype,"iconLibrary",2),Nt([a({type:String})],xt.prototype,"iconPrefix",2),Nt([a({type:Boolean,reflect:!0})],xt.prototype,"tight",2),Nt([a({type:String,reflect:!0})],xt.prototype,"variant",2),xt=Nt([P(Mc)],xt);var Fc=Object.defineProperty,jc=Object.getOwnPropertyDescriptor,Ni=(r,t,i,s)=>{for(var e=s>1?void 0:s?jc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Fc(t,i,e),e};const Rc="sonic-form-layout";let ds=class extends Q(x){constructor(){super(...arguments),this._resizeController=new no(this,{}),this.oneFormElement=!1}onSlotChange(){let r=this.slottedElements;const t=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];r=r.filter(i=>t.includes(i.nodeName.toLowerCase())),this.oneFormElement=r.length==1}render(){const r={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return g`<div class=${Oi(r)}>
2725
+ `],Ht([a({type:Boolean,reflect:!0})],At.prototype,"disabled",2),Ht([a({type:String})],At.prototype,"form",2),Ht([a({type:String})],At.prototype,"label",2),Ht([a({type:String})],At.prototype,"description",2),Ht([a({type:String})],At.prototype,"iconName",2),Ht([a({type:String})],At.prototype,"iconLibrary",2),Ht([a({type:String})],At.prototype,"iconPrefix",2),Ht([a({type:Boolean,reflect:!0})],At.prototype,"tight",2),Ht([a({type:String,reflect:!0})],At.prototype,"variant",2),At=Ht([C(ph)],At);var fh=Object.defineProperty,bh=Object.getOwnPropertyDescriptor,Xi=(s,t,r,i)=>{for(var e=i>1?void 0:i?bh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&fh(t,r,e),e};const gh="sonic-form-layout";let xs=class extends et(P){constructor(){super(...arguments),this._resizeController=new Eo(this,{}),this.oneFormElement=!1}onSlotChange(){let s=this.slottedElements;const t=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];s=s.filter(r=>t.includes(r.nodeName.toLowerCase())),this.oneFormElement=s.length==1}render(){const s={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return m`<div class=${Ki(s)}>
2726
2726
  <slot @slotchange=${this.onSlotChange}></slot>
2727
- </div>`}};ds.styles=[C`
2727
+ </div>`}};xs.styles=[$`
2728
2728
  :host {
2729
2729
  display: block;
2730
2730
  }
@@ -2759,7 +2759,7 @@ ${this.value}</textarea
2759
2759
  ::slotted(sonic-divider) {
2760
2760
  --sc-divider-my: 0;
2761
2761
  }
2762
- `],Ni([Se({flatten:!0})],ds.prototype,"slottedElements",2),Ni([a({type:Boolean})],ds.prototype,"oneFormElement",2),ds=Ni([P(Rc)],ds);var zc=Object.defineProperty,Uc=Object.getOwnPropertyDescriptor,Ii=(r,t,i,s)=>{for(var e=s>1?void 0:s?Uc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&zc(t,i,e),e};const Vc="sonic-form-actions";let us=class extends x{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const r={flexDirection:this.direction,justifyContent:this.justify};return g`<slot style=${pt(r)}></slot>`}};us.styles=[C`
2762
+ `],Xi([es({flatten:!0})],xs.prototype,"slottedElements",2),Xi([a({type:Boolean})],xs.prototype,"oneFormElement",2),xs=Xi([C(gh)],xs);var mh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Qi=(s,t,r,i)=>{for(var e=i>1?void 0:i?vh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&mh(t,r,e),e};const yh="sonic-form-actions";let Ps=class extends P{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const s={flexDirection:this.direction,justifyContent:this.justify};return m`<slot style=${gt(s)}></slot>`}};Ps.styles=[$`
2763
2763
  :host {
2764
2764
  display: block;
2765
2765
  }
@@ -2768,20 +2768,20 @@ ${this.value}</textarea
2768
2768
  flex-wrap: wrap;
2769
2769
  gap: 0.3rem;
2770
2770
  }
2771
- `],Ii([a({type:String})],us.prototype,"direction",2),Ii([a({type:String})],us.prototype,"justify",2),us=Ii([P(Vc)],us);var Bc=Object.defineProperty,Hc=Object.getOwnPropertyDescriptor,se=(r,t,i,s)=>{for(var e=s>1?void 0:s?Hc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Bc(t,i,e),e};const qc="sonic-group";let It=class extends x{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((i,s)=>{const e=i;s===0?(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0")):s===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(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const r={alignItems:this.alignItems};return g`<span class="${this.hasLabel?"form-label":"hidden"}"
2772
- >${this.label?j(this.label):""}<slot
2771
+ `],Qi([a({type:String})],Ps.prototype,"direction",2),Qi([a({type:String})],Ps.prototype,"justify",2),Ps=Qi([C(yh)],Ps);var _h=Object.defineProperty,wh=Object.getOwnPropertyDescriptor,be=(s,t,r,i)=>{for(var e=i>1?void 0:i?wh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&_h(t,r,e),e};const xh="sonic-group";let qt=class extends P{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const s=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),t=s.length;t>1&&s.forEach((r,i)=>{const e=r;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(s){this.hasSlotOrProps(),super.willUpdate(s)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const s={alignItems:this.alignItems};return m`<span class="${this.hasLabel?"form-label":"hidden"}"
2772
+ >${this.label?U(this.label):""}<slot
2773
2773
  name="label"
2774
2774
  @slotchange=${this.hasSlotOrProps}
2775
2775
  ></slot
2776
2776
  ></span>
2777
- <slot class="main-slot" style=${pt(r)}></slot>
2777
+ <slot class="main-slot" style=${gt(s)}></slot>
2778
2778
  <slot
2779
2779
  name="description"
2780
2780
  @slotchange=${this.hasSlotOrProps}
2781
2781
  class="${this.hasDescription?"form-description":"hidden"}"
2782
2782
  >
2783
- ${this.description?g`${j(this.description)}`:""}
2784
- </slot>`}};It.styles=[Lt,Ws,Ks,C`
2783
+ ${this.description?m`${U(this.description)}`:""}
2784
+ </slot>`}};qt.styles=[zt,ii,ri,$`
2785
2785
  :host {
2786
2786
  display: inline-block;
2787
2787
  vertical-align: middle;
@@ -2801,16 +2801,16 @@ ${this.value}</textarea
2801
2801
  ::slotted(sonic-select) {
2802
2802
  flex-grow: 1;
2803
2803
  }
2804
- `],se([a({type:String})],It.prototype,"alignItems",2),se([a({type:String})],It.prototype,"label",2),se([a({type:String})],It.prototype,"description",2),se([at({slot:"label",flatten:!0})],It.prototype,"slotLabelNodes",2),se([at({slot:"description",flatten:!0})],It.prototype,"slotDescriptionNodes",2),se([E()],It.prototype,"hasDescription",2),se([E()],It.prototype,"hasLabel",2),It=se([P(qc)],It);var Wc=Object.defineProperty,Kc=Object.getOwnPropertyDescriptor,Mt=(r,t,i,s)=>{for(var e=s>1?void 0:s?Kc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Wc(t,i,e),e};const Yc="sonic-image";let Pt=class extends x{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){if(this.transition){const t=this.shadowRoot?.querySelector("img");if(!t)return;t.onload=function(){t.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">
2804
+ `],be([a({type:String})],qt.prototype,"alignItems",2),be([a({type:String})],qt.prototype,"label",2),be([a({type:String})],qt.prototype,"description",2),be([ht({slot:"label",flatten:!0})],qt.prototype,"slotLabelNodes",2),be([ht({slot:"description",flatten:!0})],qt.prototype,"slotDescriptionNodes",2),be([T()],qt.prototype,"hasDescription",2),be([T()],qt.prototype,"hasLabel",2),qt=be([C(xh)],qt);var Ph=Object.defineProperty,Ch=Object.getOwnPropertyDescriptor,Wt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ch(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Ph(t,r,e),e};const $h="sonic-image";let kt=class extends P{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(s){if(this.transition){const t=this.shadowRoot?.querySelector("img");if(!t)return;t.onload=function(){t.classList.add("loaded")}}super.firstUpdated(s)}render(){const s={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return m`<div part="image">
2805
2805
  <picture part="picture"
2806
2806
  ><img
2807
2807
  part="img"
2808
2808
  src="${this.src}"
2809
2809
  loading="${this.loading}"
2810
2810
  alt="${this.alt}"
2811
- style=${pt(r)}
2811
+ style=${gt(s)}
2812
2812
  /></picture>
2813
- </div>`}};Pt.styles=[C`
2813
+ </div>`}};kt.styles=[$`
2814
2814
  :host {
2815
2815
  --sc-img-radius: 0;
2816
2816
  --sc-img-bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
@@ -2884,22 +2884,22 @@ ${this.value}</textarea
2884
2884
  opacity: 1;
2885
2885
  scale: 1;
2886
2886
  }
2887
- `],Mt([a({type:String})],Pt.prototype,"rounded",2),Mt([a({type:String})],Pt.prototype,"src",2),Mt([a({type:String})],Pt.prototype,"alt",2),Mt([a({type:String})],Pt.prototype,"loading",2),Mt([a({type:String,reflect:!0})],Pt.prototype,"transition",2),Mt([a({type:String})],Pt.prototype,"ratio",2),Mt([a({type:String})],Pt.prototype,"objectPosition",2),Mt([a({type:String})],Pt.prototype,"imageRendering",2),Mt([a({type:Boolean,reflect:!0})],Pt.prototype,"cover",2),Pt=Mt([P(Yc)],Pt);var Zc=Object.defineProperty,Gc=Object.getOwnPropertyDescriptor,gt=(r,t,i,s)=>{for(var e=s>1?void 0:s?Gc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Zc(t,i,e),e};const Xc="sonic-menu";let dt=class extends x{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.attributeObserver=null,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(r){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),super.updated(r)}setDividersSize(r){r.forEach(t=>{t.setAttribute("size","sm"),this.direction=="row"?t.style.setProperty("margin","0 .1rem "):t.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(r=>{this.attributeObserver.observe(r,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const r=this.menuChildren.filter(t=>t.hasAttribute("active")&&t.getAttribute("active")!=="false");r.length===1&&requestAnimationFrame(()=>{r[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(r){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let r=!1,t,i;this.scrollable&&(this.addEventListener("mousedown",s=>{r=!0,this.classList.add("active"),t=s.pageX-this.menuContent.offsetLeft,i=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mousemove",s=>{if(!r)return;s.preventDefault();const o=(s.pageX-this.menuContent.offsetLeft-t)*1.5;this.menuContent.scrollLeft=i-o,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",s=>{s.preventDefault(),this.setScrollShadow(this.menuContent,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},t=this.direction=="row",i={gap:this.gap,flexDirection:this.direction},s={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},e={marginLeft:t?"":".55em"};return g`<menu
2887
+ `],Wt([a({type:String})],kt.prototype,"rounded",2),Wt([a({type:String})],kt.prototype,"src",2),Wt([a({type:String})],kt.prototype,"alt",2),Wt([a({type:String})],kt.prototype,"loading",2),Wt([a({type:String,reflect:!0})],kt.prototype,"transition",2),Wt([a({type:String})],kt.prototype,"ratio",2),Wt([a({type:String})],kt.prototype,"objectPosition",2),Wt([a({type:String})],kt.prototype,"imageRendering",2),Wt([a({type:Boolean,reflect:!0})],kt.prototype,"cover",2),kt=Wt([C($h)],kt);var Sh=Object.defineProperty,Ah=Object.getOwnPropertyDescriptor,_t=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ah(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Sh(t,r,e),e};const Lo=s=>es(s),kh="sonic-menu";let ft=class extends P{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.attributeObserver=null,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(s){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),super.updated(s)}setDividersSize(s){s.forEach(t=>{t.setAttribute("size","sm"),this.direction=="row"?t.style.setProperty("margin","0 .1rem "):t.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(s=>{this.attributeObserver.observe(s,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const s=this.menuChildren.filter(t=>t.hasAttribute("active")&&t.getAttribute("active")!=="false");s.length===1&&requestAnimationFrame(()=>{s[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(s){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let s=!1,t,r;this.scrollable&&(this.addEventListener("mousedown",i=>{s=!0,this.classList.add("active"),t=i.pageX-this.menuContent.offsetLeft,r=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{s=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{s=!1,this.classList.remove("active")}),this.addEventListener("mousemove",i=>{if(!s)return;i.preventDefault();const o=(i.pageX-this.menuContent.offsetLeft-t)*1.5;this.menuContent.scrollLeft=r-o,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",i=>{i.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)}))}setScrollShadow(s,t){t=="row"?(s.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),s.scrollLeft<s.scrollWidth-s.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):t=="column"&&(s.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),s.scrollTop<s.scrollHeight-(s.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(s){s.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 s={minWidth:this.minWidth,flexDirection:this.direction},t=this.direction=="row",r={gap:this.gap,flexDirection:this.direction},i={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},e={marginLeft:t?"":".55em"};return m`<menu
2888
2888
  part="menu"
2889
2889
  class="shadowable"
2890
- style=${pt(r)}
2890
+ style=${gt(s)}
2891
2891
  >
2892
2892
  <slot
2893
2893
  @slotchange=${this.mainSlotChange}
2894
2894
  id="menu-content"
2895
- style=${pt(i)}
2895
+ style=${gt(r)}
2896
2896
  ></slot>
2897
2897
  <sonic-pop
2898
- style=${pt(s)}
2898
+ style=${gt(i)}
2899
2899
  class=${this.hasMoreElements?"":"hidden"}
2900
2900
  >
2901
2901
  <sonic-menu-item
2902
- style=${pt(e)}
2902
+ style=${gt(e)}
2903
2903
  class="more-btn"
2904
2904
  shape=${this.moreShape}
2905
2905
  align="center"
@@ -2915,7 +2915,7 @@ ${this.value}</textarea
2915
2915
  slot="content"
2916
2916
  ></slot>
2917
2917
  </sonic-pop>
2918
- </menu>`}};dt.styles=[C`
2918
+ </menu>`}};ft.styles=[$`
2919
2919
  :host {
2920
2920
  display: block;
2921
2921
  --sc-menu-gap: 0.15rem;
@@ -3007,7 +3007,7 @@ ${this.value}</textarea
3007
3007
  to bottom,
3008
3008
  rgba(0, 0, 0, 0),
3009
3009
  rgba(0, 0, 0, 1) 10%
3010
- );
3010
+ );queryAssignedElements
3011
3011
  mask-image: linear-gradient(
3012
3012
  to bottom,
3013
3013
  rgba(0, 0, 0, 0),
@@ -3043,27 +3043,27 @@ ${this.value}</textarea
3043
3043
  rgba(0, 0, 0, 0) 100%
3044
3044
  );
3045
3045
  }
3046
- `,ro],gt([a({type:String,reflect:!0})],dt.prototype,"size",2),gt([a({type:String,reflect:!0})],dt.prototype,"direction",2),gt([a({type:String})],dt.prototype,"gap",2),gt([a({type:String,reflect:!0})],dt.prototype,"align",2),gt([a({type:String,reflect:!0})],dt.prototype,"shadow",2),gt([a({type:String})],dt.prototype,"moreShape",2),gt([a({type:Boolean})],dt.prototype,"scrollable",2),gt([a({type:String})],dt.prototype,"minWidth",2),gt([Kt("menu")],dt.prototype,"menu",2),gt([Kt("#menu-content")],dt.prototype,"menuContent",2),gt([Se({selector:"*"})],dt.prototype,"menuChildren",2),gt([Se({slot:"more",selector:"*"})],dt.prototype,"moreElements",2),gt([E()],dt.prototype,"hasMoreElements",2),dt=gt([P(Xc)],dt);var Qc=Object.defineProperty,Jc=Object.getOwnPropertyDescriptor,ao=(r,t,i,s)=>{for(var e=s>1?void 0:s?Jc(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Qc(t,i,e),e};const th="sonic-modal-actions";let Ys=class extends x{firstUpdated(r){this.buttons?.forEach(t=>{t.hasAttribute("hideModal")&&t.addEventListener("click",()=>{Gt.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(r)}render(){return g`<slot></slot>`}};Ys.styles=[C`
3046
+ `,Do],_t([a({type:String,reflect:!0})],ft.prototype,"size",2),_t([a({type:String,reflect:!0})],ft.prototype,"direction",2),_t([a({type:String})],ft.prototype,"gap",2),_t([a({type:String,reflect:!0})],ft.prototype,"align",2),_t([a({type:String,reflect:!0})],ft.prototype,"shadow",2),_t([a({type:String})],ft.prototype,"moreShape",2),_t([a({type:Boolean})],ft.prototype,"scrollable",2),_t([a({type:String})],ft.prototype,"minWidth",2),_t([ie("menu")],ft.prototype,"menu",2),_t([ie("#menu-content")],ft.prototype,"menuContent",2),_t([Lo({selector:"*"})],ft.prototype,"menuChildren",2),_t([Lo({slot:"more",selector:"*"})],ft.prototype,"moreElements",2),_t([T()],ft.prototype,"hasMoreElements",2),ft=_t([C(kh)],ft);var Dh=Object.defineProperty,Oh=Object.getOwnPropertyDescriptor,To=(s,t,r,i)=>{for(var e=i>1?void 0:i?Oh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Dh(t,r,e),e};const Eh="sonic-modal-actions";let oi=class extends P{firstUpdated(s){this.buttons?.forEach(t=>{t.hasAttribute("hideModal")&&t.addEventListener("click",()=>{ae.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(s)}render(){return m`<slot></slot>`}};oi.styles=[$`
3047
3047
  :host {
3048
3048
  display: flex;
3049
3049
  gap: 0.5rem;
3050
3050
  margin-top: auto;
3051
3051
  padding-top: 1.5rem;
3052
3052
  }
3053
- `],ao([Se({selector:"sonic-button"})],Ys.prototype,"buttons",2),Ys=ao([P(th)],Ys);var eh=Object.defineProperty,sh=Object.getOwnPropertyDescriptor,Zs=(r,t,i,s)=>{for(var e=s>1?void 0:s?sh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&eh(t,i,e),e};const ih="sonic-modal-close";let ps=class extends x{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){super.connectedCallback(),this.lang=document.documentElement.lang?.split("-")[0]??"fr"}render(){return g`<sonic-button
3053
+ `],To([es({selector:"sonic-button"})],oi.prototype,"buttons",2),oi=To([C(Eh)],oi);var Lh=Object.defineProperty,Th=Object.getOwnPropertyDescriptor,ni=(s,t,r,i)=>{for(var e=i>1?void 0:i?Th(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Lh(t,r,e),e};const Mh="sonic-modal-close";let Cs=class extends P{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){super.connectedCallback(),this.lang=document.documentElement.lang?.split("-")[0]??"fr"}render(){return m`<sonic-button
3054
3054
  noAutoFill
3055
3055
  data-aria-label=${this.translation[this.lang]}
3056
- reset=${$(this.reset)}
3056
+ reset=${S(this.reset)}
3057
3057
  shape="circle"
3058
3058
  @click=${this.handleClick}
3059
- type=${$(this.type)}
3059
+ type=${S(this.type)}
3060
3060
  ><sonic-icon name="cancel" size="lg"></sonic-icon
3061
- ></sonic-button>`}handleClick(){q.getClosestElement(this,"sonic-modal").hide()}};Zs([a()],ps.prototype,"translation",2),Zs([a()],ps.prototype,"reset",2),Zs([a()],ps.prototype,"type",2),ps=Zs([P(ih)],ps);var rh=Object.getOwnPropertyDescriptor,oh=(r,t,i,s)=>{for(var e=s>1?void 0:s?rh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const nh="sonic-modal-content";let Mi=class extends x{render(){return g`<slot></slot>`}};Mi.styles=[C`
3061
+ ></sonic-button>`}handleClick(){Y.getClosestElement(this,"sonic-modal").hide()}};ni([a()],Cs.prototype,"translation",2),ni([a()],Cs.prototype,"reset",2),ni([a()],Cs.prototype,"type",2),Cs=ni([C(Mh)],Cs);var Ih=Object.getOwnPropertyDescriptor,Nh=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ih(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Fh="sonic-modal-content";let Ji=class extends P{render(){return m`<slot></slot>`}};Ji.styles=[$`
3062
3062
  :host {
3063
3063
  display: block;
3064
3064
  width: 100%;
3065
3065
  }
3066
- `],Mi=oh([P(nh)],Mi);var ah=Object.getOwnPropertyDescriptor,lh=(r,t,i,s)=>{for(var e=s>1?void 0:s?ah(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const ch="sonic-modal-subtitle";let Fi=class extends x{render(){return g`<slot></slot>`}};Fi.styles=[C`
3066
+ `],Ji=Nh([C(Fh)],Ji);var jh=Object.getOwnPropertyDescriptor,Rh=(s,t,r,i)=>{for(var e=i>1?void 0:i?jh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const zh="sonic-modal-subtitle";let tr=class extends P{render(){return m`<slot></slot>`}};tr.styles=[$`
3067
3067
  :host {
3068
3068
  font-size: 1.25rem;
3069
3069
  display: block;
@@ -3075,7 +3075,7 @@ ${this.value}</textarea
3075
3075
  font-weight: var(--sc-headings-font-weight, 700);
3076
3076
  font-style: var(--sc-headings-font-style, normal);
3077
3077
  }
3078
- `],Fi=lh([P(ch)],Fi);var hh=Object.getOwnPropertyDescriptor,dh=(r,t,i,s)=>{for(var e=s>1?void 0:s?hh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const uh="sonic-modal-title";let ji=class extends x{render(){return g`<slot></slot>`}};ji.styles=[C`
3078
+ `],tr=Rh([C(zh)],tr);var Uh=Object.getOwnPropertyDescriptor,Vh=(s,t,r,i)=>{for(var e=i>1?void 0:i?Uh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Bh="sonic-modal-title";let er=class extends P{render(){return m`<slot></slot>`}};er.styles=[$`
3079
3079
  :host {
3080
3080
  font-weight: bold;
3081
3081
  font-size: 1.5rem;
@@ -3088,30 +3088,30 @@ ${this.value}</textarea
3088
3088
  font-weight: var(--sc-headings-font-weight, 700);
3089
3089
  font-style: var(--sc-headings-font-style, normal);
3090
3090
  }
3091
- `],ji=dh([P(uh)],ji);const lo=new WeakMap;function ph(r){const t=lo.get(r);if(t)return t;const i=new CSSStyleSheet;return i.replaceSync(r.cssText),lo.set(r,i),i}function fh(r){return r instanceof ri}function co(r){return r?(Array.isArray(r)?r:[r]).flatMap(i=>Array.isArray(i)?co(i):i instanceof CSSStyleSheet?[i]:fh(i)?[ph(i)]:[]):[]}var bh=Object.defineProperty,mh=Object.getOwnPropertyDescriptor,W=(r,t,i,s)=>{for(var e=s>1?void 0:s?mh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&bh(t,i,e),e};const ho="sonic-modal";let T=class extends Q(x){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(r){const t=document.createElement(ho);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.closeOnLocationChange===!0&&t.setAttribute("closeOnLocationChange","true"),r.maxWidth&&(t.maxWidth=r?.maxWidth),r.width&&(t.width=r?.width),r.maxHeight&&(t.maxHeight=r?.maxHeight),r.height&&(t.height=r?.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r?.fullScreen),r.effect&&(t.effect=r?.effect),r.noCloseButton&&(t.noCloseButton=!0),r.closeButtonType&&(t.closeButtonType=r?.closeButtonType),r.styleSheet&&(t.styleSheet=r?.styleSheet),r.paddingX&&(t.paddingX=r?.paddingX),r.paddingY&&(t.paddingY=r?.paddingY),r.zIndex&&(t.zIndex=r?.zIndex),_t.getPopContainer().appendChild(t),t.updateComplete.then(()=>{t.show()}),t}connectedCallback(){T.modals.push(this),et.onChange(this),super.connectedCallback()}disconnectedCallback(){et.offChange(this),T.modals.splice(T.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(r){if(this.closeOnLocationChange&&r.has("location")){const t=r.get("location");t&&this.location&&this.location!==t&&setTimeout(()=>{this.hide()},50)}r.has("zIndex")&&this.style.setProperty("--sc_z-index",this.zIndex||"990"),r.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),r.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(r)}updated(r){const t=!r.get("visible")&&this.visible,i=r.get("visible")&&!this.visible;t&&this._animationState==="hidden"?this.show():i&&this._animationState==="visible"&&this.hide(),r.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(r){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const r={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},t={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return g`
3091
+ `],er=Vh([C(Bh)],er);const Mo=new WeakMap;function Hh(s){const t=Mo.get(s);if(t)return t;const r=new CSSStyleSheet;return r.replaceSync(s.cssText),Mo.set(s,r),r}function qh(s){return s instanceof gi}function Io(s){return s?(Array.isArray(s)?s:[s]).flatMap(r=>Array.isArray(r)?Io(r):r instanceof CSSStyleSheet?[r]:qh(r)?[Hh(r)]:[]):[]}var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,G=(s,t,r,i)=>{for(var e=i>1?void 0:i?Kh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Wh(t,r,e),e};const No="sonic-modal";let N=class extends et(P){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(s){const t=document.createElement(No);return t.options=s,s.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),s.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),s.closeOnLocationChange===!0&&t.setAttribute("closeOnLocationChange","true"),s.maxWidth&&(t.maxWidth=s?.maxWidth),s.width&&(t.width=s?.width),s.maxHeight&&(t.maxHeight=s?.maxHeight),s.height&&(t.height=s?.height),s.forceAction&&(t.forceAction=!0),s.fullScreen&&(t.fullScreen=s?.fullScreen),s.effect&&(t.effect=s?.effect),s.noCloseButton&&(t.noCloseButton=!0),s.closeButtonType&&(t.closeButtonType=s?.closeButtonType),s.styleSheet&&(t.styleSheet=s?.styleSheet),s.paddingX&&(t.paddingX=s?.paddingX),s.paddingY&&(t.paddingY=s?.paddingY),s.zIndex&&(t.zIndex=s?.zIndex),Ct.getPopContainer().appendChild(t),t.updateComplete.then(()=>{t.show()}),t}connectedCallback(){N.modals.push(this),ot.onChange(this),super.connectedCallback()}disconnectedCallback(){ot.offChange(this),N.modals.splice(N.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(s){if(this.closeOnLocationChange&&s.has("location")){const t=s.get("location");t&&this.location&&this.location!==t&&setTimeout(()=>{this.hide()},50)}s.has("zIndex")&&this.style.setProperty("--sc_z-index",this.zIndex||"990"),s.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),s.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(s)}updated(s){const t=!s.get("visible")&&this.visible,r=s.get("visible")&&!this.visible;t&&this._animationState==="hidden"?this.show():r&&this._animationState==="visible"&&this.hide(),s.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(s){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const s={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},t={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return m`
3092
3092
  <div
3093
3093
  id="backdrop"
3094
3094
  @click=${this.handleOverlayClick}
3095
- style=${pt(t)}
3095
+ style=${gt(t)}
3096
3096
  ></div>
3097
3097
  <dialog
3098
3098
  id="modal"
3099
3099
  part="modal"
3100
3100
  class="custom-scroll"
3101
3101
  aria-modal="true"
3102
- style=${pt(r)}
3102
+ style=${gt(s)}
3103
3103
  >
3104
- ${this._animationState!=="hidden"?g`<div id="modal-content">
3105
- ${!this.forceAction&&!this.noCloseButton?g`<sonic-modal-close
3104
+ ${this._animationState!=="hidden"?m`<div id="modal-content">
3105
+ ${!this.forceAction&&!this.noCloseButton?m`<sonic-modal-close
3106
3106
  class="${this._animationState=="visible"?"animate-in":"animate-out"}"
3107
- type=${$(this.closeButtonType)}
3108
- ></sonic-modal-close>`:A}
3107
+ type=${S(this.closeButtonType)}
3108
+ ></sonic-modal-close>`:D}
3109
3109
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
3110
3110
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
3111
3111
  <slot></slot>
3112
- </div>`:A}
3112
+ </div>`:D}
3113
3113
  </dialog>
3114
- `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const r=co(this.styleSheet),t=this.renderRoot.adoptedStyleSheets.filter(i=>!this._adoptedStyleSheets.includes(i));this.renderRoot.adoptedStyleSheets=[...t,...r],this._adoptedStyleSheets=r}modalFragment(r){const t=this.options?.[r];if(!t)return A;let i;switch(t instanceof Object?i=t:i=j(t),r){case"title":return g`<sonic-modal-title>${i}</sonic-modal-title>`;case"subtitle":return g`<sonic-modal-subtitle>${i}</sonic-modal-subtitle>`;case"content":return g`<sonic-modal-content>${i}</sonic-modal-content>`;case"actions":return g`<sonic-modal-actions>${i}</sonic-modal-actions>`;default:return A}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&k.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){T.modals.forEach(r=>{r.dispose()})}handleEscape(r){if(r.key==="Escape"){r.preventDefault();const t=T.modals.filter(i=>i._animationState!=="hidden"&&!i.forceAction);t.length>0&&t[t.length-1].hide()}}animation(r){return new Promise(t=>{const{quartOut:i,linear:s,translateY:e,durationIn:o,durationOut:n,quadOut:l}=this._animationConfig,c=this._modalElement;if(!c)return t();const h=r==="in",u=h?o:n,d=!this.fullScreen&&h?100:0;this.fullScreen||(h?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const m=[];this.effect==="slide"&&(m.push(c.animate([{transform:h?e:"translateY(0)"},{transform:h?"translateY(0)":e}],{duration:u,easing:h?i:l,fill:"both",delay:d})),m.push(c.animate([{opacity:h?0:1},{opacity:h?1:0}],{duration:u,easing:s,fill:"both",delay:d}))),Promise.all(m.map(y=>y.finished)).then(()=>t())})}};T.styles=[es,C`
3114
+ `}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const s=Io(this.styleSheet),t=this.renderRoot.adoptedStyleSheets.filter(r=>!this._adoptedStyleSheets.includes(r));this.renderRoot.adoptedStyleSheets=[...t,...s],this._adoptedStyleSheets=s}modalFragment(s){const t=this.options?.[s];if(!t)return D;let r;switch(t instanceof Object?r=t:r=U(t),s){case"title":return m`<sonic-modal-title>${r}</sonic-modal-title>`;case"subtitle":return m`<sonic-modal-subtitle>${r}</sonic-modal-subtitle>`;case"content":return m`<sonic-modal-content>${r}</sonic-modal-content>`;case"actions":return m`<sonic-modal-actions>${r}</sonic-modal-actions>`;default:return D}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&O.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){N.modals.forEach(s=>{s.dispose()})}handleEscape(s){if(s.key==="Escape"){s.preventDefault();const t=N.modals.filter(r=>r._animationState!=="hidden"&&!r.forceAction);t.length>0&&t[t.length-1].hide()}}animation(s){return new Promise(t=>{const{quartOut:r,linear:i,translateY:e,durationIn:o,durationOut:n,quadOut:l}=this._animationConfig,c=this._modalElement;if(!c)return t();const h=s==="in",p=h?o:n,d=!this.fullScreen&&h?100:0;this.fullScreen||(h?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(c.animate([{transform:h?e:"translateY(0)"},{transform:h?"translateY(0)":e}],{duration:p,easing:h?r:l,fill:"both",delay:d})),f.push(c.animate([{opacity:h?0:1},{opacity:h?1:0}],{duration:p,easing:i,fill:"both",delay:d}))),Promise.all(f.map(_=>_.finished)).then(()=>t())})}};N.styles=[ps,$`
3115
3115
  :host {
3116
3116
  --sc-modal-py: 2.5rem;
3117
3117
  --sc-modal-px: 1.5rem;
@@ -3262,17 +3262,17 @@ ${this.value}</textarea
3262
3262
  transform: scale(0) !important;
3263
3263
  transition: 0.2s linear !important;
3264
3264
  }
3265
- `],T.modals=[],W([a({type:Boolean})],T.prototype,"forceAction",2),W([a({type:Boolean})],T.prototype,"noCloseButton",2),W([a({type:Boolean})],T.prototype,"removeOnHide",2),W([a({type:Boolean})],T.prototype,"removeHashOnHide",2),W([a({type:String,reflect:!0})],T.prototype,"align",2),W([a({type:String})],T.prototype,"paddingX",2),W([a({type:String})],T.prototype,"paddingY",2),W([a({type:String})],T.prototype,"maxWidth",2),W([a({type:String})],T.prototype,"maxHeight",2),W([a({type:String})],T.prototype,"zIndex",2),W([a({type:String})],T.prototype,"width",2),W([a({type:String})],T.prototype,"height",2),W([a({type:String})],T.prototype,"effect",2),W([a({attribute:!1})],T.prototype,"styleSheet",2),W([a({type:Object})],T.prototype,"options",2),W([a({type:Boolean,reflect:!0})],T.prototype,"fullScreen",2),W([a({type:Boolean,reflect:!0})],T.prototype,"visible",2),W([a({type:String})],T.prototype,"closeButtonType",2),W([Kt("#modal")],T.prototype,"_modalElement",2),W([a({type:Boolean})],T.prototype,"closeOnLocationChange",2),W([E()],T.prototype,"location",2),W([E()],T.prototype,"_animationState",2),T=W([P(ho)],T),typeof window<"u"&&(window.SonicModal=T);var gh=Object.defineProperty,vh=Object.getOwnPropertyDescriptor,Ft=(r,t,i,s)=>{for(var e=s>1?void 0:s?vh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&gh(t,i,e),e};const yh={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},_h="sonic-alert";let Ct=class extends x{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}connectedCallback(){if(this.dismissForever){const r=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(r)[this.id]&&this.remove()}super.connectedCallback()}render(){return g`
3265
+ `],N.modals=[],G([a({type:Boolean})],N.prototype,"forceAction",2),G([a({type:Boolean})],N.prototype,"noCloseButton",2),G([a({type:Boolean})],N.prototype,"removeOnHide",2),G([a({type:Boolean})],N.prototype,"removeHashOnHide",2),G([a({type:String,reflect:!0})],N.prototype,"align",2),G([a({type:String})],N.prototype,"paddingX",2),G([a({type:String})],N.prototype,"paddingY",2),G([a({type:String})],N.prototype,"maxWidth",2),G([a({type:String})],N.prototype,"maxHeight",2),G([a({type:String})],N.prototype,"zIndex",2),G([a({type:String})],N.prototype,"width",2),G([a({type:String})],N.prototype,"height",2),G([a({type:String})],N.prototype,"effect",2),G([a({attribute:!1})],N.prototype,"styleSheet",2),G([a({type:Object})],N.prototype,"options",2),G([a({type:Boolean,reflect:!0})],N.prototype,"fullScreen",2),G([a({type:Boolean,reflect:!0})],N.prototype,"visible",2),G([a({type:String})],N.prototype,"closeButtonType",2),G([ie("#modal")],N.prototype,"_modalElement",2),G([a({type:Boolean})],N.prototype,"closeOnLocationChange",2),G([T()],N.prototype,"location",2),G([T()],N.prototype,"_animationState",2),N=G([C(No)],N),typeof window<"u"&&(window.SonicModal=N);var Yh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,Kt=(s,t,r,i)=>{for(var e=i>1?void 0:i?Gh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Yh(t,r,e),e};const Zh={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},Xh="sonic-alert";let Dt=class extends P{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}connectedCallback(){if(this.dismissForever){const s=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(s)[this.id]&&this.remove()}super.connectedCallback()}render(){return m`
3266
3266
  <slot name="icon" class="${this.noIcon?"hidden":""}"
3267
- >${this.noIcon?A:g`<div>
3268
- ${this.status&&g`<sonic-icon name=${yh[this.status]}></sonic-icon>`}
3267
+ >${this.noIcon?D:m`<div>
3268
+ ${this.status&&m`<sonic-icon name=${Zh[this.status]}></sonic-icon>`}
3269
3269
  </div>`}</slot
3270
3270
  >
3271
3271
  <div class="content">
3272
- ${this.label?g`<span class="label">${j(this.label)}</span>`:A}
3272
+ ${this.label?m`<span class="label">${U(this.label)}</span>`:D}
3273
3273
  <div>${this.text}<slot></slot></div>
3274
3274
  </div>
3275
- ${this.dismissible?g`<sonic-button
3275
+ ${this.dismissible?m`<sonic-button
3276
3276
  @click=${this.close}
3277
3277
  class="close-btn"
3278
3278
  variant="unstyled"
@@ -3280,8 +3280,8 @@ ${this.value}</textarea
3280
3280
  icon
3281
3281
  >
3282
3282
  <sonic-icon name="cancel"></sonic-icon>
3283
- </sonic-button>`:A}
3284
- `}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=[Lt,C`
3283
+ </sonic-button>`:D}
3284
+ `}close(){if(this.remove(),this.dismissForever){const s=localStorage.getItem("sonic-alert-dismissed")||"{}",t=JSON.parse(s);t[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(t))}}};Dt.styles=[zt,$`
3285
3285
  :host {
3286
3286
  --sc_color: var(--sc-base-content, #000);
3287
3287
  --sc_rounded: var(--sc-rounded);
@@ -3368,27 +3368,27 @@ ${this.value}</textarea
3368
3368
  top: 0.4rem;
3369
3369
  right: 0.3rem;
3370
3370
  }
3371
- `],Ft([a({type:String})],Ct.prototype,"label",2),Ft([a({type:Boolean,reflect:!0})],Ct.prototype,"noIcon",2),Ft([a({type:String})],Ct.prototype,"text",2),Ft([a({type:String})],Ct.prototype,"id",2),Ft([a({type:String,reflect:!0})],Ct.prototype,"size",2),Ft([a({type:Boolean,reflect:!0})],Ct.prototype,"dismissible",2),Ft([a({type:Boolean,reflect:!0})],Ct.prototype,"background",2),Ft([a({type:String,reflect:!0})],Ct.prototype,"status",2),Ft([a({type:Boolean,reflect:!0})],Ct.prototype,"dismissForever",2),Ct=Ft([P(_h)],Ct);var wh=Object.defineProperty,xh=Object.getOwnPropertyDescriptor,fs=(r,t,i,s)=>{for(var e=s>1?void 0:s?xh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&wh(t,i,e),e};const Ph="sonic-alert-messages";let ye=class extends Q(x){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?g`<div class="container">
3372
- ${jr(this.messages,r=>r.type=="public"?g`<sonic-alert
3373
- status=${r.status||"default"}
3374
- text=${$(r.content)}
3371
+ `],Kt([a({type:String})],Dt.prototype,"label",2),Kt([a({type:Boolean,reflect:!0})],Dt.prototype,"noIcon",2),Kt([a({type:String})],Dt.prototype,"text",2),Kt([a({type:String})],Dt.prototype,"id",2),Kt([a({type:String,reflect:!0})],Dt.prototype,"size",2),Kt([a({type:Boolean,reflect:!0})],Dt.prototype,"dismissible",2),Kt([a({type:Boolean,reflect:!0})],Dt.prototype,"background",2),Kt([a({type:String,reflect:!0})],Dt.prototype,"status",2),Kt([a({type:Boolean,reflect:!0})],Dt.prototype,"dismissForever",2),Dt=Kt([C(Xh)],Dt);var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,$s=(s,t,r,i)=>{for(var e=i>1?void 0:i?Jh(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Qh(t,r,e),e};const td="sonic-alert-messages";let Le=class extends et(P){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?m`<div class="container">
3372
+ ${ro(this.messages,s=>s.type=="public"?m`<sonic-alert
3373
+ status=${s.status||"default"}
3374
+ text=${S(s.content)}
3375
3375
  size=${this.size}
3376
3376
  ?noIcon=${this.noIcon}
3377
3377
  ?background=${this.background}
3378
- ></sonic-alert>`:A)}
3379
- </div>`:A}};ye.styles=[C`
3378
+ ></sonic-alert>`:D)}
3379
+ </div>`:D}};Le.styles=[$`
3380
3380
  .container {
3381
3381
  display: grid;
3382
3382
  gap: 0.5em;
3383
3383
  grid-template-columns: minmax(0, 1fr);
3384
3384
  width: 100%;
3385
3385
  }
3386
- `],fs([a({type:String})],ye.prototype,"size",2),fs([a({type:Boolean})],ye.prototype,"background",2),fs([a({type:Boolean})],ye.prototype,"noIcon",2),fs([a({type:Array})],ye.prototype,"messages",2),ye=fs([P(Ph)],ye);var Ch=Object.defineProperty,$h=Object.getOwnPropertyDescriptor,uo=(r,t,i,s)=>{for(var e=s>1?void 0:s?$h(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Ch(t,i,e),e};const Sh="sonic-toast-message-subscriber";let Ri=class extends Q(x){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(r){this._messages=r,this.messages&&r.forEach(t=>{t.type=="public"&&L.add({text:t.content||"",status:t.status})})}render(){return A}};uo([a({type:Array})],Ri.prototype,"messages",1),Ri=uo([P(Sh)],Ri);var Ah=Object.defineProperty,kh=Object.getOwnPropertyDescriptor,bs=(r,t,i,s)=>{for(var e=s>1?void 0:s?kh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Ah(t,i,e),e};const Dh="sonic-tooltip";let _e=class extends x{constructor(){super(),this.label="",this.disabled=!1,this.focusable=!1,this.lastKeyWasTab=!1,this.handleKeyDown=r=>{r.key==="Tab"&&(this.lastKeyWasTab=!0)},this.handleMouseDown=()=>{this.lastKeyWasTab=!1,this.classList.remove("keyboard-focus")},this.handleFocusIn=()=>{this.lastKeyWasTab&&this.classList.add("keyboard-focus"),this.lastKeyWasTab=!1},this.handleFocusOut=()=>{this.classList.remove("keyboard-focus"),this.lastKeyWasTab=!1},this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("keydown",this.boundHandleKeyDown,!0),document.addEventListener("mousedown",this.boundHandleMouseDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),document.removeEventListener("keydown",this.boundHandleKeyDown,!0),document.removeEventListener("mousedown",this.boundHandleMouseDown,!0)}willUpdate(r){if(r.has("disabled")){const t=r.get("disabled")===!0;this.disabled?(this.setAttribute("tabindex","-1"),this.classList.remove("keyboard-focus")):!this.disabled&&t&&(this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex"))}r.has("focusable")&&(this.focusable&&!this.disabled?this.setAttribute("tabindex","0"):!this.focusable&&!this.disabled&&this.removeAttribute("tabindex")),super.willUpdate(r)}render(){const r=this.disabled||this.label==""?"disabled":"";return g`<div
3386
+ `],$s([a({type:String})],Le.prototype,"size",2),$s([a({type:Boolean})],Le.prototype,"background",2),$s([a({type:Boolean})],Le.prototype,"noIcon",2),$s([a({type:Array})],Le.prototype,"messages",2),Le=$s([C(td)],Le);var ed=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,Fo=(s,t,r,i)=>{for(var e=i>1?void 0:i?sd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&ed(t,r,e),e};const id="sonic-toast-message-subscriber";let sr=class extends et(P){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(s){this._messages=s,this.messages&&s.forEach(t=>{t.type=="public"&&L.add({text:t.content||"",status:t.status})})}render(){return D}};Fo([a({type:Array})],sr.prototype,"messages",1),sr=Fo([C(id)],sr);var rd=Object.defineProperty,od=Object.getOwnPropertyDescriptor,Ss=(s,t,r,i)=>{for(var e=i>1?void 0:i?od(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&rd(t,r,e),e};const nd="sonic-tooltip";let Te=class extends P{constructor(){super(),this.label="",this.disabled=!1,this.focusable=!1,this.lastKeyWasTab=!1,this.handleKeyDown=s=>{s.key==="Tab"&&(this.lastKeyWasTab=!0)},this.handleMouseDown=()=>{this.lastKeyWasTab=!1,this.classList.remove("keyboard-focus")},this.handleFocusIn=()=>{this.lastKeyWasTab&&this.classList.add("keyboard-focus"),this.lastKeyWasTab=!1},this.handleFocusOut=()=>{this.classList.remove("keyboard-focus"),this.lastKeyWasTab=!1},this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("keydown",this.boundHandleKeyDown,!0),document.addEventListener("mousedown",this.boundHandleMouseDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),document.removeEventListener("keydown",this.boundHandleKeyDown,!0),document.removeEventListener("mousedown",this.boundHandleMouseDown,!0)}willUpdate(s){if(s.has("disabled")){const t=s.get("disabled")===!0;this.disabled?(this.setAttribute("tabindex","-1"),this.classList.remove("keyboard-focus")):!this.disabled&&t&&(this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex"))}s.has("focusable")&&(this.focusable&&!this.disabled?this.setAttribute("tabindex","0"):!this.focusable&&!this.disabled&&this.removeAttribute("tabindex")),super.willUpdate(s)}render(){const s=this.disabled||this.label==""?"disabled":"";return m`<div
3387
3387
  data-tooltip-text="${this.label.trim().replace("&nbsp;"," ")}"
3388
- class="tooltip ${r}"
3388
+ class="tooltip ${s}"
3389
3389
  >
3390
3390
  <slot></slot>
3391
- </div>`}};_e.styles=[C`
3391
+ </div>`}};Te.styles=[$`
3392
3392
  :host {
3393
3393
  position: relative;
3394
3394
  display: inline-flex;
@@ -3494,11 +3494,11 @@ ${this.value}</textarea
3494
3494
  bottom: 0;
3495
3495
  left: var(--sc-tooltip-position);
3496
3496
  }
3497
- `],bs([a({type:String})],_e.prototype,"label",2),bs([a({type:String,reflect:!0})],_e.prototype,"placement",2),bs([a({type:Boolean})],_e.prototype,"disabled",2),bs([a({type:Boolean})],_e.prototype,"focusable",2),_e=bs([P(Dh)],_e);var Oh=Object.defineProperty,Lh=Object.getOwnPropertyDescriptor,jt=(r,t,i,s)=>{for(var e=s>1?void 0:s?Lh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Oh(t,i,e),e};const Eh="sonic-divider";let $t=class extends x{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(r){super.firstUpdated(r),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return g`<div part="divider">
3497
+ `],Ss([a({type:String})],Te.prototype,"label",2),Ss([a({type:String,reflect:!0})],Te.prototype,"placement",2),Ss([a({type:Boolean})],Te.prototype,"disabled",2),Ss([a({type:Boolean})],Te.prototype,"focusable",2),Te=Ss([C(nd)],Te);var ad=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,Yt=(s,t,r,i)=>{for(var e=i>1?void 0:i?ld(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&ad(t,r,e),e};const cd="sonic-divider";let Ot=class extends P{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(s){super.firstUpdated(s),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return m`<div part="divider">
3498
3498
  <span class="text"
3499
- >${j(this.label?this.label:"")}<slot></slot
3499
+ >${U(this.label?this.label:"")}<slot></slot
3500
3500
  ></span>
3501
- </div>`}};$t.styles=[C`
3501
+ </div>`}};Ot.styles=[$`
3502
3502
  :host {
3503
3503
  --sc-divider-my: 0.5rem;
3504
3504
  --sc-divider-mx: 0;
@@ -3629,7 +3629,7 @@ ${this.value}</textarea
3629
3629
  :host([dashed]) {
3630
3630
  --sc-divider-border-style: dashed;
3631
3631
  }
3632
- `],jt([at({flatten:!0})],$t.prototype,"slotNodes",2),jt([Kt("div")],$t.prototype,"divider",2),jt([a({type:String})],$t.prototype,"label",2),jt([a({type:String,reflect:!0})],$t.prototype,"size",2),jt([a({type:String,reflect:!0})],$t.prototype,"align",2),jt([a({type:Boolean,reflect:!0})],$t.prototype,"vertical",2),jt([a({type:Boolean,reflect:!0})],$t.prototype,"noMargin",2),jt([a({type:Boolean,reflect:!0})],$t.prototype,"dashed",2),jt([a({type:Boolean,reflect:!0})],$t.prototype,"dotted",2),$t=jt([P(Eh)],$t);var Th=Object.getOwnPropertyDescriptor,Nh=(r,t,i,s)=>{for(var e=s>1?void 0:s?Th(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Ih="sonic-card-header-description";let zi=class extends x{render(){return g`<slot></slot>`}};zi.styles=[C`
3632
+ `],Yt([ht({flatten:!0})],Ot.prototype,"slotNodes",2),Yt([ie("div")],Ot.prototype,"divider",2),Yt([a({type:String})],Ot.prototype,"label",2),Yt([a({type:String,reflect:!0})],Ot.prototype,"size",2),Yt([a({type:String,reflect:!0})],Ot.prototype,"align",2),Yt([a({type:Boolean,reflect:!0})],Ot.prototype,"vertical",2),Yt([a({type:Boolean,reflect:!0})],Ot.prototype,"noMargin",2),Yt([a({type:Boolean,reflect:!0})],Ot.prototype,"dashed",2),Yt([a({type:Boolean,reflect:!0})],Ot.prototype,"dotted",2),Ot=Yt([C(cd)],Ot);var hd=Object.getOwnPropertyDescriptor,dd=(s,t,r,i)=>{for(var e=i>1?void 0:i?hd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const ud="sonic-card-header-description";let ir=class extends P{render(){return m`<slot></slot>`}};ir.styles=[$`
3633
3633
  :host() {
3634
3634
  display: block;
3635
3635
  font-size: 0.7em;
@@ -3637,16 +3637,16 @@ ${this.value}</textarea
3637
3637
  font-family: var(--sc-font-family-base, sans-serif);
3638
3638
  font-weight: var(--sc-font-style-base, normal);
3639
3639
  }
3640
- `],zi=Nh([P(Ih)],zi);var Mh=Object.defineProperty,Fh=Object.getOwnPropertyDescriptor,Ui=(r,t,i,s)=>{for(var e=s>1?void 0:s?Fh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Mh(t,i,e),e};const jh="sonic-card-header";let ms=class extends x{render(){return g`
3640
+ `],ir=dd([C(ud)],ir);var pd=Object.defineProperty,fd=Object.getOwnPropertyDescriptor,rr=(s,t,r,i)=>{for(var e=i>1?void 0:i?fd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&pd(t,r,e),e};const bd="sonic-card-header";let As=class extends P{render(){return m`
3641
3641
  <div class="header-content">
3642
- ${j(this.label)}
3643
- ${this.description?g`<sonic-card-header-description
3644
- >${j(this.description)}</sonic-card-header-description
3645
- >`:A}
3642
+ ${U(this.label)}
3643
+ ${this.description?m`<sonic-card-header-description
3644
+ >${U(this.description)}</sonic-card-header-description
3645
+ >`:D}
3646
3646
  <slot></slot>
3647
3647
  </div>
3648
3648
  <slot name="suffix"></slot>
3649
- `}};ms.styles=[C`
3649
+ `}};As.styles=[$`
3650
3650
  :host {
3651
3651
  --sc-card-header-mb: 1.35rem;
3652
3652
  --sc-card-header-font-size: 1.875rem;
@@ -3684,15 +3684,15 @@ ${this.value}</textarea
3684
3684
  ::slotted(sonic-card-header-description) {
3685
3685
  margin-top: 0.1em;
3686
3686
  }
3687
- `],Ui([a()],ms.prototype,"label",2),Ui([a()],ms.prototype,"description",2),ms=Ui([P(jh)],ms);var Rh=Object.getOwnPropertyDescriptor,zh=(r,t,i,s)=>{for(var e=s>1?void 0:s?Rh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Uh="sonic-card-main";let Vi=class extends x{render(){return g`<slot></slot>`}};Vi.styles=[C`
3687
+ `],rr([a()],As.prototype,"label",2),rr([a()],As.prototype,"description",2),As=rr([C(bd)],As);var gd=Object.getOwnPropertyDescriptor,md=(s,t,r,i)=>{for(var e=i>1?void 0:i?gd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const vd="sonic-card-main";let or=class extends P{render(){return m`<slot></slot>`}};or.styles=[$`
3688
3688
  :host {
3689
3689
  display: block;
3690
3690
  }
3691
- `],Vi=zh([P(Uh)],Vi);var Vh=Object.getOwnPropertyDescriptor,Bh=(r,t,i,s)=>{for(var e=s>1?void 0:s?Vh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const Hh="sonic-card-footer";let Bi=class extends x{render(){return g` <slot></slot> `}};Bi.styles=[C`
3691
+ `],or=md([C(vd)],or);var yd=Object.getOwnPropertyDescriptor,_d=(s,t,r,i)=>{for(var e=i>1?void 0:i?yd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const wd="sonic-card-footer";let nr=class extends P{render(){return m` <slot></slot> `}};nr.styles=[$`
3692
3692
  :host {
3693
3693
  display: block;
3694
3694
  }
3695
- `],Bi=Bh([P(Hh)],Bi);const Hi=C`
3695
+ `],nr=_d([C(wd)],nr);const ar=$`
3696
3696
  :host {
3697
3697
  --sc-_color: inherit;
3698
3698
  color: var(--sc-_color);
@@ -3717,7 +3717,7 @@ ${this.value}</textarea
3717
3717
  .inherit-color {
3718
3718
  color: var(--sc-_color);
3719
3719
  }
3720
- `,qh=C`
3720
+ `,xd=$`
3721
3721
  :host {
3722
3722
  --sc-_color: inherit;
3723
3723
  --sc-_bg: inherit;
@@ -3780,7 +3780,7 @@ ${this.value}</textarea
3780
3780
  .inherit-bg {
3781
3781
  color: inherit;
3782
3782
  }
3783
- `;var Wh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,po=(r,t,i,s)=>{for(var e=s>1?void 0:s?Kh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Wh(t,i,e),e};const Yh="sonic-card";let Gs=class extends x{constructor(){super(...arguments),this.type="base"}render(){return g`<slot></slot> `}};Gs.styles=[qh,C`
3783
+ `;var Pd=Object.defineProperty,Cd=Object.getOwnPropertyDescriptor,jo=(s,t,r,i)=>{for(var e=i>1?void 0:i?Cd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Pd(t,r,e),e};const $d="sonic-card";let ai=class extends P{constructor(){super(...arguments),this.type="base"}render(){return m`<slot></slot> `}};ai.styles=[xd,$`
3784
3784
  * {
3785
3785
  box-sizing: border-box;
3786
3786
  }
@@ -3810,7 +3810,7 @@ ${this.value}</textarea
3810
3810
  box-shadow: var(--sc-_shadow);
3811
3811
  color: var(--sc-_color);
3812
3812
  }
3813
- `],po([a({type:String,reflect:!0})],Gs.prototype,"type",2),Gs=po([P(Yh)],Gs);var Zh=Object.defineProperty,Gh=Object.getOwnPropertyDescriptor,gs=(r,t,i,s)=>{for(var e=s>1?void 0:s?Gh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Zh(t,i,e),e};const Xh="sonic-tr";let we=class extends Q(x){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>`}};we.styles=[Hi,C`
3813
+ `],jo([a({type:String,reflect:!0})],ai.prototype,"type",2),ai=jo([C($d)],ai);var Sd=Object.defineProperty,Ad=Object.getOwnPropertyDescriptor,ks=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ad(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Sd(t,r,e),e};const kd="sonic-tr";let Me=class extends et(P){constructor(){super(...arguments),this._metadata_={}}willUpdate(s){s.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(s)}render(){return m`<slot></slot>`}};Me.styles=[ar,$`
3814
3814
  :host {
3815
3815
  display: table-row;
3816
3816
  }
@@ -3828,14 +3828,14 @@ ${this.value}</textarea
3828
3828
  :host(:hover) {
3829
3829
  background: var(--sc-table-hover-bg) !important;
3830
3830
  }
3831
- `],gs([a({type:Object})],we.prototype,"_metadata_",2),gs([a({type:Boolean,reflect:!0})],we.prototype,"even",2),gs([a({type:Boolean,reflect:!0})],we.prototype,"odd",2),gs([a({type:Boolean,reflect:!0})],we.prototype,"last",2),we=gs([P(Xh)],we);var Qh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,xe=(r,t,i,s)=>{for(var e=s>1?void 0:s?Jh(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Qh(t,i,e),e};const td="sonic-th";let Ht=class extends x{render(){const r={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return g`<th
3831
+ `],ks([a({type:Object})],Me.prototype,"_metadata_",2),ks([a({type:Boolean,reflect:!0})],Me.prototype,"even",2),ks([a({type:Boolean,reflect:!0})],Me.prototype,"odd",2),ks([a({type:Boolean,reflect:!0})],Me.prototype,"last",2),Me=ks([C(kd)],Me);var Dd=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,Ie=(s,t,r,i)=>{for(var e=i>1?void 0:i?Od(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Dd(t,r,e),e};const Ed="sonic-th";let te=class extends P{render(){const s={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return m`<th
3832
3832
  part="th"
3833
- style=${pt(r)}
3834
- colspan=${$(this.colSpan)}
3835
- rowspan=${$(this.rowSpan)}
3833
+ style=${gt(s)}
3834
+ colspan=${S(this.colSpan)}
3835
+ rowspan=${S(this.rowSpan)}
3836
3836
  >
3837
3837
  <slot></slot>
3838
- </th> `}};Ht.styles=[Hi,C`
3838
+ </th> `}};te.styles=[ar,$`
3839
3839
  :host {
3840
3840
  display: contents;
3841
3841
  background: var(--sc-table-bg);
@@ -3858,9 +3858,9 @@ ${this.value}</textarea
3858
3858
  :host([noBorder]) th {
3859
3859
  border-bottom: none;
3860
3860
  }
3861
- `],xe([a({type:Number})],Ht.prototype,"colSpan",2),xe([a({type:Number})],Ht.prototype,"rowSpan",2),xe([a({type:String})],Ht.prototype,"align",2),xe([a({type:String})],Ht.prototype,"minWidth",2),xe([a({type:String})],Ht.prototype,"maxWidth",2),xe([a({type:String})],Ht.prototype,"width",2),Ht=xe([P(td)],Ht);var ed=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,ie=(r,t,i,s)=>{for(var e=s>1?void 0:s?sd(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&ed(t,i,e),e};const id="sonic-td";let Rt=class extends x{render(){const r={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return g`<td part="td" style=${pt(r)} colspan=${$(this.colSpan)} rowspan=${$(this.rowSpan)}>
3861
+ `],Ie([a({type:Number})],te.prototype,"colSpan",2),Ie([a({type:Number})],te.prototype,"rowSpan",2),Ie([a({type:String})],te.prototype,"align",2),Ie([a({type:String})],te.prototype,"minWidth",2),Ie([a({type:String})],te.prototype,"maxWidth",2),Ie([a({type:String})],te.prototype,"width",2),te=Ie([C(Ed)],te);var Ld=Object.defineProperty,Td=Object.getOwnPropertyDescriptor,ge=(s,t,r,i)=>{for(var e=i>1?void 0:i?Td(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Ld(t,r,e),e};const Md="sonic-td";let Gt=class extends P{render(){const s={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return m`<td part="td" style=${gt(s)} colspan=${S(this.colSpan)} rowspan=${S(this.rowSpan)}>
3862
3862
  <slot></slot>
3863
- </td>`}};Rt.styles=[Hi,C`
3863
+ </td>`}};Gt.styles=[ar,$`
3864
3864
  :host {
3865
3865
  display: contents;
3866
3866
  }
@@ -3873,13 +3873,13 @@ ${this.value}</textarea
3873
3873
  border-right: var(--sc-table-td-border-r, none);
3874
3874
  border-left: var(--sc-table-td-border-l, none);
3875
3875
  }
3876
- `],ie([a({type:Number})],Rt.prototype,"colSpan",2),ie([a({type:Number})],Rt.prototype,"rowSpan",2),ie([a({type:String})],Rt.prototype,"align",2),ie([a({type:String})],Rt.prototype,"vAlign",2),ie([a({type:String})],Rt.prototype,"minWidth",2),ie([a({type:String})],Rt.prototype,"maxWidth",2),ie([a({type:String})],Rt.prototype,"width",2),Rt=ie([P(id)],Rt);var rd=Object.getOwnPropertyDescriptor,od=(r,t,i,s)=>{for(var e=s>1?void 0:s?rd(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const nd="sonic-thead";let qi=class extends x{render(){return g`<slot></slot>`}};qi.styles=[C`
3876
+ `],ge([a({type:Number})],Gt.prototype,"colSpan",2),ge([a({type:Number})],Gt.prototype,"rowSpan",2),ge([a({type:String})],Gt.prototype,"align",2),ge([a({type:String})],Gt.prototype,"vAlign",2),ge([a({type:String})],Gt.prototype,"minWidth",2),ge([a({type:String})],Gt.prototype,"maxWidth",2),ge([a({type:String})],Gt.prototype,"width",2),Gt=ge([C(Md)],Gt);var Id=Object.getOwnPropertyDescriptor,Nd=(s,t,r,i)=>{for(var e=i>1?void 0:i?Id(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Fd="sonic-thead";let lr=class extends P{render(){return m`<slot></slot>`}};lr.styles=[$`
3877
3877
  :host {
3878
3878
  display: table-header-group;
3879
3879
  }
3880
- `],qi=od([P(nd)],qi);var ad=Object.getOwnPropertyDescriptor,ld=(r,t,i,s)=>{for(var e=s>1?void 0:s?ad(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const cd="sonic-tbody";let Wi=class extends x{render(){return g`<tbody part="tbody">
3880
+ `],lr=Nd([C(Fd)],lr);var jd=Object.getOwnPropertyDescriptor,Rd=(s,t,r,i)=>{for(var e=i>1?void 0:i?jd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const zd="sonic-tbody";let cr=class extends P{render(){return m`<tbody part="tbody">
3881
3881
  <slot></slot>
3882
- </tbody>`}};Wi.styles=[C`
3882
+ </tbody>`}};cr.styles=[$`
3883
3883
  :host {
3884
3884
  display: table-row-group;
3885
3885
  }
@@ -3896,29 +3896,29 @@ ${this.value}</textarea
3896
3896
  border-bottom: var(--sc-form-border-width) solid
3897
3897
  var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
3898
3898
  }
3899
- `],Wi=ld([P(cd)],Wi);var hd=Object.getOwnPropertyDescriptor,dd=(r,t,i,s)=>{for(var e=s>1?void 0:s?hd(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const ud="sonic-tfoot";let Ki=class extends x{render(){return g`<tfoot>
3899
+ `],cr=Rd([C(zd)],cr);var Ud=Object.getOwnPropertyDescriptor,Vd=(s,t,r,i)=>{for(var e=i>1?void 0:i?Ud(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Bd="sonic-tfoot";let hr=class extends P{render(){return m`<tfoot>
3900
3900
  <slot></slot>
3901
- </tfoot>`}};Ki.styles=[C`
3901
+ </tfoot>`}};hr.styles=[$`
3902
3902
  :host {
3903
3903
  display: contents;
3904
3904
  }
3905
- `],Ki=dd([P(ud)],Ki);var pd=Object.getOwnPropertyDescriptor,fd=(r,t,i,s)=>{for(var e=s>1?void 0:s?pd(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(e)||e);return e};const bd="sonic-caption";let Yi=class extends x{render(){return g`<slot></slot>`}};Yi.styles=[C`
3905
+ `],hr=Vd([C(Bd)],hr);var Hd=Object.getOwnPropertyDescriptor,qd=(s,t,r,i)=>{for(var e=i>1?void 0:i?Hd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=n(e)||e);return e};const Wd="sonic-caption";let dr=class extends P{render(){return m`<slot></slot>`}};dr.styles=[$`
3906
3906
  :host {
3907
3907
  display: table-caption;
3908
3908
  font-size: 0.75rem;
3909
3909
  color: var(--sc-table-caption-color);
3910
3910
  padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
3911
3911
  }
3912
- `],Yi=fd([P(bd)],Yi);var md=Object.defineProperty,gd=Object.getOwnPropertyDescriptor,Re=(r,t,i,s)=>{for(var e=s>1?void 0:s?gd(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&md(t,i,e),e};const vd="sonic-table";let re=class extends x{render(){const r={maxHeight:this.maxHeight};return g`
3912
+ `],dr=qd([C(Wd)],dr);var Kd=Object.defineProperty,Yd=Object.getOwnPropertyDescriptor,Ge=(s,t,r,i)=>{for(var e=i>1?void 0:i?Yd(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&Kd(t,r,e),e};const Gd="sonic-table";let me=class extends P{render(){const s={maxHeight:this.maxHeight};return m`
3913
3913
  <div
3914
3914
  class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
3915
- style=${pt(r)}
3915
+ style=${gt(s)}
3916
3916
  >
3917
3917
  <div class="table">
3918
3918
  <slot></slot>
3919
3919
  </div>
3920
3920
  </div>
3921
- `}};re.styles=[es,Lt,C`
3921
+ `}};me.styles=[ps,zt,$`
3922
3922
  :host {
3923
3923
  --sc-table-fw: var(--sc-font-weight-base, 400);
3924
3924
  --sc-table-fst: var(--sc-font-style-base, normal);
@@ -3963,7 +3963,7 @@ ${this.value}</textarea
3963
3963
  --sc-table-td-border-b: var(--sc-table-bw) solid
3964
3964
  var(--sc-table-border-color);
3965
3965
  }
3966
- `],Re([a({type:String,reflect:!0})],re.prototype,"size",2),Re([a({type:Boolean,reflect:!0})],re.prototype,"bordered",2),Re([a({type:Boolean,reflect:!0})],re.prototype,"rounded",2),Re([a({type:Boolean,reflect:!0})],re.prototype,"noCustomScroll",2),Re([a({type:String})],re.prototype,"maxHeight",2),re=Re([P(vd)],re);const fo="AES-CBC",yd=256;async function _d(){return crypto.subtle.generateKey({name:fo,length:yd},!0,["encrypt","decrypt"])}function wd(r){return btoa(String.fromCharCode(...new Uint8Array(r)))}async function xd(r,t,i){const s=new TextEncoder().encode(r),e=await crypto.subtle.encrypt({name:fo,iv:i.buffer},t,s);return wd(e)}const Pd=C`
3966
+ `],Ge([a({type:String,reflect:!0})],me.prototype,"size",2),Ge([a({type:Boolean,reflect:!0})],me.prototype,"bordered",2),Ge([a({type:Boolean,reflect:!0})],me.prototype,"rounded",2),Ge([a({type:Boolean,reflect:!0})],me.prototype,"noCustomScroll",2),Ge([a({type:String})],me.prototype,"maxHeight",2),me=Ge([C(Gd)],me);const Ro="AES-CBC",Zd=256;async function Xd(){return crypto.subtle.generateKey({name:Ro,length:Zd},!0,["encrypt","decrypt"])}function Qd(s){return btoa(String.fromCharCode(...new Uint8Array(s)))}async function Jd(s,t,r){const i=new TextEncoder().encode(s),e=await crypto.subtle.encrypt({name:Ro,iv:r.buffer},t,i);return Qd(e)}const tu=$`
3967
3967
  @keyframes altcha-spinner {
3968
3968
  to {
3969
3969
  transform: rotate(360deg);
@@ -4186,7 +4186,7 @@ ${this.value}</textarea
4186
4186
  animation: altcha-spinner 0.75s infinite linear;
4187
4187
  transform-origin: center;
4188
4188
  }
4189
- `;var Cd=Object.defineProperty,$d=Object.getOwnPropertyDescriptor,Xs=(r,t,i,s)=>{for(var e=s>1?void 0:s?$d(t,i):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(s?n(t,i,e):n(e))||e);return s&&e&&Cd(t,i,e),e};const Sd="supersoniks_altcha",Ad="Si2\\]X8M4!n9DCLd";let bo=!1;const kd="sonic-captcha";let ze=class extends Xt(x){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=r=>{r=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!bo){const r=document.createElement("script");r.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),r.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",bo=!0,document.head.appendChild(r)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=Ps(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const r=this.shadowRoot.querySelector("form");if(!r)return;const t=new FormData(r);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(t.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const r=await _d(),t=new TextEncoder().encode(Ad),i=await xd(Sd,r,t);this.key=i}render(){if(!this.key)return A;const t=Gt.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return g`
4189
+ `;var eu=Object.defineProperty,su=Object.getOwnPropertyDescriptor,li=(s,t,r,i)=>{for(var e=i>1?void 0:i?su(t,r):t,o=s.length-1,n;o>=0;o--)(n=s[o])&&(e=(i?n(t,r,e):n(e))||e);return i&&e&&eu(t,r,e),e};const iu="supersoniks_altcha",ru="Si2\\]X8M4!n9DCLd";let zo=!1;const ou="sonic-captcha";let Ze=class extends le(P){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=s=>{s=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!zo){const s=document.createElement("script");s.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),s.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",zo=!0,document.head.appendChild(s)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=Ms(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const s=this.shadowRoot.querySelector("form");if(!s)return;const t=new FormData(s);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(t.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const s=await Xd(),t=new TextEncoder().encode(ru),r=await Jd(iu,s,t);this.key=r}render(){if(!this.key)return D;const t=ae.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return m`
4190
4190
  <form>
4191
4191
  <altcha-widget
4192
4192
  challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
@@ -4198,7 +4198,7 @@ ${this.value}</textarea
4198
4198
  ></altcha-widget>
4199
4199
  </form>
4200
4200
  <slot></slot>
4201
- `}};ze.styles=[Pd,C`
4201
+ `}};Ze.styles=[tu,$`
4202
4202
  :host {
4203
4203
  --altcha-border-width: var(--sc-border-width, 1px);
4204
4204
  --altcha-border-radius: var(--sc-rounded);
@@ -4217,4 +4217,4 @@ ${this.value}</textarea
4217
4217
  --altcha-color-footer-bg: var(--sc-base-100, #000);
4218
4218
  --altcha-max-width: 260px;
4219
4219
  }
4220
- `],Xs([a()],ze.prototype,"key",2),Xs([a()],ze.prototype,"action",2),Xs([a({type:Number})],ze.prototype,"zIndex",2),ze=Xs([P(kd)],ze),window.queueMicrotask=window.queueMicrotask||function(r){Promise.resolve().then(r).catch(t=>setTimeout(()=>{throw t}))};class Dd extends ui{constructor(t){super(t),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=i=>{this.setValue(i)},this.node=t.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(t=>t()),this.cleanupWatchers=[]}normalizeInput(t){return Ur(t)?t.path:t}render(t){const i=this.normalizeInput(t),s=this.pathTemplate!==i;return s&&(this.pathTemplate=i,this.teardownWatchers()),(s||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),vt}setupSubscription(){const t=this.node,i=this.pathTemplate;if(!t||!i)return;this.teardownWatchers();const s=be(i);if(s.length>0)for(const e of s)this.cleanupWatchers.push(Me(zs.watcherStore,zs.hooked,t,e,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const t=this.node,i=this.pathTemplate;if(!i)return;const s=be(i).length>0;let e=i;if(s)if(!t)e=null;else{const o=fe(t,i);e=o.ready?o.path:null}if(e!==this.resolvedPath){if(!e){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=e,this.subscribe(e)}}subscribe(t){this.unsubscribe(),this.onAssign=i=>{this.setValue(i)},this.observables=xs(t),this.observables.forEach(i=>{i.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(t=>t.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const mo=Zt(Dd),Od=mo,Ld=mo;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:Ps,dataProvider:$o,sub:Ld,subscribe:Od,get:Co,set:So};const Ed=L,Td=T;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:Ed,SonicModal:Td};const Nd=window;Nd.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));
4220
+ `],li([a()],Ze.prototype,"key",2),li([a()],Ze.prototype,"action",2),li([a({type:Number})],Ze.prototype,"zIndex",2),Ze=li([C(ou)],Ze),window.queueMicrotask=window.queueMicrotask||function(s){Promise.resolve().then(s).catch(t=>setTimeout(()=>{throw t}))};class nu extends Ci{constructor(t){super(t),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=r=>{this.setValue(r)},this.node=t.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(t=>t()),this.cleanupWatchers=[]}normalizeInput(t){return ao(t)?t.path:t}render(t){const r=this.normalizeInput(t),i=this.pathTemplate!==r;return i&&(this.pathTemplate=r,this.teardownWatchers()),(i||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),xt}setupSubscription(){const t=this.node,r=this.pathTemplate;if(!t||!r)return;this.teardownWatchers();const i=It(r);if(i.length>0)for(const e of i)this.cleanupWatchers.push(he(Xs.watcherStore,Xs.hooked,t,e,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const t=this.node,r=this.pathTemplate;if(!r)return;const i=It(r).length>0;let e=r;if(i)if(!t)e=null;else{const o=$t(t,r);e=o.ready?o.path:null}if(e!==this.resolvedPath){if(!e){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=e,this.subscribe(e)}}subscribe(t){this.unsubscribe(),this.onAssign=r=>{this.setValue(r)},this.observables=Ls(t),this.observables.forEach(r=>{r.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(t=>t.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const Uo=oe(nu),au=Uo,lu=Uo;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:Ms,dataProvider:tn,sub:lu,subscribe:au,get:Jo,set:en};const cu=L,hu=N;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:cu,SonicModal:hu};const du=window;du.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));