moorhen 0.8.2 → 0.8.3
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/README.md +7 -0
- package/baby-gru/CootWorker.js +1 -1
- package/baby-gru/CootWorker.ts +1 -1
- package/baby-gru/monomers/p/PRO.cif +118 -115
- package/baby-gru/monomers/t/TYR.cif +26 -25
- package/baby-gru/wasm/moorhen.data +198 -196
- package/baby-gru/wasm/moorhen.js +1 -1
- package/baby-gru/wasm/moorhen.wasm +0 -0
- package/baby-gru/wasm/moorhen.worker.js +1 -1
- package/baby-gru/wasm/web_example.js +1 -1
- package/baby-gru/wasm/web_example.wasm +0 -0
- package/moorhen.js +14 -14
- package/package.json +8 -5
- package/types/main.d.ts +77 -1
- package/types/mgWebGL.d.ts +4 -0
- package/types/moorhen.d.ts +3 -1
- package/baby-gru/wasm/cif_pdb_worker.js +0 -1
- package/baby-gru/wasm/crystallography_worker.js +0 -1
- package/baby-gru/wasm/mini_rsr_worker.js +0 -1
- package/baby-gru/wasm/monid_to_pdb_worker.js +0 -1
- package/baby-gru/wasm/mtz_arraybuffer_worker.js +0 -1
- package/baby-gru/wasm/mtz_worker.js +0 -1
- package/baby-gru/wasm/nma_worker.js +0 -1
- package/baby-gru/wasm/papaparse.min.js +0 -2
- package/baby-gru/wasm/papaparse.min.js.LICENSE.txt +0 -6
- package/baby-gru/wasm/pdb_worker.js +0 -1
- package/baby-gru/wasm/smiles_to_pdb_worker.js +0 -1
- package/baby-gru/wasm/superpose_worker.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var createCCP4Module=(()=>{var e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(e||=__filename),function(r={}){function t(){return $.buffer!=L.buffer&&q(),L}function n(){return $.buffer!=L.buffer&&q(),W}function o(){return $.buffer!=L.buffer&&q(),j}function a(){return $.buffer!=L.buffer&&q(),U}function i(){return $.buffer!=L.buffer&&q(),B}function s(){return $.buffer!=L.buffer&&q(),z}function l(){return $.buffer!=L.buffer&&q(),G}var c,u,d=r;d.ready=new Promise(((e,r)=>{c=e,u=r})),["__emscripten_thread_init","__emscripten_thread_exit","__emscripten_thread_crashed","__emscripten_thread_mailbox_await","__emscripten_tls_init","_pthread_self","checkMailbox","__embind_initialize_bindings","establishStackSpace","invokeEntryPoint","PThread","getExceptionMessage","$incrementExceptionRefcount","$decrementExceptionRefcount","___indirect_function_table","___set_stack_limits","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(d.ready,e)||Object.defineProperty(d.ready,e,{get:()=>de("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>de("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));var f=Object.assign({},d),p="./this.program",m=(e,r)=>{throw r},h="object"==typeof window,v="function"==typeof importScripts,g="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y=!h&&!g&&!v;if(d.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var _,w,E,b=d.ENVIRONMENT_IS_PTHREAD||!1,T="";function k(e){return d.locateFile?d.locateFile(e,T):T+e}if(g){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var S=process.versions.node,P=S.split(".").slice(0,3);if((P=1e4*P[0]+100*P[1]+1*P[2].split("-")[0])<16e4)throw new Error("This emscripten-generated code requires node v16.0.0 (detected v"+S+")");var A=require("fs"),C=require("path");T=v?C.dirname(T)+"/":__dirname+"/",_=(e,r)=>(e=ve(e)?new URL(e):C.normalize(e),A.readFileSync(e,r?void 0:"utf8")),E=e=>{var r=_(e,!0);return r.buffer||(r=new Uint8Array(r)),Y(r.buffer),r},w=(e,r,t,n=!0)=>{e=ve(e)?new URL(e):C.normalize(e),A.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!d.thisProgram&&process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),m=(e,r)=>{throw process.exitCode=e,r},global.Worker=require("worker_threads").Worker}else if(y){if("object"==typeof process&&"function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(_=read),E=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let r=read(e,"binary");return Y("object"==typeof r),r},w=(e,r,t)=>{setTimeout((()=>r(E(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():de()),"undefined"!=typeof scriptArgs&&scriptArgs,"function"==typeof quit&&(m=(e,r)=>{throw setTimeout((()=>{if(!(r instanceof Me)){let e=r;r&&"object"==typeof r&&r.stack&&(e=[r,r.stack]),R(`exiting due to exception: ${e}`)}quit(e)})),r}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!h&&!v)throw new Error("environment detection error");if(v?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),e&&(T=e),T=T.startsWith("blob:")?"":T.substr(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");g||(_=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},v&&(E=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),w=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)})}g&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var F=console.log.bind(console),D=console.error.bind(console);g&&(F=(...e)=>A.writeSync(1,e.join(" ")+"\n"),D=(...e)=>A.writeSync(2,e.join(" ")+"\n"));var O,M,$,I,N=d.print||F,R=d.printErr||D;Object.assign(d,f),f=null,O="fetchSettings",Object.getOwnPropertyDescriptor(d,O)&&de(`\`Module.${O}\` was supplied but \`${O}\` not included in INCOMING_MODULE_JS_API`),d.arguments&&d.arguments,be("arguments","arguments_"),d.thisProgram&&(p=d.thisProgram),be("thisProgram","thisProgram"),d.quit&&(m=d.quit),be("quit","quit_"),Y(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),Y(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),Y(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),Y(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),Y(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),Y(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),Y(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),Y(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),Y(void 0===d.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),be("asm","wasmExports"),be("read","read_"),be("readAsync","readAsync"),be("readBinary","readBinary"),be("setWindowTitle","setWindowTitle"),Y(h||v||g,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)"),Y(!y,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),d.wasmBinary&&(M=d.wasmBinary),be("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&de("no native wasm support detected");var x,L,W,j,U,B,z,H,G,V=!1;function Y(e,r){e||de("Assertion failed"+(r?": "+r:""))}function q(){var e=$.buffer;d.HEAP8=L=new Int8Array(e),d.HEAP16=j=new Int16Array(e),d.HEAPU8=W=new Uint8Array(e),d.HEAPU16=U=new Uint16Array(e),d.HEAP32=B=new Int32Array(e),d.HEAPU32=z=new Uint32Array(e),d.HEAPF32=H=new Float32Array(e),d.HEAPF64=G=new Float64Array(e)}Y(!d.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),Y("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var K=d.INITIAL_MEMORY||16777216;if(be("INITIAL_MEMORY","INITIAL_MEMORY"),Y(K>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+K+"! (STACK_SIZE=5242880)"),b)$=d.wasmMemory;else if(d.wasmMemory)$=d.wasmMemory;else if(!(($=new WebAssembly.Memory({initial:K/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw R("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),g&&R("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");function J(){var e=Cn();Y(0==(3&e)),0==e&&(e+=4),s()[e>>2]=34821223,Fe(34821223),s()[e+4>>2]=2310721022,Fe(2310721022),s()[0]=1668509029,Fe(1668509029)}function X(){if(!V){var e=Cn();0==e&&(e+=4);var r=s()[e>>2],t=s()[e+4>>2];34821223==r&&2310721022==t||de(`Stack overflow! Stack cookie has been overwritten at ${Be(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${Be(t)} ${Be(r)}`),1668509029!=s()[0]&&de("Runtime error: The application has corrupted its heap memory area (address zero)!")}}q(),Y((K=$.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),r=new Int8Array(e.buffer);if(e[0]=25459,115!==r[0]||99!==r[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var Z=[],Q=[],ee=[],re=!1;function te(){Y(!re),re=!0,b||(X(),or(),d.noFSInit||kr.init.initialized||kr.init(),kr.ignorePermissions=!1,vr.init(),Ge(Q))}function ne(e){Z.unshift(e)}Y(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),Y(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),Y(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),Y(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var oe=0,ae=null,ie=null,se={};function le(e){for(var r=e;;){if(!se[e])return e;e=r+Math.random()}}function ce(e){oe++,d.monitorRunDependencies?.(oe),e?(Y(!se[e]),se[e]=1,null===ae&&"undefined"!=typeof setInterval&&(ae=setInterval((()=>{if(V)return clearInterval(ae),void(ae=null);var e=!1;for(var r in se)e||(e=!0,R("still waiting on run dependencies:")),R(`dependency: ${r}`);e&&R("(end of list)")}),1e4))):R("warning: run dependency added without ID")}function ue(e){if(oe--,d.monitorRunDependencies?.(oe),e?(Y(se[e]),delete se[e]):R("warning: run dependency removed without ID"),0==oe&&(null!==ae&&(clearInterval(ae),ae=null),ie)){var r=ie;ie=null,r()}}function de(e){d.onAbort?.(e),R(e="Aborted("+e+")"),V=!0,x=1;var r=new WebAssembly.RuntimeError(e);throw u(r),r}var fe,pe,me,he=e=>e.startsWith("data:application/octet-stream;base64,"),ve=e=>e.startsWith("file://");function ge(e){return function(){Y(re,`native function \`${e}\` called before runtime initialization`);var r=_n[e];return Y(r,`exported native function \`${e}\` not found`),r.apply(null,arguments)}}class ye extends Error{}class _e extends ye{constructor(e){super(e),this.excPtr=e;const r=Qe(e);this.name=r[0],this.message=r[1]}}function we(e){if(e==fe&&M)return new Uint8Array(M);if(E)return E(e);throw"both async and sync fetching of the wasm failed"}function Ee(e,r,t){return function(e){if(!M&&(h||v)){if("function"==typeof fetch&&!ve(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw`failed to load wasm binary file at '${e}'`;return r.arrayBuffer()})).catch((()=>we(e)));if(w)return new Promise(((r,t)=>{w(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>we(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{R(`failed to asynchronously prepare wasm: ${e}`),ve(fe)&&R(`warning: Loading from a file URI (${fe}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),de(e)}))}function be(e,r,t=!0){Object.getOwnPropertyDescriptor(d,e)||Object.defineProperty(d,e,{configurable:!0,get(){de(`\`Module.${e}\` has been replaced by \`${r}\``+(t?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function Te(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function ke(e,r){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){ar(`\`${e}\` is not longer defined by emscripten. ${r}`)}})}function Se(e){Object.getOwnPropertyDescriptor(d,e)||Object.defineProperty(d,e,{configurable:!0,get(){var r=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;Te(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),de(r)}})}function Pe(e,r,t,n){Y(Number.isInteger(Number(e)),`attempt to write non-integer (${e}) into integer heap`),Y(e<=n,`value (${e}) too large to write as ${r}-bit value`),Y(e>=t,`value (${e}) too small to write as ${r}-bit value`)}he(fe="web_example.wasm")||(fe=k(fe)),ke("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ke("asm","Please use wasmExports instead");var Ae=e=>Pe(e,8,-127,255),Ce=e=>Pe(e,16,-32767,65535),Fe=e=>Pe(e,32,-2147483647,4294967295),De=e=>Pe(e,64,-0x8000000000000000,0x10000000000000000);function Oe(e){g?A.writeSync(2,Array.from(arguments).join(" ")+"\n"):console.warn.apply(console,arguments)}function Me(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var $e=e=>{e.terminate(),e.onmessage=r=>{var t=r.data.cmd;R(`received "${t}" command from terminated worker: ${e.workerID}`)}},Ie=e=>{Y(!b,"Internal Error! cleanupThread() can only ever be called from main application thread!"),Y(e,"Internal Error! Null pthread_ptr in cleanupThread!");var r=He.pthreads[e];Y(r),He.returnWorkerToPool(r)},Ne=0,Re=()=>nr||Ne>0,xe=e=>{var r=xn(),t=e();return Ln(r),t},Le=(e,r)=>(Y(e==e>>>0||e==(0|e)),Y(r===(0|r)),r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN),We=function(e,r){var t=arguments.length-2,n=arguments;return xe((()=>{for(var o=t,a=Wn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];l()[i+s]=c}return Fn(e,o,a,r)}))};function je(e){if(b)return We(0,1,e);x=e,Re()||(He.terminateAllThreads(),d.onExit?.(e),V=!0),m(e,new Me(e))}var Ue=(e,r)=>{if(x=e,function(){var e=N,r=R,t=!1;N=R=e=>{t=!0};try{Tn(0),["stdout","stderr"].forEach((function(e){var r=kr.analyzePath("/dev/"+e);if(r){var n=r.object.rdev,o=vr.ttys[n];o?.output?.length&&(t=!0)}}))}catch(e){}N=e,R=r,t&&ar("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),b)throw Y(!r),Ze(e),"unwind";if(Re()&&!r){var t=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=${Ne}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;u(t),R(t)}je(e)},Be=e=>(Y("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),ze=e=>{if(e instanceof Me||"unwind"==e)return x;X(),e instanceof WebAssembly.RuntimeError&&jn()<=0&&R("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 5242880)"),m(1,e)},He={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},nextWorkerID:1,debugInit(){var e=Oe;Oe=r=>{return e((t=0,re&&void 0!==En&&(t=En()),"w:"+(d.workerID||0)+",t:"+Be(t)+": "+r));var t}},init(){He.debugInit(),b?He.initWorker():He.initMainThread()},initMainThread(){ne((()=>{ce("loading-workers"),He.loadWasmModuleToAllWorkers((()=>ue("loading-workers")))}))},initWorker(){nr=!1},setExitStatus:e=>x=e,terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of(Y(!b,"Internal Error! terminateAllThreads() can only ever be called from main application thread!"),He.runningWorkers))$e(e);for(var e of He.unusedWorkers)$e(e);He.unusedWorkers=[],He.runningWorkers=[],He.pthreads=[]},returnWorkerToPool:e=>{var r=e.pthread_ptr;delete He.pthreads[r],He.unusedWorkers.push(e),He.runningWorkers.splice(He.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Dn(r)},receiveObjectTransfer(e){},threadInitTLS(){He.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:r=>new Promise((t=>{r.onmessage=e=>{var n=e.data,o=n.cmd;if(n.targetThread&&n.targetThread!=En()){var a=He.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):R(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?Vt():"spawnThread"===o?(e=>{Y(!b,"Internal Error! spawnThread() can only ever be called from main application thread!"),Y(e.pthread_ptr,"Internal error, no pthread ptr!");var r=He.getNewWorker();if(!r)return 6;Y(!r.pthread_ptr,"Internal error!"),He.runningWorkers.push(r),He.pthreads[e.pthread_ptr]=r,r.pthread_ptr=e.pthread_ptr;var t={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};g&&r.unref(),r.postMessage(t,e.transferList)})(n):"cleanupThread"===o?Ie(n.thread):"killThread"===o?(e=>{Y(!b,"Internal Error! killThread() can only ever be called from main application thread!"),Y(e,"Internal Error! Null pthread_ptr in killThread!");var r=He.pthreads[e];delete He.pthreads[e],$e(r),Dn(e),He.runningWorkers.splice(He.runningWorkers.indexOf(r),1),r.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Y(!b,"Internal Error! cancelThread() can only ever be called from main application thread!"),Y(i,"Internal Error! Null pthread_ptr in cancelThread!"),He.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(r.loaded=!0,t(r)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?r.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&R(`worker sent an unknown command ${o}`)}},r.onerror=e=>{var t="worker sent an error!";throw r.pthread_ptr&&(t=`Pthread ${Be(r.pthread_ptr)} sent an error!`),R(`${t} ${e.filename}:${e.lineno}: ${e.message}`),e},g&&(r.on("message",(e=>r.onmessage({data:e}))),r.on("error",(e=>r.onerror(e)))),Y($ instanceof WebAssembly.Memory,"WebAssembly memory should have been loaded by now!"),Y(I instanceof WebAssembly.Module,"WebAssembly Module should have been loaded by now!");var n=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&n.push(o);r.workerID=He.nextWorkerID++,r.postMessage({cmd:"load",handlers:n,urlOrBlob:d.mainScriptUrlOrBlob||e,wasmMemory:$,wasmModule:I,workerID:r.workerID})})),loadWasmModuleToAllWorkers(e){e()},allocateUnusedWorker(){var e,r=k("web_example.worker.js");e=new Worker(r),He.unusedWorkers.push(e)},getNewWorker:()=>(0==He.unusedWorkers.length&&(g||R("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."),He.allocateUnusedWorker(),He.loadWasmModuleToWorker(He.unusedWorkers[0])),He.unusedWorkers.pop())};d.PThread=He;var Ge=e=>{for(;e.length>0;)e.shift()(d)},Ve=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},Ye=(e,r,t,n)=>{if(Y("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;s>1114111&&ar("Invalid Unicode code point "+Be(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o},qe=(e,r,t)=>(Y("number"==typeof t,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),Ye(e,n(),r,t)),Ke="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Je=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&Ke)return Ke.decode(e.buffer instanceof SharedArrayBuffer?e.slice(r,o):e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if(224==(240&i)?i=(15&i)<<12|s<<6|l:(240!=(248&i)&&ar("Invalid UTF-8 leading byte "+Be(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(7&i)<<18|s<<12|l<<6|63&e[r++]),i<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Xe=(e,r)=>(Y("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),e?Je(n(),e,r):"");function Ze(e){if(b)return We(1,0,e);Ue(e)}d.establishStackSpace=()=>{var e=En(),r=s()[e+52>>2],t=r-s()[e+56>>2];Y(0!=r),Y(0!=t),Y(r>t,"stackHigh must be higher then stackLow"),Rn(r,t),or(),Ln(r),J()};var Qe=e=>(e=>xe((()=>{var r=Wn(4),t=Wn(4);zn(e,r,t);var n,o=s()[r>>2],a=s()[t>>2],i=Xe(o);return bn(o),a&&(n=Xe(a),bn(a)),[i,n]})))(e);d.getExceptionMessage=Qe;var er,rr=[],tr=e=>{var r=rr[e];return r||(e>=rr.length&&(rr.length=e+1),rr[e]=r=er.get(e)),Y(er.get(e)==r,"JavaScript-side Wasm function table mirror is out of date!"),r};d.invokeEntryPoint=(e,r)=>{var t=tr(e)(r);X(),function(e){Re()?He.setExitStatus(e):On(e)}(t)};var nr=d.noExitRuntime||!0,or=()=>{var e=An(),r=Cn();Vn(e,r)},ar=e=>{ar.shown||={},ar.shown[e]||(ar.shown[e]=1,g&&(e="warning: "+e),R(e))},ir=[],sr=0,lr=0;class cr{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?1:0,t()[this.ptr+12>>0]=e,Ae(e)}get_caught(){return 0!=t()[this.ptr+12>>0]}set_rethrown(e){e=e?1:0,t()[this.ptr+13>>0]=e,Ae(e)}get_rethrown(){return 0!=t()[this.ptr+13>>0]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){s()[this.ptr+16>>2]=e}get_adjusted_ptr(){return s()[this.ptr+16>>2]}get_exception_ptr(){if(Gn(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ur=e=>{var r=lr?.excPtr;if(!r)return In(0),0;var t=new cr(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return In(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Hn(a,n,i))return In(a),r}return In(n),r},dr={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=dr.isAbs(e),t="/"===e.substr(-1);return(e=dr.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=dr.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=dr.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return dr.normalize(e.join("/"))},join2:(e,r)=>dr.normalize(e+"/"+r)},fr=e=>(fr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);if(g)try{var e=require("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}de("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),pr={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:kr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=dr.isAbs(n)}return(r?"/":"")+(e=dr.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=pr.resolve(e).substr(1),r=pr.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},mr=[];function hr(e,r,t){var n=t>0?t:Ve(e)+1,o=new Array(n),a=Ye(e,o,0,o.length);return r&&(o.length=a),o}var vr={ttys:[],init(){},shutdown(){},register(e,r){vr.ttys[e]={input:[],output:[],ops:r},kr.registerDevice(e,vr.stream_ops)},stream_ops:{open(e){var r=vr.ttys[e.node.rdev];if(!r)throw new kr.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new kr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new kr.ErrnoError(29)}if(void 0===s&&0===a)throw new kr.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new kr.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new kr.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!mr.length){var e=null;if(g){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=A.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;mr=hr(e,!0)}return mr.shift()})(),put_char(e,r){null===r||10===r?(N(Je(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(N(Je(e.output,0)),e.output=[])},ioctl_tcgets:e=>({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,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(R(Je(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(R(Je(e.output,0)),e.output=[])}}},gr=e=>{e=((e,r)=>(Y(r,"alignment argument is required"),Math.ceil(e/r)*r))(e,65536);var r=kn(65536,e);return r?((e,r)=>(n().fill(0,e,e+r),e))(r,e):0},yr={ops_table:null,mount:e=>yr.createNode(null,"/",16895,0),createNode(e,r,t,n){if(kr.isBlkdev(t)||kr.isFIFO(t))throw new kr.ErrnoError(63);yr.ops_table||={dir:{node:{getattr:yr.node_ops.getattr,setattr:yr.node_ops.setattr,lookup:yr.node_ops.lookup,mknod:yr.node_ops.mknod,rename:yr.node_ops.rename,unlink:yr.node_ops.unlink,rmdir:yr.node_ops.rmdir,readdir:yr.node_ops.readdir,symlink:yr.node_ops.symlink},stream:{llseek:yr.stream_ops.llseek}},file:{node:{getattr:yr.node_ops.getattr,setattr:yr.node_ops.setattr},stream:{llseek:yr.stream_ops.llseek,read:yr.stream_ops.read,write:yr.stream_ops.write,allocate:yr.stream_ops.allocate,mmap:yr.stream_ops.mmap,msync:yr.stream_ops.msync}},link:{node:{getattr:yr.node_ops.getattr,setattr:yr.node_ops.setattr,readlink:yr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:yr.node_ops.getattr,setattr:yr.node_ops.setattr},stream:kr.chrdev_stream_ops}};var o=kr.createNode(e,r,t,n);return kr.isDir(o.mode)?(o.node_ops=yr.ops_table.dir.node,o.stream_ops=yr.ops_table.dir.stream,o.contents={}):kr.isFile(o.mode)?(o.node_ops=yr.ops_table.file.node,o.stream_ops=yr.ops_table.file.stream,o.usedBytes=0,o.contents=null):kr.isLink(o.mode)?(o.node_ops=yr.ops_table.link.node,o.stream_ops=yr.ops_table.link.stream):kr.isChrdev(o.mode)&&(o.node_ops=yr.ops_table.chrdev.node,o.stream_ops=yr.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=kr.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,kr.isDir(e.mode)?r.size=4096:kr.isFile(e.mode)?r.size=e.usedBytes:kr.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&yr.resizeFileStorage(e,r.size)},lookup(e,r){throw kr.genericErrors[44]},mknod:(e,r,t,n)=>yr.createNode(e,r,t,n),rename(e,r,t){if(kr.isDir(e.mode)){var n;try{n=kr.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new kr.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=kr.lookupNode(e,r);for(var n in t.contents)throw new kr.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t of Object.keys(e.contents))r.push(t);return r},symlink(e,r,t){var n=yr.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!kr.isLink(e.mode))throw new kr.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(Y(i>=0),i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,n,o,a,i){if(Y(!(r instanceof ArrayBuffer)),r.buffer===t().buffer&&(i=!1),!o)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(i)return Y(0===a,"canOwn must imply no weird position inside the file"),s.contents=r.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=r.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(r.subarray(n,n+o),a),o}if(yr.expandFileStorage(s,a+o),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+o),a);else for(var l=0;l<o;l++)s.contents[a+l]=r[n+l];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&kr.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new kr.ErrnoError(28);return n},allocate(e,r,t){yr.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,n,o,a){if(!kr.isFile(e.node.mode))throw new kr.ErrnoError(43);var i,s,l=e.node.contents;if(2&a||l.buffer!==t().buffer){if((n>0||n+r<l.length)&&(l=l.subarray?l.subarray(n,n+r):Array.prototype.slice.call(l,n,n+r)),s=!0,!(i=gr(r)))throw new kr.ErrnoError(48);t().set(l,i)}else s=!1,i=l.byteOffset;return{ptr:i,allocated:s}},msync:(e,r,t,n,o)=>(yr.stream_ops.write(e,r,0,n,t,!1),0)}},_r=d.preloadPlugins||[],wr=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Er={dbs:{},indexedDB:()=>{if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"==typeof window&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Y(e,"IDBFS used, but indexedDB not supported"),e},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(e){return yr.mount.apply(null,arguments)},syncfs:(e,r,t)=>{Er.getLocalSet(e,((n,o)=>{if(n)return t(n);Er.getRemoteSet(e,((e,n)=>{if(e)return t(e);var a=r?n:o,i=r?o:n;Er.reconcile(a,i,t)}))}))},quit:()=>{Object.values(Er.dbs).forEach((e=>e.close())),Er.dbs={}},getDB:(e,r)=>{var t,n=Er.dbs[e];if(n)return r(null,n);try{t=Er.indexedDB().open(e,Er.DB_VERSION)}catch(e){return r(e)}if(!t)return r("Unable to connect to IndexedDB");t.onupgradeneeded=e=>{var r,t=e.target.result,n=e.target.transaction;(r=t.objectStoreNames.contains(Er.DB_STORE_NAME)?n.objectStore(Er.DB_STORE_NAME):t.createObjectStore(Er.DB_STORE_NAME)).indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},t.onsuccess=()=>{n=t.result,Er.dbs[e]=n,r(null,n)},t.onerror=e=>{r(e.target.error),e.preventDefault()}},getLocalSet:(e,r)=>{var t={};function n(e){return"."!==e&&".."!==e}function o(e){return r=>dr.join2(e,r)}for(var a=kr.readdir(e.mountpoint).filter(n).map(o(e.mountpoint));a.length;){var i,s=a.pop();try{i=kr.stat(s)}catch(e){return r(e)}kr.isDir(i.mode)&&a.push.apply(a,kr.readdir(s).filter(n).map(o(s))),t[s]={timestamp:i.mtime}}return r(null,{type:"local",entries:t})},getRemoteSet:(e,r)=>{var t={};Er.getDB(e.mountpoint,((e,n)=>{if(e)return r(e);try{var o=n.transaction([Er.DB_STORE_NAME],"readonly");o.onerror=e=>{r(e.target.error),e.preventDefault()},o.objectStore(Er.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=e=>{var o=e.target.result;if(!o)return r(null,{type:"remote",db:n,entries:t});t[o.primaryKey]={timestamp:o.key},o.continue()}}catch(e){return r(e)}}))},loadLocalEntry:(e,r)=>{var t,n;try{n=kr.lookupPath(e).node,t=kr.stat(e)}catch(e){return r(e)}return kr.isDir(t.mode)?r(null,{timestamp:t.mtime,mode:t.mode}):kr.isFile(t.mode)?(n.contents=yr.getFileDataAsTypedArray(n),r(null,{timestamp:t.mtime,mode:t.mode,contents:n.contents})):r(new Error("node type not supported"))},storeLocalEntry:(e,r,t)=>{try{if(kr.isDir(r.mode))kr.mkdirTree(e,r.mode);else{if(!kr.isFile(r.mode))return t(new Error("node type not supported"));kr.writeFile(e,r.contents,{canOwn:!0})}kr.chmod(e,r.mode),kr.utime(e,r.timestamp,r.timestamp)}catch(e){return t(e)}t(null)},removeLocalEntry:(e,r)=>{try{var t=kr.stat(e);kr.isDir(t.mode)?kr.rmdir(e):kr.isFile(t.mode)&&kr.unlink(e)}catch(e){return r(e)}r(null)},loadRemoteEntry:(e,r,t)=>{var n=e.get(r);n.onsuccess=e=>t(null,e.target.result),n.onerror=e=>{t(e.target.error),e.preventDefault()}},storeRemoteEntry:(e,r,t,n)=>{try{var o=e.put(t,r)}catch(e){return void n(e)}o.onsuccess=e=>n(),o.onerror=e=>{n(e.target.error),e.preventDefault()}},removeRemoteEntry:(e,r,t)=>{var n=e.delete(r);n.onsuccess=e=>t(),n.onerror=e=>{t(e.target.error),e.preventDefault()}},reconcile:(e,r,t)=>{var n=0,o=[];Object.keys(e.entries).forEach((function(t){var a=e.entries[t],i=r.entries[t];i&&a.timestamp.getTime()==i.timestamp.getTime()||(o.push(t),n++)}));var a=[];if(Object.keys(r.entries).forEach((function(r){e.entries[r]||(a.push(r),n++)})),!n)return t(null);var i=!1,s=("remote"===e.type?e.db:r.db).transaction([Er.DB_STORE_NAME],"readwrite"),l=s.objectStore(Er.DB_STORE_NAME);function c(e){if(e&&!i)return i=!0,t(e)}s.onerror=e=>{c(this.error),e.preventDefault()},s.oncomplete=e=>{i||t(null)},o.sort().forEach((e=>{"local"===r.type?Er.loadRemoteEntry(l,e,((r,t)=>{if(r)return c(r);Er.storeLocalEntry(e,t,c)})):Er.loadLocalEntry(e,((r,t)=>{if(r)return c(r);Er.storeRemoteEntry(l,e,t,c)}))})),a.sort().reverse().forEach((e=>{"local"===r.type?Er.removeLocalEntry(e,c):Er.removeRemoteEntry(l,e,c)}))}},br={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Tr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},kr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class extends Error{constructor(e){for(var r in super(br[e]),this.name="ErrnoError",this.errno=e,Tr)if(Tr[r]===e){this.code=r;break}}},genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=pr.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new kr.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=kr.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=kr.lookupNode(n,t[a]),o=dr.join2(o,t[a]),kr.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;kr.isLink(n.mode);){var l=kr.readlink(o);if(o=pr.resolve(dr.dirname(o),l),n=kr.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new kr.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(kr.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%kr.nameTable.length},hashAddNode(e){var r=kr.hashName(e.parent.id,e.name);e.name_next=kr.nameTable[r],kr.nameTable[r]=e},hashRemoveNode(e){var r=kr.hashName(e.parent.id,e.name);if(kr.nameTable[r]===e)kr.nameTable[r]=e.name_next;else for(var t=kr.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=kr.mayLookup(e);if(t)throw new kr.ErrnoError(t);for(var n=kr.hashName(e.id,r),o=kr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return kr.lookup(e,r)},createNode(e,r,t,n){Y("object"==typeof e);var o=new kr.FSNode(e,r,t,n);return kr.hashAddNode(o),o},destroyNode(e){kr.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>kr.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>kr.isDir(e.mode)?kr.nodePermissions(e,"x")||(e.node_ops.lookup?0:2):54,mayCreate(e,r){try{return kr.lookupNode(e,r),20}catch(e){}return kr.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=kr.lookupNode(e,r)}catch(e){return e.errno}var o=kr.nodePermissions(e,"wx");if(o)return o;if(t){if(!kr.isDir(n.mode))return 54;if(kr.isRoot(n)||kr.getPath(n)===kr.cwd())return 10}else if(kr.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?kr.isLink(e.mode)?32:kr.isDir(e.mode)&&("r"!==kr.flagsToPermissionString(r)||512&r)?31:kr.nodePermissions(e,kr.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=kr.MAX_OPEN_FDS;e++)if(!kr.streams[e])return e;throw new kr.ErrnoError(33)},getStreamChecked(e){var r=kr.getStream(e);if(!r)throw new kr.ErrnoError(8);return r},getStream:e=>kr.streams[e],createStream:(e,r=-1)=>(kr.FSStream||(kr.FSStream=function(){this.shared={}},kr.FSStream.prototype={},Object.defineProperties(kr.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new kr.FSStream,e),-1==r&&(r=kr.nextfd()),e.fd=r,kr.streams[r]=e,e),closeStream(e){kr.streams[e]=null},chrdev_stream_ops:{open(e){var r=kr.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new kr.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){kr.devices[e]={stream_ops:r}},getDevice:e=>kr.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),kr.syncFSRequests++,kr.syncFSRequests>1&&R(`warning: ${kr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=kr.getMounts(kr.root.mount),n=0;function o(e){return Y(kr.syncFSRequests>0),kr.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){if("string"==typeof e)throw e;var n,o="/"===t,a=!t;if(o&&kr.root)throw new kr.ErrnoError(10);if(!o&&!a){var i=kr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,kr.isMountpoint(n))throw new kr.ErrnoError(10);if(!kr.isDir(n.mode))throw new kr.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?kr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=kr.lookupPath(e,{follow_mount:!1});if(!kr.isMountpoint(r.node))throw new kr.ErrnoError(28);var t=r.node,n=t.mounted,o=kr.getMounts(n);Object.keys(kr.nameTable).forEach((e=>{for(var r=kr.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&kr.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);Y(-1!==a),t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=kr.lookupPath(e,{parent:!0}).node,o=dr.basename(e);if(!o||"."===o||".."===o)throw new kr.ErrnoError(28);var a=kr.mayCreate(n,o);if(a)throw new kr.ErrnoError(a);if(!n.node_ops.mknod)throw new kr.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,kr.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,kr.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{kr.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,kr.mknod(e,r,t)),symlink(e,r){if(!pr.resolve(e))throw new kr.ErrnoError(44);var t=kr.lookupPath(r,{parent:!0}).node;if(!t)throw new kr.ErrnoError(44);var n=dr.basename(r),o=kr.mayCreate(t,n);if(o)throw new kr.ErrnoError(o);if(!t.node_ops.symlink)throw new kr.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=dr.dirname(e),a=dr.dirname(r),i=dr.basename(e),s=dr.basename(r);if(t=kr.lookupPath(e,{parent:!0}).node,n=kr.lookupPath(r,{parent:!0}).node,!t||!n)throw new kr.ErrnoError(44);if(t.mount!==n.mount)throw new kr.ErrnoError(75);var l,c=kr.lookupNode(t,i),u=pr.relative(e,a);if("."!==u.charAt(0))throw new kr.ErrnoError(28);if("."!==(u=pr.relative(r,o)).charAt(0))throw new kr.ErrnoError(55);try{l=kr.lookupNode(n,s)}catch(e){}if(c!==l){var d=kr.isDir(c.mode),f=kr.mayDelete(t,i,d);if(f)throw new kr.ErrnoError(f);if(f=l?kr.mayDelete(n,s,d):kr.mayCreate(n,s))throw new kr.ErrnoError(f);if(!t.node_ops.rename)throw new kr.ErrnoError(63);if(kr.isMountpoint(c)||l&&kr.isMountpoint(l))throw new kr.ErrnoError(10);if(n!==t&&(f=kr.nodePermissions(t,"w")))throw new kr.ErrnoError(f);kr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{kr.hashAddNode(c)}}},rmdir(e){var r=kr.lookupPath(e,{parent:!0}).node,t=dr.basename(e),n=kr.lookupNode(r,t),o=kr.mayDelete(r,t,!0);if(o)throw new kr.ErrnoError(o);if(!r.node_ops.rmdir)throw new kr.ErrnoError(63);if(kr.isMountpoint(n))throw new kr.ErrnoError(10);r.node_ops.rmdir(r,t),kr.destroyNode(n)},readdir(e){var r=kr.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new kr.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=kr.lookupPath(e,{parent:!0}).node;if(!r)throw new kr.ErrnoError(44);var t=dr.basename(e),n=kr.lookupNode(r,t),o=kr.mayDelete(r,t,!1);if(o)throw new kr.ErrnoError(o);if(!r.node_ops.unlink)throw new kr.ErrnoError(63);if(kr.isMountpoint(n))throw new kr.ErrnoError(10);r.node_ops.unlink(r,t),kr.destroyNode(n)},readlink(e){var r=kr.lookupPath(e).node;if(!r)throw new kr.ErrnoError(44);if(!r.node_ops.readlink)throw new kr.ErrnoError(28);return pr.resolve(kr.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=kr.lookupPath(e,{follow:!r}).node;if(!t)throw new kr.ErrnoError(44);if(!t.node_ops.getattr)throw new kr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>kr.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?kr.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new kr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){kr.chmod(e,r,!0)},fchmod(e,r){var t=kr.getStreamChecked(e);kr.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?kr.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new kr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){kr.chown(e,r,t,!0)},fchown(e,r,t){var n=kr.getStreamChecked(e);kr.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new kr.ErrnoError(28);var t;if(!(t="string"==typeof e?kr.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new kr.ErrnoError(63);if(kr.isDir(t.mode))throw new kr.ErrnoError(31);if(!kr.isFile(t.mode))throw new kr.ErrnoError(28);var n=kr.nodePermissions(t,"w");if(n)throw new kr.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=kr.getStreamChecked(e);if(0==(2097155&t.flags))throw new kr.ErrnoError(28);kr.truncate(t.node,r)},utime(e,r,t){var n=kr.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new kr.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=dr.normalize(e);try{n=kr.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new kr.ErrnoError(20)}else n=kr.mknod(e,t,0),o=!0;if(!n)throw new kr.ErrnoError(44);if(kr.isChrdev(n.mode)&&(r&=-513),65536&r&&!kr.isDir(n.mode))throw new kr.ErrnoError(54);if(!o){var a=kr.mayOpen(n,r);if(a)throw new kr.ErrnoError(a)}512&r&&!o&&kr.truncate(n,0),r&=-131713;var i=kr.createStream({node:n,path:kr.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&r||(kr.readFiles||(kr.readFiles={}),e in kr.readFiles||(kr.readFiles[e]=1)),i},close(e){if(kr.isClosed(e))throw new kr.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{kr.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(kr.isClosed(e))throw new kr.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new kr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new kr.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(Y(t>=0),n<0||o<0)throw new kr.ErrnoError(28);if(kr.isClosed(e))throw new kr.ErrnoError(8);if(1==(2097155&e.flags))throw new kr.ErrnoError(8);if(kr.isDir(e.node.mode))throw new kr.ErrnoError(31);if(!e.stream_ops.read)throw new kr.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new kr.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(Y(t>=0),n<0||o<0)throw new kr.ErrnoError(28);if(kr.isClosed(e))throw new kr.ErrnoError(8);if(0==(2097155&e.flags))throw new kr.ErrnoError(8);if(kr.isDir(e.node.mode))throw new kr.ErrnoError(31);if(!e.stream_ops.write)throw new kr.ErrnoError(28);e.seekable&&1024&e.flags&&kr.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new kr.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(kr.isClosed(e))throw new kr.ErrnoError(8);if(r<0||t<=0)throw new kr.ErrnoError(28);if(0==(2097155&e.flags))throw new kr.ErrnoError(8);if(!kr.isFile(e.node.mode)&&!kr.isDir(e.node.mode))throw new kr.ErrnoError(43);if(!e.stream_ops.allocate)throw new kr.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new kr.ErrnoError(2);if(1==(2097155&e.flags))throw new kr.ErrnoError(2);if(!e.stream_ops.mmap)throw new kr.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>(Y(t>=0),e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0),munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new kr.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=kr.open(e,r.flags),o=kr.stat(e).size,a=new Uint8Array(o);return kr.read(n,a,0,o,0),"utf8"===r.encoding?t=Je(a,0):"binary"===r.encoding&&(t=a),kr.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=kr.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Ve(r)+1),a=Ye(r,o,0,o.length);kr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");kr.write(n,r,0,r.byteLength,void 0,t.canOwn)}kr.close(n)},cwd:()=>kr.currentPath,chdir(e){var r=kr.lookupPath(e,{follow:!0});if(null===r.node)throw new kr.ErrnoError(44);if(!kr.isDir(r.node.mode))throw new kr.ErrnoError(54);var t=kr.nodePermissions(r.node,"x");if(t)throw new kr.ErrnoError(t);kr.currentPath=r.path},createDefaultDirectories(){kr.mkdir("/tmp"),kr.mkdir("/home"),kr.mkdir("/home/web_user")},createDefaultDevices(){kr.mkdir("/dev"),kr.registerDevice(kr.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),kr.mkdev("/dev/null",kr.makedev(1,3)),vr.register(kr.makedev(5,0),vr.default_tty_ops),vr.register(kr.makedev(6,0),vr.default_tty1_ops),kr.mkdev("/dev/tty",kr.makedev(5,0)),kr.mkdev("/dev/tty1",kr.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=fr(e).byteLength),e[--r]);kr.createDevice("/dev","random",t),kr.createDevice("/dev","urandom",t),kr.mkdir("/dev/shm"),kr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){kr.mkdir("/proc");var e=kr.mkdir("/proc/self");kr.mkdir("/proc/self/fd"),kr.mount({mount(){var r=kr.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=kr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?kr.createDevice("/dev","stdin",d.stdin):kr.symlink("/dev/tty","/dev/stdin"),d.stdout?kr.createDevice("/dev","stdout",null,d.stdout):kr.symlink("/dev/tty","/dev/stdout"),d.stderr?kr.createDevice("/dev","stderr",null,d.stderr):kr.symlink("/dev/tty1","/dev/stderr");var e=kr.open("/dev/stdin",0),r=kr.open("/dev/stdout",1),t=kr.open("/dev/stderr",1);Y(0===e.fd,`invalid handle for stdin (${e.fd})`),Y(1===r.fd,`invalid handle for stdout (${r.fd})`),Y(2===t.fd,`invalid handle for stderr (${t.fd})`)},staticInit(){[44].forEach((e=>{kr.genericErrors[e]=new kr.ErrnoError(e),kr.genericErrors[e].stack="<generic error, no stack>"})),kr.nameTable=new Array(4096),kr.mount(yr,{},"/"),kr.createDefaultDirectories(),kr.createDefaultDevices(),kr.createSpecialDirectories(),kr.filesystems={MEMFS:yr,IDBFS:Er}},init(e,r,t){Y(!kr.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),kr.init.initialized=!0,d.stdin=e||d.stdin,d.stdout=r||d.stdout,d.stderr=t||d.stderr,kr.createStandardStreams()},quit(){kr.init.initialized=!1,Tn(0);for(var e=0;e<kr.streams.length;e++){var r=kr.streams[e];r&&kr.close(r)}},findObject(e,r){var t=kr.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=kr.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=kr.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(e),n=kr.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:kr.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(e,a);try{kr.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=dr.join2("string"==typeof e?e:kr.getPath(e),r),i=wr(n,o);return kr.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:kr.getPath(e),i=r?dr.join2(e,r):e);var s=wr(n,o),l=kr.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),u=0,d=t.length;u<d;++u)c[u]=t.charCodeAt(u);t=c}kr.chmod(l,146|s);var f=kr.open(l,577);kr.write(f,t,0,t.length,0,a),kr.close(f),kr.chmod(l,s)}},createDevice(e,r,t,n){var o=dr.join2("string"==typeof e?e:kr.getPath(e),r),a=wr(!!t,!!n);kr.createDevice.major||(kr.createDevice.major=64);var i=kr.makedev(kr.createDevice.major++,0);return kr.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new kr.ErrnoError(29)}if(void 0===l&&0===i)throw new kr.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new kr.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),kr.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("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.");if(!_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=hr(_(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new kr.ErrnoError(29)}},createLazyFile(e,r,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var r,t=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=t);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,t-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):hr(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,N("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:s}}else l={isDevice:!1,url:n};var c=kr.createFile(e,r,l,o,a);l.contents?c.contents=l.contents:l.url&&(c.contents=null,c.url=l.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function d(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(Y(i>=0),a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((e=>{var r=c.stream_ops[e];u[e]=function(){return kr.forceLoadFile(c),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(kr.forceLoadFile(c),d(e,r,t,n,o)),u.mmap=(e,r,n,o,a)=>{kr.forceLoadFile(c);var i=gr(r);if(!i)throw new kr.ErrnoError(48);return d(e,t(),i,r,n),{ptr:i,allocated:!0}},c.stream_ops=u,c},absolutePath(){de("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){de("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){de("FS.createLink has been removed; use FS.symlink instead")},joinPath(){de("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){de("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){de("FS.standardizePath has been removed; use PATH.normalize instead")}},Sr={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(dr.isAbs(r))return r;var n;if(n=-100===e?kr.cwd():Sr.getStreamFromFD(e).path,0==r.length){if(!t)throw new kr.ErrnoError(44);return n}return dr.join2(n,r)},doStat(e,r,t){var n=e(r);i()[t>>2]=n.dev,Fe(n.dev),i()[t+4>>2]=n.mode,Fe(n.mode),s()[t+8>>2]=n.nlink,Fe(n.nlink),i()[t+12>>2]=n.uid,Fe(n.uid),i()[t+16>>2]=n.gid,Fe(n.gid),i()[t+20>>2]=n.rdev,Fe(n.rdev),me=[n.size>>>0,(pe=n.size,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=me[0],i()[t+28>>2]=me[1],De(n.size),i()[t+32>>2]=4096,Fe(4096),i()[t+36>>2]=n.blocks,Fe(n.blocks);var o=n.atime.getTime(),a=n.mtime.getTime(),l=n.ctime.getTime();return me=[Math.floor(o/1e3)>>>0,(pe=Math.floor(o/1e3),+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=me[0],i()[t+44>>2]=me[1],De(Math.floor(o/1e3)),s()[t+48>>2]=o%1e3*1e3,Fe(o%1e3*1e3),me=[Math.floor(a/1e3)>>>0,(pe=Math.floor(a/1e3),+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=me[0],i()[t+60>>2]=me[1],De(Math.floor(a/1e3)),s()[t+64>>2]=a%1e3*1e3,Fe(a%1e3*1e3),me=[Math.floor(l/1e3)>>>0,(pe=Math.floor(l/1e3),+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=me[0],i()[t+76>>2]=me[1],De(Math.floor(l/1e3)),s()[t+80>>2]=l%1e3*1e3,Fe(l%1e3*1e3),me=[n.ino>>>0,(pe=n.ino,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=me[0],i()[t+92>>2]=me[1],De(n.ino),0},doMsync(e,r,t,o,a){if(!kr.isFile(r.node.mode))throw new kr.ErrnoError(43);if(2&o)return 0;var i=n().slice(e,e+t);kr.msync(r,i,a,t,o)},varargs:void 0,get(){Y(null!=Sr.varargs);var e=i()[+Sr.varargs>>2];return Sr.varargs+=4,e},getp:()=>Sr.get(),getStr:e=>Xe(e),getStreamFromFD:e=>kr.getStreamChecked(e)};function Pr(e,r,t){if(b)return We(2,1,e,r,t);Sr.varargs=t;try{var n=Sr.getStreamFromFD(e);switch(r){case 0:if((a=Sr.get())<0)return-28;for(;kr.streams[a];)a++;return kr.createStream(n,a).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var a=Sr.get();return n.flags|=a,0;case 12:return a=Sr.getp(),o()[a+0>>1]=2,Ce(2),0}return-28}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ar(e,r){if(b)return We(3,1,e,r);try{var t=Sr.getStreamFromFD(e);return Sr.doStat(kr.stat,t.path,r)}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Cr(e,r,n){if(b)return We(4,1,e,r,n);Sr.varargs=n;try{var a=Sr.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),l=Sr.getp();i()[l>>2]=s.c_iflag||0,Fe(s.c_iflag||0),i()[l+4>>2]=s.c_oflag||0,Fe(s.c_oflag||0),i()[l+8>>2]=s.c_cflag||0,Fe(s.c_cflag||0),i()[l+12>>2]=s.c_lflag||0,Fe(s.c_lflag||0);for(var c=0;c<32;c++)t()[l+c+17>>0]=s.c_cc[c]||0,Ae(s.c_cc[c]||0);return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){l=Sr.getp();var u=i()[l>>2],d=i()[l+4>>2],f=i()[l+8>>2],p=i()[l+12>>2],m=[];for(c=0;c<32;c++)m.push(t()[l+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,r,{c_iflag:u,c_oflag:d,c_cflag:f,c_lflag:p,c_cc:m})}return 0;case 21519:return a.tty?(l=Sr.getp(),i()[l>>2]=0,Fe(0),0):-59;case 21520:return a.tty?-28:-59;case 21531:return l=Sr.getp(),kr.ioctl(a,r,l);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var h=a.tty.ops.ioctl_tiocgwinsz(a.tty);l=Sr.getp(),o()[l>>1]=h[0],Ce(h[0]),o()[l+2>>1]=h[1],Ce(h[1])}return 0;default:return-28}}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Fr(e,r){if(b)return We(5,1,e,r);try{return e=Sr.getStr(e),Sr.doStat(kr.lstat,e,r)}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Dr(e,r,t,n){if(b)return We(6,1,e,r,t,n);try{r=Sr.getStr(r);var o=256&n,a=4096&n;return Y(!(n&=-6401),`unknown flags in __syscall_newfstatat: ${n}`),r=Sr.calculateAt(e,r,a),Sr.doStat(o?kr.lstat:kr.stat,r,t)}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Or(e,r,t,n){if(b)return We(7,1,e,r,t,n);Sr.varargs=n;try{r=Sr.getStr(r),r=Sr.calculateAt(e,r);var o=n?Sr.get():0;return kr.open(r,t,o).fd}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Mr(e,r){if(b)return We(8,1,e,r);try{return e=Sr.getStr(e),Sr.doStat(kr.stat,e,r)}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function $r(e,r,t){if(b)return We(9,1,e,r,t);try{return r=Sr.getStr(r),r=Sr.calculateAt(e,r),0===t?kr.unlink(r):512===t?kr.rmdir(r):de("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ir={},Nr=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Rr(e){return this.fromWireType(i()[e>>2])}var xr,Lr,Wr,jr={},Ur={},Br={},zr=e=>{throw new xr(e)},Hr=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&zr("Mismatched type converter count");for(var o=0;o<e.length;++o)qr(e[o],n[o])}e.forEach((function(e){Br[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Ur.hasOwnProperty(e)?o[r]=Ur[e]:(a.push(e),jr.hasOwnProperty(e)||(jr[e]=[]),jr[e].push((()=>{o[r]=Ur[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Gr={},Vr=e=>{for(var r="",t=e;n()[t];)r+=Lr[n()[t++]];return r},Yr=e=>{throw new Wr(e)};function qr(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Yr(`type "${n}" must have a positive integer typeid pointer`),Ur.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Yr(`Cannot register type '${n}' twice`)}if(Ur[e]=r,delete Br[e],jr.hasOwnProperty(e)){var o=jr[e];delete jr[e],o.forEach((e=>e()))}}(e,r,t)}var Kr,Jr=e=>{Yr(e.$$.ptrType.registeredClass.name+" instance already deleted")},Xr=!1,Zr=e=>{},Qr=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},et=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=et(e,r,t.baseClass);return null===n?null:t.downcast(n)},rt={},tt=[],nt=()=>{for(;tt.length;){var e=tt.pop();e.$$.deleteScheduled=!1,e.delete()}},ot={},at=(e,r)=>(r.ptrType&&r.ptr||zr("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&zr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},st(Object.create(e,{$$:{value:r,writable:!0}})));function it(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=((e,r)=>(r=((e,r)=>{for(void 0===r&&Yr("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),ot[r]))(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?at(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):at(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=rt[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=et(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?at(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):at(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var st=e=>"undefined"==typeof FinalizationRegistry?(st=e=>e,e):(Xr=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),Qr(e.$$)})),st=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r},n=r.ptrType.registeredClass;t.leakWarning=new Error(`Embind found a leaked C++ instance ${n.name} <${Be(r.ptr)}>.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated`),"captureStackTrace"in Error&&Error.captureStackTrace(t.leakWarning,it),Xr.register(e,t,e)}return e},Zr=e=>Xr.unregister(e),st(e));function lt(){}var ct=(e,r)=>Object.defineProperty(r,"name",{value:e}),ut=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Yr(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},dt=(e,r,t)=>{d.hasOwnProperty(e)?((void 0===t||void 0!==d[e].overloadTable&&void 0!==d[e].overloadTable[t])&&Yr(`Cannot register public name '${e}' twice`),ut(d,e,e),d.hasOwnProperty(t)&&Yr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[e].overloadTable[t]=r):(d[e]=r,void 0!==t&&(d[e].numArguments=t))};function ft(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var pt=(e,r,t)=>{for(;r!==t;)r.upcast||Yr(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function mt(e,r){if(null===r)return this.isReference&&Yr(`null is not a valid ${this.name}`),0;r.$$||Yr(`Cannot pass "${Nt(r)}" as a ${this.name}`),r.$$.ptr||Yr(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return pt(r.$$.ptr,t,this.registeredClass)}function ht(e,r){var t;if(null===r)return this.isReference&&Yr(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r&&r.$$||Yr(`Cannot pass "${Nt(r)}" as a ${this.name}`),r.$$.ptr||Yr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Yr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=pt(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Yr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Yr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Ot.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Yr("Unsupporting sharing policy")}return t}function vt(e,r){if(null===r)return this.isReference&&Yr(`null is not a valid ${this.name}`),0;r.$$||Yr(`Cannot pass "${Nt(r)}" as a ${this.name}`),r.$$.ptr||Yr(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Yr(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return pt(r.$$.ptr,t,this.registeredClass)}function gt(e){return this.fromWireType(s()[e>>2])}function yt(e,r,t,n,o,a,i,s,l,c,u){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=c,this.rawDestructor=u,o||void 0!==r.baseClass?this.toWireType=ht:n?(this.toWireType=mt,this.destructorFunction=null):(this.toWireType=vt,this.destructorFunction=null)}var _t,wt=(e,r,t)=>{d.hasOwnProperty(e)||zr("Replacing nonexistant public symbol"),void 0!==d[e].overloadTable&&void 0!==t?d[e].overloadTable[t]=r:(d[e]=r,d[e].argCount=t)},Et=(e,r)=>{var t=(e=Vr(e)).includes("j")?((e,r)=>{Y(e.includes("j")||e.includes("p"),"getDynCaller should only be called with i64 sigs");var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{Y("dynCall_"+e in d,`bad function pointer type - dynCall function not found for sig '${e}'`),Y(t?.length?t.length===e.substring(1).replace(/j/g,"--").length:1==e.length);var n=d["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)})(e,r,t):(Y(tr(r),`missing table entry in dynCall: ${r}`),tr(r).apply(null,t)))(e,r,t)}})(e,r):tr(r);return"function"!=typeof t&&Yr(`unknown function pointer with signature ${e}: ${r}`),t},bt=e=>{var r=Sn(e),t=Vr(r);return bn(r),t},Tt=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||Ur[r]||(Br[r]?Br[r].forEach(e):(t.push(r),n[r]=!0))})),new _t(`${e}: `+t.map(bt).join([", "]))},kt=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(s()[r+4*n>>2]);return t};function St(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}function Pt(e,r,t,n,o,a){var i=r.length;i<2&&Yr("argTypes array size mismatch! Must at least get return value and 'this' types!"),Y(!a,"Async bindings are only supported with JSPI.");for(var s=null!==r[1]&&null!==t,l=St(r),c="void"!==r[0].name,u=[e,Yr,n,o,Nr,r[0],r[1]],d=0;d<i-2;++d)u.push(r[d+2]);if(!l)for(d=s?1:2;d<r.length;++d)null!==r[d].destructorFunction&&u.push(r[d].destructorFunction);let[f,p]=function(e,r,t,n){for(var o=St(e),a=e.length,i="",s="",l=0;l<a-2;++l)i+=(0!==l?", ":"")+"arg"+l,s+=(0!==l?", ":"")+"arg"+l+"Wired";var c=`\n return function (${i}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;o&&(c+="var destructors = [];\n");var u=o?"destructors":"null",d=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];for(r&&(c+="var thisWired = classParam['toWireType']("+u+", this);\n"),l=0;l<a-2;++l)c+="var arg"+l+"Wired = argType"+l+"['toWireType']("+u+", arg"+l+");\n",d.push("argType"+l);if(r&&(s="thisWired"+(s.length>0?", ":"")+s),c+=(t||n?"var rv = ":"")+"invoker(fn"+(s.length>0?", ":"")+s+");\n",o)c+="runDestructors(destructors);\n";else for(l=r?1:2;l<e.length;++l){var f=1===l?"thisWired":"arg"+(l-2)+"Wired";null!==e[l].destructorFunction&&(c+=f+"_dtor("+f+");\n",d.push(f+"_dtor"))}return t&&(c+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),c+="}\n",[d,c=`if (arguments.length !== ${d.length}){ throw new Error(humanName + "Expected ${d.length} closure arguments " + arguments.length + " given."); }\n${c}`]}(r,s,c,a);f.push(p);var m=function(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=ct(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}(Function,f).apply(null,u);return ct(e,m)}var At=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(Y(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e},Ct=(e,r,t)=>(e instanceof Object||Yr(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||Yr(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Yr(`cannot call emscripten binding method ${t} on deleted object`),pt(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)),Ft=new class{constructor(){this.allocated=[void 0],this.freelist=[]}get(e){return Y(void 0!==this.allocated[e],`invalid handle: ${e}`),this.allocated[e]}has(e){return void 0!==this.allocated[e]}allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r}free(e){Y(void 0!==this.allocated[e]),this.allocated[e]=void 0,this.freelist.push(e)}},Dt=e=>{e>=Ft.reserved&&0==--Ft.get(e).refcount&&Ft.free(e)},Ot={toValue:e=>(e||Yr("Cannot use deleted val. handle = "+e),Ft.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Ft.allocate({refcount:1,value:e})}}},Mt={name:"emscripten::val",fromWireType:e=>{var r=Ot.toValue(e);return Dt(e),r},toWireType:(e,r)=>Ot.toHandle(r),argPackAdvance:8,readValueFromPointer:Rr,destructorFunction:null},$t=(e,r,l)=>{switch(r){case 1:return l?function(e){return this.fromWireType(t()[e>>0])}:function(e){return this.fromWireType(n()[e>>0])};case 2:return l?function(e){return this.fromWireType(o()[e>>1])}:function(e){return this.fromWireType(a()[e>>1])};case 4:return l?function(e){return this.fromWireType(i()[e>>2])}:function(e){return this.fromWireType(s()[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},It=(e,r)=>{var t=Ur[e];return void 0===t&&Yr(r+" has unknown type "+bt(e)),t},Nt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Rt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(($.buffer!=L.buffer&&q(),H)[e>>2])};case 8:return function(e){return this.fromWireType(l()[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},xt=(e,r,l)=>{switch(r){case 1:return l?e=>t()[e>>0]:e=>n()[e>>0];case 2:return l?e=>o()[e>>1]:e=>a()[e>>1];case 4:return l?e=>i()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Lt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Wt=(e,r)=>{Y(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var t=e,i=t>>1,s=i+r/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-e>32&&Lt)return Lt.decode(n().slice(e,t));for(var l="",c=0;!(c>=r/2);++c){var u=o()[e+2*c>>1];if(0==u)break;l+=String.fromCharCode(u)}return l},jt=(e,r,t)=>{if(Y(r%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),Y("number"==typeof t,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),t??=2147483647,t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i<a;++i){var s=e.charCodeAt(i);o()[r>>1]=s,Ce(s),r+=2}return o()[r>>1]=0,Ce(0),r-n},Ut=e=>2*e.length,Bt=(e,r)=>{Y(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var t=0,n="";!(t>=r/4);){var o=i()[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},zt=(e,r,t)=>{if(Y(r%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),Y("number"==typeof t,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),i()[r>>2]=s,Fe(s),(r+=4)+4>o)break}return i()[r>>2]=0,Fe(0),r-n},Ht=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Gt=e=>{if("function"==typeof Atomics.waitAsync){var r=Atomics.waitAsync(i(),e>>2,e);Y(r.async),r.value.then(Vt);var t=e+128;Atomics.store(i(),t>>2,1)}};d.__emscripten_thread_mailbox_await=Gt;var Vt=()=>{var e=En();e&&(Gt(e),(e=>{if(V)R("user callback triggered after runtime exited or application aborted. Ignoring.");else try{e(),(()=>{if(!Re())try{b?On(x):Ue(x)}catch(e){ze(e)}})()}catch(e){ze(e)}})(Mn))};d.checkMailbox=Vt;var Yt=[],qt=e=>e%4==0&&(e%100!=0||e%400==0),Kt=[0,31,60,91,121,152,182,213,244,274,305,335],Jt=[0,31,59,90,120,151,181,212,243,273,304,334];function Xt(e,r,t,n,o,a,l,c){if(b)return We(10,1,e,r,t,n,o,a,l,c);var u=Le(o,a);try{if(isNaN(u))return 61;var d=Sr.getStreamFromFD(n),f=kr.mmap(d,e,u,r,t),p=f.ptr;return i()[l>>2]=f.allocated,Fe(f.allocated),s()[c>>2]=p,0}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Zt(e,r,t,n,o,a,i){if(b)return We(11,1,e,r,t,n,o,a,i);var s=Le(a,i);try{if(isNaN(s))return 61;var l=Sr.getStreamFromFD(o);2&t&&Sr.doMsync(e,l,r,n,s),kr.munmap(l)}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return-e.errno}}var Qt,en=e=>{var r=Ve(e)+1,t=wn(r);return t&&qe(e,t,r),t};Qt=()=>performance.timeOrigin+performance.now();var rn=e=>{var r=$.buffer,t=(e-r.byteLength+65535)/65536;try{return $.grow(t),q(),1}catch(t){R(`growMemory: Attempted to grow heap from ${r.byteLength} bytes to ${e} bytes, but got error: ${t}`)}},tn={},nn=()=>{if(!nn.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:p||"./this.program"};for(var r in tn)void 0===tn[r]?delete e[r]:e[r]=tn[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);nn.strings=t}return nn.strings},on=function(e,r){if(b)return We(12,1,e,r);var n=0;return nn().forEach(((o,a)=>{var i=r+n;s()[e+4*a>>2]=i,Fe(i),((e,r)=>{for(var n=0;n<e.length;++n)Y(e.charCodeAt(n)===(255&e.charCodeAt(n))),t()[r++>>0]=e.charCodeAt(n),Ae(e.charCodeAt(n));t()[r>>0]=0,Ae(0)})(o,i),n+=o.length+1})),0},an=function(e,r){if(b)return We(13,1,e,r);var t=nn();s()[e>>2]=t.length,Fe(t.length);var n=0;return t.forEach((e=>n+=e.length+1)),s()[r>>2]=n,Fe(n),0};function sn(e){if(b)return We(14,1,e);try{var r=Sr.getStreamFromFD(e);return kr.close(r),0}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return e.errno}}function ln(e,r,n,o){if(b)return We(15,1,e,r,n,o);try{var a=((e,r,n,o)=>{for(var a=0,i=0;i<n;i++){var l=s()[r>>2],c=s()[r+4>>2];r+=8;var u=kr.read(e,t(),l,c,o);if(u<0)return-1;if(a+=u,u<c)break;void 0!==o&&(o+=u)}return a})(Sr.getStreamFromFD(e),r,n);return s()[o>>2]=a,Fe(a),0}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return e.errno}}function cn(e,r,t,n,o){if(b)return We(16,1,e,r,t,n,o);var a=Le(r,t);try{if(isNaN(a))return 61;var s=Sr.getStreamFromFD(e);return kr.llseek(s,a,n),me=[s.position>>>0,(pe=s.position,+Math.abs(pe)>=1?pe>0?+Math.floor(pe/4294967296)>>>0:~~+Math.ceil((pe-+(~~pe>>>0))/4294967296)>>>0:0)],i()[o>>2]=me[0],i()[o+4>>2]=me[1],De(s.position),s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return e.errno}}function un(e,r,n,o){if(b)return We(17,1,e,r,n,o);try{var a=((e,r,n,o)=>{for(var a=0,i=0;i<n;i++){var l=s()[r>>2],c=s()[r+4>>2];r+=8;var u=kr.write(e,t(),l,c,o);if(u<0)return-1;a+=u,void 0!==o&&(o+=u)}return a})(Sr.getStreamFromFD(e),r,n);return s()[o>>2]=a,Fe(a),0}catch(e){if(void 0===kr||"ErrnoError"!==e.name)throw e;return e.errno}}var dn=[31,29,31,30,31,30,31,31,30,31,30,31],fn=[31,28,31,30,31,30,31,31,30,31,30,31];He.init();var pn,mn,hn=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=kr.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(hn.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return kr.isDir(this.mode)}},isDevice:{get:function(){return kr.isChrdev(this.mode)}}}),kr.FSNode=hn,kr.createPreloadedFile=(e,r,t,n,o,a,i,s,l,c)=>{var u=r?pr.resolve(dr.join2(e,r)):e,d=le(`cp ${u}`);function f(t){function f(t){c?.(),s||((e,r,t,n,o,a)=>{kr.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,l),a?.(),ue(d)}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return _r.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,u,f,(()=>{i?.(),ue(d)}))||f(t)}ce(d),"string"==typeof t?((e,r,t,n)=>{var o=le(`al ${e}`);w(e,(t=>{Y(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&ue(o)}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&ce(o)})(t,f,i):f(t)},kr.staticInit(),d.FS_createPath=kr.createPath,d.FS_createDataFile=kr.createDataFile,d.FS_createPreloadedFile=kr.createPreloadedFile,d.FS_unlink=kr.unlink,d.FS_createLazyFile=kr.createLazyFile,d.FS_createDevice=kr.createDevice,xr=d.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Lr=e})(),Wr=d.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(lt.prototype,{isAliasOf(e){if(!(this instanceof lt))return!1;if(!(e instanceof lt))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||Jr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=st(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Yr("Object already scheduled for deletion"),Zr(this),Qr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Jr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Yr("Object already scheduled for deletion"),tt.push(this),1===tt.length&&Kr&&Kr(nt),this.$$.deleteScheduled=!0,this}}),d.getInheritedInstanceCount=()=>Object.keys(ot).length,d.getLiveInheritedInstances=()=>{var e=[];for(var r in ot)ot.hasOwnProperty(r)&&e.push(ot[r]);return e},d.flushPendingDeletes=nt,d.setDelayFunction=e=>{Kr=e,tt.length&&Kr&&Kr(nt)},Object.assign(yt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},argPackAdvance:8,readValueFromPointer:gt,fromWireType:it}),_t=d.UnboundTypeError=(pn=Error,(mn=ct("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(pn.prototype),mn.prototype.constructor=mn,mn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},mn),Ft.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Object.assign(Ft,{reserved:Ft.allocated.length}),d.count_emval_handles=()=>{for(var e=0,r=Ft.reserved;r<Ft.allocated.length;++r)void 0!==Ft.allocated[r]&&++e;return e};var vn,gn=[je,Ze,Pr,Ar,Cr,Fr,Dr,Or,Mr,$r,Xt,Zt,on,an,sn,ln,cn,un],yn={__assert_fail:(e,r,t,n)=>{de(`Assertion failed: ${Xe(e)}, at: `+[r?Xe(r):"unknown filename",t,n?Xe(n):"unknown function"])},__cxa_begin_catch:e=>{var r=new cr(e);return r.get_caught()||(r.set_caught(!0),sr--),r.set_rethrown(!1),ir.push(r),Bn(r.excPtr),r.get_exception_ptr()},__cxa_end_catch:()=>{$n(0,0),Y(ir.length>0);var e=ir.pop();Un(e.excPtr),lr=0},__cxa_find_matching_catch_2:()=>ur([]),__cxa_find_matching_catch_3:e=>ur([e]),__cxa_rethrow:()=>{var e=ir.pop();e||de("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(ir.push(e),e.set_rethrown(!0),e.set_caught(!1),sr++),lr=new _e(r)},__cxa_throw:(e,r,t)=>{throw new cr(e).init(r,t),lr=new _e(e),sr++,lr},__cxa_uncaught_exceptions:()=>sr,__emscripten_init_main_thread_js:e=>{Pn(e,!v,1,!h,2097152,!1),He.threadInitTLS()},__emscripten_thread_cleanup:e=>{b?postMessage({cmd:"cleanupThread",thread:e}):Ie(e)},__handle_stack_overflow:e=>{var r=An(),t=Cn();de(`stack overflow (Attempt to set SP to ${Be(e)}, with stack limits [${Be(t)} - ${Be(r)}]). If you require more stack space build with -sSTACK_SIZE=<bytes>`)},__resumeException:e=>{throw lr||(lr=new _e(e)),lr},__syscall_fcntl64:Pr,__syscall_fstat64:Ar,__syscall_ioctl:Cr,__syscall_lstat64:Fr,__syscall_newfstatat:Dr,__syscall_openat:Or,__syscall_stat64:Mr,__syscall_unlinkat:$r,_embind_finalize_value_array:e=>{var r=Ir[e];delete Ir[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;Hr([e],o,(function(e){return t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],l=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];l(c,e,s.toWireType(t,r)),Nr(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),l=0;l<n;++l)t[l].write(s,o[l]);return null!==e&&e.push(i,s),s},argPackAdvance:8,readValueFromPointer:Rr,destructorFunction:i}]}))},_embind_finalize_value_object:e=>{var r=Gr[e];delete Gr[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));Hr([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,l=r.getterContext,c=e[t+o.length],u=r.setter,d=r.setterContext;a[n]={read:e=>i.fromWireType(s(l,e)),write:(e,r)=>{var t=[];u(d,e,c.toWireType(t,r)),Nr(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:Rr,destructorFunction:n}]}))},_embind_register_bigint:(e,r,t,n,o)=>{},_embind_register_bool:(e,r,t,o)=>{qr(e,{name:r=Vr(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:o},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(n()[e])},destructorFunction:null})},_embind_register_class:(e,r,t,n,o,a,i,s,l,c,u,d,f)=>{u=Vr(u),a=Et(o,a),s&&=Et(i,s),c&&=Et(l,c),f=Et(d,f);var p=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(u);dt(p,(function(){Tt(`Cannot construct ${u} due to unbound types`,[n])})),Hr([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:lt.prototype;var i=ct(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new Wr("Use 'new' to construct "+u);if(void 0===d.constructor_body)throw new Wr(u+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Wr(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var d=new ft(u,i,l,f,t,a,s,c);d.baseClass&&(d.baseClass.__derivedClasses??=[],d.baseClass.__derivedClasses.push(d));var m=new yt(u,d,!0,!1,!1),h=new yt(u+"*",d,!1,!1,!1),v=new yt(u+" const*",d,!1,!0,!1);return rt[e]={pointerType:h,constPointerType:v},wt(p,i),[m,h,v]}))},_embind_register_class_constructor:(e,r,t,n,o,a)=>{Y(r>0);var i=kt(r,t);o=Et(n,o),Hr([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Wr(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{Tt(`Cannot construct ${e.name} due to unbound types`,i)},Hr([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Pt(t,n,null,o,a),[]))),[]}))},_embind_register_class_function:(e,r,t,n,o,a,i,s,l)=>{var c=kt(t,n);r=Vr(r),r=At(r),a=Et(o,a),Hr([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){Tt(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,d=u[r];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(ut(u,r,n),u[r].overloadTable[t-2]=o),Hr([],c,(function(o){var s=Pt(n,o,e,a,i,l);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))},_embind_register_class_property:(e,r,t,n,o,a,i,s,l,c)=>{r=Vr(r),o=Et(n,o),Hr([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`,u={get(){Tt(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return u.set=l?()=>Tt(`Cannot access ${n} due to unbound types`,[t,i]):e=>Yr(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,u),Hr([],l?[t,i]:[t],(function(t){var i=t[0],u={get(){var r=Ct(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(l){l=Et(s,l);var d=t[1];u.set=function(r){var t=Ct(this,e,n+" setter"),o=[];l(c,t,d.toWireType(o,r)),Nr(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,u),[]})),[]}))},_embind_register_emval:e=>qr(e,Mt),_embind_register_enum:(e,r,t,n)=>{function o(){}r=Vr(r),o.values={},qr(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:8,readValueFromPointer:$t(r,t,n),destructorFunction:null}),dt(r,o)},_embind_register_enum_value:(e,r,t)=>{var n=It(e,"enum");r=Vr(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:ct(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},_embind_register_float:(e,r,t)=>{qr(e,{name:r=Vr(r),fromWireType:e=>e,toWireType:(e,r)=>{if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError(`Cannot convert ${Nt(r)} to ${this.name}`);return r},argPackAdvance:8,readValueFromPointer:Rt(r,t),destructorFunction:null})},_embind_register_function:(e,r,t,n,o,a,i)=>{var s=kt(r,t);e=Vr(e),e=At(e),o=Et(n,o),dt(e,(function(){Tt(`Cannot call ${e} due to unbound types`,s)}),r-1),Hr([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return wt(e,Pt(e,n,null,o,a,i),r-1),[]}))},_embind_register_integer:(e,r,t,n,o)=>{r=Vr(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned"),l=(e,t)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert "${Nt(e)}" to ${t}`);if(e<n||e>o)throw new TypeError(`Passing a number "${Nt(e)}" from JS side to C/C++ side to an argument of type "${r}", which is outside the valid range [${n}, ${o}]!`)};qr(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return l(r,this.name),r>>>0}:function(e,r){return l(r,this.name),r},argPackAdvance:8,readValueFromPointer:xt(r,t,0!==n),destructorFunction:null})},_embind_register_memory_view:(e,r,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=s()[e>>2],n=s()[e+4>>2];return new o(t().buffer,n,r)}qr(e,{name:n=Vr(n),fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:(e,r)=>{var t="std::string"===(r=Vr(r));qr(e,{name:r,fromWireType(e){var r,o=s()[e>>2],a=e+4;if(t)for(var i=a,l=0;l<=o;++l){var c=a+l;if(l==o||0==n()[c]){var u=Xe(i,c-i);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),i=c+1}}else{var d=new Array(o);for(l=0;l<o;++l)d[l]=String.fromCharCode(n()[a+l]);r=d.join("")}return bn(e),r},toWireType(e,r){var o;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Yr("Cannot pass non-string to std::string"),o=t&&a?Ve(r):r.length;var i=wn(4+o+1),l=i+4;if(s()[i>>2]=o,Fe(o),t&&a)qe(r,l,o+1);else if(a)for(var c=0;c<o;++c){var u=r.charCodeAt(c);u>255&&(bn(l),Yr("String has UTF-16 code units that do not fit in 8 bits")),n()[l+c]=u}else for(c=0;c<o;++c)n()[l+c]=r[c];return null!==e&&e.push(bn,i),i},argPackAdvance:8,readValueFromPointer:gt,destructorFunction(e){bn(e)}})},_embind_register_std_wstring:(e,r,t)=>{var n,o,i,l,c;t=Vr(t),2===r?(n=Wt,o=jt,l=Ut,i=()=>a(),c=1):4===r&&(n=Bt,o=zt,l=Ht,i=()=>s(),c=2),qr(e,{name:t,fromWireType:e=>{for(var t,o=s()[e>>2],a=i(),l=e+4,u=0;u<=o;++u){var d=e+4+u*r;if(u==o||0==a[d>>c]){var f=n(l,d-l);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),l=d+r}}return bn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Yr(`Cannot pass non-string to C++ string type ${t}`);var a=l(n),i=wn(4+a+r);return s()[i>>2]=a>>c,Fe(a>>c),o(n,i+4,a+r),null!==e&&e.push(bn,i),i},argPackAdvance:8,readValueFromPointer:Rr,destructorFunction(e){bn(e)}})},_embind_register_value_array:(e,r,t,n,o,a)=>{Ir[e]={name:Vr(r),rawConstructor:Et(t,n),rawDestructor:Et(o,a),elements:[]}},_embind_register_value_array_element:(e,r,t,n,o,a,i,s,l)=>{Ir[e].elements.push({getterReturnType:r,getter:Et(t,n),getterContext:o,setterArgumentType:a,setter:Et(i,s),setterContext:l})},_embind_register_value_object:(e,r,t,n,o,a)=>{Gr[e]={name:Vr(r),rawConstructor:Et(t,n),rawDestructor:Et(o,a),fields:[]}},_embind_register_value_object_field:(e,r,t,n,o,a,i,s,l,c)=>{Gr[e].fields.push({fieldName:Vr(r),getterReturnType:t,getter:Et(n,o),getterContext:a,setterArgumentType:i,setter:Et(s,l),setterContext:c})},_embind_register_void:(e,r)=>{qr(e,{isVoid:!0,name:r=Vr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_notify_mailbox_postmessage:(e,r,t)=>{if(e==r)setTimeout(Vt);else if(b)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=He.pthreads[e];if(!n)return void R(`Cannot send message to thread with ID ${e}, unknown thread ID!`);n.postMessage({cmd:"checkMailbox"})}},_emscripten_receive_on_main_thread_js:(e,r,t,n)=>{Yt.length=t;for(var o=n>>3,a=0;a<t;a++)Yt[a]=l()[o+a];var i=gn[e];Y(i.length==t,"Call args mismatch in _emscripten_receive_on_main_thread_js"),He.currentProxiedOperationCallerThread=r;var s=i.apply(null,Yt);return He.currentProxiedOperationCallerThread=0,Y("bigint"!=typeof s),s},_emscripten_thread_mailbox_await:Gt,_emscripten_thread_set_strongref:e=>{g&&He.pthreads[e].ref()},_emval_decref:Dt,_emval_incref:e=>{e>4&&(Ft.get(e).refcount+=1)},_emval_take_value:(e,r)=>{var t=(e=It(e,"_emval_take_value")).readValueFromPointer(r);return Ot.toHandle(t)},_localtime_js:function(e,r,t){var n=Le(e,r),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),Fe(o.getSeconds()),i()[t+4>>2]=o.getMinutes(),Fe(o.getMinutes()),i()[t+8>>2]=o.getHours(),Fe(o.getHours()),i()[t+12>>2]=o.getDate(),Fe(o.getDate()),i()[t+16>>2]=o.getMonth(),Fe(o.getMonth()),i()[t+20>>2]=o.getFullYear()-1900,Fe(o.getFullYear()-1900),i()[t+24>>2]=o.getDay(),Fe(o.getDay());var a=0|(e=>(qt(e.getFullYear())?Kt:Jt)[e.getMonth()]+e.getDate()-1)(o);i()[t+28>>2]=a,Fe(a),i()[t+36>>2]=-60*o.getTimezoneOffset(),Fe(-60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),u=0|(l!=c&&o.getTimezoneOffset()==Math.min(c,l));i()[t+32>>2]=u,Fe(u)},_mmap_js:Xt,_munmap_js:Zt,_tzset_js:(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),l=o.getTimezoneOffset(),c=a.getTimezoneOffset(),u=Math.max(l,c);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}s()[e>>2]=60*u,Fe(60*u),i()[r>>2]=Number(l!=c),Fe(Number(l!=c));var f=d(o),p=d(a),m=en(f),h=en(p);c<l?(s()[t>>2]=m,Fe(m),s()[t+4>>2]=h,Fe(h)):(s()[t>>2]=h,Fe(h),s()[t+4>>2]=m,Fe(m))},abort:()=>{de("native code called abort()")},emscripten_check_blocking_allowed:()=>{g||v||ar("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},emscripten_date_now:()=>Date.now(),emscripten_exit_with_live_runtime:()=>{throw Ne+=1,"unwind"},emscripten_get_now:Qt,emscripten_resize_heap:e=>{var r=n().length;if((e>>>=0)<=r)return!1;var t=2147483648;if(e>t)return R(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(o=Math.max(e,i))+(65536-o%65536)%65536),l=Qt(),c=rn(s);if(Oe(`Heap resize call from ${r} to ${s} took ${Qt()-l} msecs. Success: ${!!c}`),c)return!0}return R(`Failed to grow the heap from ${r} bytes to ${s} bytes, not enough memory!`),!1},environ_get:on,environ_sizes_get:an,exit:Ue,fd_close:sn,fd_read:ln,fd_seek:cn,fd_write:un,invoke_dii:function(e,r,t){var n=xn();try{return tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_diii:function(e,r,t,n){var o=xn();try{return tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_fi:function(e,r){var t=xn();try{return tr(e)(r)}catch(e){if(Ln(t),!(e instanceof ye))throw e;$n(1,0)}},invoke_fii:function(e,r,t){var n=xn();try{return tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_fiii:function(e,r,t,n){var o=xn();try{return tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_i:function(e){var r=xn();try{return tr(e)()}catch(e){if(Ln(r),!(e instanceof ye))throw e;$n(1,0)}},invoke_idi:function(e,r,t){var n=xn();try{return tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_ii:function(e,r){var t=xn();try{return tr(e)(r)}catch(e){if(Ln(t),!(e instanceof ye))throw e;$n(1,0)}},invoke_iid:function(e,r,t){var n=xn();try{return tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_iii:function(e,r,t){var n=xn();try{return tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiid:function(e,r,t,n){var o=xn();try{return tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiii:function(e,r,t,n){var o=xn();try{return tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiii:function(e,r,t,n,o){var a=xn();try{return tr(e)(r,t,n,o)}catch(e){if(Ln(a),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiid:function(e,r,t,n,o,a){var i=xn();try{return tr(e)(r,t,n,o,a)}catch(e){if(Ln(i),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiii:function(e,r,t,n,o,a){var i=xn();try{return tr(e)(r,t,n,o,a)}catch(e){if(Ln(i),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiiii:function(e,r,t,n,o,a,i){var s=xn();try{return tr(e)(r,t,n,o,a,i)}catch(e){if(Ln(s),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiiiii:function(e,r,t,n,o,a,i,s){var l=xn();try{return tr(e)(r,t,n,o,a,i,s)}catch(e){if(Ln(l),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiiiiii:function(e,r,t,n,o,a,i,s,l){var c=xn();try{return tr(e)(r,t,n,o,a,i,s,l)}catch(e){if(Ln(c),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u){var d=xn();try{return tr(e)(r,t,n,o,a,i,s,l,c,u)}catch(e){if(Ln(d),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d){var f=xn();try{return tr(e)(r,t,n,o,a,i,s,l,c,u,d)}catch(e){if(Ln(f),!(e instanceof ye))throw e;$n(1,0)}},invoke_iiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d,f){var p=xn();try{return tr(e)(r,t,n,o,a,i,s,l,c,u,d,f)}catch(e){if(Ln(p),!(e instanceof ye))throw e;$n(1,0)}},invoke_jiiii:function(e,r,t,n,o){var a=xn();try{return Yn(e,r,t,n,o)}catch(e){if(Ln(a),!(e instanceof ye))throw e;$n(1,0)}},invoke_v:function(e){var r=xn();try{tr(e)()}catch(e){if(Ln(r),!(e instanceof ye))throw e;$n(1,0)}},invoke_vi:function(e,r){var t=xn();try{tr(e)(r)}catch(e){if(Ln(t),!(e instanceof ye))throw e;$n(1,0)}},invoke_vid:function(e,r,t){var n=xn();try{tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_vidddddd:function(e,r,t,n,o,a,i,s){var l=xn();try{tr(e)(r,t,n,o,a,i,s)}catch(e){if(Ln(l),!(e instanceof ye))throw e;$n(1,0)}},invoke_vidi:function(e,r,t,n){var o=xn();try{tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_vii:function(e,r,t){var n=xn();try{tr(e)(r,t)}catch(e){if(Ln(n),!(e instanceof ye))throw e;$n(1,0)}},invoke_viif:function(e,r,t,n){var o=xn();try{tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_viii:function(e,r,t,n){var o=xn();try{tr(e)(r,t,n)}catch(e){if(Ln(o),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiii:function(e,r,t,n,o){var a=xn();try{tr(e)(r,t,n,o)}catch(e){if(Ln(a),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiidi:function(e,r,t,n,o,a,i){var s=xn();try{tr(e)(r,t,n,o,a,i)}catch(e){if(Ln(s),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiif:function(e,r,t,n,o,a){var i=xn();try{tr(e)(r,t,n,o,a)}catch(e){if(Ln(i),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiii:function(e,r,t,n,o,a){var i=xn();try{tr(e)(r,t,n,o,a)}catch(e){if(Ln(i),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiii:function(e,r,t,n,o,a,i){var s=xn();try{tr(e)(r,t,n,o,a,i)}catch(e){if(Ln(s),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiiii:function(e,r,t,n,o,a,i,s){var l=xn();try{tr(e)(r,t,n,o,a,i,s)}catch(e){if(Ln(l),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiiiii:function(e,r,t,n,o,a,i,s,l){var c=xn();try{tr(e)(r,t,n,o,a,i,s,l)}catch(e){if(Ln(c),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiiiiii:function(e,r,t,n,o,a,i,s,l,c){var u=xn();try{tr(e)(r,t,n,o,a,i,s,l,c)}catch(e){if(Ln(u),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u){var d=xn();try{tr(e)(r,t,n,o,a,i,s,l,c,u)}catch(e){if(Ln(d),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d,f,p){var m=xn();try{tr(e)(r,t,n,o,a,i,s,l,c,u,d,f,p)}catch(e){if(Ln(m),!(e instanceof ye))throw e;$n(1,0)}},invoke_viiiiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,u,d,f,p,m,h){var v=xn();try{tr(e)(r,t,n,o,a,i,s,l,c,u,d,f,p,m,h)}catch(e){if(Ln(v),!(e instanceof ye))throw e;$n(1,0)}},llvm_eh_typeid_for:e=>e,memory:$||d.wasmMemory,strftime_l:(e,r,n,o,a)=>((e,r,n,o)=>{var a=s()[o+40>>2],l={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?Xe(a):""},c=Xe(n),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var d in u)c=c.replace(new RegExp(d,"g"),u[d]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function m(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function h(e,r){return m(e,r,"0")}function v(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function g(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function y(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=qt(t.getFullYear()),o=t.getMonth(),a=(n?dn:fn)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=g(t),a=g(n);return v(o,r)<=0?v(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var _={"%a":e=>f[e.tm_wday].substring(0,3),"%A":e=>f[e.tm_wday],"%b":e=>p[e.tm_mon].substring(0,3),"%B":e=>p[e.tm_mon],"%C":e=>h((e.tm_year+1900)/100|0,2),"%d":e=>h(e.tm_mday,2),"%e":e=>m(e.tm_mday,2," "),"%g":e=>y(e).toString().substring(2),"%G":y,"%H":e=>h(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),h(r,2)},"%j":e=>h(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(qt(e.tm_year+1900)?dn:fn,e.tm_mon-1),3),"%m":e=>h(e.tm_mon+1,2),"%M":e=>h(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>h(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return h(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&qt(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&qt(e.tm_year%400-1))&&r++}return h(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return h(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),_)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),_[d](l)));var w,E,b=hr(c=c.replace(/\0\0/g,"%"),!1);return b.length>r?0:(E=e,Y((w=b).length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),t().set(w,E),b.length-1)})(e,r,n,o)},_n=function(){var e={env:yn,wasi_snapshot_preview1:yn};function r(e,r){var t,n;return _n=e.exports,n=_n._emscripten_tls_init,He.tlsInitFunctions.push(n),Y(er=_n.__indirect_function_table,"table not found in wasm exports"),t=_n.__wasm_call_ctors,Q.unshift(t),I=r,ue("wasm-instantiate"),_n}ce("wasm-instantiate");var t,n,o,a,i=d;if(d.instantiateWasm)try{return d.instantiateWasm(e,r)}catch(e){R(`Module.instantiateWasm callback failed with error: ${e}`),u(e)}return(t=M,n=fe,o=e,a=function(e){Y(d===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,r(e.instance,e.module)},t||"function"!=typeof WebAssembly.instantiateStreaming||he(n)||ve(n)||g||"function"!=typeof fetch?Ee(n,o,a):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return R(`wasm streaming compile failed: ${e}`),R("falling back to ArrayBuffer instantiation"),Ee(n,o,a)}))))).catch(u),{}}(),wn=(ge("__wasm_call_ctors"),ge("__cxa_free_exception"),ge("malloc")),En=d._pthread_self=()=>(En=d._pthread_self=_n.pthread_self)(),bn=ge("free"),Tn=ge("fflush"),kn=(d.__emscripten_tls_init=ge("_emscripten_tls_init"),ge("emscripten_builtin_memalign")),Sn=ge("__getTypeName"),Pn=(d.__embind_initialize_bindings=ge("_embind_initialize_bindings"),d.__emscripten_thread_init=ge("_emscripten_thread_init")),An=(d.__emscripten_thread_crashed=ge("_emscripten_thread_crashed"),ge("emscripten_main_thread_process_queued_calls"),ge("emscripten_main_runtime_thread_id"),()=>(An=_n.emscripten_stack_get_base)()),Cn=()=>(Cn=_n.emscripten_stack_get_end)(),Fn=ge("_emscripten_run_on_main_thread_js"),Dn=ge("_emscripten_thread_free_data"),On=d.__emscripten_thread_exit=ge("_emscripten_thread_exit"),Mn=ge("_emscripten_check_mailbox"),$n=ge("setThrew"),In=ge("setTempRet0"),Nn=()=>(Nn=_n.emscripten_stack_init)(),Rn=(e,r)=>(Rn=_n.emscripten_stack_set_limits)(e,r),xn=ge("stackSave"),Ln=ge("stackRestore"),Wn=ge("stackAlloc"),jn=()=>(jn=_n.emscripten_stack_get_current)(),Un=ge("__cxa_decrement_exception_refcount"),Bn=ge("__cxa_increment_exception_refcount"),zn=(ge("__cxa_demangle"),ge("__get_exception_message")),Hn=ge("__cxa_can_catch"),Gn=ge("__cxa_is_pointer_type"),Vn=d.___set_stack_limits=ge("__set_stack_limits"),Yn=(d.dynCall_jii=ge("dynCall_jii"),d.dynCall_viij=ge("dynCall_viij"),d.dynCall_jiji=ge("dynCall_jiji"),d.dynCall_viijii=ge("dynCall_viijii"),d.dynCall_jiiii=ge("dynCall_jiiii"));function qn(){if(!(oe>0)){if(b||(Y(!b),Nn(),J()),b)return c(d),te(),void startWorker(d);!function(){if(Y(!b),d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)ne(d.preRun.shift());Ge(Z)}(),oe>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),e()}),1)):e(),X())}function e(){vn||(vn=!0,d.calledRun=!0,V||(te(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),Y(!d._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(X(),!b){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),ee.unshift(e);var e;Ge(ee)}}()))}}if(d.dynCall_iiiiij=ge("dynCall_iiiiij"),d.dynCall_iiiiijj=ge("dynCall_iiiiijj"),d.dynCall_iiiiiijj=ge("dynCall_iiiiiijj"),d.addRunDependency=ce,d.removeRunDependency=ue,d.FS_createPath=kr.createPath,d.FS_createLazyFile=kr.createLazyFile,d.FS_createDevice=kr.createDevice,d.wasmMemory=$,d.keepRuntimeAlive=Re,d.ExitStatus=Me,d.FS_createPreloadedFile=kr.createPreloadedFile,d.FS=kr,d.FS_createDataFile=kr.createDataFile,d.FS_unlink=kr.unlink,d.PThread=He,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","runtimeKeepalivePop","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSizeCallingThread","setCanvasElementSizeMainThread","setCanvasElementSize","getCanvasSizeCallingThread","getCanvasSizeMainThread","getCanvasElementSize","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","Browser_asyncPrepareDataCounter","setMainLoop","getSocketFromFD","getSocketAddress","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","emscripten_webgl_destroy_context_before_on_calling_thread","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","getFunctionArgsName","createJsInvokerSignature","registerInheritedInstance","unregisterInheritedInstance","getStringOrSymbol","emval_get_global","emval_returnValue","emval_lookupTypes","emval_addMethodCaller"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var r=`\`${e}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,t=e;t.startsWith("_")||(t="$"+e),r+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${t}')`,Te(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ar(r)}}),Se(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","FS_createFolder","FS_createLink","FS_readFile","out","err","callMain","abort","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","GROWABLE_HEAP_I8","GROWABLE_HEAP_U8","GROWABLE_HEAP_I16","GROWABLE_HEAP_U16","GROWABLE_HEAP_I32","GROWABLE_HEAP_U32","GROWABLE_HEAP_F32","GROWABLE_HEAP_F64","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","setStackLimits","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","jstoi_s","getExecutableName","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","callUserCallback","maybeExit","asyncLoad","alignMemory","mmapAlloc","HandleAllocator","wasmTable","noExitRuntime","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","jsStackTrace","stackTrace","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","wget","SYSCALLS","preloadPlugins","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","terminateWorker","killThread","cleanupThread","registerTLSInit","cancelThread","spawnThread","exitOnMainThread","proxyToMainThread","proxiedJSCallArgs","invokeEntryPoint","checkMailbox","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","getFunctionName","heap32VectorToArray","requireRegisteredType","usesDestructorStack","createJsInvoker","UnboundTypeError","PureVirtualError","GenericWireTypeSize","EmValType","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","integerReadValueFromPointer","enumReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","readPointer","runDestructors","newFunc","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","deletionQueue","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_handles","emval_symbols","init_emval","count_emval_handles","Emval","emval_methodCallers","reflectConstruct","IDBFS"].forEach(Se),ie=function e(){vn||qn(),vn||(ie=e)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();return qn(),r.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=createCCP4Module:"function"==typeof define&&define.amd&&define([],(()=>createCCP4Module));
|
|
1
|
+
var createCCP4Module=(()=>{var e="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(e||=__filename),function(r={}){function t(){return $.buffer!=L.buffer&&q(),L}function n(){return $.buffer!=L.buffer&&q(),W}function o(){return $.buffer!=L.buffer&&q(),j}function a(){return $.buffer!=L.buffer&&q(),U}function i(){return $.buffer!=L.buffer&&q(),B}function s(){return $.buffer!=L.buffer&&q(),z}function l(){return $.buffer!=L.buffer&&q(),G}var c,d,u=r;u.ready=new Promise(((e,r)=>{c=e,d=r})),["__emscripten_thread_init","__emscripten_thread_exit","__emscripten_thread_crashed","__emscripten_thread_mailbox_await","__emscripten_tls_init","_pthread_self","checkMailbox","__embind_initialize_bindings","establishStackSpace","invokeEntryPoint","PThread","getExceptionMessage","$incrementExceptionRefcount","$decrementExceptionRefcount","___indirect_function_table","___set_stack_limits","onRuntimeInitialized"].forEach((e=>{Object.getOwnPropertyDescriptor(u.ready,e)||Object.defineProperty(u.ready,e,{get:()=>ue("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>ue("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})}));var f=Object.assign({},u),m="./this.program",h=(e,r)=>{throw r},p="object"==typeof window,v="function"==typeof importScripts,g="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,y=!p&&!g&&!v;if(u.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var _,w,E,b=u.ENVIRONMENT_IS_PTHREAD||!1,T="";function k(e){return u.locateFile?u.locateFile(e,T):T+e}if(g){if("undefined"==typeof process||!process.release||"node"!==process.release.name)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var S=process.versions.node,P=S.split(".").slice(0,3);if((P=1e4*P[0]+100*P[1]+1*P[2].split("-")[0])<16e4)throw new Error("This emscripten-generated code requires node v16.0.0 (detected v"+S+")");var A=require("fs"),C=require("path");T=v?C.dirname(T)+"/":__dirname+"/",_=(e,r)=>(e=ve(e)?new URL(e):C.normalize(e),A.readFileSync(e,r?void 0:"utf8")),E=e=>{var r=_(e,!0);return r.buffer||(r=new Uint8Array(r)),V(r.buffer),r},w=(e,r,t,n=!0)=>{e=ve(e)?new URL(e):C.normalize(e),A.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!u.thisProgram&&process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),h=(e,r)=>{throw process.exitCode=e,r},global.Worker=require("worker_threads").Worker}else if(y){if("object"==typeof process&&"function"==typeof require||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(_=read),E=e=>{if("function"==typeof readbuffer)return new Uint8Array(readbuffer(e));let r=read(e,"binary");return V("object"==typeof r),r},w=(e,r,t)=>{setTimeout((()=>r(E(e))))},"undefined"==typeof clearTimeout&&(globalThis.clearTimeout=e=>{}),"undefined"==typeof setTimeout&&(globalThis.setTimeout=e=>"function"==typeof e?e():ue()),"undefined"!=typeof scriptArgs&&scriptArgs,"function"==typeof quit&&(h=(e,r)=>{throw setTimeout((()=>{if(!(r instanceof Ie)){let e=r;r&&"object"==typeof r&&r.stack&&(e=[r,r.stack]),R(`exiting due to exception: ${e}`)}quit(e)})),r}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!p&&!v)throw new Error("environment detection error");if(v?T=self.location.href:"undefined"!=typeof document&&document.currentScript&&(T=document.currentScript.src),e&&(T=e),T=T.startsWith("blob:")?"":T.substr(0,T.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");g||(_=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},v&&(E=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),w=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)})}g&&"undefined"==typeof performance&&(global.performance=require("perf_hooks").performance);var F=console.log.bind(console),D=console.error.bind(console);g&&(F=(...e)=>A.writeSync(1,e.join(" ")+"\n"),D=(...e)=>A.writeSync(2,e.join(" ")+"\n"));var O,M,$,I,N=u.print||F,R=u.printErr||D;Object.assign(u,f),f=null,O="fetchSettings",Object.getOwnPropertyDescriptor(u,O)&&ue(`\`Module.${O}\` was supplied but \`${O}\` not included in INCOMING_MODULE_JS_API`),u.arguments&&u.arguments,be("arguments","arguments_"),u.thisProgram&&(m=u.thisProgram),be("thisProgram","thisProgram"),u.quit&&(h=u.quit),be("quit","quit_"),V(void 0===u.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),V(void 0===u.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),V(void 0===u.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),V(void 0===u.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),V(void 0===u.read,"Module.read option was removed (modify read_ in JS)"),V(void 0===u.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),V(void 0===u.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),V(void 0===u.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),V(void 0===u.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),be("asm","wasmExports"),be("read","read_"),be("readAsync","readAsync"),be("readBinary","readBinary"),be("setWindowTitle","setWindowTitle"),V(p||v||g,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)"),V(!y,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable."),u.wasmBinary&&(M=u.wasmBinary),be("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&R("no native wasm support detected");var x,L,W,j,U,B,z,H,G,Y=!1;function V(e,r){e||ue("Assertion failed"+(r?": "+r:""))}function q(){var e=$.buffer;u.HEAP8=L=new Int8Array(e),u.HEAP16=j=new Int16Array(e),u.HEAPU8=W=new Uint8Array(e),u.HEAPU16=U=new Uint16Array(e),u.HEAP32=B=new Int32Array(e),u.HEAPU32=z=new Uint32Array(e),u.HEAPF32=H=new Float32Array(e),u.HEAPF64=G=new Float64Array(e)}V(!u.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),V("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support");var K=u.INITIAL_MEMORY||16777216;if(be("INITIAL_MEMORY","INITIAL_MEMORY"),V(K>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+K+"! (STACK_SIZE=5242880)"),b)$=u.wasmMemory;else if(u.wasmMemory)$=u.wasmMemory;else if(!(($=new WebAssembly.Memory({initial:K/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw R("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),g&&R("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");function J(){var e=Fn();V(!(3&e)),0==e&&(e+=4),s()[e>>2]=34821223,Oe(34821223),s()[e+4>>2]=2310721022,Oe(2310721022),s()[0]=1668509029,Oe(1668509029)}function X(){if(!Y){var e=Fn();0==e&&(e+=4);var r=s()[e>>2],t=s()[e+4>>2];34821223==r&&2310721022==t||ue(`Stack overflow! Stack cookie has been overwritten at ${He(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${He(t)} ${He(r)}`),1668509029!=s()[0]&&ue("Runtime error: The application has corrupted its heap memory area (address zero)!")}}q(),V((K=$.buffer.byteLength)%65536==0),function(){var e=new Int16Array(1),r=new Int8Array(e.buffer);if(e[0]=25459,115!==r[0]||99!==r[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var Z=[],Q=[],ee=[],re=!1;function te(){V(!re),re=!0,b||(X(),ir(),u.noFSInit||Pr.init.initialized||Pr.init(),Pr.ignorePermissions=!1,yr.init(),Ve(Q))}function ne(e){Z.unshift(e)}V(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),V(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),V(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),V(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var oe=0,ae=null,ie=null,se={};function le(e){for(var r=e;;){if(!se[e])return e;e=r+Math.random()}}function ce(e){oe++,u.monitorRunDependencies?.(oe),e?(V(!se[e]),se[e]=1,null===ae&&"undefined"!=typeof setInterval&&(ae=setInterval((()=>{if(Y)return clearInterval(ae),void(ae=null);var e=!1;for(var r in se)e||(e=!0,R("still waiting on run dependencies:")),R(`dependency: ${r}`);e&&R("(end of list)")}),1e4))):R("warning: run dependency added without ID")}function de(e){if(oe--,u.monitorRunDependencies?.(oe),e?(V(se[e]),delete se[e]):R("warning: run dependency removed without ID"),0==oe&&(null!==ae&&(clearInterval(ae),ae=null),ie)){var r=ie;ie=null,r()}}function ue(e){u.onAbort?.(e),R(e="Aborted("+e+")"),Y=!0,x=1;var r=new WebAssembly.RuntimeError(e);throw d(r),r}var fe,me,he,pe=e=>e.startsWith("data:application/octet-stream;base64,"),ve=e=>e.startsWith("file://");function ge(e){return(...r)=>{V(re,`native function \`${e}\` called before runtime initialization`);var t=wn[e];return V(t,`exported native function \`${e}\` not found`),t(...r)}}class ye extends Error{}class _e extends ye{constructor(e){super(e),this.excPtr=e;const r=rr(e);this.name=r[0],this.message=r[1]}}function we(e){if(e==fe&&M)return new Uint8Array(M);if(E)return E(e);throw"both async and sync fetching of the wasm failed"}function Ee(e,r,t){return function(e){if(!M&&(p||v)){if("function"==typeof fetch&&!ve(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw`failed to load wasm binary file at '${e}'`;return r.arrayBuffer()})).catch((()=>we(e)));if(w)return new Promise(((r,t)=>{w(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>we(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then(t,(e=>{R(`failed to asynchronously prepare wasm: ${e}`),ve(fe)&&R(`warning: Loading from a file URI (${fe}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),ue(e)}))}function be(e,r,t=!0){Object.getOwnPropertyDescriptor(u,e)||Object.defineProperty(u,e,{configurable:!0,get(){ue(`\`Module.${e}\` has been replaced by \`${r}\``+(t?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function Te(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function ke(e,r){"undefined"!=typeof globalThis&&Object.defineProperty(globalThis,e,{configurable:!0,get(){sr(`\`${e}\` is not longer defined by emscripten. ${r}`)}})}function Se(e){Object.getOwnPropertyDescriptor(u,e)||Object.defineProperty(u,e,{configurable:!0,get(){var r=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;Te(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),ue(r)}})}pe(fe="web_example.wasm")||(fe=k(fe)),ke("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ke("asm","Please use wasmExports instead");var Pe=2**64-1,Ae=1-2**63;function Ce(e,r,t,n){V(Number.isInteger(Number(e)),`attempt to write non-integer (${e}) into integer heap`),V(e<=n,`value (${e}) too large to write as ${r}-bit value`),V(e>=t,`value (${e}) too small to write as ${r}-bit value`)}var Fe=e=>Ce(e,8,-127,255),De=e=>Ce(e,16,-32767,65535),Oe=e=>Ce(e,32,-2147483647,4294967295),Me=e=>Ce(e,64,Ae,Pe);function $e(...e){g?A.writeSync(2,e.join(" ")+"\n"):console.warn(...e)}function Ie(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var Ne=e=>{e.terminate(),e.onmessage=r=>{var t=r.data.cmd;R(`received "${t}" command from terminated worker: ${e.workerID}`)}},Re=e=>{V(!b,"Internal Error! cleanupThread() can only ever be called from main application thread!"),V(e,"Internal Error! Null pthread_ptr in cleanupThread!");var r=Ye.pthreads[e];V(r),Ye.returnWorkerToPool(r)},xe=0,Le=()=>ar||xe>0,We=e=>{var r=Ln(),t=e();return Wn(r),t},je=(e,r)=>(V(e==e>>>0||e==(0|e)),V(r===(0|r)),r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN),Ue=(e,r,t,...n)=>We((()=>{for(var o=n.length,a=jn(8*o),i=a>>3,s=0;s<n.length;s++){var c=n[s];l()[i+s]=c}return Dn(e,r,o,a,t)}));function Be(e){if(b)return Ue(0,0,1,e);x=e,Le()||(Ye.terminateAllThreads(),u.onExit?.(e),Y=!0),h(e,new Ie(e))}var ze=(e,r)=>{if(x=e,function(){var e=N,r=R,t=!1;N=R=e=>{t=!0};try{kn(0),["stdout","stderr"].forEach((function(e){var r=Pr.analyzePath("/dev/"+e);if(r){var n=r.object.rdev,o=yr.ttys[n];o?.output?.length&&(t=!0)}}))}catch(e){}N=e,R=r,t&&sr("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),b)throw V(!r),er(e),"unwind";if(Le()&&!r){var t=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=${xe}) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;d(t),R(t)}Be(e)},He=e=>(V("number"==typeof e),"0x"+(e>>>=0).toString(16).padStart(8,"0")),Ge=e=>{if(e instanceof Ie||"unwind"==e)return x;X(),e instanceof WebAssembly.RuntimeError&&Un()<=0&&R("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 5242880)"),h(1,e)},Ye={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},nextWorkerID:1,debugInit(){var e=$e;$e=(...r)=>{return e((t=0,re&&void 0!==bn&&(t=bn()),"w:"+(u.workerID||0)+",t:"+He(t)+": "+r.join(" ")));var t}},init(){Ye.debugInit(),b?Ye.initWorker():Ye.initMainThread()},initMainThread(){ne((()=>{ce("loading-workers"),Ye.loadWasmModuleToAllWorkers((()=>de("loading-workers")))}))},initWorker(){ar=!1},setExitStatus:e=>x=e,terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of(V(!b,"Internal Error! terminateAllThreads() can only ever be called from main application thread!"),Ye.runningWorkers))Ne(e);for(var e of Ye.unusedWorkers)Ne(e);Ye.unusedWorkers=[],Ye.runningWorkers=[],Ye.pthreads=[]},returnWorkerToPool:e=>{var r=e.pthread_ptr;delete Ye.pthreads[r],Ye.unusedWorkers.push(e),Ye.runningWorkers.splice(Ye.runningWorkers.indexOf(e),1),e.pthread_ptr=0,On(r)},receiveObjectTransfer(e){},threadInitTLS(){Ye.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:r=>new Promise((t=>{r.onmessage=e=>{var n=e.data,o=n.cmd;if(n.targetThread&&n.targetThread!=bn()){var a=Ye.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):R(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?Kt():"spawnThread"===o?(e=>{V(!b,"Internal Error! spawnThread() can only ever be called from main application thread!"),V(e.pthread_ptr,"Internal error, no pthread ptr!");var r=Ye.getNewWorker();if(!r)return 6;V(!r.pthread_ptr,"Internal error!"),Ye.runningWorkers.push(r),Ye.pthreads[e.pthread_ptr]=r,r.pthread_ptr=e.pthread_ptr;var t={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};g&&r.unref(),r.postMessage(t,e.transferList)})(n):"cleanupThread"===o?Re(n.thread):"killThread"===o?(e=>{V(!b,"Internal Error! killThread() can only ever be called from main application thread!"),V(e,"Internal Error! Null pthread_ptr in killThread!");var r=Ye.pthreads[e];delete Ye.pthreads[e],Ne(r),On(e),Ye.runningWorkers.splice(Ye.runningWorkers.indexOf(r),1),r.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,V(!b,"Internal Error! cancelThread() can only ever be called from main application thread!"),V(i,"Internal Error! Null pthread_ptr in cancelThread!"),Ye.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(r.loaded=!0,t(r)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?r.postMessage(n):"callHandler"===o?u[n.handler](...n.args):o&&R(`worker sent an unknown command ${o}`)}},r.onerror=e=>{var t="worker sent an error!";throw r.pthread_ptr&&(t=`Pthread ${He(r.pthread_ptr)} sent an error!`),R(`${t} ${e.filename}:${e.lineno}: ${e.message}`),e},g&&(r.on("message",(e=>r.onmessage({data:e}))),r.on("error",(e=>r.onerror(e)))),V($ instanceof WebAssembly.Memory,"WebAssembly memory should have been loaded by now!"),V(I instanceof WebAssembly.Module,"WebAssembly Module should have been loaded by now!");var n=[];for(var o of["onExit","onAbort","print","printErr"])u.hasOwnProperty(o)&&n.push(o);r.workerID=Ye.nextWorkerID++,r.postMessage({cmd:"load",handlers:n,urlOrBlob:u.mainScriptUrlOrBlob||e,wasmMemory:$,wasmModule:I,workerID:r.workerID})})),loadWasmModuleToAllWorkers(e){e()},allocateUnusedWorker(){var e,r=k("web_example.worker.js");e=new Worker(r),Ye.unusedWorkers.push(e)},getNewWorker:()=>(0==Ye.unusedWorkers.length&&(g||R("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."),Ye.allocateUnusedWorker(),Ye.loadWasmModuleToWorker(Ye.unusedWorkers[0])),Ye.unusedWorkers.pop())};u.PThread=Ye;var Ve=e=>{for(;e.length>0;)e.shift()(u)},qe=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},Ke=(e,r,t,n)=>{if(V("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;s>1114111&&sr("Invalid Unicode code point "+He(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o},Je=(e,r,t)=>(V("number"==typeof t,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),Ke(e,n(),r,t)),Xe="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Ze=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&Xe)return Xe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(r,o):e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if(224==(240&i)?i=(15&i)<<12|s<<6|l:(240!=(248&i)&&sr("Invalid UTF-8 leading byte "+He(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(7&i)<<18|s<<12|l<<6|63&e[r++]),i<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Qe=(e,r)=>(V("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),e?Ze(n(),e,r):"");function er(e){if(b)return Ue(1,0,0,e);ze(e)}u.establishStackSpace=()=>{var e=bn(),r=s()[e+52>>2],t=r-s()[e+56>>2];V(0!=r),V(0!=t),V(r>t,"stackHigh must be higher then stackLow"),xn(r,t),ir(),Wn(r),J()};var rr=e=>(e=>We((()=>{var r=jn(4),t=jn(4);Hn(e,r,t);var n,o=s()[r>>2],a=s()[t>>2],i=Qe(o);return Tn(o),a&&(n=Qe(a),Tn(a)),[i,n]})))(e);u.getExceptionMessage=rr;var tr,nr=[],or=e=>{var r=nr[e];return r||(e>=nr.length&&(nr.length=e+1),nr[e]=r=tr.get(e)),V(tr.get(e)==r,"JavaScript-side Wasm function table mirror is out of date!"),r};u.invokeEntryPoint=(e,r)=>{var t=or(e)(r);X(),function(e){Le()?Ye.setExitStatus(e):Mn(e)}(t)};var ar=u.noExitRuntime||!0,ir=()=>{var e=Cn(),r=Fn();Vn(e,r)},sr=e=>{sr.shown||={},sr.shown[e]||(sr.shown[e]=1,g&&(e="warning: "+e),R(e))},lr=[],cr=0,dr=0;class ur{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?1:0,t()[this.ptr+12]=e,Fe(e)}get_caught(){return 0!=t()[this.ptr+12]}set_rethrown(e){e=e?1:0,t()[this.ptr+13]=e,Fe(e)}get_rethrown(){return 0!=t()[this.ptr+13]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){s()[this.ptr+16>>2]=e}get_adjusted_ptr(){return s()[this.ptr+16>>2]}get_exception_ptr(){if(Yn(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var fr=e=>{var r=dr?.excPtr;if(!r)return Nn(0),0;var t=new ur(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return Nn(0),r;for(var o in e){var a=e[o];if(0===a||a===n)break;var i=t.ptr+16;if(Gn(a,n,i))return Nn(a),r}return Nn(n),r},mr={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=mr.isAbs(e),t="/"===e.substr(-1);return(e=mr.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=mr.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=mr.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:(...e)=>mr.normalize(e.join("/")),join2:(e,r)=>mr.normalize(e+"/"+r)},hr=e=>(hr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);if(g)try{var e=require("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}ue("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),pr={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var o=n>=0?e[n]:Pr.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";r=o+"/"+r,t=mr.isAbs(o)}return(t?"/":"")+(r=mr.normalizeArray(r.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=pr.resolve(e).substr(1),r=pr.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},vr=[];function gr(e,r,t){var n=t>0?t:qe(e)+1,o=new Array(n),a=Ke(e,o,0,o.length);return r&&(o.length=a),o}var yr={ttys:[],init(){},shutdown(){},register(e,r){yr.ttys[e]={input:[],output:[],ops:r},Pr.registerDevice(e,yr.stream_ops)},stream_ops:{open(e){var r=yr.ttys[e.node.rdev];if(!r)throw new Pr.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Pr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Pr.ErrnoError(29)}if(void 0===s&&0===a)throw new Pr.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Pr.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new Pr.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!vr.length){var e=null;if(g){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=A.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;vr=gr(e,!0)}return vr.shift()})(),put_char(e,r){null===r||10===r?(N(Ze(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(N(Ze(e.output,0)),e.output=[])},ioctl_tcgets:e=>({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,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(R(Ze(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(R(Ze(e.output,0)),e.output=[])}}},_r=e=>{e=((e,r)=>(V(r,"alignment argument is required"),Math.ceil(e/r)*r))(e,65536);var r=Sn(65536,e);return r?((e,r)=>(n().fill(0,e,e+r),e))(r,e):0},wr={ops_table:null,mount:e=>wr.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Pr.isBlkdev(t)||Pr.isFIFO(t))throw new Pr.ErrnoError(63);wr.ops_table||={dir:{node:{getattr:wr.node_ops.getattr,setattr:wr.node_ops.setattr,lookup:wr.node_ops.lookup,mknod:wr.node_ops.mknod,rename:wr.node_ops.rename,unlink:wr.node_ops.unlink,rmdir:wr.node_ops.rmdir,readdir:wr.node_ops.readdir,symlink:wr.node_ops.symlink},stream:{llseek:wr.stream_ops.llseek}},file:{node:{getattr:wr.node_ops.getattr,setattr:wr.node_ops.setattr},stream:{llseek:wr.stream_ops.llseek,read:wr.stream_ops.read,write:wr.stream_ops.write,allocate:wr.stream_ops.allocate,mmap:wr.stream_ops.mmap,msync:wr.stream_ops.msync}},link:{node:{getattr:wr.node_ops.getattr,setattr:wr.node_ops.setattr,readlink:wr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:wr.node_ops.getattr,setattr:wr.node_ops.setattr},stream:Pr.chrdev_stream_ops}};var o=Pr.createNode(e,r,t,n);return Pr.isDir(o.mode)?(o.node_ops=wr.ops_table.dir.node,o.stream_ops=wr.ops_table.dir.stream,o.contents={}):Pr.isFile(o.mode)?(o.node_ops=wr.ops_table.file.node,o.stream_ops=wr.ops_table.file.stream,o.usedBytes=0,o.contents=null):Pr.isLink(o.mode)?(o.node_ops=wr.ops_table.link.node,o.stream_ops=wr.ops_table.link.stream):Pr.isChrdev(o.mode)&&(o.node_ops=wr.ops_table.chrdev.node,o.stream_ops=wr.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Pr.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Pr.isDir(e.mode)?r.size=4096:Pr.isFile(e.mode)?r.size=e.usedBytes:Pr.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&wr.resizeFileStorage(e,r.size)},lookup(e,r){throw Pr.genericErrors[44]},mknod:(e,r,t,n)=>wr.createNode(e,r,t,n),rename(e,r,t){if(Pr.isDir(e.mode)){var n;try{n=Pr.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Pr.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Pr.lookupNode(e,r);for(var n in t.contents)throw new Pr.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t of Object.keys(e.contents))r.push(t);return r},symlink(e,r,t){var n=wr.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Pr.isLink(e.mode))throw new Pr.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(V(i>=0),i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,n,o,a,i){if(V(!(r instanceof ArrayBuffer)),r.buffer===t().buffer&&(i=!1),!o)return 0;var s=e.node;if(s.timestamp=Date.now(),r.subarray&&(!s.contents||s.contents.subarray)){if(i)return V(0===a,"canOwn must imply no weird position inside the file"),s.contents=r.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=r.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(r.subarray(n,n+o),a),o}if(wr.expandFileStorage(s,a+o),s.contents.subarray&&r.subarray)s.contents.set(r.subarray(n,n+o),a);else for(var l=0;l<o;l++)s.contents[a+l]=r[n+l];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Pr.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Pr.ErrnoError(28);return n},allocate(e,r,t){wr.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,n,o,a){if(!Pr.isFile(e.node.mode))throw new Pr.ErrnoError(43);var i,s,l=e.node.contents;if(2&a||l.buffer!==t().buffer){if((n>0||n+r<l.length)&&(l=l.subarray?l.subarray(n,n+r):Array.prototype.slice.call(l,n,n+r)),s=!0,!(i=_r(r)))throw new Pr.ErrnoError(48);t().set(l,i)}else s=!1,i=l.byteOffset;return{ptr:i,allocated:s}},msync:(e,r,t,n,o)=>(wr.stream_ops.write(e,r,0,n,t,!1),0)}},Er=u.preloadPlugins||[],br=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Tr={dbs:{},indexedDB:()=>{if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"==typeof window&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),V(e,"IDBFS used, but indexedDB not supported"),e},DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:(...e)=>wr.mount(...e),syncfs:(e,r,t)=>{Tr.getLocalSet(e,((n,o)=>{if(n)return t(n);Tr.getRemoteSet(e,((e,n)=>{if(e)return t(e);var a=r?n:o,i=r?o:n;Tr.reconcile(a,i,t)}))}))},quit:()=>{Object.values(Tr.dbs).forEach((e=>e.close())),Tr.dbs={}},getDB:(e,r)=>{var t,n=Tr.dbs[e];if(n)return r(null,n);try{t=Tr.indexedDB().open(e,Tr.DB_VERSION)}catch(e){return r(e)}if(!t)return r("Unable to connect to IndexedDB");t.onupgradeneeded=e=>{var r,t=e.target.result,n=e.target.transaction;(r=t.objectStoreNames.contains(Tr.DB_STORE_NAME)?n.objectStore(Tr.DB_STORE_NAME):t.createObjectStore(Tr.DB_STORE_NAME)).indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},t.onsuccess=()=>{n=t.result,Tr.dbs[e]=n,r(null,n)},t.onerror=e=>{r(e.target.error),e.preventDefault()}},getLocalSet:(e,r)=>{var t={};function n(e){return"."!==e&&".."!==e}function o(e){return r=>mr.join2(e,r)}for(var a=Pr.readdir(e.mountpoint).filter(n).map(o(e.mountpoint));a.length;){var i,s=a.pop();try{i=Pr.stat(s)}catch(e){return r(e)}Pr.isDir(i.mode)&&a.push(...Pr.readdir(s).filter(n).map(o(s))),t[s]={timestamp:i.mtime}}return r(null,{type:"local",entries:t})},getRemoteSet:(e,r)=>{var t={};Tr.getDB(e.mountpoint,((e,n)=>{if(e)return r(e);try{var o=n.transaction([Tr.DB_STORE_NAME],"readonly");o.onerror=e=>{r(e.target.error),e.preventDefault()},o.objectStore(Tr.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=e=>{var o=e.target.result;if(!o)return r(null,{type:"remote",db:n,entries:t});t[o.primaryKey]={timestamp:o.key},o.continue()}}catch(e){return r(e)}}))},loadLocalEntry:(e,r)=>{var t,n;try{n=Pr.lookupPath(e).node,t=Pr.stat(e)}catch(e){return r(e)}return Pr.isDir(t.mode)?r(null,{timestamp:t.mtime,mode:t.mode}):Pr.isFile(t.mode)?(n.contents=wr.getFileDataAsTypedArray(n),r(null,{timestamp:t.mtime,mode:t.mode,contents:n.contents})):r(new Error("node type not supported"))},storeLocalEntry:(e,r,t)=>{try{if(Pr.isDir(r.mode))Pr.mkdirTree(e,r.mode);else{if(!Pr.isFile(r.mode))return t(new Error("node type not supported"));Pr.writeFile(e,r.contents,{canOwn:!0})}Pr.chmod(e,r.mode),Pr.utime(e,r.timestamp,r.timestamp)}catch(e){return t(e)}t(null)},removeLocalEntry:(e,r)=>{try{var t=Pr.stat(e);Pr.isDir(t.mode)?Pr.rmdir(e):Pr.isFile(t.mode)&&Pr.unlink(e)}catch(e){return r(e)}r(null)},loadRemoteEntry:(e,r,t)=>{var n=e.get(r);n.onsuccess=e=>t(null,e.target.result),n.onerror=e=>{t(e.target.error),e.preventDefault()}},storeRemoteEntry:(e,r,t,n)=>{try{var o=e.put(t,r)}catch(e){return void n(e)}o.onsuccess=e=>n(),o.onerror=e=>{n(e.target.error),e.preventDefault()}},removeRemoteEntry:(e,r,t)=>{var n=e.delete(r);n.onsuccess=e=>t(),n.onerror=e=>{t(e.target.error),e.preventDefault()}},reconcile:(e,r,t)=>{var n=0,o=[];Object.keys(e.entries).forEach((function(t){var a=e.entries[t],i=r.entries[t];i&&a.timestamp.getTime()==i.timestamp.getTime()||(o.push(t),n++)}));var a=[];if(Object.keys(r.entries).forEach((function(r){e.entries[r]||(a.push(r),n++)})),!n)return t(null);var i=!1,s=("remote"===e.type?e.db:r.db).transaction([Tr.DB_STORE_NAME],"readwrite"),l=s.objectStore(Tr.DB_STORE_NAME);function c(e){if(e&&!i)return i=!0,t(e)}s.onerror=s.onabort=e=>{c(e.target.error),e.preventDefault()},s.oncomplete=e=>{i||t(null)},o.sort().forEach((e=>{"local"===r.type?Tr.loadRemoteEntry(l,e,((r,t)=>{if(r)return c(r);Tr.storeLocalEntry(e,t,c)})):Tr.loadLocalEntry(e,((r,t)=>{if(r)return c(r);Tr.storeRemoteEntry(l,e,t,c)}))})),a.sort().reverse().forEach((e=>{"local"===r.type?Tr.removeLocalEntry(e,c):Tr.removeRemoteEntry(l,e,c)}))}},kr={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Sr={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Pr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class extends Error{constructor(e){for(var r in super(kr[e]),this.name="ErrnoError",this.errno=e,Sr)if(Sr[r]===e){this.code=r;break}}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}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{constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Pr.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146}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 Pr.isDir(this.mode)}get isDevice(){return Pr.isChrdev(this.mode)}},lookupPath(e,r={}){if(!(e=pr.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new Pr.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Pr.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=Pr.lookupNode(n,t[a]),o=mr.join2(o,t[a]),Pr.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;Pr.isLink(n.mode);){var l=Pr.readlink(o);if(o=pr.resolve(mr.dirname(o),l),n=Pr.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new Pr.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(Pr.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Pr.nameTable.length},hashAddNode(e){var r=Pr.hashName(e.parent.id,e.name);e.name_next=Pr.nameTable[r],Pr.nameTable[r]=e},hashRemoveNode(e){var r=Pr.hashName(e.parent.id,e.name);if(Pr.nameTable[r]===e)Pr.nameTable[r]=e.name_next;else for(var t=Pr.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Pr.mayLookup(e);if(t)throw new Pr.ErrnoError(t);for(var n=Pr.hashName(e.id,r),o=Pr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Pr.lookup(e,r)},createNode(e,r,t,n){V("object"==typeof e);var o=new Pr.FSNode(e,r,t,n);return Pr.hashAddNode(o),o},destroyNode(e){Pr.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Pr.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>Pr.isDir(e.mode)?Pr.nodePermissions(e,"x")||(e.node_ops.lookup?0:2):54,mayCreate(e,r){try{return Pr.lookupNode(e,r),20}catch(e){}return Pr.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Pr.lookupNode(e,r)}catch(e){return e.errno}var o=Pr.nodePermissions(e,"wx");if(o)return o;if(t){if(!Pr.isDir(n.mode))return 54;if(Pr.isRoot(n)||Pr.getPath(n)===Pr.cwd())return 10}else if(Pr.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Pr.isLink(e.mode)?32:Pr.isDir(e.mode)&&("r"!==Pr.flagsToPermissionString(r)||512&r)?31:Pr.nodePermissions(e,Pr.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Pr.MAX_OPEN_FDS;e++)if(!Pr.streams[e])return e;throw new Pr.ErrnoError(33)},getStreamChecked(e){var r=Pr.getStream(e);if(!r)throw new Pr.ErrnoError(8);return r},getStream:e=>Pr.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new Pr.FSStream,e),-1==r&&(r=Pr.nextfd()),e.fd=r,Pr.streams[r]=e,e),closeStream(e){Pr.streams[e]=null},dupStream(e,r=-1){var t=Pr.createStream(e,r);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(e){var r=Pr.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new Pr.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Pr.devices[e]={stream_ops:r}},getDevice:e=>Pr.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Pr.syncFSRequests++,Pr.syncFSRequests>1&&R(`warning: ${Pr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Pr.getMounts(Pr.root.mount),n=0;function o(e){return V(Pr.syncFSRequests>0),Pr.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){if("string"==typeof e)throw e;var n,o="/"===t,a=!t;if(o&&Pr.root)throw new Pr.ErrnoError(10);if(!o&&!a){var i=Pr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Pr.isMountpoint(n))throw new Pr.ErrnoError(10);if(!Pr.isDir(n.mode))throw new Pr.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Pr.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=Pr.lookupPath(e,{follow_mount:!1});if(!Pr.isMountpoint(r.node))throw new Pr.ErrnoError(28);var t=r.node,n=t.mounted,o=Pr.getMounts(n);Object.keys(Pr.nameTable).forEach((e=>{for(var r=Pr.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Pr.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);V(-1!==a),t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Pr.lookupPath(e,{parent:!0}).node,o=mr.basename(e);if(!o||"."===o||".."===o)throw new Pr.ErrnoError(28);var a=Pr.mayCreate(n,o);if(a)throw new Pr.ErrnoError(a);if(!n.node_ops.mknod)throw new Pr.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Pr.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Pr.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Pr.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,Pr.mknod(e,r,t)),symlink(e,r){if(!pr.resolve(e))throw new Pr.ErrnoError(44);var t=Pr.lookupPath(r,{parent:!0}).node;if(!t)throw new Pr.ErrnoError(44);var n=mr.basename(r),o=Pr.mayCreate(t,n);if(o)throw new Pr.ErrnoError(o);if(!t.node_ops.symlink)throw new Pr.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=mr.dirname(e),a=mr.dirname(r),i=mr.basename(e),s=mr.basename(r);if(t=Pr.lookupPath(e,{parent:!0}).node,n=Pr.lookupPath(r,{parent:!0}).node,!t||!n)throw new Pr.ErrnoError(44);if(t.mount!==n.mount)throw new Pr.ErrnoError(75);var l,c=Pr.lookupNode(t,i),d=pr.relative(e,a);if("."!==d.charAt(0))throw new Pr.ErrnoError(28);if("."!==(d=pr.relative(r,o)).charAt(0))throw new Pr.ErrnoError(55);try{l=Pr.lookupNode(n,s)}catch(e){}if(c!==l){var u=Pr.isDir(c.mode),f=Pr.mayDelete(t,i,u);if(f)throw new Pr.ErrnoError(f);if(f=l?Pr.mayDelete(n,s,u):Pr.mayCreate(n,s))throw new Pr.ErrnoError(f);if(!t.node_ops.rename)throw new Pr.ErrnoError(63);if(Pr.isMountpoint(c)||l&&Pr.isMountpoint(l))throw new Pr.ErrnoError(10);if(n!==t&&(f=Pr.nodePermissions(t,"w")))throw new Pr.ErrnoError(f);Pr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(e){throw e}finally{Pr.hashAddNode(c)}}},rmdir(e){var r=Pr.lookupPath(e,{parent:!0}).node,t=mr.basename(e),n=Pr.lookupNode(r,t),o=Pr.mayDelete(r,t,!0);if(o)throw new Pr.ErrnoError(o);if(!r.node_ops.rmdir)throw new Pr.ErrnoError(63);if(Pr.isMountpoint(n))throw new Pr.ErrnoError(10);r.node_ops.rmdir(r,t),Pr.destroyNode(n)},readdir(e){var r=Pr.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Pr.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Pr.lookupPath(e,{parent:!0}).node;if(!r)throw new Pr.ErrnoError(44);var t=mr.basename(e),n=Pr.lookupNode(r,t),o=Pr.mayDelete(r,t,!1);if(o)throw new Pr.ErrnoError(o);if(!r.node_ops.unlink)throw new Pr.ErrnoError(63);if(Pr.isMountpoint(n))throw new Pr.ErrnoError(10);r.node_ops.unlink(r,t),Pr.destroyNode(n)},readlink(e){var r=Pr.lookupPath(e).node;if(!r)throw new Pr.ErrnoError(44);if(!r.node_ops.readlink)throw new Pr.ErrnoError(28);return pr.resolve(Pr.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Pr.lookupPath(e,{follow:!r}).node;if(!t)throw new Pr.ErrnoError(44);if(!t.node_ops.getattr)throw new Pr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Pr.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Pr.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Pr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Pr.chmod(e,r,!0)},fchmod(e,r){var t=Pr.getStreamChecked(e);Pr.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Pr.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Pr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Pr.chown(e,r,t,!0)},fchown(e,r,t){var n=Pr.getStreamChecked(e);Pr.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Pr.ErrnoError(28);var t;if(!(t="string"==typeof e?Pr.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Pr.ErrnoError(63);if(Pr.isDir(t.mode))throw new Pr.ErrnoError(31);if(!Pr.isFile(t.mode))throw new Pr.ErrnoError(28);var n=Pr.nodePermissions(t,"w");if(n)throw new Pr.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Pr.getStreamChecked(e);if(!(2097155&t.flags))throw new Pr.ErrnoError(28);Pr.truncate(t.node,r)},utime(e,r,t){var n=Pr.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Pr.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=mr.normalize(e);try{n=Pr.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new Pr.ErrnoError(20)}else n=Pr.mknod(e,t,0),o=!0;if(!n)throw new Pr.ErrnoError(44);if(Pr.isChrdev(n.mode)&&(r&=-513),65536&r&&!Pr.isDir(n.mode))throw new Pr.ErrnoError(54);if(!o){var a=Pr.mayOpen(n,r);if(a)throw new Pr.ErrnoError(a)}512&r&&!o&&Pr.truncate(n,0),r&=-131713;var i=Pr.createStream({node:n,path:Pr.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!u.logReadFiles||1&r||(Pr.readFiles||(Pr.readFiles={}),e in Pr.readFiles||(Pr.readFiles[e]=1)),i},close(e){if(Pr.isClosed(e))throw new Pr.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Pr.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Pr.isClosed(e))throw new Pr.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Pr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Pr.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(V(t>=0),n<0||o<0)throw new Pr.ErrnoError(28);if(Pr.isClosed(e))throw new Pr.ErrnoError(8);if(1==(2097155&e.flags))throw new Pr.ErrnoError(8);if(Pr.isDir(e.node.mode))throw new Pr.ErrnoError(31);if(!e.stream_ops.read)throw new Pr.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Pr.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(V(t>=0),n<0||o<0)throw new Pr.ErrnoError(28);if(Pr.isClosed(e))throw new Pr.ErrnoError(8);if(!(2097155&e.flags))throw new Pr.ErrnoError(8);if(Pr.isDir(e.node.mode))throw new Pr.ErrnoError(31);if(!e.stream_ops.write)throw new Pr.ErrnoError(28);e.seekable&&1024&e.flags&&Pr.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Pr.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Pr.isClosed(e))throw new Pr.ErrnoError(8);if(r<0||t<=0)throw new Pr.ErrnoError(28);if(!(2097155&e.flags))throw new Pr.ErrnoError(8);if(!Pr.isFile(e.node.mode)&&!Pr.isDir(e.node.mode))throw new Pr.ErrnoError(43);if(!e.stream_ops.allocate)throw new Pr.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new Pr.ErrnoError(2);if(1==(2097155&e.flags))throw new Pr.ErrnoError(2);if(!e.stream_ops.mmap)throw new Pr.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>(V(t>=0),e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0),ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Pr.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Pr.open(e,r.flags),o=Pr.stat(e).size,a=new Uint8Array(o);return Pr.read(n,a,0,o,0),"utf8"===r.encoding?t=Ze(a,0):"binary"===r.encoding&&(t=a),Pr.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=Pr.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(qe(r)+1),a=Ke(r,o,0,o.length);Pr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Pr.write(n,r,0,r.byteLength,void 0,t.canOwn)}Pr.close(n)},cwd:()=>Pr.currentPath,chdir(e){var r=Pr.lookupPath(e,{follow:!0});if(null===r.node)throw new Pr.ErrnoError(44);if(!Pr.isDir(r.node.mode))throw new Pr.ErrnoError(54);var t=Pr.nodePermissions(r.node,"x");if(t)throw new Pr.ErrnoError(t);Pr.currentPath=r.path},createDefaultDirectories(){Pr.mkdir("/tmp"),Pr.mkdir("/home"),Pr.mkdir("/home/web_user")},createDefaultDevices(){Pr.mkdir("/dev"),Pr.registerDevice(Pr.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Pr.mkdev("/dev/null",Pr.makedev(1,3)),yr.register(Pr.makedev(5,0),yr.default_tty_ops),yr.register(Pr.makedev(6,0),yr.default_tty1_ops),Pr.mkdev("/dev/tty",Pr.makedev(5,0)),Pr.mkdev("/dev/tty1",Pr.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=hr(e).byteLength),e[--r]);Pr.createDevice("/dev","random",t),Pr.createDevice("/dev","urandom",t),Pr.mkdir("/dev/shm"),Pr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Pr.mkdir("/proc");var e=Pr.mkdir("/proc/self");Pr.mkdir("/proc/self/fd"),Pr.mount({mount(){var r=Pr.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Pr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){u.stdin?Pr.createDevice("/dev","stdin",u.stdin):Pr.symlink("/dev/tty","/dev/stdin"),u.stdout?Pr.createDevice("/dev","stdout",null,u.stdout):Pr.symlink("/dev/tty","/dev/stdout"),u.stderr?Pr.createDevice("/dev","stderr",null,u.stderr):Pr.symlink("/dev/tty1","/dev/stderr");var e=Pr.open("/dev/stdin",0),r=Pr.open("/dev/stdout",1),t=Pr.open("/dev/stderr",1);V(0===e.fd,`invalid handle for stdin (${e.fd})`),V(1===r.fd,`invalid handle for stdout (${r.fd})`),V(2===t.fd,`invalid handle for stderr (${t.fd})`)},staticInit(){[44].forEach((e=>{Pr.genericErrors[e]=new Pr.ErrnoError(e),Pr.genericErrors[e].stack="<generic error, no stack>"})),Pr.nameTable=new Array(4096),Pr.mount(wr,{},"/"),Pr.createDefaultDirectories(),Pr.createDefaultDevices(),Pr.createSpecialDirectories(),Pr.filesystems={MEMFS:wr,IDBFS:Tr}},init(e,r,t){V(!Pr.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Pr.init.initialized=!0,u.stdin=e||u.stdin,u.stdout=r||u.stdout,u.stderr=t||u.stderr,Pr.createStandardStreams()},quit(){Pr.init.initialized=!1,kn(0);for(var e=0;e<Pr.streams.length;e++){var r=Pr.streams[e];r&&Pr.close(r)}},findObject(e,r){var t=Pr.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=Pr.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Pr.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=mr.basename(e),n=Pr.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:Pr.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=mr.join2(e,a);try{Pr.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=mr.join2("string"==typeof e?e:Pr.getPath(e),r),i=br(n,o);return Pr.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:Pr.getPath(e),i=r?mr.join2(e,r):e);var s=br(n,o),l=Pr.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),d=0,u=t.length;d<u;++d)c[d]=t.charCodeAt(d);t=c}Pr.chmod(l,146|s);var f=Pr.open(l,577);Pr.write(f,t,0,t.length,0,a),Pr.close(f),Pr.chmod(l,s)}},createDevice(e,r,t,n){var o=mr.join2("string"==typeof e?e:Pr.getPath(e),r),a=br(!!t,!!n);Pr.createDevice.major||(Pr.createDevice.major=64);var i=Pr.makedev(Pr.createDevice.major++,0);return Pr.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new Pr.ErrnoError(29)}if(void 0===l&&0===i)throw new Pr.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new Pr.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),Pr.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("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.");if(!_)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=gr(_(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Pr.ErrnoError(29)}},createLazyFile(e,r,n,o,a){class i{constructor(){this.lengthKnown=!1,this.chunks=[]}get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var r,t=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=t);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,t-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):gr(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,N("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!v)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s={isDevice:!1,contents:new i}}else s={isDevice:!1,url:n};var l=Pr.createFile(e,r,s,o,a);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={};function d(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(V(i>=0),a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(l.stream_ops).forEach((e=>{var r=l.stream_ops[e];c[e]=(...e)=>(Pr.forceLoadFile(l),r(...e))})),c.read=(e,r,t,n,o)=>(Pr.forceLoadFile(l),d(e,r,t,n,o)),c.mmap=(e,r,n,o,a)=>{Pr.forceLoadFile(l);var i=_r(r);if(!i)throw new Pr.ErrnoError(48);return d(e,t(),i,r,n),{ptr:i,allocated:!0}},l.stream_ops=c,l},absolutePath(){ue("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){ue("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){ue("FS.createLink has been removed; use FS.symlink instead")},joinPath(){ue("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){ue("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){ue("FS.standardizePath has been removed; use PATH.normalize instead")}},Ar={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(mr.isAbs(r))return r;var n;if(n=-100===e?Pr.cwd():Ar.getStreamFromFD(e).path,0==r.length){if(!t)throw new Pr.ErrnoError(44);return n}return mr.join2(n,r)},doStat(e,r,t){var n=e(r);i()[t>>2]=n.dev,Oe(n.dev),i()[t+4>>2]=n.mode,Oe(n.mode),s()[t+8>>2]=n.nlink,Oe(n.nlink),i()[t+12>>2]=n.uid,Oe(n.uid),i()[t+16>>2]=n.gid,Oe(n.gid),i()[t+20>>2]=n.rdev,Oe(n.rdev),he=[n.size>>>0,(me=n.size,+Math.abs(me)>=1?me>0?+Math.floor(me/4294967296)>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=he[0],i()[t+28>>2]=he[1],Me(n.size),i()[t+32>>2]=4096,Oe(4096),i()[t+36>>2]=n.blocks,Oe(n.blocks);var o=n.atime.getTime(),a=n.mtime.getTime(),l=n.ctime.getTime();return he=[Math.floor(o/1e3)>>>0,(me=Math.floor(o/1e3),+Math.abs(me)>=1?me>0?+Math.floor(me/4294967296)>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=he[0],i()[t+44>>2]=he[1],Me(Math.floor(o/1e3)),s()[t+48>>2]=o%1e3*1e3,Oe(o%1e3*1e3),he=[Math.floor(a/1e3)>>>0,(me=Math.floor(a/1e3),+Math.abs(me)>=1?me>0?+Math.floor(me/4294967296)>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=he[0],i()[t+60>>2]=he[1],Me(Math.floor(a/1e3)),s()[t+64>>2]=a%1e3*1e3,Oe(a%1e3*1e3),he=[Math.floor(l/1e3)>>>0,(me=Math.floor(l/1e3),+Math.abs(me)>=1?me>0?+Math.floor(me/4294967296)>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=he[0],i()[t+76>>2]=he[1],Me(Math.floor(l/1e3)),s()[t+80>>2]=l%1e3*1e3,Oe(l%1e3*1e3),he=[n.ino>>>0,(me=n.ino,+Math.abs(me)>=1?me>0?+Math.floor(me/4294967296)>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=he[0],i()[t+92>>2]=he[1],Me(n.ino),0},doMsync(e,r,t,o,a){if(!Pr.isFile(r.node.mode))throw new Pr.ErrnoError(43);if(2&o)return 0;var i=n().slice(e,e+t);Pr.msync(r,i,a,t,o)},varargs:void 0,get(){V(null!=Ar.varargs);var e=i()[+Ar.varargs>>2];return Ar.varargs+=4,e},getp:()=>Ar.get(),getStr:e=>Qe(e),getStreamFromFD:e=>Pr.getStreamChecked(e)};function Cr(e,r,t){if(b)return Ue(2,0,1,e,r,t);Ar.varargs=t;try{var n=Ar.getStreamFromFD(e);switch(r){case 0:if((a=Ar.get())<0)return-28;for(;Pr.streams[a];)a++;return Pr.dupStream(n,a).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var a=Ar.get();return n.flags|=a,0;case 12:return a=Ar.getp(),o()[a+0>>1]=2,De(2),0}return-28}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Fr(e,r){if(b)return Ue(3,0,1,e,r);try{var t=Ar.getStreamFromFD(e);return Ar.doStat(Pr.stat,t.path,r)}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Dr(e,r,n){if(b)return Ue(4,0,1,e,r,n);Ar.varargs=n;try{var a=Ar.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),l=Ar.getp();i()[l>>2]=s.c_iflag||0,Oe(s.c_iflag||0),i()[l+4>>2]=s.c_oflag||0,Oe(s.c_oflag||0),i()[l+8>>2]=s.c_cflag||0,Oe(s.c_cflag||0),i()[l+12>>2]=s.c_lflag||0,Oe(s.c_lflag||0);for(var c=0;c<32;c++)t()[l+c+17]=s.c_cc[c]||0,Fe(s.c_cc[c]||0);return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){l=Ar.getp();var d=i()[l>>2],u=i()[l+4>>2],f=i()[l+8>>2],m=i()[l+12>>2],h=[];for(c=0;c<32;c++)h.push(t()[l+c+17]);return a.tty.ops.ioctl_tcsets(a.tty,r,{c_iflag:d,c_oflag:u,c_cflag:f,c_lflag:m,c_cc:h})}return 0;case 21519:return a.tty?(l=Ar.getp(),i()[l>>2]=0,Oe(0),0):-59;case 21520:return a.tty?-28:-59;case 21531:return l=Ar.getp(),Pr.ioctl(a,r,l);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var p=a.tty.ops.ioctl_tiocgwinsz(a.tty);l=Ar.getp(),o()[l>>1]=p[0],De(p[0]),o()[l+2>>1]=p[1],De(p[1])}return 0;default:return-28}}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Or(e,r){if(b)return Ue(5,0,1,e,r);try{return e=Ar.getStr(e),Ar.doStat(Pr.lstat,e,r)}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Mr(e,r,t,n){if(b)return Ue(6,0,1,e,r,t,n);try{r=Ar.getStr(r);var o=256&n,a=4096&n;return V(!(n&=-6401),`unknown flags in __syscall_newfstatat: ${n}`),r=Ar.calculateAt(e,r,a),Ar.doStat(o?Pr.lstat:Pr.stat,r,t)}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function $r(e,r,t,n){if(b)return Ue(7,0,1,e,r,t,n);Ar.varargs=n;try{r=Ar.getStr(r),r=Ar.calculateAt(e,r);var o=n?Ar.get():0;return Pr.open(r,t,o).fd}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ir(e,r){if(b)return Ue(8,0,1,e,r);try{return e=Ar.getStr(e),Ar.doStat(Pr.stat,e,r)}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function Nr(e,r,t){if(b)return Ue(9,0,1,e,r,t);try{return r=Ar.getStr(r),r=Ar.calculateAt(e,r),0===t?Pr.unlink(r):512===t?Pr.rmdir(r):ue("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}var Rr={},xr=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Lr(e){return this.fromWireType(s()[e>>2])}var Wr,jr,Ur,Br={},zr={},Hr={},Gr=e=>{throw new Wr(e)},Yr=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Gr("Mismatched type converter count");for(var o=0;o<e.length;++o)Jr(e[o],n[o])}e.forEach((function(e){Hr[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{zr.hasOwnProperty(e)?o[r]=zr[e]:(a.push(e),Br.hasOwnProperty(e)||(Br[e]=[]),Br[e].push((()=>{o[r]=zr[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},Vr={},qr=e=>{for(var r="",t=e;n()[t];)r+=jr[n()[t++]];return r},Kr=e=>{throw new Ur(e)};function Jr(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Kr(`type "${n}" must have a positive integer typeid pointer`),zr.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Kr(`Cannot register type '${n}' twice`)}if(zr[e]=r,delete Hr[e],Br.hasOwnProperty(e)){var o=Br[e];delete Br[e],o.forEach((e=>e()))}}(e,r,t)}var Xr,Zr=e=>{Kr(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qr=!1,et=e=>{},rt=e=>{e.count.value-=1,0===e.count.value&&(e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)})(e)},tt=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=tt(e,r,t.baseClass);return null===n?null:t.downcast(n)},nt={},ot=[],at=()=>{for(;ot.length;){var e=ot.pop();e.$$.deleteScheduled=!1,e.delete()}},it={},st=(e,r)=>(r.ptrType&&r.ptr||Gr("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&Gr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},ct(Object.create(e,{$$:{value:r,writable:!0}})));function lt(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=((e,r)=>(r=((e,r)=>{for(void 0===r&&Kr("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r})(e,r),it[r]))(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?st(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):st(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=nt[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=tt(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?st(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):st(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var ct=e=>"undefined"==typeof FinalizationRegistry?(ct=e=>e,e):(Qr=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),rt(e.$$)})),ct=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r},n=r.ptrType.registeredClass;t.leakWarning=new Error(`Embind found a leaked C++ instance ${n.name} <${He(r.ptr)}>.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated`),"captureStackTrace"in Error&&Error.captureStackTrace(t.leakWarning,lt),Qr.register(e,t,e)}return e},et=e=>Qr.unregister(e),ct(e));function dt(){}var ut=(e,r)=>Object.defineProperty(r,"name",{value:e}),ft=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(...n){return e[r].overloadTable.hasOwnProperty(n.length)||Kr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[n.length].apply(this,n)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},mt=(e,r,t)=>{u.hasOwnProperty(e)?((void 0===t||void 0!==u[e].overloadTable&&void 0!==u[e].overloadTable[t])&&Kr(`Cannot register public name '${e}' twice`),ft(u,e,e),u.hasOwnProperty(t)&&Kr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),u[e].overloadTable[t]=r):(u[e]=r,void 0!==t&&(u[e].numArguments=t))};function ht(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var pt=(e,r,t)=>{for(;r!==t;)r.upcast||Kr(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function vt(e,r){if(null===r)return this.isReference&&Kr(`null is not a valid ${this.name}`),0;r.$$||Kr(`Cannot pass "${Lt(r)}" as a ${this.name}`),r.$$.ptr||Kr(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return pt(r.$$.ptr,t,this.registeredClass)}function gt(e,r){var t;if(null===r)return this.isReference&&Kr(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r&&r.$$||Kr(`Cannot pass "${Lt(r)}" as a ${this.name}`),r.$$.ptr||Kr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Kr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=pt(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Kr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Kr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,$t.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Kr("Unsupporting sharing policy")}return t}function yt(e,r){if(null===r)return this.isReference&&Kr(`null is not a valid ${this.name}`),0;r.$$||Kr(`Cannot pass "${Lt(r)}" as a ${this.name}`),r.$$.ptr||Kr(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Kr(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return pt(r.$$.ptr,t,this.registeredClass)}function _t(e,r,t,n,o,a,i,s,l,c,d){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=c,this.rawDestructor=d,o||void 0!==r.baseClass?this.toWireType=gt:n?(this.toWireType=vt,this.destructorFunction=null):(this.toWireType=yt,this.destructorFunction=null)}var wt,Et=(e,r,t)=>{u.hasOwnProperty(e)||Gr("Replacing nonexistent public symbol"),void 0!==u[e].overloadTable&&void 0!==t?u[e].overloadTable[t]=r:(u[e]=r,u[e].argCount=t)},bt=(e,r)=>{var t,n,o=(e=qr(e)).includes("j")?(n=r,V((t=e).includes("j")||t.includes("p"),"getDynCaller should only be called with i64 sigs"),(...e)=>((e,r,t=[])=>e.includes("j")?((e,r,t)=>(V("dynCall_"+e in u,`bad function pointer type - dynCall function not found for sig '${e}'`),V(t?.length?t.length===e.substring(1).replace(/j/g,"--").length:1==e.length),(0,u["dynCall_"+e])(r,...t)))(e,r,t):(V(or(r),`missing table entry in dynCall: ${r}`),or(r)(...t)))(t,n,e)):or(r);return"function"!=typeof o&&Kr(`unknown function pointer with signature ${e}: ${r}`),o},Tt=e=>{var r=Pn(e),t=qr(r);return Tn(r),t},kt=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||zr[r]||(Hr[r]?Hr[r].forEach(e):(t.push(r),n[r]=!0))})),new wt(`${e}: `+t.map(Tt).join([", "]))},St=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(s()[r+4*n>>2]);return t};function Pt(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}function At(e,r,t,n,o,a){var i=r.length;i<2&&Kr("argTypes array size mismatch! Must at least get return value and 'this' types!"),V(!a,"Async bindings are only supported with JSPI.");for(var s=null!==r[1]&&null!==t,l=Pt(r),c="void"!==r[0].name,d=[e,Kr,n,o,xr,r[0],r[1]],u=0;u<i-2;++u)d.push(r[u+2]);if(!l)for(u=s?1:2;u<r.length;++u)null!==r[u].destructorFunction&&d.push(r[u].destructorFunction);let[f,m]=function(e,r,t,n){for(var o=Pt(e),a=e.length,i="",s="",l=0;l<a-2;++l)i+=(0!==l?", ":"")+"arg"+l,s+=(0!==l?", ":"")+"arg"+l+"Wired";var c=`\n return function (${i}) {\n if (arguments.length !== ${a-2}) {\n throwBindingError('function ' + humanName + ' called with ' + arguments.length + ' arguments, expected ${a-2}');\n }`;o&&(c+="var destructors = [];\n");var d=o?"destructors":"null",u=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];for(r&&(c+="var thisWired = classParam['toWireType']("+d+", this);\n"),l=0;l<a-2;++l)c+="var arg"+l+"Wired = argType"+l+"['toWireType']("+d+", arg"+l+");\n",u.push("argType"+l);if(r&&(s="thisWired"+(s.length>0?", ":"")+s),c+=(t||n?"var rv = ":"")+"invoker(fn"+(s.length>0?", ":"")+s+");\n",o)c+="runDestructors(destructors);\n";else for(l=r?1:2;l<e.length;++l){var f=1===l?"thisWired":"arg"+(l-2)+"Wired";null!==e[l].destructorFunction&&(c+=`${f}_dtor(${f});\n`,u.push(`${f}_dtor`))}return t&&(c+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),c+="}\n",[u,c=`if (arguments.length !== ${u.length}){ throw new Error(humanName + "Expected ${u.length} closure arguments " + arguments.length + " given."); }\n${c}`]}(r,s,c,a);f.push(m);var h=function(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=ut(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}(Function,f)(...d);return ut(e,h)}var Ct=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(V(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e},Ft=(e,r,t)=>(e instanceof Object||Kr(`${t} with invalid "this": ${e}`),e instanceof r.registeredClass.constructor||Kr(`${t} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||Kr(`cannot call emscripten binding method ${t} on deleted object`),pt(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)),Dt=[],Ot=[],Mt=e=>{e>9&&0==--Ot[e+1]&&(V(void 0!==Ot[e],"Decref for unallocated handle."),Ot[e]=void 0,Dt.push(e))},$t={toValue:e=>(e||Kr("Cannot use deleted val. handle = "+e),V(2===e||void 0!==Ot[e]&&e%2==0,`invalid handle: ${e}`),Ot[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=Dt.pop()||Ot.length;return Ot[r]=e,Ot[r+1]=1,r}}}},It={name:"emscripten::val",fromWireType:e=>{var r=$t.toValue(e);return Mt(e),r},toWireType:(e,r)=>$t.toHandle(r),argPackAdvance:8,readValueFromPointer:Lr,destructorFunction:null},Nt=e=>Jr(e,It),Rt=(e,r,l)=>{switch(r){case 1:return l?function(e){return this.fromWireType(t()[e])}:function(e){return this.fromWireType(n()[e])};case 2:return l?function(e){return this.fromWireType(o()[e>>1])}:function(e){return this.fromWireType(a()[e>>1])};case 4:return l?function(e){return this.fromWireType(i()[e>>2])}:function(e){return this.fromWireType(s()[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},xt=(e,r)=>{var t=zr[e];return void 0===t&&Kr(`${r} has unknown type ${Tt(e)}`),t},Lt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Wt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(($.buffer!=L.buffer&&q(),H)[e>>2])};case 8:return function(e){return this.fromWireType(l()[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},jt=(e,r,l)=>{switch(r){case 1:return l?e=>t()[e]:e=>n()[e];case 2:return l?e=>o()[e>>1]:e=>a()[e>>1];case 4:return l?e=>i()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Ut="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Bt=(e,r)=>{V(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var t=e,i=t>>1,s=i+r/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-e>32&&Ut)return Ut.decode(n().slice(e,t));for(var l="",c=0;!(c>=r/2);++c){var d=o()[e+2*c>>1];if(0==d)break;l+=String.fromCharCode(d)}return l},zt=(e,r,t)=>{if(V(r%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),V("number"==typeof t,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),t??=2147483647,t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i<a;++i){var s=e.charCodeAt(i);o()[r>>1]=s,De(s),r+=2}return o()[r>>1]=0,De(0),r-n},Ht=e=>2*e.length,Gt=(e,r)=>{V(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var t=0,n="";!(t>=r/4);){var o=i()[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Yt=(e,r,t)=>{if(V(r%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),V("number"==typeof t,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),i()[r>>2]=s,Oe(s),(r+=4)+4>o)break}return i()[r>>2]=0,Oe(0),r-n},Vt=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},qt=e=>{if("function"==typeof Atomics.waitAsync){var r=Atomics.waitAsync(i(),e>>2,e);V(r.async),r.value.then(Kt);var t=e+128;Atomics.store(i(),t>>2,1)}};u.__emscripten_thread_mailbox_await=qt;var Kt=()=>{var e=bn();e&&(qt(e),(e=>{if(Y)R("user callback triggered after runtime exited or application aborted. Ignoring.");else try{e(),(()=>{if(!Le())try{b?Mn(x):ze(x)}catch(e){Ge(e)}})()}catch(e){Ge(e)}})($n))};u.checkMailbox=Kt;var Jt,Xt=[],Zt=e=>e%4==0&&(e%100!=0||e%400==0),Qt=[0,31,60,91,121,152,182,213,244,274,305,335],en=[0,31,59,90,120,151,181,212,243,273,304,334];function rn(e,r,t,n,o,a,l,c){if(b)return Ue(10,0,1,e,r,t,n,o,a,l,c);var d=je(o,a);try{if(isNaN(d))return 61;var u=Ar.getStreamFromFD(n),f=Pr.mmap(u,e,d,r,t),m=f.ptr;return i()[l>>2]=f.allocated,Oe(f.allocated),s()[c>>2]=m,0}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}function tn(e,r,t,n,o,a,i){if(b)return Ue(11,0,1,e,r,t,n,o,a,i);var s=je(a,i);try{var l=Ar.getStreamFromFD(o);2&t&&Ar.doMsync(e,l,r,n,s)}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return-e.errno}}Jt=()=>performance.timeOrigin+performance.now();var nn=e=>{var r=$.buffer,t=(e-r.byteLength+65535)/65536;try{return $.grow(t),q(),1}catch(t){R(`growMemory: Attempted to grow heap from ${r.byteLength} bytes to ${e} bytes, but got error: ${t}`)}},on={},an=()=>{if(!an.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:m||"./this.program"};for(var r in on)void 0===on[r]?delete e[r]:e[r]=on[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);an.strings=t}return an.strings},sn=function(e,r){if(b)return Ue(12,0,1,e,r);var n=0;return an().forEach(((o,a)=>{var i=r+n;s()[e+4*a>>2]=i,Oe(i),((e,r)=>{for(var n=0;n<e.length;++n)V(e.charCodeAt(n)===(255&e.charCodeAt(n))),t()[r++]=e.charCodeAt(n),Fe(e.charCodeAt(n));t()[r]=0,Fe(0)})(o,i),n+=o.length+1})),0},ln=function(e,r){if(b)return Ue(13,0,1,e,r);var t=an();s()[e>>2]=t.length,Oe(t.length);var n=0;return t.forEach((e=>n+=e.length+1)),s()[r>>2]=n,Oe(n),0};function cn(e){if(b)return Ue(14,0,1,e);try{var r=Ar.getStreamFromFD(e);return Pr.close(r),0}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return e.errno}}function dn(e,r,n,o){if(b)return Ue(15,0,1,e,r,n,o);try{var a=((e,r,n,o)=>{for(var a=0,i=0;i<n;i++){var l=s()[r>>2],c=s()[r+4>>2];r+=8;var d=Pr.read(e,t(),l,c,o);if(d<0)return-1;if(a+=d,d<c)break;void 0!==o&&(o+=d)}return a})(Ar.getStreamFromFD(e),r,n);return s()[o>>2]=a,Oe(a),0}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return e.errno}}function un(e,r,t,n,o){if(b)return Ue(16,0,1,e,r,t,n,o);var a=je(r,t);try{if(isNaN(a))return 61;var s=Ar.getStreamFromFD(e);return Pr.llseek(s,a,n),he=[s.position>>>0,(me=s.position,+Math.abs(me)>=1?me>0?+Math.floor(me/4294967296)>>>0:~~+Math.ceil((me-+(~~me>>>0))/4294967296)>>>0:0)],i()[o>>2]=he[0],i()[o+4>>2]=he[1],Me(s.position),s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return e.errno}}function fn(e,r,n,o){if(b)return Ue(17,0,1,e,r,n,o);try{var a=((e,r,n,o)=>{for(var a=0,i=0;i<n;i++){var l=s()[r>>2],c=s()[r+4>>2];r+=8;var d=Pr.write(e,t(),l,c,o);if(d<0)return-1;a+=d,void 0!==o&&(o+=d)}return a})(Ar.getStreamFromFD(e),r,n);return s()[o>>2]=a,Oe(a),0}catch(e){if(void 0===Pr||"ErrnoError"!==e.name)throw e;return e.errno}}var mn,hn,pn=[31,29,31,30,31,30,31,31,30,31,30,31],vn=[31,28,31,30,31,30,31,31,30,31,30,31];Ye.init(),Pr.createPreloadedFile=(e,r,t,n,o,a,i,s,l,c)=>{var d=r?pr.resolve(mr.join2(e,r)):e,u=le(`cp ${d}`);function f(t){function f(t){c?.(),s||((e,r,t,n,o,a)=>{Pr.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,l),a?.(),de(u)}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Er.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,f,(()=>{i?.(),de(u)}))||f(t)}ce(u),"string"==typeof t?((e,r,t,n)=>{var o=le(`al ${e}`);w(e,(t=>{V(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&de(o)}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&ce(o)})(t,f,i):f(t)},Pr.staticInit(),u.FS_createPath=Pr.createPath,u.FS_createDataFile=Pr.createDataFile,u.FS_createPreloadedFile=Pr.createPreloadedFile,u.FS_unlink=Pr.unlink,u.FS_createLazyFile=Pr.createLazyFile,u.FS_createDevice=Pr.createDevice,Wr=u.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);jr=e})(),Ur=u.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(dt.prototype,{isAliasOf(e){if(!(this instanceof dt))return!1;if(!(e instanceof dt))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||Zr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=ct(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Zr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Kr("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Zr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Kr("Object already scheduled for deletion"),ot.push(this),1===ot.length&&Xr&&Xr(at),this.$$.deleteScheduled=!0,this}}),u.getInheritedInstanceCount=()=>Object.keys(it).length,u.getLiveInheritedInstances=()=>{var e=[];for(var r in it)it.hasOwnProperty(r)&&e.push(it[r]);return e},u.flushPendingDeletes=at,u.setDelayFunction=e=>{Xr=e,ot.length&&Xr&&Xr(at)},Object.assign(_t.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},argPackAdvance:8,readValueFromPointer:Lr,fromWireType:lt}),wt=u.UnboundTypeError=(mn=Error,(hn=ut("UnboundTypeError",(function(e){this.name="UnboundTypeError",this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(mn.prototype),hn.prototype.constructor=hn,hn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},hn),Ot.push(0,1,void 0,1,null,1,!0,1,!1,1),V(10===Ot.length),u.count_emval_handles=()=>Ot.length/2-5-Dt.length;var gn,yn=[Be,er,Cr,Fr,Dr,Or,Mr,$r,Ir,Nr,rn,tn,sn,ln,cn,dn,un,fn],_n={__assert_fail:(e,r,t,n)=>{ue(`Assertion failed: ${Qe(e)}, at: `+[r?Qe(r):"unknown filename",t,n?Qe(n):"unknown function"])},__cxa_begin_catch:e=>{var r=new ur(e);return r.get_caught()||(r.set_caught(!0),cr--),r.set_rethrown(!1),lr.push(r),zn(r.excPtr),r.get_exception_ptr()},__cxa_end_catch:()=>{In(0,0),V(lr.length>0);var e=lr.pop();Bn(e.excPtr),dr=0},__cxa_find_matching_catch_2:()=>fr([]),__cxa_find_matching_catch_3:e=>fr([e]),__cxa_rethrow:()=>{var e=lr.pop();e||ue("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(lr.push(e),e.set_rethrown(!0),e.set_caught(!1),cr++),dr=new _e(r)},__cxa_throw:(e,r,t)=>{throw new ur(e).init(r,t),dr=new _e(e),cr++,dr},__cxa_uncaught_exceptions:()=>cr,__emscripten_init_main_thread_js:e=>{An(e,!v,1,!p,2097152,!1),Ye.threadInitTLS()},__emscripten_thread_cleanup:e=>{b?postMessage({cmd:"cleanupThread",thread:e}):Re(e)},__handle_stack_overflow:e=>{var r=Cn(),t=Fn();ue(`stack overflow (Attempt to set SP to ${He(e)}, with stack limits [${He(t)} - ${He(r)}]). If you require more stack space build with -sSTACK_SIZE=<bytes>`)},__resumeException:e=>{throw dr||(dr=new _e(e)),dr},__syscall_fcntl64:Cr,__syscall_fstat64:Fr,__syscall_ioctl:Dr,__syscall_lstat64:Or,__syscall_newfstatat:Mr,__syscall_openat:$r,__syscall_stat64:Ir,__syscall_unlinkat:Nr,_embind_finalize_value_array:e=>{var r=Rr[e];delete Rr[e];var t=r.elements,n=t.length,o=t.map((e=>e.getterReturnType)).concat(t.map((e=>e.setterArgumentType))),a=r.rawConstructor,i=r.rawDestructor;Yr([e],o,(e=>(t.forEach(((r,t)=>{var o=e[t],a=r.getter,i=r.getterContext,s=e[t+n],l=r.setter,c=r.setterContext;r.read=e=>o.fromWireType(a(i,e)),r.write=(e,r)=>{var t=[];l(c,e,s.toWireType(t,r)),xr(t)}})),[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),l=0;l<n;++l)t[l].write(s,o[l]);return null!==e&&e.push(i,s),s},argPackAdvance:8,readValueFromPointer:Lr,destructorFunction:i}])))},_embind_finalize_value_object:e=>{var r=Vr[e];delete Vr[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));Yr([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,l=r.getterContext,c=e[t+o.length],d=r.setter,u=r.setterContext;a[n]={read:e=>i.fromWireType(s(l,e)),write:(e,r)=>{var t=[];d(u,e,c.toWireType(t,r)),xr(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:Lr,destructorFunction:n}]}))},_embind_register_bigint:(e,r,t,n,o)=>{},_embind_register_bool:(e,r,t,o)=>{Jr(e,{name:r=qr(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:o},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(n()[e])},destructorFunction:null})},_embind_register_class:(e,r,t,n,o,a,i,s,l,c,d,u,f)=>{d=qr(d),a=bt(o,a),s&&=bt(i,s),c&&=bt(l,c),f=bt(u,f);var m=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(d);mt(m,(function(){kt(`Cannot construct ${d} due to unbound types`,[n])})),Yr([e,r,t],n?[n]:[],(r=>{var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:dt.prototype;var i=ut(d,(function(...e){if(Object.getPrototypeOf(this)!==l)throw new Ur("Use 'new' to construct "+d);if(void 0===u.constructor_body)throw new Ur(d+" has no accessible constructor");var r=u.constructor_body[e.length];if(void 0===r)throw new Ur(`Tried to invoke ctor of ${d} with invalid number of parameters (${e.length}) - expected (${Object.keys(u.constructor_body).toString()}) parameters instead!`);return r.apply(this,e)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var u=new ht(d,i,l,f,t,a,s,c);u.baseClass&&(u.baseClass.__derivedClasses??=[],u.baseClass.__derivedClasses.push(u));var h=new _t(d,u,!0,!1,!1),p=new _t(d+"*",u,!1,!1,!1),v=new _t(d+" const*",u,!1,!0,!1);return nt[e]={pointerType:p,constPointerType:v},Et(m,i),[h,p,v]}))},_embind_register_class_constructor:(e,r,t,n,o,a)=>{V(r>0);var i=St(r,t);o=bt(n,o),Yr([],[e],(e=>{var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Ur(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{kt(`Cannot construct ${e.name} due to unbound types`,i)},Yr([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=At(t,n,null,o,a),[]))),[]}))},_embind_register_class_function:(e,r,t,n,o,a,i,s,l)=>{var c=St(t,n);r=qr(r),r=Ct(r),a=bt(o,a),Yr([],[e],(e=>{var n=`${(e=e[0]).name}.${r}`;function o(){kt(`Cannot call ${n} due to unbound types`,c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var d=e.registeredClass.instancePrototype,u=d[r];return void 0===u||void 0===u.overloadTable&&u.className!==e.name&&u.argCount===t-2?(o.argCount=t-2,o.className=e.name,d[r]=o):(ft(d,r,n),d[r].overloadTable[t-2]=o),Yr([],c,(o=>{var s=At(n,o,e,a,i,l);return void 0===d[r].overloadTable?(s.argCount=t-2,d[r]=s):d[r].overloadTable[t-2]=s,[]})),[]}))},_embind_register_class_property:(e,r,t,n,o,a,i,s,l,c)=>{r=qr(r),o=bt(n,o),Yr([],[e],(e=>{var n=`${(e=e[0]).name}.${r}`,d={get(){kt(`Cannot access ${n} due to unbound types`,[t,i])},enumerable:!0,configurable:!0};return d.set=l?()=>kt(`Cannot access ${n} due to unbound types`,[t,i]):e=>Kr(n+" is a read-only property"),Object.defineProperty(e.registeredClass.instancePrototype,r,d),Yr([],l?[t,i]:[t],(t=>{var i=t[0],d={get(){var r=Ft(this,e,n+" getter");return i.fromWireType(o(a,r))},enumerable:!0};if(l){l=bt(s,l);var u=t[1];d.set=function(r){var t=Ft(this,e,n+" setter"),o=[];l(c,t,u.toWireType(o,r)),xr(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,d),[]})),[]}))},_embind_register_emval:Nt,_embind_register_enum:(e,r,t,n)=>{function o(){}r=qr(r),o.values={},Jr(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:8,readValueFromPointer:Rt(r,t,n),destructorFunction:null}),mt(r,o)},_embind_register_enum_value:(e,r,t)=>{var n=xt(e,"enum");r=qr(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:ut(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},_embind_register_float:(e,r,t)=>{Jr(e,{name:r=qr(r),fromWireType:e=>e,toWireType:(e,r)=>{if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError(`Cannot convert ${Lt(r)} to ${this.name}`);return r},argPackAdvance:8,readValueFromPointer:Wt(r,t),destructorFunction:null})},_embind_register_function:(e,r,t,n,o,a,i)=>{var s=St(r,t);e=qr(e),e=Ct(e),o=bt(n,o),mt(e,(function(){kt(`Cannot call ${e} due to unbound types`,s)}),r-1),Yr([],s,(t=>{var n=[t[0],null].concat(t.slice(1));return Et(e,At(e,n,null,o,a,i),r-1),[]}))},_embind_register_integer:(e,r,t,n,o)=>{r=qr(r),-1===o&&(o=4294967295);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned"),l=(e,t)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError(`Cannot convert "${Lt(e)}" to ${t}`);if(e<n||e>o)throw new TypeError(`Passing a number "${Lt(e)}" from JS side to C/C++ side to an argument of type "${r}", which is outside the valid range [${n}, ${o}]!`)};Jr(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return l(r,this.name),r>>>0}:function(e,r){return l(r,this.name),r},argPackAdvance:8,readValueFromPointer:jt(r,t,0!==n),destructorFunction:null})},_embind_register_memory_view:(e,r,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=s()[e>>2],n=s()[e+4>>2];return new o(t().buffer,n,r)}Jr(e,{name:n=qr(n),fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},_embind_register_optional:(e,r)=>{Nt(e)},_embind_register_std_string:(e,r)=>{var t="std::string"===(r=qr(r));Jr(e,{name:r,fromWireType(e){var r,o=s()[e>>2],a=e+4;if(t)for(var i=a,l=0;l<=o;++l){var c=a+l;if(l==o||0==n()[c]){var d=Qe(i,c-i);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),i=c+1}}else{var u=new Array(o);for(l=0;l<o;++l)u[l]=String.fromCharCode(n()[a+l]);r=u.join("")}return Tn(e),r},toWireType(e,r){var o;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Kr("Cannot pass non-string to std::string"),o=t&&a?qe(r):r.length;var i=En(4+o+1),l=i+4;if(s()[i>>2]=o,Oe(o),t&&a)Je(r,l,o+1);else if(a)for(var c=0;c<o;++c){var d=r.charCodeAt(c);d>255&&(Tn(l),Kr("String has UTF-16 code units that do not fit in 8 bits")),n()[l+c]=d}else for(c=0;c<o;++c)n()[l+c]=r[c];return null!==e&&e.push(Tn,i),i},argPackAdvance:8,readValueFromPointer:Lr,destructorFunction(e){Tn(e)}})},_embind_register_std_wstring:(e,r,t)=>{var n,o,i,l;t=qr(t),2===r?(n=Bt,o=zt,l=Ht,i=e=>a()[e>>1]):4===r&&(n=Gt,o=Yt,l=Vt,i=e=>s()[e>>2]),Jr(e,{name:t,fromWireType:e=>{for(var t,o=s()[e>>2],a=e+4,l=0;l<=o;++l){var c=e+4+l*r;if(l==o||0==i(c)){var d=n(a,c-a);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),a=c+r}}return Tn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Kr(`Cannot pass non-string to C++ string type ${t}`);var a=l(n),i=En(4+a+r);return s()[i>>2]=a/r,Oe(a/r),o(n,i+4,a+r),null!==e&&e.push(Tn,i),i},argPackAdvance:8,readValueFromPointer:Lr,destructorFunction(e){Tn(e)}})},_embind_register_value_array:(e,r,t,n,o,a)=>{Rr[e]={name:qr(r),rawConstructor:bt(t,n),rawDestructor:bt(o,a),elements:[]}},_embind_register_value_array_element:(e,r,t,n,o,a,i,s,l)=>{Rr[e].elements.push({getterReturnType:r,getter:bt(t,n),getterContext:o,setterArgumentType:a,setter:bt(i,s),setterContext:l})},_embind_register_value_object:(e,r,t,n,o,a)=>{Vr[e]={name:qr(r),rawConstructor:bt(t,n),rawDestructor:bt(o,a),fields:[]}},_embind_register_value_object_field:(e,r,t,n,o,a,i,s,l,c)=>{Vr[e].fields.push({fieldName:qr(r),getterReturnType:t,getter:bt(n,o),getterContext:a,setterArgumentType:i,setter:bt(s,l),setterContext:c})},_embind_register_void:(e,r)=>{Jr(e,{isVoid:!0,name:r=qr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_notify_mailbox_postmessage:(e,r,t)=>{if(e==r)setTimeout(Kt);else if(b)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Ye.pthreads[e];if(!n)return void R(`Cannot send message to thread with ID ${e}, unknown thread ID!`);n.postMessage({cmd:"checkMailbox"})}},_emscripten_receive_on_main_thread_js:(e,r,t,n,o)=>{Xt.length=n;for(var a=o>>3,i=0;i<n;i++)Xt[i]=l()[a+i];V(!r);var s=yn[e];V(!(e&&r)),V(s.length==n,"Call args mismatch in _emscripten_receive_on_main_thread_js"),Ye.currentProxiedOperationCallerThread=t;var c=s(...Xt);return Ye.currentProxiedOperationCallerThread=0,V("bigint"!=typeof c),c},_emscripten_thread_mailbox_await:qt,_emscripten_thread_set_strongref:e=>{g&&Ye.pthreads[e].ref()},_emval_decref:Mt,_emval_take_value:(e,r)=>{var t=(e=xt(e,"_emval_take_value")).readValueFromPointer(r);return $t.toHandle(t)},_localtime_js:function(e,r,t){var n=je(e,r),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),Oe(o.getSeconds()),i()[t+4>>2]=o.getMinutes(),Oe(o.getMinutes()),i()[t+8>>2]=o.getHours(),Oe(o.getHours()),i()[t+12>>2]=o.getDate(),Oe(o.getDate()),i()[t+16>>2]=o.getMonth(),Oe(o.getMonth()),i()[t+20>>2]=o.getFullYear()-1900,Oe(o.getFullYear()-1900),i()[t+24>>2]=o.getDay(),Oe(o.getDay());var a=0|(e=>(Zt(e.getFullYear())?Qt:en)[e.getMonth()]+e.getDate()-1)(o);i()[t+28>>2]=a,Oe(a),i()[t+36>>2]=-60*o.getTimezoneOffset(),Oe(-60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),d=0|(l!=c&&o.getTimezoneOffset()==Math.min(c,l));i()[t+32>>2]=d,Oe(d)},_mmap_js:rn,_munmap_js:tn,_tzset_js:(e,r,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),l=new Date(o,6,1),c=a.getTimezoneOffset(),d=l.getTimezoneOffset(),u=Math.max(c,d);function f(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}s()[e>>2]=60*u,Oe(60*u),i()[r>>2]=Number(c!=d),Oe(Number(c!=d));var m=f(a),h=f(l);d<c?(Je(m,t,7),Je(h,n,7)):(Je(m,n,7),Je(h,t,7))},abort:()=>{ue("native code called abort()")},emscripten_check_blocking_allowed:()=>{g||v||sr("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")},emscripten_date_now:()=>Date.now(),emscripten_exit_with_live_runtime:()=>{throw xe+=1,"unwind"},emscripten_get_now:Jt,emscripten_resize_heap:e=>{var r=n().length;if((e>>>=0)<=r)return!1;var t=2147483648;if(e>t)return R(`Cannot enlarge memory, requested ${e} bytes, but the limit is 2147483648 bytes!`),!1;for(var o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(o=Math.max(e,i))+(65536-o%65536)%65536),l=Jt(),c=nn(s);if($e(`Heap resize call from ${r} to ${s} took ${Jt()-l} msecs. Success: ${!!c}`),c)return!0}return R(`Failed to grow the heap from ${r} bytes to ${s} bytes, not enough memory!`),!1},environ_get:sn,environ_sizes_get:ln,exit:ze,fd_close:cn,fd_read:dn,fd_seek:un,fd_write:fn,invoke_dii:function(e,r,t){var n=Ln();try{return or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_diii:function(e,r,t,n){var o=Ln();try{return or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_fi:function(e,r){var t=Ln();try{return or(e)(r)}catch(e){if(Wn(t),!(e instanceof ye))throw e;In(1,0)}},invoke_fii:function(e,r,t){var n=Ln();try{return or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_fiii:function(e,r,t,n){var o=Ln();try{return or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_i:function(e){var r=Ln();try{return or(e)()}catch(e){if(Wn(r),!(e instanceof ye))throw e;In(1,0)}},invoke_idi:function(e,r,t){var n=Ln();try{return or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_ii:function(e,r){var t=Ln();try{return or(e)(r)}catch(e){if(Wn(t),!(e instanceof ye))throw e;In(1,0)}},invoke_iid:function(e,r,t){var n=Ln();try{return or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_iii:function(e,r,t){var n=Ln();try{return or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_iiid:function(e,r,t,n){var o=Ln();try{return or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_iiii:function(e,r,t,n){var o=Ln();try{return or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiii:function(e,r,t,n,o){var a=Ln();try{return or(e)(r,t,n,o)}catch(e){if(Wn(a),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiid:function(e,r,t,n,o,a){var i=Ln();try{return or(e)(r,t,n,o,a)}catch(e){if(Wn(i),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiii:function(e,r,t,n,o,a){var i=Ln();try{return or(e)(r,t,n,o,a)}catch(e){if(Wn(i),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiiii:function(e,r,t,n,o,a,i){var s=Ln();try{return or(e)(r,t,n,o,a,i)}catch(e){if(Wn(s),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiiiii:function(e,r,t,n,o,a,i,s){var l=Ln();try{return or(e)(r,t,n,o,a,i,s)}catch(e){if(Wn(l),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiiiiii:function(e,r,t,n,o,a,i,s,l){var c=Ln();try{return or(e)(r,t,n,o,a,i,s,l)}catch(e){if(Wn(c),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,d){var u=Ln();try{return or(e)(r,t,n,o,a,i,s,l,c,d)}catch(e){if(Wn(u),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,d,u){var f=Ln();try{return or(e)(r,t,n,o,a,i,s,l,c,d,u)}catch(e){if(Wn(f),!(e instanceof ye))throw e;In(1,0)}},invoke_iiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,d,u,f){var m=Ln();try{return or(e)(r,t,n,o,a,i,s,l,c,d,u,f)}catch(e){if(Wn(m),!(e instanceof ye))throw e;In(1,0)}},invoke_jiiii:function(e,r,t,n,o){var a=Ln();try{return qn(e,r,t,n,o)}catch(e){if(Wn(a),!(e instanceof ye))throw e;In(1,0)}},invoke_v:function(e){var r=Ln();try{or(e)()}catch(e){if(Wn(r),!(e instanceof ye))throw e;In(1,0)}},invoke_vi:function(e,r){var t=Ln();try{or(e)(r)}catch(e){if(Wn(t),!(e instanceof ye))throw e;In(1,0)}},invoke_vid:function(e,r,t){var n=Ln();try{or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_vidddddd:function(e,r,t,n,o,a,i,s){var l=Ln();try{or(e)(r,t,n,o,a,i,s)}catch(e){if(Wn(l),!(e instanceof ye))throw e;In(1,0)}},invoke_vidi:function(e,r,t,n){var o=Ln();try{or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_vii:function(e,r,t){var n=Ln();try{or(e)(r,t)}catch(e){if(Wn(n),!(e instanceof ye))throw e;In(1,0)}},invoke_viif:function(e,r,t,n){var o=Ln();try{or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_viii:function(e,r,t,n){var o=Ln();try{or(e)(r,t,n)}catch(e){if(Wn(o),!(e instanceof ye))throw e;In(1,0)}},invoke_viiii:function(e,r,t,n,o){var a=Ln();try{or(e)(r,t,n,o)}catch(e){if(Wn(a),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiidi:function(e,r,t,n,o,a,i){var s=Ln();try{or(e)(r,t,n,o,a,i)}catch(e){if(Wn(s),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiif:function(e,r,t,n,o,a){var i=Ln();try{or(e)(r,t,n,o,a)}catch(e){if(Wn(i),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiii:function(e,r,t,n,o,a){var i=Ln();try{or(e)(r,t,n,o,a)}catch(e){if(Wn(i),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiii:function(e,r,t,n,o,a,i){var s=Ln();try{or(e)(r,t,n,o,a,i)}catch(e){if(Wn(s),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiiii:function(e,r,t,n,o,a,i,s){var l=Ln();try{or(e)(r,t,n,o,a,i,s)}catch(e){if(Wn(l),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiiiii:function(e,r,t,n,o,a,i,s,l){var c=Ln();try{or(e)(r,t,n,o,a,i,s,l)}catch(e){if(Wn(c),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiiiiii:function(e,r,t,n,o,a,i,s,l,c){var d=Ln();try{or(e)(r,t,n,o,a,i,s,l,c)}catch(e){if(Wn(d),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,d){var u=Ln();try{or(e)(r,t,n,o,a,i,s,l,c,d)}catch(e){if(Wn(u),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,d,u,f,m){var h=Ln();try{or(e)(r,t,n,o,a,i,s,l,c,d,u,f,m)}catch(e){if(Wn(h),!(e instanceof ye))throw e;In(1,0)}},invoke_viiiiiiiiiiiiiii:function(e,r,t,n,o,a,i,s,l,c,d,u,f,m,h,p){var v=Ln();try{or(e)(r,t,n,o,a,i,s,l,c,d,u,f,m,h,p)}catch(e){if(Wn(v),!(e instanceof ye))throw e;In(1,0)}},llvm_eh_typeid_for:e=>e,memory:$||u.wasmMemory,strftime_l:(e,r,n,o,a)=>((e,r,n,o)=>{var a=s()[o+40>>2],l={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?Qe(a):""},c=Qe(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in d)c=c.replace(new RegExp(u,"g"),d[u]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function p(e,r){return h(e,r,"0")}function v(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function g(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function y(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=Zt(t.getFullYear()),o=t.getMonth(),a=(n?pn:vn)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=g(t),a=g(n);return v(o,r)<=0?v(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var _={"%a":e=>f[e.tm_wday].substring(0,3),"%A":e=>f[e.tm_wday],"%b":e=>m[e.tm_mon].substring(0,3),"%B":e=>m[e.tm_mon],"%C":e=>p((e.tm_year+1900)/100|0,2),"%d":e=>p(e.tm_mday,2),"%e":e=>h(e.tm_mday,2," "),"%g":e=>y(e).toString().substring(2),"%G":y,"%H":e=>p(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),p(r,2)},"%j":e=>p(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(Zt(e.tm_year+1900)?pn:vn,e.tm_mon-1),3),"%m":e=>p(e.tm_mon+1,2),"%M":e=>p(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>p(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return p(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&Zt(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&Zt(e.tm_year%400-1))&&r++}return p(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return p(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in c=c.replace(/%%/g,"\0\0"),_)c.includes(u)&&(c=c.replace(new RegExp(u,"g"),_[u](l)));var w,E,b=gr(c=c.replace(/\0\0/g,"%"),!1);return b.length>r?0:(E=e,V((w=b).length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),t().set(w,E),b.length-1)})(e,r,n,o)},wn=function(){var e={env:_n,wasi_snapshot_preview1:_n};function r(e,r){var t,n;return wn=e.exports,n=wn._emscripten_tls_init,Ye.tlsInitFunctions.push(n),V(tr=wn.__indirect_function_table,"table not found in wasm exports"),t=wn.__wasm_call_ctors,Q.unshift(t),I=r,de("wasm-instantiate"),wn}ce("wasm-instantiate");var t,n,o,a,i=u;if(u.instantiateWasm)try{return u.instantiateWasm(e,r)}catch(e){R(`Module.instantiateWasm callback failed with error: ${e}`),d(e)}return(t=M,n=fe,o=e,a=function(e){V(u===i,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),i=null,r(e.instance,e.module)},t||"function"!=typeof WebAssembly.instantiateStreaming||pe(n)||ve(n)||g||"function"!=typeof fetch?Ee(n,o,a):fetch(n,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,o).then(a,(function(e){return R(`wasm streaming compile failed: ${e}`),R("falling back to ArrayBuffer instantiation"),Ee(n,o,a)}))))).catch(d),{}}(),En=(ge("__wasm_call_ctors"),ge("__cxa_free_exception"),ge("malloc")),bn=u._pthread_self=()=>(bn=u._pthread_self=wn.pthread_self)(),Tn=ge("free"),kn=ge("fflush"),Sn=(u.__emscripten_tls_init=ge("_emscripten_tls_init"),ge("emscripten_builtin_memalign")),Pn=ge("__getTypeName"),An=(u.__embind_initialize_bindings=ge("_embind_initialize_bindings"),u.__emscripten_thread_init=ge("_emscripten_thread_init")),Cn=(u.__emscripten_thread_crashed=ge("_emscripten_thread_crashed"),ge("emscripten_main_thread_process_queued_calls"),ge("emscripten_main_runtime_thread_id"),()=>(Cn=wn.emscripten_stack_get_base)()),Fn=()=>(Fn=wn.emscripten_stack_get_end)(),Dn=ge("_emscripten_run_on_main_thread_js"),On=ge("_emscripten_thread_free_data"),Mn=u.__emscripten_thread_exit=ge("_emscripten_thread_exit"),$n=ge("_emscripten_check_mailbox"),In=ge("setThrew"),Nn=ge("setTempRet0"),Rn=()=>(Rn=wn.emscripten_stack_init)(),xn=(e,r)=>(xn=wn.emscripten_stack_set_limits)(e,r),Ln=ge("stackSave"),Wn=ge("stackRestore"),jn=ge("stackAlloc"),Un=()=>(Un=wn.emscripten_stack_get_current)(),Bn=ge("__cxa_decrement_exception_refcount"),zn=ge("__cxa_increment_exception_refcount"),Hn=(ge("__cxa_demangle"),ge("__get_exception_message")),Gn=ge("__cxa_can_catch"),Yn=ge("__cxa_is_pointer_type"),Vn=u.___set_stack_limits=ge("__set_stack_limits"),qn=(u.dynCall_jii=ge("dynCall_jii"),u.dynCall_viij=ge("dynCall_viij"),u.dynCall_jiji=ge("dynCall_jiji"),u.dynCall_viijii=ge("dynCall_viijii"),u.dynCall_jiiii=ge("dynCall_jiiii"));function Kn(){if(!(oe>0)){if(b||(V(!b),Rn(),J()),b)return c(u),te(),void startWorker(u);!function(){if(V(!b),u.preRun)for("function"==typeof u.preRun&&(u.preRun=[u.preRun]);u.preRun.length;)ne(u.preRun.shift());Ve(Z)}(),oe>0||(u.setStatus?(u.setStatus("Running..."),setTimeout((function(){setTimeout((function(){u.setStatus("")}),1),e()}),1)):e(),X())}function e(){gn||(gn=!0,u.calledRun=!0,Y||(te(),c(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),V(!u._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(X(),!b){if(u.postRun)for("function"==typeof u.postRun&&(u.postRun=[u.postRun]);u.postRun.length;)e=u.postRun.shift(),ee.unshift(e);var e;Ve(ee)}}()))}}if(u.dynCall_iiiiij=ge("dynCall_iiiiij"),u.dynCall_iiiiijj=ge("dynCall_iiiiijj"),u.dynCall_iiiiiijj=ge("dynCall_iiiiiijj"),u.addRunDependency=ce,u.removeRunDependency=de,u.FS_createPath=Pr.createPath,u.FS_createLazyFile=Pr.createLazyFile,u.FS_createDevice=Pr.createDevice,u.wasmMemory=$,u.keepRuntimeAlive=Le,u.ExitStatus=Ie,u.FS_createPreloadedFile=Pr.createPreloadedFile,u.FS=Pr,u.FS_createDataFile=Pr.createDataFile,u.FS_unlink=Pr.unlink,u.PThread=Ye,["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","getCallstack","emscriptenLog","convertPCtoSourceLocation","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","runtimeKeepalivePop","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","stringToNewUTF8","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSizeCallingThread","setCanvasElementSizeMainThread","setCanvasElementSize","getCanvasSizeCallingThread","getCanvasSizeMainThread","getCanvasElementSize","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","safeSetTimeout","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","Browser_asyncPrepareDataCounter","setMainLoop","getSocketFromFD","getSocketAddress","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","emscripten_webgl_destroy_context_before_on_calling_thread","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","getFunctionArgsName","createJsInvokerSignature","registerInheritedInstance","unregisterInheritedInstance","getStringOrSymbol","emval_get_global","emval_returnValue","emval_lookupTypes","emval_addMethodCaller"].forEach((function(e){"undefined"==typeof globalThis||Object.getOwnPropertyDescriptor(globalThis,e)||Object.defineProperty(globalThis,e,{configurable:!0,get(){var r=`\`${e}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,t=e;t.startsWith("_")||(t="$"+e),r+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${t}')`,Te(e)&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),sr(r)}}),Se(e)})),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","FS_createFolder","FS_createLink","FS_readFile","out","err","callMain","abort","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","GROWABLE_HEAP_I8","GROWABLE_HEAP_U8","GROWABLE_HEAP_I16","GROWABLE_HEAP_U16","GROWABLE_HEAP_I32","GROWABLE_HEAP_U32","GROWABLE_HEAP_F32","GROWABLE_HEAP_F64","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","setStackLimits","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","DNS","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","jstoi_s","getExecutableName","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","callUserCallback","maybeExit","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","jsStackTrace","stackTrace","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","getPreloadedImageData__data","wget","SYSCALLS","preloadPlugins","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","demangle","terminateWorker","killThread","cleanupThread","registerTLSInit","cancelThread","spawnThread","exitOnMainThread","proxyToMainThread","proxiedJSCallArgs","invokeEntryPoint","checkMailbox","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","getFunctionName","heap32VectorToArray","requireRegisteredType","usesDestructorStack","createJsInvoker","UnboundTypeError","PureVirtualError","GenericWireTypeSize","EmValType","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","integerReadValueFromPointer","enumReadValueFromPointer","floatReadValueFromPointer","readPointer","runDestructors","newFunc","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","deletionQueue","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","validateThis","char_0","char_9","makeLegalFunctionName","emval_freelist","emval_handles","emval_symbols","init_emval","count_emval_handles","Emval","emval_methodCallers","reflectConstruct","IDBFS"].forEach(Se),ie=function e(){gn||Kn(),gn||(ie=e)},u.preInit)for("function"==typeof u.preInit&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return Kn(),r.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=createCCP4Module:"function"==typeof define&&define.amd&&define([],(()=>createCCP4Module));
|