@supersoniks/concorde 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +13 -3
  3. package/concorde-core.es.js +104 -27
  4. package/dist/concorde-core.bundle.js +3480 -0
  5. package/dist/concorde-core.es.js +11396 -0
  6. package/dist/css/docs.css +0 -0
  7. package/dist/img/concorde-logo.svg +1 -0
  8. package/dist/img/concorde.png +0 -0
  9. package/dist/img/concorde_def.png +0 -0
  10. package/dist/svg/regular/plane.svg +1 -0
  11. package/dist/svg/solid/plane.svg +1 -0
  12. package/index.html +124 -36
  13. package/package.json +16 -5
  14. package/postcss.config.cjs +6 -0
  15. package/public/css/docs.css +0 -0
  16. package/public/img/concorde-logo.svg +1 -0
  17. package/public/img/concorde.png +0 -0
  18. package/public/img/concorde_def.png +0 -0
  19. package/public/svg/regular/plane.svg +1 -0
  20. package/public/svg/solid/plane.svg +1 -0
  21. package/scripts/create-search.js +92 -0
  22. package/scripts/post-build-docs.js +48 -0
  23. package/scripts/post-build.mjs +14 -0
  24. package/src/core/components/functional/queue/queue.ts +72 -28
  25. package/src/core/components/functional/router/router.ts +35 -14
  26. package/src/core/components/functional/states/states.ts +33 -14
  27. package/src/core/directives/Wording.ts +68 -26
  28. package/src/core/mixins/Fetcher.ts +83 -32
  29. package/src/core/utils/Electron.ts +4 -1
  30. package/src/docs/code.ts +4 -3
  31. package/src/docs/example/users.ts +2 -2
  32. package/src/docs/search/docs-search.json +0 -30
  33. package/src/docs/search/search.ts +2 -2
  34. package/src/docs/tailwind/css/tailwind.css +25 -0
  35. package/src/docs/tailwind/index.ts +6 -0
  36. package/src/mixins.ts +1 -1
  37. package/tailwind.config.js +186 -0
  38. package/vite/config.js +22 -22
  39. package/vite.config.mts +16 -14
  40. package/scripts/prebuild.mjs +0 -22
  41. package/src/core/components/ui/theme/css/tailwind.css +0 -3
  42. /package/scripts/{postbuild.mjs → pre-build.mjs} +0 -0
  43. /package/src/{core/components/ui/theme → docs/tailwind}/css/tailwind.d.ts +0 -0
package/build-infos.json CHANGED
@@ -1 +1 @@
1
- {"date":1712757332}
1
+ {"date":1712839112}
@@ -1,4 +1,4 @@
1
- (function(J){typeof define=="function"&&define.amd?define(J):J()})(function(){"use strict";var jt,j,k,Dr,t,Y;let J=class Mt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Mt.getAncestorAttributeValue(t,"token"),i=Mt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Mt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Mt.getAncestorAttributeValue(t,"tokenProvider"),c=Mt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Mt.getAncestorAttributeValue(t,"userName"),n=Mt.getAncestorAttributeValue(t,"password"));const h=Mt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Mt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},rs=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=J.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,a]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Ee(r){return typeof r=="object"&&r!=null}const Lr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Ls=(jt=class{constructor(t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this.root=this,this._instanceCounter_=0;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(),jt.instances.delete(this._instanceCounter_)}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){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!L.changed){L.changed=!0,L.saveId++;const s=L.saveId;setTimeout(()=>L.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Lr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>e(i)),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var o;if(this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;if(this._value_=Ee(t)?t:{__value:t},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,a)=>{this._value_[a]===void 0&&a!="_parent_"&&i[a]&&(this._value_[a]=null)}),await this._publishAssignement_(),Ee(this._value_))for(const n in this._value_){const a=t[n],h=Ee(a)?a:{__value:a};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,a);continue}await((o=this._proxies_.get(n))==null?void 0:o.set(h,!0)),this._publishDynamicFilling_(n,a)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(L.modifiedCollectore.length>0&&L.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}},jt.instances=new Map,jt.instancesCounter=0,jt),L=(j=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],j.instance!=null)throw"Singleton / use getInstance";j.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem("publisher-proxies-data"),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(){return j.instance==null?new j:j.instance}static get(t,s){return j.getInstance().get(t,s)}static collectModifiedPublisher(){j.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return j.modifiedCollectore.shift()}static delete(t){return t?j.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+J.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Ne(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==j.saveId&&t%10!=0))try{if(!j.changed||j.saving)return;j.saving=!0,j.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+J.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",e)}if(j.saving=!1,j.changed){j.saveId++;const e=j.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{j.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},j.buildDate="Wed Apr 10 2024 15:55:32 GMT+0200 (Central European Summer Time)",j.changed=!1,j.saving=!1,j.saveId=0,j.instance=null,j.modifiedCollectore=[],j);const Er=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Ne extends Ls{constructor(t,s=null){super(t,s);const i=new Proxy(this,{get:function(e,o){if(o==Symbol.toPrimitive)return()=>i.get();if(Er.has(o))return e[o];if(!e._proxies_.has(o)){const n=e._value_[o],a=new Ne(Ee(n)?n:{__value:n},e);a._proxies_.set("_parent_",i),e._proxies_.set(o,a)}return e._proxies_.get(o)},set:function(e,o,n){var c;if(o=="_value_")return e._value_=n,!0;if(o=="_cachedGet_")return e._cachedGet_=n,!0;if(o=="_assignmentId_")return e._assignmentId_=n,!0;if(o=="_is_savable_")return e._is_savable_=n,!0;if(o=="_instanceCounter_")return e._instanceCounter_=n,!0;if(!e._proxies_.has(o)){const h=new Ne({},e);h._proxies_.set("_parent_",i),e._proxies_.set(o,h)}return e._value_[o]!==n&&(e._value_[o]=n,e._publishDynamicFilling_(o,n),(c=e._proxies_.get(o))==null||c.set(Ee(n)?n:{__value:n})),!0},deleteProperty:function(e,o){var n;return e._publishDynamicFilling_(o,null),(n=e._proxies_.get(o))==null||n.set(null),delete e._value_[o]},has:function(e,o){return o in e._value_&&o!="_lockInternalMutationPublishing_"},defineProperty:function(e,o,n){return n&&"value"in n&&(e._value_[o]=n.value),!0},getOwnPropertyDescriptor:function(e,o){return{enumerable:!0,configurable:!0}},ownKeys:function(e){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}});return i}toString(){return"hey"}valueOf(){return 2}getProperty(t,s){return t[s]}}class Nr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ls.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",Nr);let Te=(k=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(k.observedElements.keys()).forEach(t=>k.unObserve(t)))}static observe(t){if(!t||!k.enabled||k.observedElements.has(t))return;const s=new MutationObserver(k.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>k.addPublisherListeners(e)),k.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>k.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&k.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>k.addPublisherListeners(s)):t.childNodes.forEach(s=>k.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&k.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>k.removePublisherListeners(s)):t.childNodes.forEach(s=>k.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":k.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{k.onAdded(i)}),s.removedNodes.forEach(i=>{k.onRemoved(i)});break}}static removePublisherListeners(t){const s=k.publisherListeners.get(t);s&&(k.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:k.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){k.removePublisherListeners(t);const s=J.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=L.getInstance().get(s),e=k.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let f=i;f=k.getSubPublisher(i,d);const m=t,b={publisher:f,onAssign:()=>{const _=a.variables.map(D=>{var p;return(p=k.getSubPublisher(i,D))==null?void 0:p.get()});let C=a.expression,O=!1;if(_.length==1&&a.variables[0].join(".")==C.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let p=_[D];const u=a.variables[D];p===null&&(O=!0,p=void 0),C=C.replace("$"+u.join("."),p)}if(C.indexOf("|")!=-1){const D=C.indexOf("|");if(D==0)C=rs.js(C.substring(1));else{const p=C.substring(0,D),u=C.substring(D+1),y=rs[p];C=O?"":y?y(u):C}}else C=O?"":C;m[c]=C}};f==null||f.onAssign(b.onAssign),o.push(b)}}),k.publisherListeners.set(t,o)}},k.observedElements=new Map,k.enabled=!0,k.publisherListeners=new Map,k);Te.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Te);let X=class te{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n],h=te.isObject(a)&&te.isObject(c),d=i?a!==c:a!=c;if(h&&!te.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return te.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&te.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),te.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return te.getURLSearchArray(t,"").join("&")}};/**
1
+ (function(J){typeof define=="function"&&define.amd?define(J):J()})(function(){"use strict";var jt,j,k,Dr,t,Y;let J=class Mt{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Mt.getAncestorAttributeValue(t,"token"),i=Mt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Mt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Mt.getAncestorAttributeValue(t,"tokenProvider"),c=Mt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Mt.getAncestorAttributeValue(t,"userName"),n=Mt.getAncestorAttributeValue(t,"password"));const h=Mt.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Mt.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},rs=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=J.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,a]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),a&&c.push(o(s,"minute",i)(a)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Ee(r){return typeof r=="object"&&r!=null}const Lr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Ls=(jt=class{constructor(t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this.root=this,this._instanceCounter_=0;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(),jt.instances.delete(this._instanceCounter_)}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){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!L.changed){L.changed=!0,L.saveId++;const s=L.saveId;setTimeout(()=>L.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Lr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>e(i)),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var o;if(this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;const i=this._value_;if(this._value_=Ee(t)?t:{__value:t},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,a)=>{this._value_[a]===void 0&&a!="_parent_"&&i[a]&&(this._value_[a]=null)}),await this._publishAssignement_(),Ee(this._value_))for(const n in this._value_){const a=t[n],h=Ee(a)?a:{__value:a};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,a);continue}await((o=this._proxies_.get(n))==null?void 0:o.set(h,!0)),this._publishDynamicFilling_(n,a)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(L.modifiedCollectore.length>0&&L.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),'<reactive-publisher-proxy publisher="'+this._instanceCounter_+'"></reactive-publisher-proxy>'}},jt.instances=new Map,jt.instancesCounter=0,jt),L=(j=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],j.instance!=null)throw"Singleton / use getInstance";j.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem("publisher-proxies-data"),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem("publisher-proxies-data",i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(){return j.instance==null?new j:j.instance}static get(t,s){return j.getInstance().get(t,s)}static collectModifiedPublisher(){j.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return j.modifiedCollectore.shift()}static delete(t){return t?j.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+J.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Ne(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==j.saveId&&t%10!=0))try{if(!j.changed||j.saving)return;j.saving=!0,j.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+J.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem("publisher-proxies-data",e)}if(j.saving=!1,j.changed){j.saveId++;const e=j.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{j.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const a=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(a);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,a=new n.DecompressionStream(s),c=a.writable.getWriter();c.write(o),c.close();const h=await new Response(a.readable).arrayBuffer();return new TextDecoder().decode(h)}},j.buildDate="Thu Apr 11 2024 14:38:32 GMT+0200 (Central European Summer Time)",j.changed=!1,j.saving=!1,j.saveId=0,j.instance=null,j.modifiedCollectore=[],j);const Er=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Ne extends Ls{constructor(t,s=null){super(t,s);const i=new Proxy(this,{get:function(e,o){if(o==Symbol.toPrimitive)return()=>i.get();if(Er.has(o))return e[o];if(!e._proxies_.has(o)){const n=e._value_[o],a=new Ne(Ee(n)?n:{__value:n},e);a._proxies_.set("_parent_",i),e._proxies_.set(o,a)}return e._proxies_.get(o)},set:function(e,o,n){var c;if(o=="_value_")return e._value_=n,!0;if(o=="_cachedGet_")return e._cachedGet_=n,!0;if(o=="_assignmentId_")return e._assignmentId_=n,!0;if(o=="_is_savable_")return e._is_savable_=n,!0;if(o=="_instanceCounter_")return e._instanceCounter_=n,!0;if(!e._proxies_.has(o)){const h=new Ne({},e);h._proxies_.set("_parent_",i),e._proxies_.set(o,h)}return e._value_[o]!==n&&(e._value_[o]=n,e._publishDynamicFilling_(o,n),(c=e._proxies_.get(o))==null||c.set(Ee(n)?n:{__value:n})),!0},deleteProperty:function(e,o){var n;return e._publishDynamicFilling_(o,null),(n=e._proxies_.get(o))==null||n.set(null),delete e._value_[o]},has:function(e,o){return o in e._value_&&o!="_lockInternalMutationPublishing_"},defineProperty:function(e,o,n){return n&&"value"in n&&(e._value_[o]=n.value),!0},getOwnPropertyDescriptor:function(e,o){return{enumerable:!0,configurable:!0}},ownKeys:function(e){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}});return i}toString(){return"hey"}valueOf(){return 2}getProperty(t,s){return t[s]}}class Nr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ls.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}customElements.define("reactive-publisher-proxy",Nr);let Te=(k=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(k.observedElements.keys()).forEach(t=>k.unObserve(t)))}static observe(t){if(!t||!k.enabled||k.observedElements.has(t))return;const s=new MutationObserver(k.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>k.addPublisherListeners(e)),k.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>k.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&k.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>k.addPublisherListeners(s)):t.childNodes.forEach(s=>k.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&k.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>k.removePublisherListeners(s)):t.childNodes.forEach(s=>k.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":k.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{k.onAdded(i)}),s.removedNodes.forEach(i=>{k.onRemoved(i)});break}}static removePublisherListeners(t){const s=k.publisherListeners.get(t);s&&(k.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:k.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){k.removePublisherListeners(t);const s=J.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=L.getInstance().get(s),e=k.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let f=i;f=k.getSubPublisher(i,d);const m=t,b={publisher:f,onAssign:()=>{const _=a.variables.map(D=>{var p;return(p=k.getSubPublisher(i,D))==null?void 0:p.get()});let C=a.expression,O=!1;if(_.length==1&&a.variables[0].join(".")==C.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let p=_[D];const u=a.variables[D];p===null&&(O=!0,p=void 0),C=C.replace("$"+u.join("."),p)}if(C.indexOf("|")!=-1){const D=C.indexOf("|");if(D==0)C=rs.js(C.substring(1));else{const p=C.substring(0,D),u=C.substring(D+1),y=rs[p];C=O?"":y?y(u):C}}else C=O?"":C;m[c]=C}};f==null||f.onAssign(b.onAssign),o.push(b)}}),k.publisherListeners.set(t,o)}},k.observedElements=new Map,k.enabled=!0,k.publisherListeners=new Map,k);Te.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Te);let X=class te{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n];if(i?a!==c:a!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const a=t[n],c=s[n],h=te.isObject(a)&&te.isObject(c),d=i?a!==c:a!=c;if(h&&!te.deepEqual(a,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return te.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&te.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),te.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return te.getURLSearchArray(t,"").join("&")}};/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1148,7 +1148,17 @@
1148
1148
  pointer-events: none;
1149
1149
  user-select: none;
1150
1150
  }
1151
- `,Oe([l({type:String})],Wt.prototype,"submitResultKey",2),Oe([l({type:Boolean})],Wt.prototype,"disabled",2),Oe([l({type:String})],Wt.prototype,"endPoint",2),Oe([l()],Wt.prototype,"name",2),Oe([l()],Wt.prototype,"value",2),Wt=Oe([w(Hn)],Wt);var qn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,ti=(r,t,s,i)=>{for(var e=i>1?void 0:i?Wn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&qn(t,s,e),e};const Kn="sonic-router";let _s=class extends G(qe(v)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",it.onChange(this),super.connectedCallback()}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set location(r){this._location=r,this.requestUpdate()}get location(){return this._location}render(){const r=[];for(const t of this.templatePartsList){const s=t.getAttribute(this.templateValueAttribute)||"";if(new RegExp(s).test(this.location))r.push(t);else try{new he("(/)*"+s+"*").match(this.location)&&(t.setAttribute("mode","patternMatching"),r.push(t))}catch{this.location.indexOf(s.replace(document.location.origin,""))!=-1&&r.push(t)}}if(r.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const t=this.templatePartsList.find(s=>s.hasAttribute("data-fallback"));t&&r.push(t)}return g`${us(r,(t,s)=>s+new Date().getTime(),t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let i="";const e=t.getAttribute("dataProviderExpression")||"";if(t.getAttribute("mode")=="patternMatching"){const o=new he("(/)*"+(t.getAttribute(this.templateValueAttribute)||"")+"*");i=new he(e).stringify(o.match(this.location))}else{const o=new RegExp(t.getAttribute(this.templateValueAttribute)||""),n=(this.location+"").match(o);n&&(i=((s=n.shift())==null?void 0:s.replace(o,e))||"")}return g`<div style="display:contents" dataProvider="${i}">${Ot(t)}</div>`}return Ot(t)})}`}};ti([l({type:String})],_s.prototype,"fallBackRoute",2),ti([l()],_s.prototype,"location",1),_s=ti([w(Kn)],_s);var Zn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Yn=(r,t,s,i)=>{for(var e=i>1?void 0:i?Gn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Zn(t,s,e),e};const Qn="sonic-redirect";let fr=class extends G(v){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")){it.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=X.traverse(this.props,r);t&&!(X.isObject(t)&&t)&&it.changeFromComponent(this)}};fr=Yn([w(Qn)],fr);var Jn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor,ei=(r,t,s,i)=>{for(var e=i>1?void 0:i?Xn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Jn(t,s,e),e};const ta="sonic-states";let xs=class extends G(qe(v)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=r=>{this.state=r,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const r=this.statePath.split(".");for(const t of r)this.statePublisher=this.statePublisher[t];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var r;this.statePath&&((r=this.statePublisher)==null||r.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const r=[];let t=this.state;(!Array.isArray(t)&&X.isObject(t)||t===void 0)&&(t="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),e=t;if(this.inverted&&(e=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(e))r.push(s),s.removeAttribute("mode");else{const n=new he(i);n.names.length>0&&n.match(e)&&(s.setAttribute("mode","patternMatching"),r.push(s))}}return g`${us(r,(s,i)=>i+new Date().getTime(),s=>{var i;if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){const e=s.getAttribute("dataProviderExpression");let o="",n=t,a=s.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=a,a=t),a==""&&(a=this.inverted?"*":"^$"),s.getAttribute("mode")=="patternMatching"){const c=new he(a);o=new he(e).stringify(c.match(n))}else{const c=new RegExp(a),h=(n+"").match(c);h&&(o=(i=h.shift())==null?void 0:i.replace(c,e))}return g`<div style="display:contents" dataProvider="${o}">${Ot(s)}</div>`}return Ot(s)})}`}};ei([l()],xs.prototype,"state",2),ei([l({type:Boolean,reflect:!0})],xs.prototype,"inverted",2),xs=ei([w(ta)],xs);var ea=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,ia=(r,t,s,i)=>{for(var e=i>1?void 0:i?sa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ea(t,s,e),e};const ra="sonic-scope";let gr=class extends v{createRenderRoot(){return this}render(){return g`<slot></slot>`}};gr=ia([w(ra)],gr);var oa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,mr=(r,t,s,i)=>{for(var e=i>1?void 0:i?na(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&oa(t,s,e),e};const aa="sonic-example";let si=class extends G(v){constructor(){super(...arguments),this.text="Example"}render(){return g`<div>${this.text}</div>`}};mr([l()],si.prototype,"text",2),si=mr([w(aa)],si);const la={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 ca{async transform(t,s){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(t){const s=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,s)}getNodesMatchingPatterns(t,s){if(!t)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let e=[],o=0;for(const n of t)for(const a of i)this.nodeMatchesPattern(n,a)&&e.push({parent:s,child:a,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],a)),o++;return e}stringMatchesExpression(t,s){return!s||t&&t.match(s)}nodeMatchesPattern(t,s){const i=t,e=s,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(e[c],i[c]))return!1;const n=t.attributes,a=s.attributes;if(n&&!a)return!1;if(n){for(const c in n)if(!a||!this.stringMatchesExpression(a[c],n[c]))return!1}return!0}unwrap(t,s){var i,e;for(const o of s)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((e=o.parent.nodes)==null||e.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,s){var n,a,c,h,d,f;const i={...t.ui};i.nodes||(i.nodes=[]);let e=0;for(const m of s)(n=i.nodes)==null||n.push(m.child),e>0&&((a=m.parent.nodes)==null||a.splice(m.parent.nodes.indexOf(m.child),1)),e++;const o=(h=(c=s[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(s[0].child);o&&((d=s[0].parent.nodes)==null||d.splice(o,1),(f=s[0].parent.nodes)==null||f.splice(o,0,i))}move(t,s){var i,e;for(const o of s){(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1);let n=[];t.after&&(n=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(n=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const a=n[0];a&&((e=a.parent.nodes)==null||e.splice(a.parent.nodes.indexOf(a.child)+(t.after?1:0),0,o.child))}}remap(t,s){var i,e,o;for(const n of s){const a={...t.ui};a.attributes||(a.attributes={});const c=n.child.attributes;if(c)for(const _ in c)Object.prototype.hasOwnProperty.call(a.attributes,"key")||(a.attributes[_]=c[_]);const h=["libraryKey","innerHTML","prefix","suffix","markup"],d=n.child,f=a;for(const _ of h)!Object.prototype.hasOwnProperty.call(a,_)&&d[_]&&(f[_]=d[_]);a.nodes||(a.nodes=[]);const m=n.child.nodes;if(m)for(const _ of m)a.nodes.push(_);const b=((i=n.parent.nodes)==null?void 0:i.indexOf(n.child))||-1;b!=-1&&((e=n.parent.nodes)==null||e.splice(b,1),(o=n.parent.nodes)==null||o.splice(b,0,a))}}delete(t,s){var i;for(const e of s)(i=e.parent.nodes)==null||i.splice(e.parent.nodes.indexOf(e.child),1)}insert(t,s){var o;const i=t.after?"after":t.before?"before":"in";s=[],t.after?s=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?s=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(s=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=s[0];e&&(i=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):(o=e.parent.nodes)==null||o.splice(e.parent.nodes.indexOf(e.child)+(i=="after"?1:0),0,{...t.ui}))}}var ha=Object.defineProperty,da=Object.getOwnPropertyDescriptor,ii=(r,t,s,i)=>{for(var e=i>1?void 0:i?da(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ha(t,s,e),e};const pa="sonic-sdui";let Ps=class extends lr(Ht(v)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(r){this.props==null&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(r)}async updateContents(){if(!this.sduiDescriptor)return;const r={};Object.assign(r,la,this.sduiDescriptor.library),this.sduiDescriptor.library=r,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(r=>r.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const r of this.sduiDescriptor.js)We.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)We.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new ca().transform(this.sduiDescriptor,t)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=t}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let r=this.sduiDescriptor.nodes;r||(r=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),r.push(t),r.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(r){const t=r.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,s),s=this.handleMarkup(r,s),i||(i=s),this.handleChildNodes(r,i,s),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,s):s}handlePrefixSuffix(r,t){const s=document.createElement("div");return s.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),s.style.display="contents",s}handleChildNodes(r,t,s){if(r.nodes){const i=r.nodes;for(const e of i){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=s.querySelector(e.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let s,i;if(r.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(t);return{element:s,contentElement:i}}handleAttributes(r,t){const s=r.attributes;for(const i in s){const e=s[i],o=Ke.isObject(e)?JSON.stringify(e):e;t.setAttribute(i,o)}}handleMarkup(r,t){return r.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=r.markup),t}handleInnerHTML(r,t){var s;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(s=this.api)==null||s.post(i,{labels:[r.innerHTML.substring(8)]}).then(e=>{t&&(t.innerHTML+=e)})}else t&&(t.innerHTML+=r.innerHTML)}};ii([l()],Ps.prototype,"sduiKey",2),ii([l()],Ps.prototype,"messagesKey",2),Ps=ii([w(pa)],Ps);var ua=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,br=(r,t,s,i)=>{for(var e=i>1?void 0:i?fa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ua(t,s,e),e};let $s=class extends Ht(v){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(r){this._composition=r,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const r=this.listeners;this.listeners=[],r.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(r,t){if(r)for(const s in r){const i=r[s];if(typeof i=="string"){const e=i.split("."),o=e.shift();if(!o)continue;let n=tt.get(o);n=Ke.traverse(n,e);const a={publisher:n,subscriber:c=>{t[s]=c}};this.listeners.push(a),n.onAssign(a.subscriber),t._proxies_.set(s,n)}else{this.publisher[s]={};const e=new Ls({},t);t._proxies_.set(s,e);const o={publisher:e,subscriber:n=>{t[s]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(i,e)}}}render(){return g`<slot></slot>`}};$s.styles=[P`
1151
+ `,Oe([l({type:String})],Wt.prototype,"submitResultKey",2),Oe([l({type:Boolean})],Wt.prototype,"disabled",2),Oe([l({type:String})],Wt.prototype,"endPoint",2),Oe([l()],Wt.prototype,"name",2),Oe([l()],Wt.prototype,"value",2),Wt=Oe([w(Hn)],Wt);var qn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,ti=(r,t,s,i)=>{for(var e=i>1?void 0:i?Wn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&qn(t,s,e),e};const Kn="sonic-router";let _s=class extends G(qe(v)){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}connectedCallback(){this.noShadowDom="",it.onChange(this),super.connectedCallback()}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set location(r){this._location=r,this.requestUpdate()}get location(){return this._location}render(){const r=[];for(const t of this.templatePartsList){const s=t.getAttribute(this.templateValueAttribute)||"";if(new RegExp(s).test(this.location))r.push(t);else try{new he("(/)*"+s+"*").match(this.location)&&(t.setAttribute("mode","patternMatching"),r.push(t))}catch{this.location.indexOf(s.replace(document.location.origin,""))!=-1&&r.push(t)}}if(r.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const t=this.templatePartsList.find(s=>s.hasAttribute("data-fallback"));t&&r.push(t)}return g`${us(r,(t,s)=>s+new Date().getTime(),t=>{var s;if(t.title&&(document.title=t.title),t.hasAttribute("dataProviderExpression")){let i="";const e=t.getAttribute("dataProviderExpression")||"";if(t.getAttribute("mode")=="patternMatching"){const o=new he("(/)*"+(t.getAttribute(this.templateValueAttribute)||"")+"*");i=new he(e).stringify(o.match(this.location))}else{const o=new RegExp(t.getAttribute(this.templateValueAttribute)||""),n=(this.location+"").match(o);n&&(i=((s=n.shift())==null?void 0:s.replace(o,e))||"")}return g`<div
1152
+ style="display:contents"
1153
+ dataProvider="${i}"
1154
+ >
1155
+ ${Ot(t)}
1156
+ </div>`}return Ot(t)})}`}};ti([l({type:String})],_s.prototype,"fallBackRoute",2),ti([l()],_s.prototype,"location",1),_s=ti([w(Kn)],_s);var Zn=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,Yn=(r,t,s,i)=>{for(var e=i>1?void 0:i?Gn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Zn(t,s,e),e};const Qn="sonic-redirect";let fr=class extends G(v){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")){it.changeFromComponent(this);return}if(!this.props)return;const r=this.getAttribute("onData").split("."),t=X.traverse(this.props,r);t&&!(X.isObject(t)&&t)&&it.changeFromComponent(this)}};fr=Yn([w(Qn)],fr);var Jn=Object.defineProperty,Xn=Object.getOwnPropertyDescriptor,ei=(r,t,s,i)=>{for(var e=i>1?void 0:i?Xn(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Jn(t,s,e),e};const ta="sonic-states";let xs=class extends G(qe(v)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onAssign=r=>{this.state=r,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const r=this.statePath.split(".");for(const t of r)this.statePublisher=this.statePublisher[t];this.statePublisher.onAssign(this.onAssign)}}disconnectedCallback(){var r;this.statePath&&((r=this.statePublisher)==null||r.offAssign(this.onAssign)),super.disconnectedCallback()}render(){const r=[];let t=this.state;(!Array.isArray(t)&&X.isObject(t)||t===void 0)&&(t="");for(const s of this.templatePartsList){let i=s.getAttribute(this.templateValueAttribute),e=t;if(this.inverted&&(e=i,i=t),i==""&&(i=this.inverted?".*?":"^$"),new RegExp(i).test(e))r.push(s),s.removeAttribute("mode");else{const n=new he(i);n.names.length>0&&n.match(e)&&(s.setAttribute("mode","patternMatching"),r.push(s))}}return g`${us(r,(s,i)=>i+new Date().getTime(),s=>{var i;if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){const e=s.getAttribute("dataProviderExpression");let o="",n=t,a=s.getAttribute(this.templateValueAttribute);if(this.inverted&&(n=a,a=t),a==""&&(a=this.inverted?"*":"^$"),s.getAttribute("mode")=="patternMatching"){const c=new he(a);o=new he(e).stringify(c.match(n))}else{const c=new RegExp(a),h=(n+"").match(c);h&&(o=(i=h.shift())==null?void 0:i.replace(c,e))}return g`<div
1157
+ style="display:contents"
1158
+ dataProvider="${o}"
1159
+ >
1160
+ ${Ot(s)}
1161
+ </div>`}return Ot(s)})}`}};ei([l()],xs.prototype,"state",2),ei([l({type:Boolean,reflect:!0})],xs.prototype,"inverted",2),xs=ei([w(ta)],xs);var ea=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,ia=(r,t,s,i)=>{for(var e=i>1?void 0:i?sa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ea(t,s,e),e};const ra="sonic-scope";let gr=class extends v{createRenderRoot(){return this}render(){return g`<slot></slot>`}};gr=ia([w(ra)],gr);var oa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,mr=(r,t,s,i)=>{for(var e=i>1?void 0:i?na(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&oa(t,s,e),e};const aa="sonic-example";let si=class extends G(v){constructor(){super(...arguments),this.text="Example"}render(){return g`<div>${this.text}</div>`}};mr([l()],si.prototype,"text",2),si=mr([w(aa)],si);const la={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 ca{async transform(t,s){if(this.sduiDescriptor=t,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(t){const s=this.getNodesMatchingPatterns(t.patterns,this.sduiDescriptor);this[t.action](t,s)}getNodesMatchingPatterns(t,s){if(!t)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let e=[],o=0;for(const n of t)for(const a of i)this.nodeMatchesPattern(n,a)&&e.push({parent:s,child:a,index:o}),e=e.concat(this.getNodesMatchingPatterns([n],a)),o++;return e}stringMatchesExpression(t,s){return!s||t&&t.match(s)}nodeMatchesPattern(t,s){const i=t,e=s,o=["libraryKey","innerHTML","prefix","suffix","markup"];for(const c of o)if(!this.stringMatchesExpression(e[c],i[c]))return!1;const n=t.attributes,a=s.attributes;if(n&&!a)return!1;if(n){for(const c in n)if(!a||!this.stringMatchesExpression(a[c],n[c]))return!1}return!0}unwrap(t,s){var i,e;for(const o of s)(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1),o.child.nodes&&((e=o.parent.nodes)==null||e.splice(o.parent.nodes.indexOf(o.child),0,...o.child.nodes))}wrap(t,s){var n,a,c,h,d,f;const i={...t.ui};i.nodes||(i.nodes=[]);let e=0;for(const m of s)(n=i.nodes)==null||n.push(m.child),e>0&&((a=m.parent.nodes)==null||a.splice(m.parent.nodes.indexOf(m.child),1)),e++;const o=(h=(c=s[0])==null?void 0:c.parent.nodes)==null?void 0:h.indexOf(s[0].child);o&&((d=s[0].parent.nodes)==null||d.splice(o,1),(f=s[0].parent.nodes)==null||f.splice(o,0,i))}move(t,s){var i,e;for(const o of s){(i=o.parent.nodes)==null||i.splice(o.parent.nodes.indexOf(o.child),1);let n=[];t.after&&(n=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor)),t.before&&(n=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor));const a=n[0];a&&((e=a.parent.nodes)==null||e.splice(a.parent.nodes.indexOf(a.child)+(t.after?1:0),0,o.child))}}remap(t,s){var i,e,o;for(const n of s){const a={...t.ui};a.attributes||(a.attributes={});const c=n.child.attributes;if(c)for(const _ in c)Object.prototype.hasOwnProperty.call(a.attributes,"key")||(a.attributes[_]=c[_]);const h=["libraryKey","innerHTML","prefix","suffix","markup"],d=n.child,f=a;for(const _ of h)!Object.prototype.hasOwnProperty.call(a,_)&&d[_]&&(f[_]=d[_]);a.nodes||(a.nodes=[]);const m=n.child.nodes;if(m)for(const _ of m)a.nodes.push(_);const b=((i=n.parent.nodes)==null?void 0:i.indexOf(n.child))||-1;b!=-1&&((e=n.parent.nodes)==null||e.splice(b,1),(o=n.parent.nodes)==null||o.splice(b,0,a))}}delete(t,s){var i;for(const e of s)(i=e.parent.nodes)==null||i.splice(e.parent.nodes.indexOf(e.child),1)}insert(t,s){var o;const i=t.after?"after":t.before?"before":"in";s=[],t.after?s=this.getNodesMatchingPatterns([t.after],this.sduiDescriptor):t.before?s=this.getNodesMatchingPatterns([t.before],this.sduiDescriptor):t.in&&(s=this.getNodesMatchingPatterns([t.in],this.sduiDescriptor));const e=s[0];e&&(i=="in"?(e.child.nodes||(e.child.nodes=[]),e.child.nodes.push({...t.ui})):(o=e.parent.nodes)==null||o.splice(e.parent.nodes.indexOf(e.child)+(i=="after"?1:0),0,{...t.ui}))}}var ha=Object.defineProperty,da=Object.getOwnPropertyDescriptor,ii=(r,t,s,i)=>{for(var e=i>1?void 0:i?da(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ha(t,s,e),e};const pa="sonic-sdui";let Ps=class extends lr(Ht(v)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(r){this.props==null&&(this.sduiDescriptor={});{const t=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==t)return;this.sduiDescriptor=t,this.updateContents()}super.willUpdate(r)}async updateContents(){if(!this.sduiDescriptor)return;const r={};Object.assign(r,la,this.sduiDescriptor.library),this.sduiDescriptor.library=r,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(r=>r.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const r of this.sduiDescriptor.js)We.loadJS(r);if(this.sduiDescriptor.css)for(const r of this.sduiDescriptor.css)We.loadCSS(r)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const t=await(await fetch(this.getAttribute("transformation"))).json();await new ca().transform(this.sduiDescriptor,t)}async loadLibrary(){if(!this.hasAttribute("library"))return;const t=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=t}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let r=this.sduiDescriptor.nodes;r||(r=[]);const t={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(t.attributes={subDataProvider:this.messagesKey}),r.push(t),r.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(r){const t=r.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(r,t);return this.handleAttributes(r,s),s=this.handleMarkup(r,s),i||(i=s),this.handleChildNodes(r,i,s),this.handleInnerHTML(r,i),r.prefix||r.suffix?this.handlePrefixSuffix(r,s):s}handlePrefixSuffix(r,t){const s=document.createElement("div");return s.innerHTML=(r.prefix||"")+t.outerHTML+(r.suffix||""),s.style.display="contents",s}handleChildNodes(r,t,s){if(r.nodes){const i=r.nodes;for(const e of i){const o=this.parseChild(e);let n=t;e.parentElementSelector&&(n=s.querySelector(e.parentElementSelector)||t),n.shadowRoot?n.shadowRoot.appendChild(o):n.tagName.toLocaleLowerCase()=="template"?n.content.appendChild(o):n.appendChild(o)}}}handleLibrary(r,t){let s,i;if(r.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[r.libraryKey]||{tagName:"div"});const e=(this.sduiDescriptor.library[r.libraryKey]||{}).contentElementSelector;e&&(i=s.querySelector(e))}else s=document.createElement(t);return{element:s,contentElement:i}}handleAttributes(r,t){const s=r.attributes;for(const i in s){const e=s[i],o=Ke.isObject(e)?JSON.stringify(e):e;t.setAttribute(i,o)}}handleMarkup(r,t){return r.markup&&(t=document.createElement("div"),t.style.display="contents",t.innerHTML=r.markup),t}handleInnerHTML(r,t){var s;if(r.innerHTML)if(r.innerHTML.indexOf("wording_")!=-1){const i=this.getAncestorAttributeValue("wordingProvider");(s=this.api)==null||s.post(i,{labels:[r.innerHTML.substring(8)]}).then(e=>{t&&(t.innerHTML+=e)})}else t&&(t.innerHTML+=r.innerHTML)}};ii([l()],Ps.prototype,"sduiKey",2),ii([l()],Ps.prototype,"messagesKey",2),Ps=ii([w(pa)],Ps);var ua=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,br=(r,t,s,i)=>{for(var e=i>1?void 0:i?fa(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&ua(t,s,e),e};let $s=class extends Ht(v){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(r){this._composition=r,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const r=this.listeners;this.listeners=[],r.forEach(t=>{this.publisher.offAssign(t.subscriber)})}parseComposition(r,t){if(r)for(const s in r){const i=r[s];if(typeof i=="string"){const e=i.split("."),o=e.shift();if(!o)continue;let n=tt.get(o);n=Ke.traverse(n,e);const a={publisher:n,subscriber:c=>{t[s]=c}};this.listeners.push(a),n.onAssign(a.subscriber),t._proxies_.set(s,n)}else{this.publisher[s]={};const e=new Ls({},t);t._proxies_.set(s,e);const o={publisher:e,subscriber:n=>{t[s]=n}};this.listeners.push(o),e.onAssign(o.subscriber),this.parseComposition(i,e)}}}render(){return g`<slot></slot>`}};$s.styles=[P`
1152
1162
  :host {
1153
1163
  display: contents;
1154
1164
  }
@@ -1303,7 +1313,7 @@
1303
1313
  slot[name="prefix"] {
1304
1314
  flex-shrink: 0;
1305
1315
  }
1306
- `],Qe([l({type:String,reflect:!0})],fe.prototype,"type",2),Qe([l({type:String,reflect:!0})],fe.prototype,"variant",2),Qe([l({type:String,reflect:!0})],fe.prototype,"size",2),Qe([l({type:Boolean,reflect:!0})],fe.prototype,"ellipsis",2),fe=Qe([w(_a)],fe);class xa{static fixBlankLink(t){const i=typeof require>"u"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{i==null||i.shell.openExternal(t.href)})}}var Pa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,De=(r,t,s,i)=>{for(var e=i>1?void 0:i?$a(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pa(t,s,e),e};const Ca="sonic-link";let Kt=class extends v{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(r){this._location=r,it.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(it.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{var t,s;r.key==="Enter"&&((s=(t=this.shadowRoot)==null?void 0:t.querySelector("a"))==null||s.click())}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,xa.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),it.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?g`
1316
+ `],Qe([l({type:String,reflect:!0})],fe.prototype,"type",2),Qe([l({type:String,reflect:!0})],fe.prototype,"variant",2),Qe([l({type:String,reflect:!0})],fe.prototype,"size",2),Qe([l({type:Boolean,reflect:!0})],fe.prototype,"ellipsis",2),fe=Qe([w(_a)],fe);class xa{static fixBlankLink(t){const i=typeof require>"u"||typeof process!="object"?null:require("electron");t.target=="_blank"&&t.addEventListener("click",()=>{i==null||i.shell.openExternal(t.href)})}}var Pa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,De=(r,t,s,i)=>{for(var e=i>1?void 0:i?$a(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Pa(t,s,e),e};const Ca="sonic-link";let Kt=class extends v{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(r){this._location=r,it.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(it.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",r=>{var t,s;r.key==="Enter"&&((s=(t=this.shadowRoot)==null?void 0:t.querySelector("a"))==null||s.click())}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}set target(r){this._target=r,xa.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(r){r.preventDefault(),it.changeFromComponent(this)}updated(r){r.has("href")&&this.setFocusable()}render(){return this.href?g`
1307
1317
  <a
1308
1318
  href="${this.href}"
1309
1319
  aria-label=${this.ariaLabel||$}
@@ -445,7 +445,7 @@ let E = (j = class {
445
445
  const h = await new Response(a.readable).arrayBuffer();
446
446
  return new TextDecoder().decode(h);
447
447
  }
448
- }, j.buildDate = "Wed Apr 10 2024 15:55:32 GMT+0200 (Central European Summer Time)", j.changed = !1, j.saving = !1, j.saveId = 0, j.instance = null, j.modifiedCollectore = [], j);
448
+ }, j.buildDate = "Thu Apr 11 2024 14:38:32 GMT+0200 (Central European Summer Time)", j.changed = !1, j.saving = !1, j.saveId = 0, j.instance = null, j.modifiedCollectore = [], j);
449
449
  const Er = /* @__PURE__ */ new Set([
450
450
  "invalidate",
451
451
  "onInvalidate",
@@ -1965,7 +1965,17 @@ Fs.directiveName = "unsafeHTML", Fs.resultType = 1;
1965
1965
  const z = be(Fs), Rs = /* @__PURE__ */ new Map(), Ti = (r) => {
1966
1966
  if (!r)
1967
1967
  return null;
1968
- const t = rt.getApiConfiguration(r), s = rt.getAncestorAttributeValue(r, "wordingProvider"), i = rt.getAncestorAttributeValue(r, "wordingVersionProvider"), e = { apiConfiguration: t, wordingProvider: s, wordingVersionProvider: i };
1968
+ const t = rt.getApiConfiguration(r), s = rt.getAncestorAttributeValue(
1969
+ r,
1970
+ "wordingProvider"
1971
+ ), i = rt.getAncestorAttributeValue(
1972
+ r,
1973
+ "wordingVersionProvider"
1974
+ ), e = {
1975
+ apiConfiguration: t,
1976
+ wordingProvider: s,
1977
+ wordingVersionProvider: i
1978
+ };
1969
1979
  let o = null;
1970
1980
  for (const [n, a] of Rs)
1971
1981
  if (X.deepEqual(n, e)) {
@@ -2004,8 +2014,13 @@ const z = be(Fs), Rs = /* @__PURE__ */ new Map(), Ti = (r) => {
2004
2014
  V.publisher.get()[f] === ji && delete V.publisher[f];
2005
2015
  }
2006
2016
  if (t) {
2007
- const d = rt.getAncestorAttributeValue(t, "wordingVersionProvider");
2008
- d && fr(d).onAssign(V.handleVersionProvider(t));
2017
+ const d = rt.getAncestorAttributeValue(
2018
+ t,
2019
+ "wordingVersionProvider"
2020
+ );
2021
+ d && fr(d).onAssign(
2022
+ V.handleVersionProvider(t)
2023
+ );
2009
2024
  }
2010
2025
  let o = V.publisher.get()["wording_" + s] != null;
2011
2026
  const n = e || Ti(t);
@@ -2031,7 +2046,10 @@ const z = be(Fs), Rs = /* @__PURE__ */ new Map(), Ti = (r) => {
2031
2046
  if (!d.length)
2032
2047
  return;
2033
2048
  const f = c.split("?"), m = f.shift(), b = (f.length > 0 ? f.join("?") + "&" : "") + "labels[]=" + d.join("&labels[]="), w = m + "?" + b;
2034
- n.translatedKeys = /* @__PURE__ */ new Set([...n.translatedKeys, ...n.keysToTranslate]), n.keysToTranslate.clear();
2049
+ n.translatedKeys = /* @__PURE__ */ new Set([
2050
+ ...n.translatedKeys,
2051
+ ...n.keysToTranslate
2052
+ ]), n.keysToTranslate.clear();
2035
2053
  const C = await h.get(w);
2036
2054
  for (const O in C)
2037
2055
  V.publisher["wording_" + O] = C[O];
@@ -2050,7 +2068,9 @@ const z = be(Fs), Rs = /* @__PURE__ */ new Map(), Ti = (r) => {
2050
2068
  const n = V.publisher.get().__wording_versions__ ?? [];
2051
2069
  if (e == null)
2052
2070
  return;
2053
- const a = n.find((c) => c.serviceURL === s.api.serviceURL) || {
2071
+ const a = n.find(
2072
+ (c) => c.serviceURL === s.api.serviceURL
2073
+ ) || {
2054
2074
  serviceURL: s.api.serviceURL,
2055
2075
  version: 0
2056
2076
  };
@@ -2060,7 +2080,10 @@ const z = be(Fs), Rs = /* @__PURE__ */ new Map(), Ti = (r) => {
2060
2080
  c.keysToTranslate = new Set(c.translatedKeys), c.keysToTranslate.size > 0 && V.callApi(null, "", !1, c);
2061
2081
  }
2062
2082
  };
2063
- return V.versionProviderHandlers.set(s, i), i;
2083
+ return V.versionProviderHandlers.set(
2084
+ s,
2085
+ i
2086
+ ), i;
2064
2087
  }
2065
2088
  // Subscribes to the key, calling the directive's asynchronous
2066
2089
  // setValue API each time the value changes
@@ -2078,7 +2101,9 @@ const z = be(Fs), Rs = /* @__PURE__ */ new Map(), Ti = (r) => {
2078
2101
  this.key && this.subscribe(this.key);
2079
2102
  }
2080
2103
  };
2081
- V.publisher = E.get("sonic-wording", { localStorageMode: "enabled" }), V.firstCall = !0, V.versionProviderHandlers = /* @__PURE__ */ new Map();
2104
+ V.publisher = E.get("sonic-wording", {
2105
+ localStorageMode: "enabled"
2106
+ }), V.firstCall = !0, V.versionProviderHandlers = /* @__PURE__ */ new Map();
2082
2107
  let ze = V;
2083
2108
  var co = Object.defineProperty, ho = Object.getOwnPropertyDescriptor, It = (r, t, s, i) => {
2084
2109
  for (var e = i > 1 ? void 0 : i ? ho(t, s) : t, o = r.length - 1, n; o >= 0; o--)
@@ -4953,19 +4978,32 @@ const gn = /* @__PURE__ */ new Set(), mn = /* @__PURE__ */ new Set(), bn = (r) =
4953
4978
  this.isLoading = !0, X.isObject(this.props) && Object.keys(this.props || {}).length > 0 && this.isFirstLoad && window.requestAnimationFrame(() => {
4954
4979
  this.dispatchEvent(new CustomEvent("load", { detail: this })), this.isFirstLoad = !1, this.isLoading = !1;
4955
4980
  });
4956
- let o = await this.api.get(this.endPoint || this.dataProvider || "", e);
4981
+ let o = await this.api.get(
4982
+ this.endPoint || this.dataProvider || "",
4983
+ e
4984
+ );
4957
4985
  if (this.fetchedData = o, this.api.lastResult && !this.api.lastResult.ok && (gn.add(this), bn(this.api.lastResult)), !!this.isConnected) {
4958
4986
  if (o)
4959
4987
  o._sonic_http_response_ && !o._sonic_http_response_.ok && Object.keys(o).length === 1 && L.add({ text: "Network Error", status: "error" });
4960
4988
  else {
4961
- this.isLoading = !1, this.refetchEveryMs && this.isConnected && (this.refetchTimeOutId = setTimeout(() => this._fetchData(), this.refetchEveryMs));
4989
+ this.isLoading = !1, this.refetchEveryMs && this.isConnected && (this.refetchTimeOutId = setTimeout(
4990
+ () => this._fetchData(),
4991
+ this.refetchEveryMs
4992
+ ));
4962
4993
  return;
4963
4994
  }
4964
4995
  if (this.key) {
4965
4996
  const n = o._sonic_http_response_, a = this.key.split(".");
4966
- o = X.traverse(o, a, this.hasAttribute("preserveOtherKeys")), o && X.isObject(o) && n && (o._sonic_http_response_ = n);
4997
+ o = X.traverse(
4998
+ o,
4999
+ a,
5000
+ this.hasAttribute("preserveOtherKeys")
5001
+ ), o && X.isObject(o) && n && (o._sonic_http_response_ = n);
4967
5002
  }
4968
- this.props = o, this.dispatchEvent(new CustomEvent("load", { detail: this })), this.isFirstLoad = !1, this.isLoading = !1, this.refetchEveryMs && this.isConnected && (this.refetchTimeOutId = setTimeout(() => this._fetchData(), this.refetchEveryMs));
5003
+ this.props = o, this.dispatchEvent(new CustomEvent("load", { detail: this })), this.isFirstLoad = !1, this.isLoading = !1, this.refetchEveryMs && this.isConnected && (this.refetchTimeOutId = setTimeout(
5004
+ () => this._fetchData(),
5005
+ this.refetchEveryMs
5006
+ ));
4969
5007
  }
4970
5008
  }
4971
5009
  disconnectedCallback() {
@@ -4984,12 +5022,20 @@ const gn = /* @__PURE__ */ new Set(), mn = /* @__PURE__ */ new Set(), bn = (r) =
4984
5022
  this._fetchData();
4985
5023
  return;
4986
5024
  }
4987
- const o = parseFloat(this.getAttribute("lazyBoundsRatio") || "1"), n = {
5025
+ const o = parseFloat(
5026
+ this.getAttribute("lazyBoundsRatio") || "1"
5027
+ ), n = {
4988
5028
  root: null,
4989
- rootMargin: Math.max(window.innerWidth * o, window.innerHeight * o) + "px",
5029
+ rootMargin: Math.max(
5030
+ window.innerWidth * o,
5031
+ window.innerHeight * o
5032
+ ) + "px",
4990
5033
  threshold: 0.9
4991
5034
  };
4992
- this.iObserver = new IntersectionObserver((c) => this.onIntersection(c), n);
5035
+ this.iObserver = new IntersectionObserver(
5036
+ (c) => this.onIntersection(c),
5037
+ n
5038
+ );
4993
5039
  let a = this.shadowRoot ? this.shadowRoot.children[0] : this.children[0];
4994
5040
  if ((a == null ? void 0 : a.nodeName.toLocaleLowerCase()) == "slot" && (a = a.children[0]), !a || a.nodeName.toLocaleLowerCase() == "template") {
4995
5041
  a = document.createElement("span");
@@ -5540,7 +5586,11 @@ let ot = class extends Y(y) {
5540
5586
  (r = this.filterPublisher) == null || r.offInternalMutation(this.updateFilteredContent), this.props = null, this.limit = 5, this.offset = 0, this.resultCount = 0, this.searchHash = "", this.requestId = 0, this.isFirstRequest = !0, this.nextHadEvent = !1, this.publisher.set({}), super.disconnectedCallback();
5541
5587
  }
5542
5588
  async connectedCallback() {
5543
- this.instanceId = ot.instanceCounter++, this.localStorage = this.getAttribute("localStorage") || this.localStorage, this.filterTimeoutMs = parseInt(this.getAttribute("filterTimeoutMs") || "400"), this.removeAttribute("localStorage"), this.noShadowDom = "", this.defferedDebug = this.hasAttribute("debug") || null, this.dataProvider || (this.dataProvider = this.dataProviderExpression || "sonic-queue-" + this.instanceId + "-" + Math.random().toString(36).substring(7)), this.dataProviderExpression || (this.dataProviderExpression = Be.getAncestorAttributeValue(this.parentElement, "dataProvider") || ""), super.connectedCallback(), this.publisher.set({}), this.key = this.getAttribute("key"), await E.getInstance().isLocalStrorageReady, this.templates || (this.templates = Array.from(this.querySelectorAll("template"))), this.lastRequestTime = (/* @__PURE__ */ new Date()).getTime(), this.configFilter();
5589
+ this.instanceId = ot.instanceCounter++, this.localStorage = this.getAttribute("localStorage") || this.localStorage, this.filterTimeoutMs = parseInt(
5590
+ this.getAttribute("filterTimeoutMs") || "400"
5591
+ ), this.removeAttribute("localStorage"), this.noShadowDom = "", this.defferedDebug = this.hasAttribute("debug") || null, this.dataProvider || (this.dataProvider = this.dataProviderExpression || "sonic-queue-" + this.instanceId + "-" + Math.random().toString(36).substring(7)), this.dataProviderExpression || (this.dataProviderExpression = Be.getAncestorAttributeValue(this.parentElement, "dataProvider") || ""), super.connectedCallback(), this.publisher.set({}), this.key = this.getAttribute("key"), await E.getInstance().isLocalStrorageReady, this.templates || (this.templates = Array.from(
5592
+ this.querySelectorAll("template")
5593
+ )), this.lastRequestTime = (/* @__PURE__ */ new Date()).getTime(), this.configFilter();
5544
5594
  }
5545
5595
  configFilter() {
5546
5596
  var t;
@@ -5573,7 +5623,9 @@ let ot = class extends Y(y) {
5573
5623
  const m = [];
5574
5624
  m.resultCount = this.resultCount, m.lastFetchedData = (r == null ? void 0 : r.detail.fetchedData) || {}, this.props = m;
5575
5625
  }
5576
- i > 0 && r && !this.localStorage && (this.limit = Math.round(this.limit / i * this.targetRequestDuration)), this.limit < 1 && (this.limit = 1), this.limit > 15 && (this.limit = 15);
5626
+ i > 0 && r && !this.localStorage && (this.limit = Math.round(
5627
+ this.limit / i * this.targetRequestDuration
5628
+ )), this.limit < 1 && (this.limit = 1), this.limit > 15 && (this.limit = 15);
5577
5629
  let e = this.dataProviderExpression.replace("$offset", t + "").replace("$limit", this.limit + "");
5578
5630
  const o = e.split("?");
5579
5631
  let n = o.shift();
@@ -5600,7 +5652,9 @@ let ot = class extends Y(y) {
5600
5652
  return this.props.length == 1 && (r = !1), g`
5601
5653
  ${Fn(this.props, (t, s) => {
5602
5654
  var e;
5603
- const i = s == 0 ? this.templates : (e = this.templates) == null ? void 0 : e.filter((o) => o.getAttribute("data-value") != "no-item");
5655
+ const i = s == 0 ? this.templates : (e = this.templates) == null ? void 0 : e.filter(
5656
+ (o) => o.getAttribute("data-value") != "no-item"
5657
+ );
5604
5658
  return g`
5605
5659
  <sonic-list
5606
5660
  fetch
@@ -5824,7 +5878,10 @@ var Wn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, pi = (r, t
5824
5878
  const Zn = "sonic-router";
5825
5879
  let vs = class extends Y(Ye(y)) {
5826
5880
  constructor() {
5827
- super(...arguments), this.templateValueAttribute = "data-route", this._location = document.location.href.replace(document.location.origin, "");
5881
+ super(...arguments), this.templateValueAttribute = "data-route", this._location = document.location.href.replace(
5882
+ document.location.origin,
5883
+ ""
5884
+ );
5828
5885
  }
5829
5886
  connectedCallback() {
5830
5887
  this.noShadowDom = "", st.onChange(this), super.connectedCallback();
@@ -5853,7 +5910,9 @@ let vs = class extends Y(Ye(y)) {
5853
5910
  }
5854
5911
  if (r.length == 0) {
5855
5912
  this.fallBackRoute && this.isConnected && (document.location.href = this.fallBackRoute);
5856
- const t = this.templatePartsList.find((s) => s.hasAttribute("data-fallback"));
5913
+ const t = this.templatePartsList.find(
5914
+ (s) => s.hasAttribute("data-fallback")
5915
+ );
5857
5916
  t && r.push(t);
5858
5917
  }
5859
5918
  return g`${As(
@@ -5865,13 +5924,22 @@ let vs = class extends Y(Ye(y)) {
5865
5924
  let i = "";
5866
5925
  const e = t.getAttribute("dataProviderExpression") || "";
5867
5926
  if (t.getAttribute("mode") == "patternMatching") {
5868
- const o = new ae("(/)*" + (t.getAttribute(this.templateValueAttribute) || "") + "*");
5927
+ const o = new ae(
5928
+ "(/)*" + (t.getAttribute(this.templateValueAttribute) || "") + "*"
5929
+ );
5869
5930
  i = new ae(e).stringify(o.match(this.location));
5870
5931
  } else {
5871
- const o = new RegExp(t.getAttribute(this.templateValueAttribute) || ""), n = (this.location + "").match(o);
5932
+ const o = new RegExp(
5933
+ t.getAttribute(this.templateValueAttribute) || ""
5934
+ ), n = (this.location + "").match(o);
5872
5935
  n && (i = ((s = n.shift()) == null ? void 0 : s.replace(o, e)) || "");
5873
5936
  }
5874
- return g`<div style="display:contents" dataProvider="${i}">${Ot(t)}</div>`;
5937
+ return g`<div
5938
+ style="display:contents"
5939
+ dataProvider="${i}"
5940
+ >
5941
+ ${Ot(t)}
5942
+ </div>`;
5875
5943
  }
5876
5944
  return Ot(t);
5877
5945
  }
@@ -5958,8 +6026,12 @@ let ys = class extends Y(Ye(y)) {
5958
6026
  (s) => {
5959
6027
  var i;
5960
6028
  if (s.title && (document.title = s.title), s.hasAttribute("dataProviderExpression")) {
5961
- const e = s.getAttribute("dataProviderExpression");
5962
- let o = "", n = t, a = s.getAttribute(this.templateValueAttribute);
6029
+ const e = s.getAttribute(
6030
+ "dataProviderExpression"
6031
+ );
6032
+ let o = "", n = t, a = s.getAttribute(
6033
+ this.templateValueAttribute
6034
+ );
5963
6035
  if (this.inverted && (n = a, a = t), a == "" && (a = this.inverted ? "*" : "^$"), s.getAttribute("mode") == "patternMatching") {
5964
6036
  const c = new ae(a);
5965
6037
  o = new ae(e).stringify(c.match(n));
@@ -5967,7 +6039,12 @@ let ys = class extends Y(Ye(y)) {
5967
6039
  const c = new RegExp(a), h = (n + "").match(c);
5968
6040
  h && (o = (i = h.shift()) == null ? void 0 : i.replace(c, e));
5969
6041
  }
5970
- return g`<div style="display:contents" dataProvider="${o}">${Ot(s)}</div>`;
6042
+ return g`<div
6043
+ style="display:contents"
6044
+ dataProvider="${o}"
6045
+ >
6046
+ ${Ot(s)}
6047
+ </div>`;
5971
6048
  }
5972
6049
  return Ot(s);
5973
6050
  }
@@ -6742,7 +6819,7 @@ de = es([
6742
6819
  ], de);
6743
6820
  class Ba {
6744
6821
  static fixBlankLink(t) {
6745
- const i = typeof require > "u" ? null : require("electron");
6822
+ const i = typeof require > "u" || typeof process != "object" ? null : require("electron");
6746
6823
  t.target == "_blank" && t.addEventListener("click", () => {
6747
6824
  i == null || i.shell.openExternal(t.href);
6748
6825
  });