@arcgis/core 5.2.0-next.152 → 5.2.0-next.154
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/arcade/containerUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/portal.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcgisGlobal.d.ts +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05b34302da58e8244da3.js +1 -0
- package/assets/esri/core/workers/chunks/47e250d471d0e55fa6be.js +1 -0
- package/assets/esri/core/workers/chunks/{a07cb6a2f5b66d4e9f15.js → 53e2f2b922116a45fe8f.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc486a3595b6d57018bb.js → 5bfea0c55aca826de536.js} +1 -1
- package/assets/esri/core/workers/chunks/67ebc5a3d46b254b725c.js +1 -0
- package/assets/esri/core/workers/chunks/{6e62581d933e7298d1f6.js → 6f4e6022a52de0c54aab.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c4e0a7384e40979cb42.js → 7e0cf70c0eb5a2ddfcec.js} +1 -1
- package/assets/esri/core/workers/chunks/{3cc43ae56779a9f97f77.js → 917f53833b853898facc.js} +1 -1
- package/assets/esri/core/workers/chunks/{9232f57623e1fa3ccabc.js → be5f92e98d09d6e6e38e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7f3576208f295b670d6.js → c19cd5a03b6d480fe53b.js} +1 -1
- package/assets/esri/core/workers/chunks/d33360c4f85203edafff.js +1 -0
- package/assets/esri/core/workers/chunks/{dca35dbe427605ef6fcc.js → e01aeac34474540f61ee.js} +1 -1
- package/assets/esri/core/workers/chunks/{b19b6102ed2d6f67b43b.js → e15ba90af0faf873b42d.js} +1 -1
- package/assets/esri/core/workers/chunks/eb815148ae65388dd733.js +1 -0
- package/assets/esri/core/workers/chunks/ee6679ef9efa1504e7eb.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +2 -2
- package/chunks/portal.js +1 -1
- package/config.js +1 -1
- package/form/elements/inputs/DynamicChoiceInput.d.ts +4 -2
- package/geometry/support/meshUtils.d.ts +5 -6
- package/interfaces.d.ts +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeospatialPDFLayer.d.ts +154 -4
- package/layers/Layer.d.ts +2 -0
- package/layers/SketchLayer.d.ts +4 -2
- package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
- package/layers/geospatialPDF/projectionToWKTUtils.js +2 -2
- package/layers/support/LabelClass.d.ts +3 -2
- package/layers/support/PortalItemData.d.ts +31 -8
- package/layers/support/{TimeSeriesCalculation.d.ts → TimeSeriesCalculationMethod.d.ts} +6 -6
- package/layers/support/{TimeSeriesCalculation.js → TimeSeriesCalculationMethod.js} +1 -1
- package/layers/support/TimeSeriesInfo.d.ts +5 -5
- package/layers/support/TimeSeriesInfo.js +1 -1
- package/layers/support/timeSeriesUtils.d.ts +6 -2
- package/layers/support/timeSeriesUtils.js +1 -1
- package/layers/support/types.d.ts +4 -1
- package/package.json +2 -2
- package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
- package/smartMapping/statistics/support/timeSeriesUtils.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/raster/Projection.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/draw/plugins/MultipointPlugin.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/assets/esri/core/workers/chunks/21f45a47708e6e43147f.js +0 -1
- package/assets/esri/core/workers/chunks/2ecfaa715863216f0faf.js +0 -1
- package/assets/esri/core/workers/chunks/3e8eb158320f0e4ce1b6.js +0 -1
- package/assets/esri/core/workers/chunks/7320a4913b6cad7cc5d7.js +0 -1
- package/assets/esri/core/workers/chunks/9e142551163acf752618.js +0 -1
- package/assets/esri/core/workers/chunks/f095cf98940e3f95d51e.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3390],{3390(n,e,t){t.r(e),t.d(e,{registerFunctions:()=>u});var a=t(67862),r=t(85935),i=t(78878),o=t(54218);function u(n){"async"===n.mode&&(n.functions.domain=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,o)=>{if((0,i.E)(o,2,3,t),(0,i.h)(o[0])){let n=(0,i.W)(o[0],(0,i.w)(o[1]),void 0===o[2]?void 0:o[2]);return(0,a.OT)(n)}if((0,i.k)(o[0])){await o[0]._ensureLoaded();let n=(0,i.a6)((0,i.w)(o[1]),o[0],null,void 0===o[2]?void 0:o[2],!1);return(0,a.OT)(n)}throw new r.D$("InvalidParameter",t)})},n.functions.subtypes=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,o)=>{if((0,i.E)(o,1,1,t),(0,i.h)(o[0]))return(0,a.Dy)((0,i._)(o[0]),!0,!1);if((0,i.k)(o[0]))return await o[0]._ensureLoaded(),(0,a.Dy)(o[0].subtypeMetadata(),!0,!1);throw new r.D$("InvalidParameter",t)})},n.functions.domainname=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,a)=>{if((0,i.E)(a,2,4,t),(0,i.h)(a[0]))return(0,i.Y)(a[0],(0,i.w)(a[1]),a[2],void 0===a[3]?void 0:a[3]);if((0,i.k)(a[0])){await a[0]._ensureLoaded();let n=(0,i.a6)((0,i.w)(a[1]),a[0],null,void 0===a[3]?void 0:a[3],!0);return(0,i.a7)(n,a[2])}throw new r.D$("InvalidParameter",t)})},n.signatures.push({name:"domainname",min:2,max:4}),n.functions.domaincode=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,a)=>{if((0,i.E)(a,2,4,t),(0,i.h)(a[0]))return(0,i.X)(a[0],(0,i.w)(a[1]),a[2],void 0===a[3]?void 0:a[3]);if((0,i.k)(a[0])){await a[0]._ensureLoaded();let n=(0,i.a6)((0,i.w)(a[1]),a[0],null,void 0===a[3]?void 0:a[3],!0);return(0,i.a8)(n,a[2])}throw new r.D$("InvalidParameter",t)})},n.signatures.push({name:"domaincode",min:2,max:4}),n.functions.text=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,a)=>{if((0,i.E)(a,1,2,t),(0,i.k)(a[0])){let e=(0,i.N)(a[1],"");if(!(0,o.Kg)(e))throw new r.D$("InvalidParameter",t);if(""===e)return a[0].castToText();if("schema"===e.toLowerCase())return a[0].convertToText("schema",n.abortSignal);if("featureset"===e.toLowerCase())return a[0].convertToText("featureset",n.abortSignal);throw new r.D$("InvalidParameter",t)}return(0,i.t)(a[0],a[1])})},n.functions.gdbversion=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,a)=>{if((0,i.E)(a,1,1,t),(0,i.h)(a[0]))return a[0].gdbVersion();if((0,i.k)(a[0]))return(await a[0].load()).gdbVersion;throw new r.D$("InvalidParameter",t)})},n.functions.schema=function(e,t){return n.standardFunctionAsync(e,t,async(n,e,o)=>{if((0,i.E)(o,1,1,t),(0,i.k)(o[0]))return await o[0].load(),(0,a.Dy)(o[0].schema(),!0,!1);if((0,i.h)(o[0]))return(0,a.Dy)((0,i.Z)(o[0]),!0,!1);throw new r.D$("InvalidParameter",t)})})}}}]);
|
|
Binary file
|
|
Binary file
|
package/chunks/lyr3DMain.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
async function e(e={}){var t,n=e,r=`./this.program`,i=``,a=``;function o(e){return n.locateFile?n.locateFile(e,a):a+e}var s;try{a=new URL(`.`,i).href}catch{}s=async e=>{var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)};var c=console.log.bind(console),l=console.error.bind(console),u,d=!1,f,p,ee=!1;function m(){var e=Z.buffer;b=new Int8Array(e),_=new Int16Array(e),n.HEAPU8=C=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),v=new Int32Array(e),n.HEAPU32=S=new Uint32Array(e),n.HEAPF32=de=new Float32Array(e),n.HEAPF64=fe=new Float64Array(e),y=new BigInt64Array(e),pe=new BigUint64Array(e)}function te(){if(n.preRun)for(typeof n.preRun==`function`&&(n.preRun=[n.preRun]);n.preRun.length;)ve(n.preRun.shift());me(_e)}function ne(){ee=!0,$.M()}function re(){if(n.postRun)for(typeof n.postRun==`function`&&(n.postRun=[n.postRun]);n.postRun.length;)ge(n.postRun.shift());me(he)}function h(e){n.onAbort?.(e),e=`Aborted(${e})`,l(e),d=!0,e+=`. Build with -sASSERTIONS for more info.`;var t=new WebAssembly.RuntimeError(e);throw p?.(t),t}var g;function ie(){return n.locateFile?o(`lyr3DMain.wasm`):new URL(`lyr3DMain.wasm`,``).href}function ae(e){if(e==g&&u)return new Uint8Array(u);throw`both async and sync fetching of the wasm failed`}async function oe(e){if(!u)try{var t=await s(e);return new Uint8Array(t)}catch{}return ae(e)}async function se(e,t){try{var n=await oe(e);return await WebAssembly.instantiate(n,t)}catch(e){l(`failed to asynchronously prepare wasm: ${e}`),h(e)}}async function ce(e,t,n){if(!e)try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){l(`wasm streaming compile failed: ${e}`),l(`falling back to ArrayBuffer instantiation`)}return se(t,n)}function le(){return{a:an}}async function ue(){function e(e,t){return $=e.exports,rn($),m(),$}function t(t){return e(t.instance)}var r=le();return n.instantiateWasm?new Promise((t,i)=>{n.instantiateWasm(r,(n,r)=>{t(e(n))})}):(g??=ie(),t(await ce(u,g,r)))}var _,v,y,b,de,fe,x,S,pe,C,me=e=>{for(;e.length>0;)e.shift()(n)},he=[],ge=e=>he.push(e),_e=[],ve=e=>_e.push(e);class ye{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){S[this.ptr+4>>2]=e}get_type(){return S[this.ptr+4>>2]}set_destructor(e){S[this.ptr+8>>2]=e}get_destructor(){return S[this.ptr+8>>2]}set_caught(e){e=+!!e,b[this.ptr+12]=e}get_caught(){return b[this.ptr+12]!=0}set_rethrown(e){e=+!!e,b[this.ptr+13]=e}get_rethrown(){return b[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){S[this.ptr+16>>2]=e}get_adjusted_ptr(){return S[this.ptr+16>>2]}}var be=(e,t,n)=>{new ye(e).init(t,n),h()},xe=()=>h(``),w={},T=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function E(e){return this.fromWireType(S[e>>2])}var D={},O={},k={},Se=class extends Error{constructor(e){super(e),this.name=`InternalError`}},Ce=e=>{throw new Se(e)},A=(e,t,n)=>{e.forEach(e=>k[e]=t);function r(t){var r=n(t);r.length!==e.length&&Ce(`Mismatched type converter count`);for(var i=0;i<e.length;++i)P(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())O.hasOwnProperty(n)?i[e]=O[n]:(a.push(n),D.hasOwnProperty(n)||(D[n]=[]),D[n].push(()=>{i[e]=O[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},we=e=>{var t=w[e];delete w[e];var n=t.elements,r=n.length,i=n.map(e=>e.getterReturnType).concat(n.map(e=>e.setterArgumentType)),a=t.rawConstructor,o=t.rawDestructor;A([e],i,e=>{for(let[t,i]of n.entries()){let n=e[t],a=i.getter,o=i.getterContext,s=e[t+r],c=i.setter,l=i.setterContext;i.read=e=>n.fromWireType(a(o,e)),i.write=(e,t)=>{var n=[];c(l,e,s.toWireType(n,t)),T(n)}}return[{name:t.name,fromWireType:e=>{for(var t=Array(r),i=0;i<r;++i)t[i]=n[i].read(e);return o(e),t},toWireType:(e,i)=>{if(r!==i.length)throw TypeError(`Incorrect number of tuple elements for ${t.name}: expected=${r}, actual=${i.length}`);for(var s=a(),c=0;c<r;++c)n[c].write(s,i[c]);return e!==null&&e.push(o,s),s},readValueFromPointer:E,destructorFunction:o}]})},j={},Te=e=>{var t=j[e];delete j[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));A([e],a,e=>{var a={};for(var[o,s]of i.entries()){let t=e[o],n=s.getter,r=s.getterContext,c=e[o+i.length],l=s.setter,u=s.setterContext;a[s.fieldName]={read:e=>t.fromWireType(n(r,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),T(n)},optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:E,destructorFunction:r}]})},M=e=>{for(var t=``;;){var n=C[e++];if(!n)return t;t+=String.fromCharCode(n)}},Ee=class extends Error{constructor(e){super(e),this.name=`BindingError`}},N=e=>{throw new Ee(e)};function De(e,t,n={}){var r=t.name;if(e||N(`type "${r}" must have a positive integer typeid pointer`),O.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;N(`Cannot register type '${r}' twice`)}if(O[e]=t,delete k[e],D.hasOwnProperty(e)){var i=D[e];delete D[e],i.forEach(e=>e())}}function P(e,t,n={}){return De(e,t,n)}var F=(e,t,n)=>{switch(t){case 1:return n?e=>b[e]:e=>C[e];case 2:return n?e=>_[e>>1]:e=>x[e>>1];case 4:return n?e=>v[e>>2]:e=>S[e>>2];case 8:return n?e=>y[e>>3]:e=>pe[e>>3];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Oe=(e,t,n,r,i)=>{t=M(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}P(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:F(t,n,!a),destructorFunction:null})},ke=(e,t,n,r)=>{t=M(t),P(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(C[e])},destructorFunction:null})},Ae=[],I=[0,1,,1,null,1,!0,1,!1,1],L=e=>{e>9&&--I[e+1]===0&&(I[e],I[e]=void 0,Ae.push(e))},R={toValue:e=>(e||N(`Cannot use deleted val. handle = ${e}`),I[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=Ae.pop()||I.length;return I[t]=e,I[t+1]=1,t}}}},je={name:`emscripten::val`,fromWireType:e=>{var t=R.toValue(e);return L(e),t},toWireType:(e,t)=>R.toHandle(t),readValueFromPointer:E,destructorFunction:null},Me=e=>P(e,je),Ne=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(de[e>>2])};case 8:return function(e){return this.fromWireType(fe[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Pe=(e,t,n)=>{t=M(t),P(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Ne(t,n),destructorFunction:null})},Fe=(e,t)=>Object.defineProperty(t,"name",{value:e});function Ie(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Le(e,t,n,r,i,a){var o=t.length;o<2&&N(`argTypes array size mismatch! Must at least get return value and 'this' types!`),t[1];var s=Ie(t),c=!t[0].isVoid,l=o-2,u=Array(l),d=[],f=[];return Fe(e,function(...e){f.length=0;var n;d.length=1,d[0]=i;for(var a=0;a<l;++a)u[a]=t[a+2].toWireType(f,e[a]),d.push(u[a]);var o=r(...d);function p(e){if(s)T(f);else for(var r=2;r<t.length;r++){var i=r===1?n:u[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(i)}if(c)return t[0].fromWireType(e)}return p(o)})}var Re=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||N(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},ze=(e,t,r)=>{n.hasOwnProperty(e)?((r===void 0||n[e].overloadTable!==void 0&&n[e].overloadTable[r]!==void 0)&&N(`Cannot register public name '${e}' twice`),Re(n,e,e),n[e].overloadTable.hasOwnProperty(r)&&N(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,n[e].argCount=r)},Be=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(S[t+r*4>>2]);return n},Ve=(e,t,r)=>{n.hasOwnProperty(e)||Ce(`Replacing nonexistent public symbol`),n[e].overloadTable!==void 0&&r!==void 0?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},z=[],B=e=>{var t=z[e];return t||(z[e]=t=Q.get(e)),t},V=(e,t,n=!1)=>{e=M(e);function r(){return B(t)}var i=r();return typeof i!=`function`&&N(`unknown function pointer with signature ${e}: ${t}`),i};class He extends Error{}var Ue=e=>{var t=nn(e),n=M(t);return X(t),n},We=(e,t)=>{var n=[],r={};function i(e){if(!r[e]&&!O[e]){if(k[e]){k[e].forEach(i);return}n.push(e),r[e]=!0}}throw t.forEach(i),new He(`${e}: `+n.map(Ue).join([`, `]))},Ge=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Ke=(e,t,n,r,i,a,o,s)=>{var c=Be(t,n);e=M(e),e=Ge(e),i=V(r,i,o),ze(e,function(){We(`Cannot call ${e} due to unbound types`,c)},t-1),A([],c,n=>{var r=[n[0],null].concat(n.slice(1));return Ve(e,Le(e,r,null,i,a),t-1),[]})},qe=(e,t,n,r,i)=>{t=M(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}P(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:F(t,n,r!==0),destructorFunction:null})},Je=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=S[e>>2],n=S[e+4>>2];return new r(b.buffer,n,t)}n=M(n),P(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Ye=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},H=(e,t,n)=>Ye(e,C,t,n),U=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},Xe=globalThis.TextDecoder&&new TextDecoder,Ze=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},Qe=(e,t=0,n,r)=>{var i=Ze(e,t,n,r);if(i-t>16&&e.buffer&&Xe)return Xe.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},$e=(e,t,n)=>e?Qe(C,e,t,n):``,et=(e,t)=>{t=M(t),P(e,{name:t,fromWireType(e){var t=S[e>>2],n=$e(e+4,t,!0);return X(e),n},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r=typeof t==`string`;r||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||N(`Cannot pass non-string to std::string`),n=r?U(t):t.length;var i=Y(4+n+1),a=i+4;return S[i>>2]=n,r?H(t,a,n+1):C.set(t,a),e!==null&&e.push(X,i),i},readValueFromPointer:E,destructorFunction(e){X(e)}})},tt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,nt=(e,t,n)=>{var r=e>>1,i=Ze(x,r,t/2,n);if(i-r>16&&tt)return tt.decode(x.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=x[o];a+=String.fromCharCode(s)}return a},rt=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);_[t>>1]=o,t+=2}return _[t>>1]=0,t-r},it=e=>e.length*2,at=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=S[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},ot=(e,t,n)=>{if(n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,v[t>>2]=o,t+=4,t+4>i)break}return v[t>>2]=0,t-r},st=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},ct=(e,t,n)=>{n=M(n);var r,i,a;t===2?(r=nt,i=rt,a=it):(r=at,i=ot,a=st),P(e,{name:n,fromWireType:e=>{var n=S[e>>2],i=r(e+4,n*t,!0);return X(e),i},toWireType:(e,r)=>{typeof r!=`string`&&N(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Y(4+o+t);return S[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(X,s),s},readValueFromPointer:E,destructorFunction(e){X(e)}})},lt=(e,t,n,r,i,a)=>{w[e]={name:M(t),rawConstructor:V(n,r),rawDestructor:V(i,a),elements:[]}},ut=(e,t,n,r,i,a,o,s,c)=>{w[e].elements.push({getterReturnType:t,getter:V(n,r),getterContext:i,setterArgumentType:a,setter:V(o,s),setterContext:c})},dt=(e,t,n,r,i,a)=>{j[e]={name:M(t),rawConstructor:V(n,r),rawDestructor:V(i,a),fields:[]}},ft=(e,t,n,r,i,a,o,s,c,l)=>{j[e].fields.push({fieldName:M(t),getterReturnType:n,getter:V(r,i),getterContext:a,setterArgumentType:o,setter:V(s,c),setterContext:l})},pt=(e,t)=>{t=M(t),P(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},W=[],mt=e=>{var t=W.length;return W.push(e),t},ht=(e,t)=>{var n=O[e];return n===void 0&&N(`${t} has unknown type ${Ue(e)}`),n},gt=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=ht(S[t+r*4>>2],`parameter ${r}`);return n},_t=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(S[t>>2]=R.toHandle(r)),i},vt={},G=e=>{var t=vt[e];return t===void 0?M(e):t},yt=(e,t,n)=>{var[r,...i]=gt(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return mt(Fe(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=R.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(R.toValue(t),s);break;case 3:d=s[0];break;case 1:d=R.toValue(t)[G(r)](...s)}return _t(a,i,d)}))},bt=e=>e?(e=G(e),R.toHandle(globalThis[e])):R.toHandle(globalThis),xt=e=>(e=G(e),R.toHandle(n[e])),St=(e,t)=>(e=R.toValue(e),t=R.toValue(t),R.toHandle(e[t])),Ct=e=>{e>9&&(I[e+1]+=1)},wt=(e,t,n,r,i)=>W[e](t,n,r,i),Tt=()=>R.toHandle([]),Et=e=>{e=R.toValue(e);for(var t=Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return R.toHandle(t)},Dt=e=>R.toHandle(G(e)),Ot=()=>R.toHandle({}),kt=e=>{T(R.toValue(e)),L(e)},At=(e,t,n)=>{e=R.toValue(e),t=R.toValue(t),n=R.toValue(n),e[t]=n},jt=(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);S[e>>2]=l*60,v[t>>2]=Number(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?(H(d,n,17),H(f,r,17)):(H(d,r,17),H(f,n,17))},Mt=()=>performance.now(),Nt=()=>Date.now(),Pt=e=>e>=0&&e<=3;function Ft(e,t,n){if(!Pt(e))return 28;var r=e===0?Nt():Mt(),i=Math.round(r*1e3*1e3);return y[n>>3]=BigInt(i),0}var It=()=>2147483648,Lt=(e,t)=>Math.ceil(e/t)*t,Rt=e=>{var t=(e-Z.buffer.byteLength+65535)/65536|0;try{return Z.grow(t),m(),1}catch{}},zt=e=>{var t=C.length;e>>>=0;var n=It();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),Rt(Math.min(n,Lt(Math.max(e,i),65536))))return!0}return!1},K={},Bt=()=>r,q=()=>{if(!q.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:Bt()};for(var t in K)K[t]===void 0?delete e[t]:e[t]=K[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);q.strings=n}return q.strings},Vt=(e,t)=>{var n=0,r=0;for(var i of q()){var a=t+n;S[e+r>>2]=a,n+=H(i,a,1/0)+1,r+=4}return 0},Ht=(e,t)=>{var n=q();S[e>>2]=n.length;var r=0;for(var i of n)r+=U(i)+1;return S[t>>2]=r,0},Ut=[null,[],[]],Wt=(e,t)=>{var n=Ut[e];t===0||t===10?((e===1?c:l)(Qe(n)),n.length=0):n.push(t)},Gt=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=S[t>>2],s=S[t+4>>2];t+=8;for(var c=0;c<s;c++)Wt(e,C[o+c]);i+=s}return S[r>>2]=i,0},Kt=(e,t)=>{if(J)for(var n=e;n<e+t;n++){var r=B(n);r&&J.set(r,n)}},J,qt=e=>(J||(J=new WeakMap,Kt(0,Q.length)),J.get(e)||0),Jt=[],Yt=()=>Jt.length?Jt.pop():Q.grow(1),Xt=(e,t)=>{Q.set(e,t),z[e]=Q.get(e)},Zt=e=>{let t=e.length;return[t%128|128,t>>7,...e]},Qt={i:127,p:127,j:126,f:125,d:124,e:111},$t=e=>Zt(Array.from(e,e=>Qt[e])),en=(e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Zt([1,96,...$t(t.slice(1)),...$t(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f},tn=(e,t)=>{var n=qt(e);if(n)return n;var r=Yt();try{Xt(r,e)}catch(n){if(!(n instanceof TypeError))throw n;Xt(r,en(e,t))}return J.set(e,r),r};if(n.noExitRuntime&&n.noExitRuntime,n.print&&(c=n.print),n.printErr&&(l=n.printErr),n.wasmBinary&&(u=n.wasmBinary),n.arguments&&n.arguments,n.thisProgram&&(r=n.thisProgram),n.preInit)for(typeof n.preInit==`function`&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.shift()();n.addFunction=tn,n.UTF8ToString=$e,n.Emval=R;var nn,Y,X,Z,Q;function rn(e){nn=e.N,Y=n._malloc=e.P,X=n._free=e.Q,Z=e.L,Q=e.O}var an={h:be,E:xe,r:we,u:Te,y:Oe,J:ke,H:Me,x:Pe,g:Ke,o:qe,j:Je,I:et,t:ct,s:lt,m:ut,v:dt,k:ft,K:pt,d:yt,a:L,n:bt,q:xt,p:St,l:Ct,f:wt,G:Tt,F:Et,b:Dt,i:Ot,e:kt,c:At,z:jt,C:Ft,D:zt,A:Vt,B:Ht,w:Gt};function on(){te();function e(){n.calledRun=!0,!d&&(ne(),f?.(n),n.onRuntimeInitialized?.(),re())}n.setStatus?(n.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>n.setStatus(``),1),e()},1)):e()}var $=await ue();return on(),t=ee?n:new Promise((e,t)=>{f=e,p=t}),t}export{e as default};
|
|
2
|
+
async function e(e={}){var t=e,n=`./this.program`,r=``,i=``;function a(e){return t.locateFile?t.locateFile(e,i):i+e}var o;try{i=new URL(`.`,r).href}catch{}o=async e=>{var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)};var s=console.log.bind(console),c=console.error.bind(console),l=!1;function u(){return Z.buffer}function d(){if(!_?.buffer?.resizable){var e=u();_=new Int8Array(e),j=new Int16Array(e),t.HEAPU8=E=new Uint8Array(e),t.HEAPU16=M=new Uint16Array(e),N=new Int32Array(e),t.HEAPU32=v=new Uint32Array(e),t.HEAPF32=Se=new Float32Array(e),t.HEAPF64=Ce=new Float64Array(e),P=new BigInt64Array(e),F=new BigUint64Array(e)}}function f(){var e=t.preRun;e&&(typeof e==`function`&&(e=[e]),ce.push(...e)),oe(ce)}function p(){$.M()}function m(){var e=t.postRun;e&&(typeof e==`function`&&(e=[e]),se.push(...e)),oe(se)}function h(e){throw t.onAbort?.(e),e=`Aborted(${e})`,c(e),l=!0,e+=`. Build with -sASSERTIONS for more info.`,new WebAssembly.RuntimeError(e)}var g;function ee(){return t.locateFile?a(`lyr3DMain.wasm`):new URL(`lyr3DMain.wasm`,``).href}function te(e){throw`both async and sync fetching of the wasm failed`}async function ne(e){try{var t=await o(e);return new Uint8Array(t)}catch{}return te()}async function re(e,t){try{var n=await ne(e);return await WebAssembly.instantiate(n,t)}catch(e){c(`failed to asynchronously prepare wasm: ${e}`),h(e)}}async function ie(e,t,n){try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){c(`wasm streaming compile failed: ${e}`),c(`falling back to ArrayBuffer instantiation`)}return re(t,n)}function ae(){return{a:wt}}var _,oe=e=>{for(;e.length>0;)e.shift()(t)},se=[],ce=[],le=e=>xt(e),ue=()=>St(),v;class de{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){v[this.ptr+4>>2]=e}get_type(){return v[this.ptr+4>>2]}set_destructor(e){v[this.ptr+8>>2]=e}get_destructor(){return v[this.ptr+8>>2]}set_caught(e){e=+!!e,_[this.ptr+12]=e}get_caught(){return _[this.ptr+12]!=0}set_rethrown(e){e=+!!e,_[this.ptr+13]=e}get_rethrown(){return _[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){v[this.ptr+16>>2]=e}get_adjusted_ptr(){return v[this.ptr+16>>2]}}var fe=()=>{h()},y={},b=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function x(e){return this.fromWireType(v[e>>2])}var S={},C={},w={};class pe extends Error{constructor(e){super(e),this.name=`InternalError`}}var me=e=>{throw new pe(e)},T=(e,t,n)=>{e.forEach(e=>w[e]=t);function r(t){var r=n(t);r.length!==e.length&&me(`Mismatched type converter count`);for(var i=0;i<e.length;++i)A(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())C.hasOwnProperty(n)?i[e]=C[n]:(a.push(n),S.hasOwnProperty(n)||(S[n]=[]),S[n].push(()=>{i[e]=C[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},he=e=>X(e),E,ge=(e,t)=>E.fill(0,e,e+t),D={},O=e=>{for(var t=``;;){var n=E[e++];if(!n)return t;t+=String.fromCharCode(n)}};class _e extends Error{constructor(e){super(e),this.name=`BindingError`}}var k=e=>{throw new _e(e)};function ve(e,t,n={}){var r=t.name;if(e||k(`type "${r}" must have a positive integer typeid pointer`),C.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;k(`Cannot register type '${r}' twice`)}if(C[e]=t,delete w[e],S.hasOwnProperty(e)){var i=S[e];delete S[e],i.forEach(e=>e())}}function A(e,t,n={}){return ve(e,t,n)}var j,M,N,P,F,ye=(e,t,n)=>{switch(t){case 1:return n?e=>_[e]:e=>E[e];case 2:return n?e=>j[e>>1]:e=>M[e>>1];case 4:return n?e=>N[e>>2]:e=>v[e>>2];case 8:return n?e=>P[e>>3]:e=>F[e>>3];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},be=[],I=[0,1,,1,null,1,!0,1,!1,1],L=e=>{e>9&&--I[e+1]===0&&(I[e],I[e]=void 0,be.push(e))},R={toValue:e=>(e||k(`Cannot use deleted val. handle = ${e}`),I[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=be.pop()||I.length;return I[t]=e,I[t+1]=1,t}}}},xe={name:`emscripten::val`,fromWireType:e=>{var t=R.toValue(e);return L(e),t},toWireType:(e,t)=>R.toHandle(t),readValueFromPointer:x,destructorFunction:null},Se,Ce,we=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(Se[e>>2])};case 8:return function(e){return this.fromWireType(Ce[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},Te=(e,t)=>Object.defineProperty(t,"name",{value:e});function Ee(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function De(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].argStackAlloc)return!0;return!1}function Oe(e,t,n,r,i,a){var o=t.length;o<2&&k(`argTypes array size mismatch! Must at least get return value and receiver (this) types!`);var s=t[1]!==null&&n!==null,c=Ee(t),l=De(t),u=l&&!a&&!c;l&&!u&&(c=!0);var d=!t[0].isVoid,f=o-2,p=Array(f),m=[],h=[];return Te(e,function(...e){h.length=0;var n;u&&(n=ue());var a,o;try{m.length=s?2:1,m[0]=i;for(var l=0;l<f;++l){var g=t[l+2];p[l]=g.toWireType(u&&g.argStackAlloc?null:h,e[l]),m.push(p[l])}o=r(...m)}finally{u&&le(n)}return function(e){if(c)b(h);else for(var n=2;n<t.length;n++){var r=n===1?a:p[n-2];t[n].destructorFunction!==null&&t[n].destructorFunction(r)}if(d)return t[0].fromWireType(e)}(o)})}var ke=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||k(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},Ae=(e,n,r)=>{t.hasOwnProperty(e)?((r===void 0||t[e].overloadTable!==void 0&&t[e].overloadTable[r]!==void 0)&&k(`Cannot register public name '${e}' twice`),ke(t,e,e),t[e].overloadTable.hasOwnProperty(r)&&k(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),t[e].overloadTable[r]=n):(t[e]=n,t[e].argCount=r)},je=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(v[t+r*4>>2]);return n},Me=(e,n,r)=>{t.hasOwnProperty(e)||me(`Replacing nonexistent public symbol`),t[e].overloadTable!==void 0&&r!==void 0?t[e].overloadTable[r]=n:(t[e]=n,t[e].argCount=r)},z=[],Ne=e=>{var t=z[e];return t||(z[e]=t=Q.get(e)),t},B=(e,t)=>{e=O(e);var n=function(){return Ne(t)}();return typeof n!=`function`&&k(`unknown function pointer with signature ${e}: ${t}`),n};class Pe extends Error{}var Fe=e=>{var t=bt(e),n=O(t);return Y(t),n},Ie=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){if(!r[t]&&!C[t]){if(w[t]){w[t].forEach(e);return}n.push(t),r[t]=!0}}),new Pe(`${e}: `+n.map(Fe).join([`, `]))},Le=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},Re=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},V=(e,t,n)=>Re(e,E,t,n),ze=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},Be=globalThis.TextDecoder&&new TextDecoder,Ve=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},He=(e,t=0,n,r)=>{var i=Ve(e,t,n,r);if(i-t>16&&e.buffer&&Be)return Be.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},Ue=(e,t,n)=>e?He(E,e,t,n):``,We=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,Ge=(e,t,n)=>{var r=e>>1,i=Ve(M,r,t/2,n);if(i-r>16&&We)return We.decode(M.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=M[o];a+=String.fromCharCode(s)}return a},Ke=(e,t,n=2147483647)=>{if(n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);j[t>>1]=o,t+=2}return j[t>>1]=0,t-r},qe=e=>e.length*2,Je=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=v[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},Ye=(e,t,n=2147483647)=>{if(n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,N[t>>2]=o,t+=4,t+4>i)break}return N[t>>2]=0,t-r},Xe=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},H=[],Ze=e=>{var t=H.length;return H.push(e),t},Qe=(e,t)=>{var n=C[e];return n===void 0&&k(`${t} has unknown type ${Fe(e)}`),n},$e=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Qe(v[t+r*4>>2],`parameter ${r}`);return n},et=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(v[t>>2]=R.toHandle(r)),i},tt={},U=e=>{var t=tt[e];return t===void 0?O(e):t},nt=()=>performance.now(),rt=()=>Date.now(),it=e=>e>=0&&e<=3,at=()=>2147483648,ot=(e,t)=>Math.ceil(e/t)*t,st=e=>{var t=(e-Z.buffer.byteLength+65535)/65536|0;try{return Z.grow(t),d(),1}catch{}},W={},ct=()=>n,G=()=>{if(!G.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:ct()};for(var t in W)W[t]===void 0?delete e[t]:e[t]=W[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);G.strings=n}return G.strings},lt=[null,[],[]],ut=(e,t)=>{var n=lt[e];!t||t===10?((e===1?s:c)(He(n)),n.length=0):n.push(t)},dt=(e,t)=>{if(K)for(var n=e;n<e+t;n++){var r=Ne(n);r&&K.set(r,n)}},K,ft=e=>(K||(K=new WeakMap,dt(0,Q.length)),K.get(e)||0),pt=[],mt=()=>pt.length?pt.pop():Q.grow(1),ht=(e,t)=>{Q.set(e,t),z[e]=Q.get(e)},gt=e=>{let t=e.length;return[t%128|128,t>>7,...e]},_t={i:127,p:127,j:126,f:125,d:124,e:111},vt=e=>gt(Array.from(e,e=>_t[e])),yt=(e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...gt([1,96,...vt(t.slice(1)),...vt(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f};t.noExitRuntime&&t.noExitRuntime,t.print&&(s=t.print),t.printErr&&(c=t.printErr),t.arguments&&t.arguments,t.thisProgram&&(n=t.thisProgram);var q=t.preInit;if(q)for(typeof q==`function`&&(t.preInit=q=[q]);q.length>0;)q.shift()();t.addFunction=(e,t)=>{var n=ft(e);if(n)return n;var r=mt();try{ht(r,e)}catch(n){if(!(n instanceof TypeError))throw n;ht(r,yt(e,t))}return K.set(e,r),r},t.UTF8ToString=Ue,t.Emval=R;var bt,J,Y,xt,X,St,Z,Q;function Ct(e){bt=e.N,J=t._malloc=e.P,Y=t._free=e.Q,xt=e.R,X=e.S,St=e.T,Z=e.L,Q=e.O}var wt={h:(e,t,n)=>{new de(e).init(t,n),fe()},E:()=>h(``),r:e=>{var t=y[e];delete y[e];var n=t.elements,r=n.length,i=n.map(e=>e.getterReturnType).concat(n.map(e=>e.setterArgumentType)),a=t.rawConstructor,o=t.rawDestructor,s=t.valueSize,c=t.isTrivial;T([e],i,e=>{for(let[t,i]of n.entries()){let n=e[t],a=i.getter,o=i.getterContext,s=e[t+r],c=i.setter,l=i.setterContext;i.read=e=>n.fromWireType(a(o,e)),i.write=s.destructorFunction===null&&!s.argStackAlloc?(e,t)=>c(l,e,s.toWireType(null,t)):(e,t)=>{var n=[];c(l,e,s.toWireType(n,t)),b(n)}}return[{name:t.name,fromWireType:e=>{for(var t=Array(r),i=0;i<r;++i)t[i]=n[i].read(e);return o(e),t},toWireType:(e,i)=>{if(r!==i.length)throw TypeError(`Incorrect number of tuple elements for ${t.name}: expected=${r}, actual=${i.length}`);var l;c&&!e?(l=he(s),ge(l,s)):(l=a(),e&&e.push(o,l));for(var u=0;u<r;++u)n[u].write(l,i[u]);return l},readValueFromPointer:x,destructorFunction:c?null:o,argStackAlloc:c}]})},u:e=>{var t=D[e];delete D[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.valueSize,a=t.isTrivial,o=t.fields,s=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));T([e],s,e=>{var s={};for(var[c,l]of o.entries()){let t=e[c],n=l.getter,r=l.getterContext,i=e[c+o.length],a=l.setter,d=l.setterContext;var u=i.destructorFunction===null&&!i.argStackAlloc?(e,t)=>a(d,e,i.toWireType(null,t)):(e,t)=>{var n=[];a(d,e,i.toWireType(n,t)),b(n)};s[l.fieldName]={read:e=>t.fromWireType(n(r,e)),write:u,optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in s)t[n]=s[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var o in s)if(!(o in t)&&!s[o].optional)throw TypeError(`Missing field: "${o}"`);var c;for(o in a&&!e?(c=he(i),ge(c,i)):(c=n(),e&&e.push(r,c)),s)s[o].write(c,t[o]);return c},readValueFromPointer:x,destructorFunction:a?null:r,argStackAlloc:a}]})},y:(e,t,n,r,i)=>{t=O(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}A(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:ye(t,n,!a),destructorFunction:null})},J:(e,t,n,r)=>{t=O(t),A(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},H:e=>A(e,xe),x:(e,t,n)=>{t=O(t),A(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:we(t,n),destructorFunction:null})},g:(e,t,n,r,i,a,o)=>{var s=je(t,n);e=O(e),e=Le(e),i=B(r,i),Ae(e,function(){Ie(`Cannot call ${e} due to unbound types`,s)},t-1),T([],s,n=>{var r=[n[0],null].concat(n.slice(1));return Me(e,Oe(e,r,null,i,a,o),t-1),[]})},o:(e,t,n,r,i)=>{t=O(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}A(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:ye(t,n,r!==0),destructorFunction:null})},j:(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=v[e>>2],n=v[e+4>>2];return new r(_.buffer,n,t)}n=O(n),A(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},I:(e,t)=>{t=O(t),A(e,{name:t,fromWireType(e){var t=v[e>>2],n=Ue(e+4,t,!0);return Y(e),n},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r=typeof t==`string`;r||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||k(`Cannot pass non-string to std::string`),n=r?ze(t):t.length;var i=J(4+n+1),a=i+4;return v[i>>2]=n,r?V(t,a,n+1):E.set(t,a),e!==null&&e.push(Y,i),i},readValueFromPointer:x,destructorFunction(e){Y(e)}})},t:(e,t,n)=>{n=O(n);var r,i,a;t===2?(r=Ge,i=Ke,a=qe):(r=Je,i=Ye,a=Xe),A(e,{name:n,fromWireType:e=>{var n=v[e>>2],i=r(e+4,n*t,!0);return Y(e),i},toWireType:(e,r)=>{typeof r!=`string`&&k(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=J(4+o+t);return v[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Y,s),s},readValueFromPointer:x,destructorFunction(e){Y(e)}})},s:(e,t,n,r,i,a,o,s)=>{y[e]={name:O(t),rawConstructor:B(n,r),rawDestructor:B(i,a),valueSize:o,isTrivial:!!s,elements:[]}},m:(e,t,n,r,i,a,o,s,c)=>{y[e].elements.push({getterReturnType:t,getter:B(n,r),getterContext:i,setterArgumentType:a,setter:B(o,s),setterContext:c})},v:(e,t,n,r,i,a,o,s)=>{D[e]={name:O(t),rawConstructor:B(n,r),rawDestructor:B(i,a),valueSize:o,isTrivial:!!s,fields:[]}},k:(e,t,n,r,i,a,o,s,c,l)=>{D[e].fields.push({fieldName:O(t),getterReturnType:n,getter:B(r,i),getterContext:a,setterArgumentType:o,setter:B(s,c),setterContext:l})},K:(e,t)=>{t=O(t),A(e,{isVoid:!0,name:t,fromWireType:()=>{},toWireType:()=>{}})},d:(e,t,n)=>{var[r,...i]=$e(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return Ze(Te(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=R.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(R.toValue(t),s);break;case 3:d=s[0];break;case 1:d=R.toValue(t)[U(r)](...s)}return et(a,i,d)}))},a:L,n:e=>e?(e=U(e),R.toHandle(globalThis[e])):R.toHandle(globalThis),q:e=>(e=U(e),R.toHandle(t[e])),p:(e,t)=>(e=R.toValue(e),t=R.toValue(t),R.toHandle(e[t])),l:e=>{e>9&&(I[e+1]+=1)},f:(e,t,n,r,i)=>H[e](t,n,r,i),G:()=>R.toHandle([]),F:e=>{e=R.toValue(e);for(var t=Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return R.toHandle(t)},b:e=>R.toHandle(U(e)),i:()=>R.toHandle({}),e:e=>{b(R.toValue(e)),L(e)},c:(e,t,n)=>{e=R.toValue(e),t=R.toValue(t),n=R.toValue(n),e[t]=n},B:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);v[e>>2]=l*60,N[t>>2]=Number(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?(V(d,n,17),V(f,r,17)):(V(d,r,17),V(f,n,17))},C:function(e,t,n){if(!it(e))return 28;var r=e===0?rt():nt(),i=Math.round(r*1e6);return P[n>>3]=BigInt(i),0},D:e=>{var t=E.length;e>>>=0;var n=at();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),st(Math.min(n,ot(Math.max(e,i),65536))))return!0}return!1},z:(e,t)=>{var n=0,r=0;for(var i of G()){var a=t+n;v[e+r>>2]=a,n+=V(i,a,1/0)+1,r+=4}return 0},A:(e,t)=>{var n=G();v[e>>2]=n.length;var r=0;for(var i of n)r+=ze(i)+1;return v[t>>2]=r,0},w:(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=v[t>>2],s=v[t+4>>2];t+=8;for(var c=0;c<s;c++)ut(e,E[o+c]);i+=s}return v[r>>2]=i,0}},$=await async function(){function e(e){return $=e.exports,Ct($),d(),$}var n=ae(),r=t.instantiateWasm;return r?new Promise(t=>{r(n,n=>t(e(n)))}):(g??=ee(),function(t){return e(t.instance)}(await ie(void 0,g,n)))}();return await async function(){f();var e=t.setStatus;e&&(e(`Running...`),await new Promise(e=>setTimeout(e,1)),setTimeout(e,1,``)),!l&&(p(),t.onRuntimeInitialized?.(),m())}(),t}export{e as default};
|
package/chunks/lyr3DWorker.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
async function e(e={}){var t
|
|
3
|
-
`)),!e)return null;Ne=Ie(e)}return Ne.shift()},j={ttys:[],init(){},shutdown(){},register(e,t){j.ttys[e]={input:[],output:[],ops:t},F.registerDevice(e,j.stream_ops)},stream_ops:{open(e){var t=j.ttys[e.node.rdev];if(!t)throw new F.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new F.ErrnoError(60);for(var a=0,o=0;o<r;o++){var s;try{s=e.tty.ops.get_char(e.tty)}catch{throw new F.ErrnoError(29)}if(s===void 0&&a===0)throw new F.ErrnoError(6);if(s==null)break;a++,t[n+o]=s}return a&&(e.node.atime=Date.now()),a},write(e,t,n,r,i){if(!e.tty||!e.tty.ops.put_char)throw new F.ErrnoError(60);try{for(var a=0;a<r;a++)e.tty.ops.put_char(e.tty,t[n+a])}catch{throw new F.ErrnoError(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),a}},default_tty_ops:{get_char(e){return Le()},put_char(e,t){t===null||t===10?(f(A(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output?.length>0&&(f(A(e.output)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,n){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(p(A(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output?.length>0&&(p(A(e.output)),e.output=[])}}},Re=e=>{g()},M={ops_table:null,mount(e){return M.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if(F.isBlkdev(n)||F.isFIFO(n))throw new F.ErrnoError(63);M.ops_table||={dir:{node:{getattr:M.node_ops.getattr,setattr:M.node_ops.setattr,lookup:M.node_ops.lookup,mknod:M.node_ops.mknod,rename:M.node_ops.rename,unlink:M.node_ops.unlink,rmdir:M.node_ops.rmdir,readdir:M.node_ops.readdir,symlink:M.node_ops.symlink},stream:{llseek:M.stream_ops.llseek}},file:{node:{getattr:M.node_ops.getattr,setattr:M.node_ops.setattr},stream:{llseek:M.stream_ops.llseek,read:M.stream_ops.read,write:M.stream_ops.write,mmap:M.stream_ops.mmap,msync:M.stream_ops.msync}},link:{node:{getattr:M.node_ops.getattr,setattr:M.node_ops.setattr,readlink:M.node_ops.readlink},stream:{}},chrdev:{node:{getattr:M.node_ops.getattr,setattr:M.node_ops.setattr},stream:F.chrdev_stream_ops}};var i=F.createNode(e,t,n,r);return F.isDir(i.mode)?(i.node_ops=M.ops_table.dir.node,i.stream_ops=M.ops_table.dir.stream,i.contents={}):F.isFile(i.mode)?(i.node_ops=M.ops_table.file.node,i.stream_ops=M.ops_table.file.stream,i.usedBytes=0,i.contents=M.emptyFileContents??=new Uint8Array):F.isLink(i.mode)?(i.node_ops=M.ops_table.link.node,i.stream_ops=M.ops_table.link.stream):F.isChrdev(i.mode)&&(i.node_ops=M.ops_table.chrdev.node,i.stream_ops=M.ops_table.chrdev.stream),i.atime=i.mtime=i.ctime=Date.now(),e&&(e.contents[t]=i,e.atime=e.mtime=e.ctime=i.atime),i},getFileDataAsTypedArray(e){return e.contents.subarray(0,e.usedBytes)},expandFileStorage(e,t){var n=e.contents.length;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),n&&(t=Math.max(t,256));var r=M.getFileDataAsTypedArray(e);e.contents=new Uint8Array(t),e.contents.set(r)}},resizeFileStorage(e,t){if(e.usedBytes!=t){var n=e.contents;e.contents=new Uint8Array(t),e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=F.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,t.size=F.isDir(e.mode)?4096:F.isFile(e.mode)?e.usedBytes:F.isLink(e.mode)?e.link.length:0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){for(let n of[`mode`,`atime`,`mtime`,`ctime`])t[n]!=null&&(e[n]=t[n]);t.size!==void 0&&M.resizeFileStorage(e,t.size)},lookup(e,t){throw M.doesNotExistError||(M.doesNotExistError=new F.ErrnoError(44),M.doesNotExistError.stack=`<generic error, no stack>`),M.doesNotExistError},mknod(e,t,n,r){return M.createNode(e,t,n,r)},rename(e,t,n){var r;try{r=F.lookupNode(t,n)}catch{}if(r){if(F.isDir(e.mode))for(var i in r.contents)throw new F.ErrnoError(55);F.hashRemoveNode(r)}delete e.parent.contents[e.name],t.contents[n]=e,e.name=n,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.contents[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){for(var n in F.lookupNode(e,t).contents)throw new F.ErrnoError(55);delete e.contents[t],e.ctime=e.mtime=Date.now()},readdir(e){return[`.`,`..`,...Object.keys(e.contents)]},symlink(e,t,n){var r=M.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!F.isLink(e.mode))throw new F.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var a=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,r);return t.set(a.subarray(i,i+o),n),o},write(e,t,n,r,i,a){if(t.buffer===b.buffer&&(a=!1),!r)return 0;var o=e.node;return o.mtime=o.ctime=Date.now(),a?(o.contents=t.subarray(n,n+r),o.usedBytes=r):o.usedBytes===0&&i===0?(o.contents=t.slice(n,n+r),o.usedBytes=r):(M.expandFileStorage(o,i+r),o.contents.set(t.subarray(n,n+r),i),o.usedBytes=Math.max(o.usedBytes,i+r)),r},llseek(e,t,n){var r=t;if(n===1?r+=e.position:n===2&&F.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new F.ErrnoError(28);return r},mmap(e,t,n,r,i){if(!F.isFile(e.node.mode))throw new F.ErrnoError(43);var a,o,s=e.node.contents;if(!(i&2)&&s.buffer===b.buffer)o=!1,a=s.byteOffset;else{if(o=!0,a=Re(),!a)throw new F.ErrnoError(48);s&&((n>0||n+t<s.length)&&(s=s.subarray?s.subarray(n,n+t):Array.prototype.slice.call(s,n,n+t)),b.set(s,a))}return{ptr:a,allocated:o}},msync(e,t,n,r,i){return M.stream_ops.write(e,t,0,r,n,!1),0}}},ze=e=>{if(typeof e!=`string`)return e;var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(t===void 0)throw Error(`Unknown file open mode: ${e}`);return t},Be=e=>(typeof e==`string`&&(e=Ie(e)),e.subarray||(e=new Uint8Array(e)),e),Ve=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},He=async e=>{var t=await u(e);return new Uint8Array(t)},Ue=(...e)=>F.createDataFile(...e),N=0,P=null,We=e=>{if(N--,n.monitorRunDependencies?.(N),N==0&&P){var t=P;P=null,t()}},Ge=e=>{N++,n.monitorRunDependencies?.(N)},Ke=[],qe=async(e,t)=>{typeof Browser<`u`&&Browser.init();for(var n of Ke)if(n.canHandle(t))return n.handle(e,t);return e},Je=async(e,t,n,r,i,a,o,s)=>{var c=t?k.resolve(O.join2(e,t)):e;Ge();try{var l=n;typeof n==`string`&&(l=await He(n)),l=await qe(l,c),s?.(),a||Ue(e,t,l,r,i,o)}finally{We()}},Ye=(e,t,n,r,i,a,o,s,c,l)=>{Je(e,t,n,r,i,s,c,l).then(a).catch(o)},F={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:`/`,initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,ErrnoError:class{name=`ErrnoError`;constructor(e){this.errno=e}},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!=1}get isWrite(){return!!(this.flags&2097155)}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,t,n,r){e||=this,this.parent=e,this.mount=e.mount,this.id=F.nextInode++,this.name=t,this.mode=n,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return F.isDir(this.mode)}get isDevice(){return F.isChrdev(this.mode)}},lookupPath(e,t={}){if(!e)throw new F.ErrnoError(44);t.follow_mount??=!0,O.isAbs(e)||(e=F.cwd()+`/`+e);linkloop:for(var n=0;n<40;n++){for(var r=e.split(`/`).filter(e=>!!e),i=F.root,a=`/`,o=0;o<r.length;o++){var s=o===r.length-1;if(s&&t.parent)break;if(r[o]!==`.`){if(r[o]===`..`){if(a=O.dirname(a),F.isRoot(i)){e=a+`/`+r.slice(o+1).join(`/`),n--;continue linkloop}i=i.parent;continue}a=O.join2(a,r[o]);try{i=F.lookupNode(i,r[o])}catch(e){if(e?.errno===44&&s&&t.noent_okay)return{path:a};throw e}if(F.isMountpoint(i)&&(!s||t.follow_mount)&&(i=i.mounted.root),F.isLink(i.mode)&&(!s||t.follow)){if(!i.node_ops.readlink)throw new F.ErrnoError(52);var c=i.node_ops.readlink(i);O.isAbs(c)||(c=O.dirname(a)+`/`+c),e=c+`/`+r.slice(o+1).join(`/`);continue linkloop}}}return{path:a,node:i}}throw new F.ErrnoError(32)},getPath(e){for(var t;;){if(F.isRoot(e)){var n=e.mount.mountpoint;return t?n[n.length-1]===`/`?n+t:`${n}/${t}`:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%F.nameTable.length},hashAddNode(e){var t=F.hashName(e.parent.id,e.name);e.name_next=F.nameTable[t],F.nameTable[t]=e},hashRemoveNode(e){var t=F.hashName(e.parent.id,e.name);if(F.nameTable[t]===e)F.nameTable[t]=e.name_next;else for(var n=F.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=F.mayLookup(e);if(n)throw new F.ErrnoError(n);for(var r=F.hashName(e.id,t),i=F.nameTable[r];i;i=i.name_next){var a=i.name;if(i.parent.id===e.id&&a===t)return i}return F.lookup(e,t)},createNode(e,t,n,r){var i=new F.FSNode(e,t,n,r);return F.hashAddNode(i),i},destroyNode(e){F.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)==32768},isDir(e){return(e&61440)==16384},isLink(e){return(e&61440)==40960},isChrdev(e){return(e&61440)==8192},isBlkdev(e){return(e&61440)==24576},isFIFO(e){return(e&61440)==4096},isSocket(e){return(e&49152)==49152},flagsToPermissionString(e){var t=[`r`,`w`,`rw`][e&3];return e&512&&(t+=`w`),t},nodePermissions(e,t){return F.ignorePermissions?0:t.includes(`r`)&&!(e.mode&292)||t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73)?2:0},mayLookup(e){return F.isDir(e.mode)?F.nodePermissions(e,`x`)||(e.node_ops.lookup?0:2):54},mayCreate(e,t){if(!F.isDir(e.mode))return 54;try{return F.lookupNode(e,t),20}catch{}return F.nodePermissions(e,`wx`)},mayDelete(e,t,n){var r;try{r=F.lookupNode(e,t)}catch(e){return e.errno}var i=F.nodePermissions(e,`wx`);if(i)return i;if(n){if(!F.isDir(r.mode))return 54;if(F.isRoot(r)||F.getPath(r)===F.cwd())return 10}else if(F.isDir(r.mode))return 31;return 0},mayOpen(e,t){if(!e)return 44;if(F.isLink(e.mode))return 32;var n=F.flagsToPermissionString(t);return F.isDir(e.mode)&&(n!==`r`||t&576)?31:F.nodePermissions(e,n)},checkOpExists(e,t){if(!e)throw new F.ErrnoError(t);return e},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=F.MAX_OPEN_FDS;e++)if(!F.streams[e])return e;throw new F.ErrnoError(33)},getStreamChecked(e){var t=F.getStream(e);if(!t)throw new F.ErrnoError(8);return t},getStream:e=>F.streams[e],createStream(e,t=-1){return e=Object.assign(new F.FSStream,e),t==-1&&(t=F.nextfd()),e.fd=t,F.streams[t]=e,e},closeStream(e){F.streams[e]=null},dupStream(e,t=-1){var n=F.createStream(e,t);return n.stream_ops?.dup?.(n),n},doSetAttr(e,t,n){var r=e?.stream_ops.setattr,i=r?e:t;r??=t.node_ops.setattr,F.checkOpExists(r,63);try{r(i,n)}catch(e){throw e instanceof RangeError?new F.ErrnoError(22):e}},chrdev_stream_ops:{open(e){e.stream_ops=F.getDevice(e.node.rdev).stream_ops,e.stream_ops.open?.(e)},llseek(){throw new F.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){F.devices[e]={stream_ops:t}},getDevice:e=>F.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){typeof e==`function`&&(t=e,e=!1),F.syncFSRequests++,F.syncFSRequests>1&&p(`warning: ${F.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=F.getMounts(F.root.mount),r=0;function i(e){return F.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,i(e));++r>=n.length&&i(null)}for(var o of n)o.type.syncfs?o.type.syncfs(o,e,a):a(null)},mount(e,t,n){var r=n===`/`,i=!n,a;if(r&&F.root)throw new F.ErrnoError(10);if(!r&&!i){var o=F.lookupPath(n,{follow_mount:!1});if(n=o.path,a=o.node,F.isMountpoint(a))throw new F.ErrnoError(10);if(!F.isDir(a.mode))throw new F.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,r?F.root=c:a&&(a.mounted=s,a.mount&&a.mount.mounts.push(s)),c},unmount(e){var t=F.lookupPath(e,{follow_mount:!1});if(!F.isMountpoint(t.node))throw new F.ErrnoError(28);var n=t.node,r=n.mounted,i=F.getMounts(r);for(var[a,o]of Object.entries(F.nameTable))for(;o;){var s=o.name_next;i.includes(o.mount)&&F.destroyNode(o),o=s}n.mounted=null;var c=n.mount.mounts.indexOf(r);n.mount.mounts.splice(c,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,n){var r=F.lookupPath(e,{parent:!0}).node,i=O.basename(e);if(!i)throw new F.ErrnoError(28);if(i===`.`||i===`..`)throw new F.ErrnoError(20);var a=F.mayCreate(r,i);if(a)throw new F.ErrnoError(a);if(!r.node_ops.mknod)throw new F.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},statfs(e){return F.statfsNode(F.lookupPath(e,{follow:!0}).node)},statfsStream(e){return F.statfsNode(e.node)},statfsNode(e){var t={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:F.nextInode,ffree:F.nextInode-1,fsid:42,flags:2,namelen:255};return e.node_ops.statfs&&Object.assign(t,e.node_ops.statfs(e.mount.opts.root)),t},create(e,t=438){return t&=4095,t|=32768,F.mknod(e,t,0)},mkdir(e,t=511){return t&=1023,t|=16384,F.mknod(e,t,0)},mkdirTree(e,t){var n=e.split(`/`),r=``;for(var i of n)if(i){(r||O.isAbs(e))&&(r+=`/`),r+=i;try{F.mkdir(r,t)}catch(e){if(e.errno!=20)throw e}}},mkdev(e,t,n){return n===void 0&&(n=t,t=438),t|=8192,F.mknod(e,t,n)},symlink(e,t){if(!k.resolve(e))throw new F.ErrnoError(44);var n=F.lookupPath(t,{parent:!0}).node;if(!n)throw new F.ErrnoError(44);var r=O.basename(t),i=F.mayCreate(n,r);if(i)throw new F.ErrnoError(i);if(!n.node_ops.symlink)throw new F.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n=O.dirname(e),r=O.dirname(t),i=O.basename(e),a=O.basename(t),o=F.lookupPath(e,{parent:!0}),s=o.node,c;if(o=F.lookupPath(t,{parent:!0}),c=o.node,!s||!c)throw new F.ErrnoError(44);if(s.mount!==c.mount)throw new F.ErrnoError(75);var l=F.lookupNode(s,i),u=k.relative(e,r);if(u.charAt(0)!==`.`)throw new F.ErrnoError(28);if(u=k.relative(t,n),u.charAt(0)!==`.`)throw new F.ErrnoError(55);var d;try{d=F.lookupNode(c,a)}catch{}if(l!==d){var f=F.isDir(l.mode),p=F.mayDelete(s,i,f);if(p||(p=d?F.mayDelete(c,a,f):F.mayCreate(c,a),p))throw new F.ErrnoError(p);if(!s.node_ops.rename)throw new F.ErrnoError(63);if(F.isMountpoint(l)||d&&F.isMountpoint(d))throw new F.ErrnoError(10);if(c!==s&&(p=F.nodePermissions(s,`w`),p))throw new F.ErrnoError(p);F.hashRemoveNode(l);try{s.node_ops.rename(l,c,a),l.parent=c}catch(e){throw e}finally{F.hashAddNode(l)}}},rmdir(e){var t=F.lookupPath(e,{parent:!0}).node,n=O.basename(e),r=F.lookupNode(t,n),i=F.mayDelete(t,n,!0);if(i)throw new F.ErrnoError(i);if(!t.node_ops.rmdir)throw new F.ErrnoError(63);if(F.isMountpoint(r))throw new F.ErrnoError(10);t.node_ops.rmdir(t,n),F.destroyNode(r)},readdir(e){var t=F.lookupPath(e,{follow:!0}).node;return F.checkOpExists(t.node_ops.readdir,54)(t)},unlink(e){var t=F.lookupPath(e,{parent:!0}).node;if(!t)throw new F.ErrnoError(44);var n=O.basename(e),r=F.lookupNode(t,n),i=F.mayDelete(t,n,!1);if(i)throw new F.ErrnoError(i);if(!t.node_ops.unlink)throw new F.ErrnoError(63);if(F.isMountpoint(r))throw new F.ErrnoError(10);t.node_ops.unlink(t,n),F.destroyNode(r)},readlink(e){var t=F.lookupPath(e).node;if(!t)throw new F.ErrnoError(44);if(!t.node_ops.readlink)throw new F.ErrnoError(28);return t.node_ops.readlink(t)},stat(e,t){var n=F.lookupPath(e,{follow:!t}).node;return F.checkOpExists(n.node_ops.getattr,63)(n)},fstat(e){var t=F.getStreamChecked(e),n=t.node,r=t.stream_ops.getattr,i=r?t:n;return r??=n.node_ops.getattr,F.checkOpExists(r,63),r(i)},lstat(e){return F.stat(e,!0)},doChmod(e,t,n,r){F.doSetAttr(e,t,{mode:n&4095|t.mode&-4096,ctime:Date.now(),dontFollow:r})},chmod(e,t,n){var r=typeof e==`string`?F.lookupPath(e,{follow:!n}).node:e;F.doChmod(null,r,t,n)},lchmod(e,t){F.chmod(e,t,!0)},fchmod(e,t){var n=F.getStreamChecked(e);F.doChmod(n,n.node,t,!1)},doChown(e,t,n){F.doSetAttr(e,t,{timestamp:Date.now(),dontFollow:n})},chown(e,t,n,r){var i=typeof e==`string`?F.lookupPath(e,{follow:!r}).node:e;F.doChown(null,i,r)},lchown(e,t,n){F.chown(e,t,n,!0)},fchown(e,t,n){var r=F.getStreamChecked(e);F.doChown(r,r.node,!1)},doTruncate(e,t,n){if(F.isDir(t.mode))throw new F.ErrnoError(31);if(!F.isFile(t.mode))throw new F.ErrnoError(28);var r=F.nodePermissions(t,`w`);if(r)throw new F.ErrnoError(r);F.doSetAttr(e,t,{size:n,timestamp:Date.now()})},truncate(e,t){if(t<0)throw new F.ErrnoError(28);var n=typeof e==`string`?F.lookupPath(e,{follow:!0}).node:e;F.doTruncate(null,n,t)},ftruncate(e,t){var n=F.getStreamChecked(e);if(t<0||!(n.flags&2097155))throw new F.ErrnoError(28);F.doTruncate(n,n.node,t)},utime(e,t,n){var r=F.lookupPath(e,{follow:!0}).node;F.checkOpExists(r.node_ops.setattr,63)(r,{atime:t,mtime:n})},open(e,t,n=438){if(e===``)throw new F.ErrnoError(44);t=ze(t),n=t&64?n&4095|32768:0;var r,i;if(typeof e==`object`)r=e;else{i=e.endsWith(`/`);var a=F.lookupPath(e,{follow:!(t&131072),noent_okay:!0});r=a.node,e=a.path}var o=!1;if(t&64){if(r){if(t&128)throw new F.ErrnoError(20)}else if(i)throw new F.ErrnoError(31);else r=F.mknod(e,n|511,0),o=!0}if(!r)throw new F.ErrnoError(44);if(F.isChrdev(r.mode)&&(t&=-513),t&65536&&!F.isDir(r.mode))throw new F.ErrnoError(54);if(!o){var s=F.mayOpen(r,t);if(s)throw new F.ErrnoError(s)}t&512&&!o&&F.truncate(r,0),t&=-131713;var c=F.createStream({node:r,path:F.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return c.stream_ops.open&&c.stream_ops.open(c),o&&F.chmod(r,n&511),c},close(e){if(F.isClosed(e))throw new F.ErrnoError(8);e.getdents&&=null;try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{F.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,n){if(F.isClosed(e))throw new F.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new F.ErrnoError(70);if(n!=0&&n!=1&&n!=2)throw new F.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(r<0||i<0)throw new F.ErrnoError(28);if(F.isClosed(e)||(e.flags&2097155)==1)throw new F.ErrnoError(8);if(F.isDir(e.node.mode))throw new F.ErrnoError(31);if(!e.stream_ops.read)throw new F.ErrnoError(28);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new F.ErrnoError(70);var o=e.stream_ops.read(e,t,n,r,i);return a||(e.position+=o),o},write(e,t,n,r,i,a){if(r<0||i<0)throw new F.ErrnoError(28);if(F.isClosed(e)||!(e.flags&2097155))throw new F.ErrnoError(8);if(F.isDir(e.node.mode))throw new F.ErrnoError(31);if(!e.stream_ops.write)throw new F.ErrnoError(28);e.seekable&&e.flags&1024&&F.llseek(e,0,2);var o=i!==void 0;if(!o)i=e.position;else if(!e.seekable)throw new F.ErrnoError(70);var s=e.stream_ops.write(e,t,n,r,i,a);return o||(e.position+=s),s},mmap(e,t,n,r,i){if(r&2&&!(i&2)&&(e.flags&2097155)!=2||(e.flags&2097155)==1)throw new F.ErrnoError(2);if(!e.stream_ops.mmap)throw new F.ErrnoError(43);if(!t)throw new F.ErrnoError(28);return e.stream_ops.mmap(e,t,n,r,i)},msync(e,t,n,r,i){return e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,i):0},ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new F.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){t.flags=t.flags??0,t.encoding=t.encoding??`binary`,t.encoding!==`utf8`&&t.encoding!==`binary`&&g(`Invalid encoding type "${t.encoding}"`);var n=F.open(e,t.flags),r=F.stat(e).size,i=new Uint8Array(r);return F.read(n,i,0,r,0),t.encoding===`utf8`&&(i=A(i)),F.close(n),i},writeFile(e,t,n={}){n.flags=n.flags??577;var r=F.open(e,n.flags,n.mode);t=Be(t),F.write(r,t,0,t.byteLength,void 0,n.canOwn),F.close(r)},cwd:()=>F.currentPath,chdir(e){var t=F.lookupPath(e,{follow:!0});if(t.node===null)throw new F.ErrnoError(44);if(!F.isDir(t.node.mode))throw new F.ErrnoError(54);var n=F.nodePermissions(t.node,`x`);if(n)throw new F.ErrnoError(n);F.currentPath=t.path},createDefaultDirectories(){F.mkdir(`/tmp`),F.mkdir(`/home`),F.mkdir(`/home/web_user`)},createDefaultDevices(){F.mkdir(`/dev`),F.registerDevice(F.makedev(1,3),{read:()=>0,write:(e,t,n,r,i)=>r,llseek:()=>0}),F.mkdev(`/dev/null`,F.makedev(1,3)),j.register(F.makedev(5,0),j.default_tty_ops),j.register(F.makedev(6,0),j.default_tty1_ops),F.mkdev(`/dev/tty`,F.makedev(5,0)),F.mkdev(`/dev/tty1`,F.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(Ae(e),t=e.byteLength),e[--t]);F.createDevice(`/dev`,`random`,n),F.createDevice(`/dev`,`urandom`,n),F.mkdir(`/dev/shm`),F.mkdir(`/dev/shm/tmp`)},createSpecialDirectories(){F.mkdir(`/proc`);var e=F.mkdir(`/proc/self`);F.mkdir(`/proc/self/fd`),F.mount({mount(){var t=F.createNode(e,`fd`,16895,73);return t.stream_ops={llseek:M.stream_ops.llseek},t.node_ops={lookup(e,t){var n=+t,r=F.getStreamChecked(n),i={parent:null,mount:{mountpoint:`fake`},node_ops:{readlink:()=>r.path},id:n+1};return i.parent=i,i},readdir(){return Array.from(F.streams.entries()).filter(([e,t])=>t).map(([e,t])=>e.toString())}},t}},{},`/proc/self/fd`)},createStandardStreams(e,t,n){e?F.createDevice(`/dev`,`stdin`,e):F.symlink(`/dev/tty`,`/dev/stdin`),t?F.createDevice(`/dev`,`stdout`,null,t):F.symlink(`/dev/tty`,`/dev/stdout`),n?F.createDevice(`/dev`,`stderr`,null,n):F.symlink(`/dev/tty1`,`/dev/stderr`),F.open(`/dev/stdin`,0),F.open(`/dev/stdout`,1),F.open(`/dev/stderr`,1)},staticInit(){F.nameTable=Array(4096),F.mount(M,{},`/`),F.createDefaultDirectories(),F.createDefaultDevices(),F.createSpecialDirectories(),F.filesystems={MEMFS:M}},init(e,t,r){F.initialized=!0,e??=n.stdin,t??=n.stdout,r??=n.stderr,F.createStandardStreams(e,t,r)},quit(){F.initialized=!1;for(var e of F.streams)e&&F.close(e)},findObject(e,t){var n=F.analyzePath(e,t);return n.exists?n.object:null},analyzePath(e,t){try{var n=F.lookupPath(e,{follow:!t});e=n.path}catch{}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=F.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=O.basename(e),n=F.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot=n.path===`/`}catch(e){r.error=e.errno}return r},createPath(e,t,n,r){e=typeof e==`string`?e:F.getPath(e);for(var i=t.split(`/`).reverse();i.length;){var a=i.pop();if(a){var o=O.join2(e,a);try{F.mkdir(o)}catch(e){if(e.errno!=20)throw e}e=o}}return o},createFile(e,t,n,r,i){var a=O.join2(typeof e==`string`?e:F.getPath(e),t),o=Ve(r,i);return F.create(a,o)},createDataFile(e,t,n,r,i,a){var o=t;e&&(e=typeof e==`string`?e:F.getPath(e),o=t?O.join2(e,t):e);var s=Ve(r,i),c=F.create(o,s);if(n){n=Be(n),F.chmod(c,s|146);var l=F.open(c,577);F.write(l,n,0,n.length,0,a),F.close(l),F.chmod(c,s)}},createDevice(e,t,n,r){var i=O.join2(typeof e==`string`?e:F.getPath(e),t),a=Ve(!!n,!!r);F.createDevice.major??=64;var o=F.makedev(F.createDevice.major++,0);return F.registerDevice(o,{open(e){e.seekable=!1},close(e){r?.buffer?.length&&r(10)},read(e,t,r,i,a){for(var o=0,s=0;s<i;s++){var c;try{c=n()}catch{throw new F.ErrnoError(29)}if(c===void 0&&o===0)throw new F.ErrnoError(6);if(c==null)break;o++,t[r+s]=c}return o&&(e.node.atime=Date.now()),o},write(e,t,n,i,a){for(var o=0;o<i;o++)try{r(t[n+o])}catch{throw new F.ErrnoError(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),o}}),F.mkdev(i,a,o)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(globalThis.XMLHttpRequest)g(`Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.`);else try{e.contents=d(e.url)}catch{throw new F.ErrnoError(29)}},createLazyFile(e,t,n,r,a){class o{lengthKnown=!1;chunks=[];get(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;e.open(`HEAD`,n,!1),e.send(null),e.status>=200&&e.status<300||e.status===304||g(`Couldn't load `+n+`. Status: `+e.status);var t=Number(e.getResponseHeader(`Content-length`)),r,i=(r=e.getResponseHeader(`Accept-Ranges`))&&r===`bytes`,a=(r=e.getResponseHeader(`Content-Encoding`))&&r===`gzip`,o=1048576;i||(o=t);var s=(e,r)=>{e>r&&g(`invalid range (${e}, ${r}) or no bytes requested!`),r>t-1&&g(`only ${t} bytes available! programmer error!`);var i=new XMLHttpRequest;return i.open(`GET`,n,!1),t!==o&&i.setRequestHeader(`Range`,`bytes=`+e+`-`+r),i.responseType=`arraybuffer`,i.overrideMimeType&&i.overrideMimeType(`text/plain; charset=x-user-defined`),i.send(null),i.status>=200&&i.status<300||i.status===304||g(`Couldn't load `+n+`. Status: `+i.status),i.response===void 0?Ie(i.responseText??``):new Uint8Array(i.response||[])},c=this;c.setDataGetter(e=>{var n=e*o,r=(e+1)*o-1;return r=Math.min(r,t-1),c.chunks[e]===void 0&&(c.chunks[e]=s(n,r)),c.chunks[e]===void 0&&g(`doXHR failed!`),c.chunks[e]}),(a||!t)&&(o=t=1,t=this.getter(0).length,o=t,f(`LazyFiles on gzip forces download of the whole file when length is accessed`)),this._length=t,this._chunkSize=o,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(globalThis.XMLHttpRequest){i||g(`Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc`);var s={isDevice:!1,contents:new o}}else var s={isDevice:!1,url:n};var c=F.createFile(e,t,s,r,a);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};for(let[e,t]of Object.entries(c.stream_ops))l[e]=(...e)=>(F.forceLoadFile(c),t(...e));function u(e,t,n,r,i){var a=e.node.contents;if(i>=a.length)return 0;var o=Math.min(a.length-i,r);if(a.slice)for(var s=0;s<o;s++)t[n+s]=a[i+s];else for(var s=0;s<o;s++)t[n+s]=a.get(i+s);return o}return l.read=(e,t,n,r,i)=>(F.forceLoadFile(c),u(e,t,n,r,i)),l.mmap=(e,t,n,r,i)=>{F.forceLoadFile(c);var a=Re();if(!a)throw new F.ErrnoError(48);return u(e,b,a,t,n),{ptr:a,allocated:!0}},c.stream_ops=l,c}},I=(e,t,n)=>e?A(C,e,t,n):``,L={currentUmask:18,calculateAt(e,t,n){if(O.isAbs(t))return t;var r=e===-100?F.cwd():L.getStreamFromFD(e).path;if(t.length==0){if(!n)throw new F.ErrnoError(44);return r}return r+`/`+t},writeStat(e,t){S[e>>2]=t.dev,S[e+4>>2]=t.mode,S[e+8>>2]=t.nlink,S[e+12>>2]=t.uid,S[e+16>>2]=t.gid,S[e+20>>2]=t.rdev,y[e+24>>3]=BigInt(t.size),v[e+32>>2]=4096,v[e+36>>2]=t.blocks;var n=t.atime.getTime(),r=t.mtime.getTime(),i=t.ctime.getTime();return y[e+40>>3]=BigInt(Math.floor(n/1e3)),S[e+48>>2]=n%1e3*1e3*1e3,y[e+56>>3]=BigInt(Math.floor(r/1e3)),S[e+64>>2]=r%1e3*1e3*1e3,y[e+72>>3]=BigInt(Math.floor(i/1e3)),S[e+80>>2]=i%1e3*1e3*1e3,y[e+88>>3]=BigInt(t.ino),0},writeStatFs(e,t){S[e+4>>2]=t.bsize,S[e+60>>2]=t.bsize,y[e+8>>3]=BigInt(t.blocks),y[e+16>>3]=BigInt(t.bfree),y[e+24>>3]=BigInt(t.bavail),y[e+32>>3]=BigInt(t.files),y[e+40>>3]=BigInt(t.ffree),S[e+48>>2]=t.fsid,S[e+64>>2]=t.flags,S[e+56>>2]=t.namelen},doMsync(e,t,n,r,i){if(!F.isFile(t.node.mode))throw new F.ErrnoError(43);if(r&2)return 0;var a=C.slice(e,e+n);F.msync(t,a,i,n,r)},getStreamFromFD(e){return F.getStreamChecked(e)},varargs:void 0,getStr(e){return I(e)}};function Xe(e,t,n){L.varargs=n;try{var r=L.getStreamFromFD(e);switch(t){case 0:var i=E();if(i<0)return-28;for(;F.streams[i];)i++;return F.dupStream(r,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var i=E(),a=289792;return r.flags=r.flags&~a|i&a,0;case 12:var i=D(),o=0;return _[i+o>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}}function Ze(e,t,n){L.varargs=n;try{var r=L.getStreamFromFD(e);switch(t){case 21509:return r.tty?0:-59;case 21505:if(!r.tty)return-59;if(r.tty.ops.ioctl_tcgets){var i=r.tty.ops.ioctl_tcgets(r),a=D();v[a>>2]=i.c_iflag||0,v[a+4>>2]=i.c_oflag||0,v[a+8>>2]=i.c_cflag||0,v[a+12>>2]=i.c_lflag||0;for(var o=0;o<32;o++)b[a+o+17]=i.c_cc[o]||0;return 0}return 0;case 21510:case 21511:case 21512:return r.tty?0:-59;case 21506:case 21507:case 21508:if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){for(var a=D(),s=v[a>>2],c=v[a+4>>2],l=v[a+8>>2],u=v[a+12>>2],d=[],o=0;o<32;o++)d.push(b[a+o+17]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:s,c_oflag:c,c_cflag:l,c_lflag:u,c_cc:d})}return 0;case 21519:if(!r.tty)return-59;var a=D();return v[a>>2]=0,0;case 21520:return r.tty?-28:-59;case 21537:case 21531:var a=D();return F.ioctl(r,t,a);case 21523:if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var f=r.tty.ops.ioctl_tiocgwinsz(r.tty),a=D();_[a>>1]=f[0],_[a+2>>1]=f[1]}return 0;case 21524:return r.tty?0:-59;case 21515:return r.tty?0:-59;default:return-28}}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}}function Qe(e,t,n,r){L.varargs=r;try{t=L.getStr(t),t=L.calculateAt(e,t);var i=r?E():0;return n&64&&(i&=~L.currentUmask),F.open(t,n,i).fd}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}}var $e=()=>g(``),et={},tt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function nt(e){return this.fromWireType(S[e>>2])}var R={},z={},B={},rt=class extends Error{constructor(e){super(e),this.name=`InternalError`}},it=e=>{throw new rt(e)},at=(e,t,n)=>{e.forEach(e=>B[e]=t);function r(t){var r=n(t);r.length!==e.length&&it(`Mismatched type converter count`);for(var i=0;i<e.length;++i)U(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())z.hasOwnProperty(n)?i[e]=z[n]:(a.push(n),R.hasOwnProperty(n)||(R[n]=[]),R[n].push(()=>{i[e]=z[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},ot=e=>{var t=et[e];delete et[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.fields,a=i.map(e=>e.getterReturnType).concat(i.map(e=>e.setterArgumentType));at([e],a,e=>{var a={};for(var[o,s]of i.entries()){let t=e[o],n=s.getter,r=s.getterContext,c=e[o+i.length],l=s.setter,u=s.setterContext;a[s.fieldName]={read:e=>t.fromWireType(n(r,e)),write:(e,t)=>{var n=[];l(u,e,c.toWireType(n,t)),tt(n)},optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in a)t[n]=a[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var i in a)if(!(i in t)&&!a[i].optional)throw TypeError(`Missing field: "${i}"`);var o=n();for(i in a)a[i].write(o,t[i]);return e!==null&&e.push(r,o),o},readValueFromPointer:nt,destructorFunction:r}]})},V=e=>{for(var t=``;;){var n=C[e++];if(!n)return t;t+=String.fromCharCode(n)}},st=class extends Error{constructor(e){super(e),this.name=`BindingError`}},H=e=>{throw new st(e)};function ct(e,t,n={}){var r=t.name;if(e||H(`type "${r}" must have a positive integer typeid pointer`),z.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;H(`Cannot register type '${r}' twice`)}if(z[e]=t,delete B[e],R.hasOwnProperty(e)){var i=R[e];delete R[e],i.forEach(e=>e())}}function U(e,t,n={}){return ct(e,t,n)}var lt=(e,t,n)=>{switch(t){case 1:return n?e=>b[e]:e=>C[e];case 2:return n?e=>_[e>>1]:e=>x[e>>1];case 4:return n?e=>v[e>>2]:e=>S[e>>2];case 8:return n?e=>y[e>>3]:e=>be[e>>3];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},ut=(e,t,n,r,i)=>{t=V(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}U(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:lt(t,n,!a),destructorFunction:null})},dt=(e,t,n,r)=>{t=V(t),U(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(C[e])},destructorFunction:null})},ft=[],W=[0,1,,1,null,1,!0,1,!1,1],pt=e=>{e>9&&--W[e+1]===0&&(W[e],W[e]=void 0,ft.push(e))},G={toValue:e=>(e||H(`Cannot use deleted val. handle = ${e}`),W[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=ft.pop()||W.length;return W[t]=e,W[t+1]=1,t}}}},mt={name:`emscripten::val`,fromWireType:e=>{var t=G.toValue(e);return pt(e),t},toWireType:(e,t)=>G.toHandle(t),readValueFromPointer:nt,destructorFunction:null},ht=e=>U(e,mt),gt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(ve[e>>2])};case 8:return function(e){return this.fromWireType(ye[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},_t=(e,t,n)=>{t=V(t),U(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:gt(t,n),destructorFunction:null})},vt=(e,t)=>Object.defineProperty(t,"name",{value:e});function yt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function bt(e,t,n,r,i,a){var o=t.length;o<2&&H(`argTypes array size mismatch! Must at least get return value and 'this' types!`),t[1];var s=yt(t),c=!t[0].isVoid,l=o-2,u=Array(l),d=[],f=[];return vt(e,function(...e){f.length=0;var n;d.length=1,d[0]=i;for(var a=0;a<l;++a)u[a]=t[a+2].toWireType(f,e[a]),d.push(u[a]);var o=r(...d);function p(e){if(s)tt(f);else for(var r=2;r<t.length;r++){var i=r===1?n:u[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(i)}if(c)return t[0].fromWireType(e)}return p(o)})}var xt=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||H(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},St=(e,t,r)=>{n.hasOwnProperty(e)?((r===void 0||n[e].overloadTable!==void 0&&n[e].overloadTable[r]!==void 0)&&H(`Cannot register public name '${e}' twice`),xt(n,e,e),n[e].overloadTable.hasOwnProperty(r)&&H(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,n[e].argCount=r)},Ct=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(S[t+r*4>>2]);return n},wt=(e,t,r)=>{n.hasOwnProperty(e)||it(`Replacing nonexistent public symbol`),n[e].overloadTable!==void 0&&r!==void 0?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Tt=[],K=e=>{var t=Tt[e];return t||(Tt[e]=t=$.get(e)),t},q=(e,t,n=!1)=>{e=V(e);function r(){return K(t)}var i=r();return typeof i!=`function`&&H(`unknown function pointer with signature ${e}: ${t}`),i};class Et extends Error{}var Dt=e=>{var t=qn(e),n=V(t);return Z(t),n},Ot=(e,t)=>{var n=[],r={};function i(e){if(!r[e]&&!z[e]){if(B[e]){B[e].forEach(i);return}n.push(e),r[e]=!0}}throw t.forEach(i),new Et(`${e}: `+n.map(Dt).join([`, `]))},kt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},At=(e,t,n,r,i,a,o,s)=>{var c=Ct(t,n);e=V(e),e=kt(e),i=q(r,i,o),St(e,function(){Ot(`Cannot call ${e} due to unbound types`,c)},t-1),at([],c,n=>{var r=[n[0],null].concat(n.slice(1));return wt(e,bt(e,r,null,i,a),t-1),[]})},jt=(e,t,n,r,i)=>{t=V(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}U(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:lt(t,n,r!==0),destructorFunction:null})},Mt=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=S[e>>2],n=S[e+4>>2];return new r(b.buffer,n,t)}n=V(n),U(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},J=(e,t,n)=>Fe(e,C,t,n),Nt=(e,t)=>{t=V(t),U(e,{name:t,fromWireType(e){var t=S[e>>2],n=I(e+4,t,!0);return Z(e),n},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r=typeof t==`string`;r||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||H(`Cannot pass non-string to std::string`),n=r?Pe(t):t.length;var i=Jn(4+n+1),a=i+4;return S[i>>2]=n,r?J(t,a,n+1):C.set(t,a),e!==null&&e.push(Z,i),i},readValueFromPointer:nt,destructorFunction(e){Z(e)}})},Pt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,Ft=(e,t,n)=>{var r=e>>1,i=Me(x,r,t/2,n);if(i-r>16&&Pt)return Pt.decode(x.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=x[o];a+=String.fromCharCode(s)}return a},It=(e,t,n)=>{if(n??=2147483647,n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);_[t>>1]=o,t+=2}return _[t>>1]=0,t-r},Lt=e=>e.length*2,Rt=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=S[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},zt=(e,t,n)=>{if(n??=2147483647,n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,v[t>>2]=o,t+=4,t+4>i)break}return v[t>>2]=0,t-r},Bt=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},Vt=(e,t,n)=>{n=V(n);var r,i,a;t===2?(r=Ft,i=It,a=Lt):(r=Rt,i=zt,a=Bt),U(e,{name:n,fromWireType:e=>{var n=S[e>>2],i=r(e+4,n*t,!0);return Z(e),i},toWireType:(e,r)=>{typeof r!=`string`&&H(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=Jn(4+o+t);return S[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Z,s),s},readValueFromPointer:nt,destructorFunction(e){Z(e)}})},Ht=(e,t,n,r,i,a)=>{et[e]={name:V(t),rawConstructor:q(n,r),rawDestructor:q(i,a),fields:[]}},Ut=(e,t,n,r,i,a,o,s,c,l)=>{et[e].fields.push({fieldName:V(t),getterReturnType:n,getter:q(r,i),getterContext:a,setterArgumentType:o,setter:q(s,c),setterContext:l})},Wt=(e,t)=>{t=V(t),U(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},Gt=e=>{do{var t=S[e>>2];e+=4;var n=S[e>>2];e+=4;var r=S[e>>2];e+=4;var i=I(t);F.createPath(`/`,O.dirname(i)),F.createDataFile(i,null,b.subarray(r,r+n),!0,!0,!0)}while(S[e>>2])},Kt=()=>{throw new te},qt=(e,t)=>{e=G.toValue(e),t=G.toValue(t),e.set(t)},Jt=[],Yt=e=>{var t=Jt.length;return Jt.push(e),t},Xt=(e,t)=>{var n=z[e];return n===void 0&&H(`${t} has unknown type ${Dt(e)}`),n},Zt=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Xt(S[t+r*4>>2],`parameter ${r}`);return n},Qt=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(S[t>>2]=G.toHandle(r)),i},$t={},en=e=>{var t=$t[e];return t===void 0?V(e):t},tn=(e,t,n)=>{var[r,...i]=Zt(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return Yt(vt(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=G.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(G.toValue(t),s);break;case 3:d=s[0];break;case 1:d=G.toValue(t)[en(r)](...s)}return Qt(a,i,d)}))},nn=e=>e?(e=en(e),G.toHandle(globalThis[e])):G.toHandle(globalThis),rn=(e,t)=>(e=G.toValue(e),t=G.toValue(t),G.toHandle(e[t])),an=e=>{e>9&&(W[e+1]+=1)},on=(e,t,n,r,i)=>Jt[e](t,n,r,i),sn=()=>G.toHandle([]),cn=e=>G.toHandle(en(e)),ln=e=>{tt(G.toValue(e)),pt(e)},un=(e,t,n)=>{e=G.toValue(e),t=G.toValue(t),n=G.toValue(n),e[t]=n},dn=(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);S[e>>2]=l*60,v[t>>2]=Number(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?(J(d,n,17),J(f,r,17)):(J(d,r,17),J(f,n,17))},fn=()=>2147483648,pn=(e,t)=>Math.ceil(e/t)*t,mn=e=>{var t=(e-Zn.buffer.byteLength+65535)/65536|0;try{return Zn.grow(t),ae(),1}catch{}},hn=e=>{var t=C.length;e>>>=0;var n=fn();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),mn(Math.min(n,pn(Math.max(e,i),65536))))return!0}return!1},gn={},_n=()=>a,Y=()=>{if(!Y.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:_n()};for(var t in gn)gn[t]===void 0?delete e[t]:e[t]=gn[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);Y.strings=n}return Y.strings},vn=(e,t)=>{var n=0,r=0;for(var i of Y()){var a=t+n;S[e+r>>2]=a,n+=J(i,a,1/0)+1,r+=4}return 0},yn=(e,t)=>{var n=Y();S[e>>2]=n.length;var r=0;for(var i of n)r+=Pe(i)+1;return S[t>>2]=r,0},bn=0,xn=()=>Ee||bn>0,Sn=e=>{xn()||(n.onExit?.(e),ee=!0),o(e,new _e(e))},Cn=(e,t)=>{Sn(e)};function wn(e){try{var t=L.getStreamFromFD(e);return F.close(t),0}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var Tn=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=S[t>>2],s=S[t+4>>2];t+=8;var c=F.read(e,b,o,s,r);if(c<0)return-1;if(i+=c,c<s)break}return i};function En(e,t,n,r){try{var i=Tn(L.getStreamFromFD(e),t,n);return S[r>>2]=i,0}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var Dn=9007199254740992,On=-9007199254740992,kn=e=>e<On||e>Dn?NaN:Number(e);function An(e,t,n,r){t=kn(t);try{if(isNaN(t))return 22;var i=L.getStreamFromFD(e);return F.llseek(i,t,n),y[r>>3]=BigInt(i.position),i.getdents&&t===0&&n===0&&(i.getdents=null),0}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var jn=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=S[t>>2],s=S[t+4>>2];t+=8;var c=F.write(e,b,o,s,r);if(c<0)return-1;if(i+=c,c<s)break}return i};function Mn(e,t,n,r){try{var i=jn(L.getStreamFromFD(e),t,n);return S[r>>2]=i,0}catch(e){if(F===void 0||e.name!==`ErrnoError`)throw e;return e.errno}}var Nn=(e,t)=>{if(X)for(var n=e;n<e+t;n++){var r=K(n);r&&X.set(r,n)}},X,Pn=e=>(X||(X=new WeakMap,Nn(0,$.length)),X.get(e)||0),Fn=[],In=()=>Fn.length?Fn.pop():$.grow(1),Ln=(e,t)=>{$.set(e,t),Tt[e]=$.get(e)},Rn=e=>{let t=e.length;return[t%128|128,t>>7,...e]},zn={i:127,p:127,j:126,f:125,d:124,e:111},Bn=e=>Rn(Array.from(e,e=>zn[e])),Vn=(e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Rn([1,96,...Bn(t.slice(1)),...Bn(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f},Hn=(e,t)=>{var n=Pn(e);if(n)return n;var r=In();try{Ln(r,e)}catch(n){if(!(n instanceof TypeError))throw n;Ln(r,Vn(e,t))}return X.set(e,r),r},Un=(...e)=>F.createPath(...e),Wn=(...e)=>F.unlink(...e),Gn=(...e)=>F.createLazyFile(...e),Kn=(...e)=>F.createDevice(...e);if(F.createPreloadedFile=Ye,F.preloadFile=Je,F.staticInit(),n.noExitRuntime&&(Ee=n.noExitRuntime),n.preloadPlugins&&(Ke=n.preloadPlugins),n.print&&(f=n.print),n.printErr&&(p=n.printErr),n.wasmBinary&&(m=n.wasmBinary),n.arguments&&n.arguments,n.thisProgram&&(a=n.thisProgram),n.preInit)for(typeof n.preInit==`function`&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.shift()();n.addRunDependency=Ge,n.removeRunDependency=We,n.addFunction=Hn,n.UTF8ToString=I,n.FS_preloadFile=Je,n.FS_unlink=Wn,n.FS_createPath=Un,n.FS_createDevice=Kn,n.FS_createDataFile=Ue,n.FS_createLazyFile=Gn,n.Emval=G;var qn,Jn,Z,Q,Yn,Xn,Zn,$;function Qn(e){qn=e._,Jn=n._malloc=e.aa,Z=n._free=e.ba,Q=e.ca,Yn=e.da,Xn=e.ea,Zn=e.Y,$=e.$}var $n={n:Oe,x:Xe,M:Ze,N:Qe,O:$e,A:ot,z:ut,T:dt,R:ht,y:_t,o:At,d:jt,b:Mt,S:Nt,t:Vt,B:Ht,c:Ut,U:Wt,Q:Gt,F:Kt,W:qt,k:tn,a:pt,X:nn,p:rn,j:an,i:on,C:sn,m:cn,h:ln,V:un,H:dn,G:hn,J:vn,K:yn,P:Cn,v:wn,L:En,I:An,w:Mn,q:er,l:rr,r:ar,u:or,E:cr,s:ir,g:tr,D:lr,e:sr,f:nr};function er(e,t){var n=T();try{return K(e)(t)}catch(e){if(w(n),!(e instanceof h))throw e;Q(1,0)}}function tr(e,t){var n=T();try{K(e)(t)}catch(e){if(w(n),!(e instanceof h))throw e;Q(1,0)}}function nr(e,t,n,r){var i=T();try{K(e)(t,n,r)}catch(e){if(w(i),!(e instanceof h))throw e;Q(1,0)}}function rr(e,t,n){var r=T();try{return K(e)(t,n)}catch(e){if(w(r),!(e instanceof h))throw e;Q(1,0)}}function ir(e){var t=T();try{K(e)()}catch(e){if(w(t),!(e instanceof h))throw e;Q(1,0)}}function ar(e,t,n,r){var i=T();try{return K(e)(t,n,r)}catch(e){if(w(i),!(e instanceof h))throw e;Q(1,0)}}function or(e,t,n,r,i){var a=T();try{return K(e)(t,n,r,i)}catch(e){if(w(a),!(e instanceof h))throw e;Q(1,0)}}function sr(e,t,n){var r=T();try{K(e)(t,n)}catch(e){if(w(r),!(e instanceof h))throw e;Q(1,0)}}function cr(e,t,n,r,i,a,o,s,c,l){var u=T();try{return K(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(w(u),!(e instanceof h))throw e;Q(1,0)}}function lr(e,t,n,r){var i=T();try{K(e)(t,n,r)}catch(e){if(w(i),!(e instanceof h))throw e;Q(1,0)}}function ur(){if(N>0){P=ur;return}if(oe(),N>0){P=ur;return}function e(){n.calledRun=!0,!ee&&(se(),ne?.(n),n.onRuntimeInitialized?.(),ce())}n.setStatus?(n.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>n.setStatus(``),1),e()},1)):e()}var dr=await ge();return ur(),t=ie?n:new Promise((e,t)=>{ne=e,re=t}),t}export{e as default};
|
|
2
|
+
async function e(e={}){var t=e,n=!!globalThis.window,r=!!globalThis.WorkerGlobalScope;globalThis.process?.versions?.node&&globalThis.process;var i=`./this.program`,a=(e,t)=>{throw t},o=``,s=``;function c(e){return t.locateFile?t.locateFile(e,s):s+e}var l,u;if(n||r){try{s=new URL(`.`,o).href}catch{}r&&(u=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),l=async e=>{var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var d=console.log.bind(console),f=console.error.bind(console),p=!1;class m{}class h extends m{}function ee(){return on.buffer}function te(){if(!_?.buffer?.resizable){var e=ee();_=new Int8Array(e),F=new Int16Array(e),t.HEAPU8=j=new Uint8Array(e),t.HEAPU16=V=new Uint16Array(e),x=new Int32Array(e),t.HEAPU32=b=new Uint32Array(e),t.HEAPF32=it=new Float32Array(e),t.HEAPF64=at=new Float64Array(e),N=new BigInt64Array(e),$e=new BigUint64Array(e)}}function ne(){var e=t.preRun;e&&(typeof e==`function`&&(e=[e]),he.push(...e)),pe(he)}function re(){!t.noFSInit&&!A.initialized&&A.init(),$.Z(),A.ignorePermissions=!1}function ie(){var e=t.postRun;e&&(typeof e==`function`&&(e=[e]),me.push(...e)),pe(me)}function g(e){throw t.onAbort?.(e),e=`Aborted(${e})`,f(e),p=!0,e+=`. Build with -sASSERTIONS for more info.`,new WebAssembly.RuntimeError(e)}var ae;function oe(){return t.locateFile?c(`lyr3DWorker.wasm`):new URL(`lyr3DWorker.wasm`,``).href}function se(e){if(u)return u(e);throw`both async and sync fetching of the wasm failed`}async function ce(e){try{var t=await l(e);return new Uint8Array(t)}catch{}return se(e)}async function le(e,t){try{var n=await ce(e);return await WebAssembly.instantiate(n,t)}catch(e){f(`failed to asynchronously prepare wasm: ${e}`),g(e)}}async function ue(e,t,n){try{var r=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(r,n)}catch(e){f(`wasm streaming compile failed: ${e}`),f(`falling back to ArrayBuffer instantiation`)}return le(t,n)}function de(){return{a:cn}}class fe{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var _,pe=e=>{for(;e.length>0;)e.shift()(t)},me=[],he=[],ge=!0,v=e=>nn(e),y=()=>an(),b;class _e{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){b[this.ptr+4>>2]=e}get_type(){return b[this.ptr+4>>2]}set_destructor(e){b[this.ptr+8>>2]=e}get_destructor(){return b[this.ptr+8>>2]}set_caught(e){e=+!!e,_[this.ptr+12]=e}get_caught(){return _[this.ptr+12]!=0}set_rethrown(e){e=+!!e,_[this.ptr+13]=e}get_rethrown(){return _[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){b[this.ptr+16>>2]=e}get_adjusted_ptr(){return b[this.ptr+16>>2]}}var ve=()=>{g()},x,S=()=>{var e=x[P.varargs>>2];return P.varargs+=4,e},C=S,w={isAbs:e=>e.charAt(0)===`/`,splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},normalize:e=>{var t=w.isAbs(e),n=e.slice(-1)===`/`;return e=w.normalizeArray(e.split(`/`).filter(e=>!!e),!t).join(`/`),!e&&!t&&(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},dirname:e=>{var t=w.splitPath(e),n=t[0],r=t[1];return!n&&!r?`.`:(r&&=r.slice(0,-1),n+r)},basename:e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],join:(...e)=>w.normalize(e.join(`/`)),join2:(e,t)=>w.normalize(e+`/`+t)},ye=()=>e=>(crypto.getRandomValues(e),0),be=e=>(be=ye())(e),T={resolve:(...e)=>{for(var t=``,n=!1,r=e.length-1;r>=-1&&!n;r--){var i=r>=0?e[r]:A.cwd();if(typeof i!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!i)return``;t=i+`/`+t,n=w.isAbs(i)}return t=w.normalizeArray(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},relative:(e,t)=>{e=T.resolve(e).slice(1),t=T.resolve(t).slice(1);function n(e){for(var t=0;t<e.length&&e[t]===``;t++);for(var n=e.length-1;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}for(var r=n(e.split(`/`)),i=n(t.split(`/`)),a=Math.min(r.length,i.length),o=a,s=0;s<a;s++)if(r[s]!==i[s]){o=s;break}var c=[];for(s=o;s<r.length;s++)c.push(`..`);return c=c.concat(i.slice(o)),c.join(`/`)}},xe=globalThis.TextDecoder&&new TextDecoder,Se=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},E=(e,t=0,n,r)=>{var i=Se(e,t,n,r);if(i-t>16&&e.buffer&&xe)return xe.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=e[t++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var c=e[t++]&63;if(o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,o<65536)a+=String.fromCharCode(o);else{var l=o-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},Ce=[],we=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},Te=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},Ee=(e,t,n)=>{var r=we(e)+1,i=Array(r);return i.length=Te(e,i,0,i.length),i},De=()=>{if(!Ce.length){var e=null;if(globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
|
|
3
|
+
`)),!e)return null;Ce=Ee(e)}return Ce.shift()},D={ttys:[],init(){},shutdown(){},register(e,t){D.ttys[e]={input:[],output:[],ops:t},A.registerDevice(e,D.stream_ops)},stream_ops:{open(e){var t=D.ttys[e.node.rdev];if(!t)throw new A.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new A.ErrnoError(60);for(var a=0,o=0;o<r;o++){var s;try{s=e.tty.ops.get_char(e.tty)}catch{throw new A.ErrnoError(29)}if(s===void 0&&!a)throw new A.ErrnoError(6);if(s==null||(a++,t[n+o]=s,s===10))break}return a&&(e.node.atime=Date.now()),a},write(e,t,n,r,i){if(!e.tty||!e.tty.ops.put_char)throw new A.ErrnoError(60);try{for(var a=0;a<r;a++)e.tty.ops.put_char(e.tty,t[n+a])}catch{throw new A.ErrnoError(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),a}},default_tty_ops:{get_char(e){return De()},put_char(e,t){t===null||t===10?(d(E(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output?.length>0&&(d(E(e.output)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,n){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(f(E(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output?.length>0&&(f(E(e.output)),e.output=[])}}},Oe=()=>{g()},O={ops_table:null,mount(e){return O.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if(A.isBlkdev(n)||A.isFIFO(n))throw new A.ErrnoError(63);O.ops_table||={dir:{node:{getattr:O.node_ops.getattr,setattr:O.node_ops.setattr,lookup:O.node_ops.lookup,mknod:O.node_ops.mknod,rename:O.node_ops.rename,unlink:O.node_ops.unlink,rmdir:O.node_ops.rmdir,readdir:O.node_ops.readdir,symlink:O.node_ops.symlink},stream:{llseek:O.stream_ops.llseek}},file:{node:{getattr:O.node_ops.getattr,setattr:O.node_ops.setattr},stream:{llseek:O.stream_ops.llseek,read:O.stream_ops.read,write:O.stream_ops.write,mmap:O.stream_ops.mmap,msync:O.stream_ops.msync}},link:{node:{getattr:O.node_ops.getattr,setattr:O.node_ops.setattr,readlink:O.node_ops.readlink},stream:{}},chrdev:{node:{getattr:O.node_ops.getattr,setattr:O.node_ops.setattr},stream:A.chrdev_stream_ops}};var i=A.createNode(e,t,n,r);return A.isDir(i.mode)?(i.node_ops=O.ops_table.dir.node,i.stream_ops=O.ops_table.dir.stream,i.contents={}):A.isFile(i.mode)?(i.node_ops=O.ops_table.file.node,i.stream_ops=O.ops_table.file.stream,i.usedBytes=0,i.contents=O.emptyFileContents??=new Uint8Array):A.isLink(i.mode)?(i.node_ops=O.ops_table.link.node,i.stream_ops=O.ops_table.link.stream):A.isChrdev(i.mode)&&(i.node_ops=O.ops_table.chrdev.node,i.stream_ops=O.ops_table.chrdev.stream),i.atime=i.mtime=i.ctime=Date.now(),e&&(e.contents[t]=i,e.atime=e.mtime=e.ctime=i.atime),i},getFileDataAsTypedArray(e){return e.contents.subarray(0,e.usedBytes)},expandFileStorage(e,t){var n=e.contents.length;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),n&&(t=Math.max(t,256));var r=O.getFileDataAsTypedArray(e);e.contents=new Uint8Array(t),e.contents.set(r)}},resizeFileStorage(e,t){if(e.usedBytes!=t){var n=e.contents;e.contents=new Uint8Array(t),e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=A.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,t.size=A.isDir(e.mode)?4096:A.isFile(e.mode)?e.usedBytes:A.isLink(e.mode)?e.link.length:0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){for(let n of[`mode`,`atime`,`mtime`,`ctime`])t[n]!=null&&(e[n]=t[n]);t.size!==void 0&&O.resizeFileStorage(e,t.size)},lookup(e,t){throw O.doesNotExistError||(O.doesNotExistError=new A.ErrnoError(44),O.doesNotExistError.stack=`<generic error, no stack>`),O.doesNotExistError},mknod(e,t,n,r){return O.createNode(e,t,n,r)},rename(e,t,n){var r;try{r=A.lookupNode(t,n)}catch{}if(r&&A.isDir(e.mode))for(var i in r.contents)throw new A.ErrnoError(55);delete e.parent.contents[e.name],t.contents[n]=e,e.name=n,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.contents[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){for(var n in A.lookupNode(e,t).contents)throw new A.ErrnoError(55);delete e.contents[t],e.ctime=e.mtime=Date.now()},readdir(e){return[`.`,`..`,...Object.keys(e.contents)]},symlink(e,t,n){var r=O.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!A.isLink(e.mode))throw new A.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var a=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,r);return t.set(a.subarray(i,i+o),n),o},write(e,t,n,r,i,a){if(t.buffer===_.buffer&&(a=!1),!r)return 0;var o=e.node;return o.mtime=o.ctime=Date.now(),a?(o.contents=t.subarray(n,n+r),o.usedBytes=r):!o.usedBytes&&!i?(o.contents=t.slice(n,n+r),o.usedBytes=r):(O.expandFileStorage(o,i+r),o.contents.set(t.subarray(n,n+r),i),o.usedBytes=Math.max(o.usedBytes,i+r)),r},llseek(e,t,n){var r=t;if(n===1?r+=e.position:n===2&&A.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new A.ErrnoError(28);return r},mmap(e,t,n,r,i){if(!A.isFile(e.node.mode))throw new A.ErrnoError(43);var a,o,s=e.node.contents;if(!(i&2)&&s.buffer===_.buffer)o=!1,a=s.byteOffset;else{if(o=!0,a=Oe(),!a)throw new A.ErrnoError(48);s&&((n>0||n+t<s.length)&&(s=s.subarray?s.subarray(n,n+t):Array.prototype.slice.call(s,n,n+t)),_.set(s,a))}return{ptr:a,allocated:o}},msync(e,t,n,r,i){return O.stream_ops.write(e,t,0,r,n,!1),0}}},ke=e=>{if(typeof e!=`string`)return e;var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(t===void 0)throw Error(`Unknown file open mode: ${e}`);return t},Ae=e=>(typeof e==`string`&&(e=Ee(e)),e.subarray||(e=new Uint8Array(e)),e),je=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Me=async e=>{var t=await l(e);return new Uint8Array(t)},Ne=(...e)=>A.createDataFile(...e),Pe=null,Fe=async()=>Pe,k=0,Ie=null,Le=()=>{k--,t.monitorRunDependencies?.(k),k||Ie()},Re=()=>{k||(Pe=new Promise(e=>Ie=e)),k++,t.monitorRunDependencies?.(k)},ze=[],Be=async(e,t)=>{typeof Browser<`u`&&Browser.init();for(var n of ze)if(n.canHandle(t))return n.handle(e,t);return e},Ve=async(e,t,n,r,i,a,o,s)=>{var c=t?T.resolve(w.join2(e,t)):e;Re();try{var l=n;typeof n==`string`&&(l=await Me(n)),l=await Be(l,c),s?.(),a||Ne(e,t,l,r,i,o)}finally{Le()}},A={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:[],currentPath:`/`,initialized:!1,ignorePermissions:!0,syncFSRequests:0,ErrnoError:class{name=`ErrnoError`;constructor(e){this.errno=e}},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!=1}get isWrite(){return!!(this.flags&2097155)}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,t,n,r){e||=this,this.parent=e,this.mount=e.mount,this.id=A.nextInode++,this.name=t,this.mode=n,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return A.isDir(this.mode)}get isDevice(){return A.isChrdev(this.mode)}addListener(e,t=!1){var n={cb:e,exclusive:t},r=this.listeners??=new Set;return r.add(n),{listeners:r,entry:n}}notifyListeners(e){if(this.listeners){var t;for(var n of this.listeners)n.exclusive?(t||=[]).push(n):n.cb(e);if(t){var r=(this.exclTurn||0)%t.length;this.exclTurn=r+1,t[r].cb(e)}}}},lookupPath(e,t={}){if(!e)throw new A.ErrnoError(44);t.follow_mount??=!0,w.isAbs(e)||(e=A.cwd()+`/`+e);linkloop:for(var n=0;n<40;n++){for(var r=e.split(`/`).filter(e=>!!e),i=A.root,a=`/`,o=0;o<r.length;o++){var s=o===r.length-1;if(s&&t.parent)break;if(r[o]!==`.`){if(r[o]===`..`){if(a=w.dirname(a),A.isRoot(i)){e=a+`/`+r.slice(o+1).join(`/`),n--;continue linkloop}i=i.parent;continue}a=w.join2(a,r[o]);try{i=A.lookupNode(i,r[o])}catch(e){if(e?.errno===44&&s&&t.noent_okay)return{path:a};throw e}if(A.isMountpoint(i)&&(!s||t.follow_mount)&&(i=i.mounted.root),A.isLink(i.mode)&&(!s||t.follow)){if(!i.node_ops.readlink)throw new A.ErrnoError(52);var c=i.node_ops.readlink(i);w.isAbs(c)||(c=w.dirname(a)+`/`+c),e=c+`/`+r.slice(o+1).join(`/`);continue linkloop}}}return{path:a,node:i}}throw new A.ErrnoError(32)},getPath(e){for(var t;;){if(A.isRoot(e)){var n=e.mount.mountpoint;return t?n[n.length-1]===`/`?n+t:`${n}/${t}`:n}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%A.nameTable.length},hashAddNode(e){var t=A.hashName(e.parent.id,e.name);e.name_next=A.nameTable[t],A.nameTable[t]=e},hashRemoveNode(e){var t=A.hashName(e.parent.id,e.name);if(A.nameTable[t]===e)A.nameTable[t]=e.name_next;else for(var n=A.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=A.mayLookup(e);if(n)throw new A.ErrnoError(n);for(var r=A.hashName(e.id,t),i=A.nameTable[r];i;i=i.name_next){var a=i.name;if(i.parent.id===e.id&&a===t)return i}return A.lookup(e,t)},createNode(e,t,n,r){var i=new A.FSNode(e,t,n,r);return A.hashAddNode(i),i},destroyNode(e){A.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)==32768},isDir(e){return(e&61440)==16384},isLink(e){return(e&61440)==40960},isChrdev(e){return(e&61440)==8192},isBlkdev(e){return(e&61440)==24576},isFIFO(e){return(e&61440)==4096},isSocket(e){return(e&49152)==49152},flagsToPermissionString(e){var t=[`r`,`w`,`rw`][e&3];return e&512&&(t+=`w`),t},nodePermissions(e,t){return A.ignorePermissions?0:t.includes(`r`)&&!(e.mode&292)||t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73)?2:0},mayLookup(e){return A.isDir(e.mode)?A.nodePermissions(e,`x`)||(e.node_ops.lookup?0:2):54},mayCreate(e,t){if(!A.isDir(e.mode))return 54;try{return A.lookupNode(e,t),20}catch{}return A.nodePermissions(e,`wx`)},mayDelete(e,t,n){var r;try{r=A.lookupNode(e,t)}catch(e){return e.errno}var i=A.nodePermissions(e,`wx`);if(i)return i;if(n){if(!A.isDir(r.mode))return 54;if(A.isRoot(r)||A.getPath(r)===A.cwd())return 10}else if(A.isDir(r.mode))return 31;return 0},mayOpen(e,t){if(!e)return 44;if(A.isLink(e.mode))return 32;var n=A.flagsToPermissionString(t);return A.isDir(e.mode)&&(n!==`r`||t&576)?31:A.nodePermissions(e,n)},checkOpExists(e,t){if(!e)throw new A.ErrnoError(t);return e},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=A.MAX_OPEN_FDS;e++)if(!A.streams[e])return e;throw new A.ErrnoError(33)},getStreamChecked(e){var t=A.getStream(e);if(!t)throw new A.ErrnoError(8);return t},getStream:e=>A.streams[e],createStream(e,t=-1){return e=Object.assign(new A.FSStream,e),t==-1&&(t=A.nextfd()),e.fd=t,A.streams[t]=e,e},closeStream(e){A.streams[e]=null},dupStream(e,t=-1){var n=A.createStream(e,t);return n.stream_ops?.dup?.(n),n},doSetAttr(e,t,n){var r=e?.stream_ops.setattr,i=r?e:t;r??=t.node_ops.setattr,A.checkOpExists(r,63);try{r(i,n)}catch(e){throw e instanceof RangeError?new A.ErrnoError(22):e}},chrdev_stream_ops:{open(e){e.stream_ops=A.getDevice(e.node.rdev).stream_ops,e.stream_ops.open?.(e)},llseek(){throw new A.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){A.devices[e]={stream_ops:t}},getDevice:e=>A.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){typeof e==`function`&&(t=e,e=!1),A.syncFSRequests++,A.syncFSRequests>1&&f(`warning: ${A.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=A.getMounts(A.root.mount),r=0;function i(e){return A.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,i(e));++r>=n.length&&i(null)}for(var o of n)o.type.syncfs?o.type.syncfs(o,e,a):a(null)},mount(e,t,n){var r=n===`/`,i=!n,a;if(r&&A.root)throw new A.ErrnoError(10);if(!r&&!i){var o=A.lookupPath(n,{follow_mount:!1});if(n=o.path,a=o.node,A.isMountpoint(a))throw new A.ErrnoError(10);if(!A.isDir(a.mode))throw new A.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,r?A.root=c:a&&(a.mounted=s,a.mount&&a.mount.mounts.push(s)),c},unmount(e){var t=A.lookupPath(e,{follow_mount:!1});if(!A.isMountpoint(t.node))throw new A.ErrnoError(28);var n=t.node,r=n.mounted,i=A.getMounts(r);for(var[a,o]of Object.entries(A.nameTable))for(;o;){var s=o.name_next;i.includes(o.mount)&&A.destroyNode(o),o=s}n.mounted=null;var c=n.mount.mounts.indexOf(r);n.mount.mounts.splice(c,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,n){var r=A.lookupPath(e,{parent:!0}).node,i=w.basename(e);if(!i)throw new A.ErrnoError(28);if(i===`.`||i===`..`)throw new A.ErrnoError(20);var a=A.mayCreate(r,i);if(a)throw new A.ErrnoError(a);if(!r.node_ops.mknod)throw new A.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},statfs(e){return A.statfsNode(A.lookupPath(e,{follow:!0}).node)},statfsStream(e){return A.statfsNode(e.node)},statfsNode(e){var t={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:A.nextInode,ffree:A.nextInode-1,fsid:42,flags:2,namelen:255};return e.node_ops.statfs&&Object.assign(t,e.node_ops.statfs(e.mount.opts.root)),t},create(e,t=438){return t&=4095,t|=32768,A.mknod(e,t,0)},mkdir(e,t=511){return t&=1023,t|=16384,A.mknod(e,t,0)},mkdirTree(e,t=511){var n=e.split(`/`),r=``;for(var i of n)if(i){(r||w.isAbs(e))&&(r+=`/`),r+=i;try{A.mkdir(r,t)}catch(e){if(e.errno!=20)throw e}}},mkdev(e,t,n){return n===void 0&&(n=t,t=438),t|=8192,A.mknod(e,t,n)},symlink(e,t){if(!T.resolve(e))throw new A.ErrnoError(44);var n=A.lookupPath(t,{parent:!0}).node;if(!n)throw new A.ErrnoError(44);var r=w.basename(t),i=A.mayCreate(n,r);if(i)throw new A.ErrnoError(i);if(!n.node_ops.symlink)throw new A.ErrnoError(63);return n.node_ops.symlink(n,r,e)},link(e,t,n){var r=A.lookupPath(t,{parent:!0}).node;if(!r)throw new A.ErrnoError(44);var i=w.basename(t),a=A.mayCreate(r,i);if(a)throw new A.ErrnoError(a);if(!r.node_ops.link)throw new A.ErrnoError(34);return r.node_ops.link(r,i,e,n)},rename(e,t){var n=w.dirname(e),r=w.dirname(t),i=w.basename(e),a=w.basename(t),o=A.lookupPath(e,{parent:!0}),s=o.node,c;if(o=A.lookupPath(t,{parent:!0}),c=o.node,!s||!c)throw new A.ErrnoError(44);if(s.mount!==c.mount)throw new A.ErrnoError(75);var l=A.lookupNode(s,i),u=T.relative(e,r);if(u.charAt(0)!==`.`)throw new A.ErrnoError(28);if(u=T.relative(t,n),u.charAt(0)!==`.`)throw new A.ErrnoError(55);var d;try{d=A.lookupNode(c,a)}catch{}if(l!==d){var f=A.isDir(l.mode),p=A.mayDelete(s,i,f);if(p||(p=d?A.mayDelete(c,a,f):A.mayCreate(c,a),p))throw new A.ErrnoError(p);if(!s.node_ops.rename)throw new A.ErrnoError(63);if(A.isMountpoint(l)||d&&A.isMountpoint(d))throw new A.ErrnoError(10);if(c!==s&&(p=A.nodePermissions(s,`w`),p))throw new A.ErrnoError(p);A.hashRemoveNode(l);try{s.node_ops.rename(l,c,a),d&&A.hashRemoveNode(d),l.parent=c}catch(e){throw e}finally{A.hashAddNode(l)}}},rmdir(e){var t=A.lookupPath(e,{parent:!0}).node,n=w.basename(e),r=A.lookupNode(t,n),i=A.mayDelete(t,n,!0);if(i)throw new A.ErrnoError(i);if(!t.node_ops.rmdir)throw new A.ErrnoError(63);if(A.isMountpoint(r))throw new A.ErrnoError(10);t.node_ops.rmdir(t,n),A.destroyNode(r)},readdir(e){var t=A.lookupPath(e,{follow:!0}).node;return A.checkOpExists(t.node_ops.readdir,54)(t)},unlink(e){var t=A.lookupPath(e,{parent:!0}).node;if(!t)throw new A.ErrnoError(44);var n=w.basename(e),r=A.lookupNode(t,n),i=A.mayDelete(t,n,!1);if(i)throw new A.ErrnoError(i);if(!t.node_ops.unlink)throw new A.ErrnoError(63);if(A.isMountpoint(r))throw new A.ErrnoError(10);t.node_ops.unlink(t,n),A.destroyNode(r)},readlink(e){var t=A.lookupPath(e).node;if(!t)throw new A.ErrnoError(44);if(!t.node_ops.readlink)throw new A.ErrnoError(28);return t.node_ops.readlink(t)},stat(e,t=!1){var n=A.lookupPath(e,{follow:!t}).node;return A.checkOpExists(n.node_ops.getattr,63)(n)},fstat(e){var t=A.getStreamChecked(e),n=t.node,r=t.stream_ops.getattr,i=r?t:n;return r??=n.node_ops.getattr,A.checkOpExists(r,63),r(i)},lstat(e){return A.stat(e,!0)},doChmod(e,t,n,r=!1){A.doSetAttr(e,t,{mode:n&4095|t.mode&-4096,ctime:Date.now(),dontFollow:r})},chmod(e,t,n=!1){var r=typeof e==`string`?A.lookupPath(e,{follow:!n}).node:e;A.doChmod(null,r,t,n)},lchmod(e,t){A.chmod(e,t,!0)},fchmod(e,t){var n=A.getStreamChecked(e);A.doChmod(n,n.node,t,!1)},doChown(e,t,n=!1){A.doSetAttr(e,t,{timestamp:Date.now(),dontFollow:n})},chown(e,t,n,r=!1){var i=typeof e==`string`?A.lookupPath(e,{follow:!r}).node:e;A.doChown(null,i,r)},lchown(e,t,n){A.chown(e,t,n,!0)},fchown(e,t,n){var r=A.getStreamChecked(e);A.doChown(r,r.node,!1)},doTruncate(e,t,n){if(A.isDir(t.mode))throw new A.ErrnoError(31);if(!A.isFile(t.mode))throw new A.ErrnoError(28);var r=A.nodePermissions(t,`w`);if(r)throw new A.ErrnoError(r);A.doSetAttr(e,t,{size:n,timestamp:Date.now()})},truncate(e,t){if(t<0)throw new A.ErrnoError(28);var n=typeof e==`string`?A.lookupPath(e,{follow:!0}).node:e;A.doTruncate(null,n,t)},ftruncate(e,t){var n=A.getStreamChecked(e);if(t<0||!(n.flags&2097155))throw new A.ErrnoError(28);A.doTruncate(n,n.node,t)},utime(e,t,n,r=!1){var i=A.lookupPath(e,{follow:!r});A.doSetAttr(null,i.node,{atime:t,mtime:n,dontFollow:r})},open(e,t,n=438){if(e===``)throw new A.ErrnoError(44);t=ke(t),n=t&64?n&4095|32768:0;var r,i;if(typeof e==`object`)r=e;else{i=e.endsWith(`/`);var a=A.lookupPath(e,{follow:!(t&131072),noent_okay:!0});r=a.node,e=a.path}var o=!1;if(t&64){if(r){if(t&128)throw new A.ErrnoError(20)}else if(i)throw new A.ErrnoError(31);else r=A.mknod(e,n|511,0),o=!0}if(!r)throw new A.ErrnoError(44);if(A.isChrdev(r.mode)&&(t&=-513),t&65536&&!A.isDir(r.mode))throw new A.ErrnoError(54);if(!o){var s=A.mayOpen(r,t);if(s)throw new A.ErrnoError(s)}t&512&&!o&&A.truncate(r,0),t&=-131713;var c=A.createStream({node:r,path:A.getPath(r),flags:t,seekable:!0,position:0,stream_ops:r.stream_ops,ungotten:[],error:!1});return c.stream_ops.open&&c.stream_ops.open(c),o&&A.chmod(r,n&511),c},close(e){if(A.isClosed(e))throw new A.ErrnoError(8);e.getdents&&=null,e.node?.notifyListeners(32);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{A.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,n){if(A.isClosed(e))throw new A.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new A.ErrnoError(70);if(n!=0&&n!=1&&n!=2)throw new A.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(r<0||i<0)throw new A.ErrnoError(28);if(A.isClosed(e)||(e.flags&2097155)==1)throw new A.ErrnoError(8);if(A.isDir(e.node.mode))throw new A.ErrnoError(31);if(!e.stream_ops.read)throw new A.ErrnoError(28);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new A.ErrnoError(70);var o=e.stream_ops.read(e,t,n,r,i);return a||(e.position+=o),o},write(e,t,n,r,i,a){if(r<0||i<0)throw new A.ErrnoError(28);if(A.isClosed(e)||!(e.flags&2097155))throw new A.ErrnoError(8);if(A.isDir(e.node.mode))throw new A.ErrnoError(31);if(!e.stream_ops.write)throw new A.ErrnoError(28);e.seekable&&e.flags&1024&&A.llseek(e,0,2);var o=i!==void 0;if(!o)i=e.position;else if(!e.seekable)throw new A.ErrnoError(70);var s=e.stream_ops.write(e,t,n,r,i,a);return o||(e.position+=s),s},mmap(e,t,n,r,i){if(r&2&&!(i&2)&&(e.flags&2097155)!=2||(e.flags&2097155)==1)throw new A.ErrnoError(2);if(!e.stream_ops.mmap)throw new A.ErrnoError(43);if(!t)throw new A.ErrnoError(28);return e.stream_ops.mmap(e,t,n,r,i)},msync(e,t,n,r,i){return e.stream_ops.msync?e.stream_ops.msync(e,t,n,r,i):0},ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new A.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){t.flags??=0,t.encoding??=`binary`,t.encoding!==`utf8`&&t.encoding!==`binary`&&g(`Invalid encoding type "${t.encoding}"`);var n=A.open(e,t.flags),r=A.stat(e).size,i=new Uint8Array(r);return A.read(n,i,0,r,0),t.encoding===`utf8`&&(i=E(i)),A.close(n),i},writeFile(e,t,n={}){n.flags??=577;var r=A.open(e,n.flags,n.mode);t=Ae(t),A.write(r,t,0,t.byteLength,void 0,n.canOwn),A.close(r)},cwd:()=>A.currentPath,chdir(e){var t=A.lookupPath(e,{follow:!0});if(t.node===null)throw new A.ErrnoError(44);if(!A.isDir(t.node.mode))throw new A.ErrnoError(54);var n=A.nodePermissions(t.node,`x`);if(n)throw new A.ErrnoError(n);A.currentPath=t.path},createDefaultDirectories(){A.mkdir(`/tmp`),A.mkdir(`/home`),A.mkdir(`/home/web_user`)},createDefaultDevices(){A.mkdir(`/dev`),A.registerDevice(A.makedev(1,3),{read:()=>0,write:(e,t,n,r)=>r,llseek:()=>0}),A.mkdev(`/dev/null`,A.makedev(1,3)),D.register(A.makedev(5,0),D.default_tty_ops),D.register(A.makedev(6,0),D.default_tty1_ops),A.mkdev(`/dev/tty`,A.makedev(5,0)),A.mkdev(`/dev/tty1`,A.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(t||=(be(e),e.byteLength),e[--t]);A.createDevice(`/dev`,`random`,n),A.createDevice(`/dev`,`urandom`,n),A.mkdir(`/dev/shm`),A.mkdir(`/dev/shm/tmp`)},createSpecialDirectories(){A.mkdir(`/proc`);var e=A.mkdir(`/proc/self`);A.mkdir(`/proc/self/fd`),A.mount({mount(){var t=A.createNode(e,`fd`,16895,73);return t.stream_ops={llseek:O.stream_ops.llseek},t.node_ops={lookup(e,t){var n=+t,r=A.getStreamChecked(n),i={parent:null,mount:{mountpoint:`fake`},node_ops:{readlink:()=>r.path},id:n+1};return i.parent=i,i},readdir(){return Array.from(A.streams.entries()).filter(([e,t])=>t).map(([e,t])=>e.toString())}},t}},{},`/proc/self/fd`)},createStandardStreams(e,t,n){e?A.createDevice(`/dev`,`stdin`,e):A.symlink(`/dev/tty`,`/dev/stdin`),t?A.createDevice(`/dev`,`stdout`,null,t):A.symlink(`/dev/tty`,`/dev/stdout`),n?A.createDevice(`/dev`,`stderr`,null,n):A.symlink(`/dev/tty1`,`/dev/stderr`),A.open(`/dev/stdin`,0),A.open(`/dev/stdout`,1),A.open(`/dev/stderr`,1)},staticInit(){A.nameTable.length=4096,A.mount(O,{},`/`),A.createDefaultDirectories(),A.createDefaultDevices(),A.createSpecialDirectories()},init(e,n,r){A.initialized=!0,e??=t.stdin,n??=t.stdout,r??=t.stderr,A.createStandardStreams(e,n,r)},quit(){A.initialized=!1;for(var e of A.streams)e&&A.close(e)},analyzePath(e,t=!1){try{var n=A.lookupPath(e,{follow:!t});e=n.path}catch{}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{n=A.lookupPath(e,{parent:!0}),r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=w.basename(e),n=A.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot=n.path===`/`}catch(e){r.error=e.errno}return r},createPath(e,t,n,r){e=typeof e==`string`?e:A.getPath(e);for(var i=t.split(`/`).reverse();i.length;){var a=i.pop();if(a){var o=w.join2(e,a);try{A.mkdir(o)}catch(e){if(e.errno!=20)throw e}e=o}}return o},createFile(e,t,n,r,i){var a=w.join2(typeof e==`string`?e:A.getPath(e),t),o=je(r,i);return A.create(a,o)},createDataFile(e,t,n,r,i,a){var o=t;e&&(e=typeof e==`string`?e:A.getPath(e),o=t?w.join2(e,t):e);var s=je(r,i),c=A.create(o,s);if(n){n=Ae(n),A.chmod(c,s|146);var l=A.open(c,577);A.write(l,n,0,n.length,0,a),A.close(l),A.chmod(c,s)}},createDevice(e,t,n,r){var i=w.join2(typeof e==`string`?e:A.getPath(e),t),a=je(!!n,!!r);A.createDevice.major??=64;var o=A.makedev(A.createDevice.major++,0);return A.registerDevice(o,{open(e){e.seekable=!1},close(e){r?.buffer?.length&&r(10)},read(e,t,r,i,a){for(var o=0,s=0;s<i;s++){var c;try{c=n()}catch{throw new A.ErrnoError(29)}if(c===void 0&&!o)throw new A.ErrnoError(6);if(c==null)break;o++,t[r+s]=c}return o&&(e.node.atime=Date.now()),o},write(e,t,n,i,a){for(var o=0;o<i;o++)try{r(t[n+o])}catch{throw new A.ErrnoError(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),o}}),A.mkdev(i,a,o)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(globalThis.XMLHttpRequest)g(`Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.`);else try{e.contents=u(e.url)}catch{throw new A.ErrnoError(29)}},createLazyFile(e,t,n,i,a){class o{lengthKnown=!1;chunks=[];get(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;e.open(`HEAD`,n,!1),e.send(null),e.status>=200&&e.status<300||e.status===304||g(`Couldn't load ${n}. Status: ${e.status}`);var t=Number(e.getResponseHeader(`Content-length`)),r,i=(r=e.getResponseHeader(`Accept-Ranges`))&&r===`bytes`,a=(r=e.getResponseHeader(`Content-Encoding`))&&r===`gzip`,o=1048576;i||(o=t);var s=(e,r)=>{e>r&&g(`invalid range (${e}, ${r}) or no bytes requested!`),r>t-1&&g(`only ${t} bytes available! programmer error!`);var i=new XMLHttpRequest;return i.open(`GET`,n,!1),t!==o&&i.setRequestHeader(`Range`,`bytes=${e}-${r}`),i.responseType=`arraybuffer`,i.overrideMimeType&&i.overrideMimeType(`text/plain; charset=x-user-defined`),i.send(null),i.status>=200&&i.status<300||i.status===304||g(`Couldn't load ${n}. Status: ${i.status}`),i.response===void 0?Ee(i.responseText??``):new Uint8Array(i.response||[])},c=this;c.setDataGetter(e=>{var n=e*o,r=(e+1)*o-1;return r=Math.min(r,t-1),c.chunks[e]===void 0&&(c.chunks[e]=s(n,r)),c.chunks[e]===void 0&&g(`doXHR failed!`),c.chunks[e]}),(a||!t)&&(o=t=1,t=this.getter(0).length,o=t,d(`LazyFiles on gzip forces download of the whole file when length is accessed`)),this._length=t,this._chunkSize=o,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(globalThis.XMLHttpRequest){r||g(`Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc`);var s={isDevice:!1,contents:new o}}else s={isDevice:!1,url:n};var c=A.createFile(e,t,s,i,a);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};for(let[e,t]of Object.entries(c.stream_ops))l[e]=(...e)=>(A.forceLoadFile(c),t(...e));function u(e,t,n,r,i){var a=e.node.contents;if(i>=a.length)return 0;var o=Math.min(a.length-i,r);if(a.slice)for(var s=0;s<o;s++)t[n+s]=a[i+s];else for(s=0;s<o;s++)t[n+s]=a.get(i+s);return o}return l.read=(e,t,n,r,i)=>(A.forceLoadFile(c),u(e,t,n,r,i)),l.mmap=(e,t,n)=>{A.forceLoadFile(c);var r=Oe();if(!r)throw new A.ErrnoError(48);return u(e,_,r,t,n),{ptr:r,allocated:!0}},c.stream_ops=l,c}},j,M=(e,t,n)=>e?E(j,e,t,n):``,N,P={currentUmask:18,calculateAt(e,t,n=!1){if(w.isAbs(t))return t;var r=e===-100?A.cwd():P.getStreamFromFD(e).path;if(t.length==0){if(!n)throw new A.ErrnoError(44);return r}return r+`/`+t},writeStat(e,t){b[e>>2]=t.dev,b[e+4>>2]=t.mode,b[e+8>>2]=t.nlink,b[e+12>>2]=t.uid,b[e+16>>2]=t.gid,b[e+20>>2]=t.rdev,N[e+24>>3]=BigInt(t.size),x[e+32>>2]=4096,x[e+36>>2]=t.blocks;var n=t.atime.getTime(),r=t.mtime.getTime(),i=t.ctime.getTime();return N[e+40>>3]=BigInt(Math.floor(n/1e3)),b[e+48>>2]=n%1e3*1e3*1e3,N[e+56>>3]=BigInt(Math.floor(r/1e3)),b[e+64>>2]=r%1e3*1e3*1e3,N[e+72>>3]=BigInt(Math.floor(i/1e3)),b[e+80>>2]=i%1e3*1e3*1e3,N[e+88>>3]=BigInt(t.ino),0},writeStatFs(e,t){b[e+4>>2]=t.bsize,b[e+60>>2]=t.bsize,N[e+8>>3]=BigInt(t.blocks),N[e+16>>3]=BigInt(t.bfree),N[e+24>>3]=BigInt(t.bavail),N[e+32>>3]=BigInt(t.files),N[e+40>>3]=BigInt(t.ffree),b[e+48>>2]=t.fsid,b[e+64>>2]=t.flags,b[e+56>>2]=t.namelen},doMsync(e,t,n,r,i){if(!A.isFile(t.node.mode))throw new A.ErrnoError(43);if(r&2)return 0;var a=j.subarray(e,e+n);A.msync(t,a,i,n,r)},getStreamFromFD(e){return A.getStreamChecked(e)},varargs:void 0,getStr(e){return M(e)}},F,He={},Ue=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function We(e){return this.fromWireType(b[e>>2])}var I={},L={},Ge={};class Ke extends Error{constructor(e){super(e),this.name=`InternalError`}}var qe=e=>{throw new Ke(e)},Je=(e,t,n)=>{e.forEach(e=>Ge[e]=t);function r(t){var r=n(t);r.length!==e.length&&qe(`Mismatched type converter count`);for(var i=0;i<e.length;++i)B(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())L.hasOwnProperty(n)?i[e]=L[n]:(a.push(n),I.hasOwnProperty(n)||(I[n]=[]),I[n].push(()=>{i[e]=L[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},Ye=e=>rn(e),Xe=(e,t)=>j.fill(0,e,e+t),R=e=>{for(var t=``;;){var n=j[e++];if(!n)return t;t+=String.fromCharCode(n)}};class Ze extends Error{constructor(e){super(e),this.name=`BindingError`}}var z=e=>{throw new Ze(e)};function Qe(e,t,n={}){var r=t.name;if(e||z(`type "${r}" must have a positive integer typeid pointer`),L.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;z(`Cannot register type '${r}' twice`)}if(L[e]=t,delete Ge[e],I.hasOwnProperty(e)){var i=I[e];delete I[e],i.forEach(e=>e())}}function B(e,t,n={}){return Qe(e,t,n)}var V,$e,et=(e,t,n)=>{switch(t){case 1:return n?e=>_[e]:e=>j[e];case 2:return n?e=>F[e>>1]:e=>V[e>>1];case 4:return n?e=>x[e>>2]:e=>b[e>>2];case 8:return n?e=>N[e>>3]:e=>$e[e>>3];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},tt=[],H=[0,1,,1,null,1,!0,1,!1,1],nt=e=>{e>9&&--H[e+1]===0&&(H[e],H[e]=void 0,tt.push(e))},U={toValue:e=>(e||z(`Cannot use deleted val. handle = ${e}`),H[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=tt.pop()||H.length;return H[t]=e,H[t+1]=1,t}}}},rt={name:`emscripten::val`,fromWireType:e=>{var t=U.toValue(e);return nt(e),t},toWireType:(e,t)=>U.toHandle(t),readValueFromPointer:We,destructorFunction:null},it,at,ot=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(it[e>>2])};case 8:return function(e){return this.fromWireType(at[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},st=(e,t)=>Object.defineProperty(t,"name",{value:e});function ct(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function lt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].argStackAlloc)return!0;return!1}function ut(e,t,n,r,i,a){var o=t.length;o<2&&z(`argTypes array size mismatch! Must at least get return value and receiver (this) types!`);var s=t[1]!==null&&n!==null,c=ct(t),l=lt(t),u=l&&!a&&!c;l&&!u&&(c=!0);var d=!t[0].isVoid,f=o-2,p=Array(f),m=[],h=[];return st(e,function(...e){h.length=0;var n;u&&(n=y());var a,o;try{m.length=s?2:1,m[0]=i;for(var l=0;l<f;++l){var ee=t[l+2];p[l]=ee.toWireType(u&&ee.argStackAlloc?null:h,e[l]),m.push(p[l])}o=r(...m)}finally{u&&v(n)}return function(e){if(c)Ue(h);else for(var n=2;n<t.length;n++){var r=n===1?a:p[n-2];t[n].destructorFunction!==null&&t[n].destructorFunction(r)}if(d)return t[0].fromWireType(e)}(o)})}var dt=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||z(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},ft=(e,n,r)=>{t.hasOwnProperty(e)?((r===void 0||t[e].overloadTable!==void 0&&t[e].overloadTable[r]!==void 0)&&z(`Cannot register public name '${e}' twice`),dt(t,e,e),t[e].overloadTable.hasOwnProperty(r)&&z(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),t[e].overloadTable[r]=n):(t[e]=n,t[e].argCount=r)},pt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(b[t+r*4>>2]);return n},mt=(e,n,r)=>{t.hasOwnProperty(e)||qe(`Replacing nonexistent public symbol`),t[e].overloadTable!==void 0&&r!==void 0?t[e].overloadTable[r]=n:(t[e]=n,t[e].argCount=r)},ht=[],W=e=>{var t=ht[e];return t||(ht[e]=t=Q.get(e)),t},G=(e,t)=>{e=R(e);var n=function(){return W(t)}();return typeof n!=`function`&&z(`unknown function pointer with signature ${e}: ${t}`),n};class gt extends Error{}var _t=e=>{var t=en(e),n=R(t);return X(t),n},vt=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){if(!r[t]&&!L[t]){if(Ge[t]){Ge[t].forEach(e);return}n.push(t),r[t]=!0}}),new gt(`${e}: `+n.map(_t).join([`, `]))},yt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},K=(e,t,n)=>Te(e,j,t,n),bt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,xt=(e,t,n)=>{var r=e>>1,i=Se(V,r,t/2,n);if(i-r>16&&bt)return bt.decode(V.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=V[o];a+=String.fromCharCode(s)}return a},St=(e,t,n=2147483647)=>{if(n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);F[t>>1]=o,t+=2}return F[t>>1]=0,t-r},Ct=e=>e.length*2,wt=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=b[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},Tt=(e,t,n=2147483647)=>{if(n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,x[t>>2]=o,t+=4,t+4>i)break}return x[t>>2]=0,t-r},Et=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},Dt=[],Ot=e=>{var t=Dt.length;return Dt.push(e),t},kt=(e,t)=>{var n=L[e];return n===void 0&&z(`${t} has unknown type ${_t(e)}`),n},At=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=kt(b[t+r*4>>2],`parameter ${r}`);return n},jt=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(b[t>>2]=U.toHandle(r)),i},Mt={},Nt=e=>{var t=Mt[e];return t===void 0?R(e):t},Pt=()=>2147483648,Ft=(e,t)=>Math.ceil(e/t)*t,It=e=>{var t=(e-on.buffer.byteLength+65535)/65536|0;try{return on.grow(t),te(),1}catch{}},Lt={},Rt=()=>i,q=()=>{if(!q.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:Rt()};for(var t in Lt)Lt[t]===void 0?delete e[t]:e[t]=Lt[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);q.strings=n}return q.strings},zt=()=>ge||!1,Bt=e=>{zt()||(t.onExit?.(e),p=!0),a(0,new fe(e))},Vt=e=>{Bt(e)},Ht=(e,t,n,r)=>{for(var i=0,a=0;a<n;a++){var o=b[t>>2],s=b[t+4>>2];t+=8;try{var c=A.read(e,_,o,s,r)}catch(e){if(i>0&&e instanceof A.ErrnoError&&(e.errno==6||e.errno==6))break;throw e}if(c<0)return-1;if(i+=c,c<s)break}return i},Ut=e=>e<-9007199254740992||e>9007199254740992?NaN:Number(e),Wt=(e,t,n,r)=>{if(n==1)return A.write(e,_,b[t>>2],b[t+4>>2],r);for(var i=0,a=0,o=t;a<n;a++,o+=8)i+=b[o+4>>2];var s=new Uint8Array(i),c=0;for(a=0;a<n;a++,t+=8){var l=b[t>>2],u=b[t+4>>2];s.set(j.subarray(l,l+u),c),c+=u}return A.write(e,s,0,i,r)},Gt=(e,t)=>{if(J)for(var n=e;n<e+t;n++){var r=W(n);r&&J.set(r,n)}},J,Kt=e=>(J||(J=new WeakMap,Gt(0,Q.length)),J.get(e)||0),qt=[],Jt=()=>qt.length?qt.pop():Q.grow(1),Yt=(e,t)=>{Q.set(e,t),ht[e]=Q.get(e)},Xt=e=>{let t=e.length;return[t%128|128,t>>7,...e]},Zt={i:127,p:127,j:126,f:125,d:124,e:111},Qt=e=>Xt(Array.from(e,e=>Zt[e])),$t=(e,t)=>{var n=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Xt([1,96,...Qt(t.slice(1)),...Qt(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),r=new WebAssembly.Module(n);return new WebAssembly.Instance(r,{e:{f:e}}).exports.f};A.createPreloadedFile=(e,t,n,r,i,a,o,s,c,l)=>{Ve(e,t,n,r,i,s,c,l).then(a).catch(o)},A.preloadFile=Ve,A.staticInit(),t.noExitRuntime&&(ge=t.noExitRuntime),t.print&&(d=t.print),t.printErr&&(f=t.printErr),t.arguments&&t.arguments,t.thisProgram&&(i=t.thisProgram);var Y=t.preInit;if(Y)for(typeof Y==`function`&&(t.preInit=Y=[Y]);Y.length>0;)Y.shift()();t.addRunDependency=Re,t.removeRunDependency=Le,t.addFunction=(e,t)=>{var n=Kt(e);if(n)return n;var r=Jt();try{Yt(r,e)}catch(n){if(!(n instanceof TypeError))throw n;Yt(r,$t(e,t))}return J.set(e,r),r},t.UTF8ToString=M,t.FS_preloadFile=Ve,t.FS_unlink=(...e)=>A.unlink(...e),t.FS_createPath=(...e)=>A.createPath(...e),t.FS_createDevice=(...e)=>A.createDevice(...e),t.FS_createDataFile=Ne,t.FS_createLazyFile=(...e)=>A.createLazyFile(...e),t.Emval=U;var en,tn,X,Z,nn,rn,an,on,Q;function sn(e){en=e._,tn=t._malloc=e.aa,X=t._free=e.ba,Z=e.ca,nn=e.da,rn=e.ea,an=e.fa,on=e.Y,Q=e.$}var cn={n:(e,t,n)=>{new _e(e).init(t,n),ve()},x:function(e,t,n){P.varargs=n;try{var r=P.getStreamFromFD(e);switch(t){case 0:var i=S();if(i<0)return-28;for(;A.streams[i];)i++;return A.dupStream(r,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:return i=S(),r.flags=r.flags&-289793|i&289792,0;case 12:return i=C(),F[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}},M:function(e,t,n){P.varargs=n;try{var r=P.getStreamFromFD(e);switch(t){case 21509:return r.tty?0:-59;case 21505:if(!r.tty)return-59;if(r.tty.ops.ioctl_tcgets){var i=r.tty.ops.ioctl_tcgets(r),a=C();x[a>>2]=i.c_iflag||0,x[a+4>>2]=i.c_oflag||0,x[a+8>>2]=i.c_cflag||0,x[a+12>>2]=i.c_lflag||0;for(var o=0;o<32;o++)_[a+o+17]=i.c_cc[o]||0;return 0}return 0;case 21510:case 21511:case 21512:return r.tty?0:-59;case 21506:case 21507:case 21508:if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){a=C();var s=x[a>>2],c=x[a+4>>2],l=x[a+8>>2],u=x[a+12>>2],d=[];for(o=0;o<32;o++)d.push(_[a+o+17]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:s,c_oflag:c,c_cflag:l,c_lflag:u,c_cc:d})}return 0;case 21519:return r.tty?(a=C(),x[a>>2]=0,0):-59;case 21520:return r.tty?-28:-59;case 21537:case 21531:return a=C(),A.ioctl(r,t,a);case 21523:if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var f=r.tty.ops.ioctl_tiocgwinsz(r.tty);a=C(),F[a>>1]=f[0],F[a+2>>1]=f[1]}return 0;case 21524:return r.tty?0:-59;case 21515:return r.tty?0:-59;default:return-28}}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}},N:function(e,t,n,r){P.varargs=r;try{t=P.getStr(t),t=P.calculateAt(e,t);var i=r?S():0;return n&64&&(i&=~P.currentUmask),A.open(t,n,i).fd}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return-e.errno}},O:()=>g(``),A:e=>{var t=He[e];delete He[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.valueSize,a=t.isTrivial,o=t.fields,s=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));Je([e],s,e=>{var s={};for(var[c,l]of o.entries()){let t=e[c],n=l.getter,r=l.getterContext,i=e[c+o.length],a=l.setter,d=l.setterContext;var u=i.destructorFunction===null&&!i.argStackAlloc?(e,t)=>a(d,e,i.toWireType(null,t)):(e,t)=>{var n=[];a(d,e,i.toWireType(n,t)),Ue(n)};s[l.fieldName]={read:e=>t.fromWireType(n(r,e)),write:u,optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in s)t[n]=s[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var o in s)if(!(o in t)&&!s[o].optional)throw TypeError(`Missing field: "${o}"`);var c;for(o in a&&!e?(c=Ye(i),Xe(c,i)):(c=n(),e&&e.push(r,c)),s)s[o].write(c,t[o]);return c},readValueFromPointer:We,destructorFunction:a?null:r,argStackAlloc:a}]})},z:(e,t,n,r,i)=>{t=R(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}B(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:et(t,n,!a),destructorFunction:null})},T:(e,t,n,r)=>{t=R(t),B(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(j[e])},destructorFunction:null})},R:e=>B(e,rt),y:(e,t,n)=>{t=R(t),B(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:ot(t,n),destructorFunction:null})},o:(e,t,n,r,i,a,o)=>{var s=pt(t,n);e=R(e),e=yt(e),i=G(r,i),ft(e,function(){vt(`Cannot call ${e} due to unbound types`,s)},t-1),Je([],s,n=>{var r=[n[0],null].concat(n.slice(1));return mt(e,ut(e,r,null,i,a,o),t-1),[]})},d:(e,t,n,r,i)=>{t=R(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}B(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:et(t,n,r!==0),destructorFunction:null})},b:(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=b[e>>2],n=b[e+4>>2];return new r(_.buffer,n,t)}n=R(n),B(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},S:(e,t)=>{t=R(t),B(e,{name:t,fromWireType(e){var t=b[e>>2],n=M(e+4,t,!0);return X(e),n},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r=typeof t==`string`;r||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||z(`Cannot pass non-string to std::string`),n=r?we(t):t.length;var i=tn(4+n+1),a=i+4;return b[i>>2]=n,r?K(t,a,n+1):j.set(t,a),e!==null&&e.push(X,i),i},readValueFromPointer:We,destructorFunction(e){X(e)}})},t:(e,t,n)=>{n=R(n);var r,i,a;t===2?(r=xt,i=St,a=Ct):(r=wt,i=Tt,a=Et),B(e,{name:n,fromWireType:e=>{var n=b[e>>2],i=r(e+4,n*t,!0);return X(e),i},toWireType:(e,r)=>{typeof r!=`string`&&z(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=tn(4+o+t);return b[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(X,s),s},readValueFromPointer:We,destructorFunction(e){X(e)}})},B:(e,t,n,r,i,a,o,s)=>{He[e]={name:R(t),rawConstructor:G(n,r),rawDestructor:G(i,a),valueSize:o,isTrivial:!!s,fields:[]}},c:(e,t,n,r,i,a,o,s,c,l)=>{He[e].fields.push({fieldName:R(t),getterReturnType:n,getter:G(r,i),getterContext:a,setterArgumentType:o,setter:G(s,c),setterContext:l})},U:(e,t)=>{t=R(t),B(e,{isVoid:!0,name:t,fromWireType:()=>{},toWireType:()=>{}})},Q:e=>{do{var t=b[e>>2];e+=4;var n=b[e>>2];e+=4;var r=b[e>>2];e+=4;var i=M(t);A.createPath(`/`,w.dirname(i)),A.createDataFile(i,null,_.subarray(r,r+n),!0,!0,!0)}while(b[e>>2])},F:()=>{throw new h},W:(e,t)=>{e=U.toValue(e),t=U.toValue(t),e.set(t)},k:(e,t,n)=>{var[r,...i]=At(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return Ot(st(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=U.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(U.toValue(t),s);break;case 3:d=s[0];break;case 1:d=U.toValue(t)[Nt(r)](...s)}return jt(a,i,d)}))},a:nt,X:e=>e?(e=Nt(e),U.toHandle(globalThis[e])):U.toHandle(globalThis),p:(e,t)=>(e=U.toValue(e),t=U.toValue(t),U.toHandle(e[t])),j:e=>{e>9&&(H[e+1]+=1)},i:(e,t,n,r,i)=>Dt[e](t,n,r,i),C:()=>U.toHandle([]),m:e=>U.toHandle(Nt(e)),h:e=>{Ue(U.toValue(e)),nt(e)},V:(e,t,n)=>{e=U.toValue(e),t=U.toValue(t),n=U.toValue(n),e[t]=n},H:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),c=o.getTimezoneOffset(),l=Math.max(s,c);b[e>>2]=l*60,x[t>>2]=Number(s!=c);var u=e=>{var t=e>=0?`-`:`+`,n=Math.abs(e);return`UTC${t}${String(Math.floor(n/60)).padStart(2,`0`)}${String(n%60).padStart(2,`0`)}`},d=u(s),f=u(c);c<s?(K(d,n,17),K(f,r,17)):(K(d,r,17),K(f,n,17))},G:e=>{var t=j.length;e>>>=0;var n=Pt();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),It(Math.min(n,Ft(Math.max(e,i),65536))))return!0}return!1},J:(e,t)=>{var n=0,r=0;for(var i of q()){var a=t+n;b[e+r>>2]=a,n+=K(i,a,1/0)+1,r+=4}return 0},K:(e,t)=>{var n=q();b[e>>2]=n.length;var r=0;for(var i of n)r+=we(i)+1;return b[t>>2]=r,0},P:Vt,v:function(e){try{var t=P.getStreamFromFD(e);return A.close(t),0}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return e.errno}},L:function(e,t,n,r){try{var i=Ht(P.getStreamFromFD(e),t,n);return b[r>>2]=i,0}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return e.errno}},I:function(e,t,n,r){t=Ut(t);try{if(isNaN(t))return 22;var i=P.getStreamFromFD(e);return A.llseek(i,t,n),N[r>>3]=BigInt(i.position),i.getdents&&!t&&n===0&&(i.getdents=null),0}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return e.errno}},w:function(e,t,n,r){try{var i=Wt(P.getStreamFromFD(e),t,n);return b[r>>2]=i,0}catch(e){if(A===void 0||e.name!==`ErrnoError`)throw e;return e.errno}},q:function(e,t){var n=y();try{return W(e)(t)}catch(e){if(v(n),!(e instanceof m))throw e;Z(1,0)}},l:function(e,t,n){var r=y();try{return W(e)(t,n)}catch(e){if(v(r),!(e instanceof m))throw e;Z(1,0)}},r:function(e,t,n,r){var i=y();try{return W(e)(t,n,r)}catch(e){if(v(i),!(e instanceof m))throw e;Z(1,0)}},u:function(e,t,n,r,i){var a=y();try{return W(e)(t,n,r,i)}catch(e){if(v(a),!(e instanceof m))throw e;Z(1,0)}},E:function(e,t,n,r,i,a,o,s,c,l){var u=y();try{return W(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(v(u),!(e instanceof m))throw e;Z(1,0)}},s:function(e){var t=y();try{W(e)()}catch(e){if(v(t),!(e instanceof m))throw e;Z(1,0)}},g:function(e,t){var n=y();try{W(e)(t)}catch(e){if(v(n),!(e instanceof m))throw e;Z(1,0)}},D:function(e,t,n,r){var i=y();try{W(e)(t,n,r)}catch(e){if(v(i),!(e instanceof m))throw e;Z(1,0)}},e:function(e,t,n){var r=y();try{W(e)(t,n)}catch(e){if(v(r),!(e instanceof m))throw e;Z(1,0)}},f:function(e,t,n,r){var i=y();try{W(e)(t,n,r)}catch(e){if(v(i),!(e instanceof m))throw e;Z(1,0)}}},$=await async function(){function e(e){return $=e.exports,sn($),te(),$}var n=de(),r=t.instantiateWasm;return r?new Promise(t=>{r(n,n=>t(e(n)))}):(ae??=oe(),function(t){return e(t.instance)}(await ue(void 0,ae,n)))}();return await async function(){ne(),k&&await Fe();var e=t.setStatus;e&&(e(`Running...`),await new Promise(e=>setTimeout(e,1)),setTimeout(e,1,``)),!p&&(re(),t.onRuntimeInitialized?.(),ie())}(),t}export{e as default};
|
package/chunks/portal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{convertJsonValueToImmutableArcadeValue as e}from"../arcade/containerUtils.js";import t from"../arcade/Dictionary.js";import{StringEnum as n}from"../arcade/enum.js";import{ArcadeExecutionError as r}from"../arcade/executionError.js";import{E as
|
|
2
|
+
import{convertJsonValueToImmutableArcadeValue as e}from"../arcade/containerUtils.js";import t from"../arcade/Dictionary.js";import{StringEnum as n}from"../arcade/enum.js";import{ArcadeExecutionError as r}from"../arcade/executionError.js";import i from"../arcade/ImmutableArray.js";import{E as a,n as o,l as s}from"./languageUtils.js";import{getPortal as c}from"../arcade/portalUtils.js";import l from"../core/Logger.js";import{isString as u}from"../support/guards.js";const d=new n([`title`,`owner`,`created`,`modified`]),f=new n([`asc`,`desc`]),p=new n([`groupMember`]);function m(n){n.mode===`async`&&(n.functions.getgroups=function(m,h){return n.standardFunctionAsync(m,h,async(n,m,h)=>{if(a(h,0,2,m),h[0]!=null&&!o(h[0]))throw new r(`InvalidParameter`,m);let g=c(n,h[0]??null),_={start:1,num:100},v=h[1];if(v==null)_.searchUserAccess=`groupMember`,_.sortField=`title`,_.sortOrder=`asc`;else if(s(v)){let e=v.hasField(`q`)?v.field(`q`):null;if(u(e))_.q=e;else if(e!=null)throw new r(`InvalidParameter`,m);let t=v.hasField(`filter`)?v.field(`filter`):null;if(u(t))_.filter=t;else if(t!=null)throw new r(`InvalidParameter`,m);let n=v.hasField(`sortField`)?v.field(`sortField`):null;if(n!=null&&!u(n))throw new r(`InvalidParameter`,m);let i=n==null?`title`:d.get(n),a=v.hasField(`sortOrder`)?v.field(`sortOrder`):null;if(a!=null&&!u(a))throw new r(`InvalidParameter`,m);let o=a==null?`asc`:f.get(a);_.sortField=i,_.sortOrder=o;let s=v.hasField(`searchUserAccess`)?v.field(`searchUserAccess`):null;if(u(s))_.searchUserAccess=p.get(s);else if(s!=null)throw new r(`InvalidParameter`,m);if(_.q==null&&_.filter==null&&_.searchUserAccess==null)throw new r(`InvalidParameter`,m)}else throw new r(`InvalidParameter`,m);let y=[];for(;;){let i;try{i=await g.request(g.restUrl+`/community/groups`,{query:_,authMode:`no-prompt`})}catch(e){return typeof e==`object`&&e&&`message`in e&&typeof e.message==`string`&&n.console(`GetGroups error: ${e.message}`),l.getLogger(`esri.arcade.functions.portal`).error(e),null}if(n.abortSignal.aborted)throw new r(`Cancelled`,m);for(let n of i.results)y.push(new t({__proto__:null,id:e(n.id),title:e(n.title),owner:e(n.owner),description:e(n.description),snippet:e(n.snippet),tags:e(n.tags),typeKeywords:e(n.typeKeywords),phone:e(n.phone),created:e(n.created),modified:e(n.modified),orgId:e(n.orgId)}));if(i.nextStart==null||i.nextStart<=_.start)break;_.start=i.nextStart}return i.from(y)})})}const h=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:m},Symbol.toStringTag,{value:`Module`}));export{h as P,m as r};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@5.2.0-next.154/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
|
|
@@ -12,12 +12,13 @@ export interface DynamicChoiceInputProperties extends SingleChoiceInputPropertie
|
|
|
12
12
|
*
|
|
13
13
|
* @since 5.2
|
|
14
14
|
* @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
|
|
15
|
+
* @see [Sample - Edit features with dynamic choices ](https://developers.arcgis.com/javascript/latest/sample-code/editor-dynamic-choices/)
|
|
15
16
|
* @example
|
|
16
17
|
* // Creates a new dynamic choice input for a field element within a form
|
|
17
18
|
* const dynamicChoiceInput = new DynamicChoiceInput({
|
|
18
19
|
* choiceExpression: dynamicChoiceExpression.name, // reference to the defined expression
|
|
19
|
-
* noValueOptionLabel: "No Value (null)",
|
|
20
|
-
* showNoValueOption: false,
|
|
20
|
+
* noValueOptionLabel: "No Value (null)", // label for the option representing a null value
|
|
21
|
+
* showNoValueOption: false, // whether to display the choice representing a null value (ie. "No Value")
|
|
21
22
|
* });
|
|
22
23
|
*/
|
|
23
24
|
export default class DynamicChoiceInput extends SingleChoiceInput {
|
|
@@ -25,6 +26,7 @@ export default class DynamicChoiceInput extends SingleChoiceInput {
|
|
|
25
26
|
/**
|
|
26
27
|
* A reference to an [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression that returns a dictionary. The dictionary should have a `choices` array of objects, with each object in the array having a `name` property that is the text displayed to the user, and a `code` property that is the value assigned to the field when that choice is selected.
|
|
27
28
|
*
|
|
29
|
+
* @see [Sample - Edit features with dynamic choices ](https://developers.arcgis.com/javascript/latest/sample-code/editor-dynamic-choices/)
|
|
28
30
|
* @example
|
|
29
31
|
* // Set the choice expression for the dynamic choice input
|
|
30
32
|
* fieldElement.input = new DynamicChoiceInput({
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
* - The glTF file must contain a single scene.
|
|
11
11
|
* - The scene can contain an arbitrary number of nodes, meshes and primitives of type `TRIANGLE`, `TRIANGLE_STRIP` or
|
|
12
12
|
* `TRIANGLE_FAN`. `POINTS` and `LINES` are not supported.
|
|
13
|
-
* - Only materials of [type Metallic-Roughness](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#metallic-roughness-material) are supported.
|
|
14
13
|
* - Animations, skinning and camera definitions are not supported.
|
|
15
14
|
* - The following glTF extensions are supported:
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
15
|
+
* - [KHR_texture_transform](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_transform) for texture space transformation of uv coordinates.
|
|
16
|
+
* - [KHR_texture_basisu](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_basisu) to support textures with KTX V2 images and Basis Universal compression.
|
|
17
|
+
* - [KHR_draco_mesh_compression](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_draco_mesh_compression) for loading Draco-compressed mesh geometry.
|
|
18
|
+
* - [KHR_materials_emissive_strength](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_emissive_strength) to define emissive strength values over 1.
|
|
19
|
+
* - [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_unlit) to define unlit materials.
|
|
21
20
|
*
|
|
22
21
|
* @since 4.7
|
|
23
22
|
*/
|
package/interfaces.d.ts
CHANGED
|
@@ -5618,7 +5618,7 @@ declare namespace __esri {
|
|
|
5618
5618
|
export const TimeInfo: typeof import("./layers/support/TimeInfo.js").default;
|
|
5619
5619
|
|
|
5620
5620
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5621
|
-
export type
|
|
5621
|
+
export type TimeSeriesCalculationMethodProperties = import("./layers/support/TimeSeriesCalculationMethod.js").TimeSeriesCalculationMethodProperties;
|
|
5622
5622
|
|
|
5623
5623
|
/** @deprecated since 5.0. Refactor using \@arcgis/codemod */
|
|
5624
5624
|
export type TimeSeriesFieldTimeMappingProperties = import("./layers/support/TimeSeriesFieldTimeMapping.js").TimeSeriesFieldTimeMappingProperties;
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as e}from"./core/urlUtils.js";Symbol.dispose??=Symbol(`Symbol.dispose`),Symbol.asyncDispose??=Symbol(`Symbol.asyncDispose`);const t=`5.2`;let n=`5.2`;n=`5.2.0-next.154`;let r;function i(e){r=e}function a(t){let n=r?.findCredential(t);return n?.token?e(t,`token`,n.token):t}has(`host-webworker`)||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has(`host-webworker`);export{a as addTokenParameter,n as fullVersion,r as id,i as setId,t as version};
|
package/layers/FeatureLayer.d.ts
CHANGED
|
@@ -257,7 +257,7 @@ export interface FeatureLayerProperties extends LayerProperties, APIKeyMixinProp
|
|
|
257
257
|
* The [template](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) used in an associated layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/). All of the properties and field configurations set on the layer's [Feature Form](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-form/) are handled via the [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/).
|
|
258
258
|
*
|
|
259
259
|
* @since 4.16
|
|
260
|
-
* @see [Sample -
|
|
260
|
+
* @see [Sample - Edit features with dynamic choices ](https://developers.arcgis.com/javascript/latest/sample-code/editor-dynamic-choices/)
|
|
261
261
|
* @example
|
|
262
262
|
* // Create the Field Elements to pass into the template
|
|
263
263
|
* const fieldElement1 = new FieldElement({
|
|
@@ -1026,7 +1026,7 @@ export abstract class __FeatureLayerSansType extends FeatureLayerSuperclass {
|
|
|
1026
1026
|
* The [template](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) used in an associated layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/). All of the properties and field configurations set on the layer's [Feature Form](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-form/) are handled via the [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/).
|
|
1027
1027
|
*
|
|
1028
1028
|
* @since 4.16
|
|
1029
|
-
* @see [Sample -
|
|
1029
|
+
* @see [Sample - Edit features with dynamic choices ](https://developers.arcgis.com/javascript/latest/sample-code/editor-dynamic-choices/)
|
|
1030
1030
|
* @example
|
|
1031
1031
|
* // Create the Field Elements to pass into the template
|
|
1032
1032
|
* const fieldElement1 = new FieldElement({
|