@supersoniks/concorde 4.9.98-visual-stack.2 → 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 +1 -1
- package/src/core/components/functional/interactive/gesture.ts +20 -6
- package/src/core/components/functional/interactive/store.ts +9 -3
- package/src/core/mixins/Subscriber.ts +5 -1
- package/src/docs/_getting-started/cdn-addons.md +1 -0
- package/src/docs/navigation/navigation.ts +4 -0
- package/src/docs/search/docs-search.json +2513 -710
|
@@ -3916,7 +3916,7 @@ void main() {
|
|
|
3916
3916
|
`:"")+e+`
|
|
3917
3917
|
`+Rx}function Px(i,e){return Cx(i,e)}class Kl extends Error{constructor(e,t,n=""){super(e),this.name="PostFxCompileError",this.pass=t,this.infoLog=n}}const Dx=["bufferA","bufferB","bufferC","bufferD","image"],Hn=(()=>{const i=new Uint8Array([0,0,0,255]),e=new dl(i,1,1);return e.needsUpdate=!0,e.colorSpace=Jt,e})();function Zl(i,e,t){if(t){const r=new bl(i,e);r.format=Qi,r.type=ui,r.minFilter=Wt,r.magFilter=Wt;const s=new jn(i,e,{minFilter:Nt,magFilter:Nt,format:ln,type:pn,depthTexture:r});return s.texture.colorSpace=Jt,s.texture.generateMipmaps=!1,s}const n=new jn(i,e,{minFilter:Nt,magFilter:Nt,format:ln,type:pn,depthBuffer:!1,stencilBuffer:!1});return n.texture.colorSpace=Jt,n.texture.generateMipmaps=!1,n}function Lx(i,e){return{targets:[Zl(i,e,!1),Zl(i,e,!1)],index:0}}function Jl(i){i.depthTexture?.dispose(),i.dispose()}class Ix{constructor(e){this.sceneRT=null,this.buffers=new Map,this.passes=new Map,this.channels=new Map,this.activePasses=[],this.quadScene=new ju,this.quadCam=new us(-1,1,1,-1,0,1),this.width=0,this.height=0,this.scale=1,this.urlTextures=new Map,this.loader=new vh,this.elementResolver=null,this.elementTextures=new Map,this.elementLastSeq=new Map,this.enabled=!1,this.renderer=e;const t=new as(2,2);this.quadMesh=new Yt(t,new gi),this.quadScene.add(this.quadMesh),this.quadCam.position.set(0,0,1),this.quadCam.lookAt(0,0,0)}get isEnabled(){return this.enabled}setElementResolver(e){this.elementResolver=e}setConfig(e){if(this.clearPasses(),!e?.sources.image.trim()){this.enabled=!1,this.disposeTargets();return}this.scale=Ba(e.scale),this.channels=e.channels;const t=e.sources;for(const n of Dx){const r=n==="image"?t.image:n==="bufferA"?t.bufferA:n==="bufferB"?t.bufferB:n==="bufferC"?t.bufferC:t.bufferD;if(r.trim())try{this.passes.set(n,this.compilePass(t.common,r,n)),this.activePasses.push(n)}catch(s){throw this.clearPasses(),this.enabled=!1,this.disposeTargets(),s instanceof Kl?s:new Kl(s instanceof Error?s.message:String(s),n)}}this.enabled=this.activePasses.includes("image"),this.enabled?this.width>0&&this.height>0&&this.ensureTargets(this.width,this.height):(this.clearPasses(),this.disposeTargets())}resize(e,t){const n=Math.max(1,Math.round(e*this.scale)),r=Math.max(1,Math.round(t*this.scale));n===this.width&&r===this.height&&this.sceneRT||(this.enabled?this.ensureTargets(n,r):(this.width=n,this.height=r))}render(e,t,n){if(this.enabled&&!this.sceneRT){const r=new Je;this.renderer.getDrawingBufferSize(r),r.x>=1&&r.y>=1&&this.ensureTargets(r.x,r.y)}if(!this.enabled||!this.sceneRT||this.width<1||this.height<1){this.renderer.setRenderTarget(null),this.renderer.render(e,t);return}this.renderer.setRenderTarget(this.sceneRT),this.renderer.clear(),this.renderer.render(e,t),this.updateElementTextures();for(const r of this.activePasses)r!=="image"&&this.drawPass(r,n,!1);this.drawPass("image",n,!0)}dispose(){this.clearPasses(),this.disposeTargets();for(const e of this.urlTextures.values())e.dispose();this.urlTextures.clear();for(const e of this.elementTextures.values())e.dispose();this.elementTextures.clear(),this.quadMesh.geometry.dispose(),this.quadMesh.material.dispose()}compilePass(e,t,n){const r=Px(e,t),s={iResolution:{value:new $(1,1,1)},iTime:{value:0},iTimeDelta:{value:0},iFrameRate:{value:60},iFrame:{value:0},iChannelTime:{value:new Float32Array(4)},iChannelResolution:{value:new Float32Array(12)},iMouse:{value:new dt},iDate:{value:new dt},iSampleRate:{value:44100},iChannel0:{value:Hn},iChannel1:{value:Hn},iChannel2:{value:Hn},iChannel3:{value:Hn},uParam0:{value:0},uParam1:{value:0},uParam2:{value:0},uParam3:{value:0},uNear:{value:0},uFar:{value:0}},a=new Wm({glslVersion:Bo,vertexShader:pf,fragmentShader:r,uniforms:s,depthTest:!1,depthWrite:!1,toneMapped:!1,side:yn}),o=this.validateGlsl(r,n);if(o)throw a.dispose(),new Kl(`Compile error (${n}): ${o}`,n,o);return{material:a,uniforms:s}}validateGlsl(e,t){const n=this.renderer.getContext();if(!n)return null;const r=n.createShader(n.VERTEX_SHADER),s=n.createShader(n.FRAGMENT_SHADER);if(!r||!s)return"Unable to create shader";n.shaderSource(r,`#version 300 es
|
|
3918
3918
|
${pf}`),n.shaderSource(s,`#version 300 es
|
|
3919
|
-
${e}`),n.compileShader(r),n.compileShader(s);let a="";return n.getShaderParameter(r,n.COMPILE_STATUS)||(a+=n.getShaderInfoLog(r)||"vertex compile failed"),n.getShaderParameter(s,n.COMPILE_STATUS)||(a+=n.getShaderInfoLog(s)||"fragment compile failed"),n.deleteShader(r),n.deleteShader(s),a.trim()||null}ensureTargets(e,t){const n=Math.max(1,Math.round(e)),r=Math.max(1,Math.round(t));this.disposeTargets(),this.sceneRT=Zl(n,r,!0);for(const s of this.activePasses)s!=="image"&&this.buffers.set(s,Lx(n,r));this.width=n,this.height=r}disposeTargets(){this.sceneRT&&(Jl(this.sceneRT),this.sceneRT=null);for(const e of this.buffers.values())Jl(e.targets[0]),Jl(e.targets[1]);this.buffers.clear()}clearPasses(){for(const e of this.passes.values())e.material.dispose();this.passes.clear(),this.activePasses=[]}drawPass(e,t,n){const r=this.passes.get(e);if(!r)return;const s=this.channels.get(e)||[{kind:"scene"},{kind:"none"},{kind:"none"},{kind:"none"}],a=r.uniforms.iChannelResolution.value;for(let l=0;l<4;l++){const c=this.resolveChannel(e,s[l]),h=r.uniforms[`iChannel${l}`];h.value=c;const u=c.image,f=c.image?.width||u?.width||this.width||1,d=c.image?.height||u?.height||this.height||1;let _=f,b=d;if(c===this.sceneRT?.texture)_=this.width,b=this.height;else if(c===this.sceneRT?.depthTexture)_=this.width,b=this.height;else for(const[g,m]of this.buffers)if(c===m.targets[0].texture||c===m.targets[1].texture){_=this.width,b=this.height;break}a[l*3]=_,a[l*3+1]=b,a[l*3+2]=1}r.uniforms.iResolution.value.set(this.width,this.height,1),r.uniforms.iTime.value=t.time,r.uniforms.iTimeDelta.value=t.timeDelta,r.uniforms.iFrameRate.value=t.timeDelta>0?1/t.timeDelta:60,r.uniforms.iFrame.value=t.frame,r.uniforms.iMouse.value.set(t.mouse[0],t.mouse[1],t.mouse[2],t.mouse[3]);const o=new Date;if(r.uniforms.iDate.value.set(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours()*3600+o.getMinutes()*60+o.getSeconds()+o.getMilliseconds()*.001),r.uniforms.uParam0.value=t.params[0],r.uniforms.uParam1.value=t.params[1],r.uniforms.uParam2.value=t.params[2],r.uniforms.uParam3.value=t.params[3],r.uniforms.uNear.value=t.near,r.uniforms.uFar.value=t.far,this.quadMesh.material=r.material,n)this.renderer.setRenderTarget(null);else{const l=this.buffers.get(e);if(!l)return;const c=1-l.index;this.renderer.setRenderTarget(l.targets[c]),this.renderer.clear()}if(this.renderer.render(this.quadScene,this.quadCam),!n){const l=this.buffers.get(e);l&&(l.index=1-l.index)}}resolveChannel(e,t){if(t.kind==="none")return Hn;if(t.kind==="scene")return this.sceneRT?.texture??Hn;if(t.kind==="depth")return this.sceneRT?.depthTexture??Hn;if(t.kind==="url")return this.getUrlTexture(t.url);if(t.kind==="element")return this.getElementTexture(t.key)??Hn;const n=t.kind==="self"?e==="image"?null:e:t.buffer;if(!n)return Hn;const r=this.buffers.get(n);return r?r.targets[r.index].texture:Hn}getUrlTexture(e){let t=this.urlTextures.get(e);return t||(t=this.loader.load(e),t.colorSpace=Jt,t.flipY=!0,this.urlTextures.set(e,t),t)}getElementTexture(e){const t=this.elementResolver?.(e)??null;if(!t)return null;let n=null,r=-1;if(Ld(t))n=t.getFrameCanvas(),r=t.frameSeq;else if(t instanceof HTMLCanvasElement)n=t,r=(this.elementLastSeq.get(e)??0)+1;else if(t instanceof HTMLVideoElement){if(t.readyState<2)return this.elementTextures.get(e)??null;let o=this.elementTextures.get(e);return o||(o=new fh(t),o.colorSpace=Jt,this.elementTextures.set(e,o)),o.needsUpdate=!0,o}else if(t instanceof HTMLImageElement){let o=this.urlTextures.get(e);return!o&&t.complete&&t.naturalWidth>0&&(o=new Dt(t),o.needsUpdate=!0,o.colorSpace=Jt,o.flipY=!0,this.urlTextures.set(e,o)),o??null}if(!n||n.width<1)return this.elementTextures.get(e)??null;let s=this.elementTextures.get(e);return s?s.image!==n&&(s.image=n):(s=new Gm(n),s.colorSpace=Jt,s.flipY=!1,this.elementTextures.set(e,s)),this.elementLastSeq.get(e)!==r&&(s.needsUpdate=!0,this.elementLastSeq.set(e,r)),s}updateElementTextures(){for(const[e,t]of this.elementTextures){if(t instanceof fh){t.needsUpdate=!0;continue}this.getElementTexture(e)}}}function Ux(i,e){i.dprMax=Math.max(1,e||2)}function Nx(i,e){i.renderer.toneMappingExposure=Number.isFinite(e)?e:Ia}function Ox(i,e){i.fov=Number.isFinite(e)&&e>0?e:Ms,i.perspCam.fov=i.fov,i.perspCam.updateProjectionMatrix()}function Fx(i,e){i.fitEnabled=e}function kx(i,e){i.controls&&(i.controls.autoRotate=e)}function Bx(i,e){if(!i.controls)return;const t=Number.isFinite(e)?Math.max(0,e):.08;i.controls.enableDamping=t>0,i.controls.dampingFactor=t>0?t:.08}function zx(i){if(!i.controls)return;i.controls.autoRotate=!1;const e=i.controls.enableDamping,t=i.controls.dampingFactor;i.controls.enableDamping=!1,i.controls.update(),i.controls.enableDamping=e,i.controls.dampingFactor=t}function Hx(i,e){i.limits=Pr.mergeLimits(i.limits,e),Pr.applyLimitsToControls(i.controls,i.limits)}function Vx(i,e,t,n){Pr.setSpherical({activeCam:i.activeCam,controls:i.controls,target:i.target,limits:i.limits},e,t,n)}const Cn={setDprMax:Ux,setExposure:Nx,setFov:Ox,setFit:Fx,setAutoRotate:kx,setDamping:Bx,stopMotion:zx,setOrbitLimits:Hx,setOrbitSpherical:Vx},mf={type:"change"},Ql={type:"start"},gf={type:"end"},pa=new or,_f=new vi,Gx=Math.cos(70*Su.DEG2RAD),kt=new $,cn=2*Math.PI,Et={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ec=1e-6;class Wx extends Eg{constructor(e,t=null){super(e,t),this.state=Et.NONE,this.target=new $,this.cursor=new $,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:$i.ROTATE,MIDDLE:$i.DOLLY,RIGHT:$i.PAN},this.touches={ONE:qi.ROTATE,TWO:qi.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new $,this._lastQuaternion=new In,this._lastTargetPosition=new $,this._quat=new In().setFromUnitVectors(e.up,new $(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Eh,this._sphericalDelta=new Eh,this._scale=1,this._panOffset=new $,this._rotateStart=new Je,this._rotateEnd=new Je,this._rotateDelta=new Je,this._panStart=new Je,this._panEnd=new Je,this._panDelta=new Je,this._dollyStart=new Je,this._dollyEnd=new Je,this._dollyDelta=new Je,this._dollyDirection=new $,this._mouse=new Je,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=$x.bind(this),this._onPointerDown=Xx.bind(this),this._onPointerUp=qx.bind(this),this._onContextMenu=eb.bind(this),this._onMouseWheel=Kx.bind(this),this._onKeyDown=Zx.bind(this),this._onTouchStart=Jx.bind(this),this._onTouchMove=Qx.bind(this),this._onMouseDown=jx.bind(this),this._onMouseMove=Yx.bind(this),this._interceptControlDown=tb.bind(this),this._interceptControlUp=nb.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(mf),this.update(),this.state=Et.NONE}update(e=null){const t=this.object.position;kt.copy(t).sub(this.target),kt.applyQuaternion(this._quat),this._spherical.setFromVector3(kt),this.autoRotate&&this.state===Et.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=cn:n>Math.PI&&(n-=cn),r<-Math.PI?r+=cn:r>Math.PI&&(r-=cn),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=a!=this._spherical.radius}if(kt.setFromSpherical(this._spherical),kt.applyQuaternion(this._quatInverse),t.copy(this.target).add(kt),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){const o=kt.length();a=this._clampDistance(o*this._scale);const l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){const o=new $(this._mouse.x,this._mouse.y,0);o.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;const c=new $(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),a=kt.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):(pa.origin.copy(this.object.position),pa.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(pa.direction))<Gx?this.object.lookAt(this.target):(_f.setFromNormalAndCoplanarPoint(this.object.up,this.target),pa.intersectPlane(_f,this.target))))}else if(this.object.isOrthographicCamera){const a=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),a!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>ec||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ec||this._lastTargetPosition.distanceToSquared(this.target)>ec?(this.dispatchEvent(mf),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?cn/60*this.autoRotateSpeed*e:cn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){kt.setFromMatrixColumn(t,0),kt.multiplyScalar(-e),this._panOffset.add(kt)}_panUp(e,t){this.screenSpacePanning===!0?kt.setFromMatrixColumn(t,1):(kt.setFromMatrixColumn(t,0),kt.crossVectors(this.object.up,kt)),kt.multiplyScalar(e),this._panOffset.add(kt)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const r=this.object.position;kt.copy(r).sub(this.target);let s=kt.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/n.clientHeight,this.object.matrix),this._panUp(2*t*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),r=e-n.left,s=t-n.top,a=n.width,o=n.height;this._mouse.x=r/a*2-1,this._mouse.y=-(s/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(cn*this._rotateDelta.x/t.clientHeight),this._rotateUp(cn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),r=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._rotateEnd.set(r,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(cn*this._rotateDelta.x/t.clientHeight),this._rotateUp(cn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new Je,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function Xx(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function $x(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function qx(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(gf),this.state=Et.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function jx(i){let e;switch(i.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case $i.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=Et.DOLLY;break;case $i.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=Et.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=Et.ROTATE}break;case $i.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=Et.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=Et.PAN}break;default:this.state=Et.NONE}this.state!==Et.NONE&&this.dispatchEvent(Ql)}function Yx(i){switch(this.state){case Et.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case Et.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case Et.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function Kx(i){this.enabled===!1||this.enableZoom===!1||this.state!==Et.NONE||(i.preventDefault(),this.dispatchEvent(Ql),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(gf))}function Zx(i){this.enabled!==!1&&this._handleKeyDown(i)}function Jx(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case qi.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=Et.TOUCH_ROTATE;break;case qi.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=Et.TOUCH_PAN;break;default:this.state=Et.NONE}break;case 2:switch(this.touches.TWO){case qi.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=Et.TOUCH_DOLLY_PAN;break;case qi.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=Et.TOUCH_DOLLY_ROTATE;break;default:this.state=Et.NONE}break;default:this.state=Et.NONE}this.state!==Et.NONE&&this.dispatchEvent(Ql)}function Qx(i){switch(this._trackPointer(i),this.state){case Et.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case Et.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case Et.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case Et.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=Et.NONE}}function eb(i){this.enabled!==!1&&i.preventDefault()}function tb(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function nb(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function ib(i,e){i.mode=e;const t=i.activeCam.position.clone(),n=i.target.clone();i.activeCam=e===vn.Ortho?i.orthoCam:i.perspCam,i.activeCam.position.copy(t),i.controls?.dispose(),i.controls=new Wx(i.activeCam,i.canvas),i.controls.enableDamping=!0,i.controls.dampingFactor=.08,i.controls.target.copy(n),i.controls.enablePan=!0,Pr.applyLimitsToControls(i.controls,i.limits),i.controls.update(),i.unbindWheelRelay||(i.unbindWheelRelay=Pr.bindWheelPageScrollRelay(i.canvas,()=>i.controls))}function rb(i,e,t){const n=Math.max(1,e),r=Math.max(1,t),s=Math.min(typeof window<"u"&&window.devicePixelRatio||1,i.dprMax);i.renderer.setPixelRatio(s),i.renderer.setSize(n,r,!1);const a=n/r;i.perspCam.aspect=a,i.perspCam.updateProjectionMatrix();const o=1.2;i.orthoCam.left=-o*a,i.orthoCam.right=o*a,i.orthoCam.top=o,i.orthoCam.bottom=-o,i.orthoCam.updateProjectionMatrix()}const vf={applyCameraMode:ib,resize:rb};class sb{constructor(e){this.controls=null,this.unbindWheelRelay=null,this.content=null,this.loader=new Ry,this.loadToken=0,this.blobUrl=null,this.bbox=new Un,this.target=new $,this._ready=!1,this._loading=!1,this.lastError=null,this.raycaster=new Mg,this.pointerNdc=new Je,this.highlighted=null,this.prevEmissive=new et,this.prevEmissiveIntensity=0,this.lastCssW=1,this.lastCssH=1,this.damping=.08,this.postFrame={time:0,timeDelta:1/60,frame:0,mouse:[0,0,0,0],params:[0,0,0,0],near:.1,far:100},this.asTuneCtx=()=>this,this.asViewCtx=()=>this,this.asOpsCtx=()=>this;const t=fx(e);this.scene=t.scene,this.renderer=t.renderer,this.canvas=t.canvas,this.perspCam=t.perspCam,this.orthoCam=t.orthoCam,this.activeCam=t.activeCam,this.root=t.root,this.lights=t.lights,this.dprMax=t.dprMax,this.mode=t.mode,this.fov=t.fov,this.fitEnabled=t.fitEnabled,this.limits=t.limits,this.postFx=new Ix(this.renderer),this.applyCameraMode(this.mode),t.autoRotate&&this.setAutoRotate(!0),this.canvas,this.perspCam,this.orthoCam,this.root,this.content,this.lights,this.loader,this.loadToken,this.blobUrl,this.dprMax,this.fov,this.fitEnabled,this.limits,this.bbox,this.target,this.raycaster,this.pointerNdc,this.highlighted,this.prevEmissive,this.prevEmissiveIntensity,this.unbindWheelRelay}get ready(){return this._ready}get loading(){return this._loading}get error(){return this.lastError}get isLost(){return this.renderer.getContext()?.isContextLost?.()??!1}get hasPostFx(){return this.postFx.isEnabled}setDprMax(e){Cn.setDprMax(this.asTuneCtx(),e)}setExposure(e){Cn.setExposure(this.asTuneCtx(),e)}setFov(e){Cn.setFov(this.asTuneCtx(),e)}setFit(e){Cn.setFit(this.asTuneCtx(),e)}setAutoRotate(e){Cn.setAutoRotate(this.asTuneCtx(),e)}setDamping(e){this.damping=Number.isFinite(e)?Math.max(0,e):.08,Cn.setDamping(this.asTuneCtx(),this.damping)}stopMotion(){Cn.setAutoRotate(this.asTuneCtx(),!1),Cn.stopMotion(this.asTuneCtx())}setOrbitLimits(e){Cn.setOrbitLimits(this.asTuneCtx(),e)}setOrbitSpherical(e,t,n){Cn.setOrbitSpherical(this.asTuneCtx(),e,t,n)}applyCameraMode(e){vf.applyCameraMode(this.asViewCtx(),e),Cn.setDamping(this.asTuneCtx(),this.damping)}resize(e,t){this.lastCssW=e,this.lastCssH=t,vf.resize(this.asViewCtx(),e,t);const n=Math.min(typeof window<"u"&&window.devicePixelRatio||1,this.dprMax);this.postFx.resize(e*n,t*n)}async load(e){return ki.runLoad(this.asOpsCtx(),e)}fitToContent(){ki.fitToContent(this.asOpsCtx())}setPostConfig(e){this.postFx.setConfig(e),e&&this.lastCssW>0&&this.resize(this.lastCssW,this.lastCssH)}setPostElementResolver(e){this.postFx.setElementResolver(e)}setPostFrame(e){Object.assign(this.postFrame,e);const t=this.activeCam;"near"in t&&"far"in t&&(this.postFrame.near=t.near,this.postFrame.far=t.far)}render(){this.controls?.update(),this.postFx.isEnabled?this.postFx.render(this.scene,this.activeCam,this.postFrame):this.renderer.render(this.scene,this.activeCam)}pick(e,t){return ki.pick(this.asOpsCtx(),e,t)}setHoverAt(e,t){return ki.setHoverAt(this.asOpsCtx(),e,t)}clearHighlight(){ki.clearHighlight(this.asOpsCtx())}snapshot(e){return ki.buildSnapshot(this.asOpsCtx(),e)}dispose(e=!1){this.postFx.dispose(),ki.dispose(this.asOpsCtx(),e)}}function ab(i){return i.renderRoot?.querySelector("canvas")??null}async function yf(i){if(i.releasing||i.runtime)return;const e=ab(i);if(e)try{i.runtime=new sb({canvas:e,dprMax:i.dprMax,camera:Ut.cameraMode(i.camera),fov:i.fov,exposure:i.exposure,autoRotate:!1,fit:i.fit,minDistance:i.minDistance,maxDistance:i.maxDistance,minPolar:Dn.degToRad(i.minPolar),maxPolar:Dn.degToRad(i.maxPolar)}),i.runtime.setDamping(i.damping),Dn.applyOrbitLimits(i),bf(i),await Dn.run(i)}catch(t){Dn.emitError(i,t)}}function xf(i){i.loadToken++,Gn.stopLoop(i),i.ready=!1,i.releasing=!0,i.runtime?.dispose(!1),i.runtime=null,i.releasing=!1}function ob(i){const e=Es(i);if(!i.inView&&i.releaseOffscreen&&!e){xf(i);return}if((!i.runtime||i.runtime.isLost)&&(i.inView||e||!i.releaseOffscreen)){yf(i);return}i.syncPlayback()}function bf(i){if(!i.runtime)return;const e=i.getBoundingClientRect(),t=Math.max(e.width,i.clientWidth,1),n=Math.max(e.height,i.clientHeight,1);i.runtime.resize(t,n),i.ready&&i.runtime.render()}const Bi={ensureRuntime:yf,releaseRuntime:xf,syncVisibility:ob,syncSize:bf},tc="1";function lb(i){const e=i.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 ri=class Zt{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const n=t.indexOf("=");return e[t.substring(0,n).trim()]=t.substring(n+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let n=e;for(;n;){if(!t(n))return;n=n.parentNode||n.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let n=e;for(;n;){if(n instanceof Element&&n.nodeType===1){const r=window.getComputedStyle(n);if(Zt.overflowMatches(r,t))return n}n=Zt.nextComposedAncestor(n)}return null}static getScrollableAncestor(e){return Zt.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Zt.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const n of Zt.scopeAttributeNames(t))if(e.hasAttribute(n))return e.getAttribute(n)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let n=e;for(;n;){if(n instanceof HTMLElement){const s=Zt.readScopeAttributeOnElement(n,t);if(s!=null)return s}const r=n.parentNode||n.host;if(!r)break;n=r}return null}static getApiConfiguration(e){const t=Zt.getAncestorAttributeValue(e,"token"),n=Zt.getAncestorAttributeValue(e,"addHTTPResponse")!=null,r=Zt.getAncestorAttributeValue(e,"serviceURL");let s=null,a=null;const o=Zt.getAncestorAttributeValue(e,"tokenProvider"),l=Zt.getAncestorAttributeValue(e,"eventsApiToken");t||(s=Zt.getAncestorAttributeValue(e,"userName"),a=Zt.getAncestorAttributeValue(e,"password"));const c=Zt.getAncestorAttributeValue(e,"credentials")||void 0,h=e.getAttribute("cache"),u=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:r,token:t,userName:s,password:a,authToken:l,tokenProvider:o,addHTTPResponse:n,credentials:c,cache:h,blockUntilDone:u,keepAlive:f}}static getClosestElement(e,t){let n=e;for(;n&&!(n.nodeName&&n.nodeName.toLowerCase()===t);){const r=n.parentNode||n.host;if(!r){n=null;break}n=r}return n?.nodeName?n:null}static getClosestForm(e){return Zt.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const n=new Set(t.map(a=>a.toLowerCase())),r=[];let s=e.parentNode||e.host;for(;s;)s instanceof Element&&n.has(s.tagName.toLowerCase())&&r.push(s),s=s.parentNode||s.host;return r}static getAncestorsBySelectors(e,t){const n=[];let r=e.parentNode||e.host;for(;r;){if(r instanceof Element)for(const s of t)try{if(r.matches(s)){n.push(r);break}}catch{}r=r.parentNode||r.host}return n}static async loadJS(e){if(!lb(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,n=Array.from(document.scripts).find(s=>s.src===t);if(n)return n.dataset.concordeLoaded===tc?!0:new Promise(s=>{let a=!1;const o=c=>{a||(a=!0,c&&(n.dataset.concordeLoaded=tc),s(c))};n.addEventListener("load",()=>o(!0),{once:!0}),n.addEventListener("error",()=>o(!1),{once:!0});const l=n.readyState;if(l==="complete"||l==="loaded"){o(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{a||o(!0)})})});const r=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(s=>{const a=document.createElement("script");a.src=e,r&&(a.type="module"),a.onload=()=>{a.dataset.concordeLoaded=tc,s(!0)},a.onerror=()=>s(!1),document.head.appendChild(a)})}static async loadCSS(e){return new Promise(t=>{const n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,n.onload=()=>t(!0),n.onerror=()=>t(!0),document.head.appendChild(n)})}};function cb(i,e){"fov"in e&&(i.fov=Ut.toNum(e.fov,i.fov)),"exposure"in e&&(i.exposure=Ut.toNum(e.exposure,i.exposure)),"minDistance"in e&&(i.minDistance=Ut.toNum(e.minDistance,i.minDistance)),"maxDistance"in e&&(i.maxDistance=Ut.toNum(e.maxDistance,i.maxDistance)),"minPolar"in e&&(i.minPolar=Ut.toNum(e.minPolar,i.minPolar)),"maxPolar"in e&&(i.maxPolar=Ut.toNum(e.maxPolar,i.maxPolar)),"autoRotate"in e&&(i.autoRotate=Ut.isFormFlagOn(e.autoRotate)),"camera"in e&&typeof e.camera=="string"&&(i.camera=Ut.cameraMode(e.camera))}function ub(i,e){let t=!1;if("asset"in e){const n=Ut.asset(e.asset);n&&(i.asset=n,t=!0)}return"src"in e&&typeof e.src=="string"&&!("asset"in e)&&i.src!==e.src&&(i.src=e.src,t=!0),t}function hb(i){return"minDistance"in i||"maxDistance"in i||"minPolar"in i||"maxPolar"in i||"camera"in i}function fb(i,e){i.runtime&&("exposure"in e&&i.runtime.setExposure(i.exposure),"fov"in e&&i.runtime.setFov(i.fov),"camera"in e&&i.runtime.applyCameraMode(Ut.cameraMode(i.camera)),hb(e)&&Dn.applyOrbitLimits(i),"autoRotate"in e&&Gn.syncAutoRotate(i))}const nc={applyScalars:cb,applyAsset:ub,pushToRuntime:fb};function db(i,e){return i?Math.abs(i.yaw-e.yaw)>La||Math.abs(i.pitch-e.pitch)>La||Math.abs(i.distance-e.distance)>La:!0}function pb(i,e){const t=i.runtime.snapshot({time:0,frame:i.frame,hovering:i.hovering?1:0,pointerX:i.pointerX,pointerY:i.pointerY});return{yaw:"yaw"in e?Ut.toNum(e.yaw,t.yaw):t.yaw,pitch:"pitch"in e?Ut.toNum(e.pitch,t.pitch):t.pitch,distance:"distance"in e?Ut.toNum(e.distance,t.distance):t.distance}}function Sf(i,e){if(!i.runtime||!("distance"in e||"yaw"in e||"pitch"in e))return;const t=pb(i,e),n=i.lastFormOrbit;db(n,t)&&(i.lastFormOrbit=t,i.autoRotate&&n&&(i.autoRotate=!1,Gn.syncAutoRotate(i)),i.runtime.setOrbitSpherical(t.yaw,t.pitch,t.distance),i.runtime.render())}function mb(i,e){nc.applyScalars(i,e);const t=nc.applyAsset(i,e);if(!i.runtime){t&&Dn.run(i);return}nc.pushToRuntime(i,e),Sf(i,e),Hr.applyFormPost(i,e),t&&Dn.run(i)}const gb={applyFormParams:mb,applyFormOrbit:Sf};function Mf(i,e){const t=e?.trim();return t||ri.getAncestorAttributeValue(i,"dataProvider")||ri.getAncestorAttributeValue(i,"formDataProvider")||""}function _b(i,e,t){const n=e?.trim();return n||Mf(i,t)}const ic={resolveFormProviderId:Mf,resolveOutProviderId:_b,asset:jc,formParams:gb};let vb=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},Ef="sonic";typeof __SONIC_PREFIX__<"u"&&(Ef=__SONIC_PREFIX__);let Tf=Ef.replace(/-([a-z])/g,i=>i[1].toUpperCase());const yb=Tf.charAt(0).toUpperCase()+Tf.slice(1);let xb=class Vi{static areEqual(e,t){return e.length===t.length?e.every((n,r)=>n===t[r]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(n=>t=t.concat(n)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const n=(e[0]||{})[t];return e.every(r=>(r||{})[t]==n)}})})}),value:()=>({forKey:t=>Vi.from(e.map(n=>n[t]))}),copy:()=>({fromKey:t=>({toKey:n=>{e.forEach(r=>{r[n]=Array.isArray(r[t])?[...r[t]]:typeof r[t]=="object"&&r[t]!=null?{...r[t]}:r[t]})}})})}),map:t=>Vi.from(e.map(t)),filter:t=>Vi.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const n=[],r=new Map;for(const s of e){const a=s[t];if(!r.has(a)){const o=n.length;r.set(a,o);const l={items:[]};l[t]=a,n.push(l)}n[r.get(a)].items.push(s)}return Vi.from(n)}}),without:()=>({duplicates:()=>({forKey:t=>{const n=[...new Set(e.map(r=>r[t]))];return Vi.from(n.map(r=>e.find(s=>s[t]==r)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:n=>{const r=(s,a)=>o=>s[a]!=o[a];return Vi.from(e.filter(s=>t.every(r(s,n))))}})})})}}},rc=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",n="long"){t||(t=ri.getLanguage());const r=(c,h)=>[Math.floor(c/h),c%h];function s(c,h,u){return new Intl.NumberFormat(c,{style:"unit",unit:h,unitDisplay:u}).format}const[a,o]=r(e,60),l=[];return a&&l.push(s(t,"hour",n)(a)),o&&l.push(s(t,"minute",n)(o)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(l)}static js(e){try{return Function("return "+e)()}catch{return""}}};class wf{constructor(e){this.path=e}toString(){return this.path}}function Af(i){return new Proxy(i,{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 n=e.path?`${e.path}.${String(t)}`:String(t);return Af(new wf(n))}})}const bb=/\$\{|\{\$/;function Sb(i){return bb.test(i)}function Mb(i){const e=i;if(Sb(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const ma=function(i){return this instanceof ma?Af(new wf(i)):new ma(i)};let ga=class si{static shallowEqual(e,t,n=!0){const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length&&n)return!1;for(const a of r){const o=e[a],l=t[a];if(n?o!==l:o!=l)return!1}return!0}static deepEqual(e,t,n=!0){const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length&&n)return!1;for(const a of r){const o=e[a],l=t[a],c=si.isObject(o)&&si.isObject(l),h=n?o!==l:o!=l;if(c&&!si.deepEqual(o,l)||!c&&h)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return si.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,n=!1){for(const r of t){const s=e[r];if(s===void 0)return;n&&si.isObject(s)?e=Object.assign(Array.isArray(s)?[]:{},e,s):e=e[r]}return e}static traverseDotNotation(e,t,n=!1){return si.traverse(e,t.split("."),n)}static getURLSearchArray(e,t=""){let n=[];for(let r in e){const s=e[r];t&&(r=t+"["+r+"]"),si.isObject(s)?n=[...n,...this.getURLSearchArray(s,r)]:n.push(`${r}=${s}`)}return n}static getURLSearchString(e){return si.getURLSearchArray(e,"").join("&")}};ga.traverseDotNotation;function Eb(i){return!1}function _a(i){return Object.prototype.hasOwnProperty.call(i,"__value")}function xi(i){return typeof i=="object"&&i!==null}let Dr="sonic";typeof __SONIC_PREFIX__>"u"&&(Dr="sonic");const sc=Dr=="sonic"?"publisher-proxies-data":Dr+"-publisher-proxies-data",Si=class Si{constructor(e,t,n){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_=n,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(),Si.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_&&!Xt.changed){Xt.changed=!0,Xt.saveId++;const t=Xt.saveId;setTimeout(()=>Xt.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const n=this.get();this._assignListeners_.forEach(r=>{r(n)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(n=>{n[e]!==t&&(n[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(n=>{const r=Object.getOwnPropertyDescriptor(n,e);r&&!r.set&&!r.writable||(n.propertyMap&&n.propertyMap[e]&&(e=n.propertyMap[e]),typeof n[e]<"u"&&n[e]!==t&&(n[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 n=t;const r=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(n=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==r&&(e[n]=r)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const n=this._value_[t];e[t]!==n&&(e[t]=n)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||xi(this._value_)&&xi(e)&&e&&_a(this._value_)&&_a(e)&&this._value_.__value===e.__value||!xi(e)&&e===this._value_.__value)return!0;this._value_=xi(e)?e:{__value:e},this._cachedGet_=void 0;const n=_a(this._value_);if(this._parentKey_&&this.parent){const r=_a(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_]:r});else{const s=[];s[Number(this._parentKey_)]=r,this.parent.set(s)}else this.parent._value_[this._parentKey_]=r}if(n)return this._proxies_.forEach((r,s)=>{s!="_parent_"&&(r.set(null),this._publishDynamicFilling_(s,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const r in this._value_)this._value_[r]===void 0&&delete this._value_[r];if(this._proxies_.forEach((r,s)=>{const a=this._value_[s];s!="_parent_"&&a===void 0&&a!==null&&isNaN(Number(s))&&(r.set(null),this._publishDynamicFilling_(s,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),xi(this._value_))for(const r in this._value_){const s=e[r],o=xi(s)?s:{__value:s};if(!this._proxies_.has(r)){this._publishDynamicFilling_(r,s);continue}this._proxies_.get(r)?.set(o,!0),this._publishDynamicFilling_(r,s)}return!0}get(){if(Tb(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_||(Si.instancesCounter++,this._instanceCounter_=Si.instancesCounter),Si.instances.set(this._instanceCounter_,this),"<"+Dr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Dr+"-publisher-proxy>"}};Si.instances=new Map,Si.instancesCounter=0;let va=Si;const Rf=[];function Tb(i){Rf.length>0&&Rf[0].add(i)}const vt=class vt{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],vt.instance!=null)throw"Singleton / use getInstance";vt.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),vt.initPageShowHandler()}static initPageShowHandler(){vt.pageShowHandlerInitialized||(vt.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&vt.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let n=localStorage.getItem(sc),r=null;if(n&&(r=await this.decompress(n,"gzip")),r)try{this.localStorageData=JSON.parse(r)}catch{this.localStorageData={}}else n=await this.compress("{}","gzip"),localStorage.setItem(sc,n),this.localStorageData={};const s=1e3*60*60*12;for(const a in this.localStorageData){const o=this.localStorageData[a],l=new Date().getTime()-(o.expirationDelayMs||s);o.lastModifiationMS<l&&delete this.localStorageData[a]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=vt.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new vt)}return vt.instance==null?new vt:vt.instance}static get(e,t){return vt.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+ri.getLanguage()]?.data||e.get())}get(e,t){const n=t?.localStorageMode==="enabled",r=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const o=ac({});this.set(e,o)}const s=this.publishers.get(e);return n&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(s._expiration_delay_=t.expirationDelayMs),s._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(s,e)),r&&(s._invalidate_on_page_show_=r),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!==vt.saveId&&e%10!=0))try{if(!vt.changed||vt.saving)return;vt.saving=!0,vt.changed=!1;const t=Array.from(this.publishers.keys());let n=!1;for(const r of t){const s=this.publishers.get(r);if(!s?._is_savable_)continue;const a=s?.get();a&&(this.localStorageData[r+"¤lang_"+ri.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:s._expiration_delay_,data:a},n=!0)}if(n){const r=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(sc,r)}if(vt.saving=!1,vt.changed){vt.saveId++;const r=vt.saveId;setTimeout(()=>this.saveToLocalStorage(r),1e3)}}catch{vt.saving=!1}}async compress(e,t){const n=new TextEncoder().encode(e),r=window,s=new r.CompressionStream(t),a=s.writable.getWriter();a.write(n),a.close();const o=await new Response(s.readable).arrayBuffer(),l=new Uint8Array(o);let c="";for(let h=0;h<l.length;h++)c+=String.fromCharCode(l[h]);return btoa(c)}async decompress(e,t){const n=atob(e),s=Uint8Array.from(n,h=>h.charCodeAt(0)).buffer,a=window,o=new a.DecompressionStream(t),l=o.writable.getWriter();l.write(s),l.close();const c=await new Response(o.readable).arrayBuffer();return new TextDecoder().decode(c)}};vt.buildDate="Thu Oct 01 2026 19:01:49 GMT+0200 (Central European Summer Time)",vt.changed=!1,vt.saving=!1,vt.saveId=0,vt.instance=null,vt.instances=new Map,vt.pageShowHandlerInitialized=!1;let Xt=vt;if(typeof window<"u"){const i=window,e=yb+"PublisherManager",t=i[e]||Xt;if(i[e]||(i[e]=Xt),t!==Xt){const n=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const r of n)Object.defineProperty(Xt,r,{configurable:!0,get(){return t[r]},set(s){t[r]=s}})}}const wb=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 Ab(i,e){return{get:function(t,n){if(typeof n=="string"&&wb.has(n))return i[n];if(n==Symbol.toPrimitive)return()=>e().get();if(!i._proxies_.has(n)){const r=i._value_[n],s=ac(xi(r)?r:{__value:r},i,n);s._proxies_.set("_parent_",e()),i._proxies_.set(n,s)}return i._proxies_.get(n)},set:function(t,n,r){if(n=="_value_")return i._value_=r,!0;if(n=="_cachedGet_")return i._cachedGet_=r,!0;if(n=="_assignmentId_")return i._assignmentId_=r,!0;if(n=="_is_savable_")return i._is_savable_=r,!0;if(n=="_expiration_delay_")return i._expiration_delay_=r,!0;if(n=="_invalidate_on_page_show_")return i._invalidate_on_page_show_=r,!0;if(n=="_instanceCounter_")return i._instanceCounter_=r,!0;if(!i._proxies_.has(n)){const a=ac({},i,n);a._proxies_.set("_parent_",e()),i._proxies_.set(n,a)}return i._value_[n]!==r&&(i._value_[n]=r,i._publishDynamicFilling_(n,r),i._proxies_.get(n)?.set(xi(r)?r:{__value:r})),!0},deleteProperty:function(t,n){return i._publishDynamicFilling_(n,null),i._proxies_.get(n)?.set(null),delete i._value_[n]},has:function(t,n){return n in i._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(t,n,r){return r&&"value"in r&&(i._value_[n]=r.value),!0},getOwnPropertyDescriptor:function(t,n){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return i._value_.__value?Object.keys(i._value_.__value):Object.keys(i._value_)}}}function ac(i,e=null,t){const n=new va(i,e,t);let r=null;const s=Ab(n,()=>r);return r=new Proxy(n,s),r}class Rb extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=va.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Dr+"-publisher-proxy",Rb)}catch{}const Cb=(i,e)=>{{const t=i.split("."),n=t.shift()||"";let r=Xt.get(n,e);r=ga.traverse(r,t);const s=new Set;return s.add(r),s}};function Cf(i,e,t){const n=Mb(i);return Cb(n,t).values().next().value}function Pb(i,e){return Eb()?Cf(i,void 0,e):Cf(i)}let oc=(pt=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(pt.observedElements.keys()).forEach(e=>pt.unObserve(e)))}static observe(e){if(!e||!pt.enabled||pt.observedElements.has(e))return;const t=new MutationObserver(pt.onMutation),n={};n.childList=!0,n.subtree=!0,n.attributes=!0,n.attributeFilter=["data-bind"],t.observe(e,n),e.querySelectorAll("[data-bind]").forEach(r=>pt.addPublisherListeners(r)),pt.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(n=>pt.removePublisherListeners(n)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&pt.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>pt.addPublisherListeners(t)):e.childNodes.forEach(t=>pt.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&pt.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>pt.removePublisherListeners(t)):e.childNodes.forEach(t=>pt.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":pt.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(n=>{pt.onAdded(n)}),t.removedNodes.forEach(n=>{pt.onRemoved(n)});break}}static removePublisherListeners(e){const t=pt.publisherListeners.get(e);t&&(pt.publisherListeners.delete(e),t.forEach(n=>{n.publisher?.offAssign(n.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(n=>n.replace("$","")):t=[e],t=t.filter(n=>n.length>0),{expression:e.replace("\\",""),variables:t.map(n=>n.split(/\b\.\b/).map(r=>r.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,r=>r.substring(1).toUpperCase()),bindedVariablesDescriptor:pt.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const n of t)if(n!="_self_"){if(!e)return null;e=e[n]}return e}static addPublisherListeners(e){pt.removePublisherListeners(e);const t=ri.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const n=Xt.getInstance().get(t),r=pt.getDataBindItems(e),s=[];r.forEach(a=>{const o=a.bindedVariablesDescriptor,l=a.propertyToUpdate;for(const c of o.variables){const h=c;let u=n;u=pt.getSubPublisher(n,h);const f=e,d={publisher:u,onAssign:()=>{const _=o.variables.map(m=>pt.getSubPublisher(n,m)?.get());let b=o.expression,g=!1;if(_.length==1&&o.variables[0].join(".")==b.substring(1)){let m=_[0];m===null&&(m=""),f[l]=m;return}for(let m=0;m<_.length;m++){let S=_[m];const y=o.variables[m];S===null&&(g=!0,S=void 0),b=b.replace("$"+y.join("."),S)}if(b.indexOf("|")!=-1){const m=b.indexOf("|");if(m==0)b=rc.js(b.substring(1));else{const S=b.substring(0,m),y=b.substring(m+1),M=rc[S];b=g?"":M?M(y):b}}else b=g?"":b;f[l]=b}};u?.onAssign(d.onAssign),s.push(d)}}),pt.publisherListeners.set(e,s)}},pt.observedElements=new Map,pt.enabled=!0,pt.publisherListeners=new Map,pt);oc.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=oc);let Db=(Pt=class{static listen(){if(!Pt.listening)return;const e=document.location?.href.replace(document.location.origin,"");Pt.prevURL&&Pt.prevURL!=e&&(Pt.prevURL=e,Pt.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Pt.listen)}static offChange(e){const t=Pt.listeners.indexOf(e);t!=-1&&(Pt.listeners.splice(t,1),Pt.listeners.length==0&&(Pt.listening=!1))}static onChange(e){Pt.listening||(Pt.listening=!0,Pt.listen()),Pt.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,n=document.referrer;if(t!=null){const c=document.location.origin,h=(t||c).toString(),f=n.indexOf("http")==0?new URL(n).origin!=c:!1,d=n=="",_=history.length<3,b=d&&_,g=h!=document.location.href;if(f&&g||b){const S=history.state||{};S.concorde=S.concorde||{},S.concorde.hasDoneHistoryBack=!0,history.pushState(S,document.title),history.back(),document.location.replace(h)}else history.back();return}let r=e.getAttribute("to")||"";if(r||(r=e.href?.toString()||""),!r)return;if(r.indexOf("#")==0){document.location.hash=r.substring(1);return}const s=new URL(r,document.location.href),a=s.pathname.split("/"),o=[];let l="";for(const c of a)c!=l&&o.push(c),l=c;r="/"+o.join("/")+s.search+(s.hash?s.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",r):e.hasAttribute("replaceState")?history.replaceState(null,"",r):document.location.href=r}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const n=new URL(t,document.location.href),r=new URL(e.location||"",document.location.origin);let s=!1;e.autoActive=="strict"?s=n.pathname==r.pathname&&n.hash==r.hash&&n.search==r.search:e.autoActive=="strict-path-only"?s=n.pathname==r.pathname&&n.hash==r.hash:s=r.href.indexOf(n.href)==0,s?e.setAttribute("active","true"):e.removeAttribute("active")}}},Pt.listeners=[],Pt.listening=!1,Pt.prevURL=document.location?.href.replace(document.location.origin,""),Pt);function Pf(i){if(i==null||typeof i!="object"||Array.isArray(i))return i;const e={...i};return delete e._sonic_http_response_,e}const xt=class xt{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){xt.tokens.delete(this.serviceURL);return}xt.invalidTokens.includes(e)||xt.tokens.set(this.serviceURL,e)}get token(){return xt.invalidTokens.includes(this._token)?xt.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(xt.invalidTokens.includes(e)||(xt.invalidTokens.push(e),this.token=null))}async handleResult(e,t){xt.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const n=e.headers.get("content-type")?.toLowerCase(),r=e.status;let s={};if(!n||n.indexOf("text/")==0)s={text:await e.text()};else try{s=await e.json()}catch{s={}}if(this.addHTTPResponse&&ga.isObject(s)&&(s._sonic_http_response_=e),r===498&&!xt.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const o=await this.get(t.path,t.additionalHeaders);if(o==null)throw new Error("GET retry failed after token refresh");s=o}else s=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return Pb("sonic-api").lastResponse.set({http:e,processed:s}),s}async auth(){if(this.token)return;if(xt.tokens.has(this.serviceURL)){this.token=xt.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),n=t.protocol+"//"+t.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:n}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const s=await r.json();s.token?this.token=s.token:xt.failledTokenUpdates.set(this.serviceURL,!0)}catch{xt.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const n=Xt.get(e),r=new URLSearchParams(t.split("?")[1]||""),s=n.get();let a=[];Array.isArray(s)?a=s:a=[s];const o=[];let l=Number.POSITIVE_INFINITY,c=0,h=0;if(r.has("limit")&&(l=parseInt(r.get("limit")||"0"),h++),r.has("offset")&&(c=parseInt(r.get("offset")||"0"),h++),h>0&&(r.delete("limit"),r.delete("offset")),r.size===0)return a.slice(c,c+l);for(const[u,f]of r.entries()){const d=f.split(",").map(_=>_.trim());for(const _ of d)for(const b of a)if(typeof b!="object")isNaN(+b)?b.toString().toLowerCase().includes(f.toLowerCase())&&o.push(b):b===f&&o.push(b);else{const g=b;if(!g[u])continue;isNaN(+g[u])?g[u]?.toString().toLowerCase().includes(_.toLowerCase())&&o.push(b):g[u]===_&&o.push(b)}}return o.slice(c,c+l)}firstCallDone(){return new Promise(e=>{if(!xt.firstCallDoneFlags.has(this.serviceURL))xt.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(xt.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const n=/dataProvider\((.*?)\)(.*?)$/;if(n.test(e)){this.blockUntilDone&&(await this.firstCallDone(),xt.firstCallDoneFlags.set(this.serviceURL,"loading"));const c=e.match(n);if(!c)throw new Error("dataProvider path is not valid");return await this.localGet(c[1],c[2])}const r={apiMethod:"get",path:e,additionalHeaders:t},s=await this.createHeaders(t),a=this.computeURL(e),o=JSON.stringify({url:a,headers:s,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),xt.firstCallDoneFlags.set(this.serviceURL,"loading")),!xt.loadingGetPromises.has(o)){const c=new Promise(async h=>{try{const u=await fetch(a,{headers:s,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(u,r);h({processed:f,response:this.lastResult})}catch{xt.firstCallDoneFlags.set(this.serviceURL,"error"),h(null)}});xt.loadingGetPromises.set(o,c)}const l=await xt.loadingGetPromises.get(o);return xt.loadingGetPromises.delete(o),l?(this.lastResult=l.response,l.processed):null}async getDetailed(e,t){const n=/dataProvider\((.*?)\)(.*?)$/.test(e),r=await this.get(e,t);if(r==null)return;const s=Pf(r),a=this.computeURL(e);if(n)return{request:new Request(a,{method:"GET"}),result:s};const o=await this.createHeaders(t);return{request:new Request(a,{method:"GET",headers:new Headers(o),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:s}}async sendDetailed(e,t,n,r){const s=await this.send(e,t,n,r);if(s==null)return;const a=Pf(s),o=this.computeURL(e),l=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...r});return{request:new Request(o,{method:n,headers:new Headers(l),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:a}}async postDetailed(e,t,n){return this.sendDetailed(e,t,"POST",n)}async putDetailed(e,t,n){return this.sendDetailed(e,t,"PUT",n)}async patchDetailed(e,t,n){return this.sendDetailed(e,t,"PATCH",n)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=ri.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let n="";e.startsWith("http")?n=e:n=this.serviceURL+"/"+e,n.startsWith("http")||(n=window.location.origin+n);const r=new URL(n);for(const s in t)r.searchParams.set(s,t[s]);return r.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,n="POST",r){const s={apiMethod:"send",path:e,additionalHeaders:r,method:n,data:t},a=await this.createHeaders(r);a.Accept="application/json",a["Content-Type"]="application/json";const o=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:n,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(o,s)}async submitFormData(e,t,n="POST",r){const s={apiMethod:"submitFormData",path:e,additionalHeaders:r,method:n,data:t},a=await this.createHeaders(r);a.Accept="application/json";const o=new FormData,l=t;for(const h in l)o.set(h,l[h]);const c=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:n,body:o,keepalive:this.keepAlive});return await this.handleResult(c,s)}async put(e,t,n){return this.send(e,t,"PUT",n)}async post(e,t,n){return this.send(e,t,"POST",n)}async patch(e,t,n){return this.send(e,t,"PATCH",n)}async delete(e,t,n){return this.send(e,t,"delete",n)}};xt.loadingGetPromises=new Map,xt.tokens=new Map,xt.invalidTokens=[],xt.failledTokenUpdates=new Map,xt.firstCallDoneFlags=new Map;let lc=xt;ri.getApiConfiguration(document.body||document.documentElement);var Df=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lb(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ps={exports:{}},Ib=ps.exports,Lf;function Ub(){return Lf||(Lf=1,(function(i,e){var t=[].slice;(function(n,r){return e!==null?i.exports=r():n.UrlPattern=r()})(Ib,function(){var n,r,s,a,o,l,c,h,u,f,d,_,b,g,m;return u=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},c=function(S,y){var M,T,R;for(R=[],M=-1,T=S.length;++M<T;)R=R.concat(y(S[M]));return R},g=function(S,y){var M,T,R;for(R="",M=-1,T=S.length;++M<T;)R+=y(S[M]);return R},b=function(S){return new RegExp(S.toString()+"|").exec("").length-1},d=function(S,y){var M,T,R,k,B;for(k={},M=-1,R=S.length;++M<R;)T=S[M],B=y[M],B!=null&&(k[T]!=null?(Array.isArray(k[T])||(k[T]=[k[T]]),k[T].push(B)):k[T]=B);return k},n={},n.Result=function(S,y){this.value=S,this.rest=y},n.Tagged=function(S,y){this.tag=S,this.value=y},n.tag=function(S,y){return function(M){var T,R;if(T=y(M),T!=null)return R=new n.Tagged(S,T.value),new n.Result(R,T.rest)}},n.regex=function(S){return function(y){var M,T;if(M=S.exec(y),M!=null)return T=M[0],new n.Result(T,y.slice(T.length))}},n.sequence=function(){var S;return S=1<=arguments.length?t.call(arguments,0):[],function(y){var M,T,R,k,B,C;for(M=-1,T=S.length,C=[],k=y;++M<T;){if(R=S[M],B=R(k),B==null)return;C.push(B.value),k=B.rest}return new n.Result(C,k)}},n.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?t.call(arguments,1):[],function(M){var T,R;if(R=n.sequence.apply(n,y)(M),R!=null)return T=R.value,R.value=T[S],R}},n.string=function(S){var y;return y=S.length,function(M){if(M.slice(0,y)===S)return new n.Result(S,M.slice(y))}},n.lazy=function(S){var y;return y=null,function(M){return y==null&&(y=S()),y(M)}},n.baseMany=function(S,y,M,T,R){var k,B,C,D;for(C=R,D=M?"":[];!(y!=null&&(k=y(C),k!=null)||(B=S(C),B==null));)M?D+=B.value:D.push(B.value),C=B.rest;if(!(T&&D.length===0))return new n.Result(D,C)},n.many1=function(S){return function(y){return n.baseMany(S,null,!1,!0,y)}},n.concatMany1Till=function(S,y){return function(M){return n.baseMany(S,y,!0,!0,M)}},n.firstChoice=function(){var S;return S=1<=arguments.length?t.call(arguments,0):[],function(y){var M,T,R,k;for(M=-1,T=S.length;++M<T;)if(R=S[M],k=R(y),k!=null)return k}},_=function(S){var y;return y={},y.wildcard=n.tag("wildcard",n.string(S.wildcardChar)),y.optional=n.tag("optional",n.pick(1,n.string(S.optionalSegmentStartChar),n.lazy(function(){return y.pattern}),n.string(S.optionalSegmentEndChar))),y.name=n.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=n.tag("named",n.pick(1,n.string(S.segmentNameStartChar),n.lazy(function(){return y.name}))),y.escapedChar=n.pick(1,n.string(S.escapeChar),n.regex(/^./)),y.static=n.tag("static",n.concatMany1Till(n.firstChoice(n.lazy(function(){return y.escapedChar}),n.regex(/^./)),n.firstChoice(n.string(S.segmentNameStartChar),n.string(S.optionalSegmentStartChar),n.string(S.optionalSegmentEndChar),y.wildcard))),y.token=n.lazy(function(){return n.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=n.many1(n.lazy(function(){return y.token})),y},h={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},l=function(S,y){if(Array.isArray(S))return g(S,function(M){return l(M,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return u(S.value);case"optional":return"(?:"+l(S.value,y)+")?"}},o=function(S,y){return y==null&&(y=h.segmentValueCharset),"^"+l(S,y)+"$"},a=function(S){if(Array.isArray(S))return c(S,a);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return a(S.value)}},f=function(S,y,M,T){var R,k,B,C;if(T==null&&(T=!1),C=S[y],C==null){if(T)throw new Error("no values provided for key `"+y+"`");return}if(R=M[y]||0,k=Array.isArray(C)?C.length-1:0,R>k){if(T)throw new Error("too few values provided for key `"+y+"`");return}return B=Array.isArray(C)?C[R]:C,T&&(M[y]=R+1),B},s=function(S,y,M){var T,R;if(Array.isArray(S)){for(T=-1,R=S.length;++T<R;)if(s(S[T],y,M))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",M,!1)!=null;case"named":return f(y,S.value,M,!1)!=null;case"static":return!1;case"optional":return s(S.value,y,M)}},m=function(S,y,M){if(Array.isArray(S))return g(S,function(T){return m(T,y,M)});switch(S.tag){case"wildcard":return f(y,"_",M,!0);case"named":return f(y,S.value,M,!0);case"static":return S.value;case"optional":return s(S.value,y,M)?m(S.value,y,M):""}},r=function(S,y){var M,T,R,k,B;if(S instanceof r){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))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(M=b(this.regex),y.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(B=S.replace(/\s+/g,""),B!==S)throw new Error("argument must not contain whitespace");if(T={escapeChar:y?.escapeChar||h.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||h.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||h.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||h.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||h.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||h.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||h.wildcardChar},k=_(T),R=k.pattern(S),R==null)throw new Error("couldn't parse pattern");if(R.rest!=="")throw new Error("could only partially parse pattern");this.ast=R.value,this.regex=new RegExp(o(this.ast,T.segmentValueCharset)),this.names=a(this.ast)},r.prototype.match=function(S){var y,M;return M=this.regex.exec(S),M==null?null:(y=M.slice(1),this.names?d(this.names,y):y)},r.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return m(this.ast,S,{})},r.escapeForRegex=u,r.concatMap=c,r.stringConcatMap=g,r.regexGroupCount=b,r.keysAndValuesToObject=d,r.P=n,r.newParser=_,r.defaultOptions=h,r.astNodeToRegexString=o,r.astNodeToNames=a,r.getParam=f,r.astNodeContainsSegmentsForProvidedParams=s,r.stringify=m,r})})(ps,ps.exports)),ps.exports}var Nb=Ub();const Ob=Lb(Nb);class cc{constructor(e){this.path=cc.normalizePath(e)}getDataProviderKey(){return new ma(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 l;try{l=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return l.pathname=l.pathname.replace(/\/+/g,"/"),l.href}const n=t.indexOf("?"),r=t.indexOf("#");let s=t.length;n>=0&&(s=Math.min(s,n)),r>=0&&(s=Math.min(s,r));let a=t.slice(0,s);const o=t.slice(s);if(a=a.replace(/^\/+/,""),a=a.replace(/\/+/g,"/"),!a&&o)throw new RangeError("Endpoint: path cannot be empty");return a+o}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 ya(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uc={exports:{}},If;function Fb(){return If||(If=1,(function(i,e){(function(t){i.exports=t()})(function(){return(function(){function t(n,r,s){function a(c,h){if(!r[c]){if(!n[c]){var u=typeof ya=="function"&&ya;if(!h&&u)return u(c,!0);if(o)return o(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var d=r[c]={exports:{}};n[c][0].call(d.exports,function(_){var b=n[c][1][_];return a(b||_)},d,d.exports,t,n,r,s)}return r[c].exports}for(var o=typeof ya=="function"&&ya,l=0;l<s.length;l++)a(s[l]);return a}return t})()({1:[function(t,n,r){const s=t("./utils"),a=(function(){const o=s.stringToArray,l=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],c=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],h=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],u=["Thousand","Million","Billion","Trillion"];function f(z,q){var W=function(be,U,ee){var fe="";if(be<=19)fe=(U?" and ":"")+(ee?c[be]:l[be]);else if(be<100){const Se=Math.floor(be/10),ze=be%10;fe=(U?" and ":"")+h[Se-2],ze>0?fe+="-"+W(ze,!1,ee):ee&&(fe=fe.substring(0,fe.length-1)+"ieth")}else if(be<1e3){const Se=Math.floor(be/100),ze=be%100;fe=(U?", ":"")+l[Se]+" Hundred",ze>0?fe+=W(ze,!0,ee):ee&&(fe+="th")}else{var ye=Math.floor(Math.log10(be)/3);ye>u.length&&(ye=u.length);const Se=Math.pow(10,ye*3),ze=Math.floor(be/Se),_e=be-ze*Se;fe=(U?", ":"")+W(ze,!1,!1)+" "+u[ye-1],_e>0?fe+=W(_e,!0,ee):ee&&(fe+="th")}return fe},le=W(z,!1,q);return le}const d=Object.create(null);l.forEach(function(z,q){d[z.toLowerCase()]=q}),c.forEach(function(z,q){d[z.toLowerCase()]=q}),h.forEach(function(z,q){const W=z.toLowerCase();d[W]=(q+2)*10,d[W.substring(0,z.length-1)+"ieth"]=d[W]}),d.hundredth=100,u.forEach(function(z,q){const W=z.toLowerCase(),le=Math.pow(10,(q+1)*3);d[W]=le,d[W+"th"]=le});function _(z){const W=z.split(/,\s|\sand\s|[\s\\-]/).map(U=>d[U]);let le=[0];return W.forEach(U=>{if(U<100){let ee=le.pop();ee>=1e3&&(le.push(ee),ee=0),le.push(ee+U)}else le.push(le.pop()*U)}),le.reduce((U,ee)=>U+ee,0)}const b=[[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"]],g={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function m(z){for(var q=0;q<b.length;q++){const W=b[q];if(z>=W[0])return W[1]+m(z-W[0])}return""}function S(z){for(var q=0,W=1,le=z.length-1;le>=0;le--){const be=z[le],U=g[be];U<W?q-=U:(W=U,q+=U)}return q}function y(z,q){for(var W=[],le=q.charCodeAt(0);z>0;)W.unshift(String.fromCharCode((z-1)%26+le)),z=Math.floor((z-1)/26);return W.join("")}function M(z,q){for(var W=q.charCodeAt(0),le=0,be=0;be<z.length;be++)le+=(z.charCodeAt(z.length-be-1)-W+1)*Math.pow(26,be);return le}function T(z,q){if(typeof z>"u")return;z=Math.floor(z);const W=D(q);return B(z,W)}const R={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},k={UPPER:"upper",LOWER:"lower",TITLE:"title"};function B(z,q){let W;const le=z<0;switch(z=Math.abs(z),q.primary){case R.LETTERS:W=y(z,q.case===k.UPPER?"A":"a");break;case R.ROMAN:W=m(z),q.case===k.UPPER&&(W=W.toUpperCase());break;case R.WORDS:W=f(z,q.ordinal),q.case===k.UPPER?W=W.toUpperCase():q.case===k.LOWER&&(W=W.toLowerCase());break;case R.DECIMAL:W=""+z;var be=q.mandatoryDigits-W.length;if(be>0){var U=new Array(be+1).join("0");W=U+W}if(q.zeroCode!==48&&(W=o(W).map(Se=>String.fromCodePoint(Se.codePointAt(0)+q.zeroCode-48)).join("")),q.regular){const Se=Math.floor((W.length-1)/q.groupingSeparators.position);for(let ze=Se;ze>0;ze--){const _e=W.length-ze*q.groupingSeparators.position;W=W.substr(0,_e)+q.groupingSeparators.character+W.substr(_e)}}else q.groupingSeparators.reverse().forEach(Se=>{const ze=W.length-Se.position;W=W.substr(0,ze)+Se.character+W.substr(ze)});if(q.ordinal){var ee={1:"st",2:"nd",3:"rd"},fe=W[W.length-1],ye=ee[fe];(!ye||W.length>1&&W[W.length-2]==="1")&&(ye="th"),W=W+ye}break;case R.SEQUENCE:throw{code:"D3130",value:q.token}}return le&&(W="-"+W),W}const C=[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 D(z){const q={type:"integer",primary:R.DECIMAL,case:k.LOWER,ordinal:!1};let W,le;const be=z.lastIndexOf(";");switch(be===-1?W=z:(W=z.substring(0,be),le=z.substring(be+1),le[0]==="o"&&(q.ordinal=!0)),W){case"A":q.case=k.UPPER;case"a":q.primary=R.LETTERS;break;case"I":q.case=k.UPPER;case"i":q.primary=R.ROMAN;break;case"W":q.case=k.UPPER,q.primary=R.WORDS;break;case"Ww":q.case=k.TITLE,q.primary=R.WORDS;break;case"w":q.primary=R.WORDS;break;default:{let U=null,ee=0,fe=0,ye=[],Se=0;if(o(W).map(_e=>_e.codePointAt(0)).reverse().forEach(_e=>{let xe=!1;for(let qe=0;qe<C.length;qe++){const De=C[qe];if(_e>=De&&_e<=De+9){if(xe=!0,ee++,Se++,U===null)U=De;else if(De!==U)throw{code:"D3131"};break}}xe||(_e===35?(Se++,fe++):ye.push({position:Se,character:String.fromCodePoint(_e)}))}),ee>0){q.primary=R.DECIMAL,q.zeroCode=U,q.mandatoryDigits=ee,q.optionalDigits=fe;const xe=function(qe){if(qe.length===0)return 0;const De=qe[0].character;for(let re=1;re<qe.length;re++)if(qe[re].character!==De)return 0;const N=qe.map(re=>re.position),w=function(re,pe){return pe===0?re:w(pe,re%pe)},j=N.reduce(w);for(let re=1;re<=N.length;re++)if(N.indexOf(re*j)===-1)return 0;return j}(ye);xe>0?(q.regular=!0,q.groupingSeparators={position:xe,character:ye[0].character}):(q.regular=!1,q.groupingSeparators=ye)}else q.primary=R.SEQUENCE,q.token=W}}return q}const V={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 K(z){var q=[];const W={type:"datetime",parts:q},le=function(xe,qe){if(qe>xe){let De=z.substring(xe,qe);De=De.split("]]").join("]"),q.push({type:"literal",value:De})}};for(var be=0,U=0;U<z.length;){if(z.charAt(U)==="["){if(z.charAt(U+1)==="["){le(be,U),q.push({type:"literal",value:"["}),U+=2,be=U;continue}if(le(be,U),be=U,U=z.indexOf("]",be),U===-1)throw{code:"D3135"};let xe=z.substring(be+1,U);xe=xe.split(/\s+/).join("");var ee={type:"marker",component:xe.charAt(0)},fe=xe.lastIndexOf(","),ye;if(fe!==-1){const qe=xe.substring(fe+1),De=qe.indexOf("-");let N,w;const j=function(pe){if(!(typeof pe>"u"||pe==="*"))return parseInt(pe)};De===-1?N=qe:(N=qe.substring(0,De),w=qe.substring(De+1));const re={min:j(N),max:j(w)};ee.width=re,ye=xe.substring(1,fe)}else ye=xe.substring(1);if(ye.length===1)ee.presentation1=ye;else if(ye.length>1){var Se=ye.charAt(ye.length-1);"atco".indexOf(Se)!==-1?(ee.presentation2=Se,Se==="o"&&(ee.ordinal=!0),ee.presentation1=ye.substring(0,ye.length-1)):ee.presentation1=ye}else ee.presentation1=V[ee.component];if(typeof ee.presentation1>"u")throw{code:"D3132",value:ee.component};if(ee.presentation1[0]==="n")ee.names=k.LOWER;else if(ee.presentation1[0]==="N")ee.presentation1[1]==="n"?ee.names=k.TITLE:ee.names=k.UPPER;else if("YMDdFWwXxHhmsf".indexOf(ee.component)!==-1){var ze=ee.presentation1;if(ee.presentation2&&(ze+=";"+ee.presentation2),ee.integerFormat=D(ze),ee.width&&ee.width.min!==void 0&&ee.integerFormat.mandatoryDigits<ee.width.min&&(ee.integerFormat.mandatoryDigits=ee.width.min),ee.component==="Y")if(ee.n=-1,ee.width&&ee.width.max!==void 0)ee.n=ee.width.max,ee.integerFormat.mandatoryDigits=ee.n;else{var _e=ee.integerFormat.mandatoryDigits+ee.integerFormat.optionalDigits;_e>=2&&(ee.n=_e)}const qe=q[q.length-1];qe&&qe.integerFormat&&(qe.integerFormat.parseWidth=qe.integerFormat.mandatoryDigits)}(ee.component==="Z"||ee.component==="z")&&(ee.integerFormat=D(ee.presentation1)),q.push(ee),be=U+1}U++}return le(be,U),W}const J=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],se=["January","February","March","April","May","June","July","August","September","October","November","December"],he=1e3*60*60*24,Q=function(z){const q=Date.UTC(z.year,z.month);var W=new Date(q).getUTCDay();return W===0&&(W=7),W>4?q+(8-W)*he:q-(W-1)*he},de=function(z,q){return{year:z,month:q,nextMonth:function(){return q===11?de(z+1,0):de(z,q+1)},previousMonth:function(){return q===0?de(z-1,11):de(z,q-1)},nextYear:function(){return de(z+1,q)},previousYear:function(){return de(z-1,q)}}},ne=function(z,q){return(q-z)/(he*7)+1},ue=(z,q)=>{let W;switch(q){case"Y":W=z.getUTCFullYear();break;case"M":W=z.getUTCMonth()+1;break;case"D":W=z.getUTCDate();break;case"d":{const le=Date.UTC(z.getUTCFullYear(),z.getUTCMonth(),z.getUTCDate()),be=Date.UTC(z.getUTCFullYear(),0);W=(le-be)/he+1;break}case"F":W=z.getUTCDay(),W===0&&(W=7);break;case"W":{const le=de(z.getUTCFullYear(),0),be=Q(le),U=Date.UTC(le.year,z.getUTCMonth(),z.getUTCDate());let ee=ne(be,U);if(ee>52){const fe=Q(le.nextYear());U>=fe&&(ee=1)}else if(ee<1){const fe=Q(le.previousYear());ee=ne(fe,U)}W=Math.floor(ee);break}case"w":{const le=de(z.getUTCFullYear(),z.getUTCMonth()),be=Q(le),U=Date.UTC(le.year,le.month,z.getUTCDate());let ee=ne(be,U);if(ee>4){const fe=Q(le.nextMonth());U>=fe&&(ee=1)}else if(ee<1){const fe=Q(le.previousMonth());ee=ne(fe,U)}W=Math.floor(ee);break}case"X":{const le=de(z.getUTCFullYear(),0),be=Q(le),U=Q(le.nextYear()),ee=z.getTime();ee<be?W=le.year-1:ee>=U?W=le.year+1:W=le.year;break}case"x":{const le=de(z.getUTCFullYear(),z.getUTCMonth()),be=Q(le),U=le.nextMonth(),ee=Q(U),fe=z.getTime();fe<be?W=le.previousMonth().month+1:fe>=ee?W=U.month+1:W=le.month+1;break}case"H":W=z.getUTCHours();break;case"h":W=z.getUTCHours(),W=W%12,W===0&&(W=12);break;case"P":W=z.getUTCHours()>=12?"pm":"am";break;case"m":W=z.getUTCMinutes();break;case"s":W=z.getUTCSeconds();break;case"f":W=z.getUTCMilliseconds();break;case"Z":case"z":break;case"C":W="ISO";break;case"E":W="ISO";break}return W};let Te=null;function ke(z,q,W){var le=0,be=0;if(typeof W<"u"){const ze=parseInt(W);le=Math.floor(ze/100),be=ze%100}var U=function(ze,_e){var xe=ue(ze,_e.component);if("YMDdFWwXxHhms".indexOf(_e.component)!==-1)if(_e.component==="Y"&&_e.n!==-1&&(xe=xe%Math.pow(10,_e.n)),_e.names){if(_e.component==="M"||_e.component==="x")xe=se[xe-1];else if(_e.component==="F")xe=J[xe];else throw{code:"D3133",value:_e.component};_e.names===k.UPPER?xe=xe.toUpperCase():_e.names===k.LOWER&&(xe=xe.toLowerCase()),_e.width&&xe.length>_e.width.max&&(xe=xe.substring(0,_e.width.max))}else xe=B(xe,_e.integerFormat);else if(_e.component==="f")xe=B(xe,_e.integerFormat);else if(_e.component==="Z"||_e.component==="z"){const qe=le*100+be;if(_e.integerFormat.regular)xe=B(qe,_e.integerFormat);else{const De=_e.integerFormat.mandatoryDigits;if(De===1||De===2)xe=B(le,_e.integerFormat),be!==0&&(xe+=":"+T(be,"00"));else if(De===3||De===4)xe=B(qe,_e.integerFormat);else throw{code:"D3134",value:De}}qe>=0&&(xe="+"+xe),_e.component==="z"&&(xe="GMT"+xe),qe===0&&_e.presentation2==="t"&&(xe="Z")}else _e.component==="P"&&_e.names===k.UPPER&&(xe=xe.toUpperCase());return xe};let ee;typeof q>"u"?(Te===null&&(Te=K("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),ee=Te):ee=K(q);const fe=(60*le+be)*60*1e3,ye=new Date(z+fe);let Se="";return ee.parts.forEach(function(ze){ze.type==="literal"?Se+=ze.value:Se+=U(ye,ze)}),Se}function O(z){var q=Object.create(null);if(z.type==="datetime")q.type="datetime",q.parts=z.parts.map(function(W){var le=Object.create(null);if(W.type==="literal")le.regex=W.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(W.component==="Z"||W.component==="z"){let U;Array.isArray(W.integerFormat.groupingSeparators)||(U=W.integerFormat.groupingSeparators),le.regex="",W.component==="z"&&(le.regex="GMT"),le.regex+="[-+][0-9]+",U&&(le.regex+=U.character+"[0-9]+"),le.parse=function(ee){W.component==="z"&&(ee=ee.substring(3));let fe=0,ye=0;return U?(fe=Number.parseInt(ee.substring(0,ee.indexOf(U.character))),ye=Number.parseInt(ee.substring(ee.indexOf(U.character)+1))):ee.length-1<=2?fe=Number.parseInt(ee):(fe=Number.parseInt(ee.substring(0,3)),ye=Number.parseInt(ee.substring(3))),fe*60+ye}}else if(W.component==="f")le.regex="[0-9]+",le.parse=function(U){return parseFloat("0."+U.substring(0,3))*1e3};else if(W.integerFormat)le=O(W.integerFormat);else{le.regex="[a-zA-Z]+";var be=Object.create(null);if(W.component==="M"||W.component==="x")se.forEach(function(U,ee){W.width&&W.width.max?be[U.substring(0,W.width.max)]=ee+1:be[U]=ee+1});else if(W.component==="F")J.forEach(function(U,ee){ee>0&&(W.width&&W.width.max?be[U.substring(0,W.width.max)]=ee:be[U]=ee)});else if(W.component==="P")be={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:W.component};le.parse=function(U){return be[U]}}return le.component=W.component,le});else{q.type="integer";const W=z.case===k.UPPER;switch(z.primary){case R.LETTERS:q.regex=W?"[A-Z]+":"[a-z]+",q.parse=function(le){return M(le,W?"A":"a")};break;case R.ROMAN:q.regex=W?"[MDCLXVI]+":"[mdclxvi]+",q.parse=function(le){return S(W?le:le.toUpperCase())};break;case R.WORDS:q.regex="(?:"+s.keys(d).concat("and","[\\-, ]").join("|")+")+",q.parse=function(le){return _(le.toLowerCase())};break;case R.DECIMAL:q.regex="[0-9]",z.parseWidth?q.regex+=`{${z.parseWidth}}`:q.regex+="+",z.ordinal&&(q.regex+="(?:th|st|nd|rd)"),q.parse=function(le){let be=le;return z.ordinal&&(be=le.substring(0,le.length-2)),z.regular?be=be.split(",").join(""):z.groupingSeparators.forEach(U=>{be=be.split(U.character).join("")}),z.zeroCode!==48&&(be=be.split("").map(U=>String.fromCodePoint(U.codePointAt(0)-z.zeroCode+48)).join("")),parseInt(be)};break;case R.SEQUENCE:throw{code:"D3130",value:z.token}}}return q}function H(z,q){if(typeof z>"u")return;const W=D(q);return O(W).parse(z)}function we(z,q){const W=K(q),le=O(W),be="^"+le.parts.map(ye=>"("+ye.regex+")").join("")+"$";var ee=new RegExp(be,"i").exec(z);if(ee!==null){const De=Object.create(null);for(let A=1;A<ee.length;A++){const x=le.parts[A-1];x.parse&&(De[x.component]=x.parse(ee[A]))}if(Object.getOwnPropertyNames(De).length===0)return;let N=0;const w=A=>{N<<=1,N+=A?1:0},j=A=>!(~A&N)&&!!(A&N);"YXMxWwdD".split("").forEach(A=>w(De[A]));const pe=!j(161)&&j(130),ae=j(84),Ve=!ae&&j(72);N=0,"PHhmsf".split("").forEach(A=>w(De[A]));const oe=!j(23)&&j(47),Re=(pe?"YD":ae?"XxwF":Ve?"XWF":"YMD")+(oe?"Phmsf":"Hmsf"),Ke=this.environment.timestamp;let Oe=!1,Ce=!1;if(Re.split("").forEach(A=>{if(typeof De[A]>"u")Oe?(De[A]="MDd".indexOf(A)!==-1?1:0,Ce=!0):De[A]=ue(Ke,A);else if(Oe=!0,Ce)throw{code:"D3136"}}),De.M>0?De.M-=1:De.M=0,pe){const A=Date.UTC(De.Y,0),x=(De.d-1)*1e3*60*60*24,L=new Date(A+x);De.M=L.getUTCMonth(),De.D=L.getUTCDate()}if(ae)throw{code:"D3136"};if(Ve)throw{code:"D3136"};oe&&(De.H=De.h===12?0:De.h,De.P===1&&(De.H+=12));var fe=Date.UTC(De.Y,De.M,De.D,De.H,De.m,De.s,De.f);return(De.Z||De.z)&&(fe-=(De.Z||De.z)*60*1e3),fe}}var Be=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 ie(z,q){if(!(typeof z>"u"))if(typeof q>"u"){if(!Be.test(z))throw{stack:new Error().stack,code:"D3110",value:z};return Date.parse(z)}else return we.call(this,z,q)}function ce(z,q,W){if(!(typeof z>"u"))return ke.call(this,z,q,W)}return{formatInteger:T,parseInteger:H,fromMillis:ce,toMillis:ie}})();n.exports=a},{"./utils":6}],2:[function(t,n,r){(function(s){(function(){var a=t("./utils");const o=(()=>{var l=a.isNumeric,c=a.isArrayOfStrings,h=a.isArrayOfNumbers,u=a.isSequence,f=a.isFunction,d=a.isLambda,_=a.isPromise,b=a.getFunctionArity,g=a.isDeepEqual,m=a.stringToArray;function S(p){if(!(typeof p>"u")){var v=0;return p.forEach(function(E){v+=E}),v}}function y(p){return typeof p>"u"?0:p.length}function M(p){if(!(typeof p>"u"||p.length===0))return Math.max.apply(Math,p)}function T(p){if(!(typeof p>"u"||p.length===0))return Math.min.apply(Math,p)}function R(p){if(!(typeof p>"u"||p.length===0)){var v=0;return p.forEach(function(E){v+=E}),v/p.length}}function k(p,v=!1){if(!(typeof p>"u")){var E;if(typeof p=="string")E=p;else if(f(p))E="";else{if(typeof p=="number"&&!isFinite(p))throw{code:"D3001",value:p,stack:new Error().stack};var I=v?2:0;Array.isArray(p)&&p.outerWrapper&&(p=p[0]),E=JSON.stringify(p,function(F,X){return typeof X<"u"&&X!==null&&l(X)?X.toPrecision&&!Number.isInteger(X)?Number(X.toPrecision(15)):X:X&&f(X)?"":X},I)}return E}}function B(p,v,E){if(!(typeof p>"u")){var I=m(p),F=I.length;if(F+v<0&&(v=0),typeof E<"u"){if(E<=0)return"";var X=v>=0?v+E:F+v+E;return I.slice(v,X).join("")}return I.slice(v).join("")}}function C(p,v){if(!(typeof p>"u")){var E=p.indexOf(v);return E>-1?p.substr(0,E):p}}function D(p,v){if(!(typeof p>"u")){var E=p.indexOf(v);return E>-1?p.substr(E+v.length):p}}function V(p){if(!(typeof p>"u"))return p.toLowerCase()}function K(p){if(!(typeof p>"u"))return p.toUpperCase()}function J(p){if(!(typeof p>"u"))return m(p).length}function se(p){if(!(typeof p>"u")){var v=p.replace(/[ \t\n\r]+/gm," ");return v.charAt(0)===" "&&(v=v.substring(1)),v.charAt(v.length-1)===" "&&(v=v.substring(0,v.length-1)),v}}function he(p,v,E){if(!(typeof p>"u")){(typeof E>"u"||E.length===0)&&(E=" ");var I;v=Math.trunc(v);var F=Math.abs(v)-J(p);if(F>0){var X=new Array(F+1).join(E);E.length>1&&(X=B(X,0,F)),v>0?I=p+X:I=X+p}else I=p;return I}}async function Q(p,v){var E=p.apply(this,[v]);if(_(E)&&(E=await E),E&&!(typeof E.start=="number"||E.end==="number"||Array.isArray(E.groups)||f(E.next)))throw{code:"T1010",stack:new Error().stack};return E}async function de(p,v){if(!(typeof p>"u"||typeof v>"u")){var E;if(typeof v=="string")E=p.indexOf(v)!==-1;else{var I=await Q(v,p);E=typeof I<"u"}return E}}async function ne(p,v,E){if(!(typeof p>"u")){if(E<0)throw{stack:new Error().stack,value:E,code:"D3040",index:3};var I=this.createSequence();if(typeof E>"u"||E>0){var F=0,X=await Q(v,p);if(typeof X<"u")for(;typeof X<"u"&&(typeof E>"u"||F<E);)I.push({match:X.match,index:X.start,groups:X.groups}),X=await Q(X.next),F++}return I}}async function ue(p,v,E,I){if(!(typeof p>"u")){var F=this;if(v==="")throw{code:"D3010",stack:new Error().stack,value:v,index:2};if(I<0)throw{code:"D3011",stack:new Error().stack,value:I,index:4};var X;typeof E=="string"?X=function(yt){for(var wt="",ft=0,Tt=E.indexOf("$",ft);Tt!==-1&&ft<E.length;){wt+=E.substring(ft,Tt),ft=Tt+1;var sn=E.charAt(ft);if(sn==="$")wt+="$",ft++;else if(sn==="0")wt+=yt.match,ft++;else{var Lt;if(yt.groups.length===0?Lt=1:Lt=Math.floor(Math.log(yt.groups.length)*Math.LOG10E)+1,Tt=parseInt(E.substring(ft,ft+Lt),10),Lt>1&&Tt>yt.groups.length&&(Tt=parseInt(E.substring(ft,ft+Lt-1),10)),isNaN(Tt))wt+="$";else{if(yt.groups.length>0){var dn=yt.groups[Tt-1];typeof dn<"u"&&(wt+=dn)}ft+=Tt.toString().length}}Tt=E.indexOf("$",ft)}return wt+=E.substring(ft),wt}:X=E;var me="",ve=0;if(typeof I>"u"||I>0){var Ye=0;if(typeof v=="string"){for(var Ne=p.indexOf(v,ve);Ne!==-1&&(typeof I>"u"||Ye<I);)me+=p.substring(ve,Ne),me+=E,ve=Ne+v.length,Ye++,Ne=p.indexOf(v,ve);me+=p.substring(ve)}else{var mt=await Q(v,p);if(typeof mt<"u"){for(;typeof mt<"u"&&(typeof I>"u"||Ye<I);){me+=p.substring(ve,mt.start);var ut=X.apply(F,[mt]);if(_(ut)&&(ut=await ut),typeof ut=="string")me+=ut;else throw{code:"D3012",stack:new Error().stack,value:ut};ve=mt.start+mt.match.length,Ye++,mt=await Q(mt.next)}me+=p.substring(ve)}else me=p}}else me=p;return me}}function Te(p){if(!(typeof p>"u")){var v=typeof window<"u"?window.btoa:function(E){return new s.Buffer.from(E,"binary").toString("base64")};return v(p)}}function ke(p){if(!(typeof p>"u")){var v=typeof window<"u"?window.atob:function(E){return new s.Buffer.from(E,"base64").toString("binary")};return v(p)}}function O(p){if(!(typeof p>"u")){var v;try{v=encodeURIComponent(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"encodeUrlComponent"}}return v}}function H(p){if(!(typeof p>"u")){var v;try{v=encodeURI(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"encodeUrl"}}return v}}function we(p){if(!(typeof p>"u")){var v;try{v=decodeURIComponent(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"decodeUrlComponent"}}return v}}function Be(p){if(!(typeof p>"u")){var v;try{v=decodeURI(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"decodeUrl"}}return v}}async function ie(p,v,E){if(!(typeof p>"u")){if(E<0)throw{code:"D3020",stack:new Error().stack,value:E,index:3};var I=[];if(typeof E>"u"||E>0)if(typeof v=="string")I=p.split(v,E);else{var F=0,X=await Q(v,p);if(typeof X<"u"){for(var me=0;typeof X<"u"&&(typeof E>"u"||F<E);)I.push(p.substring(me,X.start)),me=X.end,X=await Q(X.next),F++;(typeof E>"u"||F<E)&&I.push(p.substring(me))}else I.push(p)}return I}}function ce(p,v){if(!(typeof p>"u"))return typeof v>"u"&&(v=""),p.join(v)}function z(p,v,E){if(!(typeof p>"u")){var I={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},F=I;typeof E<"u"&&a.keys(E).forEach(function(ge){F[ge]=E[ge]});for(var X=[],me=F["zero-digit"].charCodeAt(0),ve=me;ve<me+10;ve++)X.push(String.fromCharCode(ve));var Ye=X.concat([F["decimal-separator"],F["exponent-separator"],F["grouping-separator"],F.digit,F["pattern-separator"]]),Ne=v.split(F["pattern-separator"]);if(Ne.length>2)throw{code:"D3080",stack:new Error().stack};var mt=function(ge){var Ue=(function(){for(var tt,Qe=0;Qe<ge.length;Qe++)if(tt=ge.charAt(Qe),Ye.indexOf(tt)!==-1&&tt!==F["exponent-separator"])return ge.substring(0,Qe);return""})(),He=(function(){for(var tt,Qe=ge.length-1;Qe>=0;Qe--)if(tt=ge.charAt(Qe),Ye.indexOf(tt)!==-1&&tt!==F["exponent-separator"])return ge.substring(Qe+1);return""})(),Pe=ge.substring(Ue.length,ge.length-He.length),Ze,lt,ct,gt,rt=ge.indexOf(F["exponent-separator"],Ue.length);rt===-1||rt>ge.length-He.length?(Ze=Pe,lt=void 0):(Ze=Pe.substring(0,rt),lt=Pe.substring(rt+1));var Ge=Ze.indexOf(F["decimal-separator"]);return Ge===-1?(ct=Ze,gt=He):(ct=Ze.substring(0,Ge),gt=Ze.substring(Ge+1)),{prefix:Ue,suffix:He,activePart:Pe,mantissaPart:Ze,exponentPart:lt,integerPart:ct,fractionalPart:gt,subpicture:ge}},ut=function(ge){var Ue,He,Pe=ge.subpicture,Ze=Pe.indexOf(F["decimal-separator"]);Ze!==Pe.lastIndexOf(F["decimal-separator"])&&(Ue="D3081"),Pe.indexOf(F.percent)!==Pe.lastIndexOf(F.percent)&&(Ue="D3082"),Pe.indexOf(F["per-mille"])!==Pe.lastIndexOf(F["per-mille"])&&(Ue="D3083"),Pe.indexOf(F.percent)!==-1&&Pe.indexOf(F["per-mille"])!==-1&&(Ue="D3084");var lt=!1;for(He=0;He<ge.mantissaPart.length;He++){var ct=ge.mantissaPart.charAt(He);if(X.indexOf(ct)!==-1||ct===F.digit){lt=!0;break}}lt||(Ue="D3085");var gt=ge.activePart.split("").map(function(tt){return Ye.indexOf(tt)===-1?"p":"a"}).join("");gt.indexOf("p")!==-1&&(Ue="D3086"),Ze!==-1?(Pe.charAt(Ze-1)===F["grouping-separator"]||Pe.charAt(Ze+1)===F["grouping-separator"])&&(Ue="D3087"):ge.integerPart.charAt(ge.integerPart.length-1)===F["grouping-separator"]&&(Ue="D3088"),Pe.indexOf(F["grouping-separator"]+F["grouping-separator"])!==-1&&(Ue="D3089");var rt=ge.integerPart.indexOf(F.digit);rt!==-1&&ge.integerPart.substring(0,rt).split("").filter(function(tt){return X.indexOf(tt)>-1}).length>0&&(Ue="D3090"),rt=ge.fractionalPart.lastIndexOf(F.digit),rt!==-1&&ge.fractionalPart.substring(rt).split("").filter(function(tt){return X.indexOf(tt)>-1}).length>0&&(Ue="D3091");var Ge=typeof ge.exponentPart=="string";if(Ge&&ge.exponentPart.length>0&&(Pe.indexOf(F.percent)!==-1||Pe.indexOf(F["per-mille"])!==-1)&&(Ue="D3092"),Ge&&(ge.exponentPart.length===0||ge.exponentPart.split("").filter(function(tt){return X.indexOf(tt)===-1}).length>0)&&(Ue="D3093"),Ue)throw{code:Ue,stack:new Error().stack}},yt=function(ge){var Ue=function(Rt,Gt){for(var Pn=[],_t=Rt.indexOf(F["grouping-separator"]);_t!==-1;){var $t=(Gt?Rt.substring(0,_t):Rt.substring(_t)).split("").filter(function(Bt){return X.indexOf(Bt)!==-1||Bt===F.digit}).length;Pn.push($t),_t=ge.integerPart.indexOf(F["grouping-separator"],_t+1)}return Pn},He=Ue(ge.integerPart),Pe=function(Rt){if(Rt.length===0)return 0;for(var Gt=function($t,Bt){return Bt===0?$t:Gt(Bt,$t%Bt)},Pn=Rt.reduce(Gt),_t=1;_t<=Rt.length;_t++)if(Rt.indexOf(_t*Pn)===-1)return 0;return Pn},Ze=Pe(He),lt=Ue(ge.fractionalPart,!0),ct=ge.integerPart.split("").filter(function(Rt){return X.indexOf(Rt)!==-1}).length,gt=ct,rt=ge.fractionalPart.split(""),Ge=rt.filter(function(Rt){return X.indexOf(Rt)!==-1}).length,tt=rt.filter(function(Rt){return X.indexOf(Rt)!==-1||Rt===F.digit}).length,Qe=typeof ge.exponentPart=="string";ct===0&&tt===0&&(Qe?(Ge=1,tt=1):ct=1),Qe&&ct===0&&ge.integerPart.indexOf(F.digit)!==-1&&(ct=1),ct===0&&Ge===0&&(Ge=1);var Kt=0;return Qe&&(Kt=ge.exponentPart.split("").filter(function(Rt){return X.indexOf(Rt)!==-1}).length),{integerPartGroupingPositions:He,regularGrouping:Ze,minimumIntegerPartSize:ct,scalingFactor:gt,prefix:ge.prefix,fractionalPartGroupingPositions:lt,minimumFactionalPartSize:Ge,maximumFactionalPartSize:tt,minimumExponentSize:Kt,suffix:ge.suffix,picture:ge.subpicture}},wt=Ne.map(mt);wt.forEach(ut);var ft=wt.map(yt),Tt=F["minus-sign"],sn=F["zero-digit"],Lt=F["decimal-separator"],dn=F["grouping-separator"];ft.length===1&&(ft.push(JSON.parse(JSON.stringify(ft[0]))),ft[1].prefix=Tt+ft[1].prefix);var At;p>=0?At=ft[0]:At=ft[1];var zi;At.picture.indexOf(F.percent)!==-1?zi=p*100:At.picture.indexOf(F["per-mille"])!==-1?zi=p*1e3:zi=p;var Vn,Mi;if(At.minimumExponentSize===0)Vn=zi;else{var _c=Math.pow(10,At.scalingFactor),vc=Math.pow(10,At.scalingFactor-1);if(Vn=zi,Mi=0,Vn!==0){for(;Math.abs(Vn)<vc;)Vn*=10,Mi-=1;for(;Math.abs(Vn)>_c;)Vn/=10,Mi+=1}}var yc=ee(Vn,At.maximumFactionalPartSize),P=function(ge,Ue){var He=Math.abs(ge).toFixed(Ue);return sn!=="0"&&(He=He.split("").map(function(Pe){return Pe>="0"&&Pe<="9"?X[Pe.charCodeAt(0)-48]:Pe}).join("")),He},G=P(yc,At.maximumFactionalPartSize),Z=G.indexOf(".");for(Z===-1?G=G+Lt:G=G.replace(".",Lt);G.charAt(0)===sn;)G=G.substring(1);for(;G.charAt(G.length-1)===sn;)G=G.substring(0,G.length-1);Z=G.indexOf(Lt);var te=At.minimumIntegerPartSize-Z,Y=At.minimumFactionalPartSize-(G.length-Z-1);if(G=(te>0?new Array(te+1).join(sn):"")+G,G=G+(Y>0?new Array(Y+1).join(sn):""),Z=G.indexOf(Lt),At.regularGrouping>0)for(var Ee=Math.floor((Z-1)/At.regularGrouping),Le=1;Le<=Ee;Le++)G=[G.slice(0,Z-Le*At.regularGrouping),dn,G.slice(Z-Le*At.regularGrouping)].join("");else At.integerPartGroupingPositions.forEach(function(ge){G=[G.slice(0,Z-ge),dn,G.slice(Z-ge)].join(""),Z++});if(Z=G.indexOf(Lt),At.fractionalPartGroupingPositions.forEach(function(ge){G=[G.slice(0,ge+Z+1),dn,G.slice(ge+Z+1)].join("")}),Z=G.indexOf(Lt),(At.picture.indexOf(Lt)===-1||Z===G.length-1)&&(G=G.substring(0,G.length-1)),typeof Mi<"u"){var Fe=P(Mi,0);te=At.minimumExponentSize-Fe.length,te>0&&(Fe=new Array(te+1).join(sn)+Fe),G=G+F["exponent-separator"]+(Mi<0?Tt:"")+Fe}return G=At.prefix+G+At.suffix,G}}function q(p,v){if(!(typeof p>"u")){if(p=ee(p),typeof v>"u"?v=10:v=ee(v),v<2||v>36)throw{code:"D3100",stack:new Error().stack,value:v};var E=p.toString(v);return E}}function W(p){var v;if(!(typeof p>"u")){if(typeof p=="number")v=p;else if(typeof p=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(p)&&!isNaN(parseFloat(p))&&isFinite(p))v=parseFloat(p);else if(typeof p=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(p))v=Number(p);else if(p===!0)v=1;else if(p===!1)v=0;else throw{code:"D3030",value:p,stack:new Error().stack,index:1};return v}}function le(p){var v;if(!(typeof p>"u"))return v=Math.abs(p),v}function be(p){var v;if(!(typeof p>"u"))return v=Math.floor(p),v}function U(p){var v;if(!(typeof p>"u"))return v=Math.ceil(p),v}function ee(p,v){var E;if(!(typeof p>"u")){if(v){var I=p.toString().split("e");p=+(I[0]+"e"+(I[1]?+I[1]+v:v))}E=Math.round(p);var F=E-p;return Math.abs(F)===.5&&Math.abs(E%2)===1&&(E=E-1),v&&(I=E.toString().split("e"),E=+(I[0]+"e"+(I[1]?+I[1]-v:-v))),Object.is(E,-0)&&(E=0),E}}function fe(p){var v;if(!(typeof p>"u")){if(p<0)throw{stack:new Error().stack,code:"D3060",index:1,value:p};return v=Math.sqrt(p),v}}function ye(p,v){var E;if(!(typeof p>"u")){if(E=Math.pow(p,v),!isFinite(E))throw{stack:new Error().stack,code:"D3061",index:1,value:p,exp:v};return E}}function Se(){return Math.random()}function ze(p){if(!(typeof p>"u")){var v=!1;if(Array.isArray(p)){if(p.length===1)v=ze(p[0]);else if(p.length>1){var E=p.filter(function(I){return ze(I)});v=E.length>0}}else typeof p=="string"?p.length>0&&(v=!0):l(p)?p!==0&&(v=!0):p!==null&&typeof p=="object"&&!f(p)?a.keys(p).length>0&&(v=!0):typeof p=="boolean"&&p===!0&&(v=!0);return v}}function _e(p){if(!(typeof p>"u"))return!ze(p)}function xe(p,v,E,I){var F=[v],X=b(p);return X>=2&&F.push(E),X>=3&&F.push(I),F}async function qe(p,v){if(!(typeof p>"u")){for(var E=this.createSequence(),I=0;I<p.length;I++){var F=xe(v,p[I],I,p),X=await v.apply(this,F);typeof X<"u"&&E.push(X)}return E}}async function De(p,v){if(!(typeof p>"u")){for(var E=this.createSequence(),I=0;I<p.length;I++){var F=p[I],X=xe(v,F,I,p),me=await v.apply(this,X);ze(me)&&E.push(F)}return E}}async function N(p,v){if(!(typeof p>"u")){for(var E=!1,I,F=0;F<p.length;F++){var X=p[F],me=!0;if(typeof v<"u"){var ve=xe(v,X,F,p),Ye=await v.apply(this,ve);me=ze(Ye)}if(me)if(!E)I=X,E=!0;else throw{stack:new Error().stack,code:"D3138",index:F}}if(!E)throw{stack:new Error().stack,code:"D3139"};return I}}function w(){for(var p=[],v=Array.prototype.slice.call(arguments),E=Math.min.apply(Math,v.map(function(X){return Array.isArray(X)?X.length:0})),I=0;I<E;I++){var F=v.map(X=>X[I]);p.push(F)}return p}async function j(p,v,E){if(!(typeof p>"u")){var I,F=b(v);if(F<2)throw{stack:new Error().stack,code:"D3050",index:1};var X;for(typeof E>"u"&&p.length>0?(I=p[0],X=1):(I=E,X=0);X<p.length;){var me=[I,p[X]];F>=3&&me.push(X),F>=4&&me.push(p),I=await v.apply(this,me),X++}return I}}function re(p){var v=this.createSequence();if(Array.isArray(p)){for(var E=Object.create(null),I=0;I<p.length;I++){var F=re.call(this,p[I]);F.forEach(function(X){E[X]=!0})}v=re.call(this,E)}else p!==null&&typeof p=="object"&&!f(p)&&a.keys(p).forEach(X=>v.push(X));return v}function pe(p,v){var E;if(Array.isArray(p)){E=this.createSequence();for(var I=0;I<p.length;I++){var F=pe.call(this,p[I],v);typeof F<"u"&&(Array.isArray(F)?F.forEach(X=>E.push(X)):E.push(F))}}else p!==null&&typeof p=="object"&&Object.prototype.hasOwnProperty.call(p,v)&&!f(p)&&(E=p[v]);return E}function ae(p,v){if(typeof p>"u")return v;if(typeof v>"u")return p;Array.isArray(p)||(p=this.createSequence(p)),Array.isArray(v)||(v=[v]);const E=p.length+v.length;if(this.options&&E>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:E};return p.concat(v)}function Ve(p){return!(typeof p>"u")}function Ae(p){var v=this.createSequence();if(Array.isArray(p))for(var E=0;E<p.length;E++)v=ae.call(this,v,Ae.call(this,p[E]));else if(p!==null&&typeof p=="object"&&!d(p))for(const F of a.keys(p)){var I=Object.create(null);I[F]=p[F],v.push(I)}else v=p;return v}function oe(p){if(!(typeof p>"u")){var v=Object.create(null);return p.forEach(function(E){for(const I of a.keys(E))v[I]=E[I]}),v}}function We(p){if(!(typeof p>"u")){if(p.length<=1)return p;for(var v=p.length,E=new Array(v),I=0;I<v;I++)E[v-I-1]=p[I];return E}}async function Me(p,v){var E=this.createSequence();for(const X of a.keys(p)){var I=xe(v,p[X],X,p),F=await v.apply(this,I);typeof F<"u"&&E.push(F)}return E}function Re(p){throw{code:"D3137",stack:new Error().stack,message:p||"$error() function evaluated"}}function Ke(p,v){if(!p)throw{code:"D3141",stack:new Error().stack,message:v||"$assert() statement failed"}}function Oe(p){if(p!==void 0)return p===null?"null":l(p)?"number":typeof p=="string"?"string":typeof p=="boolean"?"boolean":Array.isArray(p)?"array":f(p)?"function":"object"}async function Ce(p,v){if(!(typeof p>"u")){if(p.length<=1)return p;var E;if(typeof v>"u"){if(!h(p)&&!c(p))throw{stack:new Error().stack,code:"D3070",index:1};E=async function(me,ve){return me>ve}}else E=v;var I=async function(me,ve){var Ye=async function(mt,ut,yt){ut.length===0?Array.prototype.push.apply(mt,yt):yt.length===0?Array.prototype.push.apply(mt,ut):await E(ut[0],yt[0])?(mt.push(yt[0]),await Ye(mt,ut,yt.slice(1))):(mt.push(ut[0]),await Ye(mt,ut.slice(1),yt))},Ne=[];return await Ye(Ne,me,ve),Ne},F=async function(me){if(!Array.isArray(me)||me.length<=1)return me;var ve=Math.floor(me.length/2),Ye=me.slice(0,ve),Ne=me.slice(ve);return Ye=await F(Ye),Ne=await F(Ne),await I(Ye,Ne)},X=await F(p);return X}}function A(p){if(!(typeof p>"u")){if(p.length<=1)return p;for(var v=new Array(p.length),E=0;E<p.length;E++){var I=Math.floor(Math.random()*(E+1));E!==I&&(v[E]=v[I]),v[I]=p[E]}return v}}function x(p){if(!(typeof p>"u")){if(!Array.isArray(p)||p.length<=1)return p;for(var v=u(p)?this.createSequence():[],E=0;E<p.length;E++){for(var I=p[E],F=!1,X=0;X<v.length;X++)if(g(I,v[X])){F=!0;break}F||v.push(I)}return v}}async function L(p,v){var E=Object.create(null);for(const me of a.keys(p)){var I=p[me],F=xe(v,I,me,p),X=await v.apply(this,F);ze(X)&&(E[me]=I)}return a.keys(E).length===0&&(E=void 0),E}return{sum:S,count:y,max:M,min:T,average:R,string:k,substring:B,substringBefore:C,substringAfter:D,lowercase:V,uppercase:K,length:J,trim:se,pad:he,match:ne,contains:de,replace:ue,split:ie,join:ce,formatNumber:z,formatBase:q,number:W,floor:be,ceil:U,round:ee,abs:le,sqrt:fe,power:ye,random:Se,boolean:ze,not:_e,map:qe,zip:w,filter:De,single:N,foldLeft:j,sift:L,keys:re,lookup:pe,append:ae,exists:Ve,spread:Ae,merge:oe,reverse:We,each:Me,error:Re,assert:Ke,type:Oe,sort:Ce,shuffle:A,distinct:x,base64encode:Te,base64decode:ke,encodeUrlComponent:O,encodeUrl:H,decodeUrlComponent:we,decodeUrl:Be}})();n.exports=o}).call(this)}).call(this,typeof Df<"u"?Df:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,n,r){var s=t("./datetime"),a=t("./functions"),o=t("./utils"),l=t("./parser"),c=t("./signature"),h=(function(){var u=o.isNumeric,f=o.isArrayOfStrings,d=o.isArrayOfNumbers,_=o.isSequence,b=o.isFunction,g=o.isLambda,m=o.isIterable,S=o.isPromise,y=o.getFunctionArity,M=o.isDeepEqual,T=Re(null);async function R(A,x,L){var p;L.base.depth++,L.base.guardrails();var v=L.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(v&&await v(A,x,L),A.type){case"path":p=await k(A,x,L);break;case"binary":p=await J(A,x,L);break;case"unary":p=await se(A,x,L);break;case"name":p=he(A,x,L);break;case"string":case"number":case"value":p=Q(A);break;case"wildcard":p=de(A,x,L);break;case"descendant":p=ue(A,x,L);break;case"parent":p=L.lookup(A.slot.label);break;case"condition":p=await be(A,x,L);break;case"block":p=await U(A,x,L);break;case"bind":p=await le(A,x,L);break;case"regex":p=ee(A,x,L);break;case"function":p=await xe(A,x,L);break;case"variable":p=fe(A,x,L);break;case"lambda":p=N(A,x,L);break;case"partial":p=await w(A,x,L);break;case"apply":p=await _e(A,x,L);break;case"transform":p=Se(A,x,L);break}if(Object.prototype.hasOwnProperty.call(A,"predicate"))for(var E=0;E<A.predicate.length;E++)p=await K(A.predicate[E].expr,p,L);A.type!=="path"&&Object.prototype.hasOwnProperty.call(A,"group")&&(p=await z(A.group,p,L));var I=L.lookup(Symbol.for("jsonata.__evaluate_exit"));return I&&await I(A,x,L,p),p&&_(p)&&!p.tupleStream&&(A.keepArray&&(p.keepSingleton=!0),p.length===0?p=void 0:p.length===1&&(p=p.keepSingleton?p:p[0])),L.base.depth--,p}async function k(A,x,L){var p;Array.isArray(x)&&A.steps[0].type!=="variable"?p=x:p=L.base.createSequence(x);for(var v,E=!1,I=void 0,F=0;F<A.steps.length;F++){var X=A.steps[F];if(X.tuple&&(E=!0),F===0&&X.consarray?v=await R(X,p,L):E?I=await V(X,p,I,L):v=await C(X,p,L,F===A.steps.length-1),!E&&(typeof v>"u"||v.length===0))break;typeof X.focus>"u"&&(p=v)}if(E)if(A.tuple)v=I;else for(v=L.base.createSequence(),F=0;F<I.length;F++)v.push(I[F]["@"]);return A.keepSingletonArray&&(Array.isArray(v)&&v.cons&&!v.sequence&&(v=L.base.createSequence(v)),v.keepSingleton=!0),Object.prototype.hasOwnProperty.call(A,"group")&&(v=await z(A.group,E?I:v,L)),v}function B(A,x){var L=Re(A);for(const p of o.keys(x))L.bind(p,x[p]);return L}async function C(A,x,L,p){var v;if(A.type==="sort")return v=await ye(A,x,L),A.stages&&(v=await D(A.stages,v,L)),v;v=L.base.createSequence();for(var E=0;E<x.length;E++){var I=await R(A,x[E],L);if(A.stages)for(var F=0;F<A.stages.length;F++)I=await K(A.stages[F].expr,I,L);typeof I<"u"&&v.push(I)}var X=L.base.createSequence();return p&&v.length===1&&Array.isArray(v[0])&&!_(v[0])?X=v[0]:Array.prototype.forEach.call(v,function(me){!Array.isArray(me)||me.cons?X.push(me):Array.prototype.forEach.call(me,ve=>X.push(ve))}),X}async function D(A,x,L){for(var p=x,v=0;v<A.length;v++){var E=A[v];switch(E.type){case"filter":p=await K(E.expr,p,L);break;case"index":for(var I=0;I<p.length;I++){var F=p[I];F[E.value]=I}break}}return p}async function V(A,x,L,p){var v;if(A.type==="sort"){if(L)v=await ye(A,L,p);else{var E=await ye(A,x,p);v=p.base.createSequence(),v.tupleStream=!0;for(var I=0;I<E.length;I++){var F={"@":E[I]};F[A.index]=I,v.push(F)}}return A.stages&&(v=await D(A.stages,v,p)),v}v=p.base.createSequence(),v.tupleStream=!0;var X=p;L===void 0&&(L=x.map(Ne=>({"@":Ne})));for(var me=0;me<L.length;me++){X=B(p,L[me]);var ve=await R(A,L[me]["@"],X);if(typeof ve<"u"){Array.isArray(ve)||(ve=[ve]);for(var Ye=0;Ye<ve.length;Ye++)F=Object.create(null),Object.assign(F,L[me]),ve.tupleStream?Object.assign(F,ve[Ye]):(A.focus?(F[A.focus]=ve[Ye],F["@"]=L[me]["@"]):F["@"]=ve[Ye],A.index&&(F[A.index]=Ye),A.ancestor&&(F[A.ancestor.label]=L[me]["@"])),v.push(F)}}return A.stages&&(v=await D(A.stages,v,p)),v}async function K(A,x,L){var p=L.base.createSequence();if(x&&x.tupleStream&&(p.tupleStream=!0),Array.isArray(x)||(x=L.base.createSequence(x)),A.type==="number"){var v=Math.floor(A.value);v<0&&(v=x.length+v);var E=await x[v];typeof E<"u"&&(Array.isArray(E)?p=E:p.push(E))}else for(v=0;v<x.length;v++){var E=x[v],I=E,F=L;x.tupleStream&&(I=E["@"],F=B(L,E));var X=await R(A,I,F);u(X)&&(X=[X]),d(X)?Array.prototype.forEach.call(X,function(ve){var Ye=Math.floor(ve);Ye<0&&(Ye=x.length+Ye),Ye===v&&p.push(E)}):a.boolean(X)&&p.push(E)}return p}async function J(A,x,L){var p,v=await R(A.lhs,x,L),E=A.value,I=async()=>await R(A.rhs,x,L);if(E==="and"||E==="or")try{return await Be(v,I,E)}catch(X){throw X.position=A.position,X.token=E,X}var F=await I();try{switch(E){case"+":case"-":case"*":case"/":case"%":p=ke(v,F,E);break;case"=":case"!=":p=O(v,F,E);break;case"<":case"<=":case">":case">=":p=H(v,F,E);break;case"&":p=ce(v,F);break;case"..":p=W(v,F,L);break;case"in":p=we(v,F);break}}catch(X){throw X.position=A.position,X.token=E,X}return p}async function se(A,x,L){var p,v={options:L.base.options,createSequence:L.base.createSequence};switch(A.value){case"-":if(p=await R(A.expression,x,L),typeof p>"u")p=void 0;else if(u(p))p=-p;else throw{code:"D1002",stack:new Error().stack,position:A.position,token:A.value,value:p};break;case"[":p=[];let F=await Promise.all(A.expressions.map(async(X,me)=>(L.isParallelCall=me>0,[X,await R(X,x,L)])));for(let X of F){var[E,I]=X;typeof I<"u"&&(E.value==="["?p.push(I):p=a.append.call(v,p,I))}A.consarray&&Object.defineProperty(p,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":p=await z(A,x,L);break}return p}function he(A,x,L){var p={createSequence:L.base.createSequence};return a.lookup.call(p,x,A.value)}function Q(A){return A.value}function de(A,x,L){var p={options:L.base.options,createSequence:L.base.createSequence},v=p.createSequence();return Array.isArray(x)&&x.outerWrapper&&x.length>0&&(x=x[0]),x!==null&&typeof x=="object"&&!b(x)&&o.keys(x).forEach(function(E){var I=x[E];Array.isArray(I)?(I=ne(I),v=a.append.call(p,v,I)):v.push(I)}),v}function ne(A,x){return typeof x>"u"&&(x=[]),Array.isArray(A)?Array.prototype.forEach.call(A,function(L){ne(L,x)}):x.push(A),x}function ue(A,x,L){var p,v=L.base.createSequence();return typeof x<"u"&&(Te(x,v),v.length===1?p=v[0]:p=v),p}function Te(A,x){Array.isArray(A)||x.push(A),Array.isArray(A)?Array.prototype.forEach.call(A,function(L){Te(L,x)}):A!==null&&typeof A=="object"&&!b(A)&&o.keys(A).forEach(function(L){Te(A[L],x)})}function ke(A,x,L){var p;if(typeof A<"u"&&!u(A))throw{code:"T2001",stack:new Error().stack,value:A};if(typeof x<"u"&&!u(x))throw{code:"T2002",stack:new Error().stack,value:x};if(typeof A>"u"||typeof x>"u")return p;switch(L){case"+":p=A+x;break;case"-":p=A-x;break;case"*":p=A*x;break;case"/":p=A/x;break;case"%":p=A%x;break}return p}function O(A,x,L){var p,v=typeof A,E=typeof x;if(v==="undefined"||E==="undefined")return!1;switch(L){case"=":p=M(A,x);break;case"!=":p=!M(A,x);break}return p}function H(A,x,L){var p,v=typeof A,E=typeof x,I=v==="undefined"||v==="string"||v==="number",F=E==="undefined"||E==="string"||E==="number";if(!I||!F)throw{code:"T2010",stack:new Error().stack,value:v==="string"||v==="number"?x:A};if(!(v==="undefined"||E==="undefined")){if(v!==E)throw{code:"T2009",stack:new Error().stack,value:A,value2:x};switch(L){case"<":p=A<x;break;case"<=":p=A<=x;break;case">":p=A>x;break;case">=":p=A>=x;break}return p}}function we(A,x){var L=!1;if(typeof A>"u"||typeof x>"u")return!1;Array.isArray(x)||(x=[x]);for(var p=0;p<x.length;p++)if(x[p]===A){L=!0;break}return L}async function Be(A,x,L){var p,v=ie(A);switch(L){case"and":p=v&&ie(await x());break;case"or":p=v||ie(await x());break}return p}function ie(A){var x=a.boolean(A);return typeof x>"u"?!1:x}function ce(A,x){var L,p="",v="";return typeof A<"u"&&(p=a.string(A)),typeof x<"u"&&(v=a.string(x)),L=p.concat(v),L}async function z(A,x,L){var p=Object.create(null),v=Object.create(null),E=!!(x&&x.tupleStream),I={options:L.base.options,createSequence:L.base.createSequence};Array.isArray(x)||(L.base.options,x=I.createSequence(x)),x.length===0&&!E&&x.push(void 0);for(var F=0;F<x.length;F++)for(var X=x[F],me=E?B(L,X):L,ve=0;ve<A.lhs.length;ve++){var Ye=A.lhs[ve],Ne=await R(Ye[0],E?X["@"]:X,me);if(typeof Ne!="string"&&Ne!==void 0)throw{code:"T1003",stack:new Error().stack,position:A.position,value:Ne};if(Ne!==void 0){if(Ne==="_jsonata_lambda"||Ne==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:A.position,value:Ne};var mt={data:X,exprIndex:ve};if(Object.prototype.hasOwnProperty.call(v,Ne)){if(v[Ne].exprIndex!==ve)throw{code:"D1009",stack:new Error().stack,position:A.position,value:Ne};v[Ne].data=a.append.call(I,v[Ne].data,X)}else v[Ne]=mt}}let ut=await Promise.all(o.keys(v).map(async(wt,ft)=>{let Tt=v[wt];var sn=Tt.data,Lt=L;if(E){var dn=q(Tt.data,L);sn=dn["@"],delete dn["@"],Lt=B(L,dn)}return L.isParallelCall=ft>0,[wt,await R(A.lhs[Tt.exprIndex][1],sn,Lt)]}));for(let wt of ut){var[Ne,yt]=await wt;typeof yt<"u"&&(p[Ne]=yt)}return p}function q(A,x){if(!Array.isArray(A))return A;var L=Object.create(null),p={options:x.base.options,createSequence:x.base.createSequence};Object.assign(L,A[0]);for(var v=1;v<A.length;v++)for(const E of o.keys(A[v]))L[E]=a.append.call(p,L[E],A[v][E]);return L}function W(A,x,L){var p;if(typeof A<"u"&&!Number.isInteger(A))throw{code:"T2003",stack:new Error().stack,value:A};if(typeof x<"u"&&!Number.isInteger(x))throw{code:"T2004",stack:new Error().stack,value:x};if(typeof A>"u"||typeof x>"u"||A>x)return p;var v=x-A+1;if(v>1e7)throw{code:"D2014",stack:new Error().stack,value:v};if(L.base.options&&v>L.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:v};p=new Array(v);for(var E=A,I=0;E<=x;E++,I++)p[I]=E;return p.sequence=!0,p}async function le(A,x,L){var p=await R(A.rhs,x,L);return L.bind(A.lhs.value,p),p}async function be(A,x,L){var p,v=await R(A.condition,x,L);return a.boolean(v)?p=await R(A.then,x,L):typeof A.else<"u"&&(p=await R(A.else,x,L)),p}async function U(A,x,L){for(var p,v=Re(L),E=0;E<A.expressions.length;E++)p=await R(A.expressions[E],x,v);return p}function ee(A,x,L){var p=new L.base.RegexEngine(A.value),v=function(E,I){var F;p.lastIndex=I||0;var X=p.exec(E);if(X!==null){if(F={match:X[0],start:X.index,end:X.index+X[0].length,groups:[]},X.length>1)for(var me=1;me<X.length;me++)F.groups.push(X[me]);F.next=function(){if(!(p.lastIndex>=E.length)){var ve=v(E,p.lastIndex);if(ve&&ve.match==="")throw{code:"D1004",stack:new Error().stack,position:A.position,value:A.value.source};return ve}}}return F};return v}function fe(A,x,L){var p;return A.value===""?p=x&&x.outerWrapper?x[0]:x:p=L.lookup(A.value),p}async function ye(A,x,L){var p,v=x,E=!!x.tupleStream,I=async function(X,me){for(var ve=0,Ye=0;ve===0&&Ye<A.terms.length;Ye++){var Ne=A.terms[Ye],mt=X,ut=L;E&&(mt=X["@"],ut=B(L,X));var yt=await R(Ne.expression,mt,ut);mt=me,ut=L,E&&(mt=me["@"],ut=B(L,me));var wt=await R(Ne.expression,mt,ut),ft=typeof yt,Tt=typeof wt;if(ft==="undefined"){ve=Tt==="undefined"?0:1;continue}if(Tt==="undefined"){ve=-1;continue}if(!(ft==="string"||ft==="number")||!(Tt==="string"||Tt==="number"))throw{code:"T2008",stack:new Error().stack,position:A.position,value:ft==="string"||ft==="number"?wt:yt};if(ft!==Tt)throw{code:"T2007",stack:new Error().stack,position:A.position,value:yt,value2:wt};yt!==wt&&(yt<wt?ve=-1:ve=1,Ne.descending===!0&&(ve=-ve))}return ve===1},F={environment:L,input:x};return p=await a.sort.apply(F,[v,I]),p}function Se(A,x,L){var p=async function(v){if(!(typeof v>"u")){var E=L.lookup("clone");if(!b(E))throw{code:"T2013",stack:new Error().stack,position:A.position};var I=await qe(E,[v],null,L),F=await R(A.pattern,I,L);if(typeof F<"u"){Array.isArray(F)||(F=[F]);for(var X=0;X<F.length;X++){var me=F[X],ve=await R(A.update,me,L),Ye=typeof ve;if(Ye!=="undefined"){if(Ye!=="object"||ve===null||Array.isArray(ve))throw{code:"T2011",stack:new Error().stack,position:A.update.position,value:ve};for(const yt of o.keys(ve))me[yt]=ve[yt]}if(typeof A.delete<"u"){var Ne=await R(A.delete,me,L);if(typeof Ne<"u"){var mt=Ne;if(Array.isArray(Ne)||(Ne=[Ne]),!f(Ne))throw{code:"T2012",stack:new Error().stack,position:A.delete.position,value:mt};for(var ut=0;ut<Ne.length;ut++)typeof me=="object"&&me!==null&&delete me[Ne[ut]]}}}}return I}};return oe(p,"<(oa):o>")}var ze=l("function($f, $g) { function($x){ $g($f($x)) } }");async function _e(A,x,L){var p,v=await R(A.lhs,x,L);if(A.rhs.type==="function")p=await xe(A.rhs,x,L,{context:v});else{var E=await R(A.rhs,x,L);if(!b(E))throw{code:"T2006",stack:new Error().stack,position:A.position,value:E};if(b(v)){var I=await R(ze,null,L);p=await qe(I,[v,E],null,L)}else p=await qe(E,[v],null,L)}return p}async function xe(A,x,L,p){var v,E=await R(A.procedure,x,L);if(typeof E>"u"&&A.procedure.type==="path"&&L.lookup(A.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:A.position,token:A.procedure.steps[0].value};var I=[];typeof p<"u"&&I.push(p.context);for(var F=0;F<A.arguments.length;F++){const me=await R(A.arguments[F],x,L);if(b(me)){const ve=async function(...Ye){return await qe(me,Ye,null,L)};ve.arity=y(me),I.push(ve)}else I.push(me)}var X=A.procedure.type==="path"?A.procedure.steps[0].value:A.procedure.value;try{typeof E=="object"&&(E.token=X,E.position=A.position),v=await qe(E,I,x,L)}catch(me){throw me.position||(me.position=A.position),me.token||(me.token=X),me}return v}async function qe(A,x,L,p){var v;for(v=await De(A,x,L,p);g(v)&&v.thunk===!0;){var E=await R(v.body.procedure,v.input,v.environment);v.body.procedure.type==="variable"&&(E.token=v.body.procedure.value),E.position=v.body.procedure.position;for(var I=[],F=0;F<v.body.arguments.length;F++)I.push(await R(v.body.arguments[F],v.input,v.environment));v=await De(E,I,L,p)}return v}async function De(A,x,L,p){var v;try{var E=x;if(A&&(E=j(A.signature,x,L)),g(A))v=await re(A,E);else if(A&&A._jsonata_function===!0){var I={environment:p,input:L,options:p.base.options,createSequence:p.base.createSequence};v=A.implementation.apply(I,E),m(v)&&(v=v.next().value),S(v)&&(v=await v)}else if(typeof A=="function")v=A.apply(L,E),S(v)&&(v=await v);else throw{code:"T1006",stack:new Error().stack}}catch(F){throw A&&(typeof F.token>"u"&&typeof A.token<"u"&&(F.token=A.token),F.position=A.position||F.position),F}return v}function N(A,x,L){var p={_jsonata_lambda:!0,input:x,environment:L,arguments:A.arguments,signature:A.signature,body:A.body};return A.thunk===!0&&(p.thunk=!0),p.apply=async function(v,E){return await qe(p,E,x,v?v.environment:L)},p}async function w(A,x,L){for(var p,v=[],E=0;E<A.arguments.length;E++){var I=A.arguments[E];I.type==="operator"&&I.value==="?"?v.push(I):v.push(await R(I,x,L))}var F=await R(A.procedure,x,L);if(typeof F>"u"&&A.procedure.type==="path"&&L.lookup(A.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:A.position,token:A.procedure.steps[0].value};if(g(F))p=pe(F,v,L);else if(F&&F._jsonata_function===!0)p=ae(F.implementation,v,L);else if(typeof F=="function")p=ae(F,v,L);else throw{code:"T1008",stack:new Error().stack,position:A.position,token:A.procedure.type==="path"?A.procedure.steps[0].value:A.procedure.value};return p}function j(A,x,L){if(typeof A>"u")return x;var p=A.validate(x,L);return p}async function re(A,x){var L,p=Re(A.environment);return Array.prototype.forEach.call(A.arguments,function(v,E){p.bind(v.value,x[E])}),typeof A.body=="function"?L=await Ve(A.body,p):L=await R(A.body,A.input,p),L}function pe(A,x,L){var p=Re(A.environment||L),v=[];Array.prototype.forEach.call(A.arguments,function(I,F){var X=x[F];X&&X.type==="operator"&&X.value==="?"?v.push(I):p.bind(I.value,X)});var E={_jsonata_lambda:!0,input:A.input,environment:p,arguments:v,body:A.body};return E}function ae(A,x,L){var p=Ae(A);p=p.map(function(F){return"$"+F.trim()});var v="function("+p.join(", ")+"){ _ }",E=l(v);E.body=A;var I=pe(E,x,L);return I}async function Ve(A,x){var L=Ae(A),p=L.map(function(I){return x.lookup(I.trim())}),v={environment:x,createSequence:x.base.createSequence},E=A.apply(v,p);return S(E)&&(E=await E),E}function Ae(A){var x=A.toString(),L=/\(([^)]*)\)/.exec(x)[1],p=L.split(",");return p}function oe(A,x){var L={_jsonata_function:!0,implementation:A};return typeof x<"u"&&(L.signature=c(x)),L}async function We(A,x){if(!(typeof A>"u")){var L=this.input;typeof x<"u"&&(L=x,Array.isArray(L)&&!_(L)&&(L=this.createSequence(L),L.outerWrapper=!0));try{var p=l(A,!1)}catch(E){throw Oe(E),{stack:new Error().stack,code:"D3120",value:E.message,error:E}}try{var v=await R(p,L,this.environment)}catch(E){throw Oe(E),{stack:new Error().stack,code:"D3121",value:E.message,error:E}}return v}}function Me(A){if(!(typeof A>"u"))return JSON.parse(a.string(A))}function Re(A){var x=Object.create(null);const L={bind:function(v,E){x[v]=E},lookup:function(v){var E;return Object.prototype.hasOwnProperty.call(x,v)?E=x[v]:A&&(E=A.lookup(v)),E},timestamp:A?A.timestamp:null,async:A?A.async:!1,isParallelCall:A?A.isParallelCall:!1,global:A?A.global:{ancestry:[null]}};if(A){var p=A.lookup(Symbol.for("jsonata.__createFrame_push"));p&&p(A,L),L.base=A.base}return L}T.bind("sum",oe(a.sum,"<a<n>:n>")),T.bind("count",oe(a.count,"<a:n>")),T.bind("max",oe(a.max,"<a<n>:n>")),T.bind("min",oe(a.min,"<a<n>:n>")),T.bind("average",oe(a.average,"<a<n>:n>")),T.bind("string",oe(a.string,"<x-b?:s>")),T.bind("substring",oe(a.substring,"<s-nn?:s>")),T.bind("substringBefore",oe(a.substringBefore,"<s-s:s>")),T.bind("substringAfter",oe(a.substringAfter,"<s-s:s>")),T.bind("lowercase",oe(a.lowercase,"<s-:s>")),T.bind("uppercase",oe(a.uppercase,"<s-:s>")),T.bind("length",oe(a.length,"<s-:n>")),T.bind("trim",oe(a.trim,"<s-:s>")),T.bind("pad",oe(a.pad,"<s-ns?:s>")),T.bind("match",oe(a.match,"<s-f<s:o>n?:a<o>>")),T.bind("contains",oe(a.contains,"<s-(sf):b>")),T.bind("replace",oe(a.replace,"<s-(sf)(sf)n?:s>")),T.bind("split",oe(a.split,"<s-(sf)n?:a<s>>")),T.bind("join",oe(a.join,"<a<s>s?:s>")),T.bind("formatNumber",oe(a.formatNumber,"<n-so?:s>")),T.bind("formatBase",oe(a.formatBase,"<n-n?:s>")),T.bind("formatInteger",oe(s.formatInteger,"<n-s:s>")),T.bind("parseInteger",oe(s.parseInteger,"<s-s:n>")),T.bind("number",oe(a.number,"<(nsb)-:n>")),T.bind("floor",oe(a.floor,"<n-:n>")),T.bind("ceil",oe(a.ceil,"<n-:n>")),T.bind("round",oe(a.round,"<n-n?:n>")),T.bind("abs",oe(a.abs,"<n-:n>")),T.bind("sqrt",oe(a.sqrt,"<n-:n>")),T.bind("power",oe(a.power,"<n-n:n>")),T.bind("random",oe(a.random,"<:n>")),T.bind("boolean",oe(a.boolean,"<x-:b>")),T.bind("not",oe(a.not,"<x-:b>")),T.bind("map",oe(a.map,"<af>")),T.bind("zip",oe(a.zip,"<a+>")),T.bind("filter",oe(a.filter,"<af>")),T.bind("single",oe(a.single,"<af?>")),T.bind("reduce",oe(a.foldLeft,"<afj?:j>")),T.bind("sift",oe(a.sift,"<o-f?:o>")),T.bind("keys",oe(a.keys,"<x-:a<s>>")),T.bind("lookup",oe(a.lookup,"<x-s:x>")),T.bind("append",oe(a.append,"<xx:a>")),T.bind("exists",oe(a.exists,"<x:b>")),T.bind("spread",oe(a.spread,"<x-:a<o>>")),T.bind("merge",oe(a.merge,"<a<o>:o>")),T.bind("reverse",oe(a.reverse,"<a:a>")),T.bind("each",oe(a.each,"<o-f:a>")),T.bind("error",oe(a.error,"<s?:x>")),T.bind("assert",oe(a.assert,"<bs?:x>")),T.bind("type",oe(a.type,"<x:s>")),T.bind("sort",oe(a.sort,"<af?:a>")),T.bind("shuffle",oe(a.shuffle,"<a:a>")),T.bind("distinct",oe(a.distinct,"<x:x>")),T.bind("base64encode",oe(a.base64encode,"<s-:s>")),T.bind("base64decode",oe(a.base64decode,"<s-:s>")),T.bind("encodeUrlComponent",oe(a.encodeUrlComponent,"<s-:s>")),T.bind("encodeUrl",oe(a.encodeUrl,"<s-:s>")),T.bind("decodeUrlComponent",oe(a.decodeUrlComponent,"<s-:s>")),T.bind("decodeUrl",oe(a.decodeUrl,"<s-:s>")),T.bind("eval",oe(We,"<sx?:x>")),T.bind("toMillis",oe(s.toMillis,"<s-s?:n>")),T.bind("fromMillis",oe(s.fromMillis,"<n-s?s?:s>")),T.bind("clone",oe(Me,"<(oa)-:o>"));var Ke={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 Oe(A){var x=Ke[A.code];if(typeof x<"u"){var L=x.replace(/\{\{\{([^}]+)}}}/g,function(){return A[arguments[1]]});L=L.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(A[arguments[1]])}),A.message=L}}function Ce(A,x){var L,p;try{L=l(A,x&&x.recover),p=L.errors,delete L.errors}catch(I){throw Oe(I),I}var v=Re(T),E=new Date;return v.bind("now",oe(function(I,F){return s.fromMillis(E.getTime(),I,F)},"<s?s?:s>")),v.bind("millis",oe(function(){return E.getTime()},"<:n>")),{evaluate:async function(I,F,X){if(typeof p<"u"){var me={code:"S0500",position:0};throw Oe(me),me}const ve=Re(v);for(const Ne of o.keys(F))ve.bind(Ne,F[Ne]);if(ve.bind("$",I),E=new Date,ve.timestamp=E,ve.options=x,ve.createSequence=function(){var Ne=[];return x&&x.sequence&&(Ne.push=function(...mt){if(Ne.length+mt.length>x.sequence)throw{code:"D2015",stack:new Error().stack,value:x.sequence};return Array.prototype.push.apply(Ne,mt)}),Ne.sequence=!0,arguments.length===1&&Ne.push(arguments[0]),Ne},Array.isArray(I)&&!_(I)&&(I=ve.createSequence(I),I.outerWrapper=!0),x&&(x.timeout||x.stack)){const Ne=Date.now();ve.guardrails=function(){if(x.stack>0&&ve.depth>x.stack)throw{code:"D1011",value:x.stack,stack:new Error().stack};if(x.timeout>0&&Date.now()-Ne>x.timeout)throw{code:"D1012",value:x.timeout,stack:new Error().stack}}}else ve.guardrails=function(){};ve.base=ve,ve.depth=0,x&&x.RegexEngine?ve.RegexEngine=x.RegexEngine:ve.RegexEngine=RegExp;var Ye;try{return Ye=await R(L,I,ve),typeof X=="function"&&X(null,Ye),Ye}catch(Ne){throw Oe(Ne),Ne}},assign:function(I,F){v.bind(I,F)},registerFunction:function(I,F,X){var me=oe(F,X);v.bind(I,me)},ast:function(){return L},errors:function(){return p}}}return Ce.parser=l,Ce})();n.exports=h},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,n,r){var s=t("./signature");const a=(()=>{var o={".":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},l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
3919
|
+
${e}`),n.compileShader(r),n.compileShader(s);let a="";return n.getShaderParameter(r,n.COMPILE_STATUS)||(a+=n.getShaderInfoLog(r)||"vertex compile failed"),n.getShaderParameter(s,n.COMPILE_STATUS)||(a+=n.getShaderInfoLog(s)||"fragment compile failed"),n.deleteShader(r),n.deleteShader(s),a.trim()||null}ensureTargets(e,t){const n=Math.max(1,Math.round(e)),r=Math.max(1,Math.round(t));this.disposeTargets(),this.sceneRT=Zl(n,r,!0);for(const s of this.activePasses)s!=="image"&&this.buffers.set(s,Lx(n,r));this.width=n,this.height=r}disposeTargets(){this.sceneRT&&(Jl(this.sceneRT),this.sceneRT=null);for(const e of this.buffers.values())Jl(e.targets[0]),Jl(e.targets[1]);this.buffers.clear()}clearPasses(){for(const e of this.passes.values())e.material.dispose();this.passes.clear(),this.activePasses=[]}drawPass(e,t,n){const r=this.passes.get(e);if(!r)return;const s=this.channels.get(e)||[{kind:"scene"},{kind:"none"},{kind:"none"},{kind:"none"}],a=r.uniforms.iChannelResolution.value;for(let l=0;l<4;l++){const c=this.resolveChannel(e,s[l]),h=r.uniforms[`iChannel${l}`];h.value=c;const u=c.image,f=c.image?.width||u?.width||this.width||1,d=c.image?.height||u?.height||this.height||1;let _=f,b=d;if(c===this.sceneRT?.texture)_=this.width,b=this.height;else if(c===this.sceneRT?.depthTexture)_=this.width,b=this.height;else for(const[g,m]of this.buffers)if(c===m.targets[0].texture||c===m.targets[1].texture){_=this.width,b=this.height;break}a[l*3]=_,a[l*3+1]=b,a[l*3+2]=1}r.uniforms.iResolution.value.set(this.width,this.height,1),r.uniforms.iTime.value=t.time,r.uniforms.iTimeDelta.value=t.timeDelta,r.uniforms.iFrameRate.value=t.timeDelta>0?1/t.timeDelta:60,r.uniforms.iFrame.value=t.frame,r.uniforms.iMouse.value.set(t.mouse[0],t.mouse[1],t.mouse[2],t.mouse[3]);const o=new Date;if(r.uniforms.iDate.value.set(o.getFullYear(),o.getMonth(),o.getDate(),o.getHours()*3600+o.getMinutes()*60+o.getSeconds()+o.getMilliseconds()*.001),r.uniforms.uParam0.value=t.params[0],r.uniforms.uParam1.value=t.params[1],r.uniforms.uParam2.value=t.params[2],r.uniforms.uParam3.value=t.params[3],r.uniforms.uNear.value=t.near,r.uniforms.uFar.value=t.far,this.quadMesh.material=r.material,n)this.renderer.setRenderTarget(null);else{const l=this.buffers.get(e);if(!l)return;const c=1-l.index;this.renderer.setRenderTarget(l.targets[c]),this.renderer.clear()}if(this.renderer.render(this.quadScene,this.quadCam),!n){const l=this.buffers.get(e);l&&(l.index=1-l.index)}}resolveChannel(e,t){if(t.kind==="none")return Hn;if(t.kind==="scene")return this.sceneRT?.texture??Hn;if(t.kind==="depth")return this.sceneRT?.depthTexture??Hn;if(t.kind==="url")return this.getUrlTexture(t.url);if(t.kind==="element")return this.getElementTexture(t.key)??Hn;const n=t.kind==="self"?e==="image"?null:e:t.buffer;if(!n)return Hn;const r=this.buffers.get(n);return r?r.targets[r.index].texture:Hn}getUrlTexture(e){let t=this.urlTextures.get(e);return t||(t=this.loader.load(e),t.colorSpace=Jt,t.flipY=!0,this.urlTextures.set(e,t),t)}getElementTexture(e){const t=this.elementResolver?.(e)??null;if(!t)return null;let n=null,r=-1;if(Ld(t))n=t.getFrameCanvas(),r=t.frameSeq;else if(t instanceof HTMLCanvasElement)n=t,r=(this.elementLastSeq.get(e)??0)+1;else if(t instanceof HTMLVideoElement){if(t.readyState<2)return this.elementTextures.get(e)??null;let o=this.elementTextures.get(e);return o||(o=new fh(t),o.colorSpace=Jt,this.elementTextures.set(e,o)),o.needsUpdate=!0,o}else if(t instanceof HTMLImageElement){let o=this.urlTextures.get(e);return!o&&t.complete&&t.naturalWidth>0&&(o=new Dt(t),o.needsUpdate=!0,o.colorSpace=Jt,o.flipY=!0,this.urlTextures.set(e,o)),o??null}if(!n||n.width<1)return this.elementTextures.get(e)??null;let s=this.elementTextures.get(e);return s?s.image!==n&&(s.image=n):(s=new Gm(n),s.colorSpace=Jt,s.flipY=!1,this.elementTextures.set(e,s)),this.elementLastSeq.get(e)!==r&&(s.needsUpdate=!0,this.elementLastSeq.set(e,r)),s}updateElementTextures(){for(const[e,t]of this.elementTextures){if(t instanceof fh){t.needsUpdate=!0;continue}this.getElementTexture(e)}}}function Ux(i,e){i.dprMax=Math.max(1,e||2)}function Nx(i,e){i.renderer.toneMappingExposure=Number.isFinite(e)?e:Ia}function Ox(i,e){i.fov=Number.isFinite(e)&&e>0?e:Ms,i.perspCam.fov=i.fov,i.perspCam.updateProjectionMatrix()}function Fx(i,e){i.fitEnabled=e}function kx(i,e){i.controls&&(i.controls.autoRotate=e)}function Bx(i,e){if(!i.controls)return;const t=Number.isFinite(e)?Math.max(0,e):.08;i.controls.enableDamping=t>0,i.controls.dampingFactor=t>0?t:.08}function zx(i){if(!i.controls)return;i.controls.autoRotate=!1;const e=i.controls.enableDamping,t=i.controls.dampingFactor;i.controls.enableDamping=!1,i.controls.update(),i.controls.enableDamping=e,i.controls.dampingFactor=t}function Hx(i,e){i.limits=Pr.mergeLimits(i.limits,e),Pr.applyLimitsToControls(i.controls,i.limits)}function Vx(i,e,t,n){Pr.setSpherical({activeCam:i.activeCam,controls:i.controls,target:i.target,limits:i.limits},e,t,n)}const Cn={setDprMax:Ux,setExposure:Nx,setFov:Ox,setFit:Fx,setAutoRotate:kx,setDamping:Bx,stopMotion:zx,setOrbitLimits:Hx,setOrbitSpherical:Vx},mf={type:"change"},Ql={type:"start"},gf={type:"end"},pa=new or,_f=new vi,Gx=Math.cos(70*Su.DEG2RAD),kt=new $,cn=2*Math.PI,Et={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ec=1e-6;class Wx extends Eg{constructor(e,t=null){super(e,t),this.state=Et.NONE,this.target=new $,this.cursor=new $,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:$i.ROTATE,MIDDLE:$i.DOLLY,RIGHT:$i.PAN},this.touches={ONE:qi.ROTATE,TWO:qi.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new $,this._lastQuaternion=new In,this._lastTargetPosition=new $,this._quat=new In().setFromUnitVectors(e.up,new $(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Eh,this._sphericalDelta=new Eh,this._scale=1,this._panOffset=new $,this._rotateStart=new Je,this._rotateEnd=new Je,this._rotateDelta=new Je,this._panStart=new Je,this._panEnd=new Je,this._panDelta=new Je,this._dollyStart=new Je,this._dollyEnd=new Je,this._dollyDelta=new Je,this._dollyDirection=new $,this._mouse=new Je,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=$x.bind(this),this._onPointerDown=Xx.bind(this),this._onPointerUp=qx.bind(this),this._onContextMenu=eb.bind(this),this._onMouseWheel=Kx.bind(this),this._onKeyDown=Zx.bind(this),this._onTouchStart=Jx.bind(this),this._onTouchMove=Qx.bind(this),this._onMouseDown=jx.bind(this),this._onMouseMove=Yx.bind(this),this._interceptControlDown=tb.bind(this),this._interceptControlUp=nb.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(mf),this.update(),this.state=Et.NONE}update(e=null){const t=this.object.position;kt.copy(t).sub(this.target),kt.applyQuaternion(this._quat),this._spherical.setFromVector3(kt),this.autoRotate&&this.state===Et.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=cn:n>Math.PI&&(n-=cn),r<-Math.PI?r+=cn:r>Math.PI&&(r-=cn),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=a!=this._spherical.radius}if(kt.setFromSpherical(this._spherical),kt.applyQuaternion(this._quatInverse),t.copy(this.target).add(kt),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){const o=kt.length();a=this._clampDistance(o*this._scale);const l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){const o=new $(this._mouse.x,this._mouse.y,0);o.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;const c=new $(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),a=kt.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):(pa.origin.copy(this.object.position),pa.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(pa.direction))<Gx?this.object.lookAt(this.target):(_f.setFromNormalAndCoplanarPoint(this.object.up,this.target),pa.intersectPlane(_f,this.target))))}else if(this.object.isOrthographicCamera){const a=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),a!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>ec||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ec||this._lastTargetPosition.distanceToSquared(this.target)>ec?(this.dispatchEvent(mf),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?cn/60*this.autoRotateSpeed*e:cn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){kt.setFromMatrixColumn(t,0),kt.multiplyScalar(-e),this._panOffset.add(kt)}_panUp(e,t){this.screenSpacePanning===!0?kt.setFromMatrixColumn(t,1):(kt.setFromMatrixColumn(t,0),kt.crossVectors(this.object.up,kt)),kt.multiplyScalar(e),this._panOffset.add(kt)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const r=this.object.position;kt.copy(r).sub(this.target);let s=kt.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/n.clientHeight,this.object.matrix),this._panUp(2*t*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),r=e-n.left,s=t-n.top,a=n.width,o=n.height;this._mouse.x=r/a*2-1,this._mouse.y=-(s/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(cn*this._rotateDelta.x/t.clientHeight),this._rotateUp(cn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-cn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),r=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._rotateEnd.set(r,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(cn*this._rotateDelta.x/t.clientHeight),this._rotateUp(cn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new Je,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function Xx(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function $x(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function qx(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(gf),this.state=Et.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function jx(i){let e;switch(i.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case $i.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=Et.DOLLY;break;case $i.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=Et.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=Et.ROTATE}break;case $i.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=Et.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=Et.PAN}break;default:this.state=Et.NONE}this.state!==Et.NONE&&this.dispatchEvent(Ql)}function Yx(i){switch(this.state){case Et.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case Et.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case Et.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function Kx(i){this.enabled===!1||this.enableZoom===!1||this.state!==Et.NONE||(i.preventDefault(),this.dispatchEvent(Ql),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(gf))}function Zx(i){this.enabled!==!1&&this._handleKeyDown(i)}function Jx(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case qi.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=Et.TOUCH_ROTATE;break;case qi.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=Et.TOUCH_PAN;break;default:this.state=Et.NONE}break;case 2:switch(this.touches.TWO){case qi.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=Et.TOUCH_DOLLY_PAN;break;case qi.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=Et.TOUCH_DOLLY_ROTATE;break;default:this.state=Et.NONE}break;default:this.state=Et.NONE}this.state!==Et.NONE&&this.dispatchEvent(Ql)}function Qx(i){switch(this._trackPointer(i),this.state){case Et.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case Et.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case Et.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case Et.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=Et.NONE}}function eb(i){this.enabled!==!1&&i.preventDefault()}function tb(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function nb(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function ib(i,e){i.mode=e;const t=i.activeCam.position.clone(),n=i.target.clone();i.activeCam=e===vn.Ortho?i.orthoCam:i.perspCam,i.activeCam.position.copy(t),i.controls?.dispose(),i.controls=new Wx(i.activeCam,i.canvas),i.controls.enableDamping=!0,i.controls.dampingFactor=.08,i.controls.target.copy(n),i.controls.enablePan=!0,Pr.applyLimitsToControls(i.controls,i.limits),i.controls.update(),i.unbindWheelRelay||(i.unbindWheelRelay=Pr.bindWheelPageScrollRelay(i.canvas,()=>i.controls))}function rb(i,e,t){const n=Math.max(1,e),r=Math.max(1,t),s=Math.min(typeof window<"u"&&window.devicePixelRatio||1,i.dprMax);i.renderer.setPixelRatio(s),i.renderer.setSize(n,r,!1);const a=n/r;i.perspCam.aspect=a,i.perspCam.updateProjectionMatrix();const o=1.2;i.orthoCam.left=-o*a,i.orthoCam.right=o*a,i.orthoCam.top=o,i.orthoCam.bottom=-o,i.orthoCam.updateProjectionMatrix()}const vf={applyCameraMode:ib,resize:rb};class sb{constructor(e){this.controls=null,this.unbindWheelRelay=null,this.content=null,this.loader=new Ry,this.loadToken=0,this.blobUrl=null,this.bbox=new Un,this.target=new $,this._ready=!1,this._loading=!1,this.lastError=null,this.raycaster=new Mg,this.pointerNdc=new Je,this.highlighted=null,this.prevEmissive=new et,this.prevEmissiveIntensity=0,this.lastCssW=1,this.lastCssH=1,this.damping=.08,this.postFrame={time:0,timeDelta:1/60,frame:0,mouse:[0,0,0,0],params:[0,0,0,0],near:.1,far:100},this.asTuneCtx=()=>this,this.asViewCtx=()=>this,this.asOpsCtx=()=>this;const t=fx(e);this.scene=t.scene,this.renderer=t.renderer,this.canvas=t.canvas,this.perspCam=t.perspCam,this.orthoCam=t.orthoCam,this.activeCam=t.activeCam,this.root=t.root,this.lights=t.lights,this.dprMax=t.dprMax,this.mode=t.mode,this.fov=t.fov,this.fitEnabled=t.fitEnabled,this.limits=t.limits,this.postFx=new Ix(this.renderer),this.applyCameraMode(this.mode),t.autoRotate&&this.setAutoRotate(!0),this.canvas,this.perspCam,this.orthoCam,this.root,this.content,this.lights,this.loader,this.loadToken,this.blobUrl,this.dprMax,this.fov,this.fitEnabled,this.limits,this.bbox,this.target,this.raycaster,this.pointerNdc,this.highlighted,this.prevEmissive,this.prevEmissiveIntensity,this.unbindWheelRelay}get ready(){return this._ready}get loading(){return this._loading}get error(){return this.lastError}get isLost(){return this.renderer.getContext()?.isContextLost?.()??!1}get hasPostFx(){return this.postFx.isEnabled}setDprMax(e){Cn.setDprMax(this.asTuneCtx(),e)}setExposure(e){Cn.setExposure(this.asTuneCtx(),e)}setFov(e){Cn.setFov(this.asTuneCtx(),e)}setFit(e){Cn.setFit(this.asTuneCtx(),e)}setAutoRotate(e){Cn.setAutoRotate(this.asTuneCtx(),e)}setDamping(e){this.damping=Number.isFinite(e)?Math.max(0,e):.08,Cn.setDamping(this.asTuneCtx(),this.damping)}stopMotion(){Cn.setAutoRotate(this.asTuneCtx(),!1),Cn.stopMotion(this.asTuneCtx())}setOrbitLimits(e){Cn.setOrbitLimits(this.asTuneCtx(),e)}setOrbitSpherical(e,t,n){Cn.setOrbitSpherical(this.asTuneCtx(),e,t,n)}applyCameraMode(e){vf.applyCameraMode(this.asViewCtx(),e),Cn.setDamping(this.asTuneCtx(),this.damping)}resize(e,t){this.lastCssW=e,this.lastCssH=t,vf.resize(this.asViewCtx(),e,t);const n=Math.min(typeof window<"u"&&window.devicePixelRatio||1,this.dprMax);this.postFx.resize(e*n,t*n)}async load(e){return ki.runLoad(this.asOpsCtx(),e)}fitToContent(){ki.fitToContent(this.asOpsCtx())}setPostConfig(e){this.postFx.setConfig(e),e&&this.lastCssW>0&&this.resize(this.lastCssW,this.lastCssH)}setPostElementResolver(e){this.postFx.setElementResolver(e)}setPostFrame(e){Object.assign(this.postFrame,e);const t=this.activeCam;"near"in t&&"far"in t&&(this.postFrame.near=t.near,this.postFrame.far=t.far)}render(){this.controls?.update(),this.postFx.isEnabled?this.postFx.render(this.scene,this.activeCam,this.postFrame):this.renderer.render(this.scene,this.activeCam)}pick(e,t){return ki.pick(this.asOpsCtx(),e,t)}setHoverAt(e,t){return ki.setHoverAt(this.asOpsCtx(),e,t)}clearHighlight(){ki.clearHighlight(this.asOpsCtx())}snapshot(e){return ki.buildSnapshot(this.asOpsCtx(),e)}dispose(e=!1){this.postFx.dispose(),ki.dispose(this.asOpsCtx(),e)}}function ab(i){return i.renderRoot?.querySelector("canvas")??null}async function yf(i){if(i.releasing||i.runtime)return;const e=ab(i);if(e)try{i.runtime=new sb({canvas:e,dprMax:i.dprMax,camera:Ut.cameraMode(i.camera),fov:i.fov,exposure:i.exposure,autoRotate:!1,fit:i.fit,minDistance:i.minDistance,maxDistance:i.maxDistance,minPolar:Dn.degToRad(i.minPolar),maxPolar:Dn.degToRad(i.maxPolar)}),i.runtime.setDamping(i.damping),Dn.applyOrbitLimits(i),bf(i),await Dn.run(i)}catch(t){Dn.emitError(i,t)}}function xf(i){i.loadToken++,Gn.stopLoop(i),i.ready=!1,i.releasing=!0,i.runtime?.dispose(!1),i.runtime=null,i.releasing=!1}function ob(i){const e=Es(i);if(!i.inView&&i.releaseOffscreen&&!e){xf(i);return}if((!i.runtime||i.runtime.isLost)&&(i.inView||e||!i.releaseOffscreen)){yf(i);return}i.syncPlayback()}function bf(i){if(!i.runtime)return;const e=i.getBoundingClientRect(),t=Math.max(e.width,i.clientWidth,1),n=Math.max(e.height,i.clientHeight,1);i.runtime.resize(t,n),i.ready&&i.runtime.render()}const Bi={ensureRuntime:yf,releaseRuntime:xf,syncVisibility:ob,syncSize:bf},tc="1";function lb(i){const e=i.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 ri=class Zt{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const n=t.indexOf("=");return e[t.substring(0,n).trim()]=t.substring(n+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let n=e;for(;n;){if(!t(n))return;n=n.parentNode||n.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let n=e;for(;n;){if(n instanceof Element&&n.nodeType===1){const r=window.getComputedStyle(n);if(Zt.overflowMatches(r,t))return n}n=Zt.nextComposedAncestor(n)}return null}static getScrollableAncestor(e){return Zt.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Zt.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const n of Zt.scopeAttributeNames(t))if(e.hasAttribute(n))return e.getAttribute(n)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let n=e;for(;n;){if(n instanceof HTMLElement){const s=Zt.readScopeAttributeOnElement(n,t);if(s!=null)return s}const r=n.parentNode||n.host;if(!r)break;n=r}return null}static getApiConfiguration(e){const t=Zt.getAncestorAttributeValue(e,"token"),n=Zt.getAncestorAttributeValue(e,"addHTTPResponse")!=null,r=Zt.getAncestorAttributeValue(e,"serviceURL");let s=null,a=null;const o=Zt.getAncestorAttributeValue(e,"tokenProvider"),l=Zt.getAncestorAttributeValue(e,"eventsApiToken");t||(s=Zt.getAncestorAttributeValue(e,"userName"),a=Zt.getAncestorAttributeValue(e,"password"));const c=Zt.getAncestorAttributeValue(e,"credentials")||void 0,h=e.getAttribute("cache"),u=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:r,token:t,userName:s,password:a,authToken:l,tokenProvider:o,addHTTPResponse:n,credentials:c,cache:h,blockUntilDone:u,keepAlive:f}}static getClosestElement(e,t){let n=e;for(;n&&!(n.nodeName&&n.nodeName.toLowerCase()===t);){const r=n.parentNode||n.host;if(!r){n=null;break}n=r}return n?.nodeName?n:null}static getClosestForm(e){return Zt.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const n=new Set(t.map(a=>a.toLowerCase())),r=[];let s=e.parentNode||e.host;for(;s;)s instanceof Element&&n.has(s.tagName.toLowerCase())&&r.push(s),s=s.parentNode||s.host;return r}static getAncestorsBySelectors(e,t){const n=[];let r=e.parentNode||e.host;for(;r;){if(r instanceof Element)for(const s of t)try{if(r.matches(s)){n.push(r);break}}catch{}r=r.parentNode||r.host}return n}static async loadJS(e){if(!lb(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,n=Array.from(document.scripts).find(s=>s.src===t);if(n)return n.dataset.concordeLoaded===tc?!0:new Promise(s=>{let a=!1;const o=c=>{a||(a=!0,c&&(n.dataset.concordeLoaded=tc),s(c))};n.addEventListener("load",()=>o(!0),{once:!0}),n.addEventListener("error",()=>o(!1),{once:!0});const l=n.readyState;if(l==="complete"||l==="loaded"){o(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{a||o(!0)})})});const r=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(s=>{const a=document.createElement("script");a.src=e,r&&(a.type="module"),a.onload=()=>{a.dataset.concordeLoaded=tc,s(!0)},a.onerror=()=>s(!1),document.head.appendChild(a)})}static async loadCSS(e){return new Promise(t=>{const n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,n.onload=()=>t(!0),n.onerror=()=>t(!0),document.head.appendChild(n)})}};function cb(i,e){"fov"in e&&(i.fov=Ut.toNum(e.fov,i.fov)),"exposure"in e&&(i.exposure=Ut.toNum(e.exposure,i.exposure)),"minDistance"in e&&(i.minDistance=Ut.toNum(e.minDistance,i.minDistance)),"maxDistance"in e&&(i.maxDistance=Ut.toNum(e.maxDistance,i.maxDistance)),"minPolar"in e&&(i.minPolar=Ut.toNum(e.minPolar,i.minPolar)),"maxPolar"in e&&(i.maxPolar=Ut.toNum(e.maxPolar,i.maxPolar)),"autoRotate"in e&&(i.autoRotate=Ut.isFormFlagOn(e.autoRotate)),"camera"in e&&typeof e.camera=="string"&&(i.camera=Ut.cameraMode(e.camera))}function ub(i,e){let t=!1;if("asset"in e){const n=Ut.asset(e.asset);n&&(i.asset=n,t=!0)}return"src"in e&&typeof e.src=="string"&&!("asset"in e)&&i.src!==e.src&&(i.src=e.src,t=!0),t}function hb(i){return"minDistance"in i||"maxDistance"in i||"minPolar"in i||"maxPolar"in i||"camera"in i}function fb(i,e){i.runtime&&("exposure"in e&&i.runtime.setExposure(i.exposure),"fov"in e&&i.runtime.setFov(i.fov),"camera"in e&&i.runtime.applyCameraMode(Ut.cameraMode(i.camera)),hb(e)&&Dn.applyOrbitLimits(i),"autoRotate"in e&&Gn.syncAutoRotate(i))}const nc={applyScalars:cb,applyAsset:ub,pushToRuntime:fb};function db(i,e){return i?Math.abs(i.yaw-e.yaw)>La||Math.abs(i.pitch-e.pitch)>La||Math.abs(i.distance-e.distance)>La:!0}function pb(i,e){const t=i.runtime.snapshot({time:0,frame:i.frame,hovering:i.hovering?1:0,pointerX:i.pointerX,pointerY:i.pointerY});return{yaw:"yaw"in e?Ut.toNum(e.yaw,t.yaw):t.yaw,pitch:"pitch"in e?Ut.toNum(e.pitch,t.pitch):t.pitch,distance:"distance"in e?Ut.toNum(e.distance,t.distance):t.distance}}function Sf(i,e){if(!i.runtime||!("distance"in e||"yaw"in e||"pitch"in e))return;const t=pb(i,e),n=i.lastFormOrbit;db(n,t)&&(i.lastFormOrbit=t,i.autoRotate&&n&&(i.autoRotate=!1,Gn.syncAutoRotate(i)),i.runtime.setOrbitSpherical(t.yaw,t.pitch,t.distance),i.runtime.render())}function mb(i,e){nc.applyScalars(i,e);const t=nc.applyAsset(i,e);if(!i.runtime){t&&Dn.run(i);return}nc.pushToRuntime(i,e),Sf(i,e),Hr.applyFormPost(i,e),t&&Dn.run(i)}const gb={applyFormParams:mb,applyFormOrbit:Sf};function Mf(i,e){const t=e?.trim();return t||ri.getAncestorAttributeValue(i,"dataProvider")||ri.getAncestorAttributeValue(i,"formDataProvider")||""}function _b(i,e,t){const n=e?.trim();return n||Mf(i,t)}const ic={resolveFormProviderId:Mf,resolveOutProviderId:_b,asset:jc,formParams:gb};let vb=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},Ef="sonic";typeof __SONIC_PREFIX__<"u"&&(Ef=__SONIC_PREFIX__);let Tf=Ef.replace(/-([a-z])/g,i=>i[1].toUpperCase());const yb=Tf.charAt(0).toUpperCase()+Tf.slice(1);let xb=class Vi{static areEqual(e,t){return e.length===t.length?e.every((n,r)=>n===t[r]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(n=>t=t.concat(n)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const n=(e[0]||{})[t];return e.every(r=>(r||{})[t]==n)}})})}),value:()=>({forKey:t=>Vi.from(e.map(n=>n[t]))}),copy:()=>({fromKey:t=>({toKey:n=>{e.forEach(r=>{r[n]=Array.isArray(r[t])?[...r[t]]:typeof r[t]=="object"&&r[t]!=null?{...r[t]}:r[t]})}})})}),map:t=>Vi.from(e.map(t)),filter:t=>Vi.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const n=[],r=new Map;for(const s of e){const a=s[t];if(!r.has(a)){const o=n.length;r.set(a,o);const l={items:[]};l[t]=a,n.push(l)}n[r.get(a)].items.push(s)}return Vi.from(n)}}),without:()=>({duplicates:()=>({forKey:t=>{const n=[...new Set(e.map(r=>r[t]))];return Vi.from(n.map(r=>e.find(s=>s[t]==r)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:n=>{const r=(s,a)=>o=>s[a]!=o[a];return Vi.from(e.filter(s=>t.every(r(s,n))))}})})})}}},rc=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",n="long"){t||(t=ri.getLanguage());const r=(c,h)=>[Math.floor(c/h),c%h];function s(c,h,u){return new Intl.NumberFormat(c,{style:"unit",unit:h,unitDisplay:u}).format}const[a,o]=r(e,60),l=[];return a&&l.push(s(t,"hour",n)(a)),o&&l.push(s(t,"minute",n)(o)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(l)}static js(e){try{return Function("return "+e)()}catch{return""}}};class wf{constructor(e){this.path=e}toString(){return this.path}}function Af(i){return new Proxy(i,{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 n=e.path?`${e.path}.${String(t)}`:String(t);return Af(new wf(n))}})}const bb=/\$\{|\{\$/;function Sb(i){return bb.test(i)}function Mb(i){const e=i;if(Sb(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const ma=function(i){return this instanceof ma?Af(new wf(i)):new ma(i)};let ga=class si{static shallowEqual(e,t,n=!0){const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length&&n)return!1;for(const a of r){const o=e[a],l=t[a];if(n?o!==l:o!=l)return!1}return!0}static deepEqual(e,t,n=!0){const r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length&&n)return!1;for(const a of r){const o=e[a],l=t[a],c=si.isObject(o)&&si.isObject(l),h=n?o!==l:o!=l;if(c&&!si.deepEqual(o,l)||!c&&h)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return si.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,n=!1){for(const r of t){const s=e[r];if(s===void 0)return;n&&si.isObject(s)?e=Object.assign(Array.isArray(s)?[]:{},e,s):e=e[r]}return e}static traverseDotNotation(e,t,n=!1){return si.traverse(e,t.split("."),n)}static getURLSearchArray(e,t=""){let n=[];for(let r in e){const s=e[r];t&&(r=t+"["+r+"]"),si.isObject(s)?n=[...n,...this.getURLSearchArray(s,r)]:n.push(`${r}=${s}`)}return n}static getURLSearchString(e){return si.getURLSearchArray(e,"").join("&")}};ga.traverseDotNotation;function Eb(i){return!1}function _a(i){return Object.prototype.hasOwnProperty.call(i,"__value")}function xi(i){return typeof i=="object"&&i!==null}let Dr="sonic";typeof __SONIC_PREFIX__>"u"&&(Dr="sonic");const sc=Dr=="sonic"?"publisher-proxies-data":Dr+"-publisher-proxies-data",Si=class Si{constructor(e,t,n){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_=n,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(),Si.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_&&!Xt.changed){Xt.changed=!0,Xt.saveId++;const t=Xt.saveId;setTimeout(()=>Xt.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const n=this.get();this._assignListeners_.forEach(r=>{r(n)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(n=>{n[e]!==t&&(n[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(n=>{const r=Object.getOwnPropertyDescriptor(n,e);r&&!r.set&&!r.writable||(n.propertyMap&&n.propertyMap[e]&&(e=n.propertyMap[e]),typeof n[e]<"u"&&n[e]!==t&&(n[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 n=t;const r=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(n=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==r&&(e[n]=r)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const n=this._value_[t];e[t]!==n&&(e[t]=n)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||xi(this._value_)&&xi(e)&&e&&_a(this._value_)&&_a(e)&&this._value_.__value===e.__value||!xi(e)&&e===this._value_.__value)return!0;this._value_=xi(e)?e:{__value:e},this._cachedGet_=void 0;const n=_a(this._value_);if(this._parentKey_&&this.parent){const r=_a(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_]:r});else{const s=[];s[Number(this._parentKey_)]=r,this.parent.set(s)}else this.parent._value_[this._parentKey_]=r}if(n)return this._proxies_.forEach((r,s)=>{s!="_parent_"&&(r.set(null),this._publishDynamicFilling_(s,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const r in this._value_)this._value_[r]===void 0&&delete this._value_[r];if(this._proxies_.forEach((r,s)=>{const a=this._value_[s];s!="_parent_"&&a===void 0&&a!==null&&isNaN(Number(s))&&(r.set(null),this._publishDynamicFilling_(s,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),xi(this._value_))for(const r in this._value_){const s=e[r],o=xi(s)?s:{__value:s};if(!this._proxies_.has(r)){this._publishDynamicFilling_(r,s);continue}this._proxies_.get(r)?.set(o,!0),this._publishDynamicFilling_(r,s)}return!0}get(){if(Tb(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_||(Si.instancesCounter++,this._instanceCounter_=Si.instancesCounter),Si.instances.set(this._instanceCounter_,this),"<"+Dr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Dr+"-publisher-proxy>"}};Si.instances=new Map,Si.instancesCounter=0;let va=Si;const Rf=[];function Tb(i){Rf.length>0&&Rf[0].add(i)}const vt=class vt{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],vt.instance!=null)throw"Singleton / use getInstance";vt.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),vt.initPageShowHandler()}static initPageShowHandler(){vt.pageShowHandlerInitialized||(vt.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&vt.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let n=localStorage.getItem(sc),r=null;if(n&&(r=await this.decompress(n,"gzip")),r)try{this.localStorageData=JSON.parse(r)}catch{this.localStorageData={}}else n=await this.compress("{}","gzip"),localStorage.setItem(sc,n),this.localStorageData={};const s=1e3*60*60*12;for(const a in this.localStorageData){const o=this.localStorageData[a],l=new Date().getTime()-(o.expirationDelayMs||s);o.lastModifiationMS<l&&delete this.localStorageData[a]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=vt.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new vt)}return vt.instance==null?new vt:vt.instance}static get(e,t){return vt.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+ri.getLanguage()]?.data||e.get())}get(e,t){const n=t?.localStorageMode==="enabled",r=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const o=ac({});this.set(e,o)}const s=this.publishers.get(e);return n&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(s._expiration_delay_=t.expirationDelayMs),s._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(s,e)),r&&(s._invalidate_on_page_show_=r),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!==vt.saveId&&e%10!=0))try{if(!vt.changed||vt.saving)return;vt.saving=!0,vt.changed=!1;const t=Array.from(this.publishers.keys());let n=!1;for(const r of t){const s=this.publishers.get(r);if(!s?._is_savable_)continue;const a=s?.get();a&&(this.localStorageData[r+"¤lang_"+ri.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:s._expiration_delay_,data:a},n=!0)}if(n){const r=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(sc,r)}if(vt.saving=!1,vt.changed){vt.saveId++;const r=vt.saveId;setTimeout(()=>this.saveToLocalStorage(r),1e3)}}catch{vt.saving=!1}}async compress(e,t){const n=new TextEncoder().encode(e),r=window,s=new r.CompressionStream(t),a=s.writable.getWriter();a.write(n),a.close();const o=await new Response(s.readable).arrayBuffer(),l=new Uint8Array(o);let c="";for(let h=0;h<l.length;h++)c+=String.fromCharCode(l[h]);return btoa(c)}async decompress(e,t){const n=atob(e),s=Uint8Array.from(n,h=>h.charCodeAt(0)).buffer,a=window,o=new a.DecompressionStream(t),l=o.writable.getWriter();l.write(s),l.close();const c=await new Response(o.readable).arrayBuffer();return new TextDecoder().decode(c)}};vt.buildDate="Sat Oct 03 2026 09:31:28 GMT+0200 (Central European Summer Time)",vt.changed=!1,vt.saving=!1,vt.saveId=0,vt.instance=null,vt.instances=new Map,vt.pageShowHandlerInitialized=!1;let Xt=vt;if(typeof window<"u"){const i=window,e=yb+"PublisherManager",t=i[e]||Xt;if(i[e]||(i[e]=Xt),t!==Xt){const n=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const r of n)Object.defineProperty(Xt,r,{configurable:!0,get(){return t[r]},set(s){t[r]=s}})}}const wb=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 Ab(i,e){return{get:function(t,n){if(typeof n=="string"&&wb.has(n))return i[n];if(n==Symbol.toPrimitive)return()=>e().get();if(!i._proxies_.has(n)){const r=i._value_[n],s=ac(xi(r)?r:{__value:r},i,n);s._proxies_.set("_parent_",e()),i._proxies_.set(n,s)}return i._proxies_.get(n)},set:function(t,n,r){if(n=="_value_")return i._value_=r,!0;if(n=="_cachedGet_")return i._cachedGet_=r,!0;if(n=="_assignmentId_")return i._assignmentId_=r,!0;if(n=="_is_savable_")return i._is_savable_=r,!0;if(n=="_expiration_delay_")return i._expiration_delay_=r,!0;if(n=="_invalidate_on_page_show_")return i._invalidate_on_page_show_=r,!0;if(n=="_instanceCounter_")return i._instanceCounter_=r,!0;if(!i._proxies_.has(n)){const a=ac({},i,n);a._proxies_.set("_parent_",e()),i._proxies_.set(n,a)}return i._value_[n]!==r&&(i._value_[n]=r,i._publishDynamicFilling_(n,r),i._proxies_.get(n)?.set(xi(r)?r:{__value:r})),!0},deleteProperty:function(t,n){return i._publishDynamicFilling_(n,null),i._proxies_.get(n)?.set(null),delete i._value_[n]},has:function(t,n){return n in i._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(t,n,r){return r&&"value"in r&&(i._value_[n]=r.value),!0},getOwnPropertyDescriptor:function(t,n){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return i._value_.__value?Object.keys(i._value_.__value):Object.keys(i._value_)}}}function ac(i,e=null,t){const n=new va(i,e,t);let r=null;const s=Ab(n,()=>r);return r=new Proxy(n,s),r}class Rb extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=va.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Dr+"-publisher-proxy",Rb)}catch{}const Cb=(i,e)=>{{const t=i.split("."),n=t.shift()||"";let r=Xt.get(n,e);r=ga.traverse(r,t);const s=new Set;return s.add(r),s}};function Cf(i,e,t){const n=Mb(i);return Cb(n,t).values().next().value}function Pb(i,e){return Eb()?Cf(i,void 0,e):Cf(i)}let oc=(pt=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(pt.observedElements.keys()).forEach(e=>pt.unObserve(e)))}static observe(e){if(!e||!pt.enabled||pt.observedElements.has(e))return;const t=new MutationObserver(pt.onMutation),n={};n.childList=!0,n.subtree=!0,n.attributes=!0,n.attributeFilter=["data-bind"],t.observe(e,n),e.querySelectorAll("[data-bind]").forEach(r=>pt.addPublisherListeners(r)),pt.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(n=>pt.removePublisherListeners(n)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&pt.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>pt.addPublisherListeners(t)):e.childNodes.forEach(t=>pt.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&pt.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>pt.removePublisherListeners(t)):e.childNodes.forEach(t=>pt.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":pt.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(n=>{pt.onAdded(n)}),t.removedNodes.forEach(n=>{pt.onRemoved(n)});break}}static removePublisherListeners(e){const t=pt.publisherListeners.get(e);t&&(pt.publisherListeners.delete(e),t.forEach(n=>{n.publisher?.offAssign(n.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(n=>n.replace("$","")):t=[e],t=t.filter(n=>n.length>0),{expression:e.replace("\\",""),variables:t.map(n=>n.split(/\b\.\b/).map(r=>r.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,r=>r.substring(1).toUpperCase()),bindedVariablesDescriptor:pt.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const n of t)if(n!="_self_"){if(!e)return null;e=e[n]}return e}static addPublisherListeners(e){pt.removePublisherListeners(e);const t=ri.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const n=Xt.getInstance().get(t),r=pt.getDataBindItems(e),s=[];r.forEach(a=>{const o=a.bindedVariablesDescriptor,l=a.propertyToUpdate;for(const c of o.variables){const h=c;let u=n;u=pt.getSubPublisher(n,h);const f=e,d={publisher:u,onAssign:()=>{const _=o.variables.map(m=>pt.getSubPublisher(n,m)?.get());let b=o.expression,g=!1;if(_.length==1&&o.variables[0].join(".")==b.substring(1)){let m=_[0];m===null&&(m=""),f[l]=m;return}for(let m=0;m<_.length;m++){let S=_[m];const y=o.variables[m];S===null&&(g=!0,S=void 0),b=b.replace("$"+y.join("."),S)}if(b.indexOf("|")!=-1){const m=b.indexOf("|");if(m==0)b=rc.js(b.substring(1));else{const S=b.substring(0,m),y=b.substring(m+1),M=rc[S];b=g?"":M?M(y):b}}else b=g?"":b;f[l]=b}};u?.onAssign(d.onAssign),s.push(d)}}),pt.publisherListeners.set(e,s)}},pt.observedElements=new Map,pt.enabled=!0,pt.publisherListeners=new Map,pt);oc.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=oc);let Db=(Pt=class{static listen(){if(!Pt.listening)return;const e=document.location?.href.replace(document.location.origin,"");Pt.prevURL&&Pt.prevURL!=e&&(Pt.prevURL=e,Pt.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Pt.listen)}static offChange(e){const t=Pt.listeners.indexOf(e);t!=-1&&(Pt.listeners.splice(t,1),Pt.listeners.length==0&&(Pt.listening=!1))}static onChange(e){Pt.listening||(Pt.listening=!0,Pt.listen()),Pt.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,n=document.referrer;if(t!=null){const c=document.location.origin,h=(t||c).toString(),f=n.indexOf("http")==0?new URL(n).origin!=c:!1,d=n=="",_=history.length<3,b=d&&_,g=h!=document.location.href;if(f&&g||b){const S=history.state||{};S.concorde=S.concorde||{},S.concorde.hasDoneHistoryBack=!0,history.pushState(S,document.title),history.back(),document.location.replace(h)}else history.back();return}let r=e.getAttribute("to")||"";if(r||(r=e.href?.toString()||""),!r)return;if(r.indexOf("#")==0){document.location.hash=r.substring(1);return}const s=new URL(r,document.location.href),a=s.pathname.split("/"),o=[];let l="";for(const c of a)c!=l&&o.push(c),l=c;r="/"+o.join("/")+s.search+(s.hash?s.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",r):e.hasAttribute("replaceState")?history.replaceState(null,"",r):document.location.href=r}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const n=new URL(t,document.location.href),r=new URL(e.location||"",document.location.origin);let s=!1;e.autoActive=="strict"?s=n.pathname==r.pathname&&n.hash==r.hash&&n.search==r.search:e.autoActive=="strict-path-only"?s=n.pathname==r.pathname&&n.hash==r.hash:s=r.href.indexOf(n.href)==0,s?e.setAttribute("active","true"):e.removeAttribute("active")}}},Pt.listeners=[],Pt.listening=!1,Pt.prevURL=document.location?.href.replace(document.location.origin,""),Pt);function Pf(i){if(i==null||typeof i!="object"||Array.isArray(i))return i;const e={...i};return delete e._sonic_http_response_,e}const xt=class xt{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){xt.tokens.delete(this.serviceURL);return}xt.invalidTokens.includes(e)||xt.tokens.set(this.serviceURL,e)}get token(){return xt.invalidTokens.includes(this._token)?xt.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(xt.invalidTokens.includes(e)||(xt.invalidTokens.push(e),this.token=null))}async handleResult(e,t){xt.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const n=e.headers.get("content-type")?.toLowerCase(),r=e.status;let s={};if(!n||n.indexOf("text/")==0)s={text:await e.text()};else try{s=await e.json()}catch{s={}}if(this.addHTTPResponse&&ga.isObject(s)&&(s._sonic_http_response_=e),r===498&&!xt.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const o=await this.get(t.path,t.additionalHeaders);if(o==null)throw new Error("GET retry failed after token refresh");s=o}else s=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return Pb("sonic-api").lastResponse.set({http:e,processed:s}),s}async auth(){if(this.token)return;if(xt.tokens.has(this.serviceURL)){this.token=xt.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),n=t.protocol+"//"+t.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:n}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const s=await r.json();s.token?this.token=s.token:xt.failledTokenUpdates.set(this.serviceURL,!0)}catch{xt.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const n=Xt.get(e),r=new URLSearchParams(t.split("?")[1]||""),s=n.get();let a=[];Array.isArray(s)?a=s:a=[s];const o=[];let l=Number.POSITIVE_INFINITY,c=0,h=0;if(r.has("limit")&&(l=parseInt(r.get("limit")||"0"),h++),r.has("offset")&&(c=parseInt(r.get("offset")||"0"),h++),h>0&&(r.delete("limit"),r.delete("offset")),r.size===0)return a.slice(c,c+l);for(const[u,f]of r.entries()){const d=f.split(",").map(_=>_.trim());for(const _ of d)for(const b of a)if(typeof b!="object")isNaN(+b)?b.toString().toLowerCase().includes(f.toLowerCase())&&o.push(b):b===f&&o.push(b);else{const g=b;if(!g[u])continue;isNaN(+g[u])?g[u]?.toString().toLowerCase().includes(_.toLowerCase())&&o.push(b):g[u]===_&&o.push(b)}}return o.slice(c,c+l)}firstCallDone(){return new Promise(e=>{if(!xt.firstCallDoneFlags.has(this.serviceURL))xt.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(xt.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const n=/dataProvider\((.*?)\)(.*?)$/;if(n.test(e)){this.blockUntilDone&&(await this.firstCallDone(),xt.firstCallDoneFlags.set(this.serviceURL,"loading"));const c=e.match(n);if(!c)throw new Error("dataProvider path is not valid");return await this.localGet(c[1],c[2])}const r={apiMethod:"get",path:e,additionalHeaders:t},s=await this.createHeaders(t),a=this.computeURL(e),o=JSON.stringify({url:a,headers:s,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),xt.firstCallDoneFlags.set(this.serviceURL,"loading")),!xt.loadingGetPromises.has(o)){const c=new Promise(async h=>{try{const u=await fetch(a,{headers:s,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(u,r);h({processed:f,response:this.lastResult})}catch{xt.firstCallDoneFlags.set(this.serviceURL,"error"),h(null)}});xt.loadingGetPromises.set(o,c)}const l=await xt.loadingGetPromises.get(o);return xt.loadingGetPromises.delete(o),l?(this.lastResult=l.response,l.processed):null}async getDetailed(e,t){const n=/dataProvider\((.*?)\)(.*?)$/.test(e),r=await this.get(e,t);if(r==null)return;const s=Pf(r),a=this.computeURL(e);if(n)return{request:new Request(a,{method:"GET"}),result:s};const o=await this.createHeaders(t);return{request:new Request(a,{method:"GET",headers:new Headers(o),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:s}}async sendDetailed(e,t,n,r){const s=await this.send(e,t,n,r);if(s==null)return;const a=Pf(s),o=this.computeURL(e),l=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...r});return{request:new Request(o,{method:n,headers:new Headers(l),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:a}}async postDetailed(e,t,n){return this.sendDetailed(e,t,"POST",n)}async putDetailed(e,t,n){return this.sendDetailed(e,t,"PUT",n)}async patchDetailed(e,t,n){return this.sendDetailed(e,t,"PATCH",n)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=ri.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let n="";e.startsWith("http")?n=e:n=this.serviceURL+"/"+e,n.startsWith("http")||(n=window.location.origin+n);const r=new URL(n);for(const s in t)r.searchParams.set(s,t[s]);return r.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,n="POST",r){const s={apiMethod:"send",path:e,additionalHeaders:r,method:n,data:t},a=await this.createHeaders(r);a.Accept="application/json",a["Content-Type"]="application/json";const o=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:n,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(o,s)}async submitFormData(e,t,n="POST",r){const s={apiMethod:"submitFormData",path:e,additionalHeaders:r,method:n,data:t},a=await this.createHeaders(r);a.Accept="application/json";const o=new FormData,l=t;for(const h in l)o.set(h,l[h]);const c=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:n,body:o,keepalive:this.keepAlive});return await this.handleResult(c,s)}async put(e,t,n){return this.send(e,t,"PUT",n)}async post(e,t,n){return this.send(e,t,"POST",n)}async patch(e,t,n){return this.send(e,t,"PATCH",n)}async delete(e,t,n){return this.send(e,t,"delete",n)}};xt.loadingGetPromises=new Map,xt.tokens=new Map,xt.invalidTokens=[],xt.failledTokenUpdates=new Map,xt.firstCallDoneFlags=new Map;let lc=xt;ri.getApiConfiguration(document.body||document.documentElement);var Df=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lb(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var ps={exports:{}},Ib=ps.exports,Lf;function Ub(){return Lf||(Lf=1,(function(i,e){var t=[].slice;(function(n,r){return e!==null?i.exports=r():n.UrlPattern=r()})(Ib,function(){var n,r,s,a,o,l,c,h,u,f,d,_,b,g,m;return u=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},c=function(S,y){var M,T,R;for(R=[],M=-1,T=S.length;++M<T;)R=R.concat(y(S[M]));return R},g=function(S,y){var M,T,R;for(R="",M=-1,T=S.length;++M<T;)R+=y(S[M]);return R},b=function(S){return new RegExp(S.toString()+"|").exec("").length-1},d=function(S,y){var M,T,R,k,B;for(k={},M=-1,R=S.length;++M<R;)T=S[M],B=y[M],B!=null&&(k[T]!=null?(Array.isArray(k[T])||(k[T]=[k[T]]),k[T].push(B)):k[T]=B);return k},n={},n.Result=function(S,y){this.value=S,this.rest=y},n.Tagged=function(S,y){this.tag=S,this.value=y},n.tag=function(S,y){return function(M){var T,R;if(T=y(M),T!=null)return R=new n.Tagged(S,T.value),new n.Result(R,T.rest)}},n.regex=function(S){return function(y){var M,T;if(M=S.exec(y),M!=null)return T=M[0],new n.Result(T,y.slice(T.length))}},n.sequence=function(){var S;return S=1<=arguments.length?t.call(arguments,0):[],function(y){var M,T,R,k,B,C;for(M=-1,T=S.length,C=[],k=y;++M<T;){if(R=S[M],B=R(k),B==null)return;C.push(B.value),k=B.rest}return new n.Result(C,k)}},n.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?t.call(arguments,1):[],function(M){var T,R;if(R=n.sequence.apply(n,y)(M),R!=null)return T=R.value,R.value=T[S],R}},n.string=function(S){var y;return y=S.length,function(M){if(M.slice(0,y)===S)return new n.Result(S,M.slice(y))}},n.lazy=function(S){var y;return y=null,function(M){return y==null&&(y=S()),y(M)}},n.baseMany=function(S,y,M,T,R){var k,B,C,D;for(C=R,D=M?"":[];!(y!=null&&(k=y(C),k!=null)||(B=S(C),B==null));)M?D+=B.value:D.push(B.value),C=B.rest;if(!(T&&D.length===0))return new n.Result(D,C)},n.many1=function(S){return function(y){return n.baseMany(S,null,!1,!0,y)}},n.concatMany1Till=function(S,y){return function(M){return n.baseMany(S,y,!0,!0,M)}},n.firstChoice=function(){var S;return S=1<=arguments.length?t.call(arguments,0):[],function(y){var M,T,R,k;for(M=-1,T=S.length;++M<T;)if(R=S[M],k=R(y),k!=null)return k}},_=function(S){var y;return y={},y.wildcard=n.tag("wildcard",n.string(S.wildcardChar)),y.optional=n.tag("optional",n.pick(1,n.string(S.optionalSegmentStartChar),n.lazy(function(){return y.pattern}),n.string(S.optionalSegmentEndChar))),y.name=n.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=n.tag("named",n.pick(1,n.string(S.segmentNameStartChar),n.lazy(function(){return y.name}))),y.escapedChar=n.pick(1,n.string(S.escapeChar),n.regex(/^./)),y.static=n.tag("static",n.concatMany1Till(n.firstChoice(n.lazy(function(){return y.escapedChar}),n.regex(/^./)),n.firstChoice(n.string(S.segmentNameStartChar),n.string(S.optionalSegmentStartChar),n.string(S.optionalSegmentEndChar),y.wildcard))),y.token=n.lazy(function(){return n.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=n.many1(n.lazy(function(){return y.token})),y},h={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},l=function(S,y){if(Array.isArray(S))return g(S,function(M){return l(M,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return u(S.value);case"optional":return"(?:"+l(S.value,y)+")?"}},o=function(S,y){return y==null&&(y=h.segmentValueCharset),"^"+l(S,y)+"$"},a=function(S){if(Array.isArray(S))return c(S,a);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return a(S.value)}},f=function(S,y,M,T){var R,k,B,C;if(T==null&&(T=!1),C=S[y],C==null){if(T)throw new Error("no values provided for key `"+y+"`");return}if(R=M[y]||0,k=Array.isArray(C)?C.length-1:0,R>k){if(T)throw new Error("too few values provided for key `"+y+"`");return}return B=Array.isArray(C)?C[R]:C,T&&(M[y]=R+1),B},s=function(S,y,M){var T,R;if(Array.isArray(S)){for(T=-1,R=S.length;++T<R;)if(s(S[T],y,M))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",M,!1)!=null;case"named":return f(y,S.value,M,!1)!=null;case"static":return!1;case"optional":return s(S.value,y,M)}},m=function(S,y,M){if(Array.isArray(S))return g(S,function(T){return m(T,y,M)});switch(S.tag){case"wildcard":return f(y,"_",M,!0);case"named":return f(y,S.value,M,!0);case"static":return S.value;case"optional":return s(S.value,y,M)?m(S.value,y,M):""}},r=function(S,y){var M,T,R,k,B;if(S instanceof r){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))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(M=b(this.regex),y.length!==M)throw new Error("regex contains "+M+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(B=S.replace(/\s+/g,""),B!==S)throw new Error("argument must not contain whitespace");if(T={escapeChar:y?.escapeChar||h.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||h.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||h.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||h.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||h.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||h.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||h.wildcardChar},k=_(T),R=k.pattern(S),R==null)throw new Error("couldn't parse pattern");if(R.rest!=="")throw new Error("could only partially parse pattern");this.ast=R.value,this.regex=new RegExp(o(this.ast,T.segmentValueCharset)),this.names=a(this.ast)},r.prototype.match=function(S){var y,M;return M=this.regex.exec(S),M==null?null:(y=M.slice(1),this.names?d(this.names,y):y)},r.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return m(this.ast,S,{})},r.escapeForRegex=u,r.concatMap=c,r.stringConcatMap=g,r.regexGroupCount=b,r.keysAndValuesToObject=d,r.P=n,r.newParser=_,r.defaultOptions=h,r.astNodeToRegexString=o,r.astNodeToNames=a,r.getParam=f,r.astNodeContainsSegmentsForProvidedParams=s,r.stringify=m,r})})(ps,ps.exports)),ps.exports}var Nb=Ub();const Ob=Lb(Nb);class cc{constructor(e){this.path=cc.normalizePath(e)}getDataProviderKey(){return new ma(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 l;try{l=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return l.pathname=l.pathname.replace(/\/+/g,"/"),l.href}const n=t.indexOf("?"),r=t.indexOf("#");let s=t.length;n>=0&&(s=Math.min(s,n)),r>=0&&(s=Math.min(s,r));let a=t.slice(0,s);const o=t.slice(s);if(a=a.replace(/^\/+/,""),a=a.replace(/\/+/g,"/"),!a&&o)throw new RangeError("Endpoint: path cannot be empty");return a+o}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 ya(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uc={exports:{}},If;function Fb(){return If||(If=1,(function(i,e){(function(t){i.exports=t()})(function(){return(function(){function t(n,r,s){function a(c,h){if(!r[c]){if(!n[c]){var u=typeof ya=="function"&&ya;if(!h&&u)return u(c,!0);if(o)return o(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var d=r[c]={exports:{}};n[c][0].call(d.exports,function(_){var b=n[c][1][_];return a(b||_)},d,d.exports,t,n,r,s)}return r[c].exports}for(var o=typeof ya=="function"&&ya,l=0;l<s.length;l++)a(s[l]);return a}return t})()({1:[function(t,n,r){const s=t("./utils"),a=(function(){const o=s.stringToArray,l=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],c=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],h=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],u=["Thousand","Million","Billion","Trillion"];function f(z,q){var W=function(be,U,ee){var fe="";if(be<=19)fe=(U?" and ":"")+(ee?c[be]:l[be]);else if(be<100){const Se=Math.floor(be/10),ze=be%10;fe=(U?" and ":"")+h[Se-2],ze>0?fe+="-"+W(ze,!1,ee):ee&&(fe=fe.substring(0,fe.length-1)+"ieth")}else if(be<1e3){const Se=Math.floor(be/100),ze=be%100;fe=(U?", ":"")+l[Se]+" Hundred",ze>0?fe+=W(ze,!0,ee):ee&&(fe+="th")}else{var ye=Math.floor(Math.log10(be)/3);ye>u.length&&(ye=u.length);const Se=Math.pow(10,ye*3),ze=Math.floor(be/Se),_e=be-ze*Se;fe=(U?", ":"")+W(ze,!1,!1)+" "+u[ye-1],_e>0?fe+=W(_e,!0,ee):ee&&(fe+="th")}return fe},le=W(z,!1,q);return le}const d=Object.create(null);l.forEach(function(z,q){d[z.toLowerCase()]=q}),c.forEach(function(z,q){d[z.toLowerCase()]=q}),h.forEach(function(z,q){const W=z.toLowerCase();d[W]=(q+2)*10,d[W.substring(0,z.length-1)+"ieth"]=d[W]}),d.hundredth=100,u.forEach(function(z,q){const W=z.toLowerCase(),le=Math.pow(10,(q+1)*3);d[W]=le,d[W+"th"]=le});function _(z){const W=z.split(/,\s|\sand\s|[\s\\-]/).map(U=>d[U]);let le=[0];return W.forEach(U=>{if(U<100){let ee=le.pop();ee>=1e3&&(le.push(ee),ee=0),le.push(ee+U)}else le.push(le.pop()*U)}),le.reduce((U,ee)=>U+ee,0)}const b=[[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"]],g={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function m(z){for(var q=0;q<b.length;q++){const W=b[q];if(z>=W[0])return W[1]+m(z-W[0])}return""}function S(z){for(var q=0,W=1,le=z.length-1;le>=0;le--){const be=z[le],U=g[be];U<W?q-=U:(W=U,q+=U)}return q}function y(z,q){for(var W=[],le=q.charCodeAt(0);z>0;)W.unshift(String.fromCharCode((z-1)%26+le)),z=Math.floor((z-1)/26);return W.join("")}function M(z,q){for(var W=q.charCodeAt(0),le=0,be=0;be<z.length;be++)le+=(z.charCodeAt(z.length-be-1)-W+1)*Math.pow(26,be);return le}function T(z,q){if(typeof z>"u")return;z=Math.floor(z);const W=D(q);return B(z,W)}const R={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},k={UPPER:"upper",LOWER:"lower",TITLE:"title"};function B(z,q){let W;const le=z<0;switch(z=Math.abs(z),q.primary){case R.LETTERS:W=y(z,q.case===k.UPPER?"A":"a");break;case R.ROMAN:W=m(z),q.case===k.UPPER&&(W=W.toUpperCase());break;case R.WORDS:W=f(z,q.ordinal),q.case===k.UPPER?W=W.toUpperCase():q.case===k.LOWER&&(W=W.toLowerCase());break;case R.DECIMAL:W=""+z;var be=q.mandatoryDigits-W.length;if(be>0){var U=new Array(be+1).join("0");W=U+W}if(q.zeroCode!==48&&(W=o(W).map(Se=>String.fromCodePoint(Se.codePointAt(0)+q.zeroCode-48)).join("")),q.regular){const Se=Math.floor((W.length-1)/q.groupingSeparators.position);for(let ze=Se;ze>0;ze--){const _e=W.length-ze*q.groupingSeparators.position;W=W.substr(0,_e)+q.groupingSeparators.character+W.substr(_e)}}else q.groupingSeparators.reverse().forEach(Se=>{const ze=W.length-Se.position;W=W.substr(0,ze)+Se.character+W.substr(ze)});if(q.ordinal){var ee={1:"st",2:"nd",3:"rd"},fe=W[W.length-1],ye=ee[fe];(!ye||W.length>1&&W[W.length-2]==="1")&&(ye="th"),W=W+ye}break;case R.SEQUENCE:throw{code:"D3130",value:q.token}}return le&&(W="-"+W),W}const C=[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 D(z){const q={type:"integer",primary:R.DECIMAL,case:k.LOWER,ordinal:!1};let W,le;const be=z.lastIndexOf(";");switch(be===-1?W=z:(W=z.substring(0,be),le=z.substring(be+1),le[0]==="o"&&(q.ordinal=!0)),W){case"A":q.case=k.UPPER;case"a":q.primary=R.LETTERS;break;case"I":q.case=k.UPPER;case"i":q.primary=R.ROMAN;break;case"W":q.case=k.UPPER,q.primary=R.WORDS;break;case"Ww":q.case=k.TITLE,q.primary=R.WORDS;break;case"w":q.primary=R.WORDS;break;default:{let U=null,ee=0,fe=0,ye=[],Se=0;if(o(W).map(_e=>_e.codePointAt(0)).reverse().forEach(_e=>{let xe=!1;for(let qe=0;qe<C.length;qe++){const De=C[qe];if(_e>=De&&_e<=De+9){if(xe=!0,ee++,Se++,U===null)U=De;else if(De!==U)throw{code:"D3131"};break}}xe||(_e===35?(Se++,fe++):ye.push({position:Se,character:String.fromCodePoint(_e)}))}),ee>0){q.primary=R.DECIMAL,q.zeroCode=U,q.mandatoryDigits=ee,q.optionalDigits=fe;const xe=function(qe){if(qe.length===0)return 0;const De=qe[0].character;for(let re=1;re<qe.length;re++)if(qe[re].character!==De)return 0;const N=qe.map(re=>re.position),w=function(re,pe){return pe===0?re:w(pe,re%pe)},j=N.reduce(w);for(let re=1;re<=N.length;re++)if(N.indexOf(re*j)===-1)return 0;return j}(ye);xe>0?(q.regular=!0,q.groupingSeparators={position:xe,character:ye[0].character}):(q.regular=!1,q.groupingSeparators=ye)}else q.primary=R.SEQUENCE,q.token=W}}return q}const V={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 K(z){var q=[];const W={type:"datetime",parts:q},le=function(xe,qe){if(qe>xe){let De=z.substring(xe,qe);De=De.split("]]").join("]"),q.push({type:"literal",value:De})}};for(var be=0,U=0;U<z.length;){if(z.charAt(U)==="["){if(z.charAt(U+1)==="["){le(be,U),q.push({type:"literal",value:"["}),U+=2,be=U;continue}if(le(be,U),be=U,U=z.indexOf("]",be),U===-1)throw{code:"D3135"};let xe=z.substring(be+1,U);xe=xe.split(/\s+/).join("");var ee={type:"marker",component:xe.charAt(0)},fe=xe.lastIndexOf(","),ye;if(fe!==-1){const qe=xe.substring(fe+1),De=qe.indexOf("-");let N,w;const j=function(pe){if(!(typeof pe>"u"||pe==="*"))return parseInt(pe)};De===-1?N=qe:(N=qe.substring(0,De),w=qe.substring(De+1));const re={min:j(N),max:j(w)};ee.width=re,ye=xe.substring(1,fe)}else ye=xe.substring(1);if(ye.length===1)ee.presentation1=ye;else if(ye.length>1){var Se=ye.charAt(ye.length-1);"atco".indexOf(Se)!==-1?(ee.presentation2=Se,Se==="o"&&(ee.ordinal=!0),ee.presentation1=ye.substring(0,ye.length-1)):ee.presentation1=ye}else ee.presentation1=V[ee.component];if(typeof ee.presentation1>"u")throw{code:"D3132",value:ee.component};if(ee.presentation1[0]==="n")ee.names=k.LOWER;else if(ee.presentation1[0]==="N")ee.presentation1[1]==="n"?ee.names=k.TITLE:ee.names=k.UPPER;else if("YMDdFWwXxHhmsf".indexOf(ee.component)!==-1){var ze=ee.presentation1;if(ee.presentation2&&(ze+=";"+ee.presentation2),ee.integerFormat=D(ze),ee.width&&ee.width.min!==void 0&&ee.integerFormat.mandatoryDigits<ee.width.min&&(ee.integerFormat.mandatoryDigits=ee.width.min),ee.component==="Y")if(ee.n=-1,ee.width&&ee.width.max!==void 0)ee.n=ee.width.max,ee.integerFormat.mandatoryDigits=ee.n;else{var _e=ee.integerFormat.mandatoryDigits+ee.integerFormat.optionalDigits;_e>=2&&(ee.n=_e)}const qe=q[q.length-1];qe&&qe.integerFormat&&(qe.integerFormat.parseWidth=qe.integerFormat.mandatoryDigits)}(ee.component==="Z"||ee.component==="z")&&(ee.integerFormat=D(ee.presentation1)),q.push(ee),be=U+1}U++}return le(be,U),W}const J=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],se=["January","February","March","April","May","June","July","August","September","October","November","December"],he=1e3*60*60*24,Q=function(z){const q=Date.UTC(z.year,z.month);var W=new Date(q).getUTCDay();return W===0&&(W=7),W>4?q+(8-W)*he:q-(W-1)*he},de=function(z,q){return{year:z,month:q,nextMonth:function(){return q===11?de(z+1,0):de(z,q+1)},previousMonth:function(){return q===0?de(z-1,11):de(z,q-1)},nextYear:function(){return de(z+1,q)},previousYear:function(){return de(z-1,q)}}},ne=function(z,q){return(q-z)/(he*7)+1},ue=(z,q)=>{let W;switch(q){case"Y":W=z.getUTCFullYear();break;case"M":W=z.getUTCMonth()+1;break;case"D":W=z.getUTCDate();break;case"d":{const le=Date.UTC(z.getUTCFullYear(),z.getUTCMonth(),z.getUTCDate()),be=Date.UTC(z.getUTCFullYear(),0);W=(le-be)/he+1;break}case"F":W=z.getUTCDay(),W===0&&(W=7);break;case"W":{const le=de(z.getUTCFullYear(),0),be=Q(le),U=Date.UTC(le.year,z.getUTCMonth(),z.getUTCDate());let ee=ne(be,U);if(ee>52){const fe=Q(le.nextYear());U>=fe&&(ee=1)}else if(ee<1){const fe=Q(le.previousYear());ee=ne(fe,U)}W=Math.floor(ee);break}case"w":{const le=de(z.getUTCFullYear(),z.getUTCMonth()),be=Q(le),U=Date.UTC(le.year,le.month,z.getUTCDate());let ee=ne(be,U);if(ee>4){const fe=Q(le.nextMonth());U>=fe&&(ee=1)}else if(ee<1){const fe=Q(le.previousMonth());ee=ne(fe,U)}W=Math.floor(ee);break}case"X":{const le=de(z.getUTCFullYear(),0),be=Q(le),U=Q(le.nextYear()),ee=z.getTime();ee<be?W=le.year-1:ee>=U?W=le.year+1:W=le.year;break}case"x":{const le=de(z.getUTCFullYear(),z.getUTCMonth()),be=Q(le),U=le.nextMonth(),ee=Q(U),fe=z.getTime();fe<be?W=le.previousMonth().month+1:fe>=ee?W=U.month+1:W=le.month+1;break}case"H":W=z.getUTCHours();break;case"h":W=z.getUTCHours(),W=W%12,W===0&&(W=12);break;case"P":W=z.getUTCHours()>=12?"pm":"am";break;case"m":W=z.getUTCMinutes();break;case"s":W=z.getUTCSeconds();break;case"f":W=z.getUTCMilliseconds();break;case"Z":case"z":break;case"C":W="ISO";break;case"E":W="ISO";break}return W};let Te=null;function ke(z,q,W){var le=0,be=0;if(typeof W<"u"){const ze=parseInt(W);le=Math.floor(ze/100),be=ze%100}var U=function(ze,_e){var xe=ue(ze,_e.component);if("YMDdFWwXxHhms".indexOf(_e.component)!==-1)if(_e.component==="Y"&&_e.n!==-1&&(xe=xe%Math.pow(10,_e.n)),_e.names){if(_e.component==="M"||_e.component==="x")xe=se[xe-1];else if(_e.component==="F")xe=J[xe];else throw{code:"D3133",value:_e.component};_e.names===k.UPPER?xe=xe.toUpperCase():_e.names===k.LOWER&&(xe=xe.toLowerCase()),_e.width&&xe.length>_e.width.max&&(xe=xe.substring(0,_e.width.max))}else xe=B(xe,_e.integerFormat);else if(_e.component==="f")xe=B(xe,_e.integerFormat);else if(_e.component==="Z"||_e.component==="z"){const qe=le*100+be;if(_e.integerFormat.regular)xe=B(qe,_e.integerFormat);else{const De=_e.integerFormat.mandatoryDigits;if(De===1||De===2)xe=B(le,_e.integerFormat),be!==0&&(xe+=":"+T(be,"00"));else if(De===3||De===4)xe=B(qe,_e.integerFormat);else throw{code:"D3134",value:De}}qe>=0&&(xe="+"+xe),_e.component==="z"&&(xe="GMT"+xe),qe===0&&_e.presentation2==="t"&&(xe="Z")}else _e.component==="P"&&_e.names===k.UPPER&&(xe=xe.toUpperCase());return xe};let ee;typeof q>"u"?(Te===null&&(Te=K("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),ee=Te):ee=K(q);const fe=(60*le+be)*60*1e3,ye=new Date(z+fe);let Se="";return ee.parts.forEach(function(ze){ze.type==="literal"?Se+=ze.value:Se+=U(ye,ze)}),Se}function O(z){var q=Object.create(null);if(z.type==="datetime")q.type="datetime",q.parts=z.parts.map(function(W){var le=Object.create(null);if(W.type==="literal")le.regex=W.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(W.component==="Z"||W.component==="z"){let U;Array.isArray(W.integerFormat.groupingSeparators)||(U=W.integerFormat.groupingSeparators),le.regex="",W.component==="z"&&(le.regex="GMT"),le.regex+="[-+][0-9]+",U&&(le.regex+=U.character+"[0-9]+"),le.parse=function(ee){W.component==="z"&&(ee=ee.substring(3));let fe=0,ye=0;return U?(fe=Number.parseInt(ee.substring(0,ee.indexOf(U.character))),ye=Number.parseInt(ee.substring(ee.indexOf(U.character)+1))):ee.length-1<=2?fe=Number.parseInt(ee):(fe=Number.parseInt(ee.substring(0,3)),ye=Number.parseInt(ee.substring(3))),fe*60+ye}}else if(W.component==="f")le.regex="[0-9]+",le.parse=function(U){return parseFloat("0."+U.substring(0,3))*1e3};else if(W.integerFormat)le=O(W.integerFormat);else{le.regex="[a-zA-Z]+";var be=Object.create(null);if(W.component==="M"||W.component==="x")se.forEach(function(U,ee){W.width&&W.width.max?be[U.substring(0,W.width.max)]=ee+1:be[U]=ee+1});else if(W.component==="F")J.forEach(function(U,ee){ee>0&&(W.width&&W.width.max?be[U.substring(0,W.width.max)]=ee:be[U]=ee)});else if(W.component==="P")be={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:W.component};le.parse=function(U){return be[U]}}return le.component=W.component,le});else{q.type="integer";const W=z.case===k.UPPER;switch(z.primary){case R.LETTERS:q.regex=W?"[A-Z]+":"[a-z]+",q.parse=function(le){return M(le,W?"A":"a")};break;case R.ROMAN:q.regex=W?"[MDCLXVI]+":"[mdclxvi]+",q.parse=function(le){return S(W?le:le.toUpperCase())};break;case R.WORDS:q.regex="(?:"+s.keys(d).concat("and","[\\-, ]").join("|")+")+",q.parse=function(le){return _(le.toLowerCase())};break;case R.DECIMAL:q.regex="[0-9]",z.parseWidth?q.regex+=`{${z.parseWidth}}`:q.regex+="+",z.ordinal&&(q.regex+="(?:th|st|nd|rd)"),q.parse=function(le){let be=le;return z.ordinal&&(be=le.substring(0,le.length-2)),z.regular?be=be.split(",").join(""):z.groupingSeparators.forEach(U=>{be=be.split(U.character).join("")}),z.zeroCode!==48&&(be=be.split("").map(U=>String.fromCodePoint(U.codePointAt(0)-z.zeroCode+48)).join("")),parseInt(be)};break;case R.SEQUENCE:throw{code:"D3130",value:z.token}}}return q}function H(z,q){if(typeof z>"u")return;const W=D(q);return O(W).parse(z)}function we(z,q){const W=K(q),le=O(W),be="^"+le.parts.map(ye=>"("+ye.regex+")").join("")+"$";var ee=new RegExp(be,"i").exec(z);if(ee!==null){const De=Object.create(null);for(let A=1;A<ee.length;A++){const x=le.parts[A-1];x.parse&&(De[x.component]=x.parse(ee[A]))}if(Object.getOwnPropertyNames(De).length===0)return;let N=0;const w=A=>{N<<=1,N+=A?1:0},j=A=>!(~A&N)&&!!(A&N);"YXMxWwdD".split("").forEach(A=>w(De[A]));const pe=!j(161)&&j(130),ae=j(84),Ve=!ae&&j(72);N=0,"PHhmsf".split("").forEach(A=>w(De[A]));const oe=!j(23)&&j(47),Re=(pe?"YD":ae?"XxwF":Ve?"XWF":"YMD")+(oe?"Phmsf":"Hmsf"),Ke=this.environment.timestamp;let Oe=!1,Ce=!1;if(Re.split("").forEach(A=>{if(typeof De[A]>"u")Oe?(De[A]="MDd".indexOf(A)!==-1?1:0,Ce=!0):De[A]=ue(Ke,A);else if(Oe=!0,Ce)throw{code:"D3136"}}),De.M>0?De.M-=1:De.M=0,pe){const A=Date.UTC(De.Y,0),x=(De.d-1)*1e3*60*60*24,L=new Date(A+x);De.M=L.getUTCMonth(),De.D=L.getUTCDate()}if(ae)throw{code:"D3136"};if(Ve)throw{code:"D3136"};oe&&(De.H=De.h===12?0:De.h,De.P===1&&(De.H+=12));var fe=Date.UTC(De.Y,De.M,De.D,De.H,De.m,De.s,De.f);return(De.Z||De.z)&&(fe-=(De.Z||De.z)*60*1e3),fe}}var Be=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 ie(z,q){if(!(typeof z>"u"))if(typeof q>"u"){if(!Be.test(z))throw{stack:new Error().stack,code:"D3110",value:z};return Date.parse(z)}else return we.call(this,z,q)}function ce(z,q,W){if(!(typeof z>"u"))return ke.call(this,z,q,W)}return{formatInteger:T,parseInteger:H,fromMillis:ce,toMillis:ie}})();n.exports=a},{"./utils":6}],2:[function(t,n,r){(function(s){(function(){var a=t("./utils");const o=(()=>{var l=a.isNumeric,c=a.isArrayOfStrings,h=a.isArrayOfNumbers,u=a.isSequence,f=a.isFunction,d=a.isLambda,_=a.isPromise,b=a.getFunctionArity,g=a.isDeepEqual,m=a.stringToArray;function S(p){if(!(typeof p>"u")){var v=0;return p.forEach(function(E){v+=E}),v}}function y(p){return typeof p>"u"?0:p.length}function M(p){if(!(typeof p>"u"||p.length===0))return Math.max.apply(Math,p)}function T(p){if(!(typeof p>"u"||p.length===0))return Math.min.apply(Math,p)}function R(p){if(!(typeof p>"u"||p.length===0)){var v=0;return p.forEach(function(E){v+=E}),v/p.length}}function k(p,v=!1){if(!(typeof p>"u")){var E;if(typeof p=="string")E=p;else if(f(p))E="";else{if(typeof p=="number"&&!isFinite(p))throw{code:"D3001",value:p,stack:new Error().stack};var I=v?2:0;Array.isArray(p)&&p.outerWrapper&&(p=p[0]),E=JSON.stringify(p,function(F,X){return typeof X<"u"&&X!==null&&l(X)?X.toPrecision&&!Number.isInteger(X)?Number(X.toPrecision(15)):X:X&&f(X)?"":X},I)}return E}}function B(p,v,E){if(!(typeof p>"u")){var I=m(p),F=I.length;if(F+v<0&&(v=0),typeof E<"u"){if(E<=0)return"";var X=v>=0?v+E:F+v+E;return I.slice(v,X).join("")}return I.slice(v).join("")}}function C(p,v){if(!(typeof p>"u")){var E=p.indexOf(v);return E>-1?p.substr(0,E):p}}function D(p,v){if(!(typeof p>"u")){var E=p.indexOf(v);return E>-1?p.substr(E+v.length):p}}function V(p){if(!(typeof p>"u"))return p.toLowerCase()}function K(p){if(!(typeof p>"u"))return p.toUpperCase()}function J(p){if(!(typeof p>"u"))return m(p).length}function se(p){if(!(typeof p>"u")){var v=p.replace(/[ \t\n\r]+/gm," ");return v.charAt(0)===" "&&(v=v.substring(1)),v.charAt(v.length-1)===" "&&(v=v.substring(0,v.length-1)),v}}function he(p,v,E){if(!(typeof p>"u")){(typeof E>"u"||E.length===0)&&(E=" ");var I;v=Math.trunc(v);var F=Math.abs(v)-J(p);if(F>0){var X=new Array(F+1).join(E);E.length>1&&(X=B(X,0,F)),v>0?I=p+X:I=X+p}else I=p;return I}}async function Q(p,v){var E=p.apply(this,[v]);if(_(E)&&(E=await E),E&&!(typeof E.start=="number"||E.end==="number"||Array.isArray(E.groups)||f(E.next)))throw{code:"T1010",stack:new Error().stack};return E}async function de(p,v){if(!(typeof p>"u"||typeof v>"u")){var E;if(typeof v=="string")E=p.indexOf(v)!==-1;else{var I=await Q(v,p);E=typeof I<"u"}return E}}async function ne(p,v,E){if(!(typeof p>"u")){if(E<0)throw{stack:new Error().stack,value:E,code:"D3040",index:3};var I=this.createSequence();if(typeof E>"u"||E>0){var F=0,X=await Q(v,p);if(typeof X<"u")for(;typeof X<"u"&&(typeof E>"u"||F<E);)I.push({match:X.match,index:X.start,groups:X.groups}),X=await Q(X.next),F++}return I}}async function ue(p,v,E,I){if(!(typeof p>"u")){var F=this;if(v==="")throw{code:"D3010",stack:new Error().stack,value:v,index:2};if(I<0)throw{code:"D3011",stack:new Error().stack,value:I,index:4};var X;typeof E=="string"?X=function(yt){for(var wt="",ft=0,Tt=E.indexOf("$",ft);Tt!==-1&&ft<E.length;){wt+=E.substring(ft,Tt),ft=Tt+1;var sn=E.charAt(ft);if(sn==="$")wt+="$",ft++;else if(sn==="0")wt+=yt.match,ft++;else{var Lt;if(yt.groups.length===0?Lt=1:Lt=Math.floor(Math.log(yt.groups.length)*Math.LOG10E)+1,Tt=parseInt(E.substring(ft,ft+Lt),10),Lt>1&&Tt>yt.groups.length&&(Tt=parseInt(E.substring(ft,ft+Lt-1),10)),isNaN(Tt))wt+="$";else{if(yt.groups.length>0){var dn=yt.groups[Tt-1];typeof dn<"u"&&(wt+=dn)}ft+=Tt.toString().length}}Tt=E.indexOf("$",ft)}return wt+=E.substring(ft),wt}:X=E;var me="",ve=0;if(typeof I>"u"||I>0){var Ye=0;if(typeof v=="string"){for(var Ne=p.indexOf(v,ve);Ne!==-1&&(typeof I>"u"||Ye<I);)me+=p.substring(ve,Ne),me+=E,ve=Ne+v.length,Ye++,Ne=p.indexOf(v,ve);me+=p.substring(ve)}else{var mt=await Q(v,p);if(typeof mt<"u"){for(;typeof mt<"u"&&(typeof I>"u"||Ye<I);){me+=p.substring(ve,mt.start);var ut=X.apply(F,[mt]);if(_(ut)&&(ut=await ut),typeof ut=="string")me+=ut;else throw{code:"D3012",stack:new Error().stack,value:ut};ve=mt.start+mt.match.length,Ye++,mt=await Q(mt.next)}me+=p.substring(ve)}else me=p}}else me=p;return me}}function Te(p){if(!(typeof p>"u")){var v=typeof window<"u"?window.btoa:function(E){return new s.Buffer.from(E,"binary").toString("base64")};return v(p)}}function ke(p){if(!(typeof p>"u")){var v=typeof window<"u"?window.atob:function(E){return new s.Buffer.from(E,"base64").toString("binary")};return v(p)}}function O(p){if(!(typeof p>"u")){var v;try{v=encodeURIComponent(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"encodeUrlComponent"}}return v}}function H(p){if(!(typeof p>"u")){var v;try{v=encodeURI(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"encodeUrl"}}return v}}function we(p){if(!(typeof p>"u")){var v;try{v=decodeURIComponent(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"decodeUrlComponent"}}return v}}function Be(p){if(!(typeof p>"u")){var v;try{v=decodeURI(p)}catch{throw{code:"D3140",stack:new Error().stack,value:p,functionName:"decodeUrl"}}return v}}async function ie(p,v,E){if(!(typeof p>"u")){if(E<0)throw{code:"D3020",stack:new Error().stack,value:E,index:3};var I=[];if(typeof E>"u"||E>0)if(typeof v=="string")I=p.split(v,E);else{var F=0,X=await Q(v,p);if(typeof X<"u"){for(var me=0;typeof X<"u"&&(typeof E>"u"||F<E);)I.push(p.substring(me,X.start)),me=X.end,X=await Q(X.next),F++;(typeof E>"u"||F<E)&&I.push(p.substring(me))}else I.push(p)}return I}}function ce(p,v){if(!(typeof p>"u"))return typeof v>"u"&&(v=""),p.join(v)}function z(p,v,E){if(!(typeof p>"u")){var I={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},F=I;typeof E<"u"&&a.keys(E).forEach(function(ge){F[ge]=E[ge]});for(var X=[],me=F["zero-digit"].charCodeAt(0),ve=me;ve<me+10;ve++)X.push(String.fromCharCode(ve));var Ye=X.concat([F["decimal-separator"],F["exponent-separator"],F["grouping-separator"],F.digit,F["pattern-separator"]]),Ne=v.split(F["pattern-separator"]);if(Ne.length>2)throw{code:"D3080",stack:new Error().stack};var mt=function(ge){var Ue=(function(){for(var tt,Qe=0;Qe<ge.length;Qe++)if(tt=ge.charAt(Qe),Ye.indexOf(tt)!==-1&&tt!==F["exponent-separator"])return ge.substring(0,Qe);return""})(),He=(function(){for(var tt,Qe=ge.length-1;Qe>=0;Qe--)if(tt=ge.charAt(Qe),Ye.indexOf(tt)!==-1&&tt!==F["exponent-separator"])return ge.substring(Qe+1);return""})(),Pe=ge.substring(Ue.length,ge.length-He.length),Ze,lt,ct,gt,rt=ge.indexOf(F["exponent-separator"],Ue.length);rt===-1||rt>ge.length-He.length?(Ze=Pe,lt=void 0):(Ze=Pe.substring(0,rt),lt=Pe.substring(rt+1));var Ge=Ze.indexOf(F["decimal-separator"]);return Ge===-1?(ct=Ze,gt=He):(ct=Ze.substring(0,Ge),gt=Ze.substring(Ge+1)),{prefix:Ue,suffix:He,activePart:Pe,mantissaPart:Ze,exponentPart:lt,integerPart:ct,fractionalPart:gt,subpicture:ge}},ut=function(ge){var Ue,He,Pe=ge.subpicture,Ze=Pe.indexOf(F["decimal-separator"]);Ze!==Pe.lastIndexOf(F["decimal-separator"])&&(Ue="D3081"),Pe.indexOf(F.percent)!==Pe.lastIndexOf(F.percent)&&(Ue="D3082"),Pe.indexOf(F["per-mille"])!==Pe.lastIndexOf(F["per-mille"])&&(Ue="D3083"),Pe.indexOf(F.percent)!==-1&&Pe.indexOf(F["per-mille"])!==-1&&(Ue="D3084");var lt=!1;for(He=0;He<ge.mantissaPart.length;He++){var ct=ge.mantissaPart.charAt(He);if(X.indexOf(ct)!==-1||ct===F.digit){lt=!0;break}}lt||(Ue="D3085");var gt=ge.activePart.split("").map(function(tt){return Ye.indexOf(tt)===-1?"p":"a"}).join("");gt.indexOf("p")!==-1&&(Ue="D3086"),Ze!==-1?(Pe.charAt(Ze-1)===F["grouping-separator"]||Pe.charAt(Ze+1)===F["grouping-separator"])&&(Ue="D3087"):ge.integerPart.charAt(ge.integerPart.length-1)===F["grouping-separator"]&&(Ue="D3088"),Pe.indexOf(F["grouping-separator"]+F["grouping-separator"])!==-1&&(Ue="D3089");var rt=ge.integerPart.indexOf(F.digit);rt!==-1&&ge.integerPart.substring(0,rt).split("").filter(function(tt){return X.indexOf(tt)>-1}).length>0&&(Ue="D3090"),rt=ge.fractionalPart.lastIndexOf(F.digit),rt!==-1&&ge.fractionalPart.substring(rt).split("").filter(function(tt){return X.indexOf(tt)>-1}).length>0&&(Ue="D3091");var Ge=typeof ge.exponentPart=="string";if(Ge&&ge.exponentPart.length>0&&(Pe.indexOf(F.percent)!==-1||Pe.indexOf(F["per-mille"])!==-1)&&(Ue="D3092"),Ge&&(ge.exponentPart.length===0||ge.exponentPart.split("").filter(function(tt){return X.indexOf(tt)===-1}).length>0)&&(Ue="D3093"),Ue)throw{code:Ue,stack:new Error().stack}},yt=function(ge){var Ue=function(Rt,Gt){for(var Pn=[],_t=Rt.indexOf(F["grouping-separator"]);_t!==-1;){var $t=(Gt?Rt.substring(0,_t):Rt.substring(_t)).split("").filter(function(Bt){return X.indexOf(Bt)!==-1||Bt===F.digit}).length;Pn.push($t),_t=ge.integerPart.indexOf(F["grouping-separator"],_t+1)}return Pn},He=Ue(ge.integerPart),Pe=function(Rt){if(Rt.length===0)return 0;for(var Gt=function($t,Bt){return Bt===0?$t:Gt(Bt,$t%Bt)},Pn=Rt.reduce(Gt),_t=1;_t<=Rt.length;_t++)if(Rt.indexOf(_t*Pn)===-1)return 0;return Pn},Ze=Pe(He),lt=Ue(ge.fractionalPart,!0),ct=ge.integerPart.split("").filter(function(Rt){return X.indexOf(Rt)!==-1}).length,gt=ct,rt=ge.fractionalPart.split(""),Ge=rt.filter(function(Rt){return X.indexOf(Rt)!==-1}).length,tt=rt.filter(function(Rt){return X.indexOf(Rt)!==-1||Rt===F.digit}).length,Qe=typeof ge.exponentPart=="string";ct===0&&tt===0&&(Qe?(Ge=1,tt=1):ct=1),Qe&&ct===0&&ge.integerPart.indexOf(F.digit)!==-1&&(ct=1),ct===0&&Ge===0&&(Ge=1);var Kt=0;return Qe&&(Kt=ge.exponentPart.split("").filter(function(Rt){return X.indexOf(Rt)!==-1}).length),{integerPartGroupingPositions:He,regularGrouping:Ze,minimumIntegerPartSize:ct,scalingFactor:gt,prefix:ge.prefix,fractionalPartGroupingPositions:lt,minimumFactionalPartSize:Ge,maximumFactionalPartSize:tt,minimumExponentSize:Kt,suffix:ge.suffix,picture:ge.subpicture}},wt=Ne.map(mt);wt.forEach(ut);var ft=wt.map(yt),Tt=F["minus-sign"],sn=F["zero-digit"],Lt=F["decimal-separator"],dn=F["grouping-separator"];ft.length===1&&(ft.push(JSON.parse(JSON.stringify(ft[0]))),ft[1].prefix=Tt+ft[1].prefix);var At;p>=0?At=ft[0]:At=ft[1];var zi;At.picture.indexOf(F.percent)!==-1?zi=p*100:At.picture.indexOf(F["per-mille"])!==-1?zi=p*1e3:zi=p;var Vn,Mi;if(At.minimumExponentSize===0)Vn=zi;else{var _c=Math.pow(10,At.scalingFactor),vc=Math.pow(10,At.scalingFactor-1);if(Vn=zi,Mi=0,Vn!==0){for(;Math.abs(Vn)<vc;)Vn*=10,Mi-=1;for(;Math.abs(Vn)>_c;)Vn/=10,Mi+=1}}var yc=ee(Vn,At.maximumFactionalPartSize),P=function(ge,Ue){var He=Math.abs(ge).toFixed(Ue);return sn!=="0"&&(He=He.split("").map(function(Pe){return Pe>="0"&&Pe<="9"?X[Pe.charCodeAt(0)-48]:Pe}).join("")),He},G=P(yc,At.maximumFactionalPartSize),Z=G.indexOf(".");for(Z===-1?G=G+Lt:G=G.replace(".",Lt);G.charAt(0)===sn;)G=G.substring(1);for(;G.charAt(G.length-1)===sn;)G=G.substring(0,G.length-1);Z=G.indexOf(Lt);var te=At.minimumIntegerPartSize-Z,Y=At.minimumFactionalPartSize-(G.length-Z-1);if(G=(te>0?new Array(te+1).join(sn):"")+G,G=G+(Y>0?new Array(Y+1).join(sn):""),Z=G.indexOf(Lt),At.regularGrouping>0)for(var Ee=Math.floor((Z-1)/At.regularGrouping),Le=1;Le<=Ee;Le++)G=[G.slice(0,Z-Le*At.regularGrouping),dn,G.slice(Z-Le*At.regularGrouping)].join("");else At.integerPartGroupingPositions.forEach(function(ge){G=[G.slice(0,Z-ge),dn,G.slice(Z-ge)].join(""),Z++});if(Z=G.indexOf(Lt),At.fractionalPartGroupingPositions.forEach(function(ge){G=[G.slice(0,ge+Z+1),dn,G.slice(ge+Z+1)].join("")}),Z=G.indexOf(Lt),(At.picture.indexOf(Lt)===-1||Z===G.length-1)&&(G=G.substring(0,G.length-1)),typeof Mi<"u"){var Fe=P(Mi,0);te=At.minimumExponentSize-Fe.length,te>0&&(Fe=new Array(te+1).join(sn)+Fe),G=G+F["exponent-separator"]+(Mi<0?Tt:"")+Fe}return G=At.prefix+G+At.suffix,G}}function q(p,v){if(!(typeof p>"u")){if(p=ee(p),typeof v>"u"?v=10:v=ee(v),v<2||v>36)throw{code:"D3100",stack:new Error().stack,value:v};var E=p.toString(v);return E}}function W(p){var v;if(!(typeof p>"u")){if(typeof p=="number")v=p;else if(typeof p=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(p)&&!isNaN(parseFloat(p))&&isFinite(p))v=parseFloat(p);else if(typeof p=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(p))v=Number(p);else if(p===!0)v=1;else if(p===!1)v=0;else throw{code:"D3030",value:p,stack:new Error().stack,index:1};return v}}function le(p){var v;if(!(typeof p>"u"))return v=Math.abs(p),v}function be(p){var v;if(!(typeof p>"u"))return v=Math.floor(p),v}function U(p){var v;if(!(typeof p>"u"))return v=Math.ceil(p),v}function ee(p,v){var E;if(!(typeof p>"u")){if(v){var I=p.toString().split("e");p=+(I[0]+"e"+(I[1]?+I[1]+v:v))}E=Math.round(p);var F=E-p;return Math.abs(F)===.5&&Math.abs(E%2)===1&&(E=E-1),v&&(I=E.toString().split("e"),E=+(I[0]+"e"+(I[1]?+I[1]-v:-v))),Object.is(E,-0)&&(E=0),E}}function fe(p){var v;if(!(typeof p>"u")){if(p<0)throw{stack:new Error().stack,code:"D3060",index:1,value:p};return v=Math.sqrt(p),v}}function ye(p,v){var E;if(!(typeof p>"u")){if(E=Math.pow(p,v),!isFinite(E))throw{stack:new Error().stack,code:"D3061",index:1,value:p,exp:v};return E}}function Se(){return Math.random()}function ze(p){if(!(typeof p>"u")){var v=!1;if(Array.isArray(p)){if(p.length===1)v=ze(p[0]);else if(p.length>1){var E=p.filter(function(I){return ze(I)});v=E.length>0}}else typeof p=="string"?p.length>0&&(v=!0):l(p)?p!==0&&(v=!0):p!==null&&typeof p=="object"&&!f(p)?a.keys(p).length>0&&(v=!0):typeof p=="boolean"&&p===!0&&(v=!0);return v}}function _e(p){if(!(typeof p>"u"))return!ze(p)}function xe(p,v,E,I){var F=[v],X=b(p);return X>=2&&F.push(E),X>=3&&F.push(I),F}async function qe(p,v){if(!(typeof p>"u")){for(var E=this.createSequence(),I=0;I<p.length;I++){var F=xe(v,p[I],I,p),X=await v.apply(this,F);typeof X<"u"&&E.push(X)}return E}}async function De(p,v){if(!(typeof p>"u")){for(var E=this.createSequence(),I=0;I<p.length;I++){var F=p[I],X=xe(v,F,I,p),me=await v.apply(this,X);ze(me)&&E.push(F)}return E}}async function N(p,v){if(!(typeof p>"u")){for(var E=!1,I,F=0;F<p.length;F++){var X=p[F],me=!0;if(typeof v<"u"){var ve=xe(v,X,F,p),Ye=await v.apply(this,ve);me=ze(Ye)}if(me)if(!E)I=X,E=!0;else throw{stack:new Error().stack,code:"D3138",index:F}}if(!E)throw{stack:new Error().stack,code:"D3139"};return I}}function w(){for(var p=[],v=Array.prototype.slice.call(arguments),E=Math.min.apply(Math,v.map(function(X){return Array.isArray(X)?X.length:0})),I=0;I<E;I++){var F=v.map(X=>X[I]);p.push(F)}return p}async function j(p,v,E){if(!(typeof p>"u")){var I,F=b(v);if(F<2)throw{stack:new Error().stack,code:"D3050",index:1};var X;for(typeof E>"u"&&p.length>0?(I=p[0],X=1):(I=E,X=0);X<p.length;){var me=[I,p[X]];F>=3&&me.push(X),F>=4&&me.push(p),I=await v.apply(this,me),X++}return I}}function re(p){var v=this.createSequence();if(Array.isArray(p)){for(var E=Object.create(null),I=0;I<p.length;I++){var F=re.call(this,p[I]);F.forEach(function(X){E[X]=!0})}v=re.call(this,E)}else p!==null&&typeof p=="object"&&!f(p)&&a.keys(p).forEach(X=>v.push(X));return v}function pe(p,v){var E;if(Array.isArray(p)){E=this.createSequence();for(var I=0;I<p.length;I++){var F=pe.call(this,p[I],v);typeof F<"u"&&(Array.isArray(F)?F.forEach(X=>E.push(X)):E.push(F))}}else p!==null&&typeof p=="object"&&Object.prototype.hasOwnProperty.call(p,v)&&!f(p)&&(E=p[v]);return E}function ae(p,v){if(typeof p>"u")return v;if(typeof v>"u")return p;Array.isArray(p)||(p=this.createSequence(p)),Array.isArray(v)||(v=[v]);const E=p.length+v.length;if(this.options&&E>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:E};return p.concat(v)}function Ve(p){return!(typeof p>"u")}function Ae(p){var v=this.createSequence();if(Array.isArray(p))for(var E=0;E<p.length;E++)v=ae.call(this,v,Ae.call(this,p[E]));else if(p!==null&&typeof p=="object"&&!d(p))for(const F of a.keys(p)){var I=Object.create(null);I[F]=p[F],v.push(I)}else v=p;return v}function oe(p){if(!(typeof p>"u")){var v=Object.create(null);return p.forEach(function(E){for(const I of a.keys(E))v[I]=E[I]}),v}}function We(p){if(!(typeof p>"u")){if(p.length<=1)return p;for(var v=p.length,E=new Array(v),I=0;I<v;I++)E[v-I-1]=p[I];return E}}async function Me(p,v){var E=this.createSequence();for(const X of a.keys(p)){var I=xe(v,p[X],X,p),F=await v.apply(this,I);typeof F<"u"&&E.push(F)}return E}function Re(p){throw{code:"D3137",stack:new Error().stack,message:p||"$error() function evaluated"}}function Ke(p,v){if(!p)throw{code:"D3141",stack:new Error().stack,message:v||"$assert() statement failed"}}function Oe(p){if(p!==void 0)return p===null?"null":l(p)?"number":typeof p=="string"?"string":typeof p=="boolean"?"boolean":Array.isArray(p)?"array":f(p)?"function":"object"}async function Ce(p,v){if(!(typeof p>"u")){if(p.length<=1)return p;var E;if(typeof v>"u"){if(!h(p)&&!c(p))throw{stack:new Error().stack,code:"D3070",index:1};E=async function(me,ve){return me>ve}}else E=v;var I=async function(me,ve){var Ye=async function(mt,ut,yt){ut.length===0?Array.prototype.push.apply(mt,yt):yt.length===0?Array.prototype.push.apply(mt,ut):await E(ut[0],yt[0])?(mt.push(yt[0]),await Ye(mt,ut,yt.slice(1))):(mt.push(ut[0]),await Ye(mt,ut.slice(1),yt))},Ne=[];return await Ye(Ne,me,ve),Ne},F=async function(me){if(!Array.isArray(me)||me.length<=1)return me;var ve=Math.floor(me.length/2),Ye=me.slice(0,ve),Ne=me.slice(ve);return Ye=await F(Ye),Ne=await F(Ne),await I(Ye,Ne)},X=await F(p);return X}}function A(p){if(!(typeof p>"u")){if(p.length<=1)return p;for(var v=new Array(p.length),E=0;E<p.length;E++){var I=Math.floor(Math.random()*(E+1));E!==I&&(v[E]=v[I]),v[I]=p[E]}return v}}function x(p){if(!(typeof p>"u")){if(!Array.isArray(p)||p.length<=1)return p;for(var v=u(p)?this.createSequence():[],E=0;E<p.length;E++){for(var I=p[E],F=!1,X=0;X<v.length;X++)if(g(I,v[X])){F=!0;break}F||v.push(I)}return v}}async function L(p,v){var E=Object.create(null);for(const me of a.keys(p)){var I=p[me],F=xe(v,I,me,p),X=await v.apply(this,F);ze(X)&&(E[me]=I)}return a.keys(E).length===0&&(E=void 0),E}return{sum:S,count:y,max:M,min:T,average:R,string:k,substring:B,substringBefore:C,substringAfter:D,lowercase:V,uppercase:K,length:J,trim:se,pad:he,match:ne,contains:de,replace:ue,split:ie,join:ce,formatNumber:z,formatBase:q,number:W,floor:be,ceil:U,round:ee,abs:le,sqrt:fe,power:ye,random:Se,boolean:ze,not:_e,map:qe,zip:w,filter:De,single:N,foldLeft:j,sift:L,keys:re,lookup:pe,append:ae,exists:Ve,spread:Ae,merge:oe,reverse:We,each:Me,error:Re,assert:Ke,type:Oe,sort:Ce,shuffle:A,distinct:x,base64encode:Te,base64decode:ke,encodeUrlComponent:O,encodeUrl:H,decodeUrlComponent:we,decodeUrl:Be}})();n.exports=o}).call(this)}).call(this,typeof Df<"u"?Df:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,n,r){var s=t("./datetime"),a=t("./functions"),o=t("./utils"),l=t("./parser"),c=t("./signature"),h=(function(){var u=o.isNumeric,f=o.isArrayOfStrings,d=o.isArrayOfNumbers,_=o.isSequence,b=o.isFunction,g=o.isLambda,m=o.isIterable,S=o.isPromise,y=o.getFunctionArity,M=o.isDeepEqual,T=Re(null);async function R(A,x,L){var p;L.base.depth++,L.base.guardrails();var v=L.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(v&&await v(A,x,L),A.type){case"path":p=await k(A,x,L);break;case"binary":p=await J(A,x,L);break;case"unary":p=await se(A,x,L);break;case"name":p=he(A,x,L);break;case"string":case"number":case"value":p=Q(A);break;case"wildcard":p=de(A,x,L);break;case"descendant":p=ue(A,x,L);break;case"parent":p=L.lookup(A.slot.label);break;case"condition":p=await be(A,x,L);break;case"block":p=await U(A,x,L);break;case"bind":p=await le(A,x,L);break;case"regex":p=ee(A,x,L);break;case"function":p=await xe(A,x,L);break;case"variable":p=fe(A,x,L);break;case"lambda":p=N(A,x,L);break;case"partial":p=await w(A,x,L);break;case"apply":p=await _e(A,x,L);break;case"transform":p=Se(A,x,L);break}if(Object.prototype.hasOwnProperty.call(A,"predicate"))for(var E=0;E<A.predicate.length;E++)p=await K(A.predicate[E].expr,p,L);A.type!=="path"&&Object.prototype.hasOwnProperty.call(A,"group")&&(p=await z(A.group,p,L));var I=L.lookup(Symbol.for("jsonata.__evaluate_exit"));return I&&await I(A,x,L,p),p&&_(p)&&!p.tupleStream&&(A.keepArray&&(p.keepSingleton=!0),p.length===0?p=void 0:p.length===1&&(p=p.keepSingleton?p:p[0])),L.base.depth--,p}async function k(A,x,L){var p;Array.isArray(x)&&A.steps[0].type!=="variable"?p=x:p=L.base.createSequence(x);for(var v,E=!1,I=void 0,F=0;F<A.steps.length;F++){var X=A.steps[F];if(X.tuple&&(E=!0),F===0&&X.consarray?v=await R(X,p,L):E?I=await V(X,p,I,L):v=await C(X,p,L,F===A.steps.length-1),!E&&(typeof v>"u"||v.length===0))break;typeof X.focus>"u"&&(p=v)}if(E)if(A.tuple)v=I;else for(v=L.base.createSequence(),F=0;F<I.length;F++)v.push(I[F]["@"]);return A.keepSingletonArray&&(Array.isArray(v)&&v.cons&&!v.sequence&&(v=L.base.createSequence(v)),v.keepSingleton=!0),Object.prototype.hasOwnProperty.call(A,"group")&&(v=await z(A.group,E?I:v,L)),v}function B(A,x){var L=Re(A);for(const p of o.keys(x))L.bind(p,x[p]);return L}async function C(A,x,L,p){var v;if(A.type==="sort")return v=await ye(A,x,L),A.stages&&(v=await D(A.stages,v,L)),v;v=L.base.createSequence();for(var E=0;E<x.length;E++){var I=await R(A,x[E],L);if(A.stages)for(var F=0;F<A.stages.length;F++)I=await K(A.stages[F].expr,I,L);typeof I<"u"&&v.push(I)}var X=L.base.createSequence();return p&&v.length===1&&Array.isArray(v[0])&&!_(v[0])?X=v[0]:Array.prototype.forEach.call(v,function(me){!Array.isArray(me)||me.cons?X.push(me):Array.prototype.forEach.call(me,ve=>X.push(ve))}),X}async function D(A,x,L){for(var p=x,v=0;v<A.length;v++){var E=A[v];switch(E.type){case"filter":p=await K(E.expr,p,L);break;case"index":for(var I=0;I<p.length;I++){var F=p[I];F[E.value]=I}break}}return p}async function V(A,x,L,p){var v;if(A.type==="sort"){if(L)v=await ye(A,L,p);else{var E=await ye(A,x,p);v=p.base.createSequence(),v.tupleStream=!0;for(var I=0;I<E.length;I++){var F={"@":E[I]};F[A.index]=I,v.push(F)}}return A.stages&&(v=await D(A.stages,v,p)),v}v=p.base.createSequence(),v.tupleStream=!0;var X=p;L===void 0&&(L=x.map(Ne=>({"@":Ne})));for(var me=0;me<L.length;me++){X=B(p,L[me]);var ve=await R(A,L[me]["@"],X);if(typeof ve<"u"){Array.isArray(ve)||(ve=[ve]);for(var Ye=0;Ye<ve.length;Ye++)F=Object.create(null),Object.assign(F,L[me]),ve.tupleStream?Object.assign(F,ve[Ye]):(A.focus?(F[A.focus]=ve[Ye],F["@"]=L[me]["@"]):F["@"]=ve[Ye],A.index&&(F[A.index]=Ye),A.ancestor&&(F[A.ancestor.label]=L[me]["@"])),v.push(F)}}return A.stages&&(v=await D(A.stages,v,p)),v}async function K(A,x,L){var p=L.base.createSequence();if(x&&x.tupleStream&&(p.tupleStream=!0),Array.isArray(x)||(x=L.base.createSequence(x)),A.type==="number"){var v=Math.floor(A.value);v<0&&(v=x.length+v);var E=await x[v];typeof E<"u"&&(Array.isArray(E)?p=E:p.push(E))}else for(v=0;v<x.length;v++){var E=x[v],I=E,F=L;x.tupleStream&&(I=E["@"],F=B(L,E));var X=await R(A,I,F);u(X)&&(X=[X]),d(X)?Array.prototype.forEach.call(X,function(ve){var Ye=Math.floor(ve);Ye<0&&(Ye=x.length+Ye),Ye===v&&p.push(E)}):a.boolean(X)&&p.push(E)}return p}async function J(A,x,L){var p,v=await R(A.lhs,x,L),E=A.value,I=async()=>await R(A.rhs,x,L);if(E==="and"||E==="or")try{return await Be(v,I,E)}catch(X){throw X.position=A.position,X.token=E,X}var F=await I();try{switch(E){case"+":case"-":case"*":case"/":case"%":p=ke(v,F,E);break;case"=":case"!=":p=O(v,F,E);break;case"<":case"<=":case">":case">=":p=H(v,F,E);break;case"&":p=ce(v,F);break;case"..":p=W(v,F,L);break;case"in":p=we(v,F);break}}catch(X){throw X.position=A.position,X.token=E,X}return p}async function se(A,x,L){var p,v={options:L.base.options,createSequence:L.base.createSequence};switch(A.value){case"-":if(p=await R(A.expression,x,L),typeof p>"u")p=void 0;else if(u(p))p=-p;else throw{code:"D1002",stack:new Error().stack,position:A.position,token:A.value,value:p};break;case"[":p=[];let F=await Promise.all(A.expressions.map(async(X,me)=>(L.isParallelCall=me>0,[X,await R(X,x,L)])));for(let X of F){var[E,I]=X;typeof I<"u"&&(E.value==="["?p.push(I):p=a.append.call(v,p,I))}A.consarray&&Object.defineProperty(p,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":p=await z(A,x,L);break}return p}function he(A,x,L){var p={createSequence:L.base.createSequence};return a.lookup.call(p,x,A.value)}function Q(A){return A.value}function de(A,x,L){var p={options:L.base.options,createSequence:L.base.createSequence},v=p.createSequence();return Array.isArray(x)&&x.outerWrapper&&x.length>0&&(x=x[0]),x!==null&&typeof x=="object"&&!b(x)&&o.keys(x).forEach(function(E){var I=x[E];Array.isArray(I)?(I=ne(I),v=a.append.call(p,v,I)):v.push(I)}),v}function ne(A,x){return typeof x>"u"&&(x=[]),Array.isArray(A)?Array.prototype.forEach.call(A,function(L){ne(L,x)}):x.push(A),x}function ue(A,x,L){var p,v=L.base.createSequence();return typeof x<"u"&&(Te(x,v),v.length===1?p=v[0]:p=v),p}function Te(A,x){Array.isArray(A)||x.push(A),Array.isArray(A)?Array.prototype.forEach.call(A,function(L){Te(L,x)}):A!==null&&typeof A=="object"&&!b(A)&&o.keys(A).forEach(function(L){Te(A[L],x)})}function ke(A,x,L){var p;if(typeof A<"u"&&!u(A))throw{code:"T2001",stack:new Error().stack,value:A};if(typeof x<"u"&&!u(x))throw{code:"T2002",stack:new Error().stack,value:x};if(typeof A>"u"||typeof x>"u")return p;switch(L){case"+":p=A+x;break;case"-":p=A-x;break;case"*":p=A*x;break;case"/":p=A/x;break;case"%":p=A%x;break}return p}function O(A,x,L){var p,v=typeof A,E=typeof x;if(v==="undefined"||E==="undefined")return!1;switch(L){case"=":p=M(A,x);break;case"!=":p=!M(A,x);break}return p}function H(A,x,L){var p,v=typeof A,E=typeof x,I=v==="undefined"||v==="string"||v==="number",F=E==="undefined"||E==="string"||E==="number";if(!I||!F)throw{code:"T2010",stack:new Error().stack,value:v==="string"||v==="number"?x:A};if(!(v==="undefined"||E==="undefined")){if(v!==E)throw{code:"T2009",stack:new Error().stack,value:A,value2:x};switch(L){case"<":p=A<x;break;case"<=":p=A<=x;break;case">":p=A>x;break;case">=":p=A>=x;break}return p}}function we(A,x){var L=!1;if(typeof A>"u"||typeof x>"u")return!1;Array.isArray(x)||(x=[x]);for(var p=0;p<x.length;p++)if(x[p]===A){L=!0;break}return L}async function Be(A,x,L){var p,v=ie(A);switch(L){case"and":p=v&&ie(await x());break;case"or":p=v||ie(await x());break}return p}function ie(A){var x=a.boolean(A);return typeof x>"u"?!1:x}function ce(A,x){var L,p="",v="";return typeof A<"u"&&(p=a.string(A)),typeof x<"u"&&(v=a.string(x)),L=p.concat(v),L}async function z(A,x,L){var p=Object.create(null),v=Object.create(null),E=!!(x&&x.tupleStream),I={options:L.base.options,createSequence:L.base.createSequence};Array.isArray(x)||(L.base.options,x=I.createSequence(x)),x.length===0&&!E&&x.push(void 0);for(var F=0;F<x.length;F++)for(var X=x[F],me=E?B(L,X):L,ve=0;ve<A.lhs.length;ve++){var Ye=A.lhs[ve],Ne=await R(Ye[0],E?X["@"]:X,me);if(typeof Ne!="string"&&Ne!==void 0)throw{code:"T1003",stack:new Error().stack,position:A.position,value:Ne};if(Ne!==void 0){if(Ne==="_jsonata_lambda"||Ne==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:A.position,value:Ne};var mt={data:X,exprIndex:ve};if(Object.prototype.hasOwnProperty.call(v,Ne)){if(v[Ne].exprIndex!==ve)throw{code:"D1009",stack:new Error().stack,position:A.position,value:Ne};v[Ne].data=a.append.call(I,v[Ne].data,X)}else v[Ne]=mt}}let ut=await Promise.all(o.keys(v).map(async(wt,ft)=>{let Tt=v[wt];var sn=Tt.data,Lt=L;if(E){var dn=q(Tt.data,L);sn=dn["@"],delete dn["@"],Lt=B(L,dn)}return L.isParallelCall=ft>0,[wt,await R(A.lhs[Tt.exprIndex][1],sn,Lt)]}));for(let wt of ut){var[Ne,yt]=await wt;typeof yt<"u"&&(p[Ne]=yt)}return p}function q(A,x){if(!Array.isArray(A))return A;var L=Object.create(null),p={options:x.base.options,createSequence:x.base.createSequence};Object.assign(L,A[0]);for(var v=1;v<A.length;v++)for(const E of o.keys(A[v]))L[E]=a.append.call(p,L[E],A[v][E]);return L}function W(A,x,L){var p;if(typeof A<"u"&&!Number.isInteger(A))throw{code:"T2003",stack:new Error().stack,value:A};if(typeof x<"u"&&!Number.isInteger(x))throw{code:"T2004",stack:new Error().stack,value:x};if(typeof A>"u"||typeof x>"u"||A>x)return p;var v=x-A+1;if(v>1e7)throw{code:"D2014",stack:new Error().stack,value:v};if(L.base.options&&v>L.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:v};p=new Array(v);for(var E=A,I=0;E<=x;E++,I++)p[I]=E;return p.sequence=!0,p}async function le(A,x,L){var p=await R(A.rhs,x,L);return L.bind(A.lhs.value,p),p}async function be(A,x,L){var p,v=await R(A.condition,x,L);return a.boolean(v)?p=await R(A.then,x,L):typeof A.else<"u"&&(p=await R(A.else,x,L)),p}async function U(A,x,L){for(var p,v=Re(L),E=0;E<A.expressions.length;E++)p=await R(A.expressions[E],x,v);return p}function ee(A,x,L){var p=new L.base.RegexEngine(A.value),v=function(E,I){var F;p.lastIndex=I||0;var X=p.exec(E);if(X!==null){if(F={match:X[0],start:X.index,end:X.index+X[0].length,groups:[]},X.length>1)for(var me=1;me<X.length;me++)F.groups.push(X[me]);F.next=function(){if(!(p.lastIndex>=E.length)){var ve=v(E,p.lastIndex);if(ve&&ve.match==="")throw{code:"D1004",stack:new Error().stack,position:A.position,value:A.value.source};return ve}}}return F};return v}function fe(A,x,L){var p;return A.value===""?p=x&&x.outerWrapper?x[0]:x:p=L.lookup(A.value),p}async function ye(A,x,L){var p,v=x,E=!!x.tupleStream,I=async function(X,me){for(var ve=0,Ye=0;ve===0&&Ye<A.terms.length;Ye++){var Ne=A.terms[Ye],mt=X,ut=L;E&&(mt=X["@"],ut=B(L,X));var yt=await R(Ne.expression,mt,ut);mt=me,ut=L,E&&(mt=me["@"],ut=B(L,me));var wt=await R(Ne.expression,mt,ut),ft=typeof yt,Tt=typeof wt;if(ft==="undefined"){ve=Tt==="undefined"?0:1;continue}if(Tt==="undefined"){ve=-1;continue}if(!(ft==="string"||ft==="number")||!(Tt==="string"||Tt==="number"))throw{code:"T2008",stack:new Error().stack,position:A.position,value:ft==="string"||ft==="number"?wt:yt};if(ft!==Tt)throw{code:"T2007",stack:new Error().stack,position:A.position,value:yt,value2:wt};yt!==wt&&(yt<wt?ve=-1:ve=1,Ne.descending===!0&&(ve=-ve))}return ve===1},F={environment:L,input:x};return p=await a.sort.apply(F,[v,I]),p}function Se(A,x,L){var p=async function(v){if(!(typeof v>"u")){var E=L.lookup("clone");if(!b(E))throw{code:"T2013",stack:new Error().stack,position:A.position};var I=await qe(E,[v],null,L),F=await R(A.pattern,I,L);if(typeof F<"u"){Array.isArray(F)||(F=[F]);for(var X=0;X<F.length;X++){var me=F[X],ve=await R(A.update,me,L),Ye=typeof ve;if(Ye!=="undefined"){if(Ye!=="object"||ve===null||Array.isArray(ve))throw{code:"T2011",stack:new Error().stack,position:A.update.position,value:ve};for(const yt of o.keys(ve))me[yt]=ve[yt]}if(typeof A.delete<"u"){var Ne=await R(A.delete,me,L);if(typeof Ne<"u"){var mt=Ne;if(Array.isArray(Ne)||(Ne=[Ne]),!f(Ne))throw{code:"T2012",stack:new Error().stack,position:A.delete.position,value:mt};for(var ut=0;ut<Ne.length;ut++)typeof me=="object"&&me!==null&&delete me[Ne[ut]]}}}}return I}};return oe(p,"<(oa):o>")}var ze=l("function($f, $g) { function($x){ $g($f($x)) } }");async function _e(A,x,L){var p,v=await R(A.lhs,x,L);if(A.rhs.type==="function")p=await xe(A.rhs,x,L,{context:v});else{var E=await R(A.rhs,x,L);if(!b(E))throw{code:"T2006",stack:new Error().stack,position:A.position,value:E};if(b(v)){var I=await R(ze,null,L);p=await qe(I,[v,E],null,L)}else p=await qe(E,[v],null,L)}return p}async function xe(A,x,L,p){var v,E=await R(A.procedure,x,L);if(typeof E>"u"&&A.procedure.type==="path"&&L.lookup(A.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:A.position,token:A.procedure.steps[0].value};var I=[];typeof p<"u"&&I.push(p.context);for(var F=0;F<A.arguments.length;F++){const me=await R(A.arguments[F],x,L);if(b(me)){const ve=async function(...Ye){return await qe(me,Ye,null,L)};ve.arity=y(me),I.push(ve)}else I.push(me)}var X=A.procedure.type==="path"?A.procedure.steps[0].value:A.procedure.value;try{typeof E=="object"&&(E.token=X,E.position=A.position),v=await qe(E,I,x,L)}catch(me){throw me.position||(me.position=A.position),me.token||(me.token=X),me}return v}async function qe(A,x,L,p){var v;for(v=await De(A,x,L,p);g(v)&&v.thunk===!0;){var E=await R(v.body.procedure,v.input,v.environment);v.body.procedure.type==="variable"&&(E.token=v.body.procedure.value),E.position=v.body.procedure.position;for(var I=[],F=0;F<v.body.arguments.length;F++)I.push(await R(v.body.arguments[F],v.input,v.environment));v=await De(E,I,L,p)}return v}async function De(A,x,L,p){var v;try{var E=x;if(A&&(E=j(A.signature,x,L)),g(A))v=await re(A,E);else if(A&&A._jsonata_function===!0){var I={environment:p,input:L,options:p.base.options,createSequence:p.base.createSequence};v=A.implementation.apply(I,E),m(v)&&(v=v.next().value),S(v)&&(v=await v)}else if(typeof A=="function")v=A.apply(L,E),S(v)&&(v=await v);else throw{code:"T1006",stack:new Error().stack}}catch(F){throw A&&(typeof F.token>"u"&&typeof A.token<"u"&&(F.token=A.token),F.position=A.position||F.position),F}return v}function N(A,x,L){var p={_jsonata_lambda:!0,input:x,environment:L,arguments:A.arguments,signature:A.signature,body:A.body};return A.thunk===!0&&(p.thunk=!0),p.apply=async function(v,E){return await qe(p,E,x,v?v.environment:L)},p}async function w(A,x,L){for(var p,v=[],E=0;E<A.arguments.length;E++){var I=A.arguments[E];I.type==="operator"&&I.value==="?"?v.push(I):v.push(await R(I,x,L))}var F=await R(A.procedure,x,L);if(typeof F>"u"&&A.procedure.type==="path"&&L.lookup(A.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:A.position,token:A.procedure.steps[0].value};if(g(F))p=pe(F,v,L);else if(F&&F._jsonata_function===!0)p=ae(F.implementation,v,L);else if(typeof F=="function")p=ae(F,v,L);else throw{code:"T1008",stack:new Error().stack,position:A.position,token:A.procedure.type==="path"?A.procedure.steps[0].value:A.procedure.value};return p}function j(A,x,L){if(typeof A>"u")return x;var p=A.validate(x,L);return p}async function re(A,x){var L,p=Re(A.environment);return Array.prototype.forEach.call(A.arguments,function(v,E){p.bind(v.value,x[E])}),typeof A.body=="function"?L=await Ve(A.body,p):L=await R(A.body,A.input,p),L}function pe(A,x,L){var p=Re(A.environment||L),v=[];Array.prototype.forEach.call(A.arguments,function(I,F){var X=x[F];X&&X.type==="operator"&&X.value==="?"?v.push(I):p.bind(I.value,X)});var E={_jsonata_lambda:!0,input:A.input,environment:p,arguments:v,body:A.body};return E}function ae(A,x,L){var p=Ae(A);p=p.map(function(F){return"$"+F.trim()});var v="function("+p.join(", ")+"){ _ }",E=l(v);E.body=A;var I=pe(E,x,L);return I}async function Ve(A,x){var L=Ae(A),p=L.map(function(I){return x.lookup(I.trim())}),v={environment:x,createSequence:x.base.createSequence},E=A.apply(v,p);return S(E)&&(E=await E),E}function Ae(A){var x=A.toString(),L=/\(([^)]*)\)/.exec(x)[1],p=L.split(",");return p}function oe(A,x){var L={_jsonata_function:!0,implementation:A};return typeof x<"u"&&(L.signature=c(x)),L}async function We(A,x){if(!(typeof A>"u")){var L=this.input;typeof x<"u"&&(L=x,Array.isArray(L)&&!_(L)&&(L=this.createSequence(L),L.outerWrapper=!0));try{var p=l(A,!1)}catch(E){throw Oe(E),{stack:new Error().stack,code:"D3120",value:E.message,error:E}}try{var v=await R(p,L,this.environment)}catch(E){throw Oe(E),{stack:new Error().stack,code:"D3121",value:E.message,error:E}}return v}}function Me(A){if(!(typeof A>"u"))return JSON.parse(a.string(A))}function Re(A){var x=Object.create(null);const L={bind:function(v,E){x[v]=E},lookup:function(v){var E;return Object.prototype.hasOwnProperty.call(x,v)?E=x[v]:A&&(E=A.lookup(v)),E},timestamp:A?A.timestamp:null,async:A?A.async:!1,isParallelCall:A?A.isParallelCall:!1,global:A?A.global:{ancestry:[null]}};if(A){var p=A.lookup(Symbol.for("jsonata.__createFrame_push"));p&&p(A,L),L.base=A.base}return L}T.bind("sum",oe(a.sum,"<a<n>:n>")),T.bind("count",oe(a.count,"<a:n>")),T.bind("max",oe(a.max,"<a<n>:n>")),T.bind("min",oe(a.min,"<a<n>:n>")),T.bind("average",oe(a.average,"<a<n>:n>")),T.bind("string",oe(a.string,"<x-b?:s>")),T.bind("substring",oe(a.substring,"<s-nn?:s>")),T.bind("substringBefore",oe(a.substringBefore,"<s-s:s>")),T.bind("substringAfter",oe(a.substringAfter,"<s-s:s>")),T.bind("lowercase",oe(a.lowercase,"<s-:s>")),T.bind("uppercase",oe(a.uppercase,"<s-:s>")),T.bind("length",oe(a.length,"<s-:n>")),T.bind("trim",oe(a.trim,"<s-:s>")),T.bind("pad",oe(a.pad,"<s-ns?:s>")),T.bind("match",oe(a.match,"<s-f<s:o>n?:a<o>>")),T.bind("contains",oe(a.contains,"<s-(sf):b>")),T.bind("replace",oe(a.replace,"<s-(sf)(sf)n?:s>")),T.bind("split",oe(a.split,"<s-(sf)n?:a<s>>")),T.bind("join",oe(a.join,"<a<s>s?:s>")),T.bind("formatNumber",oe(a.formatNumber,"<n-so?:s>")),T.bind("formatBase",oe(a.formatBase,"<n-n?:s>")),T.bind("formatInteger",oe(s.formatInteger,"<n-s:s>")),T.bind("parseInteger",oe(s.parseInteger,"<s-s:n>")),T.bind("number",oe(a.number,"<(nsb)-:n>")),T.bind("floor",oe(a.floor,"<n-:n>")),T.bind("ceil",oe(a.ceil,"<n-:n>")),T.bind("round",oe(a.round,"<n-n?:n>")),T.bind("abs",oe(a.abs,"<n-:n>")),T.bind("sqrt",oe(a.sqrt,"<n-:n>")),T.bind("power",oe(a.power,"<n-n:n>")),T.bind("random",oe(a.random,"<:n>")),T.bind("boolean",oe(a.boolean,"<x-:b>")),T.bind("not",oe(a.not,"<x-:b>")),T.bind("map",oe(a.map,"<af>")),T.bind("zip",oe(a.zip,"<a+>")),T.bind("filter",oe(a.filter,"<af>")),T.bind("single",oe(a.single,"<af?>")),T.bind("reduce",oe(a.foldLeft,"<afj?:j>")),T.bind("sift",oe(a.sift,"<o-f?:o>")),T.bind("keys",oe(a.keys,"<x-:a<s>>")),T.bind("lookup",oe(a.lookup,"<x-s:x>")),T.bind("append",oe(a.append,"<xx:a>")),T.bind("exists",oe(a.exists,"<x:b>")),T.bind("spread",oe(a.spread,"<x-:a<o>>")),T.bind("merge",oe(a.merge,"<a<o>:o>")),T.bind("reverse",oe(a.reverse,"<a:a>")),T.bind("each",oe(a.each,"<o-f:a>")),T.bind("error",oe(a.error,"<s?:x>")),T.bind("assert",oe(a.assert,"<bs?:x>")),T.bind("type",oe(a.type,"<x:s>")),T.bind("sort",oe(a.sort,"<af?:a>")),T.bind("shuffle",oe(a.shuffle,"<a:a>")),T.bind("distinct",oe(a.distinct,"<x:x>")),T.bind("base64encode",oe(a.base64encode,"<s-:s>")),T.bind("base64decode",oe(a.base64decode,"<s-:s>")),T.bind("encodeUrlComponent",oe(a.encodeUrlComponent,"<s-:s>")),T.bind("encodeUrl",oe(a.encodeUrl,"<s-:s>")),T.bind("decodeUrlComponent",oe(a.decodeUrlComponent,"<s-:s>")),T.bind("decodeUrl",oe(a.decodeUrl,"<s-:s>")),T.bind("eval",oe(We,"<sx?:x>")),T.bind("toMillis",oe(s.toMillis,"<s-s?:n>")),T.bind("fromMillis",oe(s.fromMillis,"<n-s?s?:s>")),T.bind("clone",oe(Me,"<(oa)-:o>"));var Ke={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 Oe(A){var x=Ke[A.code];if(typeof x<"u"){var L=x.replace(/\{\{\{([^}]+)}}}/g,function(){return A[arguments[1]]});L=L.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(A[arguments[1]])}),A.message=L}}function Ce(A,x){var L,p;try{L=l(A,x&&x.recover),p=L.errors,delete L.errors}catch(I){throw Oe(I),I}var v=Re(T),E=new Date;return v.bind("now",oe(function(I,F){return s.fromMillis(E.getTime(),I,F)},"<s?s?:s>")),v.bind("millis",oe(function(){return E.getTime()},"<:n>")),{evaluate:async function(I,F,X){if(typeof p<"u"){var me={code:"S0500",position:0};throw Oe(me),me}const ve=Re(v);for(const Ne of o.keys(F))ve.bind(Ne,F[Ne]);if(ve.bind("$",I),E=new Date,ve.timestamp=E,ve.options=x,ve.createSequence=function(){var Ne=[];return x&&x.sequence&&(Ne.push=function(...mt){if(Ne.length+mt.length>x.sequence)throw{code:"D2015",stack:new Error().stack,value:x.sequence};return Array.prototype.push.apply(Ne,mt)}),Ne.sequence=!0,arguments.length===1&&Ne.push(arguments[0]),Ne},Array.isArray(I)&&!_(I)&&(I=ve.createSequence(I),I.outerWrapper=!0),x&&(x.timeout||x.stack)){const Ne=Date.now();ve.guardrails=function(){if(x.stack>0&&ve.depth>x.stack)throw{code:"D1011",value:x.stack,stack:new Error().stack};if(x.timeout>0&&Date.now()-Ne>x.timeout)throw{code:"D1012",value:x.timeout,stack:new Error().stack}}}else ve.guardrails=function(){};ve.base=ve,ve.depth=0,x&&x.RegexEngine?ve.RegexEngine=x.RegexEngine:ve.RegexEngine=RegExp;var Ye;try{return Ye=await R(L,I,ve),typeof X=="function"&&X(null,Ye),Ye}catch(Ne){throw Oe(Ne),Ne}},assign:function(I,F){v.bind(I,F)},registerFunction:function(I,F,X){var me=oe(F,X);v.bind(I,me)},ast:function(){return L},errors:function(){return p}}}return Ce.parser=l,Ce})();n.exports=h},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,n,r){var s=t("./signature");const a=(()=>{var o={".":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},l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
3920
3920
|
`,r:"\r",t:" "},c=function(u){var f=0,d=u.length,_=function(m,S){var y={type:m,value:S,position:f};return y},b=function(){for(var m=f,S=0,y,M,T=function(k){if(u.charAt(k)==="/"&&S===0){for(var B=0;u.charAt(k-(B+1))==="\\";)B++;if(B%2===0)return!0}return!1};f<d;){var R=u.charAt(f);if(T(f)){if(y=u.substring(m,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,R=u.charAt(f),m=f;R==="i"||R==="m";)f++,R=u.charAt(f);return M=u.substring(m,f)+"g",new RegExp(y,M)}(R==="("||R==="["||R==="{")&&u.charAt(f-1)!=="\\"&&S++,(R===")"||R==="]"||R==="}")&&u.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},g=function(m){if(f>=d)return null;for(var S=u.charAt(f);f<d&&`
|
|
3921
3921
|
\r\v`.indexOf(S)>-1;)f++,S=u.charAt(f);if(S==="/"&&u.charAt(f+1)==="*"){var y=f;for(f+=2,S=u.charAt(f);!(S==="*"&&u.charAt(f+1)==="/");)if(S=u.charAt(++f),f>=d)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,S=u.charAt(f),g(m)}if(m!==!0&&S==="/")return f++,_("regex",b());if(S==="."&&u.charAt(f+1)===".")return f+=2,_("operator","..");if(S===":"&&u.charAt(f+1)==="=")return f+=2,_("operator",":=");if(S==="!"&&u.charAt(f+1)==="=")return f+=2,_("operator","!=");if(S===">"&&u.charAt(f+1)==="=")return f+=2,_("operator",">=");if(S==="<"&&u.charAt(f+1)==="=")return f+=2,_("operator","<=");if(S==="*"&&u.charAt(f+1)==="*")return f+=2,_("operator","**");if(S==="~"&&u.charAt(f+1)===">")return f+=2,_("operator","~>");if(S==="?"&&u.charAt(f+1)===":")return f+=2,_("operator","?:");if(S==="?"&&u.charAt(f+1)==="?")return f+=2,_("operator","??");if(Object.prototype.hasOwnProperty.call(o,S))return f++,_("operator",S);if(S==='"'||S==="'"){var M=S;f++;for(var T="";f<d;){if(S=u.charAt(f),S==="\\")if(f++,S=u.charAt(f),Object.prototype.hasOwnProperty.call(l,S))T+=l[S];else if(S==="u"){var R=u.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test(R)){var k=parseInt(R,16);T+=String.fromCharCode(k),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===M)return f++,_("string",T);T+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var B=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,C=B.exec(u.substring(f));if(C!==null){var D=parseFloat(C[0]);if(!isNaN(D)&&isFinite(D))return f+=C[0].length,_("number",D);throw{code:"S0102",stack:new Error().stack,position:f,token:C[0]}}var V;if(S==="`"){f++;var K=u.indexOf("`",f);if(K!==-1)return V=u.substring(f,K),f=K+1,_("name",V);throw f=d,{code:"S0105",stack:new Error().stack,position:f}}for(var J=f,se;;)if(se=u.charAt(J),J===d||`
|
|
3922
3922
|
\r\v`.indexOf(se)>-1||Object.prototype.hasOwnProperty.call(o,se)){if(u.charAt(f)==="$")return V=u.substring(f+1,J),f=J,_("variable",V);switch(V=u.substring(f,J),f=J,V){case"or":case"in":case"and":return _("operator",V);case"true":return _("value",!0);case"false":return _("value",!1);case"null":return _("value",null);default:return f===d&&V===""?null:_("name",V)}}else J++};return g},h=function(u,f){var d,_,b=Object.create(null),g=[],m=function(){var O=[];d.id!=="(end)"&&O.push({type:d.type,value:d.value,position:d.position});for(var H=_();H!==null;)O.push(H),H=_();return O},S={nud:function(){var O={code:"S0211",token:this.value,position:this.position};if(f)return O.remaining=m(),O.type="error",g.push(O),O;throw O.stack=new Error().stack,O}},y=function(O,H){var we=b[O];return H=H||0,we?H>=we.lbp&&(we.lbp=H):(we=Object.create(S),we.id=we.value=O,we.lbp=H,b[O]=we),we},M=function(O){if(f){O.remaining=m(),g.push(O);var H=b["(error)"];return d=Object.create(H),d.error=O,d.type="(error)",d}else throw O.stack=new Error().stack,O},T=function(O,H){if(O&&d.id!==O){var we;d.id==="(end)"?we="S0203":we="S0202";var Be={code:we,position:d.position,token:d.value,value:O};return M(Be)}var ie=_(H);if(ie===null)return d=b["(end)"],d.position=u.length,d;var ce=ie.value,z=ie.type,q;switch(z){case"name":case"variable":q=b["(name)"];break;case"operator":if(q=b[ce],!q)return M({code:"S0204",stack:new Error().stack,position:ie.position,token:ce});break;case"string":case"number":case"value":q=b["(literal)"];break;case"regex":z="regex",q=b["(regex)"];break;default:return M({code:"S0205",stack:new Error().stack,position:ie.position,token:ce})}return d=Object.create(q),d.value=ce,d.type=z,d.position=ie.position,d},R=function(O){var H,we=d;for(T(null,!0),H=we.nud();O<d.lbp;)we=d,T(),H=we.led(H);return H},k=function(O){var H=y(O,0);H.nud=function(){return this}},B=function(O,H,we){var Be=H||o[O],ie=y(O,Be);return ie.led=we||function(ce){return this.lhs=ce,this.rhs=R(Be),this.type="binary",this},ie},C=function(O,H,we){var Be=y(O,H);return Be.led=we,Be},D=function(O,H){var we=y(O);return we.nud=H||function(){return this.expression=R(70),this.type="unary",this},we};k("(end)"),k("(name)"),k("(literal)"),k("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),B("."),B("+"),B("-"),B("*"),B("/"),B("%"),B("="),B("<"),B(">"),B("!="),B("<="),B(">="),B("&"),B("and"),B("or"),B("in"),k("and"),k("or"),k("in"),D("-"),B("~>"),B("??",o["??"],function(O){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(O))]},this.then=O,this.else=R(0),this}),C("(error)",10,function(O){return this.lhs=O,this.error=d.error,this.remaining=m(),this.type="error",this}),D("*",function(){return this.type="wildcard",this}),D("**",function(){return this.type="descendant",this}),D("%",function(){return this.type="parent",this}),B("(",o["("],function(O){if(this.procedure=O,this.type="function",this.arguments=[],d.id!==")")for(;d.type==="operator"&&d.id==="?"?(this.type="partial",this.arguments.push(d),T("?")):this.arguments.push(R(0)),d.id===",";)T(",");if(T(")",!0),O.type==="name"&&(O.value==="function"||O.value==="λ")){if(this.arguments.forEach(function(ce,z){if(ce.type!=="variable")return M({code:"S0208",stack:new Error().stack,position:ce.position,token:ce.value,value:z+1})}),this.type="lambda",d.id==="<"){for(var H=d.position,we=1,Be="<";we>0&&d.id!=="{"&&d.id!=="(end)";){var ie=T();ie.id===">"?we--:ie.id==="<"&&we++,Be+=ie.value}T(">");try{this.signature=s(Be)}catch(ce){return ce.position=H+ce.offset,M(ce)}}T("{"),this.body=R(0),T("}")}return this}),D("(",function(){for(var O=[];d.id!==")"&&(O.push(R(0)),d.id===";");)T(";");return T(")",!0),this.type="block",this.expressions=O,this}),D("[",function(){var O=[];if(d.id!=="]")for(;;){var H=R(0);if(d.id===".."){var we={type:"binary",value:"..",position:d.position,lhs:H};T(".."),we.rhs=R(0),H=we}if(O.push(H),d.id!==",")break;T(",")}return T("]",!0),this.expressions=O,this.type="unary",this}),B("[",o["["],function(O){if(d.id==="]"){for(var H=O;H&&H.type==="binary"&&H.value==="[";)H=H.lhs;return H.keepArray=!0,T("]"),O}else return this.lhs=O,this.rhs=R(o["]"]),this.type="binary",T("]",!0),this}),B("^",o["^"],function(O){T("(");for(var H=[];;){var we={descending:!1};if(d.id==="<"?T("<"):d.id===">"&&(we.descending=!0,T(">")),we.expression=R(0),H.push(we),d.id!==",")break;T(",")}return T(")"),this.lhs=O,this.rhs=H,this.type="binary",this});var V=function(O){var H=[];if(d.id!=="}")for(;;){var we=R(0);T(":");var Be=R(0);if(H.push([we,Be]),d.id!==",")break;T(",")}return T("}",!0),typeof O>"u"?(this.lhs=H,this.type="unary"):(this.lhs=O,this.rhs=H,this.type="binary"),this};D("{",V),B("{",o["{"],V),C(":=",o[":="],function(O){return O.type!=="variable"?M({code:"S0212",stack:new Error().stack,position:O.position,token:O.value}):(this.lhs=O,this.rhs=R(o[":="]-1),this.type="binary",this)}),B("@",o["@"],function(O){return this.lhs=O,this.rhs=R(o["@"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),B("#",o["#"],function(O){return this.lhs=O,this.rhs=R(o["#"]),this.rhs.type!=="variable"?M({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),B("?",o["?"],function(O){return this.type="condition",this.condition=O,this.then=R(0),d.id===":"&&(T(":"),this.else=R(0)),this}),B("?:",o["?:"],function(O){return this.type="condition",this.condition=JSON.parse(JSON.stringify(O)),this.then=O,this.else=R(0),this}),D("|",function(){return this.type="transform",this.pattern=R(0),T("|"),this.update=R(0),d.id===","&&(T(","),this.delete=R(0)),T("|"),this});var K=function(O){var H;if(O.type==="function"&&!O.predicate){var we={type:"lambda",thunk:!0,arguments:[],position:O.position};we.body=O,H=we}else if(O.type==="condition")O.then=K(O.then),typeof O.else<"u"&&(O.else=K(O.else)),H=O;else if(O.type==="block"){var Be=O.expressions.length;Be>0&&(O.expressions[Be-1]=K(O.expressions[Be-1])),H=O}else H=O;return H},J=0,se=0,he=[],Q=function(O,H){switch(O.type){case"name":case"wildcard":H.level--,H.level===0&&(typeof O.ancestor>"u"||(he[H.index].slot.label=O.ancestor.label),O.ancestor=H,O.tuple=!0);break;case"parent":H.level++;break;case"block":O.expressions.length>0&&(O.tuple=!0,H=Q(O.expressions[O.expressions.length-1],H));break;case"path":O.tuple=!0;var we=O.steps.length-1;for(H=Q(O.steps[we--],H);H.level>0&&we>=0;)H=Q(O.steps[we--],H);break;default:throw{code:"S0217",token:O.type,position:O.position}}return H},de=function(O,H){if(typeof H.seekingParent<"u"||H.type==="parent"){var we=typeof H.seekingParent<"u"?H.seekingParent:[];H.type==="parent"&&we.push(H.slot),typeof O.seekingParent>"u"?O.seekingParent=we:Array.prototype.push.apply(O.seekingParent,we)}},ne=function(O){var H=O.steps.length-1,we=O.steps[H],Be=typeof we.seekingParent<"u"?we.seekingParent:[];we.type==="parent"&&Be.push(we.slot);for(var ie=0;ie<Be.length;ie++){var ce=Be[ie];for(H=O.steps.length-2;ce.level>0;){if(H<0){typeof O.seekingParent>"u"?O.seekingParent=[ce]:O.seekingParent.push(ce);break}for(var z=O.steps[H--];H>=0&&z.focus&&O.steps[H].focus;)z=O.steps[H--];ce=Q(z,ce)}}},ue=function(O){var H;switch(O.type){case"binary":switch(O.value){case".":var we=ue(O.lhs);we.type==="path"?H=we:H={type:"path",steps:[we]},we.type==="parent"&&(H.seekingParent=[we.slot]);var Be=ue(O.rhs);Be.type==="path"?Array.prototype.push.apply(H.steps,Be.steps):(typeof Be.predicate<"u"&&(Be.stages=Be.predicate,delete Be.predicate),H.steps.push(Be)),H.steps.filter(function(fe){if(fe.type==="number"||fe.type==="value")throw{code:"S0213",stack:new Error().stack,position:fe.position,value:fe.value};return fe.type==="string"}).forEach(function(fe){fe.type="name"}),H.steps.filter(function(fe){return fe.keepArray===!0}).length>0&&(H.keepSingletonArray=!0);var ie=H.steps[0];ie.type==="unary"&&ie.value==="["&&(ie.consarray=!0);var ce=H.steps[H.steps.length-1];ce.type==="unary"&&ce.value==="["&&(ce.consarray=!0),ne(H);break;case"[":H=ue(O.lhs);var z=H,q="predicate";if(H.type==="path"&&(z=H.steps[H.steps.length-1],q="stages"),typeof z.group<"u")throw{code:"S0209",stack:new Error().stack,position:O.position};typeof z[q]>"u"&&(z[q]=[]);var W=ue(O.rhs);typeof W.seekingParent<"u"&&(W.seekingParent.forEach(fe=>{fe.level===1?Q(z,fe):fe.level--}),de(z,W)),z[q].push({type:"filter",expr:W,position:O.position});break;case"{":if(H=ue(O.lhs),typeof H.group<"u")throw{code:"S0210",stack:new Error().stack,position:O.position};H.group={lhs:O.rhs.map(function(fe){return[ue(fe[0]),ue(fe[1])]}),position:O.position};break;case"^":H=ue(O.lhs),H.type!=="path"&&(H={type:"path",steps:[H]});var le={type:"sort",position:O.position};le.terms=O.rhs.map(function(fe){var ye=ue(fe.expression);return de(le,ye),{descending:fe.descending,expression:ye}}),H.steps.push(le),ne(H);break;case":=":H={type:"bind",value:O.value,position:O.position},H.lhs=ue(O.lhs),H.rhs=ue(O.rhs),de(H,H.rhs);break;case"@":if(H=ue(O.lhs),z=H,H.type==="path"&&(z=H.steps[H.steps.length-1]),typeof z.stages<"u"||typeof z.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:O.position};if(z.type==="sort")throw{code:"S0216",stack:new Error().stack,position:O.position};O.keepArray&&(z.keepArray=!0),z.focus=O.rhs.value,z.tuple=!0;break;case"#":H=ue(O.lhs),z=H,H.type==="path"?z=H.steps[H.steps.length-1]:(H={type:"path",steps:[H]},typeof z.predicate<"u"&&(z.stages=z.predicate,delete z.predicate)),typeof z.stages>"u"?z.index=O.rhs.value:z.stages.push({type:"index",value:O.rhs.value,position:O.position}),z.tuple=!0;break;case"~>":H={type:"apply",value:O.value,position:O.position},H.lhs=ue(O.lhs),H.rhs=ue(O.rhs),H.keepArray=H.lhs.keepArray||H.rhs.keepArray;break;default:H={type:O.type,value:O.value,position:O.position},H.lhs=ue(O.lhs),H.rhs=ue(O.rhs),de(H,H.lhs),de(H,H.rhs)}break;case"unary":H={type:O.type,value:O.value,position:O.position},O.value==="["?H.expressions=O.expressions.map(function(fe){var ye=ue(fe);return de(H,ye),ye}):O.value==="{"?H.lhs=O.lhs.map(function(fe){var ye=ue(fe[0]);de(H,ye);var Se=ue(fe[1]);return de(H,Se),[ye,Se]}):(H.expression=ue(O.expression),O.value==="-"&&H.expression.type==="number"?(H=H.expression,H.value=-H.value):de(H,H.expression));break;case"function":case"partial":H={type:O.type,name:O.name,value:O.value,position:O.position},H.arguments=O.arguments.map(function(fe){var ye=ue(fe);return de(H,ye),ye}),H.procedure=ue(O.procedure);break;case"lambda":H={type:O.type,arguments:O.arguments,signature:O.signature,position:O.position};var be=ue(O.body);H.body=K(be);break;case"condition":H={type:O.type,position:O.position},H.condition=ue(O.condition),de(H,H.condition),H.then=ue(O.then),de(H,H.then),typeof O.else<"u"&&(H.else=ue(O.else),de(H,H.else));break;case"transform":H={type:O.type,position:O.position},H.pattern=ue(O.pattern),H.update=ue(O.update),typeof O.delete<"u"&&(H.delete=ue(O.delete));break;case"block":H={type:O.type,position:O.position},H.expressions=O.expressions.map(function(fe){var ye=ue(fe);return de(H,ye),(ye.consarray||ye.type==="path"&&ye.steps[0].consarray)&&(H.consarray=!0),ye});break;case"name":H={type:"path",steps:[O]},O.keepArray&&(H.keepSingletonArray=!0);break;case"parent":H={type:"parent",slot:{label:"!"+J++,level:1,index:se++}},he.push(H);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":H=O;break;case"operator":if(O.value==="and"||O.value==="or"||O.value==="in")O.type="name",H=ue(O);else if(O.value==="?")H=O;else throw{code:"S0201",stack:new Error().stack,position:O.position,token:O.value};break;case"error":H=O,O.lhs&&(H=ue(O.lhs));break;default:var U="S0206";O.id==="(end)"&&(U="S0207");var ee={code:U,position:O.position,token:O.value};if(f)return g.push(ee),{type:"error",error:ee};throw ee.stack=new Error().stack,ee}return O.keepArray&&(H.keepArray=!0),H};_=c(u),T();var Te=R(0);if(d.id!=="(end)"){var ke={code:"S0201",position:d.position,token:d.value};M(ke)}if(Te=ue(Te),Te.type==="parent"||typeof Te.seekingParent<"u")throw{code:"S0217",token:Te.type,position:Te.position};return g.length>0&&(Te.errors=g),Te};return h})();n.exports=a},{"./signature":5}],5:[function(t,n,r){var s=t("./utils");const a=(()=>{var o={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function l(c){for(var h=1,u=[],f=Object.create(null),d=f;h<c.length;){var _=c.charAt(h);if(_===":")break;var b=function(){u.push(f),d=f,f=Object.create(null)},g=function(B,C,D,V){for(var K=1,J=C;J<B.length;)if(J++,_=B.charAt(J),_===V){if(K--,K===0)break}else _===D&&K++;return J};switch(_){case"s":case"n":case"b":case"l":case"o":f.regex="["+_+"m]",f.type=_,b();break;case"a":f.regex="[asnblfom]",f.type=_,f.array=!0,b();break;case"f":f.regex="f",f.type=_,b();break;case"j":f.regex="[asnblom]",f.type=_,b();break;case"x":f.regex="[asnblfom]",f.type=_,b();break;case"-":d.context=!0,d.contextRegex=new RegExp(d.regex),d.regex+="?";break;case"?":case"+":d.regex+=_;break;case"(":var m=g(c,h,"(",")"),S=c.substring(h+1,m);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:h};f.type="("+S+")",h=m,b();break;case"<":if(d.type==="a"||d.type==="f"){var y=g(c,h,"<",">");d.subtype=c.substring(h+1,y),h=y}else throw{code:"S0401",stack:new Error().stack,value:d.type,offset:h};break}h++}var M="^"+u.map(function(B){return"("+B.regex+")"}).join("")+"$",T=new RegExp(M),R=function(B){var C;if(s.isFunction(B))C="f";else{var D=typeof B;switch(D){case"string":C="s";break;case"number":C="n";break;case"boolean":C="b";break;case"object":B===null?C="l":Array.isArray(B)?C="a":C="o";break;case"undefined":default:C="m"}}return C},k=function(B,C){for(var D="^",V=0,K=0;K<u.length;K++){D+=u[K].regex;var J=C.match(D);if(J===null)throw{code:"T0410",stack:new Error().stack,value:B[V],index:V+1};V=J[0].length}throw{code:"T0410",stack:new Error().stack,value:B[V],index:V+1}};return{definition:c,validate:function(B,C){var D="";B.forEach(function(se){D+=R(se)});var V=T.exec(D);if(V){var K=[],J=0;return u.forEach(function(se,he){var Q=B[J],de=V[he+1];if(de==="")if(se.context&&se.contextRegex){var ne=R(C);if(se.contextRegex.test(ne))K.push(C);else throw{code:"T0411",stack:new Error().stack,value:C,index:J+1}}else K.push(Q),J++;else de.split("").forEach(function(ue){if(Q=B[J],se.type==="a"){if(ue==="m")Q=void 0;else{var Te=!0;if(typeof se.subtype<"u"){if(ue!=="a"&&de!==se.subtype)Te=!1;else if(ue==="a"&&Q.length>0){var ke=R(Q[0]);if(ke!==se.subtype.charAt(0))Te=!1;else{var O=Q.filter(function(H){return R(H)!==ke});Te=O.length===0}}}if(!Te)throw{code:"T0412",stack:new Error().stack,value:Q,index:J+1,type:o[se.subtype]};ue!=="a"&&(Q=[Q])}K.push(Q),J++}else K.push(Q),J++})}),K}k(B,D)}}}return l})();n.exports=a},{"./utils":6}],6:[function(t,n,r){const s=(()=>{function a(y){var M=!1;if(typeof y=="number"&&(M=!isNaN(y),M&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return M}function o(y){var M=!1;return Array.isArray(y)&&(M=y.filter(function(T){return typeof T!="string"}).length===0),M}function l(y){var M=!1;return Array.isArray(y)&&(M=y.filter(function(T){return!a(T)}).length===0),M}function c(y){return y.sequence===!0&&Array.isArray(y)}function h(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function u(y){var M=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return M}function f(y){return y&&y._jsonata_lambda===!0}var d=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function _(y){return typeof y=="object"&&y!==null&&d in y&&"next"in y&&typeof y.next=="function"}function b(y,M){if(y===M)return!0;if(typeof y=="object"&&typeof M=="object"&&y!==null&&M!==null){if(Array.isArray(y)&&Array.isArray(M)){if(y.length!==M.length)return!1;for(var T=0;T<y.length;T++)if(!b(y[T],M[T]))return!1;return!0}var R=Object.getOwnPropertyNames(y),k=Object.getOwnPropertyNames(M);if(R.length!==k.length)return!1;for(R=R.sort(),k=k.sort(),T=0;T<R.length;T++)if(R[T]!==k[T])return!1;for(T=0;T<R.length;T++){var B=R[T];if(!b(y[B],M[B]))return!1}return!0}return!1}function g(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function m(y){var M=[];for(let T of y)M.push(T);return M}function S(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:a,isArrayOfStrings:o,isArrayOfNumbers:l,isSequence:c,isFunction:h,isLambda:f,isIterable:_,getFunctionArity:u,isDeepEqual:b,stringToArray:m,isPromise:g,keys:S}})();n.exports=s},{}]},{},[3])(3)})})(uc)),uc.exports}Fb();const kb=150,Uf=10,Bb=200,zb=16,Nf=new WeakMap;let Of=!1;function xa(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ms(i){if(i===window)return{x:window.scrollX,y:window.scrollY};const e=i;return{x:e.scrollLeft,y:e.scrollTop}}function Hb(i,e,t){if(i===window){window.scrollTo(e,t);return}const n=i;typeof n.scrollTo=="function"?n.scrollTo(e,t):(n.scrollLeft=e,n.scrollTop=t)}function Vb(i){if(i===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=i;return Math.max(0,e.scrollHeight-e.clientHeight)}function Lr(i){let e=Nf.get(i);if(!e){const t=ms(i);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},Nf.set(i,e)}return e}function ba(i){Lr(i).userEngaged=!0}function Sa(i){const e=Lr(i);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},kb)}function Ff(i,e){return e-i>=Bb}function Ir(i){if(!xa())return;const e=Lr(i);if(e.restoring)return;const t=ms(i);if(Ff(t.y,e.y)){hc(i);return}e.x=t.x,e.y=t.y}function Gb(i){if(!xa())return;const e=Lr(i),t=Vb(i),n=e.x,r=t>0?Math.min(e.y,t):e.y,{x:s,y:a}=ms(i);if(!(Math.abs(n-s)<=Uf&&Math.abs(r-a)<=Uf)){e.restoring=!0;try{Hb(i,n,r)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function hc(i){const e=Lr(i);if(e.stickyFrames=zb,e.raf)return;const t=()=>{e.raf=0,Gb(i),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function fc(i){hc(i)}function gs(i){if(!xa())return;const e=Lr(i);if(e.watching)return;e.watching=!0;const t=i===window?window:i,n=()=>{if(e.restoring)return;const{y:_}=ms(i);if(Ff(_,e.y)){hc(i);return}if(e.userEngaged){Ir(i),Sa(i);return}Ir(i)},r=_=>kf(_)===i,s=_=>{r(_)&&(Ir(i),ba(i))},a=_=>{r(_)&&Sa(i)},o=_=>{r(_)&&(Ir(i),ba(i),Sa(i))};t.addEventListener("scroll",n,{passive:!0}),t.addEventListener("touchstart",s,{passive:!0}),t.addEventListener("touchend",a,{passive:!0}),t.addEventListener("touchcancel",a,{passive:!0}),t.addEventListener("wheel",o,{passive:!0}),t.addEventListener("pointerdown",s,{passive:!0}),t.addEventListener("pointerup",a,{passive:!0}),t.addEventListener("pointercancel",a,{passive:!0});const l=ms(i);if(e.x=l.x,e.y=l.y,i===window){const _=new ResizeObserver(()=>fc(window));_.observe(document.documentElement),e.resizeObserver=_;return}const c=i,h=new ResizeObserver(()=>fc(c));h.observe(c);for(const _ of Array.from(c.children))h.observe(_);e.resizeObserver=h;const u=()=>fc(c),f=new MutationObserver(_=>{for(const b of _)if(b.type==="childList")for(const g of Array.from(b.addedNodes))g instanceof Element&&h.observe(g);u()});f.observe(c,{childList:!0,subtree:!0,characterData:!0});const d=c.getRootNode();d instanceof ShadowRoot&&d.host&&f.observe(d.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function kf(i){for(const e of i.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Bf(e))return e;return window}function Bf(i){if(!(i instanceof HTMLElement)||i===document.documentElement||i===document.body)return!1;const e=getComputedStyle(i).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function dc(i){for(const t of i.composedPath())t===window||t===document||t instanceof HTMLElement&&Bf(t)&&gs(t);const e=kf(i);gs(e),i.type==="wheel"?(Ir(e),ba(e),Sa(e)):(i.type==="touchstart"||i.type==="pointerdown")&&(Ir(e),ba(e))}function Ma(i){i instanceof Element&&i.classList?.contains("custom-scroll")&&gs(i),i.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&gs(e)})}function pc(i){Ma(i),new MutationObserver(t=>{for(const n of t)for(const r of Array.from(n.addedNodes))r instanceof Element&&Ma(r)}).observe(i,{childList:!0,subtree:!0})}function mc(i){i.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(pc(e.shadowRoot),mc(e.shadowRoot))})}function Wb(){const i=Element.prototype;if(i.__safariScrollGuardPatched)return;i.__safariScrollGuardPatched=!0;const e=i.attachShadow;i.attachShadow=function(n){const r=e.call(this,n);return pc(r),r}}function Xb(){if(typeof window>"u"||Of||(Of=!0,!xa()))return;gs(window),Wb();const i={capture:!0,passive:!0};window.addEventListener("wheel",dc,i),window.addEventListener("touchstart",dc,i),window.addEventListener("pointerdown",dc,i);const e=()=>{Ma(document),mc(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(n=>{for(const r of n)for(const s of Array.from(r.addedNodes))s instanceof Element&&(Ma(s),s.shadowRoot&&pc(s.shadowRoot),mc(s))}).observe(document.documentElement,{childList:!0,subtree:!0})}const $b=vb,qb=xb,jb=oc,Yb=rc,Kb=ri,Zb=Db,Jb=ga,Qb=lc,eS=Ob;Xb(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:$b,Arrays:qb,DataBindObserver:jb,Format:Yb,HTML:Kb,LocationHandler:Zb,Objects:Jb,PublisherManager:Xt,api:Qb,URLPattern:eS,Endpoint:cc,DataProviderKey:ma};function zf(i){const e=i.aspectRatio.trim();if(e){i.style.setProperty("--sonic-3d-ar",e.includes("/")?e:e.replace(":"," / "));return}i.style.removeProperty("--sonic-3d-ar")}function Hf(i){i.formPublisher&&(i.formPublisher.offInternalMutation(i.onFormMutation),i.formPublisher=null)}function Vf(i){Hf(i);const e=ic.resolveFormProviderId(i,i.dataProvider);e&&(i.formPublisher=Xt.get(e),i.formPublisher.onInternalMutation(i.onFormMutation),i.onFormMutation())}function Gf(i){const e=ic.resolveOutProviderId(i,i.outDataProvider,i.dataProvider);i.outPublisher=e?Xt.get(e):null}function tS(i){zf(i),i.resizeObserver=new ResizeObserver(()=>Bi.syncSize(i)),i.resizeObserver.observe(i),i.intersectionObserver=new IntersectionObserver(e=>{i.inView=e.some(t=>t.isIntersecting),Bi.syncVisibility(i)},{threshold:0}),i.intersectionObserver.observe(i),Vf(i),Gf(i),requestAnimationFrame(()=>{(i.inView||!i.releaseOffscreen||Es(i))&&Bi.ensureRuntime(i)})}const bi={applyAspectRatio:zf,unbindFormProvider:Hf,bindFormProvider:Vf,bindOutPublisher:Gf,firstUpdated:tS},Wf=["frameUrl","snapshot"];function Xf(i){if(!i.outPublisher)return!1;if(i.frameOut)return!0;for(const e of Wf)if(ka(i.outPublisher,e))return!0;return!1}function nS(i,e){return{url:URL.createObjectURL(e),blob:e,width:i.width,height:i.height,mime:e.type||Bc}}function iS(i){return new Promise(e=>{if(typeof i.toBlob!="function"){e(null);return}const t=n=>{if(!n){e(null);return}e(nS(i,n))};try{i.toBlob(t,Bc,Rd)}catch{e(null)}})}function rS(i,e){const t=i.outPublisher;if(t){try{t.frameUrl.set(e.url)}catch{}try{t.snapshot.set(e)}catch{}}}function sS(i,e){if(i.snapshotBusy||!i.runtime||!Xf(i))return;const t=Math.max(Ad,Number.isFinite(i.snapshotInterval)&&i.snapshotInterval>0?i.snapshotInterval:kc);if(e-i.lastSnapshotAt<t)return;i.lastSnapshotAt=e,i.snapshotBusy=!0;const n=++i.snapshotSeq,r=i.runtime.renderer.domElement;iS(r).then(s=>{if(i.snapshotBusy=!1,!s||n!==i.snapshotSeq){s&&Na([s.url]);return}Na(i.frameUrls),i.frameUrls=[s.url],rS(i,s)})}function aS(i){i.snapshotSeq++,i.snapshotBusy=!1,Na(i.frameUrls),i.frameUrls=[]}const gc={wantsFrameCapture:Xf,maybeCapture:sS,revokeAll:aS,FRAME_KEYS:Wf};function $f(i){if(i.outEventListeners>0||i.frameOut&&i.outPublisher)return!0;if(!i.outPublisher)return!1;for(const e of Dd)if(ka(i.outPublisher,e))return!0;return!1}function qf(i,e){return!(!Pd.includes(e)||!i.formPublisher||i.formPublisher!==i.outPublisher)}function jf(i,e){return{...i.runtime?.snapshot({time:e,frame:i.frame,hovering:i.hovering?1:0,pointerX:i.pointerX,pointerY:i.pointerY,hit:i.lastHit})??{time:e,frame:i.frame,ready:0,loading:0,hovering:i.hovering?1:0,pointerX:i.pointerX,pointerY:i.pointerY,camX:0,camY:0,camZ:0,targetX:0,targetY:0,targetZ:0,fov:i.fov,zoom:1,distance:0,yaw:0,pitch:0},moving:i.moving}}function oS(i,e){const t=i.outPublisher;if(t){for(const[n,r]of Object.entries(e))if(r!==void 0&&!qf(i,n)&&!gc.FRAME_KEYS.includes(n))try{t[n].set(r)}catch{}}}function lS(i,e,t){if(i.outPublisher||i.bindOutPublisher(),!$f(i)||!i.runtime)return;const n=Math.max(wd,i.outInterval||Fc);if(e-i.lastOutAt>=n){i.lastOutAt=e;const r=jf(i,t);oS(i,r);const s={detail:r,bubbles:!0,composed:!0};i.dispatchEvent(new CustomEvent("out",s))}gc.maybeCapture(i,e)}const cS={hasOutConsumers:$f,maybePublish:lS,buildOutput:jf,shouldSkipFormControlOutWrite:qf};function Yf(i,e){const t=i.getBoundingClientRect(),n=Math.max(t.width,1),r=Math.max(t.height,1);return{x:(e.clientX-t.left)/n,y:(e.clientY-t.top)/r}}function uS(i,e){const t=Yf(i,e);i.pointerX=t.x,i.pointerY=t.y,i.pick&&i.runtime?.ready&&i.runtime.setHoverAt(t.x,t.y)}function hS(i,e){const t=Yf(i,e);if(i.pointerX=t.x,i.pointerY=t.y,!i.pick||!i.runtime||e.button!==0)return;const n=i.runtime.pick(t.x,t.y);i.lastHit=n,n&&i.dispatchEvent(new CustomEvent("pick",{detail:n,bubbles:!0,composed:!0}))}function fS(i){i.runtime?.ready&&(i.runtime.fitToContent(),i.runtime.render())}function dS(i){i.hovering=!0,i.syncPlayback()}function pS(i){i.hovering=!1,i.runtime?.clearHighlight(),i.syncPlayback()}const _s={onMove:uS,onDown:hS,onDblClick:fS,onEnter:dS,onLeave:pS};var mS=Object.defineProperty,je=(i,e,t,n)=>{for(var r=void 0,s=i.length-1,a;s>=0;s--)(a=i[s])&&(r=a(e,t,r)||r);return r&&mS(e,t,r),r};class $e extends zr{constructor(){super(...arguments),this.src="",this.asset=null,this.camera=vn.Orbit,this.fov=Ms,this.exposure=Ia,this.minDistance=zc,this.maxDistance=Hc,this.minPolar=Vc,this.maxPolar=Cd,this.autoRotate=!1,this.fit=!0,this.pick=!1,this.play=!0,this.playOnHover=!1,this.playOffscreen=!1,this.releaseOffscreen=!0,this.damping=.08,this.dprMax=2,this.aspectRatio="",this.dataProvider="",this.outDataProvider="",this.outInterval=Fc,this.snapshotInterval=kc,this.frameOut=!1,this.postImage="",this.postBufferA="",this.postBufferB="",this.postBufferC="",this.postBufferD="",this.postCommon="",this.postImageCh0="",this.postImageCh1="",this.postImageCh2="",this.postImageCh3="",this.postBufferACh0="",this.postBufferACh1="",this.postBufferACh2="",this.postBufferACh3="",this.postBufferBCh0="",this.postBufferBCh1="",this.postBufferBCh2="",this.postBufferBCh3="",this.postBufferCCh0="",this.postBufferCCh1="",this.postBufferCCh2="",this.postBufferCCh3="",this.postBufferDCh0="",this.postBufferDCh1="",this.postBufferDCh2="",this.postBufferDCh3="",this.param0=0,this.param1=0,this.param2=0,this.param3=0,this.postScale=1}}je([Xe()],$e.prototype,"src"),je([Xe({attribute:!1})],$e.prototype,"asset"),je([Xe({reflect:!0})],$e.prototype,"camera"),je([Xe({type:Number})],$e.prototype,"fov"),je([Xe({type:Number})],$e.prototype,"exposure"),je([Xe({type:Number,attribute:"min-distance"})],$e.prototype,"minDistance"),je([Xe({type:Number,attribute:"max-distance"})],$e.prototype,"maxDistance"),je([Xe({type:Number,attribute:"min-polar"})],$e.prototype,"minPolar"),je([Xe({type:Number,attribute:"max-polar"})],$e.prototype,"maxPolar"),je([Xe({type:Boolean,attribute:"auto-rotate"})],$e.prototype,"autoRotate"),je([Xe({type:Boolean})],$e.prototype,"fit"),je([Xe({type:Boolean})],$e.prototype,"pick"),je([Xe({type:Boolean,reflect:!0})],$e.prototype,"play"),je([Xe({type:Boolean,attribute:"play-on-hover"})],$e.prototype,"playOnHover"),je([Xe({type:Boolean,attribute:"play-offscreen"})],$e.prototype,"playOffscreen"),je([Xe({type:Boolean,attribute:"release-offscreen"})],$e.prototype,"releaseOffscreen"),je([Xe({type:Number})],$e.prototype,"damping"),je([Xe({type:Number,attribute:"dpr-max"})],$e.prototype,"dprMax"),je([Xe({type:String,attribute:"aspect-ratio"})],$e.prototype,"aspectRatio"),je([Xe({type:String})],$e.prototype,"dataProvider"),je([Xe({type:String,attribute:"out-data-provider"})],$e.prototype,"outDataProvider"),je([Xe({type:Number,attribute:"out-interval"})],$e.prototype,"outInterval"),je([Xe({type:Number,attribute:"snapshot-interval"})],$e.prototype,"snapshotInterval"),je([Xe({type:Boolean,attribute:"frame-out"})],$e.prototype,"frameOut"),je([Xe({attribute:"post-image"})],$e.prototype,"postImage"),je([Xe({attribute:"post-buffer-a"})],$e.prototype,"postBufferA"),je([Xe({attribute:"post-buffer-b"})],$e.prototype,"postBufferB"),je([Xe({attribute:"post-buffer-c"})],$e.prototype,"postBufferC"),je([Xe({attribute:"post-buffer-d"})],$e.prototype,"postBufferD"),je([Xe({attribute:"post-common"})],$e.prototype,"postCommon"),je([Xe({attribute:"post-image-ch0"})],$e.prototype,"postImageCh0"),je([Xe({attribute:"post-image-ch1"})],$e.prototype,"postImageCh1"),je([Xe({attribute:"post-image-ch2"})],$e.prototype,"postImageCh2"),je([Xe({attribute:"post-image-ch3"})],$e.prototype,"postImageCh3"),je([Xe({attribute:"post-buffer-a-ch0"})],$e.prototype,"postBufferACh0"),je([Xe({attribute:"post-buffer-a-ch1"})],$e.prototype,"postBufferACh1"),je([Xe({attribute:"post-buffer-a-ch2"})],$e.prototype,"postBufferACh2"),je([Xe({attribute:"post-buffer-a-ch3"})],$e.prototype,"postBufferACh3"),je([Xe({attribute:"post-buffer-b-ch0"})],$e.prototype,"postBufferBCh0"),je([Xe({attribute:"post-buffer-b-ch1"})],$e.prototype,"postBufferBCh1"),je([Xe({attribute:"post-buffer-b-ch2"})],$e.prototype,"postBufferBCh2"),je([Xe({attribute:"post-buffer-b-ch3"})],$e.prototype,"postBufferBCh3"),je([Xe({attribute:"post-buffer-c-ch0"})],$e.prototype,"postBufferCCh0"),je([Xe({attribute:"post-buffer-c-ch1"})],$e.prototype,"postBufferCCh1"),je([Xe({attribute:"post-buffer-c-ch2"})],$e.prototype,"postBufferCCh2"),je([Xe({attribute:"post-buffer-c-ch3"})],$e.prototype,"postBufferCCh3"),je([Xe({attribute:"post-buffer-d-ch0"})],$e.prototype,"postBufferDCh0"),je([Xe({attribute:"post-buffer-d-ch1"})],$e.prototype,"postBufferDCh1"),je([Xe({attribute:"post-buffer-d-ch2"})],$e.prototype,"postBufferDCh2"),je([Xe({attribute:"post-buffer-d-ch3"})],$e.prototype,"postBufferDCh3"),je([Xe({type:Number})],$e.prototype,"param0"),je([Xe({type:Number})],$e.prototype,"param1"),je([Xe({type:Number})],$e.prototype,"param2"),je([Xe({type:Number})],$e.prototype,"param3"),je([Xe({type:Number,attribute:"post-scale"})],$e.prototype,"postScale");const gS=ed`
|