@supersoniks/concorde 1.1.43 → 1.1.44
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.
- package/concorde-core.bundle.js +18 -18
- package/concorde-core.es.js +805 -739
- package/core/_types/types.d.ts +13 -8
- package/core/_types/types.js +1 -0
- package/core/components/functional/date/date.d.ts +2 -2
- package/core/components/functional/date/date.js +10 -10
- package/core/components/functional/example/example.d.ts +1 -1
- package/core/components/functional/fetch/fetch.d.ts +8 -6
- package/core/components/functional/list/list.d.ts +16 -8
- package/core/components/functional/list/list.js +25 -13
- package/core/components/functional/mix/mix.d.ts +5 -5
- package/core/components/functional/mix/mix.js +11 -8
- package/core/components/functional/queue/queue.d.ts +12 -3
- package/core/components/functional/queue/queue.js +28 -22
- package/core/components/functional/router/redirect.d.ts +2 -2
- package/core/components/functional/router/redirect.js +2 -6
- package/core/components/functional/router/router.d.ts +1 -1
- package/core/components/functional/router/router.js +10 -10
- package/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -1
- package/core/components/functional/sdui/SDUIDescriptorTransformer.js +35 -36
- package/core/components/functional/sdui/sdui-utils.js +11 -11
- package/core/components/functional/sdui/sdui.d.ts +10 -9
- package/core/components/functional/sdui/sdui.js +32 -33
- package/core/components/functional/sdui/types.d.ts +8 -8
- package/core/components/functional/states/states.d.ts +3 -3
- package/core/components/functional/states/states.js +8 -8
- package/core/components/functional/submit/submit.d.ts +1 -1
- package/core/components/functional/submit/submit.js +16 -16
- package/core/components/functional/subscriber/subscriber.d.ts +1 -1
- package/core/components/functional/value/value.d.ts +1 -1
- package/core/components/ui/_css/size.d.ts +1 -1
- package/core/components/ui/button/button.d.ts +6 -4
- package/core/components/ui/button/button.js +2 -2
- package/core/components/ui/captcha/captcha.d.ts +2 -2
- package/core/components/ui/captcha/captcha.js +2 -2
- package/core/components/ui/card/card-header.js +5 -1
- package/core/components/ui/card/card.js +7 -5
- package/core/components/ui/form/checkbox/checkbox.d.ts +36 -12
- package/core/components/ui/form/fieldset/fieldset.d.ts +1 -1
- package/core/components/ui/form/form-layout/form-layout.d.ts +1 -1
- package/core/components/ui/form/input/input.d.ts +14 -9
- package/core/components/ui/form/input/input.js +2 -2
- package/core/components/ui/form/input/password-helper.d.ts +1 -1
- package/core/components/ui/form/input/password-helper.js +1 -1
- package/core/components/ui/form/input/same-value-helper.d.ts +1 -1
- package/core/components/ui/form/input/same-value-helper.js +2 -2
- package/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +1 -1
- package/core/components/ui/form/select/select.d.ts +5 -4
- package/core/components/ui/form/select/select.js +8 -8
- package/core/components/ui/form/textarea/textarea.d.ts +11 -9
- package/core/components/ui/form/textarea/textarea.js +1 -1
- package/core/components/ui/group/group.js +1 -1
- package/core/components/ui/icon/icons.js +15 -13
- package/core/components/ui/loader/loader.d.ts +1 -1
- package/core/components/ui/loader/loader.js +1 -1
- package/core/components/ui/menu/menu.js +15 -16
- package/core/components/ui/modal/modal.d.ts +1 -1
- package/core/components/ui/modal/modal.js +1 -1
- package/core/components/ui/pop/pop.d.ts +1 -1
- package/core/components/ui/pop/pop.js +13 -13
- package/core/components/ui/table/table-tbody.js +1 -1
- package/core/components/ui/theme/theme.js +15 -13
- package/core/components/ui/toast/message-subscriber.d.ts +12 -9
- package/core/components/ui/toast/message-subscriber.js +10 -8
- package/core/components/ui/toast/toast.d.ts +1 -1
- package/core/components/ui/toast/toast.js +7 -8
- package/core/components/ui/toast/types.d.ts +3 -2
- package/core/components/ui/tooltip/tooltip.js +1 -1
- package/core/components/ui/ui.d.ts +1 -1
- package/core/components/ui/ui.js +1 -1
- package/core/mixins/Fetcher.d.ts +15 -17
- package/core/mixins/Fetcher.js +19 -10
- package/core/mixins/FormCheckable.d.ts +8 -5
- package/core/mixins/FormCheckable.js +21 -19
- package/core/mixins/FormElement.d.ts +10 -7
- package/core/mixins/FormElement.js +24 -23
- package/core/mixins/FormInput.d.ts +16 -10
- package/core/mixins/FormInput.js +1 -1
- package/core/mixins/Subscriber.d.ts +8 -6
- package/core/mixins/Subscriber.js +19 -18
- package/core/mixins/TemplatesContainer.d.ts +2 -1
- package/core/mixins/TemplatesContainer.js +2 -2
- package/core/utils/Arrays.js +12 -9
- package/core/utils/DataBindObserver.d.ts +4 -4
- package/core/utils/DataBindObserver.js +26 -28
- package/core/utils/HTML.d.ts +1 -1
- package/core/utils/HTML.js +2 -2
- package/core/utils/LocationHandler.js +10 -10
- package/core/utils/Objects.js +10 -4
- package/core/utils/PublisherProxy.d.ts +21 -15
- package/core/utils/PublisherProxy.js +67 -63
- package/core/utils/api.d.ts +16 -31
- package/core/utils/api.js +26 -22
- package/mixins.d.ts +25 -19
- package/package.json +9 -5
- package/core/components/ui/taxonomy/taxonomy.d.ts +0 -44
- package/core/components/ui/taxonomy/taxonomy.js +0 -115
package/concorde-core.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(t,e,s)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,__spreadValues=(t,e)=>{for(var s in e||(e={}))__hasOwnProp.call(e,s)&&__defNormalProp(t,s,e[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(e))__propIsEnum.call(e,s)&&__defNormalProp(t,s,e[s]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e));!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){var t;class e{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce(((t,e)=>{const s=e.indexOf("=");return t[e.substring(0,s).trim()]=e.substring(s+1),t}),{})}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t)||!t.hasAttribute(e);){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return"hasAttribute"in t?t.getAttribute(e):null}static getClosestForm(t){for(;!t.nodeName||"form"!==t.nodeName.toLowerCase();){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return t.nodeName?t:null}static async loadJS(t){return new Promise((async e=>{let s=document.createElement("script");s.src=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}static async loadCSS(t){return new Promise((async e=>{var s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}}class s{static shallowEqual(t,e,s=!0){const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length&&s)return!1;for(let o of i){const i=t[o],r=e[o];if(s?i!==r:i!=r)return!1}return!0}static deepEqual(t,e,i=!0){const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length&&i)return!1;for(const n of r){const r=t[n],o=e[n],a=s.isObject(r)&&s.isObject(o),l=i?r!==o:r!=o;if(a&&!s.deepEqual(r,o)||!a&&l)return!1}return!0}static isObject(t){return null!=t&&"object"==typeof t}static isUndefindOrNull(t){return null==t}static traverse(t,e,i=!1){for(let r of e){let e=t[r];if(void 0===e)return;t=i&&s.isObject(e)?Object.assign(Array.isArray(e)?[]:{},t,e):t[r]}return t}static getURLSearchArray(t,e=""){let i=[];for(let r in t){let o=t[r];e&&(r=e+"["+r+"]"),s.isObject(o)?i=[...i,...this.getURLSearchArray(o,r)]:i.push(`${r}=${o}`)}return i}static getURLSearchString(t){return s.getURLSearchArray(t,"").join("&")}}const i=class{constructor(t){this.addHTTPResponse=!1,this.serviceURL=t.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,this.token=t.token,this.tokenProvider=t.tokenProvider,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials}async handleResult(t){var e;this.lastResult=t;const i=null==(e=t.headers.get("content-type"))?void 0:e.toLowerCase();let r={};if(i&&0==i.indexOf("text/")){r={text:await t.text()}}else try{r=await t.json()}catch(o){r={}}return this.addHTTPResponse&&s.isObject(r)&&(r._sonic_http_response_=t),r}async auth(){if(this.token)return;if(i.tokens.has(this.serviceURL))return void(this.token=i.tokens.get(this.serviceURL));if(!this.userName||!this.password||!this.tokenProvider)return;let t={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},e=await fetch(this.computeURL(this.tokenProvider),{headers:t,credentials:this.credentials});try{let t=await e.json();this.token=t.token,i.tokens.set(this.serviceURL,this.token)}catch(s){}}async get(t,e){let s=await this.createHeaders(e);const r=this.computeURL(t);if(!i.loadingGetPromises.has(r)){let t=new Promise((async t=>{let e=await fetch(r,{headers:s,credentials:this.credentials});t(await this.handleResult(e))}));i.loadingGetPromises.set(r,t)}let o=await i.loadingGetPromises.get(r);return i.loadingGetPromises.delete(r),o}async createHeaders(t){await this.auth();let s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=e.getLanguage(),t&&Object.assign(s,t),s}computeURL(t){return(this.serviceURL+"/"+t).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(t,e,s="POST",i){let r=await this.createHeaders(i);r.Accept="application/json",r["Content-Type"]="application/json";let o=await fetch(this.computeURL(t),{headers:r,credentials:this.credentials,method:s,body:JSON.stringify(e)});return await this.handleResult(o)}async submitFormData(t,e,s="POST",i){let r=await this.createHeaders(i);r.Accept="application/json";let o=new FormData;const n=e;for(let l in n)o.set(l,n[l]);let a=await fetch(this.computeURL(t),{headers:r,credentials:this.credentials,method:s,body:o});return await this.handleResult(a)}async put(t,e,s){return this.send(t,e,"PUT",s)}async post(t,e,s){return this.send(t,e,"POST",s)}async delete(t,e,s){return this.send(t,e,"delete",s)}};let r=i;r.loadingGetPromises=new Map,r.tokens=new Map;class o{static ucFirst(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.substring(1)}static js(t){try{return Function("return "+t)()}catch(e){return""}}}function n(t){return"object"==typeof t&&null!=t}class a{constructor(t,e){for(this._proxies_=new Map,this._key_="",this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.root=this,this._value_=t,this.parent=e||null;this.root.parent;)this.root=this.root.parent}delete(){for(let t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){this._mutationListeners_.forEach((t=>t())),t||this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(t=!1){this._assignListeners_.forEach((t=>t(this.get()))),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach((t=>t()))}_publishDynamicFilling_(t,e){this._fillListeners_.forEach((s=>{s[t]!==e&&(s[t]=e)})),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach((s=>{let i=Object.getOwnPropertyDescriptor(s,t);(!i||i.set||i.writable)&&(s.propertyMap&&s.propertyMap[t]&&(t=s.propertyMap[t]),void 0!==s[t]&&s[t]!==e&&(s[t]=e))}))}onAssign(t){"function"==typeof t&&(this._assignListeners_.add(t),t(this.get()))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){"function"==typeof t&&this._invalidateListeners_.add(t)}offInvalidate(t){"function"==typeof t&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){"function"==typeof t&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){"function"==typeof t&&this._mutationListeners_.delete(t)}startTemplateFilling(t){for(var e in this._templateFillListeners_.add(t),this._value_){const s=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(e=t.propertyMap[e]),void 0!==t[e]&&t[e]!==s&&(t[e]=s)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){for(var e in this._fillListeners_.add(t),this._value_){const s=this._value_[e];t[e]!==s&&(t[e]=s)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,e=!1){var s;if(this._value_===t)return!0;if("hasOwnProperty"in this._value_&&this._value_.hasOwnProperty("__value")&&t.hasOwnProperty("__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;this._value_=n(t)?t:{__value:t};if(this._value_.hasOwnProperty("__value"))return this._publishAssignement_(e),!0;for(let r in this._value_)void 0===this._value_[r]&&delete this._value_[r];if(Array.from(this._proxies_.keys()).forEach((t=>{if(void 0===this._value_[t]&&this._proxies_.has(t)){const e=this._proxies_.get(t);(null==e?void 0:e.hasListener())?"_parent_"!=t&&i[t]&&(this._value_[t]=null):this._proxies_.delete(t)}})),this._publishAssignement_(),n(this._value_))for(let r in this._value_){let e=t[r],i=n(e)?e:{__value:e};if(!this._proxies_.has(r)){let t=new h({},this);this._proxies_.set(r,t),t._proxies_.set("_parent_",this)}null==(s=this._proxies_.get(r))||s.set(i,!0),this._publishDynamicFilling_(r,e)}return!0}get(){if(this._value_.hasOwnProperty("__value")){let t=this._value_.__value;return null!=t?t:null}return this._value_}}const l=class{constructor(){if(this.publishers=new Map,null!=l.instance)throw"Singleton / use getInstance";l.instance=this}static getInstance(){return null==l.instance?new l:l.instance}static get(t){return l.getInstance().get(t)}static delete(t){return l.getInstance().delete(t)}get(t){return this.publishers.has(t)||this.publishers.set(t,new h({})),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return!!this.publishers.has(t)&&(this.publishers.delete(t),!0)}};let c=l;c.instance=null;class h extends a{constructor(t,e=null){super(t,e);let s=this,i=new Proxy(this,{get:function(t,e){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(e))return s[e];if(!s._proxies_.has(e)){let t=s._value_[e],r=new h(n(t)?t:{__value:t},s);r._proxies_.set("_parent_",i),s._proxies_.set(e,r)}return s._proxies_.get(e)},set:function(t,e,r){var o;if("_value_"==e)return t._value_=r,t._value_;if(!s._proxies_.has(e)){let t=new h({},s);t._proxies_.set("_parent_",i),s._proxies_.set(e,t)}return s._value_[e]!==r&&(s._value_[e]=r,s._publishDynamicFilling_(e,r),null==(o=s._proxies_.get(e))||o.set(n(r)?r:{__value:r})),s._proxies_.get(e)},deleteProperty:function(t,e){return s._publishDynamicFilling_(e,null),s._proxies_.delete(e),delete s._value_[e]},has:function(t,e){return e in s._value_&&"_lockInternalMutationPublishing_"!=e},defineProperty:function(t,e,i){return i&&"value"in i&&(s._value_[e]=i.value),s._value_},getOwnPropertyDescriptor:function(t,e){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return s._value_.__value?Object.keys(s._value_.__value):Object.keys(s._value_)}});return i}getProperty(t,e){return t[e]}}"undefined"!=typeof module&&(module.exports={Publisher:h,PublisherManager:c});const d=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(d.observedElements.keys()).forEach((t=>d.unObserve(t))))}static observe(t){if(!t)return;if(!d.enabled)return;if(d.observedElements.has(t))return;let e=new MutationObserver(d.onMutation),s={childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-bind"]};e.observe(t,s),t.querySelectorAll("[data-bind]").forEach((t=>d.addPublisherListeners(t))),d.observedElements.set(t,e)}static unObserve(t){if(!t)return;let e=this.observedElements.get(t);e&&(e.disconnect(),t.querySelectorAll("[data-bind]").forEach((t=>d.removePublisherListeners(t))))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&d.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach((t=>d.addPublisherListeners(t))):t.childNodes.forEach((t=>d.onAdded(t)))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&d.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach((t=>d.removePublisherListeners(t))):t.childNodes.forEach((t=>d.onRemoved(t)))}static onMutation(t){for(let i of t)switch(i.type){case"attributes":d.addPublisherListeners(i.target);break;case"childList":var e=i.addedNodes,s=i.removedNodes;e.forEach((t=>{d.onAdded(t)})),s.forEach((t=>{d.onRemoved(t)}))}}static removePublisherListeners(t){let e=d.publisherListeners.get(t);e&&(d.publisherListeners.delete(t),e.forEach((t=>{var e;null==(e=t.publisher)||e.offAssign(t.onAssign)})))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e=e?e.map((t=>t.replace("$",""))):[t],e=e.filter((t=>t.length>0)),{expression:t.replace("\\",""),variables:e.map((t=>t.split(/\b\.\b/).map((t=>t.replace("\\","")))))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter((t=>0==t.name.indexOf("::"))).map((t=>({propertyToUpdate:t.name.substring(2).replace(/\-((html)|\w)/g,(t=>t.substring(1).toUpperCase())),bindedVariablesDescriptor:d.getVariablesDescriptor(t.value)}))):[]}static getSubPublisher(t,e){if(!e)return t;for(let s of e)if("_self_"!=s){if(!t)return null;t=t[s]}return t}static addPublisherListeners(t){d.removePublisherListeners(t);let s=e.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;let i=c.getInstance().get(s),r=d.getDataBindItems(t),n=[];r.forEach((e=>{let s=e.bindedVariablesDescriptor,r=e.propertyToUpdate;for(let a of s.variables){let e=a,l=i;l=d.getSubPublisher(i,e);let c=t,h={publisher:l,onAssign:()=>{let t=s.variables.map((t=>{var e;return null==(e=d.getSubPublisher(i,t))?void 0:e.get()})),e=s.expression,n=!1;if(1==t.length&&s.variables[0].join(".")==e.substring(1)){let e=t[0];return null===e&&(e=""),void(c[r]=e)}for(let i=0;i<t.length;i++){let r=t[i],o=s.variables[i];null===r&&(n=!0,r=void 0),e=e.replace("$"+o.join("."),r)}if(-1!=e.indexOf("|")){let t=e.indexOf("|");if(0==t)e=o.js(e.substring(1));else{let s=e.substring(0,t),i=e.substring(t+1),r=o[s];e=n?"":r?r(i):e}}else e=n?"":e;c[r]=e}};null==l||l.onAssign(h.onAssign),n.push(h)}})),d.publisherListeners.set(t,n)}};let p=d;p.observedElements=new Map,p.enabled=!0,p.publisherListeners=new Map,p.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=p)
|
|
1
|
+
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){var t;class e{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce(((t,e)=>{const s=e.indexOf("=");return t[e.substring(0,s).trim()]=e.substring(s+1),t}),{})}static getAncestorAttributeValue(t,e){if(!t)return null;for(;!("hasAttribute"in t)||!t.hasAttribute(e);){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return"hasAttribute"in t?t.getAttribute(e):null}static getClosestForm(t){for(;!t.nodeName||"form"!==t.nodeName.toLowerCase();){if(!(t.parentNode||t.host))break;t=t.parentNode||t.host}return t.nodeName?t:null}static async loadJS(t){return new Promise((async e=>{const s=document.createElement("script");s.src=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}static async loadCSS(t){return new Promise((async e=>{const s=document.createElement("link");s.type="text/css",s.rel="stylesheet",s.href=t,s.onload=()=>e(!0),s.onerror=()=>e(!0),document.head.appendChild(s)}))}}class s{static shallowEqual(t,e,s=!0){const i=Object.keys(t),r=Object.keys(e);if(i.length!==r.length&&s)return!1;for(const o of i){const i=t[o],r=e[o];if(s?i!==r:i!=r)return!1}return!0}static deepEqual(t,e,i=!0){const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length&&i)return!1;for(const n of r){const r=t[n],o=e[n],a=s.isObject(r)&&s.isObject(o),l=i?r!==o:r!=o;if(a&&!s.deepEqual(r,o)||!a&&l)return!1}return!0}static isObject(t){return null!=t&&"object"==typeof t}static isUndefindOrNull(t){return null==t}static traverse(t,e,i=!1){for(const r of e){const e=t[r];if(void 0===e)return;t=i&&s.isObject(e)?Object.assign(Array.isArray(e)?[]:{},t,e):t[r]}return t}static getURLSearchArray(t,e=""){let i=[];for(let r in t){const o=t[r];e&&(r=e+"["+r+"]"),s.isObject(o)?i=[...i,...this.getURLSearchArray(o,r)]:i.push(`${r}=${o}`)}return i}static getURLSearchString(t){return s.getURLSearchArray(t,"").join("&")}}const i=class{constructor(t){this.addHTTPResponse=!1,this.serviceURL=t.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=t.userName,this.password=t.password,this.token=t.token,this.tokenProvider=t.tokenProvider,this.addHTTPResponse=t.addHTTPResponse||!1,this.credentials=t.credentials}async handleResult(t){var e;this.lastResult=t;const i=null==(e=null==t?void 0:t.headers.get("content-type"))?void 0:e.toLowerCase();let r={};if(i&&0==i.indexOf("text/")){r={text:await(null==t?void 0:t.text())}}else try{r=await(null==t?void 0:t.json())}catch(o){r={}}return this.addHTTPResponse&&s.isObject(r)&&(r._sonic_http_response_=t),r}async auth(){if(this.token)return;if(i.tokens.has(this.serviceURL))return void(this.token=i.tokens.get(this.serviceURL));if(!this.userName||!this.password||!this.tokenProvider)return;const t={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},e=await fetch(this.computeURL(this.tokenProvider),{headers:t,credentials:this.credentials});try{const t=await e.json();this.token=t.token,i.tokens.set(this.serviceURL,this.token)}catch(s){console.log("Problème au moment du parsing du json au retour de l'authentification")}}async get(t,e){const s=await this.createHeaders(e),r=this.computeURL(t);if(!i.loadingGetPromises.has(r)){const t=new Promise((async t=>{const e=await fetch(r,{headers:s,credentials:this.credentials});t(await this.handleResult(e))}));i.loadingGetPromises.set(r,t)}const o=await i.loadingGetPromises.get(r);return i.loadingGetPromises.delete(r),o}async createHeaders(t){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=e.getLanguage(),t&&Object.assign(s,t),s}computeURL(t){return(this.serviceURL+"/"+t).replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(t,e,s="POST",i){const r=await this.createHeaders(i);r.Accept="application/json",r["Content-Type"]="application/json";const o=await fetch(this.computeURL(t),{headers:r,credentials:this.credentials,method:s,body:JSON.stringify(e)});return await this.handleResult(o)}async submitFormData(t,e,s="POST",i){const r=await this.createHeaders(i);r.Accept="application/json";const o=new FormData,n=e;for(const l in n)o.set(l,n[l]);const a=await fetch(this.computeURL(t),{headers:r,credentials:this.credentials,method:s,body:o});return await this.handleResult(a)}async put(t,e,s){return this.send(t,e,"PUT",s)}async post(t,e,s){return this.send(t,e,"POST",s)}async delete(t,e,s){return this.send(t,e,"delete",s)}};let r=i;r.loadingGetPromises=new Map,r.tokens=new Map;class o{static ucFirst(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.substring(1)}static js(t){try{return Function("return "+t)()}catch(e){return""}}}function n(t){return"object"==typeof t&&null!=t}class a{constructor(t,e){for(this._proxies_=new Map,this._key_="",this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._value_=t,this.parent=e||null,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(const t of this._proxies_.values())t.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){this._mutationListeners_.forEach((t=>t())),t||this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(t=!1){this._assignListeners_.forEach((t=>t(this.get()))),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach((t=>t()))}_publishDynamicFilling_(t,e){this._fillListeners_.forEach((s=>{s[t]!==e&&(s[t]=e)})),this._publishTemplateFilling_(t,e)}_publishTemplateFilling_(t,e){this._templateFillListeners_.forEach((s=>{const i=Object.getOwnPropertyDescriptor(s,t);(!i||i.set||i.writable)&&(s.propertyMap&&s.propertyMap[t]&&(t=s.propertyMap[t]),void 0!==s[t]&&s[t]!==e&&(s[t]=e))}))}onAssign(t){"function"==typeof t&&(this._assignListeners_.add(t),t(this.get()))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){"function"==typeof t&&this._invalidateListeners_.add(t)}offInvalidate(t){"function"==typeof t&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){"function"==typeof t&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){"function"==typeof t&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),"object"==typeof this._value_)for(const e in this._value_){let s=e;const i=this._value_[e];t.propertyMap&&t.propertyMap[e]&&(s=t.propertyMap[e]),void 0!==t[e]&&t[e]!==i&&(t[s]=i)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const e in this._value_){const s=this._value_[e];t[e]!==s&&(t[e]=s)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,e=!1){var s;if(this._value_===t)return!0;if(this._value_&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;this._value_=n(t)?t:{__value:t};if(Object.prototype.hasOwnProperty.call(this._value_,"__value"))return this._publishAssignement_(e),!0;for(const r in this._value_)void 0===this._value_[r]&&delete this._value_[r];if(Array.from(this._proxies_.keys()).forEach((t=>{if(void 0===this._value_[t]&&this._proxies_.has(t)){const e=this._proxies_.get(t);(null==e?void 0:e.hasListener())?"_parent_"!=t&&i[t]&&(this._value_[t]=null):this._proxies_.delete(t)}})),this._publishAssignement_(),n(this._value_))for(const r in this._value_){const e=t[r],i=n(e)?e:{__value:e};if(!this._proxies_.has(r)){const t=new h({},this);this._proxies_.set(r,t),t._proxies_.set("_parent_",this)}null==(s=this._proxies_.get(r))||s.set(i,!0),this._publishDynamicFilling_(r,e)}return!0}get(){if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return null!=t?t:null}return this._value_}}const l=class{constructor(){if(this.publishers=new Map,null!=l.instance)throw"Singleton / use getInstance";l.instance=this}static getInstance(){return null==l.instance?new l:l.instance}static get(t){return l.getInstance().get(t)}static delete(t){return l.getInstance().delete(t)}get(t){return this.publishers.has(t)||this.publishers.set(t,new h({})),this.publishers.get(t)}set(t,e){this.publishers.set(t,e)}delete(t){return!!this.publishers.has(t)&&(this.publishers.delete(t),!0)}};let c=l;c.instance=null;class h extends a{constructor(t,e=null){super(t,e);const s=new Proxy(this,{get:function(t,e){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(e))return t[e];if(!t._proxies_.has(e)){const i=t._value_[e],r=new h(n(i)?i:{__value:i},t);r._proxies_.set("_parent_",s),t._proxies_.set(e,r)}return t._proxies_.get(e)},set:function(t,e,i){var r;if("_value_"==e)return t._value_=i,!0;if(!t._proxies_.has(e)){const i=new h({},t);i._proxies_.set("_parent_",s),t._proxies_.set(e,i)}return t._value_[e]!==i&&(t._value_[e]=i,t._publishDynamicFilling_(e,i),null==(r=t._proxies_.get(e))||r.set(n(i)?i:{__value:i})),!0},deleteProperty:function(t,e){return t._publishDynamicFilling_(e,null),t._proxies_.delete(e),delete t._value_[e]},has:function(t,e){return e in t._value_&&"_lockInternalMutationPublishing_"!=e},defineProperty:function(t,e,s){return s&&"value"in s&&(t._value_[e]=s.value),!0},getOwnPropertyDescriptor:function(t,e){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}});return s}getProperty(t,e){return t[e]}}"undefined"!=typeof module&&(module.exports={Publisher:h,PublisherManager:c});const d=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(d.observedElements.keys()).forEach((t=>d.unObserve(t))))}static observe(t){if(!t)return;if(!d.enabled)return;if(d.observedElements.has(t))return;const e=new MutationObserver(d.onMutation),s={childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-bind"]};e.observe(t,s),t.querySelectorAll("[data-bind]").forEach((t=>d.addPublisherListeners(t))),d.observedElements.set(t,e)}static unObserve(t){if(!t)return;const e=this.observedElements.get(t);e&&(e.disconnect(),t.querySelectorAll("[data-bind]").forEach((t=>d.removePublisherListeners(t))))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&d.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach((t=>d.addPublisherListeners(t))):t.childNodes.forEach((t=>d.onAdded(t)))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&d.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach((t=>d.removePublisherListeners(t))):t.childNodes.forEach((t=>d.onRemoved(t)))}static onMutation(t){for(const e of t)switch(e.type){case"attributes":d.addPublisherListeners(e.target);break;case"childList":e.addedNodes.forEach((t=>{d.onAdded(t)})),e.removedNodes.forEach((t=>{d.onRemoved(t)}))}}static removePublisherListeners(t){const e=d.publisherListeners.get(t);e&&(d.publisherListeners.delete(t),e.forEach((t=>{var e;null==(e=t.publisher)||e.offAssign(t.onAssign)})))}static getVariablesDescriptor(t){let e=t.match(/(\$(?:\w+\\?\.?)+)/g);return e=e?e.map((t=>t.replace("$",""))):[t],e=e.filter((t=>t.length>0)),{expression:t.replace("\\",""),variables:e.map((t=>t.split(/\b\.\b/).map((t=>t.replace("\\","")))))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter((t=>0==t.name.indexOf("::"))).map((t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,(t=>t.substring(1).toUpperCase())),bindedVariablesDescriptor:d.getVariablesDescriptor(t.value)}))):[]}static getSubPublisher(t,e){if(!e)return t;for(const s of e)if("_self_"!=s){if(!t)return null;t=t[s]}return t}static addPublisherListeners(t){d.removePublisherListeners(t);const s=e.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=c.getInstance().get(s),r=d.getDataBindItems(t),n=[];r.forEach((e=>{const s=e.bindedVariablesDescriptor,r=e.propertyToUpdate;for(const a of s.variables){const e=a;let l=i;l=d.getSubPublisher(i,e);const c=t,h={publisher:l,onAssign:()=>{const t=s.variables.map((t=>{var e;return null==(e=d.getSubPublisher(i,t))?void 0:e.get()}));let e=s.expression,n=!1;if(1==t.length&&s.variables[0].join(".")==e.substring(1)){let e=t[0];return null===e&&(e=""),void(c[r]=e)}for(let i=0;i<t.length;i++){let r=t[i];const o=s.variables[i];null===r&&(n=!0,r=void 0),e=e.replace("$"+o.join("."),r)}if(-1!=e.indexOf("|")){const t=e.indexOf("|");if(0==t)e=o.js(e.substring(1));else{const s=e.substring(0,t),i=e.substring(t+1),r=o[s];e=n?"":r?r(i):e}}else e=n?"":e;c[r]=e}};null==l||l.onAssign(h.onAssign),n.push(h)}})),d.publisherListeners.set(t,n)}};let p=d;p.observedElements=new Map,p.enabled=!0,p.publisherListeners=new Map,p.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=p)
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
@@ -8,17 +8,17 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/var s,i},g=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?
|
|
11
|
+
*/var s,i},g=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(s){s.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(s){s.createProperty(e.key,t)}};function b(t){return(e,s)=>{return void 0!==s?(i=t,r=s,void e.constructor.createProperty(r,i)):g(t,e);var i,r}}
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
-
*/function
|
|
16
|
+
*/function m(t){return b({...t,state:!0})}
|
|
17
17
|
/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/const f=({finisher:t,descriptor:e})=>(s,i)=>{var r;if(void 0===i){const i=null!==(r=s.originalKey)&&void 0!==r?r:s.key,o=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(s.key)}:
|
|
21
|
+
*/const f=({finisher:t,descriptor:e})=>(s,i)=>{var r;if(void 0===i){const i=null!==(r=s.originalKey)&&void 0!==r?r:s.key,o=null!=e?{kind:"method",placement:"prototype",key:i,descriptor:e(s.key)}:{...s,key:i};return null!=t&&(o.finisher=function(e){t(e,i)}),o}{const r=s.constructor;void 0!==e&&Object.defineProperty(s,i,e(i)),null==t||t(r,i)}}
|
|
22
22
|
/**
|
|
23
23
|
* @license
|
|
24
24
|
* Copyright 2017 Google LLC
|
|
@@ -28,12 +28,12 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2021 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/var y;const w=null!=(null===(y=window.HTMLSlotElement)||void 0===y?void 0:y.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function
|
|
31
|
+
*/var y;const w=null!=(null===(y=window.HTMLSlotElement)||void 0===y?void 0:y.prototype.assignedElements)?(t,e)=>t.assignedElements(e):(t,e)=>t.assignedNodes(e).filter((t=>t.nodeType===Node.ELEMENT_NODE));function x(t){const{slot:e,selector:s}=null!=t?t:{};return f({descriptor:i=>({get(){var i;const r="slot"+(e?`[name=${e}]`:":not([name])"),o=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(r),n=null!=o?w(o,t):[];return s?n.filter((t=>t.matches(s))):n},enumerable:!0,configurable:!0})})}
|
|
32
32
|
/**
|
|
33
33
|
* @license
|
|
34
34
|
* Copyright 2017 Google LLC
|
|
35
35
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
36
|
-
*/function
|
|
36
|
+
*/function _(t,e,s){let i,r=t;return"object"==typeof t?(r=t.slot,i=t):i={flatten:e},s?x({slot:r,flatten:e,selector:s}):f({descriptor:t=>({get(){var t,e;const s="slot"+(r?`[name=${r}]`:":not([name])"),o=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(s);return null!==(e=null==o?void 0:o.assignedNodes(i))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}var k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,P=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?A(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&k(e,s,o),o};let C=!1,$=new Set;const S=(t,i)=>{const o=class extends t{constructor(...t){super(),this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=t=>{this.props=t}}hasAncestorAttribute(t){return null!=this.getAncestorAttributeValue(t)}getAncestorAttributeValue(t){return e.getAncestorAttributeValue(this,t)}get props(){return null===this._props&&this.publisher?this.publisher.get():this._props}set props(t){"string"==typeof t&&["{","["].includes(t.trim().charAt(0))&&(t=JSON.parse(t)),t!=this._props&&(this._props=t,this.publisher&&this.publisher.get()!=t&&this.publisher.set(t),this.requestUpdate())}updated(t){super.updated(t);const e=[...(this.shadowRoot||this).children].filter((t=>"STYLE"!=t.tagName));let s=this.displayContents?"contents":0==e.length?"none":null;s?this.style.display=s:this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){const t={root:null,rootMargin:Math.max(.1*window.innerWidth,.1*window.innerHeight)+"px"};let e=!0;new IntersectionObserver((t=>{for(const s of t)e&&s.isIntersecting&&(e=!1,this.initWording(),this.initPublisher())}),t).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),o.instanceCounter++}disconnectedCallback(){var t;this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&(null==(t=this.publisher)||t.offAssign(this.onAssign))}addDebugger(){var t;if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const t=this.debug.style;t.position="fixed",t.top="0",t.right="0",t.margin="auto",t.borderRadius=".7rem",t.backgroundColor="#0f1729",t.color="#c5d4f9",t.padding="16px 16px",t.margin="16px 16px",t.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",t.overflowY="auto",t.zIndex="99999999",t.maxHeight="calc(100vh - 32px)",t.fontFamily="Consolas, monospace",t.maxWidth="min(50vw,25rem)",t.fontSize="12px",t.minWidth="300px",t.overflowWrap="break-word",t.resize="vertical"}this.addEventListener("click",(t=>{t.ctrlKey&&(t.preventDefault(),C=!C)})),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",(()=>{C||this.removeDebugger(),document.body.appendChild(this.debug),$.add(this.debug)})),this.addEventListener("mouseout",(()=>{C||this.removeDebugger()})),null==(t=this.publisher)||t.onInternalMutation((()=>{var t;this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : épingler / désépingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(null==(t=this.publisher)?void 0:t.get(),null," ")}</pre>`}))}}removeDebugger(){$.forEach((t=>{document.body.contains(t)&&document.body.removeChild(t)})),$=new Set}getApiConfiguration(){const t=this.getAncestorAttributeValue("token"),e=null!=this.getAncestorAttributeValue("addHTTPResponse"),s=this.getAncestorAttributeValue("serviceURL");let i=null,r=null,o=null;t||(i=this.getAncestorAttributeValue("userName"),r=this.getAncestorAttributeValue("password"),o=this.getAncestorAttributeValue("tokenProvider"));return{serviceURL:s,token:t,userName:i,password:r,tokenProvider:o,addHTTPResponse:e,credentials:this.getAncestorAttributeValue("credentials")||void 0}}async initWording(){let t=!1;const e=Object.getOwnPropertyNames(this.constructor.prototype);for(const r of e)if(0==r.indexOf("wording_")){t=!0;break}if(!t)return;const s=c.getInstance().get("sonic-wording"),i=this.getAncestorAttributeValue("wordingProvider"),o=new r(this.getApiConfiguration());if(i){const t=[];for(const i of e)if(0==i.indexOf("wording_")){const e=i.substring(8);s.get()[i]||(s[i]="...",t.push(e))}if(t.length>0){const e=await o.post(i,{labels:t});for(const t in e)s["wording_"+t]=e[t]}s.startTemplateFilling(this),this.wordingPublisher=s}}createRenderRoot(){if(""===this.noShadowDom||""===this.getAttribute("noShadowDom"))return this;const t=super.createRenderRoot();return p.observe(t),t}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const t=c.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let e=this.dataProvider;if(!e&&this._props&&(this.dataProvider=e="__subscriber__"+o.instanceCounter),e){this.bindPublisher&&t.set(e,this.bindPublisher());let i=t.get(e);if(this.dataProvider=e,this.hasAttribute("subDataProvider")){const r=this.getAttribute("subDataProvider");this.dataProvider=e+"/"+r,i=s.traverse(i,r.split(".")),t.set(this.dataProvider,i),this.publisher=i}this.publisher=i}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}};let n=o;return n.instanceCounter=0,P([b({type:Boolean})],n.prototype,"displayContents",2),P([b({type:Boolean})],n.prototype,"noAutoFill",2),P([b({type:Boolean})],n.prototype,"forceAutoFill",2),P([b({type:Object})],n.prototype,"propertyMap",2),P([b({type:String,attribute:"data-title"})],n.prototype,"title",2),P([b({reflect:!0})],n.prototype,"dataProvider",2),P([b()],n.prototype,"bindPublisher",2),P([b()],n.prototype,"props",1),n};window.SonicPublisherManager||(window.SonicPublisherManager=c);var O=Object.defineProperty,D=Object.getOwnPropertyDescriptor;const j=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const t=this.templates||[...this.querySelectorAll("template")];for(const e of t)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e));this.templateList=t.filter((t=>!t.getAttribute("data-value"))),0==this.templateList.length&&(this.templateList=t),super.connectedCallback()}}return((t,e,s,i)=>{for(var r,o=i>1?void 0:i?D(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);i&&o&&O(e,s,o)})([b({type:Array})],e.prototype,"templates",2),e},E=window,L=E.ShadowRoot&&(void 0===E.ShadyCSS||E.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,M=Symbol(),N=new WeakMap;
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2019 Google LLC
|
|
@@ -43,19 +43,19 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright 2017 Google LLC
|
|
45
45
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
-
*/;var T;const
|
|
46
|
+
*/;var T;const R=window,V=R.trustedTypes,U=V?V.emptyScript:"",q=R.reactiveElementPolyfillSupport,B={toAttribute(t,e){switch(e){case Boolean:t=t?U:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(i){s=null}}return s}},H=(t,e)=>e!==t&&(e==e||t==t),K={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:H};class W extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,s)=>{const i=this._$Ep(s,e);void 0!==i&&(this._$Ev.set(i,s),t.push(i))})),t}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||K}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of e)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(I(t))}else void 0!==t&&e.push(I(t));return e}static _$Ep(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,s;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{L?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const s=document.createElement("style"),i=E.litNonce;void 0!==i&&s.setAttribute("nonce",i),s.textContent=e.cssText,t.appendChild(s)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=K){var i;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const o=(void 0!==(null===(i=s.converter)||void 0===i?void 0:i.toAttribute)?s.converter:B).toAttribute(e,s.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:B;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||H)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
var Z;W.finalized=!0,W.elementProperties=new Map,W.elementStyles=[],W.shadowRootOptions={mode:"open"},null==q||q({ReactiveElement:W}),(null!==(T=
|
|
52
|
+
var Z;W.finalized=!0,W.elementProperties=new Map,W.elementStyles=[],W.shadowRootOptions={mode:"open"},null==q||q({ReactiveElement:W}),(null!==(T=R.reactiveElementVersions)&&void 0!==T?T:R.reactiveElementVersions=[]).push("1.6.1");const Q=window,Y=Q.trustedTypes,G=Y?Y.createPolicy("lit-html",{createHTML:t=>t}):void 0,J=`lit$${(Math.random()+"").slice(9)}$`,X="?"+J,tt=`<${X}>`,et=document,st=(t="")=>et.createComment(t),it=t=>null===t||"object"!=typeof t&&"function"!=typeof t,rt=Array.isArray,ot=t=>rt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,at=/-->/g,lt=/>/g,ct=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),ht=/'/g,dt=/"/g,pt=/^(?:script|style|textarea|title)$/i,ut=(yt=1,(t,...e)=>({_$litType$:yt,strings:t,values:e})),gt=Symbol.for("lit-noChange"),bt=Symbol.for("lit-nothing"),mt=new WeakMap,ft=et.createTreeWalker(et,129,null,!1),vt=(t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":"",n=nt;for(let l=0;l<s;l++){const e=t[l];let s,a,c=-1,h=0;for(;h<e.length&&(n.lastIndex=h,a=n.exec(e),null!==a);)h=n.lastIndex,n===nt?"!--"===a[1]?n=at:void 0!==a[1]?n=lt:void 0!==a[2]?(pt.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=ct):void 0!==a[3]&&(n=ct):n===ct?">"===a[0]?(n=null!=r?r:nt,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,s=a[1],n=void 0===a[3]?ct:'"'===a[3]?dt:ht):n===dt||n===ht?n=ct:n===at||n===lt?n=nt:(n=ct,r=void 0);const d=n===ct&&t[l+1].startsWith("/>")?" ":"";o+=n===nt?e+tt:c>=0?(i.push(s),e.slice(0,c)+"$lit$"+e.slice(c)+J+d):e+J+(-2===c?(i.push(void 0),l):d)}const a=o+(t[s]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==G?G.createHTML(a):a,i]};var yt;class wt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,c]=vt(t,e);if(this.el=wt.createElement(l,s),ft.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=ft.nextNode())&&a.length<n;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(J)){const s=c[o++];if(t.push(e),void 0!==s){const t=i.getAttribute(s.toLowerCase()+"$lit$").split(J),e=/([.?@])?(.*)/.exec(s);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Pt:"?"===e[1]?$t:"@"===e[1]?St:At})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(pt.test(i.tagName)){const t=i.textContent.split(J),e=t.length-1;if(e>0){i.textContent=Y?Y.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],st()),ft.nextNode(),a.push({type:2,index:++r});i.append(t[e],st())}}}else if(8===i.nodeType)if(i.data===X)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(J,t+1));)a.push({type:7,index:r}),t+=J.length-1}r++}}static createElement(t,e){const s=et.createElement("template");return s.innerHTML=t,s}}function xt(t,e,s=t,i){var r,o,n,a;if(e===gt)return e;let l=void 0!==i?null===(r=s._$Co)||void 0===r?void 0:r[i]:s._$Cl;const c=it(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,s,i)),void 0!==i?(null!==(n=(a=s)._$Co)&&void 0!==n?n:a._$Co=[])[i]=l:s._$Cl=l),void 0!==l&&(e=xt(t,l._$AS(t,e.values),l,i)),e}class _t{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:et).importNode(s,!0);ft.currentNode=r;let o=ft.nextNode(),n=0,a=0,l=i[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new kt(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new Ot(o,this,t)),this.u.push(e),l=i[++a]}n!==(null==l?void 0:l.index)&&(o=ft.nextNode(),n++)}return r}p(t){let e=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class kt{constructor(t,e,s,i){var r;this.type=2,this._$AH=bt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cm=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=xt(this,t,e),it(t)?t===bt||null==t||""===t?(this._$AH!==bt&&this._$AR(),this._$AH=bt):t!==this._$AH&&t!==gt&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):ot(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==bt&&it(this._$AH)?this._$AA.nextSibling.data=t:this.T(et.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=wt.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(s);else{const t=new _t(r,this),e=t.v(this.options);t.p(s),this.T(e),this._$AH=t}}_$AC(t){let e=mt.get(t.strings);return void 0===e&&mt.set(t.strings,e=new wt(t)),e}k(t){rt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new kt(this.O(st()),this.O(st()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class At{constructor(t,e,s,i,r){this.type=1,this._$AH=bt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=bt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=xt(this,t,e,0),o=!it(t)||t!==this._$AH&&t!==gt,o&&(this._$AH=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=xt(this,i[s+n],e,n),a===gt&&(a=this._$AH[n]),o||(o=!it(a)||a!==this._$AH[n]),a===bt?t=bt:t!==bt&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!i&&this.j(t)}j(t){t===bt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Pt extends At{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===bt?void 0:t}}const Ct=Y?Y.emptyScript:"";class $t extends At{constructor(){super(...arguments),this.type=4}j(t){t&&t!==bt?this.element.setAttribute(this.name,Ct):this.element.removeAttribute(this.name)}}class St extends At{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){var s;if((t=null!==(s=xt(this,t,e,0))&&void 0!==s?s:bt)===gt)return;const i=this._$AH,r=t===bt&&i!==bt||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==bt&&(i===bt||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Ot{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){xt(this,t)}}const Dt={P:"$lit$",A:J,M:X,C:1,L:vt,R:_t,D:ot,V:xt,I:kt,H:At,N:$t,U:St,B:Pt,F:Ot},jt=Q.litHtmlPolyfillSupport;null==jt||jt(wt,kt),(null!==(Z=Q.litHtmlVersions)&&void 0!==Z?Z:Q.litHtmlVersions=[]).push("2.6.1");
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright 2017 Google LLC
|
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
57
57
|
*/
|
|
58
|
-
var
|
|
58
|
+
var Et,Lt;class Mt extends W{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{var i,r;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==s?void 0:s.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new kt(e.insertBefore(st(),t),t,void 0,null!=s?s:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return gt}}Mt.finalized=!0,Mt._$litElement$=!0,null===(Et=globalThis.litElementHydrateSupport)||void 0===Et||Et.call(globalThis,{LitElement:Mt});const Nt=globalThis.litElementPolyfillSupport;null==Nt||Nt({LitElement:Mt}),(null!==(Lt=globalThis.litElementVersions)&&void 0!==Lt?Lt:globalThis.litElementVersions=[]).push("3.2.2");var zt=Object.defineProperty,Ft=Object.getOwnPropertyDescriptor,It=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ft(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zt(e,s,o),o};let Tt=class extends(S(j(Mt))){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite.split("%s").map((t=>t.trim())),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=e.getLanguage(),super.connectedCallback()}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(1e3*t);let r=[];if(e>0){const t=this.endDateObject;t.setTime(1e3*e);const o=i.toDateString()==t.toDateString();o||(delete s.hour,delete s.minute);if(r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,t),this.designMode&&r.forEach((t=>t.hidden=","==t.value.trim())),!o){const t=r.find((t=>"literal"==t.type&&"shared"==t.source&&t.value.trim().length>0));t&&(t.value=" "+this.duAu[1]+" ",t.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else{r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i)}return r[0].value=o.ucFirst(r[0].value),r.filter((t=>!0!==t.hidden))}dateStringToSeconds(t){return new Date(t).getTime()/1e3}render(){if(!this.renderIf)return bt;if(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date)return bt;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const t=this.start_date;this.start_date=this.end_date,this.end_date=t}const t={year:this.year,month:this.month,day:this.day};"hidden"!==this.weekday&&(t.weekday=this.weekday),"hidden"!==this.hour&&(t.hour=this.hour),"hidden"!==this.minute&&(t.minute=this.minute),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.start_date,this.end_date,t);return ut`${e.map((t=>{const e=this.templateParts[t.type];if(e){const s=document.importNode(e.content,!0),i=s.children[0];return""==i.innerText.trim()&&(i.innerText=t.value),s}return ut`<span class="${t.type}">${t.value}</span>`}))}`}};It([b()],Tt.prototype,"wording_billet_periode_validite",1),It([b({type:Boolean})],Tt.prototype,"designMode",2),It([b({type:String})],Tt.prototype,"time_zone",2),It([b({type:Number})],Tt.prototype,"date",2),It([b({type:String})],Tt.prototype,"date_string",2),It([b({type:String})],Tt.prototype,"start_date_string",2),It([b({type:String})],Tt.prototype,"end_date_string",2),It([b({type:Number})],Tt.prototype,"start_date",2),It([b({type:Number})],Tt.prototype,"end_date",2),It([b({type:String})],Tt.prototype,"era",2),It([b({type:String})],Tt.prototype,"year",2),It([b({type:String})],Tt.prototype,"month",2),It([b({type:String})],Tt.prototype,"day",2),It([b({type:String})],Tt.prototype,"weekday",2),It([b({type:String})],Tt.prototype,"hour",2),It([b({type:String})],Tt.prototype,"minute",2),It([b({type:String})],Tt.prototype,"language",2),It([b({type:Boolean})],Tt.prototype,"renderIf",2),It([b({type:Boolean})],Tt.prototype,"now",2),Tt=It([u("sonic-date")],Tt);const Rt=class{static listen(){var t;if(!Rt.listening)return;const e=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");Rt.prevURL&&Rt.prevURL!=e&&(Rt.prevURL=e,Rt.listeners.forEach((t=>{t.location=e}))),window.requestAnimationFrame(Rt.listen)}static offChange(t){const e=Rt.listeners.indexOf(t);-1!=e&&(Rt.listeners.splice(e,1),0==Rt.listeners.length&&(Rt.listening=!1))}static onChange(t){Rt.listening||(Rt.listening=!0,Rt.listen()),Rt.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){const e=t.goBack,s=document.referrer;if(null!=e){const t=document.location.origin,i=e||t,r=!!(0==s.indexOf("http"))&&new URL(s).origin!=t,o=""==s,n=history.length<3,a=o&&n,l=i!=document.location.href;if(r&&l||a){const t=history.state||{};t.concorde=t.concorde||{},t.concorde.hasDoneHistoryBack=!0,history.pushState(t,document.title),history.back(),document.location.replace(i)}else history.back();return}let i=t.getAttribute("to")||"";if(i||(i=t.href||""),!i)return;if(0==i.indexOf("#"))return void(document.location.hash=i.substring(1));const r=new URL(i,document.location.href),o=r.pathname.split("/"),n=[];let a="";for(const l of o)l!=a&&n.push(l),a=l;i="/"+n.join("/")+r.search+(r.hash?+r.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",i):t.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(t){if("disabled"!=t.autoActive&&t.href&&0!=t.href.indexOf("http")){const e=new URL(t.href,document.location.href),s=new URL(t.location||"",document.location.origin);let i=!1;i="strict"==t.autoActive?e.pathname==s.pathname&&e.hash==s.hash&&e.search==s.search:0==s.href.indexOf(e.href),i?t.setAttribute("active","true"):t.removeAttribute("active")}}};let Vt=Rt;Vt.listeners=[],Vt.listening=!1,Vt.prevURL=null==(t=document.location)?void 0:t.href.replace(document.location.origin,"");
|
|
59
59
|
/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
@@ -66,39 +66,39 @@ const Ut=1,qt=2,Bt=t=>(...e)=>({_$litDirective$:t,values:e});class Ht{constructo
|
|
|
66
66
|
* @license
|
|
67
67
|
* Copyright 2018 Google LLC
|
|
68
68
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
69
|
-
*/const Kt=Bt(class extends Ht{constructor(t){var e;if(super(t),t.type!==Ut||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const i in e){const t=e[i];null!=t&&(this.vt.add(i),i.includes("-")?s.setProperty(i,t):s[i]=t)}return gt}});var Wt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Qt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wt(e,s,o),o};const Yt=new Map,Gt=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{let t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){let t=this.getAttribute("name");if(t){let e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?c.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){"nom"==this.name&&t&&s.deepEqual(t,{})&&console.trace(this),null==t&&(t=""),s.isObject(t)&&t.hasOwnProperty("__value")&&null==t.value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher(),e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){let t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;let e=t.split(" "),s=e[0];if(!s)return;for(let r of e){Yt.has(r)||Yt.set(r,[]);let t=Yt.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}let i=Yt.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;let r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;let s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;let i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0})),n=null;if("ArrowDown"==s.key&&o){let t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){let t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}let a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return Qt([m({type:Boolean,reflect:!0})],e.prototype,"touched",2),Qt([m({type:Boolean})],e.prototype,"error",2),Qt([m({type:Boolean})],e.prototype,"autofocus",2),Qt([m({type:Boolean})],e.prototype,"required",2),Qt([m()],e.prototype,"forceAutoFill",2),Qt([m({type:Boolean})],e.prototype,"disabled",2),Qt([m({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Qt([m({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Qt([m()],e.prototype,"name",1),Qt([m()],e.prototype,"value",1),e};class Jt{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;let s=(t[0]||{})[e];return t.every((t=>(t||{})[e]==s))}})})}),value:()=>({forKey:e=>Jt.from(t.map((t=>t[e])))}),copy:()=>({fromKey:e=>({toKey:s=>{t.forEach((t=>{t[s]=Array.isArray(t[e])?[...t[e]]:"object"==typeof t[e]&&null!=t[e]?__spreadValues({},t[e]):t[e]}))}})})}),map:e=>Jt.from(t.map(e)),filter:e=>Jt.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{let s=[],i=new Map;for(let r of t){let t=r[e];if(!i.has(t)){let r=s.length;i.set(t,r);let o={items:[]};o[e]=t,s.push(o)}s[i.get(t)].items.push(r)}return Jt.from(s)}}),without:()=>({duplicates:()=>({forKey:e=>{let s=[...new Set(t.map((t=>t[e])))];return Jt.from(s.map((s=>t.find((t=>t[e]==s)))))}}),itemsIn:e=>({havingSameValue:()=>({forKey:s=>Jt.from(t.filter((t=>{return e.every((i=t,r=s,t=>i[r]!=t[r]));var i,r})))})})})}}}const Xt=class{static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},te=Jt,ee=p,se=o,ie=e,re=Rt,oe=s,ne=h,ae=c,le=r;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Xt,Arrays:te,DataBindObserver:ee,Format:se,HTML:ie,LocationHandler:re,Objects:oe,PublisherProxy:ne,PublisherManager:ae,api:le};var ce=Object.defineProperty,he=Object.getOwnPropertyDescriptor,de=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?he(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ce(e,s,o),o};const pe=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{let t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");let i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(let e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;let e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){let t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";let e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;let s=this.getFormPublisher();if(s){let t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){let t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);let s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider;let e=this.getAttribute("name");return t&&e?ae.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();let t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){let e=t.values.get().slice(0);const s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){let e=t[this.name].get();e&&-1!==e.indexOf(this.value)&&(this.checked=!0)}let e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return de([m()],e.prototype,"value",1),de([m()],e.prototype,"forceAutoFill",2),de([m({type:Boolean})],e.prototype,"unique",2),de([m({type:Boolean})],e.prototype,"radio",2),de([m({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),de([m()],e.prototype,"checked",1),e},ue=t=>null!=t?t:mt,ge=F`:host{--sc-fs:1rem;--sc-lh:1.2;font-size:var(--sc-fs);line-height:var(--sc-lh)}:host([size="2xs"]){--sc-fs:0.625rem}:host([size=xs]){--sc-fs:0.75rem}:host([size=sm]){--sc-fs:0.875rem}:host([size=lg]){--sc-fs:1.125rem}:host([size=xl]){--sc-fs:1.25rem}:host([size="2xl"]){--sc-fs:1.5rem}`;
|
|
69
|
+
*/const Kt=Bt(class extends Ht{constructor(t){var e;if(super(t),t.type!==Ut||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return null==i?e:e+`${s=s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.vt){this.vt=new Set;for(const t in e)this.vt.add(t);return this.render(e)}this.vt.forEach((t=>{null==e[t]&&(this.vt.delete(t),t.includes("-")?s.removeProperty(t):s[t]="")}));for(const i in e){const t=e[i];null!=t&&(this.vt.add(i),i.includes("-")?s.setProperty(i,t):s[i]=t)}return gt}});var Wt=Object.defineProperty,Zt=Object.getOwnPropertyDescriptor,Qt=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zt(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wt(e,s,o),o};const Yt=new Map,Gt=t=>{class e extends t{constructor(...t){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=t=>{this.setValueFromPublisher(t)},this.onFormValueAssign=t=>{this.setFormValueFromPublisher(t)},this.onFormDataInValidate=()=>{const t=this.getFormPublisher();t&&t.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}validateFormElement(){}updateDataValue(){const t=this.getAttribute("name");if(t){const e=this.getFormPublisher();e&&(e[t]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(e[t].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?c.get(this.formDataProvider):null}getValueForFormPublisher(){return this.value}setValueFromPublisher(t){this.value=t}setFormValueFromPublisher(t){this.value=t}get value(){return this._value}set value(t){null==t&&(t=""),s.isObject(t)&&Object.prototype.hasOwnProperty.call(t,"__value")&&null==t._value&&(t=""),this._value!=t&&(this._value=t,this.updateDataValue(),this.requestUpdate())}initPublisher(){let t=this.getFormPublisher();const e=this.hasAncestorAttribute("initFromPublisher")&&this._name&&t[this._name].get()?t[this._name].get():this.getAttribute("value");this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign),this._name&&t&&t[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),t=this.getFormPublisher(),this._name&&t&&(t[this._name].onAssign(this.onFormValueAssign),t.onInvalidate(this.onFormDataInValidate)),this.updateDataValue(),e&&(this.value=e)}handleBlur(){this.touched=!0}handleChange(t){this.value=t.target.value;const e=new Event("change");this.dispatchEvent(e)}addKeyboardNavigation(){const t=this.getAncestorAttributeValue("data-keyboard-nav");if(!t)return;const e=t.split(" "),s=e[0];if(!s)return;for(const r of e){Yt.has(r)||Yt.set(r,[]);const t=Yt.get(r);-1==(null==t?void 0:t.indexOf(this))&&t.push(this)}const i=Yt.get(s);this.addEventListener("keydown",(t=>{var e;const s=t;if(!["ArrowDown","ArrowUp"].includes(s.key))return;const r="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",o=null==i?void 0:i.filter((t=>{var e;const s=null==(e=t.shadowRoot)?void 0:e.querySelector(r);if(!s)return!1;const i=window.getComputedStyle(s);return"none"!==i.display&&""!==i.display&&"none"!=i.pointerEvents&&"hidden"!==i.visibility&&s.getBoundingClientRect().width>0}));let n=null;if("ArrowDown"==s.key&&o){const t=o.indexOf(this);n=t==o.length-1?o[0]:o[t+1]}else if("ArrowUp"==s.key&&o){const t=o.indexOf(this);n=0==t?o[o.length-1]:o[t-1]}const a=null==(e=null==n?void 0:n.shadowRoot)?void 0:e.querySelector(r);a&&a.focus&&(a.focus(),t.preventDefault())}))}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);const t=this.getFormPublisher();this._name&&t&&(t[this._name].offAssign(this.onFormValueAssign),t.offInvalidate(this.onFormDataInValidate))}}return Qt([b({type:Boolean,reflect:!0})],e.prototype,"touched",2),Qt([b({type:Boolean})],e.prototype,"error",2),Qt([b({type:Boolean})],e.prototype,"autofocus",2),Qt([b({type:Boolean})],e.prototype,"required",2),Qt([b()],e.prototype,"forceAutoFill",2),Qt([b({type:Boolean})],e.prototype,"disabled",2),Qt([b({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Qt([b({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Qt([b()],e.prototype,"name",1),Qt([b()],e.prototype,"value",1),e};class Jt{static areEqual(t,e){return t.length===e.length&&t.every(((t,s)=>t===e[s]))}static from2d(t){return{to1D:()=>{let e=[];return t.forEach((t=>e=e.concat(t))),this.from(e)}}}static from(t){return{get:()=>t||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:e=>{if(t.length<1)return!0;const s=(t[0]||{})[e];return t.every((t=>(t||{})[e]==s))}})})}),value:()=>({forKey:e=>Jt.from(t.map((t=>t[e])))}),copy:()=>({fromKey:e=>({toKey:s=>{t.forEach((t=>{t[s]=Array.isArray(t[e])?[...t[e]]:"object"==typeof t[e]&&null!=t[e]?{...t[e]}:t[e]}))}})})}),map:e=>Jt.from(t.map(e)),filter:e=>Jt.from(t.filter(e)),find:e=>t.find(e),some:e=>t.some(e),every:e=>t.every(e),group:()=>({byKey:e=>{const s=[],i=new Map;for(const r of t){const t=r[e];if(!i.has(t)){const r=s.length;i.set(t,r);const o={items:[]};o[e]=t,s.push(o)}s[i.get(t)].items.push(r)}return Jt.from(s)}}),without:()=>({duplicates:()=>({forKey:e=>{const s=[...new Set(t.map((t=>t[e])))];return Jt.from(s.map((s=>t.find((t=>t[e]==s)))))}}),itemsIn:e=>({havingSameValue:()=>({forKey:s=>Jt.from(t.filter((t=>{return e.every((i=t,r=s,t=>i[r]!=t[r]));var i,r})))})})})}}}const Xt=class{static async delayPromise(t){return new Promise((e=>{setTimeout(e,t)}))}},te=Jt,ee=p,se=o,ie=e,re=Vt,oe=s,ne=h,ae=c,le=r;window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Xt,Arrays:te,DataBindObserver:ee,Format:se,HTML:ie,LocationHandler:re,Objects:oe,PublisherProxy:ne,PublisherManager:ae,api:le};var ce=Object.defineProperty,he=Object.getOwnPropertyDescriptor,de=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?he(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ce(e,s,o),o};const pe=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this.unCheckOnDisconnect=!1,this._checked=null,this.updateAllChecked=()=>{const t=this.getAttribute("name"),e=this.getCheckAllPublisher(),s=this.getFormPublisher();if((null==e?void 0:e.hasCheckAll.get())&&!this.checksAll()&&e&&s&&t){if(!s[this.name].get().length)return void(e.checkMode="noneChecked");null===this.checked?e.checkMode="someUnchecked":"noneChecked"!=e.checkMode.get()&&null!=e.checkMode.get()||(e.checkMode="someUnchecked");const i=s[t].get(),r=e.values.get();if(r&&r.length){let t=r.length;for(const e of r)-1==i.indexOf(e)&&(t-=1);t==r.length&&(e.checkMode="allChecked"),0==t&&(e.checkMode="noneChecked")}-1==r.indexOf(this.value)&&(this.checked=null)}},this.onChecksAllRequest=t=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),"allChecked"==t&&(this.checked=!0,this.setAttribute("allChecked","")),"noneChecked"==t&&(this.checked=null),"someUnchecked"==t&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(t){if(this.value==t)return;if(this.hasAttribute("value")&&!this.forceAutoFill&&(t=this.getAttribute("value")),this._value==t)return;if(null==t)return;if(this._value=t,!this.value)return;const e=this.getFormPublisher();if(e&&this.name){let s=e[this.name].get();(this.radio||this.unique)&&(this.checked=s==t||null),Array.isArray(s)||(s=[]),-1!=s.indexOf(t)&&(this.checked=!0)}1==this.checked&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(t){if(this.setCheckedValue(t),this.checksAll()){const t=this.getCheckAllPublisher();if(t)if(!0===this.checked)t.checkMode="allChecked";else if(null===this.checked){t.checkMode="noneChecked";const e=this.getFormPublisher();e&&(e[this.name]=[])}}this.requestUpdate()}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();if(s){const t=s[this.name].get();if((this.unique||this.radio)&&null!==t&&t.toString().length>0)return;s.isFormValid=!1,e.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(t){this._checked!=t&&(this._checked=t,this.updateDataValue(),this.requestUpdate(),setTimeout((()=>this.updateAllChecked()),1))}handleChange(){const t=!0!==this.checked||(!!this.radio||null);this.checked=t;const e=new Event("change");this.dispatchEvent(e)}getValueForFormPublisher(){const t=this.getFormPublisher();if(!t)return null;let e=t[this.name].get();if(this.radio)return!0===this.checked&&null!=this.value?this.value:e;if(this.unique)return!0===this.checked&&null!=this.value?this.value:null;Array.isArray(e)||(e=[]),e=e.slice(0);const s=e.indexOf(this.value);return!0!==this.checked||-1!==s||this.checksAll()||e.push(this.value),null===this.checked&&-1!==s&&e.splice(s,1),e}setFormValueFromPublisher(t){this.unique||this.radio?this.checked=this.value==t||null:(Array.isArray(t)||(t=[]),this.checksAll()||(this.checked=-1!==t.indexOf(this.value)||null))}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const t=this.formDataProvider,e=this.getAttribute("name");return t&&e?ae.get(t+"/"+e+"/_available_values_"):null}disconnectedCallback(){super.disconnectedCallback();const t=this.getCheckAllPublisher();if(t&&(t.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const e=t.values.get().slice(0),s=e.indexOf(this.value);-1!=s&&(e.splice(s,1),t.values=e)}setTimeout((()=>this.updateAllChecked()),1)}connectedCallback(){super.connectedCallback();const t=this.getFormPublisher();if(t&&this.name){const e=t[this.name].get();e&&Array.isArray(e)&&-1!==e.indexOf(this.value)&&(this.checked=!0)}const e=this.getCheckAllPublisher();e&&(e.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&(e.hasCheckAll=!0),e.values.get()||(e.values=[]),this.checksAll()||(e.values=[...e.values.get(),this.value])),this.hasAttribute("checked")&&(this.publisher&&!1===this.publisher.get().checked||setTimeout((()=>this.checked=!0),1))}}return de([b()],e.prototype,"value",1),de([b()],e.prototype,"forceAutoFill",2),de([b({type:Boolean})],e.prototype,"unique",2),de([b({type:Boolean})],e.prototype,"radio",2),de([b({type:Boolean})],e.prototype,"unCheckOnDisconnect",2),de([b()],e.prototype,"checked",1),e},ue=t=>null!=t?t:bt,ge=F`:host{--sc-fs:1rem;--sc-lh:1.2;font-size:var(--sc-fs);line-height:var(--sc-lh)}:host([size="2xs"]){--sc-fs:0.625rem}:host([size=xs]){--sc-fs:0.75rem}:host([size=sm]){--sc-fs:0.875rem}:host([size=lg]){--sc-fs:1.125rem}:host([size=xl]){--sc-fs:1.25rem}:host([size="2xl"]){--sc-fs:1.5rem}`;
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2018 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
-
*/var me=Object.defineProperty,be=Object.getOwnPropertyDescriptor,fe=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?be(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&me(e,s,o),o};let ve=class extends(pe(Gt(S(Mt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?(Rt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")):Rt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),Rt.changeFromComponent(this)}handleChange(t){if(super.handleChange(t),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),Rt.changeFromComponent(this)),this.hasAttribute("reset")){const t=this.getAttribute("reset");let e=t?ae.get(t):this.getFormPublisher();e&&e.set({})}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){Rt.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(t){this._location=t,Rt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=ut`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${Kt(t)}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${1==this.loading?ut`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?ut`<a href="${this.href}" target="${ue(this.target)}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}" @click="${this.pushState||null!==this.goBack?this.handleNavigation:null}">${e}</a>`:ut`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};ve.styles=[ge,F`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--sc-btn-color:var(--sc-base-content);--sc-btn-bg:var(--sc-base-100);--sc-btn-border-style:solid;--sc-btn-border-with:var(--sc-form-border-width);--sc-btn-border-color:transparent;--sc-btn-outline-bg-hover:var(--sc-base-100);--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--sc-btn-bg);color:var(--sc-btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--sc-btn-color:var(--sc-base-content);--sc-btn-bg:var(--sc-base-100)}:host([type=primary]) button{--sc-btn-color:var(--sc-primary-content);--sc-btn-bg:var(--sc-primary)}:host([type=warning]) button{--sc-btn-color:var(--sc-warning-content);--sc-btn-bg:var(--sc-warning)}:host([type=danger]) button{--sc-btn-color:var(--sc-danger-content);--sc-btn-bg:var(--sc-danger)}:host([type=info]) button{--sc-btn-color:var(--sc-info-content);--sc-btn-bg:var(--sc-info)}:host([type=success]) button{--sc-btn-color:var(--sc-success-content);--sc-btn-bg:var(--sc-success)}:host([type=neutral]) button{--sc-btn-color:var(--sc-base);--sc-btn-bg:var(--sc-base-600)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--sc-btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--sc-btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--sc-btn-bg);color:var(--sc-btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--sc-btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--sc-btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);overflow:hidden;padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`],fe([m({type:String,reflect:!0})],ve.prototype,"type",2),fe([m({type:String,reflect:!0})],ve.prototype,"variant",2),fe([m({type:String,reflect:!0})],ve.prototype,"size",2),fe([m({type:String,reflect:!0})],ve.prototype,"shape",2),fe([m({type:String})],ve.prototype,"direction",2),fe([m({type:String,reflect:!0})],ve.prototype,"alignItems",2),fe([m({type:String})],ve.prototype,"justify",2),fe([m({type:String,reflect:!0})],ve.prototype,"align",2),fe([m({type:String})],ve.prototype,"minWidth",2),fe([m({type:Boolean,reflect:!0})],ve.prototype,"icon",2),fe([m({type:String})],ve.prototype,"autoActive",2),fe([m({type:Boolean,reflect:!0})],ve.prototype,"loading",2),fe([b()],ve.prototype,"hasPrefix",2),fe([b()],ve.prototype,"hasSuffix",2),fe([_({flatten:!0,slot:"prefix"})],ve.prototype,"prefixes",2),fe([_({flatten:!0,slot:"suffix"})],ve.prototype,"suffixes",2),fe([m({type:String})],ve.prototype,"target",2),fe([m({type:String})],ve.prototype,"href",1),fe([m({type:String})],ve.prototype,"goBack",2),fe([m({type:Boolean})],ve.prototype,"pushState",2),fe([m({type:Boolean,reflect:!0})],ve.prototype,"active",2),ve=fe([u("sonic-button")],ve);const ye=F`:host([align=left]) .sonic-loader--inline{margin-left:0}:host([align=right]) .sonic-loader--inline{margin-left:auto;margin-right:0}.sonic-loader--inline{display:block;position:relative;width:80px;height:80px;margin:auto;z-index:20}.sonic-loader--inline div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--sc-loader-bg);animation-timing-function:cubic-bezier(0,1,1,0)}.sonic-loader--inline div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.sonic-loader--inline div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}`,we=F`@keyframes sonic-loader--fixed{0%{transform:scale(0);opacity:0}5%{opacity:1}70%{opacity:90%}100%{transform:scale(1);opacity:0}}.sonic-loader--fixed{position:fixed;top:50%;left:50%;transform:transateY(-50%) translateX(-50%);z-index:999}.sonic-loader--fixed>div:nth-child(2){animation-delay:-.5s}.sonic-loader--fixed>div:nth-child(3){animation-delay:-.2s}.sonic-loader--fixed>div:nth-child(4){display:none!important}.sonic-loader--fixed>div{background-color:var(--sc-loader-bg);width:5rem;height:5rem;border-radius:100%;margin:2px;animation-fill-mode:both;position:absolute;top:0;opacity:0;margin:0;top:-2.5rem;left:-2.5rem;width:5rem;height:5rem;animation:sonic-loader--fixed 1s 0s linear infinite}`;var _e=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,ke=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?xe(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_e(e,s,o),o};let Ae=class extends Mt{constructor(){super(...arguments),this.mode="fixed"}static show(t){Ae.loader||(Ae.loader=document.createElement("sonic-loader"));let e=Ae.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.container||(t.container=document.querySelector("sonic-theme")||document.body,t.mode="fixed"),t.container.appendChild(e),Ae.callCounter++}static hide(){Ae.callCounter--,Ae.callCounter>0||Ae.loader&&Ae.loader.remove()}render(){return ut`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Ae.styles=[ye,we,F`:host{--sc-loader-bg:var(--sc-primary, currentColor);pointer-events:none}.sonic-loader{opacity:0;animation:showLoader .5s .5s forwards}.sonic-loader--inline{animation-delay:0s}@keyframes showLoader{0%{opacity:0}100%{opacity:1}}`],Ae.callCounter=0,ke([m({type:String})],Ae.prototype,"mode",2),Ae=ke([u("sonic-loader")],Ae);
|
|
74
|
+
*/var be=Object.defineProperty,me=Object.getOwnPropertyDescriptor,fe=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?me(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&be(e,s,o),o};let ve=class extends(pe(Gt(S(Mt)))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this._location=""}set href(t){this._href=t,this.href&&0!=this.href.indexOf("http")?(Vt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")):Vt.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),Vt.changeFromComponent(this)}handleChange(t){if(super.handleChange(),(this.pushState||null!==this.goBack)&&(null==t||t.preventDefault(),null==t||t.stopPropagation(),Vt.changeFromComponent(this)),this.hasAttribute("reset")){const t=this.getAttribute("reset"),e=t?ae.get(t):this.getFormPublisher();e&&e.set({})}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){Vt.offChange(this),super.disconnectedCallback()}get location(){return this._location}set location(t){this._location=t,Vt.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=ut`<button part="button" class="${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}" style="${Kt(t)}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}" @click="${this.handleChange}"><slot @slotchange="${this.onSlotChange}" part="prefix" name="prefix"></slot><slot part="main" class="main-slot"></slot><slot @slotchange="${this.onSlotChange}" part="suffix" name="suffix"></slot>${1==this.loading?ut`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}</button>`;return this.href?ut`<a href="${this.href}" target="${ue(this.target)}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}" @click="${this.pushState||null!==this.goBack?this.handleNavigation:null}">${e}</a>`:ut`${e}`}onSlotChange(){var t,e;this.hasPrefix=!!(null==(t=this.prefixes)?void 0:t.length),this.hasSuffix=!!(null==(e=this.suffixes)?void 0:e.length)}};ve.styles=[ge,F`*{box-sizing:border-box}:host{--sc-btn-gap:0.35em;--sc-btn-py:0.25em;--sc-btn-px:1.1em;--sc-btn-fs:var(--sc-fs, 1rem);--sc-btn-fw:var(--sc-btn-font-weight);--sc-btn-ff:var(--sc-btn-font-family);--sc-btn-height:var(--sc-form-height);--sc-btn-color:var(--sc-base-content);--sc-btn-bg:var(--sc-base-100);--sc-btn-border-style:solid;--sc-btn-border-with:var(--sc-form-border-width);--sc-btn-border-color:transparent;--sc-btn-outline-bg-hover:var(--sc-base-100);--sc-btn-ghost-bg-hover:var(--sc-base-100);--sc-btn-active-color:var(--sc-base);--sc-btn-hover-filter:brightness(0.98);--sc-btn-active-filter:brightness(0.97);--sc-btn-active-bg:var(--sc-base-content);--sc-item-rounded-tr:var(--sc-btn-rounded);--sc-item-rounded-tl:var(--sc-btn-rounded);--sc-item-rounded-bl:var(--sc-btn-rounded);--sc-item-rounded-br:var(--sc-btn-rounded);display:inline-flex;vertical-align:middle;box-sizing:border-box;-webkit-print-color-adjust:exact}:host a{display:contents;color:unset}:host button{display:flex;flex:1;box-sizing:border-box;align-items:center;justify-content:center;font-family:var(--sc-btn-ff);font-weight:var(--sc-btn-fw);font-size:var(--sc-btn-fs);cursor:pointer;text-align:center;line-height:1.1;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);background:var(--sc-btn-bg);color:var(--sc-btn-color);padding-top:var(--sc-btn-py);padding-bottom:var(--sc-btn-py);padding-left:var(--sc-btn-px);padding-right:var(--sc-btn-px);border:var(--sc-btn-border-with) var(--sc-btn-border-style) var(--sc-btn-border-color);min-height:var(--sc-btn-height)}:host button.has-prefix-or-suffix{gap:var(--sc-btn-gap)}:host button:focus,:host button:hover{filter:var(--sc-btn-hover-filter)}:host button:active{filter:var(--sc-btn-active-filter)}:host([type=default]) button{--sc-btn-color:var(--sc-base-content);--sc-btn-bg:var(--sc-base-100)}:host([type=primary]) button{--sc-btn-color:var(--sc-primary-content);--sc-btn-bg:var(--sc-primary)}:host([type=warning]) button{--sc-btn-color:var(--sc-warning-content);--sc-btn-bg:var(--sc-warning)}:host([type=danger]) button{--sc-btn-color:var(--sc-danger-content);--sc-btn-bg:var(--sc-danger)}:host([type=info]) button{--sc-btn-color:var(--sc-info-content);--sc-btn-bg:var(--sc-info)}:host([type=success]) button{--sc-btn-color:var(--sc-success-content);--sc-btn-bg:var(--sc-success)}:host([type=neutral]) button{--sc-btn-color:var(--sc-base);--sc-btn-bg:var(--sc-base-600)}:host([variant=unstyled]){display:inline-block}:host([variant=unstyled]) button{all:unset;display:contents;cursor:pointer;--sc-btn-height:auto;--sc-btn-width:auto}:host(:not([disabled])) button:focus{box-shadow:0 0 0 .18rem var(--sc-base-300);border-color:var(--sc-base-300)!important;outline:0}:host([variant=ghost][type]) button{color:var(--sc-btn-bg);background:0 0}:host([variant=ghost][type=default]) button{color:var(--sc-btn-color);background:0 0}:host([variant=ghost]) button:hover{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button{background:var(--sc-btn-ghost-bg-hover);filter:none}:host([active][variant=ghost]) button:hover{filter:var(--sc-btn-hover-filter)}:host([variant=outline][type]) button{border-color:var(--sc-btn-bg);color:var(--sc-btn-bg);background:0 0}:host([variant=outline][type=default]) button{border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=outline]) button:hover{background:var(--sc-btn-outline-bg-hover)}:host([variant=link]:not([size])){vertical-align:baseline;margin-left:.25em;margin-right:.25em}:host([variant=link]:not([size])){font-size:inherit}:host([variant=link]) button{text-decoration:underline;padding:0;background:0 0;border:none;font-size:inherit;min-height:0;color:inherit}:host([variant=link][type]) button{color:var(--sc-btn-bg)}:host([variant=link][type=default]) button{color:inherit}:host([variant=link]) button:focus,:host([variant=link]) button:hover{text-decoration:none}:host([shape=circle]) button{border-radius:50%}:host([shape=circle]) button,:host([shape=square]) button{width:var(--sc-btn-height);height:var(--sc-btn-height);overflow:hidden;padding:0;align-items:center;justify-content:0;text-align:center!important}:host([shape=block]),:host([shape=block]) button{width:100%}:host([disabled]){opacity:.3;pointer-events:none;user-select:none}:host([active]:not([variant=ghost]):not([variant=unstyled])) button{background:var(--sc-btn-active-bg);color:var(--sc-btn-active-color);border-color:var(--sc-btn-active-bg)}:host([align=left]) button{text-align:left}:host([align=right]) button{text-align:right}.main-slot{flex-grow:1;display:block}:host([minWidth]) .main-slot{flex-grow:0}slot[name=prefix],slot[name=suffix]{flex-shrink:0}::slotted(sonic-icon){min-width:1em;text-align:center}:host([icon]) ::slotted(sonic-icon){font-size:1.2em}sonic-tooltip{display:contents}:host(:not([active])) ::slotted([swap=on]){display:none!important}:host([active]) ::slotted([swap=off]){display:none!important}:host([loading]){pointer-events:none;position:relative}:host([loading]) slot{opacity:0!important;pointer-events:none}:host([loading]) .loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;line-height:0;height:var(--sc-btn-ff);width:var(--sc-btn-ff);animation:rotation 2s infinite linear}@keyframes rotation{from{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(0)}to{transform-origin:50% 50%;transform:translate(-50%,-50%) rotate(359deg)}}`],fe([b({type:String,reflect:!0})],ve.prototype,"type",2),fe([b({type:String,reflect:!0})],ve.prototype,"variant",2),fe([b({type:String,reflect:!0})],ve.prototype,"size",2),fe([b({type:String,reflect:!0})],ve.prototype,"shape",2),fe([b({type:String})],ve.prototype,"direction",2),fe([b({type:String,reflect:!0})],ve.prototype,"alignItems",2),fe([b({type:String})],ve.prototype,"justify",2),fe([b({type:String,reflect:!0})],ve.prototype,"align",2),fe([b({type:String})],ve.prototype,"minWidth",2),fe([b({type:Boolean,reflect:!0})],ve.prototype,"icon",2),fe([b({type:String})],ve.prototype,"autoActive",2),fe([b({type:Boolean,reflect:!0})],ve.prototype,"loading",2),fe([m()],ve.prototype,"hasPrefix",2),fe([m()],ve.prototype,"hasSuffix",2),fe([x({flatten:!0,slot:"prefix"})],ve.prototype,"prefixes",2),fe([x({flatten:!0,slot:"suffix"})],ve.prototype,"suffixes",2),fe([b({type:String})],ve.prototype,"target",2),fe([b({type:String})],ve.prototype,"href",1),fe([b({type:String})],ve.prototype,"goBack",2),fe([b({type:Boolean})],ve.prototype,"pushState",2),fe([b({type:Boolean,reflect:!0})],ve.prototype,"active",2),ve=fe([u("sonic-button")],ve);const ye=F`:host([align=left]) .sonic-loader--inline{margin-left:0}:host([align=right]) .sonic-loader--inline{margin-left:auto;margin-right:0}.sonic-loader--inline{display:block;position:relative;width:80px;height:80px;margin:auto;z-index:20}.sonic-loader--inline div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--sc-loader-bg);animation-timing-function:cubic-bezier(0,1,1,0)}.sonic-loader--inline div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.sonic-loader--inline div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.sonic-loader--inline div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0,0)}100%{transform:translate(24px,0)}}`,we=F`@keyframes sonic-loader--fixed{0%{transform:scale(0);opacity:0}5%{opacity:1}70%{opacity:90%}100%{transform:scale(1);opacity:0}}.sonic-loader--fixed{position:fixed;top:50%;left:50%;transform:transateY(-50%) translateX(-50%);z-index:999}.sonic-loader--fixed>div:nth-child(2){animation-delay:-.5s}.sonic-loader--fixed>div:nth-child(3){animation-delay:-.2s}.sonic-loader--fixed>div:nth-child(4){display:none!important}.sonic-loader--fixed>div{background-color:var(--sc-loader-bg);width:5rem;height:5rem;border-radius:100%;margin:2px;animation-fill-mode:both;position:absolute;top:0;opacity:0;margin:0;top:-2.5rem;left:-2.5rem;width:5rem;height:5rem;animation:sonic-loader--fixed 1s 0s linear infinite}`;var xe=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,ke=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?_e(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xe(e,s,o),o};let Ae=class extends Mt{constructor(){super(...arguments),this.mode="fixed"}static show(t){Ae.loader||(Ae.loader=document.createElement("sonic-loader"));const e=Ae.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.container||(t.container=document.querySelector("sonic-theme")||document.body,t.mode="fixed"),t.container.appendChild(e),Ae.callCounter++}static hide(){Ae.callCounter--,Ae.callCounter>0||Ae.loader&&Ae.loader.remove()}render(){return ut`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Ae.styles=[ye,we,F`:host{--sc-loader-bg:var(--sc-primary, currentColor);pointer-events:none}.sonic-loader{opacity:0;animation:showLoader .5s .5s forwards}.sonic-loader--inline{animation-delay:0s}@keyframes showLoader{0%{opacity:0}100%{opacity:1}}`],Ae.callCounter=0,ke([b({type:String})],Ae.prototype,"mode",2),Ae=ke([u("sonic-loader")],Ae);
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright 2020 Google LLC
|
|
78
78
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
79
|
*/
|
|
80
|
-
const{I:Pe}=Dt,Ce=()=>document.createComment(""),$e=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore(Ce(),o),i=r.insertBefore(Ce(),o);s=new Pe(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},Se=(t,e,s=t)=>(t._$AI(e,s),t),Oe={},De=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},
|
|
80
|
+
const{I:Pe}=Dt,Ce=()=>document.createComment(""),$e=(t,e,s)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===s){const e=r.insertBefore(Ce(),o),i=r.insertBefore(Ce(),o);s=new Pe(e,i,t,t.options)}else{const e=s._$AB.nextSibling,n=s._$AM,a=n!==t;if(a){let e;null===(i=s._$AQ)||void 0===i||i.call(s,t),s._$AM=t,void 0!==s._$AP&&(e=t._$AU)!==n._$AU&&s._$AP(e)}if(e!==o||a){let t=s._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return s},Se=(t,e,s=t)=>(t._$AI(e,s),t),Oe={},De=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let s=t._$AA;const i=t._$AB.nextSibling;for(;s!==i;){const t=s.nextSibling;s.remove(),s=t}},je=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Ee=Bt(class extends Ht{constructor(t){if(super(t),t.type!==qt)throw Error("repeat() can only be used in text expressions")}ht(t,e,s){let i;void 0===s?s=e:void 0!==e&&(i=e);const r=[],o=[];let n=0;for(const a of t)r[n]=i?i(a,n):n,o[n]=s(a,n),n++;return{values:o,keys:r}}render(t,e,s){return this.ht(t,e,s).values}update(t,[e,s,i]){var r;const o=t._$AH,{values:n,keys:a}=this.ht(e,s,i);if(!Array.isArray(o))return this.ut=a,n;const l=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],c=[];let h,d,p=0,u=o.length-1,g=0,b=n.length-1;for(;p<=u&&g<=b;)if(null===o[p])p++;else if(null===o[u])u--;else if(l[p]===a[g])c[g]=Se(o[p],n[g]),p++,g++;else if(l[u]===a[b])c[b]=Se(o[u],n[b]),u--,b--;else if(l[p]===a[b])c[b]=Se(o[p],n[b]),$e(t,c[b+1],o[p]),p++,b--;else if(l[u]===a[g])c[g]=Se(o[u],n[g]),$e(t,o[p],o[u]),u--,g++;else if(void 0===h&&(h=je(a,g,b),d=je(l,p,u)),h.has(l[p]))if(h.has(l[u])){const e=d.get(a[g]),s=void 0!==e?o[e]:null;if(null===s){const e=$e(t,o[p]);Se(e,n[g]),c[g]=e}else c[g]=Se(s,n[g]),$e(t,o[p],s),o[e]=null;g++}else De(o[u]),u--;else De(o[p]),p++;for(;g<=b;){const e=$e(t,c[b+1]);Se(e,n[g]),c[g++]=e}for(;p<=u;){const t=o[p++];null!==t&&De(t)}return this.ut=a,((t,e=Oe)=>{t._$AH=e})(t,c),gt}}),Le=(t,e)=>{var s,i;const r=t._$AN;if(void 0===r)return!1;for(const o of r)null===(i=(s=o)._$AO)||void 0===i||i.call(s,e,!1),Le(o,e);return!0},Me=t=>{let e,s;do{if(void 0===(e=t._$AM))break;s=e._$AN,s.delete(t),t=e}while(0===(null==s?void 0:s.size))},Ne=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(void 0===s)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),Ie(e)}};
|
|
81
81
|
/**
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2017 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
85
|
-
*/function ze(t){void 0!==this._$AN?(Me(this),this._$AM=t,Ne(this)):this._$AM=t}function Fe(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)Le(i[o],!1),Me(i[o]);else null!=i&&(Le(i,!1),Me(i));else Le(this,t)}const Ie=t=>{var e,s,i,r;t.type==qt&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Fe),null!==(s=(r=t)._$AQ)&&void 0!==s||(r._$AQ=ze))};class Te extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ne(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(Le(this,t),Me(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Ve=new WeakMap;let Re=0;const Ue=new Map,qe=new WeakSet,Be=()=>new Promise((t=>requestAnimationFrame(t))),He=[{opacity:0}],Ke=[{opacity:0},{opacity:1}],We=(t,e)=>{const s=t-e;return 0===s?void 0:s},Ze=(t,e)=>{const s=t/e;return 1===s?void 0:s},Qe={left:(t,e)=>{const s=We(t,e);return{value:s,transform:s&&`translateX(${s}px)`}},top:(t,e)=>{const s=We(t,e);return{value:s,transform:s&&`translateY(${s}px)`}},width:(t,e)=>{const s=Ze(t,e);return{value:s,transform:s&&`scaleX(${s})`}},height:(t,e)=>{const s=Ze(t,e);return{value:s,transform:s&&`scaleY(${s})`}}},Ye={duration:333,easing:"ease-in-out"},Ge=["left","top","width","height","opacity","color","background"],Je=new WeakMap;const Xe=Bt(class extends Te{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===qt)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return mt}getController(){return Ve.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this),this.element=t.element,Je.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,s;t=null!=t?t:{};const i=this.getController();void 0!==i&&((t=__spreadValues(__spreadValues({},i.defaultOptions),t)).keyframeOptions=__spreadValues(__spreadValues({},i.defaultOptions.keyframeOptions),t.keyframeOptions)),null!==(e=(s=t).properties)&&void 0!==e||(s.properties=Ge),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{var r;const o=null!==(r=e[i])&&void 0!==r?r:Qe[i]?void 0:s[i],n=Number(o);t[i]=isNaN(n)?o+"":n})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Be;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.v();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=Ue.get(this.options.inId);if(s){Ue.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[__spreadValues(__spreadValues({},this.options.in[0]),t[0]),...this.options.in.slice(1),t[1]]:t,Re++,t.forEach((t=>t.zIndex=Re))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&Ue.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await Be(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,s;t&&(null===(s=(e=this.options).onComplete)||void 0===s||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=Je.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=qe.has(this.l);return t||this.l.updateComplete.then((()=>{qe.add(this.l)})),t}A(t,e=this._()){const s=__spreadValues({},Ye);return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t=__spreadValues({},t),e=__spreadValues({},e);const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){var i;const r={},o={};let n=!1;const a={};for(const l in e){const s=t[l],c=e[l];if(l in Qe){const t=Qe[l];if(void 0===s||void 0===c)continue;const e=t(s,c);void 0!==e.transform&&(a[l]=e.value,n=!0,r.transform=`${null!==(i=r.transform)&&void 0!==i?i:""} ${e.transform}`)}else s!==c&&void 0!==s&&void 0!==c&&(n=!0,r[l]=s,o[l]=c)}return r.transformOrigin=o.transformOrigin=s?"center center":"top left",this.animatingProperties=a,n?[r,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}});var ts={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}};
|
|
85
|
+
*/function ze(t){void 0!==this._$AN?(Me(this),this._$AM=t,Ne(this)):this._$AM=t}function Fe(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)Le(i[o],!1),Me(i[o]);else null!=i&&(Le(i,!1),Me(i));else Le(this,t)}const Ie=t=>{var e,s,i,r;t.type==qt&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Fe),null!==(s=(r=t)._$AQ)&&void 0!==s||(r._$AQ=ze))};class Te extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ne(this),this.isConnected=t._$AU}_$AO(t,e=!0){var s,i;t!==this.isConnected&&(this.isConnected=t,t?null===(s=this.reconnected)||void 0===s||s.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(Le(this,t),Me(this))}setValue(t){if(void 0===this._$Ct.strings)this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Re=new WeakMap;let Ve=0;const Ue=new Map,qe=new WeakSet,Be=()=>new Promise((t=>requestAnimationFrame(t))),He=[{opacity:0}],Ke=[{opacity:0},{opacity:1}],We=(t,e)=>{const s=t-e;return 0===s?void 0:s},Ze=(t,e)=>{const s=t/e;return 1===s?void 0:s},Qe={left:(t,e)=>{const s=We(t,e);return{value:s,transform:s&&`translateX(${s}px)`}},top:(t,e)=>{const s=We(t,e);return{value:s,transform:s&&`translateY(${s}px)`}},width:(t,e)=>{const s=Ze(t,e);return{value:s,transform:s&&`scaleX(${s})`}},height:(t,e)=>{const s=Ze(t,e);return{value:s,transform:s&&`scaleY(${s})`}}},Ye={duration:333,easing:"ease-in-out"},Ge=["left","top","width","height","opacity","color","background"],Je=new WeakMap;const Xe=Bt(class extends Te{constructor(t){if(super(t),this.t=null,this.i=null,this.o=!0,this.shouldLog=!1,t.type===qt)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){var t;null===(t=this.resolveFinished)||void 0===t||t.call(this),this.finished=new Promise((t=>{this.h=t}))}async resolveFinished(){var t;null===(t=this.h)||void 0===t||t.call(this),this.h=void 0}render(t){return bt}getController(){return Re.get(this.l)}isDisabled(){var t;return this.options.disabled||(null===(t=this.getController())||void 0===t?void 0:t.disabled)}update(t,[e]){var s;const i=void 0===this.l;return i&&(this.l=null===(s=t.options)||void 0===s?void 0:s.host,this.l.addController(this),this.element=t.element,Je.set(this.element,this)),this.optionsOrCallback=e,(i||"function"!=typeof e)&&this.u(e),this.render(e)}u(t){var e,s;t=null!=t?t:{};const i=this.getController();void 0!==i&&((t={...i.defaultOptions,...t}).keyframeOptions={...i.defaultOptions.keyframeOptions,...t.keyframeOptions}),null!==(e=(s=t).properties)&&void 0!==e||(s.properties=Ge),this.options=t}v(){const t={},e=this.element.getBoundingClientRect(),s=getComputedStyle(this.element);return this.options.properties.forEach((i=>{var r;const o=null!==(r=e[i])&&void 0!==r?r:Qe[i]?void 0:s[i],n=Number(o);t[i]=isNaN(n)?o+"":n})),t}p(){let t,e=!0;return this.options.guard&&(t=this.options.guard(),e=((t,e)=>{if(Array.isArray(t)){if(Array.isArray(e)&&e.length===t.length&&t.every(((t,s)=>t===e[s])))return!1}else if(e===t)return!1;return!0})(t,this.m)),this.o=this.l.hasUpdated&&!this.isDisabled()&&!this.isAnimating()&&e&&this.element.isConnected,this.o&&(this.m=Array.isArray(t)?Array.from(t):t),this.o}hostUpdate(){var t;"function"==typeof this.optionsOrCallback&&this.u(this.optionsOrCallback()),this.p()&&(this.g=this.v(),this.t=null!==(t=this.t)&&void 0!==t?t:this.element.parentNode,this.i=this.element.nextSibling)}async hostUpdated(){if(!this.o||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let t;this.prepare(),await Be;const e=this._(),s=this.A(this.options.keyframeOptions,e),i=this.v();if(void 0!==this.g){const{from:s,to:r}=this.O(this.g,i,e);this.log("measured",[this.g,i,s,r]),t=this.calculateKeyframes(s,r)}else{const s=Ue.get(this.options.inId);if(s){Ue.delete(this.options.inId);const{from:r,to:o}=this.O(s,i,e);t=this.calculateKeyframes(r,o),t=this.options.in?[{...this.options.in[0],...t[0]},...this.options.in.slice(1),t[1]]:t,Ve++,t.forEach((t=>t.zIndex=Ve))}else this.options.in&&(t=[...this.options.in,{}])}this.animate(t,s)}resetStyles(){var t;void 0!==this.P&&(this.element.setAttribute("style",null!==(t=this.P)&&void 0!==t?t:""),this.P=void 0)}commitStyles(){var t,e;this.P=this.element.getAttribute("style"),null===(t=this.webAnimation)||void 0===t||t.commitStyles(),null===(e=this.webAnimation)||void 0===e||e.cancel()}reconnected(){}async disconnected(){var t;if(!this.o)return;if(void 0!==this.options.id&&Ue.set(this.options.id,this.g),void 0===this.options.out)return;if(this.prepare(),await Be(),null===(t=this.t)||void 0===t?void 0:t.isConnected){const t=this.i&&this.i.parentNode===this.t?this.i:null;if(this.t.insertBefore(this.element,t),this.options.stabilizeOut){const t=this.v();this.log("stabilizing out");const e=this.g.left-t.left,s=this.g.top-t.top;!("static"===getComputedStyle(this.element).position)||0===e&&0===s||(this.element.style.position="relative"),0!==e&&(this.element.style.left=e+"px"),0!==s&&(this.element.style.top=s+"px")}}const e=this.A(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){var t,e;null===(e=(t=this.options).onStart)||void 0===e||e.call(t,this)}didFinish(t){var e,s;t&&(null===(s=(e=this.options).onComplete)||void 0===s||s.call(e,this)),this.g=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}_(){const t=[];for(let e=this.element.parentNode;e;e=null==e?void 0:e.parentNode){const s=Je.get(e);s&&!s.isDisabled()&&s&&t.push(s)}return t}get isHostRendered(){const t=qe.has(this.l);return t||this.l.updateComplete.then((()=>{qe.add(this.l)})),t}A(t,e=this._()){const s={...Ye};return e.forEach((t=>Object.assign(s,t.options.keyframeOptions))),Object.assign(s,t),s}O(t,e,s){t={...t},e={...e};const i=s.map((t=>t.animatingProperties)).filter((t=>void 0!==t));let r=1,o=1;return void 0!==i&&(i.forEach((t=>{t.width&&(r/=t.width),t.height&&(o/=t.height)})),void 0!==t.left&&void 0!==e.left&&(t.left=r*t.left,e.left=r*e.left),void 0!==t.top&&void 0!==e.top&&(t.top=o*t.top,e.top=o*e.top)),{from:t,to:e}}calculateKeyframes(t,e,s=!1){var i;const r={},o={};let n=!1;const a={};for(const l in e){const s=t[l],c=e[l];if(l in Qe){const t=Qe[l];if(void 0===s||void 0===c)continue;const e=t(s,c);void 0!==e.transform&&(a[l]=e.value,n=!0,r.transform=`${null!==(i=r.transform)&&void 0!==i?i:""} ${e.transform}`)}else s!==c&&void 0!==s&&void 0!==c&&(n=!0,r[l]=s,o[l]=c)}return r.transformOrigin=o.transformOrigin=s?"center center":"top left",this.animatingProperties=a,n?[r,o]:void 0}async animate(t,e=this.options.keyframeOptions){this.start(),this.frames=t;let s=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=t=this.options.onFrames(this),this.log("modified frames",t)),void 0!==t)){this.log("animate",[t,e]),s=!0,this.webAnimation=this.element.animate(t,e);const r=this.getController();null==r||r.add(this);try{await this.webAnimation.finished}catch(i){}null==r||r.remove(this)}return this.didFinish(s),s}isAnimating(){var t,e;return"running"===(null===(t=this.webAnimation)||void 0===t?void 0:t.playState)||(null===(e=this.webAnimation)||void 0===e?void 0:e.pending)}log(t,e){this.shouldLog&&!this.isDisabled()&&console.log(t,this.options.id,e)}});var ts={core:{cancel:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"check-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',check:'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M5 13L9 17L19 7" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"emoji-puzzled":'<svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" ><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.5 15.5s1.5-2 4.5-2 4.5 2 4.5 2M3 4c0-2.754 4-2.754 4 0 0 1.967-2 1.64-2 4M5 11.01l.01-.011" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.5 9a.5.5 0 110-1 .5.5 0 010 1zM10.5 9a.5.5 0 110-1 .5.5 0 010 1z" fill="#000" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>',"info-empty":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 11.5V16.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 7.51L12.01 7.49889" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',loader:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-loader"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>',"minus-small":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">\n <path stroke-linecap="round" stroke-linejoin="round" d="M18 12H6" />\n</svg>\n',"more-horiz":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M18 12.5C18.2761 12.5 18.5 12.2761 18.5 12C18.5 11.7239 18.2761 11.5 18 11.5C17.7239 11.5 17.5 11.7239 17.5 12C17.5 12.2761 17.7239 12.5 18 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M6 12.5C6.27614 12.5 6.5 12.2761 6.5 12C6.5 11.7239 6.27614 11.5 6 11.5C5.72386 11.5 5.5 11.7239 5.5 12C5.5 12.2761 5.72386 12.5 6 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"more-vert":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 12.5C12.2761 12.5 12.5 12.2761 12.5 12C12.5 11.7239 12.2761 11.5 12 11.5C11.7239 11.5 11.5 11.7239 11.5 12C11.5 12.2761 11.7239 12.5 12 12.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 18.5C12.2761 18.5 12.5 18.2761 12.5 18C12.5 17.7239 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.7239 11.5 18C11.5 18.2761 11.7239 18.5 12 18.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 6.5C12.2761 6.5 12.5 6.27614 12.5 6C12.5 5.72386 12.2761 5.5 12 5.5C11.7239 5.5 11.5 5.72386 11.5 6C11.5 6.27614 11.7239 6.5 12 6.5Z" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"nav-arrow-down":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n',"warning-circled-outline":'<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12 7L12 13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'}};
|
|
86
86
|
/**
|
|
87
87
|
* @license
|
|
88
88
|
* Copyright 2017 Google LLC
|
|
89
89
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
-
*/class es extends Ht{constructor(t){if(super(t),this.it=mt,t.type!==qt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===mt||null==t)return this._t=void 0,this.it=t;if(t===gt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}es.directiveName="unsafeHTML",es.resultType=1;const ss=Bt(es),is=new Map,rs={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 os=!1;const ns=class{static registerIcons(t){const e=ts;for(let s in t){const i=t[s],r=e[s]||{};for(let t in i)r[t]=i[t];e[s]=r}}};let as=ns;as.fontAwesomeNext={get:async t=>{let e=t.library,s=t.name||"";const i=ts;var r,o;if("custom"==e&&(os||(os=!0,rs.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",rs.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&rs[e]){let r=rs[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;let a=o+"-"+s;if(n[a])return ss(n[a]);let l=r.url.replace("$prefix",o).replace("$name",s);if(!is.has(l)){let t=new Promise((async t=>{let e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));is.set(l,t)}let c=await is.get(l);return is.delete(l),n[a]=c||"",ss(c)}return ss(i.core[t.name]||"")}},as.default=ns.fontAwesomeNext;var ls=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,hs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?cs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ls(e,s,o),o};let ds=class extends Mt{constructor(){super(...arguments),this.renderId=0,this.iconText="",this._name="",this._prefix="",this._library=""}updateIcon(){if(!this.name)return;this.renderId++;const t=this.renderId;window.requestAnimationFrame((async()=>{t==this.renderId&&(this.iconText=await as.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}))}get name(){return this._name}set name(t){this._name=t,this.updateIcon()}get prefix(){return this._prefix}set prefix(t){this._prefix=t,this.updateIcon()}get library(){return this._library}set library(t){this._library=t,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",mt)}};ds.styles=F`:host{line-height:0;width:fit-content;height:fit-content;vertical-align:-.125em}svg{height:var(--sc-icon-size,1em);width:var(--sc-icon-size,1em)}svg:not([fill=none]){fill:currentColor}svg[fill=none]{stroke-width:2}:host([size="2xs"]) svg{--sc-icon-size:0.625em}:host([size=xs]) svg{--sc-icon-size:0.75em}:host([size=sm]) svg{--sc-icon-size:0.875em}:host([size=lg]) svg{--sc-icon-size:1.25em}:host([size=xl]) svg{--sc-icon-size:1.5em}:host([size="2xl"]) svg{--sc-icon-size:2em}:host([size="3xl"]) svg{--sc-icon-size:2.8em}`,hs([m({type:String})],ds.prototype,"name",1),hs([m({type:String})],ds.prototype,"prefix",1),hs([m({type:String})],ds.prototype,"library",1),ds=hs([u("sonic-icon")],ds);const ps=F`.custom-scroll{overflow:auto!important;overflow-y:overlay!important}.custom-scroll::-webkit-scrollbar{width:.5rem;height:.5rem;border:solid .15rem transparent;border-radius:var(--sc-rounded);background:0 0}.custom-scroll::-webkit-scrollbar-thumb{box-shadow:inset 0 0 2rem 2rem var(--sc-scrollbar-bg);border-radius:var(--sc-rounded);border:solid .15rem transparent}`;var us=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,ms=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?gs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&us(e,s,o),o};const bs={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let fs=class extends Mt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return mt}return this.visible?ut`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&ut`<sonic-icon name="${bs[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?ut`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?ss(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:mt}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),4200)}};fs.styles=[ps,F`*{box-sizing:border-box}:host{display:block;pointer-events:auto;position:relative;--sc-toast-status-color:transparent;--sc-toast-color:var(--sc-base-content);--sc-toast-bg:var(--sc-base);--sc-toast-rounded:var(--sc-rounded-md);--sc-toast-shadow:var(--sc-shadow-lg)}.fixed-area{position:fixed;bottom:1.25rem;right:1.25rem;z-index:10000;display:flex;flex-direction:column-reverse}.sonic-toast{position:relative;pointer-events:auto;overflow:hidden;line-height:1.25;color:var(--sc-toast-color);box-shadow:var(--sc-toast-shadow);border-radius:var(--sc-toast-rounded);background:var(--sc-toast-bg)}.sonic-toast-content{padding:1em 2.5rem 1em 1em;display:flex;gap:.5rem;overflow:auto;position:relative}.sonic-toast-text{align-self:center;margin-top:auto;margin-bottom:auto;max-width:70ch;line-height:1.2}.sonic-toast-text a,::slotted(a:not(.btn)){color:inherit!important;text-decoration:underline!important;text-underline-offset:.15rem}.sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6),::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6)){margin:0 0 .3em!important}.sonic-toast-text li,::slotted(li){margin-bottom:.15em!important}.sonic-toast-text>:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child,::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child){margin-bottom:0!important}.sonic-toast-close{all:unset;position:absolute;z-index:4;pointer-events:initial;right:.5em;top:.5em;width:1.5rem;height:1.5rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;text-align:center;opacity:.5;background:rgba(0,0,0,0)}.sonic-toast-close:focus,.sonic-toast-close:hover{opacity:1;background:rgba(0,0,0,.075)}.sonic-toast-close svg{width:1rem;height:1rem;object-fit:contain;object-position:center center}.sonic-toast-title{font-weight:700;font-size:1.15rem;margin:.15em 0 .25em;line-height:1.2}.success{--sc-toast-status-color:var(--sc-success);--sc-toast-title-color:var(--sc-toast-status-color)}.error{--sc-toast-status-color:var(--sc-danger);--sc-toast-title-color:var(--sc-toast-status-color)}.warning{--sc-toast-status-color:var(--sc-warning);--sc-toast-title-color:var(--sc-toast-status-color)}.info{--sc-toast-status-color:var(--sc-info);--sc-toast-title-color:var(--sc-toast-status-color)}.error,.info,.success,.warning{border-top:3px solid var(--sc-toast-status-color,currentColor)}.sonic-toast:before{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.05;pointer-events:none;transition:.2s;border-radius:var(--sc-toast-rounded);background-color:var(--sc-toast-status-color)}.sonic-toast:hover:before{opacity:.025}.error .sonic-toast-icon,.info .sonic-toast-icon,.success .sonic-toast-icon,.warning .sonic-toast-icon{color:var(--sc-toast-status-color,currentColor)}.sonic-toast-icon{position:sticky;top:0}.ghost{opacity:.85;pointer-events:none}`],ms([m({type:String})],fs.prototype,"title",2),ms([m({type:String})],fs.prototype,"id",2),ms([m({type:String})],fs.prototype,"text",2),ms([m({type:String})],fs.prototype,"status",2),ms([m({type:Boolean})],fs.prototype,"ghost",2),ms([m({type:Boolean})],fs.prototype,"preserve",2),ms([m({type:Boolean})],fs.prototype,"dismissForever",2),ms([m({type:String})],fs.prototype,"maxHeight",2),ms([b()],fs.prototype,"visible",2),fs=ms([u("sonic-toast-item")],fs);var vs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,ws=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ys(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vs(e,s,o),o};let _s=class extends Mt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e=__spreadProps(__spreadValues({},e),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?ut`<div aria-live="polite" style="${Kt(e)}">${je(this.toasts,(t=>t.id),(e=>ut`<sonic-toast-item maxHeight="${t?"none":"10rem"}" status="${ue(e.status)}" title="${ue(e.title)}" ?ghost="${e.ghost}" ?dismissForever="${e.dismissForever}" ?preserve="${e.preserve}" id="${ue(e.id)}" @hide="${()=>this.removeItem(e)}" ${Xe({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${e.text?ss(e.text):""}</sonic-toast-item>`))}</div>`:mt}static removeAll(){let t=document.querySelector("sonic-toast");t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static add(t){var e;if(!document.querySelector("sonic-toast")){let t=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(t)}let i=document.querySelector("sonic-toast");const r=null!=(e=t.id)?e:(new Date).valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:r,text:t.text,title:t.title,status:t.status,preserve:!!o||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(i.toasts.length>0){let t=__spreadValues({},n);for(const e of i.toasts){let i=__spreadValues({},e);if(t.id=i.id=0,s.shallowEqual(t,i))return null}}return i.toasts=[...i.toasts,n],n}static removeItem(t){let e=document.querySelector("sonic-toast");e&&(console.log(t),e.removeItem(t))}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e=__spreadValues({},e)).id,!s.shallowEqual(e,t,!1)))))}};ws([m({type:Array})],_s.prototype,"toasts",2),_s=ws([u("sonic-toast")],_s),"undefined"!=typeof window&&(window.SonicToast=_s);var xs=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,As=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xs(e,s,o),o};const Ps=(t,e)=>{class i extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled)return;if(this.api=new r(this.getApiConfiguration()),!this.api)return;let t;this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.isLoading=!0,this.requestUpdate();let e=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");e&&Ae.show();let i=ae.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(t=await this.api.get(this.endPoint||this.dataProvider||"",i),!t)return _s.add({text:"Network Error",status:"error"}),this.isLoading=!1,void(e&&Ae.hide());if(t._sonic_http_response_&&!t._sonic_http_response_.ok&&1===Object.keys(t).length&&_s.add({text:"Network Error",status:"error"}),e&&Ae.hide(),this.key){let e=t._sonic_http_response_;t=s.traverse(t,this.key.split("."),this.hasAttribute("preserveOtherKeys")),t&&s.isObject(t)&&e&&(t._sonic_http_response_=e)}this.props=t,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;if(!this.isFetchEnabled)return void super.connectedCallback();super.connectedCallback(),this.key=this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate);null===this.getAttribute("lazyload")&&this._fetchData()}firstUpdated(){if(null===this.getAttribute("lazyload"))return;let t={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),t);let e=this,s=this.shadowRoot?this.shadowRoot.children[0]:e.children[0];s&&"slot"==s.nodeName.toLocaleLowerCase()&&(s=s.children[0]),s&&"template"!=s.nodeName.toLocaleLowerCase()||(s=document.createElement("span"),e.appendChild(s)),s?this.iObserver.observe(s):this.isFirstLoad&&this._fetchData()}onIntersection(t){for(const e of t)e.isIntersecting&&this.isFirstLoad&&this._fetchData()}}return As([m({type:String})],i.prototype,"endPoint",1),As([m()],i.prototype,"requestId",2),As([m({type:Number})],i.prototype,"refetchEveryMs",2),i};var Cs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor;let Ss=class extends(Ps(S(Mt))){render(){return ut`<slot></slot>`}};Ss.styles=[F`:host{display:contents}`],Ss=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?$s(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Cs(e,s,o),o})([u("sonic-fetch")],Ss);var Os=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Es=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ds(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Os(e,s,o),o};let js=class extends Mt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?ut`<slot></slot>`:mt}};js.styles=F`:host{display:contents}`,Es([m({type:Boolean})],js.prototype,"condition",2),js=Es([u("sonic-if")],js);
|
|
90
|
+
*/class es extends Ht{constructor(t){if(super(t),this.it=bt,t.type!==qt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===bt||null==t)return this._t=void 0,this.it=t;if(t===gt)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}es.directiveName="unsafeHTML",es.resultType=1;const ss=Bt(es),is=new Map,rs={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 os=!1;const ns=class{static registerIcons(t){const e=ts;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};let as=ns;as.fontAwesomeNext={get:async t=>{const e=t.library,s=t.name||"",i=ts;var r,o;if("custom"==e&&(os||(os=!0,rs.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",rs.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&rs[e]){const r=rs[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return ss(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(!is.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));is.set(l,t)}const c=await is.get(l);return is.delete(l),n[a]=c||"",ss(c)}return ss(i.core[t.name]||"")}},as.default=ns.fontAwesomeNext;var ls=Object.defineProperty,cs=Object.getOwnPropertyDescriptor,hs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?cs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ls(e,s,o),o};let ds=class extends Mt{constructor(){super(...arguments),this.renderId=0,this.iconText="",this._name="",this._prefix="",this._library=""}updateIcon(){if(!this.name)return;this.renderId++;const t=this.renderId;window.requestAnimationFrame((async()=>{t==this.renderId&&(this.iconText=await as.default.get({name:this.name,prefix:this.prefix,library:this.library}),this.requestUpdate())}))}get name(){return this._name}set name(t){this._name=t,this.updateIcon()}get prefix(){return this._prefix}set prefix(t){this._prefix=t,this.updateIcon()}get library(){return this._library}set library(t){this._library=t,this.updateIcon()}render(){return this.name?(this.style.removeProperty("display"),this.iconText):(this.style.display="none",bt)}};ds.styles=F`:host{line-height:0;width:fit-content;height:fit-content;vertical-align:-.125em}svg{height:var(--sc-icon-size,1em);width:var(--sc-icon-size,1em)}svg:not([fill=none]){fill:currentColor}svg[fill=none]{stroke-width:2}:host([size="2xs"]) svg{--sc-icon-size:0.625em}:host([size=xs]) svg{--sc-icon-size:0.75em}:host([size=sm]) svg{--sc-icon-size:0.875em}:host([size=lg]) svg{--sc-icon-size:1.25em}:host([size=xl]) svg{--sc-icon-size:1.5em}:host([size="2xl"]) svg{--sc-icon-size:2em}:host([size="3xl"]) svg{--sc-icon-size:2.8em}`,hs([b({type:String})],ds.prototype,"name",1),hs([b({type:String})],ds.prototype,"prefix",1),hs([b({type:String})],ds.prototype,"library",1),ds=hs([u("sonic-icon")],ds);const ps=F`.custom-scroll{overflow:auto!important;overflow-y:overlay!important}.custom-scroll::-webkit-scrollbar{width:.5rem;height:.5rem;border:solid .15rem transparent;border-radius:var(--sc-rounded);background:0 0}.custom-scroll::-webkit-scrollbar-thumb{box-shadow:inset 0 0 2rem 2rem var(--sc-scrollbar-bg);border-radius:var(--sc-rounded);border:solid .15rem transparent}`;var us=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,bs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?gs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&us(e,s,o),o};const ms={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"};let fs=class extends Mt{constructor(){super(...arguments),this.title="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.visible=!0}render(){if(this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(t)[this.id])return bt}return this.visible?ut`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&ut`<sonic-icon name="${ms[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?ut`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?ss(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:bt}hide(){if(this.closest("sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout((()=>{this.hide()}),4200)}};fs.styles=[ps,F`*{box-sizing:border-box}:host{display:block;pointer-events:auto;position:relative;--sc-toast-status-color:transparent;--sc-toast-color:var(--sc-base-content);--sc-toast-bg:var(--sc-base);--sc-toast-rounded:var(--sc-rounded-md);--sc-toast-shadow:var(--sc-shadow-lg)}.fixed-area{position:fixed;bottom:1.25rem;right:1.25rem;z-index:10000;display:flex;flex-direction:column-reverse}.sonic-toast{position:relative;pointer-events:auto;overflow:hidden;line-height:1.25;color:var(--sc-toast-color);box-shadow:var(--sc-toast-shadow);border-radius:var(--sc-toast-rounded);background:var(--sc-toast-bg)}.sonic-toast-content{padding:1em 2.5rem 1em 1em;display:flex;gap:.5rem;overflow:auto;position:relative}.sonic-toast-text{align-self:center;margin-top:auto;margin-bottom:auto;max-width:70ch;line-height:1.2}.sonic-toast-text a,::slotted(a:not(.btn)){color:inherit!important;text-decoration:underline!important;text-underline-offset:.15rem}.sonic-toast-text :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6),::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6)){margin:0 0 .3em!important}.sonic-toast-text li,::slotted(li){margin-bottom:.15em!important}.sonic-toast-text>:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child,::slotted(:is(p,ul,ol,hr,h1,h2,h3,h4,h5,h6):last-child){margin-bottom:0!important}.sonic-toast-close{all:unset;position:absolute;z-index:4;pointer-events:initial;right:.5em;top:.5em;width:1.5rem;height:1.5rem;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;text-align:center;opacity:.5;background:rgba(0,0,0,0)}.sonic-toast-close:focus,.sonic-toast-close:hover{opacity:1;background:rgba(0,0,0,.075)}.sonic-toast-close svg{width:1rem;height:1rem;object-fit:contain;object-position:center center}.sonic-toast-title{font-weight:700;font-size:1.15rem;margin:.15em 0 .25em;line-height:1.2}.success{--sc-toast-status-color:var(--sc-success);--sc-toast-title-color:var(--sc-toast-status-color)}.error{--sc-toast-status-color:var(--sc-danger);--sc-toast-title-color:var(--sc-toast-status-color)}.warning{--sc-toast-status-color:var(--sc-warning);--sc-toast-title-color:var(--sc-toast-status-color)}.info{--sc-toast-status-color:var(--sc-info);--sc-toast-title-color:var(--sc-toast-status-color)}.error,.info,.success,.warning{border-top:3px solid var(--sc-toast-status-color,currentColor)}.sonic-toast:before{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.05;pointer-events:none;transition:.2s;border-radius:var(--sc-toast-rounded);background-color:var(--sc-toast-status-color)}.sonic-toast:hover:before{opacity:.025}.error .sonic-toast-icon,.info .sonic-toast-icon,.success .sonic-toast-icon,.warning .sonic-toast-icon{color:var(--sc-toast-status-color,currentColor)}.sonic-toast-icon{position:sticky;top:0}.ghost{opacity:.85;pointer-events:none}`],bs([b({type:String})],fs.prototype,"title",2),bs([b({type:String})],fs.prototype,"id",2),bs([b({type:String})],fs.prototype,"text",2),bs([b({type:String})],fs.prototype,"status",2),bs([b({type:Boolean})],fs.prototype,"ghost",2),bs([b({type:Boolean})],fs.prototype,"preserve",2),bs([b({type:Boolean})],fs.prototype,"dismissForever",2),bs([b({type:String})],fs.prototype,"maxHeight",2),bs([m()],fs.prototype,"visible",2),fs=bs([u("sonic-toast-item")],fs);var vs=Object.defineProperty,ys=Object.getOwnPropertyDescriptor,ws=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ys(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vs(e,s,o),o};let xs=class extends Mt{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const t=!(window.parent==window);let e={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return t||(e={...e,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),this.toasts?ut`<div aria-live="polite" style="${Kt(e)}">${Ee(this.toasts,(t=>t.id),(e=>ut`<sonic-toast-item maxHeight="${t?"none":"10rem"}" status="${ue(e.status)}" title="${ue(e.title)}" ?ghost="${e.ghost}" ?dismissForever="${e.dismissForever}" ?preserve="${e.preserve}" id="${ue(e.id)}" @hide="${()=>this.removeItem(e)}" ${Xe({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${e.text?ss(e.text):""}</sonic-toast-item>`))}</div>`:bt}static removeAll(){const t=document.querySelector("sonic-toast");t&&(t.toasts=t.toasts.filter((t=>t.ghost)))}static add(t){var e;if(!document.querySelector("sonic-toast")){const t=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(t)}const i=document.querySelector("sonic-toast"),r=null!=(e=t.id)?e:(new Date).valueOf(),o=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>").test(t.text),n={id:r,text:t.text,title:t.title,status:t.status,preserve:!!o||t.preserve,ghost:t.ghost,dismissForever:t.dismissForever};if(t.dismissForever&&t.id){const e=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(e)[t.id])return null}if(i.toasts.length>0){const t={...n};for(const e of i.toasts){const i={...e};if(t.id=i.id=0,s.shallowEqual(t,i))return null}}return i.toasts=[...i.toasts,n],n}static removeItem(t){const e=document.querySelector("sonic-toast");e&&e.removeItem(t)}removeItem(t){t&&(this.toasts=this.toasts.filter((e=>(delete(e={...e}).id,!s.shallowEqual(e,t,!1)))))}};ws([b({type:Array})],xs.prototype,"toasts",2),xs=ws([u("sonic-toast")],xs),"undefined"!=typeof window&&(window.SonicToast=xs);var _s=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,As=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_s(e,s,o),o};const Ps=(t,e)=>{class i extends t{constructor(...t){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isDefaultLoaderEnabled=!0,this.isFetchEnabled=!0,this._endPoint="",this.requestId=0,this.refetchEveryMs=0,this.dataProvider=""}get props(){return super.props}set props(t){super.props=t}set endPoint(t){this._endPoint=t,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}async _fetchData(){if(!this.isFetchEnabled)return;if(this.api=new r(this.getApiConfiguration()),!this.api)return;this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.isLoading=!0,this.requestUpdate();const t=this.isDefaultLoaderEnabled&&!this.hasAttribute("noLoader");t&&Ae.show();const e=ae.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();let i=await this.api.get(this.endPoint||this.dataProvider||"",e);if(!i)return xs.add({text:"Network Error",status:"error"}),this.isLoading=!1,void(t&&Ae.hide());if(i._sonic_http_response_&&!i._sonic_http_response_.ok&&1===Object.keys(i).length&&xs.add({text:"Network Error",status:"error"}),t&&Ae.hide(),this.key){const t=i._sonic_http_response_;i=s.traverse(i,this.key.split("."),this.hasAttribute("preserveOtherKeys")),i&&s.isObject(i)&&t&&(i._sonic_http_response_=t)}this.props=i,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout((()=>this._fetchData()),this.refetchEveryMs))}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this.publisher)||t.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){var t;if(!this.isFetchEnabled)return void super.connectedCallback();super.connectedCallback(),this.key=this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),null==(t=this.publisher)||t.onInvalidate(this.onInvalidate);null===this.getAttribute("lazyload")&&this._fetchData()}firstUpdated(){if(null===this.getAttribute("lazyload"))return;const t={root:null,rootMargin:Math.max(window.innerWidth,window.innerHeight)+"px"};this.iObserver=new IntersectionObserver((t=>this.onIntersection(t)),t);let e=this.shadowRoot?this.shadowRoot.children[0]:this.children[0];e&&"slot"==e.nodeName.toLocaleLowerCase()&&(e=e.children[0]),e&&"template"!=e.nodeName.toLocaleLowerCase()||(e=document.createElement("span"),this.appendChild(e)),e?this.iObserver.observe(e):this.isFirstLoad&&this._fetchData()}onIntersection(t){for(const e of t)e.isIntersecting&&this.isFirstLoad&&this._fetchData()}}return As([b()],i.prototype,"props",1),As([b({type:String})],i.prototype,"endPoint",1),As([b()],i.prototype,"requestId",2),As([b({type:Number})],i.prototype,"refetchEveryMs",2),i};var Cs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor;let Ss=class extends(Ps(S(Mt))){render(){return ut`<slot></slot>`}};Ss.styles=[F`:host{display:contents}`],Ss=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?$s(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Cs(e,s,o),o})([u("sonic-fetch")],Ss);var Os=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ds(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Os(e,s,o),o};let Es=class extends Mt{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?ut`<slot></slot>`:bt}};Es.styles=F`:host{display:contents}`,js([b({type:Boolean})],Es.prototype,"condition",2),Es=js([u("sonic-if")],Es);
|
|
91
91
|
/**
|
|
92
92
|
* @license
|
|
93
93
|
* Copyright 2020 Google LLC
|
|
94
94
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
95
95
|
*/
|
|
96
|
-
const Ls=Bt(class extends Ht{constructor(t){if(super(t),t.type!==qt)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?gt:(this.ft=t,document.importNode(t.content,!0))}});var Ms=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor;let zs=class extends(S(Mt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return ut`<slot></slot>`}};zs=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ns(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ms(e,s,o),o})([u("sonic-subscriber")],zs);var Fs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,Ts=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Is(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Fs(e,s,o),o};let Vs=class extends(Ps(S(E(Mt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}renderLoadingState(){return this.templateParts.skeleton?Ls(this.templateParts.skeleton):ut`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return ut`<div style="color:var(--sc-base-400);font-size:1.5em;margin:4rem 0;display:flex;gap:.5rem"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span></div>`}formatProps(){let t=this.props,e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(t=s?Object.entries(t).map((([t,e])=>({key:t,value:e}))):!e||e.ok?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!s.isObject(this.props))return ut`<div></div>`;let t=this.formatProps();if(0==t.length&&this.templateParts["no-item"])return Ls(this.templateParts["no-item"]);const e=this.templateList.length;let i=-1;const r=this.hasAttribute("extractValues"),o=this.templateParts.separator,n=t.length;return ut`${t.map(((t,s)=>{let a=t[this.templateKey],l=a&&this.templateParts[a],c=r?null==t?void 0:t[this.idKey]:s;if("_sonic_http_response_"==c)return mt;let h=this.publisher[c];h._key_=c+"",i++;const d=s<n-1;return l&&(i=-1),t&&ut`<sonic-subscriber ?debug="${!0===this.defferedDebug}" .bindPublisher="${function(){return h}}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${c}">${Ls(l?this.templateParts[a]:this.templateList[i%e])}</sonic-subscriber>${o&&d?Ls(o):mt}`}))}`}};Ts([m({type:Object})],Vs.prototype,"itemPropertyMap",2),Ts([m({type:String})],Vs.prototype,"templateKey",2),Ts([m({type:String})],Vs.prototype,"idKey",2),Vs=Ts([u("sonic-list")],Vs);var Rs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,qs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Us(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rs(e,s,o),o};let Bs=class extends(S(Mt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.targetRequestDuration=500,this.limit=5,this.offset=0,this.resultCount=0,this.filteredFields="",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(let t of this.listDataProviders)c.delete(t);super.disconnectedCallback()}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProviderExpression||(this.dataProviderExpression=ie.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.dataProvider||(this.dataProvider="sonic-queue-"+Bs.instanceCounter++),this.configFilter(),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),this.next()}configFilter(){var t;let e=this.getAncestorAttributeValue("dataFilterProvider");e&&(this.filterPublisher=c.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{var t;0!=Object.keys(null==(t=this.filterPublisher)?void 0:t.get()).length&&this.updateFilteredContent()})))}updateFilteredContent(){var t;let e=this.dataProviderExpression.split("?");e.shift();let s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(let n in i)this.filteredFields&&!r.includes(n)||null==i[n]||s.set(n,i[n]);let o=s.toString();if(o!=this.searchHash){this.searchHash=o;for(let t of this.listDataProviders)c.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((()=>{let t=this.resultCount;this.props=null,this.resultCount=t,this.requestId++,this.next()}),250)}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e,s;let i=this.offset;const r=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId!=this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];i=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{let t=[];t.resultCount=this.resultCount,this.props=t}r>0&&t&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let o=this.dataProviderExpression.replace("$offset",i+"").replace("$limit",this.limit+""),n=o.split("?"),a=n.shift(),l=new URLSearchParams(n.join("?")),c=null==(e=this.filterPublisher)?void 0:e.get(),h=this.filteredFields.split(" ");for(let p in c)this.filteredFields&&!h.includes(p)||null==c[p]||l.set(p,c[p]);o=a+"?"+l.toString(),this.listDataProviders.push(o),this.currentScrollPosition=null==(s=document.scrollingElement)?void 0:s.scrollTop;let d=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:o,offset:i,limit:this.limit}];d.resultCount=this.resultCount,this.props=d,this.lastRequestTime=(new Date).getTime()}render(){return this.currentScrollPosition&&window.requestAnimationFrame((()=>{document.scrollingElement&&(document.scrollingElement.scrollTop=this.currentScrollPosition),this.currentScrollPosition=void 0})),Array.isArray(this.props)?ut`${je(this.props,(t=>t.id),((t,e)=>{var s;let i=0==e?this.templates:null==(s=this.templates)?void 0:s.filter((t=>"no-item"!=t.getAttribute("data-value")));return ut`<sonic-list fetch displayContents lazyload requestId="${this.requestId}" ?itemPropertyMap="${this.itemPropertyMap}" ?debug="${!0===this.defferedDebug}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${t.dataProvider}" idKey="${this.idKey}" .templates="${i}"></sonic-list>`}))}`:mt}};Bs.instanceCounter=0,qs([m({type:Array})],Bs.prototype,"templates",2),qs([m({type:Object})],Bs.prototype,"itemPropertyMap",2),qs([m()],Bs.prototype,"targetRequestDuration",2),qs([m()],Bs.prototype,"limit",2),qs([m()],Bs.prototype,"offset",2),qs([m()],Bs.prototype,"resultCount",2),qs([m()],Bs.prototype,"filteredFields",2),qs([m({type:String})],Bs.prototype,"dataProviderExpression",2),qs([m({type:String})],Bs.prototype,"idKey",2),Bs=qs([u("sonic-queue")],Bs);var Hs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ws=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Hs(e,s,o),o};let Zs=class extends(S(Mt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new r(this.getApiConfiguration())}submitNativeForm(){const t=ie.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider");let s=c.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}let i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t,e,i;const r=c.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(r.isFormValid=!0,r.invalidate(),!r.isFormValid.get())return;if(this.publisher&&(this.publisher.disabled=!0),r.isFormValid,this.hasAttribute("native"))return void this.submitNativeForm();let o=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",n=this.hasAttribute("sendAsFormData"),a=r.get();delete a.isFormValid;const l=this.getAncestorAttributeValue("headersDataProvider"),h=l?c.getInstance().get(l):null;let d={};h&&(d=h.get());let p=null,u=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||u;Ae.show();let m=async()=>{var t,e,i,r,l,h,u;if(n)p=await(null==(t=this.api)?void 0:t.submitFormData(g,a,o,d));else switch(o){case"put":p=await(null==(e=this.api)?void 0:e.put(g,a,d));break;case"delete":p=await(null==(i=this.api)?void 0:i.delete(g,a,d));break;case"get":p=await(null==(r=this.api)?void 0:r.get(g,d));break;default:p=await(null==(l=this.api)?void 0:l.post(g,a,d))}Ae.hide(),p?p._sonic_http_response_&&!p._sonic_http_response_.ok&&1===Object.keys(p).length&&(p.messages=[{content:"Network Error",status:"error"}]):p={messages:[{content:"Network Error",status:"error"}]};let m=this.getAncestorAttributeValue("clearedDataOnSuccess");m&&m.split(" ").forEach((t=>c.get(t).set({})));let b=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(u=null==(h=this.api)?void 0:h.lastResult)?void 0:u.ok)&&a[b]&&a[f]&&this.saveCredentials(a[b],a[f]),this.submitResultKey&&(p=s.traverse(p,this.submitResultKey.split("."),!0));let v=this.getAncestorAttributeValue("submitResultDataProvider");v&&c.get(v).set(p),this.publisher&&(this.publisher.disabled=null)},b=(null==h?void 0:h.needsCaptchaValidation.get())?h:r.needsCaptchaValidation.get()?r:null;if(b){b.captchaMethod=o,b.captchaAction=null!=(i=null!=(e=null==u?void 0:u.split("?")[0])?e:this.getAncestorAttributeValue("formDataProvider"))?i:"submit",b.captchaToken="request_token";let t=e=>{"request_token"!=e&&(m(),b.captchaToken.offAssign(t))};b.captchaToken.onAssign(t)}else m()}async saveCredentials(t,e){if("PasswordCredential"in window){let s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return ut`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Zs.styles=F`[data-disabled]{opacity:.3;pointer-events:none;user-select:none}`,Ws([m({type:String})],Zs.prototype,"submitResultKey",2),Ws([m({type:Boolean})],Zs.prototype,"disabled",2),Ws([m({type:String})],Zs.prototype,"endPoint",2),Ws([m()],Zs.prototype,"name",2),Ws([m()],Zs.prototype,"value",2),Zs=Ws([u("sonic-submit")],Zs);var Qs,Ys,Gs,Js,Xs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ti={exports:{}};Qs=ti,Js=[].slice,Ys=Xs,Gs=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?Js.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?Js.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?Js.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==ti.exports?Qs.exports=Gs():Ys.UrlPattern=Gs();var ei=ti.exports,si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ii(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&si(e,s,o),o};let oi=class extends(S(E(Mt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",Rt.onChange(this),super.connectedCallback()}disconnectedCallback(){Rt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){let t=[];for(let e of this.templatePartsList){let s=e.getAttribute(this.templateValueAttribute),i=new RegExp(s),r=new ei(s);i.test(this.location)?t.push(e):r.match(this.location)&&(e.setAttribute("mode","patternMatching"),t.push(e))}return ut`${je(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="",i=t.getAttribute("dataProviderExpression");if("patternMatching"==t.getAttribute("mode")){const e=new ei(t.getAttribute(this.templateValueAttribute));s=new ei(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute));let o=(this.location+"").match(r);o&&(s=null==(e=o.shift())?void 0:e.replace(r,i))}return ut`<div style="display:contents" dataProvider="${s}">${Ls(t)}</div>`}return Ls(t)}))}`}};ri([m()],oi.prototype,"location",1),oi=ri([u("sonic-router")],oi);var ni=Object.defineProperty,ai=Object.getOwnPropertyDescriptor;let li=class extends(S(Mt)){constructor(){super(...arguments),this.udpateCallBack=()=>{}}connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void Rt.changeFromComponent(this);if(!this.props)return;let t=this.getAttribute("onData").split("."),e=s.traverse(this.props,t);!e||s.isObject(e)&&e||Rt.changeFromComponent(this)}};li=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ai(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ni(e,s,o),o})([u("sonic-redirect")],li);var ci=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,di=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?hi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ci(e,s,o),o};let pi=class extends(S(E(Mt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;let t=this.statePath.split(".");for(let e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){let t=[],e=this.state;(!Array.isArray(e)&&s.isObject(e)||void 0===e)&&(e="");for(let s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;if(this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{let e=new ei(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return ut`${je(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let i=t.getAttribute("dataProviderExpression"),r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new ei(n);r=new ei(i).stringify(t.match(o))}else{const t=new RegExp(n);let e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return ut`<div style="display:contents" dataProvider="${r}">${Ls(t)}</div>`}return Ls(t)}))}`}};di([m()],pi.prototype,"state",2),di([m({type:Boolean,reflect:!0})],pi.prototype,"inverted",2),pi=di([u("sonic-states")],pi);var ui=Object.defineProperty,gi=Object.getOwnPropertyDescriptor;let mi=class extends Mt{createRenderRoot(){return this}render(){return ut`<slot></slot>`}};mi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?gi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ui(e,s,o),o})([u("sonic-scope")],mi);var bi=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,vi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bi(e,s,o),o};let yi=class extends(S(Mt)){constructor(){super(...arguments),this.text="Example"}render(){return ut`<div>${this.text}</div>`}};vi([m()],yi.prototype,"text",2),yi=vi([u("sonic-example")],yi);var wi={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 _i{constructor(){}async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(let s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(let s of e.transforms)this.transformAction(s)}transformAction(t){let e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];let s=e.nodes;if(!s)return[];let i=[],r=0;for(let o of t)for(let t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){let s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(let a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;let o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(let a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(let r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;let l=__spreadValues({},t.ui);l.nodes||(l.nodes=[]);let c=0;for(let d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;let h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(let r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));let o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(let o of e){let e=__spreadValues({},t.ui);e.attributes||(e.attributes={});let n=o.child.attributes;if(n)for(let t in n)e.attributes.hasOwnProperty("key")||(e.attributes[t]=n[t]);let a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(let t of a)!e.hasOwnProperty(t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);let h=o.child.nodes;if(h)for(let t of h)e.nodes.push(t);let d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(let i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;let i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));let r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push(__spreadValues({},t.ui))):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,__spreadValues({},t.ui)))}}var xi=Object.defineProperty,ki=Object.getOwnPropertyDescriptor,Ai=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ki(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xi(e,s,o),o};const Pi=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;let s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return Ai([m()],e.prototype,"forceAutoFill",2),Ai([m({type:String})],e.prototype,"type",1),Ai([m()],e.prototype,"description",1),Ai([m()],e.prototype,"label",1),Ai([m({type:Number})],e.prototype,"tabindex",2),Ai([m({type:String})],e.prototype,"autocomplete",2),e},Ci=Ps,$i=pe,Si=Gt,Oi=Pi,Di=S,Ei=E;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Ci,FormCheckable:$i,FormElement:Si,FormInput:Oi,Subscriber:Di,TemplatesContainer:Ei};var ji=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,Mi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Li(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ji(e,s,o),o};let Ni=class extends(Ci(Di(Mt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}get props(){return super.props}set props(t){if(t===this.props)return;super.props=t;let e=this.sduiKey?t[this.sduiKey]:t;this.sduiDescriptor!=e&&(this.sduiDescriptor=e,this.updateContents())}async updateContents(){if(!this.sduiDescriptor)return;let t={};Object.assign(t,wi,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)ie.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)ie.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;let t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new _i;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;let t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);let e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){let e=t.tagName||"div",{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){let i=t.nodes;for(let t of i){let i=this.parseChild(t),r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});let e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){let s=t.attributes;for(let i in s){let t=s[i],r=oe.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){let i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};Mi([m()],Ni.prototype,"sduiKey",2),Mi([m()],Ni.prototype,"messagesKey",2),Mi([m()],Ni.prototype,"props",1),Ni=Mi([u("sonic-sdui")],Ni);var zi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Ii=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zi(e,s,o),o};let Ti=class extends(Di(Mt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){let t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(let s in t){let i=t[s];if("string"==typeof i){let t=i.split("."),r=ae.get(t.shift());r=oe.traverse(r,t);let o={publisher:r,subscriber:t=>{e[s]=t}};this.listeners.push(o),r.onAssign(o.subscriber),e._proxies_.set(s,r)}else{this.publisher[s]={};let t=new a({},e);e._proxies_.set(s,t);let r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return ut`<slot></slot>`}};Ti.styles=[F`:host{display:contents}`],Ii([m({type:Object})],Ti.prototype,"composition",1),Ti=Ii([u("sonic-mix")],Ti);var Vi=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor;let Ui=class extends(Di(Mt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"string"!=typeof this.props?ut`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:ut`${ss(this.props)}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Ui=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ri(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vi(e,s,o),o})([u("sonic-value")],Ui);const qi=F`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base);--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity));--sc-placeholder-bg:rgba(17, 24, 39, 0.05);--sc-shadow-sm:0 1px 3px 0 rgb(0 0 0 / 0.1),0 1px 2px -1px rgb(0 0 0 / 0.1);--sc-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);--sc-shadow-lg:0 10px 15px 0px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);--sc-shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);--sc-shadow-2xl:0 25px 50px -12px rgb(0 0 0 / 0.25);--sc-border-width:max(1px, 0.12rem);--sc-border-color:var(--sc-base-200);--sc-form-height:2.5em;--sc-form-border-width:var(--sc-border-width);--sc-input-bg:var(--sc-base-100);--sc-input-border-color:var(--sc-input-bg);--sc-input-rounded-intensity:1.4;--sc-input-rounded:calc(
|
|
96
|
+
const Ls=Bt(class extends Ht{constructor(t){if(super(t),t.type!==qt)throw Error("templateContent can only be used in child bindings")}render(t){return this.ft===t?gt:(this.ft=t,document.importNode(t.content,!0))}});var Ms=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor;let zs=class extends(S(Mt)){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),0==this.children.length?this.style.display="none":this.style.display="contents"}render(){return ut`<slot></slot>`}};zs=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ns(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ms(e,s,o),o})([u("sonic-subscriber")],zs);var Fs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,Ts=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Is(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Fs(e,s,o),o};let Rs=class extends(Ps(S(j(Mt)))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id"}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isDefaultLoaderEnabled=!1,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}renderLoadingState(){return this.templateParts.skeleton?Ls(this.templateParts.skeleton):ut`<sonic-loader mode="inline"></sonic-loader>`}renderNoResultState(){return ut`<div style="color:var(--sc-base-400);font-size:1.5em;margin:4rem 0;display:flex;gap:.5rem"><sonic-icon name="emoji-puzzled" size="lg"></sonic-icon><span class="sonic-no-result-text">${"string"==typeof this.props&&""==this.props?"Aucun résultat":this.props}</span></div>`}formatProps(){let t=this.props;if(null==t)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(t=s?Object.entries(t).map((([t,e])=>({key:t,value:e}))):!e||e.ok?[t]:[]),t=t.filter((t=>null!=t)),e&&(t._sonic_http_response_=e),t}render(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if("string"==typeof this.props)return this.renderNoResultState();if(!s.isObject(this.props))return ut`<div></div>`;const t=this.formatProps();if(0==((null==t?void 0:t.length)||0)&&this.templateParts["no-item"])return Ls(this.templateParts["no-item"]);const e=this.templateList.length;let i=-1;const r=this.hasAttribute("extractValues"),o=this.templateParts.separator,n=(null==t?void 0:t.length)||0;return ut`${null==t?void 0:t.map(((t,s)=>{if(null==t)return bt;if("object"!=typeof t||Array.isArray(t))return bt;const a=t[this.templateKey];let l=null;a&&"string"==typeof a&&(l=this.templateParts[a]);const c=r?null==t?void 0:t[this.idKey]:s;if("_sonic_http_response_"==c)return bt;if("string"!=typeof c&&"number"!=typeof c)return bt;const h=this.publisher[c];h._key_=c+"",i++;const d=s<n-1;return l&&(i=-1),t&&ut`<sonic-subscriber ?debug="${!0===this.defferedDebug}" .bindPublisher="${function(){return h}}" .propertyMap?="${this.itemPropertyMap}" dataProvider="${this.dataProvider}/list-item/${c}">${Ls(l||this.templateList[i%e])}</sonic-subscriber>${o&&d?Ls(o):bt}`}))}`}};Ts([b({type:Object})],Rs.prototype,"itemPropertyMap",2),Ts([b({type:String})],Rs.prototype,"templateKey",2),Ts([b({type:String})],Rs.prototype,"idKey",2),Rs=Ts([u("sonic-list")],Rs);var Vs=Object.defineProperty,Us=Object.getOwnPropertyDescriptor,qs=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Us(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vs(e,s,o),o};let Bs=class extends(S(Mt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.targetRequestDuration=500,this.limit=5,this.offset=0,this.resultCount=0,this.filteredFields="",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)c.delete(t);super.disconnectedCallback()}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProviderExpression||(this.dataProviderExpression=ie.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.dataProvider||(this.dataProvider="sonic-queue-"+Bs.instanceCounter++),this.configFilter(),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),(0,window.requestAnimationFrame)((()=>this.next()))}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e&&(this.filterPublisher=c.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{var t;0!=Object.keys(null==(t=this.filterPublisher)?void 0:t.get()).length&&this.updateFilteredContent()})))}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();let s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(let n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash){this.searchHash=o;for(const t of this.listDataProviders)c.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((()=>{const t=this.resultCount;this.props=null,this.resultCount=t,this.requestId++,this.next()}),250)}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e,s;let i=this.offset;const r=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId!=this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];i=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}r>0&&t&&(this.limit=Math.round(this.limit/r*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let o=this.dataProviderExpression.replace("$offset",i+"").replace("$limit",this.limit+"");const n=o.split("?"),a=n.shift(),l=new URLSearchParams(n.join("?")),c=null==(e=this.filterPublisher)?void 0:e.get(),h=this.filteredFields.split(" ");for(const p in c)this.filteredFields&&!h.includes(p)||null==c[p]||l.set(p,c[p]);this.searchHash||(this.searchHash=l.toString()),o=a+"?"+l.toString(),this.listDataProviders.push(o),this.currentScrollPosition=null==(s=document.scrollingElement)?void 0:s.scrollTop;const d=[...this.props,{id:l.toString()+"/"+this.props.length,dataProvider:o,offset:i,limit:this.limit}];d.resultCount=this.resultCount,this.props=d,this.lastRequestTime=(new Date).getTime()}render(){return this.currentScrollPosition&&window.requestAnimationFrame((()=>{document.scrollingElement&&null!=this.currentScrollPosition&&(document.scrollingElement.scrollTop=this.currentScrollPosition),this.currentScrollPosition=void 0})),Array.isArray(this.props)?ut`${Ee(this.props,(t=>t.id),((t,e)=>{var s;const i=0==e?this.templates:null==(s=this.templates)?void 0:s.filter((t=>"no-item"!=t.getAttribute("data-value")));return ut`<sonic-list fetch displayContents lazyload requestId="${this.requestId}" .itemPropertyMap="${this.itemPropertyMap}" ?debug="${!0===this.defferedDebug}" @load="${this.next}" key="${this.key}" @loading="${this.resetDuration}" dataProvider="${t.dataProvider}" idKey="${this.idKey}" .templates="${i}"></sonic-list>`}))}`:bt}};Bs.instanceCounter=0,qs([b({type:Array})],Bs.prototype,"templates",2),qs([b({type:Object})],Bs.prototype,"itemPropertyMap",2),qs([b()],Bs.prototype,"targetRequestDuration",2),qs([b()],Bs.prototype,"limit",2),qs([b()],Bs.prototype,"offset",2),qs([b()],Bs.prototype,"resultCount",2),qs([b()],Bs.prototype,"filteredFields",2),qs([b({type:String})],Bs.prototype,"dataProviderExpression",2),qs([b({type:String})],Bs.prototype,"idKey",2),Bs=qs([u("sonic-queue")],Bs);var Hs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Ws=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ks(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Hs(e,s,o),o};let Zs=class extends(S(Mt)){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",(()=>this.submit())),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",(t=>{"Enter"===t.key&&this.submit()})),super.connectedCallback(),this.api=new r(this.getApiConfiguration())}submitNativeForm(){const t=ie.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s=c.get(e).get();for(const r in s){if("isFormValid"==r)continue;let e=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');e||(e=document.createElement("input"),e.type="hidden",e.name=r,t.appendChild(e));let i=s[r];Array.isArray(i)&&(i=i.join(",")),"checkbox"===e.type||"radio"===e.type?i&&(e.checked=!0):e.value=i}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async submit(){var t,e,i;const r=c.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(r.isFormValid=!0,r.invalidate(),!r.isFormValid.get())return;this.publisher&&(this.publisher.disabled=!0),r.isFormValid;if(this.hasAttribute("native"))return void this.submitNativeForm();const o=(null==(t=this.getAttribute("method"))?void 0:t.toLocaleLowerCase())||"post",n=this.hasAttribute("sendAsFormData"),a=r.get();delete a.isFormValid;const l=this.getAncestorAttributeValue("headersDataProvider"),h=l?c.getInstance().get(l):null;let d={};h&&(d=h.get());let p=null;const u=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||u;Ae.show();const b=async()=>{var t,e,i,r,l,h,u;if(n)p=await(null==(t=this.api)?void 0:t.submitFormData(g,a,o,d));else switch(o){case"put":p=await(null==(e=this.api)?void 0:e.put(g,a,d));break;case"delete":p=await(null==(i=this.api)?void 0:i.delete(g,a,d));break;case"get":p=await(null==(r=this.api)?void 0:r.get(g,d));break;default:p=await(null==(l=this.api)?void 0:l.post(g,a,d))}Ae.hide(),p?p._sonic_http_response_&&!p._sonic_http_response_.ok&&1===Object.keys(p).length&&(p.messages=[{content:"Network Error",status:"error"}]):p={messages:[{content:"Network Error",status:"error"}]};const b=this.getAncestorAttributeValue("clearedDataOnSuccess");b&&b.split(" ").forEach((t=>c.get(t).set({})));const m=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",f=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";(null==(u=null==(h=this.api)?void 0:h.lastResult)?void 0:u.ok)&&a[m]&&a[f]&&this.saveCredentials(a[m],a[f]),this.submitResultKey&&(p=s.traverse(p,this.submitResultKey.split("."),!0));const v=this.getAncestorAttributeValue("submitResultDataProvider");v&&c.get(v).set(p),this.publisher&&(this.publisher.disabled=null)},m=(null==h?void 0:h.needsCaptchaValidation.get())?h:r.needsCaptchaValidation.get()?r:null;if(m){m.captchaMethod=o,m.captchaAction=null!=(i=null!=(e=null==u?void 0:u.split("?")[0])?e:this.getAncestorAttributeValue("formDataProvider"))?i:"submit",m.captchaToken="request_token";const t=e=>{"request_token"!=e&&(b(),m.captchaToken.offAssign(t))};m.captchaToken.onAssign(t)}else b()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return ut`<div ?data-disabled="${this.disabled}"><slot></slot></div>`}};Zs.styles=F`[data-disabled]{opacity:.3;pointer-events:none;user-select:none}`,Ws([b({type:String})],Zs.prototype,"submitResultKey",2),Ws([b({type:Boolean})],Zs.prototype,"disabled",2),Ws([b({type:String})],Zs.prototype,"endPoint",2),Ws([b()],Zs.prototype,"name",2),Ws([b()],Zs.prototype,"value",2),Zs=Ws([u("sonic-submit")],Zs);var Qs,Ys,Gs,Js,Xs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ti={exports:{}};Qs=ti,Js=[].slice,Ys=Xs,Gs=function(){var t,e,s,i,r,o,n,a,l,c,h,d,p,u,g;return l=function(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},n=function(t,e){var s,i,r;for(r=[],s=-1,i=t.length;++s<i;)r=r.concat(e(t[s]));return r},u=function(t,e){var s,i,r;for(r="",s=-1,i=t.length;++s<i;)r+=e(t[s]);return r},p=function(t){return new RegExp(t.toString()+"|").exec("").length-1},h=function(t,e){var s,i,r,o,n;for(o={},s=-1,r=t.length;++s<r;)i=t[s],null!=(n=e[s])&&(null!=o[i]?(Array.isArray(o[i])||(o[i]=[o[i]]),o[i].push(n)):o[i]=n);return o},(t={}).Result=function(t,e){this.value=t,this.rest=e},t.Tagged=function(t,e){this.tag=t,this.value=e},t.tag=function(e,s){return function(i){var r,o;if(null!=(r=s(i)))return o=new t.Tagged(e,r.value),new t.Result(o,r.rest)}},t.regex=function(e){return function(s){var i,r;if(null!=(i=e.exec(s)))return r=i[0],new t.Result(r,s.slice(r.length))}},t.sequence=function(){var e;return e=1<=arguments.length?Js.call(arguments,0):[],function(s){var i,r,o,n,a;for(i=-1,r=e.length,a=[],o=s;++i<r;){if(null==(n=(0,e[i])(o)))return;a.push(n.value),o=n.rest}return new t.Result(a,o)}},t.pick=function(){var e,s;return e=arguments[0],s=2<=arguments.length?Js.call(arguments,1):[],function(i){var r,o;if(null!=(o=t.sequence.apply(t,s)(i)))return r=o.value,o.value=r[e],o}},t.string=function(e){var s;return s=e.length,function(i){if(i.slice(0,s)===e)return new t.Result(e,i.slice(s))}},t.lazy=function(t){var e;return e=null,function(s){return null==e&&(e=t()),e(s)}},t.baseMany=function(e,s,i,r,o){var n,a,l;for(a=o,l=i?"":[];(null==s||null==s(a))&&null!=(n=e(a));)i?l+=n.value:l.push(n.value),a=n.rest;if(!r||0!==l.length)return new t.Result(l,a)},t.many1=function(e){return function(s){return t.baseMany(e,null,!1,!0,s)}},t.concatMany1Till=function(e,s){return function(i){return t.baseMany(e,s,!0,!0,i)}},t.firstChoice=function(){var t;return t=1<=arguments.length?Js.call(arguments,0):[],function(e){var s,i,r;for(s=-1,i=t.length;++s<i;)if(null!=(r=(0,t[s])(e)))return r}},d=function(e){var s;return(s={}).wildcard=t.tag("wildcard",t.string(e.wildcardChar)),s.optional=t.tag("optional",t.pick(1,t.string(e.optionalSegmentStartChar),t.lazy((function(){return s.pattern})),t.string(e.optionalSegmentEndChar))),s.name=t.regex(new RegExp("^["+e.segmentNameCharset+"]+")),s.named=t.tag("named",t.pick(1,t.string(e.segmentNameStartChar),t.lazy((function(){return s.name})))),s.escapedChar=t.pick(1,t.string(e.escapeChar),t.regex(/^./)),s.static=t.tag("static",t.concatMany1Till(t.firstChoice(t.lazy((function(){return s.escapedChar})),t.regex(/^./)),t.firstChoice(t.string(e.segmentNameStartChar),t.string(e.optionalSegmentStartChar),t.string(e.optionalSegmentEndChar),s.wildcard))),s.token=t.lazy((function(){return t.firstChoice(s.wildcard,s.optional,s.named,s.static)})),s.pattern=t.many1(t.lazy((function(){return s.token}))),s},a={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},o=function(t,e){if(Array.isArray(t))return u(t,(function(t){return o(t,e)}));switch(t.tag){case"wildcard":return"(.*?)";case"named":return"(["+e+"]+)";case"static":return l(t.value);case"optional":return"(?:"+o(t.value,e)+")?"}},r=function(t,e){return null==e&&(e=a.segmentValueCharset),"^"+o(t,e)+"$"},i=function(t){if(Array.isArray(t))return n(t,i);switch(t.tag){case"wildcard":return["_"];case"named":return[t.value];case"static":return[];case"optional":return i(t.value)}},c=function(t,e,s,i){var r,o,n;if(null==i&&(i=!1),null!=(n=t[e])){if(!((r=s[e]||0)>(Array.isArray(n)?n.length-1:0)))return o=Array.isArray(n)?n[r]:n,i&&(s[e]=r+1),o;if(i)throw new Error("too few values provided for key `"+e+"`")}else if(i)throw new Error("no values provided for key `"+e+"`")},s=function(t,e,i){var r,o;if(Array.isArray(t)){for(r=-1,o=t.length;++r<o;)if(s(t[r],e,i))return!0;return!1}switch(t.tag){case"wildcard":return null!=c(e,"_",i,!1);case"named":return null!=c(e,t.value,i,!1);case"static":return!1;case"optional":return s(t.value,e,i)}},g=function(t,e,i){if(Array.isArray(t))return u(t,(function(t){return g(t,e,i)}));switch(t.tag){case"wildcard":return c(e,"_",i,!0);case"named":return c(e,t.value,i,!0);case"static":return t.value;case"optional":return s(t.value,e,i)?g(t.value,e,i):""}},(e=function(t,s){var o,n,l;if(t instanceof e)return this.isRegex=t.isRegex,this.regex=t.regex,this.ast=t.ast,void(this.names=t.names);if(this.isRegex=t instanceof RegExp,"string"!=typeof t&&!this.isRegex)throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=t,null!=s){if(!Array.isArray(s))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(o=p(this.regex),s.length!==o)throw new Error("regex contains "+o+" groups but array of group names contains "+s.length);this.names=s}}else{if(""===t)throw new Error("argument must not be the empty string");if(t.replace(/\s+/g,"")!==t)throw new Error("argument must not contain whitespace");if(n={escapeChar:(null!=s?s.escapeChar:void 0)||a.escapeChar,segmentNameStartChar:(null!=s?s.segmentNameStartChar:void 0)||a.segmentNameStartChar,segmentNameCharset:(null!=s?s.segmentNameCharset:void 0)||a.segmentNameCharset,segmentValueCharset:(null!=s?s.segmentValueCharset:void 0)||a.segmentValueCharset,optionalSegmentStartChar:(null!=s?s.optionalSegmentStartChar:void 0)||a.optionalSegmentStartChar,optionalSegmentEndChar:(null!=s?s.optionalSegmentEndChar:void 0)||a.optionalSegmentEndChar,wildcardChar:(null!=s?s.wildcardChar:void 0)||a.wildcardChar},null==(l=d(n).pattern(t)))throw new Error("couldn't parse pattern");if(""!==l.rest)throw new Error("could only partially parse pattern");this.ast=l.value,this.regex=new RegExp(r(this.ast,n.segmentValueCharset)),this.names=i(this.ast)}}).prototype.match=function(t){var e,s;return null==(s=this.regex.exec(t))?null:(e=s.slice(1),this.names?h(this.names,e):e)},e.prototype.stringify=function(t){if(null==t&&(t={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(t!==Object(t))throw new Error("argument must be an object or undefined");return g(this.ast,t,{})},e.escapeForRegex=l,e.concatMap=n,e.stringConcatMap=u,e.regexGroupCount=p,e.keysAndValuesToObject=h,e.P=t,e.newParser=d,e.defaultOptions=a,e.astNodeToRegexString=r,e.astNodeToNames=i,e.getParam=c,e.astNodeContainsSegmentsForProvidedParams=s,e.stringify=g,e},null!==ti.exports?Qs.exports=Gs():Ys.UrlPattern=Gs();var ei=ti.exports,si=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,ri=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ii(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&si(e,s,o),o};let oi=class extends(S(j(Mt))){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",Vt.onChange(this),super.connectedCallback()}disconnectedCallback(){Vt.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}render(){const t=[];for(const e of this.templatePartsList){const s=e.getAttribute(this.templateValueAttribute)||"",i=new RegExp(s),r=new ei(s);i.test(this.location)?t.push(e):r.match(this.location)&&(e.setAttribute("mode","patternMatching"),t.push(e))}return ut`${Ee(t,((t,e)=>e+(new Date).getTime()),(t=>{var e;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let s="";const i=t.getAttribute("dataProviderExpression")||"";if("patternMatching"==t.getAttribute("mode")){const e=new ei(t.getAttribute(this.templateValueAttribute)||"");s=new ei(i).stringify(e.match(this.location))}else{const r=new RegExp(t.getAttribute(this.templateValueAttribute)||""),o=(this.location+"").match(r);o&&(s=(null==(e=o.shift())?void 0:e.replace(r,i))||"")}return ut`<div style="display:contents" dataProvider="${s}">${Ls(t)}</div>`}return Ls(t)}))}`}};ri([b()],oi.prototype,"location",1),oi=ri([u("sonic-router")],oi);var ni=Object.defineProperty,ai=Object.getOwnPropertyDescriptor;let li=class extends(S(Mt)){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded"))return void Vt.changeFromComponent(this);if(!this.props)return;const t=this.getAttribute("onData").split("."),e=s.traverse(this.props,t);!e||s.isObject(e)&&e||Vt.changeFromComponent(this)}};li=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?ai(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ni(e,s,o),o})([u("sonic-redirect")],li);var ci=Object.defineProperty,hi=Object.getOwnPropertyDescriptor,di=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?hi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ci(e,s,o),o};let pi=class extends(S(j(Mt))){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var t;this.statePath&&(null==(t=this.statePublisher)||t.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const t=[];let e=this.state;(!Array.isArray(e)&&s.isObject(e)||void 0===e)&&(e="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),r=e;this.inverted&&(r=i,i=e),""==i&&(i=this.inverted?".*?":"^$");if(new RegExp(i).test(r))t.push(s),s.removeAttribute("mode");else{const e=new ei(i);e.names.length>0&&e.match(r)&&(s.setAttribute("mode","patternMatching"),t.push(s))}}return ut`${Ee(t,((t,e)=>e+(new Date).getTime()),(t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){const i=t.getAttribute("dataProviderExpression");let r="",o=e,n=t.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=n,n=e),""==n&&(n=this.inverted?"*":"^$"),"patternMatching"==t.getAttribute("mode")){const t=new ei(n);r=new ei(i).stringify(t.match(o))}else{const t=new RegExp(n),e=(o+"").match(t);e&&(r=null==(s=e.shift())?void 0:s.replace(t,i))}return ut`<div style="display:contents" dataProvider="${r}">${Ls(t)}</div>`}return Ls(t)}))}`}};di([b()],pi.prototype,"state",2),di([b({type:Boolean,reflect:!0})],pi.prototype,"inverted",2),pi=di([u("sonic-states")],pi);var ui=Object.defineProperty,gi=Object.getOwnPropertyDescriptor;let bi=class extends Mt{createRenderRoot(){return this}render(){return ut`<slot></slot>`}};bi=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?gi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ui(e,s,o),o})([u("sonic-scope")],bi);var mi=Object.defineProperty,fi=Object.getOwnPropertyDescriptor,vi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mi(e,s,o),o};let yi=class extends(S(Mt)){constructor(){super(...arguments),this.text="Example"}render(){return ut`<div>${this.text}</div>`}};vi([b()],yi.prototype,"text",2),yi=vi([u("sonic-example")],yi);var wi={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 xi{async transform(t,e){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const s in e.library)this.sduiDescriptor.library[s]=e.library[s];for(const s of e.transforms)this.transformAction(s)}transformAction(t){const e=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,e)}getNodesMatchingPatterns(t,e){if(!t)return[];if(!e)return[];const s=e.nodes;if(!s)return[];let i=[],r=0;for(const o of t)for(const t of s)this.nodeMatchesPattern(o,t)&&i.push({parent:e,child:t,index:r}),i=i.concat(this.getNodesMatchingPatterns([o],t)),r++;return i}stringMatchesExpression(t,e){return!e||t&&t.match(e)}nodeMatchesPattern(t,e){const s=t,i=e,r=["libraryKey","innerHTML","prefix","suffix","markup"];for(const a of r)if(!this.stringMatchesExpression(i[a],s[a]))return!1;const o=t.attributes,n=e.attributes;if(o&&!n)return!1;if(o)for(const a in o)if(!n||!this.stringMatchesExpression(n[a],o[a]))return!1;return!0}unwrap(t,e){var s,i;for(const r of e)null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1),r.child.nodes&&(null==(i=r.parent.nodes)||i.splice(r.parent.nodes.indexOf(r.child),0,...r.child.nodes))}wrap(t,e){var s,i,r,o,n,a;const l={...t.ui};l.nodes||(l.nodes=[]);let c=0;for(const d of e)null==(s=l.nodes)||s.push(d.child),c>0&&(null==(i=d.parent.nodes)||i.splice(d.parent.nodes.indexOf(d.child),1)),c++;const h=null==(o=null==(r=e[0])?void 0:r.parent.nodes)?void 0:o.indexOf(e[0].child);h&&(null==(n=e[0].parent.nodes)||n.splice(h,1),null==(a=e[0].parent.nodes)||a.splice(h,0,l))}move(t,e){var s,i;for(const r of e){null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child),1);let e=[];t.after&&(e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const o=e[0];o&&(null==(i=o.parent.nodes)||i.splice(o.parent.nodes.indexOf(o.child)+(t.after?1:0),0,r.child))}}remap(t,e){var s,i,r;for(const o of e){const e={...t.ui};e.attributes||(e.attributes={});const n=o.child.attributes;if(n)for(const t in n)Object.prototype.hasOwnProperty.call(e.attributes,"key")||(e.attributes[t]=n[t]);const a=["libraryKey","innerHTML","prefix","suffix","markup"],l=o.child,c=e;for(const t of a)!Object.prototype.hasOwnProperty.call(e,t)&&l[t]&&(c[t]=l[t]);e.nodes||(e.nodes=[]);const h=o.child.nodes;if(h)for(const t of h)e.nodes.push(t);const d=(null==(s=o.parent.nodes)?void 0:s.indexOf(o.child))||-1;-1!=d&&(null==(i=o.parent.nodes)||i.splice(d,1),null==(r=o.parent.nodes)||r.splice(d,0,e))}}delete(t,e){var s;for(const i of e)null==(s=i.parent.nodes)||s.splice(i.parent.nodes.indexOf(i.child),1)}insert(t,e){var s;const i=t.after?"after":t.before?"before":"in";e=[],t.after?e=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?e=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(e=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const r=e[0];r&&("in"==i?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...t.ui})):null==(s=r.parent.nodes)||s.splice(r.parent.nodes.indexOf(r.child)+("after"==i?1:0),0,{...t.ui}))}}var _i=Object.defineProperty,ki=Object.getOwnPropertyDescriptor,Ai=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ki(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_i(e,s,o),o};const Pi=t=>{class e extends t{constructor(...t){super(),this.forceAutoFill=!1,this._type="text"}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("input");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}set type(t){this.hasAttribute("type")&&!this.forceAutoFill&&(t=this.getAttribute("type")),this._type=t,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}}return Ai([b()],e.prototype,"forceAutoFill",2),Ai([b({type:String})],e.prototype,"type",1),Ai([b()],e.prototype,"description",1),Ai([b()],e.prototype,"label",1),Ai([b({type:Number})],e.prototype,"tabindex",2),Ai([b({type:String})],e.prototype,"autocomplete",2),e},Ci=Ps,$i=pe,Si=Gt,Oi=Pi,Di=S,ji=j;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Ci,FormCheckable:$i,FormElement:Si,FormInput:Oi,Subscriber:Di,TemplatesContainer:ji};var Ei=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,Mi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Li(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ei(e,s,o),o};let Ni=class extends(Ci(Di(Mt))){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){null==this.props&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,wi,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter((t=>"SLOT"!=t.nodeName)).length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)ie.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)ie.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await fetch(this.getAttribute("transformation")),e=await t.json(),s=new xi;await s.transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await fetch(this.getAttribute("library")),e=await t.json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach((t=>this.appendChild(this.parseChild(t))))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);if(this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix){return this.handlePrefixSuffix(t,s)}return s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const t of i){const i=this.parseChild(t);let r=e;if(t.parentElementSelector&&(r=s.querySelector(t.parentElementSelector)||e),r.shadowRoot)r.shadowRoot.appendChild(i);else if("template"==r.tagName.toLocaleLowerCase()){r.content.appendChild(i)}else r.appendChild(i)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const t=s[i],r=oe.isObject(t)?JSON.stringify(t):t;e.setAttribute(i,r)}}handleMarkup(t,e){return t.markup&&((e=document.createElement("div")).style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){var s;if(t.innerHTML)if(-1!=t.innerHTML.indexOf("wording_")){const i=this.getAncestorAttributeValue("wordingProvider");null==(s=this.api)||s.post(i,{labels:[t.innerHTML.substring(8)]}).then((t=>{e&&(e.innerHTML+=t)}))}else e&&(e.innerHTML+=t.innerHTML)}};Mi([b()],Ni.prototype,"sduiKey",2),Mi([b()],Ni.prototype,"messagesKey",2),Ni=Mi([u("sonic-sdui")],Ni);var zi=Object.defineProperty,Fi=Object.getOwnPropertyDescriptor,Ii=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zi(e,s,o),o};let Ti=class extends(Di(Mt)){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach((t=>{this.publisher.offAssign(t.subscriber)}))}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if("string"==typeof i){const t=i.split("."),r=t.shift();if(!r)continue;let o=ae.get(r);o=oe.traverse(o,t);const n={publisher:o,subscriber:t=>{e[s]=t}};this.listeners.push(n),o.onAssign(n.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const t=new a({},e);e._proxies_.set(s,t);const r={publisher:t,subscriber:t=>{e[s]=t}};this.listeners.push(r),t.onAssign(r.subscriber),this.parseComposition(i,t)}}}render(){return ut`<slot></slot>`}};Ti.styles=[F`:host{display:contents}`],Ii([b({type:Object})],Ti.prototype,"composition",1),Ti=Ii([u("sonic-mix")],Ti);var Ri=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor;let Ui=class extends(Di(Mt)){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return"string"!=typeof this.props?ut`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:ut`${ss(this.props)}<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};Ui=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ri(e,s,o),o})([u("sonic-value")],Ui);const qi=F`:host{--sc-font-family-base:"Inter var","Inter",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--sc-font-weight-base:400;--sc-font-style-base:normal;--sc-headings-font-family:var(--sc-font-family-base);--sc-headings-font-style:var(--sc-font-style-base);--sc-headings-line-height:1.1;--sc-headings-font-weight:700;--sc-headings-text-transform:none;--sc-btn-font-weight:var(--sc-font-weight-base);--sc-btn-font-family:var(--sc-font-family-base);--sc-btn-font-style:var(--sc-font-style-base);--sc-rounded-sm:calc(var(--sc-rounded) * 0.5);--sc-rounded:0.375rem;--sc-rounded-md:calc(var(--sc-rounded) * 1.8);--sc-rounded-lg:calc(var(--sc-rounded) * 3);--sc-rounded-xl:calc(var(--sc-rounded) * 7);--sc-rounded-size-intensity:calc((1em - 1rem) * 0.4);--sc-btn-rounded-intensity:1.4;--sc-btn-font-weight:500;--sc-btn-rounded:calc((var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-btn-rounded-intensity));--sc-placeholder-bg:rgba(17, 24, 39, 0.05);--sc-shadow-sm:0 1px 3px 0 rgb(0 0 0 / 0.1),0 1px 2px -1px rgb(0 0 0 / 0.1);--sc-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1),0 2px 4px -2px rgb(0 0 0 / 0.1);--sc-shadow-lg:0 10px 15px 0px rgb(0 0 0 / 0.1),0 4px 6px -4px rgb(0 0 0 / 0.1);--sc-shadow-xl:0 20px 25px -5px rgb(0 0 0 / 0.1),0 8px 10px -6px rgb(0 0 0 / 0.1);--sc-shadow-2xl:0 25px 50px -12px rgb(0 0 0 / 0.25);--sc-border-width:max(1px, 0.12rem);--sc-border-color:var(--sc-base-200);--sc-form-height:2.5em;--sc-form-border-width:var(--sc-border-width);--sc-input-bg:var(--sc-base-100);--sc-input-border-color:var(--sc-input-bg);--sc-input-rounded-intensity:1.4;--sc-input-rounded:calc(
|
|
97
97
|
(var(--sc-rounded) + var(--sc-rounded-size-intensity)) * var(--sc-input-rounded-intensity)
|
|
98
|
-
);--sc-label-font-weight:500;--sc-contrast-content:#fff;--sc-contrast:#11151f;--sc-scrollbar-bg:var(--sc-base-400);--sc-body-bg:var(--sc-base)}`,Bi=F`:host{--sc-primary:var(--sc-base-800);--sc-info:#2563eb;--sc-danger:#f43f5e;--sc-warning:#f97316;--sc-success:#14b8a6;--sc-primary-content:var(--sc-base);--sc-info-content:var(--sc-base);--sc-danger-content:var(--sc-base);--sc-warning-content:var(--sc-base);--sc-success-content:var(--sc-base);--sc-base:#fff;--sc-base-50:#f8fafc;--sc-base-100:#f1f5f9;--sc-base-200:#e2e8f0;--sc-base-300:#cbd5e1;--sc-base-400:#94a3b8;--sc-base-500:#64748b;--sc-base-600:#475569;--sc-base-700:#334155;--sc-base-800:#1e293b;--sc-base-900:#0f172a;--sc-base-content:var(--sc-base-700);--sc-input-bg:var(--sc-base-100);--sc-input-color:var(--sc-base-content)}`,Hi=F``,Ki=F`:host([theme=dark]){${Hi}}@media (prefers-color-scheme:dark){:host([theme=auto]){${Hi}}}`;var Wi=Object.defineProperty,Zi=Object.getOwnPropertyDescriptor,Qi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wi(e,s,o),o};let Yi=class extends Mt{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length;let s=[];for(let i=0;i<e;i++){let e=t[i];e.href&&(e.href.includes("googleapis")||e.href.includes("typekit.net"))&&s.push(e.href)}document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",variables:this.getCssVariables(),fonts:s},"*")}))}receiveMessage(t){let e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){let t=[],e=[...Yi.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(let o of e)try{if(!o)continue;let e=o.cssRules;for(let s of e){if(!("style"in s))continue;let e=s.style;for(let s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){}let s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return ut`<slot></slot>`}};Yi.styles=[Bi,Ki,qi,F`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base);font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`],Qi([m({type:String,reflect:!0})],Yi.prototype,"theme",2),Qi([m({type:Boolean,reflect:!0})],Yi.prototype,"background",2),Qi([m({type:Boolean,reflect:!0})],Yi.prototype,"color",2),Qi([m({type:Boolean,reflect:!0})],Yi.prototype,"font",2),Yi=Qi([u("sonic-theme")],Yi);var Gi=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Xi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ji(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gi(e,s,o),o};let tr=class extends Mt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return ut`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};tr.styles=[ge,F`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-200, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:99px;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`],Xi([m({type:String,reflect:!0})],tr.prototype,"type",2),Xi([m({type:String,reflect:!0})],tr.prototype,"variant",2),Xi([m({type:String,reflect:!0})],tr.prototype,"size",2),Xi([m({type:Boolean,reflect:!0})],tr.prototype,"ellipsis",2),tr=Xi([u("sonic-badge")],tr);var er=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,ir=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?sr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&er(e,s,o),o};let rr=class extends Mt{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,Rt.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(Rt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){Rt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,class{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),Rt.changeFromComponent(this)}render(){return this.href?ut`<a href="${this.href}" target="${ue(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:ut`<slot></slot>`}};rr.styles=[F`a{color:inherit;text-decoration:none;display:contents}`],ir([m({type:String})],rr.prototype,"href",2),ir([m({type:String})],rr.prototype,"autoActive",2),ir([m({type:String})],rr.prototype,"target",1),ir([m({type:Boolean})],rr.prototype,"pushState",2),rr=ir([u("sonic-link")],rr);var or=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,ar=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?nr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&or(e,s,o),o};let lr=class extends Mt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return ut`<progress value="${ue(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};lr.styles=[ge,F`:host{--sc-progress-bg:var(--sc-input-bg, var(--sc-base-100, #f5f5f5));--sc-progress-color:var(--sc-base-content, #1f2937);--sc-progress-height:0.6em;--sc-progress-fs:var(--sc-fs, 1rem);--sc-progress-fw:500;--sc-progress-rounded:var(--sc-rounded-lg);display:block;line-height:1.2;font-weight:var(--sc-progress-fw);font-size:var(--sc-progress-fs)}progress{position:relative;width:100%;-webkit-appearance:none;appearance:none;overflow:hidden;border:none;height:var(--sc-progress-height);border-radius:var(--sc-progress-rounded);background-color:var(--sc-progress-bg);color:var(--sc-progress-color)}progress::-moz-progress-bar{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:not([value])::-moz-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-value{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:indeterminate:after{background-color:var(--sc-progress-color);content:"";position:absolute;top:0;bottom:0;left:-40%;width:33.333333%;border-radius:var(--sc-progress-rounded);animation:progress-loading 3s infinite ease-in-out}@keyframes progress-loading{50%{left:107%}}:host([type=warning]){--sc-progress-color:var(--sc-warning)}:host([type=danger]){--sc-progress-color:var(--sc-danger)}:host([type=info]){--sc-progress-color:var(--sc-info)}:host([type=success]){--sc-progress-color:var(--sc-success)}:host([invert]){--sc-progress-bg:rgba(200, 200, 200, 0.1)}:host([type=default][invert]){--sc-progress-color:var(--sc-base)}slot[name=remaining]{font-weight:var(--sc-font-weight-base);font-size:.85em;margin-top:.5em}slot[name=remaining]::slotted(*){margin-left:auto}slot:not([name]){color:var(--sc-progress-color)}.slot-container{display:flex;justify-content:space-between;gap:.5em;margin-top:.15em}`],ar([m({type:Number})],lr.prototype,"value",2),ar([m({type:Number})],lr.prototype,"max",2),ar([m({type:Boolean})],lr.prototype,"invert",2),ar([m({type:String,reflect:!0})],lr.prototype,"type",2),ar([m({type:String,reflect:!0})],lr.prototype,"size",2),lr=ar([u("sonic-progress")],lr);const cr=F`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`,hr=F`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`,dr=F`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`
|
|
98
|
+
);--sc-label-font-weight:500;--sc-contrast-content:#fff;--sc-contrast:#11151f;--sc-scrollbar-bg:var(--sc-base-400);--sc-body-bg:var(--sc-base)}`,Bi=F`:host{--sc-primary:var(--sc-base-800);--sc-info:#2563eb;--sc-danger:#f43f5e;--sc-warning:#f97316;--sc-success:#14b8a6;--sc-primary-content:var(--sc-base);--sc-info-content:var(--sc-base);--sc-danger-content:var(--sc-base);--sc-warning-content:var(--sc-base);--sc-success-content:var(--sc-base);--sc-base:#fff;--sc-base-50:#f8fafc;--sc-base-100:#f1f5f9;--sc-base-200:#e2e8f0;--sc-base-300:#cbd5e1;--sc-base-400:#94a3b8;--sc-base-500:#64748b;--sc-base-600:#475569;--sc-base-700:#334155;--sc-base-800:#1e293b;--sc-base-900:#0f172a;--sc-base-content:var(--sc-base-700);--sc-input-bg:var(--sc-base-100);--sc-input-color:var(--sc-base-content)}`,Hi=F``,Ki=F`:host([theme=dark]){${Hi}}@media (prefers-color-scheme:dark){:host([theme=auto]){${Hi}}}`;var Wi=Object.defineProperty,Zi=Object.getOwnPropertyDescriptor,Qi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zi(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wi(e,s,o),o};let Yi=class extends Mt{constructor(){super(...arguments),this.theme="light",this.background=!1,this.color=!1,this.font=!1}connectedCallback(){super.connectedCallback(),window.addEventListener("message",(t=>this.receiveMessage(t)),!1),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let i=0;i<e;i++){const e=t[i];e.href&&(e.href.includes("googleapis")||e.href.includes("typekit.net"))&&s.push(e.href)}document.querySelectorAll("iframe").forEach((t=>{var e;return null==(e=t.contentWindow)?void 0:e.postMessage({type:"SonicTheme",variables:this.getCssVariables(),fonts:s},"*")}))}receiveMessage(t){const e=t.data;e.type&&"GetSonicTheme"==e.type&&this.postCSSVars()}getCssVariables(){const t=[],e=[...Yi.styles.map((t=>t.styleSheet)),...Array.from(document.styleSheets)];for(const o of e)try{if(!o)continue;const e=o.cssRules;for(const s of e){if(!("style"in s))continue;const e=s.style;for(const s of e)t.includes(s)||0!==s.indexOf("--sc")||t.push(s)}}catch(r){console.log("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach((t=>i[t]=s.getPropertyValue(t))),i}render(){return ut`<slot></slot>`}};Yi.styles=[Bi,Ki,qi,F`:host([background]){display:block!important;background:var(--sc-body-bg)!important;min-height:100vh}:host([color]){color:var(--sc-base-content)}:host([font]){font-family:var(--sc-font-family-base);font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base)}`],Qi([b({type:String,reflect:!0})],Yi.prototype,"theme",2),Qi([b({type:Boolean,reflect:!0})],Yi.prototype,"background",2),Qi([b({type:Boolean,reflect:!0})],Yi.prototype,"color",2),Qi([b({type:Boolean,reflect:!0})],Yi.prototype,"font",2),Yi=Qi([u("sonic-theme")],Yi);var Gi=Object.defineProperty,Ji=Object.getOwnPropertyDescriptor,Xi=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ji(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gi(e,s,o),o};let tr=class extends Mt{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return ut`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`}};tr.styles=[ge,F`:host{--sc-badge-gap:0.3em;--sc-badge-py:0.17em;--sc-badge-px:0.66em;--sc-fs:1rem;--sc-badge-color:var(--sc-base-content, #1f2937);--sc-badge-bg:var(--sc-base-200, #e5e7eb);--sc-badge-border-with:var(--sc-form-border-width, 0.1rem);--sc-badge-border-color:transparent;--sc-badge-border:var(--sc-badge-border-with) solid var(--sc-badge-border-color);--sc-badge-rounded:99px;--sc-badge-fw:var(--sc-font-weight-base);display:inline-flex;align-items:center;box-sizing:border-box;line-height:var(--sc-lh);border-radius:var(--sc-badge-rounded);background:var(--sc-badge-bg);color:var(--sc-badge-color);font-family:var(--sc-badge-ff,var(--sc-font-family-base,inherit));font-weight:var(--sc-badge-fw);padding-top:var(--sc-badge-py);padding-bottom:var(--sc-badge-py);padding-left:var(--sc-badge-px);padding-right:var(--sc-badge-px);min-height:calc(var(--sc-badge-px) * 2);border:var(--sc-badge-border);-webkit-print-color-adjust:exact}:host([type=primary]){--sc-badge-color:var(--sc-primary-content);--sc-badge-bg:var(--sc-primary)}:host([type=warning]){--sc-badge-color:var(--sc-warning-content);--sc-badge-bg:var(--sc-warning)}:host([type=danger]){--sc-badge-color:var(--sc-danger-content);--sc-badge-bg:var(--sc-danger)}:host([type=info]){--sc-badge-color:var(--sc-info-content);--sc-badge-bg:var(--sc-info)}:host([type=success]){--sc-badge-color:var(--sc-success-content);--sc-badge-bg:var(--sc-success)}:host([type=neutral]){--sc-badge-color:var(--sc-base);--sc-badge-bg:var(--sc-base-content)}:host{font-size:var(--sc-fs);gap:var(--sc-badge-gap)}:host([size="2xs"]){--sc-badge-gap:0.35em}:host([size=xs]){--sc-badge-gap:0.35em}:host([size=sm]){--sc-badge-gap:0.35em}:host([size=lg]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([size=xl]){--sc-lh:1.2;--sc-badge-gap:0.5em}:host([variant=outline][type]){border-width:var(--sc-badge-border-with)!important;border-color:var(--sc-badge-bg);color:var(--sc-badge-bg);background:0 0}:host([variant=outline][type=default]){border-color:var(--sc-base-400);color:var(--sc-base-500);background:0 0}:host([variant=ghost][type]){color:var(--sc-badge-bg);background:0 0;padding:0}:host([variant=ghost][type=default]){color:var(--sc-badge-color);background:0 0}:host([ellipsis]){flex-wrap:nowrap;white-space:nowrap;max-width:100%}:host([ellipsis]) slot{overflow:hidden;display:block;text-overflow:ellipsis;white-space:nowrap;max-width:100%}slot[name=prefix],slot[name=suffix]{flex-shrink:0}`],Xi([b({type:String,reflect:!0})],tr.prototype,"type",2),Xi([b({type:String,reflect:!0})],tr.prototype,"variant",2),Xi([b({type:String,reflect:!0})],tr.prototype,"size",2),Xi([b({type:Boolean,reflect:!0})],tr.prototype,"ellipsis",2),tr=Xi([u("sonic-badge")],tr);var er=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,ir=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?sr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&er(e,s,o),o};let rr=class extends Mt{constructor(){super(...arguments),this.href="",this._location="",this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,Vt.updateComponentActiveState(this)}connectedCallback(){this.href&&0!=this.href.indexOf("http")&&(Vt.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),super.connectedCallback()}disconnectedCallback(){Vt.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,class{static fixBlankLink(t){const e="undefined"==typeof require?null:require("electron");"_blank"==t.target&&t.addEventListener("click",(()=>{null==e||e.shell.openExternal(t.href)}))}}.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),Vt.changeFromComponent(this)}render(){return this.href?ut`<a href="${this.href}" target="${ue(this.target)}" @click="${this.pushState?this.handlePushState:null}"><slot></slot></a>`:ut`<slot></slot>`}};rr.styles=[F`a{color:inherit;text-decoration:none;display:contents}`],ir([b({type:String})],rr.prototype,"href",2),ir([b({type:String})],rr.prototype,"autoActive",2),ir([b({type:String})],rr.prototype,"target",1),ir([b({type:Boolean})],rr.prototype,"pushState",2),rr=ir([u("sonic-link")],rr);var or=Object.defineProperty,nr=Object.getOwnPropertyDescriptor,ar=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?nr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&or(e,s,o),o};let lr=class extends Mt{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default",this.size="md"}render(){return ut`<progress value="${ue(this.value)}" max="${this.max}"></progress><div class="slot-container"><slot></slot><slot name="remaining"></slot></div>`}};lr.styles=[ge,F`:host{--sc-progress-bg:var(--sc-input-bg, var(--sc-base-100, #f5f5f5));--sc-progress-color:var(--sc-base-content, #1f2937);--sc-progress-height:0.6em;--sc-progress-fs:var(--sc-fs, 1rem);--sc-progress-fw:500;--sc-progress-rounded:var(--sc-rounded-lg);display:block;line-height:1.2;font-weight:var(--sc-progress-fw);font-size:var(--sc-progress-fs)}progress{position:relative;width:100%;-webkit-appearance:none;appearance:none;overflow:hidden;border:none;height:var(--sc-progress-height);border-radius:var(--sc-progress-rounded);background-color:var(--sc-progress-bg);color:var(--sc-progress-color)}progress::-moz-progress-bar{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:not([value])::-moz-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-bar{background-color:var(--sc-progress-bg)}progress::-webkit-progress-value{background-color:var(--sc-progress-color);border-radius:var(--sc-progress-rounded)}progress:indeterminate:after{background-color:var(--sc-progress-color);content:"";position:absolute;top:0;bottom:0;left:-40%;width:33.333333%;border-radius:var(--sc-progress-rounded);animation:progress-loading 3s infinite ease-in-out}@keyframes progress-loading{50%{left:107%}}:host([type=warning]){--sc-progress-color:var(--sc-warning)}:host([type=danger]){--sc-progress-color:var(--sc-danger)}:host([type=info]){--sc-progress-color:var(--sc-info)}:host([type=success]){--sc-progress-color:var(--sc-success)}:host([invert]){--sc-progress-bg:rgba(200, 200, 200, 0.1)}:host([type=default][invert]){--sc-progress-color:var(--sc-base)}slot[name=remaining]{font-weight:var(--sc-font-weight-base);font-size:.85em;margin-top:.5em}slot[name=remaining]::slotted(*){margin-left:auto}slot:not([name]){color:var(--sc-progress-color)}.slot-container{display:flex;justify-content:space-between;gap:.5em;margin-top:.15em}`],ar([b({type:Number})],lr.prototype,"value",2),ar([b({type:Number})],lr.prototype,"max",2),ar([b({type:Boolean})],lr.prototype,"invert",2),ar([b({type:String,reflect:!0})],lr.prototype,"type",2),ar([b({type:String,reflect:!0})],lr.prototype,"size",2),lr=ar([u("sonic-progress")],lr);const cr=F`:host{--sc-label-fs:var(--sc-fs, 1rem);--sc-label-fw:var(--sc-label-font-weight)}label{font-size:var(--sc-label-fs);font-weight:var(--sc-label-fw);line-height:1.2}.form-label{margin-bottom:.22em;display:block}`,hr=F`.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}`,dr=F`*{box-sizing:border-box}:host{--sc-input-height:var(--sc-form-height);--sc-input-c:var(--sc-input-color, var(--sc-base-content));--sc-input-b-width:var(--sc-form-border-width);--sc-input-b-color:var(--sc-input-border-color);--sc-item-rounded-tr:var(--sc-input-rounded);--sc-item-rounded-tl:var(--sc-input-rounded);--sc-item-rounded-bl:var(--sc-input-rounded);--sc-item-rounded-br:var(--sc-input-rounded);--sc-input-fs:var(--sc-fs, 1rem);--sc-input-ff:inherit;--sc-input-py:0.55em;--sc-input-px:clamp(0.3em, 8%, 1.1em);--sc-input-background:var(--sc-input-bg);--sc-input-addon-c:var(--sc-input-addon-color, var(--sc-base));--sc-input-addon-bg:var(--sc-input-c)}.form-element{display:block;flex-grow:1;width:100%;line-height:1.1;color:var(--sc-input-c);border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl);font-family:var(--sc-input-ff);background-color:var(--sc-input-background);border:var(--sc-input-b-width) solid var(--sc-input-b-color,var(--sc-base-300,#aaa));width:100%;font-size:var(--sc-input-fs);padding-top:var(--sc-input-py);padding-bottom:var(--sc-input-py);padding-left:var(--sc-input-px);padding-right:var(--sc-input-px);min-height:var(--sc-input-height)}.form-control{display:flex;width:100%}:host(:not([inlineContent])) .has-prefix slot[name=prefix],:host(:not([inlineContent])) .has-suffix slot[name=suffix]{min-width:var(--sc-input-height);box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1.1;flex-shrink:0;padding-left:clamp(.25em,3%,calc(.33 * var(--sc-input-px)));padding-right:clamp(.25em,3%,calc(.33 * var(--sc-input-px)))}:host(:not([inlineContent])) slot[name=prefix]{border-radius:var(--sc-item-rounded-tl) 0 0 var(--sc-item-rounded-bl);background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) slot[name=suffix]{border-radius:0 var(--sc-item-rounded-tr) var(--sc-item-rounded-br) 0;background-color:var(--sc-input-addon-bg);color:var(--sc-input-addon-c)}:host(:not([inlineContent])) .has-prefix .form-element{border-top-left-radius:0;border-bottom-left-radius:0}:host(:not([inlineContent])) .has-suffix .form-element{border-top-right-radius:0;border-bottom-right-radius:0}slot[name=prefix]::slotted(sonic-icon),slot[name=suffix]::slotted(sonic-icon){font-size:1.2em}.form-element .form-element,.form-element>slot{all:unset}:host([inlineContent]) .form-element{display:flex;align-items:center;gap:.35em;min-height:var(--sc-form-height)}:host([inlineContent]) .form-element .form-element{appearance:none;background:0 0;border:none;padding:0;display:block;width:50%;min-width:0;flex:1 1 auto;height:auto;min-height:auto;border-radius:0}:host([inlineContent]) slot[name=prefix]::slotted(*),:host([inlineContent]) slot[name=suffix]::slotted(*){display:block;flex:0 0 auto;max-width:100%;max-width:100%}:host([inlineContent]) .has-suffix slot[name=suffix]{margin-right:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) .has-prefix slot[name=prefix]{margin-left:calc(-.5 * var(--sc-input-px))}:host([inlineContent]) slot[name=suffix]::slotted(*){margin-left:auto}:host([disabled]) .form-control{cursor:not-allowed}:host([variant=ghost]) .form-element{--sc-input-bg:transparent}:host([disabled]) .form-element{pointer-events:none;opacity:.5}:host([disabled]) .select-chevron{display:none}::placeholder{color:inherit;opacity:.45}:host([placehoderAsLabel]) ::placeholder{opacity:1}:focus::placeholder{opacity:0!important}.form-element:focus,.form-element:focus-visible,:host(:not([disabled])) .form-element:hover{filter:brightness(.97);outline:0}.form-label{margin-bottom:.22em;display:block}.form-description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}.hidden{display:none}.contents{display:contents}:host([error]){--sc-input-b-color:var(--sc-danger)}:host input:visited{display:none}:host([touched][required]) :not(:focus):invalid{--sc-input-b-color:var(--sc-danger);--sc-input-c:var(--sc-danger)}:host([touched][required]) :not(:focus):invalid+.select-chevron{--sc-input-c:var(--sc-danger)}:host([touched][required]) :not([value=""]):not(:focus):valid{--sc-input-b-color:var(--sc-success);--sc-input-c:var(--sc-success)}:host([touched][required]) :not(:focus):valid+.select-chevron{--sc-input-c:var(--sc-success)}:host([type=color]) .form-element{padding:0;border:0;min-width:var(--sc-input-height)}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:none;border-radius:var(--sc-item-rounded-tl) var(--sc-item-rounded-tr) var(--sc-item-rounded-br) var(--sc-item-rounded-bl)}:host([type=image]) .form-element{padding:0;border:none}input[type=reset],input[type=submit]{cursor:pointer}:host([type=search]){appearance:none!important}input[type=search]::-webkit-search-cancel-button{appearance:none;cursor:pointer;height:.65em;width:.65em;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjEyMy4wNXB4IiBoZWlnaHQ9IjEyMy4wNXB4IiB2aWV3Qm94PSIwIDAgMTIzLjA1IDEyMy4wNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTIzLjA1IDEyMy4wNTsiDQoJIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZD0iTTEyMS4zMjUsMTAuOTI1bC04LjUtOC4zOTljLTIuMy0yLjMtNi4xLTIuMy04LjUsMGwtNDIuNCw0Mi4zOTlMMTguNzI2LDEuNzI2Yy0yLjMwMS0yLjMwMS02LjEwMS0yLjMwMS04LjUsMGwtOC41LDguNQ0KCQljLTIuMzAxLDIuMy0yLjMwMSw2LjEsMCw4LjVsNDMuMSw0My4xbC00Mi4zLDQyLjVjLTIuMywyLjMtMi4zLDYuMSwwLDguNWw4LjUsOC41YzIuMywyLjMsNi4xLDIuMyw4LjUsMGw0Mi4zOTktNDIuNGw0Mi40LDQyLjQNCgkJYzIuMywyLjMsNi4xLDIuMyw4LjUsMGw4LjUtOC41YzIuMy0yLjMsMi4zLTYuMSwwLTguNWwtNDIuNS00Mi40bDQyLjQtNDIuMzk5QzEyMy42MjUsMTcuMTI1LDEyMy42MjUsMTMuMzI1LDEyMS4zMjUsMTAuOTI1eiIvPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+DQo=);background-size:contain;background-repeat:no-repeat}:host([align=center]) .form-element{text-align:center}:host([align=left]) .form-element{text-align:left}:host([align=right]) .form-element{text-align:right}:host([noAppearance]) input[type=number]::-webkit-inner-spin-button,:host([noAppearance]) input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host([noAppearance]) input[type=number]{-moz-appearance:textfield!important}`
|
|
99
99
|
/**
|
|
100
100
|
* @license
|
|
101
101
|
* Copyright 2018 Google LLC
|
|
102
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
|
-
*/,pr=Bt(class extends Ht{constructor(t){var e;if(super(t),t.type!==Ut||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const o in e){const t=!!e[o];t===this.nt.has(o)||(null===(i=this.st)||void 0===i?void 0:i.has(o))||(t?(r.add(o),this.nt.add(o)):(r.remove(o),this.nt.delete(o)))}return gt}});var ur=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,mr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?gr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ur(e,s,o),o};let br=class extends(Pi(Gt(S(Mt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;let t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){let t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return ut`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${pr(t)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${ue(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${ue(this.list)}" tabindex="${ue(this.tabindex)}" pattern="${ue(this.pattern)}" min="${ue(this.min)}" max="${ue(this.max)}" step="${ue(this.step)}" src="${ue(this.src)}" minlength="${ue(this.minlength)}" maxlength="${ue(this.maxlength)}" placeholder="${ue(this.placeholder)}" required="${ue(this.required)}" autocomplete="${ue(this.autocomplete)}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot><slot name="list"></slot>`}};br.styles=[ge,dr,cr,hr,F`:host([type=hidden]){appearance:none!important;display:none!important}`],mr([m({type:String,reflect:!0})],br.prototype,"size",2),mr([m({type:String})],br.prototype,"list",2),mr([m({type:String})],br.prototype,"placeholder",2),mr([m({type:String})],br.prototype,"pattern",2),mr([m({type:String})],br.prototype,"min",2),mr([m({type:String})],br.prototype,"max",2),mr([m({type:Boolean})],br.prototype,"readonly",2),mr([m({type:Number})],br.prototype,"step",2),mr([m({type:Number})],br.prototype,"minlength",2),mr([m({type:Number})],br.prototype,"maxlength",2),mr([m({type:String})],br.prototype,"src",2),mr([m({type:Boolean,reflect:!0})],br.prototype,"inlineContent",2),mr([m({type:Boolean})],br.prototype,"disableInlineContentFocus",2),mr([x({slot:"label"})],br.prototype,"slotLabelNodes",2),mr([x({slot:"description"})],br.prototype,"slotDescriptionNodes",2),mr([x({slot:"suffix"})],br.prototype,"slotSuffixNodes",2),mr([x({slot:"prefix"})],br.prototype,"slotPrefixNodes",2),mr([v("input")],br.prototype,"input",2),mr([b()],br.prototype,"hasDescription",2),mr([b()],br.prototype,"hasLabel",2),mr([b()],br.prototype,"hasSuffix",2),mr([b()],br.prototype,"hasPrefix",2),br=mr([u("sonic-input")],br);var fr=Object.defineProperty,vr=Object.getOwnPropertyDescriptor,yr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fr(e,s,o),o};let wr=class extends Mt{constructor(){super(...arguments),this.open=!1,this.toggle="true",this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN}runPositioning(){this.positioningRuns&&(this.positioningRuns=!0,this._setUpMenu(this.placement),window.requestAnimationFrame((()=>this.runPositioning())))}_toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN,this.runPositioning())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(t){let s=t.composedPath(),i=s[0];wr.pops.forEach((r=>{const o=s.includes(r),n=s.includes(r.querySelector('[slot="content"]')),a="keep"===e.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r._hide()}))}connectedCallback(){super.connectedCallback(),0==wr.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),wr.pops.add(this)}disconnectedCallback(){super.disconnectedCallback(),wr.pops.delete(this),0==wr.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}_setUpMenu(t){var e;const s=null==(e=this.popContent)?void 0:e.getBoundingClientRect(),i=this.getBoundingClientRect();if(!this.offsetParent)return;let r=this.offsetParent.getBoundingClientRect(),o=i.left-r.left,n=i.top-r.top,a=o,l=n,c=n-s.height-8,h=o-s.width-16,d=o+i.width+16,p=n+i.height+8;switch(t){case"bottom":l=p;break;case"top":l=c;break;case"left":a=h;break;case"right":a=d}let u=window.innerWidth-d-r.left-s.width-20;u<0&&"right"===t&&(a=h),u<0&&["top","bottom"].includes(t)&&(a=Math.max(a+u,h+i.width)),-r.left-h>20&&"left"===t&&(a=d);let g=window.innerHeight-p-r.top-s.height-20;g<0&&"bottom"===t&&(l=c),g<0&&["left","right"].includes(t)&&(l=Math.max(l+g,c+i.height)),-r.top-c>-20&&"top"===t&&(l=p),this.lastContentX=a,this.lastContentY=l,Object.assign(this.popContent.style,{left:`${a}px`,top:`${l}px`})}render(){return ut`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open?"is-open":""}"></slot>`}};wr.pops=new Set,wr.styles=[F`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open{transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`],yr([b()],wr.prototype,"open",2),yr([v("slot:not([name=content])")],wr.prototype,"popBtn",2),yr([v("slot[name=content]")],wr.prototype,"popContent",2),yr([m({type:String})],wr.prototype,"toggle",2),yr([m({type:Boolean})],wr.prototype,"noToggle",2),yr([m({type:Boolean,reflect:!0})],wr.prototype,"inline",2),yr([m({type:String,reflect:!0})],wr.prototype,"shadow",2),yr([m({type:String})],wr.prototype,"placement",2),wr=yr([u("sonic-pop")],wr);var _r=Object.defineProperty,xr=Object.getOwnPropertyDescriptor;let kr=class extends ve{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};kr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?xr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_r(e,s,o),o})([u("sonic-menu-item")],kr);var Ar=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Cr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ar(e,s,o),o};let $r=class extends(Ei(Di(Mt))){constructor(){super(...arguments),this._name="",this.forceAutoFill=!1,this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.value="",this.formDataProvider=""}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback()}render(){return ut`<sonic-pop toggle="false" style="display:block"><sonic-input type="search" data-keyboard-nav="nav-autocomplete" label="${ue(this.label)}" description="${ue(this.description)}" name="${ue(this.name)}" value="${ue(this.value)}" autocomplete="off" clearable></sonic-input><sonic-menu slot="content"><sonic-queue filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.formDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue></sonic-menu></sonic-pop>`}};$r.styles=[F`:host{display:block}`],Cr([m()],$r.prototype,"name",1),Cr([m()],$r.prototype,"forceAutoFill",2),Cr([m()],$r.prototype,"description",1),Cr([m()],$r.prototype,"label",1),Cr([m({type:String})],$r.prototype,"placeholder",2),Cr([m()],$r.prototype,"filteredFields",2),Cr([m({type:Boolean})],$r.prototype,"readonly",2),Cr([m({type:String})],$r.prototype,"dataProviderExpression",2),Cr([m({type:String})],$r.prototype,"key",2),Cr([m({type:String})],$r.prototype,"value",2),$r=Cr([u("sonic-input-autocomplete")],$r);var Sr=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Dr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Or(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Sr(e,s,o),o};let Er=class extends(Di(Mt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-\.\/:;<=>?@[\]^_`{|}~]/.test(t)},ae.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ae.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?ut`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:ut`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?mt:ut`<div>${this.wording_password_helper_decription}</div><div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div><div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div><div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div><div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div><div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>`}};Dr([m()],Er.prototype,"name",2),Dr([m()],Er.prototype,"minChars",2),Dr([b()],Er.prototype,"hasNoChar",2),Dr([b()],Er.prototype,"hasEnoughChars",2),Dr([b()],Er.prototype,"hasMinuscule",2),Dr([b()],Er.prototype,"hasMajuscule",2),Dr([b()],Er.prototype,"hasNumber",2),Dr([b()],Er.prototype,"hasSpecialChar",2),Dr([m()],Er.prototype,"wording_password_helper_decription",2),Dr([m()],Er.prototype,"wording_password_helper_min_length",2),Dr([m()],Er.prototype,"wording_password_helper_lower_case",2),Dr([m()],Er.prototype,"wording_password_helper_upper_case",2),Dr([m()],Er.prototype,"wording_password_helper_number",2),Dr([m()],Er.prototype,"wording_password_helper_special_char",2),Er=Dr([u("sonic-password-helper")],Er);var jr=Object.defineProperty,Lr=Object.getOwnPropertyDescriptor,Mr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Lr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jr(e,s,o),o};let Nr=class extends(Di(Mt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();let t=ae.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){let t=ae.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?mt:ut`<span>${this.areEqual?ss(this.descriptionWhenEqual):ss(this.descriptionWhenNotEqual)}</span>`}};Mr([m()],Nr.prototype,"name",2),Mr([m()],Nr.prototype,"sameValueAs",2),Mr([m()],Nr.prototype,"descriptionWhenEqual",2),Mr([m()],Nr.prototype,"descriptionWhenNotEqual",2),Mr([b()],Nr.prototype,"areEqual",2),Mr([b()],Nr.prototype,"hasNoChar",2),Nr=Mr([u("sonic-same-value-helper")],Nr);var zr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,Ir=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zr(e,s,o),o};let Tr=class extends(pe(Pi(Gt(S(Mt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return ut`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" .disabled="${ue(this.disabled)}" .checked="${ue(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}"><sonic-icon name="${"indeterminate"==this.checked?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">${this.label?ss(this.label):""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot></div></label>`}};Tr.styles=[ge,F`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`],Ir([m({type:Boolean,reflect:!0})],Tr.prototype,"touched",2),Ir([m({type:String})],Tr.prototype,"iconName",2),Ir([m({type:String})],Tr.prototype,"indeterminateIconName",2),Ir([m({type:Boolean})],Tr.prototype,"hasDescription",2),Ir([m({type:Boolean})],Tr.prototype,"hasLabel",2),Ir([x()],Tr.prototype,"slotLabelNodes",2),Ir([x({slot:"description"})],Tr.prototype,"slotDescriptionNodes",2),Tr=Ir([u("sonic-checkbox")],Tr);var Vr=Object.defineProperty,Rr=Object.getOwnPropertyDescriptor;let Ur=class extends Tr{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};Ur.styles=[Tr.styles,F`:host input{border-radius:50%}:host sonic-icon{border-radius:50%;overflow:hidden;background-color:var(--sc-primary-content);line-height:0;display:block;font-size:1em;height:.6em;width:.6em}`],Ur=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Rr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vr(e,s,o),o})([u("sonic-radio")],Ur);var qr=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,Hr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Br(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qr(e,s,o),o};let Kr=class extends(Gt(S(Mt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){let t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps();let t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;let s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return ut`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${pr(t)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${ue(this.disabled)}" ?required="${this.required}" ?multiple="${this.multiple}" size="${ue(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}">${je(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey]?"selected":null;return ut`<option selected="${ue(e)}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot>`}};Kr.styles=[ge,dr,cr,hr,F`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1em,calc(.8 * var(--sc-input-px)))}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem 5rem;color:var(--sc-base-content);background:var(--sc-base)}`],Hr([m({type:String})],Kr.prototype,"valueKey",2),Hr([m({type:String})],Kr.prototype,"wordingKey",2),Hr([m({type:Boolean})],Kr.prototype,"multiple",2),Hr([m({type:String,reflect:!0})],Kr.prototype,"size",2),Hr([m({type:Number})],Kr.prototype,"selectSize",2),Hr([m({type:Array})],Kr.prototype,"options",1),Hr([m({reflect:!0})],Kr.prototype,"value",1),Hr([m({type:Boolean})],Kr.prototype,"forceAutoFill",2),Hr([m()],Kr.prototype,"description",1),Hr([m()],Kr.prototype,"label",1),Hr([x({slot:"label"})],Kr.prototype,"slotLabelNodes",2),Hr([x({slot:"description"})],Kr.prototype,"slotDescriptionNodes",2),Hr([x({slot:"suffix"})],Kr.prototype,"slotSuffixNodes",2),Hr([x({slot:"prefix"})],Kr.prototype,"slotPrefixNodes",2),Hr([b()],Kr.prototype,"hasDescription",2),Hr([b()],Kr.prototype,"hasLabel",2),Hr([b()],Kr.prototype,"hasSuffix",2),Hr([b()],Kr.prototype,"hasPrefix",2),Kr=Hr([u("sonic-select")],Kr);var Wr=Object.defineProperty,Zr=Object.getOwnPropertyDescriptor,Qr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wr(e,s,o),o};let Yr=class extends(Pi(Gt(S(Mt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;let s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){return ut`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${ue(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${ue(this.rows)}" cols="${ue(this.cols)}" maxlength="${ue(this.maxlength)}" minlength="${ue(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${ue(this.spellcheck)}" autocomplete="${ue(this.autocomplete)}" tabindex="${ue(this.tabindex)}" wrap="${ue(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}">
|
|
104
|
-
${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot>`}};Yr.styles=[ge,dr,cr,hr,ps,F`textarea{font-size:inherit}`],Qr([m({type:String})],Yr.prototype,"size",2),Qr([m({type:Number})],Yr.prototype,"rows",2),Qr([m({type:Number})],Yr.prototype,"cols",2),Qr([m({type:Number})],Yr.prototype,"maxlength",2),Qr([m({type:Number})],Yr.prototype,"minlength",2),Qr([m({type:String})],Yr.prototype,"wrap",2),Qr([m({type:Boolean})],Yr.prototype,"readonly",2),Qr([m({type:String})],Yr.prototype,"placeholder",2),Qr([x({slot:"label"})],Yr.prototype,"slotLabelNodes",2),Qr([x({slot:"description"})],Yr.prototype,"slotDescriptionNodes",2),Qr([b()],Yr.prototype,"hasDescription",2),Qr([b()],Yr.prototype,"hasLabel",2),Yr=Qr([u("sonic-textarea")],Yr);var Gr=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor;let Xr=class extends Mt{render(){return ut`<slot></slot>`}};Xr.styles=[F`:host{color:var(--sc-neutral-500);font-size:1.25rem;line-height:1.2;display:block;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base);margin-top:.25em}`],Xr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gr(e,s,o),o})([u("sonic-legend-description")],Xr);var to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,so=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?eo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&to(e,s,o),o};let io=class extends Mt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return ut`<legend part="legend">${this.iconName?ut`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${ue(this.iconPrefix)}" library="${ue(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${ss(this.label?this.label:"")} ${this.description?ut`<sonic-legend-description>${ss(this.description)}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};io.styles=[F`:host{--sc-legend-font-size:1.5rem;--sc-legend-font-weight:var(--sc-font-weight-base);--sc-legend-font-style:var(--sc-headings-font-style);--sc-legend-family:var(--sc-headings-font-family);--sc-legend-line-height:var(--sc-headings-line-height);--sc-legend-color:var(--sc-base-content);display:flex;width:100%}legend{font-size:var(--sc-legend-font-size);font-weight:var(--sc-legend-font-weight);font-style:var(--sc-legend-font-style);font-family:var(--sc-legend-font-family);line-height:var(--sc-legend-line-height);color:var(--sc-legend-color);padding:0;display:flex;width:100%;align-items:flex-start;gap:.5em}slot[name=suffix]{display:block;margin-left:auto;flex-shrink:0}.legend-content{flex-grow:1}`],so([m({type:Boolean})],io.prototype,"forceAutoFill",2),so([m()],io.prototype,"description",1),so([m()],io.prototype,"label",1),so([m({type:String})],io.prototype,"iconName",2),so([m({type:String})],io.prototype,"iconLibrary",2),so([m({type:String})],io.prototype,"iconPrefix",2),io=so([u("sonic-legend")],io);var ro=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,no=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ro(e,s,o),o};let ao=class extends(S(Mt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return ut`<fieldset form="${ue(this.form)}" ?disabled="${this.disabled}">${this.label?ut`<sonic-legend label="${ue(this.label)}" description="${ue(this.description)}" iconName="${ue(this.iconName)}" iconPrefix="${ue(this.iconPrefix)}" iconLibrary="${ue(this.iconLibrary)}"></sonic-legend>`:mt}<slot></slot></fieldset>`}};ao.styles=[F`:host{--sc-fieldset-mt:0;--sc-fieldset-mb:1rem;--sc-fieldset-border-color:var(--sc-border-color);--sc-fieldset-border-width:var(--sc-form-border-width);margin-top:var(--sc-fieldset-mt);margin-bottom:var(--sc-fieldset-mb);display:block;border:var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color)!important;padding:1.8rem 1.25rem;border-radius:var(--sc-rounded-lg)}fieldset{all:unset;display:contents}:host([variant=ghost]),:host([variant=shadow]){--sc-fieldset-border-color:transparent}:host([variant=shadow]){--sc-fieldset-border-color:transparent;box-shadow:var(--sc-shadow-lg)}::slotted(sonic-legend),sonic-legend{margin-bottom:1.5rem;display:block}::slotted(sonic-legend:last-child){margin-bottom:0}`],no([m({type:Boolean,reflect:!0})],ao.prototype,"disabled",2),no([m({type:String})],ao.prototype,"form",2),no([m({type:String})],ao.prototype,"label",2),no([m({type:String})],ao.prototype,"description",2),no([m({type:String})],ao.prototype,"iconName",2),no([m({type:String})],ao.prototype,"iconLibrary",2),no([m({type:String})],ao.prototype,"iconPrefix",2),no([m({type:String,reflect:!0})],ao.prototype,"variant",2),ao=no([u("sonic-fieldset")],ao);class lo{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=s,this.o=null!=r?r:this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var co=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,po=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ho(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&co(e,s,o),o};let uo=class extends(S(Mt)){constructor(){super(...arguments),this._resizeController=new lo(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return ut`<div class="${pr(t)}"><slot @slotchange="${this.onSlotChange}"></slot></div>`}};uo.styles=[F`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`],po([_({flatten:!0})],uo.prototype,"slottedElements",2),po([m({type:Boolean})],uo.prototype,"oneFormElement",2),uo=po([u("sonic-form-layout")],uo);var go=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,bo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?mo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&go(e,s,o),o};let fo=class extends Mt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return ut`<slot style="${Kt(t)}"></slot>`}};fo.styles=[F`:host{display:block}slot{display:flex;flex-wrap:wrap;gap:.3rem}`],bo([m({type:String})],fo.prototype,"direction",2),bo([m({type:String})],fo.prototype,"justify",2),fo=bo([u("sonic-form-actions")],fo);var vo=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,wo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?yo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vo(e,s,o),o};let _o=class extends Mt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){var t={alignItems:this.alignItems};return ut`<span class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${Kt(t)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot>`}};_o.styles=[ge,cr,hr,F`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}`],wo([m({type:String})],_o.prototype,"alignItems",2),wo([m({type:String})],_o.prototype,"label",2),wo([m({type:String})],_o.prototype,"description",2),wo([x({slot:"label"})],_o.prototype,"slotLabelNodes",2),wo([x({slot:"description"})],_o.prototype,"slotDescriptionNodes",2),wo([b()],_o.prototype,"hasDescription",2),wo([b()],_o.prototype,"hasLabel",2),_o=wo([u("sonic-group")],_o);var xo=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,Ao=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xo(e,s,o),o};let Po=class extends Mt{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}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return ut`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${Kt(t)}"></picture></div>`}};Po.styles=[F`:host{--sc-img-radius:0;--sc-img-bg:var(--sc-placeholder-bg);border-radius:var(--sc-img-radius);display:block;width:100%;background:var(--sc-img-bg)}img{width:100%;vertical-align:middle;object-fit:cover}img[src=""]{visibility:hidden}:host([rounded]){--sc-img-radius:var(--sc-rounded);overflow:hidden}:host([rounded=sm]){--sc-img-radius:var(--sc-rounded-sm)}:host([rounded=md]){--sc-img-radius:var(--sc-rounded-md)}:host([rounded=lg]){--sc-img-radius:var(--sc-rounded-lg)}:host([rounded=xl]){--sc-img-radius:var(--sc-rounded-xl)}:host([rounded=full]){--sc-img-radius:50%!important}:host([rounded=none]){--sc-img-radius:0!important}:host([cover]),:host([cover]) img,:host([cover])>div{position:absolute!important;left:0!important;top:0!important;right:0!important;bottom:0!important;height:100%!important;width:100%!important}`],Ao([m({type:String})],Po.prototype,"rounded",2),Ao([m({type:String})],Po.prototype,"src",2),Ao([m({type:String})],Po.prototype,"alt",2),Ao([m({type:String})],Po.prototype,"loading",2),Ao([m({type:String})],Po.prototype,"ratio",2),Ao([m({type:String})],Po.prototype,"objectPosition",2),Ao([m({type:String})],Po.prototype,"imageRendering",2),Ao([m({type:Boolean,reflect:!0})],Po.prototype,"cover",2),Po=Ao([u("sonic-image")],Po);var Co=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,So=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?$o(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Co(e,s,o),o};let Oo=class extends Mt{constructor(){super(...arguments),this.icon={name:""},this.taxonomy=[],this.separator=", ",this.key="",this.type="default",this.variant="default",this.size="md"}render(){if(!Array.isArray(this.taxonomy))return mt;let t=this.key+"_display",e=this.taxonomy.filter((e=>null!=e&&(!0===e[t]||"1"==e[t]||!e.hasOwnProperty(t))));return 0===e.length?(this.style.display="none",mt):(this.style.removeProperty("display"),ut`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" library="${ue(this.icon.library)}" prefix="${ue(this.icon.prefix)}" name="${ue(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${je(e,(t=>t[this.key+"_id"]),(t=>ut`<span>${t[this.key+"_name"]||t.name}</span><span class="sonic-taxonomy-separator">${ss(this.separator)}</span>`))}</span></sonic-badge>`)}};Oo.styles=F`:host .sonic-taxonomy-separator:last-child{display:none}.taxonomy-list{display:flex;flex-wrap:wrap}`,So([m({type:Object})],Oo.prototype,"icon",2),So([m({type:Array})],Oo.prototype,"taxonomy",2),So([m({type:String})],Oo.prototype,"separator",2),So([m({type:String})],Oo.prototype,"key",2),So([m({type:String,reflect:!0})],Oo.prototype,"type",2),So([m({type:String,reflect:!0})],Oo.prototype,"variant",2),So([m({type:String,reflect:!0})],Oo.prototype,"size",2),Oo=So([u("sonic-taxonomy")],Oo);var Do=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,jo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Eo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Do(e,s,o),o};let Lo=class extends Mt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){const t=this;let e,s,i=!1;this.scrollable&&(t.addEventListener("mousedown",(r=>{i=!0,t.classList.add("active"),e=r.pageX-t.offsetLeft,s=t.scrollLeft})),t.addEventListener("mouseleave",(()=>{i=!1,t.classList.remove("active")})),t.addEventListener("mouseup",(()=>{i=!1,t.classList.remove("active")})),t.addEventListener("mousemove",(r=>{if(!i)return;r.preventDefault();const o=1.5*(r.pageX-t.offsetLeft-e);t.scrollLeft=s-o,this.setScrollShadow(t,this.direction)})),t.addEventListener("scroll",(e=>{e.preventDefault(),this.setScrollShadow(t,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return ut`<menu part="menu" class="shadowable" style="${Kt(t)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${Kt(s)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${Kt(i)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${e?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};Lo.styles=[F`:host{display:block;--sc-menu-gap:0.15rem}:host>menu{display:flex;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em);margin:0;padding:.35em}.hidden{display:none!important}:host([shadow=md]) .shadowable,:host([shadow=true]) .shadowable,:host([shadow]) .shadowable{box-shadow:var(--sc-shadow)}:host([shadow=sm]) .shadowable{box-shadow:var(--sc-shadow-sm)}:host([shadow=lg]) .shadowable{box-shadow:var(--sc-shadow-lg)}:host([shadow=none]) .shadowable{box-shadow:none}:host([scrollable]){scrollbar-width:none;-ms-overflow-style:none}:host([scrollable]) menu>*{scroll-snap-align:start;white-space:nowrap}:host([scrollable][direction=row]){overflow-x:scroll;scroll-snap-type:x mandatory}:host([scrollable][direction=column]){overflow-y:scroll;scroll-snap-type:y mandatory}:host([scrollable])::-webkit-scrollbar{display:none!important}:host([scrollable][direction=row].shadow-right){-webkit-mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left.shadow-right){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}:host([scrollable][direction=column].shadow-top){-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-top.shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}`],jo([m({type:String,reflect:!0})],Lo.prototype,"size",2),jo([m({type:String,reflect:!0})],Lo.prototype,"direction",2),jo([m({type:String})],Lo.prototype,"gap",2),jo([m({type:String,reflect:!0})],Lo.prototype,"align",2),jo([m({type:String,reflect:!0})],Lo.prototype,"shadow",2),jo([m({type:String})],Lo.prototype,"moreShape",2),jo([m({type:Boolean})],Lo.prototype,"scrollable",2),jo([m({type:String})],Lo.prototype,"minWidth",2),jo([v("menu")],Lo.prototype,"menu",2),jo([_({selector:"sonic-menu-item"})],Lo.prototype,"menuChildren",2),jo([_({slot:"more",selector:"*"})],Lo.prototype,"moreElements",2),jo([b()],Lo.prototype,"hasMoreElements",2),Lo=jo([u("sonic-menu")],Lo);var Mo=Object.defineProperty,No=Object.getOwnPropertyDescriptor,zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?No(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mo(e,s,o),o};let Fo=class extends Mt{firstUpdated(){var t;null==(t=this.buttons)||t.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))}))}render(){return ut`<slot></slot>`}};Fo.styles=[F`:host{display:flex;gap:.5rem;margin-top:auto;padding-top:1.5rem}`],zo([_({selector:"sonic-button"})],Fo.prototype,"buttons",2),Fo=zo([u("sonic-modal-actions")],Fo);var Io=Object.defineProperty,To=Object.getOwnPropertyDescriptor,Vo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?To(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Io(e,s,o),o};let Ro=class extends Mt{render(){return ut`<sonic-button reset="${ue(this.reset)}" shape="circle" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};Ro.styles=[F`:host{position:sticky;display:block;align-self:flex-end;height:0;top:0;padding-top:.5rem;padding-right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`],Vo([m()],Ro.prototype,"reset",2),Ro=Vo([u("sonic-modal-close")],Ro);var Uo=Object.defineProperty,qo=Object.getOwnPropertyDescriptor;let Bo=class extends Mt{render(){return ut`<slot></slot>`}};Bo.styles=[F`:host{display:block}`],Bo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Uo(e,s,o),o})([u("sonic-modal-content")],Bo);var Ho=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor;let Wo=class extends Mt{render(){return ut`<slot></slot>`}};Wo.styles=[F`:host{font-size:1.1rem;display:block;line-height:1.1rem;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family);font-weight:var(--sc-headings-font-weight)}`],Wo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ho(e,s,o),o})([u("sonic-modal-subtitle")],Wo);var Zo=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor;let Yo=class extends Mt{render(){return ut`<slot></slot>`}};Yo.styles=[F`:host{font-weight:700;font-size:1.5rem;display:block;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family)}`],Yo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Zo(e,s,o),o})([u("sonic-modal-title")],Yo);var Go=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,Xo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Go(e,s,o),o};const tn="sonic-modal";let en=class extends(S(Mt)){constructor(){super(...arguments),this.forceAction=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(tn);return e.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${t.content}</sonic-modal-content>`||"",(document.querySelector("sonic-theme")||document.body).appendChild(e),e.show(),e}connectedCallback(){super.connectedCallback(),this.handleFullsceen()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){if(0==this.visible)return mt;const t={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return ut`<div class="modal-wrapper" style="${Kt(e)}" ${Xe({out:He})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${Kt(t)}" ${Xe({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.forceAction?"":this.hide}" ${Xe({keyframeOptions:{duration:500},in:Ke,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&ae.get(this.getAttribute("resetDataProviderOnHide")).set({})}dispose(){this.hide(),this.remove()}handleEscape(t){if("Escape"===t.key){[...document.querySelectorAll(tn)].forEach((t=>{this.forceAction||t.hide()}))}}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};en.styles=[ps,F`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:80vh;--sc-modal-rounded:var(--sc-rounded-lg)}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:990;align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:900;opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`],Xo([m({type:Boolean})],en.prototype,"forceAction",2),Xo([m({type:String,reflect:!0})],en.prototype,"align",2),Xo([m({type:String})],en.prototype,"padding",2),Xo([m({type:String})],en.prototype,"maxWidth",2),Xo([m({type:String})],en.prototype,"maxHeight",2),Xo([m({type:String})],en.prototype,"width",2),Xo([m({type:String})],en.prototype,"height",2),Xo([m({type:Boolean,reflect:!0})],en.prototype,"fullScreen",2),Xo([m({type:Boolean,reflect:!0})],en.prototype,"visible",2),Xo([v(".modal-wrapper")],en.prototype,"modalWrapper",2),Xo([v(".modal")],en.prototype,"modalElement",2),Xo([_({selector:"sonic-modal-close"})],en.prototype,"closeBtn",2),en=Xo([u(tn)],en),"undefined"!=typeof window&&(window.SonicModal=en);var sn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,on=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?rn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&sn(e,s,o),o};const nn={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let an=class extends Mt{constructor(){super(...arguments),this.label="",this.text="",this.background=!1,this.status="default"}render(){return ut`<div part="alert" class="alert"><div>${this.status&&ut`<sonic-icon name="${nn[this.status]}"></sonic-icon>`}</div><div>${this.label?ut`<span class="label">${ss(this.label)}</span>`:mt}<slot>${this.text}</slot></div></div>`}};an.styles=[ge,F`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}`],on([m({type:String})],an.prototype,"label",2),on([m({type:String})],an.prototype,"text",2),on([m({type:String,reflect:!0})],an.prototype,"size",2),on([m({type:Boolean,reflect:!0})],an.prototype,"background",2),on([m({type:String,reflect:!0})],an.prototype,"status",2),an=on([u("sonic-alert")],an);var ln=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,hn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?cn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ln(e,s,o),o};let dn=class extends(S(Mt)){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&_s.add({text:t.content,status:t.status})}))}get message(){return this._message}set message(t){this._message=t,this.message&&!1===this.props.success&&(this.props.public_message||_s.add({text:this.message,status:"error"}))}get data(){return this._data}set data(t){this._data=t;const e={text:"Votre produit a bien été ajouté",status:"success"};Array.isArray(this.data)&&!0===this.props.success&&_s.add(e),""==this.data&&!0===this.props.status&&_s.add(e),!1===this.props.success&&(this.props.public_message||_s.add({text:this.data,status:"error"}))}render(){return mt}};hn([m({type:Boolean})],dn.prototype,"success",2),hn([m({type:Boolean})],dn.prototype,"status",2),hn([m({type:Array})],dn.prototype,"messages",1),hn([m({type:String})],dn.prototype,"message",1),hn([m()],dn.prototype,"data",1),dn=hn([u("sonic-toast-message-subscriber")],dn);var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,gn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?un(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pn(e,s,o),o};let mn=class extends Mt{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){let t=this.disabled||""==this.label?"disabled":"";return ut`<div data-tooltip-text="${this.label.trim().replace(" "," ")}" class="tooltip ${t}"><slot></slot></div>`}};mn.styles=[F`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.25rem;border-radius:.25rem;color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:20rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`],gn([m({type:String})],mn.prototype,"label",2),gn([m({type:String,reflect:!0})],mn.prototype,"placement",2),gn([m({type:Boolean})],mn.prototype,"disabled",2),mn=gn([u("sonic-tooltip")],mn);var bn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,vn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&bn(e,s,o),o};let yn=class extends Mt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1}firstUpdated(){var t,e;(this.label||(null==(t=this.slotNodes)?void 0:t.length))&&(null==(e=this.divider)||e.classList.add("has-text"))}render(){return ut`<div part="divider"><span class="text">${ss(this.label?this.label:"")}<slot></slot></span></div>`}};yn.styles=[F`:host{--sc-divider-my:0.5rem;--sc-divider-mx:0;--sc-divider-border-width:max(1px, var(--sc-border-width));--sc-divider-border-color:var(--sc-border-color);--sc-divider-border-style:solid;--sc-divider-color:currentColor;--sc-divider-ff:var(--sc-font-family-base);--sc-divider-fs:1rem;--sc-divider-fw:var(--sc-font-weight-base);--sc-divider-fst:var(--sc-font-style-base);margin:var(--sc-divider-my) var(--sc-divider-mx);font-size:var(--sc-divider-fs);font-style:var(--sc-divider-fst);font-family:var(--sc-divider-ff);font-weight:var(--sc-divider-fw);color:var(--sc-divider-color);display:block}:host([size="2xs"]){--sc-divider-my:0.35rem;--sc-divider-fs:0.68rem}:host([size=xs]){--sc-divider-my:0.5rem;--sc-divider-fs:0.75rem}:host([size=sm]){--sc-divider-my:0.75rem;--sc-divider-fs:0.875rem}:host([size=md]){--sc-divider-my:1.25rem}:host([size=lg]){--sc-divider-my:1.85rem}:host([size=xl]){--sc-divider-my:2.25rem}:host([size="2xl"]){--sc-divider-my:3.35rem}div{display:flex;align-items:center;width:100%}div::after,div::before{content:"";flex-grow:1;border-top:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:100%;opacity:var(--sc-divider-opacity,1)}:host([align=left]) div:before{display:none}:host([align=right]) div:after{display:none}:host([vertical]){margin:var(--sc-divider-mx) var(--sc-divider-my)}:host([vertical]) div{flex-direction:column;height:100%;min-height:var(--sc-form-height)}:host([vertical]) .has-text{gap:.25rem}:host([vertical]) div::after,:host([vertical]) div::before{border-top:none;border-left:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:auto;height:100%;opacity:var(--sc-divider-opacity,1)}:host([noMargin]){margin:0}.text{flex-shrink:0;line-height:1.1;max-width:80%}.no-text .text{display:none}.has-text{gap:.5rem}`],vn([x()],yn.prototype,"slotNodes",2),vn([v("div")],yn.prototype,"divider",2),vn([m({type:String})],yn.prototype,"label",2),vn([m({type:String,reflect:!0})],yn.prototype,"size",2),vn([m({type:String,reflect:!0})],yn.prototype,"align",2),vn([m({type:Boolean,reflect:!0})],yn.prototype,"vertical",2),vn([m({type:Boolean,reflect:!0})],yn.prototype,"noMargin",2),yn=vn([u("sonic-divider")],yn);var wn=Object.defineProperty,_n=Object.getOwnPropertyDescriptor;let xn=class extends Mt{render(){return ut`<div><slot></slot></div>`}};xn.styles=[F`div{margin-top:.1em;font-family:var(--sc-font-family-base);font-size:.7em;font-weight:var(--sc-font-style-base)}`],xn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?_n(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wn(e,s,o),o})([u("sonic-card-header-description")],xn);var kn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,Pn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?An(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&kn(e,s,o),o};let Cn=class extends Mt{render(){return ut`<div class="header"><div class="header-content">${ss(this.label)} ${this.description?ut`<sonic-card-header-description>${ss(this.description)}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};Cn.styles=[F`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`],Pn([m()],Cn.prototype,"label",2),Pn([m()],Cn.prototype,"description",2),Cn=Pn([u("sonic-card-header")],Cn);var $n=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor;let On=class extends Mt{render(){return ut`<div><slot></slot></div>`}};On=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$n(e,s,o),o})([u("sonic-card-main")],On);var Dn=Object.defineProperty,En=Object.getOwnPropertyDescriptor;let jn=class extends Mt{render(){return ut`<slot></slot>`}};jn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?En(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Dn(e,s,o),o})([u("sonic-card-footer")],jn);var Ln=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,Nn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ln(e,s,o),o};let zn=class extends Mt{constructor(){super(...arguments),this.type="default"}render(){return ut`<div part="card" class="card"><slot></slot></div>`}};zn.styles=[F`:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{:host{break-inside:avoid}}*{box-sizing:border-box}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`],Nn([m({type:String,reflect:!0})],zn.prototype,"type",2),zn=Nn([u("sonic-card")],zn);const Fn=F`:host{--sc-color:inherit;color:var(--sc-color)}:host([type=primary]){--sc-color:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success)}.inherit-color{color:var(--sc-color)}`;F`:host{--sc-color:inherit;--sc-bg:inherit;color:var(--sc-color);background:var(--sc-bg)}:host([type=primary]){--sc-color:var(--sc-primary-content);--sc-bg:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning-content);--sc-bg:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger-content);--sc-bg:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info-content);--sc-bg:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success-content);--sc-bg:var(--sc-success)}.inherit-bg{color:inherit}`;var In=Object.defineProperty,Tn=Object.getOwnPropertyDescriptor;let Vn=class extends Mt{render(){return ut`<slot></slot>`}};Vn.styles=[Fn,F`:host{display:table-row}:host([odd]){background:var(--sc-table-accent-bg)}`],Vn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&In(e,s,o),o})([u("sonic-tr")],Vn);var Rn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,qn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Un(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rn(e,s,o),o};let Bn=class extends Mt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return ut`<th part="th" style="${Kt(t)}" colspan="${ue(this.colSpan)}" rowspan="${ue(this.rowSpan)}"><slot></slot></th>`}};Bn.styles=[Fn,F`:host{display:contents;background:var(--sc-table-bg);position:sticky;top:0;z-index:20}th{all:inherit;display:table-cell;border-bottom:calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);text-transform:var(--sc-table-th-tt);font-weight:var(--sc-table-th-fw);font-size:var(--sc-table-th-fs);padding:var(--sc-table-th-py) var(--sc-table-th-px)}`],qn([m({type:Number})],Bn.prototype,"colSpan",2),qn([m({type:Number})],Bn.prototype,"rowSpan",2),qn([m({type:String})],Bn.prototype,"align",2),qn([m({type:String})],Bn.prototype,"minWidth",2),qn([m({type:String})],Bn.prototype,"maxWidth",2),qn([m({type:String})],Bn.prototype,"width",2),Bn=qn([u("sonic-th")],Bn);var Hn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,Wn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Hn(e,s,o),o};let Zn=class extends Mt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return ut`<td part="td" style="${Kt(t)}" colspan="${ue(this.colSpan)}" rowspan="${ue(this.rowSpan)}"><slot></slot></td>`}};Zn.styles=[Fn,F`:host{display:contents}td{all:inherit;display:table-cell;padding:var(--sc-table-td-py) var(--sc-table-td-px)}`],Wn([m({type:Number})],Zn.prototype,"colSpan",2),Wn([m({type:Number})],Zn.prototype,"rowSpan",2),Wn([m({type:String})],Zn.prototype,"align",2),Wn([m({type:String})],Zn.prototype,"vAlign",2),Wn([m({type:String})],Zn.prototype,"minWidth",2),Wn([m({type:String})],Zn.prototype,"maxWidth",2),Wn([m({type:String})],Zn.prototype,"width",2),Zn=Wn([u("sonic-td")],Zn);var Qn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor;let Gn=class extends Mt{render(){return ut`<slot></slot>`}};Gn.styles=[F`:host{display:table-header-group}`],Gn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qn(e,s,o),o})([u("sonic-thead")],Gn);var Jn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor;let ta=class extends Mt{render(){return ut`<tbody><slot></slot></tbody>`}};ta.styles=[F`:host{display:table-row-group}::slotted(sonic-tr:nth-child(odd)){background:var(--sc-table-accent-bg)}::slotted(sonic-tr:hover){background:var(--sc-table-hover-bg)}::slotted(sonic-tr:not(:last-child)){border-bottom:var(--sc-form-border-width) solid var(--sc-base-200)!important}`],ta=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Xn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Jn(e,s,o),o})([u("sonic-tbody")],ta);var ea=Object.defineProperty,sa=Object.getOwnPropertyDescriptor;let ia=class extends Mt{render(){return ut`<tfoot><slot></slot></tfoot>`}};ia.styles=[F`:host{display:contents}`],ia=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?sa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ea(e,s,o),o})([u("sonic-tfoot")],ia);var ra=Object.defineProperty,oa=Object.getOwnPropertyDescriptor;let na=class extends Mt{render(){return ut`<slot></slot>`}};na.styles=[F`:host{display:table-caption;font-size:.75rem;color:var(--sc-table-caption-color);padding:var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py))}`],na=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?oa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ra(e,s,o),o})([u("sonic-caption")],na);var aa=Object.defineProperty,la=Object.getOwnPropertyDescriptor,ca=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?la(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&aa(e,s,o),o};let ha=class extends Mt{constructor(){super(...arguments),this.bordered=!1}render(){const t={maxHeight:this.maxHeight};return ut`<div class="table-container custom-scroll" style="${Kt(t)}"><div class="table"><slot></slot></div></div>`}};ha.styles=[ps,ge,F`:host{--sc-table-fw:var(--sc-font-weight-base);--sc-table-fst:var(--sc-font-style-base);--sc-table-fs:1rem;--sc-table-border-color:var(--sc-border-color);--sc-table-caption-color:var(--sc-base-500);--sc-table-bg:var(--sc-base);--sc-table-accent-bg:var(--sc-base-50);--sc-table-hover-bg:var(--sc-base-100);--sc-table-th-fs:0.85em;--sc-table-th-fw:bold;--sc-table-th-tt:uppercase;--sc-table-th-px:var(--sc-table-td-px);--sc-table-th-py:calc(1.8 * var(--sc-table-td-py));--sc-table-td-px:0.5em;--sc-table-td-py:0.5em;display:block}:host([maxHeight]) .table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.table{width:100%;display:table;box-sizing:border-box}:host([bordered]) .table-container{border:var(--sc-border-width) solid var(--sc-table-border-color)!important}`],ca([m({type:String,reflect:!0})],ha.prototype,"size",2),ca([m({type:Boolean,reflect:!0})],ha.prototype,"bordered",2),ca([m({type:String})],ha.prototype,"maxHeight",2),ha=ca([u("sonic-table")],ha);var da=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,ua=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&da(e,s,o),o};let ga=class extends(Di(Mt)){constructor(){super(...arguments),this.key="",this.action=null}connectedCallback(){var t;const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(e),super.connectedCallback(),this.formPublisher=ae.get(null!=(t=this.getAncestorAttributeValue("headersDataProvider"))?t:this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign((t=>{"request_token"==t&&this.requestToken()})))}requestToken(){var t,e,s,i,r;if(!this.formPublisher)return;let o=(null!=(s=null!=(e=this.action)?e:null==(t=this.formPublisher.captchaAction)?void 0:t.get())?s:"submit").replace(/[^\w_\/]/g,"_"),n=(null!=(r=null==(i=this.formPublisher.captchaMethod)?void 0:i.get())?r:"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:n+"//"+o}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return ut`<slot></slot>`}};ua([m()],ga.prototype,"key",2),ua([m()],ga.prototype,"action",2),ga=ua([u("sonic-captcha")],ga),window.SonicPublisherManager||(window.SonicPublisherManager=c),window.SonicDataBindObserver||(window.SonicDataBindObserver=p);const ma=_s,ba=en;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ma,SonicModal:ba}}));
|
|
103
|
+
*/,pr=Bt(class extends Ht{constructor(t){var e;if(super(t),t.type!==Ut||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(s=this.st)||void 0===s?void 0:s.has(t))&&this.nt.add(t);return this.render(e)}const r=t.element.classList;this.nt.forEach((t=>{t in e||(r.remove(t),this.nt.delete(t))}));for(const o in e){const t=!!e[o];t===this.nt.has(o)||(null===(i=this.st)||void 0===i?void 0:i.has(o))||(t?(r.add(o),this.nt.add(o)):(r.remove(o),this.nt.delete(o)))}return gt}});var ur=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,br=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?gr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ur(e,s,o),o};let mr=class extends(Pi(Gt(S(Mt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return ut`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div @click="${this.inlineContentFocus}" class="form-control ${pr(t)}"><div class="${this.inlineContent?"form-element form-element-wrapper":"contents"}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><input id="form-element" part="input" class="form-element input" @input="${this.handleChange}" @blur="${this.handleBlur}" type="${this.type}" disabled="${ue(this.disabled)}" ?readonly="${this.readonly}" ?autofocus="${this.autofocus}" list="${ue(this.list)}" tabindex="${ue(this.tabindex)}" pattern="${ue(this.pattern)}" min="${ue(this.min)}" max="${ue(this.max)}" step="${ue(this.step)}" src="${ue(this.src)}" minlength="${ue(this.minlength)}" maxlength="${ue(this.maxlength)}" placeholder="${ue(this.placeholder)}" required="${ue(this.required)}" autocomplete="${ue(this.autocomplete)}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}" .name="${this.name}" .value="${this.value}"><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot><slot name="list"></slot>`}};mr.styles=[ge,dr,cr,hr,F`:host([type=hidden]){appearance:none!important;display:none!important}`],br([b({type:String,reflect:!0})],mr.prototype,"size",2),br([b({type:String})],mr.prototype,"list",2),br([b({type:String})],mr.prototype,"placeholder",2),br([b({type:String})],mr.prototype,"pattern",2),br([b({type:String})],mr.prototype,"min",2),br([b({type:String})],mr.prototype,"max",2),br([b({type:Boolean})],mr.prototype,"readonly",2),br([b({type:Number})],mr.prototype,"step",2),br([b({type:Number})],mr.prototype,"minlength",2),br([b({type:Number})],mr.prototype,"maxlength",2),br([b({type:String})],mr.prototype,"src",2),br([b({type:Boolean,reflect:!0})],mr.prototype,"inlineContent",2),br([b({type:Boolean})],mr.prototype,"disableInlineContentFocus",2),br([_({slot:"label"})],mr.prototype,"slotLabelNodes",2),br([_({slot:"description"})],mr.prototype,"slotDescriptionNodes",2),br([_({slot:"suffix"})],mr.prototype,"slotSuffixNodes",2),br([_({slot:"prefix"})],mr.prototype,"slotPrefixNodes",2),br([v("input")],mr.prototype,"input",2),br([m()],mr.prototype,"hasDescription",2),br([m()],mr.prototype,"hasLabel",2),br([m()],mr.prototype,"hasSuffix",2),br([m()],mr.prototype,"hasPrefix",2),mr=br([u("sonic-input")],mr);var fr=Object.defineProperty,vr=Object.getOwnPropertyDescriptor,yr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fr(e,s,o),o};let wr=class extends Mt{constructor(){super(...arguments),this.open=!1,this.toggle="true",this.noToggle=!1,this.inline=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN}runPositioning(){this.positioningRuns&&(this.positioningRuns=!0,this._setUpMenu(this.placement),window.requestAnimationFrame((()=>this.runPositioning())))}_toggle(t){if(this.open&&this.noToggle)return;const e=t;("keydown"!=t.type||"ArrowDown"==e.key&&!this.open)&&(this.open=!this.open,this.open?this._show():this._hide())}_show(){this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=Number.NaN,this.lastContentY=Number.NaN,this.runPositioning())}_hide(){this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1}_handleClosePop(t){const s=t.composedPath(),i=s[0];wr.pops.forEach((r=>{const o=s.includes(r),n=s.includes(r.querySelector('[slot="content"]')),a="keep"===e.getAncestorAttributeValue(i,"data-on-select");"pointerdown"==t.type&&o||"click"==t.type&&(o&&a||!n)||r._hide()}))}connectedCallback(){super.connectedCallback(),0==wr.pops.size&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop)),wr.pops.add(this)}disconnectedCallback(){super.disconnectedCallback(),wr.pops.delete(this),0==wr.pops.size&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop))}_setUpMenu(t){var e;const s=null==(e=this.popContent)?void 0:e.getBoundingClientRect(),i=this.getBoundingClientRect();if(!this.offsetParent)return;const r=this.offsetParent.getBoundingClientRect(),o=i.left-r.left,n=i.top-r.top;let a=o,l=n;const c=n-s.height-8,h=o-s.width-16,d=o+i.width+16,p=n+i.height+8;switch(t){case"bottom":l=p;break;case"top":l=c;break;case"left":a=h;break;case"right":a=d}const u=window.innerWidth-d-r.left-s.width-20;u<0&&"right"===t&&(a=h),u<0&&["top","bottom"].includes(t)&&(a=Math.max(a+u,h+i.width));-r.left-h>20&&"left"===t&&(a=d);const g=window.innerHeight-p-r.top-s.height-20;g<0&&"bottom"===t&&(l=c),g<0&&["left","right"].includes(t)&&(l=Math.max(l+g,c+i.height));-r.top-c>-20&&"top"===t&&(l=p),this.lastContentX=a,this.lastContentY=l,Object.assign(this.popContent.style,{left:`${a}px`,top:`${l}px`})}render(){return ut`<slot @click="${this._toggle}" @keydown="${this._toggle}" class="contents"></slot><slot name="content" tabindex="-1" part="content" class="${this.open?"is-open":""}"></slot>`}};wr.pops=new Set,wr.styles=[F`:host{display:inline-block;vertical-align:middle}slot[name=content]{max-width:80vw;background-color:var(--sc-base);position:absolute;z-index:50;display:block;transform:translateY(1rem) scale(.95);opacity:0;pointer-events:none;transition-duration:.15s;transition-timing-function:ease;transition-property:all;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em)}slot[name=content].is-open{transform:translateY(0) scale(1);opacity:1;pointer-events:auto;transition-property:scale,opacity;transition-timing-function:cubic-bezier(.25,.25,.42,1.225)}:host([shadow=md]) slot[name=content],:host([shadow=true]) slot[name=content],:host([shadow]) slot[name=content]{box-shadow:var(--sc-shadow)}:host([shadow=sm]) slot[name=content]{box-shadow:var(--sc-shadow-sm)}:host([shadow=none]) slot[name=content]{box-shadow:none}:host([shadow=lg]) slot[name=content]{box-shadow:var(--sc-shadow-lg)}:host([inline]){vertical-align:baseline}`],yr([m()],wr.prototype,"open",2),yr([v("slot:not([name=content])")],wr.prototype,"popBtn",2),yr([v("slot[name=content]")],wr.prototype,"popContent",2),yr([b({type:String})],wr.prototype,"toggle",2),yr([b({type:Boolean})],wr.prototype,"noToggle",2),yr([b({type:Boolean,reflect:!0})],wr.prototype,"inline",2),yr([b({type:String,reflect:!0})],wr.prototype,"shadow",2),yr([b({type:String})],wr.prototype,"placement",2),wr=yr([u("sonic-pop")],wr);var xr=Object.defineProperty,_r=Object.getOwnPropertyDescriptor;let kr=class extends ve{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};kr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?_r(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&xr(e,s,o),o})([u("sonic-menu-item")],kr);var Ar=Object.defineProperty,Pr=Object.getOwnPropertyDescriptor,Cr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Pr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ar(e,s,o),o};let $r=class extends(ji(Di(Mt))){constructor(){super(...arguments),this._name="",this.forceAutoFill=!1,this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.value="",this.formDataProvider=""}get name(){return this._name}set name(t){this.hasAttribute("name")&&!this.forceAutoFill&&(t=this.getAttribute("name")),this._name=t,this.requestUpdate()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback()}render(){return ut`<sonic-pop toggle="false" style="display:block"><sonic-input type="search" data-keyboard-nav="nav-autocomplete" label="${ue(this.label)}" description="${ue(this.description)}" name="${ue(this.name)}" value="${ue(this.value)}" autocomplete="off" clearable></sonic-input><sonic-menu slot="content"><sonic-queue filteredFields="${this.filteredFields}" dataProviderExpression="${this.dataProviderExpression}" dataFilterProvider="${this.formDataProvider}" key="${this.key}" .templates="${this.templateList}" displayContents></sonic-queue></sonic-menu></sonic-pop>`}};$r.styles=[F`:host{display:block}`],Cr([b()],$r.prototype,"name",1),Cr([b()],$r.prototype,"forceAutoFill",2),Cr([b()],$r.prototype,"description",1),Cr([b()],$r.prototype,"label",1),Cr([b({type:String})],$r.prototype,"placeholder",2),Cr([b()],$r.prototype,"filteredFields",2),Cr([b({type:Boolean})],$r.prototype,"readonly",2),Cr([b({type:String})],$r.prototype,"dataProviderExpression",2),Cr([b({type:String})],$r.prototype,"key",2),Cr([b({type:String})],$r.prototype,"value",2),$r=Cr([u("sonic-input-autocomplete")],$r);var Sr=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Dr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Or(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Sr(e,s,o),o};let jr=class extends(Di(Mt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ae.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ae.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?ut`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:ut`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?bt:ut`<div>${this.wording_password_helper_decription}</div><div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div><div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div><div>${this.getIcon(this.hasMajuscule)} ${this.wording_password_helper_upper_case}</div><div>${this.getIcon(this.hasNumber)} ${this.wording_password_helper_number}</div><div>${this.getIcon(this.hasSpecialChar)} ${this.wording_password_helper_special_char}</div>`}};Dr([b()],jr.prototype,"name",2),Dr([b()],jr.prototype,"minChars",2),Dr([m()],jr.prototype,"hasNoChar",2),Dr([m()],jr.prototype,"hasEnoughChars",2),Dr([m()],jr.prototype,"hasMinuscule",2),Dr([m()],jr.prototype,"hasMajuscule",2),Dr([m()],jr.prototype,"hasNumber",2),Dr([m()],jr.prototype,"hasSpecialChar",2),Dr([b()],jr.prototype,"wording_password_helper_decription",2),Dr([b()],jr.prototype,"wording_password_helper_min_length",2),Dr([b()],jr.prototype,"wording_password_helper_lower_case",2),Dr([b()],jr.prototype,"wording_password_helper_upper_case",2),Dr([b()],jr.prototype,"wording_password_helper_number",2),Dr([b()],jr.prototype,"wording_password_helper_special_char",2),jr=Dr([u("sonic-password-helper")],jr);var Er=Object.defineProperty,Lr=Object.getOwnPropertyDescriptor,Mr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Lr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Er(e,s,o),o};let Nr=class extends(Di(Mt)){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ae.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{this.hasNoChar=!e||0==e.length,this.name&&this.sameValueAs&&(this.areEqual=t[this.name].get()==t[this.sameValueAs].get())},t[this.name].onAssign(this.checkValue),t[this.sameValueAs].onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ae.get(this.getAncestorAttributeValue("formDataProvider"));t[this.name].offAssign(this.checkValue),t[this.sameValueAs].offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?bt:ut`<span>${this.areEqual?ss(this.descriptionWhenEqual):ss(this.descriptionWhenNotEqual)}</span>`}};Mr([b()],Nr.prototype,"name",2),Mr([b()],Nr.prototype,"sameValueAs",2),Mr([b()],Nr.prototype,"descriptionWhenEqual",2),Mr([b()],Nr.prototype,"descriptionWhenNotEqual",2),Mr([m()],Nr.prototype,"areEqual",2),Mr([m()],Nr.prototype,"hasNoChar",2),Nr=Mr([u("sonic-same-value-helper")],Nr);var zr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,Ir=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Fr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&zr(e,s,o),o};let Tr=class extends(pe(Pi(Gt(S(Mt))))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){return ut`<label class="checkbox-container ${this.disabled?"disabled":""}"><span class="icon-container"><input type="${this.type}" @click="${this.handleChange}" @blur="${this.handleBlur}" ?required="${this.required}" .disabled="${ue(this.disabled)}" .checked="${ue(this.checked)}" .name="${this.name}" .value="${this.value}" ?autofocus="${this.autofocus}" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}"><sonic-icon name="${"indeterminate"==this.checked?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon></span><div class="checkbox-text ${this.hasDescription||this.hasLabel?"checkbox-text":"hidden"}">${this.label?ss(this.label):""}<slot @slotchange="${this.hasSlotOrProps}"></slot><slot @slotchange="${this.hasSlotOrProps}" name="description" class="${this.hasDescription?"description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot></div></label>`}};Tr.styles=[ge,F`:host{--sc-checkbox-border-width:var(--sc-form-border-width);--sc-checkbox-border-color:var(--sc-input-border-color);--sc-checkbox-bg:var(--sc-input-bg);--sc-checkbox-color:transparent}*{box-sizing:border-box}.checkbox-container{min-height:1.4em;display:flex;gap:.5em;line-height:1.2;align-items:flex-start;font-size:var(--sc-fs)}.icon-container{position:relative;display:flex;flex-shrink:0}input{box-sizing:border-box;appearance:none;flex-shrink:0;height:calc(var(--sc-fs) * 1.25);width:calc(var(--sc-fs) * 1.25);display:block;cursor:pointer;border-radius:.25em;transition:.2s;outline:0;margin:0;background-color:var(--sc-checkbox-bg);border:var(--sc-checkbox-border-width) solid var(--sc-checkbox-border-color)}:host(:not([disabled])) input:active,input:focus{box-shadow:0 0 0 2px var(--sc-primary)}:host(:not([disabled])) label{cursor:pointer}sonic-icon{line-height:0;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) scale(0);transition:transform .2s ease-in-out;color:var(--sc-checkbox-color)}.description{color:var(--sc-base-400);font-size:.85em;margin-top:.2em;display:block}input:checked,input[checked]{--sc-checkbox-border-color:var(--sc-primary);--sc-checkbox-bg:var(--sc-primary)}input:checked+sonic-icon,input[checked]+sonic-icon{--sc-checkbox-color:var(--sc-primary-content);transform:translateX(-50%) translateY(-50%) scale(1)}.disabled{cursor:not-allowed}.disabled input{opacity:.4}.disabled .checkbox-text{opacity:.6}:host(:not([disabled])) label:hover input{filter:brightness(.97)}::slotted(a){color:inherit;text-decoration:underline!important}::slotted(a:hover){text-decoration:none!important}.hidden{display:none}`],Ir([b({type:Boolean,reflect:!0})],Tr.prototype,"touched",2),Ir([b({type:String})],Tr.prototype,"iconName",2),Ir([b({type:String})],Tr.prototype,"indeterminateIconName",2),Ir([b({type:Boolean})],Tr.prototype,"hasDescription",2),Ir([b({type:Boolean})],Tr.prototype,"hasLabel",2),Ir([_()],Tr.prototype,"slotLabelNodes",2),Ir([_({slot:"description"})],Tr.prototype,"slotDescriptionNodes",2),Tr=Ir([u("sonic-checkbox")],Tr);var Rr=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor;let Ur=class extends Tr{constructor(){super(),this.radio=!0}connectedCallback(){super.connectedCallback(),this.type="radio"}};Ur.styles=[Tr.styles,F`:host input{border-radius:50%}:host sonic-icon{border-radius:50%;overflow:hidden;background-color:var(--sc-primary-content);line-height:0;display:block;font-size:1em;height:.6em;width:.6em}`],Ur=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Rr(e,s,o),o})([u("sonic-radio")],Ur);var qr=Object.defineProperty,Br=Object.getOwnPropertyDescriptor,Hr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Br(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&qr(e,s,o),o};let Kr=class extends(Gt(S(Mt))){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const e of t)e.selected&&(this.value=e.value||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(){this.hasDoneFirstUpdate=!0}set value(t){(null!=t||this.hasDoneFirstUpdate)&&(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){const t=this.getFormPublisher();t&&(t[this.name]=this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps();const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map((t=>({value:t.value,wording:t.text,selected:t.hasAttribute("selected")}))))}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("select");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return ut`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control ${pr(t)}"><slot name="prefix" @slotchange="${this.hasSlotOrProps}"></slot><div class="form-select-wrapper"><select id="form-element" @change="${this.handleChange}" @blur="${this.handleBlur}" ?disabled="${this.disabled}" ?required="${this.required}" ?multiple="${this.multiple}" size="${ue(this.selectSize)}" ?autofocus="${this.autofocus}" .value="${this.value}" class="form-element" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}">${Ee(this.options,(t=>t[this.valueKey]),(t=>{const e=this.value==t[this.valueKey];return ut`<option ?selected="${e}" value="${t[this.valueKey]}">${t[this.wordingKey]}</option>`}))}<slot></slot></select><sonic-icon class="select-chevron" name="nav-arrow-down" .size="${this.size}"></sonic-icon></div><slot name="suffix" @slotchange="${this.hasSlotOrProps}"></slot></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot>`}};Kr.styles=[ge,dr,cr,hr,F`.form-element{appearance:none}:host([disabled]) sonic-icon{opacity:0}:host(:not([disabled])) .form-element:not(:has(option:only-child)){padding-right:max(1em,calc(.8 * var(--sc-input-px)))}.form-select-wrapper{position:relative;width:100%}sonic-icon{position:absolute;right:calc(.8 * var(--sc-input-px));top:50%;pointer-events:none;transform:translateY(-50%);color:var(--sc-input-c)}option{padding:.1rem 5rem;color:var(--sc-base-content);background:var(--sc-base)}`],Hr([b({type:String})],Kr.prototype,"valueKey",2),Hr([b({type:String})],Kr.prototype,"wordingKey",2),Hr([b({type:Boolean})],Kr.prototype,"multiple",2),Hr([b({type:String,reflect:!0})],Kr.prototype,"size",2),Hr([b({type:Number})],Kr.prototype,"selectSize",2),Hr([b({type:Array})],Kr.prototype,"options",1),Hr([b({reflect:!0})],Kr.prototype,"value",1),Hr([b({type:Boolean})],Kr.prototype,"forceAutoFill",2),Hr([b()],Kr.prototype,"description",1),Hr([b()],Kr.prototype,"label",1),Hr([_({slot:"label"})],Kr.prototype,"slotLabelNodes",2),Hr([_({slot:"description"})],Kr.prototype,"slotDescriptionNodes",2),Hr([_({slot:"suffix"})],Kr.prototype,"slotSuffixNodes",2),Hr([_({slot:"prefix"})],Kr.prototype,"slotPrefixNodes",2),Hr([m()],Kr.prototype,"hasDescription",2),Hr([m()],Kr.prototype,"hasLabel",2),Hr([m()],Kr.prototype,"hasSuffix",2),Hr([m()],Kr.prototype,"hasPrefix",2),Kr=Hr([u("sonic-select")],Kr);var Wr=Object.defineProperty,Zr=Object.getOwnPropertyDescriptor,Qr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Zr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Wr(e,s,o),o};let Yr=class extends(Pi(Gt(S(Mt)))){constructor(){super(...arguments),this.size="",this.readonly=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}validateFormElement(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelector("textarea");if(!e||e.checkValidity())return;const s=this.getFormPublisher();s&&(s.isFormValid=!1),e.reportValidity()}render(){return ut`<label for="form-element" class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></label><div class="form-control"><textarea id="form-element" @input="${this.handleChange}" @blur="${this.handleBlur}" disabled="${ue(this.disabled)}" ?required="${this.required}" ?autofocus="${this.autofocus}" rows="${ue(this.rows)}" cols="${ue(this.cols)}" maxlength="${ue(this.maxlength)}" minlength="${ue(this.minlength)}" ?readonly="${this.readonly}" spellcheck="${ue(this.spellcheck)}" autocomplete="${ue(this.autocomplete)}" tabindex="${ue(this.tabindex)}" wrap="${ue(this.wrap)}" placeholder="${this.placeholder}" class="form-element textarea custom-scroll" aria-label="${ue(this.ariaLabel)}" aria-labelledby="${ue(this.ariaLabelledby)}">
|
|
104
|
+
${this.value}</textarea></div><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot>`}};Yr.styles=[ge,dr,cr,hr,ps,F`textarea{font-size:inherit}`],Qr([b({type:String})],Yr.prototype,"size",2),Qr([b({type:Number})],Yr.prototype,"rows",2),Qr([b({type:Number})],Yr.prototype,"cols",2),Qr([b({type:Number})],Yr.prototype,"maxlength",2),Qr([b({type:Number})],Yr.prototype,"minlength",2),Qr([b({type:String})],Yr.prototype,"wrap",2),Qr([b({type:Boolean})],Yr.prototype,"readonly",2),Qr([b({type:String})],Yr.prototype,"placeholder",2),Qr([_({slot:"label"})],Yr.prototype,"slotLabelNodes",2),Qr([_({slot:"description"})],Yr.prototype,"slotDescriptionNodes",2),Qr([m()],Yr.prototype,"hasDescription",2),Qr([m()],Yr.prototype,"hasLabel",2),Yr=Qr([u("sonic-textarea")],Yr);var Gr=Object.defineProperty,Jr=Object.getOwnPropertyDescriptor;let Xr=class extends Mt{render(){return ut`<slot></slot>`}};Xr.styles=[F`:host{color:var(--sc-neutral-500);font-size:1.25rem;line-height:1.2;display:block;font-weight:var(--sc-font-weight-base);font-style:var(--sc-font-style-base);margin-top:.25em}`],Xr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Gr(e,s,o),o})([u("sonic-legend-description")],Xr);var to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,so=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?eo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&to(e,s,o),o};let io=class extends Mt{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return ut`<legend part="legend">${this.iconName?ut`<div class="icon"><sonic-icon name="${this.iconName}" prefix="${ue(this.iconPrefix)}" library="${ue(this.iconLibrary)}"></sonic-icon></div>`:""}<div class="legend-content">${ss(this.label?this.label:"")} ${this.description?ut`<sonic-legend-description>${ss(this.description)}</sonic-legend-description>`:""}<slot></slot></div><slot name="suffix"></slot></legend>`}};io.styles=[F`:host{--sc-legend-font-size:1.5rem;--sc-legend-font-weight:var(--sc-font-weight-base);--sc-legend-font-style:var(--sc-headings-font-style);--sc-legend-family:var(--sc-headings-font-family);--sc-legend-line-height:var(--sc-headings-line-height);--sc-legend-color:var(--sc-base-content);display:flex;width:100%}legend{font-size:var(--sc-legend-font-size);font-weight:var(--sc-legend-font-weight);font-style:var(--sc-legend-font-style);font-family:var(--sc-legend-font-family);line-height:var(--sc-legend-line-height);color:var(--sc-legend-color);padding:0;display:flex;width:100%;align-items:flex-start;gap:.5em}slot[name=suffix]{display:block;margin-left:auto;flex-shrink:0}.legend-content{flex-grow:1}`],so([b({type:Boolean})],io.prototype,"forceAutoFill",2),so([b()],io.prototype,"description",1),so([b()],io.prototype,"label",1),so([b({type:String})],io.prototype,"iconName",2),so([b({type:String})],io.prototype,"iconLibrary",2),so([b({type:String})],io.prototype,"iconPrefix",2),io=so([u("sonic-legend")],io);var ro=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,no=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?oo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ro(e,s,o),o};let ao=class extends(S(Mt)){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return ut`<fieldset form="${ue(this.form)}" ?disabled="${this.disabled}">${this.label?ut`<sonic-legend label="${ue(this.label)}" description="${ue(this.description)}" iconName="${ue(this.iconName)}" iconPrefix="${ue(this.iconPrefix)}" iconLibrary="${ue(this.iconLibrary)}"></sonic-legend>`:bt}<slot></slot></fieldset>`}};ao.styles=[F`:host{--sc-fieldset-mt:0;--sc-fieldset-mb:1rem;--sc-fieldset-border-color:var(--sc-border-color);--sc-fieldset-border-width:var(--sc-form-border-width);margin-top:var(--sc-fieldset-mt);margin-bottom:var(--sc-fieldset-mb);display:block;border:var(--sc-fieldset-border-width) solid var(--sc-fieldset-border-color)!important;padding:1.8rem 1.25rem;border-radius:var(--sc-rounded-lg)}fieldset{all:unset;display:contents}:host([variant=ghost]),:host([variant=shadow]){--sc-fieldset-border-color:transparent}:host([variant=shadow]){--sc-fieldset-border-color:transparent;box-shadow:var(--sc-shadow-lg)}::slotted(sonic-legend),sonic-legend{margin-bottom:1.5rem;display:block}::slotted(sonic-legend:last-child){margin-bottom:0}`],no([b({type:Boolean,reflect:!0})],ao.prototype,"disabled",2),no([b({type:String})],ao.prototype,"form",2),no([b({type:String})],ao.prototype,"label",2),no([b({type:String})],ao.prototype,"description",2),no([b({type:String})],ao.prototype,"iconName",2),no([b({type:String})],ao.prototype,"iconLibrary",2),no([b({type:String})],ao.prototype,"iconPrefix",2),no([b({type:String,reflect:!0})],ao.prototype,"variant",2),ao=no([u("sonic-fieldset")],ao);class lo{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=s,this.o=null!=r?r:this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var co=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,po=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ho(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&co(e,s,o),o};let uo=class extends(S(Mt)){constructor(){super(...arguments),this._resizeController=new lo(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter((t=>e.includes(t.nodeName.toLowerCase()))),this.oneFormElement=1==t.length}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return ut`<div class="${pr(t)}"><slot @slotchange="${this.onSlotChange}"></slot></div>`}};uo.styles=[F`:host{display:block}div{display:grid;grid-gap:1.5rem;align-items:flex-start}.cq--md{grid-gap:1.75rem;grid-template-columns:repeat(2,minmax(0,1fr))}.one-form-element{grid-template-columns:1fr}::slotted(:not(sonic-input):not(sonic-select):not(sonic-input-autocomplete):not(.form-item-container)){grid-column:1/-1}::slotted(sonic-divider){--sc-divider-my:0}`],po([x({flatten:!0})],uo.prototype,"slottedElements",2),po([b({type:Boolean})],uo.prototype,"oneFormElement",2),uo=po([u("sonic-form-layout")],uo);var go=Object.defineProperty,bo=Object.getOwnPropertyDescriptor,mo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?bo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&go(e,s,o),o};let fo=class extends Mt{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return ut`<slot style="${Kt(t)}"></slot>`}};fo.styles=[F`:host{display:block}slot{display:flex;flex-wrap:wrap;gap:.3rem}`],mo([b({type:String})],fo.prototype,"direction",2),mo([b({type:String})],fo.prototype,"justify",2),fo=mo([u("sonic-form-actions")],fo);var vo=Object.defineProperty,yo=Object.getOwnPropertyDescriptor,wo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?yo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&vo(e,s,o),o};let xo=class extends Mt{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button"),e=t.length;e>1&&t.forEach(((t,s)=>{const i=t;0===s?(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0")):s===e-1?(i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0")):(i.style.setProperty("--sc-item-rounded-tr","0"),i.style.setProperty("--sc-item-rounded-br","0"),i.style.setProperty("--sc-item-rounded-tl","0"),i.style.setProperty("--sc-item-rounded-bl","0"))}))}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){var t,e;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length))}render(){const t={alignItems:this.alignItems};return ut`<span class="${this.hasLabel?"form-label":"hidden"}">${this.label?ss(this.label):""}<slot name="label" @slotchange="${this.hasSlotOrProps}"></slot></span><slot class="main-slot" style="${Kt(t)}"></slot><slot name="description" @slotchange="${this.hasSlotOrProps}" class="${this.hasDescription?"form-description":"hidden"}">${this.description?ut`${ss(this.description)}`:""}</slot>`}};xo.styles=[ge,cr,hr,F`:host{display:inline-block;vertical-align:middle}.main-slot{width:100%;display:flex}.hidden{display:none}`],wo([b({type:String})],xo.prototype,"alignItems",2),wo([b({type:String})],xo.prototype,"label",2),wo([b({type:String})],xo.prototype,"description",2),wo([_({slot:"label"})],xo.prototype,"slotLabelNodes",2),wo([_({slot:"description"})],xo.prototype,"slotDescriptionNodes",2),wo([m()],xo.prototype,"hasDescription",2),wo([m()],xo.prototype,"hasLabel",2),xo=wo([u("sonic-group")],xo);var _o=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,Ao=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&_o(e,s,o),o};let Po=class extends Mt{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}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return ut`<div part="image"><picture part="picture"><img part="img" src="${this.src}" loading="${this.loading}" alt="${this.alt}" style="${Kt(t)}"></picture></div>`}};Po.styles=[F`:host{--sc-img-radius:0;--sc-img-bg:var(--sc-placeholder-bg);border-radius:var(--sc-img-radius);display:block;width:100%;background:var(--sc-img-bg)}img{width:100%;vertical-align:middle;object-fit:cover}img[src=""]{visibility:hidden}:host([rounded]){--sc-img-radius:var(--sc-rounded);overflow:hidden}:host([rounded=sm]){--sc-img-radius:var(--sc-rounded-sm)}:host([rounded=md]){--sc-img-radius:var(--sc-rounded-md)}:host([rounded=lg]){--sc-img-radius:var(--sc-rounded-lg)}:host([rounded=xl]){--sc-img-radius:var(--sc-rounded-xl)}:host([rounded=full]){--sc-img-radius:50%!important}:host([rounded=none]){--sc-img-radius:0!important}:host([cover]),:host([cover]) img,:host([cover])>div{position:absolute!important;left:0!important;top:0!important;right:0!important;bottom:0!important;height:100%!important;width:100%!important}`],Ao([b({type:String})],Po.prototype,"rounded",2),Ao([b({type:String})],Po.prototype,"src",2),Ao([b({type:String})],Po.prototype,"alt",2),Ao([b({type:String})],Po.prototype,"loading",2),Ao([b({type:String})],Po.prototype,"ratio",2),Ao([b({type:String})],Po.prototype,"objectPosition",2),Ao([b({type:String})],Po.prototype,"imageRendering",2),Ao([b({type:Boolean,reflect:!0})],Po.prototype,"cover",2),Po=Ao([u("sonic-image")],Po);var Co=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,So=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?$o(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Co(e,s,o),o};let Oo=class extends Mt{constructor(){super(...arguments),this.icon={name:""},this.taxonomy=[],this.separator=", ",this.key="",this.type="default",this.variant="default",this.size="md"}render(){if(!Array.isArray(this.taxonomy))return bt;const t=this.key+"_display",e=this.taxonomy.filter((e=>null!=e&&(!0===e[t]||"1"==e[t]||!Object.hasOwnProperty.call(e,t))));return 0===e.length?(this.style.display="none",bt):(this.style.removeProperty("display"),ut`<sonic-badge type="${this.type}" variant="${this.variant}" size="${this.size}"><sonic-icon slot="prefix" library="${ue(this.icon.library)}" prefix="${ue(this.icon.prefix)}" name="${ue(this.icon.name)}"></sonic-icon><span class="taxonomy-list">${Ee(e,(t=>t[this.key+"_id"]),(t=>ut`<span>${t[this.key+"_name"]||t.name}</span><span class="sonic-taxonomy-separator">${ss(this.separator)}</span>`))}</span></sonic-badge>`)}};Oo.styles=F`:host .sonic-taxonomy-separator:last-child{display:none}.taxonomy-list{display:flex;flex-wrap:wrap}`,So([b({type:Object})],Oo.prototype,"icon",2),So([b({type:Array})],Oo.prototype,"taxonomy",2),So([b({type:String})],Oo.prototype,"separator",2),So([b({type:String})],Oo.prototype,"key",2),So([b({type:String,reflect:!0})],Oo.prototype,"type",2),So([b({type:String,reflect:!0})],Oo.prototype,"variant",2),So([b({type:String,reflect:!0})],Oo.prototype,"size",2),Oo=So([u("sonic-event-taxonomy")],Oo);var Do=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,Eo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?jo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Do(e,s,o),o};let Lo=class extends Mt{constructor(){super(...arguments),this.size="",this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var t;this.hasMoreElements=!!(null==(t=this.moreElements)?void 0:t.length)}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size);this.querySelectorAll("sonic-divider").forEach((t=>{t.hasAttribute("size")||t.setAttribute("size","xs")})),super.updated(t)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var t;null==(t=this.observer)||t.disconnect(),super.disconnectedCallback()}initScrollable(){let t,e,s=!1;this.scrollable&&(this.addEventListener("mousedown",(i=>{s=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,e=this.scrollLeft})),this.addEventListener("mouseleave",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mouseup",(()=>{s=!1,this.classList.remove("active")})),this.addEventListener("mousemove",(i=>{if(!s)return;i.preventDefault();const r=1.5*(i.pageX-this.offsetLeft-t);this.scrollLeft=e-r,this.setScrollShadow(this,this.direction)})),this.addEventListener("scroll",(t=>{t.preventDefault(),this.setScrollShadow(this,this.direction)})))}setScrollShadow(t,e){"row"==e?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):"column"==e&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach((t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.setAttribute("align",this.align),"row"==this.direction&&"block"==t.getAttribute("shape")&&t.setAttribute("shape","default")}))}render(){const t={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},e="row"==this.direction,s={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:e?"":".55em"};return ut`<menu part="menu" class="shadowable" style="${Kt(t)}"><slot @slotchange="${this.mainSlotChange}"></slot><sonic-pop style="${Kt(s)}" class="${this.hasMoreElements?"":"hidden"}"><sonic-menu-item style="${Kt(i)}" class="more-btn" shape="${this.moreShape}" align="center"><sonic-icon size="xl" name="${e?"more-vert":"more-horiz"}"></sonic-icon></sonic-menu-item><slot name="more" @slotchange="${this.checkIfMore}" slot="content"></slot></sonic-pop></menu>`}};Lo.styles=[F`:host{display:block;--sc-menu-gap:0.15rem}:host>menu{display:flex;border-radius:min(calc(var(--sc-btn-rounded) * 2),.4em);margin:0;padding:.35em}.hidden{display:none!important}:host([shadow=md]) .shadowable,:host([shadow=true]) .shadowable,:host([shadow]) .shadowable{box-shadow:var(--sc-shadow)}:host([shadow=sm]) .shadowable{box-shadow:var(--sc-shadow-sm)}:host([shadow=lg]) .shadowable{box-shadow:var(--sc-shadow-lg)}:host([shadow=none]) .shadowable{box-shadow:none}:host([scrollable]){scrollbar-width:none;-ms-overflow-style:none}:host([scrollable]) menu>*{scroll-snap-align:start;white-space:nowrap}:host([scrollable][direction=row]){overflow-x:scroll;scroll-snap-type:x mandatory}:host([scrollable][direction=column]){overflow-y:scroll;scroll-snap-type:y mandatory}:host([scrollable])::-webkit-scrollbar{display:none!important}:host([scrollable][direction=row].shadow-right){-webkit-mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to left,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to right,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=row].shadow-left.shadow-right){-webkit-mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to right,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}:host([scrollable][direction=column].shadow-top){-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%);mask-image:linear-gradient(to top,rgba(0,0,0,0),#000 10%)}:host([scrollable][direction=column].shadow-top.shadow-bottom){-webkit-mask-image:linear-gradient(to top,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 10%,#000 90%,rgba(0,0,0,0) 100%)}`],Eo([b({type:String,reflect:!0})],Lo.prototype,"size",2),Eo([b({type:String,reflect:!0})],Lo.prototype,"direction",2),Eo([b({type:String})],Lo.prototype,"gap",2),Eo([b({type:String,reflect:!0})],Lo.prototype,"align",2),Eo([b({type:String,reflect:!0})],Lo.prototype,"shadow",2),Eo([b({type:String})],Lo.prototype,"moreShape",2),Eo([b({type:Boolean})],Lo.prototype,"scrollable",2),Eo([b({type:String})],Lo.prototype,"minWidth",2),Eo([v("menu")],Lo.prototype,"menu",2),Eo([x({selector:"sonic-menu-item"})],Lo.prototype,"menuChildren",2),Eo([x({slot:"more",selector:"*"})],Lo.prototype,"moreElements",2),Eo([m()],Lo.prototype,"hasMoreElements",2),Lo=Eo([u("sonic-menu")],Lo);var Mo=Object.defineProperty,No=Object.getOwnPropertyDescriptor,zo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?No(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Mo(e,s,o),o};let Fo=class extends Mt{firstUpdated(){var t;null==(t=this.buttons)||t.forEach((t=>{t.addEventListener("click",(()=>{if("false"!=t.getAttribute("hideModal")){const t=this.closest("sonic-modal");null==t||t.hide()}}))}))}render(){return ut`<slot></slot>`}};Fo.styles=[F`:host{display:flex;gap:.5rem;margin-top:auto;padding-top:1.5rem}`],zo([x({selector:"sonic-button"})],Fo.prototype,"buttons",2),Fo=zo([u("sonic-modal-actions")],Fo);var Io=Object.defineProperty,To=Object.getOwnPropertyDescriptor,Ro=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?To(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Io(e,s,o),o};let Vo=class extends Mt{render(){return ut`<sonic-button reset="${ue(this.reset)}" shape="circle" @click="${this.handleClick}"><sonic-icon name="cancel" size="lg"></sonic-icon></sonic-button>`}handleClick(){this.closest("sonic-modal").hide()}};Vo.styles=[F`:host{position:sticky;display:block;align-self:flex-end;height:0;top:0;padding-top:.5rem;padding-right:.5rem;transform:translate3d(calc(var(--sc-modal-px)),calc(-1 * var(--sc-modal-py)),0);z-index:20}`],Ro([b()],Vo.prototype,"reset",2),Vo=Ro([u("sonic-modal-close")],Vo);var Uo=Object.defineProperty,qo=Object.getOwnPropertyDescriptor;let Bo=class extends Mt{render(){return ut`<slot></slot>`}};Bo.styles=[F`:host{display:block}`],Bo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?qo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Uo(e,s,o),o})([u("sonic-modal-content")],Bo);var Ho=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor;let Wo=class extends Mt{render(){return ut`<slot></slot>`}};Wo.styles=[F`:host{font-size:1.1rem;display:block;line-height:1.1rem;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family);font-weight:var(--sc-headings-font-weight)}`],Wo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Ko(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ho(e,s,o),o})([u("sonic-modal-subtitle")],Wo);var Zo=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor;let Yo=class extends Mt{render(){return ut`<slot></slot>`}};Yo.styles=[F`:host{font-weight:700;font-size:1.5rem;display:block;line-height:var(--sc-headings-line-height);font-family:var(--sc-headings-font-family)}`],Yo=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Qo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Zo(e,s,o),o})([u("sonic-modal-title")],Yo);var Go=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,Xo=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Jo(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Go(e,s,o),o};const tn="sonic-modal";let en=class extends(S(Mt)){constructor(){super(...arguments),this.forceAction=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.fullScreen=!1,this.visible=!1}static create(t){const e=document.createElement(tn);e.innerHTML=`<sonic-modal-close></sonic-modal-close><sonic-modal-content>${t.content}</sonic-modal-content>`||"";return(document.querySelector("sonic-theme")||document.body).appendChild(e),e.show(),e}connectedCallback(){super.connectedCallback(),this.handleFullsceen()}updated(){const t=this;document.addEventListener("keydown",this.handleEscape),t.closeBtn.forEach((e=>{e.addEventListener("click",(function(){t.hide()}),{once:!0})}))}willUpdate(t){t.has("fullScreen")&&this.handleFullsceen(),super.willUpdate(t)}render(){if(0==this.visible)return bt;const t={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},e={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return ut`<div class="modal-wrapper" style="${Kt(e)}" ${Xe({out:He})} tabindex="0"><div part="modal" class="modal custom-scroll" style="${Kt(t)}" ${Xe({keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]})}><div class="modal-content"><slot></slot></div></div></div><div class="overlay" @click="${this.forceAction?"":this.hide}" ${Xe({keyframeOptions:{duration:500},in:Ke,out:[{opacity:0,pointerEvents:"none"}]})}></div>`}show(){var t,e;this.visible=!0,null==(t=this.modalElement)||t.setAttribute("tabindex","0"),null==(e=this.modalElement)||e.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var t;this.visible=!1,null==(t=this.modalElement)||t.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&ae.get(this.getAttribute("resetDataProviderOnHide")).set({})}dispose(){this.hide(),this.remove()}handleEscape(t){if("Escape"===t.key){[...document.querySelectorAll(tn)].forEach((t=>{this.forceAction||t.hide()}))}}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};en.styles=[ps,F`:host{--sc-modal-py:2.5rem;--sc-modal-px:1.5rem;--sc-modal-max-w:min(100vw, 64ch);--sc-modal-max-h:80vh;--sc-modal-rounded:var(--sc-rounded-lg)}*{box-sizing:border-box}.modal-wrapper{position:fixed;bottom:0;left:0;width:100%;z-index:990;align-items:center;justify-content:center;flex-direction:column;display:flex;pointer-events:none}.modal-content{display:flex;flex-direction:column;min-height:10rem;line-height:1.25}.modal{background:var(--sc-base);color:var(--sc-base-content);width:100%;box-shadow:var(--sc-shadow-lg);border-radius:var(--sc-modal-rounded) var(--sc-modal-rounded) 0 0;pointer-events:auto;transform:translateZ(0)}.overlay{background:var(--sc-modal-overlay-bg,var(--sc-base-200));left:0;top:0;right:0;bottom:0;z-index:900;opacity:.8;position:fixed}::slotted(sonic-modal-title){margin-bottom:1.25rem}::slotted(sonic-modal-subtitle){margin-top:-.9rem;margin-bottom:1.25rem}@media (max-width:767.5px){.modal,.modal-wrapper{max-width:none!important;width:100%!important}}@media (min-width:768px){.modal-wrapper{top:50%;left:50%;bottom:auto;right:auto;transform:translateX(-50%) translateY(-50%)}.modal{top:50%;bottom:auto;right:auto;border-radius:var(--sc-modal-rounded)}}:host([align=left]) .modal-content{text-align:left;align-items:flex-start}:host([align=center]) .modal-content{text-align:center;align-items:center}:host([align=right]) .modal-content{text-align:right;align-items:flex-end}:host([rounded=none]) modal{--sc-img-radius:0!important}`],Xo([b({type:Boolean})],en.prototype,"forceAction",2),Xo([b({type:String,reflect:!0})],en.prototype,"align",2),Xo([b({type:String})],en.prototype,"padding",2),Xo([b({type:String})],en.prototype,"maxWidth",2),Xo([b({type:String})],en.prototype,"maxHeight",2),Xo([b({type:String})],en.prototype,"width",2),Xo([b({type:String})],en.prototype,"height",2),Xo([b({type:Boolean,reflect:!0})],en.prototype,"fullScreen",2),Xo([b({type:Boolean,reflect:!0})],en.prototype,"visible",2),Xo([v(".modal-wrapper")],en.prototype,"modalWrapper",2),Xo([v(".modal")],en.prototype,"modalElement",2),Xo([x({selector:"sonic-modal-close"})],en.prototype,"closeBtn",2),en=Xo([u(tn)],en),"undefined"!=typeof window&&(window.SonicModal=en);var sn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,on=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?rn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&sn(e,s,o),o};const nn={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"};let an=class extends Mt{constructor(){super(...arguments),this.label="",this.text="",this.background=!1,this.status="default"}render(){return ut`<div part="alert" class="alert"><div>${this.status&&ut`<sonic-icon name="${nn[this.status]}"></sonic-icon>`}</div><div>${this.label?ut`<span class="label">${ss(this.label)}</span>`:bt}<slot>${this.text}</slot></div></div>`}};an.styles=[ge,F`:host{--sc-alert-color:var(--sc-base-content);--sc-alert-rounded:var(--sc-rounded);--sc-alert-fw:var(--sc-font-weight-base);--sc-alert-fst:var(--sc-font-style-base);--sc-alert-label-fw:bold;display:block;font-weight:var(--sc-alert-fw);font-style:var(--sc-alert-fst)}.alert{color:var(--sc-alert-color);position:relative;display:flex;gap:.4em;border-radius:var(--sc-alert-rounded)}.label{font-weight:var(--sc-alert-label-fw)}:host([status=warning]){--sc-alert-color:var(--sc-warning)}:host([status=error]){--sc-alert-color:var(--sc-danger)}:host([status=info]){--sc-alert-color:var(--sc-info)}:host([status=success]){--sc-alert-color:var(--sc-success)}:host([background]) .alert{background:var(--sc-base);padding:.8em 1.15em}:host([background]) .alert:before{background-color:currentColor;content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;opacity:.08;border-radius:var(--sc-alert-rounded);pointer-events:none}:host([background])>div{z-index:2;position:relative}slot{display:block}:host([size=xs]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}:host([size=sm]) .alert{--sc-alert-rounded:var(--sc-rounded-sm)}`],on([b({type:String})],an.prototype,"label",2),on([b({type:String})],an.prototype,"text",2),on([b({type:String,reflect:!0})],an.prototype,"size",2),on([b({type:Boolean,reflect:!0})],an.prototype,"background",2),on([b({type:String,reflect:!0})],an.prototype,"status",2),an=on([u("sonic-alert")],an);var ln=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,hn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?cn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ln(e,s,o),o};let dn=class extends(S(Mt)){constructor(){super(...arguments),this._messages=[],this.success=null,this.status=null,this._message="",this._data=""}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach((t=>{"public"==t.type&&xs.add({text:t.content||"",status:t.status})}))}get message(){return this._message}set message(t){var e,s;this._message=t,this.message&&!1===(null==(e=this.props)?void 0:e.success)&&((null==(s=this.props)?void 0:s.public_message)||xs.add({text:this.message,status:"error"}))}get data(){return this._data}set data(t){var e,s,i,r;this._data=t;const o={text:"Votre produit a bien été ajouté",status:"success"};Array.isArray(this.data)&&!0===(null==(e=this.props)?void 0:e.success)&&xs.add(o),""==this.data&&!0===(null==(s=this.props)?void 0:s.status)&&xs.add(o),!1===(null==(i=this.props)?void 0:i.success)&&((null==(r=this.props)?void 0:r.public_message)||xs.add({text:this.data,status:"error"}))}render(){return bt}};hn([b({type:Boolean})],dn.prototype,"success",2),hn([b({type:Boolean})],dn.prototype,"status",2),hn([b({type:Array})],dn.prototype,"messages",1),hn([b({type:String})],dn.prototype,"message",1),hn([b()],dn.prototype,"data",1),dn=hn([u("sonic-toast-message-subscriber")],dn);var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,gn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?un(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&pn(e,s,o),o};let bn=class extends Mt{constructor(){super(...arguments),this.label="",this.disabled=!1}render(){const t=this.disabled||""==this.label?"disabled":"";return ut`<div data-tooltip-text="${this.label.trim().replace(" "," ")}" class="tooltip ${t}"><slot></slot></div>`}};bn.styles=[F`:host{position:relative;display:inline-flex;align-items:center;text-align:center;--sc-tooltip-fw:var(--sc-font-weight-base)}.tooltip:before{position:absolute;content:attr(data-tooltip-text);font-size:.85rem;display:block;opacity:0;pointer-events:none;background:var(--sc-base-content,#111827);padding:.25rem;border-radius:.25rem;color:var(--sc-base,#fff);z-index:999;display:none;line-height:1.1;width:max-content;max-width:20rem;white-space:pre-line;font-weight:var(--sc-tooltip-fw)}.tooltip:not(.disabled):hover:before{opacity:1;display:block}:host(:not([placement])) .tooltip:before,:host([placement=top]) .tooltip:before{bottom:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=bottom]) .tooltip:before{top:calc(100% + .25rem);left:50%;transform:translateX(-50%)}:host([placement=left]) .tooltip:before{top:50%;right:calc(100% + .25rem);transform:translateY(-50%)}:host([placement=right]) .tooltip:before{top:50%;transform:translateY(-50%);left:calc(100% + .25rem)}`],gn([b({type:String})],bn.prototype,"label",2),gn([b({type:String,reflect:!0})],bn.prototype,"placement",2),gn([b({type:Boolean})],bn.prototype,"disabled",2),bn=gn([u("sonic-tooltip")],bn);var mn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,vn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?fn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&mn(e,s,o),o};let yn=class extends Mt{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1}firstUpdated(){var t,e;(this.label||(null==(t=this.slotNodes)?void 0:t.length))&&(null==(e=this.divider)||e.classList.add("has-text"))}render(){return ut`<div part="divider"><span class="text">${ss(this.label?this.label:"")}<slot></slot></span></div>`}};yn.styles=[F`:host{--sc-divider-my:0.5rem;--sc-divider-mx:0;--sc-divider-border-width:max(1px, var(--sc-border-width));--sc-divider-border-color:var(--sc-border-color);--sc-divider-border-style:solid;--sc-divider-color:currentColor;--sc-divider-ff:var(--sc-font-family-base);--sc-divider-fs:1rem;--sc-divider-fw:var(--sc-font-weight-base);--sc-divider-fst:var(--sc-font-style-base);margin:var(--sc-divider-my) var(--sc-divider-mx);font-size:var(--sc-divider-fs);font-style:var(--sc-divider-fst);font-family:var(--sc-divider-ff);font-weight:var(--sc-divider-fw);color:var(--sc-divider-color);display:block}:host([size="2xs"]){--sc-divider-my:0.35rem;--sc-divider-fs:0.68rem}:host([size=xs]){--sc-divider-my:0.5rem;--sc-divider-fs:0.75rem}:host([size=sm]){--sc-divider-my:0.75rem;--sc-divider-fs:0.875rem}:host([size=md]){--sc-divider-my:1.25rem}:host([size=lg]){--sc-divider-my:1.85rem}:host([size=xl]){--sc-divider-my:2.25rem}:host([size="2xl"]){--sc-divider-my:3.35rem}div{display:flex;align-items:center;width:100%}div::after,div::before{content:"";flex-grow:1;border-top:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:100%;opacity:var(--sc-divider-opacity,1)}:host([align=left]) div:before{display:none}:host([align=right]) div:after{display:none}:host([vertical]){margin:var(--sc-divider-mx) var(--sc-divider-my)}:host([vertical]) div{flex-direction:column;height:100%;min-height:var(--sc-form-height)}:host([vertical]) .has-text{gap:.25rem}:host([vertical]) div::after,:host([vertical]) div::before{border-top:none;border-left:var(--sc-divider-border-width) var(--sc-divider-border-style) var(--sc-divider-border-color);width:auto;height:100%;opacity:var(--sc-divider-opacity,1)}:host([noMargin]){margin:0}.text{flex-shrink:0;line-height:1.1;max-width:80%}.no-text .text{display:none}.has-text{gap:.5rem}`],vn([_()],yn.prototype,"slotNodes",2),vn([v("div")],yn.prototype,"divider",2),vn([b({type:String})],yn.prototype,"label",2),vn([b({type:String,reflect:!0})],yn.prototype,"size",2),vn([b({type:String,reflect:!0})],yn.prototype,"align",2),vn([b({type:Boolean,reflect:!0})],yn.prototype,"vertical",2),vn([b({type:Boolean,reflect:!0})],yn.prototype,"noMargin",2),yn=vn([u("sonic-divider")],yn);var wn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor;let _n=class extends Mt{render(){return ut`<div><slot></slot></div>`}};_n.styles=[F`div{margin-top:.1em;font-family:var(--sc-font-family-base);font-size:.7em;font-weight:var(--sc-font-style-base)}`],_n=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?xn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&wn(e,s,o),o})([u("sonic-card-header-description")],_n);var kn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,Pn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?An(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&kn(e,s,o),o};let Cn=class extends Mt{render(){return ut`<div class="header"><div class="header-content">${ss(this.label)} ${this.description?ut`<sonic-card-header-description>${ss(this.description)}</sonic-card-header-description>`:""}<slot></slot></div><slot name="suffix"></slot></div>`}};Cn.styles=[F`:host{--sc-card-header-mb:1.35rem;--sc-card-header-font-size:1.875rem;--sc-card-header-font-weight:var(--sc-headings-font-weight);--sc-card-header-font-style:var(--sc-headings-font-style);--sc-card-header-family:var(--sc-headings-font-family);--sc-card-header-line-height:var(--sc-headings-line-height)}@media print{:host{--sc-card-header-font-size:1.45rem}}.header{display:flex;align-items:flex-start;gap:.5em 1em;margin-bottom:var(--sc-card-header-mb);line-height:var(--sc-card-header-line-height);font-family:var(--sc-card-header-font-family);font-size:var(--sc-card-header-font-size);font-style:var(--sc-card-header-font-style);font-weight:var(--sc-card-header-font-weight)}.header-content{flex-grow:1}slot[name=suffix]{flex-shrink:0}`],Pn([b()],Cn.prototype,"label",2),Pn([b()],Cn.prototype,"description",2),Cn=Pn([u("sonic-card-header")],Cn);var $n=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor;let On=class extends Mt{render(){return ut`<div><slot></slot></div>`}};On=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Sn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&$n(e,s,o),o})([u("sonic-card-main")],On);var Dn=Object.defineProperty,jn=Object.getOwnPropertyDescriptor;let En=class extends Mt{render(){return ut`<slot></slot>`}};En=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?jn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Dn(e,s,o),o})([u("sonic-card-footer")],En);var Ln=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,Nn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ln(e,s,o),o};let zn=class extends Mt{constructor(){super(...arguments),this.type="default"}render(){return ut`<div part="card" class="card"><slot></slot></div>`}};zn.styles=[F`*{box-sizing:border-box}:host{--sc-card-padding:1.5rem;--sc-card-color:var(--sc-base-content);--sc-card-bg:var(--sc-base);--sc-card-rounded:var(--sc-rounded-lg);--sc-card-shadow:var(--sc-shadow-lg);-webkit-print-color-adjust:exact}@media print{.card{page-break-inside:avoid;break-inside:avoid;box-shadow:none!important;border:1px solid var(--sc-base-200)}}.card{padding:var(--sc-card-padding);background-color:var(--sc-card-bg);border-radius:var(--sc-card-rounded);box-shadow:var(--sc-card-shadow);color:var(--sc-card-color)}:host([type=primary]){--sc-card-bg:var(--sc-primary);--sc-card-color:var(--sc-primary-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=warning]){--sc-card-bg:var(--sc-warning);--sc-card-color:var(--sc-warning-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=danger]){--sc-card-bg:var(--sc-danger);--sc-card-color:var(--sc-danger-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=info]){--sc-card-bg:var(--sc-info);--sc-card-color:var(--sc-info-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=success]){--sc-card-bg:var(--sc-success);--sc-card-color:var(--sc-success-content);--sc-border-color:var(--sc-primary-content);--sc-divider-opacity:0.2}:host([type=light]){--sc-card-bg:var(--sc-base-100);--sc-card-color:var(--sc-base-content)}:host([type=neutral]){--sc-card-bg:var(--sc-base-content);--sc-card-color:var(--sc-base)}:host([type=invert]){--sc-card-color:var(--sc-base);--sc-card-bg:var(--sc-base-900)}`],Nn([b({type:String,reflect:!0})],zn.prototype,"type",2),zn=Nn([u("sonic-card")],zn);const Fn=F`:host{--sc-color:inherit;color:var(--sc-color)}:host([type=primary]){--sc-color:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success)}.inherit-color{color:var(--sc-color)}`;F`:host{--sc-color:inherit;--sc-bg:inherit;color:var(--sc-color);background:var(--sc-bg)}:host([type=primary]){--sc-color:var(--sc-primary-content);--sc-bg:var(--sc-primary)}:host([type=warning]){--sc-color:var(--sc-warning-content);--sc-bg:var(--sc-warning)}:host([type=danger]){--sc-color:var(--sc-danger-content);--sc-bg:var(--sc-danger)}:host([type=info]){--sc-color:var(--sc-info-content);--sc-bg:var(--sc-info)}:host([type=success]){--sc-color:var(--sc-success-content);--sc-bg:var(--sc-success)}.inherit-bg{color:inherit}`;var In=Object.defineProperty,Tn=Object.getOwnPropertyDescriptor;let Rn=class extends Mt{render(){return ut`<slot></slot>`}};Rn.styles=[Fn,F`:host{display:table-row}:host([odd]){background:var(--sc-table-accent-bg)}`],Rn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&In(e,s,o),o})([u("sonic-tr")],Rn);var Vn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor,qn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Un(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Vn(e,s,o),o};let Bn=class extends Mt{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return ut`<th part="th" style="${Kt(t)}" colspan="${ue(this.colSpan)}" rowspan="${ue(this.rowSpan)}"><slot></slot></th>`}};Bn.styles=[Fn,F`:host{display:contents;background:var(--sc-table-bg);position:sticky;top:0;z-index:20}th{all:inherit;display:table-cell;border-bottom:calc(var(--sc-border-width) * 1.5) solid var(--sc-table-border-color);text-transform:var(--sc-table-th-tt);font-weight:var(--sc-table-th-fw);font-size:var(--sc-table-th-fs);padding:var(--sc-table-th-py) var(--sc-table-th-px)}`],qn([b({type:Number})],Bn.prototype,"colSpan",2),qn([b({type:Number})],Bn.prototype,"rowSpan",2),qn([b({type:String})],Bn.prototype,"align",2),qn([b({type:String})],Bn.prototype,"minWidth",2),qn([b({type:String})],Bn.prototype,"maxWidth",2),qn([b({type:String})],Bn.prototype,"width",2),Bn=qn([u("sonic-th")],Bn);var Hn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,Wn=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Kn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Hn(e,s,o),o};let Zn=class extends Mt{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return ut`<td part="td" style="${Kt(t)}" colspan="${ue(this.colSpan)}" rowspan="${ue(this.rowSpan)}"><slot></slot></td>`}};Zn.styles=[Fn,F`:host{display:contents}td{all:inherit;display:table-cell;padding:var(--sc-table-td-py) var(--sc-table-td-px)}`],Wn([b({type:Number})],Zn.prototype,"colSpan",2),Wn([b({type:Number})],Zn.prototype,"rowSpan",2),Wn([b({type:String})],Zn.prototype,"align",2),Wn([b({type:String})],Zn.prototype,"vAlign",2),Wn([b({type:String})],Zn.prototype,"minWidth",2),Wn([b({type:String})],Zn.prototype,"maxWidth",2),Wn([b({type:String})],Zn.prototype,"width",2),Zn=Wn([u("sonic-td")],Zn);var Qn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor;let Gn=class extends Mt{render(){return ut`<slot></slot>`}};Gn.styles=[F`:host{display:table-header-group}`],Gn=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Yn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qn(e,s,o),o})([u("sonic-thead")],Gn);var Jn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor;let ta=class extends Mt{render(){return ut`<tbody part="tbody"><slot></slot></tbody>`}};ta.styles=[F`:host{display:table-row-group}::slotted(sonic-tr:nth-child(odd)){background:var(--sc-table-accent-bg)}::slotted(sonic-tr:hover){background:var(--sc-table-hover-bg)}::slotted(sonic-tr:not(:last-child)){border-bottom:var(--sc-form-border-width) solid var(--sc-base-200)!important}`],ta=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Xn(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Jn(e,s,o),o})([u("sonic-tbody")],ta);var ea=Object.defineProperty,sa=Object.getOwnPropertyDescriptor;let ia=class extends Mt{render(){return ut`<tfoot><slot></slot></tfoot>`}};ia.styles=[F`:host{display:contents}`],ia=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?sa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ea(e,s,o),o})([u("sonic-tfoot")],ia);var ra=Object.defineProperty,oa=Object.getOwnPropertyDescriptor;let na=class extends Mt{render(){return ut`<slot></slot>`}};na.styles=[F`:host{display:table-caption;font-size:.75rem;color:var(--sc-table-caption-color);padding:var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py))}`],na=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?oa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&ra(e,s,o),o})([u("sonic-caption")],na);var aa=Object.defineProperty,la=Object.getOwnPropertyDescriptor,ca=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?la(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&aa(e,s,o),o};let ha=class extends Mt{constructor(){super(...arguments),this.bordered=!1}render(){const t={maxHeight:this.maxHeight};return ut`<div class="table-container custom-scroll" style="${Kt(t)}"><div class="table"><slot></slot></div></div>`}};ha.styles=[ps,ge,F`:host{--sc-table-fw:var(--sc-font-weight-base);--sc-table-fst:var(--sc-font-style-base);--sc-table-fs:1rem;--sc-table-border-color:var(--sc-border-color);--sc-table-caption-color:var(--sc-base-500);--sc-table-bg:var(--sc-base);--sc-table-accent-bg:var(--sc-base-50);--sc-table-hover-bg:var(--sc-base-100);--sc-table-th-fs:0.85em;--sc-table-th-fw:bold;--sc-table-th-tt:uppercase;--sc-table-th-px:var(--sc-table-td-px);--sc-table-th-py:calc(1.8 * var(--sc-table-td-py));--sc-table-td-px:0.5em;--sc-table-td-py:0.5em;display:block}:host([maxHeight]) .table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}.table{width:100%;display:table;box-sizing:border-box}:host([bordered]) .table-container{border:var(--sc-border-width) solid var(--sc-table-border-color)!important}`],ca([b({type:String,reflect:!0})],ha.prototype,"size",2),ca([b({type:Boolean,reflect:!0})],ha.prototype,"bordered",2),ca([b({type:String})],ha.prototype,"maxHeight",2),ha=ca([u("sonic-table")],ha);var da=Object.defineProperty,pa=Object.getOwnPropertyDescriptor,ua=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?pa(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&da(e,s,o),o};let ga=class extends(Di(Mt)){constructor(){super(...arguments),this.key="",this.action=null}connectedCallback(){var t;const e=document.createElement("script");e.src="https://www.google.com/recaptcha/api.js?render="+this.key,document.head.appendChild(e),super.connectedCallback(),this.formPublisher=ae.get(null!=(t=this.getAncestorAttributeValue("headersDataProvider"))?t:this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&(this.formPublisher.needsCaptchaValidation=!0,this.formPublisher.captchaToken.onAssign((t=>{"request_token"==t&&this.requestToken()})))}requestToken(){var t,e,s,i,r;if(!this.formPublisher)return;const o=(null!=(s=null!=(e=this.action)?e:null==(t=this.formPublisher.captchaAction)?void 0:t.get())?s:"submit").replace(/[^\w_/]/g,"_"),n=(null!=(r=null==(i=this.formPublisher.captchaMethod)?void 0:i.get())?r:"POST").toUpperCase();delete this.formPublisher.captchaAction,delete this.formPublisher.captchaMethod,window.grecaptcha.ready((()=>{window.grecaptcha.execute(this.key,{action:n+"//"+o}).then((t=>{this.formPublisher&&(this.formPublisher.captchaToken=t)}))}))}render(){return ut`<slot></slot>`}};ua([b()],ga.prototype,"key",2),ua([b()],ga.prototype,"action",2),ga=ua([u("sonic-captcha")],ga),window.SonicPublisherManager||(window.SonicPublisherManager=c),window.SonicDataBindObserver||(window.SonicDataBindObserver=p);const ba=xs,ma=en;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:ba,SonicModal:ma}}));
|