@supersoniks/concorde 3.1.31 → 3.1.33

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":1726645217}
1
+ {"date":1726748989}
@@ -1,4 +1,4 @@
1
- (function(G){typeof define=="function"&&define.amd?define(G):G()})(function(){"use strict";var jt,k,L,qr,t,Q;let G=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const js=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 as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=G.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Zr=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},Ti="sonic";typeof __SONIC_PREFIX__<"u"&&(Ti=__SONIC_PREFIX__);let Mi=Ti.replace(/-([a-z])/g,r=>r[1].toUpperCase());const ls=Mi.charAt(0).toUpperCase()+Mi.slice(1);function cs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Me(r){return typeof r=="object"&&r!=null}let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Fs=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let zs=(jt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.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_&&!T.changed){T.changed=!0,T.saveId++;const s=T.saveId;setTimeout(()=>T.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&&cs(this._value_)&&cs(t)&&this._value_.__value===t.__value)return!0;this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=cs(this._value_);if(this._parentKey_&&this.parent){const l=cs(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_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._proxies_.forEach((l,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(l.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(T.modifiedCollectore.length>0&&T.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),T=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Fs),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(Fs,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.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_"+G.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Ie(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+G.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Fs,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Wed Sep 18 2024 09:40:16 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[ls+"PublisherManager"]=r[ls+"PublisherManager"]||T}const Yr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Ie extends zs{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Yr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new Ie(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new Ie({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Gr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=zs.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(Ce+"-publisher-proxy",Gr)}catch{}let hs=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=G.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=T.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,b={publisher:f,onAssign:()=>{const v=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(v.length==1&&l.variables[0].join(".")==P.substring(1)){let D=v[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<v.length;D++){let p=v[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);hs.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=hs);let J=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=J.traverseDotNotation;/**
1
+ (function(G){typeof define=="function"&&define.amd?define(G):G()})(function(){"use strict";var jt,k,L,qr,t,Q;let G=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const js=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 as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=G.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Zr=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},Ti="sonic";typeof __SONIC_PREFIX__<"u"&&(Ti=__SONIC_PREFIX__);let Mi=Ti.replace(/-([a-z])/g,r=>r[1].toUpperCase());const ls=Mi.charAt(0).toUpperCase()+Mi.slice(1);function cs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Me(r){return typeof r=="object"&&r!=null}let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Fs=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let zs=(jt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.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_&&!T.changed){T.changed=!0,T.saveId++;const s=T.saveId;setTimeout(()=>T.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&&cs(this._value_)&&cs(t)&&this._value_.__value===t.__value)return!0;this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=cs(this._value_);if(this._parentKey_&&this.parent){const l=cs(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_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._proxies_.forEach((l,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(l.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(T.modifiedCollectore.length>0&&T.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),T=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Fs),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(Fs,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.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_"+G.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Ie(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+G.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Fs,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Thu Sep 19 2024 14:29:48 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[ls+"PublisherManager"]=r[ls+"PublisherManager"]||T}const Yr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Ie extends zs{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Yr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new Ie(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new Ie({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Gr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=zs.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(Ce+"-publisher-proxy",Gr)}catch{}let hs=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=G.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=T.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,b={publisher:f,onAssign:()=>{const v=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(v.length==1&&l.variables[0].join(".")==P.substring(1)){let D=v[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<v.length;D++){let p=v[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);hs.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=hs);let J=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=J.traverseDotNotation;/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -65,7 +65,7 @@
65
65
  Variable disponible dans la console<br>
66
66
  ctrl + Clique : épingler / désépingler
67
67
  </div>
68
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify((l=this.publisher)==null?void 0:l.get(),null," ")}</pre>`})}}removeDebugger(){ei.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),ei=new Set}getApiConfiguration(){return G.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of n)l.indexOf("wording_")==0&&We.callApi(this,l.substring(8));We.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return hs.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=T.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+e.instanceCounter),l){this.bindPublisher&&n.set(l,this.bindPublisher());let c=n.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=J.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},e.instanceCounter=0,e);return Rt([a({type:Number})],s.prototype,"collectDependenciesVersion",2),Rt([a({type:Boolean})],s.prototype,"displayContents",2),Rt([a({type:Boolean})],s.prototype,"noAutoFill",2),Rt([a({type:Boolean})],s.prototype,"forceAutoFill",2),Rt([a({type:Object})],s.prototype,"propertyMap",2),Rt([a({type:String,attribute:"data-title"})],s.prototype,"title",2),Rt([a({reflect:!0})],s.prototype,"dataProvider",2),Rt([a()],s.prototype,"bindPublisher",2),Rt([a()],s.prototype,"props",1),s};var Do=Object.defineProperty,ko=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&Do(t,s,e),e};const Ke=r=>{class t extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return ko([a({type:Array})],t.prototype,"templates"),t};var Lo=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,Z=(r,t,s,i)=>{for(var e=i>1?void 0:i?Eo(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&&Lo(t,s,e),e};const No="sonic-date";js(()=>z.updateComponentsLanguage());let z=class extends K(Ke(w)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.hide_hours=!1,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){z.dateCompnents.forEach(r=>r.pageLanguage=G.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.split("%s").map(s=>s.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=G.getLanguage(),z.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),z.dateCompnents.delete(this)}getDatesParts(r,t,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=as.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}render(){if(!this.renderIf||(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date))return C;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const s=this.start_date;this.start_date=this.end_date,this.end_date=s}const r={year:this.year,month:this.month,day:this.day,hour12:this.hour12};this.weekday!=="hidden"&&(r.weekday=this.weekday),this.hour!=="hidden"&&(r.hour=this.hour),this.minute!=="hidden"&&(r.minute=this.minute),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.start_date,this.end_date,r);return F(`${t.map(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};z.dateCompnents=new Set,Z([a()],z.prototype,"wording_billet_periode_validite",1),Z([a({type:Boolean})],z.prototype,"designMode",2),Z([a({type:String})],z.prototype,"time_zone",2),Z([a({type:Number})],z.prototype,"date",2),Z([a({type:String})],z.prototype,"date_string",2),Z([a({type:String})],z.prototype,"start_date_string",2),Z([a({type:String})],z.prototype,"end_date_string",2),Z([a({type:Number})],z.prototype,"start_date",2),Z([a({type:Boolean})],z.prototype,"hide_hours",2),Z([a({type:Number})],z.prototype,"end_date",2),Z([a({type:String})],z.prototype,"era",2),Z([a({type:String})],z.prototype,"year",2),Z([a({type:String})],z.prototype,"month",2),Z([a({type:String})],z.prototype,"day",2),Z([a({type:String})],z.prototype,"weekday",2),Z([a({type:String})],z.prototype,"hour",2),Z([a({type:Boolean})],z.prototype,"hour12",2),Z([a({type:String})],z.prototype,"minute",2),Z([a({type:String})],z.prototype,"language",2),Z([a({type:Boolean})],z.prototype,"renderIf",2),Z([a({type:Boolean})],z.prototype,"now",2),z=Z([_(No)],z);let rt=(Q=class{static listen(){var s;if(!Q.listening)return;const t=(s=document.location)==null?void 0:s.href.replace(document.location.origin,"");Q.prevURL&&Q.prevURL!=t&&(Q.prevURL=t,Q.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(Q.listen)}static offChange(t){const s=Q.listeners.indexOf(t);s!=-1&&(Q.listeners.splice(s,1),Q.listeners.length==0&&(Q.listening=!1))}static onChange(t){Q.listening||(Q.listening=!0,Q.listen()),Q.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,f=(s||d).toString(),b=i.indexOf("http")==0?new URL(i).origin!=d:!1,v=i=="",P=history.length<3,S=v&&P,D=f!=document.location.href;if(b&&D||S){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(f)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),l=[];let c="";for(const d of n)d!=c&&l.push(d),c=d;e="/"+l.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:n=o.href.indexOf(e.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},Q.listeners=[],Q.listening=!1,Q.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),Q);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify((l=this.publisher)==null?void 0:l.get(),null," ")}</pre>`})}}removeDebugger(){ei.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),ei=new Set}getApiConfiguration(){return G.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of n)l.indexOf("wording_")==0&&We.callApi(this,l.substring(8));We.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return hs.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=T.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+e.instanceCounter),l){this.bindPublisher&&n.set(l,this.bindPublisher());let c=n.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=J.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},e.instanceCounter=0,e);return Rt([a({type:Number})],s.prototype,"collectDependenciesVersion",2),Rt([a({type:Boolean})],s.prototype,"displayContents",2),Rt([a({type:Boolean})],s.prototype,"noAutoFill",2),Rt([a({type:Boolean})],s.prototype,"forceAutoFill",2),Rt([a({type:Object})],s.prototype,"propertyMap",2),Rt([a({type:String,attribute:"data-title"})],s.prototype,"title",2),Rt([a({reflect:!0})],s.prototype,"dataProvider",2),Rt([a()],s.prototype,"bindPublisher",2),Rt([a()],s.prototype,"props",1),s};var Do=Object.defineProperty,ko=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&Do(t,s,e),e};const Ke=r=>{class t extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return ko([a({type:Array})],t.prototype,"templates"),t};var Lo=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,Z=(r,t,s,i)=>{for(var e=i>1?void 0:i?Eo(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&&Lo(t,s,e),e};const No="sonic-date";js(()=>z.updateComponentsLanguage());let z=class extends K(Ke(w)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.hide_hours=!1,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){z.dateCompnents.forEach(r=>r.pageLanguage=G.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.split("%s").map(s=>s.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=G.getLanguage(),z.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),z.dateCompnents.delete(this)}getDatesParts(r,t,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=as.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}render(){if(!this.renderIf||(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date))return C;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const s=this.start_date;this.start_date=this.end_date,this.end_date=s}const r={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(r.weekday=this.weekday||"short"),this.hour!=="hidden"&&(r.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(r.minute=this.minute||"2-digit"),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.start_date,this.end_date,r);return F(`${t.map(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};z.dateCompnents=new Set,Z([a()],z.prototype,"wording_billet_periode_validite",1),Z([a({type:Boolean})],z.prototype,"designMode",2),Z([a({type:String})],z.prototype,"time_zone",2),Z([a({type:Number})],z.prototype,"date",2),Z([a({type:String})],z.prototype,"date_string",2),Z([a({type:String})],z.prototype,"start_date_string",2),Z([a({type:String})],z.prototype,"end_date_string",2),Z([a({type:Number})],z.prototype,"start_date",2),Z([a({type:Boolean})],z.prototype,"hide_hours",2),Z([a({type:Number})],z.prototype,"end_date",2),Z([a({type:String})],z.prototype,"era",2),Z([a({type:String})],z.prototype,"year",2),Z([a({type:String})],z.prototype,"month",2),Z([a({type:String})],z.prototype,"day",2),Z([a({type:String})],z.prototype,"weekday",2),Z([a({type:String})],z.prototype,"hour",2),Z([a({type:Boolean})],z.prototype,"hour12",2),Z([a({type:String})],z.prototype,"minute",2),Z([a({type:String})],z.prototype,"language",2),Z([a({type:Boolean})],z.prototype,"renderIf",2),Z([a({type:Boolean})],z.prototype,"now",2),z=Z([_(No)],z);let rt=(Q=class{static listen(){var s;if(!Q.listening)return;const t=(s=document.location)==null?void 0:s.href.replace(document.location.origin,"");Q.prevURL&&Q.prevURL!=t&&(Q.prevURL=t,Q.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(Q.listen)}static offChange(t){const s=Q.listeners.indexOf(t);s!=-1&&(Q.listeners.splice(s,1),Q.listeners.length==0&&(Q.listening=!1))}static onChange(t){Q.listening||(Q.listening=!0,Q.listen()),Q.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,f=(s||d).toString(),b=i.indexOf("http")==0?new URL(i).origin!=d:!1,v=i=="",P=history.length<3,S=v&&P,D=f!=document.location.href;if(b&&D||S){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(f)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),l=[];let c="";for(const d of n)d!=c&&l.push(d),c=d;e="/"+l.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:n=o.href.indexOf(e.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},Q.listeners=[],Q.listening=!1,Q.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),Q);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
@@ -2920,7 +2920,7 @@ ${this.value}</textarea
2920
2920
  line-height: var(--sc-headings-line-height);
2921
2921
  font-family: var(--sc-headings-font-family);
2922
2922
  }
2923
- `],$i=oc([_(nc)],$i);var ac=Object.defineProperty,lc=Object.getOwnPropertyDescriptor,tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?lc(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&&ac(t,s,e),e};const zr="sonic-modal";let j=class extends K(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(zr);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),vt.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){j.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){j.modals.splice(j.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:gr,out:fr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){var s;if(this.visible==!1)return C;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return g`<div
2923
+ `],$i=oc([_(nc)],$i);var ac=Object.defineProperty,lc=Object.getOwnPropertyDescriptor,tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?lc(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&&ac(t,s,e),e};const zr="sonic-modal";let j=class extends K(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(zr);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),vt.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){j.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){j.modals.splice(j.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:gr,out:fr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return C;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return g`<div
2924
2924
  class="modal-wrapper"
2925
2925
  style=${ut(t)}
2926
2926
  ${ws({out:fr})}
@@ -2933,7 +2933,7 @@ ${this.value}</textarea
2933
2933
  ${ws(this.animation)}
2934
2934
  >
2935
2935
  <div class="modal-content">
2936
- ${(s=this.options)!=null&&s.forceAction?C:g`<sonic-modal-close></sonic-modal-close>`}
2936
+ ${this.forceAction?C:g`<sonic-modal-close></sonic-modal-close>`}
2937
2937
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
2938
2938
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
2939
2939
 
@@ -2945,7 +2945,7 @@ ${this.value}</textarea
2945
2945
  class="overlay"
2946
2946
  @click="${this.forceAction?null:this.hide}"
2947
2947
  ${ws({keyframeOptions:{duration:500},in:gr,out:[{opacity:0,pointerEvents:"none"}]})}
2948
- ></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return C;let s;switch(t instanceof Object?s=t:s=F(t),r){case"title":return g`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return g`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return g`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return g`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return C}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&et.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove(),setTimeout(()=>{this.dispatchEvent(new CustomEvent("hidden")),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname)},480)}dispose(){this.hide(),this.remove()}static disposeAll(){j.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&j.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};j.styles=[Ge,$`
2948
+ ></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return C;let s;switch(t instanceof Object?s=t:s=F(t),r){case"title":return g`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return g`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return g`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return g`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return C}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&et.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){j.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&j.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};j.styles=[Ge,$`
2949
2949
  :host {
2950
2950
  --sc-modal-py: 2.5rem;
2951
2951
  --sc-modal-px: 1.5rem;
@@ -563,7 +563,7 @@ let T = (k = class {
563
563
  const h = await new Response(a.readable).arrayBuffer();
564
564
  return new TextDecoder().decode(h);
565
565
  }
566
- }, k.buildDate = "Wed Sep 18 2024 09:40:16 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);
566
+ }, k.buildDate = "Thu Sep 19 2024 14:29:48 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);
567
567
  if (typeof window < "u") {
568
568
  const r = window;
569
569
  r[gs + "PublisherManager"] = r[gs + "PublisherManager"] || T;
@@ -2512,12 +2512,12 @@ let R = class extends Z(Xe(w)) {
2512
2512
  this.start_date = this.end_date, this.end_date = s;
2513
2513
  }
2514
2514
  const r = {
2515
- year: this.year,
2516
- month: this.month,
2517
- day: this.day,
2518
- hour12: this.hour12
2515
+ year: this.year || "numeric",
2516
+ month: this.month || "short",
2517
+ day: this.day || "2-digit",
2518
+ hour12: this.hour12 || !1
2519
2519
  };
2520
- this.weekday !== "hidden" && (r.weekday = this.weekday), this.hour !== "hidden" && (r.hour = this.hour), this.minute !== "hidden" && (r.minute = this.minute), this.era && (r.era = this.era), this.time_zone && (r.timeZone = this.time_zone);
2520
+ this.weekday !== "hidden" && (r.weekday = this.weekday || "short"), this.hour !== "hidden" && (r.hour = this.hour || "2-digit"), this.minute !== "hidden" && (r.minute = this.minute || "2-digit"), this.era && (r.era = this.era), this.time_zone && (r.timeZone = this.time_zone);
2521
2521
  const t = this.getDatesParts(this.start_date, this.end_date, r);
2522
2522
  return z(
2523
2523
  `${t.map((s) => {
@@ -10358,7 +10358,6 @@ let I = class extends Z(w) {
10358
10358
  }), super.willUpdate(r);
10359
10359
  }
10360
10360
  render() {
10361
- var s;
10362
10361
  if (this.visible == !1)
10363
10362
  return C;
10364
10363
  const r = {
@@ -10391,7 +10390,7 @@ let I = class extends Z(w) {
10391
10390
  ${us(this.animation)}
10392
10391
  >
10393
10392
  <div class="modal-content">
10394
- ${(s = this.options) != null && s.forceAction ? C : g`<sonic-modal-close></sonic-modal-close>`}
10393
+ ${this.forceAction ? C : g`<sonic-modal-close></sonic-modal-close>`}
10395
10394
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
10396
10395
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
10397
10396
 
@@ -10438,8 +10437,8 @@ let I = class extends Z(w) {
10438
10437
  var r;
10439
10438
  this.visible = !1, (r = this.modalElement) == null || r.setAttribute("tabindex", "-1"), this.dispatchEvent(new CustomEvent("hide")), this.hasAttribute("resetDataProviderOnHide") && tt.get(this.getAttribute("resetDataProviderOnHide")).set(
10440
10439
  {}
10441
- ), this.removeOnHide && this.remove(), setTimeout(() => {
10442
- this.dispatchEvent(new CustomEvent("hidden")), this.removeHashOnHide && window.history.replaceState({}, "", window.location.pathname);
10440
+ ), setTimeout(() => {
10441
+ this.removeHashOnHide && window.history.replaceState({}, "", window.location.pathname), this.removeOnHide && this.remove(), this.dispatchEvent(new CustomEvent("hidden"));
10443
10442
  }, 480);
10444
10443
  }
10445
10444
  dispose() {
@@ -1,4 +1,4 @@
1
- (function(G){typeof define=="function"&&define.amd?define(G):G()})(function(){"use strict";var jt,k,L,qr,t,Q;let G=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const js=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 as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=G.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Zr=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},Ti="sonic";typeof __SONIC_PREFIX__<"u"&&(Ti=__SONIC_PREFIX__);let Mi=Ti.replace(/-([a-z])/g,r=>r[1].toUpperCase());const ls=Mi.charAt(0).toUpperCase()+Mi.slice(1);function cs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Me(r){return typeof r=="object"&&r!=null}let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Fs=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let zs=(jt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.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_&&!T.changed){T.changed=!0,T.saveId++;const s=T.saveId;setTimeout(()=>T.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&&cs(this._value_)&&cs(t)&&this._value_.__value===t.__value)return!0;this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=cs(this._value_);if(this._parentKey_&&this.parent){const l=cs(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_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._proxies_.forEach((l,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(l.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(T.modifiedCollectore.length>0&&T.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),T=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Fs),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(Fs,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.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_"+G.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Ie(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+G.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Fs,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Wed Sep 18 2024 09:40:16 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[ls+"PublisherManager"]=r[ls+"PublisherManager"]||T}const Yr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Ie extends zs{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Yr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new Ie(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new Ie({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Gr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=zs.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(Ce+"-publisher-proxy",Gr)}catch{}let hs=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=G.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=T.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,b={publisher:f,onAssign:()=>{const v=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(v.length==1&&l.variables[0].join(".")==P.substring(1)){let D=v[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<v.length;D++){let p=v[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);hs.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=hs);let J=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=J.traverseDotNotation;/**
1
+ (function(G){typeof define=="function"&&define.amd?define(G):G()})(function(){"use strict";var jt,k,L,qr,t,Q;let G=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}};const js=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 as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=G.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}},Zr=class{static async queueTaskPromise(){return new Promise(t=>{window.queueMicrotask(()=>t(null))})}static async delayPromise(t){return new Promise(s=>{setTimeout(s,t)})}},Ti="sonic";typeof __SONIC_PREFIX__<"u"&&(Ti=__SONIC_PREFIX__);let Mi=Ti.replace(/-([a-z])/g,r=>r[1].toUpperCase());const ls=Mi.charAt(0).toUpperCase()+Mi.slice(1);function cs(r){return Object.prototype.hasOwnProperty.call(r,"__value")}function Me(r){return typeof r=="object"&&r!=null}let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Fs=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let zs=(jt=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.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_&&!T.changed){T.changed=!0,T.saveId++;const s=T.saveId;setTimeout(()=>T.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&&cs(this._value_)&&cs(t)&&this._value_.__value===t.__value)return!0;this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=cs(this._value_);if(this._parentKey_&&this.parent){const l=cs(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_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._proxies_.forEach((l,c)=>{const h=this._value_[c];c!="_parent_"&&h===void 0&&h!==null&&isNaN(Number(c))&&(l.set(null),this._publishDynamicFilling_(c,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(T.modifiedCollectore.length>0&&T.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),T=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Fs),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(Fs,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.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_"+G.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new Ie(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+G.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Fs,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Thu Sep 19 2024 14:29:48 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[ls+"PublisherManager"]=r[ls+"PublisherManager"]||T}const Yr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Ie extends zs{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Yr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new Ie(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new Ie({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Gr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=zs.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(Ce+"-publisher-proxy",Gr)}catch{}let hs=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=G.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=T.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,b={publisher:f,onAssign:()=>{const v=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(v.length==1&&l.variables[0].join(".")==P.substring(1)){let D=v[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<v.length;D++){let p=v[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);hs.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=hs);let J=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=J.traverseDotNotation;/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -65,7 +65,7 @@
65
65
  Variable disponible dans la console<br>
66
66
  ctrl + Clique : épingler / désépingler
67
67
  </div>
68
- <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify((l=this.publisher)==null?void 0:l.get(),null," ")}</pre>`})}}removeDebugger(){ei.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),ei=new Set}getApiConfiguration(){return G.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of n)l.indexOf("wording_")==0&&We.callApi(this,l.substring(8));We.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return hs.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=T.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+e.instanceCounter),l){this.bindPublisher&&n.set(l,this.bindPublisher());let c=n.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=J.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},e.instanceCounter=0,e);return Rt([a({type:Number})],s.prototype,"collectDependenciesVersion",2),Rt([a({type:Boolean})],s.prototype,"displayContents",2),Rt([a({type:Boolean})],s.prototype,"noAutoFill",2),Rt([a({type:Boolean})],s.prototype,"forceAutoFill",2),Rt([a({type:Object})],s.prototype,"propertyMap",2),Rt([a({type:String,attribute:"data-title"})],s.prototype,"title",2),Rt([a({reflect:!0})],s.prototype,"dataProvider",2),Rt([a()],s.prototype,"bindPublisher",2),Rt([a()],s.prototype,"props",1),s};var Do=Object.defineProperty,ko=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&Do(t,s,e),e};const Ke=r=>{class t extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return ko([a({type:Array})],t.prototype,"templates"),t};var Lo=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,Z=(r,t,s,i)=>{for(var e=i>1?void 0:i?Eo(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&&Lo(t,s,e),e};const No="sonic-date";js(()=>z.updateComponentsLanguage());let z=class extends K(Ke(w)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.hide_hours=!1,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){z.dateCompnents.forEach(r=>r.pageLanguage=G.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.split("%s").map(s=>s.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=G.getLanguage(),z.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),z.dateCompnents.delete(this)}getDatesParts(r,t,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=as.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}render(){if(!this.renderIf||(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date))return C;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const s=this.start_date;this.start_date=this.end_date,this.end_date=s}const r={year:this.year,month:this.month,day:this.day,hour12:this.hour12};this.weekday!=="hidden"&&(r.weekday=this.weekday),this.hour!=="hidden"&&(r.hour=this.hour),this.minute!=="hidden"&&(r.minute=this.minute),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.start_date,this.end_date,r);return F(`${t.map(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};z.dateCompnents=new Set,Z([a()],z.prototype,"wording_billet_periode_validite",1),Z([a({type:Boolean})],z.prototype,"designMode",2),Z([a({type:String})],z.prototype,"time_zone",2),Z([a({type:Number})],z.prototype,"date",2),Z([a({type:String})],z.prototype,"date_string",2),Z([a({type:String})],z.prototype,"start_date_string",2),Z([a({type:String})],z.prototype,"end_date_string",2),Z([a({type:Number})],z.prototype,"start_date",2),Z([a({type:Boolean})],z.prototype,"hide_hours",2),Z([a({type:Number})],z.prototype,"end_date",2),Z([a({type:String})],z.prototype,"era",2),Z([a({type:String})],z.prototype,"year",2),Z([a({type:String})],z.prototype,"month",2),Z([a({type:String})],z.prototype,"day",2),Z([a({type:String})],z.prototype,"weekday",2),Z([a({type:String})],z.prototype,"hour",2),Z([a({type:Boolean})],z.prototype,"hour12",2),Z([a({type:String})],z.prototype,"minute",2),Z([a({type:String})],z.prototype,"language",2),Z([a({type:Boolean})],z.prototype,"renderIf",2),Z([a({type:Boolean})],z.prototype,"now",2),z=Z([_(No)],z);let rt=(Q=class{static listen(){var s;if(!Q.listening)return;const t=(s=document.location)==null?void 0:s.href.replace(document.location.origin,"");Q.prevURL&&Q.prevURL!=t&&(Q.prevURL=t,Q.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(Q.listen)}static offChange(t){const s=Q.listeners.indexOf(t);s!=-1&&(Q.listeners.splice(s,1),Q.listeners.length==0&&(Q.listening=!1))}static onChange(t){Q.listening||(Q.listening=!0,Q.listen()),Q.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,f=(s||d).toString(),b=i.indexOf("http")==0?new URL(i).origin!=d:!1,v=i=="",P=history.length<3,S=v&&P,D=f!=document.location.href;if(b&&D||S){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(f)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),l=[];let c="";for(const d of n)d!=c&&l.push(d),c=d;e="/"+l.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:n=o.href.indexOf(e.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},Q.listeners=[],Q.listening=!1,Q.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),Q);/**
68
+ <pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify((l=this.publisher)==null?void 0:l.get(),null," ")}</pre>`})}}removeDebugger(){ei.forEach(n=>{document.body.contains(n)&&document.body.removeChild(n)}),ei=new Set}getApiConfiguration(){return G.getApiConfiguration(this)}async initWording(){const n=Object.getOwnPropertyNames(this.constructor.prototype);for(const l of n)l.indexOf("wording_")==0&&We.callApi(this,l.substring(8));We.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const n=super.createRenderRoot();return hs.observe(n),n}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const n=T.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let l=this.dataProvider;if(!l&&this._props&&(this.dataProvider=l="__subscriber__"+e.instanceCounter),l){this.bindPublisher&&n.set(l,this.bindPublisher());let c=n.get(l,{localStorageMode:this.getAttribute("localStorage")||"disabled"});if(this.dataProvider=l,this.hasAttribute("subDataProvider")){const h=this.getAttribute("subDataProvider");this.dataProvider=l+"/"+h,c=J.traverse(c,h.split(".")),n.set(this.dataProvider,c),this.publisher=c}this.publisher=c}this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},e.instanceCounter=0,e);return Rt([a({type:Number})],s.prototype,"collectDependenciesVersion",2),Rt([a({type:Boolean})],s.prototype,"displayContents",2),Rt([a({type:Boolean})],s.prototype,"noAutoFill",2),Rt([a({type:Boolean})],s.prototype,"forceAutoFill",2),Rt([a({type:Object})],s.prototype,"propertyMap",2),Rt([a({type:String,attribute:"data-title"})],s.prototype,"title",2),Rt([a({reflect:!0})],s.prototype,"dataProvider",2),Rt([a()],s.prototype,"bindPublisher",2),Rt([a()],s.prototype,"props",1),s};var Do=Object.defineProperty,ko=(r,t,s,i)=>{for(var e=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=n(t,s,e)||e);return e&&Do(t,s,e),e};const Ke=r=>{class t extends r{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const e of i)e.hasAttribute(this.templateValueAttribute)&&(this.templateParts[e.getAttribute(this.templateValueAttribute)]=e,this.templatePartsList.push(e)),e.hasAttribute("skeleton")&&(this.templateParts.skeleton=e),e.hasAttribute("no-result")&&(this.templateParts["no-result"]=e),e.hasAttribute("no-item")&&(this.templateParts["no-item"]=e);this.templateList=i.filter(e=>!e.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return ko([a({type:Array})],t.prototype,"templates"),t};var Lo=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,Z=(r,t,s,i)=>{for(var e=i>1?void 0:i?Eo(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&&Lo(t,s,e),e};const No="sonic-date";js(()=>z.updateComponentsLanguage());let z=class extends K(Ke(w)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.hide_hours=!1,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){z.dateCompnents.forEach(r=>r.pageLanguage=G.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(r){var t;r||(r="Du %s au %s"),this._wording_billet_periode_validite=r,this.duAu=(t=this.wording_billet_periode_validite)==null?void 0:t.split("%s").map(s=>s.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=G.getLanguage(),z.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),z.dateCompnents.delete(this)}getDatesParts(r,t,s){const i=this.startDateObject;i.setTime(r*1e3);let e=[];if(t>0){const o=this.endDateObject;o.setTime(t*1e3);const n=i.toDateString()==o.toDateString();if((!n||this.hide_hours)&&(delete s.hour,delete s.minute),e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,o),!n){const c=e.find(h=>h.type=="literal"&&h.source=="shared"&&h.value.trim().length>0);c&&(c.value=" "+this.duAu[1]+" ",c.type="to"),this.designMode||e.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else e=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&e.forEach(o=>o.value=o.value.replace(/,/g," ")),e[0].value=as.ucFirst(e[0].value),e.filter(o=>o.hidden!==!0)}dateStringToSeconds(r){return new Date(r).getTime()/1e3}render(){if(!this.renderIf||(this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),!this.start_date&&!this.now&&!this.end_date))return C;if(this.start_date||(this.start_date=Date.now()/1e3),this.end_date>0&&this.end_date<this.start_date){const s=this.start_date;this.start_date=this.end_date,this.end_date=s}const r={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(r.weekday=this.weekday||"short"),this.hour!=="hidden"&&(r.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(r.minute=this.minute||"2-digit"),this.era&&(r.era=this.era),this.time_zone&&(r.timeZone=this.time_zone);const t=this.getDatesParts(this.start_date,this.end_date,r);return F(`${t.map(s=>{const i=this.templateParts[s.type];if(i){const n=document.importNode(i.content,!0).children[0];return n.innerText.trim()==""&&(n.innerText=s.value),n.outerHTML}const e=document.createElement("span");return e.innerText=s.value,e.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};z.dateCompnents=new Set,Z([a()],z.prototype,"wording_billet_periode_validite",1),Z([a({type:Boolean})],z.prototype,"designMode",2),Z([a({type:String})],z.prototype,"time_zone",2),Z([a({type:Number})],z.prototype,"date",2),Z([a({type:String})],z.prototype,"date_string",2),Z([a({type:String})],z.prototype,"start_date_string",2),Z([a({type:String})],z.prototype,"end_date_string",2),Z([a({type:Number})],z.prototype,"start_date",2),Z([a({type:Boolean})],z.prototype,"hide_hours",2),Z([a({type:Number})],z.prototype,"end_date",2),Z([a({type:String})],z.prototype,"era",2),Z([a({type:String})],z.prototype,"year",2),Z([a({type:String})],z.prototype,"month",2),Z([a({type:String})],z.prototype,"day",2),Z([a({type:String})],z.prototype,"weekday",2),Z([a({type:String})],z.prototype,"hour",2),Z([a({type:Boolean})],z.prototype,"hour12",2),Z([a({type:String})],z.prototype,"minute",2),Z([a({type:String})],z.prototype,"language",2),Z([a({type:Boolean})],z.prototype,"renderIf",2),Z([a({type:Boolean})],z.prototype,"now",2),z=Z([_(No)],z);let rt=(Q=class{static listen(){var s;if(!Q.listening)return;const t=(s=document.location)==null?void 0:s.href.replace(document.location.origin,"");Q.prevURL&&Q.prevURL!=t&&(Q.prevURL=t,Q.listeners.forEach(i=>{i.location=t})),window.requestAnimationFrame(Q.listen)}static offChange(t){const s=Q.listeners.indexOf(t);s!=-1&&(Q.listeners.splice(s,1),Q.listeners.length==0&&(Q.listening=!1))}static onChange(t){Q.listening||(Q.listening=!0,Q.listen()),Q.listeners.push(t),t.location=this.prevURL}static changeFromComponent(t){var h;const s=t.goBack,i=document.referrer;if(s!=null){const d=document.location.origin,f=(s||d).toString(),b=i.indexOf("http")==0?new URL(i).origin!=d:!1,v=i=="",P=history.length<3,S=v&&P,D=f!=document.location.href;if(b&&D||S){const u=history.state||{};u.concorde=u.concorde||{},u.concorde.hasDoneHistoryBack=!0,history.pushState(u,document.title),history.back(),document.location.replace(f)}else history.back();return}let e=t.getAttribute("to")||"";if(e||(e=((h=t.href)==null?void 0:h.toString())||""),!e)return;if(e.indexOf("#")==0){document.location.hash=e.substring(1);return}const o=new URL(e,document.location.href),n=o.pathname.split("/"),l=[];let c="";for(const d of n)d!=c&&l.push(d),c=d;e="/"+l.join("/")+o.search+(o.hash?+o.hash:""),t.hasAttribute("pushState")?history.pushState(null,"",e):t.hasAttribute("replaceState")?history.replaceState(null,"",e):document.location.href=e}static updateComponentActiveState(t){var i;if(t.autoActive=="disabled")return;const s=((i=t.href)==null?void 0:i.toString())||"";if(t.href&&s.indexOf("http")!=0){const e=new URL(s,document.location.href),o=new URL(t.location||"",document.location.origin);let n=!1;t.autoActive=="strict"?n=e.pathname==o.pathname&&e.hash==o.hash&&e.search==o.search:n=o.href.indexOf(e.href)==0,n?t.setAttribute("active","true"):t.removeAttribute("active")}}},Q.listeners=[],Q.listening=!1,Q.prevURL=(t=document.location)==null?void 0:t.href.replace(document.location.origin,""),Q);/**
69
69
  * @license
70
70
  * Copyright 2018 Google LLC
71
71
  * SPDX-License-Identifier: BSD-3-Clause
@@ -2920,7 +2920,7 @@ ${this.value}</textarea
2920
2920
  line-height: var(--sc-headings-line-height);
2921
2921
  font-family: var(--sc-headings-font-family);
2922
2922
  }
2923
- `],$i=oc([_(nc)],$i);var ac=Object.defineProperty,lc=Object.getOwnPropertyDescriptor,tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?lc(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&&ac(t,s,e),e};const zr="sonic-modal";let j=class extends K(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(zr);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),vt.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){j.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){j.modals.splice(j.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:gr,out:fr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){var s;if(this.visible==!1)return C;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return g`<div
2923
+ `],$i=oc([_(nc)],$i);var ac=Object.defineProperty,lc=Object.getOwnPropertyDescriptor,tt=(r,t,s,i)=>{for(var e=i>1?void 0:i?lc(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&&ac(t,s,e),e};const zr="sonic-modal";let j=class extends K(w){constructor(){super(...arguments),this.forceAction=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.padding="var(--sc-modal-py) var(--sc-modal-px)",this.maxWidth="var(--sc-modal-max-w) ",this.maxHeight="var(--sc-modal-max-h) ",this.width="100%",this.height="auto",this.zIndex="var(--sc-modal-z-index)",this.fullScreen=!1,this.visible=!1}static create(r){const t=document.createElement(zr);return t.options=r,r.removeHashOnHide===!0&&t.setAttribute("removeHashOnHide","true"),r.removeOnHide===!0&&t.setAttribute("removeOnHide","true"),r.maxWidth&&(t.maxWidth=r==null?void 0:r.maxWidth),r.width&&(t.width=r==null?void 0:r.width),r.maxHeight&&(t.maxHeight=r==null?void 0:r.maxHeight),r.height&&(t.height=r==null?void 0:r.height),r.forceAction&&(t.forceAction=!0),r.fullScreen&&(t.fullScreen=r==null?void 0:r.fullScreen),r.effect&&(t.effect=r==null?void 0:r.effect),r.paddingX&&t.style.setProperty("--sc-modal-px",r==null?void 0:r.paddingX),r.paddingY&&t.style.setProperty("--sc-modal-py",r==null?void 0:r.paddingY),r.zIndex&&t.style.setProperty("--sc-modal-z-index",r==null?void 0:r.zIndex),vt.getPopContainer().appendChild(t),t.show(),t}connectedCallback(){j.modals.push(this),super.connectedCallback(),this.handleFullsceen()}disconnectedCallback(){j.modals.splice(j.modals.indexOf(this),1),super.disconnectedCallback()}updated(){const r=this;document.addEventListener("keydown",this.handleEscape),r.closeBtn.forEach(t=>{t.addEventListener("click",function(){r.hide()},{once:!0})})}willUpdate(r){r.has("fullScreen")&&this.handleFullsceen(),r.has("effect")&&(this.effect=="fade"?this.animation={keyframeOptions:{duration:400},in:gr,out:fr}:this.effect=="none"?this.animation=void 0:this.animation={keyframeOptions:{duration:400,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(25%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"translateY(20%) scale(1)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}]}),super.willUpdate(r)}render(){if(this.visible==!1)return C;const r={padding:this.padding,maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,zIndex:this.zIndex,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"},t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,borderRadius:this.fullScreen?"0":"var(--sc-modal-rounded)"};return g`<div
2924
2924
  class="modal-wrapper"
2925
2925
  style=${ut(t)}
2926
2926
  ${ws({out:fr})}
@@ -2933,7 +2933,7 @@ ${this.value}</textarea
2933
2933
  ${ws(this.animation)}
2934
2934
  >
2935
2935
  <div class="modal-content">
2936
- ${(s=this.options)!=null&&s.forceAction?C:g`<sonic-modal-close></sonic-modal-close>`}
2936
+ ${this.forceAction?C:g`<sonic-modal-close></sonic-modal-close>`}
2937
2937
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
2938
2938
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
2939
2939
 
@@ -2945,7 +2945,7 @@ ${this.value}</textarea
2945
2945
  class="overlay"
2946
2946
  @click="${this.forceAction?null:this.hide}"
2947
2947
  ${ws({keyframeOptions:{duration:500},in:gr,out:[{opacity:0,pointerEvents:"none"}]})}
2948
- ></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return C;let s;switch(t instanceof Object?s=t:s=F(t),r){case"title":return g`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return g`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return g`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return g`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return C}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&et.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeOnHide&&this.remove(),setTimeout(()=>{this.dispatchEvent(new CustomEvent("hidden")),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname)},480)}dispose(){this.hide(),this.remove()}static disposeAll(){j.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&j.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};j.styles=[Ge,$`
2948
+ ></div>`}modalFragment(r){var i;const t=(i=this.options)==null?void 0:i[r];if(!t)return C;let s;switch(t instanceof Object?s=t:s=F(t),r){case"title":return g`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return g`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return g`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return g`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return C}}show(){var r,t;this.visible=!0,(r=this.modalElement)==null||r.setAttribute("tabindex","0"),(t=this.modalElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("show"))}hide(){var r;this.visible=!1,(r=this.modalElement)==null||r.setAttribute("tabindex","-1"),this.dispatchEvent(new CustomEvent("hide")),this.hasAttribute("resetDataProviderOnHide")&&et.get(this.getAttribute("resetDataProviderOnHide")).set({}),setTimeout(()=>{this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))},480)}dispose(){this.hide(),this.remove()}static disposeAll(){j.modals.forEach(r=>{r.dispose()})}handleEscape(r){r.key==="Escape"&&j.modals.forEach(t=>{t.forceAction||t.hide()})}handleFullsceen(){this.fullScreen&&(this.width="100%",this.height="100%",this.maxWidth="none",this.maxHeight="none")}};j.styles=[Ge,$`
2949
2949
  :host {
2950
2950
  --sc-modal-py: 2.5rem;
2951
2951
  --sc-modal-px: 1.5rem;
@@ -563,7 +563,7 @@ let T = (k = class {
563
563
  const h = await new Response(a.readable).arrayBuffer();
564
564
  return new TextDecoder().decode(h);
565
565
  }
566
- }, k.buildDate = "Wed Sep 18 2024 09:40:16 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);
566
+ }, k.buildDate = "Thu Sep 19 2024 14:29:48 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);
567
567
  if (typeof window < "u") {
568
568
  const r = window;
569
569
  r[gs + "PublisherManager"] = r[gs + "PublisherManager"] || T;
@@ -2512,12 +2512,12 @@ let R = class extends Z(Xe(w)) {
2512
2512
  this.start_date = this.end_date, this.end_date = s;
2513
2513
  }
2514
2514
  const r = {
2515
- year: this.year,
2516
- month: this.month,
2517
- day: this.day,
2518
- hour12: this.hour12
2515
+ year: this.year || "numeric",
2516
+ month: this.month || "short",
2517
+ day: this.day || "2-digit",
2518
+ hour12: this.hour12 || !1
2519
2519
  };
2520
- this.weekday !== "hidden" && (r.weekday = this.weekday), this.hour !== "hidden" && (r.hour = this.hour), this.minute !== "hidden" && (r.minute = this.minute), this.era && (r.era = this.era), this.time_zone && (r.timeZone = this.time_zone);
2520
+ this.weekday !== "hidden" && (r.weekday = this.weekday || "short"), this.hour !== "hidden" && (r.hour = this.hour || "2-digit"), this.minute !== "hidden" && (r.minute = this.minute || "2-digit"), this.era && (r.era = this.era), this.time_zone && (r.timeZone = this.time_zone);
2521
2521
  const t = this.getDatesParts(this.start_date, this.end_date, r);
2522
2522
  return z(
2523
2523
  `${t.map((s) => {
@@ -10358,7 +10358,6 @@ let I = class extends Z(w) {
10358
10358
  }), super.willUpdate(r);
10359
10359
  }
10360
10360
  render() {
10361
- var s;
10362
10361
  if (this.visible == !1)
10363
10362
  return C;
10364
10363
  const r = {
@@ -10391,7 +10390,7 @@ let I = class extends Z(w) {
10391
10390
  ${us(this.animation)}
10392
10391
  >
10393
10392
  <div class="modal-content">
10394
- ${(s = this.options) != null && s.forceAction ? C : g`<sonic-modal-close></sonic-modal-close>`}
10393
+ ${this.forceAction ? C : g`<sonic-modal-close></sonic-modal-close>`}
10395
10394
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
10396
10395
  ${this.modalFragment("content")} ${this.modalFragment("actions")}
10397
10396
 
@@ -10438,8 +10437,8 @@ let I = class extends Z(w) {
10438
10437
  var r;
10439
10438
  this.visible = !1, (r = this.modalElement) == null || r.setAttribute("tabindex", "-1"), this.dispatchEvent(new CustomEvent("hide")), this.hasAttribute("resetDataProviderOnHide") && tt.get(this.getAttribute("resetDataProviderOnHide")).set(
10440
10439
  {}
10441
- ), this.removeOnHide && this.remove(), setTimeout(() => {
10442
- this.dispatchEvent(new CustomEvent("hidden")), this.removeHashOnHide && window.history.replaceState({}, "", window.location.pathname);
10440
+ ), setTimeout(() => {
10441
+ this.removeHashOnHide && window.history.replaceState({}, "", window.location.pathname), this.removeOnHide && this.remove(), this.dispatchEvent(new CustomEvent("hidden"));
10443
10442
  }, 480);
10444
10443
  }
10445
10444
  dispose() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "3.1.31",
3
+ "version": "3.1.33",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "",
@@ -180,15 +180,15 @@ export class SonicDate extends Subscriber(TemplatesContainer(LitElement)) {
180
180
  * gestion des options d'affichage des dates
181
181
  * */
182
182
  const options: Intl.DateTimeFormatOptions = {
183
- year: this.year,
184
- month: this.month,
185
- day: this.day,
186
- hour12: this.hour12,
183
+ year: this.year || "numeric",
184
+ month: this.month || "short",
185
+ day: this.day || "2-digit",
186
+ hour12: this.hour12 || false,
187
187
  };
188
188
 
189
- if (this.weekday !== "hidden") options.weekday = this.weekday;
190
- if (this.hour !== "hidden") options.hour = this.hour;
191
- if (this.minute !== "hidden") options.minute = this.minute;
189
+ if (this.weekday !== "hidden") options.weekday = this.weekday || "short"; ;
190
+ if (this.hour !== "hidden") options.hour = this.hour || "2-digit"; ;
191
+ if (this.minute !== "hidden") options.minute = this.minute || "2-digit"; ;
192
192
  if (this.era) options.era = this.era;
193
193
  if (this.time_zone) options.timeZone = this.time_zone;
194
194
 
@@ -331,7 +331,7 @@ export class Modal extends Subscriber(LitElement) {
331
331
  ${animate(this.animation)}
332
332
  >
333
333
  <div class="modal-content">
334
- ${!this.options?.forceAction
334
+ ${!this.forceAction
335
335
  ? html`<sonic-modal-close></sonic-modal-close>`
336
336
  : nothing}
337
337
  ${this.modalFragment("title")} ${this.modalFragment("subtitle")}
@@ -397,14 +397,15 @@ export class Modal extends Subscriber(LitElement) {
397
397
  {}
398
398
  );
399
399
  }
400
- if (this.removeOnHide) {
401
- this.remove();
402
- }
400
+
403
401
  setTimeout(() => {
404
- this.dispatchEvent(new CustomEvent("hidden"));
405
402
  if (this.removeHashOnHide) {
406
403
  window.history.replaceState({}, "", window.location.pathname);
407
404
  }
405
+ if (this.removeOnHide) {
406
+ this.remove();
407
+ }
408
+ this.dispatchEvent(new CustomEvent("hidden"));
408
409
  }, 480);
409
410
  }
410
411