@supersoniks/concorde 3.1.82 → 3.1.83
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/build-infos.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"date":
|
|
1
|
+
{"date":1751541148}
|
package/concorde-core.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,E,ko,t,X;let K=class Ht{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="auto"||(i==null?void 0:i.overflowY)==="scroll"||(i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="auto"||(i==null?void 0:i.overflowX)==="scroll"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ht.getAncestorAttributeValue(t,"token"),i=Ht.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ht.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Ht.getAncestorAttributeValue(t,"tokenProvider"),c=Ht.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ht.getAncestorAttributeValue(t,"userName"),n=Ht.getAncestorAttributeValue(t,"password"));const h=Ht.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}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 Ht.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)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).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""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),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(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const 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)}},k.buildDate="Thu Jul 03 2025 12:14:57 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||N}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&N.getInstance().invalidateAll()});let Ps=(E=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(E.observedElements.keys()).forEach(t=>E.unObserve(t)))}static observe(t){if(!t||!E.enabled||E.observedElements.has(t))return;const s=new MutationObserver(E.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=>E.addPublisherListeners(e)),E.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=>E.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.addPublisherListeners(s)):t.childNodes.forEach(s=>E.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.removePublisherListeners(s)):t.childNodes.forEach(s=>E.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":E.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{E.onAdded(i)}),s.removedNodes.forEach(i=>{E.onRemoved(i)});break}}static removePublisherListeners(t){const s=E.publisherListeners.get(t);s&&(E.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:E.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){E.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=E.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=E.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=E.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,_=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(_=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),w=ws[f];y=_?"":w?w(u):y}}else y=_?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),E.publisherListeners.set(t,o)}},E.observedElements=new Map,E.enabled=!0,E.publisherListeners=new Map,E);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{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=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.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 Zt.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&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
1
|
+
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,E,ko,t,X;let K=class Ht{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="auto"||(i==null?void 0:i.overflowY)==="scroll"||(i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="auto"||(i==null?void 0:i.overflowX)==="scroll"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ht.getAncestorAttributeValue(t,"token"),i=Ht.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ht.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Ht.getAncestorAttributeValue(t,"tokenProvider"),c=Ht.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ht.getAncestorAttributeValue(t,"userName"),n=Ht.getAncestorAttributeValue(t,"password"));const h=Ht.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}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 Ht.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)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).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""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),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(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const 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)}},k.buildDate="Thu Jul 03 2025 13:12:28 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||N}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&N.getInstance().invalidateAll()});let Ps=(E=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(E.observedElements.keys()).forEach(t=>E.unObserve(t)))}static observe(t){if(!t||!E.enabled||E.observedElements.has(t))return;const s=new MutationObserver(E.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=>E.addPublisherListeners(e)),E.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=>E.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.addPublisherListeners(s)):t.childNodes.forEach(s=>E.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.removePublisherListeners(s)):t.childNodes.forEach(s=>E.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":E.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{E.onAdded(i)}),s.removedNodes.forEach(i=>{E.onRemoved(i)});break}}static removePublisherListeners(t){const s=E.publisherListeners.get(t);s&&(E.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:E.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){E.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=E.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=E.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=E.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,_=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(_=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),w=ws[f];y=_?"":w?w(u):y}}else y=_?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),E.publisherListeners.set(t,o)}},E.observedElements=new Map,E.enabled=!0,E.publisherListeners=new Map,E);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{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=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.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 Zt.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&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -2042,7 +2042,7 @@
|
|
|
2042
2042
|
:host([shadow="none"]) .shadowable {
|
|
2043
2043
|
box-shadow: none;
|
|
2044
2044
|
}
|
|
2045
|
-
`;var Gl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,It=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ql(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&&Gl(t,s,e),e};const Jl="sonic-pop";let ot=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=r.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){K.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const s=t.style;s.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),s=t[0];ot.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(s,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),ot.pops.size==0
|
|
2045
|
+
`;var Gl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,It=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ql(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&&Gl(t,s,e),e};const Jl="sonic-pop";let ot=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=r.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){K.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const s=t.style;s.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),s=t[0];ot.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(s,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),ot.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),ot.pops.add(this)}firstUpdated(r){super.firstUpdated(r),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),ot.pops.delete(this),ot.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(r){var T,q,W,kt;const t=r.split(" "),s=t[0];let i=t[1];const e=5,o=this.getBoundingClientRect(),n=K.getScrollableAncestor(this.popContent),a=n==null?void 0:n.getBoundingClientRect(),c=Math.max(0,(a==null?void 0:a.left)||0)+e,h=Math.max(0,(a==null?void 0:a.top)||0)+e,d=Math.min(window.innerWidth,(a==null?void 0:a.right)||window.innerWidth)-e,p=Math.min(window.innerHeight,(a==null?void 0:a.bottom)||window.innerHeight)-e,g=o.left,v=o.top;let b=g,y=v,_=(T=this.popContent)==null?void 0:T.getBoundingClientRect();const D=v-_.height,f=g-_.width,u=g+o.width,w=v+o.height,S=g+(o.width-_.width)*.5,O=v+(o.height-_.height)*.5;switch(s){case"bottom":y=w,i=="center"&&(b=S);break;case"top":y=D,i=="center"&&(b=S);break;case"left":b=f,i=="center"&&(y=O);break;case"right":b=u,i=="center"&&(y=O);break}this.lastContentX+=b-_.x,this.lastContentY+=y-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(q=this.popContent)==null?void 0:q.getBoundingClientRect(),_.x<c&&s=="left"&&(b=u),_.y<h&&s=="top"&&(y=w),_.x+_.width>d&&s=="right"&&(b=f),_.y+_.height>p&&s=="bottom"&&(y=D),this.lastContentX+=b-_.x,this.lastContentY+=y-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(W=this.popContent)==null?void 0:W.getBoundingClientRect(),_.x<c&&(this.lastContentX+=c-_.x),_.y<h&&(this.lastContentY+=h-_.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(kt=this.popContent)==null?void 0:kt.getBoundingClientRect(),_.x+_.width>d&&(this.lastContentX+=d-(_.x+_.width)),_.y+_.height>p&&(this.lastContentY+=p-(_.y+_.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return m`
|
|
2046
2046
|
<slot
|
|
2047
2047
|
@click=${this.manual?()=>{}:this.toggle}
|
|
2048
2048
|
@keydown=${this.manual?()=>{}:this.toggle}
|
package/concorde-core.es.js
CHANGED
|
@@ -559,7 +559,7 @@ let T = (k = class {
|
|
|
559
559
|
const h = await new Response(a.readable).arrayBuffer();
|
|
560
560
|
return new TextDecoder().decode(h);
|
|
561
561
|
}
|
|
562
|
-
}, k.buildDate = "Thu Jul 03 2025 12:
|
|
562
|
+
}, k.buildDate = "Thu Jul 03 2025 13:12:28 GMT+0200 (Central European Summer Time)", k.changed = !1, k.saving = !1, k.saveId = 0, k.instance = null, k.instances = /* @__PURE__ */ new Map(), k.modifiedCollectore = [], k);
|
|
563
563
|
if (typeof window < "u") {
|
|
564
564
|
const r = window;
|
|
565
565
|
r[Ds + "PublisherManager"] = r[Ds + "PublisherManager"] || T;
|
|
@@ -8566,7 +8566,7 @@ let rt = class extends x {
|
|
|
8566
8566
|
});
|
|
8567
8567
|
}
|
|
8568
8568
|
connectedCallback() {
|
|
8569
|
-
super.connectedCallback(), rt.pops.size == 0 &&
|
|
8569
|
+
super.connectedCallback(), rt.pops.size == 0 && (document.addEventListener("pointerdown", this._handleClosePop), document.addEventListener("click", this._handleClosePop), document.addEventListener("keydown", this._handleKeyDown)), rt.pops.add(this);
|
|
8570
8570
|
}
|
|
8571
8571
|
// /*
|
|
8572
8572
|
// On attends le premier rendu pour observer les changements de taille car popup content n'est pas encore défini sinon
|
|
@@ -8575,7 +8575,7 @@ let rt = class extends x {
|
|
|
8575
8575
|
super.firstUpdated(r), this.resizeObserver.observe(this.popContent);
|
|
8576
8576
|
}
|
|
8577
8577
|
disconnectedCallback() {
|
|
8578
|
-
this.popContent && this.resizeObserver.unobserve(this.popContent), super.disconnectedCallback(), rt.pops.delete(this), rt.pops.size == 0 &&
|
|
8578
|
+
this.popContent && this.resizeObserver.unobserve(this.popContent), super.disconnectedCallback(), rt.pops.delete(this), rt.pops.size == 0 && (document.removeEventListener("pointerdown", this._handleClosePop), document.removeEventListener("click", this._handleClosePop), document.removeEventListener("keydown", this._handleKeyDown));
|
|
8579
8579
|
}
|
|
8580
8580
|
computePosition(r) {
|
|
8581
8581
|
var N, H, W, Ot;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,E,ko,t,X;let K=class Ht{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="auto"||(i==null?void 0:i.overflowY)==="scroll"||(i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="auto"||(i==null?void 0:i.overflowX)==="scroll"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ht.getAncestorAttributeValue(t,"token"),i=Ht.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ht.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Ht.getAncestorAttributeValue(t,"tokenProvider"),c=Ht.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ht.getAncestorAttributeValue(t,"userName"),n=Ht.getAncestorAttributeValue(t,"password"));const h=Ht.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}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 Ht.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)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).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""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),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(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const 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)}},k.buildDate="Thu Jul 03 2025 12:14:57 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||N}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&N.getInstance().invalidateAll()});let Ps=(E=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(E.observedElements.keys()).forEach(t=>E.unObserve(t)))}static observe(t){if(!t||!E.enabled||E.observedElements.has(t))return;const s=new MutationObserver(E.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=>E.addPublisherListeners(e)),E.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=>E.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.addPublisherListeners(s)):t.childNodes.forEach(s=>E.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.removePublisherListeners(s)):t.childNodes.forEach(s=>E.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":E.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{E.onAdded(i)}),s.removedNodes.forEach(i=>{E.onRemoved(i)});break}}static removePublisherListeners(t){const s=E.publisherListeners.get(t);s&&(E.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:E.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){E.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=E.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=E.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=E.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,_=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(_=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),w=ws[f];y=_?"":w?w(u):y}}else y=_?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),E.publisherListeners.set(t,o)}},E.observedElements=new Map,E.enabled=!0,E.publisherListeners=new Map,E);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{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=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.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 Zt.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&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
1
|
+
(function(K){typeof define=="function"&&define.amd?define(K):K()})(function(){"use strict";var Dt,k,E,ko,t,X;let K=class Ht{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="auto"||(i==null?void 0:i.overflowY)==="scroll"||(i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="auto"||(i==null?void 0:i.overflowX)==="scroll"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ht.getAncestorAttributeValue(t,"token"),i=Ht.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ht.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const a=Ht.getAncestorAttributeValue(t,"tokenProvider"),c=Ht.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ht.getAncestorAttributeValue(t,"userName"),n=Ht.getAncestorAttributeValue(t,"password"));const h=Ht.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),p=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:a,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:p}}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 Ht.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)})}};const si=r=>{const t=document.documentElement,s=new MutationObserver(e=>{for(let o of e)o.type==="attributes"&&o.attributeName==="lang"&&r()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(t,i)};let ws=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=K.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,p){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:p}).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""}}},Mo=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},rr="sonic";typeof __SONIC_PREFIX__<"u"&&(rr=__SONIC_PREFIX__);let or=rr.replace(/-([a-z])/g,r=>r[1].toUpperCase());const xs=or.charAt(0).toUpperCase()+or.slice(1);function $s(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function He(r){return typeof r=="object"&&r!=null}let De="sonic";typeof __SONIC_PREFIX__>"u"&&(De="sonic"+Math.floor(Math.random()*1e6));const ii=De=="sonic"?"publisher-proxies-data":De+"-publisher-proxies-data";let ri=(Dt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),Dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&$s(this._value_)&&$s(t)&&this._value_.__value===t.__value)return!0;this._value_=He(t)?t:{__value:t},this._cachedGet_=void 0;const i=$s(this._value_);if(this._parentKey_&&this.parent){const a=$s(this._value_)?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:a});else{const c=[];c[Number(this._parentKey_)]=a,this.parent.set(c)}else this.parent._value_[this._parentKey_]=a}if(i)return this._proxies_.forEach((a,c)=>{c!="_parent_"&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const a in this._value_)this._value_[a]===void 0&&delete this._value_[a];if(this._proxies_.forEach((a,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(a.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),He(this._value_))for(const a in this._value_){const c=t[a],d=He(c)?c:{__value:c};if(!this._proxies_.has(a)){this._publishDynamicFilling_(a,c);continue}(n=this._proxies_.get(a))==null||n.set(d,!0),this._publishDynamicFilling_(a,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(Dt.instancesCounter++,this._instanceCounter_=Dt.instancesCounter),Dt.instances.set(this._instanceCounter_,this),"<"+De+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+De+"-publisher-proxy>"}},Dt.instances=new Map,Dt.instancesCounter=0,Dt),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}invalidateAll(){this.publishers.forEach(t=>{t._invalidate_on_page_show_&&t.invalidate()})}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(ii),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(ii,i),this.localStorageData={};const o=1e3*60*60*12;for(const n in this.localStorageData){const a=this.localStorageData[n],c=new Date().getTime()-(a.expirationDelayMs||o);a.lastModifiationMS<c&&delete this.localStorageData[n]}t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+K.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled",e=(s==null?void 0:s.invalidateOnPageShow)===!0;if(!this.publishers.has(t)){const n={},a=new Be(n);this.set(t,a)}const o=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(s!=null&&s.expirationDelayMs&&(o._expiration_delay_=s.expirationDelayMs),o._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(o,t)),e&&(o._invalidate_on_page_show_=e),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+K.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:o._expiration_delay_,data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(ii,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const 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)}},k.buildDate="Thu Jul 03 2025 13:12:28 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);if(typeof window<"u"){const r=window;r[xs+"PublisherManager"]=r[xs+"PublisherManager"]||N}const Io=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);class Be extends ri{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Io.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const a=o._value_[n],c=new Be(He(a)?a:{__value:a},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,a){var h;if(n=="_value_")return o._value_=a,!0;if(n=="_cachedGet_")return o._cachedGet_=a,!0;if(n=="_assignmentId_")return o._assignmentId_=a,!0;if(n=="_is_savable_")return o._is_savable_=a,!0;if(n=="_expiration_delay_")return o._expiration_delay_=a,!0;if(n=="_invalidate_on_page_show_")return o._invalidate_on_page_show_=a,!0;if(n=="_instanceCounter_")return o._instanceCounter_=a,!0;if(!o._proxies_.has(n)){const d=new Be({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==a&&(o._value_[n]=a,o._publishDynamicFilling_(n,a),(h=o._proxies_.get(n))==null||h.set(He(a)?a:{__value:a})),!0},deleteProperty:function(o,n){var a;return o._publishDynamicFilling_(n,null),(a=o._proxies_.get(n))==null||a.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,a){return a&&"value"in a&&(o._value_[n]=a.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class jo extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=ri.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(De+"-publisher-proxy",jo)}catch{}window.addEventListener("pageshow",r=>{r.persisted&&N.getInstance().invalidateAll()});let Ps=(E=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(E.observedElements.keys()).forEach(t=>E.unObserve(t)))}static observe(t){if(!t||!E.enabled||E.observedElements.has(t))return;const s=new MutationObserver(E.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=>E.addPublisherListeners(e)),E.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=>E.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.addPublisherListeners(s)):t.childNodes.forEach(s=>E.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&E.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>E.removePublisherListeners(s)):t.childNodes.forEach(s=>E.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":E.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{E.onAdded(i)}),s.removedNodes.forEach(i=>{E.onRemoved(i)});break}}static removePublisherListeners(t){const s=E.publisherListeners.get(t);s&&(E.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:E.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){E.removePublisherListeners(t);const s=K.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=E.getDataBindItems(t),o=[];e.forEach(n=>{const a=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of a.variables){const d=h;let p=i;p=E.getSubPublisher(i,d);const g=t,v={publisher:p,onAssign:()=>{const b=a.variables.map(D=>{var f;return(f=E.getSubPublisher(i,D))==null?void 0:f.get()});let y=a.expression,_=!1;if(b.length==1&&a.variables[0].join(".")==y.substring(1)){let D=b[0];D===null&&(D=""),g[c]=D;return}for(let D=0;D<b.length;D++){let f=b[D];const u=a.variables[D];f===null&&(_=!0,f=void 0),y=y.replace("$"+u.join("."),f)}if(y.indexOf("|")!=-1){const D=y.indexOf("|");if(D==0)y=ws.js(y.substring(1));else{const f=y.substring(0,D),u=y.substring(D+1),w=ws[f];y=_?"":w?w(u):y}}else y=_?"":y;g[c]=y}};p==null||p.onAssign(v.onAssign),o.push(v)}}),E.publisherListeners.set(t,o)}},E.observedElements=new Map,E.enabled=!0,E.publisherListeners=new Map,E);Ps.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Ps);let tt=class Zt{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=Zt.isObject(a)&&Zt.isObject(c),d=i?a!==c:a!=c;if(h&&!Zt.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 Zt.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&&Zt.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Zt.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Zt.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Zt.getURLSearchArray(t,"").join("&")}};const pt=tt.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -2042,7 +2042,7 @@
|
|
|
2042
2042
|
:host([shadow="none"]) .shadowable {
|
|
2043
2043
|
box-shadow: none;
|
|
2044
2044
|
}
|
|
2045
|
-
`;var Gl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,It=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ql(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&&Gl(t,s,e),e};const Jl="sonic-pop";let ot=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=r.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){K.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const s=t.style;s.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),s=t[0];ot.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(s,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),ot.pops.size==0
|
|
2045
|
+
`;var Gl=Object.defineProperty,Ql=Object.getOwnPropertyDescriptor,It=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ql(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&&Gl(t,s,e),e};const Jl="sonic-pop";let ot=class extends x{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=r=>{r.key==="Escape"&&this.open&&(r.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(r){if(this.open&&this.noToggle)return;const t=r;r.type=="keydown"&&(t.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=r.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent.style.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}setMaxZindex(){K.everyAncestors(this,r=>{const t=r;if(!t.className)return!0;if([...t.classList].includes("@container")){const s=t.style;s.zIndex="999999999";const i=getComputedStyle(t);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(r),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(r=>{r.style.removeProperty("position"),r.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(r){const t=r.composedPath(),s=t[0];ot.pops.forEach(i=>{const e=t.includes(i),o=t.includes(i.querySelector('[slot="content"]')),n=K.getAncestorAttributeValue(s,"data-on-select")==="keep";r.type=="pointerdown"&&e||r.type=="click"&&(e&&n||!o)||i.hide()})}connectedCallback(){super.connectedCallback(),ot.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),ot.pops.add(this)}firstUpdated(r){super.firstUpdated(r),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),ot.pops.delete(this),ot.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(r){var T,q,W,kt;const t=r.split(" "),s=t[0];let i=t[1];const e=5,o=this.getBoundingClientRect(),n=K.getScrollableAncestor(this.popContent),a=n==null?void 0:n.getBoundingClientRect(),c=Math.max(0,(a==null?void 0:a.left)||0)+e,h=Math.max(0,(a==null?void 0:a.top)||0)+e,d=Math.min(window.innerWidth,(a==null?void 0:a.right)||window.innerWidth)-e,p=Math.min(window.innerHeight,(a==null?void 0:a.bottom)||window.innerHeight)-e,g=o.left,v=o.top;let b=g,y=v,_=(T=this.popContent)==null?void 0:T.getBoundingClientRect();const D=v-_.height,f=g-_.width,u=g+o.width,w=v+o.height,S=g+(o.width-_.width)*.5,O=v+(o.height-_.height)*.5;switch(s){case"bottom":y=w,i=="center"&&(b=S);break;case"top":y=D,i=="center"&&(b=S);break;case"left":b=f,i=="center"&&(y=O);break;case"right":b=u,i=="center"&&(y=O);break}this.lastContentX+=b-_.x,this.lastContentY+=y-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(q=this.popContent)==null?void 0:q.getBoundingClientRect(),_.x<c&&s=="left"&&(b=u),_.y<h&&s=="top"&&(y=w),_.x+_.width>d&&s=="right"&&(b=f),_.y+_.height>p&&s=="bottom"&&(y=D),this.lastContentX+=b-_.x,this.lastContentY+=y-_.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(W=this.popContent)==null?void 0:W.getBoundingClientRect(),_.x<c&&(this.lastContentX+=c-_.x),_.y<h&&(this.lastContentY+=h-_.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),_=(kt=this.popContent)==null?void 0:kt.getBoundingClientRect(),_.x+_.width>d&&(this.lastContentX+=d-(_.x+_.width)),_.y+_.height>p&&(this.lastContentY+=p-(_.y+_.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return m`
|
|
2046
2046
|
<slot
|
|
2047
2047
|
@click=${this.manual?()=>{}:this.toggle}
|
|
2048
2048
|
@keydown=${this.manual?()=>{}:this.toggle}
|
package/dist/concorde-core.es.js
CHANGED
|
@@ -559,7 +559,7 @@ let T = (k = class {
|
|
|
559
559
|
const h = await new Response(a.readable).arrayBuffer();
|
|
560
560
|
return new TextDecoder().decode(h);
|
|
561
561
|
}
|
|
562
|
-
}, k.buildDate = "Thu Jul 03 2025 12:
|
|
562
|
+
}, k.buildDate = "Thu Jul 03 2025 13:12:28 GMT+0200 (Central European Summer Time)", k.changed = !1, k.saving = !1, k.saveId = 0, k.instance = null, k.instances = /* @__PURE__ */ new Map(), k.modifiedCollectore = [], k);
|
|
563
563
|
if (typeof window < "u") {
|
|
564
564
|
const r = window;
|
|
565
565
|
r[Ds + "PublisherManager"] = r[Ds + "PublisherManager"] || T;
|
|
@@ -8566,7 +8566,7 @@ let rt = class extends x {
|
|
|
8566
8566
|
});
|
|
8567
8567
|
}
|
|
8568
8568
|
connectedCallback() {
|
|
8569
|
-
super.connectedCallback(), rt.pops.size == 0 &&
|
|
8569
|
+
super.connectedCallback(), rt.pops.size == 0 && (document.addEventListener("pointerdown", this._handleClosePop), document.addEventListener("click", this._handleClosePop), document.addEventListener("keydown", this._handleKeyDown)), rt.pops.add(this);
|
|
8570
8570
|
}
|
|
8571
8571
|
// /*
|
|
8572
8572
|
// On attends le premier rendu pour observer les changements de taille car popup content n'est pas encore défini sinon
|
|
@@ -8575,7 +8575,7 @@ let rt = class extends x {
|
|
|
8575
8575
|
super.firstUpdated(r), this.resizeObserver.observe(this.popContent);
|
|
8576
8576
|
}
|
|
8577
8577
|
disconnectedCallback() {
|
|
8578
|
-
this.popContent && this.resizeObserver.unobserve(this.popContent), super.disconnectedCallback(), rt.pops.delete(this), rt.pops.size == 0 &&
|
|
8578
|
+
this.popContent && this.resizeObserver.unobserve(this.popContent), super.disconnectedCallback(), rt.pops.delete(this), rt.pops.size == 0 && (document.removeEventListener("pointerdown", this._handleClosePop), document.removeEventListener("click", this._handleClosePop), document.removeEventListener("keydown", this._handleKeyDown));
|
|
8579
8579
|
}
|
|
8580
8580
|
computePosition(r) {
|
|
8581
8581
|
var N, H, W, Ot;
|
package/package.json
CHANGED
|
@@ -192,7 +192,7 @@ export class Pop extends LitElement {
|
|
|
192
192
|
|
|
193
193
|
connectedCallback(): void {
|
|
194
194
|
super.connectedCallback();
|
|
195
|
-
if (Pop.pops.size == 0
|
|
195
|
+
if (Pop.pops.size == 0) {
|
|
196
196
|
document.addEventListener("pointerdown", this._handleClosePop);
|
|
197
197
|
document.addEventListener("click", this._handleClosePop);
|
|
198
198
|
document.addEventListener("keydown", this._handleKeyDown);
|
|
@@ -214,7 +214,7 @@ export class Pop extends LitElement {
|
|
|
214
214
|
}
|
|
215
215
|
super.disconnectedCallback();
|
|
216
216
|
Pop.pops.delete(this);
|
|
217
|
-
if (Pop.pops.size == 0
|
|
217
|
+
if (Pop.pops.size == 0) {
|
|
218
218
|
document.removeEventListener("pointerdown", this._handleClosePop);
|
|
219
219
|
document.removeEventListener("click", this._handleClosePop);
|
|
220
220
|
document.removeEventListener("keydown", this._handleKeyDown);
|