shop-components 0.0.24 → 0.0.25
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/dist/shop-components.mjs
CHANGED
|
@@ -30085,8 +30085,8 @@ const In = {
|
|
|
30085
30085
|
class U0 extends _P {
|
|
30086
30086
|
constructor(e) {
|
|
30087
30087
|
const t = document.createElement("div");
|
|
30088
|
-
super(t), this.props = e, this._emitter = new Hx(), this._slotContainer = new Kn(), this._bracketSlots = [], this._hasError = !1, this.useBracket = !1, this.addEventListener = this._emitter.addListener.bind(this._emitter), this.removeEventListener = this._emitter.removeListener.bind(this._emitter), this._canInstall = !1, this._loading = !1, this._selected = !1, this._deviceSelected = !1, this.getWP = this._slotContainer.getWorldPosition.bind(this._slotContainer), this.name = e.name, this._slotUI = new $i({ name: e.name }), this._slotUI.slot = this, t.append(this._slotUI), this.add(this._slotContainer), this.props.slot.add(this), t.addEventListener("click", () => {
|
|
30089
|
-
this.selected = !this.selected;
|
|
30088
|
+
super(t), this.props = e, this._emitter = new Hx(), this._slotContainer = new Kn(), this._bracketSlots = [], this._hasError = !1, this.useBracket = !1, this.addEventListener = this._emitter.addListener.bind(this._emitter), this.removeEventListener = this._emitter.removeListener.bind(this._emitter), this._canInstall = !1, this._loading = !1, this._selected = !1, this._deviceSelected = !1, this.getWP = this._slotContainer.getWorldPosition.bind(this._slotContainer), this.name = e.name, this._slotUI = new $i({ name: e.name }), this._slotUI.slot = this, t.append(this._slotUI), this.add(this._slotContainer), this.props.slot.add(this), t.addEventListener("click", (i) => {
|
|
30089
|
+
i.preventDefault(), i.stopPropagation(), this.selected = !this.selected;
|
|
30090
30090
|
}), t.addEventListener("dragover", (i) => {
|
|
30091
30091
|
if (i.preventDefault(), !this._canInstall) {
|
|
30092
30092
|
i.dataTransfer && (i.dataTransfer.dropEffect = "none");
|
|
@@ -30519,7 +30519,7 @@ class Uz {
|
|
|
30519
30519
|
});
|
|
30520
30520
|
}
|
|
30521
30521
|
_initEvents() {
|
|
30522
|
-
window.addEventListener("drag", this._drag), window.addEventListener("dragend", this._dragend), document.addEventListener("wheel", this._detectTrackpad), window.addEventListener("pointermove", this._pointermove),
|
|
30522
|
+
window.addEventListener("drag", this._drag), window.addEventListener("dragend", this._dragend), document.addEventListener("wheel", this._detectTrackpad), window.addEventListener("pointermove", this._pointermove), this.renderer.domElement.addEventListener("pointerdown", this._pointerdown);
|
|
30523
30523
|
}
|
|
30524
30524
|
changeLogo(e, t) {
|
|
30525
30525
|
var r;
|
|
@@ -30675,7 +30675,7 @@ class Uz {
|
|
|
30675
30675
|
}
|
|
30676
30676
|
destroy() {
|
|
30677
30677
|
var t, i;
|
|
30678
|
-
this.stats.dom.remove(), this._emitter.removeAllListeners(), (t = this._fitAnimation) == null || t.stop(), window.removeEventListener("drag", this._drag), document.removeEventListener("wheel", this._detectTrackpad), window.removeEventListener("pointermove", this._pointermove),
|
|
30678
|
+
this.stats.dom.remove(), this._emitter.removeAllListeners(), (t = this._fitAnimation) == null || t.stop(), window.removeEventListener("drag", this._drag), document.removeEventListener("wheel", this._detectTrackpad), window.removeEventListener("pointermove", this._pointermove), this.renderer.domElement.removeEventListener("pointerdown", this._pointerdown);
|
|
30679
30679
|
const e = this.renderer.domElement.parentElement;
|
|
30680
30680
|
e && ((i = this._resizeObserver) == null || i.unobserve(e)), this.controls.dispose(), this.renderer.dispose(), this._composer.dispose(), this.scene.traverse((n) => {
|
|
30681
30681
|
n instanceof Ft ? (n.geometry.dispose(), Array.isArray(n.material) ? n.material.forEach((r) => r.dispose()) : n.material && n.material.dispose()) : n instanceof U0 && n.dispose(), n.removeFromParent();
|
|
@@ -7977,7 +7977,7 @@ bool bvhIntersectFogVolumeHit(
|
|
|
7977
7977
|
</div>
|
|
7978
7978
|
</div>
|
|
7979
7979
|
</div>
|
|
7980
|
-
`}};Vi.styles=_p([RE]),cs([db()],Vi.prototype,"_size",2),cs([Os({type:Boolean})],Vi.prototype,"selected",2),cs([Os({type:Boolean})],Vi.prototype,"hasError",2),cs([Os({type:Boolean})],Vi.prototype,"canInstall",2),cs([Os({type:Boolean})],Vi.prototype,"hide",2),cs([Os({type:Boolean})],Vi.prototype,"disable",2),cs([Os({type:Boolean})],Vi.prototype,"filled",2),cs([Os()],Vi.prototype,"slot",2),Vi=cs([qp("slot-item")],Vi);const dn={ON_DROP:"slot-on-drop",ON_BEFORE_SELECTED:"slot-on-before-selected",ON_SELECTED:"slot-on-selected",ON_DEVICE_SELECTED:"slot-on-device-selected",ON_DROP_ERROR:"slot-on-drop-error",ON_ERROR_STATE_CHANGE:"slot-on-error-state-change"};class Xp extends ZG{constructor(e){const t=document.createElement("div");super(t),this.props=e,this._emitter=new Cv,this._slotContainer=new _n,this._bracketSlots=[],this._hasError=!1,this.useBracket=!1,this.addEventListener=this._emitter.addListener.bind(this._emitter),this.removeEventListener=this._emitter.removeListener.bind(this._emitter),this._canInstall=!1,this._loading=!1,this._selected=!1,this._deviceSelected=!1,this.getWP=this._slotContainer.getWorldPosition.bind(this._slotContainer),this.name=e.name,this._slotUI=new Vi({name:e.name}),this._slotUI.slot=this,t.append(this._slotUI),this.add(this._slotContainer),this.props.slot.add(this),t.addEventListener("click",()
|
|
7980
|
+
`}};Vi.styles=_p([RE]),cs([db()],Vi.prototype,"_size",2),cs([Os({type:Boolean})],Vi.prototype,"selected",2),cs([Os({type:Boolean})],Vi.prototype,"hasError",2),cs([Os({type:Boolean})],Vi.prototype,"canInstall",2),cs([Os({type:Boolean})],Vi.prototype,"hide",2),cs([Os({type:Boolean})],Vi.prototype,"disable",2),cs([Os({type:Boolean})],Vi.prototype,"filled",2),cs([Os()],Vi.prototype,"slot",2),Vi=cs([qp("slot-item")],Vi);const dn={ON_DROP:"slot-on-drop",ON_BEFORE_SELECTED:"slot-on-before-selected",ON_SELECTED:"slot-on-selected",ON_DEVICE_SELECTED:"slot-on-device-selected",ON_DROP_ERROR:"slot-on-drop-error",ON_ERROR_STATE_CHANGE:"slot-on-error-state-change"};class Xp extends ZG{constructor(e){const t=document.createElement("div");super(t),this.props=e,this._emitter=new Cv,this._slotContainer=new _n,this._bracketSlots=[],this._hasError=!1,this.useBracket=!1,this.addEventListener=this._emitter.addListener.bind(this._emitter),this.removeEventListener=this._emitter.removeListener.bind(this._emitter),this._canInstall=!1,this._loading=!1,this._selected=!1,this._deviceSelected=!1,this.getWP=this._slotContainer.getWorldPosition.bind(this._slotContainer),this.name=e.name,this._slotUI=new Vi({name:e.name}),this._slotUI.slot=this,t.append(this._slotUI),this.add(this._slotContainer),this.props.slot.add(this),t.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),this.selected=!this.selected}),t.addEventListener("dragover",i=>{if(i.preventDefault(),!this._canInstall){i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}}),t.addEventListener("drop",async i=>{var r;if(i.preventDefault(),i.stopPropagation(),!this._canInstall)return;const n=(r=i.dataTransfer)==null?void 0:r.getData("application/json");if(n){const o=JSON.parse(n);try{await this.install(o),this._emitter.emit(dn.ON_DROP,this)}catch(a){this._emitter.emit(dn.ON_DROP_ERROR,a)}}else this._emitter.emit(dn.ON_DROP_ERROR,new Error("No device info"))})}get hasDevice(){return this._slotContainer.children.length>0}async loadGlb(e){const i=await new ah({useCache:!0}).loadAsync(e);if(i.glb)return i.glb.clone(!0)}async installBracket(e){const i=await new ah({useCache:!0}).loadAsync(e);if(!i.glb)return;const n=i.glb.clone(!0);this.useBracket=!0,this._slotContainer.add(n)}async install(e){if(!this._loading){this._loading=!0;try{const t=await this.loadGlb(e.url);if(!t)throw new Error(`Fail to load device from: ${e.url}`);if(e.bracketUrl){const i=await this.loadGlb(e.bracketUrl);if(i)this.clearSlot(),i.traverse(n=>{n.name.startsWith("Slot")&&this._bracketSlots.push(n)}),this._slotContainer.add(i);else throw new Error(`Fail to load bracket from: ${e.bracketUrl}`);this._bracketSlots.forEach(n=>{n.add(t)})}else this.clearSlot(),this._slotContainer.add(t);this.deviceInfo=e,this._slotUI.filled=!0}catch(t){throw t}finally{this._loading=!1}}}get device(){return this._slotContainer.children.length?this._slotContainer.children[0]:null}changeName(e){var t;this.name=e,this.props.slot.userData.name=e,this.props.name=e,(t=this.element)==null||t.setAttribute("data-name",this.props.name)}clearSlot(){this._bracketSlots=[],this._slotContainer.children.forEach(e=>{e.removeFromParent(),sh(e)}),this._slotUI.filled=!1,this.deviceInfo=void 0}enable(){this._slotUI.disable=!1}disable(){this._slotUI.disable=!0}hide(){this._slotUI.hide=!0}show(){this._slotUI.hide=!1}get selected(){return this._selected}set selected(e){e&&this._emitter.emit(dn.ON_BEFORE_SELECTED,e),this._selected=e,this._slotUI.selected=e,this._emitter.emit(dn.ON_SELECTED,e)}get deviceSelected(){return this._deviceSelected}set deviceSelected(e){this._deviceSelected=e,this._emitter.emit(dn.ON_DEVICE_SELECTED,e)}get error(){return this._hasError}set error(e){this._loading&&setTimeout(()=>{this.error=e},100),this._hasError=e,this._slotUI.hasError=e,this._emitter.emit(dn.ON_ERROR_STATE_CHANGE,e)}getCanInstall(){return this._canInstall}canInstall(e){this._canInstall=e,this._slotUI.canInstall=e}dispose(){this.clearSlot(),this._emitter.removeAllListeners(),sh(this._slotContainer),this.element.remove()}render(e){const t=this.element.style.transform,i=/translate\(-?\d*\.?\d*%?,?\s-?\d*\.?\d*%?\)\s*translate\((-?\d*\.?\d*)px,\s*(-?\d*\.?\d*)px\)/.exec(t);if(!i)return;const n=new fe(parseFloat(i[1]),parseFloat(i[2])),r=e.mousePos.distanceTo(n);let o=12,a=24,l=30;if(this._canInstall&&(o=34,a=60,l=60),r<l){let h=(l-r)*1+o;r<20&&(h=a),h>a&&(h=a),this._slotUI.setSize(h)}else this._slotUI.setSize(o)}clone(e){return new _n}}var XE=Object.defineProperty,zE=Object.getOwnPropertyDescriptor,zp=(s,e,t,i)=>{for(var n=i>1?void 0:i?zE(e,t):e,r=s.length-1,o;r>=0;r--)(o=s[r])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&XE(e,t,n),n};class WE{constructor(e,t,i,n){this.name=e,this.slot=t,this.start=i,this.end=n,this.split="--",this.uuid="",this.valid=!1,this.editable=!1,this.highlight=!1,this.uuid=e+this.split+t}update(e,t){this.start=e.clone(),this.end=t.clone()}}ft.DeviceLines=class extends Sr{constructor(e,t=0){super(),this.offset=e,this.heightOffset=t,this.lines=new Map,this.setOffset(this.offset.x,this.offset.y)}setOffset(e,t){this.offset.set(e,t),this.style.setProperty("--left",this.offset.x+"px"),this.style.setProperty("--top",this.offset.y+"px")}setHeightOffset(e){this.heightOffset=e,this.style.setProperty("--heightOffset",this.heightOffset+"px")}hide(){var e;(e=this.container)==null||e.classList.add("hidden")}show(){var e;(e=this.container)==null||e.classList.remove("hidden")}addLine(e){this.lines.has(e.uuid)||this.lines.set(e.uuid,e)}clear(){this.lines.clear()}removeLine(e){this.lines.delete(e.uuid)}getLineByName(e){const t=[];return this.lines.forEach((i,n)=>{i.name===e&&t.push(i)}),t}getLineBySlot(e){const t=[];return this.lines.forEach((i,n)=>{i.slot===e&&t.push(i)}),t}getPath(e){const t=e.end.clone();t.set(t.x-this.offset.x,t.y-this.offset.y);const i=e.start.clone().add(t).multiplyScalar(.5),n=e.start.clone().add(t).multiplyScalar(.7);return`M${e.start.x} ${e.start.y}
|
|
7981
7981
|
C${i.x} ${e.start.y}
|
|
7982
7982
|
${n.x} ${e.end.y}
|
|
7983
7983
|
${t.x} ${t.y}
|
|
@@ -8058,7 +8058,7 @@ d="${this.getPath(e)}"></path>`)}
|
|
|
8058
8058
|
color *= newPeak * invPeak;
|
|
8059
8059
|
float g = 1. - 3. / (desaturation * extraBrightness + 3.);
|
|
8060
8060
|
return mix(color, vec3(1, 1, 1), g);
|
|
8061
|
-
}`),this.camera.position.set(10,0,-10),this.camera.lookAt(new A),this.ptRenderer=new O2(this.renderer),this.ptRenderer.camera=this.camera,this.ptRenderer.material=new NG,this.ptRenderer.tiles.set(1,1),this.ptRenderer.material.filterGlossyFactor=.6,this.ptRenderer.material.environmentIntensity=this.renderer.toneMappingExposure,this.ptRenderer.material.backgroundAlpha=0,this.ptRenderer.material.environmentBlur=0,this.ptRenderer.material.bounces=6,this.ptRenderer.material.transmissiveBounces=8,this.ptRenderer.alpha=!0,this.fsQuad=new ss(new Cn({map:this.ptRenderer.target.texture,blending:jm})),this.controls.addEventListener("change",()=>{this.sampleCount=0,this.ptRenderer.reset()}),this._composer=new HG(this.renderer),this._composer.setPixelRatio(window.devicePixelRatio),this._composer.addPass(new T2(this.scene,this.camera)),this._composer.addPass(new _2),this._outlinePass=new rs(new fe(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePass.visibleEdgeColor.set(26367),this._outlinePass.edgeThickness=.5,this._outlinePass.hiddenEdgeColor.set(26367),this._outlinePass.edgeStrength=3,this._outlinePass.edgeGlow=0,this._composer.addPass(this._outlinePass),this._outlinePassError=new rs(new fe(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePassError.visibleEdgeColor.set(16711680),this._outlinePassError.edgeThickness=.5,this._outlinePassError.hiddenEdgeColor.set(16711680),this._outlinePassError.edgeStrength=3,this._outlinePassError.edgeGlow=0,this._composer.addPass(this._outlinePassError),this._composer.renderTarget1.texture.colorSpace=gt,this._composer.renderTarget2.texture.colorSpace=gt,this._fxaaPass=new x0(C2),this._composer.addPass(this._fxaaPass),this.scene.add(this._container),this.ticker(),this._loadEnv(),this._initEvents()}get usePathTracing(){return this._usePathTracing}set usePathTracing(e){e?(this.bodyOpacity=1,this.slots.forEach(t=>t.hide()),this.lines.hide()):(this.slots.forEach(t=>t.show()),this.lines.show(),this.opacityCache!==void 0?(this.bodyOpacity=this.opacityCache,this.opacityCache=void 0):this.bodyOpacity=1),this._usePathTracing=e,this.controls.dampingFactor=e?1:gb,this.sampleCount=0}get slots(){return this._slots}get logos(){return this._logos}get skins(){return this._skins}get fpsAverage(){return wv(this._fpsCache)}set bodyOpacity(e){this._bodyOpacity=e,e<1?this._materialsCache.forEach(t=>{t.mat.transparent=!0,t.mat.opacity=e,t.mat.metalness=0,t.mat.roughness=1,t.mat.color=new Ke("#3859be")}):this._materialsCache.forEach(t=>{t.mat.transparent=t.transparent,t.mat.opacity=t.opacity,t.mat.metalness=t.metalness,t.mat.roughness=t.roughness,t.mat.color=t.color})}get bodyOpacity(){return this._bodyOpacity}changeSkin(e,t){var n;if(!e)return;const i=e.target.name;this.usePathTracing?((n=this.sceneInfo.materials.find(r=>r.name===i))==null||n.color.set(t),this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.sampleCount=0,this.ptRenderer.reset()):e.target.color.set(t)}showState(){this.stats.dom.style.display="block"}hideState(){this.stats.dom.style.display="none"}_loadEnv(){new b2(new h0).load(NE,t=>{t.mapping=Wl,t.minFilter=at,t.magFilter=at,t.colorSpace=gt,t.needsUpdate=!0,this._usePathTracing||(this.scene.environment=t),this.ptRenderer.material.envMapInfo.updateFrom(t),this.ptRenderer.reset()},()=>{},()=>{})}_initEvents(){window.addEventListener("drag",this._drag),window.addEventListener("dragend",this._dragend),document.addEventListener("wheel",this._detectTrackpad),window.addEventListener("pointermove",this._pointermove),window.addEventListener("pointerdown",this._pointerdown)}changeLogo(e,t){var r;const i=kE.load(t);i.flipY=!1,i.colorSpace=gt;const n=e.target;n.material&&(Array.isArray(n.material)?n.material.forEach(o=>{var a;(a=o.map)==null||a.dispose(),o.map=i}):((r=n.material.map)==null||r.dispose(),n.material.map=i))}async generateBVH(){this.slots.forEach(h=>h.hide()),this.lines.hide(),this.opacityCache=this.bodyOpacity,this.bodyOpacity=1;const e=new nP;this._container.updateMatrixWorld();const{bvh:t,textures:i,materials:n,lights:r}=await e.generate(this._container);this.sceneInfo={materials:n,textures:i};const o=t.geometry,a=this.ptRenderer.material;a.bvh.updateFrom(t),a.attributesArray.updateFrom(o.attributes.normal,o.attributes.tangent,o.attributes.uv,o.attributes.color),a.materialIndexAttribute.updateFrom(o.attributes.materialIndex);const l=window.devicePixelRatio||1;a.textures.setTextures(this.renderer,1024*l,1024*l,i),a.materials.updateFrom(n,i),a.lights.updateFrom(r),a.lightCount=r.length,this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.ptRenderer.reset(),this.sampleCount=0,e.dispose(),this.usePathTracing=!0}download(){return this.renderer.domElement.toDataURL("image/png")}clearAMR(){sh(this._container),this._slots=[],this._logos=[],this._skins=[],this._materialsCache.clear(),this.opacityCache=void 0,this.usePathTracing=!1,this.lines.clear()}async exportAMR(){const e=this._container.clone(!0);return e.traverse(t=>{t.dispose&&(t.dispose(),t.removeFromParent())}),await Yv.parseAsync(e,{onlyVisible:!0,binary:!0})}async addAMR(e){!e.startsWith("blob")&&e.endsWith(".sglb");let t;if(e.endsWith(".glb")){let{scene:a}=await rl.loadAsync(e);t=a}else{const l=await new ah({useCache:!0}).loadAsync(e);if(!l.glb)return;t=l.glb}const i=t.clone(!0);i.traverse(a=>{a instanceof jt&&(a.material&&(Array.isArray(a.material)?a.material.forEach(h=>{h.userData.changeColor&&this._skins.push({name:h.userData.name,target:h})}):a.material.userData.changeColor&&this._skins.push({name:a.material.userData.name,target:a.material})),a.userData.isLOGO&&(a.material.transparent=!0,this._logos.push({name:a.userData.name,target:a})));const l=this.generateSlot(a);l&&(this.slots.push(l),a.add(l))}),i.traverse(a=>{if(a instanceof jt&&a.material)if(Array.isArray(a.material))a.material.forEach(h=>{this._materialsCache.set(h.uuid,{opacity:h.opacity,transparent:h.transparent,roughness:h.roughness,metalness:h.metalness,color:h.color,mat:h})});else{const l=a.material;this._materialsCache.set(l.uuid,{opacity:l.opacity,transparent:l.transparent,roughness:l.roughness,metalness:l.metalness,color:l.color,mat:l})}}),i.updateMatrixWorld(!0),this._container.updateMatrixWorld(),this.add(i);const n=new Gt;n.setFromObject(this._container);const r=new A;n.getSize(r);const o=Math.max(r.x,r.y,r.z);this.controls.minDistance=o*2/3,this.controls.maxDistance=o*2}generateSlot(e){if(e.name.startsWith("Slot")){const t=e.userData.name;if(t&&e.userData.isSlot){const i=new Xp({name:t,slot:e});return i.addEventListener(dn.ON_DROP,n=>{this.props.useSound&&this._sound.play()}),i.addEventListener(dn.ON_BEFORE_SELECTED,n=>{this.slots.forEach(r=>{r.selected&&(r.selected=!1)})}),i.addEventListener(dn.ON_ERROR_STATE_CHANGE,n=>{if(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(r=>!!r.parent),n){if(i.device){if(this._outlinePassError.selectedObjects.find(o=>{var a;return o.parent==((a=i.device)==null?void 0:a.parent)}))return;this._outlinePassError.selectedObjects=[i.device,...this._outlinePassError.selectedObjects]}}else i.device&&(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(r=>{var o;return r.parent!=((o=i.device)==null?void 0:o.parent)}))}),i}}}select(e){typeof e=="string"||(Array.isArray(e)?this._outlinePass.selectedObjects=[...e]:this._outlinePass.selectedObjects=[e])}appendTo(e){e.append(this.renderer.domElement),e.append(this.stats.dom),e.append(this.lines),e.append(this.css2dRenderer.domElement),this.stats.dom.style.bottom="0",this.stats.dom.style.top="auto",this.resize(),this._resizeObserver=new ResizeObserver(this.resize),this._resizeObserver.observe(e)}add(e){this._container.add(e)}updatePosition(){this.lines.forceUpdate()}destroy(){var t,i;this.stats.dom.remove(),this._emitter.removeAllListeners(),(t=this._fitAnimation)==null||t.stop(),window.removeEventListener("drag",this._drag),document.removeEventListener("wheel",this._detectTrackpad),window.removeEventListener("pointermove",this._pointermove),window.removeEventListener("pointerdown",this._pointerdown);const e=this.renderer.domElement.parentElement;e&&((i=this._resizeObserver)==null||i.unobserve(e)),this.controls.dispose(),this.renderer.dispose(),this._composer.dispose(),this.scene.traverse(n=>{n instanceof jt?(n.geometry.dispose(),Array.isArray(n.material)?n.material.forEach(r=>r.dispose()):n.material&&n.material.dispose()):n instanceof Xp&&n.dispose(),n.removeFromParent()})}}var Lr=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(Lr||{}),yb=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(yb||{}),Np=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Np||{}),He=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(He||{}),En=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(En||{}),se=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL",s))(se||{}),Qo=(s=>(s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",s))(Qo||{}),Ae=(s=>(s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT",s))(Ae||{}),ve=(s=>(s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT",s))(ve||{}),hs=(s=>(s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR",s))(hs||{}),qs=(s=>(s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",s))(qs||{}),An=(s=>(s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL",s))(An||{}),Gi=(s=>(s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",s))(Gi||{}),Rn=(s=>(s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT",s))(Rn||{}),kp=(s=>(s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL",s))(kp||{}),Ui=(s=>(s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp",s))(Ui||{}),Jt=(s=>(s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR",s))(Jt||{}),Zt=(s=>(s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH",s))(Zt||{}),Kn=(s=>(s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",s))(Kn||{});const be={ADAPTER:{createCanvas:(s,e)=>{const t=document.createElement("canvas");return t.width=s,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(s,e)=>fetch(s,e),parseXML:s=>new DOMParser().parseFromString(s,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Hp=/iPhone/i,vb=/iPod/i,bb=/iPad/i,xb=/\biOS-universal(?:.+)Mac\b/i,Zp=/\bAndroid(?:.+)Mobile\b/i,Sb=/Android/i,$o=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ph=/Silk/i,us=/Windows Phone/i,Lb=/\bWindows(?:.+)ARM\b/i,Tb=/BlackBerry/i,Cb=/BB10/i,Mb=/Opera Mini/i,Ib=/\b(CriOS|Chrome)(?:.+)Mobile/i,wb=/Mobile(?:.+)Firefox\b/i,_b=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function YE(s){return function(e){return e.test(s)}}function Gb(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=YE(t),r={apple:{phone:n(Hp)&&!n(us),ipod:n(vb),tablet:!n(Hp)&&(n(bb)||_b(e))&&!n(us),universal:n(xb),device:(n(Hp)||n(vb)||n(bb)||n(xb)||_b(e))&&!n(us)},amazon:{phone:n($o),tablet:!n($o)&&n(ph),device:n($o)||n(ph)},android:{phone:!n(us)&&n($o)||!n(us)&&n(Zp),tablet:!n(us)&&!n($o)&&!n(Zp)&&(n(ph)||n(Sb)),device:!n(us)&&(n($o)||n(ph)||n(Zp)||n(Sb))||n(/\bokhttp\b/i)},windows:{phone:n(us),tablet:n(Lb),device:n(us)||n(Lb)},other:{blackberry:n(Tb),blackberry10:n(Cb),opera:n(Mb),firefox:n(wb),chrome:n(Ib),device:n(Tb)||n(Cb)||n(Mb)||n(wb)||n(Ib)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const DE=Gb.default??Gb,ds=DE(globalThis.navigator);be.RETINA_PREFIX=/@([0-9\.]+)x/,be.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Pb={exports:{}};(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(l,h,d){this.fn=l,this.context=h,this.once=d||!1}function r(l,h,d,c,u){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new n(d,c||l,u),f=t?t+h:h;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function o(l,h){--l._eventsCount===0?l._events=new i:delete l._events[h]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],d,c;if(this._eventsCount===0)return h;for(c in d=this._events)e.call(d,c)&&h.push(t?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},a.prototype.listeners=function(h){var d=t?t+h:h,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var u=0,p=c.length,f=new Array(p);u<p;u++)f[u]=c[u].fn;return f},a.prototype.listenerCount=function(h){var d=t?t+h:h,c=this._events[d];return c?c.fn?1:c.length:0},a.prototype.emit=function(h,d,c,u,p,f){var y=t?t+h:h;if(!this._events[y])return!1;var m=this._events[y],g=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),g){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,c),!0;case 4:return m.fn.call(m.context,d,c,u),!0;case 5:return m.fn.call(m.context,d,c,u,p),!0;case 6:return m.fn.call(m.context,d,c,u,p,f),!0}for(b=1,v=new Array(g-1);b<g;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var x=m.length,S;for(b=0;b<x;b++)switch(m[b].once&&this.removeListener(h,m[b].fn,void 0,!0),g){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,d);break;case 3:m[b].fn.call(m[b].context,d,c);break;case 4:m[b].fn.call(m[b].context,d,c,u);break;default:if(!v)for(S=1,v=new Array(g-1);S<g;S++)v[S-1]=arguments[S];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(h,d,c){return r(this,h,d,c,!1)},a.prototype.once=function(h,d,c){return r(this,h,d,c,!0)},a.prototype.removeListener=function(h,d,c,u){var p=t?t+h:h;if(!this._events[p])return this;if(!d)return o(this,p),this;var f=this._events[p];if(f.fn)f.fn===d&&(!u||f.once)&&(!c||f.context===c)&&o(this,p);else{for(var y=0,m=[],g=f.length;y<g;y++)(f[y].fn!==d||u&&!f[y].once||c&&f[y].context!==c)&&m.push(f[y]);m.length?this._events[p]=m.length===1?m[0]:m:o(this,p)}return this},a.prototype.removeAllListeners=function(h){var d;return h?(d=t?t+h:h,this._events[d]&&o(this,d)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,s.exports=a})(Pb);var jE=Pb.exports;const ul=pp(jE);var Yp={exports:{}};Yp.exports=fh,Yp.exports.default=fh;function fh(s,e,t){t=t||2;var i=e&&e.length,n=i?e[0]*t:s.length,r=Eb(s,0,n,t,!0),o=[];if(!r||r.next===r.prev)return o;var a,l,h,d,c,u,p;if(i&&(r=UE(s,e,r,t)),s.length>80*t){a=h=s[0],l=d=s[1];for(var f=t;f<n;f+=t)c=s[f],u=s[f+1],c<a&&(a=c),u<l&&(l=u),c>h&&(h=c),u>d&&(d=u);p=Math.max(h-a,d-l),p=p!==0?32767/p:0}return dl(r,o,t,a,l,p,0),o}function Eb(s,e,t,i,n){var r,o;if(n===Fp(s,e,t,i)>0)for(r=e;r<t;r+=i)o=Kb(r,s[r],s[r+1],o);else for(r=t-i;r>=e;r-=i)o=Kb(r,s[r],s[r+1],o);return o&&mh(o,o.next)&&(fl(o),o=o.next),o}function Tr(s,e){if(!s)return s;e||(e=s);var t=s,i;do if(i=!1,!t.steiner&&(mh(t,t.next)||Et(t.prev,t,t.next)===0)){if(fl(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function dl(s,e,t,i,n,r,o){if(s){!o&&r&&iA(s,i,n,r);for(var a=s,l,h;s.prev!==s.next;){if(l=s.prev,h=s.next,r?BE(s,i,n,r):FE(s)){e.push(l.i/t|0),e.push(s.i/t|0),e.push(h.i/t|0),fl(s),s=h.next,a=h.next;continue}if(s=h,s===a){o?o===1?(s=JE(Tr(s),e,t),dl(s,e,t,i,n,r,2)):o===2&&VE(s,e,t,i,n,r):dl(Tr(s),e,t,i,n,r,1);break}}}}function FE(s){var e=s.prev,t=s,i=s.next;if(Et(e,t,i)>=0)return!1;for(var n=e.x,r=t.x,o=i.x,a=e.y,l=t.y,h=i.y,d=n<r?n<o?n:o:r<o?r:o,c=a<l?a<h?a:h:l<h?l:h,u=n>r?n>o?n:o:r>o?r:o,p=a>l?a>h?a:h:l>h?l:h,f=i.next;f!==e;){if(f.x>=d&&f.x<=u&&f.y>=c&&f.y<=p&&ea(n,a,r,l,o,h,f.x,f.y)&&Et(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function BE(s,e,t,i){var n=s.prev,r=s,o=s.next;if(Et(n,r,o)>=0)return!1;for(var a=n.x,l=r.x,h=o.x,d=n.y,c=r.y,u=o.y,p=a<l?a<h?a:h:l<h?l:h,f=d<c?d<u?d:u:c<u?c:u,y=a>l?a>h?a:h:l>h?l:h,m=d>c?d>u?d:u:c>u?c:u,g=Dp(p,f,e,t,i),v=Dp(y,m,e,t,i),b=s.prevZ,x=s.nextZ;b&&b.z>=g&&x&&x.z<=v;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&ea(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&ea(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=g;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&ea(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=v;){if(x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&ea(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function JE(s,e,t){var i=s;do{var n=i.prev,r=i.next.next;!mh(n,r)&&Ab(n,i,i.next,r)&&pl(n,r)&&pl(r,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(r.i/t|0),fl(i),fl(i.next),i=s=r),i=i.next}while(i!==s);return Tr(i)}function VE(s,e,t,i,n,r){var o=s;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&rA(o,a)){var l=Rb(o,a);o=Tr(o,o.next),l=Tr(l,l.next),dl(o,e,t,i,n,r,0),dl(l,e,t,i,n,r,0);return}a=a.next}o=o.next}while(o!==s)}function UE(s,e,t,i){var n=[],r,o,a,l,h;for(r=0,o=e.length;r<o;r++)a=e[r]*i,l=r<o-1?e[r+1]*i:s.length,h=Eb(s,a,l,i,!1),h===h.next&&(h.steiner=!0),n.push(sA(h));for(n.sort(QE),r=0;r<n.length;r++)t=$E(n[r],t);return t}function QE(s,e){return s.x-e.x}function $E(s,e){var t=eA(s,e);if(!t)return e;var i=Rb(t,s);return Tr(i,i.next),Tr(t,t.next)}function eA(s,e){var t=e,i=s.x,n=s.y,r=-1/0,o;do{if(n<=t.y&&n>=t.next.y&&t.next.y!==t.y){var a=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(a<=i&&a>r&&(r=a,o=t.x<t.next.x?t:t.next,a===i))return o}t=t.next}while(t!==e);if(!o)return null;var l=o,h=o.x,d=o.y,c=1/0,u;t=o;do i>=t.x&&t.x>=h&&i!==t.x&&ea(n<d?i:r,n,h,d,n<d?r:i,n,t.x,t.y)&&(u=Math.abs(n-t.y)/(i-t.x),pl(t,s)&&(u<c||u===c&&(t.x>o.x||t.x===o.x&&tA(o,t)))&&(o=t,c=u)),t=t.next;while(t!==l);return o}function tA(s,e){return Et(s.prev,s,e.prev)<0&&Et(e.next,s,s.next)<0}function iA(s,e,t,i){var n=s;do n.z===0&&(n.z=Dp(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==s);n.prevZ.nextZ=null,n.prevZ=null,nA(n)}function nA(s){var e,t,i,n,r,o,a,l,h=1;do{for(t=s,s=null,r=null,o=0;t;){for(o++,i=t,a=0,e=0;e<h&&(a++,i=i.nextZ,!!i);e++);for(l=h;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,a--):(n=i,i=i.nextZ,l--),r?r.nextZ=n:s=n,n.prevZ=r,r=n;t=i}r.nextZ=null,h*=2}while(o>1);return s}function Dp(s,e,t,i,n){return s=(s-t)*n|0,e=(e-i)*n|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function sA(s){var e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function ea(s,e,t,i,n,r,o,a){return(n-o)*(e-a)>=(s-o)*(r-a)&&(s-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(n-o)*(i-a)}function rA(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!oA(s,e)&&(pl(s,e)&&pl(e,s)&&aA(s,e)&&(Et(s.prev,s,e.prev)||Et(s,e.prev,e))||mh(s,e)&&Et(s.prev,s,s.next)>0&&Et(e.prev,e,e.next)>0)}function Et(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function mh(s,e){return s.x===e.x&&s.y===e.y}function Ab(s,e,t,i){var n=yh(Et(s,e,t)),r=yh(Et(s,e,i)),o=yh(Et(t,i,s)),a=yh(Et(t,i,e));return!!(n!==r&&o!==a||n===0&&gh(s,t,e)||r===0&&gh(s,i,e)||o===0&&gh(t,s,i)||a===0&&gh(t,e,i))}function gh(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function yh(s){return s>0?1:s<0?-1:0}function oA(s,e){var t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&Ab(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function pl(s,e){return Et(s.prev,s,s.next)<0?Et(s,e,s.next)>=0&&Et(s,s.prev,e)>=0:Et(s,e,s.prev)<0||Et(s,s.next,e)<0}function aA(s,e){var t=s,i=!1,n=(s.x+e.x)/2,r=(s.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&n<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function Rb(s,e){var t=new jp(s.i,s.x,s.y),i=new jp(e.i,e.x,e.y),n=s.next,r=e.prev;return s.next=e,e.prev=s,t.next=n,n.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function Kb(s,e,t,i){var n=new jp(s,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function fl(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function jp(s,e,t){this.i=s,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}fh.deviation=function(s,e,t,i){var n=e&&e.length,r=n?e[0]*t:s.length,o=Math.abs(Fp(s,0,r,t));if(n)for(var a=0,l=e.length;a<l;a++){var h=e[a]*t,d=a<l-1?e[a+1]*t:s.length;o-=Math.abs(Fp(s,h,d,t))}var c=0;for(a=0;a<i.length;a+=3){var u=i[a]*t,p=i[a+1]*t,f=i[a+2]*t;c+=Math.abs((s[u]-s[f])*(s[p+1]-s[u+1])-(s[u]-s[p])*(s[f+1]-s[u+1]))}return o===0&&c===0?0:Math.abs((c-o)/o)};function Fp(s,e,t,i){for(var n=0,r=e,o=t-i;r<t;r+=i)n+=(s[o]-s[r])*(s[r+1]+s[o+1]),o=r;return n}fh.flatten=function(s){for(var e=s[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,n=0;n<s.length;n++){for(var r=0;r<s[n].length;r++)for(var o=0;o<e;o++)t.vertices.push(s[n][r][o]);n>0&&(i+=s[n-1].length,t.holes.push(i))}return t};var lA=Yp.exports;const cA=pp(lA);var vh={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */vh.exports,function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof ls=="object"&&ls;(r.global===r||r.window===r||r.self===r)&&(t=r);var o,a=2147483647,l=36,h=1,d=26,c=38,u=700,p=72,f=128,y="-",m=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-h,S=Math.floor,T=String.fromCharCode,C;function I(N){throw new RangeError(b[N])}function L(N,H){for(var ee=N.length,Y=[];ee--;)Y[ee]=H(N[ee]);return Y}function M(N,H){var ee=N.split("@"),Y="";ee.length>1&&(Y=ee[0]+"@",N=ee[1]),N=N.replace(v,".");var U=N.split("."),re=L(U,H).join(".");return Y+re}function K(N){for(var H=[],ee=0,Y=N.length,U,re;ee<Y;)U=N.charCodeAt(ee++),U>=55296&&U<=56319&&ee<Y?(re=N.charCodeAt(ee++),(re&64512)==56320?H.push(((U&1023)<<10)+(re&1023)+65536):(H.push(U),ee--)):H.push(U);return H}function P(N){return L(N,function(H){var ee="";return H>65535&&(H-=65536,ee+=T(H>>>10&1023|55296),H=56320|H&1023),ee+=T(H),ee}).join("")}function G(N){return N-48<10?N-22:N-65<26?N-65:N-97<26?N-97:l}function w(N,H){return N+22+75*(N<26)-((H!=0)<<5)}function R(N,H,ee){var Y=0;for(N=ee?S(N/u):N>>1,N+=S(N/H);N>x*d>>1;Y+=l)N=S(N/x);return S(Y+(x+1)*N/(N+c))}function X(N){var H=[],ee=N.length,Y,U=0,re=f,pe=p,ge,we,Pe,Le,Se,k,it,Te,ke;for(ge=N.lastIndexOf(y),ge<0&&(ge=0),we=0;we<ge;++we)N.charCodeAt(we)>=128&&I("not-basic"),H.push(N.charCodeAt(we));for(Pe=ge>0?ge+1:0;Pe<ee;){for(Le=U,Se=1,k=l;Pe>=ee&&I("invalid-input"),it=G(N.charCodeAt(Pe++)),(it>=l||it>S((a-U)/Se))&&I("overflow"),U+=it*Se,Te=k<=pe?h:k>=pe+d?d:k-pe,!(it<Te);k+=l)ke=l-Te,Se>S(a/ke)&&I("overflow"),Se*=ke;Y=H.length+1,pe=R(U-Le,Y,Le==0),S(U/Y)>a-re&&I("overflow"),re+=S(U/Y),U%=Y,H.splice(U++,0,re)}return P(H)}function z(N){var H,ee,Y,U,re,pe,ge,we,Pe,Le,Se,k=[],it,Te,ke,Xe;for(N=K(N),it=N.length,H=f,ee=0,re=p,pe=0;pe<it;++pe)Se=N[pe],Se<128&&k.push(T(Se));for(Y=U=k.length,U&&k.push(y);Y<it;){for(ge=a,pe=0;pe<it;++pe)Se=N[pe],Se>=H&&Se<ge&&(ge=Se);for(Te=Y+1,ge-H>S((a-ee)/Te)&&I("overflow"),ee+=(ge-H)*Te,H=ge,pe=0;pe<it;++pe)if(Se=N[pe],Se<H&&++ee>a&&I("overflow"),Se==H){for(we=ee,Pe=l;Le=Pe<=re?h:Pe>=re+d?d:Pe-re,!(we<Le);Pe+=l)Xe=we-Le,ke=l-Le,k.push(T(w(Le+Xe%ke,0))),we=S(Xe/ke);k.push(T(w(we,0))),re=R(ee,Te,Y==U),ee=0,++Y}++ee,++H}return k.join("")}function J(N){return M(N,function(H){return m.test(H)?X(H.slice(4).toLowerCase()):H})}function D(N){return M(N,function(H){return g.test(H)?"xn--"+z(H):H})}if(o={version:"1.4.1",ucs2:{decode:K,encode:P},decode:X,encode:z,toASCII:D,toUnicode:J},i&&n)if(s.exports==i)n.exports=o;else for(C in o)o.hasOwnProperty(C)&&(i[C]=o[C]);else t.punycode=o})(ls)}(vh,vh.exports);var hA=vh.exports,uA=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},Ob=typeof Symbol<"u"&&Symbol,dA=uA,pA=function(){return typeof Ob!="function"||typeof Symbol!="function"||typeof Ob("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:dA()},qb={foo:{}},fA=Object,mA=function(){return{__proto__:qb}.foo===qb.foo&&!({__proto__:null}instanceof fA)},gA="Function.prototype.bind called on incompatible ",yA=Object.prototype.toString,vA=Math.max,bA="[object Function]",Xb=function(e,t){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var r=0;r<t.length;r+=1)i[r+e.length]=t[r];return i},xA=function(e,t){for(var i=[],n=t||0,r=0;n<e.length;n+=1,r+=1)i[r]=e[n];return i},SA=function(s,e){for(var t="",i=0;i<s.length;i+=1)t+=s[i],i+1<s.length&&(t+=e);return t},LA=function(e){var t=this;if(typeof t!="function"||yA.apply(t)!==bA)throw new TypeError(gA+t);for(var i=xA(arguments,1),n,r=function(){if(this instanceof n){var d=t.apply(this,Xb(i,arguments));return Object(d)===d?d:this}return t.apply(e,Xb(i,arguments))},o=vA(0,t.length-i.length),a=[],l=0;l<o;l++)a[l]="$"+l;if(n=Function("binder","return function ("+SA(a,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n},TA=LA,Bp=Function.prototype.bind||TA,CA=Function.prototype.call,MA=Object.prototype.hasOwnProperty,IA=Bp,wA=IA.call(CA,MA),ht,ta=SyntaxError,zb=Function,ia=TypeError,Jp=function(s){try{return zb('"use strict"; return ('+s+").constructor;")()}catch{}},Cr=Object.getOwnPropertyDescriptor;if(Cr)try{Cr({},"")}catch{Cr=null}var Vp=function(){throw new ia},_A=Cr?function(){try{return arguments.callee,Vp}catch{try{return Cr(arguments,"callee").get}catch{return Vp}}}():Vp,na=pA(),GA=mA(),ti=Object.getPrototypeOf||(GA?function(s){return s.__proto__}:null),sa={},PA=typeof Uint8Array>"u"||!ti?ht:ti(Uint8Array),Mr={"%AggregateError%":typeof AggregateError>"u"?ht:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ht:ArrayBuffer,"%ArrayIteratorPrototype%":na&&ti?ti([][Symbol.iterator]()):ht,"%AsyncFromSyncIteratorPrototype%":ht,"%AsyncFunction%":sa,"%AsyncGenerator%":sa,"%AsyncGeneratorFunction%":sa,"%AsyncIteratorPrototype%":sa,"%Atomics%":typeof Atomics>"u"?ht:Atomics,"%BigInt%":typeof BigInt>"u"?ht:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ht:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ht:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ht:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ht:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ht:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ht:FinalizationRegistry,"%Function%":zb,"%GeneratorFunction%":sa,"%Int8Array%":typeof Int8Array>"u"?ht:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ht:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ht:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":na&&ti?ti(ti([][Symbol.iterator]())):ht,"%JSON%":typeof JSON=="object"?JSON:ht,"%Map%":typeof Map>"u"?ht:Map,"%MapIteratorPrototype%":typeof Map>"u"||!na||!ti?ht:ti(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ht:Promise,"%Proxy%":typeof Proxy>"u"?ht:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ht:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ht:Set,"%SetIteratorPrototype%":typeof Set>"u"||!na||!ti?ht:ti(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ht:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":na&&ti?ti(""[Symbol.iterator]()):ht,"%Symbol%":na?Symbol:ht,"%SyntaxError%":ta,"%ThrowTypeError%":_A,"%TypedArray%":PA,"%TypeError%":ia,"%Uint8Array%":typeof Uint8Array>"u"?ht:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ht:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ht:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ht:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ht:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ht:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ht:WeakSet};if(ti)try{null.error}catch(s){var EA=ti(ti(s));Mr["%Error.prototype%"]=EA}var AA=function s(e){var t;if(e==="%AsyncFunction%")t=Jp("async function () {}");else if(e==="%GeneratorFunction%")t=Jp("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Jp("async function* () {}");else if(e==="%AsyncGenerator%"){var i=s("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=s("%AsyncGenerator%");n&&ti&&(t=ti(n.prototype))}return Mr[e]=t,t},Wb={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ml=Bp,bh=wA,RA=ml.call(Function.call,Array.prototype.concat),KA=ml.call(Function.apply,Array.prototype.splice),Nb=ml.call(Function.call,String.prototype.replace),xh=ml.call(Function.call,String.prototype.slice),OA=ml.call(Function.call,RegExp.prototype.exec),qA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,XA=/\\(\\)?/g,zA=function(e){var t=xh(e,0,1),i=xh(e,-1);if(t==="%"&&i!=="%")throw new ta("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new ta("invalid intrinsic syntax, expected opening `%`");var n=[];return Nb(e,qA,function(r,o,a,l){n[n.length]=a?Nb(l,XA,"$1"):o||r}),n},WA=function(e,t){var i=e,n;if(bh(Wb,i)&&(n=Wb[i],i="%"+n[0]+"%"),bh(Mr,i)){var r=Mr[i];if(r===sa&&(r=AA(i)),typeof r>"u"&&!t)throw new ia("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new ta("intrinsic "+e+" does not exist!")},Ir=function(e,t){if(typeof e!="string"||e.length===0)throw new ia("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ia('"allowMissing" argument must be a boolean');if(OA(/^%?[^%]*%?$/,e)===null)throw new ta("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=zA(e),n=i.length>0?i[0]:"",r=WA("%"+n+"%",t),o=r.name,a=r.value,l=!1,h=r.alias;h&&(n=h[0],KA(i,RA([0,1],h)));for(var d=1,c=!0;d<i.length;d+=1){var u=i[d],p=xh(u,0,1),f=xh(u,-1);if((p==='"'||p==="'"||p==="`"||f==='"'||f==="'"||f==="`")&&p!==f)throw new ta("property names with quotes must have matching quotes");if((u==="constructor"||!c)&&(l=!0),n+="."+u,o="%"+n+"%",bh(Mr,o))a=Mr[o];else if(a!=null){if(!(u in a)){if(!t)throw new ia("base intrinsic for "+e+" exists, but the property is not available.");return}if(Cr&&d+1>=i.length){var y=Cr(a,u);c=!!y,c&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[u]}else c=bh(a,u),a=a[u];c&&!l&&(Mr[o]=a)}}return a},kb={exports:{}},NA=Ir,Up=NA("%Object.defineProperty%",!0),Qp=function(){if(Up)try{return Up({},"a",{value:1}),!0}catch{return!1}return!1};Qp.hasArrayLengthDefineBug=function(){if(!Qp())return null;try{return Up([],"length",{value:1}).length!==1}catch{return!0}};var Hb=Qp,kA=Ir,Sh=kA("%Object.getOwnPropertyDescriptor%",!0);if(Sh)try{Sh([],"length")}catch{Sh=null}var Zb=Sh,HA=Hb(),$p=Ir,gl=HA&&$p("%Object.defineProperty%",!0);if(gl)try{gl({},"a",{value:1})}catch{gl=!1}var ZA=$p("%SyntaxError%"),ra=$p("%TypeError%"),Yb=Zb,YA=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new ra("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ra("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ra("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ra("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ra("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ra("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Yb&&Yb(e,t);if(gl)gl(e,t,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:r===null&&l?l.writable:!r});else if(a||!n&&!r&&!o)e[t]=i;else throw new ZA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Db=Ir,jb=YA,DA=Hb(),Fb=Zb,Bb=Db("%TypeError%"),jA=Db("%Math.floor%"),FA=function(e,t){if(typeof e!="function")throw new Bb("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||jA(t)!==t)throw new Bb("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,r=!0;if("length"in e&&Fb){var o=Fb(e,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(r=!1)}return(n||r||!i)&&(DA?jb(e,"length",t,!0,!0):jb(e,"length",t)),e};(function(s){var e=Bp,t=Ir,i=FA,n=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(o,r),l=t("%Object.defineProperty%",!0),h=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}s.exports=function(u){if(typeof u!="function")throw new n("a function is required");var p=a(e,o,arguments);return i(p,1+h(0,u.length-(arguments.length-1)),!0)};var d=function(){return a(e,r,arguments)};l?l(s.exports,"apply",{value:d}):s.exports.apply=d})(kb);var BA=kb.exports,Jb=Ir,Vb=BA,JA=Vb(Jb("String.prototype.indexOf")),VA=function(e,t){var i=Jb(e,!!t);return typeof i=="function"&&JA(e,".prototype.")>-1?Vb(i):i};const UA=QG(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ef=typeof Map=="function"&&Map.prototype,tf=Object.getOwnPropertyDescriptor&&ef?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Lh=ef&&tf&&typeof tf.get=="function"?tf.get:null,Ub=ef&&Map.prototype.forEach,nf=typeof Set=="function"&&Set.prototype,sf=Object.getOwnPropertyDescriptor&&nf?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Th=nf&&sf&&typeof sf.get=="function"?sf.get:null,Qb=nf&&Set.prototype.forEach,QA=typeof WeakMap=="function"&&WeakMap.prototype,yl=QA?WeakMap.prototype.has:null,$A=typeof WeakSet=="function"&&WeakSet.prototype,vl=$A?WeakSet.prototype.has:null,eR=typeof WeakRef=="function"&&WeakRef.prototype,$b=eR?WeakRef.prototype.deref:null,tR=Boolean.prototype.valueOf,iR=Object.prototype.toString,nR=Function.prototype.toString,sR=String.prototype.match,rf=String.prototype.slice,Xs=String.prototype.replace,rR=String.prototype.toUpperCase,ex=String.prototype.toLowerCase,tx=RegExp.prototype.test,ix=Array.prototype.concat,On=Array.prototype.join,oR=Array.prototype.slice,nx=Math.floor,of=typeof BigInt=="function"?BigInt.prototype.valueOf:null,af=Object.getOwnPropertySymbols,lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,oa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gi=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===oa||!0)?Symbol.toStringTag:null,sx=Object.prototype.propertyIsEnumerable,rx=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function ox(s,e){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||tx.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var i=s<0?-nx(-s):nx(s);if(i!==s){var n=String(i),r=rf.call(e,n.length+1);return Xs.call(n,t,"$&_")+"."+Xs.call(Xs.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Xs.call(e,t,"$&_")}var cf=UA,ax=cf.custom,lx=ux(ax)?ax:null,aR=function s(e,t,i,n){var r=t||{};if(zs(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(zs(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=zs(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(zs(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(zs(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=r.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return px(e,r);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?ox(e,l):l}if(typeof e=="bigint"){var h=String(e)+"n";return a?ox(e,h):h}var d=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return hf(e)?"[Array]":"[Object]";var c=MR(r,i);if(typeof n>"u")n=[];else if(dx(n,e)>=0)return"[Circular]";function u(G,w,R){if(w&&(n=oR.call(n),n.push(w)),R){var X={depth:r.depth};return zs(r,"quoteStyle")&&(X.quoteStyle=r.quoteStyle),s(G,X,i+1,n)}return s(G,r,i+1,n)}if(typeof e=="function"&&!hx(e)){var p=gR(e),f=Ch(e,u);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+On.call(f,", ")+" }":"")}if(ux(e)){var y=oa?Xs.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lf.call(e);return typeof e=="object"&&!oa?bl(y):y}if(LR(e)){for(var m="<"+ex.call(String(e.nodeName)),g=e.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+cx(lR(g[v].value),"double",r);return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+="</"+ex.call(String(e.nodeName))+">",m}if(hf(e)){if(e.length===0)return"[]";var b=Ch(e,u);return c&&!CR(b)?"["+df(b,c)+"]":"[ "+On.call(b,", ")+" ]"}if(hR(e)){var x=Ch(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!sx.call(e,"cause")?"{ ["+String(e)+"] "+On.call(ix.call("[cause]: "+u(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+On.call(x,", ")+" }"}if(typeof e=="object"&&o){if(lx&&typeof e[lx]=="function"&&cf)return cf(e,{depth:d-i});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(yR(e)){var S=[];return Ub&&Ub.call(e,function(G,w){S.push(u(w,e,!0)+" => "+u(G,e))}),fx("Map",Lh.call(e),S,c)}if(xR(e)){var T=[];return Qb&&Qb.call(e,function(G){T.push(u(G,e))}),fx("Set",Th.call(e),T,c)}if(vR(e))return uf("WeakMap");if(SR(e))return uf("WeakSet");if(bR(e))return uf("WeakRef");if(dR(e))return bl(u(Number(e)));if(fR(e))return bl(u(of.call(e)));if(pR(e))return bl(tR.call(e));if(uR(e))return bl(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===ls)return"{ [object globalThis] }";if(!cR(e)&&!hx(e)){var C=Ch(e,u),I=rx?rx(e)===Object.prototype:e instanceof Object||e.constructor===Object,L=e instanceof Object?"":"null prototype",M=!I&&gi&&Object(e)===e&&gi in e?rf.call(Ws(e),8,-1):L?"Object":"",K=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",P=K+(M||L?"["+On.call(ix.call([],M||[],L||[]),": ")+"] ":"");return C.length===0?P+"{}":c?P+"{"+df(C,c)+"}":P+"{ "+On.call(C,", ")+" }"}return String(e)};function cx(s,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+s+i}function lR(s){return Xs.call(String(s),/"/g,""")}function hf(s){return Ws(s)==="[object Array]"&&(!gi||!(typeof s=="object"&&gi in s))}function cR(s){return Ws(s)==="[object Date]"&&(!gi||!(typeof s=="object"&&gi in s))}function hx(s){return Ws(s)==="[object RegExp]"&&(!gi||!(typeof s=="object"&&gi in s))}function hR(s){return Ws(s)==="[object Error]"&&(!gi||!(typeof s=="object"&&gi in s))}function uR(s){return Ws(s)==="[object String]"&&(!gi||!(typeof s=="object"&&gi in s))}function dR(s){return Ws(s)==="[object Number]"&&(!gi||!(typeof s=="object"&&gi in s))}function pR(s){return Ws(s)==="[object Boolean]"&&(!gi||!(typeof s=="object"&&gi in s))}function ux(s){if(oa)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!lf)return!1;try{return lf.call(s),!0}catch{}return!1}function fR(s){if(!s||typeof s!="object"||!of)return!1;try{return of.call(s),!0}catch{}return!1}var mR=Object.prototype.hasOwnProperty||function(s){return s in this};function zs(s,e){return mR.call(s,e)}function Ws(s){return iR.call(s)}function gR(s){if(s.name)return s.name;var e=sR.call(nR.call(s),/^function\s*([\w$]+)/);return e?e[1]:null}function dx(s,e){if(s.indexOf)return s.indexOf(e);for(var t=0,i=s.length;t<i;t++)if(s[t]===e)return t;return-1}function yR(s){if(!Lh||!s||typeof s!="object")return!1;try{Lh.call(s);try{Th.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function vR(s){if(!yl||!s||typeof s!="object")return!1;try{yl.call(s,yl);try{vl.call(s,vl)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function bR(s){if(!$b||!s||typeof s!="object")return!1;try{return $b.call(s),!0}catch{}return!1}function xR(s){if(!Th||!s||typeof s!="object")return!1;try{Th.call(s);try{Lh.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function SR(s){if(!vl||!s||typeof s!="object")return!1;try{vl.call(s,vl);try{yl.call(s,yl)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function LR(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function px(s,e){if(s.length>e.maxStringLength){var t=s.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return px(rf.call(s,0,e.maxStringLength),e)+i}var n=Xs.call(Xs.call(s,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,TR);return cx(n,"single",e)}function TR(s){var e=s.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+rR.call(e.toString(16))}function bl(s){return"Object("+s+")"}function uf(s){return s+" { ? }"}function fx(s,e,t,i){var n=i?df(t,i):On.call(t,", ");return s+" ("+e+") {"+n+"}"}function CR(s){for(var e=0;e<s.length;e++)if(dx(s[e],`
|
|
8061
|
+
}`),this.camera.position.set(10,0,-10),this.camera.lookAt(new A),this.ptRenderer=new O2(this.renderer),this.ptRenderer.camera=this.camera,this.ptRenderer.material=new NG,this.ptRenderer.tiles.set(1,1),this.ptRenderer.material.filterGlossyFactor=.6,this.ptRenderer.material.environmentIntensity=this.renderer.toneMappingExposure,this.ptRenderer.material.backgroundAlpha=0,this.ptRenderer.material.environmentBlur=0,this.ptRenderer.material.bounces=6,this.ptRenderer.material.transmissiveBounces=8,this.ptRenderer.alpha=!0,this.fsQuad=new ss(new Cn({map:this.ptRenderer.target.texture,blending:jm})),this.controls.addEventListener("change",()=>{this.sampleCount=0,this.ptRenderer.reset()}),this._composer=new HG(this.renderer),this._composer.setPixelRatio(window.devicePixelRatio),this._composer.addPass(new T2(this.scene,this.camera)),this._composer.addPass(new _2),this._outlinePass=new rs(new fe(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePass.visibleEdgeColor.set(26367),this._outlinePass.edgeThickness=.5,this._outlinePass.hiddenEdgeColor.set(26367),this._outlinePass.edgeStrength=3,this._outlinePass.edgeGlow=0,this._composer.addPass(this._outlinePass),this._outlinePassError=new rs(new fe(window.innerWidth,window.innerHeight),this.scene,this.camera),this._outlinePassError.visibleEdgeColor.set(16711680),this._outlinePassError.edgeThickness=.5,this._outlinePassError.hiddenEdgeColor.set(16711680),this._outlinePassError.edgeStrength=3,this._outlinePassError.edgeGlow=0,this._composer.addPass(this._outlinePassError),this._composer.renderTarget1.texture.colorSpace=gt,this._composer.renderTarget2.texture.colorSpace=gt,this._fxaaPass=new x0(C2),this._composer.addPass(this._fxaaPass),this.scene.add(this._container),this.ticker(),this._loadEnv(),this._initEvents()}get usePathTracing(){return this._usePathTracing}set usePathTracing(e){e?(this.bodyOpacity=1,this.slots.forEach(t=>t.hide()),this.lines.hide()):(this.slots.forEach(t=>t.show()),this.lines.show(),this.opacityCache!==void 0?(this.bodyOpacity=this.opacityCache,this.opacityCache=void 0):this.bodyOpacity=1),this._usePathTracing=e,this.controls.dampingFactor=e?1:gb,this.sampleCount=0}get slots(){return this._slots}get logos(){return this._logos}get skins(){return this._skins}get fpsAverage(){return wv(this._fpsCache)}set bodyOpacity(e){this._bodyOpacity=e,e<1?this._materialsCache.forEach(t=>{t.mat.transparent=!0,t.mat.opacity=e,t.mat.metalness=0,t.mat.roughness=1,t.mat.color=new Ke("#3859be")}):this._materialsCache.forEach(t=>{t.mat.transparent=t.transparent,t.mat.opacity=t.opacity,t.mat.metalness=t.metalness,t.mat.roughness=t.roughness,t.mat.color=t.color})}get bodyOpacity(){return this._bodyOpacity}changeSkin(e,t){var n;if(!e)return;const i=e.target.name;this.usePathTracing?((n=this.sceneInfo.materials.find(r=>r.name===i))==null||n.color.set(t),this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.sampleCount=0,this.ptRenderer.reset()):e.target.color.set(t)}showState(){this.stats.dom.style.display="block"}hideState(){this.stats.dom.style.display="none"}_loadEnv(){new b2(new h0).load(NE,t=>{t.mapping=Wl,t.minFilter=at,t.magFilter=at,t.colorSpace=gt,t.needsUpdate=!0,this._usePathTracing||(this.scene.environment=t),this.ptRenderer.material.envMapInfo.updateFrom(t),this.ptRenderer.reset()},()=>{},()=>{})}_initEvents(){window.addEventListener("drag",this._drag),window.addEventListener("dragend",this._dragend),document.addEventListener("wheel",this._detectTrackpad),window.addEventListener("pointermove",this._pointermove),this.renderer.domElement.addEventListener("pointerdown",this._pointerdown)}changeLogo(e,t){var r;const i=kE.load(t);i.flipY=!1,i.colorSpace=gt;const n=e.target;n.material&&(Array.isArray(n.material)?n.material.forEach(o=>{var a;(a=o.map)==null||a.dispose(),o.map=i}):((r=n.material.map)==null||r.dispose(),n.material.map=i))}async generateBVH(){this.slots.forEach(h=>h.hide()),this.lines.hide(),this.opacityCache=this.bodyOpacity,this.bodyOpacity=1;const e=new nP;this._container.updateMatrixWorld();const{bvh:t,textures:i,materials:n,lights:r}=await e.generate(this._container);this.sceneInfo={materials:n,textures:i};const o=t.geometry,a=this.ptRenderer.material;a.bvh.updateFrom(t),a.attributesArray.updateFrom(o.attributes.normal,o.attributes.tangent,o.attributes.uv,o.attributes.color),a.materialIndexAttribute.updateFrom(o.attributes.materialIndex);const l=window.devicePixelRatio||1;a.textures.setTextures(this.renderer,1024*l,1024*l,i),a.materials.updateFrom(n,i),a.lights.updateFrom(r),a.lightCount=r.length,this.ptRenderer.material.materials.updateFrom(this.sceneInfo.materials,this.sceneInfo.textures),this.ptRenderer.reset(),this.sampleCount=0,e.dispose(),this.usePathTracing=!0}download(){return this.renderer.domElement.toDataURL("image/png")}clearAMR(){sh(this._container),this._slots=[],this._logos=[],this._skins=[],this._materialsCache.clear(),this.opacityCache=void 0,this.usePathTracing=!1,this.lines.clear()}async exportAMR(){const e=this._container.clone(!0);return e.traverse(t=>{t.dispose&&(t.dispose(),t.removeFromParent())}),await Yv.parseAsync(e,{onlyVisible:!0,binary:!0})}async addAMR(e){!e.startsWith("blob")&&e.endsWith(".sglb");let t;if(e.endsWith(".glb")){let{scene:a}=await rl.loadAsync(e);t=a}else{const l=await new ah({useCache:!0}).loadAsync(e);if(!l.glb)return;t=l.glb}const i=t.clone(!0);i.traverse(a=>{a instanceof jt&&(a.material&&(Array.isArray(a.material)?a.material.forEach(h=>{h.userData.changeColor&&this._skins.push({name:h.userData.name,target:h})}):a.material.userData.changeColor&&this._skins.push({name:a.material.userData.name,target:a.material})),a.userData.isLOGO&&(a.material.transparent=!0,this._logos.push({name:a.userData.name,target:a})));const l=this.generateSlot(a);l&&(this.slots.push(l),a.add(l))}),i.traverse(a=>{if(a instanceof jt&&a.material)if(Array.isArray(a.material))a.material.forEach(h=>{this._materialsCache.set(h.uuid,{opacity:h.opacity,transparent:h.transparent,roughness:h.roughness,metalness:h.metalness,color:h.color,mat:h})});else{const l=a.material;this._materialsCache.set(l.uuid,{opacity:l.opacity,transparent:l.transparent,roughness:l.roughness,metalness:l.metalness,color:l.color,mat:l})}}),i.updateMatrixWorld(!0),this._container.updateMatrixWorld(),this.add(i);const n=new Gt;n.setFromObject(this._container);const r=new A;n.getSize(r);const o=Math.max(r.x,r.y,r.z);this.controls.minDistance=o*2/3,this.controls.maxDistance=o*2}generateSlot(e){if(e.name.startsWith("Slot")){const t=e.userData.name;if(t&&e.userData.isSlot){const i=new Xp({name:t,slot:e});return i.addEventListener(dn.ON_DROP,n=>{this.props.useSound&&this._sound.play()}),i.addEventListener(dn.ON_BEFORE_SELECTED,n=>{this.slots.forEach(r=>{r.selected&&(r.selected=!1)})}),i.addEventListener(dn.ON_ERROR_STATE_CHANGE,n=>{if(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(r=>!!r.parent),n){if(i.device){if(this._outlinePassError.selectedObjects.find(o=>{var a;return o.parent==((a=i.device)==null?void 0:a.parent)}))return;this._outlinePassError.selectedObjects=[i.device,...this._outlinePassError.selectedObjects]}}else i.device&&(this._outlinePassError.selectedObjects=this._outlinePassError.selectedObjects.filter(r=>{var o;return r.parent!=((o=i.device)==null?void 0:o.parent)}))}),i}}}select(e){typeof e=="string"||(Array.isArray(e)?this._outlinePass.selectedObjects=[...e]:this._outlinePass.selectedObjects=[e])}appendTo(e){e.append(this.renderer.domElement),e.append(this.stats.dom),e.append(this.lines),e.append(this.css2dRenderer.domElement),this.stats.dom.style.bottom="0",this.stats.dom.style.top="auto",this.resize(),this._resizeObserver=new ResizeObserver(this.resize),this._resizeObserver.observe(e)}add(e){this._container.add(e)}updatePosition(){this.lines.forceUpdate()}destroy(){var t,i;this.stats.dom.remove(),this._emitter.removeAllListeners(),(t=this._fitAnimation)==null||t.stop(),window.removeEventListener("drag",this._drag),document.removeEventListener("wheel",this._detectTrackpad),window.removeEventListener("pointermove",this._pointermove),this.renderer.domElement.removeEventListener("pointerdown",this._pointerdown);const e=this.renderer.domElement.parentElement;e&&((i=this._resizeObserver)==null||i.unobserve(e)),this.controls.dispose(),this.renderer.dispose(),this._composer.dispose(),this.scene.traverse(n=>{n instanceof jt?(n.geometry.dispose(),Array.isArray(n.material)?n.material.forEach(r=>r.dispose()):n.material&&n.material.dispose()):n instanceof Xp&&n.dispose(),n.removeFromParent()})}}var Lr=(s=>(s[s.WEBGL_LEGACY=0]="WEBGL_LEGACY",s[s.WEBGL=1]="WEBGL",s[s.WEBGL2=2]="WEBGL2",s))(Lr||{}),yb=(s=>(s[s.UNKNOWN=0]="UNKNOWN",s[s.WEBGL=1]="WEBGL",s[s.CANVAS=2]="CANVAS",s))(yb||{}),Np=(s=>(s[s.COLOR=16384]="COLOR",s[s.DEPTH=256]="DEPTH",s[s.STENCIL=1024]="STENCIL",s))(Np||{}),He=(s=>(s[s.NORMAL=0]="NORMAL",s[s.ADD=1]="ADD",s[s.MULTIPLY=2]="MULTIPLY",s[s.SCREEN=3]="SCREEN",s[s.OVERLAY=4]="OVERLAY",s[s.DARKEN=5]="DARKEN",s[s.LIGHTEN=6]="LIGHTEN",s[s.COLOR_DODGE=7]="COLOR_DODGE",s[s.COLOR_BURN=8]="COLOR_BURN",s[s.HARD_LIGHT=9]="HARD_LIGHT",s[s.SOFT_LIGHT=10]="SOFT_LIGHT",s[s.DIFFERENCE=11]="DIFFERENCE",s[s.EXCLUSION=12]="EXCLUSION",s[s.HUE=13]="HUE",s[s.SATURATION=14]="SATURATION",s[s.COLOR=15]="COLOR",s[s.LUMINOSITY=16]="LUMINOSITY",s[s.NORMAL_NPM=17]="NORMAL_NPM",s[s.ADD_NPM=18]="ADD_NPM",s[s.SCREEN_NPM=19]="SCREEN_NPM",s[s.NONE=20]="NONE",s[s.SRC_OVER=0]="SRC_OVER",s[s.SRC_IN=21]="SRC_IN",s[s.SRC_OUT=22]="SRC_OUT",s[s.SRC_ATOP=23]="SRC_ATOP",s[s.DST_OVER=24]="DST_OVER",s[s.DST_IN=25]="DST_IN",s[s.DST_OUT=26]="DST_OUT",s[s.DST_ATOP=27]="DST_ATOP",s[s.ERASE=26]="ERASE",s[s.SUBTRACT=28]="SUBTRACT",s[s.XOR=29]="XOR",s))(He||{}),En=(s=>(s[s.POINTS=0]="POINTS",s[s.LINES=1]="LINES",s[s.LINE_LOOP=2]="LINE_LOOP",s[s.LINE_STRIP=3]="LINE_STRIP",s[s.TRIANGLES=4]="TRIANGLES",s[s.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",s[s.TRIANGLE_FAN=6]="TRIANGLE_FAN",s))(En||{}),se=(s=>(s[s.RGBA=6408]="RGBA",s[s.RGB=6407]="RGB",s[s.RG=33319]="RG",s[s.RED=6403]="RED",s[s.RGBA_INTEGER=36249]="RGBA_INTEGER",s[s.RGB_INTEGER=36248]="RGB_INTEGER",s[s.RG_INTEGER=33320]="RG_INTEGER",s[s.RED_INTEGER=36244]="RED_INTEGER",s[s.ALPHA=6406]="ALPHA",s[s.LUMINANCE=6409]="LUMINANCE",s[s.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",s[s.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",s[s.DEPTH_STENCIL=34041]="DEPTH_STENCIL",s))(se||{}),Qo=(s=>(s[s.TEXTURE_2D=3553]="TEXTURE_2D",s[s.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",s[s.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",s[s.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",s[s.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",s[s.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",s[s.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",s[s.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",s))(Qo||{}),Ae=(s=>(s[s.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",s[s.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",s[s.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",s[s.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",s[s.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",s[s.UNSIGNED_INT=5125]="UNSIGNED_INT",s[s.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",s[s.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",s[s.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",s[s.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",s[s.BYTE=5120]="BYTE",s[s.SHORT=5122]="SHORT",s[s.INT=5124]="INT",s[s.FLOAT=5126]="FLOAT",s[s.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",s[s.HALF_FLOAT=36193]="HALF_FLOAT",s))(Ae||{}),ve=(s=>(s[s.FLOAT=0]="FLOAT",s[s.INT=1]="INT",s[s.UINT=2]="UINT",s))(ve||{}),hs=(s=>(s[s.NEAREST=0]="NEAREST",s[s.LINEAR=1]="LINEAR",s))(hs||{}),qs=(s=>(s[s.CLAMP=33071]="CLAMP",s[s.REPEAT=10497]="REPEAT",s[s.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",s))(qs||{}),An=(s=>(s[s.OFF=0]="OFF",s[s.POW2=1]="POW2",s[s.ON=2]="ON",s[s.ON_MANUAL=3]="ON_MANUAL",s))(An||{}),Gi=(s=>(s[s.NPM=0]="NPM",s[s.UNPACK=1]="UNPACK",s[s.PMA=2]="PMA",s[s.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",s[s.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",s[s.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",s))(Gi||{}),Rn=(s=>(s[s.NO=0]="NO",s[s.YES=1]="YES",s[s.AUTO=2]="AUTO",s[s.BLEND=0]="BLEND",s[s.CLEAR=1]="CLEAR",s[s.BLIT=2]="BLIT",s))(Rn||{}),kp=(s=>(s[s.AUTO=0]="AUTO",s[s.MANUAL=1]="MANUAL",s))(kp||{}),Ui=(s=>(s.LOW="lowp",s.MEDIUM="mediump",s.HIGH="highp",s))(Ui||{}),Jt=(s=>(s[s.NONE=0]="NONE",s[s.SCISSOR=1]="SCISSOR",s[s.STENCIL=2]="STENCIL",s[s.SPRITE=3]="SPRITE",s[s.COLOR=4]="COLOR",s))(Jt||{}),Zt=(s=>(s[s.NONE=0]="NONE",s[s.LOW=2]="LOW",s[s.MEDIUM=4]="MEDIUM",s[s.HIGH=8]="HIGH",s))(Zt||{}),Kn=(s=>(s[s.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",s[s.ARRAY_BUFFER=34962]="ARRAY_BUFFER",s[s.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",s))(Kn||{});const be={ADAPTER:{createCanvas:(s,e)=>{const t=document.createElement("canvas");return t.width=s,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(s,e)=>fetch(s,e),parseXML:s=>new DOMParser().parseFromString(s,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Hp=/iPhone/i,vb=/iPod/i,bb=/iPad/i,xb=/\biOS-universal(?:.+)Mac\b/i,Zp=/\bAndroid(?:.+)Mobile\b/i,Sb=/Android/i,$o=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ph=/Silk/i,us=/Windows Phone/i,Lb=/\bWindows(?:.+)ARM\b/i,Tb=/BlackBerry/i,Cb=/BB10/i,Mb=/Opera Mini/i,Ib=/\b(CriOS|Chrome)(?:.+)Mobile/i,wb=/Mobile(?:.+)Firefox\b/i,_b=function(s){return typeof s<"u"&&s.platform==="MacIntel"&&typeof s.maxTouchPoints=="number"&&s.maxTouchPoints>1&&typeof MSStream>"u"};function YE(s){return function(e){return e.test(s)}}function Gb(s){var e={userAgent:"",platform:"",maxTouchPoints:0};!s&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof s=="string"?e.userAgent=s:s&&s.userAgent&&(e={userAgent:s.userAgent,platform:s.platform,maxTouchPoints:s.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=YE(t),r={apple:{phone:n(Hp)&&!n(us),ipod:n(vb),tablet:!n(Hp)&&(n(bb)||_b(e))&&!n(us),universal:n(xb),device:(n(Hp)||n(vb)||n(bb)||n(xb)||_b(e))&&!n(us)},amazon:{phone:n($o),tablet:!n($o)&&n(ph),device:n($o)||n(ph)},android:{phone:!n(us)&&n($o)||!n(us)&&n(Zp),tablet:!n(us)&&!n($o)&&!n(Zp)&&(n(ph)||n(Sb)),device:!n(us)&&(n($o)||n(ph)||n(Zp)||n(Sb))||n(/\bokhttp\b/i)},windows:{phone:n(us),tablet:n(Lb),device:n(us)||n(Lb)},other:{blackberry:n(Tb),blackberry10:n(Cb),opera:n(Mb),firefox:n(wb),chrome:n(Ib),device:n(Tb)||n(Cb)||n(Mb)||n(wb)||n(Ib)},any:!1,phone:!1,tablet:!1};return r.any=r.apple.device||r.android.device||r.windows.device||r.other.device,r.phone=r.apple.phone||r.android.phone||r.windows.phone,r.tablet=r.apple.tablet||r.android.tablet||r.windows.tablet,r}const DE=Gb.default??Gb,ds=DE(globalThis.navigator);be.RETINA_PREFIX=/@([0-9\.]+)x/,be.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Pb={exports:{}};(function(s){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function n(l,h,d){this.fn=l,this.context=h,this.once=d||!1}function r(l,h,d,c,u){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new n(d,c||l,u),f=t?t+h:h;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],p]:l._events[f].push(p):(l._events[f]=p,l._eventsCount++),l}function o(l,h){--l._eventsCount===0?l._events=new i:delete l._events[h]}function a(){this._events=new i,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],d,c;if(this._eventsCount===0)return h;for(c in d=this._events)e.call(d,c)&&h.push(t?c.slice(1):c);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},a.prototype.listeners=function(h){var d=t?t+h:h,c=this._events[d];if(!c)return[];if(c.fn)return[c.fn];for(var u=0,p=c.length,f=new Array(p);u<p;u++)f[u]=c[u].fn;return f},a.prototype.listenerCount=function(h){var d=t?t+h:h,c=this._events[d];return c?c.fn?1:c.length:0},a.prototype.emit=function(h,d,c,u,p,f){var y=t?t+h:h;if(!this._events[y])return!1;var m=this._events[y],g=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(h,m.fn,void 0,!0),g){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,d),!0;case 3:return m.fn.call(m.context,d,c),!0;case 4:return m.fn.call(m.context,d,c,u),!0;case 5:return m.fn.call(m.context,d,c,u,p),!0;case 6:return m.fn.call(m.context,d,c,u,p,f),!0}for(b=1,v=new Array(g-1);b<g;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var x=m.length,S;for(b=0;b<x;b++)switch(m[b].once&&this.removeListener(h,m[b].fn,void 0,!0),g){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,d);break;case 3:m[b].fn.call(m[b].context,d,c);break;case 4:m[b].fn.call(m[b].context,d,c,u);break;default:if(!v)for(S=1,v=new Array(g-1);S<g;S++)v[S-1]=arguments[S];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(h,d,c){return r(this,h,d,c,!1)},a.prototype.once=function(h,d,c){return r(this,h,d,c,!0)},a.prototype.removeListener=function(h,d,c,u){var p=t?t+h:h;if(!this._events[p])return this;if(!d)return o(this,p),this;var f=this._events[p];if(f.fn)f.fn===d&&(!u||f.once)&&(!c||f.context===c)&&o(this,p);else{for(var y=0,m=[],g=f.length;y<g;y++)(f[y].fn!==d||u&&!f[y].once||c&&f[y].context!==c)&&m.push(f[y]);m.length?this._events[p]=m.length===1?m[0]:m:o(this,p)}return this},a.prototype.removeAllListeners=function(h){var d;return h?(d=t?t+h:h,this._events[d]&&o(this,d)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,s.exports=a})(Pb);var jE=Pb.exports;const ul=pp(jE);var Yp={exports:{}};Yp.exports=fh,Yp.exports.default=fh;function fh(s,e,t){t=t||2;var i=e&&e.length,n=i?e[0]*t:s.length,r=Eb(s,0,n,t,!0),o=[];if(!r||r.next===r.prev)return o;var a,l,h,d,c,u,p;if(i&&(r=UE(s,e,r,t)),s.length>80*t){a=h=s[0],l=d=s[1];for(var f=t;f<n;f+=t)c=s[f],u=s[f+1],c<a&&(a=c),u<l&&(l=u),c>h&&(h=c),u>d&&(d=u);p=Math.max(h-a,d-l),p=p!==0?32767/p:0}return dl(r,o,t,a,l,p,0),o}function Eb(s,e,t,i,n){var r,o;if(n===Fp(s,e,t,i)>0)for(r=e;r<t;r+=i)o=Kb(r,s[r],s[r+1],o);else for(r=t-i;r>=e;r-=i)o=Kb(r,s[r],s[r+1],o);return o&&mh(o,o.next)&&(fl(o),o=o.next),o}function Tr(s,e){if(!s)return s;e||(e=s);var t=s,i;do if(i=!1,!t.steiner&&(mh(t,t.next)||Et(t.prev,t,t.next)===0)){if(fl(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function dl(s,e,t,i,n,r,o){if(s){!o&&r&&iA(s,i,n,r);for(var a=s,l,h;s.prev!==s.next;){if(l=s.prev,h=s.next,r?BE(s,i,n,r):FE(s)){e.push(l.i/t|0),e.push(s.i/t|0),e.push(h.i/t|0),fl(s),s=h.next,a=h.next;continue}if(s=h,s===a){o?o===1?(s=JE(Tr(s),e,t),dl(s,e,t,i,n,r,2)):o===2&&VE(s,e,t,i,n,r):dl(Tr(s),e,t,i,n,r,1);break}}}}function FE(s){var e=s.prev,t=s,i=s.next;if(Et(e,t,i)>=0)return!1;for(var n=e.x,r=t.x,o=i.x,a=e.y,l=t.y,h=i.y,d=n<r?n<o?n:o:r<o?r:o,c=a<l?a<h?a:h:l<h?l:h,u=n>r?n>o?n:o:r>o?r:o,p=a>l?a>h?a:h:l>h?l:h,f=i.next;f!==e;){if(f.x>=d&&f.x<=u&&f.y>=c&&f.y<=p&&ea(n,a,r,l,o,h,f.x,f.y)&&Et(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function BE(s,e,t,i){var n=s.prev,r=s,o=s.next;if(Et(n,r,o)>=0)return!1;for(var a=n.x,l=r.x,h=o.x,d=n.y,c=r.y,u=o.y,p=a<l?a<h?a:h:l<h?l:h,f=d<c?d<u?d:u:c<u?c:u,y=a>l?a>h?a:h:l>h?l:h,m=d>c?d>u?d:u:c>u?c:u,g=Dp(p,f,e,t,i),v=Dp(y,m,e,t,i),b=s.prevZ,x=s.nextZ;b&&b.z>=g&&x&&x.z<=v;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&ea(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0||(b=b.prevZ,x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&ea(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;b&&b.z>=g;){if(b.x>=p&&b.x<=y&&b.y>=f&&b.y<=m&&b!==n&&b!==o&&ea(a,d,l,c,h,u,b.x,b.y)&&Et(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=v;){if(x.x>=p&&x.x<=y&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&ea(a,d,l,c,h,u,x.x,x.y)&&Et(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function JE(s,e,t){var i=s;do{var n=i.prev,r=i.next.next;!mh(n,r)&&Ab(n,i,i.next,r)&&pl(n,r)&&pl(r,n)&&(e.push(n.i/t|0),e.push(i.i/t|0),e.push(r.i/t|0),fl(i),fl(i.next),i=s=r),i=i.next}while(i!==s);return Tr(i)}function VE(s,e,t,i,n,r){var o=s;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&rA(o,a)){var l=Rb(o,a);o=Tr(o,o.next),l=Tr(l,l.next),dl(o,e,t,i,n,r,0),dl(l,e,t,i,n,r,0);return}a=a.next}o=o.next}while(o!==s)}function UE(s,e,t,i){var n=[],r,o,a,l,h;for(r=0,o=e.length;r<o;r++)a=e[r]*i,l=r<o-1?e[r+1]*i:s.length,h=Eb(s,a,l,i,!1),h===h.next&&(h.steiner=!0),n.push(sA(h));for(n.sort(QE),r=0;r<n.length;r++)t=$E(n[r],t);return t}function QE(s,e){return s.x-e.x}function $E(s,e){var t=eA(s,e);if(!t)return e;var i=Rb(t,s);return Tr(i,i.next),Tr(t,t.next)}function eA(s,e){var t=e,i=s.x,n=s.y,r=-1/0,o;do{if(n<=t.y&&n>=t.next.y&&t.next.y!==t.y){var a=t.x+(n-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(a<=i&&a>r&&(r=a,o=t.x<t.next.x?t:t.next,a===i))return o}t=t.next}while(t!==e);if(!o)return null;var l=o,h=o.x,d=o.y,c=1/0,u;t=o;do i>=t.x&&t.x>=h&&i!==t.x&&ea(n<d?i:r,n,h,d,n<d?r:i,n,t.x,t.y)&&(u=Math.abs(n-t.y)/(i-t.x),pl(t,s)&&(u<c||u===c&&(t.x>o.x||t.x===o.x&&tA(o,t)))&&(o=t,c=u)),t=t.next;while(t!==l);return o}function tA(s,e){return Et(s.prev,s,e.prev)<0&&Et(e.next,s,s.next)<0}function iA(s,e,t,i){var n=s;do n.z===0&&(n.z=Dp(n.x,n.y,e,t,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==s);n.prevZ.nextZ=null,n.prevZ=null,nA(n)}function nA(s){var e,t,i,n,r,o,a,l,h=1;do{for(t=s,s=null,r=null,o=0;t;){for(o++,i=t,a=0,e=0;e<h&&(a++,i=i.nextZ,!!i);e++);for(l=h;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(n=t,t=t.nextZ,a--):(n=i,i=i.nextZ,l--),r?r.nextZ=n:s=n,n.prevZ=r,r=n;t=i}r.nextZ=null,h*=2}while(o>1);return s}function Dp(s,e,t,i,n){return s=(s-t)*n|0,e=(e-i)*n|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function sA(s){var e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function ea(s,e,t,i,n,r,o,a){return(n-o)*(e-a)>=(s-o)*(r-a)&&(s-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(n-o)*(i-a)}function rA(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!oA(s,e)&&(pl(s,e)&&pl(e,s)&&aA(s,e)&&(Et(s.prev,s,e.prev)||Et(s,e.prev,e))||mh(s,e)&&Et(s.prev,s,s.next)>0&&Et(e.prev,e,e.next)>0)}function Et(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function mh(s,e){return s.x===e.x&&s.y===e.y}function Ab(s,e,t,i){var n=yh(Et(s,e,t)),r=yh(Et(s,e,i)),o=yh(Et(t,i,s)),a=yh(Et(t,i,e));return!!(n!==r&&o!==a||n===0&&gh(s,t,e)||r===0&&gh(s,i,e)||o===0&&gh(t,s,i)||a===0&&gh(t,e,i))}function gh(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function yh(s){return s>0?1:s<0?-1:0}function oA(s,e){var t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&Ab(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function pl(s,e){return Et(s.prev,s,s.next)<0?Et(s,e,s.next)>=0&&Et(s,s.prev,e)>=0:Et(s,e,s.prev)<0||Et(s,s.next,e)<0}function aA(s,e){var t=s,i=!1,n=(s.x+e.x)/2,r=(s.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&n<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==s);return i}function Rb(s,e){var t=new jp(s.i,s.x,s.y),i=new jp(e.i,e.x,e.y),n=s.next,r=e.prev;return s.next=e,e.prev=s,t.next=n,n.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function Kb(s,e,t,i){var n=new jp(s,e,t);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function fl(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function jp(s,e,t){this.i=s,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}fh.deviation=function(s,e,t,i){var n=e&&e.length,r=n?e[0]*t:s.length,o=Math.abs(Fp(s,0,r,t));if(n)for(var a=0,l=e.length;a<l;a++){var h=e[a]*t,d=a<l-1?e[a+1]*t:s.length;o-=Math.abs(Fp(s,h,d,t))}var c=0;for(a=0;a<i.length;a+=3){var u=i[a]*t,p=i[a+1]*t,f=i[a+2]*t;c+=Math.abs((s[u]-s[f])*(s[p+1]-s[u+1])-(s[u]-s[p])*(s[f+1]-s[u+1]))}return o===0&&c===0?0:Math.abs((c-o)/o)};function Fp(s,e,t,i){for(var n=0,r=e,o=t-i;r<t;r+=i)n+=(s[o]-s[r])*(s[r+1]+s[o+1]),o=r;return n}fh.flatten=function(s){for(var e=s[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,n=0;n<s.length;n++){for(var r=0;r<s[n].length;r++)for(var o=0;o<e;o++)t.vertices.push(s[n][r][o]);n>0&&(i+=s[n-1].length,t.holes.push(i))}return t};var lA=Yp.exports;const cA=pp(lA);var vh={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */vh.exports,function(s,e){(function(t){var i=e&&!e.nodeType&&e,n=s&&!s.nodeType&&s,r=typeof ls=="object"&&ls;(r.global===r||r.window===r||r.self===r)&&(t=r);var o,a=2147483647,l=36,h=1,d=26,c=38,u=700,p=72,f=128,y="-",m=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-h,S=Math.floor,T=String.fromCharCode,C;function I(N){throw new RangeError(b[N])}function L(N,H){for(var ee=N.length,Y=[];ee--;)Y[ee]=H(N[ee]);return Y}function M(N,H){var ee=N.split("@"),Y="";ee.length>1&&(Y=ee[0]+"@",N=ee[1]),N=N.replace(v,".");var U=N.split("."),re=L(U,H).join(".");return Y+re}function K(N){for(var H=[],ee=0,Y=N.length,U,re;ee<Y;)U=N.charCodeAt(ee++),U>=55296&&U<=56319&&ee<Y?(re=N.charCodeAt(ee++),(re&64512)==56320?H.push(((U&1023)<<10)+(re&1023)+65536):(H.push(U),ee--)):H.push(U);return H}function P(N){return L(N,function(H){var ee="";return H>65535&&(H-=65536,ee+=T(H>>>10&1023|55296),H=56320|H&1023),ee+=T(H),ee}).join("")}function G(N){return N-48<10?N-22:N-65<26?N-65:N-97<26?N-97:l}function w(N,H){return N+22+75*(N<26)-((H!=0)<<5)}function R(N,H,ee){var Y=0;for(N=ee?S(N/u):N>>1,N+=S(N/H);N>x*d>>1;Y+=l)N=S(N/x);return S(Y+(x+1)*N/(N+c))}function X(N){var H=[],ee=N.length,Y,U=0,re=f,pe=p,ge,we,Pe,Le,Se,k,it,Te,ke;for(ge=N.lastIndexOf(y),ge<0&&(ge=0),we=0;we<ge;++we)N.charCodeAt(we)>=128&&I("not-basic"),H.push(N.charCodeAt(we));for(Pe=ge>0?ge+1:0;Pe<ee;){for(Le=U,Se=1,k=l;Pe>=ee&&I("invalid-input"),it=G(N.charCodeAt(Pe++)),(it>=l||it>S((a-U)/Se))&&I("overflow"),U+=it*Se,Te=k<=pe?h:k>=pe+d?d:k-pe,!(it<Te);k+=l)ke=l-Te,Se>S(a/ke)&&I("overflow"),Se*=ke;Y=H.length+1,pe=R(U-Le,Y,Le==0),S(U/Y)>a-re&&I("overflow"),re+=S(U/Y),U%=Y,H.splice(U++,0,re)}return P(H)}function z(N){var H,ee,Y,U,re,pe,ge,we,Pe,Le,Se,k=[],it,Te,ke,Xe;for(N=K(N),it=N.length,H=f,ee=0,re=p,pe=0;pe<it;++pe)Se=N[pe],Se<128&&k.push(T(Se));for(Y=U=k.length,U&&k.push(y);Y<it;){for(ge=a,pe=0;pe<it;++pe)Se=N[pe],Se>=H&&Se<ge&&(ge=Se);for(Te=Y+1,ge-H>S((a-ee)/Te)&&I("overflow"),ee+=(ge-H)*Te,H=ge,pe=0;pe<it;++pe)if(Se=N[pe],Se<H&&++ee>a&&I("overflow"),Se==H){for(we=ee,Pe=l;Le=Pe<=re?h:Pe>=re+d?d:Pe-re,!(we<Le);Pe+=l)Xe=we-Le,ke=l-Le,k.push(T(w(Le+Xe%ke,0))),we=S(Xe/ke);k.push(T(w(we,0))),re=R(ee,Te,Y==U),ee=0,++Y}++ee,++H}return k.join("")}function J(N){return M(N,function(H){return m.test(H)?X(H.slice(4).toLowerCase()):H})}function D(N){return M(N,function(H){return g.test(H)?"xn--"+z(H):H})}if(o={version:"1.4.1",ucs2:{decode:K,encode:P},decode:X,encode:z,toASCII:D,toUnicode:J},i&&n)if(s.exports==i)n.exports=o;else for(C in o)o.hasOwnProperty(C)&&(i[C]=o[C]);else t.punycode=o})(ls)}(vh,vh.exports);var hA=vh.exports,uA=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},Ob=typeof Symbol<"u"&&Symbol,dA=uA,pA=function(){return typeof Ob!="function"||typeof Symbol!="function"||typeof Ob("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:dA()},qb={foo:{}},fA=Object,mA=function(){return{__proto__:qb}.foo===qb.foo&&!({__proto__:null}instanceof fA)},gA="Function.prototype.bind called on incompatible ",yA=Object.prototype.toString,vA=Math.max,bA="[object Function]",Xb=function(e,t){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var r=0;r<t.length;r+=1)i[r+e.length]=t[r];return i},xA=function(e,t){for(var i=[],n=t||0,r=0;n<e.length;n+=1,r+=1)i[r]=e[n];return i},SA=function(s,e){for(var t="",i=0;i<s.length;i+=1)t+=s[i],i+1<s.length&&(t+=e);return t},LA=function(e){var t=this;if(typeof t!="function"||yA.apply(t)!==bA)throw new TypeError(gA+t);for(var i=xA(arguments,1),n,r=function(){if(this instanceof n){var d=t.apply(this,Xb(i,arguments));return Object(d)===d?d:this}return t.apply(e,Xb(i,arguments))},o=vA(0,t.length-i.length),a=[],l=0;l<o;l++)a[l]="$"+l;if(n=Function("binder","return function ("+SA(a,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n},TA=LA,Bp=Function.prototype.bind||TA,CA=Function.prototype.call,MA=Object.prototype.hasOwnProperty,IA=Bp,wA=IA.call(CA,MA),ht,ta=SyntaxError,zb=Function,ia=TypeError,Jp=function(s){try{return zb('"use strict"; return ('+s+").constructor;")()}catch{}},Cr=Object.getOwnPropertyDescriptor;if(Cr)try{Cr({},"")}catch{Cr=null}var Vp=function(){throw new ia},_A=Cr?function(){try{return arguments.callee,Vp}catch{try{return Cr(arguments,"callee").get}catch{return Vp}}}():Vp,na=pA(),GA=mA(),ti=Object.getPrototypeOf||(GA?function(s){return s.__proto__}:null),sa={},PA=typeof Uint8Array>"u"||!ti?ht:ti(Uint8Array),Mr={"%AggregateError%":typeof AggregateError>"u"?ht:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ht:ArrayBuffer,"%ArrayIteratorPrototype%":na&&ti?ti([][Symbol.iterator]()):ht,"%AsyncFromSyncIteratorPrototype%":ht,"%AsyncFunction%":sa,"%AsyncGenerator%":sa,"%AsyncGeneratorFunction%":sa,"%AsyncIteratorPrototype%":sa,"%Atomics%":typeof Atomics>"u"?ht:Atomics,"%BigInt%":typeof BigInt>"u"?ht:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ht:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ht:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ht:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ht:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ht:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ht:FinalizationRegistry,"%Function%":zb,"%GeneratorFunction%":sa,"%Int8Array%":typeof Int8Array>"u"?ht:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ht:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ht:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":na&&ti?ti(ti([][Symbol.iterator]())):ht,"%JSON%":typeof JSON=="object"?JSON:ht,"%Map%":typeof Map>"u"?ht:Map,"%MapIteratorPrototype%":typeof Map>"u"||!na||!ti?ht:ti(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ht:Promise,"%Proxy%":typeof Proxy>"u"?ht:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ht:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ht:Set,"%SetIteratorPrototype%":typeof Set>"u"||!na||!ti?ht:ti(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ht:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":na&&ti?ti(""[Symbol.iterator]()):ht,"%Symbol%":na?Symbol:ht,"%SyntaxError%":ta,"%ThrowTypeError%":_A,"%TypedArray%":PA,"%TypeError%":ia,"%Uint8Array%":typeof Uint8Array>"u"?ht:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ht:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ht:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ht:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ht:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ht:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ht:WeakSet};if(ti)try{null.error}catch(s){var EA=ti(ti(s));Mr["%Error.prototype%"]=EA}var AA=function s(e){var t;if(e==="%AsyncFunction%")t=Jp("async function () {}");else if(e==="%GeneratorFunction%")t=Jp("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Jp("async function* () {}");else if(e==="%AsyncGenerator%"){var i=s("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=s("%AsyncGenerator%");n&&ti&&(t=ti(n.prototype))}return Mr[e]=t,t},Wb={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ml=Bp,bh=wA,RA=ml.call(Function.call,Array.prototype.concat),KA=ml.call(Function.apply,Array.prototype.splice),Nb=ml.call(Function.call,String.prototype.replace),xh=ml.call(Function.call,String.prototype.slice),OA=ml.call(Function.call,RegExp.prototype.exec),qA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,XA=/\\(\\)?/g,zA=function(e){var t=xh(e,0,1),i=xh(e,-1);if(t==="%"&&i!=="%")throw new ta("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new ta("invalid intrinsic syntax, expected opening `%`");var n=[];return Nb(e,qA,function(r,o,a,l){n[n.length]=a?Nb(l,XA,"$1"):o||r}),n},WA=function(e,t){var i=e,n;if(bh(Wb,i)&&(n=Wb[i],i="%"+n[0]+"%"),bh(Mr,i)){var r=Mr[i];if(r===sa&&(r=AA(i)),typeof r>"u"&&!t)throw new ia("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new ta("intrinsic "+e+" does not exist!")},Ir=function(e,t){if(typeof e!="string"||e.length===0)throw new ia("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ia('"allowMissing" argument must be a boolean');if(OA(/^%?[^%]*%?$/,e)===null)throw new ta("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=zA(e),n=i.length>0?i[0]:"",r=WA("%"+n+"%",t),o=r.name,a=r.value,l=!1,h=r.alias;h&&(n=h[0],KA(i,RA([0,1],h)));for(var d=1,c=!0;d<i.length;d+=1){var u=i[d],p=xh(u,0,1),f=xh(u,-1);if((p==='"'||p==="'"||p==="`"||f==='"'||f==="'"||f==="`")&&p!==f)throw new ta("property names with quotes must have matching quotes");if((u==="constructor"||!c)&&(l=!0),n+="."+u,o="%"+n+"%",bh(Mr,o))a=Mr[o];else if(a!=null){if(!(u in a)){if(!t)throw new ia("base intrinsic for "+e+" exists, but the property is not available.");return}if(Cr&&d+1>=i.length){var y=Cr(a,u);c=!!y,c&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[u]}else c=bh(a,u),a=a[u];c&&!l&&(Mr[o]=a)}}return a},kb={exports:{}},NA=Ir,Up=NA("%Object.defineProperty%",!0),Qp=function(){if(Up)try{return Up({},"a",{value:1}),!0}catch{return!1}return!1};Qp.hasArrayLengthDefineBug=function(){if(!Qp())return null;try{return Up([],"length",{value:1}).length!==1}catch{return!0}};var Hb=Qp,kA=Ir,Sh=kA("%Object.getOwnPropertyDescriptor%",!0);if(Sh)try{Sh([],"length")}catch{Sh=null}var Zb=Sh,HA=Hb(),$p=Ir,gl=HA&&$p("%Object.defineProperty%",!0);if(gl)try{gl({},"a",{value:1})}catch{gl=!1}var ZA=$p("%SyntaxError%"),ra=$p("%TypeError%"),Yb=Zb,YA=function(e,t,i){if(!e||typeof e!="object"&&typeof e!="function")throw new ra("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ra("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ra("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ra("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ra("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ra("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Yb&&Yb(e,t);if(gl)gl(e,t,{configurable:o===null&&l?l.configurable:!o,enumerable:n===null&&l?l.enumerable:!n,value:i,writable:r===null&&l?l.writable:!r});else if(a||!n&&!r&&!o)e[t]=i;else throw new ZA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Db=Ir,jb=YA,DA=Hb(),Fb=Zb,Bb=Db("%TypeError%"),jA=Db("%Math.floor%"),FA=function(e,t){if(typeof e!="function")throw new Bb("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||jA(t)!==t)throw new Bb("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,r=!0;if("length"in e&&Fb){var o=Fb(e,"length");o&&!o.configurable&&(n=!1),o&&!o.writable&&(r=!1)}return(n||r||!i)&&(DA?jb(e,"length",t,!0,!0):jb(e,"length",t)),e};(function(s){var e=Bp,t=Ir,i=FA,n=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(o,r),l=t("%Object.defineProperty%",!0),h=t("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}s.exports=function(u){if(typeof u!="function")throw new n("a function is required");var p=a(e,o,arguments);return i(p,1+h(0,u.length-(arguments.length-1)),!0)};var d=function(){return a(e,r,arguments)};l?l(s.exports,"apply",{value:d}):s.exports.apply=d})(kb);var BA=kb.exports,Jb=Ir,Vb=BA,JA=Vb(Jb("String.prototype.indexOf")),VA=function(e,t){var i=Jb(e,!!t);return typeof i=="function"&&JA(e,".prototype.")>-1?Vb(i):i};const UA=QG(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ef=typeof Map=="function"&&Map.prototype,tf=Object.getOwnPropertyDescriptor&&ef?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Lh=ef&&tf&&typeof tf.get=="function"?tf.get:null,Ub=ef&&Map.prototype.forEach,nf=typeof Set=="function"&&Set.prototype,sf=Object.getOwnPropertyDescriptor&&nf?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Th=nf&&sf&&typeof sf.get=="function"?sf.get:null,Qb=nf&&Set.prototype.forEach,QA=typeof WeakMap=="function"&&WeakMap.prototype,yl=QA?WeakMap.prototype.has:null,$A=typeof WeakSet=="function"&&WeakSet.prototype,vl=$A?WeakSet.prototype.has:null,eR=typeof WeakRef=="function"&&WeakRef.prototype,$b=eR?WeakRef.prototype.deref:null,tR=Boolean.prototype.valueOf,iR=Object.prototype.toString,nR=Function.prototype.toString,sR=String.prototype.match,rf=String.prototype.slice,Xs=String.prototype.replace,rR=String.prototype.toUpperCase,ex=String.prototype.toLowerCase,tx=RegExp.prototype.test,ix=Array.prototype.concat,On=Array.prototype.join,oR=Array.prototype.slice,nx=Math.floor,of=typeof BigInt=="function"?BigInt.prototype.valueOf:null,af=Object.getOwnPropertySymbols,lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,oa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",gi=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===oa||!0)?Symbol.toStringTag:null,sx=Object.prototype.propertyIsEnumerable,rx=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(s){return s.__proto__}:null);function ox(s,e){if(s===1/0||s===-1/0||s!==s||s&&s>-1e3&&s<1e3||tx.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof s=="number"){var i=s<0?-nx(-s):nx(s);if(i!==s){var n=String(i),r=rf.call(e,n.length+1);return Xs.call(n,t,"$&_")+"."+Xs.call(Xs.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Xs.call(e,t,"$&_")}var cf=UA,ax=cf.custom,lx=ux(ax)?ax:null,aR=function s(e,t,i,n){var r=t||{};if(zs(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(zs(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=zs(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(zs(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(zs(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=r.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return px(e,r);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?ox(e,l):l}if(typeof e=="bigint"){var h=String(e)+"n";return a?ox(e,h):h}var d=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=d&&d>0&&typeof e=="object")return hf(e)?"[Array]":"[Object]";var c=MR(r,i);if(typeof n>"u")n=[];else if(dx(n,e)>=0)return"[Circular]";function u(G,w,R){if(w&&(n=oR.call(n),n.push(w)),R){var X={depth:r.depth};return zs(r,"quoteStyle")&&(X.quoteStyle=r.quoteStyle),s(G,X,i+1,n)}return s(G,r,i+1,n)}if(typeof e=="function"&&!hx(e)){var p=gR(e),f=Ch(e,u);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(f.length>0?" { "+On.call(f,", ")+" }":"")}if(ux(e)){var y=oa?Xs.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lf.call(e);return typeof e=="object"&&!oa?bl(y):y}if(LR(e)){for(var m="<"+ex.call(String(e.nodeName)),g=e.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+cx(lR(g[v].value),"double",r);return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+="</"+ex.call(String(e.nodeName))+">",m}if(hf(e)){if(e.length===0)return"[]";var b=Ch(e,u);return c&&!CR(b)?"["+df(b,c)+"]":"[ "+On.call(b,", ")+" ]"}if(hR(e)){var x=Ch(e,u);return!("cause"in Error.prototype)&&"cause"in e&&!sx.call(e,"cause")?"{ ["+String(e)+"] "+On.call(ix.call("[cause]: "+u(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+On.call(x,", ")+" }"}if(typeof e=="object"&&o){if(lx&&typeof e[lx]=="function"&&cf)return cf(e,{depth:d-i});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(yR(e)){var S=[];return Ub&&Ub.call(e,function(G,w){S.push(u(w,e,!0)+" => "+u(G,e))}),fx("Map",Lh.call(e),S,c)}if(xR(e)){var T=[];return Qb&&Qb.call(e,function(G){T.push(u(G,e))}),fx("Set",Th.call(e),T,c)}if(vR(e))return uf("WeakMap");if(SR(e))return uf("WeakSet");if(bR(e))return uf("WeakRef");if(dR(e))return bl(u(Number(e)));if(fR(e))return bl(u(of.call(e)));if(pR(e))return bl(tR.call(e));if(uR(e))return bl(u(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===ls)return"{ [object globalThis] }";if(!cR(e)&&!hx(e)){var C=Ch(e,u),I=rx?rx(e)===Object.prototype:e instanceof Object||e.constructor===Object,L=e instanceof Object?"":"null prototype",M=!I&&gi&&Object(e)===e&&gi in e?rf.call(Ws(e),8,-1):L?"Object":"",K=I||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",P=K+(M||L?"["+On.call(ix.call([],M||[],L||[]),": ")+"] ":"");return C.length===0?P+"{}":c?P+"{"+df(C,c)+"}":P+"{ "+On.call(C,", ")+" }"}return String(e)};function cx(s,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+s+i}function lR(s){return Xs.call(String(s),/"/g,""")}function hf(s){return Ws(s)==="[object Array]"&&(!gi||!(typeof s=="object"&&gi in s))}function cR(s){return Ws(s)==="[object Date]"&&(!gi||!(typeof s=="object"&&gi in s))}function hx(s){return Ws(s)==="[object RegExp]"&&(!gi||!(typeof s=="object"&&gi in s))}function hR(s){return Ws(s)==="[object Error]"&&(!gi||!(typeof s=="object"&&gi in s))}function uR(s){return Ws(s)==="[object String]"&&(!gi||!(typeof s=="object"&&gi in s))}function dR(s){return Ws(s)==="[object Number]"&&(!gi||!(typeof s=="object"&&gi in s))}function pR(s){return Ws(s)==="[object Boolean]"&&(!gi||!(typeof s=="object"&&gi in s))}function ux(s){if(oa)return s&&typeof s=="object"&&s instanceof Symbol;if(typeof s=="symbol")return!0;if(!s||typeof s!="object"||!lf)return!1;try{return lf.call(s),!0}catch{}return!1}function fR(s){if(!s||typeof s!="object"||!of)return!1;try{return of.call(s),!0}catch{}return!1}var mR=Object.prototype.hasOwnProperty||function(s){return s in this};function zs(s,e){return mR.call(s,e)}function Ws(s){return iR.call(s)}function gR(s){if(s.name)return s.name;var e=sR.call(nR.call(s),/^function\s*([\w$]+)/);return e?e[1]:null}function dx(s,e){if(s.indexOf)return s.indexOf(e);for(var t=0,i=s.length;t<i;t++)if(s[t]===e)return t;return-1}function yR(s){if(!Lh||!s||typeof s!="object")return!1;try{Lh.call(s);try{Th.call(s)}catch{return!0}return s instanceof Map}catch{}return!1}function vR(s){if(!yl||!s||typeof s!="object")return!1;try{yl.call(s,yl);try{vl.call(s,vl)}catch{return!0}return s instanceof WeakMap}catch{}return!1}function bR(s){if(!$b||!s||typeof s!="object")return!1;try{return $b.call(s),!0}catch{}return!1}function xR(s){if(!Th||!s||typeof s!="object")return!1;try{Th.call(s);try{Lh.call(s)}catch{return!0}return s instanceof Set}catch{}return!1}function SR(s){if(!vl||!s||typeof s!="object")return!1;try{vl.call(s,vl);try{yl.call(s,yl)}catch{return!0}return s instanceof WeakSet}catch{}return!1}function LR(s){return!s||typeof s!="object"?!1:typeof HTMLElement<"u"&&s instanceof HTMLElement?!0:typeof s.nodeName=="string"&&typeof s.getAttribute=="function"}function px(s,e){if(s.length>e.maxStringLength){var t=s.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return px(rf.call(s,0,e.maxStringLength),e)+i}var n=Xs.call(Xs.call(s,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,TR);return cx(n,"single",e)}function TR(s){var e=s.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+rR.call(e.toString(16))}function bl(s){return"Object("+s+")"}function uf(s){return s+" { ? }"}function fx(s,e,t,i){var n=i?df(t,i):On.call(t,", ");return s+" ("+e+") {"+n+"}"}function CR(s){for(var e=0;e<s.length;e++)if(dx(s[e],`
|
|
8062
8062
|
`)>=0)return!1;return!0}function MR(s,e){var t;if(s.indent===" ")t=" ";else if(typeof s.indent=="number"&&s.indent>0)t=On.call(Array(s.indent+1)," ");else return null;return{base:t,prev:On.call(Array(e+1),t)}}function df(s,e){if(s.length===0)return"";var t=`
|
|
8063
8063
|
`+e.prev+e.base;return t+On.call(s,","+t)+`
|
|
8064
8064
|
`+e.prev}function Ch(s,e){var t=hf(s),i=[];if(t){i.length=s.length;for(var n=0;n<s.length;n++)i[n]=zs(s,n)?e(s[n],s):""}var r=typeof af=="function"?af(s):[],o;if(oa){o={};for(var a=0;a<r.length;a++)o["$"+r[a]]=r[a]}for(var l in s)zs(s,l)&&(t&&String(Number(l))===l&&l<s.length||oa&&o["$"+l]instanceof Symbol||(tx.call(/[^\w$]/,l)?i.push(e(l,s)+": "+e(s[l],s)):i.push(l+": "+e(s[l],s))));if(typeof af=="function")for(var h=0;h<r.length;h++)sx.call(s,r[h])&&i.push("["+e(r[h])+"]: "+e(s[r[h]],s));return i}var pf=Ir,aa=VA,IR=aR,wR=pf("%TypeError%"),Mh=pf("%WeakMap%",!0),Ih=pf("%Map%",!0),_R=aa("WeakMap.prototype.get",!0),GR=aa("WeakMap.prototype.set",!0),PR=aa("WeakMap.prototype.has",!0),ER=aa("Map.prototype.get",!0),AR=aa("Map.prototype.set",!0),RR=aa("Map.prototype.has",!0),ff=function(s,e){for(var t=s,i;(i=t.next)!==null;t=i)if(i.key===e)return t.next=i.next,i.next=s.next,s.next=i,i},KR=function(s,e){var t=ff(s,e);return t&&t.value},OR=function(s,e,t){var i=ff(s,e);i?i.value=t:s.next={key:e,next:s.next,value:t}},qR=function(s,e){return!!ff(s,e)},XR=function(){var e,t,i,n={assert:function(r){if(!n.has(r))throw new wR("Side channel does not contain "+IR(r))},get:function(r){if(Mh&&r&&(typeof r=="object"||typeof r=="function")){if(e)return _R(e,r)}else if(Ih){if(t)return ER(t,r)}else if(i)return KR(i,r)},has:function(r){if(Mh&&r&&(typeof r=="object"||typeof r=="function")){if(e)return PR(e,r)}else if(Ih){if(t)return RR(t,r)}else if(i)return qR(i,r);return!1},set:function(r,o){Mh&&r&&(typeof r=="object"||typeof r=="function")?(e||(e=new Mh),GR(e,r,o)):Ih?(t||(t=new Ih),AR(t,r,o)):(i||(i={key:{},next:null}),OR(i,r,o))}};return n},zR=String.prototype.replace,WR=/%20/g,mf={RFC1738:"RFC1738",RFC3986:"RFC3986"},gf={default:mf.RFC3986,formatters:{RFC1738:function(s){return zR.call(s,WR,"+")},RFC3986:function(s){return String(s)}},RFC1738:mf.RFC1738,RFC3986:mf.RFC3986},NR=gf,yf=Object.prototype.hasOwnProperty,wr=Array.isArray,qn=function(){for(var s=[],e=0;e<256;++e)s.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return s}(),kR=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(wr(i)){for(var n=[],r=0;r<i.length;++r)typeof i[r]<"u"&&n.push(i[r]);t.obj[t.prop]=n}}},mx=function(e,t){for(var i=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)typeof e[n]<"u"&&(i[n]=e[n]);return i},HR=function s(e,t,i){if(!t)return e;if(typeof t!="object"){if(wr(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!yf.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return wr(e)&&!wr(t)&&(n=mx(e,i)),wr(e)&&wr(t)?(t.forEach(function(r,o){if(yf.call(e,o)){var a=e[o];a&&typeof a=="object"&&r&&typeof r=="object"?e[o]=s(a,r,i):e.push(r)}else e[o]=r}),e):Object.keys(t).reduce(function(r,o){var a=t[o];return yf.call(r,o)?r[o]=s(r[o],a,i):r[o]=a,r},n)},ZR=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},YR=function(s,e,t){var i=s.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},DR=function(e,t,i,n,r){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),i==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<o.length;++l){var h=o.charCodeAt(l);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||r===NR.RFC1738&&(h===40||h===41)){a+=o.charAt(l);continue}if(h<128){a=a+qn[h];continue}if(h<2048){a=a+(qn[192|h>>6]+qn[128|h&63]);continue}if(h<55296||h>=57344){a=a+(qn[224|h>>12]+qn[128|h>>6&63]+qn[128|h&63]);continue}l+=1,h=65536+((h&1023)<<10|o.charCodeAt(l)&1023),a+=qn[240|h>>18]+qn[128|h>>12&63]+qn[128|h>>6&63]+qn[128|h&63]}return a},jR=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var r=t[n],o=r.obj[r.prop],a=Object.keys(o),l=0;l<a.length;++l){var h=a[l],d=o[h];typeof d=="object"&&d!==null&&i.indexOf(d)===-1&&(t.push({obj:o,prop:h}),i.push(d))}return kR(t),e},FR=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},BR=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},JR=function(e,t){return[].concat(e,t)},VR=function(e,t){if(wr(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},gx={arrayToObject:mx,assign:ZR,combine:JR,compact:jR,decode:YR,encode:DR,isBuffer:BR,isRegExp:FR,maybeMap:VR,merge:HR},yx=XR,wh=gx,xl=gf,UR=Object.prototype.hasOwnProperty,vx={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ps=Array.isArray,QR=Array.prototype.push,bx=function(s,e){QR.apply(s,ps(e)?e:[e])},$R=Date.prototype.toISOString,xx=xl.default,yi={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:wh.encode,encodeValuesOnly:!1,format:xx,formatter:xl.formatters[xx],indices:!1,serializeDate:function(e){return $R.call(e)},skipNulls:!1,strictNullHandling:!1},e5=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},vf={},t5=function s(e,t,i,n,r,o,a,l,h,d,c,u,p,f,y,m){for(var g=e,v=m,b=0,x=!1;(v=v.get(vf))!==void 0&&!x;){var S=v.get(e);if(b+=1,typeof S<"u"){if(S===b)throw new RangeError("Cyclic object value");x=!0}typeof v.get(vf)>"u"&&(b=0)}if(typeof l=="function"?g=l(t,g):g instanceof Date?g=c(g):i==="comma"&&ps(g)&&(g=wh.maybeMap(g,function(X){return X instanceof Date?c(X):X})),g===null){if(r)return a&&!f?a(t,yi.encoder,y,"key",u):t;g=""}if(e5(g)||wh.isBuffer(g)){if(a){var T=f?t:a(t,yi.encoder,y,"key",u);return[p(T)+"="+p(a(g,yi.encoder,y,"value",u))]}return[p(t)+"="+p(String(g))]}var C=[];if(typeof g>"u")return C;var I;if(i==="comma"&&ps(g))f&&a&&(g=wh.maybeMap(g,a)),I=[{value:g.length>0?g.join(",")||null:void 0}];else if(ps(l))I=l;else{var L=Object.keys(g);I=h?L.sort(h):L}for(var M=n&&ps(g)&&g.length===1?t+"[]":t,K=0;K<I.length;++K){var P=I[K],G=typeof P=="object"&&typeof P.value<"u"?P.value:g[P];if(!(o&&G===null)){var w=ps(g)?typeof i=="function"?i(M,P):M:M+(d?"."+P:"["+P+"]");m.set(e,b);var R=yx();R.set(vf,m),bx(C,s(G,w,i,n,r,o,i==="comma"&&f&&ps(g)?null:a,l,h,d,c,u,p,f,y,R))}}return C},i5=function(e){if(!e)return yi;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||yi.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=xl.default;if(typeof e.format<"u"){if(!UR.call(xl.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=xl.formatters[i],r=yi.filter;return(typeof e.filter=="function"||ps(e.filter))&&(r=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:yi.addQueryPrefix,allowDots:typeof e.allowDots>"u"?yi.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:yi.charsetSentinel,delimiter:typeof e.delimiter>"u"?yi.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:yi.encode,encoder:typeof e.encoder=="function"?e.encoder:yi.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:yi.encodeValuesOnly,filter:r,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:yi.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:yi.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:yi.strictNullHandling}},n5=function(s,e){var t=s,i=i5(e),n,r;typeof i.filter=="function"?(r=i.filter,t=r("",t)):ps(i.filter)&&(r=i.filter,n=r);var o=[];if(typeof t!="object"||t===null)return"";var a;e&&e.arrayFormat in vx?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var l=vx[a];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=l==="comma"&&e&&e.commaRoundTrip;n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var d=yx(),c=0;c<n.length;++c){var u=n[c];i.skipNulls&&t[u]===null||bx(o,t5(t[u],u,l,h,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,d))}var p=o.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),p.length>0?f+p:""},la=gx,bf=Object.prototype.hasOwnProperty,s5=Array.isArray,ii={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:la.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},r5=function(s){return s.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Sx=function(s,e){return s&&typeof s=="string"&&e.comma&&s.indexOf(",")>-1?s.split(","):s},o5="utf8=%26%2310003%3B",a5="utf8=%E2%9C%93",l5=function(e,t){var i={__proto__:null},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,r=t.parameterLimit===1/0?void 0:t.parameterLimit,o=n.split(t.delimiter,r),a=-1,l,h=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===a5?h="utf-8":o[l]===o5&&(h="iso-8859-1"),a=l,l=o.length);for(l=0;l<o.length;++l)if(l!==a){var d=o[l],c=d.indexOf("]="),u=c===-1?d.indexOf("="):c+1,p,f;u===-1?(p=t.decoder(d,ii.decoder,h,"key"),f=t.strictNullHandling?null:""):(p=t.decoder(d.slice(0,u),ii.decoder,h,"key"),f=la.maybeMap(Sx(d.slice(u+1),t),function(y){return t.decoder(y,ii.decoder,h,"value")})),f&&t.interpretNumericEntities&&h==="iso-8859-1"&&(f=r5(f)),d.indexOf("[]=")>-1&&(f=s5(f)?[f]:f),bf.call(i,p)?i[p]=la.combine(i[p],f):i[p]=f}return i},c5=function(s,e,t,i){for(var n=i?e:Sx(e,t),r=s.length-1;r>=0;--r){var o,a=s[r];if(a==="[]"&&t.parseArrays)o=[].concat(n);else{o=t.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,h=parseInt(l,10);!t.parseArrays&&l===""?o={0:n}:!isNaN(h)&&a!==l&&String(h)===l&&h>=0&&t.parseArrays&&h<=t.arrayLimit?(o=[],o[h]=n):l!=="__proto__"&&(o[l]=n)}n=o}return n},h5=function(e,t,i,n){if(e){var r=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.depth>0&&o.exec(r),h=l?r.slice(0,l.index):r,d=[];if(h){if(!i.plainObjects&&bf.call(Object.prototype,h)&&!i.allowPrototypes)return;d.push(h)}for(var c=0;i.depth>0&&(l=a.exec(r))!==null&&c<i.depth;){if(c+=1,!i.plainObjects&&bf.call(Object.prototype,l[1].slice(1,-1))&&!i.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+r.slice(l.index)+"]"),c5(d,t,i,n)}},u5=function(e){if(!e)return ii;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?ii.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?ii.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:ii.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:ii.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:ii.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:ii.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:ii.comma,decoder:typeof e.decoder=="function"?e.decoder:ii.decoder,delimiter:typeof e.delimiter=="string"||la.isRegExp(e.delimiter)?e.delimiter:ii.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:ii.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:ii.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:ii.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:ii.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:ii.strictNullHandling}},d5=function(s,e){var t=u5(e);if(s===""||s===null||typeof s>"u")return t.plainObjects?Object.create(null):{};for(var i=typeof s=="string"?l5(s,t):s,n=t.plainObjects?Object.create(null):{},r=Object.keys(i),o=0;o<r.length;++o){var a=r[o],l=h5(a,i[a],t,typeof s=="string");n=la.merge(n,l,t)}return t.allowSparse===!0?n:la.compact(n)},p5=n5,f5=d5,m5=gf,g5={formats:m5,parse:f5,stringify:p5},y5=hA;function fs(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var v5=/^([a-z0-9.+-]+:)/i,b5=/:[0-9]*$/,x5=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,S5=["<",">",'"',"`"," ","\r",`
|