@supersoniks/concorde 4.9.98-visual-stack.3 → 4.9.98-visual-stack.4
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 +1 -1
- package/concorde-3d.bundle.js +1 -1
- package/concorde-3d.es.js +1 -1
- package/concorde-core.bundle.js +2 -2
- package/concorde-core.es.js +7 -2
- package/concorde-hugging-face-infer.bundle.js +1 -1
- package/concorde-hugging-face-infer.es.js +1 -1
- package/concorde-interactive.bundle.js +38 -43
- package/concorde-interactive.es.js +157 -146
- package/concorde-shader.bundle.js +1 -1
- package/concorde-shader.es.js +1 -1
- package/concorde-webgpu.bundle.js +1 -1
- package/concorde-webgpu.es.js +1 -1
- package/dist/concorde-3d.bundle.js +1 -1
- package/dist/concorde-3d.es.js +1 -1
- package/dist/concorde-core.bundle.js +2 -2
- package/dist/concorde-core.es.js +7 -2
- package/dist/concorde-hugging-face-infer.bundle.js +1 -1
- package/dist/concorde-hugging-face-infer.es.js +1 -1
- package/dist/concorde-interactive.bundle.js +38 -43
- package/dist/concorde-interactive.es.js +157 -146
- package/dist/concorde-shader.bundle.js +1 -1
- package/dist/concorde-shader.es.js +1 -1
- package/dist/concorde-webgpu.bundle.js +1 -1
- package/dist/concorde-webgpu.es.js +1 -1
- package/dist/js/core/components/functional/interactive/gesture.js +19 -6
- package/dist/js/core/components/functional/interactive/gesture.js.map +1 -1
- package/dist/js/core/components/functional/interactive/store.js +11 -3
- package/dist/js/core/components/functional/interactive/store.js.map +1 -1
- package/dist/js/core/mixins/Subscriber.js +6 -1
- package/dist/js/core/mixins/Subscriber.js.map +1 -1
- package/dist/types/core/components/functional/interactive/gesture.d.ts +2 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -1
- package/dist/types/core/components/functional/interactive/store.d.ts +2 -0
- package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -1
- package/dist/types/core/mixins/Subscriber.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/core/components/functional/interactive/gesture.ts +20 -6
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function hi(n){return X({...n,state:!0,attribute:!1})}const _r="1";function di(n){const e=n.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let at=class Ge{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const r=t.indexOf("=");return e[t.substring(0,r).trim()]=t.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let r=e;for(;r;){if(!t(r))return;r=r.parentNode||r.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(Ge.overflowMatches(i,t))return r}r=Ge.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return Ge.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ge.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const r of Ge.scopeAttributeNames(t))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const u=Ge.readScopeAttributeOnElement(r,t);if(u!=null)return u}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const t=Ge.getAncestorAttributeValue(e,"token"),r=Ge.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=Ge.getAncestorAttributeValue(e,"serviceURL");let u=null,o=null;const h=Ge.getAncestorAttributeValue(e,"tokenProvider"),b=Ge.getAncestorAttributeValue(e,"eventsApiToken");t||(u=Ge.getAncestorAttributeValue(e,"userName"),o=Ge.getAncestorAttributeValue(e,"password"));const T=Ge.getAncestorAttributeValue(e,"credentials")||void 0,M=e.getAttribute("cache"),S=e.hasAttribute("blockUntilDone"),w=e.hasAttribute("keepAlive");return{serviceURL:i,token:t,userName:u,password:o,authToken:b,tokenProvider:h,addHTTPResponse:r,credentials:T,cache:M,blockUntilDone:S,keepAlive:w}}static getClosestElement(e,t){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===t);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return Ge.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const r=new Set(t.map(o=>o.toLowerCase())),i=[];let u=e.parentNode||e.host;for(;u;)u instanceof Element&&r.has(u.tagName.toLowerCase())&&i.push(u),u=u.parentNode||u.host;return i}static getAncestorsBySelectors(e,t){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const u of t)try{if(i.matches(u)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!di(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(u=>u.src===t);if(r)return r.dataset.concordeLoaded===_r?!0:new Promise(u=>{let o=!1;const h=T=>{o||(o=!0,T&&(r.dataset.concordeLoaded=_r),u(T))};r.addEventListener("load",()=>h(!0),{once:!0}),r.addEventListener("error",()=>h(!1),{once:!0});const b=r.readyState;if(b==="complete"||b==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||h(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(u=>{const o=document.createElement("script");o.src=e,i&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded=_r,u(!0)},o.onerror=()=>u(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(t=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>t(!0),r.onerror=()=>t(!0),document.head.appendChild(r)})}};function an(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.getFrameCanvas=="function"&&typeof e.frameSeq=="number"}function on(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.registerFrameConsumer=="function"&&typeof e.unregisterFrameConsumer=="function"}class pi{constructor(){this.tokens=new Map}sync(e){const t=new Set;for(const r of e)r&&on(r)&&t.add(r);for(const[r,i]of[...this.tokens])t.has(r)||(on(r)&&r.unregisterFrameConsumer(i),this.tokens.delete(r));for(const r of t){if(this.tokens.has(r))continue;const i={};r.registerFrameConsumer(i),this.tokens.set(r,i)}}clear(){this.sync([])}}const un="#__sonic_frame_";let mi=0;const Ar=new Map,cn=new WeakMap;function gi(n){const e=cn.get(n);if(e)return e;const t=`${un}${++mi}`;return Ar.set(t,n),cn.set(n,t),t}function vi(n){if(!n.startsWith(un))return null;const e=Ar.get(n)??null;return e&&!e.isConnected?(Ar.delete(n),null):e}function bi(n){if(n==null)return null;if(typeof n=="string"){const e=n.trim();return e?e.startsWith("#")?e:`#${e}`:null}return typeof Element<"u"&&n instanceof Element?n.id?`#${n.id}`:gi(n):null}function xr(n){return typeof n!="string"?null:n.trim()||null}function yi(n){if(n==null||n==="")return null;if(typeof n=="string")return xr(n);if(typeof n!="object")return null;const e=n;return xr(e.url)??xr(e.blobUrl)}function It(n){for(const e of n)try{URL.revokeObjectURL(e)}catch{}}let wi=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},ln="sonic";typeof __SONIC_PREFIX__<"u"&&(ln=__SONIC_PREFIX__);let fn=ln.replace(/-([a-z])/g,n=>n[1].toUpperCase());const Ei=fn.charAt(0).toUpperCase()+fn.slice(1);let _i=class Et{static areEqual(e,t){return e.length===t.length?e.every((r,i)=>r===t[i]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(r=>t=t.concat(r)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const r=(e[0]||{})[t];return e.every(i=>(i||{})[t]==r)}})})}),value:()=>({forKey:t=>Et.from(e.map(r=>r[t]))}),copy:()=>({fromKey:t=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[t])?[...i[t]]:typeof i[t]=="object"&&i[t]!=null?{...i[t]}:i[t]})}})})}),map:t=>Et.from(e.map(t)),filter:t=>Et.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const r=[],i=new Map;for(const u of e){const o=u[t];if(!i.has(o)){const h=r.length;i.set(o,h);const b={items:[]};b[t]=o,r.push(b)}r[i.get(o)].items.push(u)}return Et.from(r)}}),without:()=>({duplicates:()=>({forKey:t=>{const r=[...new Set(e.map(i=>i[t]))];return Et.from(r.map(i=>e.find(u=>u[t]==i)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:r=>{const i=(u,o)=>h=>u[o]!=h[o];return Et.from(e.filter(u=>t.every(i(u,r))))}})})})}}},Sr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",r="long"){t||(t=at.getLanguage());const i=(T,M)=>[Math.floor(T/M),T%M];function u(T,M,S){return new Intl.NumberFormat(T,{style:"unit",unit:M,unitDisplay:S}).format}const[o,h]=i(e,60),b=[];return o&&b.push(u(t,"hour",r)(o)),h&&b.push(u(t,"minute",r)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(b)}static js(e){try{return Function("return "+e)()}catch{return""}}};class hn{constructor(e){this.path=e}toString(){return this.path}}function dn(n){return new Proxy(n,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const r=e.path?`${e.path}.${String(t)}`:String(t);return dn(new hn(r))}})}const Ai=/\$\{|\{\$/;function xi(n){return Ai.test(n)}function Si(n){const e=n;if(xi(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Qt=function(n){return this instanceof Qt?dn(new hn(n)):new Qt(n)};let er=class ct{static shallowEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const o of i){const h=e[o],b=t[o];if(r?h!==b:h!=b)return!1}return!0}static deepEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const o of i){const h=e[o],b=t[o],T=ct.isObject(h)&&ct.isObject(b),M=r?h!==b:h!=b;if(T&&!ct.deepEqual(h,b)||!T&&M)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ct.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,r=!1){for(const i of t){const u=e[i];if(u===void 0)return;r&&ct.isObject(u)?e=Object.assign(Array.isArray(u)?[]:{},e,u):e=e[i]}return e}static traverseDotNotation(e,t,r=!1){return ct.traverse(e,t.split("."),r)}static getURLSearchArray(e,t=""){let r=[];for(let i in e){const u=e[i];t&&(i=t+"["+i+"]"),ct.isObject(u)?r=[...r,...this.getURLSearchArray(u,i)]:r.push(`${i}=${u}`)}return r}static getURLSearchString(e){return ct.getURLSearchArray(e,"").join("&")}};er.traverseDotNotation;function ki(n){return!1}function tr(n){return Object.prototype.hasOwnProperty.call(n,"__value")}function ft(n){return typeof n=="object"&&n!==null}let St="sonic";typeof __SONIC_PREFIX__>"u"&&(St="sonic");const kr=St=="sonic"?"publisher-proxies-data":St+"-publisher-proxies-data",dt=class dt{constructor(e,t,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!$e.changed){$e.changed=!0,$e.saveId++;const t=$e.saveId;setTimeout(()=>$e.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(r=>{r[e]!==t&&(r[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==t&&(r[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let r=t;const i=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(r=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const r=this._value_[t];e[t]!==r&&(e[t]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||ft(this._value_)&&ft(e)&&e&&tr(this._value_)&&tr(e)&&this._value_.__value===e.__value||!ft(e)&&e===this._value_.__value)return!0;this._value_=ft(e)?e:{__value:e},this._cachedGet_=void 0;const r=tr(this._value_);if(this._parentKey_&&this.parent){const i=tr(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const u=[];u[Number(this._parentKey_)]=i,this.parent.set(u)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,u)=>{u!="_parent_"&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,u)=>{const o=this._value_[u];u!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(u))&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ft(this._value_))for(const i in this._value_){const u=e[i],h=ft(u)?u:{__value:u};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,u);continue}this._proxies_.get(i)?.set(h,!0),this._publishDynamicFilling_(i,u)}return!0}get(){if(Ti(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(dt.instancesCounter++,this._instanceCounter_=dt.instancesCounter),dt.instances.set(this._instanceCounter_,this),"<"+St+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+St+"-publisher-proxy>"}};dt.instances=new Map,dt.instancesCounter=0;let rr=dt;const pn=[];function Ti(n){pn.length>0&&pn[0].add(n)}const ve=class ve{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],ve.instance!=null)throw"Singleton / use getInstance";ve.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),ve.initPageShowHandler()}static initPageShowHandler(){ve.pageShowHandlerInitialized||(ve.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&ve.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(kr),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(kr,r),this.localStorageData={};const u=1e3*60*60*12;for(const o in this.localStorageData){const h=this.localStorageData[o],b=new Date().getTime()-(h.expirationDelayMs||u);h.lastModifiationMS<b&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=ve.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new ve)}return ve.instance==null?new ve:ve.instance}static get(e,t){return ve.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+at.getLanguage()]?.data||e.get())}get(e,t){const r=t?.localStorageMode==="enabled",i=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=Tr({});this.set(e,h)}const u=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(u._expiration_delay_=t.expirationDelayMs),u._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(u,e)),i&&(u._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==ve.saveId&&e%10!=0))try{if(!ve.changed||ve.saving)return;ve.saving=!0,ve.changed=!1;const t=Array.from(this.publishers.keys());let r=!1;for(const i of t){const u=this.publishers.get(i);if(!u?._is_savable_)continue;const o=u?.get();o&&(this.localStorageData[i+"¤lang_"+at.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:u._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(kr,i)}if(ve.saving=!1,ve.changed){ve.saveId++;const i=ve.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{ve.saving=!1}}async compress(e,t){const r=new TextEncoder().encode(e),i=window,u=new i.CompressionStream(t),o=u.writable.getWriter();o.write(r),o.close();const h=await new Response(u.readable).arrayBuffer(),b=new Uint8Array(h);let T="";for(let M=0;M<b.length;M++)T+=String.fromCharCode(b[M]);return btoa(T)}async decompress(e,t){const r=atob(e),u=Uint8Array.from(r,M=>M.charCodeAt(0)).buffer,o=window,h=new o.DecompressionStream(t),b=h.writable.getWriter();b.write(u),b.close();const T=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(T)}};ve.buildDate="Thu Oct 01 2026 19:01:52 GMT+0200 (Central European Summer Time)",ve.changed=!1,ve.saving=!1,ve.saveId=0,ve.instance=null,ve.instances=new Map,ve.pageShowHandlerInitialized=!1;let $e=ve;if(typeof window<"u"){const n=window,e=Ei+"PublisherManager",t=n[e]||$e;if(n[e]||(n[e]=$e),t!==$e){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty($e,i,{configurable:!0,get(){return t[i]},set(u){t[i]=u}})}}const Pi=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Ci(n,e){return{get:function(t,r){if(typeof r=="string"&&Pi.has(r))return n[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!n._proxies_.has(r)){const i=n._value_[r],u=Tr(ft(i)?i:{__value:i},n,r);u._proxies_.set("_parent_",e()),n._proxies_.set(r,u)}return n._proxies_.get(r)},set:function(t,r,i){if(r=="_value_")return n._value_=i,!0;if(r=="_cachedGet_")return n._cachedGet_=i,!0;if(r=="_assignmentId_")return n._assignmentId_=i,!0;if(r=="_is_savable_")return n._is_savable_=i,!0;if(r=="_expiration_delay_")return n._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return n._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return n._instanceCounter_=i,!0;if(!n._proxies_.has(r)){const o=Tr({},n,r);o._proxies_.set("_parent_",e()),n._proxies_.set(r,o)}return n._value_[r]!==i&&(n._value_[r]=i,n._publishDynamicFilling_(r,i),n._proxies_.get(r)?.set(ft(i)?i:{__value:i})),!0},deleteProperty:function(t,r){return n._publishDynamicFilling_(r,null),n._proxies_.get(r)?.set(null),delete n._value_[r]},has:function(t,r){return r in n._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(t,r,i){return i&&"value"in i&&(n._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(t,r){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return n._value_.__value?Object.keys(n._value_.__value):Object.keys(n._value_)}}}function Tr(n,e=null,t){const r=new rr(n,e,t);let i=null;const u=Ci(r,()=>i);return i=new Proxy(r,u),i}class Ri extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=rr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(St+"-publisher-proxy",Ri)}catch{}const Di=(n,e)=>{{const t=n.split("."),r=t.shift()||"";let i=$e.get(r,e);i=er.traverse(i,t);const u=new Set;return u.add(i),u}};function mn(n,e,t){const r=Si(n);return Di(r,t).values().next().value}function Li(n,e){return ki()?mn(n,void 0,e):mn(n)}let Pr=(de=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(de.observedElements.keys()).forEach(e=>de.unObserve(e)))}static observe(e){if(!e||!de.enabled||de.observedElements.has(e))return;const t=new MutationObserver(de.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>de.addPublisherListeners(i)),de.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>de.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.addPublisherListeners(t)):e.childNodes.forEach(t=>de.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.removePublisherListeners(t)):e.childNodes.forEach(t=>de.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":de.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(r=>{de.onAdded(r)}),t.removedNodes.forEach(r=>{de.onRemoved(r)});break}}static removePublisherListeners(e){const t=de.publisherListeners.get(e);t&&(de.publisherListeners.delete(e),t.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[e],t=t.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:de.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const r of t)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){de.removePublisherListeners(e);const t=at.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const r=$e.getInstance().get(t),i=de.getDataBindItems(e),u=[];i.forEach(o=>{const h=o.bindedVariablesDescriptor,b=o.propertyToUpdate;for(const T of h.variables){const M=T;let S=r;S=de.getSubPublisher(r,M);const w=e,P={publisher:S,onAssign:()=>{const D=h.variables.map(Y=>de.getSubPublisher(r,Y)?.get());let N=h.expression,Z=!1;if(D.length==1&&h.variables[0].join(".")==N.substring(1)){let Y=D[0];Y===null&&(Y=""),w[b]=Y;return}for(let Y=0;Y<D.length;Y++){let E=D[Y];const m=h.variables[Y];E===null&&(Z=!0,E=void 0),N=N.replace("$"+m.join("."),E)}if(N.indexOf("|")!=-1){const Y=N.indexOf("|");if(Y==0)N=Sr.js(N.substring(1));else{const E=N.substring(0,Y),m=N.substring(Y+1),U=Sr[E];N=Z?"":U?U(m):N}}else N=Z?"":N;w[b]=N}};S?.onAssign(P.onAssign),u.push(P)}}),de.publisherListeners.set(e,u)}},de.observedElements=new Map,de.enabled=!0,de.publisherListeners=new Map,de);Pr.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Pr);let Mi=(De=class{static listen(){if(!De.listening)return;const e=document.location?.href.replace(document.location.origin,"");De.prevURL&&De.prevURL!=e&&(De.prevURL=e,De.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(De.listen)}static offChange(e){const t=De.listeners.indexOf(e);t!=-1&&(De.listeners.splice(t,1),De.listeners.length==0&&(De.listening=!1))}static onChange(e){De.listening||(De.listening=!0,De.listen()),De.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,r=document.referrer;if(t!=null){const T=document.location.origin,M=(t||T).toString(),w=r.indexOf("http")==0?new URL(r).origin!=T:!1,P=r=="",D=history.length<3,N=P&&D,Z=M!=document.location.href;if(w&&Z||N){const E=history.state||{};E.concorde=E.concorde||{},E.concorde.hasDoneHistoryBack=!0,history.pushState(E,document.title),history.back(),document.location.replace(M)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const u=new URL(i,document.location.href),o=u.pathname.split("/"),h=[];let b="";for(const T of o)T!=b&&h.push(T),b=T;i="/"+h.join("/")+u.search+(u.hash?u.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const r=new URL(t,document.location.href),i=new URL(e.location||"",document.location.origin);let u=!1;e.autoActive=="strict"?u=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?u=r.pathname==i.pathname&&r.hash==i.hash:u=i.href.indexOf(r.href)==0,u?e.setAttribute("active","true"):e.removeAttribute("active")}}},De.listeners=[],De.listening=!1,De.prevURL=document.location?.href.replace(document.location.origin,""),De);function gn(n){if(n==null||typeof n!="object"||Array.isArray(n))return n;const e={...n};return delete e._sonic_http_response_,e}const ye=class ye{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){ye.tokens.delete(this.serviceURL);return}ye.invalidTokens.includes(e)||ye.tokens.set(this.serviceURL,e)}get token(){return ye.invalidTokens.includes(this._token)?ye.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(ye.invalidTokens.includes(e)||(ye.invalidTokens.push(e),this.token=null))}async handleResult(e,t){ye.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let u={};if(!r||r.indexOf("text/")==0)u={text:await e.text()};else try{u=await e.json()}catch{u={}}if(this.addHTTPResponse&&er.isObject(u)&&(u._sonic_http_response_=e),i===498&&!ye.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");u=h}else u=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return Li("sonic-api").lastResponse.set({http:e,processed:u}),u}async auth(){if(this.token)return;if(ye.tokens.has(this.serviceURL)){this.token=ye.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),r=t.protocol+"//"+t.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const u=await i.json();u.token?this.token=u.token:ye.failledTokenUpdates.set(this.serviceURL,!0)}catch{ye.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const r=$e.get(e),i=new URLSearchParams(t.split("?")[1]||""),u=r.get();let o=[];Array.isArray(u)?o=u:o=[u];const h=[];let b=Number.POSITIVE_INFINITY,T=0,M=0;if(i.has("limit")&&(b=parseInt(i.get("limit")||"0"),M++),i.has("offset")&&(T=parseInt(i.get("offset")||"0"),M++),M>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(T,T+b);for(const[S,w]of i.entries()){const P=w.split(",").map(D=>D.trim());for(const D of P)for(const N of o)if(typeof N!="object")isNaN(+N)?N.toString().toLowerCase().includes(w.toLowerCase())&&h.push(N):N===w&&h.push(N);else{const Z=N;if(!Z[S])continue;isNaN(+Z[S])?Z[S]?.toString().toLowerCase().includes(D.toLowerCase())&&h.push(N):Z[S]===D&&h.push(N)}}return h.slice(T,T+b)}firstCallDone(){return new Promise(e=>{if(!ye.firstCallDoneFlags.has(this.serviceURL))ye.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(ye.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),ye.firstCallDoneFlags.set(this.serviceURL,"loading"));const T=e.match(r);if(!T)throw new Error("dataProvider path is not valid");return await this.localGet(T[1],T[2])}const i={apiMethod:"get",path:e,additionalHeaders:t},u=await this.createHeaders(t),o=this.computeURL(e),h=JSON.stringify({url:o,headers:u,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),ye.firstCallDoneFlags.set(this.serviceURL,"loading")),!ye.loadingGetPromises.has(h)){const T=new Promise(async M=>{try{const S=await fetch(o,{headers:u,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),w=await this.handleResult(S,i);M({processed:w,response:this.lastResult})}catch{ye.firstCallDoneFlags.set(this.serviceURL,"error"),M(null)}});ye.loadingGetPromises.set(h,T)}const b=await ye.loadingGetPromises.get(h);return ye.loadingGetPromises.delete(h),b?(this.lastResult=b.response,b.processed):null}async getDetailed(e,t){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,t);if(i==null)return;const u=gn(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:u};const h=await this.createHeaders(t);return{request:new Request(o,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:u}}async sendDetailed(e,t,r,i){const u=await this.send(e,t,r,i);if(u==null)return;const o=gn(u),h=this.computeURL(e),b=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(h,{method:r,headers:new Headers(b),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,t,r){return this.sendDetailed(e,t,"POST",r)}async putDetailed(e,t,r){return this.sendDetailed(e,t,"PUT",r)}async patchDetailed(e,t,r){return this.sendDetailed(e,t,"PATCH",r)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=at.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const u in t)i.searchParams.set(u,t[u]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,r="POST",i){const u={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:t},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,u)}async submitFormData(e,t,r="POST",i){const u={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:t},o=await this.createHeaders(i);o.Accept="application/json";const h=new FormData,b=t;for(const M in b)h.set(M,b[M]);const T=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:h,keepalive:this.keepAlive});return await this.handleResult(T,u)}async put(e,t,r){return this.send(e,t,"PUT",r)}async post(e,t,r){return this.send(e,t,"POST",r)}async patch(e,t,r){return this.send(e,t,"PATCH",r)}async delete(e,t,r){return this.send(e,t,"delete",r)}};ye.loadingGetPromises=new Map,ye.tokens=new Map,ye.invalidTokens=[],ye.failledTokenUpdates=new Map,ye.firstCallDoneFlags=new Map;let Cr=ye;at.getApiConfiguration(document.body||document.documentElement);var vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ui(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bt={exports:{}},Fi=Bt.exports,bn;function Oi(){return bn||(bn=1,(function(n,e){var t=[].slice;(function(r,i){return e!==null?n.exports=i():r.UrlPattern=i()})(Fi,function(){var r,i,u,o,h,b,T,M,S,w,P,D,N,Z,Y;return S=function(E){return E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},T=function(E,m){var U,_,C;for(C=[],U=-1,_=E.length;++U<_;)C=C.concat(m(E[U]));return C},Z=function(E,m){var U,_,C;for(C="",U=-1,_=E.length;++U<_;)C+=m(E[U]);return C},N=function(E){return new RegExp(E.toString()+"|").exec("").length-1},P=function(E,m){var U,_,C,z,O;for(z={},U=-1,C=E.length;++U<C;)_=E[U],O=m[U],O!=null&&(z[_]!=null?(Array.isArray(z[_])||(z[_]=[z[_]]),z[_].push(O)):z[_]=O);return z},r={},r.Result=function(E,m){this.value=E,this.rest=m},r.Tagged=function(E,m){this.tag=E,this.value=m},r.tag=function(E,m){return function(U){var _,C;if(_=m(U),_!=null)return C=new r.Tagged(E,_.value),new r.Result(C,_.rest)}},r.regex=function(E){return function(m){var U,_;if(U=E.exec(m),U!=null)return _=U[0],new r.Result(_,m.slice(_.length))}},r.sequence=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(m){var U,_,C,z,O,re;for(U=-1,_=E.length,re=[],z=m;++U<_;){if(C=E[U],O=C(z),O==null)return;re.push(O.value),z=O.rest}return new r.Result(re,z)}},r.pick=function(){var E,m;return E=arguments[0],m=2<=arguments.length?t.call(arguments,1):[],function(U){var _,C;if(C=r.sequence.apply(r,m)(U),C!=null)return _=C.value,C.value=_[E],C}},r.string=function(E){var m;return m=E.length,function(U){if(U.slice(0,m)===E)return new r.Result(E,U.slice(m))}},r.lazy=function(E){var m;return m=null,function(U){return m==null&&(m=E()),m(U)}},r.baseMany=function(E,m,U,_,C){var z,O,re,ae;for(re=C,ae=U?"":[];!(m!=null&&(z=m(re),z!=null)||(O=E(re),O==null));)U?ae+=O.value:ae.push(O.value),re=O.rest;if(!(_&&ae.length===0))return new r.Result(ae,re)},r.many1=function(E){return function(m){return r.baseMany(E,null,!1,!0,m)}},r.concatMany1Till=function(E,m){return function(U){return r.baseMany(E,m,!0,!0,U)}},r.firstChoice=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(m){var U,_,C,z;for(U=-1,_=E.length;++U<_;)if(C=E[U],z=C(m),z!=null)return z}},D=function(E){var m;return m={},m.wildcard=r.tag("wildcard",r.string(E.wildcardChar)),m.optional=r.tag("optional",r.pick(1,r.string(E.optionalSegmentStartChar),r.lazy(function(){return m.pattern}),r.string(E.optionalSegmentEndChar))),m.name=r.regex(new RegExp("^["+E.segmentNameCharset+"]+")),m.named=r.tag("named",r.pick(1,r.string(E.segmentNameStartChar),r.lazy(function(){return m.name}))),m.escapedChar=r.pick(1,r.string(E.escapeChar),r.regex(/^./)),m.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return m.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(E.segmentNameStartChar),r.string(E.optionalSegmentStartChar),r.string(E.optionalSegmentEndChar),m.wildcard))),m.token=r.lazy(function(){return r.firstChoice(m.wildcard,m.optional,m.named,m.static)}),m.pattern=r.many1(r.lazy(function(){return m.token})),m},M={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},b=function(E,m){if(Array.isArray(E))return Z(E,function(U){return b(U,m)});switch(E.tag){case"wildcard":return"(.*?)";case"named":return"(["+m+"]+)";case"static":return S(E.value);case"optional":return"(?:"+b(E.value,m)+")?"}},h=function(E,m){return m==null&&(m=M.segmentValueCharset),"^"+b(E,m)+"$"},o=function(E){if(Array.isArray(E))return T(E,o);switch(E.tag){case"wildcard":return["_"];case"named":return[E.value];case"static":return[];case"optional":return o(E.value)}},w=function(E,m,U,_){var C,z,O,re;if(_==null&&(_=!1),re=E[m],re==null){if(_)throw new Error("no values provided for key `"+m+"`");return}if(C=U[m]||0,z=Array.isArray(re)?re.length-1:0,C>z){if(_)throw new Error("too few values provided for key `"+m+"`");return}return O=Array.isArray(re)?re[C]:re,_&&(U[m]=C+1),O},u=function(E,m,U){var _,C;if(Array.isArray(E)){for(_=-1,C=E.length;++_<C;)if(u(E[_],m,U))return!0;return!1}switch(E.tag){case"wildcard":return w(m,"_",U,!1)!=null;case"named":return w(m,E.value,U,!1)!=null;case"static":return!1;case"optional":return u(E.value,m,U)}},Y=function(E,m,U){if(Array.isArray(E))return Z(E,function(_){return Y(_,m,U)});switch(E.tag){case"wildcard":return w(m,"_",U,!0);case"named":return w(m,E.value,U,!0);case"static":return E.value;case"optional":return u(E.value,m,U)?Y(E.value,m,U):""}},i=function(E,m){var U,_,C,z,O;if(E instanceof i){this.isRegex=E.isRegex,this.regex=E.regex,this.ast=E.ast,this.names=E.names;return}if(this.isRegex=E instanceof RegExp,!(typeof E=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=E,m!=null){if(!Array.isArray(m))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(U=N(this.regex),m.length!==U)throw new Error("regex contains "+U+" groups but array of group names contains "+m.length);this.names=m}return}if(E==="")throw new Error("argument must not be the empty string");if(O=E.replace(/\s+/g,""),O!==E)throw new Error("argument must not contain whitespace");if(_={escapeChar:m?.escapeChar||M.escapeChar,segmentNameStartChar:m?.segmentNameStartChar||M.segmentNameStartChar,segmentNameCharset:m?.segmentNameCharset||M.segmentNameCharset,segmentValueCharset:m?.segmentValueCharset||M.segmentValueCharset,optionalSegmentStartChar:m?.optionalSegmentStartChar||M.optionalSegmentStartChar,optionalSegmentEndChar:m?.optionalSegmentEndChar||M.optionalSegmentEndChar,wildcardChar:m?.wildcardChar||M.wildcardChar},z=D(_),C=z.pattern(E),C==null)throw new Error("couldn't parse pattern");if(C.rest!=="")throw new Error("could only partially parse pattern");this.ast=C.value,this.regex=new RegExp(h(this.ast,_.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(E){var m,U;return U=this.regex.exec(E),U==null?null:(m=U.slice(1),this.names?P(this.names,m):m)},i.prototype.stringify=function(E){if(E==null&&(E={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(E!==Object(E))throw new Error("argument must be an object or undefined");return Y(this.ast,E,{})},i.escapeForRegex=S,i.concatMap=T,i.stringConcatMap=Z,i.regexGroupCount=N,i.keysAndValuesToObject=P,i.P=r,i.newParser=D,i.defaultOptions=M,i.astNodeToRegexString=h,i.astNodeToNames=o,i.getParam=w,i.astNodeContainsSegmentsForProvidedParams=u,i.stringify=Y,i})})(Bt,Bt.exports)),Bt.exports}var $i=Oi();const Ni=Ui($i);class Rr{constructor(e){this.path=Rr.normalizePath(e)}getDataProviderKey(){return new Qt(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let b;try{b=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return b.pathname=b.pathname.replace(/\/+/g,"/"),b.href}const r=t.indexOf("?"),i=t.indexOf("#");let u=t.length;r>=0&&(u=Math.min(u,r)),i>=0&&(u=Math.min(u,i));let o=t.slice(0,u);const h=t.slice(u);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&h)throw new RangeError("Endpoint: path cannot be empty");return o+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}function nr(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Dr={exports:{}},yn;function Ii(){return yn||(yn=1,(function(n,e){(function(t){n.exports=t()})(function(){return(function(){function t(r,i,u){function o(T,M){if(!i[T]){if(!r[T]){var S=typeof nr=="function"&&nr;if(!M&&S)return S(T,!0);if(h)return h(T,!0);var w=new Error("Cannot find module '"+T+"'");throw w.code="MODULE_NOT_FOUND",w}var P=i[T]={exports:{}};r[T][0].call(P.exports,function(D){var N=r[T][1][D];return o(N||D)},P,P.exports,t,r,i,u)}return i[T].exports}for(var h=typeof nr=="function"&&nr,b=0;b<u.length;b++)o(u[b]);return o}return t})()({1:[function(t,r,i){const u=t("./utils"),o=(function(){const h=u.stringToArray,b=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],T=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],M=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],S=["Thousand","Million","Billion","Trillion"];function w(A,R){var k=function(j,I,L){var q="";if(j<=19)q=(I?" and ":"")+(L?T[j]:b[j]);else if(j<100){const he=Math.floor(j/10),ue=j%10;q=(I?" and ":"")+M[he-2],ue>0?q+="-"+k(ue,!1,L):L&&(q=q.substring(0,q.length-1)+"ieth")}else if(j<1e3){const he=Math.floor(j/100),ue=j%100;q=(I?", ":"")+b[he]+" Hundred",ue>0?q+=k(ue,!0,L):L&&(q+="th")}else{var K=Math.floor(Math.log10(j)/3);K>S.length&&(K=S.length);const he=Math.pow(10,K*3),ue=Math.floor(j/he),te=j-ue*he;q=(I?", ":"")+k(ue,!1,!1)+" "+S[K-1],te>0?q+=k(te,!0,L):L&&(q+="th")}return q},F=k(A,!1,R);return F}const P=Object.create(null);b.forEach(function(A,R){P[A.toLowerCase()]=R}),T.forEach(function(A,R){P[A.toLowerCase()]=R}),M.forEach(function(A,R){const k=A.toLowerCase();P[k]=(R+2)*10,P[k.substring(0,A.length-1)+"ieth"]=P[k]}),P.hundredth=100,S.forEach(function(A,R){const k=A.toLowerCase(),F=Math.pow(10,(R+1)*3);P[k]=F,P[k+"th"]=F});function D(A){const k=A.split(/,\s|\sand\s|[\s\\-]/).map(I=>P[I]);let F=[0];return k.forEach(I=>{if(I<100){let L=F.pop();L>=1e3&&(F.push(L),L=0),F.push(L+I)}else F.push(F.pop()*I)}),F.reduce((I,L)=>I+L,0)}const N=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],Z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function Y(A){for(var R=0;R<N.length;R++){const k=N[R];if(A>=k[0])return k[1]+Y(A-k[0])}return""}function E(A){for(var R=0,k=1,F=A.length-1;F>=0;F--){const j=A[F],I=Z[j];I<k?R-=I:(k=I,R+=I)}return R}function m(A,R){for(var k=[],F=R.charCodeAt(0);A>0;)k.unshift(String.fromCharCode((A-1)%26+F)),A=Math.floor((A-1)/26);return k.join("")}function U(A,R){for(var k=R.charCodeAt(0),F=0,j=0;j<A.length;j++)F+=(A.charCodeAt(A.length-j-1)-k+1)*Math.pow(26,j);return F}function _(A,R){if(typeof A>"u")return;A=Math.floor(A);const k=ae(R);return O(A,k)}const C={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},z={UPPER:"upper",LOWER:"lower",TITLE:"title"};function O(A,R){let k;const F=A<0;switch(A=Math.abs(A),R.primary){case C.LETTERS:k=m(A,R.case===z.UPPER?"A":"a");break;case C.ROMAN:k=Y(A),R.case===z.UPPER&&(k=k.toUpperCase());break;case C.WORDS:k=w(A,R.ordinal),R.case===z.UPPER?k=k.toUpperCase():R.case===z.LOWER&&(k=k.toLowerCase());break;case C.DECIMAL:k=""+A;var j=R.mandatoryDigits-k.length;if(j>0){var I=new Array(j+1).join("0");k=I+k}if(R.zeroCode!==48&&(k=h(k).map(he=>String.fromCodePoint(he.codePointAt(0)+R.zeroCode-48)).join("")),R.regular){const he=Math.floor((k.length-1)/R.groupingSeparators.position);for(let ue=he;ue>0;ue--){const te=k.length-ue*R.groupingSeparators.position;k=k.substr(0,te)+R.groupingSeparators.character+k.substr(te)}}else R.groupingSeparators.reverse().forEach(he=>{const ue=k.length-he.position;k=k.substr(0,ue)+he.character+k.substr(ue)});if(R.ordinal){var L={1:"st",2:"nd",3:"rd"},q=k[k.length-1],K=L[q];(!K||k.length>1&&k[k.length-2]==="1")&&(K="th"),k=k+K}break;case C.SEQUENCE:throw{code:"D3130",value:R.token}}return F&&(k="-"+k),k}const re=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ae(A){const R={type:"integer",primary:C.DECIMAL,case:z.LOWER,ordinal:!1};let k,F;const j=A.lastIndexOf(";");switch(j===-1?k=A:(k=A.substring(0,j),F=A.substring(j+1),F[0]==="o"&&(R.ordinal=!0)),k){case"A":R.case=z.UPPER;case"a":R.primary=C.LETTERS;break;case"I":R.case=z.UPPER;case"i":R.primary=C.ROMAN;break;case"W":R.case=z.UPPER,R.primary=C.WORDS;break;case"Ww":R.case=z.TITLE,R.primary=C.WORDS;break;case"w":R.primary=C.WORDS;break;default:{let I=null,L=0,q=0,K=[],he=0;if(h(k).map(te=>te.codePointAt(0)).reverse().forEach(te=>{let Q=!1;for(let le=0;le<re.length;le++){const ee=re[le];if(te>=ee&&te<=ee+9){if(Q=!0,L++,he++,I===null)I=ee;else if(ee!==I)throw{code:"D3131"};break}}Q||(te===35?(he++,q++):K.push({position:he,character:String.fromCodePoint(te)}))}),L>0){R.primary=C.DECIMAL,R.zeroCode=I,R.mandatoryDigits=L,R.optionalDigits=q;const Q=function(le){if(le.length===0)return 0;const ee=le[0].character;for(let Le=1;Le<le.length;Le++)if(le[Le].character!==ee)return 0;const Ne=le.map(Le=>Le.position),Qe=function(Le,je){return je===0?Le:Qe(je,Le%je)},Be=Ne.reduce(Qe);for(let Le=1;Le<=Ne.length;Le++)if(Ne.indexOf(Le*Be)===-1)return 0;return Be}(K);Q>0?(R.regular=!0,R.groupingSeparators={position:Q,character:K[0].character}):(R.regular=!1,R.groupingSeparators=K)}else R.primary=C.SEQUENCE,R.token=k}}return R}const _e={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function ge(A){var R=[];const k={type:"datetime",parts:R},F=function(Q,le){if(le>Q){let ee=A.substring(Q,le);ee=ee.split("]]").join("]"),R.push({type:"literal",value:ee})}};for(var j=0,I=0;I<A.length;){if(A.charAt(I)==="["){if(A.charAt(I+1)==="["){F(j,I),R.push({type:"literal",value:"["}),I+=2,j=I;continue}if(F(j,I),j=I,I=A.indexOf("]",j),I===-1)throw{code:"D3135"};let Q=A.substring(j+1,I);Q=Q.split(/\s+/).join("");var L={type:"marker",component:Q.charAt(0)},q=Q.lastIndexOf(","),K;if(q!==-1){const le=Q.substring(q+1),ee=le.indexOf("-");let Ne,Qe;const Be=function(je){if(!(typeof je>"u"||je==="*"))return parseInt(je)};ee===-1?Ne=le:(Ne=le.substring(0,ee),Qe=le.substring(ee+1));const Le={min:Be(Ne),max:Be(Qe)};L.width=Le,K=Q.substring(1,q)}else K=Q.substring(1);if(K.length===1)L.presentation1=K;else if(K.length>1){var he=K.charAt(K.length-1);"atco".indexOf(he)!==-1?(L.presentation2=he,he==="o"&&(L.ordinal=!0),L.presentation1=K.substring(0,K.length-1)):L.presentation1=K}else L.presentation1=_e[L.component];if(typeof L.presentation1>"u")throw{code:"D3132",value:L.component};if(L.presentation1[0]==="n")L.names=z.LOWER;else if(L.presentation1[0]==="N")L.presentation1[1]==="n"?L.names=z.TITLE:L.names=z.UPPER;else if("YMDdFWwXxHhmsf".indexOf(L.component)!==-1){var ue=L.presentation1;if(L.presentation2&&(ue+=";"+L.presentation2),L.integerFormat=ae(ue),L.width&&L.width.min!==void 0&&L.integerFormat.mandatoryDigits<L.width.min&&(L.integerFormat.mandatoryDigits=L.width.min),L.component==="Y")if(L.n=-1,L.width&&L.width.max!==void 0)L.n=L.width.max,L.integerFormat.mandatoryDigits=L.n;else{var te=L.integerFormat.mandatoryDigits+L.integerFormat.optionalDigits;te>=2&&(L.n=te)}const le=R[R.length-1];le&&le.integerFormat&&(le.integerFormat.parseWidth=le.integerFormat.mandatoryDigits)}(L.component==="Z"||L.component==="z")&&(L.integerFormat=ae(L.presentation1)),R.push(L),j=I+1}I++}return F(j,I),k}const pe=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Je=1e3*60*60*24,ce=function(A){const R=Date.UTC(A.year,A.month);var k=new Date(R).getUTCDay();return k===0&&(k=7),k>4?R+(8-k)*Je:R-(k-1)*Je},me=function(A,R){return{year:A,month:R,nextMonth:function(){return R===11?me(A+1,0):me(A,R+1)},previousMonth:function(){return R===0?me(A-1,11):me(A,R-1)},nextYear:function(){return me(A+1,R)},previousYear:function(){return me(A-1,R)}}},We=function(A,R){return(R-A)/(Je*7)+1},ie=(A,R)=>{let k;switch(R){case"Y":k=A.getUTCFullYear();break;case"M":k=A.getUTCMonth()+1;break;case"D":k=A.getUTCDate();break;case"d":{const F=Date.UTC(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate()),j=Date.UTC(A.getUTCFullYear(),0);k=(F-j)/Je+1;break}case"F":k=A.getUTCDay(),k===0&&(k=7);break;case"W":{const F=me(A.getUTCFullYear(),0),j=ce(F),I=Date.UTC(F.year,A.getUTCMonth(),A.getUTCDate());let L=We(j,I);if(L>52){const q=ce(F.nextYear());I>=q&&(L=1)}else if(L<1){const q=ce(F.previousYear());L=We(q,I)}k=Math.floor(L);break}case"w":{const F=me(A.getUTCFullYear(),A.getUTCMonth()),j=ce(F),I=Date.UTC(F.year,F.month,A.getUTCDate());let L=We(j,I);if(L>4){const q=ce(F.nextMonth());I>=q&&(L=1)}else if(L<1){const q=ce(F.previousMonth());L=We(q,I)}k=Math.floor(L);break}case"X":{const F=me(A.getUTCFullYear(),0),j=ce(F),I=ce(F.nextYear()),L=A.getTime();L<j?k=F.year-1:L>=I?k=F.year+1:k=F.year;break}case"x":{const F=me(A.getUTCFullYear(),A.getUTCMonth()),j=ce(F),I=F.nextMonth(),L=ce(I),q=A.getTime();q<j?k=F.previousMonth().month+1:q>=L?k=I.month+1:k=F.month+1;break}case"H":k=A.getUTCHours();break;case"h":k=A.getUTCHours(),k=k%12,k===0&&(k=12);break;case"P":k=A.getUTCHours()>=12?"pm":"am";break;case"m":k=A.getUTCMinutes();break;case"s":k=A.getUTCSeconds();break;case"f":k=A.getUTCMilliseconds();break;case"Z":case"z":break;case"C":k="ISO";break;case"E":k="ISO";break}return k};let Ce=null;function nt(A,R,k){var F=0,j=0;if(typeof k<"u"){const ue=parseInt(k);F=Math.floor(ue/100),j=ue%100}var I=function(ue,te){var Q=ie(ue,te.component);if("YMDdFWwXxHhms".indexOf(te.component)!==-1)if(te.component==="Y"&&te.n!==-1&&(Q=Q%Math.pow(10,te.n)),te.names){if(te.component==="M"||te.component==="x")Q=Pe[Q-1];else if(te.component==="F")Q=pe[Q];else throw{code:"D3133",value:te.component};te.names===z.UPPER?Q=Q.toUpperCase():te.names===z.LOWER&&(Q=Q.toLowerCase()),te.width&&Q.length>te.width.max&&(Q=Q.substring(0,te.width.max))}else Q=O(Q,te.integerFormat);else if(te.component==="f")Q=O(Q,te.integerFormat);else if(te.component==="Z"||te.component==="z"){const le=F*100+j;if(te.integerFormat.regular)Q=O(le,te.integerFormat);else{const ee=te.integerFormat.mandatoryDigits;if(ee===1||ee===2)Q=O(F,te.integerFormat),j!==0&&(Q+=":"+_(j,"00"));else if(ee===3||ee===4)Q=O(le,te.integerFormat);else throw{code:"D3134",value:ee}}le>=0&&(Q="+"+Q),te.component==="z"&&(Q="GMT"+Q),le===0&&te.presentation2==="t"&&(Q="Z")}else te.component==="P"&&te.names===z.UPPER&&(Q=Q.toUpperCase());return Q};let L;typeof R>"u"?(Ce===null&&(Ce=ge("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),L=Ce):L=ge(R);const q=(60*F+j)*60*1e3,K=new Date(A+q);let he="";return L.parts.forEach(function(ue){ue.type==="literal"?he+=ue.value:he+=I(K,ue)}),he}function d(A){var R=Object.create(null);if(A.type==="datetime")R.type="datetime",R.parts=A.parts.map(function(k){var F=Object.create(null);if(k.type==="literal")F.regex=k.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(k.component==="Z"||k.component==="z"){let I;Array.isArray(k.integerFormat.groupingSeparators)||(I=k.integerFormat.groupingSeparators),F.regex="",k.component==="z"&&(F.regex="GMT"),F.regex+="[-+][0-9]+",I&&(F.regex+=I.character+"[0-9]+"),F.parse=function(L){k.component==="z"&&(L=L.substring(3));let q=0,K=0;return I?(q=Number.parseInt(L.substring(0,L.indexOf(I.character))),K=Number.parseInt(L.substring(L.indexOf(I.character)+1))):L.length-1<=2?q=Number.parseInt(L):(q=Number.parseInt(L.substring(0,3)),K=Number.parseInt(L.substring(3))),q*60+K}}else if(k.component==="f")F.regex="[0-9]+",F.parse=function(I){return parseFloat("0."+I.substring(0,3))*1e3};else if(k.integerFormat)F=d(k.integerFormat);else{F.regex="[a-zA-Z]+";var j=Object.create(null);if(k.component==="M"||k.component==="x")Pe.forEach(function(I,L){k.width&&k.width.max?j[I.substring(0,k.width.max)]=L+1:j[I]=L+1});else if(k.component==="F")pe.forEach(function(I,L){L>0&&(k.width&&k.width.max?j[I.substring(0,k.width.max)]=L:j[I]=L)});else if(k.component==="P")j={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:k.component};F.parse=function(I){return j[I]}}return F.component=k.component,F});else{R.type="integer";const k=A.case===z.UPPER;switch(A.primary){case C.LETTERS:R.regex=k?"[A-Z]+":"[a-z]+",R.parse=function(F){return U(F,k?"A":"a")};break;case C.ROMAN:R.regex=k?"[MDCLXVI]+":"[mdclxvi]+",R.parse=function(F){return E(k?F:F.toUpperCase())};break;case C.WORDS:R.regex="(?:"+u.keys(P).concat("and","[\\-, ]").join("|")+")+",R.parse=function(F){return D(F.toLowerCase())};break;case C.DECIMAL:R.regex="[0-9]",A.parseWidth?R.regex+=`{${A.parseWidth}}`:R.regex+="+",A.ordinal&&(R.regex+="(?:th|st|nd|rd)"),R.parse=function(F){let j=F;return A.ordinal&&(j=F.substring(0,F.length-2)),A.regular?j=j.split(",").join(""):A.groupingSeparators.forEach(I=>{j=j.split(I.character).join("")}),A.zeroCode!==48&&(j=j.split("").map(I=>String.fromCodePoint(I.codePointAt(0)-A.zeroCode+48)).join("")),parseInt(j)};break;case C.SEQUENCE:throw{code:"D3130",value:A.token}}}return R}function y(A,R){if(typeof A>"u")return;const k=ae(R);return d(k).parse(A)}function G(A,R){const k=ge(R),F=d(k),j="^"+F.parts.map(K=>"("+K.regex+")").join("")+"$";var L=new RegExp(j,"i").exec(A);if(L!==null){const ee=Object.create(null);for(let c=1;c<L.length;c++){const f=F.parts[c-1];f.parse&&(ee[f.component]=f.parse(L[c]))}if(Object.getOwnPropertyNames(ee).length===0)return;let Ne=0;const Qe=c=>{Ne<<=1,Ne+=c?1:0},Be=c=>!(~c&Ne)&&!!(c&Ne);"YXMxWwdD".split("").forEach(c=>Qe(ee[c]));const je=!Be(161)&&Be(130),ot=Be(84),Pt=!ot&&Be(72);Ne=0,"PHhmsf".split("").forEach(c=>Qe(ee[c]));const H=!Be(23)&&Be(47),tt=(je?"YD":ot?"XxwF":Pt?"XWF":"YMD")+(H?"Phmsf":"Hmsf"),zt=this.environment.timestamp;let it=!1,yt=!1;if(tt.split("").forEach(c=>{if(typeof ee[c]>"u")it?(ee[c]="MDd".indexOf(c)!==-1?1:0,yt=!0):ee[c]=ie(zt,c);else if(it=!0,yt)throw{code:"D3136"}}),ee.M>0?ee.M-=1:ee.M=0,je){const c=Date.UTC(ee.Y,0),f=(ee.d-1)*1e3*60*60*24,p=new Date(c+f);ee.M=p.getUTCMonth(),ee.D=p.getUTCDate()}if(ot)throw{code:"D3136"};if(Pt)throw{code:"D3136"};H&&(ee.H=ee.h===12?0:ee.h,ee.P===1&&(ee.H+=12));var q=Date.UTC(ee.Y,ee.M,ee.D,ee.H,ee.m,ee.s,ee.f);return(ee.Z||ee.z)&&(q-=(ee.Z||ee.z)*60*1e3),q}}var fe=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Ae(A,R){if(!(typeof A>"u"))if(typeof R>"u"){if(!fe.test(A))throw{stack:new Error().stack,code:"D3110",value:A};return Date.parse(A)}else return G.call(this,A,R)}function we(A,R,k){if(!(typeof A>"u"))return nt.call(this,A,R,k)}return{formatInteger:_,parseInteger:y,fromMillis:we,toMillis:Ae}})();r.exports=o},{"./utils":6}],2:[function(t,r,i){(function(u){(function(){var o=t("./utils");const h=(()=>{var b=o.isNumeric,T=o.isArrayOfStrings,M=o.isArrayOfNumbers,S=o.isSequence,w=o.isFunction,P=o.isLambda,D=o.isPromise,N=o.getFunctionArity,Z=o.isDeepEqual,Y=o.stringToArray;function E(s){if(!(typeof s>"u")){var a=0;return s.forEach(function(l){a+=l}),a}}function m(s){return typeof s>"u"?0:s.length}function U(s){if(!(typeof s>"u"||s.length===0))return Math.max.apply(Math,s)}function _(s){if(!(typeof s>"u"||s.length===0))return Math.min.apply(Math,s)}function C(s){if(!(typeof s>"u"||s.length===0)){var a=0;return s.forEach(function(l){a+=l}),a/s.length}}function z(s,a=!1){if(!(typeof s>"u")){var l;if(typeof s=="string")l=s;else if(w(s))l="";else{if(typeof s=="number"&&!isFinite(s))throw{code:"D3001",value:s,stack:new Error().stack};var v=a?2:0;Array.isArray(s)&&s.outerWrapper&&(s=s[0]),l=JSON.stringify(s,function(g,x){return typeof x<"u"&&x!==null&&b(x)?x.toPrecision&&!Number.isInteger(x)?Number(x.toPrecision(15)):x:x&&w(x)?"":x},v)}return l}}function O(s,a,l){if(!(typeof s>"u")){var v=Y(s),g=v.length;if(g+a<0&&(a=0),typeof l<"u"){if(l<=0)return"";var x=a>=0?a+l:g+a+l;return v.slice(a,x).join("")}return v.slice(a).join("")}}function re(s,a){if(!(typeof s>"u")){var l=s.indexOf(a);return l>-1?s.substr(0,l):s}}function ae(s,a){if(!(typeof s>"u")){var l=s.indexOf(a);return l>-1?s.substr(l+a.length):s}}function _e(s){if(!(typeof s>"u"))return s.toLowerCase()}function ge(s){if(!(typeof s>"u"))return s.toUpperCase()}function pe(s){if(!(typeof s>"u"))return Y(s).length}function Pe(s){if(!(typeof s>"u")){var a=s.replace(/[ \t\n\r]+/gm," ");return a.charAt(0)===" "&&(a=a.substring(1)),a.charAt(a.length-1)===" "&&(a=a.substring(0,a.length-1)),a}}function Je(s,a,l){if(!(typeof s>"u")){(typeof l>"u"||l.length===0)&&(l=" ");var v;a=Math.trunc(a);var g=Math.abs(a)-pe(s);if(g>0){var x=new Array(g+1).join(l);l.length>1&&(x=O(x,0,g)),a>0?v=s+x:v=x+s}else v=s;return v}}async function ce(s,a){var l=s.apply(this,[a]);if(D(l)&&(l=await l),l&&!(typeof l.start=="number"||l.end==="number"||Array.isArray(l.groups)||w(l.next)))throw{code:"T1010",stack:new Error().stack};return l}async function me(s,a){if(!(typeof s>"u"||typeof a>"u")){var l;if(typeof a=="string")l=s.indexOf(a)!==-1;else{var v=await ce(a,s);l=typeof v<"u"}return l}}async function We(s,a,l){if(!(typeof s>"u")){if(l<0)throw{stack:new Error().stack,value:l,code:"D3040",index:3};var v=this.createSequence();if(typeof l>"u"||l>0){var g=0,x=await ce(a,s);if(typeof x<"u")for(;typeof x<"u"&&(typeof l>"u"||g<l);)v.push({match:x.match,index:x.start,groups:x.groups}),x=await ce(x.next),g++}return v}}async function ie(s,a,l,v){if(!(typeof s>"u")){var g=this;if(a==="")throw{code:"D3010",stack:new Error().stack,value:a,index:2};if(v<0)throw{code:"D3011",stack:new Error().stack,value:v,index:4};var x;typeof l=="string"?x=function(Se){for(var Me="",be=0,Re=l.indexOf("$",be);Re!==-1&&be<l.length;){Me+=l.substring(be,Re),be=Re+1;var et=l.charAt(be);if(et==="$")Me+="$",be++;else if(et==="0")Me+=Se.match,be++;else{var qe;if(Se.groups.length===0?qe=1:qe=Math.floor(Math.log(Se.groups.length)*Math.LOG10E)+1,Re=parseInt(l.substring(be,be+qe),10),qe>1&&Re>Se.groups.length&&(Re=parseInt(l.substring(be,be+qe-1),10)),isNaN(Re))Me+="$";else{if(Se.groups.length>0){var st=Se.groups[Re-1];typeof st<"u"&&(Me+=st)}be+=Re.toString().length}}Re=l.indexOf("$",be)}return Me+=l.substring(be),Me}:x=l;var $="",B=0;if(typeof v>"u"||v>0){var se=0;if(typeof a=="string"){for(var J=s.indexOf(a,B);J!==-1&&(typeof v>"u"||se<v);)$+=s.substring(B,J),$+=l,B=J+a.length,se++,J=s.indexOf(a,B);$+=s.substring(B)}else{var Ee=await ce(a,s);if(typeof Ee<"u"){for(;typeof Ee<"u"&&(typeof v>"u"||se<v);){$+=s.substring(B,Ee.start);var xe=x.apply(g,[Ee]);if(D(xe)&&(xe=await xe),typeof xe=="string")$+=xe;else throw{code:"D3012",stack:new Error().stack,value:xe};B=Ee.start+Ee.match.length,se++,Ee=await ce(Ee.next)}$+=s.substring(B)}else $=s}}else $=s;return $}}function Ce(s){if(!(typeof s>"u")){var a=typeof window<"u"?window.btoa:function(l){return new u.Buffer.from(l,"binary").toString("base64")};return a(s)}}function nt(s){if(!(typeof s>"u")){var a=typeof window<"u"?window.atob:function(l){return new u.Buffer.from(l,"base64").toString("binary")};return a(s)}}function d(s){if(!(typeof s>"u")){var a;try{a=encodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrlComponent"}}return a}}function y(s){if(!(typeof s>"u")){var a;try{a=encodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrl"}}return a}}function G(s){if(!(typeof s>"u")){var a;try{a=decodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrlComponent"}}return a}}function fe(s){if(!(typeof s>"u")){var a;try{a=decodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrl"}}return a}}async function Ae(s,a,l){if(!(typeof s>"u")){if(l<0)throw{code:"D3020",stack:new Error().stack,value:l,index:3};var v=[];if(typeof l>"u"||l>0)if(typeof a=="string")v=s.split(a,l);else{var g=0,x=await ce(a,s);if(typeof x<"u"){for(var $=0;typeof x<"u"&&(typeof l>"u"||g<l);)v.push(s.substring($,x.start)),$=x.end,x=await ce(x.next),g++;(typeof l>"u"||g<l)&&v.push(s.substring($))}else v.push(s)}return v}}function we(s,a){if(!(typeof s>"u"))return typeof a>"u"&&(a=""),s.join(a)}function A(s,a,l){if(!(typeof s>"u")){var v={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},g=v;typeof l<"u"&&o.keys(l).forEach(function(ne){g[ne]=l[ne]});for(var x=[],$=g["zero-digit"].charCodeAt(0),B=$;B<$+10;B++)x.push(String.fromCharCode(B));var se=x.concat([g["decimal-separator"],g["exponent-separator"],g["grouping-separator"],g.digit,g["pattern-separator"]]),J=a.split(g["pattern-separator"]);if(J.length>2)throw{code:"D3080",stack:new Error().stack};var Ee=function(ne){var Te=(function(){for(var Fe,Ze=0;Ze<ne.length;Ze++)if(Fe=ne.charAt(Ze),se.indexOf(Fe)!==-1&&Fe!==g["exponent-separator"])return ne.substring(0,Ze);return""})(),ze=(function(){for(var Fe,Ze=ne.length-1;Ze>=0;Ze--)if(Fe=ne.charAt(Ze),se.indexOf(Fe)!==-1&&Fe!==g["exponent-separator"])return ne.substring(Ze+1);return""})(),ke=ne.substring(Te.length,ne.length-ze.length),Xe,mt,Ye,wt,Ke=ne.indexOf(g["exponent-separator"],Te.length);Ke===-1||Ke>ne.length-ze.length?(Xe=ke,mt=void 0):(Xe=ke.substring(0,Ke),mt=ke.substring(Ke+1));var rt=Xe.indexOf(g["decimal-separator"]);return rt===-1?(Ye=Xe,wt=ze):(Ye=Xe.substring(0,rt),wt=Xe.substring(rt+1)),{prefix:Te,suffix:ze,activePart:ke,mantissaPart:Xe,exponentPart:mt,integerPart:Ye,fractionalPart:wt,subpicture:ne}},xe=function(ne){var Te,ze,ke=ne.subpicture,Xe=ke.indexOf(g["decimal-separator"]);Xe!==ke.lastIndexOf(g["decimal-separator"])&&(Te="D3081"),ke.indexOf(g.percent)!==ke.lastIndexOf(g.percent)&&(Te="D3082"),ke.indexOf(g["per-mille"])!==ke.lastIndexOf(g["per-mille"])&&(Te="D3083"),ke.indexOf(g.percent)!==-1&&ke.indexOf(g["per-mille"])!==-1&&(Te="D3084");var mt=!1;for(ze=0;ze<ne.mantissaPart.length;ze++){var Ye=ne.mantissaPart.charAt(ze);if(x.indexOf(Ye)!==-1||Ye===g.digit){mt=!0;break}}mt||(Te="D3085");var wt=ne.activePart.split("").map(function(Fe){return se.indexOf(Fe)===-1?"p":"a"}).join("");wt.indexOf("p")!==-1&&(Te="D3086"),Xe!==-1?(ke.charAt(Xe-1)===g["grouping-separator"]||ke.charAt(Xe+1)===g["grouping-separator"])&&(Te="D3087"):ne.integerPart.charAt(ne.integerPart.length-1)===g["grouping-separator"]&&(Te="D3088"),ke.indexOf(g["grouping-separator"]+g["grouping-separator"])!==-1&&(Te="D3089");var Ke=ne.integerPart.indexOf(g.digit);Ke!==-1&&ne.integerPart.substring(0,Ke).split("").filter(function(Fe){return x.indexOf(Fe)>-1}).length>0&&(Te="D3090"),Ke=ne.fractionalPart.lastIndexOf(g.digit),Ke!==-1&&ne.fractionalPart.substring(Ke).split("").filter(function(Fe){return x.indexOf(Fe)>-1}).length>0&&(Te="D3091");var rt=typeof ne.exponentPart=="string";if(rt&&ne.exponentPart.length>0&&(ke.indexOf(g.percent)!==-1||ke.indexOf(g["per-mille"])!==-1)&&(Te="D3092"),rt&&(ne.exponentPart.length===0||ne.exponentPart.split("").filter(function(Fe){return x.indexOf(Fe)===-1}).length>0)&&(Te="D3093"),Te)throw{code:Te,stack:new Error().stack}},Se=function(ne){var Te=function(Ie,dr){for(var Wt=[],ut=Ie.indexOf(g["grouping-separator"]);ut!==-1;){var pr=(dr?Ie.substring(0,ut):Ie.substring(ut)).split("").filter(function(Dt){return x.indexOf(Dt)!==-1||Dt===g.digit}).length;Wt.push(pr),ut=ne.integerPart.indexOf(g["grouping-separator"],ut+1)}return Wt},ze=Te(ne.integerPart),ke=function(Ie){if(Ie.length===0)return 0;for(var dr=function(pr,Dt){return Dt===0?pr:dr(Dt,pr%Dt)},Wt=Ie.reduce(dr),ut=1;ut<=Ie.length;ut++)if(Ie.indexOf(ut*Wt)===-1)return 0;return Wt},Xe=ke(ze),mt=Te(ne.fractionalPart,!0),Ye=ne.integerPart.split("").filter(function(Ie){return x.indexOf(Ie)!==-1}).length,wt=Ye,Ke=ne.fractionalPart.split(""),rt=Ke.filter(function(Ie){return x.indexOf(Ie)!==-1}).length,Fe=Ke.filter(function(Ie){return x.indexOf(Ie)!==-1||Ie===g.digit}).length,Ze=typeof ne.exponentPart=="string";Ye===0&&Fe===0&&(Ze?(rt=1,Fe=1):Ye=1),Ze&&Ye===0&&ne.integerPart.indexOf(g.digit)!==-1&&(Ye=1),Ye===0&&rt===0&&(rt=1);var In=0;return Ze&&(In=ne.exponentPart.split("").filter(function(Ie){return x.indexOf(Ie)!==-1}).length),{integerPartGroupingPositions:ze,regularGrouping:Xe,minimumIntegerPartSize:Ye,scalingFactor:wt,prefix:ne.prefix,fractionalPartGroupingPositions:mt,minimumFactionalPartSize:rt,maximumFactionalPartSize:Fe,minimumExponentSize:In,suffix:ne.suffix,picture:ne.subpicture}},Me=J.map(Ee);Me.forEach(xe);var be=Me.map(Se),Re=g["minus-sign"],et=g["zero-digit"],qe=g["decimal-separator"],st=g["grouping-separator"];be.length===1&&(be.push(JSON.parse(JSON.stringify(be[0]))),be[1].prefix=Re+be[1].prefix);var Ue;s>=0?Ue=be[0]:Ue=be[1];var Gt;Ue.picture.indexOf(g.percent)!==-1?Gt=s*100:Ue.picture.indexOf(g["per-mille"])!==-1?Gt=s*1e3:Gt=s;var pt,Rt;if(Ue.minimumExponentSize===0)pt=Gt;else{var Ms=Math.pow(10,Ue.scalingFactor),Us=Math.pow(10,Ue.scalingFactor-1);if(pt=Gt,Rt=0,pt!==0){for(;Math.abs(pt)<Us;)pt*=10,Rt-=1;for(;Math.abs(pt)>Ms;)pt/=10,Rt+=1}}var Fs=L(pt,Ue.maximumFactionalPartSize),$n=function(ne,Te){var ze=Math.abs(ne).toFixed(Te);return et!=="0"&&(ze=ze.split("").map(function(ke){return ke>="0"&&ke<="9"?x[ke.charCodeAt(0)-48]:ke}).join("")),ze},oe=$n(Fs,Ue.maximumFactionalPartSize),He=oe.indexOf(".");for(He===-1?oe=oe+qe:oe=oe.replace(".",qe);oe.charAt(0)===et;)oe=oe.substring(1);for(;oe.charAt(oe.length-1)===et;)oe=oe.substring(0,oe.length-1);He=oe.indexOf(qe);var Vt=Ue.minimumIntegerPartSize-He,Nn=Ue.minimumFactionalPartSize-(oe.length-He-1);if(oe=(Vt>0?new Array(Vt+1).join(et):"")+oe,oe=oe+(Nn>0?new Array(Nn+1).join(et):""),He=oe.indexOf(qe),Ue.regularGrouping>0)for(var Os=Math.floor((He-1)/Ue.regularGrouping),fr=1;fr<=Os;fr++)oe=[oe.slice(0,He-fr*Ue.regularGrouping),st,oe.slice(He-fr*Ue.regularGrouping)].join("");else Ue.integerPartGroupingPositions.forEach(function(ne){oe=[oe.slice(0,He-ne),st,oe.slice(He-ne)].join(""),He++});if(He=oe.indexOf(qe),Ue.fractionalPartGroupingPositions.forEach(function(ne){oe=[oe.slice(0,ne+He+1),st,oe.slice(ne+He+1)].join("")}),He=oe.indexOf(qe),(Ue.picture.indexOf(qe)===-1||He===oe.length-1)&&(oe=oe.substring(0,oe.length-1)),typeof Rt<"u"){var hr=$n(Rt,0);Vt=Ue.minimumExponentSize-hr.length,Vt>0&&(hr=new Array(Vt+1).join(et)+hr),oe=oe+g["exponent-separator"]+(Rt<0?Re:"")+hr}return oe=Ue.prefix+oe+Ue.suffix,oe}}function R(s,a){if(!(typeof s>"u")){if(s=L(s),typeof a>"u"?a=10:a=L(a),a<2||a>36)throw{code:"D3100",stack:new Error().stack,value:a};var l=s.toString(a);return l}}function k(s){var a;if(!(typeof s>"u")){if(typeof s=="number")a=s;else if(typeof s=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(s)&&!isNaN(parseFloat(s))&&isFinite(s))a=parseFloat(s);else if(typeof s=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(s))a=Number(s);else if(s===!0)a=1;else if(s===!1)a=0;else throw{code:"D3030",value:s,stack:new Error().stack,index:1};return a}}function F(s){var a;if(!(typeof s>"u"))return a=Math.abs(s),a}function j(s){var a;if(!(typeof s>"u"))return a=Math.floor(s),a}function I(s){var a;if(!(typeof s>"u"))return a=Math.ceil(s),a}function L(s,a){var l;if(!(typeof s>"u")){if(a){var v=s.toString().split("e");s=+(v[0]+"e"+(v[1]?+v[1]+a:a))}l=Math.round(s);var g=l-s;return Math.abs(g)===.5&&Math.abs(l%2)===1&&(l=l-1),a&&(v=l.toString().split("e"),l=+(v[0]+"e"+(v[1]?+v[1]-a:-a))),Object.is(l,-0)&&(l=0),l}}function q(s){var a;if(!(typeof s>"u")){if(s<0)throw{stack:new Error().stack,code:"D3060",index:1,value:s};return a=Math.sqrt(s),a}}function K(s,a){var l;if(!(typeof s>"u")){if(l=Math.pow(s,a),!isFinite(l))throw{stack:new Error().stack,code:"D3061",index:1,value:s,exp:a};return l}}function he(){return Math.random()}function ue(s){if(!(typeof s>"u")){var a=!1;if(Array.isArray(s)){if(s.length===1)a=ue(s[0]);else if(s.length>1){var l=s.filter(function(v){return ue(v)});a=l.length>0}}else typeof s=="string"?s.length>0&&(a=!0):b(s)?s!==0&&(a=!0):s!==null&&typeof s=="object"&&!w(s)?o.keys(s).length>0&&(a=!0):typeof s=="boolean"&&s===!0&&(a=!0);return a}}function te(s){if(!(typeof s>"u"))return!ue(s)}function Q(s,a,l,v){var g=[a],x=N(s);return x>=2&&g.push(l),x>=3&&g.push(v),g}async function le(s,a){if(!(typeof s>"u")){for(var l=this.createSequence(),v=0;v<s.length;v++){var g=Q(a,s[v],v,s),x=await a.apply(this,g);typeof x<"u"&&l.push(x)}return l}}async function ee(s,a){if(!(typeof s>"u")){for(var l=this.createSequence(),v=0;v<s.length;v++){var g=s[v],x=Q(a,g,v,s),$=await a.apply(this,x);ue($)&&l.push(g)}return l}}async function Ne(s,a){if(!(typeof s>"u")){for(var l=!1,v,g=0;g<s.length;g++){var x=s[g],$=!0;if(typeof a<"u"){var B=Q(a,x,g,s),se=await a.apply(this,B);$=ue(se)}if($)if(!l)v=x,l=!0;else throw{stack:new Error().stack,code:"D3138",index:g}}if(!l)throw{stack:new Error().stack,code:"D3139"};return v}}function Qe(){for(var s=[],a=Array.prototype.slice.call(arguments),l=Math.min.apply(Math,a.map(function(x){return Array.isArray(x)?x.length:0})),v=0;v<l;v++){var g=a.map(x=>x[v]);s.push(g)}return s}async function Be(s,a,l){if(!(typeof s>"u")){var v,g=N(a);if(g<2)throw{stack:new Error().stack,code:"D3050",index:1};var x;for(typeof l>"u"&&s.length>0?(v=s[0],x=1):(v=l,x=0);x<s.length;){var $=[v,s[x]];g>=3&&$.push(x),g>=4&&$.push(s),v=await a.apply(this,$),x++}return v}}function Le(s){var a=this.createSequence();if(Array.isArray(s)){for(var l=Object.create(null),v=0;v<s.length;v++){var g=Le.call(this,s[v]);g.forEach(function(x){l[x]=!0})}a=Le.call(this,l)}else s!==null&&typeof s=="object"&&!w(s)&&o.keys(s).forEach(x=>a.push(x));return a}function je(s,a){var l;if(Array.isArray(s)){l=this.createSequence();for(var v=0;v<s.length;v++){var g=je.call(this,s[v],a);typeof g<"u"&&(Array.isArray(g)?g.forEach(x=>l.push(x)):l.push(g))}}else s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,a)&&!w(s)&&(l=s[a]);return l}function ot(s,a){if(typeof s>"u")return a;if(typeof a>"u")return s;Array.isArray(s)||(s=this.createSequence(s)),Array.isArray(a)||(a=[a]);const l=s.length+a.length;if(this.options&&l>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};return s.concat(a)}function Pt(s){return!(typeof s>"u")}function Ct(s){var a=this.createSequence();if(Array.isArray(s))for(var l=0;l<s.length;l++)a=ot.call(this,a,Ct.call(this,s[l]));else if(s!==null&&typeof s=="object"&&!P(s))for(const g of o.keys(s)){var v=Object.create(null);v[g]=s[g],a.push(v)}else a=s;return a}function H(s){if(!(typeof s>"u")){var a=Object.create(null);return s.forEach(function(l){for(const v of o.keys(l))a[v]=l[v]}),a}}function cr(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var a=s.length,l=new Array(a),v=0;v<a;v++)l[a-v-1]=s[v];return l}}async function lr(s,a){var l=this.createSequence();for(const x of o.keys(s)){var v=Q(a,s[x],x,s),g=await a.apply(this,v);typeof g<"u"&&l.push(g)}return l}function tt(s){throw{code:"D3137",stack:new Error().stack,message:s||"$error() function evaluated"}}function zt(s,a){if(!s)throw{code:"D3141",stack:new Error().stack,message:a||"$assert() statement failed"}}function it(s){if(s!==void 0)return s===null?"null":b(s)?"number":typeof s=="string"?"string":typeof s=="boolean"?"boolean":Array.isArray(s)?"array":w(s)?"function":"object"}async function yt(s,a){if(!(typeof s>"u")){if(s.length<=1)return s;var l;if(typeof a>"u"){if(!M(s)&&!T(s))throw{stack:new Error().stack,code:"D3070",index:1};l=async function($,B){return $>B}}else l=a;var v=async function($,B){var se=async function(Ee,xe,Se){xe.length===0?Array.prototype.push.apply(Ee,Se):Se.length===0?Array.prototype.push.apply(Ee,xe):await l(xe[0],Se[0])?(Ee.push(Se[0]),await se(Ee,xe,Se.slice(1))):(Ee.push(xe[0]),await se(Ee,xe.slice(1),Se))},J=[];return await se(J,$,B),J},g=async function($){if(!Array.isArray($)||$.length<=1)return $;var B=Math.floor($.length/2),se=$.slice(0,B),J=$.slice(B);return se=await g(se),J=await g(J),await v(se,J)},x=await g(s);return x}}function c(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var a=new Array(s.length),l=0;l<s.length;l++){var v=Math.floor(Math.random()*(l+1));l!==v&&(a[l]=a[v]),a[v]=s[l]}return a}}function f(s){if(!(typeof s>"u")){if(!Array.isArray(s)||s.length<=1)return s;for(var a=S(s)?this.createSequence():[],l=0;l<s.length;l++){for(var v=s[l],g=!1,x=0;x<a.length;x++)if(Z(v,a[x])){g=!0;break}g||a.push(v)}return a}}async function p(s,a){var l=Object.create(null);for(const $ of o.keys(s)){var v=s[$],g=Q(a,v,$,s),x=await a.apply(this,g);ue(x)&&(l[$]=v)}return o.keys(l).length===0&&(l=void 0),l}return{sum:E,count:m,max:U,min:_,average:C,string:z,substring:O,substringBefore:re,substringAfter:ae,lowercase:_e,uppercase:ge,length:pe,trim:Pe,pad:Je,match:We,contains:me,replace:ie,split:Ae,join:we,formatNumber:A,formatBase:R,number:k,floor:j,ceil:I,round:L,abs:F,sqrt:q,power:K,random:he,boolean:ue,not:te,map:le,zip:Qe,filter:ee,single:Ne,foldLeft:Be,sift:p,keys:Le,lookup:je,append:ot,exists:Pt,spread:Ct,merge:H,reverse:cr,each:lr,error:tt,assert:zt,type:it,sort:yt,shuffle:c,distinct:f,base64encode:Ce,base64decode:nt,encodeUrlComponent:d,encodeUrl:y,decodeUrlComponent:G,decodeUrl:fe}})();r.exports=h}).call(this)}).call(this,typeof vn<"u"?vn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,r,i){var u=t("./datetime"),o=t("./functions"),h=t("./utils"),b=t("./parser"),T=t("./signature"),M=(function(){var S=h.isNumeric,w=h.isArrayOfStrings,P=h.isArrayOfNumbers,D=h.isSequence,N=h.isFunction,Z=h.isLambda,Y=h.isIterable,E=h.isPromise,m=h.getFunctionArity,U=h.isDeepEqual,_=tt(null);async function C(c,f,p){var s;p.base.depth++,p.base.guardrails();var a=p.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(a&&await a(c,f,p),c.type){case"path":s=await z(c,f,p);break;case"binary":s=await pe(c,f,p);break;case"unary":s=await Pe(c,f,p);break;case"name":s=Je(c,f,p);break;case"string":case"number":case"value":s=ce(c);break;case"wildcard":s=me(c,f,p);break;case"descendant":s=ie(c,f,p);break;case"parent":s=p.lookup(c.slot.label);break;case"condition":s=await j(c,f,p);break;case"block":s=await I(c,f,p);break;case"bind":s=await F(c,f,p);break;case"regex":s=L(c,f,p);break;case"function":s=await Q(c,f,p);break;case"variable":s=q(c,f,p);break;case"lambda":s=Ne(c,f,p);break;case"partial":s=await Qe(c,f,p);break;case"apply":s=await te(c,f,p);break;case"transform":s=he(c,f,p);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var l=0;l<c.predicate.length;l++)s=await ge(c.predicate[l].expr,s,p);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(s=await A(c.group,s,p));var v=p.lookup(Symbol.for("jsonata.__evaluate_exit"));return v&&await v(c,f,p,s),s&&D(s)&&!s.tupleStream&&(c.keepArray&&(s.keepSingleton=!0),s.length===0?s=void 0:s.length===1&&(s=s.keepSingleton?s:s[0])),p.base.depth--,s}async function z(c,f,p){var s;Array.isArray(f)&&c.steps[0].type!=="variable"?s=f:s=p.base.createSequence(f);for(var a,l=!1,v=void 0,g=0;g<c.steps.length;g++){var x=c.steps[g];if(x.tuple&&(l=!0),g===0&&x.consarray?a=await C(x,s,p):l?v=await _e(x,s,v,p):a=await re(x,s,p,g===c.steps.length-1),!l&&(typeof a>"u"||a.length===0))break;typeof x.focus>"u"&&(s=a)}if(l)if(c.tuple)a=v;else for(a=p.base.createSequence(),g=0;g<v.length;g++)a.push(v[g]["@"]);return c.keepSingletonArray&&(Array.isArray(a)&&a.cons&&!a.sequence&&(a=p.base.createSequence(a)),a.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(a=await A(c.group,l?v:a,p)),a}function O(c,f){var p=tt(c);for(const s of h.keys(f))p.bind(s,f[s]);return p}async function re(c,f,p,s){var a;if(c.type==="sort")return a=await K(c,f,p),c.stages&&(a=await ae(c.stages,a,p)),a;a=p.base.createSequence();for(var l=0;l<f.length;l++){var v=await C(c,f[l],p);if(c.stages)for(var g=0;g<c.stages.length;g++)v=await ge(c.stages[g].expr,v,p);typeof v<"u"&&a.push(v)}var x=p.base.createSequence();return s&&a.length===1&&Array.isArray(a[0])&&!D(a[0])?x=a[0]:Array.prototype.forEach.call(a,function($){!Array.isArray($)||$.cons?x.push($):Array.prototype.forEach.call($,B=>x.push(B))}),x}async function ae(c,f,p){for(var s=f,a=0;a<c.length;a++){var l=c[a];switch(l.type){case"filter":s=await ge(l.expr,s,p);break;case"index":for(var v=0;v<s.length;v++){var g=s[v];g[l.value]=v}break}}return s}async function _e(c,f,p,s){var a;if(c.type==="sort"){if(p)a=await K(c,p,s);else{var l=await K(c,f,s);a=s.base.createSequence(),a.tupleStream=!0;for(var v=0;v<l.length;v++){var g={"@":l[v]};g[c.index]=v,a.push(g)}}return c.stages&&(a=await ae(c.stages,a,s)),a}a=s.base.createSequence(),a.tupleStream=!0;var x=s;p===void 0&&(p=f.map(J=>({"@":J})));for(var $=0;$<p.length;$++){x=O(s,p[$]);var B=await C(c,p[$]["@"],x);if(typeof B<"u"){Array.isArray(B)||(B=[B]);for(var se=0;se<B.length;se++)g=Object.create(null),Object.assign(g,p[$]),B.tupleStream?Object.assign(g,B[se]):(c.focus?(g[c.focus]=B[se],g["@"]=p[$]["@"]):g["@"]=B[se],c.index&&(g[c.index]=se),c.ancestor&&(g[c.ancestor.label]=p[$]["@"])),a.push(g)}}return c.stages&&(a=await ae(c.stages,a,s)),a}async function ge(c,f,p){var s=p.base.createSequence();if(f&&f.tupleStream&&(s.tupleStream=!0),Array.isArray(f)||(f=p.base.createSequence(f)),c.type==="number"){var a=Math.floor(c.value);a<0&&(a=f.length+a);var l=await f[a];typeof l<"u"&&(Array.isArray(l)?s=l:s.push(l))}else for(a=0;a<f.length;a++){var l=f[a],v=l,g=p;f.tupleStream&&(v=l["@"],g=O(p,l));var x=await C(c,v,g);S(x)&&(x=[x]),P(x)?Array.prototype.forEach.call(x,function(B){var se=Math.floor(B);se<0&&(se=f.length+se),se===a&&s.push(l)}):o.boolean(x)&&s.push(l)}return s}async function pe(c,f,p){var s,a=await C(c.lhs,f,p),l=c.value,v=async()=>await C(c.rhs,f,p);if(l==="and"||l==="or")try{return await fe(a,v,l)}catch(x){throw x.position=c.position,x.token=l,x}var g=await v();try{switch(l){case"+":case"-":case"*":case"/":case"%":s=nt(a,g,l);break;case"=":case"!=":s=d(a,g,l);break;case"<":case"<=":case">":case">=":s=y(a,g,l);break;case"&":s=we(a,g);break;case"..":s=k(a,g,p);break;case"in":s=G(a,g);break}}catch(x){throw x.position=c.position,x.token=l,x}return s}async function Pe(c,f,p){var s,a={options:p.base.options,createSequence:p.base.createSequence};switch(c.value){case"-":if(s=await C(c.expression,f,p),typeof s>"u")s=void 0;else if(S(s))s=-s;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:s};break;case"[":s=[];let g=await Promise.all(c.expressions.map(async(x,$)=>(p.isParallelCall=$>0,[x,await C(x,f,p)])));for(let x of g){var[l,v]=x;typeof v<"u"&&(l.value==="["?s.push(v):s=o.append.call(a,s,v))}c.consarray&&Object.defineProperty(s,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":s=await A(c,f,p);break}return s}function Je(c,f,p){var s={createSequence:p.base.createSequence};return o.lookup.call(s,f,c.value)}function ce(c){return c.value}function me(c,f,p){var s={options:p.base.options,createSequence:p.base.createSequence},a=s.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!N(f)&&h.keys(f).forEach(function(l){var v=f[l];Array.isArray(v)?(v=We(v),a=o.append.call(s,a,v)):a.push(v)}),a}function We(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){We(p,f)}):f.push(c),f}function ie(c,f,p){var s,a=p.base.createSequence();return typeof f<"u"&&(Ce(f,a),a.length===1?s=a[0]:s=a),s}function Ce(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){Ce(p,f)}):c!==null&&typeof c=="object"&&!N(c)&&h.keys(c).forEach(function(p){Ce(c[p],f)})}function nt(c,f,p){var s;if(typeof c<"u"&&!S(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!S(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return s;switch(p){case"+":s=c+f;break;case"-":s=c-f;break;case"*":s=c*f;break;case"/":s=c/f;break;case"%":s=c%f;break}return s}function d(c,f,p){var s,a=typeof c,l=typeof f;if(a==="undefined"||l==="undefined")return!1;switch(p){case"=":s=U(c,f);break;case"!=":s=!U(c,f);break}return s}function y(c,f,p){var s,a=typeof c,l=typeof f,v=a==="undefined"||a==="string"||a==="number",g=l==="undefined"||l==="string"||l==="number";if(!v||!g)throw{code:"T2010",stack:new Error().stack,value:a==="string"||a==="number"?f:c};if(!(a==="undefined"||l==="undefined")){if(a!==l)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(p){case"<":s=c<f;break;case"<=":s=c<=f;break;case">":s=c>f;break;case">=":s=c>=f;break}return s}}function G(c,f){var p=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var s=0;s<f.length;s++)if(f[s]===c){p=!0;break}return p}async function fe(c,f,p){var s,a=Ae(c);switch(p){case"and":s=a&&Ae(await f());break;case"or":s=a||Ae(await f());break}return s}function Ae(c){var f=o.boolean(c);return typeof f>"u"?!1:f}function we(c,f){var p,s="",a="";return typeof c<"u"&&(s=o.string(c)),typeof f<"u"&&(a=o.string(f)),p=s.concat(a),p}async function A(c,f,p){var s=Object.create(null),a=Object.create(null),l=!!(f&&f.tupleStream),v={options:p.base.options,createSequence:p.base.createSequence};Array.isArray(f)||(p.base.options,f=v.createSequence(f)),f.length===0&&!l&&f.push(void 0);for(var g=0;g<f.length;g++)for(var x=f[g],$=l?O(p,x):p,B=0;B<c.lhs.length;B++){var se=c.lhs[B],J=await C(se[0],l?x["@"]:x,$);if(typeof J!="string"&&J!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:J};if(J!==void 0){if(J==="_jsonata_lambda"||J==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:J};var Ee={data:x,exprIndex:B};if(Object.prototype.hasOwnProperty.call(a,J)){if(a[J].exprIndex!==B)throw{code:"D1009",stack:new Error().stack,position:c.position,value:J};a[J].data=o.append.call(v,a[J].data,x)}else a[J]=Ee}}let xe=await Promise.all(h.keys(a).map(async(Me,be)=>{let Re=a[Me];var et=Re.data,qe=p;if(l){var st=R(Re.data,p);et=st["@"],delete st["@"],qe=O(p,st)}return p.isParallelCall=be>0,[Me,await C(c.lhs[Re.exprIndex][1],et,qe)]}));for(let Me of xe){var[J,Se]=await Me;typeof Se<"u"&&(s[J]=Se)}return s}function R(c,f){if(!Array.isArray(c))return c;var p=Object.create(null),s={options:f.base.options,createSequence:f.base.createSequence};Object.assign(p,c[0]);for(var a=1;a<c.length;a++)for(const l of h.keys(c[a]))p[l]=o.append.call(s,p[l],c[a][l]);return p}function k(c,f,p){var s;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return s;var a=f-c+1;if(a>1e7)throw{code:"D2014",stack:new Error().stack,value:a};if(p.base.options&&a>p.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:a};s=new Array(a);for(var l=c,v=0;l<=f;l++,v++)s[v]=l;return s.sequence=!0,s}async function F(c,f,p){var s=await C(c.rhs,f,p);return p.bind(c.lhs.value,s),s}async function j(c,f,p){var s,a=await C(c.condition,f,p);return o.boolean(a)?s=await C(c.then,f,p):typeof c.else<"u"&&(s=await C(c.else,f,p)),s}async function I(c,f,p){for(var s,a=tt(p),l=0;l<c.expressions.length;l++)s=await C(c.expressions[l],f,a);return s}function L(c,f,p){var s=new p.base.RegexEngine(c.value),a=function(l,v){var g;s.lastIndex=v||0;var x=s.exec(l);if(x!==null){if(g={match:x[0],start:x.index,end:x.index+x[0].length,groups:[]},x.length>1)for(var $=1;$<x.length;$++)g.groups.push(x[$]);g.next=function(){if(!(s.lastIndex>=l.length)){var B=a(l,s.lastIndex);if(B&&B.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return B}}}return g};return a}function q(c,f,p){var s;return c.value===""?s=f&&f.outerWrapper?f[0]:f:s=p.lookup(c.value),s}async function K(c,f,p){var s,a=f,l=!!f.tupleStream,v=async function(x,$){for(var B=0,se=0;B===0&&se<c.terms.length;se++){var J=c.terms[se],Ee=x,xe=p;l&&(Ee=x["@"],xe=O(p,x));var Se=await C(J.expression,Ee,xe);Ee=$,xe=p,l&&(Ee=$["@"],xe=O(p,$));var Me=await C(J.expression,Ee,xe),be=typeof Se,Re=typeof Me;if(be==="undefined"){B=Re==="undefined"?0:1;continue}if(Re==="undefined"){B=-1;continue}if(!(be==="string"||be==="number")||!(Re==="string"||Re==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:be==="string"||be==="number"?Me:Se};if(be!==Re)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Se,value2:Me};Se!==Me&&(Se<Me?B=-1:B=1,J.descending===!0&&(B=-B))}return B===1},g={environment:p,input:f};return s=await o.sort.apply(g,[a,v]),s}function he(c,f,p){var s=async function(a){if(!(typeof a>"u")){var l=p.lookup("clone");if(!N(l))throw{code:"T2013",stack:new Error().stack,position:c.position};var v=await le(l,[a],null,p),g=await C(c.pattern,v,p);if(typeof g<"u"){Array.isArray(g)||(g=[g]);for(var x=0;x<g.length;x++){var $=g[x],B=await C(c.update,$,p),se=typeof B;if(se!=="undefined"){if(se!=="object"||B===null||Array.isArray(B))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:B};for(const Se of h.keys(B))$[Se]=B[Se]}if(typeof c.delete<"u"){var J=await C(c.delete,$,p);if(typeof J<"u"){var Ee=J;if(Array.isArray(J)||(J=[J]),!w(J))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:Ee};for(var xe=0;xe<J.length;xe++)typeof $=="object"&&$!==null&&delete $[J[xe]]}}}}return v}};return H(s,"<(oa):o>")}var ue=b("function($f, $g) { function($x){ $g($f($x)) } }");async function te(c,f,p){var s,a=await C(c.lhs,f,p);if(c.rhs.type==="function")s=await Q(c.rhs,f,p,{context:a});else{var l=await C(c.rhs,f,p);if(!N(l))throw{code:"T2006",stack:new Error().stack,position:c.position,value:l};if(N(a)){var v=await C(ue,null,p);s=await le(v,[a,l],null,p)}else s=await le(l,[a],null,p)}return s}async function Q(c,f,p,s){var a,l=await C(c.procedure,f,p);if(typeof l>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var v=[];typeof s<"u"&&v.push(s.context);for(var g=0;g<c.arguments.length;g++){const $=await C(c.arguments[g],f,p);if(N($)){const B=async function(...se){return await le($,se,null,p)};B.arity=m($),v.push(B)}else v.push($)}var x=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof l=="object"&&(l.token=x,l.position=c.position),a=await le(l,v,f,p)}catch($){throw $.position||($.position=c.position),$.token||($.token=x),$}return a}async function le(c,f,p,s){var a;for(a=await ee(c,f,p,s);Z(a)&&a.thunk===!0;){var l=await C(a.body.procedure,a.input,a.environment);a.body.procedure.type==="variable"&&(l.token=a.body.procedure.value),l.position=a.body.procedure.position;for(var v=[],g=0;g<a.body.arguments.length;g++)v.push(await C(a.body.arguments[g],a.input,a.environment));a=await ee(l,v,p,s)}return a}async function ee(c,f,p,s){var a;try{var l=f;if(c&&(l=Be(c.signature,f,p)),Z(c))a=await Le(c,l);else if(c&&c._jsonata_function===!0){var v={environment:s,input:p,options:s.base.options,createSequence:s.base.createSequence};a=c.implementation.apply(v,l),Y(a)&&(a=a.next().value),E(a)&&(a=await a)}else if(typeof c=="function")a=c.apply(p,l),E(a)&&(a=await a);else throw{code:"T1006",stack:new Error().stack}}catch(g){throw c&&(typeof g.token>"u"&&typeof c.token<"u"&&(g.token=c.token),g.position=c.position||g.position),g}return a}function Ne(c,f,p){var s={_jsonata_lambda:!0,input:f,environment:p,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(s.thunk=!0),s.apply=async function(a,l){return await le(s,l,f,a?a.environment:p)},s}async function Qe(c,f,p){for(var s,a=[],l=0;l<c.arguments.length;l++){var v=c.arguments[l];v.type==="operator"&&v.value==="?"?a.push(v):a.push(await C(v,f,p))}var g=await C(c.procedure,f,p);if(typeof g>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(Z(g))s=je(g,a,p);else if(g&&g._jsonata_function===!0)s=ot(g.implementation,a,p);else if(typeof g=="function")s=ot(g,a,p);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return s}function Be(c,f,p){if(typeof c>"u")return f;var s=c.validate(f,p);return s}async function Le(c,f){var p,s=tt(c.environment);return Array.prototype.forEach.call(c.arguments,function(a,l){s.bind(a.value,f[l])}),typeof c.body=="function"?p=await Pt(c.body,s):p=await C(c.body,c.input,s),p}function je(c,f,p){var s=tt(c.environment||p),a=[];Array.prototype.forEach.call(c.arguments,function(v,g){var x=f[g];x&&x.type==="operator"&&x.value==="?"?a.push(v):s.bind(v.value,x)});var l={_jsonata_lambda:!0,input:c.input,environment:s,arguments:a,body:c.body};return l}function ot(c,f,p){var s=Ct(c);s=s.map(function(g){return"$"+g.trim()});var a="function("+s.join(", ")+"){ _ }",l=b(a);l.body=c;var v=je(l,f,p);return v}async function Pt(c,f){var p=Ct(c),s=p.map(function(v){return f.lookup(v.trim())}),a={environment:f,createSequence:f.base.createSequence},l=c.apply(a,s);return E(l)&&(l=await l),l}function Ct(c){var f=c.toString(),p=/\(([^)]*)\)/.exec(f)[1],s=p.split(",");return s}function H(c,f){var p={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(p.signature=T(f)),p}async function cr(c,f){if(!(typeof c>"u")){var p=this.input;typeof f<"u"&&(p=f,Array.isArray(p)&&!D(p)&&(p=this.createSequence(p),p.outerWrapper=!0));try{var s=b(c,!1)}catch(l){throw it(l),{stack:new Error().stack,code:"D3120",value:l.message,error:l}}try{var a=await C(s,p,this.environment)}catch(l){throw it(l),{stack:new Error().stack,code:"D3121",value:l.message,error:l}}return a}}function lr(c){if(!(typeof c>"u"))return JSON.parse(o.string(c))}function tt(c){var f=Object.create(null);const p={bind:function(a,l){f[a]=l},lookup:function(a){var l;return Object.prototype.hasOwnProperty.call(f,a)?l=f[a]:c&&(l=c.lookup(a)),l},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var s=c.lookup(Symbol.for("jsonata.__createFrame_push"));s&&s(c,p),p.base=c.base}return p}_.bind("sum",H(o.sum,"<a<n>:n>")),_.bind("count",H(o.count,"<a:n>")),_.bind("max",H(o.max,"<a<n>:n>")),_.bind("min",H(o.min,"<a<n>:n>")),_.bind("average",H(o.average,"<a<n>:n>")),_.bind("string",H(o.string,"<x-b?:s>")),_.bind("substring",H(o.substring,"<s-nn?:s>")),_.bind("substringBefore",H(o.substringBefore,"<s-s:s>")),_.bind("substringAfter",H(o.substringAfter,"<s-s:s>")),_.bind("lowercase",H(o.lowercase,"<s-:s>")),_.bind("uppercase",H(o.uppercase,"<s-:s>")),_.bind("length",H(o.length,"<s-:n>")),_.bind("trim",H(o.trim,"<s-:s>")),_.bind("pad",H(o.pad,"<s-ns?:s>")),_.bind("match",H(o.match,"<s-f<s:o>n?:a<o>>")),_.bind("contains",H(o.contains,"<s-(sf):b>")),_.bind("replace",H(o.replace,"<s-(sf)(sf)n?:s>")),_.bind("split",H(o.split,"<s-(sf)n?:a<s>>")),_.bind("join",H(o.join,"<a<s>s?:s>")),_.bind("formatNumber",H(o.formatNumber,"<n-so?:s>")),_.bind("formatBase",H(o.formatBase,"<n-n?:s>")),_.bind("formatInteger",H(u.formatInteger,"<n-s:s>")),_.bind("parseInteger",H(u.parseInteger,"<s-s:n>")),_.bind("number",H(o.number,"<(nsb)-:n>")),_.bind("floor",H(o.floor,"<n-:n>")),_.bind("ceil",H(o.ceil,"<n-:n>")),_.bind("round",H(o.round,"<n-n?:n>")),_.bind("abs",H(o.abs,"<n-:n>")),_.bind("sqrt",H(o.sqrt,"<n-:n>")),_.bind("power",H(o.power,"<n-n:n>")),_.bind("random",H(o.random,"<:n>")),_.bind("boolean",H(o.boolean,"<x-:b>")),_.bind("not",H(o.not,"<x-:b>")),_.bind("map",H(o.map,"<af>")),_.bind("zip",H(o.zip,"<a+>")),_.bind("filter",H(o.filter,"<af>")),_.bind("single",H(o.single,"<af?>")),_.bind("reduce",H(o.foldLeft,"<afj?:j>")),_.bind("sift",H(o.sift,"<o-f?:o>")),_.bind("keys",H(o.keys,"<x-:a<s>>")),_.bind("lookup",H(o.lookup,"<x-s:x>")),_.bind("append",H(o.append,"<xx:a>")),_.bind("exists",H(o.exists,"<x:b>")),_.bind("spread",H(o.spread,"<x-:a<o>>")),_.bind("merge",H(o.merge,"<a<o>:o>")),_.bind("reverse",H(o.reverse,"<a:a>")),_.bind("each",H(o.each,"<o-f:a>")),_.bind("error",H(o.error,"<s?:x>")),_.bind("assert",H(o.assert,"<bs?:x>")),_.bind("type",H(o.type,"<x:s>")),_.bind("sort",H(o.sort,"<af?:a>")),_.bind("shuffle",H(o.shuffle,"<a:a>")),_.bind("distinct",H(o.distinct,"<x:x>")),_.bind("base64encode",H(o.base64encode,"<s-:s>")),_.bind("base64decode",H(o.base64decode,"<s-:s>")),_.bind("encodeUrlComponent",H(o.encodeUrlComponent,"<s-:s>")),_.bind("encodeUrl",H(o.encodeUrl,"<s-:s>")),_.bind("decodeUrlComponent",H(o.decodeUrlComponent,"<s-:s>")),_.bind("decodeUrl",H(o.decodeUrl,"<s-:s>")),_.bind("eval",H(cr,"<sx?:x>")),_.bind("toMillis",H(u.toMillis,"<s-s?:n>")),_.bind("fromMillis",H(u.fromMillis,"<n-s?s?:s>")),_.bind("clone",H(lr,"<(oa)-:o>"));var zt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function it(c){var f=zt[c.code];if(typeof f<"u"){var p=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});p=p.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=p}}function yt(c,f){var p,s;try{p=b(c,f&&f.recover),s=p.errors,delete p.errors}catch(v){throw it(v),v}var a=tt(_),l=new Date;return a.bind("now",H(function(v,g){return u.fromMillis(l.getTime(),v,g)},"<s?s?:s>")),a.bind("millis",H(function(){return l.getTime()},"<:n>")),{evaluate:async function(v,g,x){if(typeof s<"u"){var $={code:"S0500",position:0};throw it($),$}const B=tt(a);for(const J of h.keys(g))B.bind(J,g[J]);if(B.bind("$",v),l=new Date,B.timestamp=l,B.options=f,B.createSequence=function(){var J=[];return f&&f.sequence&&(J.push=function(...Ee){if(J.length+Ee.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(J,Ee)}),J.sequence=!0,arguments.length===1&&J.push(arguments[0]),J},Array.isArray(v)&&!D(v)&&(v=B.createSequence(v),v.outerWrapper=!0),f&&(f.timeout||f.stack)){const J=Date.now();B.guardrails=function(){if(f.stack>0&&B.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-J>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else B.guardrails=function(){};B.base=B,B.depth=0,f&&f.RegexEngine?B.RegexEngine=f.RegexEngine:B.RegexEngine=RegExp;var se;try{return se=await C(p,v,B),typeof x=="function"&&x(null,se),se}catch(J){throw it(J),J}},assign:function(v,g){a.bind(v,g)},registerFunction:function(v,g,x){var $=H(g,x);a.bind(v,$)},ast:function(){return p},errors:function(){return s}}}return yt.parser=b,yt})();r.exports=M},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,r,i){var u=t("./signature");const o=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},b={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
31
|
+
*/function hi(n){return X({...n,state:!0,attribute:!1})}const _r="1";function di(n){const e=n.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let at=class Ge{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const r=t.indexOf("=");return e[t.substring(0,r).trim()]=t.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let r=e;for(;r;){if(!t(r))return;r=r.parentNode||r.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(Ge.overflowMatches(i,t))return r}r=Ge.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return Ge.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ge.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const r of Ge.scopeAttributeNames(t))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const u=Ge.readScopeAttributeOnElement(r,t);if(u!=null)return u}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const t=Ge.getAncestorAttributeValue(e,"token"),r=Ge.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=Ge.getAncestorAttributeValue(e,"serviceURL");let u=null,o=null;const h=Ge.getAncestorAttributeValue(e,"tokenProvider"),b=Ge.getAncestorAttributeValue(e,"eventsApiToken");t||(u=Ge.getAncestorAttributeValue(e,"userName"),o=Ge.getAncestorAttributeValue(e,"password"));const T=Ge.getAncestorAttributeValue(e,"credentials")||void 0,M=e.getAttribute("cache"),S=e.hasAttribute("blockUntilDone"),w=e.hasAttribute("keepAlive");return{serviceURL:i,token:t,userName:u,password:o,authToken:b,tokenProvider:h,addHTTPResponse:r,credentials:T,cache:M,blockUntilDone:S,keepAlive:w}}static getClosestElement(e,t){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===t);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return Ge.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const r=new Set(t.map(o=>o.toLowerCase())),i=[];let u=e.parentNode||e.host;for(;u;)u instanceof Element&&r.has(u.tagName.toLowerCase())&&i.push(u),u=u.parentNode||u.host;return i}static getAncestorsBySelectors(e,t){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const u of t)try{if(i.matches(u)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!di(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(u=>u.src===t);if(r)return r.dataset.concordeLoaded===_r?!0:new Promise(u=>{let o=!1;const h=T=>{o||(o=!0,T&&(r.dataset.concordeLoaded=_r),u(T))};r.addEventListener("load",()=>h(!0),{once:!0}),r.addEventListener("error",()=>h(!1),{once:!0});const b=r.readyState;if(b==="complete"||b==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||h(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(u=>{const o=document.createElement("script");o.src=e,i&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded=_r,u(!0)},o.onerror=()=>u(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(t=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>t(!0),r.onerror=()=>t(!0),document.head.appendChild(r)})}};function an(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.getFrameCanvas=="function"&&typeof e.frameSeq=="number"}function on(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.registerFrameConsumer=="function"&&typeof e.unregisterFrameConsumer=="function"}class pi{constructor(){this.tokens=new Map}sync(e){const t=new Set;for(const r of e)r&&on(r)&&t.add(r);for(const[r,i]of[...this.tokens])t.has(r)||(on(r)&&r.unregisterFrameConsumer(i),this.tokens.delete(r));for(const r of t){if(this.tokens.has(r))continue;const i={};r.registerFrameConsumer(i),this.tokens.set(r,i)}}clear(){this.sync([])}}const un="#__sonic_frame_";let mi=0;const Ar=new Map,cn=new WeakMap;function gi(n){const e=cn.get(n);if(e)return e;const t=`${un}${++mi}`;return Ar.set(t,n),cn.set(n,t),t}function vi(n){if(!n.startsWith(un))return null;const e=Ar.get(n)??null;return e&&!e.isConnected?(Ar.delete(n),null):e}function bi(n){if(n==null)return null;if(typeof n=="string"){const e=n.trim();return e?e.startsWith("#")?e:`#${e}`:null}return typeof Element<"u"&&n instanceof Element?n.id?`#${n.id}`:gi(n):null}function xr(n){return typeof n!="string"?null:n.trim()||null}function yi(n){if(n==null||n==="")return null;if(typeof n=="string")return xr(n);if(typeof n!="object")return null;const e=n;return xr(e.url)??xr(e.blobUrl)}function It(n){for(const e of n)try{URL.revokeObjectURL(e)}catch{}}let wi=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},ln="sonic";typeof __SONIC_PREFIX__<"u"&&(ln=__SONIC_PREFIX__);let fn=ln.replace(/-([a-z])/g,n=>n[1].toUpperCase());const Ei=fn.charAt(0).toUpperCase()+fn.slice(1);let _i=class Et{static areEqual(e,t){return e.length===t.length?e.every((r,i)=>r===t[i]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(r=>t=t.concat(r)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const r=(e[0]||{})[t];return e.every(i=>(i||{})[t]==r)}})})}),value:()=>({forKey:t=>Et.from(e.map(r=>r[t]))}),copy:()=>({fromKey:t=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[t])?[...i[t]]:typeof i[t]=="object"&&i[t]!=null?{...i[t]}:i[t]})}})})}),map:t=>Et.from(e.map(t)),filter:t=>Et.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const r=[],i=new Map;for(const u of e){const o=u[t];if(!i.has(o)){const h=r.length;i.set(o,h);const b={items:[]};b[t]=o,r.push(b)}r[i.get(o)].items.push(u)}return Et.from(r)}}),without:()=>({duplicates:()=>({forKey:t=>{const r=[...new Set(e.map(i=>i[t]))];return Et.from(r.map(i=>e.find(u=>u[t]==i)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:r=>{const i=(u,o)=>h=>u[o]!=h[o];return Et.from(e.filter(u=>t.every(i(u,r))))}})})})}}},Sr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",r="long"){t||(t=at.getLanguage());const i=(T,M)=>[Math.floor(T/M),T%M];function u(T,M,S){return new Intl.NumberFormat(T,{style:"unit",unit:M,unitDisplay:S}).format}const[o,h]=i(e,60),b=[];return o&&b.push(u(t,"hour",r)(o)),h&&b.push(u(t,"minute",r)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(b)}static js(e){try{return Function("return "+e)()}catch{return""}}};class hn{constructor(e){this.path=e}toString(){return this.path}}function dn(n){return new Proxy(n,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const r=e.path?`${e.path}.${String(t)}`:String(t);return dn(new hn(r))}})}const Ai=/\$\{|\{\$/;function xi(n){return Ai.test(n)}function Si(n){const e=n;if(xi(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Qt=function(n){return this instanceof Qt?dn(new hn(n)):new Qt(n)};let er=class ct{static shallowEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const o of i){const h=e[o],b=t[o];if(r?h!==b:h!=b)return!1}return!0}static deepEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const o of i){const h=e[o],b=t[o],T=ct.isObject(h)&&ct.isObject(b),M=r?h!==b:h!=b;if(T&&!ct.deepEqual(h,b)||!T&&M)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ct.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,r=!1){for(const i of t){const u=e[i];if(u===void 0)return;r&&ct.isObject(u)?e=Object.assign(Array.isArray(u)?[]:{},e,u):e=e[i]}return e}static traverseDotNotation(e,t,r=!1){return ct.traverse(e,t.split("."),r)}static getURLSearchArray(e,t=""){let r=[];for(let i in e){const u=e[i];t&&(i=t+"["+i+"]"),ct.isObject(u)?r=[...r,...this.getURLSearchArray(u,i)]:r.push(`${i}=${u}`)}return r}static getURLSearchString(e){return ct.getURLSearchArray(e,"").join("&")}};er.traverseDotNotation;function ki(n){return!1}function tr(n){return Object.prototype.hasOwnProperty.call(n,"__value")}function ft(n){return typeof n=="object"&&n!==null}let St="sonic";typeof __SONIC_PREFIX__>"u"&&(St="sonic");const kr=St=="sonic"?"publisher-proxies-data":St+"-publisher-proxies-data",dt=class dt{constructor(e,t,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),dt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!$e.changed){$e.changed=!0,$e.saveId++;const t=$e.saveId;setTimeout(()=>$e.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(r=>{r[e]!==t&&(r[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==t&&(r[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let r=t;const i=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(r=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const r=this._value_[t];e[t]!==r&&(e[t]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||ft(this._value_)&&ft(e)&&e&&tr(this._value_)&&tr(e)&&this._value_.__value===e.__value||!ft(e)&&e===this._value_.__value)return!0;this._value_=ft(e)?e:{__value:e},this._cachedGet_=void 0;const r=tr(this._value_);if(this._parentKey_&&this.parent){const i=tr(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const u=[];u[Number(this._parentKey_)]=i,this.parent.set(u)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,u)=>{u!="_parent_"&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,u)=>{const o=this._value_[u];u!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(u))&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ft(this._value_))for(const i in this._value_){const u=e[i],h=ft(u)?u:{__value:u};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,u);continue}this._proxies_.get(i)?.set(h,!0),this._publishDynamicFilling_(i,u)}return!0}get(){if(Ti(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(dt.instancesCounter++,this._instanceCounter_=dt.instancesCounter),dt.instances.set(this._instanceCounter_,this),"<"+St+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+St+"-publisher-proxy>"}};dt.instances=new Map,dt.instancesCounter=0;let rr=dt;const pn=[];function Ti(n){pn.length>0&&pn[0].add(n)}const ve=class ve{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],ve.instance!=null)throw"Singleton / use getInstance";ve.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),ve.initPageShowHandler()}static initPageShowHandler(){ve.pageShowHandlerInitialized||(ve.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&ve.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(kr),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(kr,r),this.localStorageData={};const u=1e3*60*60*12;for(const o in this.localStorageData){const h=this.localStorageData[o],b=new Date().getTime()-(h.expirationDelayMs||u);h.lastModifiationMS<b&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=ve.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new ve)}return ve.instance==null?new ve:ve.instance}static get(e,t){return ve.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+at.getLanguage()]?.data||e.get())}get(e,t){const r=t?.localStorageMode==="enabled",i=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=Tr({});this.set(e,h)}const u=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(u._expiration_delay_=t.expirationDelayMs),u._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(u,e)),i&&(u._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==ve.saveId&&e%10!=0))try{if(!ve.changed||ve.saving)return;ve.saving=!0,ve.changed=!1;const t=Array.from(this.publishers.keys());let r=!1;for(const i of t){const u=this.publishers.get(i);if(!u?._is_savable_)continue;const o=u?.get();o&&(this.localStorageData[i+"¤lang_"+at.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:u._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(kr,i)}if(ve.saving=!1,ve.changed){ve.saveId++;const i=ve.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{ve.saving=!1}}async compress(e,t){const r=new TextEncoder().encode(e),i=window,u=new i.CompressionStream(t),o=u.writable.getWriter();o.write(r),o.close();const h=await new Response(u.readable).arrayBuffer(),b=new Uint8Array(h);let T="";for(let M=0;M<b.length;M++)T+=String.fromCharCode(b[M]);return btoa(T)}async decompress(e,t){const r=atob(e),u=Uint8Array.from(r,M=>M.charCodeAt(0)).buffer,o=window,h=new o.DecompressionStream(t),b=h.writable.getWriter();b.write(u),b.close();const T=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(T)}};ve.buildDate="Sat Oct 03 2026 09:31:30 GMT+0200 (Central European Summer Time)",ve.changed=!1,ve.saving=!1,ve.saveId=0,ve.instance=null,ve.instances=new Map,ve.pageShowHandlerInitialized=!1;let $e=ve;if(typeof window<"u"){const n=window,e=Ei+"PublisherManager",t=n[e]||$e;if(n[e]||(n[e]=$e),t!==$e){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty($e,i,{configurable:!0,get(){return t[i]},set(u){t[i]=u}})}}const Pi=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function Ci(n,e){return{get:function(t,r){if(typeof r=="string"&&Pi.has(r))return n[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!n._proxies_.has(r)){const i=n._value_[r],u=Tr(ft(i)?i:{__value:i},n,r);u._proxies_.set("_parent_",e()),n._proxies_.set(r,u)}return n._proxies_.get(r)},set:function(t,r,i){if(r=="_value_")return n._value_=i,!0;if(r=="_cachedGet_")return n._cachedGet_=i,!0;if(r=="_assignmentId_")return n._assignmentId_=i,!0;if(r=="_is_savable_")return n._is_savable_=i,!0;if(r=="_expiration_delay_")return n._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return n._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return n._instanceCounter_=i,!0;if(!n._proxies_.has(r)){const o=Tr({},n,r);o._proxies_.set("_parent_",e()),n._proxies_.set(r,o)}return n._value_[r]!==i&&(n._value_[r]=i,n._publishDynamicFilling_(r,i),n._proxies_.get(r)?.set(ft(i)?i:{__value:i})),!0},deleteProperty:function(t,r){return n._publishDynamicFilling_(r,null),n._proxies_.get(r)?.set(null),delete n._value_[r]},has:function(t,r){return r in n._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(t,r,i){return i&&"value"in i&&(n._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(t,r){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return n._value_.__value?Object.keys(n._value_.__value):Object.keys(n._value_)}}}function Tr(n,e=null,t){const r=new rr(n,e,t);let i=null;const u=Ci(r,()=>i);return i=new Proxy(r,u),i}class Ri extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=rr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(St+"-publisher-proxy",Ri)}catch{}const Di=(n,e)=>{{const t=n.split("."),r=t.shift()||"";let i=$e.get(r,e);i=er.traverse(i,t);const u=new Set;return u.add(i),u}};function mn(n,e,t){const r=Si(n);return Di(r,t).values().next().value}function Li(n,e){return ki()?mn(n,void 0,e):mn(n)}let Pr=(de=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(de.observedElements.keys()).forEach(e=>de.unObserve(e)))}static observe(e){if(!e||!de.enabled||de.observedElements.has(e))return;const t=new MutationObserver(de.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>de.addPublisherListeners(i)),de.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>de.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.addPublisherListeners(t)):e.childNodes.forEach(t=>de.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&de.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>de.removePublisherListeners(t)):e.childNodes.forEach(t=>de.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":de.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(r=>{de.onAdded(r)}),t.removedNodes.forEach(r=>{de.onRemoved(r)});break}}static removePublisherListeners(e){const t=de.publisherListeners.get(e);t&&(de.publisherListeners.delete(e),t.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[e],t=t.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:de.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const r of t)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){de.removePublisherListeners(e);const t=at.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const r=$e.getInstance().get(t),i=de.getDataBindItems(e),u=[];i.forEach(o=>{const h=o.bindedVariablesDescriptor,b=o.propertyToUpdate;for(const T of h.variables){const M=T;let S=r;S=de.getSubPublisher(r,M);const w=e,P={publisher:S,onAssign:()=>{const D=h.variables.map(Y=>de.getSubPublisher(r,Y)?.get());let N=h.expression,Z=!1;if(D.length==1&&h.variables[0].join(".")==N.substring(1)){let Y=D[0];Y===null&&(Y=""),w[b]=Y;return}for(let Y=0;Y<D.length;Y++){let E=D[Y];const m=h.variables[Y];E===null&&(Z=!0,E=void 0),N=N.replace("$"+m.join("."),E)}if(N.indexOf("|")!=-1){const Y=N.indexOf("|");if(Y==0)N=Sr.js(N.substring(1));else{const E=N.substring(0,Y),m=N.substring(Y+1),U=Sr[E];N=Z?"":U?U(m):N}}else N=Z?"":N;w[b]=N}};S?.onAssign(P.onAssign),u.push(P)}}),de.publisherListeners.set(e,u)}},de.observedElements=new Map,de.enabled=!0,de.publisherListeners=new Map,de);Pr.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Pr);let Mi=(De=class{static listen(){if(!De.listening)return;const e=document.location?.href.replace(document.location.origin,"");De.prevURL&&De.prevURL!=e&&(De.prevURL=e,De.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(De.listen)}static offChange(e){const t=De.listeners.indexOf(e);t!=-1&&(De.listeners.splice(t,1),De.listeners.length==0&&(De.listening=!1))}static onChange(e){De.listening||(De.listening=!0,De.listen()),De.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,r=document.referrer;if(t!=null){const T=document.location.origin,M=(t||T).toString(),w=r.indexOf("http")==0?new URL(r).origin!=T:!1,P=r=="",D=history.length<3,N=P&&D,Z=M!=document.location.href;if(w&&Z||N){const E=history.state||{};E.concorde=E.concorde||{},E.concorde.hasDoneHistoryBack=!0,history.pushState(E,document.title),history.back(),document.location.replace(M)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const u=new URL(i,document.location.href),o=u.pathname.split("/"),h=[];let b="";for(const T of o)T!=b&&h.push(T),b=T;i="/"+h.join("/")+u.search+(u.hash?u.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const r=new URL(t,document.location.href),i=new URL(e.location||"",document.location.origin);let u=!1;e.autoActive=="strict"?u=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?u=r.pathname==i.pathname&&r.hash==i.hash:u=i.href.indexOf(r.href)==0,u?e.setAttribute("active","true"):e.removeAttribute("active")}}},De.listeners=[],De.listening=!1,De.prevURL=document.location?.href.replace(document.location.origin,""),De);function gn(n){if(n==null||typeof n!="object"||Array.isArray(n))return n;const e={...n};return delete e._sonic_http_response_,e}const ye=class ye{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){ye.tokens.delete(this.serviceURL);return}ye.invalidTokens.includes(e)||ye.tokens.set(this.serviceURL,e)}get token(){return ye.invalidTokens.includes(this._token)?ye.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(ye.invalidTokens.includes(e)||(ye.invalidTokens.push(e),this.token=null))}async handleResult(e,t){ye.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let u={};if(!r||r.indexOf("text/")==0)u={text:await e.text()};else try{u=await e.json()}catch{u={}}if(this.addHTTPResponse&&er.isObject(u)&&(u._sonic_http_response_=e),i===498&&!ye.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");u=h}else u=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return Li("sonic-api").lastResponse.set({http:e,processed:u}),u}async auth(){if(this.token)return;if(ye.tokens.has(this.serviceURL)){this.token=ye.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),r=t.protocol+"//"+t.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const u=await i.json();u.token?this.token=u.token:ye.failledTokenUpdates.set(this.serviceURL,!0)}catch{ye.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const r=$e.get(e),i=new URLSearchParams(t.split("?")[1]||""),u=r.get();let o=[];Array.isArray(u)?o=u:o=[u];const h=[];let b=Number.POSITIVE_INFINITY,T=0,M=0;if(i.has("limit")&&(b=parseInt(i.get("limit")||"0"),M++),i.has("offset")&&(T=parseInt(i.get("offset")||"0"),M++),M>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return o.slice(T,T+b);for(const[S,w]of i.entries()){const P=w.split(",").map(D=>D.trim());for(const D of P)for(const N of o)if(typeof N!="object")isNaN(+N)?N.toString().toLowerCase().includes(w.toLowerCase())&&h.push(N):N===w&&h.push(N);else{const Z=N;if(!Z[S])continue;isNaN(+Z[S])?Z[S]?.toString().toLowerCase().includes(D.toLowerCase())&&h.push(N):Z[S]===D&&h.push(N)}}return h.slice(T,T+b)}firstCallDone(){return new Promise(e=>{if(!ye.firstCallDoneFlags.has(this.serviceURL))ye.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(ye.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),ye.firstCallDoneFlags.set(this.serviceURL,"loading"));const T=e.match(r);if(!T)throw new Error("dataProvider path is not valid");return await this.localGet(T[1],T[2])}const i={apiMethod:"get",path:e,additionalHeaders:t},u=await this.createHeaders(t),o=this.computeURL(e),h=JSON.stringify({url:o,headers:u,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),ye.firstCallDoneFlags.set(this.serviceURL,"loading")),!ye.loadingGetPromises.has(h)){const T=new Promise(async M=>{try{const S=await fetch(o,{headers:u,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),w=await this.handleResult(S,i);M({processed:w,response:this.lastResult})}catch{ye.firstCallDoneFlags.set(this.serviceURL,"error"),M(null)}});ye.loadingGetPromises.set(h,T)}const b=await ye.loadingGetPromises.get(h);return ye.loadingGetPromises.delete(h),b?(this.lastResult=b.response,b.processed):null}async getDetailed(e,t){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,t);if(i==null)return;const u=gn(i),o=this.computeURL(e);if(r)return{request:new Request(o,{method:"GET"}),result:u};const h=await this.createHeaders(t);return{request:new Request(o,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:u}}async sendDetailed(e,t,r,i){const u=await this.send(e,t,r,i);if(u==null)return;const o=gn(u),h=this.computeURL(e),b=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(h,{method:r,headers:new Headers(b),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,t,r){return this.sendDetailed(e,t,"POST",r)}async putDetailed(e,t,r){return this.sendDetailed(e,t,"PUT",r)}async patchDetailed(e,t,r){return this.sendDetailed(e,t,"PATCH",r)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=at.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const u in t)i.searchParams.set(u,t[u]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,r="POST",i){const u={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:t},o=await this.createHeaders(i);o.Accept="application/json",o["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,u)}async submitFormData(e,t,r="POST",i){const u={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:t},o=await this.createHeaders(i);o.Accept="application/json";const h=new FormData,b=t;for(const M in b)h.set(M,b[M]);const T=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:r,body:h,keepalive:this.keepAlive});return await this.handleResult(T,u)}async put(e,t,r){return this.send(e,t,"PUT",r)}async post(e,t,r){return this.send(e,t,"POST",r)}async patch(e,t,r){return this.send(e,t,"PATCH",r)}async delete(e,t,r){return this.send(e,t,"delete",r)}};ye.loadingGetPromises=new Map,ye.tokens=new Map,ye.invalidTokens=[],ye.failledTokenUpdates=new Map,ye.firstCallDoneFlags=new Map;let Cr=ye;at.getApiConfiguration(document.body||document.documentElement);var vn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ui(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Bt={exports:{}},Fi=Bt.exports,bn;function Oi(){return bn||(bn=1,(function(n,e){var t=[].slice;(function(r,i){return e!==null?n.exports=i():r.UrlPattern=i()})(Fi,function(){var r,i,u,o,h,b,T,M,S,w,P,D,N,Z,Y;return S=function(E){return E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},T=function(E,m){var U,_,C;for(C=[],U=-1,_=E.length;++U<_;)C=C.concat(m(E[U]));return C},Z=function(E,m){var U,_,C;for(C="",U=-1,_=E.length;++U<_;)C+=m(E[U]);return C},N=function(E){return new RegExp(E.toString()+"|").exec("").length-1},P=function(E,m){var U,_,C,z,O;for(z={},U=-1,C=E.length;++U<C;)_=E[U],O=m[U],O!=null&&(z[_]!=null?(Array.isArray(z[_])||(z[_]=[z[_]]),z[_].push(O)):z[_]=O);return z},r={},r.Result=function(E,m){this.value=E,this.rest=m},r.Tagged=function(E,m){this.tag=E,this.value=m},r.tag=function(E,m){return function(U){var _,C;if(_=m(U),_!=null)return C=new r.Tagged(E,_.value),new r.Result(C,_.rest)}},r.regex=function(E){return function(m){var U,_;if(U=E.exec(m),U!=null)return _=U[0],new r.Result(_,m.slice(_.length))}},r.sequence=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(m){var U,_,C,z,O,re;for(U=-1,_=E.length,re=[],z=m;++U<_;){if(C=E[U],O=C(z),O==null)return;re.push(O.value),z=O.rest}return new r.Result(re,z)}},r.pick=function(){var E,m;return E=arguments[0],m=2<=arguments.length?t.call(arguments,1):[],function(U){var _,C;if(C=r.sequence.apply(r,m)(U),C!=null)return _=C.value,C.value=_[E],C}},r.string=function(E){var m;return m=E.length,function(U){if(U.slice(0,m)===E)return new r.Result(E,U.slice(m))}},r.lazy=function(E){var m;return m=null,function(U){return m==null&&(m=E()),m(U)}},r.baseMany=function(E,m,U,_,C){var z,O,re,ae;for(re=C,ae=U?"":[];!(m!=null&&(z=m(re),z!=null)||(O=E(re),O==null));)U?ae+=O.value:ae.push(O.value),re=O.rest;if(!(_&&ae.length===0))return new r.Result(ae,re)},r.many1=function(E){return function(m){return r.baseMany(E,null,!1,!0,m)}},r.concatMany1Till=function(E,m){return function(U){return r.baseMany(E,m,!0,!0,U)}},r.firstChoice=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(m){var U,_,C,z;for(U=-1,_=E.length;++U<_;)if(C=E[U],z=C(m),z!=null)return z}},D=function(E){var m;return m={},m.wildcard=r.tag("wildcard",r.string(E.wildcardChar)),m.optional=r.tag("optional",r.pick(1,r.string(E.optionalSegmentStartChar),r.lazy(function(){return m.pattern}),r.string(E.optionalSegmentEndChar))),m.name=r.regex(new RegExp("^["+E.segmentNameCharset+"]+")),m.named=r.tag("named",r.pick(1,r.string(E.segmentNameStartChar),r.lazy(function(){return m.name}))),m.escapedChar=r.pick(1,r.string(E.escapeChar),r.regex(/^./)),m.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return m.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(E.segmentNameStartChar),r.string(E.optionalSegmentStartChar),r.string(E.optionalSegmentEndChar),m.wildcard))),m.token=r.lazy(function(){return r.firstChoice(m.wildcard,m.optional,m.named,m.static)}),m.pattern=r.many1(r.lazy(function(){return m.token})),m},M={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},b=function(E,m){if(Array.isArray(E))return Z(E,function(U){return b(U,m)});switch(E.tag){case"wildcard":return"(.*?)";case"named":return"(["+m+"]+)";case"static":return S(E.value);case"optional":return"(?:"+b(E.value,m)+")?"}},h=function(E,m){return m==null&&(m=M.segmentValueCharset),"^"+b(E,m)+"$"},o=function(E){if(Array.isArray(E))return T(E,o);switch(E.tag){case"wildcard":return["_"];case"named":return[E.value];case"static":return[];case"optional":return o(E.value)}},w=function(E,m,U,_){var C,z,O,re;if(_==null&&(_=!1),re=E[m],re==null){if(_)throw new Error("no values provided for key `"+m+"`");return}if(C=U[m]||0,z=Array.isArray(re)?re.length-1:0,C>z){if(_)throw new Error("too few values provided for key `"+m+"`");return}return O=Array.isArray(re)?re[C]:re,_&&(U[m]=C+1),O},u=function(E,m,U){var _,C;if(Array.isArray(E)){for(_=-1,C=E.length;++_<C;)if(u(E[_],m,U))return!0;return!1}switch(E.tag){case"wildcard":return w(m,"_",U,!1)!=null;case"named":return w(m,E.value,U,!1)!=null;case"static":return!1;case"optional":return u(E.value,m,U)}},Y=function(E,m,U){if(Array.isArray(E))return Z(E,function(_){return Y(_,m,U)});switch(E.tag){case"wildcard":return w(m,"_",U,!0);case"named":return w(m,E.value,U,!0);case"static":return E.value;case"optional":return u(E.value,m,U)?Y(E.value,m,U):""}},i=function(E,m){var U,_,C,z,O;if(E instanceof i){this.isRegex=E.isRegex,this.regex=E.regex,this.ast=E.ast,this.names=E.names;return}if(this.isRegex=E instanceof RegExp,!(typeof E=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=E,m!=null){if(!Array.isArray(m))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(U=N(this.regex),m.length!==U)throw new Error("regex contains "+U+" groups but array of group names contains "+m.length);this.names=m}return}if(E==="")throw new Error("argument must not be the empty string");if(O=E.replace(/\s+/g,""),O!==E)throw new Error("argument must not contain whitespace");if(_={escapeChar:m?.escapeChar||M.escapeChar,segmentNameStartChar:m?.segmentNameStartChar||M.segmentNameStartChar,segmentNameCharset:m?.segmentNameCharset||M.segmentNameCharset,segmentValueCharset:m?.segmentValueCharset||M.segmentValueCharset,optionalSegmentStartChar:m?.optionalSegmentStartChar||M.optionalSegmentStartChar,optionalSegmentEndChar:m?.optionalSegmentEndChar||M.optionalSegmentEndChar,wildcardChar:m?.wildcardChar||M.wildcardChar},z=D(_),C=z.pattern(E),C==null)throw new Error("couldn't parse pattern");if(C.rest!=="")throw new Error("could only partially parse pattern");this.ast=C.value,this.regex=new RegExp(h(this.ast,_.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(E){var m,U;return U=this.regex.exec(E),U==null?null:(m=U.slice(1),this.names?P(this.names,m):m)},i.prototype.stringify=function(E){if(E==null&&(E={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(E!==Object(E))throw new Error("argument must be an object or undefined");return Y(this.ast,E,{})},i.escapeForRegex=S,i.concatMap=T,i.stringConcatMap=Z,i.regexGroupCount=N,i.keysAndValuesToObject=P,i.P=r,i.newParser=D,i.defaultOptions=M,i.astNodeToRegexString=h,i.astNodeToNames=o,i.getParam=w,i.astNodeContainsSegmentsForProvidedParams=u,i.stringify=Y,i})})(Bt,Bt.exports)),Bt.exports}var $i=Oi();const Ni=Ui($i);class Rr{constructor(e){this.path=Rr.normalizePath(e)}getDataProviderKey(){return new Qt(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let b;try{b=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return b.pathname=b.pathname.replace(/\/+/g,"/"),b.href}const r=t.indexOf("?"),i=t.indexOf("#");let u=t.length;r>=0&&(u=Math.min(u,r)),i>=0&&(u=Math.min(u,i));let o=t.slice(0,u);const h=t.slice(u);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&h)throw new RangeError("Endpoint: path cannot be empty");return o+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}function nr(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Dr={exports:{}},yn;function Ii(){return yn||(yn=1,(function(n,e){(function(t){n.exports=t()})(function(){return(function(){function t(r,i,u){function o(T,M){if(!i[T]){if(!r[T]){var S=typeof nr=="function"&&nr;if(!M&&S)return S(T,!0);if(h)return h(T,!0);var w=new Error("Cannot find module '"+T+"'");throw w.code="MODULE_NOT_FOUND",w}var P=i[T]={exports:{}};r[T][0].call(P.exports,function(D){var N=r[T][1][D];return o(N||D)},P,P.exports,t,r,i,u)}return i[T].exports}for(var h=typeof nr=="function"&&nr,b=0;b<u.length;b++)o(u[b]);return o}return t})()({1:[function(t,r,i){const u=t("./utils"),o=(function(){const h=u.stringToArray,b=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],T=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],M=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],S=["Thousand","Million","Billion","Trillion"];function w(A,R){var k=function(j,I,L){var q="";if(j<=19)q=(I?" and ":"")+(L?T[j]:b[j]);else if(j<100){const he=Math.floor(j/10),ue=j%10;q=(I?" and ":"")+M[he-2],ue>0?q+="-"+k(ue,!1,L):L&&(q=q.substring(0,q.length-1)+"ieth")}else if(j<1e3){const he=Math.floor(j/100),ue=j%100;q=(I?", ":"")+b[he]+" Hundred",ue>0?q+=k(ue,!0,L):L&&(q+="th")}else{var K=Math.floor(Math.log10(j)/3);K>S.length&&(K=S.length);const he=Math.pow(10,K*3),ue=Math.floor(j/he),te=j-ue*he;q=(I?", ":"")+k(ue,!1,!1)+" "+S[K-1],te>0?q+=k(te,!0,L):L&&(q+="th")}return q},F=k(A,!1,R);return F}const P=Object.create(null);b.forEach(function(A,R){P[A.toLowerCase()]=R}),T.forEach(function(A,R){P[A.toLowerCase()]=R}),M.forEach(function(A,R){const k=A.toLowerCase();P[k]=(R+2)*10,P[k.substring(0,A.length-1)+"ieth"]=P[k]}),P.hundredth=100,S.forEach(function(A,R){const k=A.toLowerCase(),F=Math.pow(10,(R+1)*3);P[k]=F,P[k+"th"]=F});function D(A){const k=A.split(/,\s|\sand\s|[\s\\-]/).map(I=>P[I]);let F=[0];return k.forEach(I=>{if(I<100){let L=F.pop();L>=1e3&&(F.push(L),L=0),F.push(L+I)}else F.push(F.pop()*I)}),F.reduce((I,L)=>I+L,0)}const N=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],Z={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function Y(A){for(var R=0;R<N.length;R++){const k=N[R];if(A>=k[0])return k[1]+Y(A-k[0])}return""}function E(A){for(var R=0,k=1,F=A.length-1;F>=0;F--){const j=A[F],I=Z[j];I<k?R-=I:(k=I,R+=I)}return R}function m(A,R){for(var k=[],F=R.charCodeAt(0);A>0;)k.unshift(String.fromCharCode((A-1)%26+F)),A=Math.floor((A-1)/26);return k.join("")}function U(A,R){for(var k=R.charCodeAt(0),F=0,j=0;j<A.length;j++)F+=(A.charCodeAt(A.length-j-1)-k+1)*Math.pow(26,j);return F}function _(A,R){if(typeof A>"u")return;A=Math.floor(A);const k=ae(R);return O(A,k)}const C={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},z={UPPER:"upper",LOWER:"lower",TITLE:"title"};function O(A,R){let k;const F=A<0;switch(A=Math.abs(A),R.primary){case C.LETTERS:k=m(A,R.case===z.UPPER?"A":"a");break;case C.ROMAN:k=Y(A),R.case===z.UPPER&&(k=k.toUpperCase());break;case C.WORDS:k=w(A,R.ordinal),R.case===z.UPPER?k=k.toUpperCase():R.case===z.LOWER&&(k=k.toLowerCase());break;case C.DECIMAL:k=""+A;var j=R.mandatoryDigits-k.length;if(j>0){var I=new Array(j+1).join("0");k=I+k}if(R.zeroCode!==48&&(k=h(k).map(he=>String.fromCodePoint(he.codePointAt(0)+R.zeroCode-48)).join("")),R.regular){const he=Math.floor((k.length-1)/R.groupingSeparators.position);for(let ue=he;ue>0;ue--){const te=k.length-ue*R.groupingSeparators.position;k=k.substr(0,te)+R.groupingSeparators.character+k.substr(te)}}else R.groupingSeparators.reverse().forEach(he=>{const ue=k.length-he.position;k=k.substr(0,ue)+he.character+k.substr(ue)});if(R.ordinal){var L={1:"st",2:"nd",3:"rd"},q=k[k.length-1],K=L[q];(!K||k.length>1&&k[k.length-2]==="1")&&(K="th"),k=k+K}break;case C.SEQUENCE:throw{code:"D3130",value:R.token}}return F&&(k="-"+k),k}const re=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ae(A){const R={type:"integer",primary:C.DECIMAL,case:z.LOWER,ordinal:!1};let k,F;const j=A.lastIndexOf(";");switch(j===-1?k=A:(k=A.substring(0,j),F=A.substring(j+1),F[0]==="o"&&(R.ordinal=!0)),k){case"A":R.case=z.UPPER;case"a":R.primary=C.LETTERS;break;case"I":R.case=z.UPPER;case"i":R.primary=C.ROMAN;break;case"W":R.case=z.UPPER,R.primary=C.WORDS;break;case"Ww":R.case=z.TITLE,R.primary=C.WORDS;break;case"w":R.primary=C.WORDS;break;default:{let I=null,L=0,q=0,K=[],he=0;if(h(k).map(te=>te.codePointAt(0)).reverse().forEach(te=>{let Q=!1;for(let le=0;le<re.length;le++){const ee=re[le];if(te>=ee&&te<=ee+9){if(Q=!0,L++,he++,I===null)I=ee;else if(ee!==I)throw{code:"D3131"};break}}Q||(te===35?(he++,q++):K.push({position:he,character:String.fromCodePoint(te)}))}),L>0){R.primary=C.DECIMAL,R.zeroCode=I,R.mandatoryDigits=L,R.optionalDigits=q;const Q=function(le){if(le.length===0)return 0;const ee=le[0].character;for(let Le=1;Le<le.length;Le++)if(le[Le].character!==ee)return 0;const Ne=le.map(Le=>Le.position),Qe=function(Le,je){return je===0?Le:Qe(je,Le%je)},Be=Ne.reduce(Qe);for(let Le=1;Le<=Ne.length;Le++)if(Ne.indexOf(Le*Be)===-1)return 0;return Be}(K);Q>0?(R.regular=!0,R.groupingSeparators={position:Q,character:K[0].character}):(R.regular=!1,R.groupingSeparators=K)}else R.primary=C.SEQUENCE,R.token=k}}return R}const _e={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function ge(A){var R=[];const k={type:"datetime",parts:R},F=function(Q,le){if(le>Q){let ee=A.substring(Q,le);ee=ee.split("]]").join("]"),R.push({type:"literal",value:ee})}};for(var j=0,I=0;I<A.length;){if(A.charAt(I)==="["){if(A.charAt(I+1)==="["){F(j,I),R.push({type:"literal",value:"["}),I+=2,j=I;continue}if(F(j,I),j=I,I=A.indexOf("]",j),I===-1)throw{code:"D3135"};let Q=A.substring(j+1,I);Q=Q.split(/\s+/).join("");var L={type:"marker",component:Q.charAt(0)},q=Q.lastIndexOf(","),K;if(q!==-1){const le=Q.substring(q+1),ee=le.indexOf("-");let Ne,Qe;const Be=function(je){if(!(typeof je>"u"||je==="*"))return parseInt(je)};ee===-1?Ne=le:(Ne=le.substring(0,ee),Qe=le.substring(ee+1));const Le={min:Be(Ne),max:Be(Qe)};L.width=Le,K=Q.substring(1,q)}else K=Q.substring(1);if(K.length===1)L.presentation1=K;else if(K.length>1){var he=K.charAt(K.length-1);"atco".indexOf(he)!==-1?(L.presentation2=he,he==="o"&&(L.ordinal=!0),L.presentation1=K.substring(0,K.length-1)):L.presentation1=K}else L.presentation1=_e[L.component];if(typeof L.presentation1>"u")throw{code:"D3132",value:L.component};if(L.presentation1[0]==="n")L.names=z.LOWER;else if(L.presentation1[0]==="N")L.presentation1[1]==="n"?L.names=z.TITLE:L.names=z.UPPER;else if("YMDdFWwXxHhmsf".indexOf(L.component)!==-1){var ue=L.presentation1;if(L.presentation2&&(ue+=";"+L.presentation2),L.integerFormat=ae(ue),L.width&&L.width.min!==void 0&&L.integerFormat.mandatoryDigits<L.width.min&&(L.integerFormat.mandatoryDigits=L.width.min),L.component==="Y")if(L.n=-1,L.width&&L.width.max!==void 0)L.n=L.width.max,L.integerFormat.mandatoryDigits=L.n;else{var te=L.integerFormat.mandatoryDigits+L.integerFormat.optionalDigits;te>=2&&(L.n=te)}const le=R[R.length-1];le&&le.integerFormat&&(le.integerFormat.parseWidth=le.integerFormat.mandatoryDigits)}(L.component==="Z"||L.component==="z")&&(L.integerFormat=ae(L.presentation1)),R.push(L),j=I+1}I++}return F(j,I),k}const pe=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Je=1e3*60*60*24,ce=function(A){const R=Date.UTC(A.year,A.month);var k=new Date(R).getUTCDay();return k===0&&(k=7),k>4?R+(8-k)*Je:R-(k-1)*Je},me=function(A,R){return{year:A,month:R,nextMonth:function(){return R===11?me(A+1,0):me(A,R+1)},previousMonth:function(){return R===0?me(A-1,11):me(A,R-1)},nextYear:function(){return me(A+1,R)},previousYear:function(){return me(A-1,R)}}},We=function(A,R){return(R-A)/(Je*7)+1},ie=(A,R)=>{let k;switch(R){case"Y":k=A.getUTCFullYear();break;case"M":k=A.getUTCMonth()+1;break;case"D":k=A.getUTCDate();break;case"d":{const F=Date.UTC(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate()),j=Date.UTC(A.getUTCFullYear(),0);k=(F-j)/Je+1;break}case"F":k=A.getUTCDay(),k===0&&(k=7);break;case"W":{const F=me(A.getUTCFullYear(),0),j=ce(F),I=Date.UTC(F.year,A.getUTCMonth(),A.getUTCDate());let L=We(j,I);if(L>52){const q=ce(F.nextYear());I>=q&&(L=1)}else if(L<1){const q=ce(F.previousYear());L=We(q,I)}k=Math.floor(L);break}case"w":{const F=me(A.getUTCFullYear(),A.getUTCMonth()),j=ce(F),I=Date.UTC(F.year,F.month,A.getUTCDate());let L=We(j,I);if(L>4){const q=ce(F.nextMonth());I>=q&&(L=1)}else if(L<1){const q=ce(F.previousMonth());L=We(q,I)}k=Math.floor(L);break}case"X":{const F=me(A.getUTCFullYear(),0),j=ce(F),I=ce(F.nextYear()),L=A.getTime();L<j?k=F.year-1:L>=I?k=F.year+1:k=F.year;break}case"x":{const F=me(A.getUTCFullYear(),A.getUTCMonth()),j=ce(F),I=F.nextMonth(),L=ce(I),q=A.getTime();q<j?k=F.previousMonth().month+1:q>=L?k=I.month+1:k=F.month+1;break}case"H":k=A.getUTCHours();break;case"h":k=A.getUTCHours(),k=k%12,k===0&&(k=12);break;case"P":k=A.getUTCHours()>=12?"pm":"am";break;case"m":k=A.getUTCMinutes();break;case"s":k=A.getUTCSeconds();break;case"f":k=A.getUTCMilliseconds();break;case"Z":case"z":break;case"C":k="ISO";break;case"E":k="ISO";break}return k};let Ce=null;function nt(A,R,k){var F=0,j=0;if(typeof k<"u"){const ue=parseInt(k);F=Math.floor(ue/100),j=ue%100}var I=function(ue,te){var Q=ie(ue,te.component);if("YMDdFWwXxHhms".indexOf(te.component)!==-1)if(te.component==="Y"&&te.n!==-1&&(Q=Q%Math.pow(10,te.n)),te.names){if(te.component==="M"||te.component==="x")Q=Pe[Q-1];else if(te.component==="F")Q=pe[Q];else throw{code:"D3133",value:te.component};te.names===z.UPPER?Q=Q.toUpperCase():te.names===z.LOWER&&(Q=Q.toLowerCase()),te.width&&Q.length>te.width.max&&(Q=Q.substring(0,te.width.max))}else Q=O(Q,te.integerFormat);else if(te.component==="f")Q=O(Q,te.integerFormat);else if(te.component==="Z"||te.component==="z"){const le=F*100+j;if(te.integerFormat.regular)Q=O(le,te.integerFormat);else{const ee=te.integerFormat.mandatoryDigits;if(ee===1||ee===2)Q=O(F,te.integerFormat),j!==0&&(Q+=":"+_(j,"00"));else if(ee===3||ee===4)Q=O(le,te.integerFormat);else throw{code:"D3134",value:ee}}le>=0&&(Q="+"+Q),te.component==="z"&&(Q="GMT"+Q),le===0&&te.presentation2==="t"&&(Q="Z")}else te.component==="P"&&te.names===z.UPPER&&(Q=Q.toUpperCase());return Q};let L;typeof R>"u"?(Ce===null&&(Ce=ge("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),L=Ce):L=ge(R);const q=(60*F+j)*60*1e3,K=new Date(A+q);let he="";return L.parts.forEach(function(ue){ue.type==="literal"?he+=ue.value:he+=I(K,ue)}),he}function d(A){var R=Object.create(null);if(A.type==="datetime")R.type="datetime",R.parts=A.parts.map(function(k){var F=Object.create(null);if(k.type==="literal")F.regex=k.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(k.component==="Z"||k.component==="z"){let I;Array.isArray(k.integerFormat.groupingSeparators)||(I=k.integerFormat.groupingSeparators),F.regex="",k.component==="z"&&(F.regex="GMT"),F.regex+="[-+][0-9]+",I&&(F.regex+=I.character+"[0-9]+"),F.parse=function(L){k.component==="z"&&(L=L.substring(3));let q=0,K=0;return I?(q=Number.parseInt(L.substring(0,L.indexOf(I.character))),K=Number.parseInt(L.substring(L.indexOf(I.character)+1))):L.length-1<=2?q=Number.parseInt(L):(q=Number.parseInt(L.substring(0,3)),K=Number.parseInt(L.substring(3))),q*60+K}}else if(k.component==="f")F.regex="[0-9]+",F.parse=function(I){return parseFloat("0."+I.substring(0,3))*1e3};else if(k.integerFormat)F=d(k.integerFormat);else{F.regex="[a-zA-Z]+";var j=Object.create(null);if(k.component==="M"||k.component==="x")Pe.forEach(function(I,L){k.width&&k.width.max?j[I.substring(0,k.width.max)]=L+1:j[I]=L+1});else if(k.component==="F")pe.forEach(function(I,L){L>0&&(k.width&&k.width.max?j[I.substring(0,k.width.max)]=L:j[I]=L)});else if(k.component==="P")j={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:k.component};F.parse=function(I){return j[I]}}return F.component=k.component,F});else{R.type="integer";const k=A.case===z.UPPER;switch(A.primary){case C.LETTERS:R.regex=k?"[A-Z]+":"[a-z]+",R.parse=function(F){return U(F,k?"A":"a")};break;case C.ROMAN:R.regex=k?"[MDCLXVI]+":"[mdclxvi]+",R.parse=function(F){return E(k?F:F.toUpperCase())};break;case C.WORDS:R.regex="(?:"+u.keys(P).concat("and","[\\-, ]").join("|")+")+",R.parse=function(F){return D(F.toLowerCase())};break;case C.DECIMAL:R.regex="[0-9]",A.parseWidth?R.regex+=`{${A.parseWidth}}`:R.regex+="+",A.ordinal&&(R.regex+="(?:th|st|nd|rd)"),R.parse=function(F){let j=F;return A.ordinal&&(j=F.substring(0,F.length-2)),A.regular?j=j.split(",").join(""):A.groupingSeparators.forEach(I=>{j=j.split(I.character).join("")}),A.zeroCode!==48&&(j=j.split("").map(I=>String.fromCodePoint(I.codePointAt(0)-A.zeroCode+48)).join("")),parseInt(j)};break;case C.SEQUENCE:throw{code:"D3130",value:A.token}}}return R}function y(A,R){if(typeof A>"u")return;const k=ae(R);return d(k).parse(A)}function G(A,R){const k=ge(R),F=d(k),j="^"+F.parts.map(K=>"("+K.regex+")").join("")+"$";var L=new RegExp(j,"i").exec(A);if(L!==null){const ee=Object.create(null);for(let c=1;c<L.length;c++){const f=F.parts[c-1];f.parse&&(ee[f.component]=f.parse(L[c]))}if(Object.getOwnPropertyNames(ee).length===0)return;let Ne=0;const Qe=c=>{Ne<<=1,Ne+=c?1:0},Be=c=>!(~c&Ne)&&!!(c&Ne);"YXMxWwdD".split("").forEach(c=>Qe(ee[c]));const je=!Be(161)&&Be(130),ot=Be(84),Pt=!ot&&Be(72);Ne=0,"PHhmsf".split("").forEach(c=>Qe(ee[c]));const H=!Be(23)&&Be(47),tt=(je?"YD":ot?"XxwF":Pt?"XWF":"YMD")+(H?"Phmsf":"Hmsf"),zt=this.environment.timestamp;let it=!1,yt=!1;if(tt.split("").forEach(c=>{if(typeof ee[c]>"u")it?(ee[c]="MDd".indexOf(c)!==-1?1:0,yt=!0):ee[c]=ie(zt,c);else if(it=!0,yt)throw{code:"D3136"}}),ee.M>0?ee.M-=1:ee.M=0,je){const c=Date.UTC(ee.Y,0),f=(ee.d-1)*1e3*60*60*24,p=new Date(c+f);ee.M=p.getUTCMonth(),ee.D=p.getUTCDate()}if(ot)throw{code:"D3136"};if(Pt)throw{code:"D3136"};H&&(ee.H=ee.h===12?0:ee.h,ee.P===1&&(ee.H+=12));var q=Date.UTC(ee.Y,ee.M,ee.D,ee.H,ee.m,ee.s,ee.f);return(ee.Z||ee.z)&&(q-=(ee.Z||ee.z)*60*1e3),q}}var fe=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Ae(A,R){if(!(typeof A>"u"))if(typeof R>"u"){if(!fe.test(A))throw{stack:new Error().stack,code:"D3110",value:A};return Date.parse(A)}else return G.call(this,A,R)}function we(A,R,k){if(!(typeof A>"u"))return nt.call(this,A,R,k)}return{formatInteger:_,parseInteger:y,fromMillis:we,toMillis:Ae}})();r.exports=o},{"./utils":6}],2:[function(t,r,i){(function(u){(function(){var o=t("./utils");const h=(()=>{var b=o.isNumeric,T=o.isArrayOfStrings,M=o.isArrayOfNumbers,S=o.isSequence,w=o.isFunction,P=o.isLambda,D=o.isPromise,N=o.getFunctionArity,Z=o.isDeepEqual,Y=o.stringToArray;function E(s){if(!(typeof s>"u")){var a=0;return s.forEach(function(l){a+=l}),a}}function m(s){return typeof s>"u"?0:s.length}function U(s){if(!(typeof s>"u"||s.length===0))return Math.max.apply(Math,s)}function _(s){if(!(typeof s>"u"||s.length===0))return Math.min.apply(Math,s)}function C(s){if(!(typeof s>"u"||s.length===0)){var a=0;return s.forEach(function(l){a+=l}),a/s.length}}function z(s,a=!1){if(!(typeof s>"u")){var l;if(typeof s=="string")l=s;else if(w(s))l="";else{if(typeof s=="number"&&!isFinite(s))throw{code:"D3001",value:s,stack:new Error().stack};var v=a?2:0;Array.isArray(s)&&s.outerWrapper&&(s=s[0]),l=JSON.stringify(s,function(g,x){return typeof x<"u"&&x!==null&&b(x)?x.toPrecision&&!Number.isInteger(x)?Number(x.toPrecision(15)):x:x&&w(x)?"":x},v)}return l}}function O(s,a,l){if(!(typeof s>"u")){var v=Y(s),g=v.length;if(g+a<0&&(a=0),typeof l<"u"){if(l<=0)return"";var x=a>=0?a+l:g+a+l;return v.slice(a,x).join("")}return v.slice(a).join("")}}function re(s,a){if(!(typeof s>"u")){var l=s.indexOf(a);return l>-1?s.substr(0,l):s}}function ae(s,a){if(!(typeof s>"u")){var l=s.indexOf(a);return l>-1?s.substr(l+a.length):s}}function _e(s){if(!(typeof s>"u"))return s.toLowerCase()}function ge(s){if(!(typeof s>"u"))return s.toUpperCase()}function pe(s){if(!(typeof s>"u"))return Y(s).length}function Pe(s){if(!(typeof s>"u")){var a=s.replace(/[ \t\n\r]+/gm," ");return a.charAt(0)===" "&&(a=a.substring(1)),a.charAt(a.length-1)===" "&&(a=a.substring(0,a.length-1)),a}}function Je(s,a,l){if(!(typeof s>"u")){(typeof l>"u"||l.length===0)&&(l=" ");var v;a=Math.trunc(a);var g=Math.abs(a)-pe(s);if(g>0){var x=new Array(g+1).join(l);l.length>1&&(x=O(x,0,g)),a>0?v=s+x:v=x+s}else v=s;return v}}async function ce(s,a){var l=s.apply(this,[a]);if(D(l)&&(l=await l),l&&!(typeof l.start=="number"||l.end==="number"||Array.isArray(l.groups)||w(l.next)))throw{code:"T1010",stack:new Error().stack};return l}async function me(s,a){if(!(typeof s>"u"||typeof a>"u")){var l;if(typeof a=="string")l=s.indexOf(a)!==-1;else{var v=await ce(a,s);l=typeof v<"u"}return l}}async function We(s,a,l){if(!(typeof s>"u")){if(l<0)throw{stack:new Error().stack,value:l,code:"D3040",index:3};var v=this.createSequence();if(typeof l>"u"||l>0){var g=0,x=await ce(a,s);if(typeof x<"u")for(;typeof x<"u"&&(typeof l>"u"||g<l);)v.push({match:x.match,index:x.start,groups:x.groups}),x=await ce(x.next),g++}return v}}async function ie(s,a,l,v){if(!(typeof s>"u")){var g=this;if(a==="")throw{code:"D3010",stack:new Error().stack,value:a,index:2};if(v<0)throw{code:"D3011",stack:new Error().stack,value:v,index:4};var x;typeof l=="string"?x=function(Se){for(var Me="",be=0,Re=l.indexOf("$",be);Re!==-1&&be<l.length;){Me+=l.substring(be,Re),be=Re+1;var et=l.charAt(be);if(et==="$")Me+="$",be++;else if(et==="0")Me+=Se.match,be++;else{var qe;if(Se.groups.length===0?qe=1:qe=Math.floor(Math.log(Se.groups.length)*Math.LOG10E)+1,Re=parseInt(l.substring(be,be+qe),10),qe>1&&Re>Se.groups.length&&(Re=parseInt(l.substring(be,be+qe-1),10)),isNaN(Re))Me+="$";else{if(Se.groups.length>0){var st=Se.groups[Re-1];typeof st<"u"&&(Me+=st)}be+=Re.toString().length}}Re=l.indexOf("$",be)}return Me+=l.substring(be),Me}:x=l;var $="",B=0;if(typeof v>"u"||v>0){var se=0;if(typeof a=="string"){for(var J=s.indexOf(a,B);J!==-1&&(typeof v>"u"||se<v);)$+=s.substring(B,J),$+=l,B=J+a.length,se++,J=s.indexOf(a,B);$+=s.substring(B)}else{var Ee=await ce(a,s);if(typeof Ee<"u"){for(;typeof Ee<"u"&&(typeof v>"u"||se<v);){$+=s.substring(B,Ee.start);var xe=x.apply(g,[Ee]);if(D(xe)&&(xe=await xe),typeof xe=="string")$+=xe;else throw{code:"D3012",stack:new Error().stack,value:xe};B=Ee.start+Ee.match.length,se++,Ee=await ce(Ee.next)}$+=s.substring(B)}else $=s}}else $=s;return $}}function Ce(s){if(!(typeof s>"u")){var a=typeof window<"u"?window.btoa:function(l){return new u.Buffer.from(l,"binary").toString("base64")};return a(s)}}function nt(s){if(!(typeof s>"u")){var a=typeof window<"u"?window.atob:function(l){return new u.Buffer.from(l,"base64").toString("binary")};return a(s)}}function d(s){if(!(typeof s>"u")){var a;try{a=encodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrlComponent"}}return a}}function y(s){if(!(typeof s>"u")){var a;try{a=encodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrl"}}return a}}function G(s){if(!(typeof s>"u")){var a;try{a=decodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrlComponent"}}return a}}function fe(s){if(!(typeof s>"u")){var a;try{a=decodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrl"}}return a}}async function Ae(s,a,l){if(!(typeof s>"u")){if(l<0)throw{code:"D3020",stack:new Error().stack,value:l,index:3};var v=[];if(typeof l>"u"||l>0)if(typeof a=="string")v=s.split(a,l);else{var g=0,x=await ce(a,s);if(typeof x<"u"){for(var $=0;typeof x<"u"&&(typeof l>"u"||g<l);)v.push(s.substring($,x.start)),$=x.end,x=await ce(x.next),g++;(typeof l>"u"||g<l)&&v.push(s.substring($))}else v.push(s)}return v}}function we(s,a){if(!(typeof s>"u"))return typeof a>"u"&&(a=""),s.join(a)}function A(s,a,l){if(!(typeof s>"u")){var v={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},g=v;typeof l<"u"&&o.keys(l).forEach(function(ne){g[ne]=l[ne]});for(var x=[],$=g["zero-digit"].charCodeAt(0),B=$;B<$+10;B++)x.push(String.fromCharCode(B));var se=x.concat([g["decimal-separator"],g["exponent-separator"],g["grouping-separator"],g.digit,g["pattern-separator"]]),J=a.split(g["pattern-separator"]);if(J.length>2)throw{code:"D3080",stack:new Error().stack};var Ee=function(ne){var Te=(function(){for(var Fe,Ze=0;Ze<ne.length;Ze++)if(Fe=ne.charAt(Ze),se.indexOf(Fe)!==-1&&Fe!==g["exponent-separator"])return ne.substring(0,Ze);return""})(),ze=(function(){for(var Fe,Ze=ne.length-1;Ze>=0;Ze--)if(Fe=ne.charAt(Ze),se.indexOf(Fe)!==-1&&Fe!==g["exponent-separator"])return ne.substring(Ze+1);return""})(),ke=ne.substring(Te.length,ne.length-ze.length),Xe,mt,Ye,wt,Ke=ne.indexOf(g["exponent-separator"],Te.length);Ke===-1||Ke>ne.length-ze.length?(Xe=ke,mt=void 0):(Xe=ke.substring(0,Ke),mt=ke.substring(Ke+1));var rt=Xe.indexOf(g["decimal-separator"]);return rt===-1?(Ye=Xe,wt=ze):(Ye=Xe.substring(0,rt),wt=Xe.substring(rt+1)),{prefix:Te,suffix:ze,activePart:ke,mantissaPart:Xe,exponentPart:mt,integerPart:Ye,fractionalPart:wt,subpicture:ne}},xe=function(ne){var Te,ze,ke=ne.subpicture,Xe=ke.indexOf(g["decimal-separator"]);Xe!==ke.lastIndexOf(g["decimal-separator"])&&(Te="D3081"),ke.indexOf(g.percent)!==ke.lastIndexOf(g.percent)&&(Te="D3082"),ke.indexOf(g["per-mille"])!==ke.lastIndexOf(g["per-mille"])&&(Te="D3083"),ke.indexOf(g.percent)!==-1&&ke.indexOf(g["per-mille"])!==-1&&(Te="D3084");var mt=!1;for(ze=0;ze<ne.mantissaPart.length;ze++){var Ye=ne.mantissaPart.charAt(ze);if(x.indexOf(Ye)!==-1||Ye===g.digit){mt=!0;break}}mt||(Te="D3085");var wt=ne.activePart.split("").map(function(Fe){return se.indexOf(Fe)===-1?"p":"a"}).join("");wt.indexOf("p")!==-1&&(Te="D3086"),Xe!==-1?(ke.charAt(Xe-1)===g["grouping-separator"]||ke.charAt(Xe+1)===g["grouping-separator"])&&(Te="D3087"):ne.integerPart.charAt(ne.integerPart.length-1)===g["grouping-separator"]&&(Te="D3088"),ke.indexOf(g["grouping-separator"]+g["grouping-separator"])!==-1&&(Te="D3089");var Ke=ne.integerPart.indexOf(g.digit);Ke!==-1&&ne.integerPart.substring(0,Ke).split("").filter(function(Fe){return x.indexOf(Fe)>-1}).length>0&&(Te="D3090"),Ke=ne.fractionalPart.lastIndexOf(g.digit),Ke!==-1&&ne.fractionalPart.substring(Ke).split("").filter(function(Fe){return x.indexOf(Fe)>-1}).length>0&&(Te="D3091");var rt=typeof ne.exponentPart=="string";if(rt&&ne.exponentPart.length>0&&(ke.indexOf(g.percent)!==-1||ke.indexOf(g["per-mille"])!==-1)&&(Te="D3092"),rt&&(ne.exponentPart.length===0||ne.exponentPart.split("").filter(function(Fe){return x.indexOf(Fe)===-1}).length>0)&&(Te="D3093"),Te)throw{code:Te,stack:new Error().stack}},Se=function(ne){var Te=function(Ie,dr){for(var Wt=[],ut=Ie.indexOf(g["grouping-separator"]);ut!==-1;){var pr=(dr?Ie.substring(0,ut):Ie.substring(ut)).split("").filter(function(Dt){return x.indexOf(Dt)!==-1||Dt===g.digit}).length;Wt.push(pr),ut=ne.integerPart.indexOf(g["grouping-separator"],ut+1)}return Wt},ze=Te(ne.integerPart),ke=function(Ie){if(Ie.length===0)return 0;for(var dr=function(pr,Dt){return Dt===0?pr:dr(Dt,pr%Dt)},Wt=Ie.reduce(dr),ut=1;ut<=Ie.length;ut++)if(Ie.indexOf(ut*Wt)===-1)return 0;return Wt},Xe=ke(ze),mt=Te(ne.fractionalPart,!0),Ye=ne.integerPart.split("").filter(function(Ie){return x.indexOf(Ie)!==-1}).length,wt=Ye,Ke=ne.fractionalPart.split(""),rt=Ke.filter(function(Ie){return x.indexOf(Ie)!==-1}).length,Fe=Ke.filter(function(Ie){return x.indexOf(Ie)!==-1||Ie===g.digit}).length,Ze=typeof ne.exponentPart=="string";Ye===0&&Fe===0&&(Ze?(rt=1,Fe=1):Ye=1),Ze&&Ye===0&&ne.integerPart.indexOf(g.digit)!==-1&&(Ye=1),Ye===0&&rt===0&&(rt=1);var In=0;return Ze&&(In=ne.exponentPart.split("").filter(function(Ie){return x.indexOf(Ie)!==-1}).length),{integerPartGroupingPositions:ze,regularGrouping:Xe,minimumIntegerPartSize:Ye,scalingFactor:wt,prefix:ne.prefix,fractionalPartGroupingPositions:mt,minimumFactionalPartSize:rt,maximumFactionalPartSize:Fe,minimumExponentSize:In,suffix:ne.suffix,picture:ne.subpicture}},Me=J.map(Ee);Me.forEach(xe);var be=Me.map(Se),Re=g["minus-sign"],et=g["zero-digit"],qe=g["decimal-separator"],st=g["grouping-separator"];be.length===1&&(be.push(JSON.parse(JSON.stringify(be[0]))),be[1].prefix=Re+be[1].prefix);var Ue;s>=0?Ue=be[0]:Ue=be[1];var Gt;Ue.picture.indexOf(g.percent)!==-1?Gt=s*100:Ue.picture.indexOf(g["per-mille"])!==-1?Gt=s*1e3:Gt=s;var pt,Rt;if(Ue.minimumExponentSize===0)pt=Gt;else{var Ms=Math.pow(10,Ue.scalingFactor),Us=Math.pow(10,Ue.scalingFactor-1);if(pt=Gt,Rt=0,pt!==0){for(;Math.abs(pt)<Us;)pt*=10,Rt-=1;for(;Math.abs(pt)>Ms;)pt/=10,Rt+=1}}var Fs=L(pt,Ue.maximumFactionalPartSize),$n=function(ne,Te){var ze=Math.abs(ne).toFixed(Te);return et!=="0"&&(ze=ze.split("").map(function(ke){return ke>="0"&&ke<="9"?x[ke.charCodeAt(0)-48]:ke}).join("")),ze},oe=$n(Fs,Ue.maximumFactionalPartSize),He=oe.indexOf(".");for(He===-1?oe=oe+qe:oe=oe.replace(".",qe);oe.charAt(0)===et;)oe=oe.substring(1);for(;oe.charAt(oe.length-1)===et;)oe=oe.substring(0,oe.length-1);He=oe.indexOf(qe);var Vt=Ue.minimumIntegerPartSize-He,Nn=Ue.minimumFactionalPartSize-(oe.length-He-1);if(oe=(Vt>0?new Array(Vt+1).join(et):"")+oe,oe=oe+(Nn>0?new Array(Nn+1).join(et):""),He=oe.indexOf(qe),Ue.regularGrouping>0)for(var Os=Math.floor((He-1)/Ue.regularGrouping),fr=1;fr<=Os;fr++)oe=[oe.slice(0,He-fr*Ue.regularGrouping),st,oe.slice(He-fr*Ue.regularGrouping)].join("");else Ue.integerPartGroupingPositions.forEach(function(ne){oe=[oe.slice(0,He-ne),st,oe.slice(He-ne)].join(""),He++});if(He=oe.indexOf(qe),Ue.fractionalPartGroupingPositions.forEach(function(ne){oe=[oe.slice(0,ne+He+1),st,oe.slice(ne+He+1)].join("")}),He=oe.indexOf(qe),(Ue.picture.indexOf(qe)===-1||He===oe.length-1)&&(oe=oe.substring(0,oe.length-1)),typeof Rt<"u"){var hr=$n(Rt,0);Vt=Ue.minimumExponentSize-hr.length,Vt>0&&(hr=new Array(Vt+1).join(et)+hr),oe=oe+g["exponent-separator"]+(Rt<0?Re:"")+hr}return oe=Ue.prefix+oe+Ue.suffix,oe}}function R(s,a){if(!(typeof s>"u")){if(s=L(s),typeof a>"u"?a=10:a=L(a),a<2||a>36)throw{code:"D3100",stack:new Error().stack,value:a};var l=s.toString(a);return l}}function k(s){var a;if(!(typeof s>"u")){if(typeof s=="number")a=s;else if(typeof s=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(s)&&!isNaN(parseFloat(s))&&isFinite(s))a=parseFloat(s);else if(typeof s=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(s))a=Number(s);else if(s===!0)a=1;else if(s===!1)a=0;else throw{code:"D3030",value:s,stack:new Error().stack,index:1};return a}}function F(s){var a;if(!(typeof s>"u"))return a=Math.abs(s),a}function j(s){var a;if(!(typeof s>"u"))return a=Math.floor(s),a}function I(s){var a;if(!(typeof s>"u"))return a=Math.ceil(s),a}function L(s,a){var l;if(!(typeof s>"u")){if(a){var v=s.toString().split("e");s=+(v[0]+"e"+(v[1]?+v[1]+a:a))}l=Math.round(s);var g=l-s;return Math.abs(g)===.5&&Math.abs(l%2)===1&&(l=l-1),a&&(v=l.toString().split("e"),l=+(v[0]+"e"+(v[1]?+v[1]-a:-a))),Object.is(l,-0)&&(l=0),l}}function q(s){var a;if(!(typeof s>"u")){if(s<0)throw{stack:new Error().stack,code:"D3060",index:1,value:s};return a=Math.sqrt(s),a}}function K(s,a){var l;if(!(typeof s>"u")){if(l=Math.pow(s,a),!isFinite(l))throw{stack:new Error().stack,code:"D3061",index:1,value:s,exp:a};return l}}function he(){return Math.random()}function ue(s){if(!(typeof s>"u")){var a=!1;if(Array.isArray(s)){if(s.length===1)a=ue(s[0]);else if(s.length>1){var l=s.filter(function(v){return ue(v)});a=l.length>0}}else typeof s=="string"?s.length>0&&(a=!0):b(s)?s!==0&&(a=!0):s!==null&&typeof s=="object"&&!w(s)?o.keys(s).length>0&&(a=!0):typeof s=="boolean"&&s===!0&&(a=!0);return a}}function te(s){if(!(typeof s>"u"))return!ue(s)}function Q(s,a,l,v){var g=[a],x=N(s);return x>=2&&g.push(l),x>=3&&g.push(v),g}async function le(s,a){if(!(typeof s>"u")){for(var l=this.createSequence(),v=0;v<s.length;v++){var g=Q(a,s[v],v,s),x=await a.apply(this,g);typeof x<"u"&&l.push(x)}return l}}async function ee(s,a){if(!(typeof s>"u")){for(var l=this.createSequence(),v=0;v<s.length;v++){var g=s[v],x=Q(a,g,v,s),$=await a.apply(this,x);ue($)&&l.push(g)}return l}}async function Ne(s,a){if(!(typeof s>"u")){for(var l=!1,v,g=0;g<s.length;g++){var x=s[g],$=!0;if(typeof a<"u"){var B=Q(a,x,g,s),se=await a.apply(this,B);$=ue(se)}if($)if(!l)v=x,l=!0;else throw{stack:new Error().stack,code:"D3138",index:g}}if(!l)throw{stack:new Error().stack,code:"D3139"};return v}}function Qe(){for(var s=[],a=Array.prototype.slice.call(arguments),l=Math.min.apply(Math,a.map(function(x){return Array.isArray(x)?x.length:0})),v=0;v<l;v++){var g=a.map(x=>x[v]);s.push(g)}return s}async function Be(s,a,l){if(!(typeof s>"u")){var v,g=N(a);if(g<2)throw{stack:new Error().stack,code:"D3050",index:1};var x;for(typeof l>"u"&&s.length>0?(v=s[0],x=1):(v=l,x=0);x<s.length;){var $=[v,s[x]];g>=3&&$.push(x),g>=4&&$.push(s),v=await a.apply(this,$),x++}return v}}function Le(s){var a=this.createSequence();if(Array.isArray(s)){for(var l=Object.create(null),v=0;v<s.length;v++){var g=Le.call(this,s[v]);g.forEach(function(x){l[x]=!0})}a=Le.call(this,l)}else s!==null&&typeof s=="object"&&!w(s)&&o.keys(s).forEach(x=>a.push(x));return a}function je(s,a){var l;if(Array.isArray(s)){l=this.createSequence();for(var v=0;v<s.length;v++){var g=je.call(this,s[v],a);typeof g<"u"&&(Array.isArray(g)?g.forEach(x=>l.push(x)):l.push(g))}}else s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,a)&&!w(s)&&(l=s[a]);return l}function ot(s,a){if(typeof s>"u")return a;if(typeof a>"u")return s;Array.isArray(s)||(s=this.createSequence(s)),Array.isArray(a)||(a=[a]);const l=s.length+a.length;if(this.options&&l>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};return s.concat(a)}function Pt(s){return!(typeof s>"u")}function Ct(s){var a=this.createSequence();if(Array.isArray(s))for(var l=0;l<s.length;l++)a=ot.call(this,a,Ct.call(this,s[l]));else if(s!==null&&typeof s=="object"&&!P(s))for(const g of o.keys(s)){var v=Object.create(null);v[g]=s[g],a.push(v)}else a=s;return a}function H(s){if(!(typeof s>"u")){var a=Object.create(null);return s.forEach(function(l){for(const v of o.keys(l))a[v]=l[v]}),a}}function cr(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var a=s.length,l=new Array(a),v=0;v<a;v++)l[a-v-1]=s[v];return l}}async function lr(s,a){var l=this.createSequence();for(const x of o.keys(s)){var v=Q(a,s[x],x,s),g=await a.apply(this,v);typeof g<"u"&&l.push(g)}return l}function tt(s){throw{code:"D3137",stack:new Error().stack,message:s||"$error() function evaluated"}}function zt(s,a){if(!s)throw{code:"D3141",stack:new Error().stack,message:a||"$assert() statement failed"}}function it(s){if(s!==void 0)return s===null?"null":b(s)?"number":typeof s=="string"?"string":typeof s=="boolean"?"boolean":Array.isArray(s)?"array":w(s)?"function":"object"}async function yt(s,a){if(!(typeof s>"u")){if(s.length<=1)return s;var l;if(typeof a>"u"){if(!M(s)&&!T(s))throw{stack:new Error().stack,code:"D3070",index:1};l=async function($,B){return $>B}}else l=a;var v=async function($,B){var se=async function(Ee,xe,Se){xe.length===0?Array.prototype.push.apply(Ee,Se):Se.length===0?Array.prototype.push.apply(Ee,xe):await l(xe[0],Se[0])?(Ee.push(Se[0]),await se(Ee,xe,Se.slice(1))):(Ee.push(xe[0]),await se(Ee,xe.slice(1),Se))},J=[];return await se(J,$,B),J},g=async function($){if(!Array.isArray($)||$.length<=1)return $;var B=Math.floor($.length/2),se=$.slice(0,B),J=$.slice(B);return se=await g(se),J=await g(J),await v(se,J)},x=await g(s);return x}}function c(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var a=new Array(s.length),l=0;l<s.length;l++){var v=Math.floor(Math.random()*(l+1));l!==v&&(a[l]=a[v]),a[v]=s[l]}return a}}function f(s){if(!(typeof s>"u")){if(!Array.isArray(s)||s.length<=1)return s;for(var a=S(s)?this.createSequence():[],l=0;l<s.length;l++){for(var v=s[l],g=!1,x=0;x<a.length;x++)if(Z(v,a[x])){g=!0;break}g||a.push(v)}return a}}async function p(s,a){var l=Object.create(null);for(const $ of o.keys(s)){var v=s[$],g=Q(a,v,$,s),x=await a.apply(this,g);ue(x)&&(l[$]=v)}return o.keys(l).length===0&&(l=void 0),l}return{sum:E,count:m,max:U,min:_,average:C,string:z,substring:O,substringBefore:re,substringAfter:ae,lowercase:_e,uppercase:ge,length:pe,trim:Pe,pad:Je,match:We,contains:me,replace:ie,split:Ae,join:we,formatNumber:A,formatBase:R,number:k,floor:j,ceil:I,round:L,abs:F,sqrt:q,power:K,random:he,boolean:ue,not:te,map:le,zip:Qe,filter:ee,single:Ne,foldLeft:Be,sift:p,keys:Le,lookup:je,append:ot,exists:Pt,spread:Ct,merge:H,reverse:cr,each:lr,error:tt,assert:zt,type:it,sort:yt,shuffle:c,distinct:f,base64encode:Ce,base64decode:nt,encodeUrlComponent:d,encodeUrl:y,decodeUrlComponent:G,decodeUrl:fe}})();r.exports=h}).call(this)}).call(this,typeof vn<"u"?vn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,r,i){var u=t("./datetime"),o=t("./functions"),h=t("./utils"),b=t("./parser"),T=t("./signature"),M=(function(){var S=h.isNumeric,w=h.isArrayOfStrings,P=h.isArrayOfNumbers,D=h.isSequence,N=h.isFunction,Z=h.isLambda,Y=h.isIterable,E=h.isPromise,m=h.getFunctionArity,U=h.isDeepEqual,_=tt(null);async function C(c,f,p){var s;p.base.depth++,p.base.guardrails();var a=p.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(a&&await a(c,f,p),c.type){case"path":s=await z(c,f,p);break;case"binary":s=await pe(c,f,p);break;case"unary":s=await Pe(c,f,p);break;case"name":s=Je(c,f,p);break;case"string":case"number":case"value":s=ce(c);break;case"wildcard":s=me(c,f,p);break;case"descendant":s=ie(c,f,p);break;case"parent":s=p.lookup(c.slot.label);break;case"condition":s=await j(c,f,p);break;case"block":s=await I(c,f,p);break;case"bind":s=await F(c,f,p);break;case"regex":s=L(c,f,p);break;case"function":s=await Q(c,f,p);break;case"variable":s=q(c,f,p);break;case"lambda":s=Ne(c,f,p);break;case"partial":s=await Qe(c,f,p);break;case"apply":s=await te(c,f,p);break;case"transform":s=he(c,f,p);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var l=0;l<c.predicate.length;l++)s=await ge(c.predicate[l].expr,s,p);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(s=await A(c.group,s,p));var v=p.lookup(Symbol.for("jsonata.__evaluate_exit"));return v&&await v(c,f,p,s),s&&D(s)&&!s.tupleStream&&(c.keepArray&&(s.keepSingleton=!0),s.length===0?s=void 0:s.length===1&&(s=s.keepSingleton?s:s[0])),p.base.depth--,s}async function z(c,f,p){var s;Array.isArray(f)&&c.steps[0].type!=="variable"?s=f:s=p.base.createSequence(f);for(var a,l=!1,v=void 0,g=0;g<c.steps.length;g++){var x=c.steps[g];if(x.tuple&&(l=!0),g===0&&x.consarray?a=await C(x,s,p):l?v=await _e(x,s,v,p):a=await re(x,s,p,g===c.steps.length-1),!l&&(typeof a>"u"||a.length===0))break;typeof x.focus>"u"&&(s=a)}if(l)if(c.tuple)a=v;else for(a=p.base.createSequence(),g=0;g<v.length;g++)a.push(v[g]["@"]);return c.keepSingletonArray&&(Array.isArray(a)&&a.cons&&!a.sequence&&(a=p.base.createSequence(a)),a.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(a=await A(c.group,l?v:a,p)),a}function O(c,f){var p=tt(c);for(const s of h.keys(f))p.bind(s,f[s]);return p}async function re(c,f,p,s){var a;if(c.type==="sort")return a=await K(c,f,p),c.stages&&(a=await ae(c.stages,a,p)),a;a=p.base.createSequence();for(var l=0;l<f.length;l++){var v=await C(c,f[l],p);if(c.stages)for(var g=0;g<c.stages.length;g++)v=await ge(c.stages[g].expr,v,p);typeof v<"u"&&a.push(v)}var x=p.base.createSequence();return s&&a.length===1&&Array.isArray(a[0])&&!D(a[0])?x=a[0]:Array.prototype.forEach.call(a,function($){!Array.isArray($)||$.cons?x.push($):Array.prototype.forEach.call($,B=>x.push(B))}),x}async function ae(c,f,p){for(var s=f,a=0;a<c.length;a++){var l=c[a];switch(l.type){case"filter":s=await ge(l.expr,s,p);break;case"index":for(var v=0;v<s.length;v++){var g=s[v];g[l.value]=v}break}}return s}async function _e(c,f,p,s){var a;if(c.type==="sort"){if(p)a=await K(c,p,s);else{var l=await K(c,f,s);a=s.base.createSequence(),a.tupleStream=!0;for(var v=0;v<l.length;v++){var g={"@":l[v]};g[c.index]=v,a.push(g)}}return c.stages&&(a=await ae(c.stages,a,s)),a}a=s.base.createSequence(),a.tupleStream=!0;var x=s;p===void 0&&(p=f.map(J=>({"@":J})));for(var $=0;$<p.length;$++){x=O(s,p[$]);var B=await C(c,p[$]["@"],x);if(typeof B<"u"){Array.isArray(B)||(B=[B]);for(var se=0;se<B.length;se++)g=Object.create(null),Object.assign(g,p[$]),B.tupleStream?Object.assign(g,B[se]):(c.focus?(g[c.focus]=B[se],g["@"]=p[$]["@"]):g["@"]=B[se],c.index&&(g[c.index]=se),c.ancestor&&(g[c.ancestor.label]=p[$]["@"])),a.push(g)}}return c.stages&&(a=await ae(c.stages,a,s)),a}async function ge(c,f,p){var s=p.base.createSequence();if(f&&f.tupleStream&&(s.tupleStream=!0),Array.isArray(f)||(f=p.base.createSequence(f)),c.type==="number"){var a=Math.floor(c.value);a<0&&(a=f.length+a);var l=await f[a];typeof l<"u"&&(Array.isArray(l)?s=l:s.push(l))}else for(a=0;a<f.length;a++){var l=f[a],v=l,g=p;f.tupleStream&&(v=l["@"],g=O(p,l));var x=await C(c,v,g);S(x)&&(x=[x]),P(x)?Array.prototype.forEach.call(x,function(B){var se=Math.floor(B);se<0&&(se=f.length+se),se===a&&s.push(l)}):o.boolean(x)&&s.push(l)}return s}async function pe(c,f,p){var s,a=await C(c.lhs,f,p),l=c.value,v=async()=>await C(c.rhs,f,p);if(l==="and"||l==="or")try{return await fe(a,v,l)}catch(x){throw x.position=c.position,x.token=l,x}var g=await v();try{switch(l){case"+":case"-":case"*":case"/":case"%":s=nt(a,g,l);break;case"=":case"!=":s=d(a,g,l);break;case"<":case"<=":case">":case">=":s=y(a,g,l);break;case"&":s=we(a,g);break;case"..":s=k(a,g,p);break;case"in":s=G(a,g);break}}catch(x){throw x.position=c.position,x.token=l,x}return s}async function Pe(c,f,p){var s,a={options:p.base.options,createSequence:p.base.createSequence};switch(c.value){case"-":if(s=await C(c.expression,f,p),typeof s>"u")s=void 0;else if(S(s))s=-s;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:s};break;case"[":s=[];let g=await Promise.all(c.expressions.map(async(x,$)=>(p.isParallelCall=$>0,[x,await C(x,f,p)])));for(let x of g){var[l,v]=x;typeof v<"u"&&(l.value==="["?s.push(v):s=o.append.call(a,s,v))}c.consarray&&Object.defineProperty(s,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":s=await A(c,f,p);break}return s}function Je(c,f,p){var s={createSequence:p.base.createSequence};return o.lookup.call(s,f,c.value)}function ce(c){return c.value}function me(c,f,p){var s={options:p.base.options,createSequence:p.base.createSequence},a=s.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!N(f)&&h.keys(f).forEach(function(l){var v=f[l];Array.isArray(v)?(v=We(v),a=o.append.call(s,a,v)):a.push(v)}),a}function We(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){We(p,f)}):f.push(c),f}function ie(c,f,p){var s,a=p.base.createSequence();return typeof f<"u"&&(Ce(f,a),a.length===1?s=a[0]:s=a),s}function Ce(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){Ce(p,f)}):c!==null&&typeof c=="object"&&!N(c)&&h.keys(c).forEach(function(p){Ce(c[p],f)})}function nt(c,f,p){var s;if(typeof c<"u"&&!S(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!S(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return s;switch(p){case"+":s=c+f;break;case"-":s=c-f;break;case"*":s=c*f;break;case"/":s=c/f;break;case"%":s=c%f;break}return s}function d(c,f,p){var s,a=typeof c,l=typeof f;if(a==="undefined"||l==="undefined")return!1;switch(p){case"=":s=U(c,f);break;case"!=":s=!U(c,f);break}return s}function y(c,f,p){var s,a=typeof c,l=typeof f,v=a==="undefined"||a==="string"||a==="number",g=l==="undefined"||l==="string"||l==="number";if(!v||!g)throw{code:"T2010",stack:new Error().stack,value:a==="string"||a==="number"?f:c};if(!(a==="undefined"||l==="undefined")){if(a!==l)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(p){case"<":s=c<f;break;case"<=":s=c<=f;break;case">":s=c>f;break;case">=":s=c>=f;break}return s}}function G(c,f){var p=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var s=0;s<f.length;s++)if(f[s]===c){p=!0;break}return p}async function fe(c,f,p){var s,a=Ae(c);switch(p){case"and":s=a&&Ae(await f());break;case"or":s=a||Ae(await f());break}return s}function Ae(c){var f=o.boolean(c);return typeof f>"u"?!1:f}function we(c,f){var p,s="",a="";return typeof c<"u"&&(s=o.string(c)),typeof f<"u"&&(a=o.string(f)),p=s.concat(a),p}async function A(c,f,p){var s=Object.create(null),a=Object.create(null),l=!!(f&&f.tupleStream),v={options:p.base.options,createSequence:p.base.createSequence};Array.isArray(f)||(p.base.options,f=v.createSequence(f)),f.length===0&&!l&&f.push(void 0);for(var g=0;g<f.length;g++)for(var x=f[g],$=l?O(p,x):p,B=0;B<c.lhs.length;B++){var se=c.lhs[B],J=await C(se[0],l?x["@"]:x,$);if(typeof J!="string"&&J!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:J};if(J!==void 0){if(J==="_jsonata_lambda"||J==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:J};var Ee={data:x,exprIndex:B};if(Object.prototype.hasOwnProperty.call(a,J)){if(a[J].exprIndex!==B)throw{code:"D1009",stack:new Error().stack,position:c.position,value:J};a[J].data=o.append.call(v,a[J].data,x)}else a[J]=Ee}}let xe=await Promise.all(h.keys(a).map(async(Me,be)=>{let Re=a[Me];var et=Re.data,qe=p;if(l){var st=R(Re.data,p);et=st["@"],delete st["@"],qe=O(p,st)}return p.isParallelCall=be>0,[Me,await C(c.lhs[Re.exprIndex][1],et,qe)]}));for(let Me of xe){var[J,Se]=await Me;typeof Se<"u"&&(s[J]=Se)}return s}function R(c,f){if(!Array.isArray(c))return c;var p=Object.create(null),s={options:f.base.options,createSequence:f.base.createSequence};Object.assign(p,c[0]);for(var a=1;a<c.length;a++)for(const l of h.keys(c[a]))p[l]=o.append.call(s,p[l],c[a][l]);return p}function k(c,f,p){var s;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return s;var a=f-c+1;if(a>1e7)throw{code:"D2014",stack:new Error().stack,value:a};if(p.base.options&&a>p.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:a};s=new Array(a);for(var l=c,v=0;l<=f;l++,v++)s[v]=l;return s.sequence=!0,s}async function F(c,f,p){var s=await C(c.rhs,f,p);return p.bind(c.lhs.value,s),s}async function j(c,f,p){var s,a=await C(c.condition,f,p);return o.boolean(a)?s=await C(c.then,f,p):typeof c.else<"u"&&(s=await C(c.else,f,p)),s}async function I(c,f,p){for(var s,a=tt(p),l=0;l<c.expressions.length;l++)s=await C(c.expressions[l],f,a);return s}function L(c,f,p){var s=new p.base.RegexEngine(c.value),a=function(l,v){var g;s.lastIndex=v||0;var x=s.exec(l);if(x!==null){if(g={match:x[0],start:x.index,end:x.index+x[0].length,groups:[]},x.length>1)for(var $=1;$<x.length;$++)g.groups.push(x[$]);g.next=function(){if(!(s.lastIndex>=l.length)){var B=a(l,s.lastIndex);if(B&&B.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return B}}}return g};return a}function q(c,f,p){var s;return c.value===""?s=f&&f.outerWrapper?f[0]:f:s=p.lookup(c.value),s}async function K(c,f,p){var s,a=f,l=!!f.tupleStream,v=async function(x,$){for(var B=0,se=0;B===0&&se<c.terms.length;se++){var J=c.terms[se],Ee=x,xe=p;l&&(Ee=x["@"],xe=O(p,x));var Se=await C(J.expression,Ee,xe);Ee=$,xe=p,l&&(Ee=$["@"],xe=O(p,$));var Me=await C(J.expression,Ee,xe),be=typeof Se,Re=typeof Me;if(be==="undefined"){B=Re==="undefined"?0:1;continue}if(Re==="undefined"){B=-1;continue}if(!(be==="string"||be==="number")||!(Re==="string"||Re==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:be==="string"||be==="number"?Me:Se};if(be!==Re)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Se,value2:Me};Se!==Me&&(Se<Me?B=-1:B=1,J.descending===!0&&(B=-B))}return B===1},g={environment:p,input:f};return s=await o.sort.apply(g,[a,v]),s}function he(c,f,p){var s=async function(a){if(!(typeof a>"u")){var l=p.lookup("clone");if(!N(l))throw{code:"T2013",stack:new Error().stack,position:c.position};var v=await le(l,[a],null,p),g=await C(c.pattern,v,p);if(typeof g<"u"){Array.isArray(g)||(g=[g]);for(var x=0;x<g.length;x++){var $=g[x],B=await C(c.update,$,p),se=typeof B;if(se!=="undefined"){if(se!=="object"||B===null||Array.isArray(B))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:B};for(const Se of h.keys(B))$[Se]=B[Se]}if(typeof c.delete<"u"){var J=await C(c.delete,$,p);if(typeof J<"u"){var Ee=J;if(Array.isArray(J)||(J=[J]),!w(J))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:Ee};for(var xe=0;xe<J.length;xe++)typeof $=="object"&&$!==null&&delete $[J[xe]]}}}}return v}};return H(s,"<(oa):o>")}var ue=b("function($f, $g) { function($x){ $g($f($x)) } }");async function te(c,f,p){var s,a=await C(c.lhs,f,p);if(c.rhs.type==="function")s=await Q(c.rhs,f,p,{context:a});else{var l=await C(c.rhs,f,p);if(!N(l))throw{code:"T2006",stack:new Error().stack,position:c.position,value:l};if(N(a)){var v=await C(ue,null,p);s=await le(v,[a,l],null,p)}else s=await le(l,[a],null,p)}return s}async function Q(c,f,p,s){var a,l=await C(c.procedure,f,p);if(typeof l>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var v=[];typeof s<"u"&&v.push(s.context);for(var g=0;g<c.arguments.length;g++){const $=await C(c.arguments[g],f,p);if(N($)){const B=async function(...se){return await le($,se,null,p)};B.arity=m($),v.push(B)}else v.push($)}var x=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof l=="object"&&(l.token=x,l.position=c.position),a=await le(l,v,f,p)}catch($){throw $.position||($.position=c.position),$.token||($.token=x),$}return a}async function le(c,f,p,s){var a;for(a=await ee(c,f,p,s);Z(a)&&a.thunk===!0;){var l=await C(a.body.procedure,a.input,a.environment);a.body.procedure.type==="variable"&&(l.token=a.body.procedure.value),l.position=a.body.procedure.position;for(var v=[],g=0;g<a.body.arguments.length;g++)v.push(await C(a.body.arguments[g],a.input,a.environment));a=await ee(l,v,p,s)}return a}async function ee(c,f,p,s){var a;try{var l=f;if(c&&(l=Be(c.signature,f,p)),Z(c))a=await Le(c,l);else if(c&&c._jsonata_function===!0){var v={environment:s,input:p,options:s.base.options,createSequence:s.base.createSequence};a=c.implementation.apply(v,l),Y(a)&&(a=a.next().value),E(a)&&(a=await a)}else if(typeof c=="function")a=c.apply(p,l),E(a)&&(a=await a);else throw{code:"T1006",stack:new Error().stack}}catch(g){throw c&&(typeof g.token>"u"&&typeof c.token<"u"&&(g.token=c.token),g.position=c.position||g.position),g}return a}function Ne(c,f,p){var s={_jsonata_lambda:!0,input:f,environment:p,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(s.thunk=!0),s.apply=async function(a,l){return await le(s,l,f,a?a.environment:p)},s}async function Qe(c,f,p){for(var s,a=[],l=0;l<c.arguments.length;l++){var v=c.arguments[l];v.type==="operator"&&v.value==="?"?a.push(v):a.push(await C(v,f,p))}var g=await C(c.procedure,f,p);if(typeof g>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(Z(g))s=je(g,a,p);else if(g&&g._jsonata_function===!0)s=ot(g.implementation,a,p);else if(typeof g=="function")s=ot(g,a,p);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return s}function Be(c,f,p){if(typeof c>"u")return f;var s=c.validate(f,p);return s}async function Le(c,f){var p,s=tt(c.environment);return Array.prototype.forEach.call(c.arguments,function(a,l){s.bind(a.value,f[l])}),typeof c.body=="function"?p=await Pt(c.body,s):p=await C(c.body,c.input,s),p}function je(c,f,p){var s=tt(c.environment||p),a=[];Array.prototype.forEach.call(c.arguments,function(v,g){var x=f[g];x&&x.type==="operator"&&x.value==="?"?a.push(v):s.bind(v.value,x)});var l={_jsonata_lambda:!0,input:c.input,environment:s,arguments:a,body:c.body};return l}function ot(c,f,p){var s=Ct(c);s=s.map(function(g){return"$"+g.trim()});var a="function("+s.join(", ")+"){ _ }",l=b(a);l.body=c;var v=je(l,f,p);return v}async function Pt(c,f){var p=Ct(c),s=p.map(function(v){return f.lookup(v.trim())}),a={environment:f,createSequence:f.base.createSequence},l=c.apply(a,s);return E(l)&&(l=await l),l}function Ct(c){var f=c.toString(),p=/\(([^)]*)\)/.exec(f)[1],s=p.split(",");return s}function H(c,f){var p={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(p.signature=T(f)),p}async function cr(c,f){if(!(typeof c>"u")){var p=this.input;typeof f<"u"&&(p=f,Array.isArray(p)&&!D(p)&&(p=this.createSequence(p),p.outerWrapper=!0));try{var s=b(c,!1)}catch(l){throw it(l),{stack:new Error().stack,code:"D3120",value:l.message,error:l}}try{var a=await C(s,p,this.environment)}catch(l){throw it(l),{stack:new Error().stack,code:"D3121",value:l.message,error:l}}return a}}function lr(c){if(!(typeof c>"u"))return JSON.parse(o.string(c))}function tt(c){var f=Object.create(null);const p={bind:function(a,l){f[a]=l},lookup:function(a){var l;return Object.prototype.hasOwnProperty.call(f,a)?l=f[a]:c&&(l=c.lookup(a)),l},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var s=c.lookup(Symbol.for("jsonata.__createFrame_push"));s&&s(c,p),p.base=c.base}return p}_.bind("sum",H(o.sum,"<a<n>:n>")),_.bind("count",H(o.count,"<a:n>")),_.bind("max",H(o.max,"<a<n>:n>")),_.bind("min",H(o.min,"<a<n>:n>")),_.bind("average",H(o.average,"<a<n>:n>")),_.bind("string",H(o.string,"<x-b?:s>")),_.bind("substring",H(o.substring,"<s-nn?:s>")),_.bind("substringBefore",H(o.substringBefore,"<s-s:s>")),_.bind("substringAfter",H(o.substringAfter,"<s-s:s>")),_.bind("lowercase",H(o.lowercase,"<s-:s>")),_.bind("uppercase",H(o.uppercase,"<s-:s>")),_.bind("length",H(o.length,"<s-:n>")),_.bind("trim",H(o.trim,"<s-:s>")),_.bind("pad",H(o.pad,"<s-ns?:s>")),_.bind("match",H(o.match,"<s-f<s:o>n?:a<o>>")),_.bind("contains",H(o.contains,"<s-(sf):b>")),_.bind("replace",H(o.replace,"<s-(sf)(sf)n?:s>")),_.bind("split",H(o.split,"<s-(sf)n?:a<s>>")),_.bind("join",H(o.join,"<a<s>s?:s>")),_.bind("formatNumber",H(o.formatNumber,"<n-so?:s>")),_.bind("formatBase",H(o.formatBase,"<n-n?:s>")),_.bind("formatInteger",H(u.formatInteger,"<n-s:s>")),_.bind("parseInteger",H(u.parseInteger,"<s-s:n>")),_.bind("number",H(o.number,"<(nsb)-:n>")),_.bind("floor",H(o.floor,"<n-:n>")),_.bind("ceil",H(o.ceil,"<n-:n>")),_.bind("round",H(o.round,"<n-n?:n>")),_.bind("abs",H(o.abs,"<n-:n>")),_.bind("sqrt",H(o.sqrt,"<n-:n>")),_.bind("power",H(o.power,"<n-n:n>")),_.bind("random",H(o.random,"<:n>")),_.bind("boolean",H(o.boolean,"<x-:b>")),_.bind("not",H(o.not,"<x-:b>")),_.bind("map",H(o.map,"<af>")),_.bind("zip",H(o.zip,"<a+>")),_.bind("filter",H(o.filter,"<af>")),_.bind("single",H(o.single,"<af?>")),_.bind("reduce",H(o.foldLeft,"<afj?:j>")),_.bind("sift",H(o.sift,"<o-f?:o>")),_.bind("keys",H(o.keys,"<x-:a<s>>")),_.bind("lookup",H(o.lookup,"<x-s:x>")),_.bind("append",H(o.append,"<xx:a>")),_.bind("exists",H(o.exists,"<x:b>")),_.bind("spread",H(o.spread,"<x-:a<o>>")),_.bind("merge",H(o.merge,"<a<o>:o>")),_.bind("reverse",H(o.reverse,"<a:a>")),_.bind("each",H(o.each,"<o-f:a>")),_.bind("error",H(o.error,"<s?:x>")),_.bind("assert",H(o.assert,"<bs?:x>")),_.bind("type",H(o.type,"<x:s>")),_.bind("sort",H(o.sort,"<af?:a>")),_.bind("shuffle",H(o.shuffle,"<a:a>")),_.bind("distinct",H(o.distinct,"<x:x>")),_.bind("base64encode",H(o.base64encode,"<s-:s>")),_.bind("base64decode",H(o.base64decode,"<s-:s>")),_.bind("encodeUrlComponent",H(o.encodeUrlComponent,"<s-:s>")),_.bind("encodeUrl",H(o.encodeUrl,"<s-:s>")),_.bind("decodeUrlComponent",H(o.decodeUrlComponent,"<s-:s>")),_.bind("decodeUrl",H(o.decodeUrl,"<s-:s>")),_.bind("eval",H(cr,"<sx?:x>")),_.bind("toMillis",H(u.toMillis,"<s-s?:n>")),_.bind("fromMillis",H(u.fromMillis,"<n-s?s?:s>")),_.bind("clone",H(lr,"<(oa)-:o>"));var zt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function it(c){var f=zt[c.code];if(typeof f<"u"){var p=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});p=p.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=p}}function yt(c,f){var p,s;try{p=b(c,f&&f.recover),s=p.errors,delete p.errors}catch(v){throw it(v),v}var a=tt(_),l=new Date;return a.bind("now",H(function(v,g){return u.fromMillis(l.getTime(),v,g)},"<s?s?:s>")),a.bind("millis",H(function(){return l.getTime()},"<:n>")),{evaluate:async function(v,g,x){if(typeof s<"u"){var $={code:"S0500",position:0};throw it($),$}const B=tt(a);for(const J of h.keys(g))B.bind(J,g[J]);if(B.bind("$",v),l=new Date,B.timestamp=l,B.options=f,B.createSequence=function(){var J=[];return f&&f.sequence&&(J.push=function(...Ee){if(J.length+Ee.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(J,Ee)}),J.sequence=!0,arguments.length===1&&J.push(arguments[0]),J},Array.isArray(v)&&!D(v)&&(v=B.createSequence(v),v.outerWrapper=!0),f&&(f.timeout||f.stack)){const J=Date.now();B.guardrails=function(){if(f.stack>0&&B.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-J>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else B.guardrails=function(){};B.base=B,B.depth=0,f&&f.RegexEngine?B.RegexEngine=f.RegexEngine:B.RegexEngine=RegExp;var se;try{return se=await C(p,v,B),typeof x=="function"&&x(null,se),se}catch(J){throw it(J),J}},assign:function(v,g){a.bind(v,g)},registerFunction:function(v,g,x){var $=H(g,x);a.bind(v,$)},ast:function(){return p},errors:function(){return s}}}return yt.parser=b,yt})();r.exports=M},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,r,i){var u=t("./signature");const o=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},b={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
32
32
|
`,r:"\r",t:" "},T=function(S){var w=0,P=S.length,D=function(Y,E){var m={type:Y,value:E,position:w};return m},N=function(){for(var Y=w,E=0,m,U,_=function(z){if(S.charAt(z)==="/"&&E===0){for(var O=0;S.charAt(z-(O+1))==="\\";)O++;if(O%2===0)return!0}return!1};w<P;){var C=S.charAt(w);if(_(w)){if(m=S.substring(Y,w),m==="")throw{code:"S0301",stack:new Error().stack,position:w};for(w++,C=S.charAt(w),Y=w;C==="i"||C==="m";)w++,C=S.charAt(w);return U=S.substring(Y,w)+"g",new RegExp(m,U)}(C==="("||C==="["||C==="{")&&S.charAt(w-1)!=="\\"&&E++,(C===")"||C==="]"||C==="}")&&S.charAt(w-1)!=="\\"&&E--,w++}throw{code:"S0302",stack:new Error().stack,position:w}},Z=function(Y){if(w>=P)return null;for(var E=S.charAt(w);w<P&&`
|
|
33
33
|
\r\v`.indexOf(E)>-1;)w++,E=S.charAt(w);if(E==="/"&&S.charAt(w+1)==="*"){var m=w;for(w+=2,E=S.charAt(w);!(E==="*"&&S.charAt(w+1)==="/");)if(E=S.charAt(++w),w>=P)throw{code:"S0106",stack:new Error().stack,position:m};return w+=2,E=S.charAt(w),Z(Y)}if(Y!==!0&&E==="/")return w++,D("regex",N());if(E==="."&&S.charAt(w+1)===".")return w+=2,D("operator","..");if(E===":"&&S.charAt(w+1)==="=")return w+=2,D("operator",":=");if(E==="!"&&S.charAt(w+1)==="=")return w+=2,D("operator","!=");if(E===">"&&S.charAt(w+1)==="=")return w+=2,D("operator",">=");if(E==="<"&&S.charAt(w+1)==="=")return w+=2,D("operator","<=");if(E==="*"&&S.charAt(w+1)==="*")return w+=2,D("operator","**");if(E==="~"&&S.charAt(w+1)===">")return w+=2,D("operator","~>");if(E==="?"&&S.charAt(w+1)===":")return w+=2,D("operator","?:");if(E==="?"&&S.charAt(w+1)==="?")return w+=2,D("operator","??");if(Object.prototype.hasOwnProperty.call(h,E))return w++,D("operator",E);if(E==='"'||E==="'"){var U=E;w++;for(var _="";w<P;){if(E=S.charAt(w),E==="\\")if(w++,E=S.charAt(w),Object.prototype.hasOwnProperty.call(b,E))_+=b[E];else if(E==="u"){var C=S.substr(w+1,4);if(/^[0-9a-fA-F]+$/.test(C)){var z=parseInt(C,16);_+=String.fromCharCode(z),w+=4}else throw{code:"S0104",stack:new Error().stack,position:w}}else throw{code:"S0103",stack:new Error().stack,position:w,token:E};else{if(E===U)return w++,D("string",_);_+=E}w++}throw{code:"S0101",stack:new Error().stack,position:w}}var O=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,re=O.exec(S.substring(w));if(re!==null){var ae=parseFloat(re[0]);if(!isNaN(ae)&&isFinite(ae))return w+=re[0].length,D("number",ae);throw{code:"S0102",stack:new Error().stack,position:w,token:re[0]}}var _e;if(E==="`"){w++;var ge=S.indexOf("`",w);if(ge!==-1)return _e=S.substring(w,ge),w=ge+1,D("name",_e);throw w=P,{code:"S0105",stack:new Error().stack,position:w}}for(var pe=w,Pe;;)if(Pe=S.charAt(pe),pe===P||`
|
|
34
34
|
\r\v`.indexOf(Pe)>-1||Object.prototype.hasOwnProperty.call(h,Pe)){if(S.charAt(w)==="$")return _e=S.substring(w+1,pe),w=pe,D("variable",_e);switch(_e=S.substring(w,pe),w=pe,_e){case"or":case"in":case"and":return D("operator",_e);case"true":return D("value",!0);case"false":return D("value",!1);case"null":return D("value",null);default:return w===P&&_e===""?null:D("name",_e)}}else pe++};return Z},M=function(S,w){var P,D,N=Object.create(null),Z=[],Y=function(){var d=[];P.id!=="(end)"&&d.push({type:P.type,value:P.value,position:P.position});for(var y=D();y!==null;)d.push(y),y=D();return d},E={nud:function(){var d={code:"S0211",token:this.value,position:this.position};if(w)return d.remaining=Y(),d.type="error",Z.push(d),d;throw d.stack=new Error().stack,d}},m=function(d,y){var G=N[d];return y=y||0,G?y>=G.lbp&&(G.lbp=y):(G=Object.create(E),G.id=G.value=d,G.lbp=y,N[d]=G),G},U=function(d){if(w){d.remaining=Y(),Z.push(d);var y=N["(error)"];return P=Object.create(y),P.error=d,P.type="(error)",P}else throw d.stack=new Error().stack,d},_=function(d,y){if(d&&P.id!==d){var G;P.id==="(end)"?G="S0203":G="S0202";var fe={code:G,position:P.position,token:P.value,value:d};return U(fe)}var Ae=D(y);if(Ae===null)return P=N["(end)"],P.position=S.length,P;var we=Ae.value,A=Ae.type,R;switch(A){case"name":case"variable":R=N["(name)"];break;case"operator":if(R=N[we],!R)return U({code:"S0204",stack:new Error().stack,position:Ae.position,token:we});break;case"string":case"number":case"value":R=N["(literal)"];break;case"regex":A="regex",R=N["(regex)"];break;default:return U({code:"S0205",stack:new Error().stack,position:Ae.position,token:we})}return P=Object.create(R),P.value=we,P.type=A,P.position=Ae.position,P},C=function(d){var y,G=P;for(_(null,!0),y=G.nud();d<P.lbp;)G=P,_(),y=G.led(y);return y},z=function(d){var y=m(d,0);y.nud=function(){return this}},O=function(d,y,G){var fe=y||h[d],Ae=m(d,fe);return Ae.led=G||function(we){return this.lhs=we,this.rhs=C(fe),this.type="binary",this},Ae},re=function(d,y,G){var fe=m(d,y);return fe.led=G,fe},ae=function(d,y){var G=m(d);return G.nud=y||function(){return this.expression=C(70),this.type="unary",this},G};z("(end)"),z("(name)"),z("(literal)"),z("(regex)"),m(":"),m(";"),m(","),m(")"),m("]"),m("}"),m(".."),O("."),O("+"),O("-"),O("*"),O("/"),O("%"),O("="),O("<"),O(">"),O("!="),O("<="),O(">="),O("&"),O("and"),O("or"),O("in"),z("and"),z("or"),z("in"),ae("-"),O("~>"),O("??",h["??"],function(d){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(d))]},this.then=d,this.else=C(0),this}),re("(error)",10,function(d){return this.lhs=d,this.error=P.error,this.remaining=Y(),this.type="error",this}),ae("*",function(){return this.type="wildcard",this}),ae("**",function(){return this.type="descendant",this}),ae("%",function(){return this.type="parent",this}),O("(",h["("],function(d){if(this.procedure=d,this.type="function",this.arguments=[],P.id!==")")for(;P.type==="operator"&&P.id==="?"?(this.type="partial",this.arguments.push(P),_("?")):this.arguments.push(C(0)),P.id===",";)_(",");if(_(")",!0),d.type==="name"&&(d.value==="function"||d.value==="λ")){if(this.arguments.forEach(function(we,A){if(we.type!=="variable")return U({code:"S0208",stack:new Error().stack,position:we.position,token:we.value,value:A+1})}),this.type="lambda",P.id==="<"){for(var y=P.position,G=1,fe="<";G>0&&P.id!=="{"&&P.id!=="(end)";){var Ae=_();Ae.id===">"?G--:Ae.id==="<"&&G++,fe+=Ae.value}_(">");try{this.signature=u(fe)}catch(we){return we.position=y+we.offset,U(we)}}_("{"),this.body=C(0),_("}")}return this}),ae("(",function(){for(var d=[];P.id!==")"&&(d.push(C(0)),P.id===";");)_(";");return _(")",!0),this.type="block",this.expressions=d,this}),ae("[",function(){var d=[];if(P.id!=="]")for(;;){var y=C(0);if(P.id===".."){var G={type:"binary",value:"..",position:P.position,lhs:y};_(".."),G.rhs=C(0),y=G}if(d.push(y),P.id!==",")break;_(",")}return _("]",!0),this.expressions=d,this.type="unary",this}),O("[",h["["],function(d){if(P.id==="]"){for(var y=d;y&&y.type==="binary"&&y.value==="[";)y=y.lhs;return y.keepArray=!0,_("]"),d}else return this.lhs=d,this.rhs=C(h["]"]),this.type="binary",_("]",!0),this}),O("^",h["^"],function(d){_("(");for(var y=[];;){var G={descending:!1};if(P.id==="<"?_("<"):P.id===">"&&(G.descending=!0,_(">")),G.expression=C(0),y.push(G),P.id!==",")break;_(",")}return _(")"),this.lhs=d,this.rhs=y,this.type="binary",this});var _e=function(d){var y=[];if(P.id!=="}")for(;;){var G=C(0);_(":");var fe=C(0);if(y.push([G,fe]),P.id!==",")break;_(",")}return _("}",!0),typeof d>"u"?(this.lhs=y,this.type="unary"):(this.lhs=d,this.rhs=y,this.type="binary"),this};ae("{",_e),O("{",h["{"],_e),re(":=",h[":="],function(d){return d.type!=="variable"?U({code:"S0212",stack:new Error().stack,position:d.position,token:d.value}):(this.lhs=d,this.rhs=C(h[":="]-1),this.type="binary",this)}),O("@",h["@"],function(d){return this.lhs=d,this.rhs=C(h["@"]),this.rhs.type!=="variable"?U({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),O("#",h["#"],function(d){return this.lhs=d,this.rhs=C(h["#"]),this.rhs.type!=="variable"?U({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),O("?",h["?"],function(d){return this.type="condition",this.condition=d,this.then=C(0),P.id===":"&&(_(":"),this.else=C(0)),this}),O("?:",h["?:"],function(d){return this.type="condition",this.condition=JSON.parse(JSON.stringify(d)),this.then=d,this.else=C(0),this}),ae("|",function(){return this.type="transform",this.pattern=C(0),_("|"),this.update=C(0),P.id===","&&(_(","),this.delete=C(0)),_("|"),this});var ge=function(d){var y;if(d.type==="function"&&!d.predicate){var G={type:"lambda",thunk:!0,arguments:[],position:d.position};G.body=d,y=G}else if(d.type==="condition")d.then=ge(d.then),typeof d.else<"u"&&(d.else=ge(d.else)),y=d;else if(d.type==="block"){var fe=d.expressions.length;fe>0&&(d.expressions[fe-1]=ge(d.expressions[fe-1])),y=d}else y=d;return y},pe=0,Pe=0,Je=[],ce=function(d,y){switch(d.type){case"name":case"wildcard":y.level--,y.level===0&&(typeof d.ancestor>"u"||(Je[y.index].slot.label=d.ancestor.label),d.ancestor=y,d.tuple=!0);break;case"parent":y.level++;break;case"block":d.expressions.length>0&&(d.tuple=!0,y=ce(d.expressions[d.expressions.length-1],y));break;case"path":d.tuple=!0;var G=d.steps.length-1;for(y=ce(d.steps[G--],y);y.level>0&&G>=0;)y=ce(d.steps[G--],y);break;default:throw{code:"S0217",token:d.type,position:d.position}}return y},me=function(d,y){if(typeof y.seekingParent<"u"||y.type==="parent"){var G=typeof y.seekingParent<"u"?y.seekingParent:[];y.type==="parent"&&G.push(y.slot),typeof d.seekingParent>"u"?d.seekingParent=G:Array.prototype.push.apply(d.seekingParent,G)}},We=function(d){var y=d.steps.length-1,G=d.steps[y],fe=typeof G.seekingParent<"u"?G.seekingParent:[];G.type==="parent"&&fe.push(G.slot);for(var Ae=0;Ae<fe.length;Ae++){var we=fe[Ae];for(y=d.steps.length-2;we.level>0;){if(y<0){typeof d.seekingParent>"u"?d.seekingParent=[we]:d.seekingParent.push(we);break}for(var A=d.steps[y--];y>=0&&A.focus&&d.steps[y].focus;)A=d.steps[y--];we=ce(A,we)}}},ie=function(d){var y;switch(d.type){case"binary":switch(d.value){case".":var G=ie(d.lhs);G.type==="path"?y=G:y={type:"path",steps:[G]},G.type==="parent"&&(y.seekingParent=[G.slot]);var fe=ie(d.rhs);fe.type==="path"?Array.prototype.push.apply(y.steps,fe.steps):(typeof fe.predicate<"u"&&(fe.stages=fe.predicate,delete fe.predicate),y.steps.push(fe)),y.steps.filter(function(q){if(q.type==="number"||q.type==="value")throw{code:"S0213",stack:new Error().stack,position:q.position,value:q.value};return q.type==="string"}).forEach(function(q){q.type="name"}),y.steps.filter(function(q){return q.keepArray===!0}).length>0&&(y.keepSingletonArray=!0);var Ae=y.steps[0];Ae.type==="unary"&&Ae.value==="["&&(Ae.consarray=!0);var we=y.steps[y.steps.length-1];we.type==="unary"&&we.value==="["&&(we.consarray=!0),We(y);break;case"[":y=ie(d.lhs);var A=y,R="predicate";if(y.type==="path"&&(A=y.steps[y.steps.length-1],R="stages"),typeof A.group<"u")throw{code:"S0209",stack:new Error().stack,position:d.position};typeof A[R]>"u"&&(A[R]=[]);var k=ie(d.rhs);typeof k.seekingParent<"u"&&(k.seekingParent.forEach(q=>{q.level===1?ce(A,q):q.level--}),me(A,k)),A[R].push({type:"filter",expr:k,position:d.position});break;case"{":if(y=ie(d.lhs),typeof y.group<"u")throw{code:"S0210",stack:new Error().stack,position:d.position};y.group={lhs:d.rhs.map(function(q){return[ie(q[0]),ie(q[1])]}),position:d.position};break;case"^":y=ie(d.lhs),y.type!=="path"&&(y={type:"path",steps:[y]});var F={type:"sort",position:d.position};F.terms=d.rhs.map(function(q){var K=ie(q.expression);return me(F,K),{descending:q.descending,expression:K}}),y.steps.push(F),We(y);break;case":=":y={type:"bind",value:d.value,position:d.position},y.lhs=ie(d.lhs),y.rhs=ie(d.rhs),me(y,y.rhs);break;case"@":if(y=ie(d.lhs),A=y,y.type==="path"&&(A=y.steps[y.steps.length-1]),typeof A.stages<"u"||typeof A.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:d.position};if(A.type==="sort")throw{code:"S0216",stack:new Error().stack,position:d.position};d.keepArray&&(A.keepArray=!0),A.focus=d.rhs.value,A.tuple=!0;break;case"#":y=ie(d.lhs),A=y,y.type==="path"?A=y.steps[y.steps.length-1]:(y={type:"path",steps:[y]},typeof A.predicate<"u"&&(A.stages=A.predicate,delete A.predicate)),typeof A.stages>"u"?A.index=d.rhs.value:A.stages.push({type:"index",value:d.rhs.value,position:d.position}),A.tuple=!0;break;case"~>":y={type:"apply",value:d.value,position:d.position},y.lhs=ie(d.lhs),y.rhs=ie(d.rhs),y.keepArray=y.lhs.keepArray||y.rhs.keepArray;break;default:y={type:d.type,value:d.value,position:d.position},y.lhs=ie(d.lhs),y.rhs=ie(d.rhs),me(y,y.lhs),me(y,y.rhs)}break;case"unary":y={type:d.type,value:d.value,position:d.position},d.value==="["?y.expressions=d.expressions.map(function(q){var K=ie(q);return me(y,K),K}):d.value==="{"?y.lhs=d.lhs.map(function(q){var K=ie(q[0]);me(y,K);var he=ie(q[1]);return me(y,he),[K,he]}):(y.expression=ie(d.expression),d.value==="-"&&y.expression.type==="number"?(y=y.expression,y.value=-y.value):me(y,y.expression));break;case"function":case"partial":y={type:d.type,name:d.name,value:d.value,position:d.position},y.arguments=d.arguments.map(function(q){var K=ie(q);return me(y,K),K}),y.procedure=ie(d.procedure);break;case"lambda":y={type:d.type,arguments:d.arguments,signature:d.signature,position:d.position};var j=ie(d.body);y.body=ge(j);break;case"condition":y={type:d.type,position:d.position},y.condition=ie(d.condition),me(y,y.condition),y.then=ie(d.then),me(y,y.then),typeof d.else<"u"&&(y.else=ie(d.else),me(y,y.else));break;case"transform":y={type:d.type,position:d.position},y.pattern=ie(d.pattern),y.update=ie(d.update),typeof d.delete<"u"&&(y.delete=ie(d.delete));break;case"block":y={type:d.type,position:d.position},y.expressions=d.expressions.map(function(q){var K=ie(q);return me(y,K),(K.consarray||K.type==="path"&&K.steps[0].consarray)&&(y.consarray=!0),K});break;case"name":y={type:"path",steps:[d]},d.keepArray&&(y.keepSingletonArray=!0);break;case"parent":y={type:"parent",slot:{label:"!"+pe++,level:1,index:Pe++}},Je.push(y);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":y=d;break;case"operator":if(d.value==="and"||d.value==="or"||d.value==="in")d.type="name",y=ie(d);else if(d.value==="?")y=d;else throw{code:"S0201",stack:new Error().stack,position:d.position,token:d.value};break;case"error":y=d,d.lhs&&(y=ie(d.lhs));break;default:var I="S0206";d.id==="(end)"&&(I="S0207");var L={code:I,position:d.position,token:d.value};if(w)return Z.push(L),{type:"error",error:L};throw L.stack=new Error().stack,L}return d.keepArray&&(y.keepArray=!0),y};D=T(S),_();var Ce=C(0);if(P.id!=="(end)"){var nt={code:"S0201",position:P.position,token:P.value};U(nt)}if(Ce=ie(Ce),Ce.type==="parent"||typeof Ce.seekingParent<"u")throw{code:"S0217",token:Ce.type,position:Ce.position};return Z.length>0&&(Ce.errors=Z),Ce};return M})();r.exports=o},{"./signature":5}],5:[function(t,r,i){var u=t("./utils");const o=(()=>{var h={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function b(T){for(var M=1,S=[],w=Object.create(null),P=w;M<T.length;){var D=T.charAt(M);if(D===":")break;var N=function(){S.push(w),P=w,w=Object.create(null)},Z=function(O,re,ae,_e){for(var ge=1,pe=re;pe<O.length;)if(pe++,D=O.charAt(pe),D===_e){if(ge--,ge===0)break}else D===ae&&ge++;return pe};switch(D){case"s":case"n":case"b":case"l":case"o":w.regex="["+D+"m]",w.type=D,N();break;case"a":w.regex="[asnblfom]",w.type=D,w.array=!0,N();break;case"f":w.regex="f",w.type=D,N();break;case"j":w.regex="[asnblom]",w.type=D,N();break;case"x":w.regex="[asnblfom]",w.type=D,N();break;case"-":P.context=!0,P.contextRegex=new RegExp(P.regex),P.regex+="?";break;case"?":case"+":P.regex+=D;break;case"(":var Y=Z(T,M,"(",")"),E=T.substring(M+1,Y);if(E.indexOf("<")===-1)w.regex="["+E+"m]";else throw{code:"S0402",stack:new Error().stack,value:E,offset:M};w.type="("+E+")",M=Y,N();break;case"<":if(P.type==="a"||P.type==="f"){var m=Z(T,M,"<",">");P.subtype=T.substring(M+1,m),M=m}else throw{code:"S0401",stack:new Error().stack,value:P.type,offset:M};break}M++}var U="^"+S.map(function(O){return"("+O.regex+")"}).join("")+"$",_=new RegExp(U),C=function(O){var re;if(u.isFunction(O))re="f";else{var ae=typeof O;switch(ae){case"string":re="s";break;case"number":re="n";break;case"boolean":re="b";break;case"object":O===null?re="l":Array.isArray(O)?re="a":re="o";break;case"undefined":default:re="m"}}return re},z=function(O,re){for(var ae="^",_e=0,ge=0;ge<S.length;ge++){ae+=S[ge].regex;var pe=re.match(ae);if(pe===null)throw{code:"T0410",stack:new Error().stack,value:O[_e],index:_e+1};_e=pe[0].length}throw{code:"T0410",stack:new Error().stack,value:O[_e],index:_e+1}};return{definition:T,validate:function(O,re){var ae="";O.forEach(function(Pe){ae+=C(Pe)});var _e=_.exec(ae);if(_e){var ge=[],pe=0;return S.forEach(function(Pe,Je){var ce=O[pe],me=_e[Je+1];if(me==="")if(Pe.context&&Pe.contextRegex){var We=C(re);if(Pe.contextRegex.test(We))ge.push(re);else throw{code:"T0411",stack:new Error().stack,value:re,index:pe+1}}else ge.push(ce),pe++;else me.split("").forEach(function(ie){if(ce=O[pe],Pe.type==="a"){if(ie==="m")ce=void 0;else{var Ce=!0;if(typeof Pe.subtype<"u"){if(ie!=="a"&&me!==Pe.subtype)Ce=!1;else if(ie==="a"&&ce.length>0){var nt=C(ce[0]);if(nt!==Pe.subtype.charAt(0))Ce=!1;else{var d=ce.filter(function(y){return C(y)!==nt});Ce=d.length===0}}}if(!Ce)throw{code:"T0412",stack:new Error().stack,value:ce,index:pe+1,type:h[Pe.subtype]};ie!=="a"&&(ce=[ce])}ge.push(ce),pe++}else ge.push(ce),pe++})}),ge}z(O,ae)}}}return b})();r.exports=o},{"./utils":6}],6:[function(t,r,i){const u=(()=>{function o(m){var U=!1;if(typeof m=="number"&&(U=!isNaN(m),U&&!isFinite(m)))throw{code:"D1001",value:m,stack:new Error().stack};return U}function h(m){var U=!1;return Array.isArray(m)&&(U=m.filter(function(_){return typeof _!="string"}).length===0),U}function b(m){var U=!1;return Array.isArray(m)&&(U=m.filter(function(_){return!o(_)}).length===0),U}function T(m){return m.sequence===!0&&Array.isArray(m)}function M(m){return m&&(m._jsonata_function===!0||m._jsonata_lambda===!0)||typeof m=="function"}function S(m){var U=typeof m.arity=="number"?m.arity:typeof m.implementation=="function"?m.implementation.length:typeof m.length=="number"?m.length:m.arguments.length;return U}function w(m){return m&&m._jsonata_lambda===!0}var P=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function D(m){return typeof m=="object"&&m!==null&&P in m&&"next"in m&&typeof m.next=="function"}function N(m,U){if(m===U)return!0;if(typeof m=="object"&&typeof U=="object"&&m!==null&&U!==null){if(Array.isArray(m)&&Array.isArray(U)){if(m.length!==U.length)return!1;for(var _=0;_<m.length;_++)if(!N(m[_],U[_]))return!1;return!0}var C=Object.getOwnPropertyNames(m),z=Object.getOwnPropertyNames(U);if(C.length!==z.length)return!1;for(C=C.sort(),z=z.sort(),_=0;_<C.length;_++)if(C[_]!==z[_])return!1;for(_=0;_<C.length;_++){var O=C[_];if(!N(m[O],U[O]))return!1}return!0}return!1}function Z(m){return typeof m=="object"&&m!==null&&"then"in m&&typeof m.then=="function"}function Y(m){var U=[];for(let _ of m)U.push(_);return U}function E(m){return typeof m=="object"&&m!==null?Object.keys(m):[]}return{isNumeric:o,isArrayOfStrings:h,isArrayOfNumbers:b,isSequence:T,isFunction:M,isLambda:w,isIterable:D,getFunctionArity:S,isDeepEqual:N,stringToArray:Y,isPromise:Z,keys:E}})();r.exports=u},{}]},{},[3])(3)})})(Dr)),Dr.exports}Ii();const Bi=150,wn=10,ji=200,qi=16,En=new WeakMap;let _n=!1;function ir(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function jt(n){if(n===window)return{x:window.scrollX,y:window.scrollY};const e=n;return{x:e.scrollLeft,y:e.scrollTop}}function Hi(n,e,t){if(n===window){window.scrollTo(e,t);return}const r=n;typeof r.scrollTo=="function"?r.scrollTo(e,t):(r.scrollLeft=e,r.scrollTop=t)}function zi(n){if(n===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=n;return Math.max(0,e.scrollHeight-e.clientHeight)}function kt(n){let e=En.get(n);if(!e){const t=jt(n);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},En.set(n,e)}return e}function sr(n){kt(n).userEngaged=!0}function ar(n){const e=kt(n);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Bi)}function An(n,e){return e-n>=ji}function Tt(n){if(!ir())return;const e=kt(n);if(e.restoring)return;const t=jt(n);if(An(t.y,e.y)){Lr(n);return}e.x=t.x,e.y=t.y}function Gi(n){if(!ir())return;const e=kt(n),t=zi(n),r=e.x,i=t>0?Math.min(e.y,t):e.y,{x:u,y:o}=jt(n);if(!(Math.abs(r-u)<=wn&&Math.abs(i-o)<=wn)){e.restoring=!0;try{Hi(n,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Lr(n){const e=kt(n);if(e.stickyFrames=qi,e.raf)return;const t=()=>{e.raf=0,Gi(n),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function Mr(n){Lr(n)}function qt(n){if(!ir())return;const e=kt(n);if(e.watching)return;e.watching=!0;const t=n===window?window:n,r=()=>{if(e.restoring)return;const{y:D}=jt(n);if(An(D,e.y)){Lr(n);return}if(e.userEngaged){Tt(n),ar(n);return}Tt(n)},i=D=>xn(D)===n,u=D=>{i(D)&&(Tt(n),sr(n))},o=D=>{i(D)&&ar(n)},h=D=>{i(D)&&(Tt(n),sr(n),ar(n))};t.addEventListener("scroll",r,{passive:!0}),t.addEventListener("touchstart",u,{passive:!0}),t.addEventListener("touchend",o,{passive:!0}),t.addEventListener("touchcancel",o,{passive:!0}),t.addEventListener("wheel",h,{passive:!0}),t.addEventListener("pointerdown",u,{passive:!0}),t.addEventListener("pointerup",o,{passive:!0}),t.addEventListener("pointercancel",o,{passive:!0});const b=jt(n);if(e.x=b.x,e.y=b.y,n===window){const D=new ResizeObserver(()=>Mr(window));D.observe(document.documentElement),e.resizeObserver=D;return}const T=n,M=new ResizeObserver(()=>Mr(T));M.observe(T);for(const D of Array.from(T.children))M.observe(D);e.resizeObserver=M;const S=()=>Mr(T),w=new MutationObserver(D=>{for(const N of D)if(N.type==="childList")for(const Z of Array.from(N.addedNodes))Z instanceof Element&&M.observe(Z);S()});w.observe(T,{childList:!0,subtree:!0,characterData:!0});const P=T.getRootNode();P instanceof ShadowRoot&&P.host&&w.observe(P.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=w}function xn(n){for(const e of n.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Sn(e))return e;return window}function Sn(n){if(!(n instanceof HTMLElement)||n===document.documentElement||n===document.body)return!1;const e=getComputedStyle(n).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Ur(n){for(const t of n.composedPath())t===window||t===document||t instanceof HTMLElement&&Sn(t)&&qt(t);const e=xn(n);qt(e),n.type==="wheel"?(Tt(e),sr(e),ar(e)):(n.type==="touchstart"||n.type==="pointerdown")&&(Tt(e),sr(e))}function or(n){n instanceof Element&&n.classList?.contains("custom-scroll")&&qt(n),n.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&qt(e)})}function Fr(n){or(n),new MutationObserver(t=>{for(const r of t)for(const i of Array.from(r.addedNodes))i instanceof Element&&or(i)}).observe(n,{childList:!0,subtree:!0})}function Or(n){n.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Fr(e.shadowRoot),Or(e.shadowRoot))})}function Vi(){const n=Element.prototype;if(n.__safariScrollGuardPatched)return;n.__safariScrollGuardPatched=!0;const e=n.attachShadow;n.attachShadow=function(r){const i=e.call(this,r);return Fr(i),i}}function Wi(){if(typeof window>"u"||_n||(_n=!0,!ir()))return;qt(window),Vi();const n={capture:!0,passive:!0};window.addEventListener("wheel",Ur,n),window.addEventListener("touchstart",Ur,n),window.addEventListener("pointerdown",Ur,n);const e=()=>{or(document),Or(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const u of Array.from(i.addedNodes))u instanceof Element&&(or(u),u.shadowRoot&&Fr(u.shadowRoot),Or(u))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Xi=wi,Yi=_i,Ji=Pr,Ki=Sr,Zi=at,Qi=Mi,es=er,ts=Cr,rs=Ni;Wi(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Xi,Arrays:Yi,DataBindObserver:Ji,Format:Ki,HTML:Zi,LocationHandler:Qi,Objects:es,PublisherManager:$e,api:ts,URLPattern:rs,Endpoint:Rr,DataProviderKey:Qt};const ns=`#version 300 es
|