var ur=Object.create;var Re=Object.defineProperty;var dr=Object.getOwnPropertyDescriptor;var pr=Object.getOwnPropertyNames;var fr=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var Y=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ee=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var gr=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of pr(r))!mr.call(e,a)&&a!==t&&Re(e,a,{get:()=>r[a],enumerable:!(n=dr(r,a))||n.enumerable});return e};var we=(e,r,t)=>(t=e!=null?ur(fr(e)):{},gr(r||!e||!e.__esModule?Re(t,"default",{value:e,enumerable:!0}):t,e));var er=ee(()=>{});var rr=ee(()=>{});var tr=ee((ht,Ee)=>{(function(){"use strict";var e="input is invalid type",r=typeof window=="object",t=r?window:{};t.JS_SHA256_NO_WINDOW&&(r=!1);var n=!r&&typeof self=="object",a=!t.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?t=global:n&&(t=self);var o=!t.JS_SHA256_NO_COMMON_JS&&typeof Ee=="object"&&Ee.exports,_=typeof define=="function"&&define.amd,l=!t.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),u=[-2147483648,8388608,32768,128],d=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=["hex","array","digest","arrayBuffer"],m=[];(t.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(L){return Object.prototype.toString.call(L)==="[object Array]"}),l&&(t.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(L){return typeof L=="object"&&L.buffer&&L.buffer.constructor===ArrayBuffer});var g=function(L,E){return function(x){return new b(E,!0).update(x)[L]()}},v=function(L){var E=g("hex",L);a&&(E=S(E,L)),E.create=function(){return new b(L)},E.update=function(D){return E.create().update(D)};for(var x=0;x>>2]|=L[D]<>>2]|=A<>>2]|=(192|A>>>6)<>>2]|=(128|A&63)<=57344?(T[F>>>2]|=(224|A>>>12)<>>2]|=(128|A>>>6&63)<>>2]|=(128|A&63)<>>2]|=(240|A>>>18)<>>2]|=(128|A>>>12&63)<>>2]|=(128|A>>>6&63)<>>2]|=(128|A&63)<=64?(this.block=T[16],this.start=F-64,this.hash(),this.hashed=!0):this.start=F}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var L=this.blocks,E=this.lastByteIndex;L[16]=this.block,L[E>>>2]|=u[E&3],this.block=L[16],E>=56&&(this.hashed||this.hash(),L[0]=this.block,L[16]=L[1]=L[2]=L[3]=L[4]=L[5]=L[6]=L[7]=L[8]=L[9]=L[10]=L[11]=L[12]=L[13]=L[14]=L[15]=0),L[14]=this.hBytes<<3|this.bytes>>>29,L[15]=this.bytes<<3,this.hash()}},b.prototype.hash=function(){var L=this.h0,E=this.h1,x=this.h2,A=this.h3,D=this.h4,F=this.h5,P=this.h6,T=this.h7,M=this.blocks,C,G,I,R,H,U,j,z,$,X,Q;for(C=16;C<64;++C)H=M[C-15],G=(H>>>7|H<<25)^(H>>>18|H<<14)^H>>>3,H=M[C-2],I=(H>>>17|H<<15)^(H>>>19|H<<13)^H>>>10,M[C]=M[C-16]+G+M[C-7]+I<<0;for(Q=E&x,C=0;C<64;C+=4)this.first?(this.is224?(z=300032,H=M[0]-1413257819,T=H-150054599<<0,A=H+24177077<<0):(z=704751109,H=M[0]-210244248,T=H-1521486534<<0,A=H+143694565<<0),this.first=!1):(G=(L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10),I=(D>>>6|D<<26)^(D>>>11|D<<21)^(D>>>25|D<<7),z=L&E,R=z^L&x^Q,j=D&F^~D&P,H=T+I+j+p[C]+M[C],U=G+R,T=A+H<<0,A=H+U<<0),G=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),I=(T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7),$=A&L,R=$^A&E^z,j=T&D^~T&F,H=P+I+j+p[C+1]+M[C+1],U=G+R,P=x+H<<0,x=H+U<<0,G=(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10),I=(P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7),X=x&A,R=X^x&L^$,j=P&T^~P&D,H=F+I+j+p[C+2]+M[C+2],U=G+R,F=E+H<<0,E=H+U<<0,G=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),I=(F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7),Q=E&x,R=Q^E&A^X,j=F&P^~F&T,H=D+I+j+p[C+3]+M[C+3],U=G+R,D=L+H<<0,L=H+U<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+L<<0,this.h1=this.h1+E<<0,this.h2=this.h2+x<<0,this.h3=this.h3+A<<0,this.h4=this.h4+D<<0,this.h5=this.h5+F<<0,this.h6=this.h6+P<<0,this.h7=this.h7+T<<0},b.prototype.hex=function(){this.finalize();var L=this.h0,E=this.h1,x=this.h2,A=this.h3,D=this.h4,F=this.h5,P=this.h6,T=this.h7,M=c[L>>>28&15]+c[L>>>24&15]+c[L>>>20&15]+c[L>>>16&15]+c[L>>>12&15]+c[L>>>8&15]+c[L>>>4&15]+c[L&15]+c[E>>>28&15]+c[E>>>24&15]+c[E>>>20&15]+c[E>>>16&15]+c[E>>>12&15]+c[E>>>8&15]+c[E>>>4&15]+c[E&15]+c[x>>>28&15]+c[x>>>24&15]+c[x>>>20&15]+c[x>>>16&15]+c[x>>>12&15]+c[x>>>8&15]+c[x>>>4&15]+c[x&15]+c[A>>>28&15]+c[A>>>24&15]+c[A>>>20&15]+c[A>>>16&15]+c[A>>>12&15]+c[A>>>8&15]+c[A>>>4&15]+c[A&15]+c[D>>>28&15]+c[D>>>24&15]+c[D>>>20&15]+c[D>>>16&15]+c[D>>>12&15]+c[D>>>8&15]+c[D>>>4&15]+c[D&15]+c[F>>>28&15]+c[F>>>24&15]+c[F>>>20&15]+c[F>>>16&15]+c[F>>>12&15]+c[F>>>8&15]+c[F>>>4&15]+c[F&15]+c[P>>>28&15]+c[P>>>24&15]+c[P>>>20&15]+c[P>>>16&15]+c[P>>>12&15]+c[P>>>8&15]+c[P>>>4&15]+c[P&15];return this.is224||(M+=c[T>>>28&15]+c[T>>>24&15]+c[T>>>20&15]+c[T>>>16&15]+c[T>>>12&15]+c[T>>>8&15]+c[T>>>4&15]+c[T&15]),M},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var L=this.h0,E=this.h1,x=this.h2,A=this.h3,D=this.h4,F=this.h5,P=this.h6,T=this.h7,M=[L>>>24&255,L>>>16&255,L>>>8&255,L&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,A>>>24&255,A>>>16&255,A>>>8&255,A&255,D>>>24&255,D>>>16&255,D>>>8&255,D&255,F>>>24&255,F>>>16&255,F>>>8&255,F&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255];return this.is224||M.push(T>>>24&255,T>>>16&255,T>>>8&255,T&255),M},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var L=new ArrayBuffer(this.is224?28:32),E=new DataView(L);return E.setUint32(0,this.h0),E.setUint32(4,this.h1),E.setUint32(8,this.h2),E.setUint32(12,this.h3),E.setUint32(16,this.h4),E.setUint32(20,this.h5),E.setUint32(24,this.h6),this.is224||E.setUint32(28,this.h7),L};function w(L,E,x){var A,D=typeof L;if(D==="string"){var F=[],P=L.length,T=0,M;for(A=0;A>>6,F[T++]=128|M&63):M<55296||M>=57344?(F[T++]=224|M>>>12,F[T++]=128|M>>>6&63,F[T++]=128|M&63):(M=65536+((M&1023)<<10|L.charCodeAt(++A)&1023),F[T++]=240|M>>>18,F[T++]=128|M>>>12&63,F[T++]=128|M>>>6&63,F[T++]=128|M&63);L=F}else if(D==="object"){if(L===null)throw new Error(e);if(l&&L.constructor===ArrayBuffer)L=new Uint8Array(L);else if(!Array.isArray(L)&&(!l||!ArrayBuffer.isView(L)))throw new Error(e)}else throw new Error(e);L.length>64&&(L=new b(E,!0).update(L).array());var C=[],G=[];for(A=0;A<64;++A){var I=L[A]||0;C[A]=92^I,G[A]=54^I}b.call(this,E,x),this.update(G),this.oKeyPad=C,this.inner=!0,this.sharedMemory=x}w.prototype=new b,w.prototype.finalize=function(){if(b.prototype.finalize.call(this),this.inner){this.inner=!1;var L=this.array();b.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(L),b.prototype.finalize.call(this)}};var k=v();k.sha256=k,k.sha224=v(!0),k.sha256.hmac=h(),k.sha224.hmac=h(!0),o?Ee.exports=k:(t.sha256=k.sha256,t.sha224=k.sha224,_&&define(function(){return k}))})()});var _e=ee(()=>{});var le=ee(()=>{});var He=ee(()=>{});var ce=ee((Ct,sr)=>{"use strict";sr.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}});var or=ee((exports,module)=>{"use strict";var DuckDB=(()=>{var _scriptDir=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(_scriptDir||(_scriptDir=__filename)),function(moduleArg={}){var Module=moduleArg,readyPromiseResolve,readyPromiseReject;Module.ready=new Promise((e,r)=>{readyPromiseResolve=e,readyPromiseReject=r});var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,r)=>{throw r},ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=_e(),nodePath=le();ENVIRONMENT_IS_WORKER?scriptDirectory=nodePath.dirname(scriptDirectory)+"/":scriptDirectory=__dirname+"/",read_=(e,r)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFileSync(e,r?void 0:"utf8")),readBinary=e=>{var r=read_(e,!0);return r.buffer||(r=new Uint8Array(r)),r},readAsync=(e,r,t,n=!0)=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFile(e,n?void 0:"utf8",(a,o)=>{a?t(a):r(n?o.buffer:o)})},!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=(e,r)=>{throw process.exitCode=e,r}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptDir&&(scriptDirectory=_scriptDir),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),read_=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),readAsync=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)});var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary),typeof WebAssembly!="object"&&abort("no native wasm support detected");var wasmMemory,ABORT=!1,EXITSTATUS;function assert(e,r){e||abort(r)}var HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}var INITIAL_MEMORY=Module.INITIAL_MEMORY||16777216;Module.wasmMemory?wasmMemory=Module.wasmMemory:wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:65536}),updateMemoryViews(),INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),!Module.noFSInit&&!FS.init.initialized&&FS.init(),FS.ignorePermissions=!1,TTY.init(),SOCKFS.root=FS.mount(SOCKFS,{},null),PIPEFS.root=FS.mount(PIPEFS,{},null),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){var r;runDependencies++,(r=Module.monitorRunDependencies)==null||r.call(Module,runDependencies)}function removeRunDependency(e){var t;if(runDependencies--,(t=Module.monitorRunDependencies)==null||t.call(Module,runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}function abort(e){var t;(t=Module.onAbort)==null||t.call(Module,e),e="Aborted("+e+")",err(e),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw readyPromiseReject(r),r}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://"),wasmBinaryFile;wasmBinaryFile="./duckdb-mvp.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(r=>{if(!r.ok)throw"failed to load wasm binary file at '".concat(e,"'");return r.arrayBuffer()}).catch(()=>getBinarySync(e)):Promise.resolve().then(()=>getBinarySync(e))}function instantiateArrayBuffer(e,r,t){return getBinaryPromise(e).then(n=>WebAssembly.instantiate(n,r)).then(t,n=>{err("failed to asynchronously prepare wasm: ".concat(n)),abort(n)})}function instantiateAsync(e,r,t,n){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(r)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(r,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,t);return o.then(n,function(_){return err("wasm streaming compile failed: ".concat(_)),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(r,t,n)})}):instantiateArrayBuffer(r,t,n)}function createWasm(){var e={env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)};function r(n,a){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var o=getDylinkMetadata(a);return o.neededDynlibs&&(dynamicLibraries=o.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),wasmExports=applySignatureConversions(wasmExports),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate"),wasmExports}addRunDependency("wasm-instantiate");function t(n){r(n.instance,n.module)}if(Module.instantiateWasm)try{return Module.instantiateWasm(e,r)}catch(n){err("Module.instantiateWasm callback failed with error: ".concat(n)),readyPromiseReject(n)}return instantiateAsync(wasmBinary,wasmBinaryFile,e,t).catch(readyPromiseReject),{}}var tempDouble,tempI64,ASM_CONSTS={2195296:(e,r)=>{var t=typeof runtime=="object"&&runtime&&typeof runtime.whereToLoad=="function"&&runtime.whereToLoad?runtime.whereToLoad(UTF8ToString(e)):UTF8ToString(r),n=lengthBytesUTF8(t)+1,a=_malloc(n);return stringToUTF8(t,a,n),a},2195662:(e,r)=>{var t=UTF8ToString(e);if(typeof XMLHttpRequest>"u"){let y=He(),h=le(),b=_e();var n=t.split("/"),a=n.length,o=h.join(y.homedir(),".duckdb/extensions/"+n[a-4]+"/"+n[a-3]+"/"+n[a-2]+"/"),_=h.join(o,n[a-1]);try{if(b.existsSync(o)||b.mkdirSync(o,{recursive:!0}),b.existsSync(_))u=b.readFileSync(_);else{let w=new Int32Array(new SharedArrayBuffer(8));var l=Y("node:worker_threads").Worker,c=new l("const {Worker,isMainThread,parentPort,workerData,} = require('node:worker_threads');var times = 0;var SAB = 23;var Z = 0;async function ZZZ(e) {var x = await fetch(e);var res = await x.arrayBuffer();Atomics.store(SAB, 1, res.byteLength);Atomics.store(SAB, 0, 1);Atomics.notify(SAB, 1);Atomics.notify(SAB, 0);Z = res;};parentPort.on('message', function(event) {if (times == 0) {times++;SAB = event;} else if (times == 1) {times++;ZZZ(event);} else {const a = new Uint8Array(Z);const b = new Uint8Array(event.buffer);var K = Z.byteLength;for (var i = 0; i < K; i++) {b[i] = a[i];}Atomics.notify(event, 0);Atomics.store(SAB, 0, 2);Atomics.notify(SAB, 0);}});",{eval:!0}),u;w[0]=0,w[2]=4,c.postMessage(w),c.postMessage(t),Atomics.wait(w,0,0);let k=new Int32Array(new SharedArrayBuffer(w[1]+3-(w[1]+3)%4));c.postMessage(k),Atomics.wait(w,0,1);var d=new Uint8Array(k.buffer,0,w[1]);u=d,c.terminate(),b.writeFileSync(_,u)}}catch(w){return console.log("Error fetching module",w),0}}else{let y=new XMLHttpRequest;if(y.open("GET",t,!1),y.responseType="arraybuffer",y.send(null),y.status!=200)return 0;u=y.response}for(var p=WebAssembly.validate(u),f=u.byteLength,m=_malloc(f+4),g=new Uint8Array(u),v=0;v{if(!e)return AL.alcErr=40964,1},2198350:e=>{if(!AL.currentCtx)return err("alGetProcAddress() called without a valid context"),1;if(!e)return AL.currentCtx.err=40963,1}};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit(".concat(e,")"),this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,r){var t=GOT[r];return t||(t=GOT[r]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(r)||(t.required=!0),t}},callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,UTF8ArrayToString=(e,r,t)=>{r>>>=0;for(var n=r+t,a=r;e[a]&&!(a>=n);)++a;if(a-r>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(r,a));for(var o="";r>10,56320|u&1023)}}return o},getDylinkMetadata=e=>{var r=0,t=0;function n(){return e[r++]}function a(){for(var T=0,M=1;;){var C=e[r++];if(T+=(C&127)*M,M*=128,!(C&128))break}return T}function o(){var T=a();return r+=T,UTF8ArrayToString(e,r-T,T)}function _(T,M){if(T)throw new Error(M)}var l="dylink.0";if(e instanceof WebAssembly.Module){var c=WebAssembly.Module.customSections(e,l);c.length===0&&(l="dylink",c=WebAssembly.Module.customSections(e,l)),_(c.length===0,"need dylink section"),e=new Uint8Array(c[0]),t=e.length}else{var u=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),d=u[0]==1836278016;_(!d,"need to see wasm magic number"),_(e[8]!==0,"need the dylink section to be first"),r=9;var p=a();t=r+p,l=o()}var f={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(l=="dylink"){f.memorySize=a(),f.memoryAlign=a(),f.tableSize=a(),f.tableAlign=a();for(var m=a(),g=0;g>>0];case"i8":return HEAP8[e>>>0];case"i16":return HEAP16[e>>>1>>>0];case"i32":return HEAP32[e>>>2>>>0];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[e>>>2>>>0];case"double":return HEAPF64[e>>>3>>>0];case"*":return HEAPU32[e>>>2>>>0];default:abort("invalid type for getValue: ".concat(r))}}var newDSO=(e,r,t)=>{var n={refcount:1/0,name:e,exports:t,global:!0};return LDSO.loadedLibsByName[e]=n,r!=null&&(LDSO.loadedLibsByHandle[r]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=2350336,zeroMemory=(e,r)=>(HEAPU8.fill(0,e,e+r),e),alignMemory=(e,r)=>Math.ceil(e/r)*r,getMemory=e=>{if(runtimeInitialized)return zeroMemory(_malloc(e),e);var r=___heap_base,t=r+alignMemory(e,16);return ___heap_base=t,GOT.__heap_base.value=t,r},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:e[0]=="v"?[]:[r[e[0]]]},n=1;n{var t=e.slice(0,1),n=e.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),uleb128Encode(n.length,r);for(var o=0;o{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(r),e);var t=[1];generateFuncType(r,t);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n)),o=new WebAssembly.Instance(a,{e:{f:e}}),_=o.exports.f;return _},wasmTable=new WebAssembly.Table({initial:39735,element:"anyfunc"}),getWasmTableEntry=e=>wasmTable.get(e),updateTableMap=(e,r)=>{if(functionsInTableMap)for(var t=e;t(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return wasmTable.length-1},setWasmTableEntry=(e,r)=>wasmTable.set(e,r),addFunction=(e,r)=>{var t=getFunctionAddress(e);if(t)return t;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(o){if(!(o instanceof TypeError))throw o;var a=convertJsFunctionToWasm(e,r);setWasmTableEntry(n,a)}return functionsInTableMap.set(e,n),n},updateGOT=(e,r)=>{for(var t in e)if(!isInternalSym(t)){var n=e[t];t.startsWith("orig$")&&(t=t.split("$")[1],r=!0),GOT[t]||(GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),(r||GOT[t].value==0)&&(typeof n=="function"?GOT[t].value=addFunction(n):typeof n=="number"?GOT[t].value=n:err("unhandled export type for '".concat(t,"': ").concat(typeof n)))}},relocateExports=(e,r,t)=>{var n={};for(var a in e){var o=e[a];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=r),n[a]=o}return updateGOT(n,t),n},isSymbolDefined=e=>{var r=wasmImports[e];return!(!r||r.stub)},createDyncallWrapper=e=>{var r=[],t=[0,97,115,109,1,0,0,0];r.push(t);var n=[e[0].replace("j","i"),"i",e.slice(1).replace(/j/g,"ii")].join(""),a=[3];generateFuncType(n,a),generateFuncType(e,a),generateFuncType("vi",a);var o=[1];uleb128Encode(a.length,o),o.push(...a),r.push(o);var _=[2,15,2,1,101,1,116,1,112,0,0,1,101,1,114,0,2];r.push(_);var l=[3,2,1,0];r.push(l);var c=[7,5,1,1,102,0,1];r.push(c);var u=[];e[0]==="j"?u=[1,1,126]:u.push(0);function d(b){u.push(32),uleb128Encode(b,u)}for(var p=1,f=1;f{"dynCall_"+e in Module||(Module["dynCall_"+e]=createDyncallWrapper(e));var n=Module["dynCall_"+e];return n(r,...t)},dynCall=(e,r,t=[])=>{if(e.includes("j"))return dynCallLegacy(e,r,t);var n=getWasmTableEntry(r)(...t);return n},createInvokeFunction=e=>function(){var r=stackSave();try{return dynCall(e,arguments[0],Array.prototype.slice.call(arguments,1))}catch(t){if(stackRestore(r),t!==t+0)throw t;_setThrew(1,0)}},resolveGlobalSymbol=(e,r=!1)=>{var t;return r&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)?t=wasmImports[e]:e.startsWith("invoke_")?t=wasmImports[e]=createInvokeFunction(e.split("_")[1]):e.startsWith("__cxa_find_matching_catch_")&&(t=wasmImports[e]=function(){var n=Array.from(arguments),a=findMatchingCatch(n);return a}),{sym:t,name:e}},UTF8ToString=(e,r)=>(e>>>=0,e?UTF8ArrayToString(HEAPU8,e,r):""),loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8>>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8>>>0]=1,HEAPU32[handle+12>>>2>>>0]=memoryBase,HEAP32[handle+16>>>2>>>0]=metadata.memorySize,HEAPU32[handle+20>>>2>>>0]=tableBase,HEAP32[handle+24>>>2>>>0]=metadata.tableSize)}else memoryBase=HEAPU32[handle+12>>>2>>>0],tableBase=HEAPU32[handle+20>>>2>>>0];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(e){var r=resolveGlobalSymbol(e).sym;return!r&&localScope&&(r=localScope[e]),r||(r=moduleExports[e]),r}var proxyHandler={get(e,r){switch(r){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(r in wasmImports&&!wasmImports[r].stub)return wasmImports[r];if(!(r in e)){var t;e[r]=(...n)=>(t||(t=resolveSymbol(r)),t(...n))}return e[r]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func="(".concat(args,") => { ").concat(body," };");ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start ").concat(body,";");moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(e=>postInstantiation(e.module,e.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags.loadAsync?metadata.neededDynlibs.reduce((e,r)=>e.then(()=>loadDynamicLibrary(r,flags)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,r)=>{for(var[t,n]of Object.entries(e))(o=>{isSymbolDefined(o)||(wasmImports[o]=n)})(t),t.startsWith("dynCall_")&&!Module.hasOwnProperty(t)&&(Module[t]=n)},asyncLoad=(e,r,t,n)=>{var a=n?"":"al ".concat(e);readAsync(e,o=>{r(new Uint8Array(o)),a&&removeRunDependency(a)},o=>{if(t)t();else throw'Loading data file "'.concat(e,'" failed.')}),a&&addRunDependency(a)},preloadPlugins=Module.preloadPlugins||[],registerWasmPlugin=()=>{var e={promiseChainEnd:Promise.resolve(),canHandle:r=>!Module.noWasmDecoding&&r.endsWith(".so"),handle:(r,t,n,a)=>{e.promiseChainEnd=e.promiseChainEnd.then(()=>loadWebAssemblyModule(r,{loadAsync:!0,nodelete:!0},t)).then(o=>{preloadedWasm[t]=o,n(r)},o=>{err("failed to instantiate wasm: ".concat(t,": ").concat(o)),a()})}};preloadPlugins.push(e)},preloadedWasm={};function loadDynamicLibrary(e,r={global:!0,nodelete:!0},t,n){var a=LDSO.loadedLibsByName[e];if(a)return r.global?a.global||(a.global=!0,mergeLibSymbols(a.exports,e)):t&&Object.assign(t,a.exports),r.nodelete&&a.refcount!==1/0&&(a.refcount=1/0),a.refcount++,n&&(LDSO.loadedLibsByHandle[n]=a),r.loadAsync?Promise.resolve(!0):!0;a=newDSO(e,n,"loading"),a.refcount=r.nodelete?1/0:1,a.global=r.global;function o(){if(n){var c=HEAPU32[n+28>>>2>>>0],u=HEAPU32[n+32>>>2>>>0];if(c&&u){var d=HEAP8.slice(c,c+u);return r.loadAsync?Promise.resolve(d):d}}var p=locateFile(e);if(r.loadAsync)return new Promise(function(f,m){asyncLoad(p,f,m)});if(!readBinary)throw new Error("".concat(p,": file not found, and synchronous loading of external files is not available"));return readBinary(p)}function _(){var c=preloadedWasm[e];return c?r.loadAsync?Promise.resolve(c):c:r.loadAsync?o().then(u=>loadWebAssemblyModule(u,r,e,t,n)):loadWebAssemblyModule(o(),r,e,t,n)}function l(c){a.global?mergeLibSymbols(c,e):t&&Object.assign(t,c),a.exports=c}return r.loadAsync?_().then(c=>(l(c),!0)):(l(_()),!0)}var reportUndefinedSymbols=()=>{for(var[e,r]of Object.entries(GOT))if(r.value==0){var t=resolveGlobalSymbol(e,!0).sym;if(!t&&!r.required)continue;if(typeof t=="function")r.value=addFunction(t,t.sig);else if(typeof t=="number")r.value=t;else throw new Error("bad export type for '".concat(e,"': ").concat(typeof t))}},loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs"),dynamicLibraries.reduce((e,r)=>e.then(()=>loadDynamicLibrary(r,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency("loadDylibs")})},noExitRuntime=Module.noExitRuntime||!0;function setValue(e,r,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":HEAP8[e>>>0]=r;break;case"i8":HEAP8[e>>>0]=r;break;case"i16":HEAP16[e>>>1>>>0]=r;break;case"i32":HEAP32[e>>>2>>>0]=r;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[e>>>2>>>0]=r;break;case"double":HEAPF64[e>>>3>>>0]=r;break;case"*":HEAPU32[e>>>2>>>0]=r;break;default:abort("invalid type for setValue: ".concat(t))}}function __ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e){return wasmImports._ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e)}__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm.stub=!0;var convertI32PairToI53Checked=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+r*4294967296:NaN;function ___assert_fail(e,r,t,n){e>>>=0,r>>>=0,n>>>=0,abort("Assertion failed: ".concat(UTF8ToString(e),", at: ")+[r?UTF8ToString(r):"unknown filename",t,n?UTF8ToString(n):"unknown function"])}___assert_fail.sig="vppip";function ___call_sighandler(e,r){return e>>>=0,getWasmTableEntry(e)(r)}___call_sighandler.sig="vpi";var exceptionCaught=[],uncaughtExceptionCount=0;function ___cxa_begin_catch(e){e>>>=0;var r=new ExceptionInfo(e);return r.get_caught()||(r.set_caught(!0),uncaughtExceptionCount--),r.set_rethrown(!1),exceptionCaught.push(r),___cxa_increment_exception_refcount(r.excPtr),r.get_exception_ptr()}___cxa_begin_catch.sig="pp";function ___cxa_current_primary_exception(){if(!exceptionCaught.length)return 0;var e=exceptionCaught[exceptionCaught.length-1];return ___cxa_increment_exception_refcount(e.excPtr),e.excPtr}___cxa_current_primary_exception.sig="p";var exceptionLast=0,___cxa_end_catch=()=>{_setThrew(0,0);var e=exceptionCaught.pop();___cxa_decrement_exception_refcount(e.excPtr),exceptionLast=0};___cxa_end_catch.sig="v";class ExceptionInfo{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){HEAPU32[this.ptr+4>>>2>>>0]=r}get_type(){return HEAPU32[this.ptr+4>>>2>>>0]}set_destructor(r){HEAPU32[this.ptr+8>>>2>>>0]=r}get_destructor(){return HEAPU32[this.ptr+8>>>2>>>0]}set_caught(r){r=r?1:0,HEAP8[this.ptr+12>>>0]=r}get_caught(){return HEAP8[this.ptr+12>>>0]!=0}set_rethrown(r){r=r?1:0,HEAP8[this.ptr+13>>>0]=r}get_rethrown(){return HEAP8[this.ptr+13>>>0]!=0}init(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t)}set_adjusted_ptr(r){HEAPU32[this.ptr+16>>>2>>>0]=r}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>>2>>>0]}get_exception_ptr(){var r=___cxa_is_pointer_type(this.get_type());if(r)return HEAPU32[this.excPtr>>>2>>>0];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}function ___resumeException(e){throw e>>>=0,exceptionLast||(exceptionLast=e),exceptionLast}___resumeException.sig="vp";var findMatchingCatch=e=>{var r=exceptionLast;if(!r)return setTempRet0(0),0;var t=new ExceptionInfo(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return setTempRet0(0),r;for(var a in e){var o=e[a];if(o===0||o===n)break;var _=t.ptr+16;if(___cxa_can_catch(o,n,_))return setTempRet0(o),r}return setTempRet0(n),r};function ___cxa_find_matching_catch_2(){return findMatchingCatch([])}___cxa_find_matching_catch_2.sig="p";function ___cxa_find_matching_catch_3(e){return e>>>=0,findMatchingCatch([e])}___cxa_find_matching_catch_3.sig="pp";function ___cxa_find_matching_catch_4(e,r){return e>>>=0,r>>>=0,findMatchingCatch([e,r])}___cxa_find_matching_catch_4.sig="ppp";var ___cxa_rethrow=()=>{var e=exceptionCaught.pop();e||abort("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(exceptionCaught.push(e),e.set_rethrown(!0),e.set_caught(!1),uncaughtExceptionCount++),exceptionLast=r,exceptionLast};___cxa_rethrow.sig="v";function ___cxa_rethrow_primary_exception(e){if(e>>>=0,!!e){var r=new ExceptionInfo(e);exceptionCaught.push(r),r.set_rethrown(!0),___cxa_rethrow()}}___cxa_rethrow_primary_exception.sig="vp";function ___cxa_throw(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=new ExceptionInfo(e);throw n.init(r,t),exceptionLast=e,uncaughtExceptionCount++,exceptionLast}___cxa_throw.sig="vppp";var ___cxa_uncaught_exceptions=()=>uncaughtExceptionCount;___cxa_uncaught_exceptions.sig="i";var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=2350336,___stack_low=2284800,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},2350336),PATH={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return r.exec(e).slice(1)},normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var a=e[n];a==="."?e.splice(n,1):a===".."?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=PATH.isAbs(e),t=e.substr(-1)==="/";return e=PATH.normalizeArray(e.split("/").filter(n=>!!n),!r).join("/"),!e&&!r&&(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=PATH.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"/";e=PATH.normalize(e),e=e.replace(/\/$/,"");var r=e.lastIndexOf("/");return r===-1?e:e.substr(r+1)},join:(...e)=>PATH.normalize(e.join("/")),join2:(e,r)=>PATH.normalize(e+"/"+r)},initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(ENVIRONMENT_IS_NODE)try{var e=Y("crypto"),r=e.randomFillSync;if(r)return n=>e.randomFillSync(n);var t=e.randomBytes;return n=>(n.set(t(n.byteLength)),n)}catch(n){}abort("initRandomDevice")},randomFill=e=>(randomFill=initRandomFill())(e),PATH_FS={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var a=n>=0?e[n]:FS.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,t=PATH.isAbs(a)}return r=PATH.normalizeArray(r.split("/").filter(o=>!!o),!t).join("/"),(t?"/":"")+r||"."},relative:(e,r)=>{e=PATH_FS.resolve(e).substr(1),r=PATH_FS.resolve(r).substr(1);function t(u){for(var d=0;d=0&&u[p]==="";p--);return d>p?[]:u.slice(d,p-d+1)}for(var n=t(e.split("/")),a=t(r.split("/")),o=Math.min(n.length,a.length),_=o,l=0;l{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},stringToUTF8Array=(e,r,t,n)=>{if(t>>>=0,!(n>0))return 0;for(var a=t,o=t+n-1,_=0;_=55296&&l<=57343){var c=e.charCodeAt(++_);l=65536+((l&1023)<<10)|c&1023}if(l<=127){if(t>=o)break;r[t++>>>0]=l}else if(l<=2047){if(t+1>=o)break;r[t++>>>0]=192|l>>6,r[t++>>>0]=128|l&63}else if(l<=65535){if(t+2>=o)break;r[t++>>>0]=224|l>>12,r[t++>>>0]=128|l>>6&63,r[t++>>>0]=128|l&63}else{if(t+3>=o)break;r[t++>>>0]=240|l>>18,r[t++>>>0]=128|l>>12&63,r[t++>>>0]=128|l>>6&63,r[t++>>>0]=128|l&63}}return r[t>>>0]=0,t-a};function intArrayFromString(e,r,t){var n=t>0?t:lengthBytesUTF8(e)+1,a=new Array(n),o=stringToUTF8Array(e,a,0,a.length);return r&&(a.length=o),a}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var e=null;if(ENVIRONMENT_IS_NODE){var r=256,t=Buffer.alloc(r),n=0,a=process.stdin.fd;try{n=fs.readSync(a,t)}catch(o){if(o.toString().includes("EOF"))n=0;else throw o}n>0?e=t.slice(0,n).toString("utf-8"):e=null}else typeof window<"u"&&typeof window.prompt=="function"?(e=window.prompt("Input: "),e!==null&&(e+="\n")):typeof readline=="function"&&(e=readline(),e!==null&&(e+="\n"));if(!e)return null;FS_stdin_getChar_buffer=intArrayFromString(e,!0)}return FS_stdin_getChar_buffer.shift()},TTY={ttys:[],init(){},shutdown(){},register(e,r){TTY.ttys[e]={input:[],output:[],ops:r},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open(e){var r=TTY.ttys[e.node.rdev];if(!r)throw new FS.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,a){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var o=0,_=0;_0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,r,t){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,r){r===null||r===10?(err(UTF8ArrayToString(e.output,0)),e.output=[]):r!=0&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}},mmapAlloc=e=>{e=alignMemory(e,65536);var r=_emscripten_builtin_memalign(65536,e);return r?zeroMemory(r,e):0},MEMFS={ops_table:null,mount(e){return MEMFS.createNode(null,"/",16895,0)},createNode(e,r,t,n){if(FS.isBlkdev(t)||FS.isFIFO(t))throw new FS.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var a=FS.createNode(e,r,t,n);return FS.isDir(a.mode)?(a.node_ops=MEMFS.ops_table.dir.node,a.stream_ops=MEMFS.ops_table.dir.stream,a.contents={}):FS.isFile(a.mode)?(a.node_ops=MEMFS.ops_table.file.node,a.stream_ops=MEMFS.ops_table.file.stream,a.usedBytes=0,a.contents=null):FS.isLink(a.mode)?(a.node_ops=MEMFS.ops_table.link.node,a.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(a.mode)&&(a.node_ops=MEMFS.ops_table.chrdev.node,a.stream_ops=MEMFS.ops_table.chrdev.stream),a.timestamp=Date.now(),e&&(e.contents[r]=a,e.timestamp=a.timestamp),a},getFileDataAsTypedArray(e){return 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)){var n=1024*1024;r=Math.max(r,t*(t>>0),t!=0&&(r=Math.max(r,256));var a=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(a.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(r==0)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=FS.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,FS.isDir(e.mode)?r.size=4096:FS.isFile(e.mode)?r.size=e.usedBytes:FS.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){r.mode!==void 0&&(e.mode=r.mode),r.timestamp!==void 0&&(e.timestamp=r.timestamp),r.size!==void 0&&MEMFS.resizeFileStorage(e,r.size)},lookup(e,r){throw FS.genericErrors[44]},mknod(e,r,t,n){return MEMFS.createNode(e,r,t,n)},rename(e,r,t){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(r,t)}catch(o){}if(n)for(var a in n.contents)throw new FS.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=FS.lookupNode(e,r);for(var n in t.contents)throw new FS.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=MEMFS.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,a){var o=e.node.contents;if(a>=e.node.usedBytes)return 0;var _=Math.min(e.node.usedBytes-a,n);if(_>8&&o.subarray)r.set(o.subarray(a,a+_),t);else for(var l=0;l<_;l++)r[t+l]=o[a+l];return _},write(e,r,t,n,a,o){if(r.buffer===HEAP8.buffer&&(o=!1),!n)return 0;var _=e.node;if(_.timestamp=Date.now(),r.subarray&&(!_.contents||_.contents.subarray)){if(o)return _.contents=r.subarray(t,t+n),_.usedBytes=n,n;if(_.usedBytes===0&&a===0)return _.contents=r.slice(t,t+n),_.usedBytes=n,n;if(a+n<=_.usedBytes)return _.contents.set(r.subarray(t,t+n),a),n}if(MEMFS.expandFileStorage(_,a+n),_.contents.subarray&&r.subarray)_.contents.set(r.subarray(t,t+n),a);else for(var l=0;l0||t+r>>0)}return{ptr:o,allocated:_}},msync(e,r,t,n,a){return MEMFS.stream_ops.write(e,r,0,n,t,!1),0}}},FS_createDataFile=(e,r,t,n,a,o)=>{FS.createDataFile(e,r,t,n,a,o)},FS_handledByPreloadPlugin=(e,r,t,n)=>{typeof Browser<"u"&&Browser.init();var a=!1;return preloadPlugins.forEach(o=>{a||o.canHandle(r)&&(o.handle(e,r,t,n),a=!0)}),a},FS_createPreloadedFile=(e,r,t,n,a,o,_,l,c,u)=>{var d=r?PATH_FS.resolve(PATH.join2(e,r)):e,p="cp ".concat(d);function f(m){function g(v){u==null||u(),l||FS_createDataFile(e,r,v,n,a,c),o==null||o(),removeRunDependency(p)}FS_handledByPreloadPlugin(m,d,g,()=>{_==null||_(),removeRunDependency(p)})||g(m)}addRunDependency(p),typeof t=="string"?asyncLoad(t,f,_):f(t)},FS_modeStringToFlags=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},t=r[e];if(typeof t>"u")throw new Error("Unknown file open mode: ".concat(e));return t},FS_getMode=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(e=PATH_FS.resolve(e),!e)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(r=Object.assign(t,r),r.recurse_count>8)throw new FS.ErrnoError(32);for(var n=e.split("/").filter(p=>!!p),a=FS.root,o="/",_=0;_40)throw new FS.ErrnoError(32)}}return{path:o,node:a}},getPath(e){for(var r;;){if(FS.isRoot(e)){var t=e.mount.mountpoint;return r?t[t.length-1]!=="/"?"".concat(t,"/").concat(r):t+r:t}r=r?"".concat(e.name,"/").concat(r):e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n>>0)%FS.nameTable.length},hashAddNode(e){var r=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[r],FS.nameTable[r]=e},hashRemoveNode(e){var r=FS.hashName(e.parent.id,e.name);if(FS.nameTable[r]===e)FS.nameTable[r]=e.name_next;else for(var t=FS.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=FS.mayLookup(e);if(t)throw new FS.ErrnoError(t);for(var n=FS.hashName(e.id,r),a=FS.nameTable[n];a;a=a.name_next){var o=a.name;if(a.parent.id===e.id&&o===r)return a}return FS.lookup(e,r)},createNode(e,r,t,n){var a=new FS.FSNode(e,r,t,n);return FS.hashAddNode(a),a},destroyNode(e){FS.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)===32768},isDir(e){return(e&61440)===16384},isLink(e){return(e&61440)===40960},isChrdev(e){return(e&61440)===8192},isBlkdev(e){return(e&61440)===24576},isFIFO(e){return(e&61440)===4096},isSocket(e){return(e&49152)===49152},flagsToPermissionString(e){var r=["r","w","rw"][e&3];return e&512&&(r+="w"),r},nodePermissions(e,r){return FS.ignorePermissions?0:r.includes("r")&&!(e.mode&292)||r.includes("w")&&!(e.mode&146)||r.includes("x")&&!(e.mode&73)?2:0},mayLookup(e){if(!FS.isDir(e.mode))return 54;var r=FS.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{var t=FS.lookupNode(e,r);return 20}catch(n){}return FS.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=FS.lookupNode(e,r)}catch(o){return o.errno}var a=FS.nodePermissions(e,"wx");if(a)return a;if(t){if(!FS.isDir(n.mode))return 54;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return 10}else if(FS.isDir(n.mode))return 31;return 0},mayOpen(e,r){return e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&(FS.flagsToPermissionString(r)!=="r"||r&512)?31:FS.nodePermissions(e,FS.flagsToPermissionString(r)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=FS.MAX_OPEN_FDS;e++)if(!FS.streams[e])return e;throw new FS.ErrnoError(33)},getStreamChecked(e){var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);return r},getStream:e=>FS.streams[e],createStream(e,r=-1){return FS.FSStream||(FS.FSStream=function(){this.shared={}},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(t){this.node=t}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(t){this.shared.flags=t}},position:{get(){return this.shared.position},set(t){this.shared.position=t}}})),e=Object.assign(new FS.FSStream,e),r==-1&&(r=FS.nextfd()),e.fd=r,FS.streams[r]=e,e},closeStream(e){FS.streams[e]=null},chrdev_stream_ops:{open(e){var t,n;var r=FS.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,(n=(t=e.stream_ops).open)==null||n.call(t,e)},llseek(){throw new FS.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,r)=>e<<8|r,registerDevice(e,r){FS.devices[e]={stream_ops:r}},getDevice:e=>FS.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){typeof e=="function"&&(r=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: ".concat(FS.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"));var t=FS.getMounts(FS.root.mount),n=0;function a(_){return FS.syncFSRequests--,r(_)}function o(_){if(_)return o.errored?void 0:(o.errored=!0,a(_));++n>=t.length&&a(null)}t.forEach(_=>{if(!_.type.syncfs)return o(null);_.type.syncfs(_,e,o)})},mount(e,r,t){var n=t==="/",a=!t,o;if(n&&FS.root)throw new FS.ErrnoError(10);if(!n&&!a){var _=FS.lookupPath(t,{follow_mount:!1});if(t=_.path,o=_.node,FS.isMountpoint(o))throw new FS.ErrnoError(10);if(!FS.isDir(o.mode))throw new FS.ErrnoError(54)}var l={type:e,opts:r,mountpoint:t,mounts:[]},c=e.mount(l);return c.mount=l,l.root=c,n?FS.root=c:o&&(o.mounted=l,o.mount&&o.mount.mounts.push(l)),c},unmount(e){var r=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(r.node))throw new FS.ErrnoError(28);var t=r.node,n=t.mounted,a=FS.getMounts(n);Object.keys(FS.nameTable).forEach(_=>{for(var l=FS.nameTable[_];l;){var c=l.name_next;a.includes(l.mount)&&FS.destroyNode(l),l=c}}),t.mounted=null;var o=t.mount.mounts.indexOf(n);t.mount.mounts.splice(o,1)},lookup(e,r){return e.node_ops.lookup(e,r)},mknod(e,r,t){var n=FS.lookupPath(e,{parent:!0}),a=n.node,o=PATH.basename(e);if(!o||o==="."||o==="..")throw new FS.ErrnoError(28);var _=FS.mayCreate(a,o);if(_)throw new FS.ErrnoError(_);if(!a.node_ops.mknod)throw new FS.ErrnoError(63);return a.node_ops.mknod(a,o,r,t)},create(e,r){return r=r!==void 0?r:438,r&=4095,r|=32768,FS.mknod(e,r,0)},mkdir(e,r){return r=r!==void 0?r:511,r&=1023,r|=16384,FS.mknod(e,r,0)},mkdirTree(e,r){for(var t=e.split("/"),n="",a=0;a"u"&&(t=r,r=438),r|=8192,FS.mknod(e,r,t)},symlink(e,r){if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var t=FS.lookupPath(r,{parent:!0}),n=t.node;if(!n)throw new FS.ErrnoError(44);var a=PATH.basename(r),o=FS.mayCreate(n,a);if(o)throw new FS.ErrnoError(o);if(!n.node_ops.symlink)throw new FS.ErrnoError(63);return n.node_ops.symlink(n,a,e)},rename(e,r){var t=PATH.dirname(e),n=PATH.dirname(r),a=PATH.basename(e),o=PATH.basename(r),_,l,c;if(_=FS.lookupPath(e,{parent:!0}),l=_.node,_=FS.lookupPath(r,{parent:!0}),c=_.node,!l||!c)throw new FS.ErrnoError(44);if(l.mount!==c.mount)throw new FS.ErrnoError(75);var u=FS.lookupNode(l,a),d=PATH_FS.relative(e,n);if(d.charAt(0)!==".")throw new FS.ErrnoError(28);if(d=PATH_FS.relative(r,t),d.charAt(0)!==".")throw new FS.ErrnoError(55);var p;try{p=FS.lookupNode(c,o)}catch(g){}if(u!==p){var f=FS.isDir(u.mode),m=FS.mayDelete(l,a,f);if(m)throw new FS.ErrnoError(m);if(m=p?FS.mayDelete(c,o,f):FS.mayCreate(c,o),m)throw new FS.ErrnoError(m);if(!l.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(u)||p&&FS.isMountpoint(p))throw new FS.ErrnoError(10);if(c!==l&&(m=FS.nodePermissions(l,"w"),m))throw new FS.ErrnoError(m);FS.hashRemoveNode(u);try{l.node_ops.rename(u,c,o)}catch(g){throw g}finally{FS.hashAddNode(u)}}},rmdir(e){var r=FS.lookupPath(e,{parent:!0}),t=r.node,n=PATH.basename(e),a=FS.lookupNode(t,n),o=FS.mayDelete(t,n,!0);if(o)throw new FS.ErrnoError(o);if(!t.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);t.node_ops.rmdir(t,n),FS.destroyNode(a)},readdir(e){var r=FS.lookupPath(e,{follow:!0}),t=r.node;if(!t.node_ops.readdir)throw new FS.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var r=FS.lookupPath(e,{parent:!0}),t=r.node;if(!t)throw new FS.ErrnoError(44);var n=PATH.basename(e),a=FS.lookupNode(t,n),o=FS.mayDelete(t,n,!1);if(o)throw new FS.ErrnoError(o);if(!t.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);t.node_ops.unlink(t,n),FS.destroyNode(a)},readlink(e){var r=FS.lookupPath(e),t=r.node;if(!t)throw new FS.ErrnoError(44);if(!t.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(t.parent),t.node_ops.readlink(t))},stat(e,r){var t=FS.lookupPath(e,{follow:!r}),n=t.node;if(!n)throw new FS.ErrnoError(44);if(!n.node_ops.getattr)throw new FS.ErrnoError(63);return n.node_ops.getattr(n)},lstat(e){return FS.stat(e,!0)},chmod(e,r,t){var n;if(typeof e=="string"){var a=FS.lookupPath(e,{follow:!t});n=a.node}else n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{mode:r&4095|n.mode&-4096,timestamp:Date.now()})},lchmod(e,r){FS.chmod(e,r,!0)},fchmod(e,r){var t=FS.getStreamChecked(e);FS.chmod(t.node,r)},chown(e,r,t,n){var a;if(typeof e=="string"){var o=FS.lookupPath(e,{follow:!n});a=o.node}else a=e;if(!a.node_ops.setattr)throw new FS.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(e,r,t){FS.chown(e,r,t,!0)},fchown(e,r,t){var n=FS.getStreamChecked(e);FS.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new FS.ErrnoError(28);var t;if(typeof e=="string"){var n=FS.lookupPath(e,{follow:!0});t=n.node}else t=e;if(!t.node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(t.mode))throw new FS.ErrnoError(31);if(!FS.isFile(t.mode))throw new FS.ErrnoError(28);var a=FS.nodePermissions(t,"w");if(a)throw new FS.ErrnoError(a);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=FS.getStreamChecked(e);if(!(t.flags&2097155))throw new FS.ErrnoError(28);FS.truncate(t.node,r)},utime(e,r,t){var n=FS.lookupPath(e,{follow:!0}),a=n.node;a.node_ops.setattr(a,{timestamp:Math.max(r,t)})},open(e,r,t){if(e==="")throw new FS.ErrnoError(44);r=typeof r=="string"?FS_modeStringToFlags(r):r,t=typeof t>"u"?438:t,r&64?t=t&4095|32768:t=0;var n;if(typeof e=="object")n=e;else{e=PATH.normalize(e);try{var a=FS.lookupPath(e,{follow:!(r&131072)});n=a.node}catch(c){}}var o=!1;if(r&64)if(n){if(r&128)throw new FS.ErrnoError(20)}else n=FS.mknod(e,t,0),o=!0;if(!n)throw new FS.ErrnoError(44);if(FS.isChrdev(n.mode)&&(r&=-513),r&65536&&!FS.isDir(n.mode))throw new FS.ErrnoError(54);if(!o){var _=FS.mayOpen(n,r);if(_)throw new FS.ErrnoError(_)}r&512&&!o&&FS.truncate(n,0),r&=-131713;var l=FS.createStream({node:n,path:FS.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),Module.logReadFiles&&!(r&1)&&(FS.readFiles||(FS.readFiles={}),e in FS.readFiles||(FS.readFiles[e]=1)),l},close(e){if(FS.isClosed(e))throw new FS.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{FS.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,r,t){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,a){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if((e.flags&2097155)===1)throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var o=typeof a<"u";if(!o)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var _=e.stream_ops.read(e,r,t,n,a);return o||(e.position+=_),_},write(e,r,t,n,a,o){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);e.seekable&&e.flags&1024&&FS.llseek(e,0,2);var _=typeof a<"u";if(!_)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var l=e.stream_ops.write(e,r,t,n,a,o);return _||(e.position+=l),l},allocate(e,r,t){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(r<0||t<=0)throw new FS.ErrnoError(28);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,a){if(n&2&&!(a&2)&&(e.flags&2097155)!==2)throw new FS.ErrnoError(2);if((e.flags&2097155)===1)throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,a)},msync(e,r,t,n,a){return e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,a):0},munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary",r.encoding!=="utf8"&&r.encoding!=="binary")throw new Error('Invalid encoding type "'.concat(r.encoding,'"'));var t,n=FS.open(e,r.flags),a=FS.stat(e),o=a.size,_=new Uint8Array(o);return FS.read(n,_,0,o,0),r.encoding==="utf8"?t=UTF8ArrayToString(_,0):r.encoding==="binary"&&(t=_),FS.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=FS.open(e,t.flags,t.mode);if(typeof r=="string"){var a=new Uint8Array(lengthBytesUTF8(r)+1),o=stringToUTF8Array(r,a,0,a.length);FS.write(n,a,0,o,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))FS.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");FS.close(n)},cwd:()=>FS.currentPath,chdir(e){var r=FS.lookupPath(e,{follow:!0});if(r.node===null)throw new FS.ErrnoError(44);if(!FS.isDir(r.node.mode))throw new FS.ErrnoError(54);var t=FS.nodePermissions(r.node,"x");if(t)throw new FS.ErrnoError(t);FS.currentPath=r.path},createDefaultDirectories(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(n,a,o,_,l)=>_}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(r===0&&(r=randomFill(e).byteLength),e[--r]);FS.createDevice("/dev","random",t),FS.createDevice("/dev","urandom",t),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var e=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd"),FS.mount({mount(){var r=FS.createNode(e,"fd",16895,73);return r.node_ops={lookup(t,n){var a=+n,o=FS.getStreamChecked(a),_={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>o.path}};return _.parent=_,_}},r}},{},"/proc/self/fd")},createStandardStreams(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var e=FS.open("/dev/stdin",0),r=FS.open("/dev/stdout",1),t=FS.open("/dev/stderr",1)},staticInit(){[44].forEach(e=>{FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack=""}),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS}},init(e,r,t){FS.init.initialized=!0,Module.stdin=e||Module.stdin,Module.stdout=r||Module.stdout,Module.stderr=t||Module.stderr,FS.createStandardStreams()},quit(){FS.init.initialized=!1,_fflush(0);for(var e=0;ethis.length-1||m<0)){var g=m%this.chunkSize,v=m/this.chunkSize|0;return this.getter(v)[g]}},o.prototype.setDataGetter=function(m){this.getter=m},o.prototype.cacheLength=function(){var m=new XMLHttpRequest;if(m.open("HEAD",t,!1),m.send(null),!(m.status>=200&&m.status<300||m.status===304))throw new Error("Couldn't load "+t+". Status: "+m.status);var g=Number(m.getResponseHeader("Content-length")),v,S=(v=m.getResponseHeader("Accept-Ranges"))&&v==="bytes",y=(v=m.getResponseHeader("Content-Encoding"))&&v==="gzip",h=1024*1024;S||(h=g);var b=(k,L)=>{if(k>L)throw new Error("invalid range ("+k+", "+L+") or no bytes requested!");if(L>g-1)throw new Error("only "+g+" bytes available! programmer error!");var E=new XMLHttpRequest;if(E.open("GET",t,!1),g!==h&&E.setRequestHeader("Range","bytes="+k+"-"+L),E.responseType="arraybuffer",E.overrideMimeType&&E.overrideMimeType("text/plain; charset=x-user-defined"),E.send(null),!(E.status>=200&&E.status<300||E.status===304))throw new Error("Couldn't load "+t+". Status: "+E.status);return E.response!==void 0?new Uint8Array(E.response||[]):intArrayFromString(E.responseText||"",!0)},w=this;w.setDataGetter(k=>{var L=k*h,E=(k+1)*h-1;if(E=Math.min(E,g-1),typeof w.chunks[k]>"u"&&(w.chunks[k]=b(L,E)),typeof w.chunks[k]>"u")throw new Error("doXHR failed!");return w.chunks[k]}),(y||!g)&&(h=g=1,g=this.getter(0).length,h=g,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=g,this._chunkSize=h,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var _=new o;Object.defineProperties(_,{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:_}}else var l={isDevice:!1,url:t};var c=FS.createFile(e,r,l,n,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={},d=Object.keys(c.stream_ops);d.forEach(f=>{var m=c.stream_ops[f];u[f]=(...g)=>(FS.forceLoadFile(c),m(...g))});function p(f,m,g,v,S){var y=f.node.contents;if(S>=y.length)return 0;var h=Math.min(y.length-S,v);if(y.slice)for(var b=0;b(FS.forceLoadFile(c),p(f,m,g,v,S)),u.mmap=(f,m,g,v,S)=>{FS.forceLoadFile(c);var y=mmapAlloc(m);if(!y)throw new FS.ErrnoError(48);return p(f,HEAP8,y,m,g),{ptr:y,allocated:!0}},c.stream_ops=u,c}},SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(PATH.isAbs(r))return r;var n;if(e===-100)n=FS.cwd();else{var a=SYSCALLS.getStreamFromFD(e);n=a.path}if(r.length==0){if(!t)throw new FS.ErrnoError(44);return n}return PATH.join2(n,r)},doStat(e,r,t){var n=e(r);HEAP32[t>>>2>>>0]=n.dev,HEAP32[t+4>>>2>>>0]=n.mode,HEAPU32[t+8>>>2>>>0]=n.nlink,HEAP32[t+12>>>2>>>0]=n.uid,HEAP32[t+16>>>2>>>0]=n.gid,HEAP32[t+20>>>2>>>0]=n.rdev,tempI64=[n.size>>>0,(tempDouble=n.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+24>>>2>>>0]=tempI64[0],HEAP32[t+28>>>2>>>0]=tempI64[1],HEAP32[t+32>>>2>>>0]=4096,HEAP32[t+36>>>2>>>0]=n.blocks;var a=n.atime.getTime(),o=n.mtime.getTime(),_=n.ctime.getTime();return tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+40>>>2>>>0]=tempI64[0],HEAP32[t+44>>>2>>>0]=tempI64[1],HEAPU32[t+48>>>2>>>0]=a%1e3*1e3,tempI64=[Math.floor(o/1e3)>>>0,(tempDouble=Math.floor(o/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+56>>>2>>>0]=tempI64[0],HEAP32[t+60>>>2>>>0]=tempI64[1],HEAPU32[t+64>>>2>>>0]=o%1e3*1e3,tempI64=[Math.floor(_/1e3)>>>0,(tempDouble=Math.floor(_/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+72>>>2>>>0]=tempI64[0],HEAP32[t+76>>>2>>>0]=tempI64[1],HEAPU32[t+80>>>2>>>0]=_%1e3*1e3,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+88>>>2>>>0]=tempI64[0],HEAP32[t+92>>>2>>>0]=tempI64[1],0},doMsync(e,r,t,n,a){if(!FS.isFile(r.node.mode))throw new FS.ErrnoError(43);if(n&2)return 0;var o=HEAPU8.slice(e,e+t);FS.msync(r,o,a,t,n)},varargs:void 0,get(){var e=HEAP32[+SYSCALLS.varargs>>>2>>>0];return SYSCALLS.varargs+=4,e},getp(){return SYSCALLS.get()},getStr(e){var r=UTF8ToString(e);return r},getStreamFromFD(e){var r=FS.getStreamChecked(e);return r}};function ___syscall__newselect(e,r,t,n,a){r>>>=0,t>>>=0,n>>>=0,a>>>=0;try{for(var o=0,_=r?HEAP32[r>>>2>>>0]:0,l=r?HEAP32[r+4>>>2>>>0]:0,c=t?HEAP32[t>>>2>>>0]:0,u=t?HEAP32[t+4>>>2>>>0]:0,d=n?HEAP32[n>>>2>>>0]:0,p=n?HEAP32[n+4>>>2>>>0]:0,f=0,m=0,g=0,v=0,S=0,y=0,h=(r?HEAP32[r>>>2>>>0]:0)|(t?HEAP32[t>>>2>>>0]:0)|(n?HEAP32[n>>>2>>>0]:0),b=(r?HEAP32[r+4>>>2>>>0]:0)|(t?HEAP32[t+4>>>2>>>0]:0)|(n?HEAP32[n+4>>>2>>>0]:0),w=function(P,T,M,C){return P<32?T&C:M&C},k=0;k>>2>>>0]:0,F=r?HEAP32[a+4>>>2>>>0]:0;A=(D+F/1e6)*1e3}x=E.stream_ops.poll(E,A)}x&1&&w(k,_,l,L)&&(k<32?f=f|L:m=m|L,o++),x&4&&w(k,c,u,L)&&(k<32?g=g|L:v=v|L,o++),x&2&&w(k,d,p,L)&&(k<32?S=S|L:y=y|L,o++)}}return r&&(HEAP32[r>>>2>>>0]=f,HEAP32[r+4>>>2>>>0]=m),t&&(HEAP32[t>>>2>>>0]=g,HEAP32[t+4>>>2>>>0]=v),n&&(HEAP32[n>>>2>>>0]=S,HEAP32[n+4>>>2>>>0]=y),o}catch(P){if(typeof FS>"u"||P.name!=="ErrnoError")throw P;return-P.errno}}___syscall__newselect.sig="iipppp";var SOCKFS={mount(e){return Module.websocket=Module.websocket&&typeof Module.websocket=="object"?Module.websocket:{},Module.websocket._callbacks={},Module.websocket.on=function(r,t){return typeof t=="function"&&(this._callbacks[r]=t),this},Module.websocket.emit=function(r,t){typeof this._callbacks[r]=="function"&&this._callbacks[r].call(this,t)},FS.createNode(null,"/",16895,0)},createSocket(e,r,t){r&=-526337;var n=r==1;if(n&&t&&t!=6)throw new FS.ErrnoError(66);var a={family:e,type:r,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops},o=SOCKFS.nextname(),_=FS.createNode(SOCKFS.root,o,49152,0);_.sock=a;var l=FS.createStream({path:o,node:_,flags:2,seekable:!1,stream_ops:SOCKFS.stream_ops});return a.stream=l,a},getSocket(e){var r=FS.getStream(e);return!r||!FS.isSocket(r.node.mode)?null:r.node.sock},stream_ops:{poll(e){var r=e.node.sock;return r.sock_ops.poll(r)},ioctl(e,r,t){var n=e.node.sock;return n.sock_ops.ioctl(n,r,t)},read(e,r,t,n,a){var o=e.node.sock,_=o.sock_ops.recvmsg(o,n);return _?(r.set(_.buffer,t),_.buffer.length):0},write(e,r,t,n,a){var o=e.node.sock;return o.sock_ops.sendmsg(o,r,t,n)},close(e){var r=e.node.sock;r.sock_ops.close(r)}},nextname(){return SOCKFS.nextname.current||(SOCKFS.nextname.current=0),"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer(e,r,t){var n;if(typeof r=="object"&&(n=r,r=null,t=null),n)if(n._socket)r=n._socket.remoteAddress,t=n._socket.remotePort;else{var a=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!a)throw new Error("WebSocket URL must be in the format ws(s)://address:port");r=a[1],t=parseInt(a[2],10)}else try{var o=Module.websocket&&typeof Module.websocket=="object",_="ws:#".replace("#","//");if(o&&typeof Module.websocket.url=="string"&&(_=Module.websocket.url),_==="ws://"||_==="wss://"){var l=r.split("/");_=_+l[0]+":"+t+"/"+l.slice(1).join("/")}var c="binary";o&&typeof Module.websocket.subprotocol=="string"&&(c=Module.websocket.subprotocol);var u=void 0;c!=="null"&&(c=c.replace(/^ +| +$/g,"").split(/ *, */),u=c),o&&Module.websocket.subprotocol===null&&(c="null",u=void 0);var d;ENVIRONMENT_IS_NODE?d=ce():d=WebSocket,n=new d(_,u),n.binaryType="arraybuffer"}catch(f){throw new FS.ErrnoError(23)}var p={addr:r,port:t,socket:n,dgram_send_queue:[]};return SOCKFS.websocket_sock_ops.addPeer(e,p),SOCKFS.websocket_sock_ops.handlePeerEvents(e,p),e.type===2&&typeof e.sport<"u"&&p.dgram_send_queue.push(new Uint8Array([255,255,255,255,112,111,114,116,(e.sport&65280)>>8,e.sport&255])),p},getPeer(e,r,t){return e.peers[r+":"+t]},addPeer(e,r){e.peers[r.addr+":"+r.port]=r},removePeer(e,r){delete e.peers[r.addr+":"+r.port]},handlePeerEvents(e,r){var t=!0,n=function(){Module.websocket.emit("open",e.stream.fd);try{for(var o=r.dgram_send_queue.shift();o;)r.socket.send(o),o=r.dgram_send_queue.shift()}catch(_){r.socket.close()}};function a(o){if(typeof o=="string"){var _=new TextEncoder;o=_.encode(o)}else{if(assert(o.byteLength!==void 0),o.byteLength==0)return;o=new Uint8Array(o)}var l=t;if(t=!1,l&&o.length===10&&o[0]===255&&o[1]===255&&o[2]===255&&o[3]===255&&o[4]===112&&o[5]===111&&o[6]===114&&o[7]===116){var c=o[8]<<8|o[9];SOCKFS.websocket_sock_ops.removePeer(e,r),r.port=c,SOCKFS.websocket_sock_ops.addPeer(e,r);return}e.recv_queue.push({addr:r.addr,port:r.port,data:o}),Module.websocket.emit("message",e.stream.fd)}ENVIRONMENT_IS_NODE?(r.socket.on("open",n),r.socket.on("message",function(o,_){_&&a(new Uint8Array(o).buffer)}),r.socket.on("close",function(){Module.websocket.emit("close",e.stream.fd)}),r.socket.on("error",function(o){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})):(r.socket.onopen=n,r.socket.onclose=function(){Module.websocket.emit("close",e.stream.fd)},r.socket.onmessage=function(_){a(_.data)},r.socket.onerror=function(o){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll(e){if(e.type===1&&e.server)return e.pending.length?65:0;var r=0,t=e.type===1?SOCKFS.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(r|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=16),r},ioctl(e,r,t){switch(r){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),HEAP32[t>>>2>>>0]=n,0;default:return 28}},close(e){if(e.server){try{e.server.close()}catch(a){}e.server=null}for(var r=Object.keys(e.peers),t=0;t{var r=SOCKFS.getSocket(e);if(!r)throw new FS.ErrnoError(8);return r},Sockets={BUFFER_SIZE:10240,MAX_BUFFER_SIZE:10485760,nextFd:1,fds:{},nextport:1,maxport:65535,peer:null,connections:{},portmap:{},localAddr:4261412874,addrPool:[33554442,50331658,67108874,83886090,100663306,117440522,134217738,150994954,167772170,184549386,201326602,218103818,234881034]},inetPton4=e=>{for(var r=e.split("."),t=0;t<4;t++){var n=Number(r[t]);if(isNaN(n))return null;r[t]=n}return(r[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0},jstoi_q=e=>parseInt(e),inetPton6=e=>{var r,t,n,a,o,_=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,l=[];if(!_.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),r=e.split(":"),r[r.length-4]=jstoi_q(r[r.length-4])+jstoi_q(r[r.length-3])*256,r[r.length-3]=jstoi_q(r[r.length-2])+jstoi_q(r[r.length-1])*256,r=r.slice(0,r.length-2)):r=e.split(":"),n=0,a=0,t=0;t{switch(r){case 2:t=inetPton4(t),zeroMemory(e,16),a&&(HEAP32[a>>>2>>>0]=16),HEAP16[e>>>1>>>0]=r,HEAP32[e+4>>>2>>>0]=t,HEAP16[e+2>>>1>>>0]=_htons(n);break;case 10:t=inetPton6(t),zeroMemory(e,28),a&&(HEAP32[a>>>2>>>0]=28),HEAP32[e>>>2>>>0]=r,HEAP32[e+8>>>2>>>0]=t[0],HEAP32[e+12>>>2>>>0]=t[1],HEAP32[e+16>>>2>>>0]=t[2],HEAP32[e+20>>>2>>>0]=t[3],HEAP16[e+2>>>1>>>0]=_htons(n);break;default:return 5}return 0},DNS={address_map:{id:1,addrs:{},names:{}},lookup_name(e){var r=inetPton4(e);if(r!==null||(r=inetPton6(e),r!==null))return e;var t;if(DNS.address_map.addrs[e])t=DNS.address_map.addrs[e];else{var n=DNS.address_map.id++;assert(n<65535,"exceeded max address mappings of 65535"),t="172.29."+(n&255)+"."+(n&65280),DNS.address_map.names[t]=e,DNS.address_map.addrs[e]=t}return t},lookup_addr(e){return DNS.address_map.names[e]?DNS.address_map.names[e]:null}};function ___syscall_accept4(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=_.sock_ops.accept(_);if(r)var c=writeSockaddr(r,l.family,DNS.lookup_name(l.daddr),l.dport,t);return l.stream.fd}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_accept4.sig="iippiii";var inetNtop4=e=>(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255),inetNtop6=e=>{var r="",t=0,n=0,a=0,o=0,_=0,l=0,c=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],u=!0,d="";for(l=0;l<5;l++)if(c[l]!==0){u=!1;break}if(u){if(d=inetNtop4(c[6]|c[7]<<16),c[5]===-1)return r="::ffff:",r+=d,r;if(c[5]===0)return r="::",d==="0.0.0.0"&&(d=""),d==="0.0.0.1"&&(d="1"),r+=d,r}for(t=0;t<8;t++)c[t]===0&&(t-a>1&&(_=0),a=t,_++),_>n&&(n=_,o=t-n+1);for(t=0;t<8;t++){if(n>1&&c[t]===0&&t>=o&&t{var t=HEAP16[e>>>1>>>0],n=_ntohs(HEAPU16[e+2>>>1>>>0]),a;switch(t){case 2:if(r!==16)return{errno:28};a=HEAP32[e+4>>>2>>>0],a=inetNtop4(a);break;case 10:if(r!==28)return{errno:28};a=[HEAP32[e+8>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+16>>>2>>>0],HEAP32[e+20>>>2>>>0]],a=inetNtop6(a);break;default:return{errno:5}}return{family:t,addr:a,port:n}},getSocketAddress=(e,r,t)=>{if(t&&e===0)return null;var n=readSockaddr(e,r);if(n.errno)throw new FS.ErrnoError(n.errno);return n.addr=DNS.lookup_addr(n.addr)||n.addr,n};function ___syscall_bind(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=getSocketAddress(r,t);return _.sock_ops.bind(_,l.addr,l.port),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_bind.sig="iippiii";function ___syscall_chdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chdir(e),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_chdir.sig="ip";function ___syscall_chmod(e,r){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chmod(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_chmod.sig="ipi";function ___syscall_connect(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=getSocketAddress(r,t);return _.sock_ops.connect(_,l.addr,l.port),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_connect.sig="iippiii";function ___syscall_dup(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.createStream(r).fd}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_dup.sig="ii";function ___syscall_dup3(e,r,t){try{var n=SYSCALLS.getStreamFromFD(e);if(n.fd===r)return-28;var a=FS.getStream(r);return a&&FS.close(a),FS.createStream(n,r).fd}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_dup3.sig="iiii";function ___syscall_faccessat(e,r,t,n){r>>>=0;try{if(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),t&-8)return-28;var a=FS.lookupPath(r,{follow:!0}),o=a.node;if(!o)return-44;var _="";return t&4&&(_+="r"),t&2&&(_+="w"),t&1&&(_+="x"),_&&FS.nodePermissions(o,_)?-2:0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_faccessat.sig="iipii";var ___syscall_fadvise64=(e,r,t,n)=>0;___syscall_fadvise64.sig="iiiiiii";function ___syscall_fallocate(e,r,t,n,a,o){var _=convertI32PairToI53Checked(t,n),l=convertI32PairToI53Checked(a,o);try{if(isNaN(_))return 61;var c=SYSCALLS.getStreamFromFD(e);return FS.allocate(c,_,l),0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_fallocate.sig="iiiiiii";function ___syscall_fchdir(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.chdir(r.path),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_fchdir.sig="ii";function ___syscall_fchmod(e,r){try{return FS.fchmod(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_fchmod.sig="iii";function ___syscall_fchmodat(e,r,t,n){r>>>=0,n>>>=0,SYSCALLS.varargs=n;try{return r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),FS.chmod(r,t),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_fchmodat.sig="iipip";function ___syscall_fchown32(e,r,t){try{return FS.fchown(e,r,t),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fchown32.sig="iiii";function ___syscall_fchownat(e,r,t,n,a){r>>>=0;try{r=SYSCALLS.getStr(r);var o=a&256;return a=a&-257,r=SYSCALLS.calculateAt(e,r),(o?FS.lchown:FS.chown)(r,t,n),0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_fchownat.sig="iipiii";function ___syscall_fcntl64(e,r,t){t>>>=0,SYSCALLS.varargs=t;try{var n=SYSCALLS.getStreamFromFD(e);switch(r){case 0:{var a=SYSCALLS.get();if(a<0)return-28;for(;FS.streams[a];)a++;var o;return o=FS.createStream(n,a),o.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var a=SYSCALLS.get();return n.flags|=a,0}case 12:{var a=SYSCALLS.getp(),_=0;return HEAP16[a+_>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_fcntl64.sig="iiip";function ___syscall_fdatasync(e){try{var r=SYSCALLS.getStreamFromFD(e);return 0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_fdatasync.sig="ii";function ___syscall_fstat64(e,r){r>>>=0;try{var t=SYSCALLS.getStreamFromFD(e);return SYSCALLS.doStat(FS.stat,t.path,r)}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fstat64.sig="iip";function ___syscall_statfs64(e,r,t){e>>>=0,r>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),HEAP32[t+4>>>2>>>0]=4096,HEAP32[t+40>>>2>>>0]=4096,HEAP32[t+8>>>2>>>0]=1e6,HEAP32[t+12>>>2>>>0]=5e5,HEAP32[t+16>>>2>>>0]=5e5,HEAP32[t+20>>>2>>>0]=FS.nextInode,HEAP32[t+24>>>2>>>0]=1e6,HEAP32[t+28>>>2>>>0]=42,HEAP32[t+44>>>2>>>0]=2,HEAP32[t+36>>>2>>>0]=255,0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_statfs64.sig="ippp";function ___syscall_fstatfs64(e,r,t){r>>>=0,t>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);return ___syscall_statfs64(0,r,t)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_fstatfs64.sig="iipp";function ___syscall_ftruncate64(e,r,t){var n=convertI32PairToI53Checked(r,t);try{return isNaN(n)?61:(FS.ftruncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_ftruncate64.sig="iiii";var stringToUTF8=(e,r,t)=>stringToUTF8Array(e,HEAPU8,r,t);function ___syscall_getcwd(e,r){e>>>=0,r>>>=0;try{if(r===0)return-28;var t=FS.cwd(),n=lengthBytesUTF8(t)+1;return r"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_getcwd.sig="ipp";function ___syscall_getdents64(e,r,t){r>>>=0,t>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);n.getdents||(n.getdents=FS.readdir(n.path));for(var a=280,o=0,_=FS.llseek(n,0,1),l=Math.floor(_/a);l>>0,(tempDouble=c,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+o>>>2>>>0]=tempI64[0],HEAP32[r+o+4>>>2>>>0]=tempI64[1],tempI64=[(l+1)*a>>>0,(tempDouble=(l+1)*a,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+o+8>>>2>>>0]=tempI64[0],HEAP32[r+o+12>>>2>>>0]=tempI64[1],HEAP16[r+o+16>>>1>>>0]=280,HEAP8[r+o+18>>>0]=u,stringToUTF8(d,r+o+19,256),o+=a,l+=1}return FS.llseek(n,l*a,0),o}catch(m){if(typeof FS>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}___syscall_getdents64.sig="iipp";function ___syscall_getpeername(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e);if(!_.daddr)return-53;var l=writeSockaddr(r,_.family,DNS.lookup_name(_.daddr),_.dport,t);return 0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_getpeername.sig="iippiii";function ___syscall_getsockname(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=writeSockaddr(r,_.family,DNS.lookup_name(_.saddr||"0.0.0.0"),_.sport,t);return 0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_getsockname.sig="iippiii";function ___syscall_getsockopt(e,r,t,n,a,o){n>>>=0,a>>>=0;try{var _=getSocketFromFD(e);return r===1&&t===4?(HEAP32[n>>>2>>>0]=_.error,HEAP32[a>>>2>>>0]=4,_.error=null,0):-50}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_getsockopt.sig="iiiippi";function ___syscall_ioctl(e,r,t){t>>>=0,SYSCALLS.varargs=t;try{var n=SYSCALLS.getStreamFromFD(e);switch(r){case 21509:return n.tty?0:-59;case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),o=SYSCALLS.getp();HEAP32[o>>>2>>>0]=a.c_iflag||0,HEAP32[o+4>>>2>>>0]=a.c_oflag||0,HEAP32[o+8>>>2>>>0]=a.c_cflag||0,HEAP32[o+12>>>2>>>0]=a.c_lflag||0;for(var _=0;_<32;_++)HEAP8[o+_+17>>>0]=a.c_cc[_]||0;return 0}return 0}case 21510:case 21511:case 21512:return n.tty?0:-59;case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){for(var o=SYSCALLS.getp(),l=HEAP32[o>>>2>>>0],c=HEAP32[o+4>>>2>>>0],u=HEAP32[o+8>>>2>>>0],d=HEAP32[o+12>>>2>>>0],p=[],_=0;_<32;_++)p.push(HEAP8[o+_+17>>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:l,c_oflag:c,c_cflag:u,c_lflag:d,c_cc:p})}return 0}case 21519:{if(!n.tty)return-59;var o=SYSCALLS.getp();return HEAP32[o>>>2>>>0]=0,0}case 21520:return n.tty?-28:-59;case 21531:{var o=SYSCALLS.getp();return FS.ioctl(n,r,o)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty),o=SYSCALLS.getp();HEAP16[o>>>1>>>0]=f[0],HEAP16[o+2>>>1>>>0]=f[1]}return 0}case 21524:return n.tty?0:-59;case 21515:return n.tty?0:-59;default:return-28}}catch(m){if(typeof FS>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}___syscall_ioctl.sig="iiip";function ___syscall_listen(e,r){try{var t=getSocketFromFD(e);return t.sock_ops.listen(t,r),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_listen.sig="iiiiiii";function ___syscall_lstat64(e,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.lstat,e,r)}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_lstat64.sig="ipp";function ___syscall_mkdirat(e,r,t){r>>>=0;try{return r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),r=PATH.normalize(r),r[r.length-1]==="/"&&(r=r.substr(0,r.length-1)),FS.mkdir(r,t,0),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_mkdirat.sig="iipi";function ___syscall_mknodat(e,r,t,n){r>>>=0;try{switch(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),t&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(r,t,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_mknodat.sig="iipii";function ___syscall_newfstatat(e,r,t,n){r>>>=0,t>>>=0;try{r=SYSCALLS.getStr(r);var a=n&256,o=n&4096;return n=n&-6401,r=SYSCALLS.calculateAt(e,r,o),SYSCALLS.doStat(a?FS.lstat:FS.stat,r,t)}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_newfstatat.sig="iippi";function ___syscall_openat(e,r,t,n){r>>>=0,n>>>=0,SYSCALLS.varargs=n;try{r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r);var a=n?SYSCALLS.get():0;return FS.open(r,t,a).fd}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_openat.sig="iipip";var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount(e){return FS.createNode(null,"/",16895,0)},createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var r=PIPEFS.nextname(),t=PIPEFS.nextname(),n=FS.createNode(PIPEFS.root,r,4096,0),a=FS.createNode(PIPEFS.root,t,4096,0);n.pipe=e,a.pipe=e;var o=FS.createStream({path:r,node:n,flags:0,seekable:!1,stream_ops:PIPEFS.stream_ops});n.stream=o;var _=FS.createStream({path:t,node:a,flags:1,seekable:!1,stream_ops:PIPEFS.stream_ops});return a.stream=_,{readable_fd:o.fd,writable_fd:_.fd}},stream_ops:{poll(e){var r=e.node.pipe;if((e.flags&2097155)===1)return 260;if(r.buckets.length>0)for(var t=0;t0)return 65}return 0},ioctl(e,r,t){return 28},fsync(e){return 28},read(e,r,t,n,a){for(var o=e.node.pipe,_=0,l=0;l=l)return c.buffer.set(_,c.offset),c.offset+=l,l;u>0&&(c.buffer.set(_.subarray(0,u),c.offset),c.offset+=u,_=_.subarray(u,_.byteLength));for(var d=_.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0,p=_.byteLength%PIPEFS.BUCKET_BUFFER_SIZE,f=0;f0){var m={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:_.byteLength,roffset:0};o.buckets.push(m),m.buffer.set(_)}return l},close(e){var r=e.node.pipe;r.refcnt--,r.refcnt===0&&(r.buckets=null)}},nextname(){return PIPEFS.nextname.current||(PIPEFS.nextname.current=0),"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall_pipe(e){e>>>=0;try{if(e==0)throw new FS.ErrnoError(21);var r=PIPEFS.createPipe();return HEAP32[e>>>2>>>0]=r.readable_fd,HEAP32[e+4>>>2>>>0]=r.writable_fd,0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_pipe.sig="ip";function ___syscall_poll(e,r,t){e>>>=0;try{for(var n=0,a=0;a>>2>>>0],l=HEAP16[o+4>>>1>>>0],c=32,u=FS.getStream(_);u&&(c=SYSCALLS.DEFAULT_POLLMASK,u.stream_ops.poll&&(c=u.stream_ops.poll(u,-1))),c&=l|8|16,c&&n++,HEAP16[o+6>>>1>>>0]=c}return n}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_poll.sig="ipii";function ___syscall_readlinkat(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;try{if(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),n<=0)return-28;var a=FS.readlink(r),o=Math.min(n,lengthBytesUTF8(a)),_=HEAP8[t+o>>>0];return stringToUTF8(a,t,n+1),HEAP8[t+o>>>0]=_,o}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_readlinkat.sig="iippp";function ___syscall_recvfrom(e,r,t,n,a,o){r>>>=0,t>>>=0,a>>>=0,o>>>=0;try{var _=getSocketFromFD(e),l=_.sock_ops.recvmsg(_,t);if(!l)return 0;if(a)var c=writeSockaddr(a,_.family,DNS.lookup_name(l.addr),l.port,o);return HEAPU8.set(l.buffer,r>>>0),l.buffer.byteLength}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_recvfrom.sig="iippipp";function ___syscall_recvmsg(e,r,t,n,a,o){r>>>=0;try{for(var _=getSocketFromFD(e),l=HEAPU32[r+8>>>2>>>0],c=HEAP32[r+12>>>2>>>0],u=0,d=0;d>>2>>>0];var p=_.sock_ops.recvmsg(_,u);if(!p)return 0;var f=HEAPU32[r>>>2>>>0];if(f)var m=writeSockaddr(f,_.family,DNS.lookup_name(p.addr),p.port);for(var g=0,v=p.buffer.byteLength,d=0;v>0&&d>>2>>>0],y=HEAP32[l+(8*d+4)>>>2>>>0];if(y){var h=Math.min(y,v),b=p.buffer.subarray(g,g+h);HEAPU8.set(b,S+g>>>0),g+=h,v-=h}}return g}catch(w){if(typeof FS>"u"||w.name!=="ErrnoError")throw w;return-w.errno}}___syscall_recvmsg.sig="iipiiii";function ___syscall_renameat(e,r,t,n){r>>>=0,n>>>=0;try{return r=SYSCALLS.getStr(r),n=SYSCALLS.getStr(n),r=SYSCALLS.calculateAt(e,r),n=SYSCALLS.calculateAt(t,n),FS.rename(r,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_renameat.sig="iipip";function ___syscall_rmdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.rmdir(e),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_rmdir.sig="ip";function ___syscall_sendmsg(e,r,t,n,a,o){r>>>=0,n>>>=0,a>>>=0;try{var _=getSocketFromFD(e),l=HEAPU32[r+8>>>2>>>0],c=HEAP32[r+12>>>2>>>0],u,d,p=HEAPU32[r>>>2>>>0],f=HEAP32[r+4>>>2>>>0];if(p){var m=readSockaddr(p,f);if(m.errno)return-m.errno;d=m.port,u=DNS.lookup_addr(m.addr)||m.addr}for(var g=0,v=0;v>>2>>>0];for(var S=new Uint8Array(g),y=0,v=0;v>>2>>>0],b=HEAP32[l+(8*v+4)>>>2>>>0],w=0;w>>0];return _.sock_ops.sendmsg(_,S,0,g,u,d)}catch(k){if(typeof FS>"u"||k.name!=="ErrnoError")throw k;return-k.errno}}___syscall_sendmsg.sig="iipippi";function ___syscall_sendto(e,r,t,n,a,o){r>>>=0,t>>>=0,a>>>=0,o>>>=0;try{var _=getSocketFromFD(e),l=getSocketAddress(a,o,!0);return l?_.sock_ops.sendmsg(_,HEAP8,r,t,l.addr,l.port):FS.write(_.stream,HEAP8,r,t)}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_sendto.sig="iippipp";function ___syscall_socket(e,r,t){try{var n=SOCKFS.createSocket(e,r,t);return n.stream.fd}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_socket.sig="iiiiiii";function ___syscall_stat64(e,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.stat,e,r)}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_stat64.sig="ipp";function ___syscall_symlink(e,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),r=SYSCALLS.getStr(r),FS.symlink(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_symlink.sig="ipp";function ___syscall_symlinkat(e,r,t){e>>>=0,t>>>=0;try{return t=SYSCALLS.calculateAt(r,t),FS.symlink(e,t),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_symlinkat.sig="ipip";function ___syscall_truncate64(e,r,t){e>>>=0;var n=convertI32PairToI53Checked(r,t);try{return isNaN(n)?61:(e=SYSCALLS.getStr(e),FS.truncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_truncate64.sig="ipii";function ___syscall_unlinkat(e,r,t){r>>>=0;try{return r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),t===0?FS.unlink(r):t===512?FS.rmdir(r):abort("Invalid flags passed to unlinkat"),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_unlinkat.sig="iipi";var readI53FromI64=e=>HEAPU32[e>>>2>>>0]+HEAP32[e+4>>>2>>>0]*4294967296;function ___syscall_utimensat(e,r,t,n){r>>>=0,t>>>=0;try{if(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r,!0),t){var _=readI53FromI64(t),l=HEAP32[t+8>>>2>>>0];a=_*1e3+l/1e6,t+=16,_=readI53FromI64(t),l=HEAP32[t+8>>>2>>>0],o=_*1e3+l/1e6}else var a=Date.now(),o=a;return FS.utime(r,a,o),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_utimensat.sig="iippi";var ___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),ENV={},stringToUTF8OnStack=e=>{var r=lengthBytesUTF8(e)+1,t=stackAlloc(r);return stringToUTF8(e,t,r),t},withStackSave=e=>{var r=stackSave(),t=e();return stackRestore(r),t},dlSetError=e=>{withStackSave(()=>{var r=stringToUTF8OnStack(e);___dl_seterr(r,0)})},dlopenInternal=(e,r)=>{var t=UTF8ToString(e+36),n=HEAP32[e+4>>>2>>>0];t=PATH.normalize(t);var a=[],o=!!(n&256),_=o?null:{},l={global:o,nodelete:!!(n&4096),loadAsync:r.loadAsync};if(r.loadAsync)return loadDynamicLibrary(t,l,_,e);try{return loadDynamicLibrary(t,l,_,e)}catch(c){return dlSetError("Could not load dynamic lib: ".concat(t,"\n").concat(c)),0}};function __dlopen_js(e){return e>>>=0,dlopenInternal(e,{loadAsync:!1})}__dlopen_js.sig="pp";function __dlsym_js(e,r,t){e>>>=0,r>>>=0,t>>>=0,r=UTF8ToString(r);var n,a,o=LDSO.loadedLibsByHandle[e];if(!o.exports.hasOwnProperty(r)||o.exports[r].stub)return dlSetError('Tried to lookup unknown symbol "'.concat(r,'" in dynamic lib: ').concat(o.name)),0;a=Object.keys(o.exports).indexOf(r);var _="orig$"+r;if(n=o.exports[_],n?a=Object.keys(o.exports).indexOf(_):n=o.exports[r],typeof n=="function"){var l=getFunctionAddress(n);l?n=l:(n=addFunction(n,n.sig),HEAPU32[t>>>2>>>0]=a)}return n}__dlsym_js.sig="pppp";function __embind_register_bigint(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0}__embind_register_bigint.sig="vpppiiii";var embind_init_charCodes=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);embind_charCodes=e},embind_charCodes,readLatin1String=e=>{for(var r="",t=e;HEAPU8[t>>>0];)r+=embind_charCodes[HEAPU8[t++>>>0]];return r},awaitingDependencies={},registeredTypes={},typeDependencies={},BindingError,throwBindingError=e=>{throw new BindingError(e)},InternalError,throwInternalError=e=>{throw new InternalError(e)},whenDependentTypesAreResolved=(e,r,t)=>{e.forEach(function(l){typeDependencies[l]=r});function n(l){var c=t(l);c.length!==e.length&&throwInternalError("Mismatched type converter count");for(var u=0;u{registeredTypes.hasOwnProperty(l)?a[c]=registeredTypes[l]:(o.push(l),awaitingDependencies.hasOwnProperty(l)||(awaitingDependencies[l]=[]),awaitingDependencies[l].push(()=>{a[c]=registeredTypes[l],++_,_===o.length&&n(a)}))}),o.length===0&&n(a)};function sharedRegisterType(e,r,t={}){var n=r.name;if(e||throwBindingError('type "'.concat(n,'" must have a positive integer typeid pointer')),registeredTypes.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '".concat(n,"' twice"))}if(registeredTypes[e]=r,delete typeDependencies[e],awaitingDependencies.hasOwnProperty(e)){var a=awaitingDependencies[e];delete awaitingDependencies[e],a.forEach(o=>o())}}function registerType(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return sharedRegisterType(e,r,t)}var GenericWireTypeSize=8;function __embind_register_bool(e,r,t,n){e>>>=0,r>>>=0,r=readLatin1String(r),registerType(e,{name:r,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?t:n},argPackAdvance:GenericWireTypeSize,readValueFromPointer:function(a){return this.fromWireType(HEAPU8[a>>>0])},destructorFunction:null})}__embind_register_bool.sig="vppii";var emval_freelist=[],emval_handles=[];function __emval_decref(e){e>>>=0,e>9&&--emval_handles[e+1]===0&&(emval_handles[e]=void 0,emval_freelist.push(e))}__emval_decref.sig="vp";var count_emval_handles=()=>emval_handles.length/2-5-emval_freelist.length,init_emval=()=>{emval_handles.push(0,1,void 0,1,null,1,!0,1,!1,1),Module.count_emval_handles=count_emval_handles},Emval={toValue:e=>(e||throwBindingError("Cannot use deleted val. handle = "+e),emval_handles[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let r=emval_freelist.pop()||emval_handles.length;return emval_handles[r]=e,emval_handles[r+1]=1,r}}}};function readPointer(e){return this.fromWireType(HEAPU32[e>>>2>>>0])}var EmValType={name:"emscripten::val",fromWireType:e=>{var r=Emval.toValue(e);return __emval_decref(e),r},toWireType:(e,r)=>Emval.toHandle(r),argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:null};function __embind_register_emval(e){return e>>>=0,registerType(e,EmValType)}__embind_register_emval.sig="vp";var embindRepr=e=>{if(e===null)return"null";var r=typeof e;return r==="object"||r==="array"||r==="function"?e.toString():""+e},floatReadValueFromPointer=(e,r)=>{switch(r){case 4:return function(t){return this.fromWireType(HEAPF32[t>>>2>>>0])};case 8:return function(t){return this.fromWireType(HEAPF64[t>>>3>>>0])};default:throw new TypeError("invalid float width (".concat(r,"): ").concat(e))}},__embind_register_float=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,r=readLatin1String(r),registerType(e,{name:r,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:GenericWireTypeSize,readValueFromPointer:floatReadValueFromPointer(r,t),destructorFunction:null})};__embind_register_float.sig="vppp";var integerReadValueFromPointer=(e,r,t)=>{switch(r){case 1:return t?n=>HEAP8[n>>>0]:n=>HEAPU8[n>>>0];case 2:return t?n=>HEAP16[n>>>1>>>0]:n=>HEAPU16[n>>>1>>>0];case 4:return t?n=>HEAP32[n>>>2>>>0]:n=>HEAPU32[n>>>2>>>0];default:throw new TypeError("invalid integer width (".concat(r,"): ").concat(e))}};function __embind_register_integer(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,r=readLatin1String(r),a===-1&&(a=4294967295);var o=d=>d;if(n===0){var _=32-8*t;o=d=>d<<_>>>_}var l=r.includes("unsigned"),c=(d,p)=>{},u;l?u=function(d,p){return c(p,this.name),p>>>0}:u=function(d,p){return c(p,this.name),p},registerType(e,{name:r,fromWireType:o,toWireType:u,argPackAdvance:GenericWireTypeSize,readValueFromPointer:integerReadValueFromPointer(r,t,n!==0),destructorFunction:null})}__embind_register_integer.sig="vpppii";function __embind_register_memory_view(e,r,t){e>>>=0,t>>>=0;var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[r];function o(_){var l=HEAPU32[_>>>2>>>0],c=HEAPU32[_+4>>>2>>>0];return new a(HEAP8.buffer,c,l)}t=readLatin1String(t),registerType(e,{name:t,fromWireType:o,argPackAdvance:GenericWireTypeSize,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}__embind_register_memory_view.sig="vpip";function __embind_register_std_string(e,r){e>>>=0,r>>>=0,r=readLatin1String(r);var t=r==="std::string";registerType(e,{name:r,fromWireType(n){var a=HEAPU32[n>>>2>>>0],o=n+4,_;if(t)for(var l=o,c=0;c<=a;++c){var u=o+c;if(c==a||HEAPU8[u>>>0]==0){var d=u-l,p=UTF8ToString(l,d);_===void 0?_=p:(_+="\0",_+=p),l=u+1}}else{for(var f=new Array(a),c=0;c>>0]);_=f.join("")}return _free(n),_},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,_=typeof a=="string";_||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||throwBindingError("Cannot pass non-string to std::string"),t&&_?o=lengthBytesUTF8(a):o=a.length;var l=_malloc(4+o+1),c=l+4;if(HEAPU32[l>>>2>>>0]=o,t&&_)stringToUTF8(a,c,o+1);else if(_)for(var u=0;u255&&(_free(c),throwBindingError("String has UTF-16 code units that do not fit in 8 bits")),HEAPU8[c+u>>>0]=d}else for(var u=0;u>>0]=a[u];return n!==null&&n.push(_free,l),l},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(n){_free(n)}})}__embind_register_std_string.sig="vpp";var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,UTF16ToString=(e,r)=>{for(var t=e,n=t>>1,a=n+r/2;!(n>=a)&&HEAPU16[n>>>0];)++n;if(t=n<<1,t-e>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(e>>>0,t>>>0));for(var o="",_=0;!(_>=r/2);++_){var l=HEAP16[e+_*2>>>1>>>0];if(l==0)break;o+=String.fromCharCode(l)}return o},stringToUTF16=(e,r,t)=>{if(t!=null||(t=2147483647),t<2)return 0;t-=2;for(var n=r,a=t>>1>>>0]=_,r+=2}return HEAP16[r>>>1>>>0]=0,r-n},lengthBytesUTF16=e=>e.length*2,UTF32ToString=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var a=HEAP32[e+t*4>>>2>>>0];if(a==0)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},stringToUTF32=(e,r,t)=>{if(r>>>=0,t!=null||(t=2147483647),t<4)return 0;for(var n=r,a=n+t-4,o=0;o=55296&&_<=57343){var l=e.charCodeAt(++o);_=65536+((_&1023)<<10)|l&1023}if(HEAP32[r>>>2>>>0]=_,r+=4,r+4>a)break}return HEAP32[r>>>2>>>0]=0,r-n},lengthBytesUTF32=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},__embind_register_std_wstring=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,t=readLatin1String(t);var n,a,o,_;r===2?(n=UTF16ToString,a=stringToUTF16,_=lengthBytesUTF16,o=l=>HEAPU16[l>>>1>>>0]):r===4&&(n=UTF32ToString,a=stringToUTF32,_=lengthBytesUTF32,o=l=>HEAPU32[l>>>2>>>0]),registerType(e,{name:t,fromWireType:l=>{for(var c=HEAPU32[l>>>2>>>0],u,d=l+4,p=0;p<=c;++p){var f=l+4+p*r;if(p==c||o(f)==0){var m=f-d,g=n(d,m);u===void 0?u=g:(u+="\0",u+=g),d=f+r}}return _free(l),u},toWireType:(l,c)=>{typeof c!="string"&&throwBindingError("Cannot pass non-string to C++ string type ".concat(t));var u=_(c),d=_malloc(4+u+r);return HEAPU32[d>>>2>>>0]=u/r,a(c,d+4,u+r),l!==null&&l.push(_free,d),d},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(l){_free(l)}})};__embind_register_std_wstring.sig="vppp";var __embind_register_void=function(e,r){e>>>=0,r>>>=0,r=readLatin1String(r),registerType(e,{isVoid:!0,name:r,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})};__embind_register_void.sig="vpp";var handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},runtimeKeepaliveCounter=0,keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{var r;EXITSTATUS=e,keepRuntimeAlive()||((r=Module.onExit)==null||r.call(Module,e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,r)=>{EXITSTATUS=e,_proc_exit(e)},_exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},callUserCallback=e=>{if(!ABORT)try{e(),maybeExit()}catch(r){handleException(r)}};function __emscripten_dlopen_js(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;function a(l){var c=UTF8ToString(e+36);dlSetError("'Could not load dynamic lib: ".concat(c,"\n").concat(l)),callUserCallback(()=>getWasmTableEntry(t)(e,n))}function o(){callUserCallback(()=>getWasmTableEntry(r)(e,n))}var _=dlopenInternal(e,{loadAsync:!0});_?_.then(o,a):a()}__emscripten_dlopen_js.sig="vpppp";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";function __emscripten_get_progname(e,r){e>>>=0,stringToUTF8(thisProgram,e,r)}__emscripten_get_progname.sig="vpi";function __emscripten_lookup_name(e){e>>>=0;var r=UTF8ToString(e);return inetPton4(DNS.lookup_name(r))}__emscripten_lookup_name.sig="ip";var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";function __emscripten_set_offscreencanvas_size(e,r,t){return e>>>=0,-1}__emscripten_set_offscreencanvas_size.sig="ipii";function __emscripten_system(e){if(e>>>=0,ENVIRONMENT_IS_NODE){if(!e)return 1;var r=UTF8ToString(e);if(!r.length)return 0;var t=["child_process"].map(Y),n=t.spawnSync(r,[],{shell:!0,stdio:"inherit"}),a=(_,l)=>_<<8|l;if(n.status===null){var o=_=>{switch(_){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2};return a(0,o(n.signal))}return a(n.status,0)}return e?-52:0}__emscripten_system.sig="ip";var __emscripten_throw_longjmp=()=>{throw 1/0};__emscripten_throw_longjmp.sig="v";function __gmtime_js(e,r,t){var n=convertI32PairToI53Checked(e,r);t>>>=0;var a=new Date(n*1e3);HEAP32[t>>>2>>>0]=a.getUTCSeconds(),HEAP32[t+4>>>2>>>0]=a.getUTCMinutes(),HEAP32[t+8>>>2>>>0]=a.getUTCHours(),HEAP32[t+12>>>2>>>0]=a.getUTCDate(),HEAP32[t+16>>>2>>>0]=a.getUTCMonth(),HEAP32[t+20>>>2>>>0]=a.getUTCFullYear()-1900,HEAP32[t+24>>>2>>>0]=a.getUTCDay();var o=Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0),_=(a.getTime()-o)/(1e3*60*60*24)|0;HEAP32[t+28>>>2>>>0]=_}__gmtime_js.sig="viip";var isLeapYear=e=>e%4===0&&(e%100!==0||e%400===0),MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335],MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334],ydayFromDate=e=>{var r=isLeapYear(e.getFullYear()),t=r?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE,n=t[e.getMonth()]+e.getDate()-1;return n};function __localtime_js(e,r,t){var n=convertI32PairToI53Checked(e,r);t>>>=0;var a=new Date(n*1e3);HEAP32[t>>>2>>>0]=a.getSeconds(),HEAP32[t+4>>>2>>>0]=a.getMinutes(),HEAP32[t+8>>>2>>>0]=a.getHours(),HEAP32[t+12>>>2>>>0]=a.getDate(),HEAP32[t+16>>>2>>>0]=a.getMonth(),HEAP32[t+20>>>2>>>0]=a.getFullYear()-1900,HEAP32[t+24>>>2>>>0]=a.getDay();var o=ydayFromDate(a)|0;HEAP32[t+28>>>2>>>0]=o,HEAP32[t+36>>>2>>>0]=-(a.getTimezoneOffset()*60);var _=new Date(a.getFullYear(),0,1),l=new Date(a.getFullYear(),6,1).getTimezoneOffset(),c=_.getTimezoneOffset(),u=(l!=c&&a.getTimezoneOffset()==Math.min(c,l))|0;HEAP32[t+32>>>2>>>0]=u}__localtime_js.sig="viip";var __mktime_js=function(e){e>>>=0;var r=(()=>{var t=new Date(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=HEAP32[e+32>>>2>>>0],a=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),_=new Date(t.getFullYear(),6,1).getTimezoneOffset(),l=o.getTimezoneOffset(),c=Math.min(l,_);if(n<0)HEAP32[e+32>>>2>>>0]=+(_!=l&&c==a);else if(n>0!=(c==a)){var u=Math.max(l,_),d=n>0?c:u;t.setTime(t.getTime()+(d-a)*6e4)}HEAP32[e+24>>>2>>>0]=t.getDay();var p=ydayFromDate(t)|0;HEAP32[e+28>>>2>>>0]=p,HEAP32[e>>>2>>>0]=t.getSeconds(),HEAP32[e+4>>>2>>>0]=t.getMinutes(),HEAP32[e+8>>>2>>>0]=t.getHours(),HEAP32[e+12>>>2>>>0]=t.getDate(),HEAP32[e+16>>>2>>>0]=t.getMonth(),HEAP32[e+20>>>2>>>0]=t.getYear();var f=t.getTime();return isNaN(f)?-1:f/1e3})();return setTempRet0((tempDouble=r,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),r>>>0};__mktime_js.sig="ip";function __mmap_js(e,r,t,n,a,o,_,l){e>>>=0;var c=convertI32PairToI53Checked(a,o);_>>>=0,l>>>=0;try{if(isNaN(c))return 61;var u=SYSCALLS.getStreamFromFD(n),d=FS.mmap(u,e,c,r,t),p=d.ptr;return HEAP32[_>>>2>>>0]=d.allocated,HEAPU32[l>>>2>>>0]=p,0}catch(f){if(typeof FS>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}__mmap_js.sig="ipiiiiipp";function __msync_js(e,r,t,n,a,o,_){e>>>=0,r>>>=0;var l=convertI32PairToI53Checked(o,_);try{return isNaN(l)?61:(SYSCALLS.doMsync(e,SYSCALLS.getStreamFromFD(a),r,n,l),0)}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}__msync_js.sig="ippiiiii";function __munmap_js(e,r,t,n,a,o,_){e>>>=0,r>>>=0;var l=convertI32PairToI53Checked(o,_);try{if(isNaN(l))return 61;var c=SYSCALLS.getStreamFromFD(a);t&2&&SYSCALLS.doMsync(e,c,r,n,l),FS.munmap(c)}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}__munmap_js.sig="ippiiiii";var timers={},_emscripten_get_now;_emscripten_get_now=()=>performance.now(),_emscripten_get_now.sig="d";var __setitimer_js=(e,r)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!r)return 0;var t=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},r);return timers[e]={id:t,timeout_ms:r},0};__setitimer_js.sig="iid";var __timegm_js=function(e){e>>>=0;var r=(()=>{var t=Date.UTC(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=new Date(t);HEAP32[e+24>>>2>>>0]=n.getUTCDay();var a=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),o=(n.getTime()-a)/(1e3*60*60*24)|0;return HEAP32[e+28>>>2>>>0]=o,n.getTime()/1e3})();return setTempRet0((tempDouble=r,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),r>>>0};__timegm_js.sig="ip";var stringToNewUTF8=e=>{var r=lengthBytesUTF8(e)+1,t=_malloc(r);return t&&stringToUTF8(e,t,r),t};function __tzset_js(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=new Date().getFullYear(),a=new Date(n,0,1),o=new Date(n,6,1),_=a.getTimezoneOffset(),l=o.getTimezoneOffset(),c=Math.max(_,l);HEAPU32[e>>>2>>>0]=c*60,HEAP32[r>>>2>>>0]=+(_!=l);function u(g){var v=g.toTimeString().match(/\(([A-Za-z ]+)\)$/);return v?v[1]:"GMT"}var d=u(a),p=u(o),f=stringToNewUTF8(d),m=stringToNewUTF8(p);l<_?(HEAPU32[t>>>2>>>0]=f,HEAPU32[t+4>>>2>>>0]=m):(HEAPU32[t>>>2>>>0]=m,HEAPU32[t+4>>>2>>>0]=f)}__tzset_js.sig="vppp";var _abort=()=>{abort("")};_abort.sig="v";var _emscripten_set_main_loop_timing=(e,r)=>{if(Browser.mainLoop.timingMode=e,Browser.mainLoop.timingValue=r,!Browser.mainLoop.func)return 1;if(Browser.mainLoop.running||(Browser.mainLoop.running=!0),e==0)Browser.mainLoop.scheduler=function(){var _=Math.max(0,Browser.mainLoop.tickStartTime+r-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,_)},Browser.mainLoop.method="timeout";else if(e==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(e==2){if(typeof Browser.setImmediate>"u")if(typeof setImmediate>"u"){var t=[],n="setimmediate",a=o=>{(o.data===n||o.data.target===n)&&(o.stopPropagation(),t.shift()())};addEventListener("message",a,!0),Browser.setImmediate=function(_){t.push(_),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(_),postMessage({target:n})):postMessage(n,"*")}}else Browser.setImmediate=setImmediate;Browser.mainLoop.scheduler=function(){Browser.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0};_emscripten_set_main_loop_timing.sig="iii";var setMainLoop=(e,r,t,n,a)=>{assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=e,Browser.mainLoop.arg=n;var o=Browser.mainLoop.currentlyRunningMainloop;function _(){return!(o0){var c=Date.now(),u=Browser.mainLoop.queue.shift();if(u.func(u.arg),Browser.mainLoop.remainingBlockers){var d=Browser.mainLoop.remainingBlockers,p=d%1==0?d-1:Math.floor(d);u.counted?Browser.mainLoop.remainingBlockers=p:(p=p+.5,Browser.mainLoop.remainingBlockers=(8*d+p)/9)}if(Browser.mainLoop.updateStatus(),!_())return;setTimeout(Browser.mainLoop.runner,0);return}if(_()){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.runIter(e),_()&&(typeof SDL=="object"&&((m=(f=SDL.audio)==null?void 0:f.queueNewAudioData)==null||m.call(f)),Browser.mainLoop.scheduler())}}},a||(r&&r>0?_emscripten_set_main_loop_timing(0,1e3/r):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),t)throw"unwind"},safeSetTimeout=(e,r)=>setTimeout(()=>{callUserCallback(e)},r),warnOnce=e=>{warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,ENVIRONMENT_IS_NODE&&(e="warning: "+e),err(e))},Browser={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume(){Browser.mainLoop.currentlyRunningMainloop++;var e=Browser.mainLoop.timingMode,r=Browser.mainLoop.timingValue,t=Browser.mainLoop.func;Browser.mainLoop.func=null,setMainLoop(t,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(e,r),Browser.mainLoop.scheduler()},updateStatus(){if(Module.setStatus){var e=Module.statusMessage||"Please wait...",r=Browser.mainLoop.remainingBlockers,t=Browser.mainLoop.expectedBlockers;r?r{assert(p.complete,"Image ".concat(_," could not be decoded"));var f=document.createElement("canvas");f.width=p.width,f.height=p.height;var m=f.getContext("2d");m.drawImage(p,0,0),preloadedImages[_]=f,URL.revokeObjectURL(d),l==null||l(o)},p.onerror=f=>{err("Image ".concat(d," could not be decoded")),c==null||c()},p.src=d},preloadPlugins.push(e);var r={};r.canHandle=function(o){return!Module.noAudioDecoding&&o.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},r.handle=function(o,_,l,c){var u=!1;function d(v){u||(u=!0,preloadedAudios[_]=v,l==null||l(o))}function p(){u||(u=!0,preloadedAudios[_]=new Audio,c==null||c())}var f=new Blob([o],{type:Browser.getMimetype(_)}),m=URL.createObjectURL(f),g=new Audio;g.addEventListener("canplaythrough",()=>d(g),!1),g.onerror=function(S){if(u)return;err("warning: browser could not fully decode audio ".concat(_,", trying slower base64 approach"));function y(h){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="=",k="",L=0,E=0,x=0;x=6;){var A=L>>E-6&63;E-=6,k+=b[A]}return E==2?(k+=b[(L&3)<<4],k+=w+w):E==4&&(k+=b[(L&15)<<2],k+=w),k}g.src="data:audio/x-"+_.substr(-3)+";base64,"+y(o),d(g)},g.src=m,safeSetTimeout(()=>{d(g)},1e4)},preloadPlugins.push(r);function t(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var n=Module.canvas;n&&(n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock||n.msRequestPointerLock||(()=>{}),n.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),n.exitPointerLock=n.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),Module.elementPointerLock&&n.addEventListener("click",a=>{!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext(e,r,t,n){if(r&&Module.ctx&&e==Module.canvas)return Module.ctx;var a,o;if(r){var _={antialias:!1,alpha:!1,majorVersion:1};if(n)for(var l in n)_[l]=n[l];typeof GL<"u"&&(o=GL.createContext(e,_),o&&(a=GL.getContext(o).GLctx))}else a=e.getContext("2d");return a?(t&&(r||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,r&&GL.makeContextCurrent(o),Module.useWebGL=r,Browser.moduleContextCreatedCallbacks.forEach(c=>c()),Browser.init()),a):null},destroyContext(e,r,t){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen(e,r){Browser.lockPointer=e,Browser.resizeCanvas=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1);var t=Module.canvas;function n(){var _,l;Browser.isFullscreen=!1;var o=t.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===o?(t.exitFullscreen=Browser.exitFullscreen,Browser.lockPointer&&t.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas?Browser.setFullscreenCanvasSize():Browser.updateCanvasDimensions(t)):(o.parentNode.insertBefore(t,o),o.parentNode.removeChild(o),Browser.resizeCanvas?Browser.setWindowedCanvasSize():Browser.updateCanvasDimensions(t)),(_=Module.onFullScreen)==null||_.call(Module,Browser.isFullscreen),(l=Module.onFullscreen)==null||l.call(Module,Browser.isFullscreen)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");t.parentNode.insertBefore(a,t),a.appendChild(t),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?()=>a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(a.webkitRequestFullScreen?()=>a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),a.requestFullscreen()},exitFullscreen(){if(!Browser.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{});return e.apply(document,[]),!0},nextRAF:0,fakeRequestAnimationFrame(e){var r=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=r+1e3/60;else for(;r+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var t=Math.max(Browser.nextRAF-r,0);setTimeout(e,t)},requestAnimationFrame(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var r=Browser.fakeRequestAnimationFrame;r(e)},safeSetTimeout(e,r){return safeSetTimeout(e,r)},safeRequestAnimationFrame(e){return Browser.requestAnimationFrame(()=>{callUserCallback(e)})},getMimetype(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta(e){var r=0;switch(e.type){case"DOMMouseScroll":r=e.detail/3;break;case"mousewheel":r=e.wheelDelta/120;break;case"wheel":switch(r=e.deltaY,e.deltaMode){case 0:r/=100;break;case 1:r/=3;break;case 2:r*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return r},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(e,r){var t=Module.canvas.getBoundingClientRect(),n=Module.canvas.width,a=Module.canvas.height,o=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,_=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset,l=e-(o+t.left),c=r-(_+t.top);return l=l*(n/t.width),c=c*(a/t.height),{x:l,y:c}},setMouseCoords(e,r){let{x:t,y:n}=Browser.calculateMouseCoords(e,r);Browser.mouseMovementX=t-Browser.mouseX,Browser.mouseMovementY=n-Browser.mouseY,Browser.mouseX=t,Browser.mouseY=n},calculateMouseEvent(e){if(Browser.pointerLock)e.type!="mousemove"&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{if(e.type==="touchstart"||e.type==="touchend"||e.type==="touchmove"){var r=e.touch;if(r===void 0)return;var t=Browser.calculateMouseCoords(r.pageX,r.pageY);if(e.type==="touchstart")Browser.lastTouches[r.identifier]=t,Browser.touches[r.identifier]=t;else if(e.type==="touchend"||e.type==="touchmove"){var n=Browser.touches[r.identifier];n||(n=t),Browser.lastTouches[r.identifier]=n,Browser.touches[r.identifier]=t}return}Browser.setMouseCoords(e.pageX,e.pageY)}},resizeListeners:[],updateResizeListeners(){var e=Module.canvas;Browser.resizeListeners.forEach(r=>r(e.width,e.height))},setCanvasSize(e,r,t){var n=Module.canvas;Browser.updateCanvasDimensions(n,e,r),t||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e|8388608,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e&-8388609,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},updateCanvasDimensions(e,r,t){r&&t?(e.widthNative=r,e.heightNative=t):(r=e.widthNative,t=e.heightNative);var n=r,a=t;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(n/aAL.freeIds.length>0?AL.freeIds.pop():AL._nextId++,freeIds:[],scheduleContextAudio:e=>{if(!(Browser.mainLoop.timingMode===1&&document.visibilityState!="visible"))for(var r in e.sources)AL.scheduleSourceAudio(e.sources[r])},scheduleSourceAudio:(e,r)=>{if(!(Browser.mainLoop.timingMode===1&&document.visibilityState!="visible")&&e.state===4114){for(var t=AL.updateSourceTime(e),n=e.bufStartTime,a=e.bufOffset,o=e.bufsProcessed,_=0;_=e.bufQueue.length)if(e.looping)o%=e.bufQueue.length;else break;var d=e.bufQueue[o%e.bufQueue.length];if(d.length===0){if(u++,u===e.bufQueue.length)break}else{var l=e.context.audioCtx.createBufferSource();l.buffer=d.audioBuf,l.playbackRate.value=e.playbackRate,(d.audioBuf._loopStart||d.audioBuf._loopEnd)&&(l.loopStart=d.audioBuf._loopStart,l.loopEnd=d.audioBuf._loopEnd);var p=0;e.type===4136&&e.looping?(p=Number.POSITIVE_INFINITY,l.loop=!0,d.audioBuf._loopStart&&(l.loopStart=d.audioBuf._loopStart),d.audioBuf._loopEnd&&(l.loopEnd=d.audioBuf._loopEnd)):p=(d.audioBuf.duration-a)/e.playbackRate,l._startOffset=a,l._duration=p,l._skipCount=u,u=0,l.connect(e.gain),typeof l.start<"u"?(n=Math.max(n,e.context.audioCtx.currentTime),l.start(n,a)):typeof l.noteOn<"u"&&(n=Math.max(n,e.context.audioCtx.currentTime),l.noteOn(n)),l._startTime=n,e.audioQueue.push(l),n+=p}a=0,o++}}},updateSourceTime:e=>{var r=e.context.audioCtx.currentTime;if(e.state!==4114)return r;isFinite(e.bufStartTime)||(e.bufStartTime=r-e.bufOffset/e.playbackRate,e.bufOffset=0);for(var t=0;e.audioQueue.length;){var n=e.audioQueue[0];if(e.bufsProcessed+=n._skipCount,t=n._startTime+n._duration,r=e.bufQueue.length&&!e.looping)AL.setSourceState(e,4116);else if(e.type===4136&&e.looping){var a=e.bufQueue[0];if(a.length===0)e.bufOffset=0;else{var o=(r-e.bufStartTime)*e.playbackRate,_=a.audioBuf._loopStart||0,l=a.audioBuf._loopEnd||a.audioBuf.duration;l<=_&&(l=a.audioBuf.duration),o0&&(e.bufStartTime+=Math.floor((r-e.bufStartTime)/c)*c)}for(var u=0;u=e.bufQueue.length)if(e.looping)e.bufsProcessed%=e.bufQueue.length;else{AL.setSourceState(e,4116);break}var a=e.bufQueue[e.bufsProcessed];if(a.length>0){if(t=e.bufStartTime+a.audioBuf.duration/e.playbackRate,r{AL.updateSourceTime(e);for(var r=1;r1&&(e.audioQueue.length=1)},stopSourceAudio:e=>{for(var r=0;r{r===4114?((e.state===4114||e.state==4116)&&(e.bufsProcessed=0,e.bufOffset=0),AL.stopSourceAudio(e),e.state=4114,e.bufStartTime=Number.NEGATIVE_INFINITY,AL.scheduleSourceAudio(e)):r===4115?e.state===4114&&(AL.updateSourceTime(e),AL.stopSourceAudio(e),e.state=4115):r===4116?e.state!==4113&&(e.state=4116,e.bufsProcessed=e.bufQueue.length,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e)):r===4113&&e.state!==4113&&(e.state=4113,e.bufsProcessed=0,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e))},initSourcePanner:e=>{if(e.type!==4144){for(var r=AL.buffers[0],t=0;t{for(var r in e.sources)AL.updateSourceGlobal(e.sources[r])},updateSourceGlobal:e=>{var r=e.panner;if(r){r.refDistance=e.refDistance,r.maxDistance=e.maxDistance,r.rolloffFactor=e.rolloffFactor,r.panningModel=e.context.hrtf?"HRTF":"equalpower";var t=e.context.sourceDistanceModel?e.distanceModel:e.context.distanceModel;switch(t){case 0:r.distanceModel="inverse",r.refDistance=340282e33;break;case 53249:case 53250:r.distanceModel="inverse";break;case 53251:case 53252:r.distanceModel="linear";break;case 53253:case 53254:r.distanceModel="exponential";break}}},updateListenerSpace:e=>{var r=e.audioCtx.listener;r.positionX?(r.positionX.value=e.listener.position[0],r.positionY.value=e.listener.position[1],r.positionZ.value=e.listener.position[2]):r.setPosition(e.listener.position[0],e.listener.position[1],e.listener.position[2]),r.forwardX?(r.forwardX.value=e.listener.direction[0],r.forwardY.value=e.listener.direction[1],r.forwardZ.value=e.listener.direction[2],r.upX.value=e.listener.up[0],r.upY.value=e.listener.up[1],r.upZ.value=e.listener.up[2]):r.setOrientation(e.listener.direction[0],e.listener.direction[1],e.listener.direction[2],e.listener.up[0],e.listener.up[1],e.listener.up[2]);for(var t in e.sources)AL.updateSourceSpace(e.sources[t])},updateSourceSpace:e=>{if(e.panner){var r=e.panner,t=e.position[0],n=e.position[1],a=e.position[2],o=e.direction[0],_=e.direction[1],l=e.direction[2],c=e.context.listener,u=c.position[0],d=c.position[1],p=c.position[2];if(e.relative){var f=-c.direction[0],m=-c.direction[1],g=-c.direction[2],v=c.up[0],S=c.up[1],y=c.up[2],h=(Q,ae,se)=>{var oe=Math.sqrt(Q*Q+ae*ae+se*se);return oe{if(e.state===4114){AL.cancelPendingSourceAudio(e);var r=e.audioQueue[0];if(!r)return;var t;e.type===4136&&e.looping?t=Number.POSITIVE_INFINITY:t=(r.buffer.duration-r._startOffset)/e.playbackRate,r._duration=t,r.playbackRate.value=e.playbackRate,AL.scheduleSourceAudio(e)}},sourceDuration:e=>{for(var r=0,t=0;t{AL.updateSourceTime(e);for(var r=0,t=0;t{var t=e.state==4114;if(t&&AL.setSourceState(e,4113),e.bufQueue[e.bufsProcessed].audioBuf!==null){for(e.bufsProcessed=0;r>e.bufQueue[e.bufsProcessed].audioBuf.duration;)r-=e.bufQueue[e.bufsProcessed].audiobuf.duration,e.bufsProcessed++;e.bufOffset=r}t&&AL.setSourceState(e,4114)},getGlobalParam:(e,r)=>{if(!AL.currentCtx)return null;switch(r){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:return AL.currentCtx.err=40962,null}},setGlobalParam:(e,r,t)=>{if(AL.currentCtx)switch(r){case 49152:if(!Number.isFinite(t)||t<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=t,AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(t)||t<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=t,AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(t){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=t,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:(e,r)=>{if(!AL.currentCtx)return null;switch(r){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:return AL.currentCtx.err=40962,null}},setListenerParam:(e,r,t)=>{if(AL.currentCtx){if(t===null){AL.currentCtx.err=40962;return}var n=AL.currentCtx.listener;switch(r){case 4100:if(!Number.isFinite(t[0])||!Number.isFinite(t[1])||!Number.isFinite(t[2])){AL.currentCtx.err=40963;return}n.position[0]=t[0],n.position[1]=t[1],n.position[2]=t[2],AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(t[0])||!Number.isFinite(t[1])||!Number.isFinite(t[2])){AL.currentCtx.err=40963;return}n.velocity[0]=t[0],n.velocity[1]=t[1],n.velocity[2]=t[2],AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(t)||t<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=t;break;case 4111:if(!Number.isFinite(t[0])||!Number.isFinite(t[1])||!Number.isFinite(t[2])||!Number.isFinite(t[3])||!Number.isFinite(t[4])||!Number.isFinite(t[5])){AL.currentCtx.err=40963;return}n.direction[0]=t[0],n.direction[1]=t[1],n.direction[2]=t[2],n.up[0]=t[3],n.up[1]=t[4],n.up[2]=t[5],AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}}},getBufferParam:(e,r,t)=>{if(AL.currentCtx){var n=AL.buffers[r];if(!n||r===0){AL.currentCtx.err=40961;return}switch(t){case 8193:return n.frequency;case 8194:return n.bytesPerSample*8;case 8195:return n.channels;case 8196:return n.length*n.bytesPerSample*n.channels;case 8213:return n.length===0?[0,0]:[(n.audioBuf._loopStart||0)*n.frequency,(n.audioBuf._loopEnd||n.length)*n.frequency];default:return AL.currentCtx.err=40962,null}}},setBufferParam:(e,r,t,n)=>{if(AL.currentCtx){var a=AL.buffers[r];if(!a||r===0){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(t){case 8196:if(n!==0){AL.currentCtx.err=40963;return}break;case 8213:if(n[0]<0||n[0]>a.length||n[1]<0||n[1]>a.Length||n[0]>=n[1]){AL.currentCtx.err=40963;return}if(a.refCount>0){AL.currentCtx.err=40964;return}a.audioBuf&&(a.audioBuf._loopStart=n[0]/a.frequency,a.audioBuf._loopEnd=n[1]/a.frequency);break;default:AL.currentCtx.err=40962;return}}},getSourceParam:(e,r,t)=>{if(!AL.currentCtx)return null;var n=AL.currentCtx.sources[r];if(!n)return AL.currentCtx.err=40961,null;switch(t){case 514:return n.relative;case 4097:return n.coneInnerAngle;case 4098:return n.coneOuterAngle;case 4099:return n.pitch;case 4100:return n.position;case 4101:return n.direction;case 4102:return n.velocity;case 4103:return n.looping;case 4105:return n.type===4136?n.bufQueue[0].id:0;case 4106:return n.gain.gain.value;case 4109:return n.minGain;case 4110:return n.maxGain;case 4112:return n.state;case 4117:return n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufQueue.length;case 4118:return n.bufQueue.length===1&&n.bufQueue[0].id===0||n.looping?0:n.bufsProcessed;case 4128:return n.refDistance;case 4129:return n.rolloffFactor;case 4130:return n.coneOuterGain;case 4131:return n.maxDistance;case 4132:return AL.sourceTell(n);case 4133:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency),a;case 4134:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency*n.bufQueue[0].bytesPerSample),a;case 4135:return n.type;case 4628:return n.spatialize;case 8201:for(var l=0,o=0,_=0;_{if(AL.currentCtx){var a=AL.currentCtx.sources[r];if(!a){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(t){case 514:if(n===1)a.relative=!0,AL.updateSourceSpace(a);else if(n===0)a.relative=!1,AL.updateSourceSpace(a);else{AL.currentCtx.err=40963;return}break;case 4097:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneInnerAngle=n,a.panner&&(a.panner.coneInnerAngle=n%360);break;case 4098:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneOuterAngle=n,a.panner&&(a.panner.coneOuterAngle=n%360);break;case 4099:if(!Number.isFinite(n)||n<=0){AL.currentCtx.err=40963;return}if(a.pitch===n)break;a.pitch=n,AL.updateSourceRate(a);break;case 4100:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.position[0]=n[0],a.position[1]=n[1],a.position[2]=n[2],AL.updateSourceSpace(a);break;case 4101:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.direction[0]=n[0],a.direction[1]=n[1],a.direction[2]=n[2],AL.updateSourceSpace(a);break;case 4102:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.velocity[0]=n[0],a.velocity[1]=n[1],a.velocity[2]=n[2],AL.updateSourceSpace(a);break;case 4103:if(n===1){if(a.looping=!0,AL.updateSourceTime(a),a.type===4136&&a.audioQueue.length>0){var o=a.audioQueue[0];o.loop=!0,o._duration=Number.POSITIVE_INFINITY}}else if(n===0){a.looping=!1;var _=AL.updateSourceTime(a);if(a.type===4136&&a.audioQueue.length>0){var o=a.audioQueue[0];o.loop=!1,o._duration=a.bufQueue[0].audioBuf.duration/a.playbackRate,o._startTime=_-a.bufOffset/a.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(a.state===4114||a.state===4115){AL.currentCtx.err=40964;return}if(n===0){for(var l in a.bufQueue)a.bufQueue[l].refCount--;a.bufQueue.length=1,a.bufQueue[0]=AL.buffers[0],a.bufsProcessed=0,a.type=4144}else{var c=AL.buffers[n];if(!c){AL.currentCtx.err=40963;return}for(var l in a.bufQueue)a.bufQueue[l].refCount--;a.bufQueue.length=0,c.refCount++,a.bufQueue=[c],a.bufsProcessed=0,a.type=4136}AL.initSourcePanner(a),AL.scheduleSourceAudio(a);break;case 4106:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.gain.gain.value=n;break;case 4109:if(!Number.isFinite(n)||n<0||n>Math.min(a.maxGain,1)){AL.currentCtx.err=40963;return}a.minGain=n;break;case 4110:if(!Number.isFinite(n)||n1){AL.currentCtx.err=40963;return}a.maxGain=n;break;case 4128:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.refDistance=n,a.panner&&(a.panner.refDistance=n);break;case 4129:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.rolloffFactor=n,a.panner&&(a.panner.rolloffFactor=n);break;case 4130:if(!Number.isFinite(n)||n<0||n>1){AL.currentCtx.err=40963;return}a.coneOuterGain=n,a.panner&&(a.panner.coneOuterGain=n);break;case 4131:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.maxDistance=n,a.panner&&(a.panner.maxDistance=n);break;case 4132:if(n<0||n>AL.sourceDuration(a)){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4133:var p=AL.sourceDuration(a);if(p>0){var u;for(var d in a.bufQueue)if(d){u=a.bufQueue[d].frequency;break}n/=u}if(n<0||n>p){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4134:var p=AL.sourceDuration(a);if(p>0){var f;for(var d in a.bufQueue)if(d){var c=a.bufQueue[d];f=c.frequency*c.bytesPerSample*c.channels;break}n/=f}if(n<0||n>p){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4628:if(n!==0&&n!==1&&n!==2){AL.currentCtx.err=40963;return}a.spatialize=n,AL.initSourcePanner(a);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(n){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:a.distanceModel=n,AL.currentCtx.sourceDistanceModel&&AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:(e,r)=>{if(e===0)return AL.alcErr=40961,null;var t=AL.captures[e];if(!t)return AL.alcErr=40961,null;var n=t.mediaStreamError;return n?(AL.alcErr=40961,null):t}},_alBuffer3f=(e,r,t,n,a)=>{AL.setBufferParam("alBuffer3f",e,r,null)};_alBuffer3f.sig="viifff";var _alBuffer3i=(e,r,t,n,a)=>{AL.setBufferParam("alBuffer3i",e,r,null)};_alBuffer3i.sig="viiiii";function _alBufferData(e,r,t,n,a){if(t>>>=0,!!AL.currentCtx){var o=AL.buffers[e];if(!o){AL.currentCtx.err=40963;return}if(a<=0){AL.currentCtx.err=40963;return}var _=null;try{switch(r){case 4352:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(1,n,a);for(var l=_.getChannelData(0),c=0;c>>0]*.0078125-1}o.bytesPerSample=1,o.channels=1,o.length=n;break;case 4353:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(1,n>>1,a);var l=_.getChannelData(0);t>>=1;for(var c=0;c>1;++c)l[c]=HEAP16[t++>>>0]*30517578125e-15}o.bytesPerSample=2,o.channels=1,o.length=n>>1;break;case 4354:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(2,n>>1,a);for(var l=_.getChannelData(0),u=_.getChannelData(1),c=0;c>1;++c)l[c]=HEAPU8[t++>>>0]*.0078125-1,u[c]=HEAPU8[t++>>>0]*.0078125-1}o.bytesPerSample=1,o.channels=2,o.length=n>>1;break;case 4355:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(2,n>>2,a);var l=_.getChannelData(0),u=_.getChannelData(1);t>>=1;for(var c=0;c>2;++c)l[c]=HEAP16[t++>>>0]*30517578125e-15,u[c]=HEAP16[t++>>>0]*30517578125e-15}o.bytesPerSample=2,o.channels=2,o.length=n>>2;break;case 65552:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(1,n>>2,a);var l=_.getChannelData(0);t>>=2;for(var c=0;c>2;++c)l[c]=HEAPF32[t++>>>0]}o.bytesPerSample=4,o.channels=1,o.length=n>>2;break;case 65553:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(2,n>>3,a);var l=_.getChannelData(0),u=_.getChannelData(1);t>>=2;for(var c=0;c>3;++c)l[c]=HEAPF32[t++>>>0],u[c]=HEAPF32[t++>>>0]}o.bytesPerSample=4,o.channels=2,o.length=n>>3;break;default:AL.currentCtx.err=40963;return}o.frequency=a,o.audioBuf=_}catch(d){AL.currentCtx.err=40963;return}}}_alBufferData.sig="viipii";var _alBufferf=(e,r,t)=>{AL.setBufferParam("alBufferf",e,r,null)};_alBufferf.sig="viif";function _alBufferfv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}AL.setBufferParam("alBufferfv",e,r,null)}}_alBufferfv.sig="viip";var _alBufferi=(e,r,t)=>{AL.setBufferParam("alBufferi",e,r,null)};_alBufferi.sig="viii";function _alBufferiv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(r){case 8213:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.setBufferParam("alBufferiv",e,r,AL.paramArray);break;default:AL.setBufferParam("alBufferiv",e,r,null);break}}}_alBufferiv.sig="viip";function _alDeleteBuffers(e,r){if(r>>>=0,!!AL.currentCtx){for(var t=0;t>>2>>>0];if(n!==0){if(!AL.buffers[n]){AL.currentCtx.err=40961;return}if(AL.buffers[n].refCount){AL.currentCtx.err=40964;return}}}for(var t=0;t>>2>>>0];n!==0&&(AL.deviceRefCounts[AL.buffers[n].deviceId]--,delete AL.buffers[n],AL.freeIds.push(n))}}}_alDeleteBuffers.sig="vip";var _alSourcei=(e,r,t)=>{switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",e,r,t);break;default:AL.setSourceParam("alSourcei",e,r,null);break}};_alSourcei.sig="viii";function _alDeleteSources(e,r){if(r>>>=0,!!AL.currentCtx){for(var t=0;t>>2>>>0];if(!AL.currentCtx.sources[n]){AL.currentCtx.err=40961;return}}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116),_alSourcei(n,4105,0),delete AL.currentCtx.sources[n],AL.freeIds.push(n)}}}_alDeleteSources.sig="vip";var _alDisable=e=>{if(AL.currentCtx)switch(e){case"AL_SOURCE_DISTANCE_MODEL":AL.currentCtx.sourceDistanceModel=!1,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alDisable.sig="vi";var _alDistanceModel=e=>{AL.setGlobalParam("alDistanceModel",53248,e)};_alDistanceModel.sig="vi";var _alDopplerFactor=e=>{AL.setGlobalParam("alDopplerFactor",49152,e)};_alDopplerFactor.sig="vf";var _alDopplerVelocity=e=>{if(warnOnce("alDopplerVelocity() is deprecated, and only kept for compatibility with OpenAL 1.0. Use alSpeedOfSound() instead."),!!AL.currentCtx&&e<=0){AL.currentCtx.err=40963;return}};_alDopplerVelocity.sig="vf";var _alEnable=e=>{if(AL.currentCtx)switch(e){case"AL_SOURCE_DISTANCE_MODEL":AL.currentCtx.sourceDistanceModel=!0,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alEnable.sig="vi";function _alGenBuffers(e,r){if(r>>>=0,!!AL.currentCtx)for(var t=0;t>>2>>>0]=n.id}}_alGenBuffers.sig="vip";function _alGenSources(e,r){if(r>>>=0,!!AL.currentCtx)for(var t=0;t>>2>>>0]=a.id}}_alGenSources.sig="vip";var _alGetBoolean=e=>{var r=AL.getGlobalParam("alGetBoolean",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r!==0?1:0;default:return AL.currentCtx.err=40962,0}};_alGetBoolean.sig="ii";function _alGetBooleanv(e,r){r>>>=0;var t=AL.getGlobalParam("alGetBooleanv",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAP8[r>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetBooleanv.sig="vip";function _alGetBuffer3f(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getBufferParam("alGetBuffer3f",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3f.sig="viippp";function _alGetBuffer3i(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getBufferParam("alGetBuffer3i",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3i.sig="viippp";function _alGetBufferf(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferf",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferf.sig="viip";function _alGetBufferfv(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferfv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferfv.sig="viip";function _alGetBufferi(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferi",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 8193:case 8194:case 8195:case 8196:HEAP32[t>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetBufferi.sig="viip";function _alGetBufferiv(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferiv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 8193:case 8194:case 8195:case 8196:HEAP32[t>>>2>>>0]=n;break;case 8213:HEAP32[t>>>2>>>0]=n[0],HEAP32[t+4>>>2>>>0]=n[1];break;default:AL.currentCtx.err=40962;return}}}_alGetBufferiv.sig="viip";var _alGetDouble=e=>{var r=AL.getGlobalParam("alGetDouble",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r;default:return AL.currentCtx.err=40962,0}};_alGetDouble.sig="di";function _alGetDoublev(e,r){r>>>=0;var t=AL.getGlobalParam("alGetDoublev",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAPF64[r>>>3>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetDoublev.sig="vip";function _alGetEnumValue(e){if(e>>>=0,!AL.currentCtx)return 0;if(!e)return AL.currentCtx.err=40963,0;var r=UTF8ToString(e);switch(r){case"AL_BITS":return 8194;case"AL_BUFFER":return 4105;case"AL_BUFFERS_PROCESSED":return 4118;case"AL_BUFFERS_QUEUED":return 4117;case"AL_BYTE_OFFSET":return 4134;case"AL_CHANNELS":return 8195;case"AL_CONE_INNER_ANGLE":return 4097;case"AL_CONE_OUTER_ANGLE":return 4098;case"AL_CONE_OUTER_GAIN":return 4130;case"AL_DIRECTION":return 4101;case"AL_DISTANCE_MODEL":return 53248;case"AL_DOPPLER_FACTOR":return 49152;case"AL_DOPPLER_VELOCITY":return 49153;case"AL_EXPONENT_DISTANCE":return 53253;case"AL_EXPONENT_DISTANCE_CLAMPED":return 53254;case"AL_EXTENSIONS":return 45060;case"AL_FORMAT_MONO16":return 4353;case"AL_FORMAT_MONO8":return 4352;case"AL_FORMAT_STEREO16":return 4355;case"AL_FORMAT_STEREO8":return 4354;case"AL_FREQUENCY":return 8193;case"AL_GAIN":return 4106;case"AL_INITIAL":return 4113;case"AL_INVALID":return-1;case"AL_ILLEGAL_ENUM":case"AL_INVALID_ENUM":return 40962;case"AL_INVALID_NAME":return 40961;case"AL_ILLEGAL_COMMAND":case"AL_INVALID_OPERATION":return 40964;case"AL_INVALID_VALUE":return 40963;case"AL_INVERSE_DISTANCE":return 53249;case"AL_INVERSE_DISTANCE_CLAMPED":return 53250;case"AL_LINEAR_DISTANCE":return 53251;case"AL_LINEAR_DISTANCE_CLAMPED":return 53252;case"AL_LOOPING":return 4103;case"AL_MAX_DISTANCE":return 4131;case"AL_MAX_GAIN":return 4110;case"AL_MIN_GAIN":return 4109;case"AL_NONE":return 0;case"AL_NO_ERROR":return 0;case"AL_ORIENTATION":return 4111;case"AL_OUT_OF_MEMORY":return 40965;case"AL_PAUSED":return 4115;case"AL_PENDING":return 8209;case"AL_PITCH":return 4099;case"AL_PLAYING":return 4114;case"AL_POSITION":return 4100;case"AL_PROCESSED":return 8210;case"AL_REFERENCE_DISTANCE":return 4128;case"AL_RENDERER":return 45059;case"AL_ROLLOFF_FACTOR":return 4129;case"AL_SAMPLE_OFFSET":return 4133;case"AL_SEC_OFFSET":return 4132;case"AL_SIZE":return 8196;case"AL_SOURCE_RELATIVE":return 514;case"AL_SOURCE_STATE":return 4112;case"AL_SOURCE_TYPE":return 4135;case"AL_SPEED_OF_SOUND":return 49155;case"AL_STATIC":return 4136;case"AL_STOPPED":return 4116;case"AL_STREAMING":return 4137;case"AL_UNDETERMINED":return 4144;case"AL_UNUSED":return 8208;case"AL_VELOCITY":return 4102;case"AL_VENDOR":return 45057;case"AL_VERSION":return 45058;case"AL_AUTO_SOFT":return 2;case"AL_SOURCE_DISTANCE_MODEL":return 512;case"AL_SOURCE_SPATIALIZE_SOFT":return 4628;case"AL_LOOP_POINTS_SOFT":return 8213;case"AL_BYTE_LENGTH_SOFT":return 8201;case"AL_SAMPLE_LENGTH_SOFT":return 8202;case"AL_SEC_LENGTH_SOFT":return 8203;case"AL_FORMAT_MONO_FLOAT32":return 65552;case"AL_FORMAT_STEREO_FLOAT32":return 65553;default:return AL.currentCtx.err=40963,0}}_alGetEnumValue.sig="ip";var _alGetError=()=>{if(!AL.currentCtx)return 40964;var e=AL.currentCtx.err;return AL.currentCtx.err=0,e};_alGetError.sig="i";var _alGetFloat=e=>{var r=AL.getGlobalParam("alGetFloat",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r;default:return 0}};_alGetFloat.sig="fi";function _alGetFloatv(e,r){r>>>=0;var t=AL.getGlobalParam("alGetFloatv",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAPF32[r>>>2>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetFloatv.sig="vip";var _alGetInteger=e=>{var r=AL.getGlobalParam("alGetInteger",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r;default:return AL.currentCtx.err=40962,0}};_alGetInteger.sig="ii";function _alGetIntegerv(e,r){r>>>=0;var t=AL.getGlobalParam("alGetIntegerv",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAP32[r>>>2>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetIntegerv.sig="vip";function _alGetListener3f(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3f",e);if(a!==null){if(!r||!t||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[r>>>2>>>0]=a[0],HEAPF32[t>>>2>>>0]=a[1],HEAPF32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3f.sig="vippp";function _alGetListener3i(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3i",e);if(a!==null){if(!r||!t||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[r>>>2>>>0]=a[0],HEAP32[t>>>2>>>0]=a[1],HEAP32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3i.sig="vippp";function _alGetListenerf(e,r){r>>>=0;var t=AL.getListenerParam("alGetListenerf",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4106:HEAPF32[r>>>2>>>0]=t;break;default:AL.currentCtx.err=40962;return}}}_alGetListenerf.sig="vip";function _alGetListenerfv(e,r){r>>>=0;var t=AL.getListenerParam("alGetListenerfv",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[r>>>2>>>0]=t[0],HEAPF32[r+4>>>2>>>0]=t[1],HEAPF32[r+8>>>2>>>0]=t[2];break;case 4111:HEAPF32[r>>>2>>>0]=t[0],HEAPF32[r+4>>>2>>>0]=t[1],HEAPF32[r+8>>>2>>>0]=t[2],HEAPF32[r+12>>>2>>>0]=t[3],HEAPF32[r+16>>>2>>>0]=t[4],HEAPF32[r+20>>>2>>>0]=t[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListenerfv.sig="vip";function _alGetListeneri(e,r){r>>>=0;var t=AL.getListenerParam("alGetListeneri",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetListeneri.sig="vip";function _alGetListeneriv(e,r){r>>>=0;var t=AL.getListenerParam("alGetListeneriv",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[r>>>2>>>0]=t[0],HEAP32[r+4>>>2>>>0]=t[1],HEAP32[r+8>>>2>>>0]=t[2];break;case 4111:HEAP32[r>>>2>>>0]=t[0],HEAP32[r+4>>>2>>>0]=t[1],HEAP32[r+8>>>2>>>0]=t[2],HEAP32[r+12>>>2>>>0]=t[3],HEAP32[r+16>>>2>>>0]=t[4],HEAP32[r+20>>>2>>>0]=t[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListeneriv.sig="vip";function _alGetSource3f(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getSourceParam("alGetSource3f",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}switch(r){case 4100:case 4101:case 4102:HEAPF32[t>>>2>>>0]=o[0],HEAPF32[n>>>2>>>0]=o[1],HEAPF32[a>>>2>>>0]=o[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3f.sig="viippp";function _alGetSource3i(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getSourceParam("alGetSource3i",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}switch(r){case 4100:case 4101:case 4102:HEAP32[t>>>2>>>0]=o[0],HEAP32[n>>>2>>>0]=o[1],HEAP32[a>>>2>>>0]=o[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3i.sig="viippp";function _alGetSourcef(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourcef",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[t>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcef.sig="viip";function _alGetSourcefv(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourcefv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[t>>>2>>>0]=n[0];break;case 4100:case 4101:case 4102:HEAPF32[t>>>2>>>0]=n[0],HEAPF32[t+4>>>2>>>0]=n[1],HEAPF32[t+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourcefv.sig="viip";function _alGetSourcei(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourcei",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[t>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcei.sig="viip";function _alGetSourceiv(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourceiv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[t>>>2>>>0]=n;break;case 4100:case 4101:case 4102:HEAP32[t>>>2>>>0]=n[0],HEAP32[t+4>>>2>>>0]=n[1],HEAP32[t+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourceiv.sig="viip";function _alGetString(e){if(AL.stringCache[e])return AL.stringCache[e];var r;switch(e){case 0:r="No Error";break;case 40961:r="Invalid Name";break;case 40962:r="Invalid Enum";break;case 40963:r="Invalid Value";break;case 40964:r="Invalid Operation";break;case 40965:r="Out of Memory";break;case 45057:r="Emscripten";break;case 45058:r="1.1";break;case 45059:r="WebAudio";break;case 45060:r="";for(var t in AL.AL_EXTENSIONS)r=r.concat(t),r=r.concat(" ");r=r.trim();break;default:return AL.currentCtx&&(AL.currentCtx.err=40962),0}return r=stringToNewUTF8(r),AL.stringCache[e]=r,r}_alGetString.sig="pi";var _alIsBuffer=e=>!(!AL.currentCtx||e>AL.buffers.length||!AL.buffers[e]);_alIsBuffer.sig="ii";var _alIsEnabled=e=>{if(!AL.currentCtx)return 0;switch(e){case"AL_SOURCE_DISTANCE_MODEL":return AL.currentCtx.sourceDistanceModel?0:1;default:return AL.currentCtx.err=40962,0}};_alIsEnabled.sig="ii";function _alIsExtensionPresent(e){e>>>=0;var r=UTF8ToString(e);return AL.AL_EXTENSIONS[r]?1:0}_alIsExtensionPresent.sig="ip";var _alIsSource=e=>!(!AL.currentCtx||!AL.currentCtx.sources[e]);_alIsSource.sig="ii";var _alListener3f=(e,r,t,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=t,AL.paramArray[2]=n,AL.setListenerParam("alListener3f",e,AL.paramArray);break;default:AL.setListenerParam("alListener3f",e,null);break}};_alListener3f.sig="vifff";var _alListener3i=(e,r,t,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=t,AL.paramArray[2]=n,AL.setListenerParam("alListener3i",e,AL.paramArray);break;default:AL.setListenerParam("alListener3i",e,null);break}};_alListener3i.sig="viiii";var _alListenerf=(e,r)=>{switch(e){case 4106:AL.setListenerParam("alListenerf",e,r);break;default:AL.setListenerParam("alListenerf",e,null);break}};_alListenerf.sig="vif";function _alListenerfv(e,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAPF32[r>>>2>>>0],AL.paramArray[1]=HEAPF32[r+4>>>2>>>0],AL.paramArray[2]=HEAPF32[r+8>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAPF32[r>>>2>>>0],AL.paramArray[1]=HEAPF32[r+4>>>2>>>0],AL.paramArray[2]=HEAPF32[r+8>>>2>>>0],AL.paramArray[3]=HEAPF32[r+12>>>2>>>0],AL.paramArray[4]=HEAPF32[r+16>>>2>>>0],AL.paramArray[5]=HEAPF32[r+20>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;default:AL.setListenerParam("alListenerfv",e,null);break}}}_alListenerfv.sig="vip";var _alListeneri=(e,r)=>{AL.setListenerParam("alListeneri",e,null)};_alListeneri.sig="vii";function _alListeneriv(e,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.paramArray[2]=HEAP32[r+8>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.paramArray[2]=HEAP32[r+8>>>2>>>0],AL.paramArray[3]=HEAP32[r+12>>>2>>>0],AL.paramArray[4]=HEAP32[r+16>>>2>>>0],AL.paramArray[5]=HEAP32[r+20>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;default:AL.setListenerParam("alListeneriv",e,null);break}}}_alListeneriv.sig="vip";var _alSource3f=(e,r,t,n,a)=>{switch(r){case 4100:case 4101:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3f",e,r,AL.paramArray);break;default:AL.setSourceParam("alSource3f",e,r,null);break}};_alSource3f.sig="viifff";var _alSource3i=(e,r,t,n,a)=>{switch(r){case 4100:case 4101:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3i",e,r,AL.paramArray);break;default:AL.setSourceParam("alSource3i",e,r,null);break}};_alSource3i.sig="viiiii";var _alSourcePause=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4115)}};_alSourcePause.sig="vi";function _alSourcePausev(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4115)}}}_alSourcePausev.sig="vip";var _alSourcePlay=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4114)}};_alSourcePlay.sig="vi";function _alSourcePlayv(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4114)}}}_alSourcePlayv.sig="vip";function _alSourceQueueBuffers(e,r,t){if(t>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(n.type===4136){AL.currentCtx.err=40964;return}if(r!==0){for(var a=AL.buffers[0],o=0;o>>2>>>0],l=AL.buffers[_];if(!l){AL.currentCtx.err=40961;return}a.id!==0&&(l.frequency!==a.frequency||l.bytesPerSample!==a.bytesPerSample||l.channels!==a.channels)&&(AL.currentCtx.err=40964)}n.bufQueue.length===1&&n.bufQueue[0].id===0&&(n.bufQueue.length=0),n.type=4137;for(var o=0;o>>2>>>0],l=AL.buffers[_];l.refCount++,n.bufQueue.push(l)}n.looping&&AL.cancelPendingSourceAudio(n),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceQueueBuffers.sig="viip";var _alSourceRewind=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4116),AL.setSourceState(r,4113)}};_alSourceRewind.sig="vi";function _alSourceRewindv(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4113)}}}_alSourceRewindv.sig="vip";var _alSourceStop=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4116)}};_alSourceStop.sig="vi";function _alSourceStopv(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116)}}}_alSourceStopv.sig="vip";function _alSourceUnqueueBuffers(e,r,t){if(t>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(r>(n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufsProcessed)){AL.currentCtx.err=40963;return}if(r!==0){for(var a=0;a>>2>>>0]=o.id,n.bufsProcessed--}n.bufQueue.length===0&&n.bufQueue.push(AL.buffers[0]),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceUnqueueBuffers.sig="viip";var _alSourcef=(e,r,t)=>{switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:AL.setSourceParam("alSourcef",e,r,t);break;default:AL.setSourceParam("alSourcef",e,r,null);break}};_alSourcef.sig="viif";function _alSourcefv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:var n=HEAPF32[t>>>2>>>0];AL.setSourceParam("alSourcefv",e,r,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAPF32[t>>>2>>>0],AL.paramArray[1]=HEAPF32[t+4>>>2>>>0],AL.paramArray[2]=HEAPF32[t+8>>>2>>>0],AL.setSourceParam("alSourcefv",e,r,AL.paramArray);break;default:AL.setSourceParam("alSourcefv",e,r,null);break}}}_alSourcefv.sig="viip";function _alSourceiv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:var n=HEAP32[t>>>2>>>0];AL.setSourceParam("alSourceiv",e,r,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.paramArray[2]=HEAP32[t+8>>>2>>>0],AL.setSourceParam("alSourceiv",e,r,AL.paramArray);break;default:AL.setSourceParam("alSourceiv",e,r,null);break}}}_alSourceiv.sig="viip";var _alSpeedOfSound=e=>{AL.setGlobalParam("alSpeedOfSound",49155,e)};_alSpeedOfSound.sig="vf";var _alcCaptureCloseDevice=function(e){var t,n,a,o;e>>>=0;var r=AL.requireValidCaptureDevice(e,"alcCaptureCloseDevice");return r?(delete AL.captures[e],AL.freeIds.push(e),(t=r.mediaStreamSourceNode)==null||t.disconnect(),(n=r.mergerNode)==null||n.disconnect(),(a=r.splitterNode)==null||a.disconnect(),(o=r.scriptProcessorNode)==null||o.disconnect(),r.mediaStream&&r.mediaStream.getTracks().forEach(_=>_.stop()),delete r.buffers,r.capturedFrameCount=0,r.isCapturing=!1,!0):!1};_alcCaptureCloseDevice.sig="ip";var listenOnce=(e,r,t)=>{e.addEventListener(r,t,{once:!0})},autoResumeAudioContext=(e,r)=>{r||(r=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach(t=>{r.forEach(n=>{n&&listenOnce(n,t,()=>{e.state==="suspended"&&e.resume()})})})};function _alcCaptureOpenDevice(e,r,t,n){var b;e>>>=0;var a=AL.CAPTURE_DEVICE_NAME;if(e!==0&&(a=UTF8ToString(e),a!==AL.CAPTURE_DEVICE_NAME))return AL.alcErr=40965,0;if(n<0)return AL.alcErr=40964,0;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var o=navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia;if(!o)return AL.alcErr=40965,0;var _=window.AudioContext||window.webkitAudioContext;if(!AL.sharedCaptureAudioCtx)try{AL.sharedCaptureAudioCtx=new _}catch(w){return AL.alcErr=40965,0}autoResumeAudioContext(AL.sharedCaptureAudioCtx);var l;switch(t){case 65552:case 4353:case 4352:l=1;break;case 65553:case 4355:case 4354:l=2;break;default:return AL.alcErr=40964,0}function c(w){return new Float32Array(w)}function u(w){return new Int16Array(w)}function d(w){return new Uint8Array(w)}var p,f;switch(t){case 65552:case 65553:p="f32",f=c;break;case 4353:case 4355:p="i16",f=u;break;case 4352:case 4354:p="u8",f=d;break}var m=[];try{for(var g=0;g{v.mediaStreamError=w},y=w=>{v.mediaStreamSourceNode=v.audioCtx.createMediaStreamSource(w),v.mediaStream=w;var k=1;switch(v.mediaStreamSourceNode.channelCountMode){case"max":k=l;break;case"clamped-max":k=Math.min(l,v.mediaStreamSourceNode.channelCount);break;case"explicit":k=v.mediaStreamSourceNode.channelCount;break}v.inputChannelCount=k;var L=512;v.scriptProcessorNode=v.audioCtx.createScriptProcessor(L,k,l),k>l?(v.mergerNode=v.audioCtx.createChannelMerger(k),v.mediaStreamSourceNode.connect(v.mergerNode),v.mergerNode.connect(v.scriptProcessorNode)):k{if(v.isCapturing){var x=v,A=E.inputBuffer;switch(t){case 65552:for(var P=A.getChannelData(0),D=0;D>>=0,r>>>=0;var n=AL.requireValidCaptureDevice(e,"alcCaptureSamples");if(!n)return;var a=n.requestedSampleRate,o=n.audioCtx.sampleRate,_=o/a;if(t<0||t>n.capturedFrameCount/_){AL.alcErr=40964;return}function l(b,w){HEAPF32[r+4*b>>>2>>>0]=w}function c(b,w){HEAP16[r+2*b>>>1>>>0]=w}function u(b,w){HEAP8[r+b>>>0]=w}var d;switch(n.requestedSampleType){case"f32":d=l;break;case"i16":d=c;break;case"u8":d=u;break;default:return}if(Math.floor(_)==_)for(var p=0,f=0;f>>=0;var r=AL.requireValidCaptureDevice(e,"alcCaptureStart");r&&(r.isCapturing||(r.isCapturing=!0,r.capturedFrameCount=0,r.capturePlayhead=0))}_alcCaptureStart.sig="vp";function _alcCaptureStop(e){e>>>=0;var r=AL.requireValidCaptureDevice(e,"alcCaptureStop");r&&(r.isCapturing=!1)}_alcCaptureStop.sig="vp";function _alcCloseDevice(e){return e>>>=0,!(e in AL.deviceRefCounts)||AL.deviceRefCounts[e]>0?0:(delete AL.deviceRefCounts[e],AL.freeIds.push(e),1)}_alcCloseDevice.sig="ip";function _alcCreateContext(e,r){if(e>>>=0,r>>>=0,!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var t=null,n=[],a=null;if(r>>=2,r)for(var o=0,_=0;o=HEAP32[r++>>>0],n.push(o),o!==0;)switch(_=HEAP32[r++>>>0],n.push(_),o){case 4103:t||(t={}),t.sampleRate=_;break;case 4112:case 4113:break;case 6546:switch(_){case 0:a=!1;break;case 1:a=!0;break;case 2:break;default:return AL.alcErr=40964,0}break;case 6550:if(_!==0)return AL.alcErr=40964,0;break;default:return AL.alcErr=40964,0}var l=window.AudioContext||window.webkitAudioContext,c=null;try{t?c=new l(t):c=new l}catch(m){return m.name==="NotSupportedError"?AL.alcErr=40964:AL.alcErr=40961,0}autoResumeAudioContext(c),typeof c.createGain>"u"&&(c.createGain=c.createGainNode);var u=c.createGain();u.connect(c.destination);var d={deviceId:e,id:AL.newId(),attrs:n,audioCtx:c,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(()=>AL.scheduleContextAudio(d),AL.QUEUE_INTERVAL),gain:u,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:!1,hrtf:a||!1,_err:0,get err(){return this._err},set err(m){(this._err===0||m===0)&&(this._err=m)}};if(AL.deviceRefCounts[e]++,AL.contexts[d.id]=d,a!==null)for(var p in AL.contexts){var f=AL.contexts[p];f.deviceId===e&&(f.hrtf=a,AL.updateContextGlobal(f))}return d.id}_alcCreateContext.sig="ppp";function _alcDestroyContext(e){e>>>=0;var r=AL.contexts[e];if(AL.currentCtx===r){AL.alcErr=40962;return}AL.contexts[e].interval&&clearInterval(AL.contexts[e].interval),AL.deviceRefCounts[r.deviceId]--,delete AL.contexts[e],AL.freeIds.push(e)}_alcDestroyContext.sig="vp";function _alcGetContextsDevice(e){return e>>>=0,e in AL.contexts?AL.contexts[e].deviceId:0}_alcGetContextsDevice.sig="pp";function _alcGetCurrentContext(){return AL.currentCtx!==null?AL.currentCtx.id:0}_alcGetCurrentContext.sig="p";function _alcGetEnumValue(e,r){if(e>>>=0,r>>>=0,e!==0&&!(e in AL.deviceRefCounts))return 0;if(!r)return AL.alcErr=40964,0;var t=UTF8ToString(r);switch(t){case"ALC_NO_ERROR":return 0;case"ALC_INVALID_DEVICE":return 40961;case"ALC_INVALID_CONTEXT":return 40962;case"ALC_INVALID_ENUM":return 40963;case"ALC_INVALID_VALUE":return 40964;case"ALC_OUT_OF_MEMORY":return 40965;case"ALC_MAJOR_VERSION":return 4096;case"ALC_MINOR_VERSION":return 4097;case"ALC_ATTRIBUTES_SIZE":return 4098;case"ALC_ALL_ATTRIBUTES":return 4099;case"ALC_DEFAULT_DEVICE_SPECIFIER":return 4100;case"ALC_DEVICE_SPECIFIER":return 4101;case"ALC_EXTENSIONS":return 4102;case"ALC_FREQUENCY":return 4103;case"ALC_REFRESH":return 4104;case"ALC_SYNC":return 4105;case"ALC_MONO_SOURCES":return 4112;case"ALC_STEREO_SOURCES":return 4113;case"ALC_CAPTURE_DEVICE_SPECIFIER":return 784;case"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER":return 785;case"ALC_CAPTURE_SAMPLES":return 786;case"ALC_HRTF_SOFT":return 6546;case"ALC_HRTF_ID_SOFT":return 6550;case"ALC_DONT_CARE_SOFT":return 2;case"ALC_HRTF_STATUS_SOFT":return 6547;case"ALC_NUM_HRTF_SPECIFIERS_SOFT":return 6548;case"ALC_HRTF_SPECIFIER_SOFT":return 6549;case"ALC_HRTF_DISABLED_SOFT":return 0;case"ALC_HRTF_ENABLED_SOFT":return 1;case"ALC_HRTF_DENIED_SOFT":return 2;case"ALC_HRTF_REQUIRED_SOFT":return 3;case"ALC_HRTF_HEADPHONES_DETECTED_SOFT":return 4;case"ALC_HRTF_UNSUPPORTED_FORMAT_SOFT":return 5;default:return AL.alcErr=40964,0}}_alcGetEnumValue.sig="ipp";function _alcGetError(e){e>>>=0;var r=AL.alcErr;return AL.alcErr=0,r}_alcGetError.sig="ip";function _alcGetIntegerv(e,r,t,n){if(e>>>=0,n>>>=0,!(t===0||!n))switch(r){case 4096:HEAP32[n>>>2>>>0]=1;break;case 4097:HEAP32[n>>>2>>>0]=1;break;case 4098:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.attrs.length;break;case 4099:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}for(var a=0;a>>2>>>0]=AL.currentCtx.attrs[a];break;case 4103:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.audioCtx.sampleRate;break;case 4112:case 4113:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=2147483647;break;case 6546:case 6547:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}var o=0;for(var _ in AL.contexts){var l=AL.contexts[_];l.deviceId===e&&(o=l.hrtf?1:0)}HEAP32[n>>>2>>>0]=o;break;case 6548:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}HEAP32[n>>>2>>>0]=1;break;case 131075:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=1;case 786:var c=AL.requireValidCaptureDevice(e,"alcGetIntegerv");if(!c)return;var u=c.capturedFrameCount,d=c.requestedSampleRate,p=c.audioCtx.sampleRate,f=Math.floor(u*(d/p));HEAP32[n>>>2>>>0]=f;break;default:AL.alcErr=40963;return}}_alcGetIntegerv.sig="vpiip";function _alcGetString(e,r){if(e>>>=0,AL.alcStringCache[r])return AL.alcStringCache[r];var t;switch(r){case 0:t="No Error";break;case 40961:t="Invalid Device";break;case 40962:t="Invalid Context";break;case 40963:t="Invalid Enum";break;case 40964:t="Invalid Value";break;case 40965:t="Out of Memory";break;case 4100:if(typeof AudioContext<"u"||typeof webkitAudioContext<"u")t=AL.DEVICE_NAME;else return 0;break;case 4101:typeof AudioContext<"u"||typeof webkitAudioContext<"u"?t=AL.DEVICE_NAME.concat("\0"):t="\0";break;case 785:t=AL.CAPTURE_DEVICE_NAME;break;case 784:if(e===0)t=AL.CAPTURE_DEVICE_NAME.concat("\0");else{var n=AL.requireValidCaptureDevice(e,"alcGetString");if(!n)return 0;t=n.deviceName}break;case 4102:if(!e)return AL.alcErr=40961,0;t="";for(var a in AL.ALC_EXTENSIONS)t=t.concat(a),t=t.concat(" ");t=t.trim();break;default:return AL.alcErr=40963,0}return t=stringToNewUTF8(t),AL.alcStringCache[r]=t,t}_alcGetString.sig="ppi";function _alcIsExtensionPresent(e,r){e>>>=0,r>>>=0;var t=UTF8ToString(r);return AL.ALC_EXTENSIONS[t]?1:0}_alcIsExtensionPresent.sig="ipp";function _alcMakeContextCurrent(e){return e>>>=0,e===0?AL.currentCtx=null:AL.currentCtx=AL.contexts[e],1}_alcMakeContextCurrent.sig="ip";function _alcOpenDevice(e){if(e>>>=0,e){var r=UTF8ToString(e);if(r!==AL.DEVICE_NAME)return 0}if(typeof AudioContext<"u"||typeof webkitAudioContext<"u"){var t=AL.newId();return AL.deviceRefCounts[t]=0,t}return 0}_alcOpenDevice.sig="pp";function _alcProcessContext(e){e>>>=0}_alcProcessContext.sig="vp";function _alcSuspendContext(e){e>>>=0}_alcSuspendContext.sig="vp";function _duckdb_web_fs_directory_create(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.createDirectory(Module,e,r)}_duckdb_web_fs_directory_create.sig="vpi";function _duckdb_web_fs_directory_exists(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkDirectory(Module,e,r)}_duckdb_web_fs_directory_exists.sig="ipi";function _duckdb_web_fs_directory_list_files(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.listDirectoryEntries(Module,e,r)}_duckdb_web_fs_directory_list_files.sig="ipi";function _duckdb_web_fs_directory_remove(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.removeDirectory(Module,e,r)}_duckdb_web_fs_directory_remove.sig="vpi";function _duckdb_web_fs_file_close(e){return globalThis.DUCKDB_RUNTIME.closeFile(Module,e)}_duckdb_web_fs_file_close.sig="vi";function _duckdb_web_fs_file_exists(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkFile(Module,e,r)}_duckdb_web_fs_file_exists.sig="ipi";function _duckdb_web_fs_file_get_last_modified_time(e){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(Module,e)}_duckdb_web_fs_file_get_last_modified_time.sig="ii";function _duckdb_web_fs_file_move(e,r,t,n){return e>>>=0,t>>>=0,globalThis.DUCKDB_RUNTIME.moveFile(Module,e,r,t,n)}_duckdb_web_fs_file_move.sig="vpipi";function _duckdb_web_fs_file_open(e,r){return globalThis.DUCKDB_RUNTIME.openFile(Module,e,r)}_duckdb_web_fs_file_open.sig="pii";function _duckdb_web_fs_file_read(e,r,t,n){return r>>>=0,globalThis.DUCKDB_RUNTIME.readFile(Module,e,r,t,n)}_duckdb_web_fs_file_read.sig="iipid";function _duckdb_web_fs_file_truncate(e,r){return globalThis.DUCKDB_RUNTIME.truncateFile(Module,e,r)}_duckdb_web_fs_file_truncate.sig="vid";function _duckdb_web_fs_file_write(e,r,t,n){return r>>>=0,globalThis.DUCKDB_RUNTIME.writeFile(Module,e,r,t,n)}_duckdb_web_fs_file_write.sig="iipid";function _duckdb_web_fs_get_default_data_protocol(e){return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(e)}_duckdb_web_fs_get_default_data_protocol.sig="i";function _duckdb_web_fs_glob(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.glob(Module,e,r)}_duckdb_web_fs_glob.sig="vpi";function _duckdb_web_test_platform_feature(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(Module,e)}_duckdb_web_test_platform_feature.sig="ii";function _duckdb_web_udf_scalar_call(e,r,t,n,a,o){return e>>>=0,t>>>=0,a>>>=0,globalThis.DUCKDB_RUNTIME.callScalarUDF(Module,e,r,t,n,a,o)}_duckdb_web_udf_scalar_call.sig="vpipipi";var _emscripten_alcDevicePauseSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.paused){AL.paused=!0;for(var r in AL.contexts){var t=AL.contexts[r];t.deviceId===e&&(t.audioCtx.suspend(),clearInterval(t.interval),t.interval=null)}}};_emscripten_alcDevicePauseSOFT.sig="vi";var _emscripten_alcDeviceResumeSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(AL.paused){AL.paused=!1;for(var r in AL.contexts){var t=AL.contexts[r];t.deviceId===e&&(t.interval=setInterval(()=>AL.scheduleContextAudio(t),AL.QUEUE_INTERVAL),t.audioCtx.resume())}}};_emscripten_alcDeviceResumeSOFT.sig="vi";var _emscripten_alcGetStringiSOFT=(e,r,t)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;if(AL.alcStringCache[r])return AL.alcStringCache[r];var n;switch(r){case 6549:if(t===0)n="Web Audio HRTF";else return AL.alcErr=40964,0;break;default:return t!==0?(AL.alcErr=40963,0):_alcGetString(e,r)}return n=stringToNewUTF8(n),AL.alcStringCache[r]=n,n};_emscripten_alcGetStringiSOFT.sig="iiii";var _emscripten_alcResetDeviceSOFT=(e,r)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var t=null;if(r>>=2,r)for(var n=0,a=0;n=HEAP32[r++>>>0],n!==0;)switch(a=HEAP32[r++>>>0],n){case 6546:a===1?t=!0:a===0&&(t=!1);break}if(t!==null)for(var o in AL.contexts){var _=AL.contexts[o];_.deviceId===e&&(_.hrtf=t,AL.updateContextGlobal(_))}return 1};_emscripten_alcResetDeviceSOFT.sig="iii";var readEmAsmArgsArray=[],readEmAsmArgs=(e,r)=>{readEmAsmArgsArray.length=0;for(var t;t=HEAPU8[e++>>>0];){var n=t!=105;n&=t!=112,r+=n&&r%8?4:0,readEmAsmArgsArray.push(t==112?HEAPU32[r>>>2>>>0]:t==105?HEAP32[r>>>2>>>0]:HEAPF64[r>>>3>>>0]),r+=n?8:4}return readEmAsmArgsArray},runEmAsmFunction=(e,r,t)=>{var n=readEmAsmArgs(r,t);return ASM_CONSTS[e](...n)};function _emscripten_asm_const_int(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runEmAsmFunction(e,r,t)}_emscripten_asm_const_int.sig="ippp";function _emscripten_asm_const_ptr(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runEmAsmFunction(e,r,t)}_emscripten_asm_const_ptr.sig="pppp";function _emscripten_console_error(e){e>>>=0,console.error(UTF8ToString(e))}_emscripten_console_error.sig="vp";function _emscripten_console_log(e){e>>>=0,console.log(UTF8ToString(e))}_emscripten_console_log.sig="vp";function _emscripten_console_warn(e){e>>>=0,console.warn(UTF8ToString(e))}_emscripten_console_warn.sig="vp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";function _emscripten_err(e){return e>>>=0,err(UTF8ToString(e))}_emscripten_err.sig="vp";var getHeapMax=()=>4294901760;function _emscripten_get_heap_max(){return getHeapMax()}_emscripten_get_heap_max.sig="p";var _emscripten_get_now_res=()=>ENVIRONMENT_IS_NODE?1:1e3;_emscripten_get_now_res.sig="d";var webgl_enable_ANGLE_instanced_arrays=e=>{var r=e.getExtension("ANGLE_instanced_arrays");if(r)return e.vertexAttribDivisor=(t,n)=>r.vertexAttribDivisorANGLE(t,n),e.drawArraysInstanced=(t,n,a,o)=>r.drawArraysInstancedANGLE(t,n,a,o),e.drawElementsInstanced=(t,n,a,o,_)=>r.drawElementsInstancedANGLE(t,n,a,o,_),1},webgl_enable_OES_vertex_array_object=e=>{var r=e.getExtension("OES_vertex_array_object");if(r)return e.createVertexArray=()=>r.createVertexArrayOES(),e.deleteVertexArray=t=>r.deleteVertexArrayOES(t),e.bindVertexArray=t=>r.bindVertexArrayOES(t),e.isVertexArray=t=>r.isVertexArrayOES(t),1},webgl_enable_WEBGL_draw_buffers=e=>{var r=e.getExtension("WEBGL_draw_buffers");if(r)return e.drawBuffers=(t,n)=>r.drawBuffersWEBGL(t,n),1},webgl_enable_WEBGL_multi_draw=e=>!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")),getEmscriptenSupportedExtensions=e=>{var r=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw"];return(e.getSupportedExtensions()||[]).filter(t=>r.includes(t))},GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],stringCache:{},unpackAlignment:4,recordError:e=>{GL.lastError||(GL.lastError=e)},getNewId:e=>{for(var r=GL.counter++,t=e.length;t{for(var a=0;a>>2>>>0]=_}},getSource:(e,r,t,n)=>{for(var a="",o=0;o>>2>>>0]:void 0;a+=UTF8ToString(HEAPU32[t+o*4>>>2>>>0],_)}return a},createContext:(e,r)=>{if(!e.getContextSafariWebGL2Fixed){let o=function(_,l){var c=e.getContextSafariWebGL2Fixed(_,l);return _=="webgl"==c instanceof WebGLRenderingContext?c:null};var a=o;e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=o}var t=e.getContext("webgl",r);if(!t)return 0;var n=GL.registerContext(t,r);return n},registerContext:(e,r)=>{var t=GL.getNewId(GL.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),GL.contexts[t]=n,(typeof r.enableExtensionsByDefault>"u"||r.enableExtensionsByDefault)&&GL.initExtensions(n),t},makeContextCurrent:e=>{var r;return GL.currentContext=GL.contexts[e],Module.ctx=GLctx=(r=GL.currentContext)==null?void 0:r.GLctx,!(e&&!GLctx)},getContext:e=>GL.contexts[e],deleteContext:e=>{GL.currentContext===GL.contexts[e]&&(GL.currentContext=null),typeof JSEvents=="object"&&JSEvents.removeAllHandlersOnTarget(GL.contexts[e].GLctx.canvas),GL.contexts[e]&&GL.contexts[e].GLctx.canvas&&(GL.contexts[e].GLctx.canvas.GLctxObject=void 0),GL.contexts[e]=null},initExtensions:e=>{if(e||(e=GL.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;webgl_enable_ANGLE_instanced_arrays(r),webgl_enable_OES_vertex_array_object(r),webgl_enable_WEBGL_draw_buffers(r),r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query"),webgl_enable_WEBGL_multi_draw(r),getEmscriptenSupportedExtensions(r).forEach(t=>{!t.includes("lose_context")&&!t.includes("debug")&&r.getExtension(t)})}}},_glActiveTexture=e=>GLctx.activeTexture(e);_glActiveTexture.sig="vi";var _emscripten_glActiveTexture=_glActiveTexture;_emscripten_glActiveTexture.sig="vi";var _glAttachShader=(e,r)=>{GLctx.attachShader(GL.programs[e],GL.shaders[r])};_glAttachShader.sig="vii";var _emscripten_glAttachShader=_glAttachShader;_emscripten_glAttachShader.sig="vii";var _glBeginQueryEXT=(e,r)=>{GLctx.disjointTimerQueryExt.beginQueryEXT(e,GL.queries[r])};_glBeginQueryEXT.sig="vii";var _emscripten_glBeginQueryEXT=_glBeginQueryEXT;function _glBindAttribLocation(e,r,t){t>>>=0,GLctx.bindAttribLocation(GL.programs[e],r,UTF8ToString(t))}_glBindAttribLocation.sig="viip";var _emscripten_glBindAttribLocation=_glBindAttribLocation;_emscripten_glBindAttribLocation.sig="viip";var _glBindBuffer=(e,r)=>{GLctx.bindBuffer(e,GL.buffers[r])};_glBindBuffer.sig="vii";var _emscripten_glBindBuffer=_glBindBuffer;_emscripten_glBindBuffer.sig="vii";var _glBindFramebuffer=(e,r)=>{GLctx.bindFramebuffer(e,GL.framebuffers[r])};_glBindFramebuffer.sig="vii";var _emscripten_glBindFramebuffer=_glBindFramebuffer;_emscripten_glBindFramebuffer.sig="vii";var _glBindRenderbuffer=(e,r)=>{GLctx.bindRenderbuffer(e,GL.renderbuffers[r])};_glBindRenderbuffer.sig="vii";var _emscripten_glBindRenderbuffer=_glBindRenderbuffer;_emscripten_glBindRenderbuffer.sig="vii";var _glBindTexture=(e,r)=>{GLctx.bindTexture(e,GL.textures[r])};_glBindTexture.sig="vii";var _emscripten_glBindTexture=_glBindTexture;_emscripten_glBindTexture.sig="vii";var _glBindVertexArray=e=>{GLctx.bindVertexArray(GL.vaos[e])};_glBindVertexArray.sig="vi";var _glBindVertexArrayOES=_glBindVertexArray;_glBindVertexArrayOES.sig="vi";var _emscripten_glBindVertexArrayOES=_glBindVertexArrayOES;_emscripten_glBindVertexArrayOES.sig="vi";var _glBlendColor=(e,r,t,n)=>GLctx.blendColor(e,r,t,n);_glBlendColor.sig="vffff";var _emscripten_glBlendColor=_glBlendColor;_emscripten_glBlendColor.sig="vffff";var _glBlendEquation=e=>GLctx.blendEquation(e);_glBlendEquation.sig="vi";var _emscripten_glBlendEquation=_glBlendEquation;_emscripten_glBlendEquation.sig="vi";var _glBlendEquationSeparate=(e,r)=>GLctx.blendEquationSeparate(e,r);_glBlendEquationSeparate.sig="vii";var _emscripten_glBlendEquationSeparate=_glBlendEquationSeparate;_emscripten_glBlendEquationSeparate.sig="vii";var _glBlendFunc=(e,r)=>GLctx.blendFunc(e,r);_glBlendFunc.sig="vii";var _emscripten_glBlendFunc=_glBlendFunc;_emscripten_glBlendFunc.sig="vii";var _glBlendFuncSeparate=(e,r,t,n)=>GLctx.blendFuncSeparate(e,r,t,n);_glBlendFuncSeparate.sig="viiii";var _emscripten_glBlendFuncSeparate=_glBlendFuncSeparate;_emscripten_glBlendFuncSeparate.sig="viiii";function _glBufferData(e,r,t,n){r>>>=0,t>>>=0,GLctx.bufferData(e,t?HEAPU8.subarray(t>>>0,t+r>>>0):r,n)}_glBufferData.sig="vippi";var _emscripten_glBufferData=_glBufferData;_emscripten_glBufferData.sig="vippi";function _glBufferSubData(e,r,t,n){r>>>=0,t>>>=0,n>>>=0,GLctx.bufferSubData(e,r,HEAPU8.subarray(n>>>0,n+t>>>0))}_glBufferSubData.sig="vippp";var _emscripten_glBufferSubData=_glBufferSubData;_emscripten_glBufferSubData.sig="vippp";var _glCheckFramebufferStatus=e=>GLctx.checkFramebufferStatus(e);_glCheckFramebufferStatus.sig="ii";var _emscripten_glCheckFramebufferStatus=_glCheckFramebufferStatus;_emscripten_glCheckFramebufferStatus.sig="ii";var _glClear=e=>GLctx.clear(e);_glClear.sig="vi";var _emscripten_glClear=_glClear;_emscripten_glClear.sig="vi";var _glClearColor=(e,r,t,n)=>GLctx.clearColor(e,r,t,n);_glClearColor.sig="vffff";var _emscripten_glClearColor=_glClearColor;_emscripten_glClearColor.sig="vffff";var _glClearDepthf=e=>GLctx.clearDepth(e);_glClearDepthf.sig="vf";var _emscripten_glClearDepthf=_glClearDepthf;_emscripten_glClearDepthf.sig="vf";var _glClearStencil=e=>GLctx.clearStencil(e);_glClearStencil.sig="vi";var _emscripten_glClearStencil=_glClearStencil;_emscripten_glClearStencil.sig="vi";var _glColorMask=(e,r,t,n)=>{GLctx.colorMask(!!e,!!r,!!t,!!n)};_glColorMask.sig="viiii";var _emscripten_glColorMask=_glColorMask;_emscripten_glColorMask.sig="viiii";var _glCompileShader=e=>{GLctx.compileShader(GL.shaders[e])};_glCompileShader.sig="vi";var _emscripten_glCompileShader=_glCompileShader;_emscripten_glCompileShader.sig="vi";function _glCompressedTexImage2D(e,r,t,n,a,o,_,l){l>>>=0,GLctx.compressedTexImage2D(e,r,t,n,a,o,l?HEAPU8.subarray(l>>>0,l+_>>>0):null)}_glCompressedTexImage2D.sig="viiiiiiip";var _emscripten_glCompressedTexImage2D=_glCompressedTexImage2D;_emscripten_glCompressedTexImage2D.sig="viiiiiiip";function _glCompressedTexSubImage2D(e,r,t,n,a,o,_,l,c){c>>>=0,GLctx.compressedTexSubImage2D(e,r,t,n,a,o,_,c?HEAPU8.subarray(c>>>0,c+l>>>0):null)}_glCompressedTexSubImage2D.sig="viiiiiiiip";var _emscripten_glCompressedTexSubImage2D=_glCompressedTexSubImage2D;_emscripten_glCompressedTexSubImage2D.sig="viiiiiiiip";var _glCopyTexImage2D=(e,r,t,n,a,o,_,l)=>GLctx.copyTexImage2D(e,r,t,n,a,o,_,l);_glCopyTexImage2D.sig="viiiiiiii";var _emscripten_glCopyTexImage2D=_glCopyTexImage2D;_emscripten_glCopyTexImage2D.sig="viiiiiiii";var _glCopyTexSubImage2D=(e,r,t,n,a,o,_,l)=>GLctx.copyTexSubImage2D(e,r,t,n,a,o,_,l);_glCopyTexSubImage2D.sig="viiiiiiii";var _emscripten_glCopyTexSubImage2D=_glCopyTexSubImage2D;_emscripten_glCopyTexSubImage2D.sig="viiiiiiii";var _glCreateProgram=()=>{var e=GL.getNewId(GL.programs),r=GLctx.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,GL.programs[e]=r,e};_glCreateProgram.sig="i";var _emscripten_glCreateProgram=_glCreateProgram;_emscripten_glCreateProgram.sig="i";var _glCreateShader=e=>{var r=GL.getNewId(GL.shaders);return GL.shaders[r]=GLctx.createShader(e),r};_glCreateShader.sig="ii";var _emscripten_glCreateShader=_glCreateShader;_emscripten_glCreateShader.sig="ii";var _glCullFace=e=>GLctx.cullFace(e);_glCullFace.sig="vi";var _emscripten_glCullFace=_glCullFace;_emscripten_glCullFace.sig="vi";function _glDeleteBuffers(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.buffers[n];a&&(GLctx.deleteBuffer(a),a.name=0,GL.buffers[n]=null)}}_glDeleteBuffers.sig="vip";var _emscripten_glDeleteBuffers=_glDeleteBuffers;_emscripten_glDeleteBuffers.sig="vip";function _glDeleteFramebuffers(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.framebuffers[n];a&&(GLctx.deleteFramebuffer(a),a.name=0,GL.framebuffers[n]=null)}}_glDeleteFramebuffers.sig="vip";var _emscripten_glDeleteFramebuffers=_glDeleteFramebuffers;_emscripten_glDeleteFramebuffers.sig="vip";var _glDeleteProgram=e=>{if(e){var r=GL.programs[e];if(!r){GL.recordError(1281);return}GLctx.deleteProgram(r),r.name=0,GL.programs[e]=null}};_glDeleteProgram.sig="vi";var _emscripten_glDeleteProgram=_glDeleteProgram;_emscripten_glDeleteProgram.sig="vi";function _glDeleteQueriesEXT(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.queries[n];a&&(GLctx.disjointTimerQueryExt.deleteQueryEXT(a),GL.queries[n]=null)}}_glDeleteQueriesEXT.sig="vip";var _emscripten_glDeleteQueriesEXT=_glDeleteQueriesEXT;function _glDeleteRenderbuffers(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.renderbuffers[n];a&&(GLctx.deleteRenderbuffer(a),a.name=0,GL.renderbuffers[n]=null)}}_glDeleteRenderbuffers.sig="vip";var _emscripten_glDeleteRenderbuffers=_glDeleteRenderbuffers;_emscripten_glDeleteRenderbuffers.sig="vip";var _glDeleteShader=e=>{if(e){var r=GL.shaders[e];if(!r){GL.recordError(1281);return}GLctx.deleteShader(r),GL.shaders[e]=null}};_glDeleteShader.sig="vi";var _emscripten_glDeleteShader=_glDeleteShader;_emscripten_glDeleteShader.sig="vi";function _glDeleteTextures(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.textures[n];a&&(GLctx.deleteTexture(a),a.name=0,GL.textures[n]=null)}}_glDeleteTextures.sig="vip";var _emscripten_glDeleteTextures=_glDeleteTextures;_emscripten_glDeleteTextures.sig="vip";function _glDeleteVertexArrays(e,r){r>>>=0;for(var t=0;t>>2>>>0];GLctx.deleteVertexArray(GL.vaos[n]),GL.vaos[n]=null}}_glDeleteVertexArrays.sig="vip";var _glDeleteVertexArraysOES=_glDeleteVertexArrays;_glDeleteVertexArraysOES.sig="vip";var _emscripten_glDeleteVertexArraysOES=_glDeleteVertexArraysOES;_emscripten_glDeleteVertexArraysOES.sig="vip";var _glDepthFunc=e=>GLctx.depthFunc(e);_glDepthFunc.sig="vi";var _emscripten_glDepthFunc=_glDepthFunc;_emscripten_glDepthFunc.sig="vi";var _glDepthMask=e=>{GLctx.depthMask(!!e)};_glDepthMask.sig="vi";var _emscripten_glDepthMask=_glDepthMask;_emscripten_glDepthMask.sig="vi";var _glDepthRangef=(e,r)=>GLctx.depthRange(e,r);_glDepthRangef.sig="vff";var _emscripten_glDepthRangef=_glDepthRangef;_emscripten_glDepthRangef.sig="vff";var _glDetachShader=(e,r)=>{GLctx.detachShader(GL.programs[e],GL.shaders[r])};_glDetachShader.sig="vii";var _emscripten_glDetachShader=_glDetachShader;_emscripten_glDetachShader.sig="vii";var _glDisable=e=>GLctx.disable(e);_glDisable.sig="vi";var _emscripten_glDisable=_glDisable;_emscripten_glDisable.sig="vi";var _glDisableVertexAttribArray=e=>{GLctx.disableVertexAttribArray(e)};_glDisableVertexAttribArray.sig="vi";var _emscripten_glDisableVertexAttribArray=_glDisableVertexAttribArray;_emscripten_glDisableVertexAttribArray.sig="vi";var _glDrawArrays=(e,r,t)=>{GLctx.drawArrays(e,r,t)};_glDrawArrays.sig="viii";var _emscripten_glDrawArrays=_glDrawArrays;_emscripten_glDrawArrays.sig="viii";var _glDrawArraysInstanced=(e,r,t,n)=>{GLctx.drawArraysInstanced(e,r,t,n)};_glDrawArraysInstanced.sig="viiii";var _glDrawArraysInstancedANGLE=_glDrawArraysInstanced,_emscripten_glDrawArraysInstancedANGLE=_glDrawArraysInstancedANGLE,tempFixedLengthArray=[];function _glDrawBuffers(e,r){r>>>=0;for(var t=tempFixedLengthArray[e],n=0;n>>2>>>0];GLctx.drawBuffers(t)}_glDrawBuffers.sig="vip";var _glDrawBuffersWEBGL=_glDrawBuffers,_emscripten_glDrawBuffersWEBGL=_glDrawBuffersWEBGL;function _glDrawElements(e,r,t,n){n>>>=0,GLctx.drawElements(e,r,t,n)}_glDrawElements.sig="viiip";var _emscripten_glDrawElements=_glDrawElements;_emscripten_glDrawElements.sig="viiip";function _glDrawElementsInstanced(e,r,t,n,a){n>>>=0,GLctx.drawElementsInstanced(e,r,t,n,a)}_glDrawElementsInstanced.sig="viiipi";var _glDrawElementsInstancedANGLE=_glDrawElementsInstanced,_emscripten_glDrawElementsInstancedANGLE=_glDrawElementsInstancedANGLE,_glEnable=e=>GLctx.enable(e);_glEnable.sig="vi";var _emscripten_glEnable=_glEnable;_emscripten_glEnable.sig="vi";var _glEnableVertexAttribArray=e=>{GLctx.enableVertexAttribArray(e)};_glEnableVertexAttribArray.sig="vi";var _emscripten_glEnableVertexAttribArray=_glEnableVertexAttribArray;_emscripten_glEnableVertexAttribArray.sig="vi";var _glEndQueryEXT=e=>{GLctx.disjointTimerQueryExt.endQueryEXT(e)};_glEndQueryEXT.sig="vi";var _emscripten_glEndQueryEXT=_glEndQueryEXT,_glFinish=()=>GLctx.finish();_glFinish.sig="v";var _emscripten_glFinish=_glFinish;_emscripten_glFinish.sig="v";var _glFlush=()=>GLctx.flush();_glFlush.sig="v";var _emscripten_glFlush=_glFlush;_emscripten_glFlush.sig="v";var _glFramebufferRenderbuffer=(e,r,t,n)=>{GLctx.framebufferRenderbuffer(e,r,t,GL.renderbuffers[n])};_glFramebufferRenderbuffer.sig="viiii";var _emscripten_glFramebufferRenderbuffer=_glFramebufferRenderbuffer;_emscripten_glFramebufferRenderbuffer.sig="viiii";var _glFramebufferTexture2D=(e,r,t,n,a)=>{GLctx.framebufferTexture2D(e,r,t,GL.textures[n],a)};_glFramebufferTexture2D.sig="viiiii";var _emscripten_glFramebufferTexture2D=_glFramebufferTexture2D;_emscripten_glFramebufferTexture2D.sig="viiiii";var _glFrontFace=e=>GLctx.frontFace(e);_glFrontFace.sig="vi";var _emscripten_glFrontFace=_glFrontFace;_emscripten_glFrontFace.sig="vi";function _glGenBuffers(e,r){r>>>=0,GL.genObject(e,r,"createBuffer",GL.buffers)}_glGenBuffers.sig="vip";var _emscripten_glGenBuffers=_glGenBuffers;_emscripten_glGenBuffers.sig="vip";function _glGenFramebuffers(e,r){r>>>=0,GL.genObject(e,r,"createFramebuffer",GL.framebuffers)}_glGenFramebuffers.sig="vip";var _emscripten_glGenFramebuffers=_glGenFramebuffers;_emscripten_glGenFramebuffers.sig="vip";function _glGenQueriesEXT(e,r){r>>>=0;for(var t=0;t>>2>>>0]=0;return}var a=GL.getNewId(GL.queries);n.name=a,GL.queries[a]=n,HEAP32[r+t*4>>>2>>>0]=a}}_glGenQueriesEXT.sig="vip";var _emscripten_glGenQueriesEXT=_glGenQueriesEXT;function _glGenRenderbuffers(e,r){r>>>=0,GL.genObject(e,r,"createRenderbuffer",GL.renderbuffers)}_glGenRenderbuffers.sig="vip";var _emscripten_glGenRenderbuffers=_glGenRenderbuffers;_emscripten_glGenRenderbuffers.sig="vip";function _glGenTextures(e,r){r>>>=0,GL.genObject(e,r,"createTexture",GL.textures)}_glGenTextures.sig="vip";var _emscripten_glGenTextures=_glGenTextures;_emscripten_glGenTextures.sig="vip";function _glGenVertexArrays(e,r){r>>>=0,GL.genObject(e,r,"createVertexArray",GL.vaos)}_glGenVertexArrays.sig="vip";var _glGenVertexArraysOES=_glGenVertexArrays;_glGenVertexArraysOES.sig="vip";var _emscripten_glGenVertexArraysOES=_glGenVertexArraysOES;_emscripten_glGenVertexArraysOES.sig="vip";var _glGenerateMipmap=e=>GLctx.generateMipmap(e);_glGenerateMipmap.sig="vi";var _emscripten_glGenerateMipmap=_glGenerateMipmap;_emscripten_glGenerateMipmap.sig="vi";var __glGetActiveAttribOrUniform=(e,r,t,n,a,o,_,l)=>{r=GL.programs[r];var c=GLctx[e](r,t);if(c){var u=l&&stringToUTF8(c.name,l,n);a&&(HEAP32[a>>>2>>>0]=u),o&&(HEAP32[o>>>2>>>0]=c.size),_&&(HEAP32[_>>>2>>>0]=c.type)}};function _glGetActiveAttrib(e,r,t,n,a,o,_){n>>>=0,a>>>=0,o>>>=0,_>>>=0,__glGetActiveAttribOrUniform("getActiveAttrib",e,r,t,n,a,o,_)}_glGetActiveAttrib.sig="viiipppp";var _emscripten_glGetActiveAttrib=_glGetActiveAttrib;_emscripten_glGetActiveAttrib.sig="viiipppp";function _glGetActiveUniform(e,r,t,n,a,o,_){n>>>=0,a>>>=0,o>>>=0,_>>>=0,__glGetActiveAttribOrUniform("getActiveUniform",e,r,t,n,a,o,_)}_glGetActiveUniform.sig="viiipppp";var _emscripten_glGetActiveUniform=_glGetActiveUniform;_emscripten_glGetActiveUniform.sig="viiipppp";function _glGetAttachedShaders(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getAttachedShaders(GL.programs[e]),o=a.length;o>r&&(o=r),HEAP32[t>>>2>>>0]=o;for(var _=0;_>>2>>>0]=l}}_glGetAttachedShaders.sig="viipp";var _emscripten_glGetAttachedShaders=_glGetAttachedShaders;_emscripten_glGetAttachedShaders.sig="viipp";function _glGetAttribLocation(e,r){return r>>>=0,GLctx.getAttribLocation(GL.programs[e],UTF8ToString(r))}_glGetAttribLocation.sig="iip";var _emscripten_glGetAttribLocation=_glGetAttribLocation;_emscripten_glGetAttribLocation.sig="iip";var writeI53ToI64=(e,r)=>{HEAPU32[e>>>2>>>0]=r;var t=HEAPU32[e>>>2>>>0];HEAPU32[e+4>>>2>>>0]=(r-t)/4294967296},emscriptenWebGLGet=(e,r,t)=>{if(!r){GL.recordError(1281);return}var n=void 0;switch(e){case 36346:n=1;break;case 36344:t!=0&&t!=1&&GL.recordError(1280);return;case 36345:n=0;break;case 34466:var a=GLctx.getParameter(34467);n=a?a.length:0;break}if(n===void 0){var o=GLctx.getParameter(e);switch(typeof o){case"number":n=o;break;case"boolean":n=o?1:0;break;case"string":GL.recordError(1280);return;case"object":if(o===null)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{n=0;break}default:{GL.recordError(1280);return}}else if(o instanceof Float32Array||o instanceof Uint32Array||o instanceof Int32Array||o instanceof Array){for(var _=0;_>>2>>>0]=o[_];break;case 2:HEAPF32[r+_*4>>>2>>>0]=o[_];break;case 4:HEAP8[r+_>>>0]=o[_]?1:0;break}return}else try{n=o.name|0}catch(l){GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(t,"v: Unknown object returned from WebGL getParameter(").concat(e,")! (error: ").concat(l,")"));return}break;default:GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(t,"v: Native code calling glGet").concat(t,"v(").concat(e,") and it returns ").concat(o," of type ").concat(typeof o,"!"));return}}switch(t){case 1:writeI53ToI64(r,n);break;case 0:HEAP32[r>>>2>>>0]=n;break;case 2:HEAPF32[r>>>2>>>0]=n;break;case 4:HEAP8[r>>>0]=n?1:0;break}};function _glGetBooleanv(e,r){return r>>>=0,emscriptenWebGLGet(e,r,4)}_glGetBooleanv.sig="vip";var _emscripten_glGetBooleanv=_glGetBooleanv;_emscripten_glGetBooleanv.sig="vip";function _glGetBufferParameteriv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getBufferParameter(e,r)}_glGetBufferParameteriv.sig="viip";var _emscripten_glGetBufferParameteriv=_glGetBufferParameteriv;_emscripten_glGetBufferParameteriv.sig="viip";var _glGetError=()=>{var e=GLctx.getError()||GL.lastError;return GL.lastError=0,e};_glGetError.sig="i";var _emscripten_glGetError=_glGetError;_emscripten_glGetError.sig="i";function _glGetFloatv(e,r){return r>>>=0,emscriptenWebGLGet(e,r,2)}_glGetFloatv.sig="vip";var _emscripten_glGetFloatv=_glGetFloatv;_emscripten_glGetFloatv.sig="vip";function _glGetFramebufferAttachmentParameteriv(e,r,t,n){n>>>=0;var a=GLctx.getFramebufferAttachmentParameter(e,r,t);(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)&&(a=a.name|0),HEAP32[n>>>2>>>0]=a}_glGetFramebufferAttachmentParameteriv.sig="viiip";var _emscripten_glGetFramebufferAttachmentParameteriv=_glGetFramebufferAttachmentParameteriv;_emscripten_glGetFramebufferAttachmentParameteriv.sig="viiip";function _glGetIntegerv(e,r){return r>>>=0,emscriptenWebGLGet(e,r,0)}_glGetIntegerv.sig="vip";var _emscripten_glGetIntegerv=_glGetIntegerv;_emscripten_glGetIntegerv.sig="vip";function _glGetProgramInfoLog(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getProgramInfoLog(GL.programs[e]);a===null&&(a="(unknown error)");var o=r>0&&n?stringToUTF8(a,n,r):0;t&&(HEAP32[t>>>2>>>0]=o)}_glGetProgramInfoLog.sig="viipp";var _emscripten_glGetProgramInfoLog=_glGetProgramInfoLog;_emscripten_glGetProgramInfoLog.sig="viipp";function _glGetProgramiv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}if(e>=GL.counter){GL.recordError(1281);return}if(e=GL.programs[e],r==35716){var n=GLctx.getProgramInfoLog(e);n===null&&(n="(unknown error)"),HEAP32[t>>>2>>>0]=n.length+1}else if(r==35719){if(!e.maxUniformLength)for(var a=0;a>>2>>>0]=e.maxUniformLength}else if(r==35722){if(!e.maxAttributeLength)for(var a=0;a>>2>>>0]=e.maxAttributeLength}else if(r==35381){if(!e.maxUniformBlockNameLength)for(var a=0;a>>2>>>0]=e.maxUniformBlockNameLength}else HEAP32[t>>>2>>>0]=GLctx.getProgramParameter(e,r)}_glGetProgramiv.sig="viip";var _emscripten_glGetProgramiv=_glGetProgramiv;_emscripten_glGetProgramiv.sig="viip";function _glGetQueryObjecti64vEXT(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}var n=GL.queries[e],a;a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,r);var o;typeof a=="boolean"?o=a?1:0:o=a,writeI53ToI64(t,o)}_glGetQueryObjecti64vEXT.sig="viip";var _emscripten_glGetQueryObjecti64vEXT=_glGetQueryObjecti64vEXT;function _glGetQueryObjectivEXT(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}var n=GL.queries[e],a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,r),o;typeof a=="boolean"?o=a?1:0:o=a,HEAP32[t>>>2>>>0]=o}_glGetQueryObjectivEXT.sig="viip";var _emscripten_glGetQueryObjectivEXT=_glGetQueryObjectivEXT,_glGetQueryObjectui64vEXT=_glGetQueryObjecti64vEXT,_emscripten_glGetQueryObjectui64vEXT=_glGetQueryObjectui64vEXT,_glGetQueryObjectuivEXT=_glGetQueryObjectivEXT,_emscripten_glGetQueryObjectuivEXT=_glGetQueryObjectuivEXT;function _glGetQueryivEXT(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.disjointTimerQueryExt.getQueryEXT(e,r)}_glGetQueryivEXT.sig="viip";var _emscripten_glGetQueryivEXT=_glGetQueryivEXT;function _glGetRenderbufferParameteriv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getRenderbufferParameter(e,r)}_glGetRenderbufferParameteriv.sig="viip";var _emscripten_glGetRenderbufferParameteriv=_glGetRenderbufferParameteriv;_emscripten_glGetRenderbufferParameteriv.sig="viip";function _glGetShaderInfoLog(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getShaderInfoLog(GL.shaders[e]);a===null&&(a="(unknown error)");var o=r>0&&n?stringToUTF8(a,n,r):0;t&&(HEAP32[t>>>2>>>0]=o)}_glGetShaderInfoLog.sig="viipp";var _emscripten_glGetShaderInfoLog=_glGetShaderInfoLog;_emscripten_glGetShaderInfoLog.sig="viipp";function _glGetShaderPrecisionFormat(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getShaderPrecisionFormat(e,r);HEAP32[t>>>2>>>0]=a.rangeMin,HEAP32[t+4>>>2>>>0]=a.rangeMax,HEAP32[n>>>2>>>0]=a.precision}_glGetShaderPrecisionFormat.sig="viipp";var _emscripten_glGetShaderPrecisionFormat=_glGetShaderPrecisionFormat;_emscripten_glGetShaderPrecisionFormat.sig="viipp";function _glGetShaderSource(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getShaderSource(GL.shaders[e]);if(a){var o=r>0&&n?stringToUTF8(a,n,r):0;t&&(HEAP32[t>>>2>>>0]=o)}}_glGetShaderSource.sig="viipp";var _emscripten_glGetShaderSource=_glGetShaderSource;_emscripten_glGetShaderSource.sig="viipp";function _glGetShaderiv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}if(r==35716){var n=GLctx.getShaderInfoLog(GL.shaders[e]);n===null&&(n="(unknown error)");var a=n?n.length+1:0;HEAP32[t>>>2>>>0]=a}else if(r==35720){var o=GLctx.getShaderSource(GL.shaders[e]),_=o?o.length+1:0;HEAP32[t>>>2>>>0]=_}else HEAP32[t>>>2>>>0]=GLctx.getShaderParameter(GL.shaders[e],r)}_glGetShaderiv.sig="viip";var _emscripten_glGetShaderiv=_glGetShaderiv;_emscripten_glGetShaderiv.sig="viip";var webglGetExtensions=function e(){var r=getEmscriptenSupportedExtensions(GLctx);return r=r.concat(r.map(t=>"GL_"+t)),r};function _glGetString(e){var r=GL.stringCache[e];if(!r){switch(e){case 7939:r=stringToNewUTF8(webglGetExtensions().join(" "));break;case 7936:case 7937:case 37445:case 37446:var t=GLctx.getParameter(e);t||GL.recordError(1280),r=t?stringToNewUTF8(t):0;break;case 7938:var n=GLctx.getParameter(7938);n="OpenGL ES 2.0 (".concat(n,")"),r=stringToNewUTF8(n);break;case 35724:var a=GLctx.getParameter(35724),o=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/,_=a.match(o);_!==null&&(_[1].length==3&&(_[1]=_[1]+"0"),a="OpenGL ES GLSL ES ".concat(_[1]," (").concat(a,")")),r=stringToNewUTF8(a);break;default:GL.recordError(1280)}GL.stringCache[e]=r}return r}_glGetString.sig="pi";var _emscripten_glGetString=_glGetString;_emscripten_glGetString.sig="pi";function _glGetTexParameterfv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAPF32[t>>>2>>>0]=GLctx.getTexParameter(e,r)}_glGetTexParameterfv.sig="viip";var _emscripten_glGetTexParameterfv=_glGetTexParameterfv;_emscripten_glGetTexParameterfv.sig="viip";function _glGetTexParameteriv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getTexParameter(e,r)}_glGetTexParameteriv.sig="viip";var _emscripten_glGetTexParameteriv=_glGetTexParameteriv;_emscripten_glGetTexParameteriv.sig="viip";var webglGetLeftBracePos=e=>e.slice(-1)=="]"&&e.lastIndexOf("["),webglPrepareUniformLocationsBeforeFirstUse=e=>{var r=e.uniformLocsById,t=e.uniformSizeAndIdsByName,n,a;if(!r)for(e.uniformLocsById=r={},e.uniformArrayNamesById={},n=0;n0?_.slice(0,c):_,d=e.uniformIdCounter;for(e.uniformIdCounter+=l,t[u]=[l,d],a=0;a>>=0,r=UTF8ToString(r),e=GL.programs[e]){webglPrepareUniformLocationsBeforeFirstUse(e);var t=e.uniformLocsById,n=0,a=r,o=webglGetLeftBracePos(r);o>0&&(n=jstoi_q(r.slice(o+1))>>>0,a=r.slice(0,o));var _=e.uniformSizeAndIdsByName[a];if(_&&n<_[0]&&(n+=_[1],t[n]=t[n]||GLctx.getUniformLocation(e,r)))return n}else GL.recordError(1281);return-1}_glGetUniformLocation.sig="iip";var _emscripten_glGetUniformLocation=_glGetUniformLocation;_emscripten_glGetUniformLocation.sig="iip";var webglGetUniformLocation=e=>{var r=GLctx.currentProgram;if(r){var t=r.uniformLocsById[e];return typeof t=="number"&&(r.uniformLocsById[e]=t=GLctx.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?"[".concat(t,"]"):""))),t}else GL.recordError(1282)},emscriptenWebGLGetUniform=(e,r,t,n)=>{if(!t){GL.recordError(1281);return}e=GL.programs[e],webglPrepareUniformLocationsBeforeFirstUse(e);var a=GLctx.getUniform(e,webglGetUniformLocation(r));if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[t>>>2>>>0]=a;break;case 2:HEAPF32[t>>>2>>>0]=a;break}else for(var o=0;o>>2>>>0]=a[o];break;case 2:HEAPF32[t+o*4>>>2>>>0]=a[o];break}};function _glGetUniformfv(e,r,t){t>>>=0,emscriptenWebGLGetUniform(e,r,t,2)}_glGetUniformfv.sig="viip";var _emscripten_glGetUniformfv=_glGetUniformfv;_emscripten_glGetUniformfv.sig="viip";function _glGetUniformiv(e,r,t){t>>>=0,emscriptenWebGLGetUniform(e,r,t,0)}_glGetUniformiv.sig="viip";var _emscripten_glGetUniformiv=_glGetUniformiv;_emscripten_glGetUniformiv.sig="viip";function _glGetVertexAttribPointerv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getVertexAttribOffset(e,r)}_glGetVertexAttribPointerv.sig="viip";var _emscripten_glGetVertexAttribPointerv=_glGetVertexAttribPointerv;_emscripten_glGetVertexAttribPointerv.sig="viip";var emscriptenWebGLGetVertexAttrib=(e,r,t,n)=>{if(!t){GL.recordError(1281);return}var a=GLctx.getVertexAttrib(e,r);if(r==34975)HEAP32[t>>>2>>>0]=a&&a.name;else if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[t>>>2>>>0]=a;break;case 2:HEAPF32[t>>>2>>>0]=a;break;case 5:HEAP32[t>>>2>>>0]=Math.fround(a);break}else for(var o=0;o>>2>>>0]=a[o];break;case 2:HEAPF32[t+o*4>>>2>>>0]=a[o];break;case 5:HEAP32[t+o*4>>>2>>>0]=Math.fround(a[o]);break}};function _glGetVertexAttribfv(e,r,t){t>>>=0,emscriptenWebGLGetVertexAttrib(e,r,t,2)}_glGetVertexAttribfv.sig="viip";var _emscripten_glGetVertexAttribfv=_glGetVertexAttribfv;_emscripten_glGetVertexAttribfv.sig="viip";function _glGetVertexAttribiv(e,r,t){t>>>=0,emscriptenWebGLGetVertexAttrib(e,r,t,5)}_glGetVertexAttribiv.sig="viip";var _emscripten_glGetVertexAttribiv=_glGetVertexAttribiv;_emscripten_glGetVertexAttribiv.sig="viip";var _glHint=(e,r)=>GLctx.hint(e,r);_glHint.sig="vii";var _emscripten_glHint=_glHint;_emscripten_glHint.sig="vii";var _glIsBuffer=e=>{var r=GL.buffers[e];return r?GLctx.isBuffer(r):0};_glIsBuffer.sig="ii";var _emscripten_glIsBuffer=_glIsBuffer;_emscripten_glIsBuffer.sig="ii";var _glIsEnabled=e=>GLctx.isEnabled(e);_glIsEnabled.sig="ii";var _emscripten_glIsEnabled=_glIsEnabled;_emscripten_glIsEnabled.sig="ii";var _glIsFramebuffer=e=>{var r=GL.framebuffers[e];return r?GLctx.isFramebuffer(r):0};_glIsFramebuffer.sig="ii";var _emscripten_glIsFramebuffer=_glIsFramebuffer;_emscripten_glIsFramebuffer.sig="ii";var _glIsProgram=e=>(e=GL.programs[e],e?GLctx.isProgram(e):0);_glIsProgram.sig="ii";var _emscripten_glIsProgram=_glIsProgram;_emscripten_glIsProgram.sig="ii";var _glIsQueryEXT=e=>{var r=GL.queries[e];return r?GLctx.disjointTimerQueryExt.isQueryEXT(r):0};_glIsQueryEXT.sig="ii";var _emscripten_glIsQueryEXT=_glIsQueryEXT,_glIsRenderbuffer=e=>{var r=GL.renderbuffers[e];return r?GLctx.isRenderbuffer(r):0};_glIsRenderbuffer.sig="ii";var _emscripten_glIsRenderbuffer=_glIsRenderbuffer;_emscripten_glIsRenderbuffer.sig="ii";var _glIsShader=e=>{var r=GL.shaders[e];return r?GLctx.isShader(r):0};_glIsShader.sig="ii";var _emscripten_glIsShader=_glIsShader;_emscripten_glIsShader.sig="ii";var _glIsTexture=e=>{var r=GL.textures[e];return r?GLctx.isTexture(r):0};_glIsTexture.sig="ii";var _emscripten_glIsTexture=_glIsTexture;_emscripten_glIsTexture.sig="ii";var _glIsVertexArray=e=>{var r=GL.vaos[e];return r?GLctx.isVertexArray(r):0};_glIsVertexArray.sig="ii";var _glIsVertexArrayOES=_glIsVertexArray;_glIsVertexArrayOES.sig="ii";var _emscripten_glIsVertexArrayOES=_glIsVertexArrayOES;_emscripten_glIsVertexArrayOES.sig="ii";var _glLineWidth=e=>GLctx.lineWidth(e);_glLineWidth.sig="vf";var _emscripten_glLineWidth=_glLineWidth;_emscripten_glLineWidth.sig="vf";var _glLinkProgram=e=>{e=GL.programs[e],GLctx.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}};_glLinkProgram.sig="vi";var _emscripten_glLinkProgram=_glLinkProgram;_emscripten_glLinkProgram.sig="vi";var _glPixelStorei=(e,r)=>{e==3317&&(GL.unpackAlignment=r),GLctx.pixelStorei(e,r)};_glPixelStorei.sig="vii";var _emscripten_glPixelStorei=_glPixelStorei;_emscripten_glPixelStorei.sig="vii";var _glPolygonOffset=(e,r)=>GLctx.polygonOffset(e,r);_glPolygonOffset.sig="vff";var _emscripten_glPolygonOffset=_glPolygonOffset;_emscripten_glPolygonOffset.sig="vff";var _glQueryCounterEXT=(e,r)=>{GLctx.disjointTimerQueryExt.queryCounterEXT(GL.queries[e],r)};_glQueryCounterEXT.sig="vii";var _emscripten_glQueryCounterEXT=_glQueryCounterEXT,computeUnpackAlignedImageSize=(e,r,t,n)=>{function a(l,c){return l+c-1&-c}var o=e*t,_=a(o,n);return r*_},colorChannelsInGlTextureFormat=e=>{var r={5:3,6:4,8:2,29502:3,29504:4};return r[e-6402]||1},heapObjectForWebGLType=e=>(e-=5120,e==1?HEAPU8:e==4?HEAP32:e==6?HEAPF32:e==5||e==28922?HEAPU32:HEAPU16),toTypedArrayIndex=(e,r)=>e>>>31-Math.clz32(r.BYTES_PER_ELEMENT),emscriptenWebGLGetTexPixelData=(e,r,t,n,a,o)=>{var _=heapObjectForWebGLType(e),l=colorChannelsInGlTextureFormat(r)*_.BYTES_PER_ELEMENT,c=computeUnpackAlignedImageSize(t,n,l,GL.unpackAlignment);return _.subarray(toTypedArrayIndex(a,_)>>>0,toTypedArrayIndex(a+c,_)>>>0)};function _glReadPixels(e,r,t,n,a,o,_){_>>>=0;var l=emscriptenWebGLGetTexPixelData(o,a,t,n,_,a);if(!l){GL.recordError(1280);return}GLctx.readPixels(e,r,t,n,a,o,l)}_glReadPixels.sig="viiiiiip";var _emscripten_glReadPixels=_glReadPixels;_emscripten_glReadPixels.sig="viiiiiip";var _glReleaseShaderCompiler=()=>{};_glReleaseShaderCompiler.sig="v";var _emscripten_glReleaseShaderCompiler=_glReleaseShaderCompiler;_emscripten_glReleaseShaderCompiler.sig="v";var _glRenderbufferStorage=(e,r,t,n)=>GLctx.renderbufferStorage(e,r,t,n);_glRenderbufferStorage.sig="viiii";var _emscripten_glRenderbufferStorage=_glRenderbufferStorage;_emscripten_glRenderbufferStorage.sig="viiii";var _glSampleCoverage=(e,r)=>{GLctx.sampleCoverage(e,!!r)};_glSampleCoverage.sig="vfi";var _emscripten_glSampleCoverage=_glSampleCoverage;_emscripten_glSampleCoverage.sig="vfi";var _glScissor=(e,r,t,n)=>GLctx.scissor(e,r,t,n);_glScissor.sig="viiii";var _emscripten_glScissor=_glScissor;_emscripten_glScissor.sig="viiii";function _glShaderBinary(e,r,t,n,a){r>>>=0,n>>>=0,GL.recordError(1280)}_glShaderBinary.sig="vipipi";var _emscripten_glShaderBinary=_glShaderBinary;_emscripten_glShaderBinary.sig="vipipi";function _glShaderSource(e,r,t,n){t>>>=0,n>>>=0;var a=GL.getSource(e,r,t,n);GLctx.shaderSource(GL.shaders[e],a)}_glShaderSource.sig="viipp";var _emscripten_glShaderSource=_glShaderSource;_emscripten_glShaderSource.sig="viipp";var _glStencilFunc=(e,r,t)=>GLctx.stencilFunc(e,r,t);_glStencilFunc.sig="viii";var _emscripten_glStencilFunc=_glStencilFunc;_emscripten_glStencilFunc.sig="viii";var _glStencilFuncSeparate=(e,r,t,n)=>GLctx.stencilFuncSeparate(e,r,t,n);_glStencilFuncSeparate.sig="viiii";var _emscripten_glStencilFuncSeparate=_glStencilFuncSeparate;_emscripten_glStencilFuncSeparate.sig="viiii";var _glStencilMask=e=>GLctx.stencilMask(e);_glStencilMask.sig="vi";var _emscripten_glStencilMask=_glStencilMask;_emscripten_glStencilMask.sig="vi";var _glStencilMaskSeparate=(e,r)=>GLctx.stencilMaskSeparate(e,r);_glStencilMaskSeparate.sig="vii";var _emscripten_glStencilMaskSeparate=_glStencilMaskSeparate;_emscripten_glStencilMaskSeparate.sig="vii";var _glStencilOp=(e,r,t)=>GLctx.stencilOp(e,r,t);_glStencilOp.sig="viii";var _emscripten_glStencilOp=_glStencilOp;_emscripten_glStencilOp.sig="viii";var _glStencilOpSeparate=(e,r,t,n)=>GLctx.stencilOpSeparate(e,r,t,n);_glStencilOpSeparate.sig="viiii";var _emscripten_glStencilOpSeparate=_glStencilOpSeparate;_emscripten_glStencilOpSeparate.sig="viiii";function _glTexImage2D(e,r,t,n,a,o,_,l,c){c>>>=0,GLctx.texImage2D(e,r,t,n,a,o,_,l,c?emscriptenWebGLGetTexPixelData(l,_,n,a,c,t):null)}_glTexImage2D.sig="viiiiiiiip";var _emscripten_glTexImage2D=_glTexImage2D;_emscripten_glTexImage2D.sig="viiiiiiiip";var _glTexParameterf=(e,r,t)=>GLctx.texParameterf(e,r,t);_glTexParameterf.sig="viif";var _emscripten_glTexParameterf=_glTexParameterf;_emscripten_glTexParameterf.sig="viif";function _glTexParameterfv(e,r,t){t>>>=0;var n=HEAPF32[t>>>2>>>0];GLctx.texParameterf(e,r,n)}_glTexParameterfv.sig="viip";var _emscripten_glTexParameterfv=_glTexParameterfv;_emscripten_glTexParameterfv.sig="viip";var _glTexParameteri=(e,r,t)=>GLctx.texParameteri(e,r,t);_glTexParameteri.sig="viii";var _emscripten_glTexParameteri=_glTexParameteri;_emscripten_glTexParameteri.sig="viii";function _glTexParameteriv(e,r,t){t>>>=0;var n=HEAP32[t>>>2>>>0];GLctx.texParameteri(e,r,n)}_glTexParameteriv.sig="viip";var _emscripten_glTexParameteriv=_glTexParameteriv;_emscripten_glTexParameteriv.sig="viip";function _glTexSubImage2D(e,r,t,n,a,o,_,l,c){c>>>=0;var u=null;c&&(u=emscriptenWebGLGetTexPixelData(l,_,a,o,c,0)),GLctx.texSubImage2D(e,r,t,n,a,o,_,l,u)}_glTexSubImage2D.sig="viiiiiiiip";var _emscripten_glTexSubImage2D=_glTexSubImage2D;_emscripten_glTexSubImage2D.sig="viiiiiiiip";var _glUniform1f=(e,r)=>{GLctx.uniform1f(webglGetUniformLocation(e),r)};_glUniform1f.sig="vif";var _emscripten_glUniform1f=_glUniform1f;_emscripten_glUniform1f.sig="vif";var miniTempWebGLFloatBuffers=[];function _glUniform1fv(e,r,t){if(t>>>=0,r<=288)for(var n=miniTempWebGLFloatBuffers[r-1],a=0;a>>2>>>0];else var n=HEAPF32.subarray(t>>>2>>>0,t+r*4>>>2>>>0);GLctx.uniform1fv(webglGetUniformLocation(e),n)}_glUniform1fv.sig="viip";var _emscripten_glUniform1fv=_glUniform1fv;_emscripten_glUniform1fv.sig="viip";var _glUniform1i=(e,r)=>{GLctx.uniform1i(webglGetUniformLocation(e),r)};_glUniform1i.sig="vii";var _emscripten_glUniform1i=_glUniform1i;_emscripten_glUniform1i.sig="vii";var miniTempWebGLIntBuffers=[];function _glUniform1iv(e,r,t){if(t>>>=0,r<=288)for(var n=miniTempWebGLIntBuffers[r-1],a=0;a>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*4>>>2>>>0);GLctx.uniform1iv(webglGetUniformLocation(e),n)}_glUniform1iv.sig="viip";var _emscripten_glUniform1iv=_glUniform1iv;_emscripten_glUniform1iv.sig="viip";var _glUniform2f=(e,r,t)=>{GLctx.uniform2f(webglGetUniformLocation(e),r,t)};_glUniform2f.sig="viff";var _emscripten_glUniform2f=_glUniform2f;_emscripten_glUniform2f.sig="viff";function _glUniform2fv(e,r,t){if(t>>>=0,r<=144)for(var n=miniTempWebGLFloatBuffers[2*r-1],a=0;a<2*r;a+=2)n[a]=HEAPF32[t+4*a>>>2>>>0],n[a+1]=HEAPF32[t+(4*a+4)>>>2>>>0];else var n=HEAPF32.subarray(t>>>2>>>0,t+r*8>>>2>>>0);GLctx.uniform2fv(webglGetUniformLocation(e),n)}_glUniform2fv.sig="viip";var _emscripten_glUniform2fv=_glUniform2fv;_emscripten_glUniform2fv.sig="viip";var _glUniform2i=(e,r,t)=>{GLctx.uniform2i(webglGetUniformLocation(e),r,t)};_glUniform2i.sig="viii";var _emscripten_glUniform2i=_glUniform2i;_emscripten_glUniform2i.sig="viii";function _glUniform2iv(e,r,t){if(t>>>=0,r<=144)for(var n=miniTempWebGLIntBuffers[2*r-1],a=0;a<2*r;a+=2)n[a]=HEAP32[t+4*a>>>2>>>0],n[a+1]=HEAP32[t+(4*a+4)>>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*8>>>2>>>0);GLctx.uniform2iv(webglGetUniformLocation(e),n)}_glUniform2iv.sig="viip";var _emscripten_glUniform2iv=_glUniform2iv;_emscripten_glUniform2iv.sig="viip";var _glUniform3f=(e,r,t,n)=>{GLctx.uniform3f(webglGetUniformLocation(e),r,t,n)};_glUniform3f.sig="vifff";var _emscripten_glUniform3f=_glUniform3f;_emscripten_glUniform3f.sig="vifff";function _glUniform3fv(e,r,t){if(t>>>=0,r<=96)for(var n=miniTempWebGLFloatBuffers[3*r-1],a=0;a<3*r;a+=3)n[a]=HEAPF32[t+4*a>>>2>>>0],n[a+1]=HEAPF32[t+(4*a+4)>>>2>>>0],n[a+2]=HEAPF32[t+(4*a+8)>>>2>>>0];else var n=HEAPF32.subarray(t>>>2>>>0,t+r*12>>>2>>>0);GLctx.uniform3fv(webglGetUniformLocation(e),n)}_glUniform3fv.sig="viip";var _emscripten_glUniform3fv=_glUniform3fv;_emscripten_glUniform3fv.sig="viip";var _glUniform3i=(e,r,t,n)=>{GLctx.uniform3i(webglGetUniformLocation(e),r,t,n)};_glUniform3i.sig="viiii";var _emscripten_glUniform3i=_glUniform3i;_emscripten_glUniform3i.sig="viiii";function _glUniform3iv(e,r,t){if(t>>>=0,r<=96)for(var n=miniTempWebGLIntBuffers[3*r-1],a=0;a<3*r;a+=3)n[a]=HEAP32[t+4*a>>>2>>>0],n[a+1]=HEAP32[t+(4*a+4)>>>2>>>0],n[a+2]=HEAP32[t+(4*a+8)>>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*12>>>2>>>0);GLctx.uniform3iv(webglGetUniformLocation(e),n)}_glUniform3iv.sig="viip";var _emscripten_glUniform3iv=_glUniform3iv;_emscripten_glUniform3iv.sig="viip";var _glUniform4f=(e,r,t,n,a)=>{GLctx.uniform4f(webglGetUniformLocation(e),r,t,n,a)};_glUniform4f.sig="viffff";var _emscripten_glUniform4f=_glUniform4f;_emscripten_glUniform4f.sig="viffff";function _glUniform4fv(e,r,t){if(t>>>=0,r<=72){var n=miniTempWebGLFloatBuffers[4*r-1],a=HEAPF32;t=t>>>2;for(var o=0;o<4*r;o+=4){var _=t+o;n[o]=a[_>>>0],n[o+1]=a[_+1>>>0],n[o+2]=a[_+2>>>0],n[o+3]=a[_+3>>>0]}}else var n=HEAPF32.subarray(t>>>2>>>0,t+r*16>>>2>>>0);GLctx.uniform4fv(webglGetUniformLocation(e),n)}_glUniform4fv.sig="viip";var _emscripten_glUniform4fv=_glUniform4fv;_emscripten_glUniform4fv.sig="viip";var _glUniform4i=(e,r,t,n,a)=>{GLctx.uniform4i(webglGetUniformLocation(e),r,t,n,a)};_glUniform4i.sig="viiiii";var _emscripten_glUniform4i=_glUniform4i;_emscripten_glUniform4i.sig="viiiii";function _glUniform4iv(e,r,t){if(t>>>=0,r<=72)for(var n=miniTempWebGLIntBuffers[4*r-1],a=0;a<4*r;a+=4)n[a]=HEAP32[t+4*a>>>2>>>0],n[a+1]=HEAP32[t+(4*a+4)>>>2>>>0],n[a+2]=HEAP32[t+(4*a+8)>>>2>>>0],n[a+3]=HEAP32[t+(4*a+12)>>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*16>>>2>>>0);GLctx.uniform4iv(webglGetUniformLocation(e),n)}_glUniform4iv.sig="viip";var _emscripten_glUniform4iv=_glUniform4iv;_emscripten_glUniform4iv.sig="viip";function _glUniformMatrix2fv(e,r,t,n){if(n>>>=0,r<=72)for(var a=miniTempWebGLFloatBuffers[4*r-1],o=0;o<4*r;o+=4)a[o]=HEAPF32[n+4*o>>>2>>>0],a[o+1]=HEAPF32[n+(4*o+4)>>>2>>>0],a[o+2]=HEAPF32[n+(4*o+8)>>>2>>>0],a[o+3]=HEAPF32[n+(4*o+12)>>>2>>>0];else var a=HEAPF32.subarray(n>>>2>>>0,n+r*16>>>2>>>0);GLctx.uniformMatrix2fv(webglGetUniformLocation(e),!!t,a)}_glUniformMatrix2fv.sig="viiip";var _emscripten_glUniformMatrix2fv=_glUniformMatrix2fv;_emscripten_glUniformMatrix2fv.sig="viiip";function _glUniformMatrix3fv(e,r,t,n){if(n>>>=0,r<=32)for(var a=miniTempWebGLFloatBuffers[9*r-1],o=0;o<9*r;o+=9)a[o]=HEAPF32[n+4*o>>>2>>>0],a[o+1]=HEAPF32[n+(4*o+4)>>>2>>>0],a[o+2]=HEAPF32[n+(4*o+8)>>>2>>>0],a[o+3]=HEAPF32[n+(4*o+12)>>>2>>>0],a[o+4]=HEAPF32[n+(4*o+16)>>>2>>>0],a[o+5]=HEAPF32[n+(4*o+20)>>>2>>>0],a[o+6]=HEAPF32[n+(4*o+24)>>>2>>>0],a[o+7]=HEAPF32[n+(4*o+28)>>>2>>>0],a[o+8]=HEAPF32[n+(4*o+32)>>>2>>>0];else var a=HEAPF32.subarray(n>>>2>>>0,n+r*36>>>2>>>0);GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!t,a)}_glUniformMatrix3fv.sig="viiip";var _emscripten_glUniformMatrix3fv=_glUniformMatrix3fv;_emscripten_glUniformMatrix3fv.sig="viiip";function _glUniformMatrix4fv(e,r,t,n){if(n>>>=0,r<=18){var a=miniTempWebGLFloatBuffers[16*r-1],o=HEAPF32;n=n>>>2;for(var _=0;_<16*r;_+=16){var l=n+_;a[_]=o[l>>>0],a[_+1]=o[l+1>>>0],a[_+2]=o[l+2>>>0],a[_+3]=o[l+3>>>0],a[_+4]=o[l+4>>>0],a[_+5]=o[l+5>>>0],a[_+6]=o[l+6>>>0],a[_+7]=o[l+7>>>0],a[_+8]=o[l+8>>>0],a[_+9]=o[l+9>>>0],a[_+10]=o[l+10>>>0],a[_+11]=o[l+11>>>0],a[_+12]=o[l+12>>>0],a[_+13]=o[l+13>>>0],a[_+14]=o[l+14>>>0],a[_+15]=o[l+15>>>0]}}else var a=HEAPF32.subarray(n>>>2>>>0,n+r*64>>>2>>>0);GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!t,a)}_glUniformMatrix4fv.sig="viiip";var _emscripten_glUniformMatrix4fv=_glUniformMatrix4fv;_emscripten_glUniformMatrix4fv.sig="viiip";var _glUseProgram=e=>{e=GL.programs[e],GLctx.useProgram(e),GLctx.currentProgram=e};_glUseProgram.sig="vi";var _emscripten_glUseProgram=_glUseProgram;_emscripten_glUseProgram.sig="vi";var _glValidateProgram=e=>{GLctx.validateProgram(GL.programs[e])};_glValidateProgram.sig="vi";var _emscripten_glValidateProgram=_glValidateProgram;_emscripten_glValidateProgram.sig="vi";var _glVertexAttrib1f=(e,r)=>GLctx.vertexAttrib1f(e,r);_glVertexAttrib1f.sig="vif";var _emscripten_glVertexAttrib1f=_glVertexAttrib1f;_emscripten_glVertexAttrib1f.sig="vif";function _glVertexAttrib1fv(e,r){r>>>=0,GLctx.vertexAttrib1f(e,HEAPF32[r>>>2])}_glVertexAttrib1fv.sig="vip";var _emscripten_glVertexAttrib1fv=_glVertexAttrib1fv;_emscripten_glVertexAttrib1fv.sig="vip";var _glVertexAttrib2f=(e,r,t)=>GLctx.vertexAttrib2f(e,r,t);_glVertexAttrib2f.sig="viff";var _emscripten_glVertexAttrib2f=_glVertexAttrib2f;_emscripten_glVertexAttrib2f.sig="viff";function _glVertexAttrib2fv(e,r){r>>>=0,GLctx.vertexAttrib2f(e,HEAPF32[r>>>2],HEAPF32[r+4>>>2])}_glVertexAttrib2fv.sig="vip";var _emscripten_glVertexAttrib2fv=_glVertexAttrib2fv;_emscripten_glVertexAttrib2fv.sig="vip";var _glVertexAttrib3f=(e,r,t,n)=>GLctx.vertexAttrib3f(e,r,t,n);_glVertexAttrib3f.sig="vifff";var _emscripten_glVertexAttrib3f=_glVertexAttrib3f;_emscripten_glVertexAttrib3f.sig="vifff";function _glVertexAttrib3fv(e,r){r>>>=0,GLctx.vertexAttrib3f(e,HEAPF32[r>>>2],HEAPF32[r+4>>>2],HEAPF32[r+8>>>2])}_glVertexAttrib3fv.sig="vip";var _emscripten_glVertexAttrib3fv=_glVertexAttrib3fv;_emscripten_glVertexAttrib3fv.sig="vip";var _glVertexAttrib4f=(e,r,t,n,a)=>GLctx.vertexAttrib4f(e,r,t,n,a);_glVertexAttrib4f.sig="viffff";var _emscripten_glVertexAttrib4f=_glVertexAttrib4f;_emscripten_glVertexAttrib4f.sig="viffff";function _glVertexAttrib4fv(e,r){r>>>=0,GLctx.vertexAttrib4f(e,HEAPF32[r>>>2],HEAPF32[r+4>>>2],HEAPF32[r+8>>>2],HEAPF32[r+12>>>2])}_glVertexAttrib4fv.sig="vip";var _emscripten_glVertexAttrib4fv=_glVertexAttrib4fv;_emscripten_glVertexAttrib4fv.sig="vip";var _glVertexAttribDivisor=(e,r)=>{GLctx.vertexAttribDivisor(e,r)};_glVertexAttribDivisor.sig="vii";var _glVertexAttribDivisorANGLE=_glVertexAttribDivisor,_emscripten_glVertexAttribDivisorANGLE=_glVertexAttribDivisorANGLE;function _glVertexAttribPointer(e,r,t,n,a,o){o>>>=0,GLctx.vertexAttribPointer(e,r,t,!!n,a,o)}_glVertexAttribPointer.sig="viiiiip";var _emscripten_glVertexAttribPointer=_glVertexAttribPointer;_emscripten_glVertexAttribPointer.sig="viiiiip";var _glViewport=(e,r,t,n)=>GLctx.viewport(e,r,t,n);_glViewport.sig="viiii";var _emscripten_glViewport=_glViewport;_emscripten_glViewport.sig="viiii";function _emscripten_memcpy_js(e,r,t){return e>>>=0,r>>>=0,t>>>=0,HEAPU8.copyWithin(e>>>0,r>>>0,r+t>>>0)}_emscripten_memcpy_js.sig="vppp";function _emscripten_out(e){return e>>>=0,out(UTF8ToString(e))}_emscripten_out.sig="vp";class HandleAllocator{constructor(){this.allocated=[void 0],this.freelist=[]}get(r){return this.allocated[r]}has(r){return this.allocated[r]!==void 0}allocate(r){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=r,t}free(r){this.allocated[r]=void 0,this.freelist.push(r)}}var promiseMap=new HandleAllocator,makePromise=()=>{var e={};return e.promise=new Promise((r,t)=>{e.reject=t,e.resolve=r}),e.id=promiseMap.allocate(e),e};function _emscripten_promise_create(){return makePromise().id}_emscripten_promise_create.sig="p";function _emscripten_promise_destroy(e){e>>>=0,promiseMap.free(e)}_emscripten_promise_destroy.sig="vp";var getPromise=e=>promiseMap.get(e).promise;function _emscripten_promise_resolve(e,r,t){e>>>=0,t>>>=0;var n=promiseMap.get(e);switch(r){case 0:n.resolve(t);return;case 1:n.resolve(getPromise(t));return;case 2:n.resolve(getPromise(t)),_emscripten_promise_destroy(t);return;case 3:n.reject(t);return}}_emscripten_promise_resolve.sig="vpip";var growMemory=e=>{var r=wasmMemory.buffer,t=(e-r.byteLength+65535)/65536;try{return wasmMemory.grow(t),updateMemoryViews(),1}catch(n){}};function _emscripten_resize_heap(e){e>>>=0;var r=HEAPU8.length,t=getHeapMax();if(e>t)return!1;for(var n=(c,u)=>c+(u-c%u)%u,a=1;a<=4;a*=2){var o=r*(1+.2/a);o=Math.min(o,e+100663296);var _=Math.min(t,n(Math.max(e,o),65536)),l=growMemory(_);if(l)return!0}return!1}_emscripten_resize_heap.sig="ip";function _emscripten_wget_data(e,r,t,n){throw e>>>=0,r>>>=0,t>>>=0,n>>>=0,"Please compile your program with async support in order to use asynchronous operations like emscripten_wget_data"}_emscripten_wget_data.sig="vpppp";var getExecutableName=()=>thisProgram||"./this.program",getEnvStrings=()=>{if(!getEnvStrings.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:getExecutableName()};for(var t in ENV)ENV[t]===void 0?delete r[t]:r[t]=ENV[t];var n=[];for(var t in r)n.push("".concat(t,"=").concat(r[t]));getEnvStrings.strings=n}return getEnvStrings.strings},stringToAscii=(e,r)=>{for(var t=0;t>>0]=e.charCodeAt(t);HEAP8[r>>>0]=0},_environ_get=function(e,r){e>>>=0,r>>>=0;var t=0;return getEnvStrings().forEach((n,a)=>{var o=r+t;HEAPU32[e+a*4>>>2>>>0]=o,stringToAscii(n,o),t+=n.length+1}),0};_environ_get.sig="ipp";var _environ_sizes_get=function(e,r){e>>>=0,r>>>=0;var t=getEnvStrings();HEAPU32[e>>>2>>>0]=t.length;var n=0;return t.forEach(a=>n+=a.length+1),HEAPU32[r>>>2>>>0]=n,0};_environ_sizes_get.sig="ipp";function _fd_close(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.close(r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return t.errno}}_fd_close.sig="ii";function _fd_fdstat_get(e,r){r>>>=0;try{var t=0,n=0,a=0,o=SYSCALLS.getStreamFromFD(e),_=o.tty?2:FS.isDir(o.mode)?3:FS.isLink(o.mode)?7:4;return HEAP8[r>>>0]=_,HEAP16[r+2>>>1>>>0]=a,tempI64=[t>>>0,(tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+8>>>2>>>0]=tempI64[0],HEAP32[r+12>>>2>>>0]=tempI64[1],tempI64=[n>>>0,(tempDouble=n,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+16>>>2>>>0]=tempI64[0],HEAP32[r+20>>>2>>>0]=tempI64[1],0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return l.errno}}_fd_fdstat_get.sig="iip";var doReadv=(e,r,t,n)=>{for(var a=0,o=0;o>>2>>>0],l=HEAPU32[r+4>>>2>>>0];r+=8;var c=FS.read(e,HEAP8,_,l,n);if(c<0)return-1;if(a+=c,c>>=0,t>>>=0;var _=convertI32PairToI53Checked(n,a);o>>>=0;try{if(isNaN(_))return 61;var l=SYSCALLS.getStreamFromFD(e),c=doReadv(l,r,t,_);return HEAPU32[o>>>2>>>0]=c,0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_pread.sig="iippiip";var doWritev=(e,r,t,n)=>{for(var a=0,o=0;o>>2>>>0],l=HEAPU32[r+4>>>2>>>0];r+=8;var c=FS.write(e,HEAP8,_,l,n);if(c<0)return-1;a+=c,typeof n<"u"&&(n+=c)}return a};function _fd_pwrite(e,r,t,n,a,o){r>>>=0,t>>>=0;var _=convertI32PairToI53Checked(n,a);o>>>=0;try{if(isNaN(_))return 61;var l=SYSCALLS.getStreamFromFD(e),c=doWritev(l,r,t,_);return HEAPU32[o>>>2>>>0]=c,0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_pwrite.sig="iippiip";function _fd_read(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),o=doReadv(a,r,t);return HEAPU32[n>>>2>>>0]=o,0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return _.errno}}_fd_read.sig="iippp";function _fd_seek(e,r,t,n,a){var o=convertI32PairToI53Checked(r,t);a>>>=0;try{if(isNaN(o))return 61;var _=SYSCALLS.getStreamFromFD(e);return FS.llseek(_,o,n),tempI64=[_.position>>>0,(tempDouble=_.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[a>>>2>>>0]=tempI64[0],HEAP32[a+4>>>2>>>0]=tempI64[1],_.getdents&&o===0&&n===0&&(_.getdents=null),0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return l.errno}}_fd_seek.sig="iiiiip";function _fd_sync(e){var t;try{var r=SYSCALLS.getStreamFromFD(e);return(t=r.stream_ops)!=null&&t.fsync?r.stream_ops.fsync(r):0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return n.errno}}_fd_sync.sig="ii";function _fd_write(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),o=doWritev(a,r,t);return HEAPU32[n>>>2>>>0]=o,0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return _.errno}}_fd_write.sig="iippp";function _getaddrinfo(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=[],o=null,_=0,l=0,c=0,u=0,d=0,p=0,f,m;function g(v,S,y,h,b,w){var k,L,E,x;return L=v===10?28:16,b=v===10?inetNtop6(b):inetNtop4(b),k=_malloc(L),x=writeSockaddr(k,v,b,w),assert(!x),E=_malloc(32),HEAP32[E+4>>>2>>>0]=v,HEAP32[E+8>>>2>>>0]=S,HEAP32[E+12>>>2>>>0]=y,HEAPU32[E+24>>>2>>>0]=h,HEAPU32[E+20>>>2>>>0]=k,v===10?HEAP32[E+16>>>2>>>0]=28:HEAP32[E+16>>>2>>>0]=16,HEAP32[E+28>>>2>>>0]=0,E}if(t&&(c=HEAP32[t>>>2>>>0],u=HEAP32[t+4>>>2>>>0],d=HEAP32[t+8>>>2>>>0],p=HEAP32[t+12>>>2>>>0]),d&&!p&&(p=d===2?17:6),!d&&p&&(d=p===17?2:1),p===0&&(p=6),d===0&&(d=1),!e&&!r)return-2;if(c&-1088||t!==0&&HEAP32[t>>>2>>>0]&2&&!e)return-1;if(c&32)return-2;if(d!==0&&d!==1&&d!==2)return-7;if(u!==0&&u!==2&&u!==10)return-6;if(r&&(r=UTF8ToString(r),l=parseInt(r,10),isNaN(l)))return c&1024?-2:-8;if(!e)return u===0&&(u=2),c&1||(u===2?_=_htonl(2130706433):_=[0,0,0,1]),f=g(u,d,p,null,_,l),HEAPU32[n>>>2>>>0]=f,0;if(e=UTF8ToString(e),_=inetPton4(e),_!==null)if(u===0||u===2)u=2;else if(u===10&&c&8)_=[0,0,_htonl(65535),_],u=10;else return-2;else if(_=inetPton6(e),_!==null)if(u===0||u===10)u=10;else return-2;return _!=null?(f=g(u,d,p,e,_,l),HEAPU32[n>>>2>>>0]=f,0):c&4?-2:(e=DNS.lookup_name(e),_=inetPton4(e),u===0?u=2:u===10&&(_=[0,0,_htonl(65535),_]),f=g(u,d,p,null,_,l),HEAPU32[n>>>2>>>0]=f,0)}_getaddrinfo.sig="ipppp";function _getentropy(e,r){return e>>>=0,r>>>=0,randomFill(HEAPU8.subarray(e>>>0,e+r>>>0)),0}_getentropy.sig="ipp";function _getnameinfo(e,r,t,n,a,o,_){e>>>=0,t>>>=0,a>>>=0;var l=readSockaddr(e,r);if(l.errno)return-6;var c=l.port,u=l.addr,d=!1;if(t&&n){var p;if(_&1||!(p=DNS.lookup_addr(u))){if(_&8)return-2}else u=p;var f=stringToUTF8(u,t,n);f+1>=n&&(d=!0)}if(a&&o){c=""+c;var f=stringToUTF8(c,a,o);f+1>=o&&(d=!0)}return d?-12:0}_getnameinfo.sig="ipipipii";function _llvm_eh_typeid_for(e){return e>>>=0,e}_llvm_eh_typeid_for.sig="vp";function _pthread_kill(...e){return wasmImports.pthread_kill(...e)}_pthread_kill.stub=!0;var arraySum=(e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t},MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31],addDays=(e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=isLeapYear(t.getFullYear()),a=t.getMonth(),o=(n?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[a];if(r>o-t.getDate())r-=o-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+r),t}return t},writeArrayToMemory=(e,r)=>{HEAP8.set(e,r>>>0)};function _strftime(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=HEAPU32[n+40>>>2>>>0],o={tm_sec:HEAP32[n>>>2>>>0],tm_min:HEAP32[n+4>>>2>>>0],tm_hour:HEAP32[n+8>>>2>>>0],tm_mday:HEAP32[n+12>>>2>>>0],tm_mon:HEAP32[n+16>>>2>>>0],tm_year:HEAP32[n+20>>>2>>>0],tm_wday:HEAP32[n+24>>>2>>>0],tm_yday:HEAP32[n+28>>>2>>>0],tm_isdst:HEAP32[n+32>>>2>>>0],tm_gmtoff:HEAP32[n+36>>>2>>>0],tm_zone:a?UTF8ToString(a):""},_=UTF8ToString(t),l={"%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 c in l)_=_.replace(new RegExp(c,"g"),l[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(h,b,w){for(var k=typeof h=="number"?h.toString():h||"";k.length0?1:0}var k;return(k=w(h.getFullYear()-b.getFullYear()))===0&&(k=w(h.getMonth()-b.getMonth()))===0&&(k=w(h.getDate()-b.getDate())),k}function g(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function v(h){var b=addDays(new Date(h.tm_year+1900,0,1),h.tm_yday),w=new Date(b.getFullYear(),0,4),k=new Date(b.getFullYear()+1,0,4),L=g(w),E=g(k);return m(L,b)<=0?m(E,b)<=0?b.getFullYear()+1:b.getFullYear():b.getFullYear()-1}var S={"%a":h=>u[h.tm_wday].substring(0,3),"%A":h=>u[h.tm_wday],"%b":h=>d[h.tm_mon].substring(0,3),"%B":h=>d[h.tm_mon],"%C":h=>{var b=h.tm_year+1900;return f(b/100|0,2)},"%d":h=>f(h.tm_mday,2),"%e":h=>p(h.tm_mday,2," "),"%g":h=>v(h).toString().substring(2),"%G":v,"%H":h=>f(h.tm_hour,2),"%I":h=>{var b=h.tm_hour;return b==0?b=12:b>12&&(b-=12),f(b,2)},"%j":h=>f(h.tm_mday+arraySum(isLeapYear(h.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,h.tm_mon-1),3),"%m":h=>f(h.tm_mon+1,2),"%M":h=>f(h.tm_min,2),"%n":()=>"\n","%p":h=>h.tm_hour>=0&&h.tm_hour<12?"AM":"PM","%S":h=>f(h.tm_sec,2),"%t":()=>" ","%u":h=>h.tm_wday||7,"%U":h=>{var b=h.tm_yday+7-h.tm_wday;return f(Math.floor(b/7),2)},"%V":h=>{var b=Math.floor((h.tm_yday+7-(h.tm_wday+6)%7)/7);if((h.tm_wday+371-h.tm_yday-2)%7<=2&&b++,b){if(b==53){var k=(h.tm_wday+371-h.tm_yday)%7;k!=4&&(k!=3||!isLeapYear(h.tm_year))&&(b=1)}}else{b=52;var w=(h.tm_wday+7-h.tm_yday-1)%7;(w==4||w==5&&isLeapYear(h.tm_year%400-1))&&b++}return f(b,2)},"%w":h=>h.tm_wday,"%W":h=>{var b=h.tm_yday+7-(h.tm_wday+6)%7;return f(Math.floor(b/7),2)},"%y":h=>(h.tm_year+1900).toString().substring(2),"%Y":h=>h.tm_year+1900,"%z":h=>{var b=h.tm_gmtoff,w=b>=0;return b=Math.abs(b)/60,b=b/60*100+b%60,(w?"+":"-")+("0000"+b).slice(-4)},"%Z":h=>h.tm_zone,"%%":()=>"%"};_=_.replace(/%%/g,"\0\0");for(var c in S)_.includes(c)&&(_=_.replace(new RegExp(c,"g"),S[c](o)));_=_.replace(/\0\0/g,"%");var y=intArrayFromString(_,!1);return y.length>r?0:(writeArrayToMemory(y,e),y.length-1)}_strftime.sig="ppppp";function _strftime_l(e,r,t,n,a){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,_strftime(e,r,t,n)}_strftime_l.sig="pppppp";function _strptime(e,r,t){e>>>=0,r>>>=0,t>>>=0;for(var n=UTF8ToString(r),a="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,_=a.length;o<_;++o)n=n.replace(new RegExp("\\"+a[o],"g"),"\\"+a[o]);var l={A:"%a",B:"%b",c:"%a %b %d %H:%M:%S %Y",D:"%m\\/%d\\/%y",e:"%d",F:"%Y-%m-%d",h:"%b",R:"%H\\:%M",r:"%I\\:%M\\:%S\\s%p",T:"%H\\:%M\\:%S",x:"%m\\/%d\\/(?:%y|%Y)",X:"%H\\:%M\\:%S"},c={a:"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)",b:"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)",C:"\\d\\d",d:"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31",H:"\\d(?!\\d)|[0,1]\\d|20|21|22|23",I:"\\d(?!\\d)|0\\d|10|11|12",j:"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d",m:"0[1-9]|[1-9](?!\\d)|10|11|12",M:"0\\d|\\d(?!\\d)|[1-5]\\d",n:" ",p:"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.",S:"0\\d|\\d(?!\\d)|[1-5]\\d|60",U:"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53",W:"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53",w:"[0-6]",y:"\\d\\d",Y:"\\d\\d\\d\\d",t:" ",z:"Z|(?:[\\+\\-]\\d\\d:?(?:\\d\\d)?)"},u={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},d={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},p={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6},f=[],m=n.replace(/%(.)/g,(G,I)=>l[I]||G).replace(/%(.)/g,(G,I)=>{let R=c[I];return R?(f.push(I),"(".concat(R,")")):I}).replace(/\s+/g,"\\s*"),g=new RegExp("^"+m,"i").exec(UTF8ToString(e));function v(){function G(I,R,H){return typeof I!="number"||isNaN(I)?R:I>=R?I<=H?I:H:R}return{year:G(HEAP32[t+20>>>2>>>0]+1900,1970,9999),month:G(HEAP32[t+16>>>2>>>0],0,11),day:G(HEAP32[t+12>>>2>>>0],1,31),hour:G(HEAP32[t+8>>>2>>>0],0,23),min:G(HEAP32[t+4>>>2>>>0],0,59),sec:G(HEAP32[t>>>2>>>0],0,59),gmtoff:0}}if(g){var S=v(),y,h=G=>{var I=f.indexOf(G);if(I>=0)return g[I+1]};if((y=h("S"))&&(S.sec=jstoi_q(y)),(y=h("M"))&&(S.min=jstoi_q(y)),y=h("H"))S.hour=jstoi_q(y);else if(y=h("I")){var b=jstoi_q(y);(y=h("p"))&&(b+=y.toUpperCase()[0]==="P"?12:0),S.hour=b}if(y=h("Y"))S.year=jstoi_q(y);else if(y=h("y")){var w=jstoi_q(y);(y=h("C"))?w+=jstoi_q(y)*100:w+=w<69?2e3:1900,S.year=w}if((y=h("m"))?S.month=jstoi_q(y)-1:(y=h("b"))&&(S.month=u[y.substring(0,3).toUpperCase()]||0),y=h("d"))S.day=jstoi_q(y);else if(y=h("j"))for(var k=jstoi_q(y),L=isLeapYear(S.year),E=0;E<12;++E){var x=arraySum(L?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,E-1);k<=x+(L?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[E]&&(S.day=k-x)}else if(y=h("a")){var A=y.substring(0,3).toUpperCase();if(y=h("U")){var D=d[A],F=jstoi_q(y),P=new Date(S.year,0,1),T;P.getDay()===0?T=addDays(P,D+7*(F-1)):T=addDays(P,7-P.getDay()+D+7*(F-1)),S.day=T.getDate(),S.month=T.getMonth()}else if(y=h("W")){var D=p[A],F=jstoi_q(y),P=new Date(S.year,0,1),T;P.getDay()===1?T=addDays(P,D+7*(F-1)):T=addDays(P,7-P.getDay()+1+D+7*(F-1)),S.day=T.getDate(),S.month=T.getMonth()}}if(y=h("z"))if(y.toLowerCase()==="z")S.gmtoff=0;else{var M=y.match(/^((?:\-|\+)\d\d):?(\d\d)?/);S.gmtoff=M[1]*3600,M[2]&&(S.gmtoff+=S.gmtoff>0?M[2]*60:-M[2]*60)}var C=new Date(S.year,S.month,S.day,S.hour,S.min,S.sec,0);return HEAP32[t>>>2>>>0]=C.getSeconds(),HEAP32[t+4>>>2>>>0]=C.getMinutes(),HEAP32[t+8>>>2>>>0]=C.getHours(),HEAP32[t+12>>>2>>>0]=C.getDate(),HEAP32[t+16>>>2>>>0]=C.getMonth(),HEAP32[t+20>>>2>>>0]=C.getFullYear()-1900,HEAP32[t+24>>>2>>>0]=C.getDay(),HEAP32[t+28>>>2>>>0]=arraySum(isLeapYear(C.getFullYear())?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,C.getMonth()-1)+C.getDate()-1,HEAP32[t+32>>>2>>>0]=0,HEAP32[t+36>>>2>>>0]=S.gmtoff,e+intArrayFromString(g[0]).length-1}return 0}_strptime.sig="pppp";var getCFunc=e=>{var r=Module["_"+e];return r},ccall=(e,r,t,n,a)=>{var o={string:g=>{var v=0;return g!=null&&g!==0&&(v=stringToUTF8OnStack(g)),v},array:g=>{var v=stackAlloc(g.length);return writeArrayToMemory(g,v),v}};function _(g){return r==="string"?UTF8ToString(g):r==="boolean"?!!g:g}var l=getCFunc(e),c=[],u=0;if(n)for(var d=0;d{r>9223372036854776e3?(HEAPU32[e>>>2>>>0]=4294967295,HEAPU32[e+4>>>2>>>0]=2147483647):r<-9223372036854776e3?(HEAPU32[e>>>2>>>0]=0,HEAPU32[e+4>>>2>>>0]=2147483648):writeI53ToI64(e,r)},writeI53ToI64Signaling=(e,r)=>{if(r>9223372036854776e3||r<-9223372036854776e3)throw"RangeError: ".concat(r);writeI53ToI64(e,r)},writeI53ToU64Clamped=(e,r)=>{r>18446744073709552e3?(HEAPU32[e>>>2>>>0]=4294967295,HEAPU32[e+4>>>2>>>0]=4294967295):r<0?(HEAPU32[e>>>2>>>0]=0,HEAPU32[e+4>>>2>>>0]=0):writeI53ToI64(e,r)},writeI53ToU64Signaling=(e,r)=>{if(r<0||r>18446744073709552e3)throw"RangeError: ".concat(r);writeI53ToI64(e,r)},readI53FromU64=e=>HEAPU32[e>>>2>>>0]+HEAPU32[e+4>>>2>>>0]*4294967296,convertI32PairToI53=(e,r)=>(e>>>0)+r*4294967296,convertU32PairToI53=(e,r)=>(e>>>0)+(r>>>0)*4294967296,ptrToString=e=>"0x"+e.toString(16).padStart(8,"0");function _emscripten_notify_memory_growth(e){e>>>=0,updateMemoryViews()}_emscripten_notify_memory_growth.sig="vp";function ___asctime_r(e,r){e>>>=0,r>>>=0;var t={tm_sec:HEAP32[e>>>2>>>0],tm_min:HEAP32[e+4>>>2>>>0],tm_hour:HEAP32[e+8>>>2>>>0],tm_mday:HEAP32[e+12>>>2>>>0],tm_mon:HEAP32[e+16>>>2>>>0],tm_year:HEAP32[e+20>>>2>>>0],tm_wday:HEAP32[e+24>>>2>>>0]},n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=n[t.tm_wday]+" "+a[t.tm_mon]+(t.tm_mday<10?" ":" ")+t.tm_mday+(t.tm_hour<10?" 0":" ")+t.tm_hour+(t.tm_min<10?":0":":")+t.tm_min+(t.tm_sec<10?":0":":")+t.tm_sec+" "+(1900+t.tm_year)+"\n";return stringToUTF8(o,r,26),r}___asctime_r.sig="ppp";function _strptime_l(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,_strptime(e,r,t)}_strptime_l.sig="ppppp";var ERRNO_CODES={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},ERRNO_MESSAGES={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"},Protocols={list:[],map:{}},_setprotoent=e=>{function r(o,_,l){var c=_malloc(o.length+1);stringToAscii(o,c);for(var u=0,d=l.length,p=_malloc((d+1)*4),f=0;f>>2>>>0]=g}HEAPU32[p+u>>>2>>>0]=0;var v=_malloc(12);return HEAPU32[v>>>2>>>0]=c,HEAPU32[v+4>>>2>>>0]=p,HEAP32[v+8>>>2>>>0]=_,v}var t=Protocols.list,n=Protocols.map;if(t.length===0){var a=r("tcp",6,["TCP"]);t.push(a),n.tcp=n[6]=a,a=r("udp",17,["UDP"]),t.push(a),n.udp=n[17]=a}_setprotoent.index=0};_setprotoent.sig="vi";var _endprotoent=()=>{};_endprotoent.sig="v";function _getprotoent(e){if(_setprotoent.index===Protocols.list.length)return 0;var r=Protocols.list[_setprotoent.index++];return r}_getprotoent.sig="p";function _getprotobyname(e){e>>>=0,e=UTF8ToString(e),_setprotoent(!0);var r=Protocols.map[e];return r}_getprotobyname.sig="pp";function _getprotobynumber(e){_setprotoent(!0);var r=Protocols.map[e];return r}_getprotobynumber.sig="pi";function _emscripten_run_script(ptr){ptr>>>=0,eval(UTF8ToString(ptr))}_emscripten_run_script.sig="vp";function _emscripten_run_script_int(ptr){return ptr>>>=0,eval(UTF8ToString(ptr))|0}_emscripten_run_script_int.sig="ip";function _emscripten_run_script_string(ptr){ptr>>>=0;var s=eval(UTF8ToString(ptr));if(s==null)return 0;s+="";var me=_emscripten_run_script_string,len=lengthBytesUTF8(s);return(!me.bufferSize||me.bufferSizeMath.random();_emscripten_random.sig="f";function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function getCallstack(e){var r=jsStackTrace(),t=r.lastIndexOf("_emscripten_log"),n=r.lastIndexOf("_emscripten_get_callstack"),a=r.indexOf("\n",Math.max(t,n))+1;r=r.slice(a),e&8&&typeof emscripten_source_map>"u"&&(warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var o=r.split("\n");r="";var _=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),l=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),c=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var u in o){var d=o[u],p="",f="",m=0,g=0,v=c.exec(d);if(v&&v.length==5)p=v[1],f=v[2],m=v[3],g=v[4];else if(v=_.exec(d),v||(v=l.exec(d)),v&&v.length>=4)p=v[1],f=v[2],m=v[3],g=v[4]|0;else{r+=d+"\n";continue}var S=!1;if(e&8){var y=emscripten_source_map.originalPositionFor({line:m,column:g});S=y==null?void 0:y.source,S&&(e&64&&(y.source=y.source.substring(y.source.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=" at ".concat(p," (").concat(y.source,":").concat(y.line,":").concat(y.column,")\n"))}(e&16||!S)&&(e&64&&(f=f.substring(f.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=(S?" = ".concat(p):" at ".concat(p))+" (".concat(f,":").concat(m,":").concat(g,")\n"))}return r=r.replace(/\s+$/,""),r}function _emscripten_get_callstack(e,r,t){r>>>=0;var n=getCallstack(e);if(!r||t<=0)return lengthBytesUTF8(n)+1;var a=stringToUTF8(n,r,t);return a+1}_emscripten_get_callstack.sig="iipi";var emscriptenLog=(e,r)=>{e&24&&(r=r.replace(/\s+$/,""),r+=(r.length>0?"\n":"")+getCallstack(e)),e&1?e&4?console.error(r):e&2?console.warn(r):e&512?console.info(r):e&256?console.debug(r):console.log(r):e&6?err(r):out(r)},reallyNegative=e=>e<0||e===0&&1/e===-1/0,reSign=(e,r)=>{if(e<=0)return e;var t=r<=32?Math.abs(1<=t&&(r<=32||e>t)&&(e=-2*t+e),e},unSign=(e,r)=>e>=0?e:r<=32?2*Math.abs(1<{for(var r=e;HEAPU8[r>>>0];)++r;return r-e},formatString=(e,r)=>{var t=e,n=r;function a(U,j){return(j==="double"||j==="i64")&&U&7&&(U+=4),U}function o(U){var j;return n=a(n,U),U==="double"?(j=HEAPF64[n>>>3>>>0],n+=8):U=="i64"?(j=[HEAP32[n>>>2>>>0],HEAP32[n+4>>>2>>>0]],n+=8):(U="i32",j=HEAP32[n>>>2>>>0],n+=4),j}for(var _=[],l,c,u;;){var d=t;if(l=HEAP8[t>>>0],l===0)break;if(c=HEAP8[t+1>>>0],l==37){var p=!1,f=!1,m=!1,g=!1,v=!1;e:for(;;){switch(c){case 43:p=!0;break;case 45:f=!0;break;case 35:m=!0;break;case 48:if(g)break e;g=!0;break;case 32:v=!0;break;default:break e}t++,c=HEAP8[t+1>>>0]}var S=0;if(c==42)S=o("i32"),t++,c=HEAP8[t+1>>>0];else for(;c>=48&&c<=57;)S=S*10+(c-48),t++,c=HEAP8[t+1>>>0];var y=!1,h=-1;if(c==46){if(h=0,y=!0,t++,c=HEAP8[t+1>>>0],c==42)h=o("i32"),t++;else for(;;){var b=HEAP8[t+1>>>0];if(b<48||b>57)break;h=h*10+(b-48),t++}c=HEAP8[t+1>>>0]}h<0&&(h=6,y=!1);var w;switch(String.fromCharCode(c)){case"h":var k=HEAP8[t+2>>>0];k==104?(t++,w=1):w=2;break;case"l":var k=HEAP8[t+2>>>0];k==108?(t++,w=8):w=4;break;case"L":case"q":case"j":w=8;break;case"z":case"t":case"I":w=4;break;default:w=null}switch(w&&t++,c=HEAP8[t+1>>>0],String.fromCharCode(c)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var L=c==100||c==105;w=w||4,u=o("i"+w*8);var E;if(w==8&&(u=c==117?convertU32PairToI53(u[0],u[1]):convertI32PairToI53(u[0],u[1])),w<=4){var x=Math.pow(256,w)-1;u=(L?reSign:unSign)(u&x,w*8)}var A=Math.abs(u),D="";if(c==100||c==105)E=reSign(u,8*w).toString(10);else if(c==117)E=unSign(u,8*w).toString(10),u=Math.abs(u);else if(c==111)E=(m?"0":"")+A.toString(8);else if(c==120||c==88){if(D=m&&u!=0?"0x":"",u<0){u=-u,E=(A-1).toString(16);for(var F=[],P=0;P=0&&(p?D="+"+D:v&&(D=" "+D)),E.charAt(0)=="-"&&(D="-"+D,E=E.substr(1));D.length+E.lengthC&&C>=-4?(c=(c==103?"f":"F").charCodeAt(0),h-=C+1):(c=(c==103?"e":"E").charCodeAt(0),h--),M=Math.min(h,20)}c==101||c==69?(E=u.toExponential(M),/[eE][-+]\d$/.test(E)&&(E=E.slice(0,-1)+"0"+E.slice(-1))):(c==102||c==70)&&(E=u.toFixed(M),u===0&&reallyNegative(u)&&(E="-"+E));var G=E.split("e");if(T&&!m)for(;G[0].length>1&&G[0].includes(".")&&(G[0].slice(-1)=="0"||G[0].slice(-1)==".");)G[0]=G[0].slice(0,-1);else for(m&&E.indexOf(".")==-1&&(G[0]+=".");h>M++;)G[0]+="0";E=G[0]+(G.length>1?"e"+G[1]:""),c==69&&(E=E.toUpperCase()),u>=0&&(p?E="+"+E:v&&(E=" "+E))}for(;E.length>>0]);else _=_.concat(intArrayFromString("(null)".substr(0,R),!0));if(f)for(;R0;)_.push(32);f||_.push(o("i8"));break}case"n":{var H=o("i32*");HEAP32[H>>>2>>>0]=_.length;break}case"%":{_.push(l);break}default:for(var P=d;P>>0])}t+=2}else _.push(l),t+=1}return _};function _emscripten_log(e,r,t){r>>>=0,t>>>=0;var n=formatString(r,t),a=UTF8ArrayToString(n,0);emscriptenLog(e,a)}_emscripten_log.sig="vipp";function _emscripten_get_compiler_setting(e){throw e>>>=0,"You must build with -sRETAIN_COMPILER_SETTINGS for getCompilerSetting or emscripten_get_compiler_setting to work"}_emscripten_get_compiler_setting.sig="pp";var _emscripten_has_asyncify=()=>0;_emscripten_has_asyncify.sig="i";function _emscripten_debugger(){debugger}_emscripten_debugger.sig="v";function _emscripten_print_double(e,r,t){r>>>=0;var n=e+"";return r?stringToUTF8(n,r,t):lengthBytesUTF8(n)}_emscripten_print_double.sig="idpi";var convertFrameToPC=e=>(abort("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0);function _emscripten_return_address(e){var r=jsStackTrace().split("\n");r[0]=="Error"&&r.shift();var t=r[e+3];return convertFrameToPC(t)}_emscripten_return_address.sig="pi";var UNWIND_CACHE={},saveInUnwindCache=e=>{e.forEach(r=>{var t=convertFrameToPC(r);t&&(UNWIND_CACHE[t]=r)})};function _emscripten_stack_snapshot(){var e=jsStackTrace().split("\n");return e[0]=="Error"&&e.shift(),saveInUnwindCache(e),UNWIND_CACHE.last_addr=convertFrameToPC(e[3]),UNWIND_CACHE.last_stack=e,UNWIND_CACHE.last_addr}_emscripten_stack_snapshot.sig="p";function _emscripten_stack_unwind_buffer(e,r,t){e>>>=0,r>>>=0;var n;UNWIND_CACHE.last_addr==e?n=UNWIND_CACHE.last_stack:(n=jsStackTrace().split("\n"),n[0]=="Error"&&n.shift(),saveInUnwindCache(n));for(var a=3;n[a]&&convertFrameToPC(n[a])!=e;)++a;for(var o=0;o>>2>>>0]=convertFrameToPC(n[o+a]);return o}_emscripten_stack_unwind_buffer.sig="ippi";function _emscripten_pc_get_function(e){return e>>>=0,abort("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0}_emscripten_pc_get_function.sig="pp";var convertPCtoSourceLocation=e=>{if(UNWIND_CACHE.last_get_source_pc==e)return UNWIND_CACHE.last_source;var r,t;if(!t){var n=UNWIND_CACHE[e];if(!n)return null;(r=/\((.*):(\d+):(\d+)\)$/.exec(n))?t={file:r[1],line:r[2],column:r[3]}:(r=/@(.*):(\d+):(\d+)/.exec(n))&&(t={file:r[1],line:r[2],column:r[3]})}return UNWIND_CACHE.last_get_source_pc=e,UNWIND_CACHE.last_source=t,t};function _emscripten_pc_get_file(e){e>>>=0;var r=convertPCtoSourceLocation(e);return r?(_emscripten_pc_get_file.ret&&_free(_emscripten_pc_get_file.ret),_emscripten_pc_get_file.ret=stringToNewUTF8(r.file),_emscripten_pc_get_file.ret):0}_emscripten_pc_get_file.sig="pp";function _emscripten_pc_get_line(e){e>>>=0;var r=convertPCtoSourceLocation(e);return r?r.line:0}_emscripten_pc_get_line.sig="ip";function _emscripten_pc_get_column(e){e>>>=0;var r=convertPCtoSourceLocation(e);return r&&r.column||0}_emscripten_pc_get_column.sig="ip";function _emscripten_get_module_name(e,r){return e>>>=0,r>>>=0,stringToUTF8(wasmBinaryFile,e,r)}_emscripten_get_module_name.sig="ppp";function _emscripten_asm_const_double(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runEmAsmFunction(e,r,t)}_emscripten_asm_const_double.sig="dppp";var runMainThreadEmAsm=(e,r,t,n)=>{var a=readEmAsmArgs(r,t);return ASM_CONSTS[e](...a)};function _emscripten_asm_const_int_sync_on_main_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runMainThreadEmAsm(e,r,t,1)}_emscripten_asm_const_int_sync_on_main_thread.sig="ippp";function _emscripten_asm_const_ptr_sync_on_main_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runMainThreadEmAsm(e,r,t,1)}_emscripten_asm_const_ptr_sync_on_main_thread.sig="pppp";var _emscripten_asm_const_double_sync_on_main_thread=_emscripten_asm_const_int_sync_on_main_thread;_emscripten_asm_const_double_sync_on_main_thread.sig="dppp";function _emscripten_asm_const_async_on_main_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runMainThreadEmAsm(e,r,t,0)}_emscripten_asm_const_async_on_main_thread.sig="vppp";var jstoi_s=Number;function __Unwind_Backtrace(e,r){e>>>=0,r>>>=0;for(var t=getCallstack(),n=t.split("\n"),a=0;a>>=0,r>>>=0,abort("Unwind_GetIPInfo")}__Unwind_GetIPInfo.sig="ppp";function __Unwind_FindEnclosingFunction(e){return e>>>=0,0}__Unwind_FindEnclosingFunction.sig="pp";function __Unwind_RaiseException(e){return e>>>=0,err("Warning: _Unwind_RaiseException is not correctly implemented"),___cxa_throw(e,0,0)}__Unwind_RaiseException.sig="ip";function __Unwind_DeleteException(e){e>>>=0,err("TODO: Unwind_DeleteException")}__Unwind_DeleteException.sig="vp";var getDynCaller=(e,r)=>(...t)=>dynCall(e,r,t),_emscripten_exit_with_live_runtime=()=>{throw"unwind"};_emscripten_exit_with_live_runtime.sig="v";var _emscripten_force_exit=e=>{__emscripten_runtime_keepalive_clear(),_exit(e)};_emscripten_force_exit.sig="vi";function _emscripten_outn(e,r){return e>>>=0,r>>>=0,out(UTF8ToString(e,r))}_emscripten_outn.sig="vpp";function _emscripten_errn(e,r){return e>>>=0,r>>>=0,err(UTF8ToString(e,r))}_emscripten_errn.sig="vpp";var _emscripten_throw_number=e=>{throw e};_emscripten_throw_number.sig="vd";function _emscripten_throw_string(e){throw e>>>=0,UTF8ToString(e)}_emscripten_throw_string.sig="vp";var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};runtimeKeepalivePush.sig="v";var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};runtimeKeepalivePop.sig="v";var _emscripten_runtime_keepalive_push=runtimeKeepalivePush;_emscripten_runtime_keepalive_push.sig="v";var _emscripten_runtime_keepalive_pop=runtimeKeepalivePop;_emscripten_runtime_keepalive_pop.sig="v";var _emscripten_runtime_keepalive_check=keepRuntimeAlive;_emscripten_runtime_keepalive_check.sig="i";var asmjsMangle=e=>{var r=["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"];return e=="__main_argc_argv"&&(e="main"),e.startsWith("dynCall_")||r.includes(e)?e:"_"+e},___global_base=1024;function __emscripten_fs_load_embedded_files(e){e>>>=0;do{var r=HEAPU32[e>>>2>>>0];e+=4;var t=HEAPU32[e>>>2>>>0];e+=4;var n=HEAPU32[e>>>2>>>0];e+=4;var a=UTF8ToString(r);FS.createPath("/",PATH.dirname(a),!0,!0),FS.createDataFile(a,null,HEAP8.subarray(n>>>0,n+t>>>0),!0,!0,!0)}while(HEAPU32[e>>>2>>>0])}__emscripten_fs_load_embedded_files.sig="vp";var POINTER_SIZE=4;function getNativeTypeSize(e){switch(e){case"i1":case"i8":case"u8":return 1;case"i16":case"u16":return 2;case"i32":case"u32":return 4;case"i64":case"u64":return 8;case"float":return 4;case"double":return 8;default:{if(e[e.length-1]==="*")return POINTER_SIZE;if(e[0]==="i"){let r=Number(e.substr(1));return assert(r%8===0,"getNativeTypeSize invalid bits ".concat(r,", ").concat(e," type")),r/8}return 0}}}var STACK_SIZE=65536,STACK_ALIGN=16,ASSERTIONS=0,cwrap=(e,r,t,n)=>{var a=!t||t.every(_=>_==="number"||_==="boolean"),o=r!=="string";return o&&a&&!n?getCFunc(e):(..._)=>ccall(e,r,t,_,n)},removeFunction=e=>{functionsInTableMap.delete(getWasmTableEntry(e)),setWasmTableEntry(e,null),freeTableIndexes.push(e)},_emscripten_math_cbrt=e=>Math.cbrt(e);_emscripten_math_cbrt.sig="dd";var _emscripten_math_pow=(e,r)=>Math.pow(e,r);_emscripten_math_pow.sig="ddd";var _emscripten_math_random=()=>Math.random();_emscripten_math_random.sig="d";var _emscripten_math_sign=e=>Math.sign(e);_emscripten_math_sign.sig="dd";var _emscripten_math_sqrt=e=>Math.sqrt(e);_emscripten_math_sqrt.sig="dd";var _emscripten_math_exp=e=>Math.exp(e);_emscripten_math_exp.sig="dd";var _emscripten_math_expm1=e=>Math.expm1(e);_emscripten_math_expm1.sig="dd";var _emscripten_math_fmod=(e,r)=>e%r;_emscripten_math_fmod.sig="ddd";var _emscripten_math_log=e=>Math.log(e);_emscripten_math_log.sig="dd";var _emscripten_math_log1p=e=>Math.log1p(e);_emscripten_math_log1p.sig="dd";var _emscripten_math_log10=e=>Math.log10(e);_emscripten_math_log10.sig="dd";var _emscripten_math_log2=e=>Math.log2(e);_emscripten_math_log2.sig="dd";var _emscripten_math_round=e=>Math.round(e);_emscripten_math_round.sig="dd";var _emscripten_math_acos=e=>Math.acos(e);_emscripten_math_acos.sig="dd";var _emscripten_math_acosh=e=>Math.acosh(e);_emscripten_math_acosh.sig="dd";var _emscripten_math_asin=e=>Math.asin(e);_emscripten_math_asin.sig="dd";var _emscripten_math_asinh=e=>Math.asinh(e);_emscripten_math_asinh.sig="dd";var _emscripten_math_atan=e=>Math.atan(e);_emscripten_math_atan.sig="dd";var _emscripten_math_atanh=e=>Math.atanh(e);_emscripten_math_atanh.sig="dd";var _emscripten_math_atan2=(e,r)=>Math.atan2(e,r);_emscripten_math_atan2.sig="ddd";var _emscripten_math_cos=e=>Math.cos(e);_emscripten_math_cos.sig="dd";var _emscripten_math_cosh=e=>Math.cosh(e);_emscripten_math_cosh.sig="dd";function _emscripten_math_hypot(e,r){r>>>=0;for(var t=[],n=0;n>>3>>>0]);return Math.hypot(...t)}_emscripten_math_hypot.sig="dip";var _emscripten_math_sin=e=>Math.sin(e);_emscripten_math_sin.sig="dd";var _emscripten_math_sinh=e=>Math.sinh(e);_emscripten_math_sinh.sig="dd";var _emscripten_math_tan=e=>Math.tan(e);_emscripten_math_tan.sig="dd";var _emscripten_math_tanh=e=>Math.tanh(e);_emscripten_math_tanh.sig="dd";function intArrayToString(e){for(var r=[],t=0;t255&&(n&=255),r.push(String.fromCharCode(n))}return r.join("")}var AsciiToString=e=>{e>>>=0;for(var r="";;){var t=HEAPU8[e++>>>0];if(!t)return r;r+=String.fromCharCode(t)}},JSEvents={removeAllEventListeners(){for(;JSEvents.eventHandlers.length;)JSEvents._removeHandler(JSEvents.eventHandlers.length-1);JSEvents.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(e,r,t){function n(_,l){if(_.length!=l.length)return!1;for(var c in _)if(_[c]!=l[c])return!1;return!0}for(var a in JSEvents.deferredCalls){var o=JSEvents.deferredCalls[a];if(o.targetFunction==e&&n(o.argsList,t))return}JSEvents.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),JSEvents.deferredCalls.sort((_,l)=>_.precedence{for(var t=0;te>2?UTF8ToString(e):e,specialHTMLTargets=[0,typeof document<"u"?document:0,typeof window<"u"?window:0],findEventTarget=e=>{e=maybeCStringToJsString(e);var r=specialHTMLTargets[e]||(typeof document<"u"?document.querySelector(e):void 0);return r},registerKeyEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.keyEvent||(JSEvents.keyEvent=_malloc(176));var l=u=>{var d=JSEvents.keyEvent;HEAPF64[d>>>3>>>0]=u.timeStamp;var p=d>>>2;HEAP32[p+2>>>0]=u.location,HEAP32[p+3>>>0]=u.ctrlKey,HEAP32[p+4>>>0]=u.shiftKey,HEAP32[p+5>>>0]=u.altKey,HEAP32[p+6>>>0]=u.metaKey,HEAP32[p+7>>>0]=u.repeat,HEAP32[p+8>>>0]=u.charCode,HEAP32[p+9>>>0]=u.keyCode,HEAP32[p+10>>>0]=u.which,stringToUTF8(u.key||"",d+44,32),stringToUTF8(u.code||"",d+76,32),stringToUTF8(u.char||"",d+108,32),stringToUTF8(u.locale||"",d+140,32),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)},findCanvasEventTarget=findEventTarget;function _emscripten_set_keypress_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerKeyEventCallback(e,r,t,n,1,"keypress",a)}_emscripten_set_keypress_callback_on_thread.sig="ippipp";function _emscripten_set_keydown_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerKeyEventCallback(e,r,t,n,2,"keydown",a)}_emscripten_set_keydown_callback_on_thread.sig="ippipp";function _emscripten_set_keyup_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerKeyEventCallback(e,r,t,n,3,"keyup",a)}_emscripten_set_keyup_callback_on_thread.sig="ippipp";var getBoundingClientRect=e=>specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0},fillMouseEventData=(e,r,t)=>{HEAPF64[e>>>3>>>0]=r.timeStamp;var n=e>>>2;HEAP32[n+2>>>0]=r.screenX,HEAP32[n+3>>>0]=r.screenY,HEAP32[n+4>>>0]=r.clientX,HEAP32[n+5>>>0]=r.clientY,HEAP32[n+6>>>0]=r.ctrlKey,HEAP32[n+7>>>0]=r.shiftKey,HEAP32[n+8>>>0]=r.altKey,HEAP32[n+9>>>0]=r.metaKey,HEAP16[n*2+20>>>0]=r.button,HEAP16[n*2+21>>>0]=r.buttons,HEAP32[n+11>>>0]=r.movementX,HEAP32[n+12>>>0]=r.movementY;var a=getBoundingClientRect(t);HEAP32[n+13>>>0]=r.clientX-a.left,HEAP32[n+14>>>0]=r.clientY-a.top},registerMouseEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.mouseEvent||(JSEvents.mouseEvent=_malloc(72)),e=findEventTarget(e);var l=(u=event)=>{fillMouseEventData(JSEvents.mouseEvent,u,e),getWasmTableEntry(n)(a,JSEvents.mouseEvent,r)&&u.preventDefault()},c={target:e,allowsDeferredCalls:o!="mousemove"&&o!="mouseenter"&&o!="mouseleave",eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_click_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,4,"click",a)}_emscripten_set_click_callback_on_thread.sig="ippipp";function _emscripten_set_mousedown_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,5,"mousedown",a)}_emscripten_set_mousedown_callback_on_thread.sig="ippipp";function _emscripten_set_mouseup_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,6,"mouseup",a)}_emscripten_set_mouseup_callback_on_thread.sig="ippipp";function _emscripten_set_dblclick_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,7,"dblclick",a)}_emscripten_set_dblclick_callback_on_thread.sig="ippipp";function _emscripten_set_mousemove_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,8,"mousemove",a)}_emscripten_set_mousemove_callback_on_thread.sig="ippipp";function _emscripten_set_mouseenter_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,33,"mouseenter",a)}_emscripten_set_mouseenter_callback_on_thread.sig="ippipp";function _emscripten_set_mouseleave_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,34,"mouseleave",a)}_emscripten_set_mouseleave_callback_on_thread.sig="ippipp";function _emscripten_set_mouseover_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,35,"mouseover",a)}_emscripten_set_mouseover_callback_on_thread.sig="ippipp";function _emscripten_set_mouseout_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,36,"mouseout",a)}_emscripten_set_mouseout_callback_on_thread.sig="ippipp";function _emscripten_get_mouse_status(e){return e>>>=0,JSEvents.mouseEvent?(HEAP8.set(HEAP8.subarray(JSEvents.mouseEvent>>>0,JSEvents.mouseEvent+72>>>0),e>>>0),0):-7}_emscripten_get_mouse_status.sig="ip";var registerWheelEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.wheelEvent||(JSEvents.wheelEvent=_malloc(104));var l=(u=event)=>{var d=JSEvents.wheelEvent;fillMouseEventData(d,u,e),HEAPF64[d+72>>>3>>>0]=u.deltaX,HEAPF64[d+80>>>3>>>0]=u.deltaY,HEAPF64[d+88>>>3>>>0]=u.deltaZ,HEAP32[d+96>>>2>>>0]=u.deltaMode,getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,allowsDeferredCalls:!0,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_wheel_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,e=findEventTarget(e),e?typeof e.onwheel<"u"?registerWheelEventCallback(e,r,t,n,9,"wheel",a):-1:-4}_emscripten_set_wheel_callback_on_thread.sig="ippipp";var registerUiEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.uiEvent||(JSEvents.uiEvent=_malloc(36)),e=findEventTarget(e);var l=(u=event)=>{if(u.target==e){var d=document.body;if(d){var p=JSEvents.uiEvent;HEAP32[p>>>2>>>0]=u.detail,HEAP32[p+4>>>2>>>0]=d.clientWidth,HEAP32[p+8>>>2>>>0]=d.clientHeight,HEAP32[p+12>>>2>>>0]=innerWidth,HEAP32[p+16>>>2>>>0]=innerHeight,HEAP32[p+20>>>2>>>0]=outerWidth,HEAP32[p+24>>>2>>>0]=outerHeight,HEAP32[p+28>>>2>>>0]=pageXOffset,HEAP32[p+32>>>2>>>0]=pageYOffset,getWasmTableEntry(n)(a,p,r)&&u.preventDefault()}}},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_resize_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerUiEventCallback(e,r,t,n,10,"resize",a)}_emscripten_set_resize_callback_on_thread.sig="ippipp";function _emscripten_set_scroll_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerUiEventCallback(e,r,t,n,11,"scroll",a)}_emscripten_set_scroll_callback_on_thread.sig="ippipp";var registerFocusEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.focusEvent||(JSEvents.focusEvent=_malloc(256));var l=(u=event)=>{var d=JSEvents.getNodeNameForTarget(u.target),p=u.target.id?u.target.id:"",f=JSEvents.focusEvent;stringToUTF8(d,f+0,128),stringToUTF8(p,f+128,128),getWasmTableEntry(n)(a,f,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_blur_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,12,"blur",a)}_emscripten_set_blur_callback_on_thread.sig="ippipp";function _emscripten_set_focus_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,13,"focus",a)}_emscripten_set_focus_callback_on_thread.sig="ippipp";function _emscripten_set_focusin_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,14,"focusin",a)}_emscripten_set_focusin_callback_on_thread.sig="ippipp";function _emscripten_set_focusout_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,15,"focusout",a)}_emscripten_set_focusout_callback_on_thread.sig="ippipp";var fillDeviceOrientationEventData=(e,r,t)=>{HEAPF64[e>>>3>>>0]=r.alpha,HEAPF64[e+8>>>3>>>0]=r.beta,HEAPF64[e+16>>>3>>>0]=r.gamma,HEAP32[e+24>>>2>>>0]=r.absolute},registerDeviceOrientationEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.deviceOrientationEvent||(JSEvents.deviceOrientationEvent=_malloc(32));var l=(u=event)=>{fillDeviceOrientationEventData(JSEvents.deviceOrientationEvent,u,e),getWasmTableEntry(n)(a,JSEvents.deviceOrientationEvent,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_deviceorientation_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,registerDeviceOrientationEventCallback(2,e,r,t,16,"deviceorientation",n)}_emscripten_set_deviceorientation_callback_on_thread.sig="ipipp";function _emscripten_get_deviceorientation_status(e){return e>>>=0,JSEvents.deviceOrientationEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceOrientationEvent>>>0,32),e>>>0),0):-7}_emscripten_get_deviceorientation_status.sig="ip";var fillDeviceMotionEventData=(e,r,t)=>{var n=0,a=r.acceleration;n|=a&&1;var o=r.accelerationIncludingGravity;n|=o&&2;var _=r.rotationRate;n|=_&&4,a=a||{},o=o||{},_=_||{},HEAPF64[e>>>3>>>0]=a.x,HEAPF64[e+8>>>3>>>0]=a.y,HEAPF64[e+16>>>3>>>0]=a.z,HEAPF64[e+24>>>3>>>0]=o.x,HEAPF64[e+32>>>3>>>0]=o.y,HEAPF64[e+40>>>3>>>0]=o.z,HEAPF64[e+48>>>3>>>0]=_.alpha,HEAPF64[e+56>>>3>>>0]=_.beta,HEAPF64[e+64>>>3>>>0]=_.gamma},registerDeviceMotionEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.deviceMotionEvent||(JSEvents.deviceMotionEvent=_malloc(80));var l=(u=event)=>{fillDeviceMotionEventData(JSEvents.deviceMotionEvent,u,e),getWasmTableEntry(n)(a,JSEvents.deviceMotionEvent,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_devicemotion_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,registerDeviceMotionEventCallback(2,e,r,t,17,"devicemotion",n)}_emscripten_set_devicemotion_callback_on_thread.sig="ipipp";function _emscripten_get_devicemotion_status(e){return e>>>=0,JSEvents.deviceMotionEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceMotionEvent>>>0,80),e>>>0),0):-7}_emscripten_get_devicemotion_status.sig="ip";var screenOrientation=()=>{if(screen)return screen.orientation||screen.mozOrientation||screen.webkitOrientation||screen.msOrientation},fillOrientationChangeEventData=e=>{var r=["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"],t=["portrait","portrait","landscape","landscape"],n=screenOrientation(),a=r.indexOf(n);a==-1&&(a=t.indexOf(n)),HEAP32[e>>>2>>>0]=1<>>2>>>0]=a},registerOrientationChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.orientationChangeEvent||(JSEvents.orientationChangeEvent=_malloc(8));var l=(u=event)=>{var d=JSEvents.orientationChangeEvent;fillOrientationChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()};a==18&&screen.mozOrientation!==void 0&&(o="mozorientationchange");var c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_orientationchange_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,!screen||!screen.addEventListener?-1:registerOrientationChangeEventCallback(screen,e,r,t,18,"orientationchange",n)}_emscripten_set_orientationchange_callback_on_thread.sig="ipipp";function _emscripten_get_orientation_status(e){return e>>>=0,!screenOrientation()&&typeof orientation>"u"?-1:(fillOrientationChangeEventData(e),0)}_emscripten_get_orientation_status.sig="ip";var _emscripten_lock_orientation=e=>{var r=[];e&1&&r.push("portrait-primary"),e&2&&r.push("portrait-secondary"),e&4&&r.push("landscape-primary"),e&8&&r.push("landscape-secondary");var t;if(screen.lockOrientation)t=screen.lockOrientation(r);else if(screen.mozLockOrientation)t=screen.mozLockOrientation(r);else if(screen.webkitLockOrientation)t=screen.webkitLockOrientation(r);else if(screen.msLockOrientation)t=screen.msLockOrientation(r);else return-1;return t?0:-6};_emscripten_lock_orientation.sig="ii";var _emscripten_unlock_orientation=()=>{if(screen.unlockOrientation)screen.unlockOrientation();else if(screen.mozUnlockOrientation)screen.mozUnlockOrientation();else if(screen.webkitUnlockOrientation)screen.webkitUnlockOrientation();else if(screen.msUnlockOrientation)screen.msUnlockOrientation();else return-1;return 0};_emscripten_unlock_orientation.sig="i";var fillFullscreenChangeEventData=e=>{var r=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,t=!!r;HEAP32[e>>>2>>>0]=t,HEAP32[e+4>>>2>>>0]=JSEvents.fullscreenEnabled();var n=t?r:JSEvents.previousFullscreenElement,a=JSEvents.getNodeNameForTarget(n),o=(n==null?void 0:n.id)||"";stringToUTF8(a,e+8,128),stringToUTF8(o,e+136,128),HEAP32[e+264>>>2>>>0]=n?n.clientWidth:0,HEAP32[e+268>>>2>>>0]=n?n.clientHeight:0,HEAP32[e+272>>>2>>>0]=screen.width,HEAP32[e+276>>>2>>>0]=screen.height,t&&(JSEvents.previousFullscreenElement=r)},registerFullscreenChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.fullscreenChangeEvent||(JSEvents.fullscreenChangeEvent=_malloc(280));var l=(u=event)=>{var d=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_fullscreenchange_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,JSEvents.fullscreenEnabled()?(e=findEventTarget(e),e?(registerFullscreenChangeEventCallback(e,r,t,n,19,"webkitfullscreenchange",a),registerFullscreenChangeEventCallback(e,r,t,n,19,"fullscreenchange",a)):-4):-1}_emscripten_set_fullscreenchange_callback_on_thread.sig="ippipp";function _emscripten_get_fullscreen_status(e){return e>>>=0,JSEvents.fullscreenEnabled()?(fillFullscreenChangeEventData(e),0):-1}_emscripten_get_fullscreen_status.sig="ip";function _emscripten_get_canvas_element_size(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=findCanvasEventTarget(e);if(!n)return-4;HEAP32[r>>>2>>>0]=n.width,HEAP32[t>>>2>>>0]=n.height}_emscripten_get_canvas_element_size.sig="ippp";var getCanvasElementSize=e=>withStackSave(()=>{var r=stackAlloc(8),t=r+4,n=stringToUTF8OnStack(e.id),a=_emscripten_get_canvas_element_size(n,r,t),o=[HEAP32[r>>>2>>>0],HEAP32[t>>>2>>>0]];return o});function _emscripten_set_canvas_element_size(e,r,t){e>>>=0;var n=findCanvasEventTarget(e);return n?(n.width=r,n.height=t,0):-4}_emscripten_set_canvas_element_size.sig="ipii";var setCanvasElementSize=(e,r,t)=>{e.controlTransferredOffscreen?withStackSave(()=>{var n=stringToUTF8OnStack(e.id);_emscripten_set_canvas_element_size(n,r,t)}):(e.width=r,e.height=t)},registerRestoreOldStyle=e=>{var r=getCanvasElementSize(e),t=r[0],n=r[1],a=e.style.width,o=e.style.height,_=e.style.backgroundColor,l=document.body.style.backgroundColor,c=e.style.paddingLeft,u=e.style.paddingRight,d=e.style.paddingTop,p=e.style.paddingBottom,f=e.style.marginLeft,m=e.style.marginRight,g=e.style.marginTop,v=e.style.marginBottom,S=document.body.style.margin,y=document.documentElement.style.overflow,h=document.body.scroll,b=e.style.imageRendering;function w(){var k=document.fullscreenElement||document.webkitFullscreenElement;k||(document.removeEventListener("fullscreenchange",w),document.removeEventListener("webkitfullscreenchange",w),setCanvasElementSize(e,t,n),e.style.width=a,e.style.height=o,e.style.backgroundColor=_,l||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=l,e.style.paddingLeft=c,e.style.paddingRight=u,e.style.paddingTop=d,e.style.paddingBottom=p,e.style.marginLeft=f,e.style.marginRight=m,e.style.marginTop=g,e.style.marginBottom=v,document.body.style.margin=S,document.documentElement.style.overflow=y,document.body.scroll=h,e.style.imageRendering=b,e.GLctxObject&&e.GLctxObject.GLctx.viewport(0,0,t,n),currentFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData))}return document.addEventListener("fullscreenchange",w),document.addEventListener("webkitfullscreenchange",w),w},setLetterbox=(e,r,t)=>{e.style.paddingLeft=e.style.paddingRight=t+"px",e.style.paddingTop=e.style.paddingBottom=r+"px"},JSEvents_resizeCanvasForFullscreen=(e,r)=>{var t=registerRestoreOldStyle(e),n=r.softFullscreen?innerWidth:screen.width,a=r.softFullscreen?innerHeight:screen.height,o=getBoundingClientRect(e),_=o.width,l=o.height,c=getCanvasElementSize(e),u=c[0],d=c[1];if(r.scaleMode==3)setLetterbox(e,(a-l)/2,(n-_)/2),n=_,a=l;else if(r.scaleMode==2)if(n*d{if((r.scaleMode!=0||r.canvasResolutionScaleMode!=0)&&JSEvents_resizeCanvasForFullscreen(e,r),e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else return JSEvents.fullscreenEnabled()?-3:-1;return currentFullscreenStrategy=r,r.canvasResizedCallback&&getWasmTableEntry(r.canvasResizedCallback)(37,0,r.canvasResizedCallbackUserData),0},hideEverythingExceptGivenElement=e=>{for(var r=e,t=r.parentNode,n=[];r!=document.body;){for(var a=t.children,o=0;o{for(var r=0;r{var e=devicePixelRatio,r=currentFullscreenStrategy.canvasResolutionScaleMode==2,t=currentFullscreenStrategy.scaleMode==2,n=currentFullscreenStrategy.canvasResolutionScaleMode!=0,a=currentFullscreenStrategy.scaleMode==3,o=r?Math.round(innerWidth*e):innerWidth,_=r?Math.round(innerHeight*e):innerHeight,l=o,c=_,u=currentFullscreenStrategy.target,d=getCanvasElementSize(u),p=d[0],f=d[1],m;if(t&&(l*fp*c&&(l=c*p/f|0),m=(_-c)/2|0),n&&(setCanvasElementSize(u,l,c),u.GLctxObject&&u.GLctxObject.GLctx.viewport(0,0,l,c)),r&&(m/=e,l/=e,c/=e,l=Math.round(l*1e4)/1e4,c=Math.round(c*1e4)/1e4,m=Math.round(m*1e4)/1e4),a){var g=(innerHeight-jstoi_q(u.style.height))/2,v=(innerWidth-jstoi_q(u.style.width))/2;setLetterbox(u,g,v)}else{u.style.width=l+"px",u.style.height=c+"px";var v=(innerWidth-l)/2;setLetterbox(u,m,v)}!a&¤tFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)},doRequestFullscreen=(e,r)=>{if(!JSEvents.fullscreenEnabled())return-1;if(e=findEventTarget(e),!e)return-4;if(!e.requestFullscreen&&!e.webkitRequestFullscreen)return-3;var t=JSEvents.canPerformEventHandlerRequests();return t?JSEvents_requestFullscreen(e,r):r.deferUntilInEventHandler?(JSEvents.deferCall(JSEvents_requestFullscreen,1,[e,r]),1):-2};function _emscripten_request_fullscreen(e,r){e>>>=0;var t={scaleMode:0,canvasResolutionScaleMode:0,filteringMode:0,deferUntilInEventHandler:r,canvasResizedCallbackTargetThread:2};return doRequestFullscreen(e,t)}_emscripten_request_fullscreen.sig="ipi";function _emscripten_request_fullscreen_strategy(e,r,t){e>>>=0,t>>>=0;var n={scaleMode:HEAP32[t>>>2>>>0],canvasResolutionScaleMode:HEAP32[t+4>>>2>>>0],filteringMode:HEAP32[t+8>>>2>>>0],deferUntilInEventHandler:r,canvasResizedCallback:HEAP32[t+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[t+16>>>2>>>0]};return doRequestFullscreen(e,n)}_emscripten_request_fullscreen_strategy.sig="ipip";function _emscripten_enter_soft_fullscreen(e,r){if(e>>>=0,r>>>=0,e=findEventTarget(e),!e)return-4;var t={scaleMode:HEAP32[r>>>2>>>0],canvasResolutionScaleMode:HEAP32[r+4>>>2>>>0],filteringMode:HEAP32[r+8>>>2>>>0],canvasResizedCallback:HEAP32[r+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[r+16>>>2>>>0],target:e,softFullscreen:!0},n=JSEvents_resizeCanvasForFullscreen(e,t);document.documentElement.style.overflow="hidden",document.body.scroll="no",document.body.style.margin="0px";var a=hideEverythingExceptGivenElement(e);function o(){n(),restoreHiddenElements(a),removeEventListener("resize",softFullscreenResizeWebGLRenderTarget),t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),currentFullscreenStrategy=0}return restoreOldWindowedStyle=o,currentFullscreenStrategy=t,addEventListener("resize",softFullscreenResizeWebGLRenderTarget),t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),0}_emscripten_enter_soft_fullscreen.sig="ipp";var _emscripten_exit_soft_fullscreen=()=>(restoreOldWindowedStyle==null||restoreOldWindowedStyle(),restoreOldWindowedStyle=null,0);_emscripten_exit_soft_fullscreen.sig="i";var _emscripten_exit_fullscreen=()=>{if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var e=specialHTMLTargets[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else if(e.webkitExitFullscreen)e.webkitFullscreenElement&&e.webkitExitFullscreen();else return-1;return 0};_emscripten_exit_fullscreen.sig="i";var fillPointerlockChangeEventData=e=>{var r=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement,t=!!r;HEAP32[e>>>2>>>0]=t;var n=JSEvents.getNodeNameForTarget(r),a=(r==null?void 0:r.id)||"";stringToUTF8(n,e+4,128),stringToUTF8(a,e+132,128)},registerPointerlockChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.pointerlockChangeEvent||(JSEvents.pointerlockChangeEvent=_malloc(260));var l=(u=event)=>{var d=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_pointerlockchange_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,!document||!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockChangeEventCallback(e,r,t,n,20,"mozpointerlockchange",a),registerPointerlockChangeEventCallback(e,r,t,n,20,"webkitpointerlockchange",a),registerPointerlockChangeEventCallback(e,r,t,n,20,"mspointerlockchange",a),registerPointerlockChangeEventCallback(e,r,t,n,20,"pointerlockchange",a)):-4)}_emscripten_set_pointerlockchange_callback_on_thread.sig="ippipp";var registerPointerlockErrorEventCallback=(e,r,t,n,a,o,_)=>{var l=(u=event)=>{getWasmTableEntry(n)(a,0,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_pointerlockerror_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,!document||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockErrorEventCallback(e,r,t,n,38,"mozpointerlockerror",a),registerPointerlockErrorEventCallback(e,r,t,n,38,"webkitpointerlockerror",a),registerPointerlockErrorEventCallback(e,r,t,n,38,"mspointerlockerror",a),registerPointerlockErrorEventCallback(e,r,t,n,38,"pointerlockerror",a)):-4)}_emscripten_set_pointerlockerror_callback_on_thread.sig="ippipp";function _emscripten_get_pointerlock_status(e){return e>>>=0,e&&fillPointerlockChangeEventData(e),!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:0}_emscripten_get_pointerlock_status.sig="ip";var requestPointerLock=e=>{if(e.requestPointerLock)e.requestPointerLock();else return document.body.requestPointerLock?-3:-1;return 0};function _emscripten_request_pointerlock(e,r){if(e>>>=0,e=findEventTarget(e),!e)return-4;if(!e.requestPointerLock)return-1;var t=JSEvents.canPerformEventHandlerRequests();return t?requestPointerLock(e):r?(JSEvents.deferCall(requestPointerLock,2,[e]),1):-2}_emscripten_request_pointerlock.sig="ipi";var _emscripten_exit_pointerlock=()=>{if(JSEvents.removeDeferredCalls(requestPointerLock),document.exitPointerLock)document.exitPointerLock();else return-1;return 0};_emscripten_exit_pointerlock.sig="i";var _emscripten_vibrate=e=>navigator.vibrate?(navigator.vibrate(e),0):-1;_emscripten_vibrate.sig="ii";function _emscripten_vibrate_pattern(e,r){if(e>>>=0,!navigator.vibrate)return-1;for(var t=[],n=0;n>>2>>>0];t.push(a)}return navigator.vibrate(t),0}_emscripten_vibrate_pattern.sig="ipi";var fillVisibilityChangeEventData=e=>{var r=["hidden","visible","prerender","unloaded"],t=r.indexOf(document.visibilityState);HEAP32[e>>>2>>>0]=document.hidden,HEAP32[e+4>>>2>>>0]=t},registerVisibilityChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.visibilityChangeEvent||(JSEvents.visibilityChangeEvent=_malloc(8));var l=(u=event)=>{var d=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_visibilitychange_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,specialHTMLTargets[1]?registerVisibilityChangeEventCallback(specialHTMLTargets[1],e,r,t,21,"visibilitychange",n):-4}_emscripten_set_visibilitychange_callback_on_thread.sig="ipipp";function _emscripten_get_visibility_status(e){return e>>>=0,typeof document.visibilityState>"u"&&typeof document.hidden>"u"?-1:(fillVisibilityChangeEventData(e),0)}_emscripten_get_visibility_status.sig="ip";var registerTouchEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.touchEvent||(JSEvents.touchEvent=_malloc(1696)),e=findEventTarget(e);var l=u=>{for(var d,p={},f=u.touches,m=0;m>>3>>>0]=u.timeStamp;var v=g>>>2;HEAP32[v+3>>>0]=u.ctrlKey,HEAP32[v+4>>>0]=u.shiftKey,HEAP32[v+5>>>0]=u.altKey,HEAP32[v+6>>>0]=u.metaKey,v+=7;var S=getBoundingClientRect(e),y=0;for(var m in p)if(d=p[m],HEAP32[v+0>>>0]=d.identifier,HEAP32[v+1>>>0]=d.screenX,HEAP32[v+2>>>0]=d.screenY,HEAP32[v+3>>>0]=d.clientX,HEAP32[v+4>>>0]=d.clientY,HEAP32[v+5>>>0]=d.pageX,HEAP32[v+6>>>0]=d.pageY,HEAP32[v+7>>>0]=d.isChanged,HEAP32[v+8>>>0]=d.onTarget,HEAP32[v+9>>>0]=d.clientX-S.left,HEAP32[v+10>>>0]=d.clientY-S.top,v+=13,++y>31)break;HEAP32[g+8>>>2>>>0]=y,getWasmTableEntry(n)(a,g,r)&&u.preventDefault()},c={target:e,allowsDeferredCalls:o=="touchstart"||o=="touchend",eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_touchstart_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,22,"touchstart",a)}_emscripten_set_touchstart_callback_on_thread.sig="ippipp";function _emscripten_set_touchend_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,23,"touchend",a)}_emscripten_set_touchend_callback_on_thread.sig="ippipp";function _emscripten_set_touchmove_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,24,"touchmove",a)}_emscripten_set_touchmove_callback_on_thread.sig="ippipp";function _emscripten_set_touchcancel_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,25,"touchcancel",a)}_emscripten_set_touchcancel_callback_on_thread.sig="ippipp";var fillGamepadEventData=(e,r)=>{HEAPF64[e>>>3>>>0]=r.timestamp;for(var t=0;t>>3>>>0]=r.axes[t];for(var t=0;t>>3>>>0]=r.buttons[t].value:HEAPF64[e+t*8+528>>>3>>>0]=r.buttons[t];for(var t=0;t>>2>>>0]=r.buttons[t].pressed:HEAP32[e+t*4+1040>>>2>>>0]=r.buttons[t]==1;HEAP32[e+1296>>>2>>>0]=r.connected,HEAP32[e+1300>>>2>>>0]=r.index,HEAP32[e+8>>>2>>>0]=r.axes.length,HEAP32[e+12>>>2>>>0]=r.buttons.length,stringToUTF8(r.id,e+1304,64),stringToUTF8(r.mapping,e+1368,64)},registerGamepadEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.gamepadEvent||(JSEvents.gamepadEvent=_malloc(1432));var l=(u=event)=>{var d=JSEvents.gamepadEvent;fillGamepadEventData(d,u.gamepad),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:findEventTarget(e),allowsDeferredCalls:!0,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)},_emscripten_sample_gamepad_data=()=>{try{if(navigator.getGamepads)return(JSEvents.lastGamepadState=navigator.getGamepads())?0:-1}catch(e){navigator.getGamepads=null}return-1};_emscripten_sample_gamepad_data.sig="i";function _emscripten_set_gamepadconnected_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,r,t,26,"gamepadconnected",n)}_emscripten_set_gamepadconnected_callback_on_thread.sig="ipipp";function _emscripten_set_gamepaddisconnected_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,r,t,27,"gamepaddisconnected",n)}_emscripten_set_gamepaddisconnected_callback_on_thread.sig="ipipp";var _emscripten_get_num_gamepads=()=>JSEvents.lastGamepadState.length;_emscripten_get_num_gamepads.sig="i";function _emscripten_get_gamepad_status(e,r){return r>>>=0,e<0||e>=JSEvents.lastGamepadState.length?-5:JSEvents.lastGamepadState[e]?(fillGamepadEventData(r,JSEvents.lastGamepadState[e]),0):-7}_emscripten_get_gamepad_status.sig="iip";var registerBeforeUnloadEventCallback=(e,r,t,n,a,o)=>{var _=(c=event)=>{var u=getWasmTableEntry(n)(a,0,r);if(u&&(u=UTF8ToString(u)),u)return c.preventDefault(),c.returnValue=u,u},l={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:_,useCapture:t};return JSEvents.registerOrRemoveHandler(l)};function _emscripten_set_beforeunload_callback_on_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,typeof onbeforeunload>"u"?-1:t!==1?-5:registerBeforeUnloadEventCallback(2,e,!0,r,28,"beforeunload")}_emscripten_set_beforeunload_callback_on_thread.sig="ippp";var fillBatteryEventData=(e,r)=>{HEAPF64[e>>>3>>>0]=r.chargingTime,HEAPF64[e+8>>>3>>>0]=r.dischargingTime,HEAPF64[e+16>>>3>>>0]=r.level,HEAP32[e+24>>>2>>>0]=r.charging},battery=()=>navigator.battery||navigator.mozBattery||navigator.webkitBattery,registerBatteryEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.batteryEvent||(JSEvents.batteryEvent=_malloc(32));var l=(u=event)=>{var d=JSEvents.batteryEvent;fillBatteryEventData(d,battery()),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_batterychargingchange_callback_on_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,r,29,"chargingchange",t):-1}_emscripten_set_batterychargingchange_callback_on_thread.sig="ippp";function _emscripten_set_batterylevelchange_callback_on_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,r,30,"levelchange",t):-1}_emscripten_set_batterylevelchange_callback_on_thread.sig="ippp";function _emscripten_get_battery_status(e){return e>>>=0,battery()?(fillBatteryEventData(e,battery()),0):-1}_emscripten_get_battery_status.sig="ip";function _emscripten_set_element_css_size(e,r,t){return e>>>=0,e=findEventTarget(e),e?(e.style.width=r+"px",e.style.height=t+"px",0):-4}_emscripten_set_element_css_size.sig="ipdd";function _emscripten_get_element_css_size(e,r,t){if(e>>>=0,r>>>=0,t>>>=0,e=findEventTarget(e),!e)return-4;var n=getBoundingClientRect(e);return HEAPF64[r>>>3>>>0]=n.width,HEAPF64[t>>>3>>>0]=n.height,0}_emscripten_get_element_css_size.sig="ippp";var _emscripten_html5_remove_all_event_listeners=()=>JSEvents.removeAllEventListeners();_emscripten_html5_remove_all_event_listeners.sig="v";var _emscripten_request_animation_frame=function(e,r){return e>>>=0,r>>>=0,requestAnimationFrame(t=>getWasmTableEntry(e)(t,r))};_emscripten_request_animation_frame.sig="ipp";var _emscripten_cancel_animation_frame=e=>cancelAnimationFrame(e);_emscripten_cancel_animation_frame.sig="vi";function _emscripten_request_animation_frame_loop(e,r){e>>>=0,r>>>=0;function t(n){getWasmTableEntry(e)(n,r)&&requestAnimationFrame(t)}return requestAnimationFrame(t)}_emscripten_request_animation_frame_loop.sig="vpp";var _emscripten_performance_now=()=>performance.now();_emscripten_performance_now.sig="d";var _emscripten_get_device_pixel_ratio=()=>typeof devicePixelRatio=="number"&&devicePixelRatio||1;_emscripten_get_device_pixel_ratio.sig="d";function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),e}function _random_get(e,r){e>>>=0,r>>>=0;try{return _getentropy(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return t.errno}}_random_get.sig="ipp";var checkWasiClock=e=>e==0||e==1||e==2||e==3;function _clock_time_get(e,r,t,n){var a=convertI32PairToI53Checked(r,t);if(n>>>=0,!checkWasiClock(e))return 28;var o;if(e===0)o=Date.now();else if(nowIsMonotonic)o=_emscripten_get_now();else return 52;var _=Math.round(o*1e3*1e3);return HEAP32[n>>>2>>>0]=_>>>0,HEAP32[n+4>>>2>>>0]=_/Math.pow(2,32)>>>0,0}_clock_time_get.sig="iiiip";function _clock_res_get(e,r){if(r>>>=0,!checkWasiClock(e))return 28;var t;if(e===0)t=1e6;else if(nowIsMonotonic)t=_emscripten_get_now_res();else return 52;return HEAP32[r>>>2>>>0]=t>>>0,HEAP32[r+4>>>2>>>0]=t/Math.pow(2,32)>>>0,0}_clock_res_get.sig="iip";var wasiRightsToMuslOFlags=e=>{if(e&2&&e&64)return 2;if(e&2)return 0;if(e&64)return 1;throw new FS.ErrnoError(28)},wasiOFlagsToMuslOFlags=e=>{var r=0;return e&1&&(r|=64),e&8&&(r|=512),e&2&&(r|=65536),e&4&&(r|=128),r},_emscripten_unwind_to_js_event_loop=()=>{throw"unwind"};_emscripten_unwind_to_js_event_loop.sig="v";var setImmediateWrapped=e=>{setImmediateWrapped.mapping||(setImmediateWrapped.mapping=[]);var r=setImmediateWrapped.mapping.length;return setImmediateWrapped.mapping[r]=setImmediate(()=>{setImmediateWrapped.mapping[r]=void 0,e()}),r},clearImmediateWrapped=e=>{clearImmediate(setImmediateWrapped.mapping[e]),setImmediateWrapped.mapping[e]=void 0},polyfillSetImmediate=()=>{},_emscripten_set_immediate=function(e,r){return e>>>=0,r>>>=0,emSetImmediate(()=>{callUserCallback(()=>getWasmTableEntry(e)(r))})};_emscripten_set_immediate.sig="ipp";var _emscripten_clear_immediate=e=>{emClearImmediate(e)};_emscripten_clear_immediate.sig="vi";var _emscripten_set_immediate_loop=function(e,r){e>>>=0,r>>>=0;function t(){callUserCallback(()=>{getWasmTableEntry(e)(r)&&emSetImmediate(t)})}emSetImmediate(t)};_emscripten_set_immediate_loop.sig="vpp";var _emscripten_set_timeout=function(e,r,t){return e>>>=0,t>>>=0,safeSetTimeout(()=>getWasmTableEntry(e)(t),r)};_emscripten_set_timeout.sig="ipdp";var _emscripten_clear_timeout=clearTimeout;_emscripten_clear_timeout.sig="vi";var _emscripten_set_timeout_loop=function(e,r,t){e>>>=0,t>>>=0;function n(){var a=_emscripten_get_now(),o=a+r;callUserCallback(()=>{getWasmTableEntry(e)(a,t)&&setTimeout(n,o-_emscripten_get_now())})}return setTimeout(n,0)};_emscripten_set_timeout_loop.sig="vpdp";var _emscripten_set_interval=function(e,r,t){return e>>>=0,t>>>=0,setInterval(()=>{callUserCallback(()=>getWasmTableEntry(e)(t))},r)};_emscripten_set_interval.sig="ipdp";var _emscripten_clear_interval=e=>{clearInterval(e)};_emscripten_clear_interval.sig="vi";var idsToPromises=(e,r)=>{for(var t=[],n=0;n>>2>>>0];t[n]=getPromise(a)}return t},makePromiseCallback=(e,r)=>t=>{var n=stackSave(),a=stackAlloc(POINTER_SIZE);HEAPU32[a>>>2>>>0]=0;try{var o=getWasmTableEntry(e)(a,r,t),_=HEAPU32[a>>>2>>>0]}catch(c){throw typeof c!="number"?0:c}finally{stackRestore(n)}switch(o){case 0:return _;case 1:return getPromise(_);case 2:var l=getPromise(_);return _emscripten_promise_destroy(_),l;case 3:throw _}};function _emscripten_promise_then(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=getPromise(e),o=promiseMap.allocate({promise:a.then(makePromiseCallback(r,n),makePromiseCallback(t,n))});return o}_emscripten_promise_then.sig="ppppp";var _emscripten_promise_all=function(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=idsToPromises(e,t),a=promiseMap.allocate({promise:Promise.all(n).then(o=>{if(r)for(var _=0;_>>2>>>0]=l}return r})});return a};_emscripten_promise_all.sig="pppp";var setPromiseResult=(e,r,t)=>{var n=r?0:3;HEAP32[e>>>2>>>0]=n,HEAPU32[e+4>>>2>>>0]=t},_emscripten_promise_all_settled=function(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=idsToPromises(e,t),a=promiseMap.allocate({promise:Promise.allSettled(n).then(o=>{if(r)for(var _=r,l=0;l>>=0,r>>>=0,t>>>=0;var n=idsToPromises(e,t),a=promiseMap.allocate({promise:Promise.any(n).catch(o=>{if(r)for(var _=0;_>>2>>>0]=o.errors[_];throw r})});return a};_emscripten_promise_any.sig="pppp";function _emscripten_promise_race(e,r){e>>>=0,r>>>=0;var t=idsToPromises(e,r),n=promiseMap.allocate({promise:Promise.race(t)});return n}_emscripten_promise_race.sig="ppp";function _emscripten_promise_await(e,r){e>>>=0,r>>>=0,abort("emscripten_promise_await is only available with ASYNCIFY")}_emscripten_promise_await.sig="vpp";function ___cxa_get_exception_ptr(e){e>>>=0;var r=new ExceptionInfo(e).get_exception_ptr();return r}___cxa_get_exception_ptr.sig="pp";function ___cxa_call_unexpected(e){return e>>>=0,abort("Unexpected exception thrown, this is not properly supported - aborting")}___cxa_call_unexpected.sig="vp";var getExceptionMessageCommon=e=>withStackSave(()=>{var r=stackAlloc(4),t=stackAlloc(4);___get_exception_message(e,r,t);var n=HEAPU32[r>>>2>>>0],a=HEAPU32[t>>>2>>>0],o=UTF8ToString(n);_free(n);var _;return a&&(_=UTF8ToString(a),_free(a)),[o,_]}),incrementExceptionRefcount=e=>___cxa_increment_exception_refcount(e),decrementExceptionRefcount=e=>___cxa_decrement_exception_refcount(e),getExceptionMessage=e=>getExceptionMessageCommon(e),_emscripten_run_preload_plugins=function(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=UTF8ToString(e),a=FS.analyzePath(n);return a.exists?(FS.createPreloadedFile(PATH.dirname(n),PATH.basename(n),new Uint8Array(a.object.contents),!0,!0,()=>{r&&getWasmTableEntry(r)(e)},()=>{t&&getWasmTableEntry(t)(e)},!0),0):-1};_emscripten_run_preload_plugins.sig="ippp";var Browser_asyncPrepareDataCounter=0,_emscripten_run_preload_plugins_data=function(e,r,t,n,a,o){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0;var _=UTF8ToString(t),l="prepare_data_"+Browser_asyncPrepareDataCounter+++"."+_,c=stringToNewUTF8(l);FS.createPreloadedFile("/",l,HEAPU8.subarray(e>>>0,e+r>>>0),!0,!0,()=>{a&&getWasmTableEntry(a)(n,c)},()=>{o&&getWasmTableEntry(o)(n)},!0)};_emscripten_run_preload_plugins_data.sig="vpipppp";var _emscripten_async_run_script=function(e,r){e>>>=0,safeSetTimeout(()=>_emscripten_run_script(e),r)};_emscripten_async_run_script.sig="vpi";var _emscripten_async_load_script=function(url,onload,onerror){url>>>=0,onload>>>=0,onerror>>>=0,url=UTF8ToString(url),onload=getWasmTableEntry(onload),onerror=getWasmTableEntry(onerror),assert(runDependencies===0,"async_load_script must be run when no other dependencies are active");var loadDone=()=>{onload&&(runDependencies>0?dependenciesFulfilled=onload:onload())},loadError=()=>{onerror==null||onerror()};if(ENVIRONMENT_IS_NODE){readAsync(url,data=>{eval(data),loadDone()},loadError,!1);return}var script=document.createElement("script");script.onload=loadDone,script.onerror=loadError,script.src=url,document.body.appendChild(script)};_emscripten_async_load_script.sig="vppp";function _emscripten_get_main_loop_timing(e,r){e>>>=0,r>>>=0,e&&(HEAP32[e>>>2>>>0]=Browser.mainLoop.timingMode),r&&(HEAP32[r>>>2>>>0]=Browser.mainLoop.timingValue)}_emscripten_get_main_loop_timing.sig="vpp";function _emscripten_set_main_loop(e,r,t){e>>>=0;var n=getWasmTableEntry(e);setMainLoop(n,r,t)}_emscripten_set_main_loop.sig="vpii";var _emscripten_set_main_loop_arg=function(e,r,t,n){e>>>=0,r>>>=0;var a=()=>getWasmTableEntry(e)(r);setMainLoop(a,t,n,r)};_emscripten_set_main_loop_arg.sig="vppii";var _emscripten_cancel_main_loop=()=>{Browser.mainLoop.pause(),Browser.mainLoop.func=null};_emscripten_cancel_main_loop.sig="v";var _emscripten_pause_main_loop=()=>{Browser.mainLoop.pause()};_emscripten_pause_main_loop.sig="v";var _emscripten_resume_main_loop=()=>{Browser.mainLoop.resume()};_emscripten_resume_main_loop.sig="v";var __emscripten_push_main_loop_blocker=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,Browser.mainLoop.queue.push({func:()=>{getWasmTableEntry(e)(r)},name:UTF8ToString(t),counted:!0}),Browser.mainLoop.updateStatus()};__emscripten_push_main_loop_blocker.sig="vppp";var __emscripten_push_uncounted_main_loop_blocker=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,Browser.mainLoop.queue.push({func:()=>{getWasmTableEntry(e)(r)},name:UTF8ToString(t),counted:!1}),Browser.mainLoop.updateStatus()};__emscripten_push_uncounted_main_loop_blocker.sig="vppp";var _emscripten_set_main_loop_expected_blockers=e=>{Browser.mainLoop.expectedBlockers=e,Browser.mainLoop.remainingBlockers=e,Browser.mainLoop.updateStatus()};_emscripten_set_main_loop_expected_blockers.sig="vi";function _emscripten_async_call(e,r,t){e>>>=0,r>>>=0;function n(){getWasmTableEntry(e)(r)}t>=0||ENVIRONMENT_IS_NODE?safeSetTimeout(n,t):Browser.safeRequestAnimationFrame(n)}_emscripten_async_call.sig="vppi";function _emscripten_get_window_title(){var e=256;return _emscripten_get_window_title.buffer||(_emscripten_get_window_title.buffer=_malloc(e)),stringToUTF8(document.title,_emscripten_get_window_title.buffer,e),_emscripten_get_window_title.buffer}_emscripten_get_window_title.sig="p";function _emscripten_set_window_title(e){return e>>>=0,document.title=UTF8ToString(e)}_emscripten_set_window_title.sig="vp";function _emscripten_get_screen_size(e,r){e>>>=0,r>>>=0,HEAP32[e>>>2>>>0]=screen.width,HEAP32[r>>>2>>>0]=screen.height}_emscripten_get_screen_size.sig="vpp";var _emscripten_hide_mouse=()=>{for(var e=document.styleSheets[0],r=e.cssRules,t=0;t{Browser.setCanvasSize(e,r)};_emscripten_set_canvas_size.sig="vii";function _emscripten_get_canvas_size(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=Module.canvas;HEAP32[e>>>2>>>0]=n.width,HEAP32[r>>>2>>>0]=n.height,HEAP32[t>>>2>>>0]=Browser.isFullscreen?1:0}_emscripten_get_canvas_size.sig="vppp";function _emscripten_create_worker(e){e>>>=0,e=UTF8ToString(e);var r=Browser.workers.length,t={worker:new Worker(e),callbacks:[],awaited:0,buffer:0,bufferSize:0};return t.worker.onmessage=function(a){if(!ABORT){var o=Browser.workers[r];if(o){var _=a.data.callbackId,l=o.callbacks[_];if(l){a.data.finalResponse&&(o.awaited--,o.callbacks[_]=null);var c=a.data.data;c?(c.byteLength||(c=new Uint8Array(c)),(!o.buffer||o.bufferSize>>0),l.func(o.buffer,c.length,l.arg)):l.func(0,0,l.arg)}}}},Browser.workers.push(t),r}_emscripten_create_worker.sig="ip";var _emscripten_destroy_worker=e=>{var r=Browser.workers[e];r.worker.terminate(),r.buffer&&_free(r.buffer),Browser.workers[e]=null};_emscripten_destroy_worker.sig="vi";function _emscripten_call_worker(e,r,t,n,a,o){r>>>=0,t>>>=0,a>>>=0,o>>>=0,r=UTF8ToString(r);var _=Browser.workers[e],l=-1;a&&(l=_.callbacks.length,_.callbacks.push({func:getWasmTableEntry(a),arg:o}),_.awaited++);var c={funcName:r,callbackId:l,data:t?new Uint8Array(HEAPU8.subarray(t>>>0,t+n>>>0)):0};t?_.worker.postMessage(c,[c.data.buffer]):_.worker.postMessage(c)}_emscripten_call_worker.sig="vippipp";var _emscripten_get_worker_queue_size=e=>{var r=Browser.workers[e];return r?r.awaited:-1};_emscripten_get_worker_queue_size.sig="ii";var getPreloadedImageData=(e,r,t)=>{e=PATH_FS.resolve(e);var n=preloadedImages[e];if(!n)return 0;var a=n.getContext("2d"),o=a.getImageData(0,0,n.width,n.height),_=_malloc(n.width*n.height*4);return HEAPU8.set(o.data,_>>>0),HEAP32[r>>>2>>>0]=n.width,HEAP32[t>>>2>>>0]=n.height,_};function _emscripten_get_preloaded_image_data(e,r,t){return e>>>=0,r>>>=0,t>>>=0,getPreloadedImageData(UTF8ToString(e),r,t)}_emscripten_get_preloaded_image_data.sig="pppp";var getPreloadedImageData__data=["$PATH_FS","malloc"];function _emscripten_get_preloaded_image_data_from_FILE(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=_fileno(e),a=FS.getStream(n);return a?getPreloadedImageData(a.path,r,t):0}_emscripten_get_preloaded_image_data_from_FILE.sig="pppp";var wget={wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle(){var e=wget.nextWgetRequestHandle;return wget.nextWgetRequestHandle++,e}},FS_mkdirTree=(e,r)=>FS.mkdirTree(e,r),FS_unlink=e=>FS.unlink(e),_emscripten_async_wget=function(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=UTF8ToString(e),o=UTF8ToString(r);o=PATH_FS.resolve(o);function _(c){c&&callUserCallback(()=>{withStackSave(()=>{getWasmTableEntry(c)(stringToUTF8OnStack(o))})})}var l=PATH.dirname(o);FS_createPreloadedFile(l,PATH.basename(o),a,!0,!0,()=>_(t),()=>_(n),!1,!1,()=>{try{FS_unlink(o)}catch(c){}FS_mkdirTree(l)})};_emscripten_async_wget.sig="vpppp";var _emscripten_async_wget_data=function(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0,asyncLoad(UTF8ToString(e),a=>{callUserCallback(()=>{var o=_malloc(a.length);HEAPU8.set(a,o>>>0),getWasmTableEntry(t)(r,o,a.length),_free(o)})},()=>{n&&callUserCallback(()=>{getWasmTableEntry(n)(r)})},!0)};_emscripten_async_wget_data.sig="vpppp";var _emscripten_async_wget2=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0;var c=UTF8ToString(e),u=UTF8ToString(r);u=PATH_FS.resolve(u);var d=UTF8ToString(t),p=UTF8ToString(n),f=u.lastIndexOf("/"),m=new XMLHttpRequest;m.open(d,c,!0),m.responseType="arraybuffer";var g=wget.getNextWgetRequestHandle(),v=PATH.dirname(u);return m.onload=S=>{if(m.status>=200&&m.status<300){try{FS.unlink(u)}catch(y){}FS.mkdirTree(v),FS.createDataFile(u.substr(0,f),u.substr(f+1),new Uint8Array(m.response),!0,!0,!1),o&&withStackSave(()=>{getWasmTableEntry(o)(g,a,stringToUTF8OnStack(u))})}else _&&getWasmTableEntry(_)(g,a,m.status);delete wget.wgetRequests[g]},m.onerror=S=>{_&&getWasmTableEntry(_)(g,a,m.status),delete wget.wgetRequests[g]},m.onprogress=S=>{if(S.lengthComputable||S.lengthComputable===void 0&&S.total!=0){var y=S.loaded/S.total*100;l&&getWasmTableEntry(l)(g,a,y)}},m.onabort=S=>{delete wget.wgetRequests[g]},d=="POST"?(m.setRequestHeader("Content-type","application/x-www-form-urlencoded"),m.send(p)):m.send(null),wget.wgetRequests[g]=m,g};_emscripten_async_wget2.sig="ipppppppp";var _emscripten_async_wget2_data=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,t>>>=0,n>>>=0,o>>>=0,_>>>=0,l>>>=0;var c=UTF8ToString(e),u=UTF8ToString(r),d=UTF8ToString(t),p=new XMLHttpRequest;p.open(u,c,!0),p.responseType="arraybuffer";var f=wget.getNextWgetRequestHandle();function m(){_&&withStackSave(()=>{var g=0;p.statusText&&(g=stringToUTF8OnStack(p.statusText)),getWasmTableEntry(_)(f,n,p.status,g)})}return p.onload=g=>{if(p.status>=200&&p.status<300||p.status===0&&c.substr(0,4).toLowerCase()!="http"){var v=new Uint8Array(p.response),S=_malloc(v.length);HEAPU8.set(v,S>>>0),o&&getWasmTableEntry(o)(f,n,S,v.length),a&&_free(S)}else m();delete wget.wgetRequests[f]},p.onerror=g=>{m(),delete wget.wgetRequests[f]},p.onprogress=g=>{l&&getWasmTableEntry(l)(f,n,g.loaded,g.lengthComputable||g.lengthComputable===void 0?g.total:0)},p.onabort=g=>{delete wget.wgetRequests[f]},u=="POST"?(p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(d)):p.send(null),wget.wgetRequests[f]=p,f};_emscripten_async_wget2_data.sig="ippppippp";var _emscripten_async_wget2_abort=e=>{var r=wget.wgetRequests[e];r==null||r.abort()};_emscripten_async_wget2_abort.sig="vi";function __dlsym_catchup_js(e,r){e>>>=0;var t=LDSO.loadedLibsByHandle[e],n=t.exports,a=Object.keys(n)[r],o=n[a],_=addFunction(o,o.sig);return _}__dlsym_catchup_js.sig="ppi";var _setNetworkCallback=(e,r,t)=>{function n(a){try{e==="error"?withStackSave(function(){var o=stringToUTF8OnStack(a[2]);getWasmTableEntry(t)(a[0],a[1],o,r)}):getWasmTableEntry(t)(a,r)}catch(o){if(!(o instanceof ExitStatus))throw o&&typeof o=="object"&&o.stack&&err("exception thrown: "+[o,o.stack]),o}}Module.websocket.on(e,t?n:null)};function _emscripten_set_socket_error_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("error",e,r)}_emscripten_set_socket_error_callback.sig="vpp";function _emscripten_set_socket_open_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("open",e,r)}_emscripten_set_socket_open_callback.sig="vpp";function _emscripten_set_socket_listen_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("listen",e,r)}_emscripten_set_socket_listen_callback.sig="vpp";function _emscripten_set_socket_connection_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("connection",e,r)}_emscripten_set_socket_connection_callback.sig="vpp";function _emscripten_set_socket_message_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("message",e,r)}_emscripten_set_socket_message_callback.sig="vpp";function _emscripten_set_socket_close_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("close",e,r)}_emscripten_set_socket_close_callback.sig="vpp";function _emscripten_webgl_enable_ANGLE_instanced_arrays(e){return e>>>=0,webgl_enable_ANGLE_instanced_arrays(GL.contexts[e].GLctx)}_emscripten_webgl_enable_ANGLE_instanced_arrays.sig="ip";function _emscripten_webgl_enable_OES_vertex_array_object(e){return e>>>=0,webgl_enable_OES_vertex_array_object(GL.contexts[e].GLctx)}_emscripten_webgl_enable_OES_vertex_array_object.sig="ip";function _emscripten_webgl_enable_WEBGL_draw_buffers(e){return e>>>=0,webgl_enable_WEBGL_draw_buffers(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_draw_buffers.sig="ip";function _emscripten_webgl_enable_WEBGL_multi_draw(e){return e>>>=0,webgl_enable_WEBGL_multi_draw(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_multi_draw.sig="ip";function _glVertexPointer(e,r,t,n){throw n>>>=0,"Legacy GL function (glVertexPointer) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."}_glVertexPointer.sig="viiip";var _glMatrixMode=()=>{throw"Legacy GL function (glMatrixMode) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glMatrixMode.sig="vi";var _glBegin=()=>{throw"Legacy GL function (glBegin) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glBegin.sig="vi";var _glLoadIdentity=()=>{throw"Legacy GL function (glLoadIdentity) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glLoadIdentity.sig="v";var _glVertexAttribDivisorNV=_glVertexAttribDivisor,_glDrawArraysInstancedNV=_glDrawArraysInstanced,_glDrawElementsInstancedNV=_glDrawElementsInstanced,_glVertexAttribDivisorEXT=_glVertexAttribDivisor,_glDrawArraysInstancedEXT=_glDrawArraysInstanced,_glDrawElementsInstancedEXT=_glDrawElementsInstanced,_glVertexAttribDivisorARB=_glVertexAttribDivisor,_glDrawArraysInstancedARB=_glDrawArraysInstanced,_glDrawElementsInstancedARB=_glDrawElementsInstanced,_glDrawBuffersEXT=_glDrawBuffers;function _glMultiDrawArraysWEBGL(e,r,t,n){r>>>=0,t>>>=0,GLctx.multiDrawWebgl.multiDrawArraysWEBGL(e,HEAP32,r>>>2,HEAP32,t>>>2,n)}_glMultiDrawArraysWEBGL.sig="vippi";var _glMultiDrawArrays=_glMultiDrawArraysWEBGL;_glMultiDrawArrays.sig="vippi";var _glMultiDrawArraysANGLE=_glMultiDrawArraysWEBGL;function _glMultiDrawArraysInstancedWEBGL(e,r,t,n,a){r>>>=0,t>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawArraysInstancedWEBGL(e,HEAP32,r>>>2,HEAP32,t>>>2,HEAP32,n>>>2,a)}_glMultiDrawArraysInstancedWEBGL.sig="vipppi";var _glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedWEBGL;function _glMultiDrawElementsWEBGL(e,r,t,n,a){r>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawElementsWEBGL(e,HEAP32,r>>>2,t,HEAP32,n>>>2,a)}_glMultiDrawElementsWEBGL.sig="vipipi";var _glMultiDrawElements=_glMultiDrawElementsWEBGL;_glMultiDrawElements.sig="vipipi";var _glMultiDrawElementsANGLE=_glMultiDrawElementsWEBGL;function _glMultiDrawElementsInstancedWEBGL(e,r,t,n,a,o){r>>>=0,n>>>=0,a>>>=0,GLctx.multiDrawWebgl.multiDrawElementsInstancedWEBGL(e,HEAP32,r>>>2,t,HEAP32,n>>>2,HEAP32,a>>>2,o)}_glMultiDrawElementsInstancedWEBGL.sig="vipippi";var _glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedWEBGL,_glClearDepth=e=>GLctx.clearDepth(e);_glClearDepth.sig="vd";var _glDepthRange=(e,r)=>GLctx.depthRange(e,r);_glDepthRange.sig="vdd";var _emscripten_glGenVertexArrays=_glGenVertexArrays;_emscripten_glGenVertexArrays.sig="vip";var _emscripten_glDeleteVertexArrays=_glDeleteVertexArrays;_emscripten_glDeleteVertexArrays.sig="vip";var _emscripten_glBindVertexArray=_glBindVertexArray;_emscripten_glBindVertexArray.sig="vi";var _emscripten_glIsVertexArray=_glIsVertexArray;_emscripten_glIsVertexArray.sig="ii";var _emscripten_glVertexPointer=_glVertexPointer;_emscripten_glVertexPointer.sig="viiip";var _emscripten_glMatrixMode=_glMatrixMode;_emscripten_glMatrixMode.sig="vi";var _emscripten_glBegin=_glBegin;_emscripten_glBegin.sig="vi";var _emscripten_glLoadIdentity=_glLoadIdentity;_emscripten_glLoadIdentity.sig="v";var _emscripten_glVertexAttribDivisor=_glVertexAttribDivisor;_emscripten_glVertexAttribDivisor.sig="vii";var _emscripten_glDrawArraysInstanced=_glDrawArraysInstanced;_emscripten_glDrawArraysInstanced.sig="viiii";var _emscripten_glDrawElementsInstanced=_glDrawElementsInstanced;_emscripten_glDrawElementsInstanced.sig="viiipi";var _emscripten_glVertexAttribDivisorNV=_glVertexAttribDivisorNV,_emscripten_glDrawArraysInstancedNV=_glDrawArraysInstancedNV,_emscripten_glDrawElementsInstancedNV=_glDrawElementsInstancedNV,_emscripten_glVertexAttribDivisorEXT=_glVertexAttribDivisorEXT,_emscripten_glDrawArraysInstancedEXT=_glDrawArraysInstancedEXT,_emscripten_glDrawElementsInstancedEXT=_glDrawElementsInstancedEXT,_emscripten_glVertexAttribDivisorARB=_glVertexAttribDivisorARB,_emscripten_glDrawArraysInstancedARB=_glDrawArraysInstancedARB,_emscripten_glDrawElementsInstancedARB=_glDrawElementsInstancedARB,_emscripten_glDrawBuffers=_glDrawBuffers;_emscripten_glDrawBuffers.sig="vip";var _emscripten_glDrawBuffersEXT=_glDrawBuffersEXT,_emscripten_glMultiDrawArrays=_glMultiDrawArrays;_emscripten_glMultiDrawArrays.sig="vippi";var _emscripten_glMultiDrawArraysANGLE=_glMultiDrawArraysANGLE,_emscripten_glMultiDrawArraysWEBGL=_glMultiDrawArraysWEBGL,_emscripten_glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedANGLE,_emscripten_glMultiDrawArraysInstancedWEBGL=_glMultiDrawArraysInstancedWEBGL,_emscripten_glMultiDrawElements=_glMultiDrawElements;_emscripten_glMultiDrawElements.sig="vipipi";var _emscripten_glMultiDrawElementsANGLE=_glMultiDrawElementsANGLE,_emscripten_glMultiDrawElementsWEBGL=_glMultiDrawElementsWEBGL,_emscripten_glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedANGLE,_emscripten_glMultiDrawElementsInstancedWEBGL=_glMultiDrawElementsInstancedWEBGL,_emscripten_glClearDepth=_glClearDepth;_emscripten_glClearDepth.sig="vd";var _emscripten_glDepthRange=_glDepthRange;_emscripten_glDepthRange.sig="vdd";var writeGLArray=(e,r,t,n)=>{var a=e.length,o=t>>2;for(var l=0;l>>0]=e[l];return a},webglPowerPreferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(e,r){e>>>=0,r>>>=0;var t=r>>>2,n=HEAP32[t+6>>>0],a={alpha:!!HEAP32[t+0>>>0],depth:!!HEAP32[t+1>>>0],stencil:!!HEAP32[t+2>>>0],antialias:!!HEAP32[t+3>>>0],premultipliedAlpha:!!HEAP32[t+4>>>0],preserveDrawingBuffer:!!HEAP32[t+5>>>0],powerPreference:webglPowerPreferences[n],failIfMajorPerformanceCaveat:!!HEAP32[t+7>>>0],majorVersion:HEAP32[t+8>>>0],minorVersion:HEAP32[t+9>>>0],enableExtensionsByDefault:HEAP32[t+10>>>0],explicitSwapControl:HEAP32[t+11>>>0],proxyContextToMainThread:HEAP32[t+12>>>0],renderViaOffscreenBackBuffer:HEAP32[t+13>>>0]},o=findCanvasEventTarget(e);if(!o||a.explicitSwapControl)return 0;var _=GL.createContext(o,a);return _}_emscripten_webgl_do_create_context.sig="ppp";var _emscripten_webgl_create_context=_emscripten_webgl_do_create_context;_emscripten_webgl_create_context.sig="ppp";function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}_emscripten_webgl_do_get_current_context.sig="p";var _emscripten_webgl_get_current_context=_emscripten_webgl_do_get_current_context;_emscripten_webgl_get_current_context.sig="p";var _emscripten_webgl_do_commit_frame=()=>!GL.currentContext||!GL.currentContext.GLctx||!GL.currentContext.attributes.explicitSwapControl?-3:0;_emscripten_webgl_do_commit_frame.sig="i";var _emscripten_webgl_commit_frame=_emscripten_webgl_do_commit_frame;_emscripten_webgl_commit_frame.sig="i";function _emscripten_webgl_make_context_current(e){e>>>=0;var r=GL.makeContextCurrent(e);return r?0:-5}_emscripten_webgl_make_context_current.sig="ip";function _emscripten_webgl_get_drawing_buffer_size(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=GL.getContext(e);return!n||!n.GLctx||!r||!t?-5:(HEAP32[r>>>2>>>0]=n.GLctx.drawingBufferWidth,HEAP32[t>>>2>>>0]=n.GLctx.drawingBufferHeight,0)}_emscripten_webgl_get_drawing_buffer_size.sig="ippp";function _emscripten_webgl_get_context_attributes(e,r){if(e>>>=0,r>>>=0,!r)return-5;if(e=GL.contexts[e],!e)return-3;var t=e.GLctx;if(!t)return-3;t=t.getContextAttributes(),HEAP32[r>>>2>>>0]=t.alpha,HEAP32[r+4>>>2>>>0]=t.depth,HEAP32[r+8>>>2>>>0]=t.stencil,HEAP32[r+12>>>2>>>0]=t.antialias,HEAP32[r+16>>>2>>>0]=t.premultipliedAlpha,HEAP32[r+20>>>2>>>0]=t.preserveDrawingBuffer;var n=t.powerPreference&&webglPowerPreferences.indexOf(t.powerPreference);return HEAP32[r+24>>>2>>>0]=n,HEAP32[r+28>>>2>>>0]=t.failIfMajorPerformanceCaveat,HEAP32[r+32>>>2>>>0]=e.version,HEAP32[r+36>>>2>>>0]=0,HEAP32[r+40>>>2>>>0]=e.attributes.enableExtensionsByDefault,0}_emscripten_webgl_get_context_attributes.sig="ipp";function _emscripten_webgl_destroy_context(e){e>>>=0,GL.currentContext==e&&(GL.currentContext=0),GL.deleteContext(e)}_emscripten_webgl_destroy_context.sig="ip";function _emscripten_webgl_enable_extension(e,r){e>>>=0,r>>>=0;var t=GL.getContext(e),n=UTF8ToString(r);n.startsWith("GL_")&&(n=n.substr(3)),n=="ANGLE_instanced_arrays"&&webgl_enable_ANGLE_instanced_arrays(GLctx),n=="OES_vertex_array_object"&&webgl_enable_OES_vertex_array_object(GLctx),n=="WEBGL_draw_buffers"&&webgl_enable_WEBGL_draw_buffers(GLctx),n=="WEBGL_multi_draw"&&webgl_enable_WEBGL_multi_draw(GLctx);var a=t.GLctx.getExtension(n);return!!a}_emscripten_webgl_enable_extension.sig="ipp";var _emscripten_supports_offscreencanvas=()=>0;_emscripten_supports_offscreencanvas.sig="i";var registerWebGlEventCallback=(e,r,t,n,a,o,_)=>{var l=(u=event)=>{getWasmTableEntry(n)(a,0,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_webglcontextlost_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerWebGlEventCallback(e,r,t,n,31,"webglcontextlost",a),0}_emscripten_set_webglcontextlost_callback_on_thread.sig="ippipp";function _emscripten_set_webglcontextrestored_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerWebGlEventCallback(e,r,t,n,32,"webglcontextrestored",a),0}_emscripten_set_webglcontextrestored_callback_on_thread.sig="ippipp";function _emscripten_is_webgl_context_lost(e){return e>>>=0,!GL.contexts[e]||GL.contexts[e].GLctx.isContextLost()}_emscripten_is_webgl_context_lost.sig="ip";function _emscripten_webgl_get_supported_extensions(){return stringToNewUTF8(GLctx.getSupportedExtensions().join(" "))}_emscripten_webgl_get_supported_extensions.sig="p";var _emscripten_webgl_get_program_parameter_d=(e,r)=>GLctx.getProgramParameter(GL.programs[e],r);_emscripten_webgl_get_program_parameter_d.sig="dii";function _emscripten_webgl_get_program_info_log_utf8(e){return stringToNewUTF8(GLctx.getProgramInfoLog(GL.programs[e]))}_emscripten_webgl_get_program_info_log_utf8.sig="pi";var _emscripten_webgl_get_shader_parameter_d=(e,r)=>GLctx.getShaderParameter(GL.shaders[e],r);_emscripten_webgl_get_shader_parameter_d.sig="dii";function _emscripten_webgl_get_shader_info_log_utf8(e){return stringToNewUTF8(GLctx.getShaderInfoLog(GL.shaders[e]))}_emscripten_webgl_get_shader_info_log_utf8.sig="pi";function _emscripten_webgl_get_shader_source_utf8(e){return stringToNewUTF8(GLctx.getShaderSource(GL.shaders[e]))}_emscripten_webgl_get_shader_source_utf8.sig="pi";var _emscripten_webgl_get_vertex_attrib_d=(e,r)=>GLctx.getVertexAttrib(e,r);_emscripten_webgl_get_vertex_attrib_d.sig="dii";var _emscripten_webgl_get_vertex_attrib_o=(e,r)=>{var t=GLctx.getVertexAttrib(e,r);return t==null?void 0:t.name};_emscripten_webgl_get_vertex_attrib_o.sig="iii";function _emscripten_webgl_get_vertex_attrib_v(e,r,t,n,a){return t>>>=0,writeGLArray(GLctx.getVertexAttrib(e,r),t,n,a)}_emscripten_webgl_get_vertex_attrib_v.sig="iiipii";var _emscripten_webgl_get_uniform_d=(e,r)=>GLctx.getUniform(GL.programs[e],webglGetUniformLocation(r));_emscripten_webgl_get_uniform_d.sig="dii";function _emscripten_webgl_get_uniform_v(e,r,t,n,a){return t>>>=0,writeGLArray(GLctx.getUniform(GL.programs[e],webglGetUniformLocation(r)),t,n,a)}_emscripten_webgl_get_uniform_v.sig="iiipii";function _emscripten_webgl_get_parameter_v(e,r,t,n){return r>>>=0,writeGLArray(GLctx.getParameter(e),r,t,n)}_emscripten_webgl_get_parameter_v.sig="iipii";var _emscripten_webgl_get_parameter_d=e=>GLctx.getParameter(e);_emscripten_webgl_get_parameter_d.sig="di";var _emscripten_webgl_get_parameter_o=e=>{var r=GLctx.getParameter(e);return r==null?void 0:r.name};_emscripten_webgl_get_parameter_o.sig="ii";function _emscripten_webgl_get_parameter_utf8(e){return stringToNewUTF8(GLctx.getParameter(e))}_emscripten_webgl_get_parameter_utf8.sig="pi";function _emscripten_webgl_get_parameter_i64v(e,r){return r>>>=0,writeI53ToI64(r,GLctx.getParameter(e))}_emscripten_webgl_get_parameter_i64v.sig="vip";var _glutPostRedisplay=()=>{GLUT.displayFunc&&!GLUT.requestedAnimationFrame&&(GLUT.requestedAnimationFrame=!0,Browser.requestAnimationFrame(function(){GLUT.requestedAnimationFrame=!1,Browser.mainLoop.runIter(function(){getWasmTableEntry(GLUT.displayFunc)()})}))};_glutPostRedisplay.sig="v";var GLUT={initTime:null,idleFunc:null,displayFunc:null,keyboardFunc:null,keyboardUpFunc:null,specialFunc:null,specialUpFunc:null,reshapeFunc:null,motionFunc:null,passiveMotionFunc:null,mouseFunc:null,buttons:0,modifiers:0,initWindowWidth:256,initWindowHeight:256,initDisplayMode:18,windowX:0,windowY:0,windowWidth:0,windowHeight:0,requestedAnimationFrame:!1,saveModifiers:e=>{GLUT.modifiers=0,e.shiftKey&&(GLUT.modifiers+=1),e.ctrlKey&&(GLUT.modifiers+=2),e.altKey&&(GLUT.modifiers+=4)},onMousemove:e=>{var r=Browser.mouseX,t=Browser.mouseY;Browser.calculateMouseEvent(e);var n=Browser.mouseX,a=Browser.mouseY;n==r&&a==t||(GLUT.buttons==0&&e.target==Module.canvas&&GLUT.passiveMotionFunc?(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.passiveMotionFunc)(r,t)):GLUT.buttons!=0&&GLUT.motionFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.motionFunc)(r,t)))},getSpecialKey:e=>{var r=null;switch(e){case 8:r=120;break;case 46:r=111;break;case 112:r=1;break;case 113:r=2;break;case 114:r=3;break;case 115:r=4;break;case 116:r=5;break;case 117:r=6;break;case 118:r=7;break;case 119:r=8;break;case 120:r=9;break;case 121:r=10;break;case 122:r=11;break;case 123:r=12;break;case 37:r=100;break;case 38:r=101;break;case 39:r=102;break;case 40:r=103;break;case 33:r=104;break;case 34:r=105;break;case 36:r=106;break;case 35:r=107;break;case 45:r=108;break;case 16:case 5:r=112;break;case 6:r=113;break;case 17:case 3:r=114;break;case 4:r=115;break;case 18:case 2:r=116;break;case 1:r=117;break}return r},getASCIIKey:e=>{if(e.ctrlKey||e.altKey||e.metaKey)return null;var r=e.keyCode;if(48<=r&&r<=57)return r;if(65<=r&&r<=90)return e.shiftKey?r:r+32;if(96<=r&&r<=105)return r-48;if(106<=r&&r<=111)return r-106+42;switch(r){case 9:case 13:case 27:case 32:case 61:return r}var t=e.shiftKey;switch(r){case 186:return t?58:59;case 187:return t?43:61;case 188:return t?60:44;case 189:return t?95:45;case 190:return t?62:46;case 191:return t?63:47;case 219:return t?123:91;case 220:return t?124:47;case 221:return t?125:93;case 222:return t?34:39}return null},onKeydown:e=>{if(GLUT.specialFunc||GLUT.keyboardFunc){var r=GLUT.getSpecialKey(e.keyCode);r!==null?GLUT.specialFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialFunc)(r,Browser.mouseX,Browser.mouseY)):(r=GLUT.getASCIIKey(e),r!==null&&GLUT.keyboardFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardFunc)(r,Browser.mouseX,Browser.mouseY)))}},onKeyup:e=>{if(GLUT.specialUpFunc||GLUT.keyboardUpFunc){var r=GLUT.getSpecialKey(e.keyCode);r!==null?GLUT.specialUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialUpFunc)(r,Browser.mouseX,Browser.mouseY)):(r=GLUT.getASCIIKey(e),r!==null&&GLUT.keyboardUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardUpFunc)(r,Browser.mouseX,Browser.mouseY)))}},touchHandler:e=>{if(e.target==Module.canvas){var r=e.changedTouches,t=r[0],n="";switch(e.type){case"touchstart":n="mousedown";break;case"touchmove":n="mousemove";break;case"touchend":n="mouseup";break;default:return}var a=document.createEvent("MouseEvent");a.initMouseEvent(n,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(a),e.preventDefault()}},onMouseButtonDown:e=>{if(Browser.calculateMouseEvent(e),GLUT.buttons|=1<{Browser.calculateMouseEvent(e),GLUT.buttons&=~(1<{Browser.calculateMouseEvent(e);var r=window.event||e,t=-Browser.getMouseWheelDelta(e);t=t==0?0:t>0?Math.max(t,1):Math.min(t,-1);var n=3;t<0&&(n=4),GLUT.mouseFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.mouseFunc)(n,0,Browser.mouseX,Browser.mouseY))},onFullscreenEventChange:e=>{var r,t;document.fullscreen||document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen?(r=screen.width,t=screen.height):(r=GLUT.windowWidth,t=GLUT.windowHeight,document.removeEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0)),Browser.setCanvasSize(r,t,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(r,t),_glutPostRedisplay()}},_glutGetModifiers=()=>GLUT.modifiers;_glutGetModifiers.sig="i";function _glutInit(e,r){e>>>=0,r>>>=0,GLUT.initTime=Date.now();var t="ontouchstart"in document.documentElement;t&&(window.addEventListener("touchmove",GLUT.touchHandler,!0),window.addEventListener("touchstart",GLUT.touchHandler,!0),window.addEventListener("touchend",GLUT.touchHandler,!0)),window.addEventListener("keydown",GLUT.onKeydown,!0),window.addEventListener("keyup",GLUT.onKeyup,!0),window.addEventListener("mousemove",GLUT.onMousemove,!0),window.addEventListener("mousedown",GLUT.onMouseButtonDown,!0),window.addEventListener("mouseup",GLUT.onMouseButtonUp,!0),window.addEventListener("mousewheel",GLUT.onMouseWheel,!0),window.addEventListener("DOMMouseScroll",GLUT.onMouseWheel,!0),Browser.resizeListeners.push(function(n,a){GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(n,a)}),__ATEXIT__.push(function(){t&&(window.removeEventListener("touchmove",GLUT.touchHandler,!0),window.removeEventListener("touchstart",GLUT.touchHandler,!0),window.removeEventListener("touchend",GLUT.touchHandler,!0)),window.removeEventListener("keydown",GLUT.onKeydown,!0),window.removeEventListener("keyup",GLUT.onKeyup,!0),window.removeEventListener("mousemove",GLUT.onMousemove,!0),window.removeEventListener("mousedown",GLUT.onMouseButtonDown,!0),window.removeEventListener("mouseup",GLUT.onMouseButtonUp,!0),window.removeEventListener("mousewheel",GLUT.onMouseWheel,!0),window.removeEventListener("DOMMouseScroll",GLUT.onMouseWheel,!0),Module.canvas.width=Module.canvas.height=1})}_glutInit.sig="vpp";var _glutInitWindowSize=(e,r)=>{Browser.setCanvasSize(GLUT.initWindowWidth=e,GLUT.initWindowHeight=r)};_glutInitWindowSize.sig="vii";var _glutInitWindowPosition=(e,r)=>{};_glutInitWindowPosition.sig="vii";var _glutGet=e=>{switch(e){case 100:return 0;case 101:return 0;case 102:return Module.canvas.width;case 103:return Module.canvas.height;case 200:return Module.canvas.width;case 201:return Module.canvas.height;case 500:return 0;case 501:return 0;case 502:return GLUT.initWindowWidth;case 503:return GLUT.initWindowHeight;case 700:var r=Date.now();return r-GLUT.initTime;case 105:return Module.ctx.getContextAttributes().stencil?8:0;case 106:return Module.ctx.getContextAttributes().depth?8:0;case 110:return Module.ctx.getContextAttributes().alpha?8:0;case 120:return Module.ctx.getContextAttributes().antialias?1:0;default:throw"glutGet("+e+") not implemented yet"}};_glutGet.sig="ii";function _glutIdleFunc(e){e>>>=0;function r(){GLUT.idleFunc&&(getWasmTableEntry(GLUT.idleFunc)(),safeSetTimeout(r,4))}GLUT.idleFunc||safeSetTimeout(r,0),GLUT.idleFunc=e}_glutIdleFunc.sig="vp";var _glutTimerFunc=function(e,r,t){return r>>>=0,safeSetTimeout(()=>getWasmTableEntry(r)(t),e)};_glutTimerFunc.sig="vipi";function _glutDisplayFunc(e){e>>>=0,GLUT.displayFunc=e}_glutDisplayFunc.sig="vp";function _glutKeyboardFunc(e){e>>>=0,GLUT.keyboardFunc=e}_glutKeyboardFunc.sig="vp";function _glutKeyboardUpFunc(e){e>>>=0,GLUT.keyboardUpFunc=e}_glutKeyboardUpFunc.sig="vp";function _glutSpecialFunc(e){e>>>=0,GLUT.specialFunc=e}_glutSpecialFunc.sig="vp";function _glutSpecialUpFunc(e){e>>>=0,GLUT.specialUpFunc=e}_glutSpecialUpFunc.sig="vp";function _glutReshapeFunc(e){e>>>=0,GLUT.reshapeFunc=e}_glutReshapeFunc.sig="vp";function _glutMotionFunc(e){e>>>=0,GLUT.motionFunc=e}_glutMotionFunc.sig="vp";function _glutPassiveMotionFunc(e){e>>>=0,GLUT.passiveMotionFunc=e}_glutPassiveMotionFunc.sig="vp";function _glutMouseFunc(e){e>>>=0,GLUT.mouseFunc=e}_glutMouseFunc.sig="vp";var _glutSetCursor=e=>{var r="auto";switch(e){case 0:break;case 1:break;case 2:r="pointer";break;case 3:break;case 4:r="help";break;case 5:break;case 6:break;case 7:r="wait";break;case 8:r="text";break;case 9:case 102:r="crosshair";break;case 10:r="ns-resize";break;case 11:r="ew-resize";break;case 12:r="n-resize";break;case 13:r="s-resize";break;case 14:r="w-resize";break;case 15:r="e-resize";break;case 16:r="nw-resize";break;case 17:r="ne-resize";break;case 18:r="se-resize";break;case 19:r="sw-resize";break;case 100:break;case 101:r="none";break;default:throw"glutSetCursor: Unknown cursor type: "+e}Module.canvas.style.cursor=r};_glutSetCursor.sig="vi";function _glutCreateWindow(e){e>>>=0;var r={antialias:(GLUT.initDisplayMode&128)!=0,depth:(GLUT.initDisplayMode&16)!=0,stencil:(GLUT.initDisplayMode&32)!=0,alpha:(GLUT.initDisplayMode&8)!=0};return Module.ctx=Browser.createContext(Module.canvas,!0,!0,r),Module.ctx?1:0}_glutCreateWindow.sig="ip";var _glutDestroyWindow=e=>(Module.ctx=Browser.destroyContext(Module.canvas,!0,!0),1);_glutDestroyWindow.sig="vi";var _glutReshapeWindow=(e,r)=>{Browser.exitFullscreen(),Browser.setCanvasSize(e,r,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(e,r),_glutPostRedisplay()};_glutReshapeWindow.sig="vii";var _glutPositionWindow=(e,r)=>{Browser.exitFullscreen(),_glutPostRedisplay()};_glutPositionWindow.sig="vii";var _glutFullScreen=()=>{GLUT.windowX=0,GLUT.windowY=0,GLUT.windowWidth=Module.canvas.width,GLUT.windowHeight=Module.canvas.height,document.addEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0),Browser.requestFullscreen(!1,!1)};_glutFullScreen.sig="v";var _glutInitDisplayMode=e=>GLUT.initDisplayMode=e;_glutInitDisplayMode.sig="vi";var _glutSwapBuffers=()=>{};_glutSwapBuffers.sig="v";var _glutMainLoop=()=>{throw _glutReshapeWindow(Module.canvas.width,Module.canvas.height),_glutPostRedisplay(),"unwind"};_glutMainLoop.sig="v";function _XOpenDisplay(e){return e>>>=0,1}_XOpenDisplay.sig="pp";function _XCreateWindow(e,r,t,n,a,o,_,l,c,u,d,p){return e>>>=0,r>>>=0,u>>>=0,d>>>=0,p>>>=0,Browser.setCanvasSize(a,o),2}_XCreateWindow.sig="pppiiiiiiippp";function _XChangeWindowAttributes(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0}_XChangeWindowAttributes.sig="ipppp";function _XSetWMHints(e,r,t){e>>>=0,r>>>=0,t>>>=0}_XSetWMHints.sig="ippp";function _XMapWindow(e,r){e>>>=0,r>>>=0}_XMapWindow.sig="ipp";function _XStoreName(e,r,t){e>>>=0,r>>>=0,t>>>=0}_XStoreName.sig="ippp";function _XInternAtom(e,r,t){return e>>>=0,r>>>=0,0}_XInternAtom.sig="pppi";function _XSendEvent(e,r,t,n,a){e>>>=0,r>>>=0,n>>>=0,a>>>=0}_XSendEvent.sig="ippipp";function _XPending(e){return e>>>=0,0}_XPending.sig="ip";var EGL={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode(e){EGL.errorCode=e},chooseConfig(e,r,t,n,a){if(e!=62e3)return EGL.setErrorCode(12296),0;if(r)for(;;){var o=HEAP32[r>>>2>>>0];if(o==12321){var _=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.alpha=_>0}else if(o==12325){var l=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.depth=l>0}else if(o==12326){var c=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.stencil=c>0}else if(o==12337){var u=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.antialias=u>0}else if(o==12338){var u=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.antialias=u==1}else if(o==12544){var d=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.lowLatency=d!=12547}else if(o==12344)break;r+=8}return(!t||!n)&&!a?(EGL.setErrorCode(12300),0):(a&&(HEAP32[a>>>2>>>0]=1),t&&n>0&&(HEAPU32[t>>>2>>>0]=62002),EGL.setErrorCode(12288),1)}};function _eglGetDisplay(e){return e>>>=0,EGL.setErrorCode(12288),e!=0&&e!=1?0:62e3}_eglGetDisplay.sig="pp";function _eglInitialize(e,r,t){return e>>>=0,r>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(r&&(HEAP32[r>>>2>>>0]=1),t&&(HEAP32[t>>>2>>>0]=4),EGL.defaultDisplayInitialized=!0,EGL.setErrorCode(12288),1)}_eglInitialize.sig="ippp";function _eglTerminate(e){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.defaultDisplayInitialized=!1,EGL.setErrorCode(12288),1)}_eglTerminate.sig="ip";function _eglGetConfigs(e,r,t,n){return e>>>=0,r>>>=0,n>>>=0,EGL.chooseConfig(e,0,r,t,n)}_eglGetConfigs.sig="ippip";function _eglChooseConfig(e,r,t,n,a){return e>>>=0,r>>>=0,t>>>=0,a>>>=0,EGL.chooseConfig(e,r,t,n,a)}_eglChooseConfig.sig="ipppip";function _eglGetConfigAttrib(e,r,t,n){if(e>>>=0,r>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(r!=62002)return EGL.setErrorCode(12293),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),t){case 12320:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?32:24,1;case 12321:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?8:0,1;case 12322:return HEAP32[n>>>2>>>0]=8,1;case 12323:return HEAP32[n>>>2>>>0]=8,1;case 12324:return HEAP32[n>>>2>>>0]=8,1;case 12325:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.depth?24:0,1;case 12326:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.stencil?8:0,1;case 12327:return HEAP32[n>>>2>>>0]=12344,1;case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12329:return HEAP32[n>>>2>>>0]=0,1;case 12330:return HEAP32[n>>>2>>>0]=4096,1;case 12331:return HEAP32[n>>>2>>>0]=16777216,1;case 12332:return HEAP32[n>>>2>>>0]=4096,1;case 12333:return HEAP32[n>>>2>>>0]=0,1;case 12334:return HEAP32[n>>>2>>>0]=0,1;case 12335:return HEAP32[n>>>2>>>0]=12344,1;case 12337:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?4:0,1;case 12338:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?1:0,1;case 12339:return HEAP32[n>>>2>>>0]=4,1;case 12340:return HEAP32[n>>>2>>>0]=12344,1;case 12341:case 12342:case 12343:return HEAP32[n>>>2>>>0]=-1,1;case 12345:case 12346:return HEAP32[n>>>2>>>0]=0,1;case 12347:return HEAP32[n>>>2>>>0]=0,1;case 12348:return HEAP32[n>>>2>>>0]=1,1;case 12349:case 12350:return HEAP32[n>>>2>>>0]=0,1;case 12351:return HEAP32[n>>>2>>>0]=12430,1;case 12352:return HEAP32[n>>>2>>>0]=4,1;case 12354:return HEAP32[n>>>2>>>0]=0,1;default:return EGL.setErrorCode(12292),0}}_eglGetConfigAttrib.sig="ippip";function _eglCreateWindowSurface(e,r,t,n){return e>>>=0,r>>>=0,n>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):r!=62002?(EGL.setErrorCode(12293),0):(EGL.setErrorCode(12288),62006)}_eglCreateWindowSurface.sig="pppip";function _eglDestroySurface(e,r){return e>>>=0,r>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):r!=62006?(EGL.setErrorCode(12301),1):(EGL.currentReadSurface==r&&(EGL.currentReadSurface=0),EGL.currentDrawSurface==r&&(EGL.currentDrawSurface=0),EGL.setErrorCode(12288),1)}_eglDestroySurface.sig="ipp";function _eglCreateContext(e,r,t,n){if(e>>>=0,r>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;for(var a=1;;){var o=HEAP32[n>>>2>>>0];if(o==12440)a=HEAP32[n+4>>>2>>>0];else{if(o==12344)break;return EGL.setErrorCode(12292),0}n+=8}return a!=2?(EGL.setErrorCode(12293),0):(EGL.contextAttributes.majorVersion=a-1,EGL.contextAttributes.minorVersion=0,EGL.context=GL.createContext(Module.canvas,EGL.contextAttributes),EGL.context!=0?(EGL.setErrorCode(12288),GL.makeContextCurrent(EGL.context),Module.useWebGL=!0,Browser.moduleContextCreatedCallbacks.forEach(function(_){_()}),GL.makeContextCurrent(null),62004):(EGL.setErrorCode(12297),0))}_eglCreateContext.sig="ppppp";function _eglDestroyContext(e,r){return e>>>=0,r>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):r!=62004?(EGL.setErrorCode(12294),0):(GL.deleteContext(EGL.context),EGL.setErrorCode(12288),EGL.currentContext==r&&(EGL.currentContext=0),1)}_eglDestroyContext.sig="ipp";function _eglQuerySurface(e,r,t,n){if(e>>>=0,r>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(r!=62006)return EGL.setErrorCode(12301),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),t){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12376:return 1;case 12375:return HEAP32[n>>>2>>>0]=Module.canvas.width,1;case 12374:return HEAP32[n>>>2>>>0]=Module.canvas.height,1;case 12432:return HEAP32[n>>>2>>>0]=-1,1;case 12433:return HEAP32[n>>>2>>>0]=-1,1;case 12434:return HEAP32[n>>>2>>>0]=-1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;case 12441:return HEAP32[n>>>2>>>0]=12442,1;case 12435:return HEAP32[n>>>2>>>0]=12437,1;case 12416:case 12417:case 12418:case 12419:return 1;default:return EGL.setErrorCode(12292),0}}_eglQuerySurface.sig="ippip";function _eglQueryContext(e,r,t,n){if(e>>>=0,r>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(r!=62004)return EGL.setErrorCode(12294),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),t){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12439:return HEAP32[n>>>2>>>0]=12448,1;case 12440:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.majorVersion+1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;default:return EGL.setErrorCode(12292),0}}_eglQueryContext.sig="ippip";var _eglGetError=()=>EGL.errorCode;_eglGetError.sig="i";function _eglQueryString(e,r){if(e>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(EGL.setErrorCode(12288),EGL.stringCache[r])return EGL.stringCache[r];var t;switch(r){case 12371:t=stringToNewUTF8("Emscripten");break;case 12372:t=stringToNewUTF8("1.4 Emscripten EGL");break;case 12373:t=stringToNewUTF8("");break;case 12429:t=stringToNewUTF8("OpenGL_ES");break;default:return EGL.setErrorCode(12300),0}return EGL.stringCache[r]=t,t}_eglQueryString.sig="ppi";var _eglBindAPI=e=>e==12448?(EGL.setErrorCode(12288),1):(EGL.setErrorCode(12300),0);_eglBindAPI.sig="ii";var _eglQueryAPI=()=>(EGL.setErrorCode(12288),12448);_eglQueryAPI.sig="i";var _eglWaitClient=()=>(EGL.setErrorCode(12288),1);_eglWaitClient.sig="i";var _eglWaitNative=e=>(EGL.setErrorCode(12288),1);_eglWaitNative.sig="ii";var _eglWaitGL=_eglWaitClient;_eglWaitGL.sig="i";function _eglSwapInterval(e,r){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(r==0?_emscripten_set_main_loop_timing(0,0):_emscripten_set_main_loop_timing(1,r),EGL.setErrorCode(12288),1)}_eglSwapInterval.sig="ipi";function _eglMakeCurrent(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):n!=0&&n!=62004?(EGL.setErrorCode(12294),0):t!=0&&t!=62006||r!=0&&r!=62006?(EGL.setErrorCode(12301),0):(GL.makeContextCurrent(n?EGL.context:null),EGL.currentContext=n,EGL.currentDrawSurface=r,EGL.currentReadSurface=t,EGL.setErrorCode(12288),1)}_eglMakeCurrent.sig="ipppp";function _eglGetCurrentContext(){return EGL.currentContext}_eglGetCurrentContext.sig="p";function _eglGetCurrentSurface(e){return e==12378?EGL.currentReadSurface:e==12377?EGL.currentDrawSurface:(EGL.setErrorCode(12300),0)}_eglGetCurrentSurface.sig="pi";function _eglGetCurrentDisplay(){return EGL.currentContext?62e3:0}_eglGetCurrentDisplay.sig="p";function _eglSwapBuffers(e,r){if(e>>>=0,r>>>=0,!EGL.defaultDisplayInitialized)EGL.setErrorCode(12289);else if(!Module.ctx)EGL.setErrorCode(12290);else if(Module.ctx.isContextLost())EGL.setErrorCode(12302);else return EGL.setErrorCode(12288),1;return 0}_eglSwapBuffers.sig="ipp";var _eglReleaseThread=()=>(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.setErrorCode(12288),1);_eglReleaseThread.sig="i";function _uuid_clear(e){return e>>>=0,zeroMemory(e,16)}_uuid_clear.sig="vp";function _uuid_compare(e,r){return e>>>=0,r>>>=0,_memcmp(e,r,16)}_uuid_compare.sig="ipp";function _uuid_copy(e,r){return e>>>=0,r>>>=0,_memcpy(e,r,16)}_uuid_copy.sig="vpp";function _uuid_generate(e){e>>>=0;var r=null;if(ENVIRONMENT_IS_NODE)try{var t=Y("crypto").randomBytes;r=t(16)}catch(_){}else ENVIRONMENT_IS_WEB&&typeof window.crypto<"u"&&typeof window.crypto.getRandomValues<"u"&&(r=new Uint8Array(16),window.crypto.getRandomValues(r));if(!r){r=new Array(16);for(var n=new Date().getTime(),a=0;a<16;a++){var o=(n+Math.random()*256)%256|0;n=n/256|0,r[a]=o}}r[6]=r[6]&15|64,r[8]=r[8]&63|128,writeArrayToMemory(r,e)}_uuid_generate.sig="vp";function _uuid_is_null(e){e>>>=0;for(var r=0;r<4;r++,e=e+4|0){var t=HEAP32[e>>>2>>>0];if(t)return 0}return 1}_uuid_is_null.sig="ip";function _uuid_parse(e,r){if(e>>>=0,r>>>=0,e=UTF8ToString(e),e.length===36){var t=0,n=new Array(16);return e.toLowerCase().replace(/[0-9a-f]{2}/g,function(a){t<16&&(n[t++]=parseInt(a,16))}),t<16?-1:(writeArrayToMemory(n,r),0)}return-1}_uuid_parse.sig="ipp";function _uuid_unparse(e,r,t){e>>>=0,r>>>=0;var n=0,a="xxxx-xx-xx-xx-xxxxxx".replace(/[x]/g,function(o){var _=t?HEAPU8[e+n>>>0].toString(16).toUpperCase():HEAPU8[e+n>>>0].toString(16);return _=_.length===1?"0"+_:_,n++,_});stringToUTF8(a,r,37)}_uuid_unparse.sig="vpp";function _uuid_unparse_lower(e,r){e>>>=0,r>>>=0,_uuid_unparse(e,r)}_uuid_unparse_lower.sig="vpp";function _uuid_unparse_upper(e,r){e>>>=0,r>>>=0,_uuid_unparse(e,r,!0)}_uuid_unparse_upper.sig="vpp";function _uuid_type(e){return e>>>=0,4}_uuid_type.sig="ip";function _uuid_variant(e){return e>>>=0,1}_uuid_variant.sig="ip";var GLEW={isLinaroFork:1,extensions:null,error:{0:null,1:null,2:null,3:null,4:null,5:null,6:null,7:null,8:null},version:{1:null,2:null,3:null,4:null},errorStringConstantFromCode(e){if(GLEW.isLinaroFork)switch(e){case 4:return"OpenGL ES lib expected, found OpenGL lib";case 5:return"OpenGL lib expected, found OpenGL ES lib";case 6:return"Missing EGL version";case 7:return"EGL 1.1 and up are supported";default:break}switch(e){case 0:return"No error";case 1:return"Missing GL version";case 2:return"GL 1.1 and up are supported";case 3:return"GLX 1.2 and up are supported";default:return null}},errorString(e){if(!GLEW.error[e]){var r=GLEW.errorStringConstantFromCode(e);r||(r="Unknown error",e=8),GLEW.error[e]=stringToNewUTF8(r)}return GLEW.error[e]},versionStringConstantFromCode(e){switch(e){case 1:return"1.10.0";case 2:return"1";case 3:return"10";case 4:return"0";default:return null}},versionString(e){if(!GLEW.version[e]){var r=GLEW.versionStringConstantFromCode(e);if(!r)return 0;GLEW.version[e]=stringToNewUTF8(r)}return GLEW.version[e]},extensionIsSupported(e){return GLEW.extensions||(GLEW.extensions=webglGetExtensions()),GLEW.extensions.includes(e)?1:GLEW.extensions.includes("GL_"+e)}},_glewInit=()=>0;_glewInit.sig="i";function _glewIsSupported(e){e>>>=0;for(var r=UTF8ToString(e).split(" "),t=0;t>>=0,GLEW.extensionIsSupported(UTF8ToString(e))}_glewGetExtension.sig="ip";function _glewGetErrorString(e){return GLEW.errorString(e)}_glewGetErrorString.sig="pi";function _glewGetString(e){return GLEW.versionString(e)}_glewGetString.sig="pi";var IDBStore={indexedDB(){if(typeof indexedDB<"u")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(e,"IDBStore used, but indexedDB not supported"),e},DB_VERSION:22,DB_STORE_NAME:"FILE_DATA",dbs:{},blobs:[0],getDB(e,r){var t=IDBStore.dbs[e];if(t)return r(null,t);var n;try{n=IDBStore.indexedDB().open(e,IDBStore.DB_VERSION)}catch(a){return r(a)}n.onupgradeneeded=a=>{var o=a.target.result,_=a.target.transaction,l;o.objectStoreNames.contains(IDBStore.DB_STORE_NAME)?l=_.objectStore(IDBStore.DB_STORE_NAME):l=o.createObjectStore(IDBStore.DB_STORE_NAME)},n.onsuccess=()=>{t=n.result,IDBStore.dbs[e]=t,r(null,t)},n.onerror=function(a){r(a.target.error||"unknown error"),a.preventDefault()}},getStore(e,r,t){IDBStore.getDB(e,(n,a)=>{if(n)return t(n);var o=a.transaction([IDBStore.DB_STORE_NAME],r);o.onerror=l=>{t(l.target.error||"unknown error"),l.preventDefault()};var _=o.objectStore(IDBStore.DB_STORE_NAME);t(null,_)})},getFile(e,r,t){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return t(n);var o=a.get(r);o.onsuccess=_=>{var l=_.target.result;return l?t(null,l):t("file ".concat(r," not found"))},o.onerror=t})},setFile(e,r,t,n){IDBStore.getStore(e,"readwrite",(a,o)=>{if(a)return n(a);var _=o.put(t,r);_.onsuccess=l=>n(),_.onerror=n})},deleteFile(e,r,t){IDBStore.getStore(e,"readwrite",(n,a)=>{if(n)return t(n);var o=a.delete(r);o.onsuccess=_=>t(),o.onerror=t})},existsFile(e,r,t){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return t(n);var o=a.count(r);o.onsuccess=_=>t(null,_.target.result>0),o.onerror=t})},clearStore(e,r){IDBStore.getStore(e,"readwrite",(t,n)=>{if(t)return r(t);var a=n.clear();a.onsuccess=o=>r(),a.onerror=r})}},_emscripten_idb_async_load=function(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,IDBStore.getFile(UTF8ToString(e),UTF8ToString(r),(o,_)=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(t);return}var l=_malloc(_.length);HEAPU8.set(_,l>>>0),getWasmTableEntry(n)(t,l,_.length),_free(l)})})};_emscripten_idb_async_load.sig="vppppp";var _emscripten_idb_async_store=function(e,r,t,n,a,o,_){e>>>=0,r>>>=0,t>>>=0,a>>>=0,o>>>=0,_>>>=0,IDBStore.setFile(UTF8ToString(e),UTF8ToString(r),new Uint8Array(HEAPU8.subarray(t>>>0,t+n>>>0)),l=>{callUserCallback(()=>{if(l){_&&getWasmTableEntry(_)(a);return}o&&getWasmTableEntry(o)(a)})})};_emscripten_idb_async_store.sig="vpppippp";var _emscripten_idb_async_delete=function(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,IDBStore.deleteFile(UTF8ToString(e),UTF8ToString(r),o=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(t);return}n&&getWasmTableEntry(n)(t)})})};_emscripten_idb_async_delete.sig="vppppp";var _emscripten_idb_async_exists=function(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,IDBStore.existsFile(UTF8ToString(e),UTF8ToString(r),(o,_)=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(t);return}n&&getWasmTableEntry(n)(t,_)})})};_emscripten_idb_async_exists.sig="vppppp";var _emscripten_idb_async_clear=function(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0,IDBStore.clearStore(UTF8ToString(e),a=>{callUserCallback(()=>{if(a){n&&getWasmTableEntry(n)(r);return}t&&getWasmTableEntry(t)(r)})})};_emscripten_idb_async_clear.sig="vpppp";function _emscripten_idb_load(e,r,t,n,a){throw e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_load, etc."}_emscripten_idb_load.sig="vppppp";function _emscripten_idb_store(e,r,t,n,a){throw e>>>=0,r>>>=0,t>>>=0,a>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_store, etc."}_emscripten_idb_store.sig="vpppip";function _emscripten_idb_delete(e,r,t){throw e>>>=0,r>>>=0,t>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_delete, etc."}_emscripten_idb_delete.sig="vppp";function _emscripten_idb_exists(e,r,t,n){throw e>>>=0,r>>>=0,t>>>=0,n>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_exists, etc."}_emscripten_idb_exists.sig="vpppp";function _emscripten_idb_clear(e,r){throw e>>>=0,r>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_clear, etc."}_emscripten_idb_clear.sig="vpp";var runAndAbortIfError=e=>{try{return e()}catch(r){abort(r)}},_emscripten_sleep=()=>{throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"};_emscripten_sleep.sig="vi";function _emscripten_scan_registers(e){throw e>>>=0,"Please compile your program with async support in order to use asynchronous operations like emscripten_scan_registers"}_emscripten_scan_registers.sig="vp";function _emscripten_fiber_swap(e,r){throw e>>>=0,r>>>=0,"Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_swap"}_emscripten_fiber_swap.sig="vpp";var _SDL_GetTicks=()=>Date.now()-SDL.startTime|0;_SDL_GetTicks.sig="i";function _SDL_LockSurface(e){e>>>=0;var r=SDL.surfaces[e];if(r.locked++,r.locked>1||(r.buffer||(r.buffer=_malloc(r.width*r.height*4),HEAPU32[e+20>>>2>>>0]=r.buffer),HEAPU32[e+20>>>2>>>0]=r.buffer,e==SDL.screen&&Module.screenIsReadOnly&&r.image))return 0;if(SDL.defaults.discardOnLock){if(r.image||(r.image=r.ctx.createImageData(r.width,r.height)),!SDL.defaults.opaqueFrontBuffer)return}else r.image=r.ctx.getImageData(0,0,r.width,r.height);if(e==SDL.screen&&SDL.defaults.opaqueFrontBuffer)for(var t=r.image.data,n=t.length,a=0;a>>0)}return 0}_SDL_LockSurface.sig="ip";var SDL_ttfContext=()=>SDL.ttfContext,SDL_audio=()=>SDL.audio,SDL={defaults:{width:320,height:200,copyOnLock:!0,discardOnLock:!1,opaqueFrontBuffer:!0},version:null,surfaces:{},canvasPool:[],events:[],fonts:[null],audios:[null],rwops:[null],music:{audio:null,volume:1},mixerFrequency:22050,mixerFormat:32784,mixerNumChannels:2,mixerChunkSize:1024,channelMinimumNumber:0,GL:!1,glAttributes:{0:3,1:3,2:2,3:0,4:0,5:1,6:16,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:0,17:0,18:0},keyboardState:null,keyboardMap:{},canRequestFullscreen:!1,isRequestingFullscreen:!1,textInput:!1,startTime:null,initFlags:0,buttonState:0,modState:0,DOMButtons:[0,0,0],DOMEventToSDLEvent:{},TOUCH_DEFAULT_ID:0,eventHandler:null,eventHandlerContext:null,eventHandlerTemp:0,keyCodes:{16:1249,17:1248,18:1250,20:1081,33:1099,34:1102,35:1101,36:1098,37:1104,38:1106,39:1103,40:1105,44:316,45:1097,46:127,91:1251,93:1125,96:1122,97:1113,98:1114,99:1115,100:1116,101:1117,102:1118,103:1119,104:1120,105:1121,106:1109,107:1111,109:1110,110:1123,111:1108,112:1082,113:1083,114:1084,115:1085,116:1086,117:1087,118:1088,119:1089,120:1090,121:1091,122:1092,123:1093,124:1128,125:1129,126:1130,127:1131,128:1132,129:1133,130:1134,131:1135,132:1136,133:1137,134:1138,135:1139,144:1107,160:94,161:33,162:34,163:35,164:36,165:37,166:38,167:95,168:40,169:41,170:42,171:43,172:124,173:45,174:123,175:125,176:126,181:127,182:129,183:128,188:44,190:46,191:47,192:96,219:91,220:92,221:93,222:39,224:1251},scanCodes:{8:42,9:43,13:40,27:41,32:44,35:204,39:53,44:54,46:55,47:56,48:39,49:30,50:31,51:32,52:33,53:34,54:35,55:36,56:37,57:38,58:203,59:51,61:46,91:47,92:49,93:48,96:52,97:4,98:5,99:6,100:7,101:8,102:9,103:10,104:11,105:12,106:13,107:14,108:15,109:16,110:17,111:18,112:19,113:20,114:21,115:22,116:23,117:24,118:25,119:26,120:27,121:28,122:29,127:76,305:224,308:226,316:70},loadRect:e=>({x:HEAP32[e+0>>>2>>>0],y:HEAP32[e+4>>>2>>>0],w:HEAP32[e+8>>>2>>>0],h:HEAP32[e+12>>>2>>>0]}),updateRect:(e,r)=>{HEAP32[e>>>2>>>0]=r.x,HEAP32[e+4>>>2>>>0]=r.y,HEAP32[e+8>>>2>>>0]=r.w,HEAP32[e+12>>>2>>>0]=r.h},intersectionOfRects:(e,r)=>{var t=Math.max(e.x,r.x),n=Math.max(e.y,r.y),a=Math.min(e.x+e.w,r.x+r.w),o=Math.min(e.y+e.h,r.y+r.h);return{x:t,y:n,w:Math.max(t,a)-t,h:Math.max(n,o)-n}},checkPixelFormat:e=>{},loadColorToCSSRGB:e=>{var r=HEAP32[e>>>2>>>0];return"rgb("+(r&255)+","+(r>>8&255)+","+(r>>16&255)+")"},loadColorToCSSRGBA:e=>{var r=HEAP32[e>>>2>>>0];return"rgba("+(r&255)+","+(r>>8&255)+","+(r>>16&255)+","+(r>>24&255)/255+")"},translateColorToCSSRGBA:e=>"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>>24)/255+")",translateRGBAToCSSRGBA:(e,r,t,n)=>"rgba("+(e&255)+","+(r&255)+","+(t&255)+","+(n&255)/255+")",translateRGBAToColor:(e,r,t,n)=>e|r<<8|t<<16|n<<24,makeSurface:(e,r,t,n,a,o,_,l,c)=>{var u=t&1,d=t&2097152,p=t&67108864,f=_malloc(60),m=_malloc(44),g=d?1:4,v=0;!u&&!p&&(v=_malloc(e*r*4)),HEAP32[f>>>2>>>0]=t,HEAPU32[f+4>>>2>>>0]=m,HEAP32[f+8>>>2>>>0]=e,HEAP32[f+12>>>2>>>0]=r,HEAP32[f+16>>>2>>>0]=e*g,HEAPU32[f+20>>>2>>>0]=v,HEAP32[f+36>>>2>>>0]=0,HEAP32[f+40>>>2>>>0]=0,HEAP32[f+44>>>2>>>0]=Module.canvas.width,HEAP32[f+48>>>2>>>0]=Module.canvas.height,HEAP32[f+56>>>2>>>0]=1,HEAP32[m>>>2>>>0]=-2042224636,HEAP32[m+4>>>2>>>0]=0,HEAP8[m+8>>>0]=g*8,HEAP8[m+9>>>0]=g,HEAP32[m+12>>>2>>>0]=o||255,HEAP32[m+16>>>2>>>0]=_||65280,HEAP32[m+20>>>2>>>0]=l||16711680,HEAP32[m+24>>>2>>>0]=c||4278190080,SDL.GL=SDL.GL||p;var S;n?S=Module.canvas:(SDL.canvasPool.length>0?S=SDL.canvasPool.pop():S=document.createElement("canvas"),S.width=e,S.height=r);var y={antialias:SDL.glAttributes[13]!=0&&SDL.glAttributes[14]>1,depth:SDL.glAttributes[6]>0,stencil:SDL.glAttributes[7]>0,alpha:SDL.glAttributes[3]>0},h=Browser.createContext(S,p,n,y);return SDL.surfaces[f]={width:e,height:r,canvas:S,ctx:h,surf:f,buffer:v,pixelFormat:m,alpha:255,flags:t,locked:0,usePageCanvas:n,source:a,isFlagSet:b=>t&b},f},copyIndexedColorData:(e,r,t,n,a)=>{if(e.colors){var o=Module.canvas.width,_=Module.canvas.height,l=r||0,c=t||0,u=(n||o-l)+l,d=(a||_-c)+c,p=e.buffer;e.image.data32||(e.image.data32=new Uint32Array(e.image.data.buffer));for(var f=e.image.data32,m=e.colors32,g=c;g>>0]]}},freeSurface:e=>{var r=e+56,t=HEAP32[r>>>2>>>0];if(t>1){HEAP32[r>>>2>>>0]=t-1;return}var n=SDL.surfaces[e];!n.usePageCanvas&&n.canvas&&SDL.canvasPool.push(n.canvas),n.buffer&&_free(n.buffer),_free(n.pixelFormat),_free(e),SDL.surfaces[e]=null,e===SDL.screen&&(SDL.screen=null)},blitSurface:(e,r,t,n,a)=>{var o=SDL.surfaces[e],_=SDL.surfaces[t],l,c;if(r?l=SDL.loadRect(r):l={x:0,y:0,w:o.width,h:o.height},n?c=SDL.loadRect(n):c={x:0,y:0,w:o.width,h:o.height},_.clipRect){var u=!a||l.w===0?1:l.w/c.w,d=!a||l.h===0?1:l.h/c.h;c=SDL.intersectionOfRects(_.clipRect,c),l.w=c.w*u,l.h=c.h*d,n&&SDL.updateRect(n,c)}var p,f;if(a?(p=c.w,f=c.h):(p=l.w,f=l.h),l.w===0||l.h===0||p===0||f===0)return 0;var m=_.ctx.globalAlpha;return _.ctx.globalAlpha=o.alpha/255,_.ctx.drawImage(o.canvas,l.x,l.y,l.w,l.h,c.x,c.y,p,f),_.ctx.globalAlpha=m,t!=SDL.screen&&(warnOnce("WARNING: copying canvas data to memory for compatibility"),_SDL_LockSurface(t),_.locked--),0},downFingers:{},savedKeydown:null,receiveEvent:e=>{function r(){for(var d in SDL.keyboardMap)SDL.events.push({type:"keyup",keyCode:SDL.keyboardMap[d]})}switch(e.type){case"touchstart":case"touchmove":{e.preventDefault();var t=[];if(e.type==="touchstart")for(var n=0;n0?Math.max(c,1):Math.min(c,-1);var u=c>0?3:4;SDL.events.push({type:"mousedown",button:u,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"mouseup",button:u,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"wheel",deltaX:0,deltaY:c}),e.preventDefault();break;case"mousemove":if(SDL.DOMButtons[0]===1&&SDL.events.push({type:"touchmove",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),Browser.pointerLock&&("mozMovementX"in e&&(e.movementX=e.mozMovementX,e.movementY=e.mozMovementY),e.movementX==0&&e.movementY==0)){e.preventDefault();return}case"keydown":case"keyup":case"keypress":case"mousedown":case"mouseup":if((e.type!=="keydown"||!SDL_unicode()&&!SDL.textInput||e.keyCode===8||e.keyCode===9)&&e.preventDefault(),e.type=="mousedown")SDL.DOMButtons[e.button]=1,SDL.events.push({type:"touchstart",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}});else if(e.type=="mouseup"){if(!SDL.DOMButtons[e.button])return;SDL.events.push({type:"touchend",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),SDL.DOMButtons[e.button]=0}e.type==="keydown"||e.type==="mousedown"?SDL.canRequestFullscreen=!0:(e.type==="keyup"||e.type==="mouseup")&&(SDL.isRequestingFullscreen&&(Module.requestFullscreen(!0,!0),SDL.isRequestingFullscreen=!1),SDL.canRequestFullscreen=!1),e.type==="keypress"&&SDL.savedKeydown?(SDL.savedKeydown.keypressCharCode=e.charCode,SDL.savedKeydown=null):e.type==="keydown"&&(SDL.savedKeydown=e),(e.type!=="keypress"||SDL.textInput)&&SDL.events.push(e);break;case"mouseout":for(var n=0;n<3;n++)SDL.DOMButtons[n]&&(SDL.events.push({type:"mouseup",button:n,pageX:e.pageX,pageY:e.pageY}),SDL.DOMButtons[n]=0);e.preventDefault();break;case"focus":SDL.events.push(e),e.preventDefault();break;case"blur":SDL.events.push(e),r(),e.preventDefault();break;case"visibilitychange":SDL.events.push({type:"visibilitychange",visible:!document.hidden}),r(),e.preventDefault();break;case"unload":Browser.mainLoop.runner&&(SDL.events.push(e),Browser.mainLoop.runner());return;case"resize":SDL.events.push(e),e.preventDefault&&e.preventDefault();break}SDL.events.length>=1e4&&(err("SDL event queue full, dropping events"),SDL.events=SDL.events.slice(0,1e4)),SDL.flushEventsToHandler()},lookupKeyCodeForEvent:e=>{var r=e.keyCode;return r>=65&&r<=90?r+=32:(r=SDL.keyCodes[e.keyCode]||e.keyCode,e.location===2&&r>=1248&&r<=1251&&(r+=4)),r},handleEvent:e=>{if(!e.handled)switch(e.handled=!0,e.type){case"touchstart":case"touchend":case"touchmove":{Browser.calculateMouseEvent(e);break}case"keydown":case"keyup":{var r=e.type==="keydown",t=SDL.lookupKeyCodeForEvent(e);HEAP8[SDL.keyboardState+t>>>0]=r,SDL.modState=(HEAP8[SDL.keyboardState+1248>>>0]?64:0)|(HEAP8[SDL.keyboardState+1249>>>0]?1:0)|(HEAP8[SDL.keyboardState+1250>>>0]?256:0)|(HEAP8[SDL.keyboardState+1252>>>0]?128:0)|(HEAP8[SDL.keyboardState+1253>>>0]?2:0)|(HEAP8[SDL.keyboardState+1254>>>0]?512:0),r?SDL.keyboardMap[t]=e.keyCode:delete SDL.keyboardMap[t];break}case"mousedown":case"mouseup":e.type=="mousedown"?SDL.buttonState|=1<{if(SDL.eventHandler)for(;SDL.pollEvent(SDL.eventHandlerTemp);)getWasmTableEntry(SDL.eventHandler)(SDL.eventHandlerContext,SDL.eventHandlerTemp)},pollEvent:e=>{if(SDL.initFlags&512&&SDL.joystickEventState&&SDL.queryJoysticks(),e){for(;SDL.events.length>0;)if(SDL.makeCEvent(SDL.events.shift(),e)!==!1)return 1;return 0}return SDL.events.length>0},makeCEvent:(e,r)=>{if(typeof e=="number"){_memcpy(r,e,28),_free(e);return}switch(SDL.handleEvent(e),e.type){case"keydown":case"keyup":{var t=e.type==="keydown",n=SDL.lookupKeyCodeForEvent(e),a;n>=1024?a=n-1024:a=SDL.scanCodes[n]||n,HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[r+8>>>0]=t?1:0,HEAP8[r+9>>>0]=0,HEAP32[r+12>>>2>>>0]=a,HEAP32[r+16>>>2>>>0]=n,HEAP16[r+20>>>1>>>0]=SDL.modState,HEAP32[r+24>>>2>>>0]=e.keypressCharCode||n;break}case"keypress":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];for(var o=intArrayFromString(String.fromCharCode(e.charCode)),_=0;_>>0]=o[_];break}case"mousedown":case"mouseup":case"mousemove":{if(e.type!="mousemove"){var t=e.type==="mousedown";HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP32[r+8>>>2>>>0]=0,HEAP32[r+12>>>2>>>0]=0,HEAP8[r+16>>>0]=e.button+1,HEAP8[r+17>>>0]=t?1:0,HEAP32[r+20>>>2>>>0]=Browser.mouseX,HEAP32[r+24>>>2>>>0]=Browser.mouseY}else HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP32[r+8>>>2>>>0]=0,HEAP32[r+12>>>2>>>0]=0,HEAP32[r+16>>>2>>>0]=SDL.buttonState,HEAP32[r+20>>>2>>>0]=Browser.mouseX,HEAP32[r+24>>>2>>>0]=Browser.mouseY,HEAP32[r+28>>>2>>>0]=Browser.mouseMovementX,HEAP32[r+32>>>2>>>0]=Browser.mouseMovementY;break}case"wheel":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+16>>>2>>>0]=e.deltaX,HEAP32[r+20>>>2>>>0]=e.deltaY;break}case"touchstart":case"touchend":case"touchmove":{var l=e.touch;if(!Browser.touches[l.identifier])break;var c=Module.canvas.width,u=Module.canvas.height,d=Browser.touches[l.identifier].x/c,p=Browser.touches[l.identifier].y/u,f=Browser.lastTouches[l.identifier].x/c,m=Browser.lastTouches[l.identifier].y/u,g=d-f,v=p-m;if(l.deviceID===void 0&&(l.deviceID=SDL.TOUCH_DEFAULT_ID),g===0&&v===0&&e.type==="touchmove")return!1;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=_SDL_GetTicks(),tempI64=[l.deviceID>>>0,(tempDouble=l.deviceID,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+8>>>2>>>0]=tempI64[0],HEAP32[r+12>>>2>>>0]=tempI64[1],tempI64=[l.identifier>>>0,(tempDouble=l.identifier,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+16>>>2>>>0]=tempI64[0],HEAP32[r+20>>>2>>>0]=tempI64[1],HEAPF32[r+24>>>2>>>0]=d,HEAPF32[r+28>>>2>>>0]=p,HEAPF32[r+32>>>2>>>0]=g,HEAPF32[r+36>>>2>>>0]=v,l.force!==void 0?HEAPF32[r+40>>>2>>>0]=l.force:HEAPF32[r+40>>>2>>>0]=e.type=="touchend"?0:1;break}case"unload":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];break}case"resize":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=e.w,HEAP32[r+8>>>2>>>0]=e.h;break}case"joystick_button_up":case"joystick_button_down":{var S=e.type==="joystick_button_up"?0:1;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[r+4>>>0]=e.index,HEAP8[r+5>>>0]=e.button,HEAP8[r+6>>>0]=S;break}case"joystick_axis_motion":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[r+4>>>0]=e.index,HEAP8[r+5>>>0]=e.axis,HEAP32[r+8>>>2>>>0]=SDL.joystickAxisValueConversion(e.value);break}case"focus":{var y=12;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP8[r+8>>>0]=y;break}case"blur":{var h=13;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP8[r+8>>>0]=h;break}case"visibilitychange":{var b=1,w=2,k=e.visible?b:w;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP8[r+8>>>0]=k;break}default:throw"Unhandled SDL event: "+e.type}},makeFontString:(e,r)=>(r.charAt(0)!="'"&&r.charAt(0)!='"'&&(r='"'+r+'"'),e+"px "+r+", serif"),estimateTextWidth:(e,r)=>{var t=e.size,n=SDL.makeFontString(t,e.name),a=SDL_ttfContext();a.font=n;var o=a.measureText(r).width|0;return o},allocateChannels:e=>{if(!(SDL.numChannels&&SDL.numChannels>=e&&e!=0)){SDL.numChannels=e,SDL.channels=[];for(var r=0;r{if(!e)return 0;var t=e.volume*128;if(r!=-1&&(e.volume=Math.min(Math.max(r,0),128)/128,e.audio))try{e.audio.volume=e.volume,e.audio.webAudioGainNode&&(e.audio.webAudioGainNode.gain.value=e.volume)}catch(n){err("setGetVolume failed to set audio volume: ".concat(n))}return t},setPannerPosition:(e,r,t,n)=>{e&&e.audio&&e.audio.webAudioPannerNode&&e.audio.webAudioPannerNode.setPosition(r,t,n)},playWebAudio:e=>{if(e&&!e.webAudioNode&&SDL.webAudioAvailable())try{var r=e.resource.webAudio;if(e.paused=!1,!r.decodedBuffer){r.onDecodeComplete===void 0&&abort("Cannot play back audio object that was not loaded"),r.onDecodeComplete.push(()=>{e.paused||SDL.playWebAudio(e)});return}e.webAudioNode=SDL.audioContext.createBufferSource(),e.webAudioNode.buffer=r.decodedBuffer,e.webAudioNode.loop=e.loop,e.webAudioNode.onended=e.onended,e.webAudioPannerNode=SDL.audioContext.createPanner(),e.webAudioPannerNode.setPosition(0,0,-.5),e.webAudioPannerNode.panningModel="equalpower",e.webAudioGainNode=SDL.audioContext.createGain(),e.webAudioGainNode.gain.value=e.volume,e.webAudioNode.connect(e.webAudioPannerNode),e.webAudioPannerNode.connect(e.webAudioGainNode),e.webAudioGainNode.connect(SDL.audioContext.destination),e.webAudioNode.start(0,e.currentPosition),e.startTime=SDL.audioContext.currentTime-e.currentPosition}catch(t){err("playWebAudio failed: ".concat(t))}},pauseWebAudio:e=>{if(e){if(e.webAudioNode)try{e.currentPosition=(SDL.audioContext.currentTime-e.startTime)%e.resource.webAudio.decodedBuffer.duration,e.webAudioNode.onended=void 0,e.webAudioNode.stop(0),e.webAudioNode=void 0}catch(r){err("pauseWebAudio failed: ".concat(r))}e.paused=!0}},openAudioContext:()=>{SDL.audioContext||(typeof AudioContext<"u"?SDL.audioContext=new AudioContext:typeof webkitAudioContext<"u"&&(SDL.audioContext=new webkitAudioContext))},webAudioAvailable:()=>!!SDL.audioContext,fillWebAudioBufferFromHeap:(e,r,t)=>{for(var n=SDL_audio(),a=n.channels,o=0;o>>1>>>0]/32768;else if(n.format==8)for(var l=0;l>>0];_[l]=(c>=0?c-128:c+128)/128}else if(n.format==33056)for(var l=0;l>>2>>>0];else throw"Invalid SDL audio format "+n.format+"!"}},joystickEventState:1,lastJoystickState:{},joystickNamePool:{},recordJoystickState:(e,r)=>{for(var t=new Array(r.buttons.length),n=0;ntypeof e=="object"?e.pressed:e>0,queryJoysticks:()=>{for(var e in SDL.lastJoystickState){var r=SDL.getGamepad(e-1),t=SDL.lastJoystickState[e];if(typeof r>"u"||r===null)return;if(typeof r.timestamp!="number"||r.timestamp!=t.timestamp||!r.timestamp){var n;for(n=0;n(e=Math.min(1,Math.max(e,-1)),Math.ceil((e+1)*32767.5-32768)),getGamepads:()=>{var e=navigator.getGamepads||navigator.webkitGamepads||navigator.mozGamepads||navigator.gamepads||navigator.webkitGetGamepads;return e!==void 0?e.apply(navigator):[]},getGamepad:e=>{var r=SDL.getGamepads();return r.length>e&&e>=0?r[e]:null}},SDL_unicode=()=>SDL.unicode;function _SDL_Linked_Version(){return SDL.version===null&&(SDL.version=_malloc(3),HEAP8[SDL.version+0>>>0]=1,HEAP8[SDL.version+1>>>0]=3,HEAP8[SDL.version+2>>>0]=0),SDL.version}_SDL_Linked_Version.sig="p";var _SDL_Init=e=>{if(SDL.startTime=Date.now(),SDL.initFlags=e,!Module.doNotCaptureKeyboard){var r=Module.keyboardListeningElement||document;r.addEventListener("keydown",SDL.receiveEvent),r.addEventListener("keyup",SDL.receiveEvent),r.addEventListener("keypress",SDL.receiveEvent),window.addEventListener("focus",SDL.receiveEvent),window.addEventListener("blur",SDL.receiveEvent),document.addEventListener("visibilitychange",SDL.receiveEvent)}return window.addEventListener("unload",SDL.receiveEvent),SDL.keyboardState=_malloc(65536),zeroMemory(SDL.keyboardState,65536),SDL.DOMEventToSDLEvent.keydown=768,SDL.DOMEventToSDLEvent.keyup=769,SDL.DOMEventToSDLEvent.keypress=771,SDL.DOMEventToSDLEvent.mousedown=1025,SDL.DOMEventToSDLEvent.mouseup=1026,SDL.DOMEventToSDLEvent.mousemove=1024,SDL.DOMEventToSDLEvent.wheel=1027,SDL.DOMEventToSDLEvent.touchstart=1792,SDL.DOMEventToSDLEvent.touchend=1793,SDL.DOMEventToSDLEvent.touchmove=1794,SDL.DOMEventToSDLEvent.unload=256,SDL.DOMEventToSDLEvent.resize=28673,SDL.DOMEventToSDLEvent.visibilitychange=512,SDL.DOMEventToSDLEvent.focus=512,SDL.DOMEventToSDLEvent.blur=512,SDL.DOMEventToSDLEvent.joystick_axis_motion=1536,SDL.DOMEventToSDLEvent.joystick_button_down=1539,SDL.DOMEventToSDLEvent.joystick_button_up=1540,0};_SDL_Init.sig="ii";var _SDL_WasInit=e=>(SDL.startTime===null&&_SDL_Init(0),1);_SDL_WasInit.sig="ii";function _SDL_GetVideoInfo(){var e=_malloc(20);return zeroMemory(e,3),HEAP32[e+12>>>2>>>0]=Module.canvas.width,HEAP32[e+16>>>2>>>0]=Module.canvas.height,e}_SDL_GetVideoInfo.sig="p";function _SDL_ListModes(e,r){return e>>>=0,-1}_SDL_ListModes.sig="ppi";var _SDL_VideoModeOK=(e,r,t,n)=>t;_SDL_VideoModeOK.sig="iiiii";function _SDL_VideoDriverName(e,r){if(e>>>=0,SDL.startTime===null)return 0;var t=[101,109,115,99,114,105,112,116,101,110,95,115,100,108,95,100,114,105,118,101,114],n=0,a=t.length;for(r<=a&&(a=r-1);n>>0]=o,n++}return HEAP8[e+n>>>0]=0,e}_SDL_VideoDriverName.sig="ppi";var _SDL_AudioDriverName=_SDL_VideoDriverName;_SDL_AudioDriverName.sig="ppi";var _SDL_SetVideoMode=function(e,r,t,n){["touchstart","touchend","touchmove","mousedown","mouseup","mousemove","mousewheel","wheel","mouseout","DOMMouseScroll"].forEach(o=>Module.canvas.addEventListener(o,SDL.receiveEvent,!0));var a=Module.canvas;return e==0&&r==0&&(e=a.width,r=a.height),SDL.addedResizeListener||(SDL.addedResizeListener=!0,Browser.resizeListeners.push((o,_)=>{SDL.settingVideoMode||SDL.receiveEvent({type:"resize",w:o,h:_})})),SDL.settingVideoMode=!0,Browser.setCanvasSize(e,r),SDL.settingVideoMode=!1,SDL.screen&&(SDL.freeSurface(SDL.screen),assert(!SDL.screen)),SDL.GL&&(n=n|67108864),SDL.screen=SDL.makeSurface(e,r,n,!0,"screen"),SDL.screen};_SDL_SetVideoMode.sig="piiii";function _SDL_GetVideoSurface(){return SDL.screen}_SDL_GetVideoSurface.sig="p";var _SDL_AudioQuit=()=>{for(var e=0;eout("SDL_VideoQuit called (and ignored)");_SDL_VideoQuit.sig="v";var _SDL_QuitSubSystem=e=>out("SDL_QuitSubSystem called (and ignored)");_SDL_QuitSubSystem.sig="vi";var _SDL_Quit=()=>{_SDL_AudioQuit(),out("SDL_Quit called (and ignored)")};_SDL_Quit.sig="v";function _SDL_UnlockSurface(e){e>>>=0,assert(!SDL.GL);var r=SDL.surfaces[e];if(!(!r.locked||--r.locked>0)){if(r.isFlagSet(2097152))SDL.copyIndexedColorData(r);else if(r.colors)for(var m=Module.canvas.width,g=Module.canvas.height,v=r.buffer,t=r.image.data,S=r.colors,y=0;y>>0]*4,w=h+b*4;t[w]=S[c],t[w+1]=S[c+1],t[w+2]=S[c+2]}v+=m*3}else{var t=r.image.data,n=r.buffer;assert(n%4==0,"Invalid buffer offset: "+n);var a=n>>>2,o=0,_=e==SDL.screen,l;if(typeof CanvasPixelArray<"u"&&t instanceof CanvasPixelArray)for(l=t.length;o>>0];t[o]=c&255,t[o+1]=c>>8&255,t[o+2]=c>>16&255,t[o+3]=_?255:c>>24&255,a++,o+=4}else{var u=new Uint32Array(t.buffer);if(_&&SDL.defaults.opaqueFrontBuffer){l=u.length,u.set(HEAP32.subarray(a>>>0,a+l>>>0));var d=new Uint8Array(t.buffer),p=3,f=p+4*l;if(l%8==0)for(;p>>0,a+u.length>>>0))}}r.ctx.putImageData(r.image,0,0)}}_SDL_UnlockSurface.sig="vp";function _SDL_Flip(e){e>>>=0}_SDL_Flip.sig="ip";function _SDL_UpdateRect(e,r,t,n,a){e>>>=0}_SDL_UpdateRect.sig="vpiiii";function _SDL_UpdateRects(e,r,t){e>>>=0,t>>>=0}_SDL_UpdateRects.sig="vpip";var _SDL_Delay=e=>{ENVIRONMENT_IS_WORKER||abort("SDL_Delay called on the main thread! Potential infinite loop, quitting. (consider building with async support like ASYNCIFY)");for(var r=Date.now();Date.now()-r>>=0,r>>>=0,e&&_emscripten_set_window_title(e),r&&(r=UTF8ToString(r))}_SDL_WM_SetCaption.sig="vpp";var _SDL_EnableKeyRepeat=(e,r)=>{};_SDL_EnableKeyRepeat.sig="iii";function _SDL_GetKeyboardState(e){return e>>>=0,e&&(HEAP32[e>>>2>>>0]=65536),SDL.keyboardState}_SDL_GetKeyboardState.sig="pp";var _SDL_GetKeyState=()=>_SDL_GetKeyboardState(0);function _SDL_GetKeyName(e){return SDL.keyName||(SDL.keyName=stringToNewUTF8("unknown key")),SDL.keyName}_SDL_GetKeyName.sig="pi";var _SDL_GetModState=()=>SDL.modState;_SDL_GetModState.sig="i";function _SDL_GetMouseState(e,r){return e>>>=0,r>>>=0,e&&(HEAP32[e>>>2>>>0]=Browser.mouseX),r&&(HEAP32[r>>>2>>>0]=Browser.mouseY),SDL.buttonState}_SDL_GetMouseState.sig="ipp";var _SDL_WarpMouse=(e,r)=>{};_SDL_WarpMouse.sig="vii";var _SDL_ShowCursor=e=>{switch(e){case 0:return Browser.isFullscreen?(Module.canvas.requestPointerLock(),0):1;case 1:return Module.canvas.exitPointerLock(),1;case-1:return!Browser.pointerLock;default:err("SDL_ShowCursor called with unknown toggle parameter value: ".concat(e));break}};_SDL_ShowCursor.sig="ii";function _SDL_GetError(){return SDL.errorMessage||(SDL.errorMessage=stringToNewUTF8("unknown SDL-emscripten error")),SDL.errorMessage}_SDL_GetError.sig="p";function _SDL_SetError(e,r){e>>>=0,r>>>=0}_SDL_SetError.sig="vpp";function _SDL_CreateRGBSurface(e,r,t,n,a,o,_,l){return SDL.makeSurface(r,t,e,!1,"CreateRGBSurface",a,o,_,l)}_SDL_CreateRGBSurface.sig="piiiiiiii";function _SDL_CreateRGBSurfaceFrom(e,r,t,n,a,o,_,l,c){e>>>=0;var u=SDL.makeSurface(r,t,0,!1,"CreateRGBSurfaceFrom",o,_,l,c);if(n!==32)return err("TODO: Partially unimplemented SDL_CreateRGBSurfaceFrom called!"),u;for(var d=SDL.surfaces[u],p=d.ctx.createImageData(r,t),f=r*4,m=0;m>>0];return d.ctx.putImageData(p,0,0),u}_SDL_CreateRGBSurfaceFrom.sig="ppiiiiiiii";function _SDL_ConvertSurface(e,r,t){e>>>=0,r>>>=0,r&&SDL.checkPixelFormat(r);var n=SDL.surfaces[e],a=SDL.makeSurface(n.width,n.height,n.flags,!1,"copy:"+n.source),o=SDL.surfaces[a];return o.ctx.globalCompositeOperation="copy",o.ctx.drawImage(n.canvas,0,0),o.ctx.globalCompositeOperation=n.ctx.globalCompositeOperation,a}_SDL_ConvertSurface.sig="pppi";function _SDL_DisplayFormatAlpha(e){return e>>>=0,_SDL_ConvertSurface(e,0,0)}_SDL_DisplayFormatAlpha.sig="pp";function _SDL_FreeSurface(e){e>>>=0,e&&SDL.freeSurface(e)}_SDL_FreeSurface.sig="vp";function _SDL_UpperBlit(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,SDL.blitSurface(e,r,t,n,!1)}_SDL_UpperBlit.sig="ipppp";function _SDL_UpperBlitScaled(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,SDL.blitSurface(e,r,t,n,!0)}_SDL_UpperBlitScaled.sig="ipppp";var _SDL_LowerBlit=_SDL_UpperBlit;_SDL_LowerBlit.sig="ipppp";var _SDL_LowerBlitScaled=_SDL_UpperBlitScaled;_SDL_LowerBlitScaled.sig="ipppp";function _SDL_GetClipRect(e,r){e>>>=0,r>>>=0,assert(r);var t=SDL.surfaces[e],n=t.clipRect||{x:0,y:0,w:t.width,h:t.height};SDL.updateRect(r,n)}_SDL_GetClipRect.sig="vpp";function _SDL_SetClipRect(e,r){e>>>=0,r>>>=0;var t=SDL.surfaces[e];r?t.clipRect=SDL.intersectionOfRects({x:0,y:0,w:t.width,h:t.height},SDL.loadRect(r)):delete t.clipRect}_SDL_SetClipRect.sig="ipp";function _SDL_FillRect(e,r,t){e>>>=0,r>>>=0;var n=SDL.surfaces[e];assert(!n.locked),n.isFlagSet(2097152)&&(t=n.colors32[t]);var a=r?SDL.loadRect(r):{x:0,y:0,w:n.width,h:n.height};return n.clipRect&&(a=SDL.intersectionOfRects(n.clipRect,a),r&&SDL.updateRect(r,a)),n.ctx.save(),n.ctx.fillStyle=SDL.translateColorToCSSRGBA(t),n.ctx.fillRect(a.x,a.y,a.w,a.h),n.ctx.restore(),0}_SDL_FillRect.sig="ippi";function _zoomSurface(e,r,t,n){e>>>=0;var a=SDL.surfaces[e],o=a.width*r,_=a.height*t,l=SDL.makeSurface(Math.abs(o),Math.abs(_),a.flags,!1,"zoomSurface"),c=SDL.surfaces[l];return r>=0&&t>=0?c.ctx.drawImage(a.canvas,0,0,o,_):(c.ctx.save(),c.ctx.scale(r<0?-1:1,t<0?-1:1),c.ctx.drawImage(a.canvas,o<0?o:0,_<0?_:0,Math.abs(o),Math.abs(_)),c.ctx.restore()),l}_zoomSurface.sig="ppddi";function _rotozoomSurface(e,r,t,n){if(e>>>=0,r%360===0)return _zoomSurface(e,t,t,n);var a=SDL.surfaces[e],o=a.width*t,_=a.height*t,l=Math.ceil(Math.sqrt(Math.pow(o,2)+Math.pow(_,2))),c=SDL.makeSurface(l,l,a.flags,!1,"rotozoomSurface"),u=SDL.surfaces[c];return u.ctx.translate(l/2,l/2),u.ctx.rotate(-r*Math.PI/180),u.ctx.drawImage(a.canvas,-o/2,-_/2,o,_),c}_rotozoomSurface.sig="ppddi";function _SDL_SetAlpha(e,r,t){e>>>=0;var n=SDL.surfaces[e];n.alpha=t,r&65536||(n.alpha=255)}_SDL_SetAlpha.sig="ipii";function _SDL_SetColorKey(e,r,t){return e>>>=0,warnOnce("SDL_SetColorKey is a no-op for performance reasons"),0}_SDL_SetColorKey.sig="ipii";function _SDL_PollEvent(e){return e>>>=0,SDL.pollEvent(e)}_SDL_PollEvent.sig="ip";function _SDL_PushEvent(e){e>>>=0;var r=_malloc(28);return _memcpy(r,e,28),SDL.events.push(r),0}_SDL_PushEvent.sig="ip";function _SDL_PeepEvents(e,r,t,n,a){switch(e>>>=0,t){case 2:{assert(r==1);for(var o=0,_=0;oSDL.events.forEach(SDL.handleEvent);_SDL_PumpEvents.sig="v";function _emscripten_SDL_SetEventHandler(e,r){e>>>=0,r>>>=0,SDL.eventHandler=e,SDL.eventHandlerContext=r,SDL.eventHandlerTemp||(SDL.eventHandlerTemp=_malloc(28))}_emscripten_SDL_SetEventHandler.sig="vpp";function _SDL_SetColors(e,r,t,n){e>>>=0,r>>>=0;var a=SDL.surfaces[e];if(!a.colors){var o=new ArrayBuffer(1024);a.colors=new Uint8Array(o),a.colors32=new Uint32Array(o)}for(var _=0;_>>0],a.colors[l+1]=HEAPU8[r+(_*4+1)>>>0],a.colors[l+2]=HEAPU8[r+(_*4+2)>>>0],a.colors[l+3]=255}return 1}_SDL_SetColors.sig="ippii";function _SDL_SetPalette(e,r,t,n,a){return e>>>=0,t>>>=0,_SDL_SetColors(e,t,n,a)}_SDL_SetPalette.sig="ipipii";function _SDL_MapRGB(e,r,t,n){return e>>>=0,SDL.checkPixelFormat(e),r&255|(t&255)<<8|(n&255)<<16|4278190080}_SDL_MapRGB.sig="ipiii";function _SDL_MapRGBA(e,r,t,n,a){return e>>>=0,SDL.checkPixelFormat(e),r&255|(t&255)<<8|(n&255)<<16|(a&255)<<24}_SDL_MapRGBA.sig="ipiiii";function _SDL_GetRGB(e,r,t,n,a){r>>>=0,t>>>=0,n>>>=0,a>>>=0,SDL.checkPixelFormat(r),t&&(HEAP8[t>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255)}_SDL_GetRGB.sig="vipppp";function _SDL_GetRGBA(e,r,t,n,a,o){r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,SDL.checkPixelFormat(r),t&&(HEAP8[t>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255),o&&(HEAP8[o>>>0]=e>>24&255)}_SDL_GetRGBA.sig="vippppp";var _SDL_GetAppState=()=>{var e=0;return Browser.pointerLock&&(e|=1),document.hasFocus()&&(e|=2),e|=4,e};_SDL_GetAppState.sig="i";var _SDL_WM_GrabInput=()=>{};_SDL_WM_GrabInput.sig="ii";function _SDL_WM_ToggleFullScreen(e){return e>>>=0,Browser.exitFullscreen()?1:SDL.canRequestFullscreen?(SDL.isRequestingFullscreen=!0,1):0}_SDL_WM_ToggleFullScreen.sig="ip";var _IMG_Init=e=>e;_IMG_Init.sig="ii";function _SDL_FreeRW(e){for(e>>>=0,SDL.rwops[e]=null;SDL.rwops.length>0&&SDL.rwops[SDL.rwops.length-1]===null;)SDL.rwops.pop()}_SDL_FreeRW.sig="vp";var _IMG_Load_RW=function(e,r){e>>>=0;try{var t=()=>{o&&r&&_SDL_FreeRW(e)},n=b=>{var w=t;t=()=>{w(),b()}},a=(b,w)=>withStackSave(()=>{var k=stackAlloc(4),L=stackAlloc(4),E=stackAlloc(4),x=Module["_"+b](...w,k,L,E,0);return x?(n(()=>Module._stbi_image_free(x)),{rawData:!0,data:x,width:HEAP32[k>>>2>>>0],height:HEAP32[L>>>2>>>0],size:HEAP32[k>>>2>>>0]*HEAP32[L>>>2>>>0]*HEAP32[E>>>2>>>0],bpp:HEAP32[E>>>2>>>0]}):null}),o=SDL.rwops[e];if(o===void 0)return 0;var _,l=o.filename;if(l===void 0)return warnOnce("Only file names that have been preloaded are supported for IMG_Load_RW. Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;if(!_)if(l=PATH_FS.resolve(l),_=preloadedImages[l],_)Module.freePreloadedMediaOnUse&&(preloadedImages[l]=null);else return _===null&&err("Trying to reuse preloaded image, but freePreloadedMediaOnUse is set!"),warnOnce("Cannot find preloaded image "+l),warnOnce("Cannot find preloaded image "+l+". Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;var c=SDL.makeSurface(_.width,_.height,0,!1,"load:"+l),u=SDL.surfaces[c];if(u.ctx.globalCompositeOperation="copy",!_.rawData)u.ctx.drawImage(_,0,0,_.width,_.height,0,0,_.width,_.height);else{var d=u.ctx.getImageData(0,0,u.width,u.height);if(_.bpp==4)d.data.set(HEAPU8.subarray(_.data>>>0,_.data+_.size>>>0));else if(_.bpp==3)for(var p=_.size/3,f=d.data,m=_.data,g=0,v=0;v>>0],f[g++]=HEAPU8[m++>>>0],f[g++]=HEAPU8[m++>>>0],f[g++]=255;else if(_.bpp==2)for(var p=_.size,f=d.data,m=_.data,g=0,v=0;v>>0],y=HEAPU8[m++>>>0];f[g++]=S,f[g++]=S,f[g++]=S,f[g++]=y}else if(_.bpp==1)for(var p=_.size,f=d.data,m=_.data,g=0,v=0;v>>0];f[g++]=h,f[g++]=h,f[g++]=h,f[g++]=255}else return err("cannot handle bpp ".concat(_.bpp)),0;u.ctx.putImageData(d,0,0)}return u.ctx.globalCompositeOperation="source-over",_SDL_LockSurface(c),u.locked--,SDL.GL&&(u.canvas=u.ctx=null),c}finally{t()}};_IMG_Load_RW.sig="ppi";var _SDL_LoadBMP_RW=_IMG_Load_RW;_SDL_LoadBMP_RW.sig="ppi";function _SDL_RWFromFile(e,r){e>>>=0,r>>>=0;var t=SDL.rwops.length,n=UTF8ToString(e);return SDL.rwops.push({filename:n,mimetype:Browser.getMimetype(n)}),t}_SDL_RWFromFile.sig="ppp";function _IMG_Load(e){e>>>=0;var r=_SDL_RWFromFile(e,0),t=_IMG_Load_RW(r,1);return t}_IMG_Load.sig="pp";var _IMG_Quit=()=>out("IMG_Quit called (and ignored)");_IMG_Quit.sig="v";function _SDL_OpenAudio(e,r){e>>>=0,r>>>=0;try{if(SDL.audio={freq:HEAPU32[e>>>2>>>0],format:HEAPU16[e+4>>>1>>>0],channels:HEAPU8[e+6>>>0],samples:HEAPU16[e+8>>>1>>>0],callback:HEAPU32[e+16>>>2>>>0],userdata:HEAPU32[e+20>>>2>>>0],paused:!0,timer:null},SDL.audio.format==8)SDL.audio.silence=128;else if(SDL.audio.format==32784)SDL.audio.silence=0;else if(SDL.audio.format==33056)SDL.audio.silence=0;else throw"Invalid SDL audio format "+SDL.audio.format+"!";if(SDL.audio.freq<=0)throw"Unsupported sound frequency "+SDL.audio.freq+"!";if(SDL.audio.freq<=22050)SDL.audio.freq=22050;else if(SDL.audio.freq<=32e3)SDL.audio.freq=32e3;else if(SDL.audio.freq<=44100)SDL.audio.freq=44100;else if(SDL.audio.freq<=48e3)SDL.audio.freq=48e3;else if(SDL.audio.freq<=96e3)SDL.audio.freq=96e3;else throw"Unsupported sound frequency ".concat(SDL.audio.freq,"!");if(SDL.audio.channels==0)SDL.audio.channels=1;else{if(SDL.audio.channels<0||SDL.audio.channels>32)throw"Unsupported number of audio channels for SDL audio: ".concat(SDL.audio.channels,"!");SDL.audio.channels!=1&&SDL.audio.channels!=2&&out("Warning: Using untested number of audio channels ".concat(SDL.audio.channels))}if(SDL.audio.samples<128||SDL.audio.samples>524288)throw"Unsupported audio callback buffer size ".concat(SDL.audio.samples,"!");if(SDL.audio.samples&SDL.audio.samples-1)throw"Audio callback buffer size ".concat(SDL.audio.samples," must be a power-of-two!");var t=SDL.audio.samples*SDL.audio.channels;if(SDL.audio.format==8)SDL.audio.bytesPerSample=1;else if(SDL.audio.format==32784)SDL.audio.bytesPerSample=2;else if(SDL.audio.format==33056)SDL.audio.bytesPerSample=4;else throw"Invalid SDL audio format ".concat(SDL.audio.format,"!");if(SDL.audio.bufferSize=t*SDL.audio.bytesPerSample,SDL.audio.bufferDurationSecs=SDL.audio.bufferSize/SDL.audio.bytesPerSample/SDL.audio.channels/SDL.audio.freq,SDL.audio.bufferingDelay=.05,SDL.audio.buffer=_malloc(SDL.audio.bufferSize),SDL.audio.numSimultaneouslyQueuedBuffers=Module.SDL_numSimultaneouslyQueuedBuffers||5,SDL.audio.queueNewAudioData=()=>{if(SDL.audio)for(var n=0;n=SDL.audio.bufferingDelay+SDL.audio.bufferDurationSecs*SDL.audio.numSimultaneouslyQueuedBuffers)return;getWasmTableEntry(SDL.audio.callback)(SDL.audio.userdata,SDL.audio.buffer,SDL.audio.bufferSize),SDL.audio.pushAudio(SDL.audio.buffer,SDL.audio.bufferSize)}},SDL.audio.caller=()=>{if(SDL.audio){--SDL.audio.numAudioTimersPending,SDL.audio.queueNewAudioData();var n=SDL.audio.nextPlayTime-SDL.audioContext.currentTime,a=SDL.audio.bufferDurationSecs/2;SDL.audio.numAudioTimersPending>>2>>>0]=SDL.audio.freq,HEAP16[r+4>>>1>>>0]=SDL.audio.format,HEAP8[r+6>>>0]=SDL.audio.channels,HEAP8[r+7>>>0]=SDL.audio.silence,HEAP16[r+8>>>1>>>0]=SDL.audio.samples,HEAPU32[r+16>>>2>>>0]=SDL.audio.callback,HEAPU32[r+20>>>2>>>0]=SDL.audio.userdata),SDL.allocateChannels(32)}catch(n){err('Initializing SDL audio threw an exception: "'.concat(n.toString(),'"! Continuing without audio')),SDL.audio=null,SDL.allocateChannels(0),r&&(HEAP32[r>>>2>>>0]=0,HEAP16[r+4>>>1>>>0]=0,HEAP8[r+6>>>0]=0,HEAP8[r+7>>>0]=0,HEAP16[r+8>>>1>>>0]=0,HEAPU32[r+16>>>2>>>0]=0,HEAPU32[r+20>>>2>>>0]=0)}return SDL.audio?0:-1}_SDL_OpenAudio.sig="ipp";var _SDL_PauseAudio=e=>{SDL.audio&&(e?SDL.audio.timer!==void 0&&(clearTimeout(SDL.audio.timer),SDL.audio.numAudioTimersPending=0,SDL.audio.timer=void 0):SDL.audio.timer||(SDL.audio.numAudioTimersPending=1,SDL.audio.timer=safeSetTimeout(SDL.audio.caller,1)),SDL.audio.paused=e)};_SDL_PauseAudio.sig="vi";var _SDL_CloseAudio=()=>{SDL.audio&&(SDL.audio.callbackRemover&&(SDL.audio.callbackRemover(),SDL.audio.callbackRemover=null),_SDL_PauseAudio(1),_free(SDL.audio.buffer),SDL.audio=null,SDL.allocateChannels(0))};_SDL_CloseAudio.sig="v";var _SDL_LockAudio=()=>{};_SDL_LockAudio.sig="v";var _SDL_UnlockAudio=()=>{};_SDL_UnlockAudio.sig="v";function _SDL_CreateMutex(){return 0}_SDL_CreateMutex.sig="p";function _SDL_mutexP(e){return e>>>=0,0}_SDL_mutexP.sig="ip";function _SDL_mutexV(e){return e>>>=0,0}_SDL_mutexV.sig="ip";function _SDL_DestroyMutex(e){e>>>=0}_SDL_DestroyMutex.sig="vp";function _SDL_CreateCond(){return 0}_SDL_CreateCond.sig="p";function _SDL_CondSignal(e){e>>>=0}_SDL_CondSignal.sig="ip";function _SDL_CondWait(e,r){e>>>=0,r>>>=0}_SDL_CondWait.sig="ipp";function _SDL_DestroyCond(e){e>>>=0}_SDL_DestroyCond.sig="vp";var _SDL_StartTextInput=()=>{SDL.textInput=!0};_SDL_StartTextInput.sig="v";var _SDL_StopTextInput=()=>{SDL.textInput=!1};_SDL_StopTextInput.sig="v";var _Mix_Init=e=>e?8:0;_Mix_Init.sig="ii";var _Mix_Quit=()=>{};_Mix_Quit.sig="v";var _Mix_OpenAudio=(e,r,t,n)=>(SDL.openAudioContext(),autoResumeAudioContext(SDL.audioContext),SDL.allocateChannels(32),SDL.mixerFrequency=e,SDL.mixerFormat=r,SDL.mixerNumChannels=t,SDL.mixerChunkSize=n,0);_Mix_OpenAudio.sig="iiiii";var _Mix_CloseAudio=_SDL_CloseAudio;_Mix_CloseAudio.sig="v";var _Mix_AllocateChannels=e=>(SDL.allocateChannels(e),e);_Mix_AllocateChannels.sig="ii";function _Mix_ChannelFinished(e){e>>>=0,SDL.channelFinished=e}_Mix_ChannelFinished.sig="vp";var _Mix_Volume=(e,r)=>{if(e==-1){for(var t=0;t(r/=255,t/=255,SDL.setPannerPosition(SDL.channels[e],t-r,0,.1),1);_Mix_SetPanning.sig="iiii";function _Mix_LoadWAV_RW(e,r){e>>>=0;var t=SDL.rwops[e];if(t===void 0)return 0;var n="",a,o,_;if(t.filename!==void 0){n=PATH_FS.resolve(t.filename);var l=preloadedAudios[n];if(!l){l===null&&err("Trying to reuse preloaded audio, but freePreloadedMediaOnUse is set!"),Module.noAudioDecoding||warnOnce("Cannot find preloaded audio "+n);try{_=FS.readFile(n)}catch(g){return err("Couldn't find file for: ".concat(n)),0}}Module.freePreloadedMediaOnUse&&(preloadedAudios[n]=null),a=l}else if(t.bytes!==void 0)SDL.webAudioAvailable()?_=HEAPU8.buffer.slice(t.bytes,t.bytes+t.count):_=HEAPU8.subarray(t.bytes>>>0,t.bytes+t.count>>>0);else return 0;var c=_&&(_.buffer||_),u=Module.SDL_canPlayWithWebAudio===void 0||Module.SDL_canPlayWithWebAudio(n,c);if(_!==void 0&&SDL.webAudioAvailable()&&u){a=void 0,o={},o.onDecodeComplete=[];var d=g=>{o.decodedBuffer=g,o.onDecodeComplete.forEach(v=>v()),o.onDecodeComplete=void 0};SDL.audioContext.decodeAudioData(c,d)}else if(a===void 0&&_){var p=new Blob([_],{type:t.mimetype}),f=URL.createObjectURL(p);a=new Audio,a.src=f,a.mozAudioChannelType="content"}var m=SDL.audios.length;return SDL.audios.push({source:n,audio:a,webAudio:o}),m}_Mix_LoadWAV_RW.sig="ppi";function _Mix_LoadWAV(e){e>>>=0;var r=_SDL_RWFromFile(e,0),t=_Mix_LoadWAV_RW(r,0);return _SDL_FreeRW(r),t}_Mix_LoadWAV.sig="pp";function _Mix_QuickLoad_RAW(e,r){e>>>=0;for(var t,n,a=r>>1,o=new Float32Array(a),_=0;_>>1>>>0]/32768;SDL.webAudioAvailable()?(n={},n.decodedBuffer=o):(t=new Audio,t.mozAudioChannelType="content",t.numChannels=SDL.mixerNumChannels,t.frequency=SDL.mixerFrequency);var l=SDL.audios.length;return SDL.audios.push({source:"",audio:t,webAudio:n,buffer:o}),l}_Mix_QuickLoad_RAW.sig="ppi";function _Mix_FreeChunk(e){e>>>=0,SDL.audios[e]=null}_Mix_FreeChunk.sig="vp";var _Mix_ReserveChannels=e=>{SDL.channelMinimumNumber=e};_Mix_ReserveChannels.sig="ii";function _Mix_PlayChannelTimed(e,r,t,n){r>>>=0,assert(n==-1);var a=SDL.audios[r];if(!a||!a.audio&&!a.webAudio)return-1;if(e==-1){for(var o=SDL.channelMinimumNumber;o0;_Mix_FadingChannel.sig="ii";var _Mix_HaltChannel=e=>{function r(n){var a=SDL.channels[n];a.audio&&(a.audio.pause(),a.audio=null),SDL.channelFinished&&getWasmTableEntry(SDL.channelFinished)(n)}if(e!=-1)r(e);else for(var t=0;t{var e=SDL.music.audio;return e&&(e.src=e.src,e.currentPosition=0,e.pause()),SDL.music.audio=null,SDL.hookMusicFinished&&getWasmTableEntry(SDL.hookMusicFinished)(),0};_Mix_HaltMusic.sig="i";function _Mix_HookMusicFinished(e){e>>>=0,SDL.hookMusicFinished=e,SDL.music.audio&&(SDL.music.audio.onended=_Mix_HaltMusic)}_Mix_HookMusicFinished.sig="vp";var _Mix_VolumeMusic=e=>SDL.setGetVolume(SDL.music,e);_Mix_VolumeMusic.sig="ii";var _Mix_LoadMUS_RW=_Mix_LoadWAV_RW;_Mix_LoadMUS_RW.sig="pp";function _Mix_LoadMUS(e){e>>>=0;var r=_SDL_RWFromFile(e,0),t=_Mix_LoadMUS_RW(r,0);return _SDL_FreeRW(r),t}_Mix_LoadMUS.sig="pp";var _Mix_FreeMusic=_Mix_FreeChunk;_Mix_FreeMusic.sig="vp";function _Mix_PlayMusic(e,r){e>>>=0,SDL.music.audio&&(SDL.music.audio.paused||err("Music is already playing. ".concat(SDL.music.source)),SDL.music.audio.pause());var t=SDL.audios[e],n;return t.webAudio?(n={},n.resource=t,n.paused=!1,n.currentPosition=0,n.play=function(){SDL.playWebAudio(this)},n.pause=function(){SDL.pauseWebAudio(this)}):t.audio&&(n=t.audio),n.onended=function(){SDL.music.audio==this&&_Mix_HaltMusic()},n.loop=r!=0&&r!=1,n.volume=SDL.music.volume,SDL.music.audio=n,n.play(),0}_Mix_PlayMusic.sig="ipi";var _Mix_PauseMusic=()=>{var e=SDL.music.audio;e==null||e.pause()};_Mix_PauseMusic.sig="v";var _Mix_ResumeMusic=()=>{var e=SDL.music.audio;e==null||e.play()};_Mix_ResumeMusic.sig="v";var _Mix_FadeInMusicPos=_Mix_PlayMusic;_Mix_FadeInMusicPos.sig="ipiid";var _Mix_FadeOutMusic=_Mix_HaltMusic;_Mix_FadeOutMusic.sig="ii";var _Mix_PlayingMusic=()=>SDL.music.audio&&!SDL.music.audio.paused?1:0;_Mix_PlayingMusic.sig="i";var _Mix_Playing=e=>{if(e===-1){for(var r=0,t=0;t{if(e===-1){for(var r=0;r{var a;if(e===-1){for(var r=0,t=0;t{var e;return(e=SDL.music.audio)!=null&&e.paused?1:0};_Mix_PausedMusic.sig="i";var _Mix_Resume=e=>{if(e===-1){for(var r=0;r{try{var e=new OffscreenCanvas(0,0);if(SDL.ttfContext=e.getContext("2d"),typeof SDL.ttfContext.measureText!="function")throw"bad context"}catch(t){var r=document.createElement("canvas");SDL.ttfContext=r.getContext("2d")}return 0};_TTF_Init.sig="i";function _TTF_OpenFont(e,r){e>>>=0,e=PATH.normalize(UTF8ToString(e));var t=SDL.fonts.length;return SDL.fonts.push({name:e,size:r}),t}_TTF_OpenFont.sig="ppi";function _TTF_CloseFont(e){e>>>=0,SDL.fonts[e]=null}_TTF_CloseFont.sig="vp";function _TTF_RenderText_Solid(e,r,t){e>>>=0,r>>>=0,t>>>=0,r=UTF8ToString(r)||" ";var n=SDL.fonts[e],a=SDL.estimateTextWidth(n,r),o=n.size;t=SDL.loadColorToCSSRGB(t);var _=SDL.makeFontString(o,n.name),l=SDL.makeSurface(a,o,0,!1,"text:"+r),c=SDL.surfaces[l];return c.ctx.save(),c.ctx.fillStyle=t,c.ctx.font=_,c.ctx.textBaseline="bottom",c.ctx.fillText(r,0,o|0),c.ctx.restore(),l}_TTF_RenderText_Solid.sig="pppp";var _TTF_RenderText_Blended=_TTF_RenderText_Solid;_TTF_RenderText_Blended.sig="pppp";var _TTF_RenderText_Shaded=_TTF_RenderText_Solid;_TTF_RenderText_Shaded.sig="ppppp";var _TTF_RenderUTF8_Solid=_TTF_RenderText_Solid;_TTF_RenderUTF8_Solid.sig="pppp";function _TTF_SizeText(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=SDL.fonts[e];return t&&(HEAP32[t>>>2>>>0]=SDL.estimateTextWidth(a,UTF8ToString(r))),n&&(HEAP32[n>>>2>>>0]=a.size),0}_TTF_SizeText.sig="ipppp";var _TTF_SizeUTF8=_TTF_SizeText;_TTF_SizeUTF8.sig="ipppp";function _TTF_GlyphMetrics(e,r,t,n,a,o,_){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0;var l=SDL.fonts[e],c=SDL.estimateTextWidth(l,String.fromCharCode(r));_&&(HEAP32[_>>>2>>>0]=c),t&&(HEAP32[t>>>2>>>0]=0),n&&(HEAP32[n>>>2>>>0]=c),a&&(HEAP32[a>>>2>>>0]=0),o&&(HEAP32[o>>>2>>>0]=l.size)}_TTF_GlyphMetrics.sig="ipippppp";function _TTF_FontAscent(e){e>>>=0;var r=SDL.fonts[e];return r.size*.98|0}_TTF_FontAscent.sig="ip";function _TTF_FontDescent(e){e>>>=0;var r=SDL.fonts[e];return r.size*.02|0}_TTF_FontDescent.sig="ip";function _TTF_FontHeight(e){e>>>=0;var r=SDL.fonts[e];return r.size}_TTF_FontHeight.sig="ip";var _TTF_FontLineSkip=_TTF_FontHeight;_TTF_FontLineSkip.sig="ip";var _TTF_Quit=()=>out("TTF_Quit called (and ignored)");_TTF_Quit.sig="v";var SDL_gfx={drawRectangle:(e,r,t,n,a,o,_)=>{r=r<<16>>16,t=t<<16>>16,n=n<<16>>16,a=a<<16>>16;var l=SDL.surfaces[e];assert(!l.locked);var c=r{r=r<<16>>16,t=t<<16>>16,n=n<<16>>16,a=a<<16>>16;var _=SDL.surfaces[e];assert(!_.locked),_.ctx.save(),_.ctx.strokeStyle=o,_.ctx.beginPath(),_.ctx.moveTo(r,t),_.ctx.lineTo(n,a),_.ctx.stroke(),_.ctx.restore()},drawEllipse:(e,r,t,n,a,o,_)=>{r=r<<16>>16,t=t<<16>>16,n=n<<16>>16,a=a<<16>>16;var l=SDL.surfaces[e];assert(!l.locked),l.ctx.save(),l.ctx.beginPath(),l.ctx.translate(r,t),l.ctx.scale(n,a),l.ctx.arc(0,0,1,0,2*Math.PI),l.ctx.restore(),l.ctx.save(),l.ctx[o+"Style"]=_,l.ctx[o](),l.ctx.restore()},translateColorToCSSRGBA:e=>"rgba(".concat(e>>>24,",").concat(e>>16&255,",").concat(e>>8&255,",").concat(e&255,")")};function _boxColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(o))}_boxColor.sig="ipiiiii";function _boxRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"fill",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_boxRGBA.sig="ipiiiiiiii";function _rectangleColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(o))}_rectangleColor.sig="ipiiiii";function _rectangleRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"stroke",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_rectangleRGBA.sig="ipiiiiiiii";function _ellipseColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(o))}_ellipseColor.sig="ipiiiii";function _ellipseRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"stroke",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_ellipseRGBA.sig="ipiiiiiiii";function _filledEllipseColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(o))}_filledEllipseColor.sig="ipiiiii";function _filledEllipseRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"fill",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_filledEllipseRGBA.sig="ipiiiiiiii";function _lineColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawLine(e,r,t,n,a,SDL_gfx.translateColorToCSSRGBA(o))}_lineColor.sig="ipiiiii";function _lineRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawLine(e,r,t,n,a,SDL.translateRGBAToCSSRGBA(o,_,l,c))}_lineRGBA.sig="ipiiiiiiii";function _pixelRGBA(e,r,t,n,a,o,_){return e>>>=0,_boxRGBA(e,r,t,r,t,n,a,o,_)}_pixelRGBA.sig="ipiiiiii";var _SDL_GL_SetAttribute=(e,r)=>{e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),SDL.glAttributes[e]=r};_SDL_GL_SetAttribute.sig="iii";function _SDL_GL_GetAttribute(e,r){return r>>>=0,e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),r&&(HEAP32[r>>>2>>>0]=SDL.glAttributes[e]),0}_SDL_GL_GetAttribute.sig="iip";var _SDL_GL_SwapBuffers=()=>{var e;(e=Browser.doSwapBuffers)==null||e.call(Browser)};_SDL_GL_SwapBuffers.sig="v";function _SDL_GL_ExtensionSupported(e){return e>>>=0,Module.ctx.getExtension(e)|0}_SDL_GL_ExtensionSupported.sig="ip";function _SDL_DestroyWindow(e){e>>>=0}_SDL_DestroyWindow.sig="vp";function _SDL_DestroyRenderer(e){e>>>=0}_SDL_DestroyRenderer.sig="vp";function _SDL_GetWindowFlags(e){return e>>>=0,Browser.isFullscreen?1:0}_SDL_GetWindowFlags.sig="ip";function _SDL_GL_SwapWindow(e){e>>>=0}_SDL_GL_SwapWindow.sig="vp";function _SDL_GL_MakeCurrent(e,r){e>>>=0,r>>>=0}_SDL_GL_MakeCurrent.sig="ipp";function _SDL_GL_DeleteContext(e){e>>>=0}_SDL_GL_DeleteContext.sig="vp";var _SDL_GL_GetSwapInterval=()=>Browser.mainLoop.timingMode==1?Browser.mainLoop.timingValue:0;_SDL_GL_GetSwapInterval.sig="i";var _SDL_GL_SetSwapInterval=e=>{_emscripten_set_main_loop_timing(1,e)};_SDL_GL_SetSwapInterval.sig="ii";function _SDL_SetWindowTitle(e,r){e>>>=0,r>>>=0,r&&(document.title=UTF8ToString(r))}_SDL_SetWindowTitle.sig="vpp";function _SDL_GetWindowSize(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=Module.canvas.width,a=Module.canvas.height;r&&(HEAP32[r>>>2>>>0]=n),t&&(HEAP32[t>>>2>>>0]=a)}_SDL_GetWindowSize.sig="vppp";function _SDL_LogSetOutputFunction(e,r){e>>>=0,r>>>=0}_SDL_LogSetOutputFunction.sig="vpp";function _SDL_SetWindowFullscreen(e,r){return e>>>=0,Browser.isFullscreen?(Module.canvas.exitFullscreen(),1):0}_SDL_SetWindowFullscreen.sig="ipi";var _SDL_ClearError=()=>{};_SDL_ClearError.sig="v";var _SDL_SetGamma=(e,r,t)=>-1;_SDL_SetGamma.sig="ifff";function _SDL_SetGammaRamp(e,r,t){return e>>>=0,r>>>=0,t>>>=0,-1}_SDL_SetGammaRamp.sig="ippp";var _SDL_NumJoysticks=()=>{for(var e=0,r=SDL.getGamepads(),t=0;tSDL.lastJoystickState.hasOwnProperty(e+1)?1:0;_SDL_JoystickOpened.sig="ii";function _SDL_JoystickIndex(e){return e>>>=0,e-1}_SDL_JoystickIndex.sig="ip";function _SDL_JoystickNumAxes(e){e>>>=0;var r=SDL.getGamepad(e-1);return r?r.axes.length:0}_SDL_JoystickNumAxes.sig="ip";function _SDL_JoystickNumBalls(e){return e>>>=0,0}_SDL_JoystickNumBalls.sig="ip";function _SDL_JoystickNumHats(e){return e>>>=0,0}_SDL_JoystickNumHats.sig="ip";function _SDL_JoystickNumButtons(e){e>>>=0;var r=SDL.getGamepad(e-1);return r?r.buttons.length:0}_SDL_JoystickNumButtons.sig="ip";var _SDL_JoystickUpdate=()=>SDL.queryJoysticks();_SDL_JoystickUpdate.sig="v";var _SDL_JoystickEventState=e=>e<0?SDL.joystickEventState:SDL.joystickEventState=e;_SDL_JoystickEventState.sig="ii";function _SDL_JoystickGetAxis(e,r){e>>>=0;var t=SDL.getGamepad(e-1);return t&&t.axes.length>r?SDL.joystickAxisValueConversion(t.axes[r]):0}_SDL_JoystickGetAxis.sig="ipi";function _SDL_JoystickGetHat(e,r){return e>>>=0,0}_SDL_JoystickGetHat.sig="ipi";function _SDL_JoystickGetBall(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,-1}_SDL_JoystickGetBall.sig="ipipp";function _SDL_JoystickGetButton(e,r){e>>>=0;var t=SDL.getGamepad(e-1);return t&&t.buttons.length>r&&SDL.getJoystickButtonState(t.buttons[r])?1:0}_SDL_JoystickGetButton.sig="ipi";function _SDL_JoystickClose(e){e>>>=0,delete SDL.lastJoystickState[e]}_SDL_JoystickClose.sig="vp";var _SDL_InitSubSystem=e=>0;_SDL_InitSubSystem.sig="ii";function _SDL_RWFromConstMem(e,r){e>>>=0;var t=SDL.rwops.length;return SDL.rwops.push({bytes:e,count:r}),t}_SDL_RWFromConstMem.sig="ppi";var _SDL_RWFromMem=_SDL_RWFromConstMem;_SDL_RWFromMem.sig="ppi";var _SDL_GetNumAudioDrivers=()=>1;_SDL_GetNumAudioDrivers.sig="i";function _SDL_GetCurrentAudioDriver(){return stringToNewUTF8("Emscripten Audio")}_SDL_GetCurrentAudioDriver.sig="p";var _SDL_GetScancodeFromKey=e=>SDL.scanCodes[e];_SDL_GetScancodeFromKey.sig="ii";function _SDL_GetAudioDriver(e){return _SDL_GetCurrentAudioDriver()}_SDL_GetAudioDriver.sig="pi";var _SDL_EnableUNICODE=e=>{var r=SDL.unicode||0;return SDL.unicode=e,r};_SDL_EnableUNICODE.sig="ii";var _SDL_AddTimer=function(e,r,t){return r>>>=0,t>>>=0,safeSetTimeout(()=>getWasmTableEntry(r)(e,t),e)};_SDL_AddTimer.sig="iipp";var _SDL_RemoveTimer=e=>(clearTimeout(e),!0);_SDL_RemoveTimer.sig="ii";function _SDL_CreateThread(e,r,t,n){throw e>>>=0,r>>>=0,"SDL threads cannot be supported in the web platform because they assume shared state. See emscripten_create_worker etc. for a message-passing concurrency model that does let you run code in another thread."}_SDL_CreateThread.sig="ppp";function _SDL_WaitThread(e,r){throw e>>>=0,r>>>=0,"SDL_WaitThread"}_SDL_WaitThread.sig="vpp";function _SDL_GetThreadID(e){throw e>>>=0,"SDL_GetThreadID"}_SDL_GetThreadID.sig="pp";function _SDL_ThreadID(){return 0}_SDL_ThreadID.sig="p";function _SDL_AllocRW(){throw"SDL_AllocRW: TODO"}_SDL_AllocRW.sig="p";function _SDL_CondBroadcast(e){throw e>>>=0,"SDL_CondBroadcast: TODO"}_SDL_CondBroadcast.sig="ip";function _SDL_CondWaitTimeout(e,r,t){throw e>>>=0,r>>>=0,"SDL_CondWaitTimeout: TODO"}_SDL_CondWaitTimeout.sig="ippi";var _SDL_WM_IconifyWindow=()=>{throw"SDL_WM_IconifyWindow TODO"};_SDL_WM_IconifyWindow.sig="i";function _Mix_SetPostMix(e,r){return e>>>=0,r>>>=0,warnOnce("Mix_SetPostMix: TODO")}_Mix_SetPostMix.sig="vpp";function _Mix_VolumeChunk(e,r){throw e>>>=0,"Mix_VolumeChunk: TODO"}_Mix_VolumeChunk.sig="ipi";var _Mix_SetPosition=(e,r,t)=>{throw"Mix_SetPosition: TODO"};_Mix_SetPosition.sig="iiii";function _Mix_QuerySpec(e,r,t){throw e>>>=0,r>>>=0,t>>>=0,"Mix_QuerySpec: TODO"}_Mix_QuerySpec.sig="ippp";function _Mix_FadeInChannelTimed(e,r,t,n,a){throw r>>>=0,"Mix_FadeInChannelTimed"}_Mix_FadeInChannelTimed.sig="iipiii";var _Mix_FadeOutChannel=()=>{throw"Mix_FadeOutChannel"};_Mix_FadeOutChannel.sig="iii";function _Mix_Linked_Version(){throw"Mix_Linked_Version: TODO"}_Mix_Linked_Version.sig="p";function _SDL_SaveBMP_RW(e,r,t){throw e>>>=0,r>>>=0,"SDL_SaveBMP_RW: TODO"}_SDL_SaveBMP_RW.sig="ippi";function _SDL_WM_SetIcon(e,r){e>>>=0,r>>>=0}_SDL_WM_SetIcon.sig="vpp";var _SDL_HasRDTSC=()=>0;_SDL_HasRDTSC.sig="i";var _SDL_HasMMX=()=>0;_SDL_HasMMX.sig="i";var _SDL_HasMMXExt=()=>0;_SDL_HasMMXExt.sig="i";var _SDL_Has3DNow=()=>0;_SDL_Has3DNow.sig="i";var _SDL_Has3DNowExt=()=>0;_SDL_Has3DNowExt.sig="i";var _SDL_HasSSE=()=>0;_SDL_HasSSE.sig="i";var _SDL_HasSSE2=()=>0;_SDL_HasSSE2.sig="i";var _SDL_HasAltiVec=()=>0;_SDL_HasAltiVec.sig="i";var ALLOC_NORMAL=0,ALLOC_STACK=1,allocate=(e,r)=>{var t;return r==ALLOC_STACK?t=stackAlloc(e.length):t=_malloc(e.length),!e.subarray&&!e.slice&&(e=new Uint8Array(e)),HEAPU8.set(e,t>>>0),t},writeStringToMemory=(e,r,t)=>{warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var n,a;t&&(a=r+lengthBytesUTF8(e),n=HEAP8[a>>>0]),stringToUTF8(e,r,1/0),t&&(HEAP8[a>>>0]=n)},writeAsciiToMemory=(e,r,t)=>{for(var n=0;n>>0]=e.charCodeAt(n);t||(HEAP8[r>>>0]=0)},allocateUTF8=stringToNewUTF8,allocateUTF8OnStack=stringToUTF8OnStack,setErrNo=e=>(HEAP32[___errno_location()>>>2>>>0]=e,e),demangle=e=>(demangle.recursionGuard=(demangle.recursionGuard|0)+1,demangle.recursionGuard>1?e:withStackSave(()=>{try{var r=e;r.startsWith("__Z")&&(r=r.substr(1));var t=stringToUTF8OnStack(r),n=stackAlloc(4),a=___cxa_demangle(t,0,0,n);if(HEAP32[n>>>2>>>0]===0&&a)return UTF8ToString(a)}catch(o){}finally{_free(a),demangle.recursionGuard<2&&--demangle.recursionGuard}return e})),_emscripten_is_main_browser_thread=()=>!ENVIRONMENT_IS_WORKER,tupleRegistrations={},structRegistrations={},getTypeName=e=>{var r=___getTypeName(e),t=readLatin1String(r);return _free(r),t},getFunctionName=e=>{e=e.trim();let r=e.indexOf("(");return r!==-1?e.substr(0,r):e},getFunctionArgsName=e=>{e=e.trim();let r=e.indexOf("(")+1;return r!==0?e.substr(r,e.length-r-1).replaceAll(" ","").split(",").filter(t=>t.length):[]},heap32VectorToArray=(e,r)=>{for(var t=[],n=0;n>>2>>>0]);return t},requireRegisteredType=(e,r)=>{var t=registeredTypes[e];return t===void 0&&throwBindingError("".concat(r," has unknown type ").concat(getTypeName(e))),t};function usesDestructorStack(e){for(var r=1;r0?", ":"")+l),u+=(t||n?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n";var f=t?"rv":"";if(a)u+="runDestructors(destructors);\n";else for(var c=r?1:2;cObject.defineProperty(r,"name",{value:e}),extendError=(e,r)=>{var t=createNamedFunction(r,function(n){this.name=r,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+"\n"+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:"".concat(this.name,": ").concat(this.message)},t},UnboundTypeError,PureVirtualError,registeredInstances={},getInheritedInstanceCount=()=>Object.keys(registeredInstances).length,getLiveInheritedInstances=()=>{var e=[];for(var r in registeredInstances)registeredInstances.hasOwnProperty(r)&&e.push(registeredInstances[r]);return e},deletionQueue=[],flushPendingDeletes=()=>{for(;deletionQueue.length;){var e=deletionQueue.pop();e.$$.deleteScheduled=!1,e.delete()}},delayFunction,setDelayFunction=e=>{delayFunction=e,deletionQueue.length&&delayFunction&&delayFunction(flushPendingDeletes)},init_embind=()=>{Module.getInheritedInstanceCount=getInheritedInstanceCount,Module.getLiveInheritedInstances=getLiveInheritedInstances,Module.flushPendingDeletes=flushPendingDeletes,Module.setDelayFunction=setDelayFunction},throwUnboundTypeError=(e,r)=>{var t=[],n={};function a(o){if(!n[o]&&!registeredTypes[o]){if(typeDependencies[o]){typeDependencies[o].forEach(a);return}t.push(o),n[o]=!0}}throw r.forEach(a),new UnboundTypeError("".concat(e,": ")+t.map(getTypeName).join([", "]))},ensureOverloadTable=(e,r,t)=>{if(e[r].overloadTable===void 0){var n=e[r];e[r]=function(...a){return e[r].overloadTable.hasOwnProperty(a.length)||throwBindingError("Function '".concat(t,"' called with an invalid number of arguments (").concat(a.length,") - expects one of (").concat(e[r].overloadTable,")!")),e[r].overloadTable[a.length].apply(this,a)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},exposePublicSymbol=(e,r,t)=>{Module.hasOwnProperty(e)?((t===void 0||Module[e].overloadTable!==void 0&&Module[e].overloadTable[t]!==void 0)&&throwBindingError("Cannot register public name '".concat(e,"' twice")),ensureOverloadTable(Module,e,e),Module.hasOwnProperty(t)&&throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (".concat(t,")!")),Module[e].overloadTable[t]=r):(Module[e]=r,t!==void 0&&(Module[e].numArguments=t))},replacePublicSymbol=(e,r,t)=>{Module.hasOwnProperty(e)||throwInternalError("Replacing nonexistant public symbol"),Module[e].overloadTable!==void 0&&t!==void 0?Module[e].overloadTable[t]=r:(Module[e]=r,Module[e].argCount=t)},getBasestPointer=(e,r)=>{for(r===void 0&&throwBindingError("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},registerInheritedInstance=(e,r,t)=>{r=getBasestPointer(e,r),registeredInstances.hasOwnProperty(r)?throwBindingError("Tried to register registered instance: ".concat(r)):registeredInstances[r]=t},unregisterInheritedInstance=(e,r)=>{r=getBasestPointer(e,r),registeredInstances.hasOwnProperty(r)?delete registeredInstances[r]:throwBindingError("Tried to unregister unregistered instance: ".concat(r))},getInheritedInstance=(e,r)=>(r=getBasestPointer(e,r),registeredInstances[r]),registeredPointers={},enumReadValueFromPointer=(e,r,t)=>{switch(r){case 1:return t?function(n){return this.fromWireType(HEAP8[n>>>0])}:function(n){return this.fromWireType(HEAPU8[n>>>0])};case 2:return t?function(n){return this.fromWireType(HEAP16[n>>>1>>>0])}:function(n){return this.fromWireType(HEAPU16[n>>>1>>>0])};case 4:return t?function(n){return this.fromWireType(HEAP32[n>>>2>>>0])}:function(n){return this.fromWireType(HEAPU32[n>>>2>>>0])};default:throw new TypeError("invalid integer width (".concat(r,"): ").concat(e))}};function __embind_register_user_type(e,r){e>>>=0,r>>>=0,__embind_register_emval(e)}__embind_register_user_type.sig="vpp";function __embind_register_optional(e,r){e>>>=0,r>>>=0,__embind_register_emval(e)}__embind_register_optional.sig="vpp";var runDestructors=e=>{for(;e.length;){var r=e.pop(),t=e.pop();t(r)}};function newFunc(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type ".concat(typeof e," which is not a function"));var t=createNamedFunction(e.name||"unknownFunctionName",function(){});t.prototype=e.prototype;var n=new t,a=e.apply(n,r);return a instanceof Object?a:n}function craftInvokerFunction(e,r,t,n,a,o){var _=r.length;_<2&&throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var l=r[1]!==null&&t!==null,c=usesDestructorStack(r),u=r[0].name!=="void",d=[e,throwBindingError,n,a,runDestructors,r[0],r[1]],p=0;p<_-2;++p)d.push(r[p+2]);if(!c)for(var p=l?1:2;p{e=readLatin1String(e);function t(){return e.includes("j")?getDynCaller(e,r):getWasmTableEntry(r)}var n=t();return typeof n!="function"&&throwBindingError("unknown function pointer with signature ".concat(e,": ").concat(r)),n};function __embind_register_function(e,r,t,n,a,o,_){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0;var l=heap32VectorToArray(r,t);e=readLatin1String(e),e=getFunctionName(e),a=embind__requireFunction(n,a),exposePublicSymbol(e,function(){throwUnboundTypeError("Cannot call ".concat(e," due to unbound types"),l)},r-1),whenDependentTypesAreResolved([],l,c=>{var u=[c[0],null].concat(c.slice(1));return replacePublicSymbol(e,craftInvokerFunction(e,u,null,a,o,_),r-1),[]})}__embind_register_function.sig="vpippppi";function __embind_register_value_array(e,r,t,n,a,o){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,tupleRegistrations[e]={name:readLatin1String(r),rawConstructor:embind__requireFunction(t,n),rawDestructor:embind__requireFunction(a,o),elements:[]}}__embind_register_value_array.sig="vpppppp";function __embind_register_value_array_element(e,r,t,n,a,o,_,l,c){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,tupleRegistrations[e].elements.push({getterReturnType:r,getter:embind__requireFunction(t,n),getterContext:a,setterArgumentType:o,setter:embind__requireFunction(_,l),setterContext:c})}__embind_register_value_array_element.sig="vppppppppp";var __embind_finalize_value_array=function(e){e>>>=0;var r=tupleRegistrations[e];delete tupleRegistrations[e];var t=r.elements,n=t.length,a=t.map(l=>l.getterReturnType).concat(t.map(l=>l.setterArgumentType)),o=r.rawConstructor,_=r.rawDestructor;whenDependentTypesAreResolved([e],a,l=>(t.forEach((c,u)=>{var d=l[u],p=c.getter,f=c.getterContext,m=l[u+n],g=c.setter,v=c.setterContext;c.read=S=>d.fromWireType(p(f,S)),c.write=(S,y)=>{var h=[];g(v,S,m.toWireType(h,y)),runDestructors(h)}}),[{name:r.name,fromWireType:c=>{for(var u=new Array(n),d=0;d{if(n!==u.length)throw new TypeError("Incorrect number of tuple elements for ".concat(r.name,": expected=").concat(n,", actual=").concat(u.length));for(var d=o(),p=0;p>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,structRegistrations[e]={name:readLatin1String(r),rawConstructor:embind__requireFunction(t,n),rawDestructor:embind__requireFunction(a,o),fields:[]}}__embind_register_value_object.sig="vpppppp";function __embind_register_value_object_field(e,r,t,n,a,o,_,l,c,u){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,structRegistrations[e].fields.push({fieldName:readLatin1String(r),getterReturnType:t,getter:embind__requireFunction(n,a),getterContext:o,setterArgumentType:_,setter:embind__requireFunction(l,c),setterContext:u})}__embind_register_value_object_field.sig="vpppppppppp";var __embind_finalize_value_object=function(e){e>>>=0;var r=structRegistrations[e];delete structRegistrations[e];var t=r.rawConstructor,n=r.rawDestructor,a=r.fields,o=a.map(_=>_.getterReturnType).concat(a.map(_=>_.setterArgumentType));whenDependentTypesAreResolved([e],o,_=>{var l={};return a.forEach((c,u)=>{var d=c.fieldName,p=_[u],f=c.getter,m=c.getterContext,g=_[u+a.length],v=c.setter,S=c.setterContext;l[d]={read:y=>p.fromWireType(f(m,y)),write:(y,h)=>{var b=[];v(S,y,g.toWireType(b,h)),runDestructors(b)}}}),[{name:r.name,fromWireType:c=>{var u={};for(var d in l)u[d]=l[d].read(c);return n(c),u},toWireType:(c,u)=>{for(var d in l)if(!(d in u))throw new TypeError('Missing field: "'.concat(d,'"'));var p=t();for(d in l)l[d].write(p,u[d]);return c!==null&&c.push(n,p),p},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:n}]})};__embind_finalize_value_object.sig="vp";var upcastPointer=(e,r,t)=>{for(;r!==t;)r.upcast||throwBindingError("Expected null or instance of ".concat(t.name,", got an instance of ").concat(r.name)),e=r.upcast(e),r=r.baseClass;return e};function genericPointerToWireType(e,r){var t;if(r===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),this.isSmartPointer?(t=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,t),t):0;(!r||!r.$$)&&throwBindingError('Cannot pass "'.concat(embindRepr(r),'" as a ').concat(this.name)),r.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),!this.isConst&&r.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name," to parameter type ").concat(this.name));var n=r.$$.ptrType.registeredClass;if(t=upcastPointer(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(r.$$.smartPtr===void 0&&throwBindingError("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:throwBindingError("Cannot convert argument of type ".concat(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name," to parameter type ").concat(this.name));break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var a=r.clone();t=this.rawShare(t,Emval.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,t)}break;default:throwBindingError("Unsupporting sharing policy")}return t}function constNoSmartPtrRawPointerToWireType(e,r){if(r===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;r.$$||throwBindingError('Cannot pass "'.concat(embindRepr(r),'" as a ').concat(this.name)),r.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name));var t=r.$$.ptrType.registeredClass,n=upcastPointer(r.$$.ptr,t,this.registeredClass);return n}function nonConstNoSmartPtrRawPointerToWireType(e,r){if(r===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;r.$$||throwBindingError('Cannot pass "'.concat(embindRepr(r),'" as a ').concat(this.name)),r.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),r.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(r.$$.ptrType.name," to parameter type ").concat(this.name));var t=r.$$.ptrType.registeredClass,n=upcastPointer(r.$$.ptr,t,this.registeredClass);return n}function RegisteredPointer(e,r,t,n,a,o,_,l,c,u,d){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=_,this.rawGetPointee=l,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=d,!a&&r.baseClass===void 0?n?(this.toWireType=constNoSmartPtrRawPointerToWireType,this.destructorFunction=null):(this.toWireType=nonConstNoSmartPtrRawPointerToWireType,this.destructorFunction=null):this.toWireType=genericPointerToWireType}var downcastPointer=(e,r,t)=>{if(r===t)return e;if(t.baseClass===void 0)return null;var n=downcastPointer(e,r,t.baseClass);return n===null?null:t.downcast(n)},finalizationRegistry=!1,detachFinalizer=e=>{},runDestructor=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},releaseClassHandle=e=>{e.count.value-=1;var r=e.count.value===0;r&&runDestructor(e)},attachFinalizer=e=>typeof FinalizationRegistry>"u"?(attachFinalizer=r=>r,e):(finalizationRegistry=new FinalizationRegistry(r=>{releaseClassHandle(r.$$)}),attachFinalizer=r=>{var t=r.$$,n=!!t.smartPtr;if(n){var a={$$:t};finalizationRegistry.register(r,a,r)}return r},detachFinalizer=r=>finalizationRegistry.unregister(r),attachFinalizer(e)),makeClassHandle=(e,r)=>{(!r.ptrType||!r.ptr)&&throwInternalError("makeClassHandle requires ptr and ptrType");var t=!!r.smartPtrType,n=!!r.smartPtr;return t!==n&&throwInternalError("Both smartPtrType and smartPtr must be specified"),r.count={value:1},attachFinalizer(Object.create(e,{$$:{value:r,writable:!0}}))};function RegisteredPointer_fromWireType(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=getInheritedInstance(this.registeredClass,r);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(r),_=registeredPointers[o];if(!_)return a.call(this);var l;this.isConst?l=_.constPointerType:l=_.pointerType;var c=downcastPointer(r,this.registeredClass,l.registeredClass);return c===null?a.call(this):this.isSmartPointer?makeClassHandle(l.registeredClass.instancePrototype,{ptrType:l,ptr:c,smartPtrType:this,smartPtr:e}):makeClassHandle(l.registeredClass.instancePrototype,{ptrType:l,ptr:c})}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var r;(r=this.rawDestructor)==null||r.call(this,e)},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,fromWireType:RegisteredPointer_fromWireType})},detachFinalizer_deps=["$finalizationRegistry"];function ClassHandle(){}var shallowCopyInternalPointer=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),throwInstanceAlreadyDeleted=e=>{function r(t){return t.$$.ptrType.registeredClass.name}throwBindingError(r(e)+" instance already deleted")},init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{isAliasOf(e){if(!(this instanceof ClassHandle)||!(e instanceof ClassHandle))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,a=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return r===n&&t===a},clone(){if(this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),detachFinalizer(this),releaseClassHandle(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),deletionQueue.push(this),deletionQueue.length===1&&delayFunction&&delayFunction(flushPendingDeletes),this.$$.deleteScheduled=!0,this}})};function RegisteredClass(e,r,t,n,a,o,_,l){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=_,this.downcast=l,this.pureVirtualFunctions=[]}var char_0=48,char_9=57,makeLegalFunctionName=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var r=e.charCodeAt(0);return r>=char_0&&r<=char_9?"_".concat(e):e};function __embind_register_class(e,r,t,n,a,o,_,l,c,u,d,p,f){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,d>>>=0,p>>>=0,f>>>=0,d=readLatin1String(d),o=embind__requireFunction(a,o),l&&(l=embind__requireFunction(_,l)),u&&(u=embind__requireFunction(c,u)),f=embind__requireFunction(p,f);var m=makeLegalFunctionName(d);exposePublicSymbol(m,function(){throwUnboundTypeError("Cannot construct ".concat(d," due to unbound types"),[n])}),whenDependentTypesAreResolved([e,r,t],n?[n]:[],g=>{var E,x;g=g[0];var v,S;n?(v=g.registeredClass,S=v.instancePrototype):S=ClassHandle.prototype;var y=createNamedFunction(d,function(...A){if(Object.getPrototypeOf(this)!==h)throw new BindingError("Use 'new' to construct "+d);if(b.constructor_body===void 0)throw new BindingError(d+" has no accessible constructor");var D=b.constructor_body[A.length];if(D===void 0)throw new BindingError("Tried to invoke ctor of ".concat(d," with invalid number of parameters (").concat(A.length,") - expected (").concat(Object.keys(b.constructor_body).toString(),") parameters instead!"));return D.apply(this,A)}),h=Object.create(S,{constructor:{value:y}});y.prototype=h;var b=new RegisteredClass(d,y,h,f,v,o,l,u);b.baseClass&&((x=(E=b.baseClass).__derivedClasses)!=null||(E.__derivedClasses=[]),b.baseClass.__derivedClasses.push(b));var w=new RegisteredPointer(d,b,!0,!1,!1),k=new RegisteredPointer(d+"*",b,!1,!1,!1),L=new RegisteredPointer(d+" const*",b,!1,!0,!1);return registeredPointers[e]={pointerType:k,constPointerType:L},replacePublicSymbol(m,y),[w,k,L]})}__embind_register_class.sig="vppppppppppppp";var __embind_register_class_constructor=function(e,r,t,n,a,o){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0;var _=heap32VectorToArray(r,t);a=embind__requireFunction(n,a);var l=[o],c=[];whenDependentTypesAreResolved([],[e],u=>{u=u[0];var d="constructor ".concat(u.name);if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[r-1]!==void 0)throw new BindingError("Cannot register multiple constructors with identical number of parameters (".concat(r-1,") for class '").concat(u.name,"'! Overload resolution is currently only performed using the parameter count, not actual type info!"));return u.registeredClass.constructor_body[r-1]=()=>{throwUnboundTypeError("Cannot construct ".concat(u.name," due to unbound types"),_)},whenDependentTypesAreResolved([],_,p=>(p.splice(1,0,null),u.registeredClass.constructor_body[r-1]=craftInvokerFunction(d,p,null,a,o),[])),[]})};__embind_register_class_constructor.sig="vpipppp";var validateThis=(e,r,t)=>(e instanceof Object||throwBindingError("".concat(t,' with invalid "this": ').concat(e)),e instanceof r.registeredClass.constructor||throwBindingError("".concat(t,' incompatible with "this" of type ').concat(e.constructor.name)),e.$$.ptr||throwBindingError("cannot call emscripten binding method ".concat(t," on deleted object")),upcastPointer(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)),__embind_register_class_function=function(e,r,t,n,a,o,_,l,c){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0;var u=heap32VectorToArray(t,n);r=readLatin1String(r),r=getFunctionName(r),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],d=>{d=d[0];var p="".concat(d.name,".").concat(r);r.startsWith("@@")&&(r=Symbol[r.substring(2)]),l&&d.registeredClass.pureVirtualFunctions.push(r);function f(){throwUnboundTypeError("Cannot call ".concat(p," due to unbound types"),u)}var m=d.registeredClass.instancePrototype,g=m[r];return g===void 0||g.overloadTable===void 0&&g.className!==d.name&&g.argCount===t-2?(f.argCount=t-2,f.className=d.name,m[r]=f):(ensureOverloadTable(m,r,p),m[r].overloadTable[t-2]=f),whenDependentTypesAreResolved([],u,v=>{var S=craftInvokerFunction(p,v,d,o,_,c);return m[r].overloadTable===void 0?(S.argCount=t-2,m[r]=S):m[r].overloadTable[t-2]=S,[]}),[]})};__embind_register_class_function.sig="vppippppii";var __embind_register_class_property=function(e,r,t,n,a,o,_,l,c,u){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,r=readLatin1String(r),a=embind__requireFunction(n,a),whenDependentTypesAreResolved([],[e],d=>{d=d[0];var p="".concat(d.name,".").concat(r),f={get(){throwUnboundTypeError("Cannot access ".concat(p," due to unbound types"),[t,_])},enumerable:!0,configurable:!0};return c?f.set=()=>throwUnboundTypeError("Cannot access ".concat(p," due to unbound types"),[t,_]):f.set=m=>throwBindingError(p+" is a read-only property"),Object.defineProperty(d.registeredClass.instancePrototype,r,f),whenDependentTypesAreResolved([],c?[t,_]:[t],m=>{var g=m[0],v={get(){var y=validateThis(this,d,p+" getter");return g.fromWireType(a(o,y))},enumerable:!0};if(c){c=embind__requireFunction(l,c);var S=m[1];v.set=function(y){var h=validateThis(this,d,p+" setter"),b=[];c(u,h,S.toWireType(b,y)),runDestructors(b)}}return Object.defineProperty(d.registeredClass.instancePrototype,r,v),[]}),[]})};__embind_register_class_property.sig="vpppppppppp";var __embind_register_class_class_function=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0;var c=heap32VectorToArray(t,n);r=readLatin1String(r),r=getFunctionName(r),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],u=>{u=u[0];var d="".concat(u.name,".").concat(r);function p(){throwUnboundTypeError("Cannot call ".concat(d," due to unbound types"),c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var f=u.registeredClass.constructor;return f[r]===void 0?(p.argCount=t-1,f[r]=p):(ensureOverloadTable(f,r,d),f[r].overloadTable[t-1]=p),whenDependentTypesAreResolved([],c,m=>{var g=[m[0],null].concat(m.slice(1)),v=craftInvokerFunction(d,g,null,o,_,l);if(f[r].overloadTable===void 0?(v.argCount=t-1,f[r]=v):f[r].overloadTable[t-1]=v,u.registeredClass.__derivedClasses)for(let S of u.registeredClass.__derivedClasses)S.constructor.hasOwnProperty(r)||(S.constructor[r]=v);return[]}),[]})};__embind_register_class_class_function.sig="vppippppi";var __embind_register_class_class_property=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,r=readLatin1String(r),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],c=>{c=c[0];var u="".concat(c.name,".").concat(r),d={get(){throwUnboundTypeError("Cannot access ".concat(u," due to unbound types"),[t])},enumerable:!0,configurable:!0};return l?d.set=()=>{throwUnboundTypeError("Cannot access ".concat(u," due to unbound types"),[t])}:d.set=p=>{throwBindingError("".concat(u," is a read-only property"))},Object.defineProperty(c.registeredClass.constructor,r,d),whenDependentTypesAreResolved([],[t],p=>{p=p[0];var f={get(){return p.fromWireType(o(n))},enumerable:!0};return l&&(l=embind__requireFunction(_,l),f.set=m=>{var g=[];l(n,p.toWireType(g,m)),runDestructors(g)}),Object.defineProperty(c.registeredClass.constructor,r,f),[]}),[]})};__embind_register_class_class_property.sig="vpppppppp";function __embind_create_inheriting_constructor(e,r,t){e>>>=0,r>>>=0,t>>>=0,e=readLatin1String(e),r=requireRegisteredType(r,"wrapper"),t=Emval.toValue(t);var n=r.registeredClass,a=n.instancePrototype,o=n.baseClass,_=o.instancePrototype,l=n.baseClass.constructor,c=createNamedFunction(e,function(...u){n.baseClass.pureVirtualFunctions.forEach((function(d){if(this[d]===_[d])throw new PureVirtualError("Pure virtual function ".concat(d," must be implemented in JavaScript"))}).bind(this)),Object.defineProperty(this,"__parent",{value:a}),this.__construct(...u)});return a.__construct=function(...d){this===a&&throwBindingError("Pass correct 'this' to __construct");var p=l.implement(this,...d);detachFinalizer(p);var f=p.$$;p.notifyOnDestruction(),f.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:f}}),attachFinalizer(this),registerInheritedInstance(n,f.ptr,this)},a.__destruct=function(){this===a&&throwBindingError("Pass correct 'this' to __destruct"),detachFinalizer(this),unregisterInheritedInstance(n,this.$$.ptr)},c.prototype=Object.create(a),Object.assign(c.prototype,t),Emval.toHandle(c)}__embind_create_inheriting_constructor.sig="pppp";var __embind_register_smart_ptr=function(e,r,t,n,a,o,_,l,c,u,d,p){e>>>=0,r>>>=0,t>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,d>>>=0,p>>>=0,t=readLatin1String(t),o=embind__requireFunction(a,o),l=embind__requireFunction(_,l),u=embind__requireFunction(c,u),p=embind__requireFunction(d,p),whenDependentTypesAreResolved([e],[r],f=>{f=f[0];var m=new RegisteredPointer(t,f.registeredClass,!1,!1,!0,f,n,o,l,u,p);return[m]})};__embind_register_smart_ptr.sig="vpppipppppppp";function __embind_register_enum(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,r=readLatin1String(r);function a(){}a.values={},registerType(e,{name:r,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,_)=>_.value,argPackAdvance:GenericWireTypeSize,readValueFromPointer:enumReadValueFromPointer(r,t,n),destructorFunction:null}),exposePublicSymbol(r,a)}__embind_register_enum.sig="vpppi";function __embind_register_enum_value(e,r,t){e>>>=0,r>>>=0;var n=requireRegisteredType(e,"enum");r=readLatin1String(r);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:createNamedFunction("".concat(n.name,"_").concat(r),function(){})}});a.values[t]=o,a[r]=o}__embind_register_enum_value.sig="vppi";var __embind_register_constant=function(e,r,t){e>>>=0,r>>>=0,e=readLatin1String(e),whenDependentTypesAreResolved([],[r],n=>(n=n[0],Module[e]=n.fromWireType(t),[]))};__embind_register_constant.sig="vppd";var emval_symbols={};function __emval_register_symbol(e){e>>>=0,emval_symbols[e]=readLatin1String(e)}__emval_register_symbol.sig="vp";var getStringOrSymbol=e=>{var r=emval_symbols[e];return r===void 0?readLatin1String(e):r};function __emval_incref(e){e>>>=0,e>9&&(emval_handles[e+1]+=1)}__emval_incref.sig="vp";function __emval_run_destructors(e){e>>>=0;var r=Emval.toValue(e);runDestructors(r),__emval_decref(e)}__emval_run_destructors.sig="vp";function __emval_new_array(){return Emval.toHandle([])}__emval_new_array.sig="p";function __emval_new_array_from_memory_view(e){e>>>=0,e=Emval.toValue(e);for(var r=new Array(e.length),t=0;t>>=0,Emval.toHandle(getStringOrSymbol(e))}__emval_new_cstring.sig="pp";function __emval_new_u8string(e){return e>>>=0,Emval.toHandle(UTF8ToString(e))}__emval_new_u8string.sig="pp";function __emval_new_u16string(e){return e>>>=0,Emval.toHandle(UTF16ToString(e))}__emval_new_u16string.sig="pp";function __emval_take_value(e,r){e>>>=0,r>>>=0,e=requireRegisteredType(e,"_emval_take_value");var t=e.readValueFromPointer(r);return Emval.toHandle(t)}__emval_take_value.sig="ppp";var emval_get_global=()=>typeof globalThis=="object"?globalThis:function(){return Function}()("return this")();function __emval_get_global(e){return e>>>=0,e===0?Emval.toHandle(emval_get_global()):(e=getStringOrSymbol(e),Emval.toHandle(emval_get_global()[e]))}__emval_get_global.sig="pp";function __emval_get_module_property(e){return e>>>=0,e=getStringOrSymbol(e),Emval.toHandle(Module[e])}__emval_get_module_property.sig="pp";function __emval_get_property(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),Emval.toHandle(e[r])}__emval_get_property.sig="ppp";function __emval_set_property(e,r,t){e>>>=0,r>>>=0,t>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),t=Emval.toValue(t),e[r]=t}__emval_set_property.sig="vppp";var emval_returnValue=(e,r,t)=>{var n=[],a=e.toWireType(n,t);return n.length&&(HEAPU32[r>>>2>>>0]=Emval.toHandle(n)),a};function __emval_as(e,r,t){return e>>>=0,r>>>=0,t>>>=0,e=Emval.toValue(e),r=requireRegisteredType(r,"emval::as"),emval_returnValue(r,t,e)}__emval_as.sig="dppp";function __emval_as_int64(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=requireRegisteredType(r,"emval::as"),r.toWireType(null,e)}__emval_as_int64.sig="ipp";function __emval_as_uint64(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=requireRegisteredType(r,"emval::as"),r.toWireType(null,e)}__emval_as_uint64.sig="ipp";function __emval_equals(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e==r}__emval_equals.sig="ipp";function __emval_strictly_equals(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e===r}__emval_strictly_equals.sig="ipp";function __emval_greater_than(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e>r}__emval_greater_than.sig="ipp";function __emval_less_than(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e>>=0,e=Emval.toValue(e),!e}__emval_not.sig="ip";var emval_methodCallers=[];function __emval_call(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,e=emval_methodCallers[e],r=Emval.toValue(r),e(null,r,t,n)}__emval_call.sig="dpppp";var emval_lookupTypes=(e,r)=>{for(var t=new Array(e),n=0;n>>2>>>0],"parameter "+n);return t},emval_addMethodCaller=e=>{var r=emval_methodCallers.length;return emval_methodCallers.push(e),r},reflectConstruct=Reflect.construct;function __emval_get_method_caller(e,r,t){r>>>=0;var n=emval_lookupTypes(e,r),a=n.shift();e--;var o="return function (obj, func, destructorsRef, args) {\n",_=0,l=[];t===0&&l.push("obj");for(var c=["retType"],u=[a],d=0;dg.name).join(", "),") => ").concat(a.name,">");return emval_addMethodCaller(createNamedFunction(m,f))}__emval_get_method_caller.sig="pipi";function __emval_call_method(e,r,t,n,a){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,e=emval_methodCallers[e],r=Emval.toValue(r),t=getStringOrSymbol(t),e(r,r[t],n,a)}__emval_call_method.sig="dppppp";function __emval_typeof(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(typeof e)}__emval_typeof.sig="pp";function __emval_instanceof(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e instanceof r}__emval_instanceof.sig="ipp";function __emval_is_number(e){return e>>>=0,e=Emval.toValue(e),typeof e=="number"}__emval_is_number.sig="ip";function __emval_is_string(e){return e>>>=0,e=Emval.toValue(e),typeof e=="string"}__emval_is_string.sig="ip";function __emval_in(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e in r}__emval_in.sig="ipp";function __emval_delete(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),delete e[r]}__emval_delete.sig="ipp";function __emval_throw(e){throw e>>>=0,e=Emval.toValue(e),e}__emval_throw.sig="ip";function __emval_iter_begin(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(e[Symbol.iterator]())}__emval_iter_begin.sig="pp";function __emval_iter_next(e){e>>>=0,e=Emval.toValue(e);var r=e.next();return r.done?0:Emval.toHandle(r.value)}__emval_iter_next.sig="pp";var __emval_coro_suspend=function(e,r){e>>>=0,r>>>=0,Emval.toValue(e).then(t=>{__emval_coro_resume(r,Emval.toHandle(t))})};__emval_coro_suspend.sig="vpp";var __emval_coro_make_promise=function(e,r){return e>>>=0,r>>>=0,Emval.toHandle(new Promise((t,n)=>{let a=()=>{try{___cxa_rethrow()}catch(o){n(o)}};HEAPU32[e>>>2>>>0]=Emval.toHandle(t),HEAPU32[r>>>2>>>0]=Emval.toHandle(a)}))};__emval_coro_make_promise.sig="ppp";function _duckdb_web_fs_file_sync(e){return globalThis.DUCKDB_RUNTIME.syncFile(Module,e)}_duckdb_web_fs_file_sync.sig="vi";function _duckdb_web_fs_file_remove(e,r){return globalThis.DUCKDB_RUNTIME.removeFile(Module,e,r)}registerWasmPlugin();var FSNode=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},readMode=365,writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(e){e?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(e){e?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}),FS.FSNode=FSNode,FS.createPreloadedFile=FS_createPreloadedFile,FS.staticInit(),embind_init_charCodes(),BindingError=Module.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},InternalError=Module.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},init_emval(),Module.requestFullscreen=Browser.requestFullscreen,Module.requestAnimationFrame=Browser.requestAnimationFrame,Module.setCanvasSize=Browser.setCanvasSize,Module.pauseMainLoop=Browser.mainLoop.pause,Module.resumeMainLoop=Browser.mainLoop.resume,Module.getUserMedia=Browser.getUserMedia,Module.createContext=Browser.createContext;for(var preloadedImages={},preloadedAudios={},GLctx,i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));for(var miniTempWebGLFloatBuffersStorage=new Float32Array(288),i=0;i<288;++i)miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1);for(var miniTempWebGLIntBuffersStorage=new Int32Array(288),i=0;i<288;++i)miniTempWebGLIntBuffers[i]=miniTempWebGLIntBuffersStorage.subarray(0,i+1);var emSetImmediate,emClearImmediate;if(typeof setImmediate<"u")emSetImmediate=setImmediateWrapped,emClearImmediate=clearImmediateWrapped;else if(typeof addEventListener=="function"){var __setImmediate_id_counter=0,__setImmediate_queue=[],__setImmediate_message_id="_si",__setImmediate_cb=e=>{e.data===__setImmediate_message_id&&(e.stopPropagation(),__setImmediate_queue.shift()(),++__setImmediate_id_counter)};addEventListener("message",__setImmediate_cb,!0),emSetImmediate=e=>(postMessage(__setImmediate_message_id,"*"),__setImmediate_id_counter+__setImmediate_queue.push(e)-1),emClearImmediate=e=>{var r=e-__setImmediate_id_counter;r>=0&&r<__setImmediate_queue.length&&(__setImmediate_queue[r]=()=>{})}}UnboundTypeError=Module.UnboundTypeError=extendError(Error,"UnboundTypeError"),PureVirtualError=Module.PureVirtualError=extendError(Error,"PureVirtualError"),init_embind(),init_RegisteredPointer(),init_ClassHandle();var wasmImports={IMG_Init:_IMG_Init,IMG_Load:_IMG_Load,IMG_Load_RW:_IMG_Load_RW,IMG_Quit:_IMG_Quit,Mix_AllocateChannels:_Mix_AllocateChannels,Mix_ChannelFinished:_Mix_ChannelFinished,Mix_CloseAudio:_Mix_CloseAudio,Mix_FadeInChannelTimed:_Mix_FadeInChannelTimed,Mix_FadeInMusicPos:_Mix_FadeInMusicPos,Mix_FadeOutChannel:_Mix_FadeOutChannel,Mix_FadeOutMusic:_Mix_FadeOutMusic,Mix_FadingChannel:_Mix_FadingChannel,Mix_FreeChunk:_Mix_FreeChunk,Mix_FreeMusic:_Mix_FreeMusic,Mix_HaltChannel:_Mix_HaltChannel,Mix_HaltMusic:_Mix_HaltMusic,Mix_HookMusicFinished:_Mix_HookMusicFinished,Mix_Init:_Mix_Init,Mix_Linked_Version:_Mix_Linked_Version,Mix_LoadMUS:_Mix_LoadMUS,Mix_LoadMUS_RW:_Mix_LoadMUS_RW,Mix_LoadWAV:_Mix_LoadWAV,Mix_LoadWAV_RW:_Mix_LoadWAV_RW,Mix_OpenAudio:_Mix_OpenAudio,Mix_Pause:_Mix_Pause,Mix_PauseMusic:_Mix_PauseMusic,Mix_Paused:_Mix_Paused,Mix_PausedMusic:_Mix_PausedMusic,Mix_PlayChannelTimed:_Mix_PlayChannelTimed,Mix_PlayMusic:_Mix_PlayMusic,Mix_Playing:_Mix_Playing,Mix_PlayingMusic:_Mix_PlayingMusic,Mix_QuerySpec:_Mix_QuerySpec,Mix_QuickLoad_RAW:_Mix_QuickLoad_RAW,Mix_Quit:_Mix_Quit,Mix_ReserveChannels:_Mix_ReserveChannels,Mix_Resume:_Mix_Resume,Mix_ResumeMusic:_Mix_ResumeMusic,Mix_SetPanning:_Mix_SetPanning,Mix_SetPosition:_Mix_SetPosition,Mix_SetPostMix:_Mix_SetPostMix,Mix_Volume:_Mix_Volume,Mix_VolumeChunk:_Mix_VolumeChunk,Mix_VolumeMusic:_Mix_VolumeMusic,SDL_AddTimer:_SDL_AddTimer,SDL_AllocRW:_SDL_AllocRW,SDL_AudioDriverName:_SDL_AudioDriverName,SDL_AudioQuit:_SDL_AudioQuit,SDL_ClearError:_SDL_ClearError,SDL_CloseAudio:_SDL_CloseAudio,SDL_CondBroadcast:_SDL_CondBroadcast,SDL_CondSignal:_SDL_CondSignal,SDL_CondWait:_SDL_CondWait,SDL_CondWaitTimeout:_SDL_CondWaitTimeout,SDL_ConvertSurface:_SDL_ConvertSurface,SDL_CreateCond:_SDL_CreateCond,SDL_CreateMutex:_SDL_CreateMutex,SDL_CreateRGBSurface:_SDL_CreateRGBSurface,SDL_CreateRGBSurfaceFrom:_SDL_CreateRGBSurfaceFrom,SDL_CreateThread:_SDL_CreateThread,SDL_Delay:_SDL_Delay,SDL_DestroyCond:_SDL_DestroyCond,SDL_DestroyMutex:_SDL_DestroyMutex,SDL_DestroyRenderer:_SDL_DestroyRenderer,SDL_DestroyWindow:_SDL_DestroyWindow,SDL_DisplayFormatAlpha:_SDL_DisplayFormatAlpha,SDL_EnableKeyRepeat:_SDL_EnableKeyRepeat,SDL_EnableUNICODE:_SDL_EnableUNICODE,SDL_FillRect:_SDL_FillRect,SDL_Flip:_SDL_Flip,SDL_FreeRW:_SDL_FreeRW,SDL_FreeSurface:_SDL_FreeSurface,SDL_GL_DeleteContext:_SDL_GL_DeleteContext,SDL_GL_ExtensionSupported:_SDL_GL_ExtensionSupported,SDL_GL_GetAttribute:_SDL_GL_GetAttribute,SDL_GL_GetSwapInterval:_SDL_GL_GetSwapInterval,SDL_GL_MakeCurrent:_SDL_GL_MakeCurrent,SDL_GL_SetAttribute:_SDL_GL_SetAttribute,SDL_GL_SetSwapInterval:_SDL_GL_SetSwapInterval,SDL_GL_SwapBuffers:_SDL_GL_SwapBuffers,SDL_GL_SwapWindow:_SDL_GL_SwapWindow,SDL_GetAppState:_SDL_GetAppState,SDL_GetAudioDriver:_SDL_GetAudioDriver,SDL_GetClipRect:_SDL_GetClipRect,SDL_GetCurrentAudioDriver:_SDL_GetCurrentAudioDriver,SDL_GetError:_SDL_GetError,SDL_GetKeyName:_SDL_GetKeyName,SDL_GetKeyState:_SDL_GetKeyState,SDL_GetKeyboardState:_SDL_GetKeyboardState,SDL_GetModState:_SDL_GetModState,SDL_GetMouseState:_SDL_GetMouseState,SDL_GetNumAudioDrivers:_SDL_GetNumAudioDrivers,SDL_GetRGB:_SDL_GetRGB,SDL_GetRGBA:_SDL_GetRGBA,SDL_GetScancodeFromKey:_SDL_GetScancodeFromKey,SDL_GetThreadID:_SDL_GetThreadID,SDL_GetTicks:_SDL_GetTicks,SDL_GetVideoInfo:_SDL_GetVideoInfo,SDL_GetVideoSurface:_SDL_GetVideoSurface,SDL_GetWindowFlags:_SDL_GetWindowFlags,SDL_GetWindowSize:_SDL_GetWindowSize,SDL_Has3DNow:_SDL_Has3DNow,SDL_Has3DNowExt:_SDL_Has3DNowExt,SDL_HasAltiVec:_SDL_HasAltiVec,SDL_HasMMX:_SDL_HasMMX,SDL_HasMMXExt:_SDL_HasMMXExt,SDL_HasRDTSC:_SDL_HasRDTSC,SDL_HasSSE:_SDL_HasSSE,SDL_HasSSE2:_SDL_HasSSE2,SDL_Init:_SDL_Init,SDL_InitSubSystem:_SDL_InitSubSystem,SDL_JoystickClose:_SDL_JoystickClose,SDL_JoystickEventState:_SDL_JoystickEventState,SDL_JoystickGetAxis:_SDL_JoystickGetAxis,SDL_JoystickGetBall:_SDL_JoystickGetBall,SDL_JoystickGetButton:_SDL_JoystickGetButton,SDL_JoystickGetHat:_SDL_JoystickGetHat,SDL_JoystickIndex:_SDL_JoystickIndex,SDL_JoystickName:_SDL_JoystickName,SDL_JoystickNumAxes:_SDL_JoystickNumAxes,SDL_JoystickNumBalls:_SDL_JoystickNumBalls,SDL_JoystickNumButtons:_SDL_JoystickNumButtons,SDL_JoystickNumHats:_SDL_JoystickNumHats,SDL_JoystickOpen:_SDL_JoystickOpen,SDL_JoystickOpened:_SDL_JoystickOpened,SDL_JoystickUpdate:_SDL_JoystickUpdate,SDL_Linked_Version:_SDL_Linked_Version,SDL_ListModes:_SDL_ListModes,SDL_LoadBMP_RW:_SDL_LoadBMP_RW,SDL_LockAudio:_SDL_LockAudio,SDL_LockSurface:_SDL_LockSurface,SDL_LogSetOutputFunction:_SDL_LogSetOutputFunction,SDL_LowerBlit:_SDL_LowerBlit,SDL_LowerBlitScaled:_SDL_LowerBlitScaled,SDL_MapRGB:_SDL_MapRGB,SDL_MapRGBA:_SDL_MapRGBA,SDL_NumJoysticks:_SDL_NumJoysticks,SDL_OpenAudio:_SDL_OpenAudio,SDL_PauseAudio:_SDL_PauseAudio,SDL_PeepEvents:_SDL_PeepEvents,SDL_PollEvent:_SDL_PollEvent,SDL_PumpEvents:_SDL_PumpEvents,SDL_PushEvent:_SDL_PushEvent,SDL_Quit:_SDL_Quit,SDL_QuitSubSystem:_SDL_QuitSubSystem,SDL_RWFromConstMem:_SDL_RWFromConstMem,SDL_RWFromFile:_SDL_RWFromFile,SDL_RWFromMem:_SDL_RWFromMem,SDL_RemoveTimer:_SDL_RemoveTimer,SDL_SaveBMP_RW:_SDL_SaveBMP_RW,SDL_SetAlpha:_SDL_SetAlpha,SDL_SetClipRect:_SDL_SetClipRect,SDL_SetColorKey:_SDL_SetColorKey,SDL_SetColors:_SDL_SetColors,SDL_SetError:_SDL_SetError,SDL_SetGamma:_SDL_SetGamma,SDL_SetGammaRamp:_SDL_SetGammaRamp,SDL_SetPalette:_SDL_SetPalette,SDL_SetVideoMode:_SDL_SetVideoMode,SDL_SetWindowFullscreen:_SDL_SetWindowFullscreen,SDL_SetWindowTitle:_SDL_SetWindowTitle,SDL_ShowCursor:_SDL_ShowCursor,SDL_StartTextInput:_SDL_StartTextInput,SDL_StopTextInput:_SDL_StopTextInput,SDL_ThreadID:_SDL_ThreadID,SDL_UnlockAudio:_SDL_UnlockAudio,SDL_UnlockSurface:_SDL_UnlockSurface,SDL_UpdateRect:_SDL_UpdateRect,SDL_UpdateRects:_SDL_UpdateRects,SDL_UpperBlit:_SDL_UpperBlit,SDL_UpperBlitScaled:_SDL_UpperBlitScaled,SDL_VideoDriverName:_SDL_VideoDriverName,SDL_VideoModeOK:_SDL_VideoModeOK,SDL_VideoQuit:_SDL_VideoQuit,SDL_WM_GrabInput:_SDL_WM_GrabInput,SDL_WM_IconifyWindow:_SDL_WM_IconifyWindow,SDL_WM_SetCaption:_SDL_WM_SetCaption,SDL_WM_SetIcon:_SDL_WM_SetIcon,SDL_WM_ToggleFullScreen:_SDL_WM_ToggleFullScreen,SDL_WaitThread:_SDL_WaitThread,SDL_WarpMouse:_SDL_WarpMouse,SDL_WasInit:_SDL_WasInit,SDL_mutexP:_SDL_mutexP,SDL_mutexV:_SDL_mutexV,TTF_CloseFont:_TTF_CloseFont,TTF_FontAscent:_TTF_FontAscent,TTF_FontDescent:_TTF_FontDescent,TTF_FontHeight:_TTF_FontHeight,TTF_FontLineSkip:_TTF_FontLineSkip,TTF_GlyphMetrics:_TTF_GlyphMetrics,TTF_Init:_TTF_Init,TTF_OpenFont:_TTF_OpenFont,TTF_Quit:_TTF_Quit,TTF_RenderText_Blended:_TTF_RenderText_Blended,TTF_RenderText_Shaded:_TTF_RenderText_Shaded,TTF_RenderText_Solid:_TTF_RenderText_Solid,TTF_RenderUTF8_Solid:_TTF_RenderUTF8_Solid,TTF_SizeText:_TTF_SizeText,TTF_SizeUTF8:_TTF_SizeUTF8,XChangeWindowAttributes:_XChangeWindowAttributes,XCreateWindow:_XCreateWindow,XInternAtom:_XInternAtom,XMapWindow:_XMapWindow,XOpenDisplay:_XOpenDisplay,XPending:_XPending,XSendEvent:_XSendEvent,XSetWMHints:_XSetWMHints,XStoreName:_XStoreName,_Unwind_Backtrace:__Unwind_Backtrace,_Unwind_DeleteException:__Unwind_DeleteException,_Unwind_FindEnclosingFunction:__Unwind_FindEnclosingFunction,_Unwind_GetIPInfo:__Unwind_GetIPInfo,_Unwind_RaiseException:__Unwind_RaiseException,_ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm:__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm,__asctime_r:___asctime_r,__assert_fail:___assert_fail,__call_sighandler:___call_sighandler,__cxa_begin_catch:___cxa_begin_catch,__cxa_call_unexpected:___cxa_call_unexpected,__cxa_current_primary_exception:___cxa_current_primary_exception,__cxa_end_catch:___cxa_end_catch,__cxa_find_matching_catch_2:___cxa_find_matching_catch_2,__cxa_find_matching_catch_3:___cxa_find_matching_catch_3,__cxa_find_matching_catch_4:___cxa_find_matching_catch_4,__cxa_get_exception_ptr:___cxa_get_exception_ptr,__cxa_rethrow:___cxa_rethrow,__cxa_rethrow_primary_exception:___cxa_rethrow_primary_exception,__cxa_throw:___cxa_throw,__cxa_uncaught_exceptions:___cxa_uncaught_exceptions,__global_base:___global_base,__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__resumeException:___resumeException,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__syscall__newselect:___syscall__newselect,__syscall_accept4:___syscall_accept4,__syscall_bind:___syscall_bind,__syscall_chdir:___syscall_chdir,__syscall_chmod:___syscall_chmod,__syscall_connect:___syscall_connect,__syscall_dup:___syscall_dup,__syscall_dup3:___syscall_dup3,__syscall_faccessat:___syscall_faccessat,__syscall_fadvise64:___syscall_fadvise64,__syscall_fallocate:___syscall_fallocate,__syscall_fchdir:___syscall_fchdir,__syscall_fchmod:___syscall_fchmod,__syscall_fchmodat:___syscall_fchmodat,__syscall_fchown32:___syscall_fchown32,__syscall_fchownat:___syscall_fchownat,__syscall_fcntl64:___syscall_fcntl64,__syscall_fdatasync:___syscall_fdatasync,__syscall_fstat64:___syscall_fstat64,__syscall_fstatfs64:___syscall_fstatfs64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getcwd:___syscall_getcwd,__syscall_getdents64:___syscall_getdents64,__syscall_getpeername:___syscall_getpeername,__syscall_getsockname:___syscall_getsockname,__syscall_getsockopt:___syscall_getsockopt,__syscall_ioctl:___syscall_ioctl,__syscall_listen:___syscall_listen,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_mknodat:___syscall_mknodat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_pipe:___syscall_pipe,__syscall_poll:___syscall_poll,__syscall_readlinkat:___syscall_readlinkat,__syscall_recvfrom:___syscall_recvfrom,__syscall_recvmsg:___syscall_recvmsg,__syscall_renameat:___syscall_renameat,__syscall_rmdir:___syscall_rmdir,__syscall_sendmsg:___syscall_sendmsg,__syscall_sendto:___syscall_sendto,__syscall_socket:___syscall_socket,__syscall_stat64:___syscall_stat64,__syscall_statfs64:___syscall_statfs64,__syscall_symlink:___syscall_symlink,__syscall_symlinkat:___syscall_symlinkat,__syscall_truncate64:___syscall_truncate64,__syscall_unlinkat:___syscall_unlinkat,__syscall_utimensat:___syscall_utimensat,__table_base:___table_base,_dlopen_js:__dlopen_js,_dlsym_catchup_js:__dlsym_catchup_js,_dlsym_js:__dlsym_js,_embind_create_inheriting_constructor:__embind_create_inheriting_constructor,_embind_finalize_value_array:__embind_finalize_value_array,_embind_finalize_value_object:__embind_finalize_value_object,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_class:__embind_register_class,_embind_register_class_class_function:__embind_register_class_class_function,_embind_register_class_class_property:__embind_register_class_class_property,_embind_register_class_constructor:__embind_register_class_constructor,_embind_register_class_function:__embind_register_class_function,_embind_register_class_property:__embind_register_class_property,_embind_register_constant:__embind_register_constant,_embind_register_emval:__embind_register_emval,_embind_register_enum:__embind_register_enum,_embind_register_enum_value:__embind_register_enum_value,_embind_register_float:__embind_register_float,_embind_register_function:__embind_register_function,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_optional:__embind_register_optional,_embind_register_smart_ptr:__embind_register_smart_ptr,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_user_type:__embind_register_user_type,_embind_register_value_array:__embind_register_value_array,_embind_register_value_array_element:__embind_register_value_array_element,_embind_register_value_object:__embind_register_value_object,_embind_register_value_object_field:__embind_register_value_object_field,_embind_register_void:__embind_register_void,_emscripten_dlopen_js:__emscripten_dlopen_js,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_get_progname:__emscripten_get_progname,_emscripten_lookup_name:__emscripten_lookup_name,_emscripten_push_main_loop_blocker:__emscripten_push_main_loop_blocker,_emscripten_push_uncounted_main_loop_blocker:__emscripten_push_uncounted_main_loop_blocker,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_set_offscreencanvas_size:__emscripten_set_offscreencanvas_size,_emscripten_system:__emscripten_system,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_emval_as:__emval_as,_emval_as_int64:__emval_as_int64,_emval_as_uint64:__emval_as_uint64,_emval_call:__emval_call,_emval_call_method:__emval_call_method,_emval_coro_make_promise:__emval_coro_make_promise,_emval_coro_suspend:__emval_coro_suspend,_emval_decref:__emval_decref,_emval_delete:__emval_delete,_emval_equals:__emval_equals,_emval_get_global:__emval_get_global,_emval_get_method_caller:__emval_get_method_caller,_emval_get_module_property:__emval_get_module_property,_emval_get_property:__emval_get_property,_emval_greater_than:__emval_greater_than,_emval_in:__emval_in,_emval_incref:__emval_incref,_emval_instanceof:__emval_instanceof,_emval_is_number:__emval_is_number,_emval_is_string:__emval_is_string,_emval_iter_begin:__emval_iter_begin,_emval_iter_next:__emval_iter_next,_emval_less_than:__emval_less_than,_emval_new_array:__emval_new_array,_emval_new_array_from_memory_view:__emval_new_array_from_memory_view,_emval_new_cstring:__emval_new_cstring,_emval_new_object:__emval_new_object,_emval_new_u16string:__emval_new_u16string,_emval_new_u8string:__emval_new_u8string,_emval_not:__emval_not,_emval_register_symbol:__emval_register_symbol,_emval_run_destructors:__emval_run_destructors,_emval_set_property:__emval_set_property,_emval_strictly_equals:__emval_strictly_equals,_emval_take_value:__emval_take_value,_emval_throw:__emval_throw,_emval_typeof:__emval_typeof,_glGetActiveAttribOrUniform:__glGetActiveAttribOrUniform,_gmtime_js:__gmtime_js,_localtime_js:__localtime_js,_mktime_js:__mktime_js,_mmap_js:__mmap_js,_msync_js:__msync_js,_munmap_js:__munmap_js,_setitimer_js:__setitimer_js,_timegm_js:__timegm_js,_tzset_js:__tzset_js,abort:_abort,alBuffer3f:_alBuffer3f,alBuffer3i:_alBuffer3i,alBufferData:_alBufferData,alBufferf:_alBufferf,alBufferfv:_alBufferfv,alBufferi:_alBufferi,alBufferiv:_alBufferiv,alDeleteBuffers:_alDeleteBuffers,alDeleteSources:_alDeleteSources,alDisable:_alDisable,alDistanceModel:_alDistanceModel,alDopplerFactor:_alDopplerFactor,alDopplerVelocity:_alDopplerVelocity,alEnable:_alEnable,alGenBuffers:_alGenBuffers,alGenSources:_alGenSources,alGetBoolean:_alGetBoolean,alGetBooleanv:_alGetBooleanv,alGetBuffer3f:_alGetBuffer3f,alGetBuffer3i:_alGetBuffer3i,alGetBufferf:_alGetBufferf,alGetBufferfv:_alGetBufferfv,alGetBufferi:_alGetBufferi,alGetBufferiv:_alGetBufferiv,alGetDouble:_alGetDouble,alGetDoublev:_alGetDoublev,alGetEnumValue:_alGetEnumValue,alGetError:_alGetError,alGetFloat:_alGetFloat,alGetFloatv:_alGetFloatv,alGetInteger:_alGetInteger,alGetIntegerv:_alGetIntegerv,alGetListener3f:_alGetListener3f,alGetListener3i:_alGetListener3i,alGetListenerf:_alGetListenerf,alGetListenerfv:_alGetListenerfv,alGetListeneri:_alGetListeneri,alGetListeneriv:_alGetListeneriv,alGetSource3f:_alGetSource3f,alGetSource3i:_alGetSource3i,alGetSourcef:_alGetSourcef,alGetSourcefv:_alGetSourcefv,alGetSourcei:_alGetSourcei,alGetSourceiv:_alGetSourceiv,alGetString:_alGetString,alIsBuffer:_alIsBuffer,alIsEnabled:_alIsEnabled,alIsExtensionPresent:_alIsExtensionPresent,alIsSource:_alIsSource,alListener3f:_alListener3f,alListener3i:_alListener3i,alListenerf:_alListenerf,alListenerfv:_alListenerfv,alListeneri:_alListeneri,alListeneriv:_alListeneriv,alSource3f:_alSource3f,alSource3i:_alSource3i,alSourcePause:_alSourcePause,alSourcePausev:_alSourcePausev,alSourcePlay:_alSourcePlay,alSourcePlayv:_alSourcePlayv,alSourceQueueBuffers:_alSourceQueueBuffers,alSourceRewind:_alSourceRewind,alSourceRewindv:_alSourceRewindv,alSourceStop:_alSourceStop,alSourceStopv:_alSourceStopv,alSourceUnqueueBuffers:_alSourceUnqueueBuffers,alSourcef:_alSourcef,alSourcefv:_alSourcefv,alSourcei:_alSourcei,alSourceiv:_alSourceiv,alSpeedOfSound:_alSpeedOfSound,alcCaptureCloseDevice:_alcCaptureCloseDevice,alcCaptureOpenDevice:_alcCaptureOpenDevice,alcCaptureSamples:_alcCaptureSamples,alcCaptureStart:_alcCaptureStart,alcCaptureStop:_alcCaptureStop,alcCloseDevice:_alcCloseDevice,alcCreateContext:_alcCreateContext,alcDestroyContext:_alcDestroyContext,alcGetContextsDevice:_alcGetContextsDevice,alcGetCurrentContext:_alcGetCurrentContext,alcGetEnumValue:_alcGetEnumValue,alcGetError:_alcGetError,alcGetIntegerv:_alcGetIntegerv,alcGetString:_alcGetString,alcIsExtensionPresent:_alcIsExtensionPresent,alcMakeContextCurrent:_alcMakeContextCurrent,alcOpenDevice:_alcOpenDevice,alcProcessContext:_alcProcessContext,alcSuspendContext:_alcSuspendContext,boxColor:_boxColor,boxRGBA:_boxRGBA,clock_res_get:_clock_res_get,clock_time_get:_clock_time_get,duckdb_web_fs_directory_create:_duckdb_web_fs_directory_create,duckdb_web_fs_directory_exists:_duckdb_web_fs_directory_exists,duckdb_web_fs_directory_list_files:_duckdb_web_fs_directory_list_files,duckdb_web_fs_directory_remove:_duckdb_web_fs_directory_remove,duckdb_web_fs_file_close:_duckdb_web_fs_file_close,duckdb_web_fs_file_exists:_duckdb_web_fs_file_exists,duckdb_web_fs_file_get_last_modified_time:_duckdb_web_fs_file_get_last_modified_time,duckdb_web_fs_file_move:_duckdb_web_fs_file_move,duckdb_web_fs_file_open:_duckdb_web_fs_file_open,duckdb_web_fs_file_read:_duckdb_web_fs_file_read,duckdb_web_fs_file_remove:_duckdb_web_fs_file_remove,duckdb_web_fs_file_sync:_duckdb_web_fs_file_sync,duckdb_web_fs_file_truncate:_duckdb_web_fs_file_truncate,duckdb_web_fs_file_write:_duckdb_web_fs_file_write,duckdb_web_fs_get_default_data_protocol:_duckdb_web_fs_get_default_data_protocol,duckdb_web_fs_glob:_duckdb_web_fs_glob,duckdb_web_test_platform_feature:_duckdb_web_test_platform_feature,duckdb_web_udf_scalar_call:_duckdb_web_udf_scalar_call,eglBindAPI:_eglBindAPI,eglChooseConfig:_eglChooseConfig,eglCreateContext:_eglCreateContext,eglCreateWindowSurface:_eglCreateWindowSurface,eglDestroyContext:_eglDestroyContext,eglDestroySurface:_eglDestroySurface,eglGetConfigAttrib:_eglGetConfigAttrib,eglGetConfigs:_eglGetConfigs,eglGetCurrentContext:_eglGetCurrentContext,eglGetCurrentDisplay:_eglGetCurrentDisplay,eglGetCurrentSurface:_eglGetCurrentSurface,eglGetDisplay:_eglGetDisplay,eglGetError:_eglGetError,eglInitialize:_eglInitialize,eglMakeCurrent:_eglMakeCurrent,eglQueryAPI:_eglQueryAPI,eglQueryContext:_eglQueryContext,eglQueryString:_eglQueryString,eglQuerySurface:_eglQuerySurface,eglReleaseThread:_eglReleaseThread,eglSwapBuffers:_eglSwapBuffers,eglSwapInterval:_eglSwapInterval,eglTerminate:_eglTerminate,eglWaitClient:_eglWaitClient,eglWaitGL:_eglWaitGL,eglWaitNative:_eglWaitNative,ellipseColor:_ellipseColor,ellipseRGBA:_ellipseRGBA,emscripten_SDL_SetEventHandler:_emscripten_SDL_SetEventHandler,emscripten_alcDevicePauseSOFT:_emscripten_alcDevicePauseSOFT,emscripten_alcDeviceResumeSOFT:_emscripten_alcDeviceResumeSOFT,emscripten_alcGetStringiSOFT:_emscripten_alcGetStringiSOFT,emscripten_alcResetDeviceSOFT:_emscripten_alcResetDeviceSOFT,emscripten_asm_const_async_on_main_thread:_emscripten_asm_const_async_on_main_thread,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_double_sync_on_main_thread:_emscripten_asm_const_double_sync_on_main_thread,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_asm_const_int_sync_on_main_thread:_emscripten_asm_const_int_sync_on_main_thread,emscripten_asm_const_ptr:_emscripten_asm_const_ptr,emscripten_asm_const_ptr_sync_on_main_thread:_emscripten_asm_const_ptr_sync_on_main_thread,emscripten_async_call:_emscripten_async_call,emscripten_async_load_script:_emscripten_async_load_script,emscripten_async_run_script:_emscripten_async_run_script,emscripten_async_wget:_emscripten_async_wget,emscripten_async_wget2:_emscripten_async_wget2,emscripten_async_wget2_abort:_emscripten_async_wget2_abort,emscripten_async_wget2_data:_emscripten_async_wget2_data,emscripten_async_wget_data:_emscripten_async_wget_data,emscripten_call_worker:_emscripten_call_worker,emscripten_cancel_animation_frame:_emscripten_cancel_animation_frame,emscripten_cancel_main_loop:_emscripten_cancel_main_loop,emscripten_clear_immediate:_emscripten_clear_immediate,emscripten_clear_interval:_emscripten_clear_interval,emscripten_clear_timeout:_emscripten_clear_timeout,emscripten_console_error:_emscripten_console_error,emscripten_console_log:_emscripten_console_log,emscripten_console_warn:_emscripten_console_warn,emscripten_create_worker:_emscripten_create_worker,emscripten_date_now:_emscripten_date_now,emscripten_debugger:_emscripten_debugger,emscripten_destroy_worker:_emscripten_destroy_worker,emscripten_enter_soft_fullscreen:_emscripten_enter_soft_fullscreen,emscripten_err:_emscripten_err,emscripten_errn:_emscripten_errn,emscripten_exit_fullscreen:_emscripten_exit_fullscreen,emscripten_exit_pointerlock:_emscripten_exit_pointerlock,emscripten_exit_soft_fullscreen:_emscripten_exit_soft_fullscreen,emscripten_exit_with_live_runtime:_emscripten_exit_with_live_runtime,emscripten_fiber_swap:_emscripten_fiber_swap,emscripten_force_exit:_emscripten_force_exit,emscripten_get_battery_status:_emscripten_get_battery_status,emscripten_get_callstack:_emscripten_get_callstack,emscripten_get_canvas_element_size:_emscripten_get_canvas_element_size,emscripten_get_canvas_size:_emscripten_get_canvas_size,emscripten_get_compiler_setting:_emscripten_get_compiler_setting,emscripten_get_device_pixel_ratio:_emscripten_get_device_pixel_ratio,emscripten_get_devicemotion_status:_emscripten_get_devicemotion_status,emscripten_get_deviceorientation_status:_emscripten_get_deviceorientation_status,emscripten_get_element_css_size:_emscripten_get_element_css_size,emscripten_get_fullscreen_status:_emscripten_get_fullscreen_status,emscripten_get_gamepad_status:_emscripten_get_gamepad_status,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_main_loop_timing:_emscripten_get_main_loop_timing,emscripten_get_module_name:_emscripten_get_module_name,emscripten_get_mouse_status:_emscripten_get_mouse_status,emscripten_get_now:_emscripten_get_now,emscripten_get_now_res:_emscripten_get_now_res,emscripten_get_num_gamepads:_emscripten_get_num_gamepads,emscripten_get_orientation_status:_emscripten_get_orientation_status,emscripten_get_pointerlock_status:_emscripten_get_pointerlock_status,emscripten_get_preloaded_image_data:_emscripten_get_preloaded_image_data,emscripten_get_preloaded_image_data_from_FILE:_emscripten_get_preloaded_image_data_from_FILE,emscripten_get_screen_size:_emscripten_get_screen_size,emscripten_get_visibility_status:_emscripten_get_visibility_status,emscripten_get_window_title:_emscripten_get_window_title,emscripten_get_worker_queue_size:_emscripten_get_worker_queue_size,emscripten_glActiveTexture:_emscripten_glActiveTexture,emscripten_glAttachShader:_emscripten_glAttachShader,emscripten_glBegin:_emscripten_glBegin,emscripten_glBeginQueryEXT:_emscripten_glBeginQueryEXT,emscripten_glBindAttribLocation:_emscripten_glBindAttribLocation,emscripten_glBindBuffer:_emscripten_glBindBuffer,emscripten_glBindFramebuffer:_emscripten_glBindFramebuffer,emscripten_glBindRenderbuffer:_emscripten_glBindRenderbuffer,emscripten_glBindTexture:_emscripten_glBindTexture,emscripten_glBindVertexArray:_emscripten_glBindVertexArray,emscripten_glBindVertexArrayOES:_emscripten_glBindVertexArrayOES,emscripten_glBlendColor:_emscripten_glBlendColor,emscripten_glBlendEquation:_emscripten_glBlendEquation,emscripten_glBlendEquationSeparate:_emscripten_glBlendEquationSeparate,emscripten_glBlendFunc:_emscripten_glBlendFunc,emscripten_glBlendFuncSeparate:_emscripten_glBlendFuncSeparate,emscripten_glBufferData:_emscripten_glBufferData,emscripten_glBufferSubData:_emscripten_glBufferSubData,emscripten_glCheckFramebufferStatus:_emscripten_glCheckFramebufferStatus,emscripten_glClear:_emscripten_glClear,emscripten_glClearColor:_emscripten_glClearColor,emscripten_glClearDepth:_emscripten_glClearDepth,emscripten_glClearDepthf:_emscripten_glClearDepthf,emscripten_glClearStencil:_emscripten_glClearStencil,emscripten_glColorMask:_emscripten_glColorMask,emscripten_glCompileShader:_emscripten_glCompileShader,emscripten_glCompressedTexImage2D:_emscripten_glCompressedTexImage2D,emscripten_glCompressedTexSubImage2D:_emscripten_glCompressedTexSubImage2D,emscripten_glCopyTexImage2D:_emscripten_glCopyTexImage2D,emscripten_glCopyTexSubImage2D:_emscripten_glCopyTexSubImage2D,emscripten_glCreateProgram:_emscripten_glCreateProgram,emscripten_glCreateShader:_emscripten_glCreateShader,emscripten_glCullFace:_emscripten_glCullFace,emscripten_glDeleteBuffers:_emscripten_glDeleteBuffers,emscripten_glDeleteFramebuffers:_emscripten_glDeleteFramebuffers,emscripten_glDeleteProgram:_emscripten_glDeleteProgram,emscripten_glDeleteQueriesEXT:_emscripten_glDeleteQueriesEXT,emscripten_glDeleteRenderbuffers:_emscripten_glDeleteRenderbuffers,emscripten_glDeleteShader:_emscripten_glDeleteShader,emscripten_glDeleteTextures:_emscripten_glDeleteTextures,emscripten_glDeleteVertexArrays:_emscripten_glDeleteVertexArrays,emscripten_glDeleteVertexArraysOES:_emscripten_glDeleteVertexArraysOES,emscripten_glDepthFunc:_emscripten_glDepthFunc,emscripten_glDepthMask:_emscripten_glDepthMask,emscripten_glDepthRange:_emscripten_glDepthRange,emscripten_glDepthRangef:_emscripten_glDepthRangef,emscripten_glDetachShader:_emscripten_glDetachShader,emscripten_glDisable:_emscripten_glDisable,emscripten_glDisableVertexAttribArray:_emscripten_glDisableVertexAttribArray,emscripten_glDrawArrays:_emscripten_glDrawArrays,emscripten_glDrawArraysInstanced:_emscripten_glDrawArraysInstanced,emscripten_glDrawArraysInstancedANGLE:_emscripten_glDrawArraysInstancedANGLE,emscripten_glDrawArraysInstancedARB:_emscripten_glDrawArraysInstancedARB,emscripten_glDrawArraysInstancedEXT:_emscripten_glDrawArraysInstancedEXT,emscripten_glDrawArraysInstancedNV:_emscripten_glDrawArraysInstancedNV,emscripten_glDrawBuffers:_emscripten_glDrawBuffers,emscripten_glDrawBuffersEXT:_emscripten_glDrawBuffersEXT,emscripten_glDrawBuffersWEBGL:_emscripten_glDrawBuffersWEBGL,emscripten_glDrawElements:_emscripten_glDrawElements,emscripten_glDrawElementsInstanced:_emscripten_glDrawElementsInstanced,emscripten_glDrawElementsInstancedANGLE:_emscripten_glDrawElementsInstancedANGLE,emscripten_glDrawElementsInstancedARB:_emscripten_glDrawElementsInstancedARB,emscripten_glDrawElementsInstancedEXT:_emscripten_glDrawElementsInstancedEXT,emscripten_glDrawElementsInstancedNV:_emscripten_glDrawElementsInstancedNV,emscripten_glEnable:_emscripten_glEnable,emscripten_glEnableVertexAttribArray:_emscripten_glEnableVertexAttribArray,emscripten_glEndQueryEXT:_emscripten_glEndQueryEXT,emscripten_glFinish:_emscripten_glFinish,emscripten_glFlush:_emscripten_glFlush,emscripten_glFramebufferRenderbuffer:_emscripten_glFramebufferRenderbuffer,emscripten_glFramebufferTexture2D:_emscripten_glFramebufferTexture2D,emscripten_glFrontFace:_emscripten_glFrontFace,emscripten_glGenBuffers:_emscripten_glGenBuffers,emscripten_glGenFramebuffers:_emscripten_glGenFramebuffers,emscripten_glGenQueriesEXT:_emscripten_glGenQueriesEXT,emscripten_glGenRenderbuffers:_emscripten_glGenRenderbuffers,emscripten_glGenTextures:_emscripten_glGenTextures,emscripten_glGenVertexArrays:_emscripten_glGenVertexArrays,emscripten_glGenVertexArraysOES:_emscripten_glGenVertexArraysOES,emscripten_glGenerateMipmap:_emscripten_glGenerateMipmap,emscripten_glGetActiveAttrib:_emscripten_glGetActiveAttrib,emscripten_glGetActiveUniform:_emscripten_glGetActiveUniform,emscripten_glGetAttachedShaders:_emscripten_glGetAttachedShaders,emscripten_glGetAttribLocation:_emscripten_glGetAttribLocation,emscripten_glGetBooleanv:_emscripten_glGetBooleanv,emscripten_glGetBufferParameteriv:_emscripten_glGetBufferParameteriv,emscripten_glGetError:_emscripten_glGetError,emscripten_glGetFloatv:_emscripten_glGetFloatv,emscripten_glGetFramebufferAttachmentParameteriv:_emscripten_glGetFramebufferAttachmentParameteriv,emscripten_glGetIntegerv:_emscripten_glGetIntegerv,emscripten_glGetProgramInfoLog:_emscripten_glGetProgramInfoLog,emscripten_glGetProgramiv:_emscripten_glGetProgramiv,emscripten_glGetQueryObjecti64vEXT:_emscripten_glGetQueryObjecti64vEXT,emscripten_glGetQueryObjectivEXT:_emscripten_glGetQueryObjectivEXT,emscripten_glGetQueryObjectui64vEXT:_emscripten_glGetQueryObjectui64vEXT,emscripten_glGetQueryObjectuivEXT:_emscripten_glGetQueryObjectuivEXT,emscripten_glGetQueryivEXT:_emscripten_glGetQueryivEXT,emscripten_glGetRenderbufferParameteriv:_emscripten_glGetRenderbufferParameteriv,emscripten_glGetShaderInfoLog:_emscripten_glGetShaderInfoLog,emscripten_glGetShaderPrecisionFormat:_emscripten_glGetShaderPrecisionFormat,emscripten_glGetShaderSource:_emscripten_glGetShaderSource,emscripten_glGetShaderiv:_emscripten_glGetShaderiv,emscripten_glGetString:_emscripten_glGetString,emscripten_glGetTexParameterfv:_emscripten_glGetTexParameterfv,emscripten_glGetTexParameteriv:_emscripten_glGetTexParameteriv,emscripten_glGetUniformLocation:_emscripten_glGetUniformLocation,emscripten_glGetUniformfv:_emscripten_glGetUniformfv,emscripten_glGetUniformiv:_emscripten_glGetUniformiv,emscripten_glGetVertexAttribPointerv:_emscripten_glGetVertexAttribPointerv,emscripten_glGetVertexAttribfv:_emscripten_glGetVertexAttribfv,emscripten_glGetVertexAttribiv:_emscripten_glGetVertexAttribiv,emscripten_glHint:_emscripten_glHint,emscripten_glIsBuffer:_emscripten_glIsBuffer,emscripten_glIsEnabled:_emscripten_glIsEnabled,emscripten_glIsFramebuffer:_emscripten_glIsFramebuffer,emscripten_glIsProgram:_emscripten_glIsProgram,emscripten_glIsQueryEXT:_emscripten_glIsQueryEXT,emscripten_glIsRenderbuffer:_emscripten_glIsRenderbuffer,emscripten_glIsShader:_emscripten_glIsShader,emscripten_glIsTexture:_emscripten_glIsTexture,emscripten_glIsVertexArray:_emscripten_glIsVertexArray,emscripten_glIsVertexArrayOES:_emscripten_glIsVertexArrayOES,emscripten_glLineWidth:_emscripten_glLineWidth,emscripten_glLinkProgram:_emscripten_glLinkProgram,emscripten_glLoadIdentity:_emscripten_glLoadIdentity,emscripten_glMatrixMode:_emscripten_glMatrixMode,emscripten_glMultiDrawArrays:_emscripten_glMultiDrawArrays,emscripten_glMultiDrawArraysANGLE:_emscripten_glMultiDrawArraysANGLE,emscripten_glMultiDrawArraysInstancedANGLE:_emscripten_glMultiDrawArraysInstancedANGLE,emscripten_glMultiDrawArraysInstancedWEBGL:_emscripten_glMultiDrawArraysInstancedWEBGL,emscripten_glMultiDrawArraysWEBGL:_emscripten_glMultiDrawArraysWEBGL,emscripten_glMultiDrawElements:_emscripten_glMultiDrawElements,emscripten_glMultiDrawElementsANGLE:_emscripten_glMultiDrawElementsANGLE,emscripten_glMultiDrawElementsInstancedANGLE:_emscripten_glMultiDrawElementsInstancedANGLE,emscripten_glMultiDrawElementsInstancedWEBGL:_emscripten_glMultiDrawElementsInstancedWEBGL,emscripten_glMultiDrawElementsWEBGL:_emscripten_glMultiDrawElementsWEBGL,emscripten_glPixelStorei:_emscripten_glPixelStorei,emscripten_glPolygonOffset:_emscripten_glPolygonOffset,emscripten_glQueryCounterEXT:_emscripten_glQueryCounterEXT,emscripten_glReadPixels:_emscripten_glReadPixels,emscripten_glReleaseShaderCompiler:_emscripten_glReleaseShaderCompiler,emscripten_glRenderbufferStorage:_emscripten_glRenderbufferStorage,emscripten_glSampleCoverage:_emscripten_glSampleCoverage,emscripten_glScissor:_emscripten_glScissor,emscripten_glShaderBinary:_emscripten_glShaderBinary,emscripten_glShaderSource:_emscripten_glShaderSource,emscripten_glStencilFunc:_emscripten_glStencilFunc,emscripten_glStencilFuncSeparate:_emscripten_glStencilFuncSeparate,emscripten_glStencilMask:_emscripten_glStencilMask,emscripten_glStencilMaskSeparate:_emscripten_glStencilMaskSeparate,emscripten_glStencilOp:_emscripten_glStencilOp,emscripten_glStencilOpSeparate:_emscripten_glStencilOpSeparate,emscripten_glTexImage2D:_emscripten_glTexImage2D,emscripten_glTexParameterf:_emscripten_glTexParameterf,emscripten_glTexParameterfv:_emscripten_glTexParameterfv,emscripten_glTexParameteri:_emscripten_glTexParameteri,emscripten_glTexParameteriv:_emscripten_glTexParameteriv,emscripten_glTexSubImage2D:_emscripten_glTexSubImage2D,emscripten_glUniform1f:_emscripten_glUniform1f,emscripten_glUniform1fv:_emscripten_glUniform1fv,emscripten_glUniform1i:_emscripten_glUniform1i,emscripten_glUniform1iv:_emscripten_glUniform1iv,emscripten_glUniform2f:_emscripten_glUniform2f,emscripten_glUniform2fv:_emscripten_glUniform2fv,emscripten_glUniform2i:_emscripten_glUniform2i,emscripten_glUniform2iv:_emscripten_glUniform2iv,emscripten_glUniform3f:_emscripten_glUniform3f,emscripten_glUniform3fv:_emscripten_glUniform3fv,emscripten_glUniform3i:_emscripten_glUniform3i,emscripten_glUniform3iv:_emscripten_glUniform3iv,emscripten_glUniform4f:_emscripten_glUniform4f,emscripten_glUniform4fv:_emscripten_glUniform4fv,emscripten_glUniform4i:_emscripten_glUniform4i,emscripten_glUniform4iv:_emscripten_glUniform4iv,emscripten_glUniformMatrix2fv:_emscripten_glUniformMatrix2fv,emscripten_glUniformMatrix3fv:_emscripten_glUniformMatrix3fv,emscripten_glUniformMatrix4fv:_emscripten_glUniformMatrix4fv,emscripten_glUseProgram:_emscripten_glUseProgram,emscripten_glValidateProgram:_emscripten_glValidateProgram,emscripten_glVertexAttrib1f:_emscripten_glVertexAttrib1f,emscripten_glVertexAttrib1fv:_emscripten_glVertexAttrib1fv,emscripten_glVertexAttrib2f:_emscripten_glVertexAttrib2f,emscripten_glVertexAttrib2fv:_emscripten_glVertexAttrib2fv,emscripten_glVertexAttrib3f:_emscripten_glVertexAttrib3f,emscripten_glVertexAttrib3fv:_emscripten_glVertexAttrib3fv,emscripten_glVertexAttrib4f:_emscripten_glVertexAttrib4f,emscripten_glVertexAttrib4fv:_emscripten_glVertexAttrib4fv,emscripten_glVertexAttribDivisor:_emscripten_glVertexAttribDivisor,emscripten_glVertexAttribDivisorANGLE:_emscripten_glVertexAttribDivisorANGLE,emscripten_glVertexAttribDivisorARB:_emscripten_glVertexAttribDivisorARB,emscripten_glVertexAttribDivisorEXT:_emscripten_glVertexAttribDivisorEXT,emscripten_glVertexAttribDivisorNV:_emscripten_glVertexAttribDivisorNV,emscripten_glVertexAttribPointer:_emscripten_glVertexAttribPointer,emscripten_glVertexPointer:_emscripten_glVertexPointer,emscripten_glViewport:_emscripten_glViewport,emscripten_has_asyncify:_emscripten_has_asyncify,emscripten_hide_mouse:_emscripten_hide_mouse,emscripten_html5_remove_all_event_listeners:_emscripten_html5_remove_all_event_listeners,emscripten_idb_async_clear:_emscripten_idb_async_clear,emscripten_idb_async_delete:_emscripten_idb_async_delete,emscripten_idb_async_exists:_emscripten_idb_async_exists,emscripten_idb_async_load:_emscripten_idb_async_load,emscripten_idb_async_store:_emscripten_idb_async_store,emscripten_idb_clear:_emscripten_idb_clear,emscripten_idb_delete:_emscripten_idb_delete,emscripten_idb_exists:_emscripten_idb_exists,emscripten_idb_load:_emscripten_idb_load,emscripten_idb_store:_emscripten_idb_store,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_is_webgl_context_lost:_emscripten_is_webgl_context_lost,emscripten_lock_orientation:_emscripten_lock_orientation,emscripten_log:_emscripten_log,emscripten_math_acos:_emscripten_math_acos,emscripten_math_acosh:_emscripten_math_acosh,emscripten_math_asin:_emscripten_math_asin,emscripten_math_asinh:_emscripten_math_asinh,emscripten_math_atan:_emscripten_math_atan,emscripten_math_atan2:_emscripten_math_atan2,emscripten_math_atanh:_emscripten_math_atanh,emscripten_math_cbrt:_emscripten_math_cbrt,emscripten_math_cos:_emscripten_math_cos,emscripten_math_cosh:_emscripten_math_cosh,emscripten_math_exp:_emscripten_math_exp,emscripten_math_expm1:_emscripten_math_expm1,emscripten_math_fmod:_emscripten_math_fmod,emscripten_math_hypot:_emscripten_math_hypot,emscripten_math_log:_emscripten_math_log,emscripten_math_log10:_emscripten_math_log10,emscripten_math_log1p:_emscripten_math_log1p,emscripten_math_log2:_emscripten_math_log2,emscripten_math_pow:_emscripten_math_pow,emscripten_math_random:_emscripten_math_random,emscripten_math_round:_emscripten_math_round,emscripten_math_sign:_emscripten_math_sign,emscripten_math_sin:_emscripten_math_sin,emscripten_math_sinh:_emscripten_math_sinh,emscripten_math_sqrt:_emscripten_math_sqrt,emscripten_math_tan:_emscripten_math_tan,emscripten_math_tanh:_emscripten_math_tanh,emscripten_memcpy_js:_emscripten_memcpy_js,emscripten_notify_memory_growth:_emscripten_notify_memory_growth,emscripten_out:_emscripten_out,emscripten_outn:_emscripten_outn,emscripten_pause_main_loop:_emscripten_pause_main_loop,emscripten_pc_get_column:_emscripten_pc_get_column,emscripten_pc_get_file:_emscripten_pc_get_file,emscripten_pc_get_function:_emscripten_pc_get_function,emscripten_pc_get_line:_emscripten_pc_get_line,emscripten_performance_now:_emscripten_performance_now,emscripten_print_double:_emscripten_print_double,emscripten_promise_all:_emscripten_promise_all,emscripten_promise_all_settled:_emscripten_promise_all_settled,emscripten_promise_any:_emscripten_promise_any,emscripten_promise_await:_emscripten_promise_await,emscripten_promise_create:_emscripten_promise_create,emscripten_promise_destroy:_emscripten_promise_destroy,emscripten_promise_race:_emscripten_promise_race,emscripten_promise_resolve:_emscripten_promise_resolve,emscripten_promise_then:_emscripten_promise_then,emscripten_random:_emscripten_random,emscripten_request_animation_frame:_emscripten_request_animation_frame,emscripten_request_animation_frame_loop:_emscripten_request_animation_frame_loop,emscripten_request_fullscreen:_emscripten_request_fullscreen,emscripten_request_fullscreen_strategy:_emscripten_request_fullscreen_strategy,emscripten_request_pointerlock:_emscripten_request_pointerlock,emscripten_resize_heap:_emscripten_resize_heap,emscripten_resume_main_loop:_emscripten_resume_main_loop,emscripten_return_address:_emscripten_return_address,emscripten_run_preload_plugins:_emscripten_run_preload_plugins,emscripten_run_preload_plugins_data:_emscripten_run_preload_plugins_data,emscripten_run_script:_emscripten_run_script,emscripten_run_script_int:_emscripten_run_script_int,emscripten_run_script_string:_emscripten_run_script_string,emscripten_runtime_keepalive_check:_emscripten_runtime_keepalive_check,emscripten_runtime_keepalive_pop:_emscripten_runtime_keepalive_pop,emscripten_runtime_keepalive_push:_emscripten_runtime_keepalive_push,emscripten_sample_gamepad_data:_emscripten_sample_gamepad_data,emscripten_scan_registers:_emscripten_scan_registers,emscripten_set_batterychargingchange_callback_on_thread:_emscripten_set_batterychargingchange_callback_on_thread,emscripten_set_batterylevelchange_callback_on_thread:_emscripten_set_batterylevelchange_callback_on_thread,emscripten_set_beforeunload_callback_on_thread:_emscripten_set_beforeunload_callback_on_thread,emscripten_set_blur_callback_on_thread:_emscripten_set_blur_callback_on_thread,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_canvas_size:_emscripten_set_canvas_size,emscripten_set_click_callback_on_thread:_emscripten_set_click_callback_on_thread,emscripten_set_dblclick_callback_on_thread:_emscripten_set_dblclick_callback_on_thread,emscripten_set_devicemotion_callback_on_thread:_emscripten_set_devicemotion_callback_on_thread,emscripten_set_deviceorientation_callback_on_thread:_emscripten_set_deviceorientation_callback_on_thread,emscripten_set_element_css_size:_emscripten_set_element_css_size,emscripten_set_focus_callback_on_thread:_emscripten_set_focus_callback_on_thread,emscripten_set_focusin_callback_on_thread:_emscripten_set_focusin_callback_on_thread,emscripten_set_focusout_callback_on_thread:_emscripten_set_focusout_callback_on_thread,emscripten_set_fullscreenchange_callback_on_thread:_emscripten_set_fullscreenchange_callback_on_thread,emscripten_set_gamepadconnected_callback_on_thread:_emscripten_set_gamepadconnected_callback_on_thread,emscripten_set_gamepaddisconnected_callback_on_thread:_emscripten_set_gamepaddisconnected_callback_on_thread,emscripten_set_immediate:_emscripten_set_immediate,emscripten_set_immediate_loop:_emscripten_set_immediate_loop,emscripten_set_interval:_emscripten_set_interval,emscripten_set_keydown_callback_on_thread:_emscripten_set_keydown_callback_on_thread,emscripten_set_keypress_callback_on_thread:_emscripten_set_keypress_callback_on_thread,emscripten_set_keyup_callback_on_thread:_emscripten_set_keyup_callback_on_thread,emscripten_set_main_loop:_emscripten_set_main_loop,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_main_loop_expected_blockers:_emscripten_set_main_loop_expected_blockers,emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,emscripten_set_mousedown_callback_on_thread:_emscripten_set_mousedown_callback_on_thread,emscripten_set_mouseenter_callback_on_thread:_emscripten_set_mouseenter_callback_on_thread,emscripten_set_mouseleave_callback_on_thread:_emscripten_set_mouseleave_callback_on_thread,emscripten_set_mousemove_callback_on_thread:_emscripten_set_mousemove_callback_on_thread,emscripten_set_mouseout_callback_on_thread:_emscripten_set_mouseout_callback_on_thread,emscripten_set_mouseover_callback_on_thread:_emscripten_set_mouseover_callback_on_thread,emscripten_set_mouseup_callback_on_thread:_emscripten_set_mouseup_callback_on_thread,emscripten_set_orientationchange_callback_on_thread:_emscripten_set_orientationchange_callback_on_thread,emscripten_set_pointerlockchange_callback_on_thread:_emscripten_set_pointerlockchange_callback_on_thread,emscripten_set_pointerlockerror_callback_on_thread:_emscripten_set_pointerlockerror_callback_on_thread,emscripten_set_resize_callback_on_thread:_emscripten_set_resize_callback_on_thread,emscripten_set_scroll_callback_on_thread:_emscripten_set_scroll_callback_on_thread,emscripten_set_socket_close_callback:_emscripten_set_socket_close_callback,emscripten_set_socket_connection_callback:_emscripten_set_socket_connection_callback,emscripten_set_socket_error_callback:_emscripten_set_socket_error_callback,emscripten_set_socket_listen_callback:_emscripten_set_socket_listen_callback,emscripten_set_socket_message_callback:_emscripten_set_socket_message_callback,emscripten_set_socket_open_callback:_emscripten_set_socket_open_callback,emscripten_set_timeout:_emscripten_set_timeout,emscripten_set_timeout_loop:_emscripten_set_timeout_loop,emscripten_set_touchcancel_callback_on_thread:_emscripten_set_touchcancel_callback_on_thread,emscripten_set_touchend_callback_on_thread:_emscripten_set_touchend_callback_on_thread,emscripten_set_touchmove_callback_on_thread:_emscripten_set_touchmove_callback_on_thread,emscripten_set_touchstart_callback_on_thread:_emscripten_set_touchstart_callback_on_thread,emscripten_set_visibilitychange_callback_on_thread:_emscripten_set_visibilitychange_callback_on_thread,emscripten_set_webglcontextlost_callback_on_thread:_emscripten_set_webglcontextlost_callback_on_thread,emscripten_set_webglcontextrestored_callback_on_thread:_emscripten_set_webglcontextrestored_callback_on_thread,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_sleep:_emscripten_sleep,emscripten_stack_snapshot:_emscripten_stack_snapshot,emscripten_stack_unwind_buffer:_emscripten_stack_unwind_buffer,emscripten_supports_offscreencanvas:_emscripten_supports_offscreencanvas,emscripten_throw_number:_emscripten_throw_number,emscripten_throw_string:_emscripten_throw_string,emscripten_unlock_orientation:_emscripten_unlock_orientation,emscripten_unwind_to_js_event_loop:_emscripten_unwind_to_js_event_loop,emscripten_vibrate:_emscripten_vibrate,emscripten_vibrate_pattern:_emscripten_vibrate_pattern,emscripten_webgl_commit_frame:_emscripten_webgl_commit_frame,emscripten_webgl_create_context:_emscripten_webgl_create_context,emscripten_webgl_destroy_context:_emscripten_webgl_destroy_context,emscripten_webgl_do_commit_frame:_emscripten_webgl_do_commit_frame,emscripten_webgl_do_create_context:_emscripten_webgl_do_create_context,emscripten_webgl_do_get_current_context:_emscripten_webgl_do_get_current_context,emscripten_webgl_enable_ANGLE_instanced_arrays:_emscripten_webgl_enable_ANGLE_instanced_arrays,emscripten_webgl_enable_OES_vertex_array_object:_emscripten_webgl_enable_OES_vertex_array_object,emscripten_webgl_enable_WEBGL_draw_buffers:_emscripten_webgl_enable_WEBGL_draw_buffers,emscripten_webgl_enable_WEBGL_multi_draw:_emscripten_webgl_enable_WEBGL_multi_draw,emscripten_webgl_enable_extension:_emscripten_webgl_enable_extension,emscripten_webgl_get_context_attributes:_emscripten_webgl_get_context_attributes,emscripten_webgl_get_current_context:_emscripten_webgl_get_current_context,emscripten_webgl_get_drawing_buffer_size:_emscripten_webgl_get_drawing_buffer_size,emscripten_webgl_get_parameter_d:_emscripten_webgl_get_parameter_d,emscripten_webgl_get_parameter_i64v:_emscripten_webgl_get_parameter_i64v,emscripten_webgl_get_parameter_o:_emscripten_webgl_get_parameter_o,emscripten_webgl_get_parameter_utf8:_emscripten_webgl_get_parameter_utf8,emscripten_webgl_get_parameter_v:_emscripten_webgl_get_parameter_v,emscripten_webgl_get_program_info_log_utf8:_emscripten_webgl_get_program_info_log_utf8,emscripten_webgl_get_program_parameter_d:_emscripten_webgl_get_program_parameter_d,emscripten_webgl_get_shader_info_log_utf8:_emscripten_webgl_get_shader_info_log_utf8,emscripten_webgl_get_shader_parameter_d:_emscripten_webgl_get_shader_parameter_d,emscripten_webgl_get_shader_source_utf8:_emscripten_webgl_get_shader_source_utf8,emscripten_webgl_get_supported_extensions:_emscripten_webgl_get_supported_extensions,emscripten_webgl_get_uniform_d:_emscripten_webgl_get_uniform_d,emscripten_webgl_get_uniform_v:_emscripten_webgl_get_uniform_v,emscripten_webgl_get_vertex_attrib_d:_emscripten_webgl_get_vertex_attrib_d,emscripten_webgl_get_vertex_attrib_o:_emscripten_webgl_get_vertex_attrib_o,emscripten_webgl_get_vertex_attrib_v:_emscripten_webgl_get_vertex_attrib_v,emscripten_webgl_make_context_current:_emscripten_webgl_make_context_current,emscripten_wget_data:_emscripten_wget_data,endprotoent:_endprotoent,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_pread:_fd_pread,fd_pwrite:_fd_pwrite,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,filledEllipseColor:_filledEllipseColor,filledEllipseRGBA:_filledEllipseRGBA,getaddrinfo:_getaddrinfo,getentropy:_getentropy,getnameinfo:_getnameinfo,getprotobyname:_getprotobyname,getprotobynumber:_getprotobynumber,getprotoent:_getprotoent,glActiveTexture:_glActiveTexture,glAttachShader:_glAttachShader,glBegin:_glBegin,glBeginQueryEXT:_glBeginQueryEXT,glBindAttribLocation:_glBindAttribLocation,glBindBuffer:_glBindBuffer,glBindFramebuffer:_glBindFramebuffer,glBindRenderbuffer:_glBindRenderbuffer,glBindTexture:_glBindTexture,glBindVertexArray:_glBindVertexArray,glBindVertexArrayOES:_glBindVertexArrayOES,glBlendColor:_glBlendColor,glBlendEquation:_glBlendEquation,glBlendEquationSeparate:_glBlendEquationSeparate,glBlendFunc:_glBlendFunc,glBlendFuncSeparate:_glBlendFuncSeparate,glBufferData:_glBufferData,glBufferSubData:_glBufferSubData,glCheckFramebufferStatus:_glCheckFramebufferStatus,glClear:_glClear,glClearColor:_glClearColor,glClearDepth:_glClearDepth,glClearDepthf:_glClearDepthf,glClearStencil:_glClearStencil,glColorMask:_glColorMask,glCompileShader:_glCompileShader,glCompressedTexImage2D:_glCompressedTexImage2D,glCompressedTexSubImage2D:_glCompressedTexSubImage2D,glCopyTexImage2D:_glCopyTexImage2D,glCopyTexSubImage2D:_glCopyTexSubImage2D,glCreateProgram:_glCreateProgram,glCreateShader:_glCreateShader,glCullFace:_glCullFace,glDeleteBuffers:_glDeleteBuffers,glDeleteFramebuffers:_glDeleteFramebuffers,glDeleteProgram:_glDeleteProgram,glDeleteQueriesEXT:_glDeleteQueriesEXT,glDeleteRenderbuffers:_glDeleteRenderbuffers,glDeleteShader:_glDeleteShader,glDeleteTextures:_glDeleteTextures,glDeleteVertexArrays:_glDeleteVertexArrays,glDeleteVertexArraysOES:_glDeleteVertexArraysOES,glDepthFunc:_glDepthFunc,glDepthMask:_glDepthMask,glDepthRange:_glDepthRange,glDepthRangef:_glDepthRangef,glDetachShader:_glDetachShader,glDisable:_glDisable,glDisableVertexAttribArray:_glDisableVertexAttribArray,glDrawArrays:_glDrawArrays,glDrawArraysInstanced:_glDrawArraysInstanced,glDrawArraysInstancedANGLE:_glDrawArraysInstancedANGLE,glDrawArraysInstancedARB:_glDrawArraysInstancedARB,glDrawArraysInstancedEXT:_glDrawArraysInstancedEXT,glDrawArraysInstancedNV:_glDrawArraysInstancedNV,glDrawBuffers:_glDrawBuffers,glDrawBuffersEXT:_glDrawBuffersEXT,glDrawBuffersWEBGL:_glDrawBuffersWEBGL,glDrawElements:_glDrawElements,glDrawElementsInstanced:_glDrawElementsInstanced,glDrawElementsInstancedANGLE:_glDrawElementsInstancedANGLE,glDrawElementsInstancedARB:_glDrawElementsInstancedARB,glDrawElementsInstancedEXT:_glDrawElementsInstancedEXT,glDrawElementsInstancedNV:_glDrawElementsInstancedNV,glEnable:_glEnable,glEnableVertexAttribArray:_glEnableVertexAttribArray,glEndQueryEXT:_glEndQueryEXT,glFinish:_glFinish,glFlush:_glFlush,glFramebufferRenderbuffer:_glFramebufferRenderbuffer,glFramebufferTexture2D:_glFramebufferTexture2D,glFrontFace:_glFrontFace,glGenBuffers:_glGenBuffers,glGenFramebuffers:_glGenFramebuffers,glGenQueriesEXT:_glGenQueriesEXT,glGenRenderbuffers:_glGenRenderbuffers,glGenTextures:_glGenTextures,glGenVertexArrays:_glGenVertexArrays,glGenVertexArraysOES:_glGenVertexArraysOES,glGenerateMipmap:_glGenerateMipmap,glGetActiveAttrib:_glGetActiveAttrib,glGetActiveUniform:_glGetActiveUniform,glGetAttachedShaders:_glGetAttachedShaders,glGetAttribLocation:_glGetAttribLocation,glGetBooleanv:_glGetBooleanv,glGetBufferParameteriv:_glGetBufferParameteriv,glGetError:_glGetError,glGetFloatv:_glGetFloatv,glGetFramebufferAttachmentParameteriv:_glGetFramebufferAttachmentParameteriv,glGetIntegerv:_glGetIntegerv,glGetProgramInfoLog:_glGetProgramInfoLog,glGetProgramiv:_glGetProgramiv,glGetQueryObjecti64vEXT:_glGetQueryObjecti64vEXT,glGetQueryObjectivEXT:_glGetQueryObjectivEXT,glGetQueryObjectui64vEXT:_glGetQueryObjectui64vEXT,glGetQueryObjectuivEXT:_glGetQueryObjectuivEXT,glGetQueryivEXT:_glGetQueryivEXT,glGetRenderbufferParameteriv:_glGetRenderbufferParameteriv,glGetShaderInfoLog:_glGetShaderInfoLog,glGetShaderPrecisionFormat:_glGetShaderPrecisionFormat,glGetShaderSource:_glGetShaderSource,glGetShaderiv:_glGetShaderiv,glGetString:_glGetString,glGetTexParameterfv:_glGetTexParameterfv,glGetTexParameteriv:_glGetTexParameteriv,glGetUniformLocation:_glGetUniformLocation,glGetUniformfv:_glGetUniformfv,glGetUniformiv:_glGetUniformiv,glGetVertexAttribPointerv:_glGetVertexAttribPointerv,glGetVertexAttribfv:_glGetVertexAttribfv,glGetVertexAttribiv:_glGetVertexAttribiv,glHint:_glHint,glIsBuffer:_glIsBuffer,glIsEnabled:_glIsEnabled,glIsFramebuffer:_glIsFramebuffer,glIsProgram:_glIsProgram,glIsQueryEXT:_glIsQueryEXT,glIsRenderbuffer:_glIsRenderbuffer,glIsShader:_glIsShader,glIsTexture:_glIsTexture,glIsVertexArray:_glIsVertexArray,glIsVertexArrayOES:_glIsVertexArrayOES,glLineWidth:_glLineWidth,glLinkProgram:_glLinkProgram,glLoadIdentity:_glLoadIdentity,glMatrixMode:_glMatrixMode,glMultiDrawArrays:_glMultiDrawArrays,glMultiDrawArraysANGLE:_glMultiDrawArraysANGLE,glMultiDrawArraysInstancedANGLE:_glMultiDrawArraysInstancedANGLE,glMultiDrawArraysInstancedWEBGL:_glMultiDrawArraysInstancedWEBGL,glMultiDrawArraysWEBGL:_glMultiDrawArraysWEBGL,glMultiDrawElements:_glMultiDrawElements,glMultiDrawElementsANGLE:_glMultiDrawElementsANGLE,glMultiDrawElementsInstancedANGLE:_glMultiDrawElementsInstancedANGLE,glMultiDrawElementsInstancedWEBGL:_glMultiDrawElementsInstancedWEBGL,glMultiDrawElementsWEBGL:_glMultiDrawElementsWEBGL,glPixelStorei:_glPixelStorei,glPolygonOffset:_glPolygonOffset,glQueryCounterEXT:_glQueryCounterEXT,glReadPixels:_glReadPixels,glReleaseShaderCompiler:_glReleaseShaderCompiler,glRenderbufferStorage:_glRenderbufferStorage,glSampleCoverage:_glSampleCoverage,glScissor:_glScissor,glShaderBinary:_glShaderBinary,glShaderSource:_glShaderSource,glStencilFunc:_glStencilFunc,glStencilFuncSeparate:_glStencilFuncSeparate,glStencilMask:_glStencilMask,glStencilMaskSeparate:_glStencilMaskSeparate,glStencilOp:_glStencilOp,glStencilOpSeparate:_glStencilOpSeparate,glTexImage2D:_glTexImage2D,glTexParameterf:_glTexParameterf,glTexParameterfv:_glTexParameterfv,glTexParameteri:_glTexParameteri,glTexParameteriv:_glTexParameteriv,glTexSubImage2D:_glTexSubImage2D,glUniform1f:_glUniform1f,glUniform1fv:_glUniform1fv,glUniform1i:_glUniform1i,glUniform1iv:_glUniform1iv,glUniform2f:_glUniform2f,glUniform2fv:_glUniform2fv,glUniform2i:_glUniform2i,glUniform2iv:_glUniform2iv,glUniform3f:_glUniform3f,glUniform3fv:_glUniform3fv,glUniform3i:_glUniform3i,glUniform3iv:_glUniform3iv,glUniform4f:_glUniform4f,glUniform4fv:_glUniform4fv,glUniform4i:_glUniform4i,glUniform4iv:_glUniform4iv,glUniformMatrix2fv:_glUniformMatrix2fv,glUniformMatrix3fv:_glUniformMatrix3fv,glUniformMatrix4fv:_glUniformMatrix4fv,glUseProgram:_glUseProgram,glValidateProgram:_glValidateProgram,glVertexAttrib1f:_glVertexAttrib1f,glVertexAttrib1fv:_glVertexAttrib1fv,glVertexAttrib2f:_glVertexAttrib2f,glVertexAttrib2fv:_glVertexAttrib2fv,glVertexAttrib3f:_glVertexAttrib3f,glVertexAttrib3fv:_glVertexAttrib3fv,glVertexAttrib4f:_glVertexAttrib4f,glVertexAttrib4fv:_glVertexAttrib4fv,glVertexAttribDivisor:_glVertexAttribDivisor,glVertexAttribDivisorANGLE:_glVertexAttribDivisorANGLE,glVertexAttribDivisorARB:_glVertexAttribDivisorARB,glVertexAttribDivisorEXT:_glVertexAttribDivisorEXT,glVertexAttribDivisorNV:_glVertexAttribDivisorNV,glVertexAttribPointer:_glVertexAttribPointer,glVertexPointer:_glVertexPointer,glViewport:_glViewport,glewGetErrorString:_glewGetErrorString,glewGetExtension:_glewGetExtension,glewGetString:_glewGetString,glewInit:_glewInit,glewIsSupported:_glewIsSupported,glutCreateWindow:_glutCreateWindow,glutDestroyWindow:_glutDestroyWindow,glutDisplayFunc:_glutDisplayFunc,glutFullScreen:_glutFullScreen,glutGet:_glutGet,glutGetModifiers:_glutGetModifiers,glutIdleFunc:_glutIdleFunc,glutInit:_glutInit,glutInitDisplayMode:_glutInitDisplayMode,glutInitWindowPosition:_glutInitWindowPosition,glutInitWindowSize:_glutInitWindowSize,glutKeyboardFunc:_glutKeyboardFunc,glutKeyboardUpFunc:_glutKeyboardUpFunc,glutMainLoop:_glutMainLoop,glutMotionFunc:_glutMotionFunc,glutMouseFunc:_glutMouseFunc,glutPassiveMotionFunc:_glutPassiveMotionFunc,glutPositionWindow:_glutPositionWindow,glutPostRedisplay:_glutPostRedisplay,glutReshapeFunc:_glutReshapeFunc,glutReshapeWindow:_glutReshapeWindow,glutSetCursor:_glutSetCursor,glutSpecialFunc:_glutSpecialFunc,glutSpecialUpFunc:_glutSpecialUpFunc,glutSwapBuffers:_glutSwapBuffers,glutTimerFunc:_glutTimerFunc,invoke_di,invoke_dii,invoke_diii,invoke_diiii,invoke_diiiiid,invoke_fi,invoke_fiii,invoke_fiiii,invoke_i,invoke_id,invoke_idd,invoke_idi,invoke_idii,invoke_idiii,invoke_idiiii,invoke_if,invoke_iff,invoke_ifi,invoke_ifii,invoke_ii,invoke_iid,invoke_iidi,invoke_iidii,invoke_iidiii,invoke_iidiiii,invoke_iif,invoke_iifii,invoke_iii,invoke_iiid,invoke_iiidi,invoke_iiidj,invoke_iiii,invoke_iiiid,invoke_iiiidjj,invoke_iiiii,invoke_iiiiid,invoke_iiiiii,invoke_iiiiiid,invoke_iiiiiii,invoke_iiiiiiii,invoke_iiiiiiiii,invoke_iiiiiiiiii,invoke_iiiiiiiiiii,invoke_iiiiiiiiiiii,invoke_iiiiiiiiiiiii,invoke_iiiiiiiiiiiiii,invoke_iiiiiiiiiiiiiiii,invoke_iiiiiiiiiiiiiiiii,invoke_iiiiiiiiiiiiiiiiii,invoke_iiiiiiiiiiji,invoke_iiiiiiiiijiiiiiii,invoke_iiiiiiiij,invoke_iiiiiiiiji,invoke_iiiiiiij,invoke_iiiiiiiji,invoke_iiiiiiijii,invoke_iiiiiiijj,invoke_iiiiiiijji,invoke_iiiiiij,invoke_iiiiiiji,invoke_iiiiiijjiiiii,invoke_iiiiiijjiijjji,invoke_iiiiij,invoke_iiiiiji,invoke_iiiiijii,invoke_iiiiijiii,invoke_iiiiijij,invoke_iiiiijj,invoke_iiiiijjj,invoke_iiiiijjji,invoke_iiiij,invoke_iiiiji,invoke_iiiijii,invoke_iiiijiii,invoke_iiiijj,invoke_iiiijji,invoke_iiiijjii,invoke_iiiijjiii,invoke_iiiijjj,invoke_iiiijjjj,invoke_iiij,invoke_iiiji,invoke_iiijii,invoke_iiijiii,invoke_iiijiiiii,invoke_iiijiiiij,invoke_iiijiiiijj,invoke_iiijiiij,invoke_iiijiiiji,invoke_iiijiiijj,invoke_iiijiij,invoke_iiijiijj,invoke_iiijij,invoke_iiijj,invoke_iiijji,invoke_iiijjii,invoke_iiijjiii,invoke_iiijjiij,invoke_iiijjiiji,invoke_iiijjijjiii,invoke_iiijjj,invoke_iiijjji,invoke_iiijjjj,invoke_iij,invoke_iiji,invoke_iijii,invoke_iijiii,invoke_iijiiii,invoke_iijiiiiij,invoke_iijiiijj,invoke_iijiij,invoke_iijiijj,invoke_iijiji,invoke_iijj,invoke_iijji,invoke_iijjii,invoke_iijjiii,invoke_iijjiiiii,invoke_iijjijj,invoke_iijjj,invoke_iijjjii,invoke_iijjjjj,invoke_ij,invoke_iji,invoke_ijii,invoke_ijji,invoke_ijjiii,invoke_ijjji,invoke_j,invoke_jd,invoke_jf,invoke_ji,invoke_jii,invoke_jiii,invoke_jiiii,invoke_jiiiii,invoke_jiiiiii,invoke_jiiiiiii,invoke_jiiiiijiiii,invoke_jiiiij,invoke_jiiiiji,invoke_jiiiijii,invoke_jiiiijiiii,invoke_jiiij,invoke_jiiiji,invoke_jiiijii,invoke_jiiijiii,invoke_jiiijiijiii,invoke_jiiijj,invoke_jiiijjj,invoke_jiij,invoke_jiiji,invoke_jiijii,invoke_jiijiii,invoke_jiijj,invoke_jiijjjii,invoke_jij,invoke_jiji,invoke_jijiii,invoke_jijiiii,invoke_jijij,invoke_jijj,invoke_jijjij,invoke_jj,invoke_jji,invoke_jjj,invoke_jjjd,invoke_jjjii,invoke_jjjji,invoke_v,invoke_vi,invoke_vid,invoke_viddddi,invoke_vidi,invoke_vidii,invoke_vif,invoke_vifi,invoke_vifii,invoke_vii,invoke_viid,invoke_viidii,invoke_viif,invoke_viii,invoke_viiidi,invoke_viiifi,invoke_viiii,invoke_viiiidiiii,invoke_viiiii,invoke_viiiiii,invoke_viiiiiii,invoke_viiiiiiii,invoke_viiiiiiiii,invoke_viiiiiiiiii,invoke_viiiiiiiiiii,invoke_viiiiiiiiiiii,invoke_viiiiiiiiiiiiiii,invoke_viiiiiiij,invoke_viiiiiiijjjji,invoke_viiiiiij,invoke_viiiiiijii,invoke_viiiiij,invoke_viiiiiji,invoke_viiiiijii,invoke_viiiiijiii,invoke_viiiiijiiii,invoke_viiiiijiijii,invoke_viiiiijj,invoke_viiiiijjii,invoke_viiiiijjji,invoke_viiiij,invoke_viiiiji,invoke_viiiijii,invoke_viiiijiii,invoke_viiiijiiii,invoke_viiiijiiiii,invoke_viiiijiiiiiiii,invoke_viiiijijji,invoke_viiiijj,invoke_viiiijji,invoke_viiiijjij,invoke_viiij,invoke_viiiji,invoke_viiijii,invoke_viiijiii,invoke_viiijiiii,invoke_viiijiiiijjj,invoke_viiijiiijii,invoke_viiijiij,invoke_viiijij,invoke_viiijiji,invoke_viiijijij,invoke_viiijijj,invoke_viiijijjj,invoke_viiijj,invoke_viiijji,invoke_viiijjii,invoke_viiijjiii,invoke_viiijjij,invoke_viiijjj,invoke_viiijjjj,invoke_viiijjjji,invoke_viij,invoke_viiji,invoke_viijii,invoke_viijiii,invoke_viijiiii,invoke_viijiiiii,invoke_viijiiiiii,invoke_viijiiiij,invoke_viijiiij,invoke_viijiiijj,invoke_viijiij,invoke_viijiiji,invoke_viijiijj,invoke_viijij,invoke_viijiji,invoke_viijijiiii,invoke_viijijiiiijjj,invoke_viijijj,invoke_viijj,invoke_viijji,invoke_viijjii,invoke_viijjj,invoke_viijjji,invoke_viijjjji,invoke_vij,invoke_viji,invoke_vijii,invoke_vijiii,invoke_vijiiii,invoke_vijiiiii,invoke_vijiiiiii,invoke_vijiiiiji,invoke_vijiiiji,invoke_vijiij,invoke_vijijiiiijjj,invoke_vijijiij,invoke_vijijj,invoke_vijijjji,invoke_vijj,invoke_vijji,invoke_vijjiii,invoke_vijjij,invoke_vijjj,invoke_vijjji,invoke_vijjjiiji,invoke_vijjjj,invoke_vj,invoke_vji,invoke_vjii,invoke_vjiii,invoke_vjiiii,invoke_vjiiij,invoke_vjiiiji,invoke_vjjii,invoke_vjjijij,lineColor:_lineColor,lineRGBA:_lineRGBA,llvm_eh_typeid_for:_llvm_eh_typeid_for,memory:wasmMemory,pixelRGBA:_pixelRGBA,proc_exit:_proc_exit,pthread_kill:_pthread_kill,random_get:_random_get,rectangleColor:_rectangleColor,rectangleRGBA:_rectangleRGBA,rotozoomSurface:_rotozoomSurface,setNetworkCallback:_setNetworkCallback,setprotoent:_setprotoent,strftime:_strftime,strftime_l:_strftime_l,strptime:_strptime,strptime_l:_strptime_l,uuid_clear:_uuid_clear,uuid_compare:_uuid_compare,uuid_copy:_uuid_copy,uuid_generate:_uuid_generate,uuid_is_null:_uuid_is_null,uuid_parse:_uuid_parse,uuid_type:_uuid_type,uuid_unparse:_uuid_unparse,uuid_unparse_lower:_uuid_unparse_lower,uuid_unparse_upper:_uuid_unparse_upper,uuid_variant:_uuid_variant,zoomSurface:_zoomSurface},wasmExports=createWasm(),_main=Module._main=(e,r)=>(_main=Module._main=wasmExports.main)(e,r),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e),_free=Module._free=e=>(_free=Module._free=wasmExports.free)(e),_duckdb_web_fs_glob_add_path=Module._duckdb_web_fs_glob_add_path=e=>(_duckdb_web_fs_glob_add_path=Module._duckdb_web_fs_glob_add_path=wasmExports.duckdb_web_fs_glob_add_path)(e),_duckdb_web_clear_response=Module._duckdb_web_clear_response=()=>(_duckdb_web_clear_response=Module._duckdb_web_clear_response=wasmExports.duckdb_web_clear_response)(),_duckdb_web_fail_with=Module._duckdb_web_fail_with=e=>(_duckdb_web_fail_with=Module._duckdb_web_fail_with=wasmExports.duckdb_web_fail_with)(e),_duckdb_web_reset=Module._duckdb_web_reset=e=>(_duckdb_web_reset=Module._duckdb_web_reset=wasmExports.duckdb_web_reset)(e),_duckdb_web_connect=Module._duckdb_web_connect=()=>(_duckdb_web_connect=Module._duckdb_web_connect=wasmExports.duckdb_web_connect)(),_duckdb_web_disconnect=Module._duckdb_web_disconnect=e=>(_duckdb_web_disconnect=Module._duckdb_web_disconnect=wasmExports.duckdb_web_disconnect)(e),_duckdb_web_access_buffer=Module._duckdb_web_access_buffer=(e,r)=>(_duckdb_web_access_buffer=Module._duckdb_web_access_buffer=wasmExports.duckdb_web_access_buffer)(e,r),_duckdb_web_flush_files=Module._duckdb_web_flush_files=()=>(_duckdb_web_flush_files=Module._duckdb_web_flush_files=wasmExports.duckdb_web_flush_files)(),_duckdb_web_flush_file=Module._duckdb_web_flush_file=e=>(_duckdb_web_flush_file=Module._duckdb_web_flush_file=wasmExports.duckdb_web_flush_file)(e),_duckdb_web_open=Module._duckdb_web_open=(e,r)=>(_duckdb_web_open=Module._duckdb_web_open=wasmExports.duckdb_web_open)(e,r),_duckdb_web_get_global_file_info=Module._duckdb_web_get_global_file_info=(e,r)=>(_duckdb_web_get_global_file_info=Module._duckdb_web_get_global_file_info=wasmExports.duckdb_web_get_global_file_info)(e,r),_duckdb_web_collect_file_stats=Module._duckdb_web_collect_file_stats=(e,r,t)=>(_duckdb_web_collect_file_stats=Module._duckdb_web_collect_file_stats=wasmExports.duckdb_web_collect_file_stats)(e,r,t),_duckdb_web_export_file_stats=Module._duckdb_web_export_file_stats=(e,r)=>(_duckdb_web_export_file_stats=Module._duckdb_web_export_file_stats=wasmExports.duckdb_web_export_file_stats)(e,r),_duckdb_web_fs_drop_file=Module._duckdb_web_fs_drop_file=(e,r)=>(_duckdb_web_fs_drop_file=Module._duckdb_web_fs_drop_file=wasmExports.duckdb_web_fs_drop_file)(e,r),_duckdb_web_fs_drop_files=Module._duckdb_web_fs_drop_files=e=>(_duckdb_web_fs_drop_files=Module._duckdb_web_fs_drop_files=wasmExports.duckdb_web_fs_drop_files)(e),_duckdb_web_fs_glob_file_infos=Module._duckdb_web_fs_glob_file_infos=(e,r)=>(_duckdb_web_fs_glob_file_infos=Module._duckdb_web_fs_glob_file_infos=wasmExports.duckdb_web_fs_glob_file_infos)(e,r),_duckdb_web_fs_get_file_info_by_id=Module._duckdb_web_fs_get_file_info_by_id=(e,r,t)=>(_duckdb_web_fs_get_file_info_by_id=Module._duckdb_web_fs_get_file_info_by_id=wasmExports.duckdb_web_fs_get_file_info_by_id)(e,r,t),_duckdb_web_fs_get_file_info_by_name=Module._duckdb_web_fs_get_file_info_by_name=(e,r,t)=>(_duckdb_web_fs_get_file_info_by_name=Module._duckdb_web_fs_get_file_info_by_name=wasmExports.duckdb_web_fs_get_file_info_by_name)(e,r,t),_duckdb_web_fs_register_file_url=Module._duckdb_web_fs_register_file_url=(e,r,t,n,a)=>(_duckdb_web_fs_register_file_url=Module._duckdb_web_fs_register_file_url=wasmExports.duckdb_web_fs_register_file_url)(e,r,t,n,a),_duckdb_web_fs_register_file_buffer=Module._duckdb_web_fs_register_file_buffer=(e,r,t,n)=>(_duckdb_web_fs_register_file_buffer=Module._duckdb_web_fs_register_file_buffer=wasmExports.duckdb_web_fs_register_file_buffer)(e,r,t,n),_duckdb_web_copy_file_to_buffer=Module._duckdb_web_copy_file_to_buffer=(e,r)=>(_duckdb_web_copy_file_to_buffer=Module._duckdb_web_copy_file_to_buffer=wasmExports.duckdb_web_copy_file_to_buffer)(e,r),_duckdb_web_copy_file_to_path=Module._duckdb_web_copy_file_to_path=(e,r,t)=>(_duckdb_web_copy_file_to_path=Module._duckdb_web_copy_file_to_path=wasmExports.duckdb_web_copy_file_to_path)(e,r,t),_duckdb_web_get_version=Module._duckdb_web_get_version=e=>(_duckdb_web_get_version=Module._duckdb_web_get_version=wasmExports.duckdb_web_get_version)(e),_duckdb_web_get_feature_flags=Module._duckdb_web_get_feature_flags=()=>(_duckdb_web_get_feature_flags=Module._duckdb_web_get_feature_flags=wasmExports.duckdb_web_get_feature_flags)(),_duckdb_web_tokenize=Module._duckdb_web_tokenize=(e,r)=>(_duckdb_web_tokenize=Module._duckdb_web_tokenize=wasmExports.duckdb_web_tokenize)(e,r),_duckdb_web_udf_scalar_create=Module._duckdb_web_udf_scalar_create=(e,r,t)=>(_duckdb_web_udf_scalar_create=Module._duckdb_web_udf_scalar_create=wasmExports.duckdb_web_udf_scalar_create)(e,r,t),_duckdb_web_prepared_create=Module._duckdb_web_prepared_create=(e,r,t)=>(_duckdb_web_prepared_create=Module._duckdb_web_prepared_create=wasmExports.duckdb_web_prepared_create)(e,r,t),_duckdb_web_prepared_close=Module._duckdb_web_prepared_close=(e,r,t)=>(_duckdb_web_prepared_close=Module._duckdb_web_prepared_close=wasmExports.duckdb_web_prepared_close)(e,r,t),_duckdb_web_prepared_run=Module._duckdb_web_prepared_run=(e,r,t,n)=>(_duckdb_web_prepared_run=Module._duckdb_web_prepared_run=wasmExports.duckdb_web_prepared_run)(e,r,t,n),_duckdb_web_prepared_send=Module._duckdb_web_prepared_send=(e,r,t,n)=>(_duckdb_web_prepared_send=Module._duckdb_web_prepared_send=wasmExports.duckdb_web_prepared_send)(e,r,t,n),_duckdb_web_query_run=Module._duckdb_web_query_run=(e,r,t)=>(_duckdb_web_query_run=Module._duckdb_web_query_run=wasmExports.duckdb_web_query_run)(e,r,t),_duckdb_web_pending_query_start=Module._duckdb_web_pending_query_start=(e,r,t)=>(_duckdb_web_pending_query_start=Module._duckdb_web_pending_query_start=wasmExports.duckdb_web_pending_query_start)(e,r,t),_duckdb_web_pending_query_poll=Module._duckdb_web_pending_query_poll=(e,r,t)=>(_duckdb_web_pending_query_poll=Module._duckdb_web_pending_query_poll=wasmExports.duckdb_web_pending_query_poll)(e,r,t),_duckdb_web_pending_query_cancel=Module._duckdb_web_pending_query_cancel=(e,r)=>(_duckdb_web_pending_query_cancel=Module._duckdb_web_pending_query_cancel=wasmExports.duckdb_web_pending_query_cancel)(e,r),_duckdb_web_query_fetch_results=Module._duckdb_web_query_fetch_results=(e,r)=>(_duckdb_web_query_fetch_results=Module._duckdb_web_query_fetch_results=wasmExports.duckdb_web_query_fetch_results)(e,r),_duckdb_web_get_tablenames=Module._duckdb_web_get_tablenames=(e,r,t)=>(_duckdb_web_get_tablenames=Module._duckdb_web_get_tablenames=wasmExports.duckdb_web_get_tablenames)(e,r,t),_duckdb_web_insert_arrow_from_ipc_stream=Module._duckdb_web_insert_arrow_from_ipc_stream=(e,r,t,n,a)=>(_duckdb_web_insert_arrow_from_ipc_stream=Module._duckdb_web_insert_arrow_from_ipc_stream=wasmExports.duckdb_web_insert_arrow_from_ipc_stream)(e,r,t,n,a),_duckdb_web_insert_csv_from_path=Module._duckdb_web_insert_csv_from_path=(e,r,t,n)=>(_duckdb_web_insert_csv_from_path=Module._duckdb_web_insert_csv_from_path=wasmExports.duckdb_web_insert_csv_from_path)(e,r,t,n),_duckdb_web_insert_json_from_path=Module._duckdb_web_insert_json_from_path=(e,r,t,n)=>(_duckdb_web_insert_json_from_path=Module._duckdb_web_insert_json_from_path=wasmExports.duckdb_web_insert_json_from_path)(e,r,t,n),_duckdb_web_fts_init=Module._duckdb_web_fts_init=e=>(_duckdb_web_fts_init=Module._duckdb_web_fts_init=wasmExports.duckdb_web_fts_init)(e),_duckdb_web_parquet_init=Module._duckdb_web_parquet_init=e=>(_duckdb_web_parquet_init=Module._duckdb_web_parquet_init=wasmExports.duckdb_web_parquet_init)(e),_freeaddrinfo=Module._freeaddrinfo=e=>(_freeaddrinfo=Module._freeaddrinfo=wasmExports.freeaddrinfo)(e),_freeifaddrs=Module._freeifaddrs=e=>(_freeifaddrs=Module._freeifaddrs=wasmExports.freeifaddrs)(e),_pthread_self=Module._pthread_self=()=>(_pthread_self=Module._pthread_self=wasmExports.pthread_self)(),_pthread_atfork=Module._pthread_atfork=(e,r,t)=>(_pthread_atfork=Module._pthread_atfork=wasmExports.pthread_atfork)(e,r,t),_pthread_create=Module._pthread_create=(e,r,t,n)=>(_pthread_create=Module._pthread_create=wasmExports.pthread_create)(e,r,t,n),_pthread_setspecific=Module._pthread_setspecific=(e,r)=>(_pthread_setspecific=Module._pthread_setspecific=wasmExports.pthread_setspecific)(e,r),__embind_initialize_bindings=Module.__embind_initialize_bindings=()=>(__embind_initialize_bindings=Module.__embind_initialize_bindings=wasmExports._embind_initialize_bindings)(),__embind_register_bindings=Module.__embind_register_bindings=e=>(__embind_register_bindings=Module.__embind_register_bindings=wasmExports._embind_register_bindings)(e),__emval_coro_resume=(e,r)=>(__emval_coro_resume=wasmExports._emval_coro_resume)(e,r),_emscripten_GetProcAddress=Module._emscripten_GetProcAddress=e=>(_emscripten_GetProcAddress=Module._emscripten_GetProcAddress=wasmExports.emscripten_GetProcAddress)(e),_emscripten_webgl1_get_proc_address=Module._emscripten_webgl1_get_proc_address=e=>(_emscripten_webgl1_get_proc_address=Module._emscripten_webgl1_get_proc_address=wasmExports.emscripten_webgl1_get_proc_address)(e),_emscripten_webgl_get_proc_address=Module._emscripten_webgl_get_proc_address=e=>(_emscripten_webgl_get_proc_address=Module._emscripten_webgl_get_proc_address=wasmExports.emscripten_webgl_get_proc_address)(e),_emscripten_webgl_init_context_attributes=Module._emscripten_webgl_init_context_attributes=e=>(_emscripten_webgl_init_context_attributes=Module._emscripten_webgl_init_context_attributes=wasmExports.emscripten_webgl_init_context_attributes)(e),_emscripten_is_main_runtime_thread=Module._emscripten_is_main_runtime_thread=()=>(_emscripten_is_main_runtime_thread=Module._emscripten_is_main_runtime_thread=wasmExports.emscripten_is_main_runtime_thread)(),_emscripten_errf=Module._emscripten_errf=(e,r)=>(_emscripten_errf=Module._emscripten_errf=wasmExports.emscripten_errf)(e,r),__emscripten_run_callback_on_thread=Module.__emscripten_run_callback_on_thread=(e,r,t,n,a)=>(__emscripten_run_callback_on_thread=Module.__emscripten_run_callback_on_thread=wasmExports._emscripten_run_callback_on_thread)(e,r,t,n,a),_emscripten_proxy_get_system_queue=Module._emscripten_proxy_get_system_queue=()=>(_emscripten_proxy_get_system_queue=Module._emscripten_proxy_get_system_queue=wasmExports.emscripten_proxy_get_system_queue)(),_emscripten_proxy_sync=Module._emscripten_proxy_sync=(e,r,t,n)=>(_emscripten_proxy_sync=Module._emscripten_proxy_sync=wasmExports.emscripten_proxy_sync)(e,r,t,n),_emscripten_compute_dom_pk_code=Module._emscripten_compute_dom_pk_code=e=>(_emscripten_compute_dom_pk_code=Module._emscripten_compute_dom_pk_code=wasmExports.emscripten_compute_dom_pk_code)(e),_emscripten_dom_pk_code_to_string=Module._emscripten_dom_pk_code_to_string=e=>(_emscripten_dom_pk_code_to_string=Module._emscripten_dom_pk_code_to_string=wasmExports.emscripten_dom_pk_code_to_string)(e),_emscripten_wget=Module._emscripten_wget=(e,r)=>(_emscripten_wget=Module._emscripten_wget=wasmExports.emscripten_wget)(e,r),_emscripten_dom_vk_to_string=Module._emscripten_dom_vk_to_string=e=>(_emscripten_dom_vk_to_string=Module._emscripten_dom_vk_to_string=wasmExports.emscripten_dom_vk_to_string)(e),__emscripten_set_offscreencanvas_size_on_thread=Module.__emscripten_set_offscreencanvas_size_on_thread=(e,r,t,n)=>(__emscripten_set_offscreencanvas_size_on_thread=Module.__emscripten_set_offscreencanvas_size_on_thread=wasmExports._emscripten_set_offscreencanvas_size_on_thread)(e,r,t,n),_emscripten_proxy_async=Module._emscripten_proxy_async=(e,r,t,n)=>(_emscripten_proxy_async=Module._emscripten_proxy_async=wasmExports.emscripten_proxy_async)(e,r,t,n),_emscripten_builtin_malloc=Module._emscripten_builtin_malloc=e=>(_emscripten_builtin_malloc=Module._emscripten_builtin_malloc=wasmExports.emscripten_builtin_malloc)(e),_emscripten_thread_sleep=Module._emscripten_thread_sleep=e=>(_emscripten_thread_sleep=Module._emscripten_thread_sleep=wasmExports.emscripten_thread_sleep)(e),___dl_seterr=(e,r)=>(___dl_seterr=wasmExports.__dl_seterr)(e,r),_pthread_setcancelstate=Module._pthread_setcancelstate=(e,r)=>(_pthread_setcancelstate=Module._pthread_setcancelstate=wasmExports.pthread_setcancelstate)(e,r),_emscripten_dlopen=Module._emscripten_dlopen=(e,r,t,n,a)=>(_emscripten_dlopen=Module._emscripten_dlopen=wasmExports.emscripten_dlopen)(e,r,t,n,a),_emscripten_dlopen_promise=Module._emscripten_dlopen_promise=(e,r)=>(_emscripten_dlopen_promise=Module._emscripten_dlopen_promise=wasmExports.emscripten_dlopen_promise)(e,r),_emscripten_console_logf=Module._emscripten_console_logf=(e,r)=>(_emscripten_console_logf=Module._emscripten_console_logf=wasmExports.emscripten_console_logf)(e,r),_emscripten_console_errorf=Module._emscripten_console_errorf=(e,r)=>(_emscripten_console_errorf=Module._emscripten_console_errorf=wasmExports.emscripten_console_errorf)(e,r),_emscripten_console_warnf=Module._emscripten_console_warnf=(e,r)=>(_emscripten_console_warnf=Module._emscripten_console_warnf=wasmExports.emscripten_console_warnf)(e,r),_emscripten_outf=Module._emscripten_outf=(e,r)=>(_emscripten_outf=Module._emscripten_outf=wasmExports.emscripten_outf)(e,r),_emscripten_fiber_init=Module._emscripten_fiber_init=(e,r,t,n,a,o,_)=>(_emscripten_fiber_init=Module._emscripten_fiber_init=wasmExports.emscripten_fiber_init)(e,r,t,n,a,o,_),_emscripten_fiber_init_from_current_context=Module._emscripten_fiber_init_from_current_context=(e,r,t)=>(_emscripten_fiber_init_from_current_context=Module._emscripten_fiber_init_from_current_context=wasmExports.emscripten_fiber_init_from_current_context)(e,r,t),_emscripten_stack_get_base=Module._emscripten_stack_get_base=()=>(_emscripten_stack_get_base=Module._emscripten_stack_get_base=wasmExports.emscripten_stack_get_base)(),_emscripten_stack_get_end=Module._emscripten_stack_get_end=()=>(_emscripten_stack_get_end=Module._emscripten_stack_get_end=wasmExports.emscripten_stack_get_end)(),_emscripten_get_heap_size=Module._emscripten_get_heap_size=()=>(_emscripten_get_heap_size=Module._emscripten_get_heap_size=wasmExports.emscripten_get_heap_size)(),_emscripten_builtin_memcpy=Module._emscripten_builtin_memcpy=(e,r,t)=>(_emscripten_builtin_memcpy=Module._emscripten_builtin_memcpy=wasmExports.emscripten_builtin_memcpy)(e,r,t),_emscripten_builtin_memset=Module._emscripten_builtin_memset=(e,r,t)=>(_emscripten_builtin_memset=Module._emscripten_builtin_memset=wasmExports.emscripten_builtin_memset)(e,r,t),_emscripten_builtin_free=Module._emscripten_builtin_free=e=>(_emscripten_builtin_free=Module._emscripten_builtin_free=wasmExports.emscripten_builtin_free)(e),_emscripten_builtin_memalign=(e,r)=>(_emscripten_builtin_memalign=wasmExports.emscripten_builtin_memalign)(e,r),_emscripten_scan_stack=Module._emscripten_scan_stack=e=>(_emscripten_scan_stack=Module._emscripten_scan_stack=wasmExports.emscripten_scan_stack)(e),_emscripten_stack_get_current=Module._emscripten_stack_get_current=()=>(_emscripten_stack_get_current=Module._emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),_emscripten_futex_wake=Module._emscripten_futex_wake=(e,r)=>(_emscripten_futex_wake=Module._emscripten_futex_wake=wasmExports.emscripten_futex_wake)(e,r),_pthread_sigmask=Module._pthread_sigmask=(e,r,t)=>(_pthread_sigmask=Module._pthread_sigmask=wasmExports.pthread_sigmask)(e,r,t),_freelocale=Module._freelocale=e=>(_freelocale=Module._freelocale=wasmExports.freelocale)(e),_emscripten_has_threading_support=Module._emscripten_has_threading_support=()=>(_emscripten_has_threading_support=Module._emscripten_has_threading_support=wasmExports.emscripten_has_threading_support)(),_emscripten_num_logical_cores=Module._emscripten_num_logical_cores=()=>(_emscripten_num_logical_cores=Module._emscripten_num_logical_cores=wasmExports.emscripten_num_logical_cores)(),_emscripten_force_num_logical_cores=Module._emscripten_force_num_logical_cores=e=>(_emscripten_force_num_logical_cores=Module._emscripten_force_num_logical_cores=wasmExports.emscripten_force_num_logical_cores)(e),_emscripten_futex_wait=Module._emscripten_futex_wait=(e,r,t)=>(_emscripten_futex_wait=Module._emscripten_futex_wait=wasmExports.emscripten_futex_wait)(e,r,t),_emscripten_main_thread_process_queued_calls=Module._emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=Module._emscripten_main_thread_process_queued_calls=wasmExports.emscripten_main_thread_process_queued_calls)(),_emscripten_current_thread_process_queued_calls=Module._emscripten_current_thread_process_queued_calls=()=>(_emscripten_current_thread_process_queued_calls=Module._emscripten_current_thread_process_queued_calls=wasmExports.emscripten_current_thread_process_queued_calls)(),__emscripten_yield=Module.__emscripten_yield=e=>(__emscripten_yield=Module.__emscripten_yield=wasmExports._emscripten_yield)(e),__emscripten_check_timers=Module.__emscripten_check_timers=e=>(__emscripten_check_timers=Module.__emscripten_check_timers=wasmExports._emscripten_check_timers)(e),_pthread_mutex_init=Module._pthread_mutex_init=(e,r)=>(_pthread_mutex_init=Module._pthread_mutex_init=wasmExports.pthread_mutex_init)(e,r),_pthread_mutex_destroy=Module._pthread_mutex_destroy=e=>(_pthread_mutex_destroy=Module._pthread_mutex_destroy=wasmExports.pthread_mutex_destroy)(e),_pthread_mutex_consistent=Module._pthread_mutex_consistent=e=>(_pthread_mutex_consistent=Module._pthread_mutex_consistent=wasmExports.pthread_mutex_consistent)(e),_pthread_barrier_init=Module._pthread_barrier_init=(e,r,t)=>(_pthread_barrier_init=Module._pthread_barrier_init=wasmExports.pthread_barrier_init)(e,r,t),_pthread_barrier_destroy=Module._pthread_barrier_destroy=e=>(_pthread_barrier_destroy=Module._pthread_barrier_destroy=wasmExports.pthread_barrier_destroy)(e),_pthread_barrier_wait=Module._pthread_barrier_wait=e=>(_pthread_barrier_wait=Module._pthread_barrier_wait=wasmExports.pthread_barrier_wait)(e),_pthread_getspecific=Module._pthread_getspecific=e=>(_pthread_getspecific=Module._pthread_getspecific=wasmExports.pthread_getspecific)(e),_pthread_cond_wait=Module._pthread_cond_wait=(e,r)=>(_pthread_cond_wait=Module._pthread_cond_wait=wasmExports.pthread_cond_wait)(e,r),_pthread_cond_signal=Module._pthread_cond_signal=e=>(_pthread_cond_signal=Module._pthread_cond_signal=wasmExports.pthread_cond_signal)(e),_pthread_cond_broadcast=Module._pthread_cond_broadcast=e=>(_pthread_cond_broadcast=Module._pthread_cond_broadcast=wasmExports.pthread_cond_broadcast)(e),_pthread_cond_init=Module._pthread_cond_init=(e,r)=>(_pthread_cond_init=Module._pthread_cond_init=wasmExports.pthread_cond_init)(e,r),_pthread_cond_destroy=Module._pthread_cond_destroy=e=>(_pthread_cond_destroy=Module._pthread_cond_destroy=wasmExports.pthread_cond_destroy)(e),_pthread_cancel=Module._pthread_cancel=e=>(_pthread_cancel=Module._pthread_cancel=wasmExports.pthread_cancel)(e),_pthread_testcancel=Module._pthread_testcancel=()=>(_pthread_testcancel=Module._pthread_testcancel=wasmExports.pthread_testcancel)(),_pthread_equal=Module._pthread_equal=(e,r)=>(_pthread_equal=Module._pthread_equal=wasmExports.pthread_equal)(e,r),_pthread_mutexattr_init=Module._pthread_mutexattr_init=e=>(_pthread_mutexattr_init=Module._pthread_mutexattr_init=wasmExports.pthread_mutexattr_init)(e),_pthread_mutexattr_setprotocol=Module._pthread_mutexattr_setprotocol=(e,r)=>(_pthread_mutexattr_setprotocol=Module._pthread_mutexattr_setprotocol=wasmExports.pthread_mutexattr_setprotocol)(e,r),_pthread_mutexattr_settype=Module._pthread_mutexattr_settype=(e,r)=>(_pthread_mutexattr_settype=Module._pthread_mutexattr_settype=wasmExports.pthread_mutexattr_settype)(e,r),_pthread_mutexattr_destroy=Module._pthread_mutexattr_destroy=e=>(_pthread_mutexattr_destroy=Module._pthread_mutexattr_destroy=wasmExports.pthread_mutexattr_destroy)(e),_pthread_mutexattr_setpshared=Module._pthread_mutexattr_setpshared=(e,r)=>(_pthread_mutexattr_setpshared=Module._pthread_mutexattr_setpshared=wasmExports.pthread_mutexattr_setpshared)(e,r),_pthread_condattr_init=Module._pthread_condattr_init=e=>(_pthread_condattr_init=Module._pthread_condattr_init=wasmExports.pthread_condattr_init)(e),_pthread_condattr_destroy=Module._pthread_condattr_destroy=e=>(_pthread_condattr_destroy=Module._pthread_condattr_destroy=wasmExports.pthread_condattr_destroy)(e),_pthread_condattr_setclock=Module._pthread_condattr_setclock=(e,r)=>(_pthread_condattr_setclock=Module._pthread_condattr_setclock=wasmExports.pthread_condattr_setclock)(e,r),_pthread_condattr_setpshared=Module._pthread_condattr_setpshared=(e,r)=>(_pthread_condattr_setpshared=Module._pthread_condattr_setpshared=wasmExports.pthread_condattr_setpshared)(e,r),_pthread_getattr_np=Module._pthread_getattr_np=(e,r)=>(_pthread_getattr_np=Module._pthread_getattr_np=wasmExports.pthread_getattr_np)(e,r),_pthread_setcanceltype=Module._pthread_setcanceltype=(e,r)=>(_pthread_setcanceltype=Module._pthread_setcanceltype=wasmExports.pthread_setcanceltype)(e,r),_pthread_rwlock_init=Module._pthread_rwlock_init=(e,r)=>(_pthread_rwlock_init=Module._pthread_rwlock_init=wasmExports.pthread_rwlock_init)(e,r),_pthread_rwlock_destroy=Module._pthread_rwlock_destroy=e=>(_pthread_rwlock_destroy=Module._pthread_rwlock_destroy=wasmExports.pthread_rwlock_destroy)(e),_pthread_rwlock_rdlock=Module._pthread_rwlock_rdlock=e=>(_pthread_rwlock_rdlock=Module._pthread_rwlock_rdlock=wasmExports.pthread_rwlock_rdlock)(e),_pthread_rwlock_tryrdlock=Module._pthread_rwlock_tryrdlock=e=>(_pthread_rwlock_tryrdlock=Module._pthread_rwlock_tryrdlock=wasmExports.pthread_rwlock_tryrdlock)(e),_pthread_rwlock_timedrdlock=Module._pthread_rwlock_timedrdlock=(e,r)=>(_pthread_rwlock_timedrdlock=Module._pthread_rwlock_timedrdlock=wasmExports.pthread_rwlock_timedrdlock)(e,r),_pthread_rwlock_wrlock=Module._pthread_rwlock_wrlock=e=>(_pthread_rwlock_wrlock=Module._pthread_rwlock_wrlock=wasmExports.pthread_rwlock_wrlock)(e),_pthread_rwlock_trywrlock=Module._pthread_rwlock_trywrlock=e=>(_pthread_rwlock_trywrlock=Module._pthread_rwlock_trywrlock=wasmExports.pthread_rwlock_trywrlock)(e),_pthread_rwlock_timedwrlock=Module._pthread_rwlock_timedwrlock=(e,r)=>(_pthread_rwlock_timedwrlock=Module._pthread_rwlock_timedwrlock=wasmExports.pthread_rwlock_timedwrlock)(e,r),_pthread_rwlock_unlock=Module._pthread_rwlock_unlock=e=>(_pthread_rwlock_unlock=Module._pthread_rwlock_unlock=wasmExports.pthread_rwlock_unlock)(e),_pthread_rwlockattr_init=Module._pthread_rwlockattr_init=e=>(_pthread_rwlockattr_init=Module._pthread_rwlockattr_init=wasmExports.pthread_rwlockattr_init)(e),_pthread_rwlockattr_destroy=Module._pthread_rwlockattr_destroy=e=>(_pthread_rwlockattr_destroy=Module._pthread_rwlockattr_destroy=wasmExports.pthread_rwlockattr_destroy)(e),_pthread_rwlockattr_setpshared=Module._pthread_rwlockattr_setpshared=(e,r)=>(_pthread_rwlockattr_setpshared=Module._pthread_rwlockattr_setpshared=wasmExports.pthread_rwlockattr_setpshared)(e,r),_pthread_spin_init=Module._pthread_spin_init=(e,r)=>(_pthread_spin_init=Module._pthread_spin_init=wasmExports.pthread_spin_init)(e,r),_pthread_spin_destroy=Module._pthread_spin_destroy=e=>(_pthread_spin_destroy=Module._pthread_spin_destroy=wasmExports.pthread_spin_destroy)(e),_pthread_spin_lock=Module._pthread_spin_lock=e=>(_pthread_spin_lock=Module._pthread_spin_lock=wasmExports.pthread_spin_lock)(e),_pthread_spin_trylock=Module._pthread_spin_trylock=e=>(_pthread_spin_trylock=Module._pthread_spin_trylock=wasmExports.pthread_spin_trylock)(e),_pthread_spin_unlock=Module._pthread_spin_unlock=e=>(_pthread_spin_unlock=Module._pthread_spin_unlock=wasmExports.pthread_spin_unlock)(e),_pthread_mutex_lock=Module._pthread_mutex_lock=e=>(_pthread_mutex_lock=Module._pthread_mutex_lock=wasmExports.pthread_mutex_lock)(e),_pthread_mutex_unlock=Module._pthread_mutex_unlock=e=>(_pthread_mutex_unlock=Module._pthread_mutex_unlock=wasmExports.pthread_mutex_unlock)(e),_pthread_mutex_trylock=Module._pthread_mutex_trylock=e=>(_pthread_mutex_trylock=Module._pthread_mutex_trylock=wasmExports.pthread_mutex_trylock)(e),_pthread_mutex_timedlock=Module._pthread_mutex_timedlock=(e,r)=>(_pthread_mutex_timedlock=Module._pthread_mutex_timedlock=wasmExports.pthread_mutex_timedlock)(e,r),_emscripten_builtin_pthread_create=Module._emscripten_builtin_pthread_create=(e,r,t,n)=>(_emscripten_builtin_pthread_create=Module._emscripten_builtin_pthread_create=wasmExports.emscripten_builtin_pthread_create)(e,r,t,n),_emscripten_builtin_pthread_join=Module._emscripten_builtin_pthread_join=(e,r)=>(_emscripten_builtin_pthread_join=Module._emscripten_builtin_pthread_join=wasmExports.emscripten_builtin_pthread_join)(e,r),_pthread_join=Module._pthread_join=(e,r)=>(_pthread_join=Module._pthread_join=wasmExports.pthread_join)(e,r),_pthread_key_delete=Module._pthread_key_delete=e=>(_pthread_key_delete=Module._pthread_key_delete=wasmExports.pthread_key_delete)(e),_pthread_key_create=Module._pthread_key_create=(e,r)=>(_pthread_key_create=Module._pthread_key_create=wasmExports.pthread_key_create)(e,r),_pthread_once=Module._pthread_once=(e,r)=>(_pthread_once=Module._pthread_once=wasmExports.pthread_once)(e,r),_pthread_cond_timedwait=Module._pthread_cond_timedwait=(e,r,t)=>(_pthread_cond_timedwait=Module._pthread_cond_timedwait=wasmExports.pthread_cond_timedwait)(e,r,t),_emscripten_builtin_pthread_exit=Module._emscripten_builtin_pthread_exit=e=>(_emscripten_builtin_pthread_exit=Module._emscripten_builtin_pthread_exit=wasmExports.emscripten_builtin_pthread_exit)(e),_pthread_exit=Module._pthread_exit=e=>(_pthread_exit=Module._pthread_exit=wasmExports.pthread_exit)(e),_emscripten_builtin_pthread_detach=Module._emscripten_builtin_pthread_detach=e=>(_emscripten_builtin_pthread_detach=Module._emscripten_builtin_pthread_detach=wasmExports.emscripten_builtin_pthread_detach)(e),_pthread_detach=Module._pthread_detach=e=>(_pthread_detach=Module._pthread_detach=wasmExports.pthread_detach)(e),_emscripten_builtin_mmap=Module._emscripten_builtin_mmap=(e,r,t,n,a,o,_)=>(_emscripten_builtin_mmap=Module._emscripten_builtin_mmap=wasmExports.emscripten_builtin_mmap)(e,r,t,n,a,o,_),_emscripten_builtin_munmap=Module._emscripten_builtin_munmap=(e,r)=>(_emscripten_builtin_munmap=Module._emscripten_builtin_munmap=wasmExports.emscripten_builtin_munmap)(e,r),_em_proxying_queue_create=Module._em_proxying_queue_create=()=>(_em_proxying_queue_create=Module._em_proxying_queue_create=wasmExports.em_proxying_queue_create)(),_em_proxying_queue_destroy=Module._em_proxying_queue_destroy=e=>(_em_proxying_queue_destroy=Module._em_proxying_queue_destroy=wasmExports.em_proxying_queue_destroy)(e),_emscripten_proxy_execute_queue=Module._emscripten_proxy_execute_queue=e=>(_emscripten_proxy_execute_queue=Module._emscripten_proxy_execute_queue=wasmExports.emscripten_proxy_execute_queue)(e),_emscripten_proxy_finish=Module._emscripten_proxy_finish=e=>(_emscripten_proxy_finish=Module._emscripten_proxy_finish=wasmExports.emscripten_proxy_finish)(e),_emscripten_proxy_sync_with_ctx=Module._emscripten_proxy_sync_with_ctx=(e,r,t,n)=>(_emscripten_proxy_sync_with_ctx=Module._emscripten_proxy_sync_with_ctx=wasmExports.emscripten_proxy_sync_with_ctx)(e,r,t,n),_pthread_attr_destroy=Module._pthread_attr_destroy=e=>(_pthread_attr_destroy=Module._pthread_attr_destroy=wasmExports.pthread_attr_destroy)(e),_pthread_attr_getdetachstate=Module._pthread_attr_getdetachstate=(e,r)=>(_pthread_attr_getdetachstate=Module._pthread_attr_getdetachstate=wasmExports.pthread_attr_getdetachstate)(e,r),_pthread_attr_getguardsize=Module._pthread_attr_getguardsize=(e,r)=>(_pthread_attr_getguardsize=Module._pthread_attr_getguardsize=wasmExports.pthread_attr_getguardsize)(e,r),_pthread_attr_getinheritsched=Module._pthread_attr_getinheritsched=(e,r)=>(_pthread_attr_getinheritsched=Module._pthread_attr_getinheritsched=wasmExports.pthread_attr_getinheritsched)(e,r),_pthread_attr_getschedparam=Module._pthread_attr_getschedparam=(e,r)=>(_pthread_attr_getschedparam=Module._pthread_attr_getschedparam=wasmExports.pthread_attr_getschedparam)(e,r),_pthread_attr_getschedpolicy=Module._pthread_attr_getschedpolicy=(e,r)=>(_pthread_attr_getschedpolicy=Module._pthread_attr_getschedpolicy=wasmExports.pthread_attr_getschedpolicy)(e,r),_pthread_attr_getscope=Module._pthread_attr_getscope=(e,r)=>(_pthread_attr_getscope=Module._pthread_attr_getscope=wasmExports.pthread_attr_getscope)(e,r),_pthread_attr_getstack=Module._pthread_attr_getstack=(e,r,t)=>(_pthread_attr_getstack=Module._pthread_attr_getstack=wasmExports.pthread_attr_getstack)(e,r,t),_pthread_attr_getstacksize=Module._pthread_attr_getstacksize=(e,r)=>(_pthread_attr_getstacksize=Module._pthread_attr_getstacksize=wasmExports.pthread_attr_getstacksize)(e,r),_pthread_barrierattr_getpshared=Module._pthread_barrierattr_getpshared=(e,r)=>(_pthread_barrierattr_getpshared=Module._pthread_barrierattr_getpshared=wasmExports.pthread_barrierattr_getpshared)(e,r),_pthread_condattr_getclock=Module._pthread_condattr_getclock=(e,r)=>(_pthread_condattr_getclock=Module._pthread_condattr_getclock=wasmExports.pthread_condattr_getclock)(e,r),_pthread_condattr_getpshared=Module._pthread_condattr_getpshared=(e,r)=>(_pthread_condattr_getpshared=Module._pthread_condattr_getpshared=wasmExports.pthread_condattr_getpshared)(e,r),_pthread_mutexattr_getprotocol=Module._pthread_mutexattr_getprotocol=(e,r)=>(_pthread_mutexattr_getprotocol=Module._pthread_mutexattr_getprotocol=wasmExports.pthread_mutexattr_getprotocol)(e,r),_pthread_mutexattr_getpshared=Module._pthread_mutexattr_getpshared=(e,r)=>(_pthread_mutexattr_getpshared=Module._pthread_mutexattr_getpshared=wasmExports.pthread_mutexattr_getpshared)(e,r),_pthread_mutexattr_getrobust=Module._pthread_mutexattr_getrobust=(e,r)=>(_pthread_mutexattr_getrobust=Module._pthread_mutexattr_getrobust=wasmExports.pthread_mutexattr_getrobust)(e,r),_pthread_mutexattr_gettype=Module._pthread_mutexattr_gettype=(e,r)=>(_pthread_mutexattr_gettype=Module._pthread_mutexattr_gettype=wasmExports.pthread_mutexattr_gettype)(e,r),_pthread_rwlockattr_getpshared=Module._pthread_rwlockattr_getpshared=(e,r)=>(_pthread_rwlockattr_getpshared=Module._pthread_rwlockattr_getpshared=wasmExports.pthread_rwlockattr_getpshared)(e,r),_pthread_attr_init=Module._pthread_attr_init=e=>(_pthread_attr_init=Module._pthread_attr_init=wasmExports.pthread_attr_init)(e),_pthread_attr_setdetachstate=Module._pthread_attr_setdetachstate=(e,r)=>(_pthread_attr_setdetachstate=Module._pthread_attr_setdetachstate=wasmExports.pthread_attr_setdetachstate)(e,r),_pthread_attr_setguardsize=Module._pthread_attr_setguardsize=(e,r)=>(_pthread_attr_setguardsize=Module._pthread_attr_setguardsize=wasmExports.pthread_attr_setguardsize)(e,r),_pthread_attr_setinheritsched=Module._pthread_attr_setinheritsched=(e,r)=>(_pthread_attr_setinheritsched=Module._pthread_attr_setinheritsched=wasmExports.pthread_attr_setinheritsched)(e,r),_pthread_attr_setschedparam=Module._pthread_attr_setschedparam=(e,r)=>(_pthread_attr_setschedparam=Module._pthread_attr_setschedparam=wasmExports.pthread_attr_setschedparam)(e,r),_pthread_attr_setschedpolicy=Module._pthread_attr_setschedpolicy=(e,r)=>(_pthread_attr_setschedpolicy=Module._pthread_attr_setschedpolicy=wasmExports.pthread_attr_setschedpolicy)(e,r),_pthread_attr_setscope=Module._pthread_attr_setscope=(e,r)=>(_pthread_attr_setscope=Module._pthread_attr_setscope=wasmExports.pthread_attr_setscope)(e,r),_pthread_attr_setstack=Module._pthread_attr_setstack=(e,r,t)=>(_pthread_attr_setstack=Module._pthread_attr_setstack=wasmExports.pthread_attr_setstack)(e,r,t),_pthread_attr_setstacksize=Module._pthread_attr_setstacksize=(e,r)=>(_pthread_attr_setstacksize=Module._pthread_attr_setstacksize=wasmExports.pthread_attr_setstacksize)(e,r),_pthread_getconcurrency=Module._pthread_getconcurrency=()=>(_pthread_getconcurrency=Module._pthread_getconcurrency=wasmExports.pthread_getconcurrency)(),_pthread_getcpuclockid=Module._pthread_getcpuclockid=(e,r)=>(_pthread_getcpuclockid=Module._pthread_getcpuclockid=wasmExports.pthread_getcpuclockid)(e,r),_pthread_getschedparam=Module._pthread_getschedparam=(e,r,t)=>(_pthread_getschedparam=Module._pthread_getschedparam=wasmExports.pthread_getschedparam)(e,r,t),_emscripten_main_runtime_thread_id=Module._emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=Module._emscripten_main_runtime_thread_id=wasmExports.emscripten_main_runtime_thread_id)(),_pthread_setconcurrency=Module._pthread_setconcurrency=e=>(_pthread_setconcurrency=Module._pthread_setconcurrency=wasmExports.pthread_setconcurrency)(e),_pthread_setschedprio=Module._pthread_setschedprio=(e,r)=>(_pthread_setschedprio=Module._pthread_setschedprio=wasmExports.pthread_setschedprio)(e,r),_emscripten_get_sbrk_ptr=Module._emscripten_get_sbrk_ptr=()=>(_emscripten_get_sbrk_ptr=Module._emscripten_get_sbrk_ptr=wasmExports.emscripten_get_sbrk_ptr)(),__emscripten_timeout=(e,r)=>(__emscripten_timeout=wasmExports._emscripten_timeout)(e,r),_emscripten_set_thread_name=Module._emscripten_set_thread_name=(e,r)=>(_emscripten_set_thread_name=Module._emscripten_set_thread_name=wasmExports.emscripten_set_thread_name)(e,r),_malloc_trim=Module._malloc_trim=e=>(_malloc_trim=Module._malloc_trim=wasmExports.malloc_trim)(e),_malloc_usable_size=Module._malloc_usable_size=e=>(_malloc_usable_size=Module._malloc_usable_size=wasmExports.malloc_usable_size)(e),_malloc_footprint=Module._malloc_footprint=()=>(_malloc_footprint=Module._malloc_footprint=wasmExports.malloc_footprint)(),_malloc_max_footprint=Module._malloc_max_footprint=()=>(_malloc_max_footprint=Module._malloc_max_footprint=wasmExports.malloc_max_footprint)(),_malloc_footprint_limit=Module._malloc_footprint_limit=()=>(_malloc_footprint_limit=Module._malloc_footprint_limit=wasmExports.malloc_footprint_limit)(),_malloc_set_footprint_limit=Module._malloc_set_footprint_limit=e=>(_malloc_set_footprint_limit=Module._malloc_set_footprint_limit=wasmExports.malloc_set_footprint_limit)(e),_emscripten_longjmp=Module._emscripten_longjmp=(e,r)=>(_emscripten_longjmp=Module._emscripten_longjmp=wasmExports.emscripten_longjmp)(e,r),_emscripten_stack_init=Module._emscripten_stack_init=()=>(_emscripten_stack_init=Module._emscripten_stack_init=wasmExports.emscripten_stack_init)(),_emscripten_stack_set_limits=Module._emscripten_stack_set_limits=(e,r)=>(_emscripten_stack_set_limits=Module._emscripten_stack_set_limits=wasmExports.emscripten_stack_set_limits)(e,r),_emscripten_stack_get_free=Module._emscripten_stack_get_free=()=>(_emscripten_stack_get_free=Module._emscripten_stack_get_free=wasmExports.emscripten_stack_get_free)(),stackSave=()=>(stackSave=wasmExports.stackSave)(),stackRestore=e=>(stackRestore=wasmExports.stackRestore)(e),stackAlloc=e=>(stackAlloc=wasmExports.stackAlloc)(e),__ZTVNSt3__220__shared_ptr_emplaceIN5arrow12NumericArrayINS1_10Time64TypeEEENS_9allocatorIS4_EEEE=Module.__ZTVNSt3__220__shared_ptr_emplaceIN5arrow12NumericArrayINS1_10Time64TypeEEENS_9allocatorIS4_EEEE=1803e3,__ZTSNSt3__210__function6__baseIFvRN6duckdb9DataChunkERNS2_15ExpressionStateERNS2_6VectorEEEE=Module.__ZTSNSt3__210__function6__baseIFvRN6duckdb9DataChunkERNS2_15ExpressionStateERNS2_6VectorEEEE=402e3,__ZTVN6duckdb14CastExpressionE=Module.__ZTVN6duckdb14CastExpressionE=1989e3,__ZTIN6duckdb16SetOperationNodeE=Module.__ZTIN6duckdb16SetOperationNodeE=1992e3,__ZTVN6duckdb26ScalarFunctionCatalogEntryE=Module.__ZTVN6duckdb26ScalarFunctionCatalogEntryE=2016e3,__ZTSN6duckdb22PhysicalRightDelimJoinE=Module.__ZTSN6duckdb22PhysicalRightDelimJoinE=579e3,__ZTIN6duckdb16IEJoinLocalStateE=Module.__ZTIN6duckdb16IEJoinLocalStateE=2046e3,__ZTIN6duckdb19OrderLocalSinkStateE=Module.__ZTIN6duckdb19OrderLocalSinkStateE=2047e3,__ZTIN6duckdb27ProcessRemainingBatchesTaskE=Module.__ZTIN6duckdb27ProcessRemainingBatchesTaskE=2049e3,__ZTSN6duckdb27PhysicalColumnDataScanStateE=Module.__ZTSN6duckdb27PhysicalColumnDataScanStateE=587e3,__ZTIN6duckdb22PhysicalCreateARTIndexE=Module.__ZTIN6duckdb22PhysicalCreateARTIndexE=2053e3,__ZTIZN14duckdb_httplib6detail24prepare_content_receiverINS_8ResponseEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiNSt3__28functionIFbyyEEENSA_IFbPKcmyyEEEbEUlRKSG_E_EEbS7_S8_SG_bT0_EUlSE_myyE0_=Module.__ZTIZN14duckdb_httplib6detail24prepare_content_receiverINS_8ResponseEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiNSt3__28functionIFbyyEEENSA_IFbPKcmyyEEEbEUlRKSG_E_EEbS7_S8_SG_bT0_EUlSE_myyE0_=2059e3,__ZTVN6duckdb18SecretCatalogEntryE=Module.__ZTVN6duckdb18SecretCatalogEntryE=2061e3,__ZTVNSt3__214basic_ofstreamIcNS_11char_traitsIcEEEE=Module.__ZTVNSt3__214basic_ofstreamIcNS_11char_traitsIcEEEE=218e4,__ZTIN6duckdb27StructColumnCheckpointStateE=Module.__ZTIN6duckdb27StructColumnCheckpointStateE=2076e3,__ZTVN5arrow18RunEndEncodedArrayE=Module.__ZTVN5arrow18RunEndEncodedArrayE=2116e3,__ZTIZN5arrow17MakeFormatterImpl5VisitINS_14Decimal256TypeEEENSt3__29enable_ifIXsr19is_binary_like_typeIT_EE5valueENS_6StatusEE4typeERKS5_EUlRKNS_5ArrayExPNS3_13basic_ostreamIcNS3_11char_traitsIcEEEEE_=Module.__ZTIZN5arrow17MakeFormatterImpl5VisitINS_14Decimal256TypeEEENSt3__29enable_ifIXsr19is_binary_like_typeIT_EE5valueENS_6StatusEE4typeERKS5_EUlRKNS_5ArrayExPNS3_13basic_ostreamIcNS3_11char_traitsIcEEEEE_=2122e3,__ZTVN5arrow17DictionaryBuilderINS_8Int8TypeEEE=Module.__ZTVN5arrow17DictionaryBuilderINS_8Int8TypeEEE=2125e3,__ZTVN5arrow8internal21DictionaryBuilderBaseINS_18AdaptiveIntBuilderENS_9Int32TypeEEE=Module.__ZTVN5arrow8internal21DictionaryBuilderBaseINS_18AdaptiveIntBuilderENS_9Int32TypeEEE=2126e3,__ZTIN5arrow14NumericBuilderINS_13HalfFloatTypeEEE=Module.__ZTIN5arrow14NumericBuilderINS_13HalfFloatTypeEEE=2131e3,__ZTVN5arrow10Date64TypeE=Module.__ZTVN5arrow10Date64TypeE=2135e3,__ZTVN5arrow12ArrayVisitorE=Module.__ZTVN5arrow12ArrayVisitorE=214e4,__ZTIN5arrow2io22ReadWriteFileInterfaceE=Module.__ZTIN5arrow2io22ReadWriteFileInterfaceE=2144e3,__ZTIN5arrow7compute11ModeOptionsE=Module.__ZTIN5arrow7compute11ModeOptionsE=216e4,__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE=Module.__ZNSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE=2279e3,__ZTSv=Module.__ZTSv=1802e3;function invoke_ii(e,r){var t=stackSave();try{return getWasmTableEntry(e)(r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_vii(e,r,t){var n=stackSave();try{getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viii(e,r,t,n){var a=stackSave();try{getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiii(e,r,t,n,a){var o=stackSave();try{getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iii(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viiiiii(e,r,t,n,a,o,_){var l=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_dii(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viiiiiii(e,r,t,n,a,o,_,l){var c=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vi(e,r){var t=stackSave();try{getWasmTableEntry(e)(r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_iiiii(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiiii(e,r,t,n,a,o,_){var l=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iiiiiiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiii(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_v(e){var r=stackSave();try{getWasmTableEntry(e)()}catch(t){if(stackRestore(r),t!==t+0)throw t;_setThrew(1,0)}}function invoke_i(e){var r=stackSave();try{return getWasmTableEntry(e)()}catch(t){if(stackRestore(r),t!==t+0)throw t;_setThrew(1,0)}}function invoke_iiiiiiiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiiii(e,r,t,n,a,o){var _=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiiii(e,r,t,n,a,o){var _=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viif(e,r,t,n){var a=stackSave();try{getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viid(e,r,t,n){var a=stackSave();try{getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iid(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m){var g=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f,m)}catch(v){if(stackRestore(g),v!==v+0)throw v;_setThrew(1,0)}}function invoke_vid(e,r,t){var n=stackSave();try{getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iiiiiid(e,r,t,n,a,o,_){var l=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viiiiiiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_di(e,r){var t=stackSave();try{return getWasmTableEntry(e)(r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_vif(e,r,t){var n=stackSave();try{getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iiiiiiiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiiiiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiid(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y){var h=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y)}catch(b){if(stackRestore(h),b!==b+0)throw b;_setThrew(1,0)}}function invoke_iidii(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_fi(e,r){var t=stackSave();try{return getWasmTableEntry(e)(r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_fiii(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_diii(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S){var y=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S)}catch(h){if(stackRestore(y),h!==h+0)throw h;_setThrew(1,0)}}function invoke_iiiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_fiiii(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_diiii(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viddddi(e,r,t,n,a,o,_){var l=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_diiiiid(e,r,t,n,a,o,_){var l=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iiiid(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_idiii(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiidi(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viidii(e,r,t,n,a,o){var _=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iff(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_idd(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v){var S=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f,m,g,v)}catch(y){if(stackRestore(S),y!==y+0)throw y;_setThrew(1,0)}}function invoke_if(e,r){var t=stackSave();try{return getWasmTableEntry(e)(r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_id(e,r){var t=stackSave();try{return getWasmTableEntry(e)(r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_idiiii(e,r,t,n,a,o){var _=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_ifii(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_idii(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_ifi(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_idi(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_vifi(e,r,t,n){var a=stackSave();try{getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_vidi(e,r,t,n){var a=stackSave();try{getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiiidiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iifii(e,r,t,n,a){var o=stackSave();try{return getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iif(e,r,t){var n=stackSave();try{return getWasmTableEntry(e)(r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iidiii(e,r,t,n,a,o){var _=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iidiiii(e,r,t,n,a,o,_){var l=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iidi(e,r,t,n){var a=stackSave();try{return getWasmTableEntry(e)(r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vifii(e,r,t,n,a){var o=stackSave();try{getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_vidii(e,r,t,n,a){var o=stackSave();try{getWasmTableEntry(e)(r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiifi(e,r,t,n,a,o){var _=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiidi(e,r,t,n,a,o){var _=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiid(e,r,t,n,a,o){var _=stackSave();try{return getWasmTableEntry(e)(r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v){var S=stackSave();try{getWasmTableEntry(e)(r,t,n,a,o,_,l,c,u,d,p,f,m,g,v)}catch(y){if(stackRestore(S),y!==y+0)throw y;_setThrew(1,0)}}function invoke_viji(e,r,t,n,a){var o=stackSave();try{Module.dynCall_viji(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_ji(e,r){var t=stackSave();try{return Module.dynCall_ji(e,r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_viiji(e,r,t,n,a,o){var _=stackSave();try{Module.dynCall_viiji(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iij(e,r,t,n){var a=stackSave();try{return Module.dynCall_iij(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iijiijj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iijiijj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiijiijj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiijiijj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viij(e,r,t,n,a){var o=stackSave();try{Module.dynCall_viij(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiijj(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_iiijj(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viiijj(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viiijj(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_jii(e,r,t){var n=stackSave();try{return Module.dynCall_jii(e,r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_vij(e,r,t,n){var a=stackSave();try{Module.dynCall_vij(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiijii(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_iiijii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viijii(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_viijii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iiij(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_iiij(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiij(e,r,t,n,a,o){var _=stackSave();try{Module.dynCall_viiij(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiij(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_iiiij(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viijijj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viijijj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiij(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_iiiiij(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viijiijj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viijiijj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiji(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_iiiji(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiji(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_iiji(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_jiiij(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_jiiij(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiiij(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiiiiij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiji(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_viiiji(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iijiii(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_iijiii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_jj(e,r,t){var n=stackSave();try{return Module.dynCall_jj(e,r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_jiiiii(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_jiiiii(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iijjii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iijjii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iijii(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_iijii(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_vijji(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_vijji(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iiiiijj(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiiijj(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiij(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_viiiij(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viiijii(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viiijii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiijii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiiijii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiijii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiiijii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiijiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiijiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiijii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiiijii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iijiiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iijiiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiijiij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiijiij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijiii(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_vijiii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iijjiiiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iijjiiiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijjiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiijjiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiijjii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiijjii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iijji(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_iijji(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_jiii(e,r,t,n){var a=stackSave();try{return Module.dynCall_jiii(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_vjjii(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_vjjii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viiiiijii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiiiijii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jij(e,r,t,n){var a=stackSave();try{return Module.dynCall_jij(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiiiiiij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiiiiij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijiiiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_vijiiiiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vijiiii(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_vijiiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vijiiiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_vijiiiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iijjiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iijjiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijj(e,r,t,n,a,o){var _=stackSave();try{Module.dynCall_vijj(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiji(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_iiiiji(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_ijji(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_ijji(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viijj(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_viijj(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iiiiiiiji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiiiiiiji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiiji(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiiiiji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vj(e,r,t){var n=stackSave();try{Module.dynCall_vj(e,r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viiiiiij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiiiiij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiijiiiii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viiiijiiiii(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiijiiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viiiijiiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiijjj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiijjj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iijjijj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iijjijj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiiiijiiii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viiiiijiiii(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viijiiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viijiiiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_ij(e,r,t){var n=stackSave();try{return Module.dynCall_ij(e,r,t)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iji(e,r,t,n){var a=stackSave();try{return Module.dynCall_iji(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_jijij(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jijij(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_jjjd(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_jjjd(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_ijii(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_ijii(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_vjii(e,r,t,n,a){var o=stackSave();try{Module.dynCall_vjii(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_vjiiii(e,r,t,n,a,o,_){var l=stackSave();try{Module.dynCall_vjiiii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_jiiii(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_jiiii(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiiiijiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viiiiijiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiiijiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g){var v=stackSave();try{Module.dynCall_viiiijiiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g)}catch(S){if(stackRestore(v),S!==S+0)throw S;_setThrew(1,0)}}function invoke_jjj(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_jjj(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiijjjj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiijjjj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiijjjj(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viiijjjj(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_ijjji(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_ijjji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_j(e){var r=stackSave();try{return Module.dynCall_j(e)}catch(t){if(stackRestore(r),t!==t+0)throw t;_setThrew(1,0)}}function invoke_viijij(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viijij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijjj(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viijjj(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijiiiiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viijiiiiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jjjji(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jjjji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_jjjii(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jjjii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_jji(e,r,t,n){var a=stackSave();try{return Module.dynCall_jji(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_ijjiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_ijjiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijiii(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viijiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiiiijii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiiiiiijii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijii(e,r,t,n,a,o){var _=stackSave();try{Module.dynCall_vijii(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_vjiiiji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_vjiiiji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiiij(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viiiiij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiiji(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viiiiji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iijiji(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iijiji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiijjj(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiijjj(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiijii(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jiijii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_vijjji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_vijjji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vjiiij(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_vjiiij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijjjji(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viijjjji(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiijijj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viiijijj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiijijij(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viiijijij(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiijij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiijij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiij(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_jiij(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiijiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiiiijiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiiiii(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jiiiiii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_iiiijiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiijiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiiiiij(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiiiiiij(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viijji(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_viijji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiijjij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viiijjij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijijiij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_vijijiij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viijiiiij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viijiiiij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiijiiiijjj(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v){var S=stackSave();try{Module.dynCall_viiijiiiijjj(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v)}catch(y){if(stackRestore(S),y!==y+0)throw y;_setThrew(1,0)}}function invoke_viijijiiiijjj(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y){var h=stackSave();try{Module.dynCall_viijijiiiijjj(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y)}catch(b){if(stackRestore(h),b!==b+0)throw b;_setThrew(1,0)}}function invoke_viiijiij(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiijiij(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiijiijiii(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{return Module.dynCall_jiiijiijiii(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viijijiiii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viijijiiii(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiiijii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jiiijii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iijjj(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iijjj(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiijj(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiiijj(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiijji(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiijji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vijijiiiijjj(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S){var y=stackSave();try{Module.dynCall_vijijiiiijjj(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S)}catch(h){if(stackRestore(y),h!==h+0)throw h;_setThrew(1,0)}}function invoke_jiiiij(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jiiiij(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viiiijj(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiiijj(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiiji(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_jiiji(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiiiijj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiiiijj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiiiji(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jiiiiji(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiijijji(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{Module.dynCall_viiiijijji(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viiiijjij(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viiiijjij(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiijiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiijiiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiijiiijii(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{Module.dynCall_viiijiiijii(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vijjj(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_vijjj(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vijijj(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_vijijj(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijjji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viijjji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jd(e,r){var t=stackSave();try{return Module.dynCall_jd(e,r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_jf(e,r){var t=stackSave();try{return Module.dynCall_jf(e,r)}catch(n){if(stackRestore(t),n!==n+0)throw n;_setThrew(1,0)}}function invoke_jiijiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jiijiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiiijjii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viiiiijjii(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiiiijii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viiiiiijii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiiiiiijjjji(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S){var y=stackSave();try{Module.dynCall_viiiiiiijjjji(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S)}catch(h){if(stackRestore(y),h!==h+0)throw h;_setThrew(1,0)}}function invoke_vji(e,r,t,n){var a=stackSave();try{Module.dynCall_vji(e,r,t,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiijjiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_viiijjiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vjiii(e,r,t,n,a,o){var _=stackSave();try{Module.dynCall_vjiii(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iijj(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_iijj(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_jiiijj(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jiiijj(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_jiiijiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_jiiijiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiiiiijiiii(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_jiiiiijiiii(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiiiijii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_jiiiijii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijjii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viijjii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiijjiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiiijjiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiiiij(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiiiiiiij(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiiiji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiiiiji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiijjjj(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_iiiijjjj(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iijiiiiij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iijiiiiij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiijjiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g){var v=stackSave();try{return Module.dynCall_iiiiiijjiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g)}catch(S){if(stackRestore(v),S!==S+0)throw S;_setThrew(1,0)}}function invoke_iijjjjj(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_iijjjjj(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiidj(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_iiidj(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiiiiiiiji(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{return Module.dynCall_iiiiiiiiiiji(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_iiiiiiijj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiiiiiijj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiijji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiijji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiiijjj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_jiiijjj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiijij(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiiiijij(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiiiiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jiiiiiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_jiijj(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jiijj(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_viiiiiji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiiiiji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiijiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiijiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiiiiiiijiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y){var h=stackSave();try{return Module.dynCall_iiiiiiiiijiiiiiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y)}catch(b){if(stackRestore(h),b!==b+0)throw b;_setThrew(1,0)}}function invoke_iiijjiiji(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_iiijjiiji(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiijjiij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiijjiij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiidjj(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_iiiidjj(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiijjj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiiijjj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiiiiiji(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiiiiiiiji(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijiiiij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiijiiiij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijiiij(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiijiiij(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiijji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viiijji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiiiijiiii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_jiiiijiiii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jiijjjii(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_jiijjjii(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiiijji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiiijji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiijij(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iiijij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_jiiiji(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jiiiji(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_vjjijij(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_vjjijij(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viijiiji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viijiiji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiijjijjiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g){var v=stackSave();try{return Module.dynCall_iiijjijjiii(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g)}catch(S){if(stackRestore(v),S!==S+0)throw S;_setThrew(1,0)}}function invoke_iiiijjii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiiijjii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiiijjiijjji(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y,h){var b=stackSave();try{return Module.dynCall_iiiiiijjiijjji(e,r,t,n,a,o,_,l,c,u,d,p,f,m,g,v,S,y,h)}catch(w){if(stackRestore(b),w!==w+0)throw w;_setThrew(1,0)}}function invoke_viiijjii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiijjii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viijiiij(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viijiiij(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vijiiiji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_vijiiiji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jijiii(e,r,t,n,a,o,_){var l=stackSave();try{return Module.dynCall_jijiii(e,r,t,n,a,o,_)}catch(c){if(stackRestore(l),c!==c+0)throw c;_setThrew(1,0)}}function invoke_jijjij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{return Module.dynCall_jijjij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijiij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viijiij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiijiiiji(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiijiiiji(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iijiij(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_iijiij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vijjij(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_vijjij(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiijiji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiijiji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jijiiii(e,r,t,n,a,o,_,l){var c=stackSave();try{return Module.dynCall_jijiiii(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiijjj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iiiiijjj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiiijji(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_iiiiiiijji(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iijjjii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iijjjii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiijjji(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_iiiiijjji(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jijj(e,r,t,n,a,o){var _=stackSave();try{return Module.dynCall_jijj(e,r,t,n,a,o)}catch(l){if(stackRestore(_),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiijjji(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiijjji(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiiijjji(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{Module.dynCall_viiiiijjji(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_iiijiiiijj(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{return Module.dynCall_iiijiiiijj(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viiijijjj(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{Module.dynCall_viiijijjj(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vijijjji(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_vijijjji(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_vijiij(e,r,t,n,a,o,_,l){var c=stackSave();try{Module.dynCall_vijiij(e,r,t,n,a,o,_,l)}catch(u){if(stackRestore(c),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iijiiijj(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{return Module.dynCall_iijiiijj(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijiiijj(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{return Module.dynCall_iiijiiijj(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiijjjji(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{Module.dynCall_viiijjjji(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vijjjj(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_vijjjj(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiiijiijii(e,r,t,n,a,o,_,l,c,u,d,p,f,m){var g=stackSave();try{Module.dynCall_viiiiijiijii(e,r,t,n,a,o,_,l,c,u,d,p,f,m)}catch(v){if(stackRestore(g),v!==v+0)throw v;_setThrew(1,0)}}function invoke_viijiji(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viijiji(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijiiijj(e,r,t,n,a,o,_,l,c,u,d,p){var f=stackSave();try{Module.dynCall_viijiiijj(e,r,t,n,a,o,_,l,c,u,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiji(e,r,t,n,a){var o=stackSave();try{return Module.dynCall_jiji(e,r,t,n,a)}catch(_){if(stackRestore(o),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiijiiiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{return Module.dynCall_iiijiiiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vijjjiiji(e,r,t,n,a,o,_,l,c,u,d,p,f){var m=stackSave();try{Module.dynCall_vijjjiiji(e,r,t,n,a,o,_,l,c,u,d,p,f)}catch(g){if(stackRestore(m),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vijiiiiji(e,r,t,n,a,o,_,l,c,u,d){var p=stackSave();try{Module.dynCall_vijiiiiji(e,r,t,n,a,o,_,l,c,u,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiiijiii(e,r,t,n,a,o,_,l,c,u){var d=stackSave();try{Module.dynCall_viiiijiii(e,r,t,n,a,o,_,l,c,u)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viijiiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_viijiiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijjiii(e,r,t,n,a,o,_,l,c){var u=stackSave();try{Module.dynCall_vijjiii(e,r,t,n,a,o,_,l,c)}catch(d){if(stackRestore(u),d!==d+0)throw d;_setThrew(1,0)}}function applySignatureConversions(e){e=Object.assign({},e);var r=_=>(l,c,u)=>_(l,c,u)>>>0,t=_=>l=>_(l)>>>0,n=_=>()=>_()>>>0,a=_=>(l,c)=>_(l,c)>>>0,o=_=>l=>_(l)>>>0;return e.memcpy=r(e.memcpy),e.malloc=t(e.malloc),e.__errno_location=n(e.__errno_location),e.pthread_self=n(e.pthread_self),e.__getTypeName=t(e.__getTypeName),e.emscripten_builtin_malloc=t(e.emscripten_builtin_malloc),e.emscripten_stack_get_base=n(e.emscripten_stack_get_base),e.emscripten_stack_get_end=n(e.emscripten_stack_get_end),e.emscripten_builtin_memalign=a(e.emscripten_builtin_memalign),e.emscripten_stack_get_current=n(e.emscripten_stack_get_current),e.emscripten_main_runtime_thread_id=n(e.emscripten_main_runtime_thread_id),e.sbrk=o(e.sbrk),e.memalign=a(e.memalign),e.stackSave=n(e.stackSave),e.stackAlloc=t(e.stackAlloc),e}Module.stackAlloc=stackAlloc,Module.stackSave=stackSave,Module.stackRestore=stackRestore,Module.ccall=ccall;var calledRun;dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)};function callMain(e=[]){var r=resolveGlobalSymbol("main").sym;if(r){e.unshift(thisProgram);var t=e.length,n=stackAlloc((t+1)*4),a=n;e.forEach(_=>{HEAPU32[a>>>2>>>0]=stringToUTF8OnStack(_),a+=4}),HEAPU32[a>>>2>>>0]=0;try{var o=r(t,n);return exitJS(o,!0),o}catch(_){return handleException(_)}}}function run(e=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function r(){calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),readyPromiseResolve(Module),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),r()},1)):r()}if(Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),moduleArg.ready}})();typeof exports=="object"&&typeof module=="object"?module.exports=DuckDB:typeof define=="function"&&define.amd&&define([],()=>DuckDB)});var lr=ee((exports,module)=>{"use strict";var DuckDB=(()=>{var _scriptDir=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(_scriptDir||(_scriptDir=__filename)),function(moduleArg={}){var Module=moduleArg,readyPromiseResolve,readyPromiseReject;Module.ready=new Promise((e,r)=>{readyPromiseResolve=e,readyPromiseReject=r});var moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,r)=>{throw r},ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER,scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=_e(),nodePath=le();ENVIRONMENT_IS_WORKER?scriptDirectory=nodePath.dirname(scriptDirectory)+"/":scriptDirectory=__dirname+"/",read_=(e,r)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFileSync(e,r?void 0:"utf8")),readBinary=e=>{var r=read_(e,!0);return r.buffer||(r=new Uint8Array(r)),r},readAsync=(e,r,t,n=!0)=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e),fs.readFile(e,n?void 0:"utf8",(a,o)=>{a?t(a):r(n?o.buffer:o)})},!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=(e,r)=>{throw process.exitCode=e,r}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptDir&&(scriptDirectory=_scriptDir),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),read_=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),readAsync=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{if(n.status==200||n.status==0&&n.response){r(n.response);return}t()},n.onerror=t,n.send(null)});var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary;Module.wasmBinary&&(wasmBinary=Module.wasmBinary),typeof WebAssembly!="object"&&abort("no native wasm support detected");var wasmMemory,ABORT=!1,EXITSTATUS;function assert(e,r){e||abort(r)}var HEAP,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}var INITIAL_MEMORY=Module.INITIAL_MEMORY||16777216;Module.wasmMemory?wasmMemory=Module.wasmMemory:wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:65536}),updateMemoryViews(),INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),!Module.noFSInit&&!FS.init.initialized&&FS.init(),FS.ignorePermissions=!1,TTY.init(),SOCKFS.root=FS.mount(SOCKFS,{},null),PIPEFS.root=FS.mount(PIPEFS,{},null),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPreMain(e){__ATMAIN__.unshift(e)}function addOnExit(e){}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){var r;runDependencies++,(r=Module.monitorRunDependencies)==null||r.call(Module,runDependencies)}function removeRunDependency(e){var t;if(runDependencies--,(t=Module.monitorRunDependencies)==null||t.call(Module,runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}function abort(e){var t;(t=Module.onAbort)==null||t.call(Module,e),e="Aborted("+e+")",err(e),ABORT=!0,EXITSTATUS=1,e+=". Build with -sASSERTIONS for more info.",runtimeInitialized&&___trap();var r=new WebAssembly.RuntimeError(e);throw readyPromiseReject(r),r}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://"),wasmBinaryFile;wasmBinaryFile="./duckdb-eh.wasm",isDataURI(wasmBinaryFile)||(wasmBinaryFile=locateFile(wasmBinaryFile));function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(r=>{if(!r.ok)throw"failed to load wasm binary file at '".concat(e,"'");return r.arrayBuffer()}).catch(()=>getBinarySync(e)):Promise.resolve().then(()=>getBinarySync(e))}function instantiateArrayBuffer(e,r,t){return getBinaryPromise(e).then(n=>WebAssembly.instantiate(n,r)).then(t,n=>{err("failed to asynchronously prepare wasm: ".concat(n)),abort(n)})}function instantiateAsync(e,r,t,n){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(r)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(r,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,t);return o.then(n,function(_){return err("wasm streaming compile failed: ".concat(_)),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(r,t,n)})}):instantiateArrayBuffer(r,t,n)}function createWasm(){var e={env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)};function r(n,a){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var o=getDylinkMetadata(a);return o.neededDynlibs&&(dynamicLibraries=o.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports,"main"),LDSO.init(),loadDylibs(),wasmExports=applySignatureConversions(wasmExports),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency("wasm-instantiate"),wasmExports}addRunDependency("wasm-instantiate");function t(n){r(n.instance,n.module)}if(Module.instantiateWasm)try{return Module.instantiateWasm(e,r)}catch(n){err("Module.instantiateWasm callback failed with error: ".concat(n)),readyPromiseReject(n)}return instantiateAsync(wasmBinary,wasmBinaryFile,e,t).catch(readyPromiseReject),{}}var tempDouble,tempI64,ASM_CONSTS={2197664:(e,r)=>{var t=typeof runtime=="object"&&runtime&&typeof runtime.whereToLoad=="function"&&runtime.whereToLoad?runtime.whereToLoad(UTF8ToString(e)):UTF8ToString(r),n=lengthBytesUTF8(t)+1,a=_malloc(n);return stringToUTF8(t,a,n),a},2198030:(e,r)=>{var t=UTF8ToString(e);if(typeof XMLHttpRequest>"u"){let y=He(),h=le(),b=_e();var n=t.split("/"),a=n.length,o=h.join(y.homedir(),".duckdb/extensions/"+n[a-4]+"/"+n[a-3]+"/"+n[a-2]+"/"),_=h.join(o,n[a-1]);try{if(b.existsSync(o)||b.mkdirSync(o,{recursive:!0}),b.existsSync(_))u=b.readFileSync(_);else{let w=new Int32Array(new SharedArrayBuffer(8));var l=Y("node:worker_threads").Worker,c=new l("const {Worker,isMainThread,parentPort,workerData,} = require('node:worker_threads');var times = 0;var SAB = 23;var Z = 0;async function ZZZ(e) {var x = await fetch(e);var res = await x.arrayBuffer();Atomics.store(SAB, 1, res.byteLength);Atomics.store(SAB, 0, 1);Atomics.notify(SAB, 1);Atomics.notify(SAB, 0);Z = res;};parentPort.on('message', function(event) {if (times == 0) {times++;SAB = event;} else if (times == 1) {times++;ZZZ(event);} else {const a = new Uint8Array(Z);const b = new Uint8Array(event.buffer);var K = Z.byteLength;for (var i = 0; i < K; i++) {b[i] = a[i];}Atomics.notify(event, 0);Atomics.store(SAB, 0, 2);Atomics.notify(SAB, 0);}});",{eval:!0}),u;w[0]=0,w[2]=4,c.postMessage(w),c.postMessage(t),Atomics.wait(w,0,0);let k=new Int32Array(new SharedArrayBuffer(w[1]+3-(w[1]+3)%4));c.postMessage(k),Atomics.wait(w,0,1);var d=new Uint8Array(k.buffer,0,w[1]);u=d,c.terminate(),b.writeFileSync(_,u)}}catch(w){return console.log("Error fetching module",w),0}}else{let y=new XMLHttpRequest;if(y.open("GET",t,!1),y.responseType="arraybuffer",y.send(null),y.status!=200)return 0;u=y.response}for(var p=WebAssembly.validate(u),f=u.byteLength,m=_malloc(f+4),g=new Uint8Array(u),v=0;v{if(!e)return AL.alcErr=40964,1},2200718:e=>{if(!AL.currentCtx)return err("alGetProcAddress() called without a valid context"),1;if(!e)return AL.currentCtx.err=40963,1}};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit(".concat(e,")"),this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,r){var t=GOT[r];return t||(t=GOT[r]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(r)||(t.required=!0),t}},callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,UTF8ArrayToString=(e,r,t)=>{r>>>=0;for(var n=r+t,a=r;e[a]&&!(a>=n);)++a;if(a-r>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(r,a));for(var o="";r>10,56320|u&1023)}}return o},getDylinkMetadata=e=>{var r=0,t=0;function n(){return e[r++]}function a(){for(var T=0,M=1;;){var C=e[r++];if(T+=(C&127)*M,M*=128,!(C&128))break}return T}function o(){var T=a();return r+=T,UTF8ArrayToString(e,r-T,T)}function _(T,M){if(T)throw new Error(M)}var l="dylink.0";if(e instanceof WebAssembly.Module){var c=WebAssembly.Module.customSections(e,l);c.length===0&&(l="dylink",c=WebAssembly.Module.customSections(e,l)),_(c.length===0,"need dylink section"),e=new Uint8Array(c[0]),t=e.length}else{var u=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),d=u[0]==1836278016;_(!d,"need to see wasm magic number"),_(e[8]!==0,"need the dylink section to be first"),r=9;var p=a();t=r+p,l=o()}var f={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(l=="dylink"){f.memorySize=a(),f.memoryAlign=a(),f.tableSize=a(),f.tableAlign=a();for(var m=a(),g=0;g>>0];case"i8":return HEAP8[e>>>0];case"i16":return HEAP16[e>>>1>>>0];case"i32":return HEAP32[e>>>2>>>0];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[e>>>2>>>0];case"double":return HEAPF64[e>>>3>>>0];case"*":return HEAPU32[e>>>2>>>0];default:abort("invalid type for getValue: ".concat(r))}}var newDSO=(e,r,t)=>{var n={refcount:1/0,name:e,exports:t,global:!0};return LDSO.loadedLibsByName[e]=n,r!=null&&(LDSO.loadedLibsByHandle[r]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=2352736,zeroMemory=(e,r)=>(HEAPU8.fill(0,e,e+r),e),alignMemory=(e,r)=>Math.ceil(e/r)*r,getMemory=e=>{if(runtimeInitialized)return zeroMemory(_malloc(e),e);var r=___heap_base,t=r+alignMemory(e,16);return ___heap_base=t,GOT.__heap_base.value=t,r},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:e[0]=="v"?[]:[r[e[0]]]},n=1;n{var t=e.slice(0,1),n=e.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),uleb128Encode(n.length,r);for(var o=0;o{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(r),e);var t=[1];generateFuncType(r,t);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(t.length,n),n.push(...t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n)),o=new WebAssembly.Instance(a,{e:{f:e}}),_=o.exports.f;return _},wasmTable=new WebAssembly.Table({initial:23165,element:"anyfunc"}),getWasmTableEntry=e=>wasmTable.get(e),updateTableMap=(e,r)=>{if(functionsInTableMap)for(var t=e;t(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return wasmTable.length-1},setWasmTableEntry=(e,r)=>wasmTable.set(e,r),addFunction=(e,r)=>{var t=getFunctionAddress(e);if(t)return t;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(o){if(!(o instanceof TypeError))throw o;var a=convertJsFunctionToWasm(e,r);setWasmTableEntry(n,a)}return functionsInTableMap.set(e,n),n},updateGOT=(e,r)=>{for(var t in e)if(!isInternalSym(t)){var n=e[t];t.startsWith("orig$")&&(t=t.split("$")[1],r=!0),GOT[t]||(GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),(r||GOT[t].value==0)&&(typeof n=="function"?GOT[t].value=addFunction(n):typeof n=="number"?GOT[t].value=n:err("unhandled export type for '".concat(t,"': ").concat(typeof n)))}},relocateExports=(e,r,t)=>{var n={};for(var a in e){var o=e[a];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=r),n[a]=o}return updateGOT(n,t),n},isSymbolDefined=e=>{var r=wasmImports[e];return!(!r||r.stub)},resolveGlobalSymbol=(e,r=!1)=>{var t;return r&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)&&(t=wasmImports[e]),{sym:t,name:e}},UTF8ToString=(e,r)=>(e>>>=0,e?UTF8ArrayToString(HEAPU8,e,r):""),loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8>>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8>>>0]=1,HEAPU32[handle+12>>>2>>>0]=memoryBase,HEAP32[handle+16>>>2>>>0]=metadata.memorySize,HEAPU32[handle+20>>>2>>>0]=tableBase,HEAP32[handle+24>>>2>>>0]=metadata.tableSize)}else memoryBase=HEAPU32[handle+12>>>2>>>0],tableBase=HEAPU32[handle+20>>>2>>>0];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(e){var r=resolveGlobalSymbol(e).sym;return!r&&localScope&&(r=localScope[e]),r||(r=moduleExports[e]),r}var proxyHandler={get(e,r){switch(r){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(r in wasmImports&&!wasmImports[r].stub)return wasmImports[r];if(!(r in e)){var t;e[r]=(...n)=>(t||(t=resolveSymbol(r)),t(...n))}return e[r]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func="(".concat(args,") => { ").concat(body," };");ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start ").concat(body,";");moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(e=>postInstantiation(e.module,e.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags.loadAsync?metadata.neededDynlibs.reduce((e,r)=>e.then(()=>loadDynamicLibrary(r,flags)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,r)=>{for(var[t,n]of Object.entries(e))(o=>{isSymbolDefined(o)||(wasmImports[o]=n)})(t),t.startsWith("dynCall_")&&!Module.hasOwnProperty(t)&&(Module[t]=n)},asyncLoad=(e,r,t,n)=>{var a=n?"":"al ".concat(e);readAsync(e,o=>{r(new Uint8Array(o)),a&&removeRunDependency(a)},o=>{if(t)t();else throw'Loading data file "'.concat(e,'" failed.')}),a&&addRunDependency(a)},preloadPlugins=Module.preloadPlugins||[],registerWasmPlugin=()=>{var e={promiseChainEnd:Promise.resolve(),canHandle:r=>!Module.noWasmDecoding&&r.endsWith(".so"),handle:(r,t,n,a)=>{e.promiseChainEnd=e.promiseChainEnd.then(()=>loadWebAssemblyModule(r,{loadAsync:!0,nodelete:!0},t)).then(o=>{preloadedWasm[t]=o,n(r)},o=>{err("failed to instantiate wasm: ".concat(t,": ").concat(o)),a()})}};preloadPlugins.push(e)},preloadedWasm={};function loadDynamicLibrary(e,r={global:!0,nodelete:!0},t,n){var a=LDSO.loadedLibsByName[e];if(a)return r.global?a.global||(a.global=!0,mergeLibSymbols(a.exports,e)):t&&Object.assign(t,a.exports),r.nodelete&&a.refcount!==1/0&&(a.refcount=1/0),a.refcount++,n&&(LDSO.loadedLibsByHandle[n]=a),r.loadAsync?Promise.resolve(!0):!0;a=newDSO(e,n,"loading"),a.refcount=r.nodelete?1/0:1,a.global=r.global;function o(){if(n){var c=HEAPU32[n+28>>>2>>>0],u=HEAPU32[n+32>>>2>>>0];if(c&&u){var d=HEAP8.slice(c,c+u);return r.loadAsync?Promise.resolve(d):d}}var p=locateFile(e);if(r.loadAsync)return new Promise(function(f,m){asyncLoad(p,f,m)});if(!readBinary)throw new Error("".concat(p,": file not found, and synchronous loading of external files is not available"));return readBinary(p)}function _(){var c=preloadedWasm[e];return c?r.loadAsync?Promise.resolve(c):c:r.loadAsync?o().then(u=>loadWebAssemblyModule(u,r,e,t,n)):loadWebAssemblyModule(o(),r,e,t,n)}function l(c){a.global?mergeLibSymbols(c,e):t&&Object.assign(t,c),a.exports=c}return r.loadAsync?_().then(c=>(l(c),!0)):(l(_()),!0)}var reportUndefinedSymbols=()=>{for(var[e,r]of Object.entries(GOT))if(r.value==0){var t=resolveGlobalSymbol(e,!0).sym;if(!t&&!r.required)continue;if(typeof t=="function")r.value=addFunction(t,t.sig);else if(typeof t=="number")r.value=t;else throw new Error("bad export type for '".concat(e,"': ").concat(typeof t))}},loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency("loadDylibs"),dynamicLibraries.reduce((e,r)=>e.then(()=>loadDynamicLibrary(r,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency("loadDylibs")})},noExitRuntime=Module.noExitRuntime||!0;function setValue(e,r,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":HEAP8[e>>>0]=r;break;case"i8":HEAP8[e>>>0]=r;break;case"i16":HEAP16[e>>>1>>>0]=r;break;case"i32":HEAP32[e>>>2>>>0]=r;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[e>>>2>>>0]=r;break;case"double":HEAPF64[e>>>3>>>0]=r;break;case"*":HEAPU32[e>>>2>>>0]=r;break;default:abort("invalid type for setValue: ".concat(t))}}function __ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e){return wasmImports._ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e)}__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm.stub=!0;var convertI32PairToI53Checked=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+r*4294967296:NaN;function ___assert_fail(e,r,t,n){e>>>=0,r>>>=0,n>>>=0,abort("Assertion failed: ".concat(UTF8ToString(e),", at: ")+[r?UTF8ToString(r):"unknown filename",t,n?UTF8ToString(n):"unknown function"])}___assert_fail.sig="vppip";var ___c_longjmp=new WebAssembly.Tag({parameters:["i32"]});function ___call_sighandler(e,r){return e>>>=0,getWasmTableEntry(e)(r)}___call_sighandler.sig="vpi";var ___cpp_exception=new WebAssembly.Tag({parameters:["i32"]}),___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=2352736,___stack_low=2287200,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},2352736),PATH={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return r.exec(e).slice(1)},normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var a=e[n];a==="."?e.splice(n,1):a===".."?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=PATH.isAbs(e),t=e.substr(-1)==="/";return e=PATH.normalizeArray(e.split("/").filter(n=>!!n),!r).join("/"),!e&&!r&&(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=PATH.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"/";e=PATH.normalize(e),e=e.replace(/\/$/,"");var r=e.lastIndexOf("/");return r===-1?e:e.substr(r+1)},join:(...e)=>PATH.normalize(e.join("/")),join2:(e,r)=>PATH.normalize(e+"/"+r)},initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(ENVIRONMENT_IS_NODE)try{var e=Y("crypto"),r=e.randomFillSync;if(r)return n=>e.randomFillSync(n);var t=e.randomBytes;return n=>(n.set(t(n.byteLength)),n)}catch(n){}abort("initRandomDevice")},randomFill=e=>(randomFill=initRandomFill())(e),PATH_FS={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var a=n>=0?e[n]:FS.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,t=PATH.isAbs(a)}return r=PATH.normalizeArray(r.split("/").filter(o=>!!o),!t).join("/"),(t?"/":"")+r||"."},relative:(e,r)=>{e=PATH_FS.resolve(e).substr(1),r=PATH_FS.resolve(r).substr(1);function t(u){for(var d=0;d=0&&u[p]==="";p--);return d>p?[]:u.slice(d,p-d+1)}for(var n=t(e.split("/")),a=t(r.split("/")),o=Math.min(n.length,a.length),_=o,l=0;l{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},stringToUTF8Array=(e,r,t,n)=>{if(t>>>=0,!(n>0))return 0;for(var a=t,o=t+n-1,_=0;_=55296&&l<=57343){var c=e.charCodeAt(++_);l=65536+((l&1023)<<10)|c&1023}if(l<=127){if(t>=o)break;r[t++>>>0]=l}else if(l<=2047){if(t+1>=o)break;r[t++>>>0]=192|l>>6,r[t++>>>0]=128|l&63}else if(l<=65535){if(t+2>=o)break;r[t++>>>0]=224|l>>12,r[t++>>>0]=128|l>>6&63,r[t++>>>0]=128|l&63}else{if(t+3>=o)break;r[t++>>>0]=240|l>>18,r[t++>>>0]=128|l>>12&63,r[t++>>>0]=128|l>>6&63,r[t++>>>0]=128|l&63}}return r[t>>>0]=0,t-a};function intArrayFromString(e,r,t){var n=t>0?t:lengthBytesUTF8(e)+1,a=new Array(n),o=stringToUTF8Array(e,a,0,a.length);return r&&(a.length=o),a}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var e=null;if(ENVIRONMENT_IS_NODE){var r=256,t=Buffer.alloc(r),n=0,a=process.stdin.fd;try{n=fs.readSync(a,t)}catch(o){if(o.toString().includes("EOF"))n=0;else throw o}n>0?e=t.slice(0,n).toString("utf-8"):e=null}else typeof window<"u"&&typeof window.prompt=="function"?(e=window.prompt("Input: "),e!==null&&(e+="\n")):typeof readline=="function"&&(e=readline(),e!==null&&(e+="\n"));if(!e)return null;FS_stdin_getChar_buffer=intArrayFromString(e,!0)}return FS_stdin_getChar_buffer.shift()},TTY={ttys:[],init(){},shutdown(){},register(e,r){TTY.ttys[e]={input:[],output:[],ops:r},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open(e){var r=TTY.ttys[e.node.rdev];if(!r)throw new FS.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,a){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var o=0,_=0;_0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,r,t){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,r){r===null||r===10?(err(UTF8ArrayToString(e.output,0)),e.output=[]):r!=0&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}},mmapAlloc=e=>{e=alignMemory(e,65536);var r=_emscripten_builtin_memalign(65536,e);return r?zeroMemory(r,e):0},MEMFS={ops_table:null,mount(e){return MEMFS.createNode(null,"/",16895,0)},createNode(e,r,t,n){if(FS.isBlkdev(t)||FS.isFIFO(t))throw new FS.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var a=FS.createNode(e,r,t,n);return FS.isDir(a.mode)?(a.node_ops=MEMFS.ops_table.dir.node,a.stream_ops=MEMFS.ops_table.dir.stream,a.contents={}):FS.isFile(a.mode)?(a.node_ops=MEMFS.ops_table.file.node,a.stream_ops=MEMFS.ops_table.file.stream,a.usedBytes=0,a.contents=null):FS.isLink(a.mode)?(a.node_ops=MEMFS.ops_table.link.node,a.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(a.mode)&&(a.node_ops=MEMFS.ops_table.chrdev.node,a.stream_ops=MEMFS.ops_table.chrdev.stream),a.timestamp=Date.now(),e&&(e.contents[r]=a,e.timestamp=a.timestamp),a},getFileDataAsTypedArray(e){return 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)){var n=1024*1024;r=Math.max(r,t*(t>>0),t!=0&&(r=Math.max(r,256));var a=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(a.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(r==0)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=FS.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,FS.isDir(e.mode)?r.size=4096:FS.isFile(e.mode)?r.size=e.usedBytes:FS.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){r.mode!==void 0&&(e.mode=r.mode),r.timestamp!==void 0&&(e.timestamp=r.timestamp),r.size!==void 0&&MEMFS.resizeFileStorage(e,r.size)},lookup(e,r){throw FS.genericErrors[44]},mknod(e,r,t,n){return MEMFS.createNode(e,r,t,n)},rename(e,r,t){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(r,t)}catch(o){}if(n)for(var a in n.contents)throw new FS.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=FS.lookupNode(e,r);for(var n in t.contents)throw new FS.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=MEMFS.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,a){var o=e.node.contents;if(a>=e.node.usedBytes)return 0;var _=Math.min(e.node.usedBytes-a,n);if(_>8&&o.subarray)r.set(o.subarray(a,a+_),t);else for(var l=0;l<_;l++)r[t+l]=o[a+l];return _},write(e,r,t,n,a,o){if(r.buffer===HEAP8.buffer&&(o=!1),!n)return 0;var _=e.node;if(_.timestamp=Date.now(),r.subarray&&(!_.contents||_.contents.subarray)){if(o)return _.contents=r.subarray(t,t+n),_.usedBytes=n,n;if(_.usedBytes===0&&a===0)return _.contents=r.slice(t,t+n),_.usedBytes=n,n;if(a+n<=_.usedBytes)return _.contents.set(r.subarray(t,t+n),a),n}if(MEMFS.expandFileStorage(_,a+n),_.contents.subarray&&r.subarray)_.contents.set(r.subarray(t,t+n),a);else for(var l=0;l0||t+r>>0)}return{ptr:o,allocated:_}},msync(e,r,t,n,a){return MEMFS.stream_ops.write(e,r,0,n,t,!1),0}}},FS_createDataFile=(e,r,t,n,a,o)=>{FS.createDataFile(e,r,t,n,a,o)},FS_handledByPreloadPlugin=(e,r,t,n)=>{typeof Browser<"u"&&Browser.init();var a=!1;return preloadPlugins.forEach(o=>{a||o.canHandle(r)&&(o.handle(e,r,t,n),a=!0)}),a},FS_createPreloadedFile=(e,r,t,n,a,o,_,l,c,u)=>{var d=r?PATH_FS.resolve(PATH.join2(e,r)):e,p="cp ".concat(d);function f(m){function g(v){u==null||u(),l||FS_createDataFile(e,r,v,n,a,c),o==null||o(),removeRunDependency(p)}FS_handledByPreloadPlugin(m,d,g,()=>{_==null||_(),removeRunDependency(p)})||g(m)}addRunDependency(p),typeof t=="string"?asyncLoad(t,f,_):f(t)},FS_modeStringToFlags=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},t=r[e];if(typeof t>"u")throw new Error("Unknown file open mode: ".concat(e));return t},FS_getMode=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(e=PATH_FS.resolve(e),!e)return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(r=Object.assign(t,r),r.recurse_count>8)throw new FS.ErrnoError(32);for(var n=e.split("/").filter(p=>!!p),a=FS.root,o="/",_=0;_40)throw new FS.ErrnoError(32)}}return{path:o,node:a}},getPath(e){for(var r;;){if(FS.isRoot(e)){var t=e.mount.mountpoint;return r?t[t.length-1]!=="/"?"".concat(t,"/").concat(r):t+r:t}r=r?"".concat(e.name,"/").concat(r):e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n>>0)%FS.nameTable.length},hashAddNode(e){var r=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[r],FS.nameTable[r]=e},hashRemoveNode(e){var r=FS.hashName(e.parent.id,e.name);if(FS.nameTable[r]===e)FS.nameTable[r]=e.name_next;else for(var t=FS.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=FS.mayLookup(e);if(t)throw new FS.ErrnoError(t);for(var n=FS.hashName(e.id,r),a=FS.nameTable[n];a;a=a.name_next){var o=a.name;if(a.parent.id===e.id&&o===r)return a}return FS.lookup(e,r)},createNode(e,r,t,n){var a=new FS.FSNode(e,r,t,n);return FS.hashAddNode(a),a},destroyNode(e){FS.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)===32768},isDir(e){return(e&61440)===16384},isLink(e){return(e&61440)===40960},isChrdev(e){return(e&61440)===8192},isBlkdev(e){return(e&61440)===24576},isFIFO(e){return(e&61440)===4096},isSocket(e){return(e&49152)===49152},flagsToPermissionString(e){var r=["r","w","rw"][e&3];return e&512&&(r+="w"),r},nodePermissions(e,r){return FS.ignorePermissions?0:r.includes("r")&&!(e.mode&292)||r.includes("w")&&!(e.mode&146)||r.includes("x")&&!(e.mode&73)?2:0},mayLookup(e){if(!FS.isDir(e.mode))return 54;var r=FS.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{var t=FS.lookupNode(e,r);return 20}catch(n){}return FS.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=FS.lookupNode(e,r)}catch(o){return o.errno}var a=FS.nodePermissions(e,"wx");if(a)return a;if(t){if(!FS.isDir(n.mode))return 54;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return 10}else if(FS.isDir(n.mode))return 31;return 0},mayOpen(e,r){return e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&(FS.flagsToPermissionString(r)!=="r"||r&512)?31:FS.nodePermissions(e,FS.flagsToPermissionString(r)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=FS.MAX_OPEN_FDS;e++)if(!FS.streams[e])return e;throw new FS.ErrnoError(33)},getStreamChecked(e){var r=FS.getStream(e);if(!r)throw new FS.ErrnoError(8);return r},getStream:e=>FS.streams[e],createStream(e,r=-1){return FS.FSStream||(FS.FSStream=function(){this.shared={}},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(t){this.node=t}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(t){this.shared.flags=t}},position:{get(){return this.shared.position},set(t){this.shared.position=t}}})),e=Object.assign(new FS.FSStream,e),r==-1&&(r=FS.nextfd()),e.fd=r,FS.streams[r]=e,e},closeStream(e){FS.streams[e]=null},chrdev_stream_ops:{open(e){var t,n;var r=FS.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,(n=(t=e.stream_ops).open)==null||n.call(t,e)},llseek(){throw new FS.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,r)=>e<<8|r,registerDevice(e,r){FS.devices[e]={stream_ops:r}},getDevice:e=>FS.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){typeof e=="function"&&(r=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: ".concat(FS.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"));var t=FS.getMounts(FS.root.mount),n=0;function a(_){return FS.syncFSRequests--,r(_)}function o(_){if(_)return o.errored?void 0:(o.errored=!0,a(_));++n>=t.length&&a(null)}t.forEach(_=>{if(!_.type.syncfs)return o(null);_.type.syncfs(_,e,o)})},mount(e,r,t){var n=t==="/",a=!t,o;if(n&&FS.root)throw new FS.ErrnoError(10);if(!n&&!a){var _=FS.lookupPath(t,{follow_mount:!1});if(t=_.path,o=_.node,FS.isMountpoint(o))throw new FS.ErrnoError(10);if(!FS.isDir(o.mode))throw new FS.ErrnoError(54)}var l={type:e,opts:r,mountpoint:t,mounts:[]},c=e.mount(l);return c.mount=l,l.root=c,n?FS.root=c:o&&(o.mounted=l,o.mount&&o.mount.mounts.push(l)),c},unmount(e){var r=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(r.node))throw new FS.ErrnoError(28);var t=r.node,n=t.mounted,a=FS.getMounts(n);Object.keys(FS.nameTable).forEach(_=>{for(var l=FS.nameTable[_];l;){var c=l.name_next;a.includes(l.mount)&&FS.destroyNode(l),l=c}}),t.mounted=null;var o=t.mount.mounts.indexOf(n);t.mount.mounts.splice(o,1)},lookup(e,r){return e.node_ops.lookup(e,r)},mknod(e,r,t){var n=FS.lookupPath(e,{parent:!0}),a=n.node,o=PATH.basename(e);if(!o||o==="."||o==="..")throw new FS.ErrnoError(28);var _=FS.mayCreate(a,o);if(_)throw new FS.ErrnoError(_);if(!a.node_ops.mknod)throw new FS.ErrnoError(63);return a.node_ops.mknod(a,o,r,t)},create(e,r){return r=r!==void 0?r:438,r&=4095,r|=32768,FS.mknod(e,r,0)},mkdir(e,r){return r=r!==void 0?r:511,r&=1023,r|=16384,FS.mknod(e,r,0)},mkdirTree(e,r){for(var t=e.split("/"),n="",a=0;a"u"&&(t=r,r=438),r|=8192,FS.mknod(e,r,t)},symlink(e,r){if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var t=FS.lookupPath(r,{parent:!0}),n=t.node;if(!n)throw new FS.ErrnoError(44);var a=PATH.basename(r),o=FS.mayCreate(n,a);if(o)throw new FS.ErrnoError(o);if(!n.node_ops.symlink)throw new FS.ErrnoError(63);return n.node_ops.symlink(n,a,e)},rename(e,r){var t=PATH.dirname(e),n=PATH.dirname(r),a=PATH.basename(e),o=PATH.basename(r),_,l,c;if(_=FS.lookupPath(e,{parent:!0}),l=_.node,_=FS.lookupPath(r,{parent:!0}),c=_.node,!l||!c)throw new FS.ErrnoError(44);if(l.mount!==c.mount)throw new FS.ErrnoError(75);var u=FS.lookupNode(l,a),d=PATH_FS.relative(e,n);if(d.charAt(0)!==".")throw new FS.ErrnoError(28);if(d=PATH_FS.relative(r,t),d.charAt(0)!==".")throw new FS.ErrnoError(55);var p;try{p=FS.lookupNode(c,o)}catch(g){}if(u!==p){var f=FS.isDir(u.mode),m=FS.mayDelete(l,a,f);if(m)throw new FS.ErrnoError(m);if(m=p?FS.mayDelete(c,o,f):FS.mayCreate(c,o),m)throw new FS.ErrnoError(m);if(!l.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(u)||p&&FS.isMountpoint(p))throw new FS.ErrnoError(10);if(c!==l&&(m=FS.nodePermissions(l,"w"),m))throw new FS.ErrnoError(m);FS.hashRemoveNode(u);try{l.node_ops.rename(u,c,o)}catch(g){throw g}finally{FS.hashAddNode(u)}}},rmdir(e){var r=FS.lookupPath(e,{parent:!0}),t=r.node,n=PATH.basename(e),a=FS.lookupNode(t,n),o=FS.mayDelete(t,n,!0);if(o)throw new FS.ErrnoError(o);if(!t.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);t.node_ops.rmdir(t,n),FS.destroyNode(a)},readdir(e){var r=FS.lookupPath(e,{follow:!0}),t=r.node;if(!t.node_ops.readdir)throw new FS.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var r=FS.lookupPath(e,{parent:!0}),t=r.node;if(!t)throw new FS.ErrnoError(44);var n=PATH.basename(e),a=FS.lookupNode(t,n),o=FS.mayDelete(t,n,!1);if(o)throw new FS.ErrnoError(o);if(!t.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);t.node_ops.unlink(t,n),FS.destroyNode(a)},readlink(e){var r=FS.lookupPath(e),t=r.node;if(!t)throw new FS.ErrnoError(44);if(!t.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(t.parent),t.node_ops.readlink(t))},stat(e,r){var t=FS.lookupPath(e,{follow:!r}),n=t.node;if(!n)throw new FS.ErrnoError(44);if(!n.node_ops.getattr)throw new FS.ErrnoError(63);return n.node_ops.getattr(n)},lstat(e){return FS.stat(e,!0)},chmod(e,r,t){var n;if(typeof e=="string"){var a=FS.lookupPath(e,{follow:!t});n=a.node}else n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{mode:r&4095|n.mode&-4096,timestamp:Date.now()})},lchmod(e,r){FS.chmod(e,r,!0)},fchmod(e,r){var t=FS.getStreamChecked(e);FS.chmod(t.node,r)},chown(e,r,t,n){var a;if(typeof e=="string"){var o=FS.lookupPath(e,{follow:!n});a=o.node}else a=e;if(!a.node_ops.setattr)throw new FS.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(e,r,t){FS.chown(e,r,t,!0)},fchown(e,r,t){var n=FS.getStreamChecked(e);FS.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new FS.ErrnoError(28);var t;if(typeof e=="string"){var n=FS.lookupPath(e,{follow:!0});t=n.node}else t=e;if(!t.node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(t.mode))throw new FS.ErrnoError(31);if(!FS.isFile(t.mode))throw new FS.ErrnoError(28);var a=FS.nodePermissions(t,"w");if(a)throw new FS.ErrnoError(a);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=FS.getStreamChecked(e);if(!(t.flags&2097155))throw new FS.ErrnoError(28);FS.truncate(t.node,r)},utime(e,r,t){var n=FS.lookupPath(e,{follow:!0}),a=n.node;a.node_ops.setattr(a,{timestamp:Math.max(r,t)})},open(e,r,t){if(e==="")throw new FS.ErrnoError(44);r=typeof r=="string"?FS_modeStringToFlags(r):r,t=typeof t>"u"?438:t,r&64?t=t&4095|32768:t=0;var n;if(typeof e=="object")n=e;else{e=PATH.normalize(e);try{var a=FS.lookupPath(e,{follow:!(r&131072)});n=a.node}catch(c){}}var o=!1;if(r&64)if(n){if(r&128)throw new FS.ErrnoError(20)}else n=FS.mknod(e,t,0),o=!0;if(!n)throw new FS.ErrnoError(44);if(FS.isChrdev(n.mode)&&(r&=-513),r&65536&&!FS.isDir(n.mode))throw new FS.ErrnoError(54);if(!o){var _=FS.mayOpen(n,r);if(_)throw new FS.ErrnoError(_)}r&512&&!o&&FS.truncate(n,0),r&=-131713;var l=FS.createStream({node:n,path:FS.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),Module.logReadFiles&&!(r&1)&&(FS.readFiles||(FS.readFiles={}),e in FS.readFiles||(FS.readFiles[e]=1)),l},close(e){if(FS.isClosed(e))throw new FS.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{FS.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,r,t){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(t!=0&&t!=1&&t!=2)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,a){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if((e.flags&2097155)===1)throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var o=typeof a<"u";if(!o)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var _=e.stream_ops.read(e,r,t,n,a);return o||(e.position+=_),_},write(e,r,t,n,a,o){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);e.seekable&&e.flags&1024&&FS.llseek(e,0,2);var _=typeof a<"u";if(!_)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var l=e.stream_ops.write(e,r,t,n,a,o);return _||(e.position+=l),l},allocate(e,r,t){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(r<0||t<=0)throw new FS.ErrnoError(28);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,a){if(n&2&&!(a&2)&&(e.flags&2097155)!==2)throw new FS.ErrnoError(2);if((e.flags&2097155)===1)throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,a)},msync(e,r,t,n,a){return e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,a):0},munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary",r.encoding!=="utf8"&&r.encoding!=="binary")throw new Error('Invalid encoding type "'.concat(r.encoding,'"'));var t,n=FS.open(e,r.flags),a=FS.stat(e),o=a.size,_=new Uint8Array(o);return FS.read(n,_,0,o,0),r.encoding==="utf8"?t=UTF8ArrayToString(_,0):r.encoding==="binary"&&(t=_),FS.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=FS.open(e,t.flags,t.mode);if(typeof r=="string"){var a=new Uint8Array(lengthBytesUTF8(r)+1),o=stringToUTF8Array(r,a,0,a.length);FS.write(n,a,0,o,void 0,t.canOwn)}else if(ArrayBuffer.isView(r))FS.write(n,r,0,r.byteLength,void 0,t.canOwn);else throw new Error("Unsupported data type");FS.close(n)},cwd:()=>FS.currentPath,chdir(e){var r=FS.lookupPath(e,{follow:!0});if(r.node===null)throw new FS.ErrnoError(44);if(!FS.isDir(r.node.mode))throw new FS.ErrnoError(54);var t=FS.nodePermissions(r.node,"x");if(t)throw new FS.ErrnoError(t);FS.currentPath=r.path},createDefaultDirectories(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(n,a,o,_,l)=>_}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(r===0&&(r=randomFill(e).byteLength),e[--r]);FS.createDevice("/dev","random",t),FS.createDevice("/dev","urandom",t),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var e=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd"),FS.mount({mount(){var r=FS.createNode(e,"fd",16895,73);return r.node_ops={lookup(t,n){var a=+n,o=FS.getStreamChecked(a),_={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>o.path}};return _.parent=_,_}},r}},{},"/proc/self/fd")},createStandardStreams(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var e=FS.open("/dev/stdin",0),r=FS.open("/dev/stdout",1),t=FS.open("/dev/stderr",1)},staticInit(){[44].forEach(e=>{FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack=""}),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS}},init(e,r,t){FS.init.initialized=!0,Module.stdin=e||Module.stdin,Module.stdout=r||Module.stdout,Module.stderr=t||Module.stderr,FS.createStandardStreams()},quit(){FS.init.initialized=!1,_fflush(0);for(var e=0;ethis.length-1||m<0)){var g=m%this.chunkSize,v=m/this.chunkSize|0;return this.getter(v)[g]}},o.prototype.setDataGetter=function(m){this.getter=m},o.prototype.cacheLength=function(){var m=new XMLHttpRequest;if(m.open("HEAD",t,!1),m.send(null),!(m.status>=200&&m.status<300||m.status===304))throw new Error("Couldn't load "+t+". Status: "+m.status);var g=Number(m.getResponseHeader("Content-length")),v,S=(v=m.getResponseHeader("Accept-Ranges"))&&v==="bytes",y=(v=m.getResponseHeader("Content-Encoding"))&&v==="gzip",h=1024*1024;S||(h=g);var b=(k,L)=>{if(k>L)throw new Error("invalid range ("+k+", "+L+") or no bytes requested!");if(L>g-1)throw new Error("only "+g+" bytes available! programmer error!");var E=new XMLHttpRequest;if(E.open("GET",t,!1),g!==h&&E.setRequestHeader("Range","bytes="+k+"-"+L),E.responseType="arraybuffer",E.overrideMimeType&&E.overrideMimeType("text/plain; charset=x-user-defined"),E.send(null),!(E.status>=200&&E.status<300||E.status===304))throw new Error("Couldn't load "+t+". Status: "+E.status);return E.response!==void 0?new Uint8Array(E.response||[]):intArrayFromString(E.responseText||"",!0)},w=this;w.setDataGetter(k=>{var L=k*h,E=(k+1)*h-1;if(E=Math.min(E,g-1),typeof w.chunks[k]>"u"&&(w.chunks[k]=b(L,E)),typeof w.chunks[k]>"u")throw new Error("doXHR failed!");return w.chunks[k]}),(y||!g)&&(h=g=1,g=this.getter(0).length,h=g,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=g,this._chunkSize=h,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var _=new o;Object.defineProperties(_,{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:_}}else var l={isDevice:!1,url:t};var c=FS.createFile(e,r,l,n,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={},d=Object.keys(c.stream_ops);d.forEach(f=>{var m=c.stream_ops[f];u[f]=(...g)=>(FS.forceLoadFile(c),m(...g))});function p(f,m,g,v,S){var y=f.node.contents;if(S>=y.length)return 0;var h=Math.min(y.length-S,v);if(y.slice)for(var b=0;b(FS.forceLoadFile(c),p(f,m,g,v,S)),u.mmap=(f,m,g,v,S)=>{FS.forceLoadFile(c);var y=mmapAlloc(m);if(!y)throw new FS.ErrnoError(48);return p(f,HEAP8,y,m,g),{ptr:y,allocated:!0}},c.stream_ops=u,c}},SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(PATH.isAbs(r))return r;var n;if(e===-100)n=FS.cwd();else{var a=SYSCALLS.getStreamFromFD(e);n=a.path}if(r.length==0){if(!t)throw new FS.ErrnoError(44);return n}return PATH.join2(n,r)},doStat(e,r,t){var n=e(r);HEAP32[t>>>2>>>0]=n.dev,HEAP32[t+4>>>2>>>0]=n.mode,HEAPU32[t+8>>>2>>>0]=n.nlink,HEAP32[t+12>>>2>>>0]=n.uid,HEAP32[t+16>>>2>>>0]=n.gid,HEAP32[t+20>>>2>>>0]=n.rdev,tempI64=[n.size>>>0,(tempDouble=n.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+24>>>2>>>0]=tempI64[0],HEAP32[t+28>>>2>>>0]=tempI64[1],HEAP32[t+32>>>2>>>0]=4096,HEAP32[t+36>>>2>>>0]=n.blocks;var a=n.atime.getTime(),o=n.mtime.getTime(),_=n.ctime.getTime();return tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+40>>>2>>>0]=tempI64[0],HEAP32[t+44>>>2>>>0]=tempI64[1],HEAPU32[t+48>>>2>>>0]=a%1e3*1e3,tempI64=[Math.floor(o/1e3)>>>0,(tempDouble=Math.floor(o/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+56>>>2>>>0]=tempI64[0],HEAP32[t+60>>>2>>>0]=tempI64[1],HEAPU32[t+64>>>2>>>0]=o%1e3*1e3,tempI64=[Math.floor(_/1e3)>>>0,(tempDouble=Math.floor(_/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+72>>>2>>>0]=tempI64[0],HEAP32[t+76>>>2>>>0]=tempI64[1],HEAPU32[t+80>>>2>>>0]=_%1e3*1e3,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+88>>>2>>>0]=tempI64[0],HEAP32[t+92>>>2>>>0]=tempI64[1],0},doMsync(e,r,t,n,a){if(!FS.isFile(r.node.mode))throw new FS.ErrnoError(43);if(n&2)return 0;var o=HEAPU8.slice(e,e+t);FS.msync(r,o,a,t,n)},varargs:void 0,get(){var e=HEAP32[+SYSCALLS.varargs>>>2>>>0];return SYSCALLS.varargs+=4,e},getp(){return SYSCALLS.get()},getStr(e){var r=UTF8ToString(e);return r},getStreamFromFD(e){var r=FS.getStreamChecked(e);return r}};function ___syscall__newselect(e,r,t,n,a){r>>>=0,t>>>=0,n>>>=0,a>>>=0;try{for(var o=0,_=r?HEAP32[r>>>2>>>0]:0,l=r?HEAP32[r+4>>>2>>>0]:0,c=t?HEAP32[t>>>2>>>0]:0,u=t?HEAP32[t+4>>>2>>>0]:0,d=n?HEAP32[n>>>2>>>0]:0,p=n?HEAP32[n+4>>>2>>>0]:0,f=0,m=0,g=0,v=0,S=0,y=0,h=(r?HEAP32[r>>>2>>>0]:0)|(t?HEAP32[t>>>2>>>0]:0)|(n?HEAP32[n>>>2>>>0]:0),b=(r?HEAP32[r+4>>>2>>>0]:0)|(t?HEAP32[t+4>>>2>>>0]:0)|(n?HEAP32[n+4>>>2>>>0]:0),w=function(P,T,M,C){return P<32?T&C:M&C},k=0;k>>2>>>0]:0,F=r?HEAP32[a+4>>>2>>>0]:0;A=(D+F/1e6)*1e3}x=E.stream_ops.poll(E,A)}x&1&&w(k,_,l,L)&&(k<32?f=f|L:m=m|L,o++),x&4&&w(k,c,u,L)&&(k<32?g=g|L:v=v|L,o++),x&2&&w(k,d,p,L)&&(k<32?S=S|L:y=y|L,o++)}}return r&&(HEAP32[r>>>2>>>0]=f,HEAP32[r+4>>>2>>>0]=m),t&&(HEAP32[t>>>2>>>0]=g,HEAP32[t+4>>>2>>>0]=v),n&&(HEAP32[n>>>2>>>0]=S,HEAP32[n+4>>>2>>>0]=y),o}catch(P){if(typeof FS>"u"||P.name!=="ErrnoError")throw P;return-P.errno}}___syscall__newselect.sig="iipppp";var SOCKFS={mount(e){return Module.websocket=Module.websocket&&typeof Module.websocket=="object"?Module.websocket:{},Module.websocket._callbacks={},Module.websocket.on=function(r,t){return typeof t=="function"&&(this._callbacks[r]=t),this},Module.websocket.emit=function(r,t){typeof this._callbacks[r]=="function"&&this._callbacks[r].call(this,t)},FS.createNode(null,"/",16895,0)},createSocket(e,r,t){r&=-526337;var n=r==1;if(n&&t&&t!=6)throw new FS.ErrnoError(66);var a={family:e,type:r,protocol:t,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops},o=SOCKFS.nextname(),_=FS.createNode(SOCKFS.root,o,49152,0);_.sock=a;var l=FS.createStream({path:o,node:_,flags:2,seekable:!1,stream_ops:SOCKFS.stream_ops});return a.stream=l,a},getSocket(e){var r=FS.getStream(e);return!r||!FS.isSocket(r.node.mode)?null:r.node.sock},stream_ops:{poll(e){var r=e.node.sock;return r.sock_ops.poll(r)},ioctl(e,r,t){var n=e.node.sock;return n.sock_ops.ioctl(n,r,t)},read(e,r,t,n,a){var o=e.node.sock,_=o.sock_ops.recvmsg(o,n);return _?(r.set(_.buffer,t),_.buffer.length):0},write(e,r,t,n,a){var o=e.node.sock;return o.sock_ops.sendmsg(o,r,t,n)},close(e){var r=e.node.sock;r.sock_ops.close(r)}},nextname(){return SOCKFS.nextname.current||(SOCKFS.nextname.current=0),"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer(e,r,t){var n;if(typeof r=="object"&&(n=r,r=null,t=null),n)if(n._socket)r=n._socket.remoteAddress,t=n._socket.remotePort;else{var a=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!a)throw new Error("WebSocket URL must be in the format ws(s)://address:port");r=a[1],t=parseInt(a[2],10)}else try{var o=Module.websocket&&typeof Module.websocket=="object",_="ws:#".replace("#","//");if(o&&typeof Module.websocket.url=="string"&&(_=Module.websocket.url),_==="ws://"||_==="wss://"){var l=r.split("/");_=_+l[0]+":"+t+"/"+l.slice(1).join("/")}var c="binary";o&&typeof Module.websocket.subprotocol=="string"&&(c=Module.websocket.subprotocol);var u=void 0;c!=="null"&&(c=c.replace(/^ +| +$/g,"").split(/ *, */),u=c),o&&Module.websocket.subprotocol===null&&(c="null",u=void 0);var d;ENVIRONMENT_IS_NODE?d=ce():d=WebSocket,n=new d(_,u),n.binaryType="arraybuffer"}catch(f){throw new FS.ErrnoError(23)}var p={addr:r,port:t,socket:n,dgram_send_queue:[]};return SOCKFS.websocket_sock_ops.addPeer(e,p),SOCKFS.websocket_sock_ops.handlePeerEvents(e,p),e.type===2&&typeof e.sport<"u"&&p.dgram_send_queue.push(new Uint8Array([255,255,255,255,112,111,114,116,(e.sport&65280)>>8,e.sport&255])),p},getPeer(e,r,t){return e.peers[r+":"+t]},addPeer(e,r){e.peers[r.addr+":"+r.port]=r},removePeer(e,r){delete e.peers[r.addr+":"+r.port]},handlePeerEvents(e,r){var t=!0,n=function(){Module.websocket.emit("open",e.stream.fd);try{for(var o=r.dgram_send_queue.shift();o;)r.socket.send(o),o=r.dgram_send_queue.shift()}catch(_){r.socket.close()}};function a(o){if(typeof o=="string"){var _=new TextEncoder;o=_.encode(o)}else{if(assert(o.byteLength!==void 0),o.byteLength==0)return;o=new Uint8Array(o)}var l=t;if(t=!1,l&&o.length===10&&o[0]===255&&o[1]===255&&o[2]===255&&o[3]===255&&o[4]===112&&o[5]===111&&o[6]===114&&o[7]===116){var c=o[8]<<8|o[9];SOCKFS.websocket_sock_ops.removePeer(e,r),r.port=c,SOCKFS.websocket_sock_ops.addPeer(e,r);return}e.recv_queue.push({addr:r.addr,port:r.port,data:o}),Module.websocket.emit("message",e.stream.fd)}ENVIRONMENT_IS_NODE?(r.socket.on("open",n),r.socket.on("message",function(o,_){_&&a(new Uint8Array(o).buffer)}),r.socket.on("close",function(){Module.websocket.emit("close",e.stream.fd)}),r.socket.on("error",function(o){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})):(r.socket.onopen=n,r.socket.onclose=function(){Module.websocket.emit("close",e.stream.fd)},r.socket.onmessage=function(_){a(_.data)},r.socket.onerror=function(o){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll(e){if(e.type===1&&e.server)return e.pending.length?65:0;var r=0,t=e.type===1?SOCKFS.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!t||t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=65),(!t||t&&t.socket.readyState===t.socket.OPEN)&&(r|=4),(t&&t.socket.readyState===t.socket.CLOSING||t&&t.socket.readyState===t.socket.CLOSED)&&(r|=16),r},ioctl(e,r,t){switch(r){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),HEAP32[t>>>2>>>0]=n,0;default:return 28}},close(e){if(e.server){try{e.server.close()}catch(a){}e.server=null}for(var r=Object.keys(e.peers),t=0;t{var r=SOCKFS.getSocket(e);if(!r)throw new FS.ErrnoError(8);return r},Sockets={BUFFER_SIZE:10240,MAX_BUFFER_SIZE:10485760,nextFd:1,fds:{},nextport:1,maxport:65535,peer:null,connections:{},portmap:{},localAddr:4261412874,addrPool:[33554442,50331658,67108874,83886090,100663306,117440522,134217738,150994954,167772170,184549386,201326602,218103818,234881034]},inetPton4=e=>{for(var r=e.split("."),t=0;t<4;t++){var n=Number(r[t]);if(isNaN(n))return null;r[t]=n}return(r[0]|r[1]<<8|r[2]<<16|r[3]<<24)>>>0},jstoi_q=e=>parseInt(e),inetPton6=e=>{var r,t,n,a,o,_=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,l=[];if(!_.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),r=e.split(":"),r[r.length-4]=jstoi_q(r[r.length-4])+jstoi_q(r[r.length-3])*256,r[r.length-3]=jstoi_q(r[r.length-2])+jstoi_q(r[r.length-1])*256,r=r.slice(0,r.length-2)):r=e.split(":"),n=0,a=0,t=0;t{switch(r){case 2:t=inetPton4(t),zeroMemory(e,16),a&&(HEAP32[a>>>2>>>0]=16),HEAP16[e>>>1>>>0]=r,HEAP32[e+4>>>2>>>0]=t,HEAP16[e+2>>>1>>>0]=_htons(n);break;case 10:t=inetPton6(t),zeroMemory(e,28),a&&(HEAP32[a>>>2>>>0]=28),HEAP32[e>>>2>>>0]=r,HEAP32[e+8>>>2>>>0]=t[0],HEAP32[e+12>>>2>>>0]=t[1],HEAP32[e+16>>>2>>>0]=t[2],HEAP32[e+20>>>2>>>0]=t[3],HEAP16[e+2>>>1>>>0]=_htons(n);break;default:return 5}return 0},DNS={address_map:{id:1,addrs:{},names:{}},lookup_name(e){var r=inetPton4(e);if(r!==null||(r=inetPton6(e),r!==null))return e;var t;if(DNS.address_map.addrs[e])t=DNS.address_map.addrs[e];else{var n=DNS.address_map.id++;assert(n<65535,"exceeded max address mappings of 65535"),t="172.29."+(n&255)+"."+(n&65280),DNS.address_map.names[t]=e,DNS.address_map.addrs[e]=t}return t},lookup_addr(e){return DNS.address_map.names[e]?DNS.address_map.names[e]:null}};function ___syscall_accept4(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=_.sock_ops.accept(_);if(r)var c=writeSockaddr(r,l.family,DNS.lookup_name(l.daddr),l.dport,t);return l.stream.fd}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_accept4.sig="iippiii";var inetNtop4=e=>(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255),inetNtop6=e=>{var r="",t=0,n=0,a=0,o=0,_=0,l=0,c=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],u=!0,d="";for(l=0;l<5;l++)if(c[l]!==0){u=!1;break}if(u){if(d=inetNtop4(c[6]|c[7]<<16),c[5]===-1)return r="::ffff:",r+=d,r;if(c[5]===0)return r="::",d==="0.0.0.0"&&(d=""),d==="0.0.0.1"&&(d="1"),r+=d,r}for(t=0;t<8;t++)c[t]===0&&(t-a>1&&(_=0),a=t,_++),_>n&&(n=_,o=t-n+1);for(t=0;t<8;t++){if(n>1&&c[t]===0&&t>=o&&t{var t=HEAP16[e>>>1>>>0],n=_ntohs(HEAPU16[e+2>>>1>>>0]),a;switch(t){case 2:if(r!==16)return{errno:28};a=HEAP32[e+4>>>2>>>0],a=inetNtop4(a);break;case 10:if(r!==28)return{errno:28};a=[HEAP32[e+8>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+16>>>2>>>0],HEAP32[e+20>>>2>>>0]],a=inetNtop6(a);break;default:return{errno:5}}return{family:t,addr:a,port:n}},getSocketAddress=(e,r,t)=>{if(t&&e===0)return null;var n=readSockaddr(e,r);if(n.errno)throw new FS.ErrnoError(n.errno);return n.addr=DNS.lookup_addr(n.addr)||n.addr,n};function ___syscall_bind(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=getSocketAddress(r,t);return _.sock_ops.bind(_,l.addr,l.port),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_bind.sig="iippiii";function ___syscall_chdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chdir(e),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_chdir.sig="ip";function ___syscall_chmod(e,r){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chmod(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_chmod.sig="ipi";function ___syscall_connect(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=getSocketAddress(r,t);return _.sock_ops.connect(_,l.addr,l.port),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_connect.sig="iippiii";function ___syscall_dup(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.createStream(r).fd}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_dup.sig="ii";function ___syscall_dup3(e,r,t){try{var n=SYSCALLS.getStreamFromFD(e);if(n.fd===r)return-28;var a=FS.getStream(r);return a&&FS.close(a),FS.createStream(n,r).fd}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_dup3.sig="iiii";function ___syscall_faccessat(e,r,t,n){r>>>=0;try{if(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),t&-8)return-28;var a=FS.lookupPath(r,{follow:!0}),o=a.node;if(!o)return-44;var _="";return t&4&&(_+="r"),t&2&&(_+="w"),t&1&&(_+="x"),_&&FS.nodePermissions(o,_)?-2:0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_faccessat.sig="iipii";var ___syscall_fadvise64=(e,r,t,n)=>0;___syscall_fadvise64.sig="iiiiiii";function ___syscall_fallocate(e,r,t,n,a,o){var _=convertI32PairToI53Checked(t,n),l=convertI32PairToI53Checked(a,o);try{if(isNaN(_))return 61;var c=SYSCALLS.getStreamFromFD(e);return FS.allocate(c,_,l),0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_fallocate.sig="iiiiiii";function ___syscall_fchdir(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.chdir(r.path),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_fchdir.sig="ii";function ___syscall_fchmod(e,r){try{return FS.fchmod(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_fchmod.sig="iii";function ___syscall_fchmodat(e,r,t,n){r>>>=0,n>>>=0,SYSCALLS.varargs=n;try{return r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),FS.chmod(r,t),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_fchmodat.sig="iipip";function ___syscall_fchown32(e,r,t){try{return FS.fchown(e,r,t),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fchown32.sig="iiii";function ___syscall_fchownat(e,r,t,n,a){r>>>=0;try{r=SYSCALLS.getStr(r);var o=a&256;return a=a&-257,r=SYSCALLS.calculateAt(e,r),(o?FS.lchown:FS.chown)(r,t,n),0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_fchownat.sig="iipiii";function ___syscall_fcntl64(e,r,t){t>>>=0,SYSCALLS.varargs=t;try{var n=SYSCALLS.getStreamFromFD(e);switch(r){case 0:{var a=SYSCALLS.get();if(a<0)return-28;for(;FS.streams[a];)a++;var o;return o=FS.createStream(n,a),o.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var a=SYSCALLS.get();return n.flags|=a,0}case 12:{var a=SYSCALLS.getp(),_=0;return HEAP16[a+_>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_fcntl64.sig="iiip";function ___syscall_fdatasync(e){try{var r=SYSCALLS.getStreamFromFD(e);return 0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_fdatasync.sig="ii";function ___syscall_fstat64(e,r){r>>>=0;try{var t=SYSCALLS.getStreamFromFD(e);return SYSCALLS.doStat(FS.stat,t.path,r)}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fstat64.sig="iip";function ___syscall_statfs64(e,r,t){e>>>=0,r>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),HEAP32[t+4>>>2>>>0]=4096,HEAP32[t+40>>>2>>>0]=4096,HEAP32[t+8>>>2>>>0]=1e6,HEAP32[t+12>>>2>>>0]=5e5,HEAP32[t+16>>>2>>>0]=5e5,HEAP32[t+20>>>2>>>0]=FS.nextInode,HEAP32[t+24>>>2>>>0]=1e6,HEAP32[t+28>>>2>>>0]=42,HEAP32[t+44>>>2>>>0]=2,HEAP32[t+36>>>2>>>0]=255,0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_statfs64.sig="ippp";function ___syscall_fstatfs64(e,r,t){r>>>=0,t>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);return ___syscall_statfs64(0,r,t)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_fstatfs64.sig="iipp";function ___syscall_ftruncate64(e,r,t){var n=convertI32PairToI53Checked(r,t);try{return isNaN(n)?61:(FS.ftruncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_ftruncate64.sig="iiii";var stringToUTF8=(e,r,t)=>stringToUTF8Array(e,HEAPU8,r,t);function ___syscall_getcwd(e,r){e>>>=0,r>>>=0;try{if(r===0)return-28;var t=FS.cwd(),n=lengthBytesUTF8(t)+1;return r"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_getcwd.sig="ipp";function ___syscall_getdents64(e,r,t){r>>>=0,t>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);n.getdents||(n.getdents=FS.readdir(n.path));for(var a=280,o=0,_=FS.llseek(n,0,1),l=Math.floor(_/a);l>>0,(tempDouble=c,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+o>>>2>>>0]=tempI64[0],HEAP32[r+o+4>>>2>>>0]=tempI64[1],tempI64=[(l+1)*a>>>0,(tempDouble=(l+1)*a,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+o+8>>>2>>>0]=tempI64[0],HEAP32[r+o+12>>>2>>>0]=tempI64[1],HEAP16[r+o+16>>>1>>>0]=280,HEAP8[r+o+18>>>0]=u,stringToUTF8(d,r+o+19,256),o+=a,l+=1}return FS.llseek(n,l*a,0),o}catch(m){if(typeof FS>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}___syscall_getdents64.sig="iipp";function ___syscall_getpeername(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e);if(!_.daddr)return-53;var l=writeSockaddr(r,_.family,DNS.lookup_name(_.daddr),_.dport,t);return 0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_getpeername.sig="iippiii";function ___syscall_getsockname(e,r,t,n,a,o){r>>>=0,t>>>=0;try{var _=getSocketFromFD(e),l=writeSockaddr(r,_.family,DNS.lookup_name(_.saddr||"0.0.0.0"),_.sport,t);return 0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_getsockname.sig="iippiii";function ___syscall_getsockopt(e,r,t,n,a,o){n>>>=0,a>>>=0;try{var _=getSocketFromFD(e);return r===1&&t===4?(HEAP32[n>>>2>>>0]=_.error,HEAP32[a>>>2>>>0]=4,_.error=null,0):-50}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_getsockopt.sig="iiiippi";function ___syscall_ioctl(e,r,t){t>>>=0,SYSCALLS.varargs=t;try{var n=SYSCALLS.getStreamFromFD(e);switch(r){case 21509:return n.tty?0:-59;case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),o=SYSCALLS.getp();HEAP32[o>>>2>>>0]=a.c_iflag||0,HEAP32[o+4>>>2>>>0]=a.c_oflag||0,HEAP32[o+8>>>2>>>0]=a.c_cflag||0,HEAP32[o+12>>>2>>>0]=a.c_lflag||0;for(var _=0;_<32;_++)HEAP8[o+_+17>>>0]=a.c_cc[_]||0;return 0}return 0}case 21510:case 21511:case 21512:return n.tty?0:-59;case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){for(var o=SYSCALLS.getp(),l=HEAP32[o>>>2>>>0],c=HEAP32[o+4>>>2>>>0],u=HEAP32[o+8>>>2>>>0],d=HEAP32[o+12>>>2>>>0],p=[],_=0;_<32;_++)p.push(HEAP8[o+_+17>>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:l,c_oflag:c,c_cflag:u,c_lflag:d,c_cc:p})}return 0}case 21519:{if(!n.tty)return-59;var o=SYSCALLS.getp();return HEAP32[o>>>2>>>0]=0,0}case 21520:return n.tty?-28:-59;case 21531:{var o=SYSCALLS.getp();return FS.ioctl(n,r,o)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty),o=SYSCALLS.getp();HEAP16[o>>>1>>>0]=f[0],HEAP16[o+2>>>1>>>0]=f[1]}return 0}case 21524:return n.tty?0:-59;case 21515:return n.tty?0:-59;default:return-28}}catch(m){if(typeof FS>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}___syscall_ioctl.sig="iiip";function ___syscall_listen(e,r){try{var t=getSocketFromFD(e);return t.sock_ops.listen(t,r),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_listen.sig="iiiiiii";function ___syscall_lstat64(e,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.lstat,e,r)}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_lstat64.sig="ipp";function ___syscall_mkdirat(e,r,t){r>>>=0;try{return r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),r=PATH.normalize(r),r[r.length-1]==="/"&&(r=r.substr(0,r.length-1)),FS.mkdir(r,t,0),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_mkdirat.sig="iipi";function ___syscall_mknodat(e,r,t,n){r>>>=0;try{switch(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),t&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(r,t,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_mknodat.sig="iipii";function ___syscall_newfstatat(e,r,t,n){r>>>=0,t>>>=0;try{r=SYSCALLS.getStr(r);var a=n&256,o=n&4096;return n=n&-6401,r=SYSCALLS.calculateAt(e,r,o),SYSCALLS.doStat(a?FS.lstat:FS.stat,r,t)}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_newfstatat.sig="iippi";function ___syscall_openat(e,r,t,n){r>>>=0,n>>>=0,SYSCALLS.varargs=n;try{r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r);var a=n?SYSCALLS.get():0;return FS.open(r,t,a).fd}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_openat.sig="iipip";var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount(e){return FS.createNode(null,"/",16895,0)},createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var r=PIPEFS.nextname(),t=PIPEFS.nextname(),n=FS.createNode(PIPEFS.root,r,4096,0),a=FS.createNode(PIPEFS.root,t,4096,0);n.pipe=e,a.pipe=e;var o=FS.createStream({path:r,node:n,flags:0,seekable:!1,stream_ops:PIPEFS.stream_ops});n.stream=o;var _=FS.createStream({path:t,node:a,flags:1,seekable:!1,stream_ops:PIPEFS.stream_ops});return a.stream=_,{readable_fd:o.fd,writable_fd:_.fd}},stream_ops:{poll(e){var r=e.node.pipe;if((e.flags&2097155)===1)return 260;if(r.buckets.length>0)for(var t=0;t0)return 65}return 0},ioctl(e,r,t){return 28},fsync(e){return 28},read(e,r,t,n,a){for(var o=e.node.pipe,_=0,l=0;l=l)return c.buffer.set(_,c.offset),c.offset+=l,l;u>0&&(c.buffer.set(_.subarray(0,u),c.offset),c.offset+=u,_=_.subarray(u,_.byteLength));for(var d=_.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0,p=_.byteLength%PIPEFS.BUCKET_BUFFER_SIZE,f=0;f0){var m={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:_.byteLength,roffset:0};o.buckets.push(m),m.buffer.set(_)}return l},close(e){var r=e.node.pipe;r.refcnt--,r.refcnt===0&&(r.buckets=null)}},nextname(){return PIPEFS.nextname.current||(PIPEFS.nextname.current=0),"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall_pipe(e){e>>>=0;try{if(e==0)throw new FS.ErrnoError(21);var r=PIPEFS.createPipe();return HEAP32[e>>>2>>>0]=r.readable_fd,HEAP32[e+4>>>2>>>0]=r.writable_fd,0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_pipe.sig="ip";function ___syscall_poll(e,r,t){e>>>=0;try{for(var n=0,a=0;a>>2>>>0],l=HEAP16[o+4>>>1>>>0],c=32,u=FS.getStream(_);u&&(c=SYSCALLS.DEFAULT_POLLMASK,u.stream_ops.poll&&(c=u.stream_ops.poll(u,-1))),c&=l|8|16,c&&n++,HEAP16[o+6>>>1>>>0]=c}return n}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_poll.sig="ipii";function ___syscall_readlinkat(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;try{if(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),n<=0)return-28;var a=FS.readlink(r),o=Math.min(n,lengthBytesUTF8(a)),_=HEAP8[t+o>>>0];return stringToUTF8(a,t,n+1),HEAP8[t+o>>>0]=_,o}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_readlinkat.sig="iippp";function ___syscall_recvfrom(e,r,t,n,a,o){r>>>=0,t>>>=0,a>>>=0,o>>>=0;try{var _=getSocketFromFD(e),l=_.sock_ops.recvmsg(_,t);if(!l)return 0;if(a)var c=writeSockaddr(a,_.family,DNS.lookup_name(l.addr),l.port,o);return HEAPU8.set(l.buffer,r>>>0),l.buffer.byteLength}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_recvfrom.sig="iippipp";function ___syscall_recvmsg(e,r,t,n,a,o){r>>>=0;try{for(var _=getSocketFromFD(e),l=HEAPU32[r+8>>>2>>>0],c=HEAP32[r+12>>>2>>>0],u=0,d=0;d>>2>>>0];var p=_.sock_ops.recvmsg(_,u);if(!p)return 0;var f=HEAPU32[r>>>2>>>0];if(f)var m=writeSockaddr(f,_.family,DNS.lookup_name(p.addr),p.port);for(var g=0,v=p.buffer.byteLength,d=0;v>0&&d>>2>>>0],y=HEAP32[l+(8*d+4)>>>2>>>0];if(y){var h=Math.min(y,v),b=p.buffer.subarray(g,g+h);HEAPU8.set(b,S+g>>>0),g+=h,v-=h}}return g}catch(w){if(typeof FS>"u"||w.name!=="ErrnoError")throw w;return-w.errno}}___syscall_recvmsg.sig="iipiiii";function ___syscall_renameat(e,r,t,n){r>>>=0,n>>>=0;try{return r=SYSCALLS.getStr(r),n=SYSCALLS.getStr(n),r=SYSCALLS.calculateAt(e,r),n=SYSCALLS.calculateAt(t,n),FS.rename(r,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_renameat.sig="iipip";function ___syscall_rmdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.rmdir(e),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_rmdir.sig="ip";function ___syscall_sendmsg(e,r,t,n,a,o){r>>>=0,n>>>=0,a>>>=0;try{var _=getSocketFromFD(e),l=HEAPU32[r+8>>>2>>>0],c=HEAP32[r+12>>>2>>>0],u,d,p=HEAPU32[r>>>2>>>0],f=HEAP32[r+4>>>2>>>0];if(p){var m=readSockaddr(p,f);if(m.errno)return-m.errno;d=m.port,u=DNS.lookup_addr(m.addr)||m.addr}for(var g=0,v=0;v>>2>>>0];for(var S=new Uint8Array(g),y=0,v=0;v>>2>>>0],b=HEAP32[l+(8*v+4)>>>2>>>0],w=0;w>>0];return _.sock_ops.sendmsg(_,S,0,g,u,d)}catch(k){if(typeof FS>"u"||k.name!=="ErrnoError")throw k;return-k.errno}}___syscall_sendmsg.sig="iipippi";function ___syscall_sendto(e,r,t,n,a,o){r>>>=0,t>>>=0,a>>>=0,o>>>=0;try{var _=getSocketFromFD(e),l=getSocketAddress(a,o,!0);return l?_.sock_ops.sendmsg(_,HEAP8,r,t,l.addr,l.port):FS.write(_.stream,HEAP8,r,t)}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_sendto.sig="iippipp";function ___syscall_socket(e,r,t){try{var n=SOCKFS.createSocket(e,r,t);return n.stream.fd}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_socket.sig="iiiiiii";function ___syscall_stat64(e,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.stat,e,r)}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_stat64.sig="ipp";function ___syscall_symlink(e,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),r=SYSCALLS.getStr(r),FS.symlink(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_symlink.sig="ipp";function ___syscall_symlinkat(e,r,t){e>>>=0,t>>>=0;try{return t=SYSCALLS.calculateAt(r,t),FS.symlink(e,t),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_symlinkat.sig="ipip";function ___syscall_truncate64(e,r,t){e>>>=0;var n=convertI32PairToI53Checked(r,t);try{return isNaN(n)?61:(e=SYSCALLS.getStr(e),FS.truncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_truncate64.sig="ipii";function ___syscall_unlinkat(e,r,t){r>>>=0;try{return r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r),t===0?FS.unlink(r):t===512?FS.rmdir(r):abort("Invalid flags passed to unlinkat"),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_unlinkat.sig="iipi";var readI53FromI64=e=>HEAPU32[e>>>2>>>0]+HEAP32[e+4>>>2>>>0]*4294967296;function ___syscall_utimensat(e,r,t,n){r>>>=0,t>>>=0;try{if(r=SYSCALLS.getStr(r),r=SYSCALLS.calculateAt(e,r,!0),t){var _=readI53FromI64(t),l=HEAP32[t+8>>>2>>>0];a=_*1e3+l/1e6,t+=16,_=readI53FromI64(t),l=HEAP32[t+8>>>2>>>0],o=_*1e3+l/1e6}else var a=Date.now(),o=a;return FS.utime(r,a,o),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_utimensat.sig="iippi";var ___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),ENV={},stringToUTF8OnStack=e=>{var r=lengthBytesUTF8(e)+1,t=stackAlloc(r);return stringToUTF8(e,t,r),t},withStackSave=e=>{var r=stackSave(),t=e();return stackRestore(r),t},dlSetError=e=>{withStackSave(()=>{var r=stringToUTF8OnStack(e);___dl_seterr(r,0)})},dlopenInternal=(e,r)=>{var t=UTF8ToString(e+36),n=HEAP32[e+4>>>2>>>0];t=PATH.normalize(t);var a=[],o=!!(n&256),_=o?null:{},l={global:o,nodelete:!!(n&4096),loadAsync:r.loadAsync};if(r.loadAsync)return loadDynamicLibrary(t,l,_,e);try{return loadDynamicLibrary(t,l,_,e)}catch(c){return dlSetError("Could not load dynamic lib: ".concat(t,"\n").concat(c)),0}};function __dlopen_js(e){return e>>>=0,dlopenInternal(e,{loadAsync:!1})}__dlopen_js.sig="pp";function __dlsym_js(e,r,t){e>>>=0,r>>>=0,t>>>=0,r=UTF8ToString(r);var n,a,o=LDSO.loadedLibsByHandle[e];if(!o.exports.hasOwnProperty(r)||o.exports[r].stub)return dlSetError('Tried to lookup unknown symbol "'.concat(r,'" in dynamic lib: ').concat(o.name)),0;a=Object.keys(o.exports).indexOf(r);var _="orig$"+r;if(n=o.exports[_],n?a=Object.keys(o.exports).indexOf(_):n=o.exports[r],typeof n=="function"){var l=getFunctionAddress(n);l?n=l:(n=addFunction(n,n.sig),HEAPU32[t>>>2>>>0]=a)}return n}__dlsym_js.sig="pppp";function __embind_register_bigint(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0}__embind_register_bigint.sig="vpppiiii";var embind_init_charCodes=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);embind_charCodes=e},embind_charCodes,readLatin1String=e=>{for(var r="",t=e;HEAPU8[t>>>0];)r+=embind_charCodes[HEAPU8[t++>>>0]];return r},awaitingDependencies={},registeredTypes={},typeDependencies={},BindingError,throwBindingError=e=>{throw new BindingError(e)},InternalError,throwInternalError=e=>{throw new InternalError(e)},whenDependentTypesAreResolved=(e,r,t)=>{e.forEach(function(l){typeDependencies[l]=r});function n(l){var c=t(l);c.length!==e.length&&throwInternalError("Mismatched type converter count");for(var u=0;u{registeredTypes.hasOwnProperty(l)?a[c]=registeredTypes[l]:(o.push(l),awaitingDependencies.hasOwnProperty(l)||(awaitingDependencies[l]=[]),awaitingDependencies[l].push(()=>{a[c]=registeredTypes[l],++_,_===o.length&&n(a)}))}),o.length===0&&n(a)};function sharedRegisterType(e,r,t={}){var n=r.name;if(e||throwBindingError('type "'.concat(n,'" must have a positive integer typeid pointer')),registeredTypes.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '".concat(n,"' twice"))}if(registeredTypes[e]=r,delete typeDependencies[e],awaitingDependencies.hasOwnProperty(e)){var a=awaitingDependencies[e];delete awaitingDependencies[e],a.forEach(o=>o())}}function registerType(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return sharedRegisterType(e,r,t)}var GenericWireTypeSize=8;function __embind_register_bool(e,r,t,n){e>>>=0,r>>>=0,r=readLatin1String(r),registerType(e,{name:r,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?t:n},argPackAdvance:GenericWireTypeSize,readValueFromPointer:function(a){return this.fromWireType(HEAPU8[a>>>0])},destructorFunction:null})}__embind_register_bool.sig="vppii";var emval_freelist=[],emval_handles=[];function __emval_decref(e){e>>>=0,e>9&&--emval_handles[e+1]===0&&(emval_handles[e]=void 0,emval_freelist.push(e))}__emval_decref.sig="vp";var count_emval_handles=()=>emval_handles.length/2-5-emval_freelist.length,init_emval=()=>{emval_handles.push(0,1,void 0,1,null,1,!0,1,!1,1),Module.count_emval_handles=count_emval_handles},Emval={toValue:e=>(e||throwBindingError("Cannot use deleted val. handle = "+e),emval_handles[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let r=emval_freelist.pop()||emval_handles.length;return emval_handles[r]=e,emval_handles[r+1]=1,r}}}};function readPointer(e){return this.fromWireType(HEAPU32[e>>>2>>>0])}var EmValType={name:"emscripten::val",fromWireType:e=>{var r=Emval.toValue(e);return __emval_decref(e),r},toWireType:(e,r)=>Emval.toHandle(r),argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:null};function __embind_register_emval(e){return e>>>=0,registerType(e,EmValType)}__embind_register_emval.sig="vp";var embindRepr=e=>{if(e===null)return"null";var r=typeof e;return r==="object"||r==="array"||r==="function"?e.toString():""+e},floatReadValueFromPointer=(e,r)=>{switch(r){case 4:return function(t){return this.fromWireType(HEAPF32[t>>>2>>>0])};case 8:return function(t){return this.fromWireType(HEAPF64[t>>>3>>>0])};default:throw new TypeError("invalid float width (".concat(r,"): ").concat(e))}},__embind_register_float=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,r=readLatin1String(r),registerType(e,{name:r,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:GenericWireTypeSize,readValueFromPointer:floatReadValueFromPointer(r,t),destructorFunction:null})};__embind_register_float.sig="vppp";var integerReadValueFromPointer=(e,r,t)=>{switch(r){case 1:return t?n=>HEAP8[n>>>0]:n=>HEAPU8[n>>>0];case 2:return t?n=>HEAP16[n>>>1>>>0]:n=>HEAPU16[n>>>1>>>0];case 4:return t?n=>HEAP32[n>>>2>>>0]:n=>HEAPU32[n>>>2>>>0];default:throw new TypeError("invalid integer width (".concat(r,"): ").concat(e))}};function __embind_register_integer(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,r=readLatin1String(r),a===-1&&(a=4294967295);var o=d=>d;if(n===0){var _=32-8*t;o=d=>d<<_>>>_}var l=r.includes("unsigned"),c=(d,p)=>{},u;l?u=function(d,p){return c(p,this.name),p>>>0}:u=function(d,p){return c(p,this.name),p},registerType(e,{name:r,fromWireType:o,toWireType:u,argPackAdvance:GenericWireTypeSize,readValueFromPointer:integerReadValueFromPointer(r,t,n!==0),destructorFunction:null})}__embind_register_integer.sig="vpppii";function __embind_register_memory_view(e,r,t){e>>>=0,t>>>=0;var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[r];function o(_){var l=HEAPU32[_>>>2>>>0],c=HEAPU32[_+4>>>2>>>0];return new a(HEAP8.buffer,c,l)}t=readLatin1String(t),registerType(e,{name:t,fromWireType:o,argPackAdvance:GenericWireTypeSize,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}__embind_register_memory_view.sig="vpip";function __embind_register_std_string(e,r){e>>>=0,r>>>=0,r=readLatin1String(r);var t=r==="std::string";registerType(e,{name:r,fromWireType(n){var a=HEAPU32[n>>>2>>>0],o=n+4,_;if(t)for(var l=o,c=0;c<=a;++c){var u=o+c;if(c==a||HEAPU8[u>>>0]==0){var d=u-l,p=UTF8ToString(l,d);_===void 0?_=p:(_+="\0",_+=p),l=u+1}}else{for(var f=new Array(a),c=0;c>>0]);_=f.join("")}return _free(n),_},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,_=typeof a=="string";_||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||throwBindingError("Cannot pass non-string to std::string"),t&&_?o=lengthBytesUTF8(a):o=a.length;var l=_malloc(4+o+1),c=l+4;if(HEAPU32[l>>>2>>>0]=o,t&&_)stringToUTF8(a,c,o+1);else if(_)for(var u=0;u255&&(_free(c),throwBindingError("String has UTF-16 code units that do not fit in 8 bits")),HEAPU8[c+u>>>0]=d}else for(var u=0;u>>0]=a[u];return n!==null&&n.push(_free,l),l},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(n){_free(n)}})}__embind_register_std_string.sig="vpp";var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,UTF16ToString=(e,r)=>{for(var t=e,n=t>>1,a=n+r/2;!(n>=a)&&HEAPU16[n>>>0];)++n;if(t=n<<1,t-e>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(e>>>0,t>>>0));for(var o="",_=0;!(_>=r/2);++_){var l=HEAP16[e+_*2>>>1>>>0];if(l==0)break;o+=String.fromCharCode(l)}return o},stringToUTF16=(e,r,t)=>{if(t!=null||(t=2147483647),t<2)return 0;t-=2;for(var n=r,a=t>>1>>>0]=_,r+=2}return HEAP16[r>>>1>>>0]=0,r-n},lengthBytesUTF16=e=>e.length*2,UTF32ToString=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var a=HEAP32[e+t*4>>>2>>>0];if(a==0)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},stringToUTF32=(e,r,t)=>{if(r>>>=0,t!=null||(t=2147483647),t<4)return 0;for(var n=r,a=n+t-4,o=0;o=55296&&_<=57343){var l=e.charCodeAt(++o);_=65536+((_&1023)<<10)|l&1023}if(HEAP32[r>>>2>>>0]=_,r+=4,r+4>a)break}return HEAP32[r>>>2>>>0]=0,r-n},lengthBytesUTF32=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},__embind_register_std_wstring=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,t=readLatin1String(t);var n,a,o,_;r===2?(n=UTF16ToString,a=stringToUTF16,_=lengthBytesUTF16,o=l=>HEAPU16[l>>>1>>>0]):r===4&&(n=UTF32ToString,a=stringToUTF32,_=lengthBytesUTF32,o=l=>HEAPU32[l>>>2>>>0]),registerType(e,{name:t,fromWireType:l=>{for(var c=HEAPU32[l>>>2>>>0],u,d=l+4,p=0;p<=c;++p){var f=l+4+p*r;if(p==c||o(f)==0){var m=f-d,g=n(d,m);u===void 0?u=g:(u+="\0",u+=g),d=f+r}}return _free(l),u},toWireType:(l,c)=>{typeof c!="string"&&throwBindingError("Cannot pass non-string to C++ string type ".concat(t));var u=_(c),d=_malloc(4+u+r);return HEAPU32[d>>>2>>>0]=u/r,a(c,d+4,u+r),l!==null&&l.push(_free,d),d},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(l){_free(l)}})};__embind_register_std_wstring.sig="vppp";var __embind_register_void=function(e,r){e>>>=0,r>>>=0,r=readLatin1String(r),registerType(e,{isVoid:!0,name:r,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})};__embind_register_void.sig="vpp";var handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},runtimeKeepaliveCounter=0,keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{var r;EXITSTATUS=e,keepRuntimeAlive()||((r=Module.onExit)==null||r.call(Module,e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,r)=>{EXITSTATUS=e,_proc_exit(e)},_exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},callUserCallback=e=>{if(!ABORT)try{e(),maybeExit()}catch(r){handleException(r)}};function __emscripten_dlopen_js(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;function a(l){var c=UTF8ToString(e+36);dlSetError("'Could not load dynamic lib: ".concat(c,"\n").concat(l)),callUserCallback(()=>getWasmTableEntry(t)(e,n))}function o(){callUserCallback(()=>getWasmTableEntry(r)(e,n))}var _=dlopenInternal(e,{loadAsync:!0});_?_.then(o,a):a()}__emscripten_dlopen_js.sig="vpppp";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";function __emscripten_get_progname(e,r){e>>>=0,stringToUTF8(thisProgram,e,r)}__emscripten_get_progname.sig="vpi";function __emscripten_lookup_name(e){e>>>=0;var r=UTF8ToString(e);return inetPton4(DNS.lookup_name(r))}__emscripten_lookup_name.sig="ip";var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";function __emscripten_set_offscreencanvas_size(e,r,t){return e>>>=0,-1}__emscripten_set_offscreencanvas_size.sig="ipii";function __emscripten_system(e){if(e>>>=0,ENVIRONMENT_IS_NODE){if(!e)return 1;var r=UTF8ToString(e);if(!r.length)return 0;var t=["child_process"].map(Y),n=t.spawnSync(r,[],{shell:!0,stdio:"inherit"}),a=(_,l)=>_<<8|l;if(n.status===null){var o=_=>{switch(_){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2};return a(0,o(n.signal))}return a(n.status,0)}return e?-52:0}__emscripten_system.sig="ip";function __gmtime_js(e,r,t){var n=convertI32PairToI53Checked(e,r);t>>>=0;var a=new Date(n*1e3);HEAP32[t>>>2>>>0]=a.getUTCSeconds(),HEAP32[t+4>>>2>>>0]=a.getUTCMinutes(),HEAP32[t+8>>>2>>>0]=a.getUTCHours(),HEAP32[t+12>>>2>>>0]=a.getUTCDate(),HEAP32[t+16>>>2>>>0]=a.getUTCMonth(),HEAP32[t+20>>>2>>>0]=a.getUTCFullYear()-1900,HEAP32[t+24>>>2>>>0]=a.getUTCDay();var o=Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0),_=(a.getTime()-o)/(1e3*60*60*24)|0;HEAP32[t+28>>>2>>>0]=_}__gmtime_js.sig="viip";var isLeapYear=e=>e%4===0&&(e%100!==0||e%400===0),MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335],MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334],ydayFromDate=e=>{var r=isLeapYear(e.getFullYear()),t=r?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE,n=t[e.getMonth()]+e.getDate()-1;return n};function __localtime_js(e,r,t){var n=convertI32PairToI53Checked(e,r);t>>>=0;var a=new Date(n*1e3);HEAP32[t>>>2>>>0]=a.getSeconds(),HEAP32[t+4>>>2>>>0]=a.getMinutes(),HEAP32[t+8>>>2>>>0]=a.getHours(),HEAP32[t+12>>>2>>>0]=a.getDate(),HEAP32[t+16>>>2>>>0]=a.getMonth(),HEAP32[t+20>>>2>>>0]=a.getFullYear()-1900,HEAP32[t+24>>>2>>>0]=a.getDay();var o=ydayFromDate(a)|0;HEAP32[t+28>>>2>>>0]=o,HEAP32[t+36>>>2>>>0]=-(a.getTimezoneOffset()*60);var _=new Date(a.getFullYear(),0,1),l=new Date(a.getFullYear(),6,1).getTimezoneOffset(),c=_.getTimezoneOffset(),u=(l!=c&&a.getTimezoneOffset()==Math.min(c,l))|0;HEAP32[t+32>>>2>>>0]=u}__localtime_js.sig="viip";var __mktime_js=function(e){e>>>=0;var r=(()=>{var t=new Date(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=HEAP32[e+32>>>2>>>0],a=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),_=new Date(t.getFullYear(),6,1).getTimezoneOffset(),l=o.getTimezoneOffset(),c=Math.min(l,_);if(n<0)HEAP32[e+32>>>2>>>0]=+(_!=l&&c==a);else if(n>0!=(c==a)){var u=Math.max(l,_),d=n>0?c:u;t.setTime(t.getTime()+(d-a)*6e4)}HEAP32[e+24>>>2>>>0]=t.getDay();var p=ydayFromDate(t)|0;HEAP32[e+28>>>2>>>0]=p,HEAP32[e>>>2>>>0]=t.getSeconds(),HEAP32[e+4>>>2>>>0]=t.getMinutes(),HEAP32[e+8>>>2>>>0]=t.getHours(),HEAP32[e+12>>>2>>>0]=t.getDate(),HEAP32[e+16>>>2>>>0]=t.getMonth(),HEAP32[e+20>>>2>>>0]=t.getYear();var f=t.getTime();return isNaN(f)?-1:f/1e3})();return setTempRet0((tempDouble=r,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),r>>>0};__mktime_js.sig="ip";function __mmap_js(e,r,t,n,a,o,_,l){e>>>=0;var c=convertI32PairToI53Checked(a,o);_>>>=0,l>>>=0;try{if(isNaN(c))return 61;var u=SYSCALLS.getStreamFromFD(n),d=FS.mmap(u,e,c,r,t),p=d.ptr;return HEAP32[_>>>2>>>0]=d.allocated,HEAPU32[l>>>2>>>0]=p,0}catch(f){if(typeof FS>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}__mmap_js.sig="ipiiiiipp";function __msync_js(e,r,t,n,a,o,_){e>>>=0,r>>>=0;var l=convertI32PairToI53Checked(o,_);try{return isNaN(l)?61:(SYSCALLS.doMsync(e,SYSCALLS.getStreamFromFD(a),r,n,l),0)}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}__msync_js.sig="ippiiiii";function __munmap_js(e,r,t,n,a,o,_){e>>>=0,r>>>=0;var l=convertI32PairToI53Checked(o,_);try{if(isNaN(l))return 61;var c=SYSCALLS.getStreamFromFD(a);t&2&&SYSCALLS.doMsync(e,c,r,n,l),FS.munmap(c)}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}__munmap_js.sig="ippiiiii";var timers={},_emscripten_get_now;_emscripten_get_now=()=>performance.now(),_emscripten_get_now.sig="d";var __setitimer_js=(e,r)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!r)return 0;var t=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},r);return timers[e]={id:t,timeout_ms:r},0};__setitimer_js.sig="iid";var __timegm_js=function(e){e>>>=0;var r=(()=>{var t=Date.UTC(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=new Date(t);HEAP32[e+24>>>2>>>0]=n.getUTCDay();var a=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),o=(n.getTime()-a)/(1e3*60*60*24)|0;return HEAP32[e+28>>>2>>>0]=o,n.getTime()/1e3})();return setTempRet0((tempDouble=r,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),r>>>0};__timegm_js.sig="ip";var stringToNewUTF8=e=>{var r=lengthBytesUTF8(e)+1,t=_malloc(r);return t&&stringToUTF8(e,t,r),t};function __tzset_js(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=new Date().getFullYear(),a=new Date(n,0,1),o=new Date(n,6,1),_=a.getTimezoneOffset(),l=o.getTimezoneOffset(),c=Math.max(_,l);HEAPU32[e>>>2>>>0]=c*60,HEAP32[r>>>2>>>0]=+(_!=l);function u(g){var v=g.toTimeString().match(/\(([A-Za-z ]+)\)$/);return v?v[1]:"GMT"}var d=u(a),p=u(o),f=stringToNewUTF8(d),m=stringToNewUTF8(p);l<_?(HEAPU32[t>>>2>>>0]=f,HEAPU32[t+4>>>2>>>0]=m):(HEAPU32[t>>>2>>>0]=m,HEAPU32[t+4>>>2>>>0]=f)}__tzset_js.sig="vppp";var _abort=()=>{abort("")};_abort.sig="v";var _emscripten_set_main_loop_timing=(e,r)=>{if(Browser.mainLoop.timingMode=e,Browser.mainLoop.timingValue=r,!Browser.mainLoop.func)return 1;if(Browser.mainLoop.running||(Browser.mainLoop.running=!0),e==0)Browser.mainLoop.scheduler=function(){var _=Math.max(0,Browser.mainLoop.tickStartTime+r-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,_)},Browser.mainLoop.method="timeout";else if(e==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(e==2){if(typeof Browser.setImmediate>"u")if(typeof setImmediate>"u"){var t=[],n="setimmediate",a=o=>{(o.data===n||o.data.target===n)&&(o.stopPropagation(),t.shift()())};addEventListener("message",a,!0),Browser.setImmediate=function(_){t.push(_),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(_),postMessage({target:n})):postMessage(n,"*")}}else Browser.setImmediate=setImmediate;Browser.mainLoop.scheduler=function(){Browser.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0};_emscripten_set_main_loop_timing.sig="iii";var setMainLoop=(e,r,t,n,a)=>{assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=e,Browser.mainLoop.arg=n;var o=Browser.mainLoop.currentlyRunningMainloop;function _(){return!(o0){var c=Date.now(),u=Browser.mainLoop.queue.shift();if(u.func(u.arg),Browser.mainLoop.remainingBlockers){var d=Browser.mainLoop.remainingBlockers,p=d%1==0?d-1:Math.floor(d);u.counted?Browser.mainLoop.remainingBlockers=p:(p=p+.5,Browser.mainLoop.remainingBlockers=(8*d+p)/9)}if(Browser.mainLoop.updateStatus(),!_())return;setTimeout(Browser.mainLoop.runner,0);return}if(_()){if(Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0,Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.runIter(e),_()&&(typeof SDL=="object"&&((m=(f=SDL.audio)==null?void 0:f.queueNewAudioData)==null||m.call(f)),Browser.mainLoop.scheduler())}}},a||(r&&r>0?_emscripten_set_main_loop_timing(0,1e3/r):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),t)throw"unwind"},safeSetTimeout=(e,r)=>setTimeout(()=>{callUserCallback(e)},r),warnOnce=e=>{warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,ENVIRONMENT_IS_NODE&&(e="warning: "+e),err(e))},Browser={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume(){Browser.mainLoop.currentlyRunningMainloop++;var e=Browser.mainLoop.timingMode,r=Browser.mainLoop.timingValue,t=Browser.mainLoop.func;Browser.mainLoop.func=null,setMainLoop(t,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(e,r),Browser.mainLoop.scheduler()},updateStatus(){if(Module.setStatus){var e=Module.statusMessage||"Please wait...",r=Browser.mainLoop.remainingBlockers,t=Browser.mainLoop.expectedBlockers;r?r{assert(p.complete,"Image ".concat(_," could not be decoded"));var f=document.createElement("canvas");f.width=p.width,f.height=p.height;var m=f.getContext("2d");m.drawImage(p,0,0),preloadedImages[_]=f,URL.revokeObjectURL(d),l==null||l(o)},p.onerror=f=>{err("Image ".concat(d," could not be decoded")),c==null||c()},p.src=d},preloadPlugins.push(e);var r={};r.canHandle=function(o){return!Module.noAudioDecoding&&o.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},r.handle=function(o,_,l,c){var u=!1;function d(v){u||(u=!0,preloadedAudios[_]=v,l==null||l(o))}function p(){u||(u=!0,preloadedAudios[_]=new Audio,c==null||c())}var f=new Blob([o],{type:Browser.getMimetype(_)}),m=URL.createObjectURL(f),g=new Audio;g.addEventListener("canplaythrough",()=>d(g),!1),g.onerror=function(S){if(u)return;err("warning: browser could not fully decode audio ".concat(_,", trying slower base64 approach"));function y(h){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="=",k="",L=0,E=0,x=0;x=6;){var A=L>>E-6&63;E-=6,k+=b[A]}return E==2?(k+=b[(L&3)<<4],k+=w+w):E==4&&(k+=b[(L&15)<<2],k+=w),k}g.src="data:audio/x-"+_.substr(-3)+";base64,"+y(o),d(g)},g.src=m,safeSetTimeout(()=>{d(g)},1e4)},preloadPlugins.push(r);function t(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var n=Module.canvas;n&&(n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock||n.msRequestPointerLock||(()=>{}),n.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),n.exitPointerLock=n.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),Module.elementPointerLock&&n.addEventListener("click",a=>{!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext(e,r,t,n){if(r&&Module.ctx&&e==Module.canvas)return Module.ctx;var a,o;if(r){var _={antialias:!1,alpha:!1,majorVersion:1};if(n)for(var l in n)_[l]=n[l];typeof GL<"u"&&(o=GL.createContext(e,_),o&&(a=GL.getContext(o).GLctx))}else a=e.getContext("2d");return a?(t&&(r||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,r&&GL.makeContextCurrent(o),Module.useWebGL=r,Browser.moduleContextCreatedCallbacks.forEach(c=>c()),Browser.init()),a):null},destroyContext(e,r,t){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen(e,r){Browser.lockPointer=e,Browser.resizeCanvas=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1);var t=Module.canvas;function n(){var _,l;Browser.isFullscreen=!1;var o=t.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===o?(t.exitFullscreen=Browser.exitFullscreen,Browser.lockPointer&&t.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas?Browser.setFullscreenCanvasSize():Browser.updateCanvasDimensions(t)):(o.parentNode.insertBefore(t,o),o.parentNode.removeChild(o),Browser.resizeCanvas?Browser.setWindowedCanvasSize():Browser.updateCanvasDimensions(t)),(_=Module.onFullScreen)==null||_.call(Module,Browser.isFullscreen),(l=Module.onFullscreen)==null||l.call(Module,Browser.isFullscreen)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");t.parentNode.insertBefore(a,t),a.appendChild(t),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?()=>a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(a.webkitRequestFullScreen?()=>a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),a.requestFullscreen()},exitFullscreen(){if(!Browser.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{});return e.apply(document,[]),!0},nextRAF:0,fakeRequestAnimationFrame(e){var r=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=r+1e3/60;else for(;r+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var t=Math.max(Browser.nextRAF-r,0);setTimeout(e,t)},requestAnimationFrame(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var r=Browser.fakeRequestAnimationFrame;r(e)},safeSetTimeout(e,r){return safeSetTimeout(e,r)},safeRequestAnimationFrame(e){return Browser.requestAnimationFrame(()=>{callUserCallback(e)})},getMimetype(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta(e){var r=0;switch(e.type){case"DOMMouseScroll":r=e.detail/3;break;case"mousewheel":r=e.wheelDelta/120;break;case"wheel":switch(r=e.deltaY,e.deltaMode){case 0:r/=100;break;case 1:r/=3;break;case 2:r*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return r},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(e,r){var t=Module.canvas.getBoundingClientRect(),n=Module.canvas.width,a=Module.canvas.height,o=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,_=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset,l=e-(o+t.left),c=r-(_+t.top);return l=l*(n/t.width),c=c*(a/t.height),{x:l,y:c}},setMouseCoords(e,r){let{x:t,y:n}=Browser.calculateMouseCoords(e,r);Browser.mouseMovementX=t-Browser.mouseX,Browser.mouseMovementY=n-Browser.mouseY,Browser.mouseX=t,Browser.mouseY=n},calculateMouseEvent(e){if(Browser.pointerLock)e.type!="mousemove"&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{if(e.type==="touchstart"||e.type==="touchend"||e.type==="touchmove"){var r=e.touch;if(r===void 0)return;var t=Browser.calculateMouseCoords(r.pageX,r.pageY);if(e.type==="touchstart")Browser.lastTouches[r.identifier]=t,Browser.touches[r.identifier]=t;else if(e.type==="touchend"||e.type==="touchmove"){var n=Browser.touches[r.identifier];n||(n=t),Browser.lastTouches[r.identifier]=n,Browser.touches[r.identifier]=t}return}Browser.setMouseCoords(e.pageX,e.pageY)}},resizeListeners:[],updateResizeListeners(){var e=Module.canvas;Browser.resizeListeners.forEach(r=>r(e.width,e.height))},setCanvasSize(e,r,t){var n=Module.canvas;Browser.updateCanvasDimensions(n,e,r),t||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e|8388608,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e&-8388609,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},updateCanvasDimensions(e,r,t){r&&t?(e.widthNative=r,e.heightNative=t):(r=e.widthNative,t=e.heightNative);var n=r,a=t;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(n/aAL.freeIds.length>0?AL.freeIds.pop():AL._nextId++,freeIds:[],scheduleContextAudio:e=>{if(!(Browser.mainLoop.timingMode===1&&document.visibilityState!="visible"))for(var r in e.sources)AL.scheduleSourceAudio(e.sources[r])},scheduleSourceAudio:(e,r)=>{if(!(Browser.mainLoop.timingMode===1&&document.visibilityState!="visible")&&e.state===4114){for(var t=AL.updateSourceTime(e),n=e.bufStartTime,a=e.bufOffset,o=e.bufsProcessed,_=0;_=e.bufQueue.length)if(e.looping)o%=e.bufQueue.length;else break;var d=e.bufQueue[o%e.bufQueue.length];if(d.length===0){if(u++,u===e.bufQueue.length)break}else{var l=e.context.audioCtx.createBufferSource();l.buffer=d.audioBuf,l.playbackRate.value=e.playbackRate,(d.audioBuf._loopStart||d.audioBuf._loopEnd)&&(l.loopStart=d.audioBuf._loopStart,l.loopEnd=d.audioBuf._loopEnd);var p=0;e.type===4136&&e.looping?(p=Number.POSITIVE_INFINITY,l.loop=!0,d.audioBuf._loopStart&&(l.loopStart=d.audioBuf._loopStart),d.audioBuf._loopEnd&&(l.loopEnd=d.audioBuf._loopEnd)):p=(d.audioBuf.duration-a)/e.playbackRate,l._startOffset=a,l._duration=p,l._skipCount=u,u=0,l.connect(e.gain),typeof l.start<"u"?(n=Math.max(n,e.context.audioCtx.currentTime),l.start(n,a)):typeof l.noteOn<"u"&&(n=Math.max(n,e.context.audioCtx.currentTime),l.noteOn(n)),l._startTime=n,e.audioQueue.push(l),n+=p}a=0,o++}}},updateSourceTime:e=>{var r=e.context.audioCtx.currentTime;if(e.state!==4114)return r;isFinite(e.bufStartTime)||(e.bufStartTime=r-e.bufOffset/e.playbackRate,e.bufOffset=0);for(var t=0;e.audioQueue.length;){var n=e.audioQueue[0];if(e.bufsProcessed+=n._skipCount,t=n._startTime+n._duration,r=e.bufQueue.length&&!e.looping)AL.setSourceState(e,4116);else if(e.type===4136&&e.looping){var a=e.bufQueue[0];if(a.length===0)e.bufOffset=0;else{var o=(r-e.bufStartTime)*e.playbackRate,_=a.audioBuf._loopStart||0,l=a.audioBuf._loopEnd||a.audioBuf.duration;l<=_&&(l=a.audioBuf.duration),o0&&(e.bufStartTime+=Math.floor((r-e.bufStartTime)/c)*c)}for(var u=0;u=e.bufQueue.length)if(e.looping)e.bufsProcessed%=e.bufQueue.length;else{AL.setSourceState(e,4116);break}var a=e.bufQueue[e.bufsProcessed];if(a.length>0){if(t=e.bufStartTime+a.audioBuf.duration/e.playbackRate,r{AL.updateSourceTime(e);for(var r=1;r1&&(e.audioQueue.length=1)},stopSourceAudio:e=>{for(var r=0;r{r===4114?((e.state===4114||e.state==4116)&&(e.bufsProcessed=0,e.bufOffset=0),AL.stopSourceAudio(e),e.state=4114,e.bufStartTime=Number.NEGATIVE_INFINITY,AL.scheduleSourceAudio(e)):r===4115?e.state===4114&&(AL.updateSourceTime(e),AL.stopSourceAudio(e),e.state=4115):r===4116?e.state!==4113&&(e.state=4116,e.bufsProcessed=e.bufQueue.length,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e)):r===4113&&e.state!==4113&&(e.state=4113,e.bufsProcessed=0,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e))},initSourcePanner:e=>{if(e.type!==4144){for(var r=AL.buffers[0],t=0;t{for(var r in e.sources)AL.updateSourceGlobal(e.sources[r])},updateSourceGlobal:e=>{var r=e.panner;if(r){r.refDistance=e.refDistance,r.maxDistance=e.maxDistance,r.rolloffFactor=e.rolloffFactor,r.panningModel=e.context.hrtf?"HRTF":"equalpower";var t=e.context.sourceDistanceModel?e.distanceModel:e.context.distanceModel;switch(t){case 0:r.distanceModel="inverse",r.refDistance=340282e33;break;case 53249:case 53250:r.distanceModel="inverse";break;case 53251:case 53252:r.distanceModel="linear";break;case 53253:case 53254:r.distanceModel="exponential";break}}},updateListenerSpace:e=>{var r=e.audioCtx.listener;r.positionX?(r.positionX.value=e.listener.position[0],r.positionY.value=e.listener.position[1],r.positionZ.value=e.listener.position[2]):r.setPosition(e.listener.position[0],e.listener.position[1],e.listener.position[2]),r.forwardX?(r.forwardX.value=e.listener.direction[0],r.forwardY.value=e.listener.direction[1],r.forwardZ.value=e.listener.direction[2],r.upX.value=e.listener.up[0],r.upY.value=e.listener.up[1],r.upZ.value=e.listener.up[2]):r.setOrientation(e.listener.direction[0],e.listener.direction[1],e.listener.direction[2],e.listener.up[0],e.listener.up[1],e.listener.up[2]);for(var t in e.sources)AL.updateSourceSpace(e.sources[t])},updateSourceSpace:e=>{if(e.panner){var r=e.panner,t=e.position[0],n=e.position[1],a=e.position[2],o=e.direction[0],_=e.direction[1],l=e.direction[2],c=e.context.listener,u=c.position[0],d=c.position[1],p=c.position[2];if(e.relative){var f=-c.direction[0],m=-c.direction[1],g=-c.direction[2],v=c.up[0],S=c.up[1],y=c.up[2],h=(Q,ae,se)=>{var oe=Math.sqrt(Q*Q+ae*ae+se*se);return oe{if(e.state===4114){AL.cancelPendingSourceAudio(e);var r=e.audioQueue[0];if(!r)return;var t;e.type===4136&&e.looping?t=Number.POSITIVE_INFINITY:t=(r.buffer.duration-r._startOffset)/e.playbackRate,r._duration=t,r.playbackRate.value=e.playbackRate,AL.scheduleSourceAudio(e)}},sourceDuration:e=>{for(var r=0,t=0;t{AL.updateSourceTime(e);for(var r=0,t=0;t{var t=e.state==4114;if(t&&AL.setSourceState(e,4113),e.bufQueue[e.bufsProcessed].audioBuf!==null){for(e.bufsProcessed=0;r>e.bufQueue[e.bufsProcessed].audioBuf.duration;)r-=e.bufQueue[e.bufsProcessed].audiobuf.duration,e.bufsProcessed++;e.bufOffset=r}t&&AL.setSourceState(e,4114)},getGlobalParam:(e,r)=>{if(!AL.currentCtx)return null;switch(r){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:return AL.currentCtx.err=40962,null}},setGlobalParam:(e,r,t)=>{if(AL.currentCtx)switch(r){case 49152:if(!Number.isFinite(t)||t<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=t,AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(t)||t<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=t,AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(t){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=t,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:(e,r)=>{if(!AL.currentCtx)return null;switch(r){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:return AL.currentCtx.err=40962,null}},setListenerParam:(e,r,t)=>{if(AL.currentCtx){if(t===null){AL.currentCtx.err=40962;return}var n=AL.currentCtx.listener;switch(r){case 4100:if(!Number.isFinite(t[0])||!Number.isFinite(t[1])||!Number.isFinite(t[2])){AL.currentCtx.err=40963;return}n.position[0]=t[0],n.position[1]=t[1],n.position[2]=t[2],AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(t[0])||!Number.isFinite(t[1])||!Number.isFinite(t[2])){AL.currentCtx.err=40963;return}n.velocity[0]=t[0],n.velocity[1]=t[1],n.velocity[2]=t[2],AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(t)||t<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=t;break;case 4111:if(!Number.isFinite(t[0])||!Number.isFinite(t[1])||!Number.isFinite(t[2])||!Number.isFinite(t[3])||!Number.isFinite(t[4])||!Number.isFinite(t[5])){AL.currentCtx.err=40963;return}n.direction[0]=t[0],n.direction[1]=t[1],n.direction[2]=t[2],n.up[0]=t[3],n.up[1]=t[4],n.up[2]=t[5],AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}}},getBufferParam:(e,r,t)=>{if(AL.currentCtx){var n=AL.buffers[r];if(!n||r===0){AL.currentCtx.err=40961;return}switch(t){case 8193:return n.frequency;case 8194:return n.bytesPerSample*8;case 8195:return n.channels;case 8196:return n.length*n.bytesPerSample*n.channels;case 8213:return n.length===0?[0,0]:[(n.audioBuf._loopStart||0)*n.frequency,(n.audioBuf._loopEnd||n.length)*n.frequency];default:return AL.currentCtx.err=40962,null}}},setBufferParam:(e,r,t,n)=>{if(AL.currentCtx){var a=AL.buffers[r];if(!a||r===0){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(t){case 8196:if(n!==0){AL.currentCtx.err=40963;return}break;case 8213:if(n[0]<0||n[0]>a.length||n[1]<0||n[1]>a.Length||n[0]>=n[1]){AL.currentCtx.err=40963;return}if(a.refCount>0){AL.currentCtx.err=40964;return}a.audioBuf&&(a.audioBuf._loopStart=n[0]/a.frequency,a.audioBuf._loopEnd=n[1]/a.frequency);break;default:AL.currentCtx.err=40962;return}}},getSourceParam:(e,r,t)=>{if(!AL.currentCtx)return null;var n=AL.currentCtx.sources[r];if(!n)return AL.currentCtx.err=40961,null;switch(t){case 514:return n.relative;case 4097:return n.coneInnerAngle;case 4098:return n.coneOuterAngle;case 4099:return n.pitch;case 4100:return n.position;case 4101:return n.direction;case 4102:return n.velocity;case 4103:return n.looping;case 4105:return n.type===4136?n.bufQueue[0].id:0;case 4106:return n.gain.gain.value;case 4109:return n.minGain;case 4110:return n.maxGain;case 4112:return n.state;case 4117:return n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufQueue.length;case 4118:return n.bufQueue.length===1&&n.bufQueue[0].id===0||n.looping?0:n.bufsProcessed;case 4128:return n.refDistance;case 4129:return n.rolloffFactor;case 4130:return n.coneOuterGain;case 4131:return n.maxDistance;case 4132:return AL.sourceTell(n);case 4133:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency),a;case 4134:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency*n.bufQueue[0].bytesPerSample),a;case 4135:return n.type;case 4628:return n.spatialize;case 8201:for(var l=0,o=0,_=0;_{if(AL.currentCtx){var a=AL.currentCtx.sources[r];if(!a){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(t){case 514:if(n===1)a.relative=!0,AL.updateSourceSpace(a);else if(n===0)a.relative=!1,AL.updateSourceSpace(a);else{AL.currentCtx.err=40963;return}break;case 4097:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneInnerAngle=n,a.panner&&(a.panner.coneInnerAngle=n%360);break;case 4098:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneOuterAngle=n,a.panner&&(a.panner.coneOuterAngle=n%360);break;case 4099:if(!Number.isFinite(n)||n<=0){AL.currentCtx.err=40963;return}if(a.pitch===n)break;a.pitch=n,AL.updateSourceRate(a);break;case 4100:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.position[0]=n[0],a.position[1]=n[1],a.position[2]=n[2],AL.updateSourceSpace(a);break;case 4101:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.direction[0]=n[0],a.direction[1]=n[1],a.direction[2]=n[2],AL.updateSourceSpace(a);break;case 4102:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.velocity[0]=n[0],a.velocity[1]=n[1],a.velocity[2]=n[2],AL.updateSourceSpace(a);break;case 4103:if(n===1){if(a.looping=!0,AL.updateSourceTime(a),a.type===4136&&a.audioQueue.length>0){var o=a.audioQueue[0];o.loop=!0,o._duration=Number.POSITIVE_INFINITY}}else if(n===0){a.looping=!1;var _=AL.updateSourceTime(a);if(a.type===4136&&a.audioQueue.length>0){var o=a.audioQueue[0];o.loop=!1,o._duration=a.bufQueue[0].audioBuf.duration/a.playbackRate,o._startTime=_-a.bufOffset/a.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(a.state===4114||a.state===4115){AL.currentCtx.err=40964;return}if(n===0){for(var l in a.bufQueue)a.bufQueue[l].refCount--;a.bufQueue.length=1,a.bufQueue[0]=AL.buffers[0],a.bufsProcessed=0,a.type=4144}else{var c=AL.buffers[n];if(!c){AL.currentCtx.err=40963;return}for(var l in a.bufQueue)a.bufQueue[l].refCount--;a.bufQueue.length=0,c.refCount++,a.bufQueue=[c],a.bufsProcessed=0,a.type=4136}AL.initSourcePanner(a),AL.scheduleSourceAudio(a);break;case 4106:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.gain.gain.value=n;break;case 4109:if(!Number.isFinite(n)||n<0||n>Math.min(a.maxGain,1)){AL.currentCtx.err=40963;return}a.minGain=n;break;case 4110:if(!Number.isFinite(n)||n1){AL.currentCtx.err=40963;return}a.maxGain=n;break;case 4128:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.refDistance=n,a.panner&&(a.panner.refDistance=n);break;case 4129:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.rolloffFactor=n,a.panner&&(a.panner.rolloffFactor=n);break;case 4130:if(!Number.isFinite(n)||n<0||n>1){AL.currentCtx.err=40963;return}a.coneOuterGain=n,a.panner&&(a.panner.coneOuterGain=n);break;case 4131:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.maxDistance=n,a.panner&&(a.panner.maxDistance=n);break;case 4132:if(n<0||n>AL.sourceDuration(a)){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4133:var p=AL.sourceDuration(a);if(p>0){var u;for(var d in a.bufQueue)if(d){u=a.bufQueue[d].frequency;break}n/=u}if(n<0||n>p){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4134:var p=AL.sourceDuration(a);if(p>0){var f;for(var d in a.bufQueue)if(d){var c=a.bufQueue[d];f=c.frequency*c.bytesPerSample*c.channels;break}n/=f}if(n<0||n>p){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4628:if(n!==0&&n!==1&&n!==2){AL.currentCtx.err=40963;return}a.spatialize=n,AL.initSourcePanner(a);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(n){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:a.distanceModel=n,AL.currentCtx.sourceDistanceModel&&AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:(e,r)=>{if(e===0)return AL.alcErr=40961,null;var t=AL.captures[e];if(!t)return AL.alcErr=40961,null;var n=t.mediaStreamError;return n?(AL.alcErr=40961,null):t}},_alBuffer3f=(e,r,t,n,a)=>{AL.setBufferParam("alBuffer3f",e,r,null)};_alBuffer3f.sig="viifff";var _alBuffer3i=(e,r,t,n,a)=>{AL.setBufferParam("alBuffer3i",e,r,null)};_alBuffer3i.sig="viiiii";function _alBufferData(e,r,t,n,a){if(t>>>=0,!!AL.currentCtx){var o=AL.buffers[e];if(!o){AL.currentCtx.err=40963;return}if(a<=0){AL.currentCtx.err=40963;return}var _=null;try{switch(r){case 4352:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(1,n,a);for(var l=_.getChannelData(0),c=0;c>>0]*.0078125-1}o.bytesPerSample=1,o.channels=1,o.length=n;break;case 4353:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(1,n>>1,a);var l=_.getChannelData(0);t>>=1;for(var c=0;c>1;++c)l[c]=HEAP16[t++>>>0]*30517578125e-15}o.bytesPerSample=2,o.channels=1,o.length=n>>1;break;case 4354:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(2,n>>1,a);for(var l=_.getChannelData(0),u=_.getChannelData(1),c=0;c>1;++c)l[c]=HEAPU8[t++>>>0]*.0078125-1,u[c]=HEAPU8[t++>>>0]*.0078125-1}o.bytesPerSample=1,o.channels=2,o.length=n>>1;break;case 4355:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(2,n>>2,a);var l=_.getChannelData(0),u=_.getChannelData(1);t>>=1;for(var c=0;c>2;++c)l[c]=HEAP16[t++>>>0]*30517578125e-15,u[c]=HEAP16[t++>>>0]*30517578125e-15}o.bytesPerSample=2,o.channels=2,o.length=n>>2;break;case 65552:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(1,n>>2,a);var l=_.getChannelData(0);t>>=2;for(var c=0;c>2;++c)l[c]=HEAPF32[t++>>>0]}o.bytesPerSample=4,o.channels=1,o.length=n>>2;break;case 65553:if(n>0){_=AL.currentCtx.audioCtx.createBuffer(2,n>>3,a);var l=_.getChannelData(0),u=_.getChannelData(1);t>>=2;for(var c=0;c>3;++c)l[c]=HEAPF32[t++>>>0],u[c]=HEAPF32[t++>>>0]}o.bytesPerSample=4,o.channels=2,o.length=n>>3;break;default:AL.currentCtx.err=40963;return}o.frequency=a,o.audioBuf=_}catch(d){AL.currentCtx.err=40963;return}}}_alBufferData.sig="viipii";var _alBufferf=(e,r,t)=>{AL.setBufferParam("alBufferf",e,r,null)};_alBufferf.sig="viif";function _alBufferfv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}AL.setBufferParam("alBufferfv",e,r,null)}}_alBufferfv.sig="viip";var _alBufferi=(e,r,t)=>{AL.setBufferParam("alBufferi",e,r,null)};_alBufferi.sig="viii";function _alBufferiv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(r){case 8213:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.setBufferParam("alBufferiv",e,r,AL.paramArray);break;default:AL.setBufferParam("alBufferiv",e,r,null);break}}}_alBufferiv.sig="viip";function _alDeleteBuffers(e,r){if(r>>>=0,!!AL.currentCtx){for(var t=0;t>>2>>>0];if(n!==0){if(!AL.buffers[n]){AL.currentCtx.err=40961;return}if(AL.buffers[n].refCount){AL.currentCtx.err=40964;return}}}for(var t=0;t>>2>>>0];n!==0&&(AL.deviceRefCounts[AL.buffers[n].deviceId]--,delete AL.buffers[n],AL.freeIds.push(n))}}}_alDeleteBuffers.sig="vip";var _alSourcei=(e,r,t)=>{switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",e,r,t);break;default:AL.setSourceParam("alSourcei",e,r,null);break}};_alSourcei.sig="viii";function _alDeleteSources(e,r){if(r>>>=0,!!AL.currentCtx){for(var t=0;t>>2>>>0];if(!AL.currentCtx.sources[n]){AL.currentCtx.err=40961;return}}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116),_alSourcei(n,4105,0),delete AL.currentCtx.sources[n],AL.freeIds.push(n)}}}_alDeleteSources.sig="vip";var _alDisable=e=>{if(AL.currentCtx)switch(e){case"AL_SOURCE_DISTANCE_MODEL":AL.currentCtx.sourceDistanceModel=!1,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alDisable.sig="vi";var _alDistanceModel=e=>{AL.setGlobalParam("alDistanceModel",53248,e)};_alDistanceModel.sig="vi";var _alDopplerFactor=e=>{AL.setGlobalParam("alDopplerFactor",49152,e)};_alDopplerFactor.sig="vf";var _alDopplerVelocity=e=>{if(warnOnce("alDopplerVelocity() is deprecated, and only kept for compatibility with OpenAL 1.0. Use alSpeedOfSound() instead."),!!AL.currentCtx&&e<=0){AL.currentCtx.err=40963;return}};_alDopplerVelocity.sig="vf";var _alEnable=e=>{if(AL.currentCtx)switch(e){case"AL_SOURCE_DISTANCE_MODEL":AL.currentCtx.sourceDistanceModel=!0,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alEnable.sig="vi";function _alGenBuffers(e,r){if(r>>>=0,!!AL.currentCtx)for(var t=0;t>>2>>>0]=n.id}}_alGenBuffers.sig="vip";function _alGenSources(e,r){if(r>>>=0,!!AL.currentCtx)for(var t=0;t>>2>>>0]=a.id}}_alGenSources.sig="vip";var _alGetBoolean=e=>{var r=AL.getGlobalParam("alGetBoolean",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r!==0?1:0;default:return AL.currentCtx.err=40962,0}};_alGetBoolean.sig="ii";function _alGetBooleanv(e,r){r>>>=0;var t=AL.getGlobalParam("alGetBooleanv",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAP8[r>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetBooleanv.sig="vip";function _alGetBuffer3f(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getBufferParam("alGetBuffer3f",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3f.sig="viippp";function _alGetBuffer3i(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getBufferParam("alGetBuffer3i",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3i.sig="viippp";function _alGetBufferf(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferf",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferf.sig="viip";function _alGetBufferfv(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferfv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferfv.sig="viip";function _alGetBufferi(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferi",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 8193:case 8194:case 8195:case 8196:HEAP32[t>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetBufferi.sig="viip";function _alGetBufferiv(e,r,t){t>>>=0;var n=AL.getBufferParam("alGetBufferiv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 8193:case 8194:case 8195:case 8196:HEAP32[t>>>2>>>0]=n;break;case 8213:HEAP32[t>>>2>>>0]=n[0],HEAP32[t+4>>>2>>>0]=n[1];break;default:AL.currentCtx.err=40962;return}}}_alGetBufferiv.sig="viip";var _alGetDouble=e=>{var r=AL.getGlobalParam("alGetDouble",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r;default:return AL.currentCtx.err=40962,0}};_alGetDouble.sig="di";function _alGetDoublev(e,r){r>>>=0;var t=AL.getGlobalParam("alGetDoublev",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAPF64[r>>>3>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetDoublev.sig="vip";function _alGetEnumValue(e){if(e>>>=0,!AL.currentCtx)return 0;if(!e)return AL.currentCtx.err=40963,0;var r=UTF8ToString(e);switch(r){case"AL_BITS":return 8194;case"AL_BUFFER":return 4105;case"AL_BUFFERS_PROCESSED":return 4118;case"AL_BUFFERS_QUEUED":return 4117;case"AL_BYTE_OFFSET":return 4134;case"AL_CHANNELS":return 8195;case"AL_CONE_INNER_ANGLE":return 4097;case"AL_CONE_OUTER_ANGLE":return 4098;case"AL_CONE_OUTER_GAIN":return 4130;case"AL_DIRECTION":return 4101;case"AL_DISTANCE_MODEL":return 53248;case"AL_DOPPLER_FACTOR":return 49152;case"AL_DOPPLER_VELOCITY":return 49153;case"AL_EXPONENT_DISTANCE":return 53253;case"AL_EXPONENT_DISTANCE_CLAMPED":return 53254;case"AL_EXTENSIONS":return 45060;case"AL_FORMAT_MONO16":return 4353;case"AL_FORMAT_MONO8":return 4352;case"AL_FORMAT_STEREO16":return 4355;case"AL_FORMAT_STEREO8":return 4354;case"AL_FREQUENCY":return 8193;case"AL_GAIN":return 4106;case"AL_INITIAL":return 4113;case"AL_INVALID":return-1;case"AL_ILLEGAL_ENUM":case"AL_INVALID_ENUM":return 40962;case"AL_INVALID_NAME":return 40961;case"AL_ILLEGAL_COMMAND":case"AL_INVALID_OPERATION":return 40964;case"AL_INVALID_VALUE":return 40963;case"AL_INVERSE_DISTANCE":return 53249;case"AL_INVERSE_DISTANCE_CLAMPED":return 53250;case"AL_LINEAR_DISTANCE":return 53251;case"AL_LINEAR_DISTANCE_CLAMPED":return 53252;case"AL_LOOPING":return 4103;case"AL_MAX_DISTANCE":return 4131;case"AL_MAX_GAIN":return 4110;case"AL_MIN_GAIN":return 4109;case"AL_NONE":return 0;case"AL_NO_ERROR":return 0;case"AL_ORIENTATION":return 4111;case"AL_OUT_OF_MEMORY":return 40965;case"AL_PAUSED":return 4115;case"AL_PENDING":return 8209;case"AL_PITCH":return 4099;case"AL_PLAYING":return 4114;case"AL_POSITION":return 4100;case"AL_PROCESSED":return 8210;case"AL_REFERENCE_DISTANCE":return 4128;case"AL_RENDERER":return 45059;case"AL_ROLLOFF_FACTOR":return 4129;case"AL_SAMPLE_OFFSET":return 4133;case"AL_SEC_OFFSET":return 4132;case"AL_SIZE":return 8196;case"AL_SOURCE_RELATIVE":return 514;case"AL_SOURCE_STATE":return 4112;case"AL_SOURCE_TYPE":return 4135;case"AL_SPEED_OF_SOUND":return 49155;case"AL_STATIC":return 4136;case"AL_STOPPED":return 4116;case"AL_STREAMING":return 4137;case"AL_UNDETERMINED":return 4144;case"AL_UNUSED":return 8208;case"AL_VELOCITY":return 4102;case"AL_VENDOR":return 45057;case"AL_VERSION":return 45058;case"AL_AUTO_SOFT":return 2;case"AL_SOURCE_DISTANCE_MODEL":return 512;case"AL_SOURCE_SPATIALIZE_SOFT":return 4628;case"AL_LOOP_POINTS_SOFT":return 8213;case"AL_BYTE_LENGTH_SOFT":return 8201;case"AL_SAMPLE_LENGTH_SOFT":return 8202;case"AL_SEC_LENGTH_SOFT":return 8203;case"AL_FORMAT_MONO_FLOAT32":return 65552;case"AL_FORMAT_STEREO_FLOAT32":return 65553;default:return AL.currentCtx.err=40963,0}}_alGetEnumValue.sig="ip";var _alGetError=()=>{if(!AL.currentCtx)return 40964;var e=AL.currentCtx.err;return AL.currentCtx.err=0,e};_alGetError.sig="i";var _alGetFloat=e=>{var r=AL.getGlobalParam("alGetFloat",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r;default:return 0}};_alGetFloat.sig="fi";function _alGetFloatv(e,r){r>>>=0;var t=AL.getGlobalParam("alGetFloatv",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAPF32[r>>>2>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetFloatv.sig="vip";var _alGetInteger=e=>{var r=AL.getGlobalParam("alGetInteger",e);if(r===null)return 0;switch(e){case 49152:case 49155:case 53248:return r;default:return AL.currentCtx.err=40962,0}};_alGetInteger.sig="ii";function _alGetIntegerv(e,r){r>>>=0;var t=AL.getGlobalParam("alGetIntegerv",e);if(!(t===null||!r))switch(e){case 49152:case 49155:case 53248:HEAP32[r>>>2>>>0]=t;break;default:AL.currentCtx.err=40962;return}}_alGetIntegerv.sig="vip";function _alGetListener3f(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3f",e);if(a!==null){if(!r||!t||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[r>>>2>>>0]=a[0],HEAPF32[t>>>2>>>0]=a[1],HEAPF32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3f.sig="vippp";function _alGetListener3i(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3i",e);if(a!==null){if(!r||!t||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[r>>>2>>>0]=a[0],HEAP32[t>>>2>>>0]=a[1],HEAP32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3i.sig="vippp";function _alGetListenerf(e,r){r>>>=0;var t=AL.getListenerParam("alGetListenerf",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4106:HEAPF32[r>>>2>>>0]=t;break;default:AL.currentCtx.err=40962;return}}}_alGetListenerf.sig="vip";function _alGetListenerfv(e,r){r>>>=0;var t=AL.getListenerParam("alGetListenerfv",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[r>>>2>>>0]=t[0],HEAPF32[r+4>>>2>>>0]=t[1],HEAPF32[r+8>>>2>>>0]=t[2];break;case 4111:HEAPF32[r>>>2>>>0]=t[0],HEAPF32[r+4>>>2>>>0]=t[1],HEAPF32[r+8>>>2>>>0]=t[2],HEAPF32[r+12>>>2>>>0]=t[3],HEAPF32[r+16>>>2>>>0]=t[4],HEAPF32[r+20>>>2>>>0]=t[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListenerfv.sig="vip";function _alGetListeneri(e,r){r>>>=0;var t=AL.getListenerParam("alGetListeneri",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetListeneri.sig="vip";function _alGetListeneriv(e,r){r>>>=0;var t=AL.getListenerParam("alGetListeneriv",e);if(t!==null){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[r>>>2>>>0]=t[0],HEAP32[r+4>>>2>>>0]=t[1],HEAP32[r+8>>>2>>>0]=t[2];break;case 4111:HEAP32[r>>>2>>>0]=t[0],HEAP32[r+4>>>2>>>0]=t[1],HEAP32[r+8>>>2>>>0]=t[2],HEAP32[r+12>>>2>>>0]=t[3],HEAP32[r+16>>>2>>>0]=t[4],HEAP32[r+20>>>2>>>0]=t[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListeneriv.sig="vip";function _alGetSource3f(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getSourceParam("alGetSource3f",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}switch(r){case 4100:case 4101:case 4102:HEAPF32[t>>>2>>>0]=o[0],HEAPF32[n>>>2>>>0]=o[1],HEAPF32[a>>>2>>>0]=o[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3f.sig="viippp";function _alGetSource3i(e,r,t,n,a){t>>>=0,n>>>=0,a>>>=0;var o=AL.getSourceParam("alGetSource3i",e,r);if(o!==null){if(!t||!n||!a){AL.currentCtx.err=40963;return}switch(r){case 4100:case 4101:case 4102:HEAP32[t>>>2>>>0]=o[0],HEAP32[n>>>2>>>0]=o[1],HEAP32[a>>>2>>>0]=o[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3i.sig="viippp";function _alGetSourcef(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourcef",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[t>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcef.sig="viip";function _alGetSourcefv(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourcefv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[t>>>2>>>0]=n[0];break;case 4100:case 4101:case 4102:HEAPF32[t>>>2>>>0]=n[0],HEAPF32[t+4>>>2>>>0]=n[1],HEAPF32[t+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourcefv.sig="viip";function _alGetSourcei(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourcei",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[t>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcei.sig="viip";function _alGetSourceiv(e,r,t){t>>>=0;var n=AL.getSourceParam("alGetSourceiv",e,r);if(n!==null){if(!t){AL.currentCtx.err=40963;return}switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[t>>>2>>>0]=n;break;case 4100:case 4101:case 4102:HEAP32[t>>>2>>>0]=n[0],HEAP32[t+4>>>2>>>0]=n[1],HEAP32[t+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourceiv.sig="viip";function _alGetString(e){if(AL.stringCache[e])return AL.stringCache[e];var r;switch(e){case 0:r="No Error";break;case 40961:r="Invalid Name";break;case 40962:r="Invalid Enum";break;case 40963:r="Invalid Value";break;case 40964:r="Invalid Operation";break;case 40965:r="Out of Memory";break;case 45057:r="Emscripten";break;case 45058:r="1.1";break;case 45059:r="WebAudio";break;case 45060:r="";for(var t in AL.AL_EXTENSIONS)r=r.concat(t),r=r.concat(" ");r=r.trim();break;default:return AL.currentCtx&&(AL.currentCtx.err=40962),0}return r=stringToNewUTF8(r),AL.stringCache[e]=r,r}_alGetString.sig="pi";var _alIsBuffer=e=>!(!AL.currentCtx||e>AL.buffers.length||!AL.buffers[e]);_alIsBuffer.sig="ii";var _alIsEnabled=e=>{if(!AL.currentCtx)return 0;switch(e){case"AL_SOURCE_DISTANCE_MODEL":return AL.currentCtx.sourceDistanceModel?0:1;default:return AL.currentCtx.err=40962,0}};_alIsEnabled.sig="ii";function _alIsExtensionPresent(e){e>>>=0;var r=UTF8ToString(e);return AL.AL_EXTENSIONS[r]?1:0}_alIsExtensionPresent.sig="ip";var _alIsSource=e=>!(!AL.currentCtx||!AL.currentCtx.sources[e]);_alIsSource.sig="ii";var _alListener3f=(e,r,t,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=t,AL.paramArray[2]=n,AL.setListenerParam("alListener3f",e,AL.paramArray);break;default:AL.setListenerParam("alListener3f",e,null);break}};_alListener3f.sig="vifff";var _alListener3i=(e,r,t,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=t,AL.paramArray[2]=n,AL.setListenerParam("alListener3i",e,AL.paramArray);break;default:AL.setListenerParam("alListener3i",e,null);break}};_alListener3i.sig="viiii";var _alListenerf=(e,r)=>{switch(e){case 4106:AL.setListenerParam("alListenerf",e,r);break;default:AL.setListenerParam("alListenerf",e,null);break}};_alListenerf.sig="vif";function _alListenerfv(e,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAPF32[r>>>2>>>0],AL.paramArray[1]=HEAPF32[r+4>>>2>>>0],AL.paramArray[2]=HEAPF32[r+8>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAPF32[r>>>2>>>0],AL.paramArray[1]=HEAPF32[r+4>>>2>>>0],AL.paramArray[2]=HEAPF32[r+8>>>2>>>0],AL.paramArray[3]=HEAPF32[r+12>>>2>>>0],AL.paramArray[4]=HEAPF32[r+16>>>2>>>0],AL.paramArray[5]=HEAPF32[r+20>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;default:AL.setListenerParam("alListenerfv",e,null);break}}}_alListenerfv.sig="vip";var _alListeneri=(e,r)=>{AL.setListenerParam("alListeneri",e,null)};_alListeneri.sig="vii";function _alListeneriv(e,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.paramArray[2]=HEAP32[r+8>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.paramArray[2]=HEAP32[r+8>>>2>>>0],AL.paramArray[3]=HEAP32[r+12>>>2>>>0],AL.paramArray[4]=HEAP32[r+16>>>2>>>0],AL.paramArray[5]=HEAP32[r+20>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;default:AL.setListenerParam("alListeneriv",e,null);break}}}_alListeneriv.sig="vip";var _alSource3f=(e,r,t,n,a)=>{switch(r){case 4100:case 4101:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3f",e,r,AL.paramArray);break;default:AL.setSourceParam("alSource3f",e,r,null);break}};_alSource3f.sig="viifff";var _alSource3i=(e,r,t,n,a)=>{switch(r){case 4100:case 4101:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3i",e,r,AL.paramArray);break;default:AL.setSourceParam("alSource3i",e,r,null);break}};_alSource3i.sig="viiiii";var _alSourcePause=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4115)}};_alSourcePause.sig="vi";function _alSourcePausev(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4115)}}}_alSourcePausev.sig="vip";var _alSourcePlay=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4114)}};_alSourcePlay.sig="vi";function _alSourcePlayv(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4114)}}}_alSourcePlayv.sig="vip";function _alSourceQueueBuffers(e,r,t){if(t>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(n.type===4136){AL.currentCtx.err=40964;return}if(r!==0){for(var a=AL.buffers[0],o=0;o>>2>>>0],l=AL.buffers[_];if(!l){AL.currentCtx.err=40961;return}a.id!==0&&(l.frequency!==a.frequency||l.bytesPerSample!==a.bytesPerSample||l.channels!==a.channels)&&(AL.currentCtx.err=40964)}n.bufQueue.length===1&&n.bufQueue[0].id===0&&(n.bufQueue.length=0),n.type=4137;for(var o=0;o>>2>>>0],l=AL.buffers[_];l.refCount++,n.bufQueue.push(l)}n.looping&&AL.cancelPendingSourceAudio(n),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceQueueBuffers.sig="viip";var _alSourceRewind=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4116),AL.setSourceState(r,4113)}};_alSourceRewind.sig="vi";function _alSourceRewindv(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4113)}}}_alSourceRewindv.sig="vip";var _alSourceStop=e=>{if(AL.currentCtx){var r=AL.currentCtx.sources[e];if(!r){AL.currentCtx.err=40961;return}AL.setSourceState(r,4116)}};_alSourceStop.sig="vi";function _alSourceStopv(e,r){if(r>>>=0,!!AL.currentCtx){r||(AL.currentCtx.err=40963);for(var t=0;t>>2>>>0]]){AL.currentCtx.err=40961;return}for(var t=0;t>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116)}}}_alSourceStopv.sig="vip";function _alSourceUnqueueBuffers(e,r,t){if(t>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(r>(n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufsProcessed)){AL.currentCtx.err=40963;return}if(r!==0){for(var a=0;a>>2>>>0]=o.id,n.bufsProcessed--}n.bufQueue.length===0&&n.bufQueue.push(AL.buffers[0]),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceUnqueueBuffers.sig="viip";var _alSourcef=(e,r,t)=>{switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:AL.setSourceParam("alSourcef",e,r,t);break;default:AL.setSourceParam("alSourcef",e,r,null);break}};_alSourcef.sig="viif";function _alSourcefv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(r){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:var n=HEAPF32[t>>>2>>>0];AL.setSourceParam("alSourcefv",e,r,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAPF32[t>>>2>>>0],AL.paramArray[1]=HEAPF32[t+4>>>2>>>0],AL.paramArray[2]=HEAPF32[t+8>>>2>>>0],AL.setSourceParam("alSourcefv",e,r,AL.paramArray);break;default:AL.setSourceParam("alSourcefv",e,r,null);break}}}_alSourcefv.sig="viip";function _alSourceiv(e,r,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(r){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:var n=HEAP32[t>>>2>>>0];AL.setSourceParam("alSourceiv",e,r,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.paramArray[2]=HEAP32[t+8>>>2>>>0],AL.setSourceParam("alSourceiv",e,r,AL.paramArray);break;default:AL.setSourceParam("alSourceiv",e,r,null);break}}}_alSourceiv.sig="viip";var _alSpeedOfSound=e=>{AL.setGlobalParam("alSpeedOfSound",49155,e)};_alSpeedOfSound.sig="vf";var _alcCaptureCloseDevice=function(e){var t,n,a,o;e>>>=0;var r=AL.requireValidCaptureDevice(e,"alcCaptureCloseDevice");return r?(delete AL.captures[e],AL.freeIds.push(e),(t=r.mediaStreamSourceNode)==null||t.disconnect(),(n=r.mergerNode)==null||n.disconnect(),(a=r.splitterNode)==null||a.disconnect(),(o=r.scriptProcessorNode)==null||o.disconnect(),r.mediaStream&&r.mediaStream.getTracks().forEach(_=>_.stop()),delete r.buffers,r.capturedFrameCount=0,r.isCapturing=!1,!0):!1};_alcCaptureCloseDevice.sig="ip";var listenOnce=(e,r,t)=>{e.addEventListener(r,t,{once:!0})},autoResumeAudioContext=(e,r)=>{r||(r=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach(t=>{r.forEach(n=>{n&&listenOnce(n,t,()=>{e.state==="suspended"&&e.resume()})})})};function _alcCaptureOpenDevice(e,r,t,n){var b;e>>>=0;var a=AL.CAPTURE_DEVICE_NAME;if(e!==0&&(a=UTF8ToString(e),a!==AL.CAPTURE_DEVICE_NAME))return AL.alcErr=40965,0;if(n<0)return AL.alcErr=40964,0;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var o=navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia;if(!o)return AL.alcErr=40965,0;var _=window.AudioContext||window.webkitAudioContext;if(!AL.sharedCaptureAudioCtx)try{AL.sharedCaptureAudioCtx=new _}catch(w){return AL.alcErr=40965,0}autoResumeAudioContext(AL.sharedCaptureAudioCtx);var l;switch(t){case 65552:case 4353:case 4352:l=1;break;case 65553:case 4355:case 4354:l=2;break;default:return AL.alcErr=40964,0}function c(w){return new Float32Array(w)}function u(w){return new Int16Array(w)}function d(w){return new Uint8Array(w)}var p,f;switch(t){case 65552:case 65553:p="f32",f=c;break;case 4353:case 4355:p="i16",f=u;break;case 4352:case 4354:p="u8",f=d;break}var m=[];try{for(var g=0;g{v.mediaStreamError=w},y=w=>{v.mediaStreamSourceNode=v.audioCtx.createMediaStreamSource(w),v.mediaStream=w;var k=1;switch(v.mediaStreamSourceNode.channelCountMode){case"max":k=l;break;case"clamped-max":k=Math.min(l,v.mediaStreamSourceNode.channelCount);break;case"explicit":k=v.mediaStreamSourceNode.channelCount;break}v.inputChannelCount=k;var L=512;v.scriptProcessorNode=v.audioCtx.createScriptProcessor(L,k,l),k>l?(v.mergerNode=v.audioCtx.createChannelMerger(k),v.mediaStreamSourceNode.connect(v.mergerNode),v.mergerNode.connect(v.scriptProcessorNode)):k{if(v.isCapturing){var x=v,A=E.inputBuffer;switch(t){case 65552:for(var P=A.getChannelData(0),D=0;D>>=0,r>>>=0;var n=AL.requireValidCaptureDevice(e,"alcCaptureSamples");if(!n)return;var a=n.requestedSampleRate,o=n.audioCtx.sampleRate,_=o/a;if(t<0||t>n.capturedFrameCount/_){AL.alcErr=40964;return}function l(b,w){HEAPF32[r+4*b>>>2>>>0]=w}function c(b,w){HEAP16[r+2*b>>>1>>>0]=w}function u(b,w){HEAP8[r+b>>>0]=w}var d;switch(n.requestedSampleType){case"f32":d=l;break;case"i16":d=c;break;case"u8":d=u;break;default:return}if(Math.floor(_)==_)for(var p=0,f=0;f>>=0;var r=AL.requireValidCaptureDevice(e,"alcCaptureStart");r&&(r.isCapturing||(r.isCapturing=!0,r.capturedFrameCount=0,r.capturePlayhead=0))}_alcCaptureStart.sig="vp";function _alcCaptureStop(e){e>>>=0;var r=AL.requireValidCaptureDevice(e,"alcCaptureStop");r&&(r.isCapturing=!1)}_alcCaptureStop.sig="vp";function _alcCloseDevice(e){return e>>>=0,!(e in AL.deviceRefCounts)||AL.deviceRefCounts[e]>0?0:(delete AL.deviceRefCounts[e],AL.freeIds.push(e),1)}_alcCloseDevice.sig="ip";function _alcCreateContext(e,r){if(e>>>=0,r>>>=0,!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var t=null,n=[],a=null;if(r>>=2,r)for(var o=0,_=0;o=HEAP32[r++>>>0],n.push(o),o!==0;)switch(_=HEAP32[r++>>>0],n.push(_),o){case 4103:t||(t={}),t.sampleRate=_;break;case 4112:case 4113:break;case 6546:switch(_){case 0:a=!1;break;case 1:a=!0;break;case 2:break;default:return AL.alcErr=40964,0}break;case 6550:if(_!==0)return AL.alcErr=40964,0;break;default:return AL.alcErr=40964,0}var l=window.AudioContext||window.webkitAudioContext,c=null;try{t?c=new l(t):c=new l}catch(m){return m.name==="NotSupportedError"?AL.alcErr=40964:AL.alcErr=40961,0}autoResumeAudioContext(c),typeof c.createGain>"u"&&(c.createGain=c.createGainNode);var u=c.createGain();u.connect(c.destination);var d={deviceId:e,id:AL.newId(),attrs:n,audioCtx:c,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(()=>AL.scheduleContextAudio(d),AL.QUEUE_INTERVAL),gain:u,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:!1,hrtf:a||!1,_err:0,get err(){return this._err},set err(m){(this._err===0||m===0)&&(this._err=m)}};if(AL.deviceRefCounts[e]++,AL.contexts[d.id]=d,a!==null)for(var p in AL.contexts){var f=AL.contexts[p];f.deviceId===e&&(f.hrtf=a,AL.updateContextGlobal(f))}return d.id}_alcCreateContext.sig="ppp";function _alcDestroyContext(e){e>>>=0;var r=AL.contexts[e];if(AL.currentCtx===r){AL.alcErr=40962;return}AL.contexts[e].interval&&clearInterval(AL.contexts[e].interval),AL.deviceRefCounts[r.deviceId]--,delete AL.contexts[e],AL.freeIds.push(e)}_alcDestroyContext.sig="vp";function _alcGetContextsDevice(e){return e>>>=0,e in AL.contexts?AL.contexts[e].deviceId:0}_alcGetContextsDevice.sig="pp";function _alcGetCurrentContext(){return AL.currentCtx!==null?AL.currentCtx.id:0}_alcGetCurrentContext.sig="p";function _alcGetEnumValue(e,r){if(e>>>=0,r>>>=0,e!==0&&!(e in AL.deviceRefCounts))return 0;if(!r)return AL.alcErr=40964,0;var t=UTF8ToString(r);switch(t){case"ALC_NO_ERROR":return 0;case"ALC_INVALID_DEVICE":return 40961;case"ALC_INVALID_CONTEXT":return 40962;case"ALC_INVALID_ENUM":return 40963;case"ALC_INVALID_VALUE":return 40964;case"ALC_OUT_OF_MEMORY":return 40965;case"ALC_MAJOR_VERSION":return 4096;case"ALC_MINOR_VERSION":return 4097;case"ALC_ATTRIBUTES_SIZE":return 4098;case"ALC_ALL_ATTRIBUTES":return 4099;case"ALC_DEFAULT_DEVICE_SPECIFIER":return 4100;case"ALC_DEVICE_SPECIFIER":return 4101;case"ALC_EXTENSIONS":return 4102;case"ALC_FREQUENCY":return 4103;case"ALC_REFRESH":return 4104;case"ALC_SYNC":return 4105;case"ALC_MONO_SOURCES":return 4112;case"ALC_STEREO_SOURCES":return 4113;case"ALC_CAPTURE_DEVICE_SPECIFIER":return 784;case"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER":return 785;case"ALC_CAPTURE_SAMPLES":return 786;case"ALC_HRTF_SOFT":return 6546;case"ALC_HRTF_ID_SOFT":return 6550;case"ALC_DONT_CARE_SOFT":return 2;case"ALC_HRTF_STATUS_SOFT":return 6547;case"ALC_NUM_HRTF_SPECIFIERS_SOFT":return 6548;case"ALC_HRTF_SPECIFIER_SOFT":return 6549;case"ALC_HRTF_DISABLED_SOFT":return 0;case"ALC_HRTF_ENABLED_SOFT":return 1;case"ALC_HRTF_DENIED_SOFT":return 2;case"ALC_HRTF_REQUIRED_SOFT":return 3;case"ALC_HRTF_HEADPHONES_DETECTED_SOFT":return 4;case"ALC_HRTF_UNSUPPORTED_FORMAT_SOFT":return 5;default:return AL.alcErr=40964,0}}_alcGetEnumValue.sig="ipp";function _alcGetError(e){e>>>=0;var r=AL.alcErr;return AL.alcErr=0,r}_alcGetError.sig="ip";function _alcGetIntegerv(e,r,t,n){if(e>>>=0,n>>>=0,!(t===0||!n))switch(r){case 4096:HEAP32[n>>>2>>>0]=1;break;case 4097:HEAP32[n>>>2>>>0]=1;break;case 4098:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.attrs.length;break;case 4099:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}for(var a=0;a>>2>>>0]=AL.currentCtx.attrs[a];break;case 4103:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.audioCtx.sampleRate;break;case 4112:case 4113:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=2147483647;break;case 6546:case 6547:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}var o=0;for(var _ in AL.contexts){var l=AL.contexts[_];l.deviceId===e&&(o=l.hrtf?1:0)}HEAP32[n>>>2>>>0]=o;break;case 6548:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}HEAP32[n>>>2>>>0]=1;break;case 131075:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=1;case 786:var c=AL.requireValidCaptureDevice(e,"alcGetIntegerv");if(!c)return;var u=c.capturedFrameCount,d=c.requestedSampleRate,p=c.audioCtx.sampleRate,f=Math.floor(u*(d/p));HEAP32[n>>>2>>>0]=f;break;default:AL.alcErr=40963;return}}_alcGetIntegerv.sig="vpiip";function _alcGetString(e,r){if(e>>>=0,AL.alcStringCache[r])return AL.alcStringCache[r];var t;switch(r){case 0:t="No Error";break;case 40961:t="Invalid Device";break;case 40962:t="Invalid Context";break;case 40963:t="Invalid Enum";break;case 40964:t="Invalid Value";break;case 40965:t="Out of Memory";break;case 4100:if(typeof AudioContext<"u"||typeof webkitAudioContext<"u")t=AL.DEVICE_NAME;else return 0;break;case 4101:typeof AudioContext<"u"||typeof webkitAudioContext<"u"?t=AL.DEVICE_NAME.concat("\0"):t="\0";break;case 785:t=AL.CAPTURE_DEVICE_NAME;break;case 784:if(e===0)t=AL.CAPTURE_DEVICE_NAME.concat("\0");else{var n=AL.requireValidCaptureDevice(e,"alcGetString");if(!n)return 0;t=n.deviceName}break;case 4102:if(!e)return AL.alcErr=40961,0;t="";for(var a in AL.ALC_EXTENSIONS)t=t.concat(a),t=t.concat(" ");t=t.trim();break;default:return AL.alcErr=40963,0}return t=stringToNewUTF8(t),AL.alcStringCache[r]=t,t}_alcGetString.sig="ppi";function _alcIsExtensionPresent(e,r){e>>>=0,r>>>=0;var t=UTF8ToString(r);return AL.ALC_EXTENSIONS[t]?1:0}_alcIsExtensionPresent.sig="ipp";function _alcMakeContextCurrent(e){return e>>>=0,e===0?AL.currentCtx=null:AL.currentCtx=AL.contexts[e],1}_alcMakeContextCurrent.sig="ip";function _alcOpenDevice(e){if(e>>>=0,e){var r=UTF8ToString(e);if(r!==AL.DEVICE_NAME)return 0}if(typeof AudioContext<"u"||typeof webkitAudioContext<"u"){var t=AL.newId();return AL.deviceRefCounts[t]=0,t}return 0}_alcOpenDevice.sig="pp";function _alcProcessContext(e){e>>>=0}_alcProcessContext.sig="vp";function _alcSuspendContext(e){e>>>=0}_alcSuspendContext.sig="vp";function _duckdb_web_fs_directory_create(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.createDirectory(Module,e,r)}_duckdb_web_fs_directory_create.sig="vpi";function _duckdb_web_fs_directory_exists(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkDirectory(Module,e,r)}_duckdb_web_fs_directory_exists.sig="ipi";function _duckdb_web_fs_directory_list_files(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.listDirectoryEntries(Module,e,r)}_duckdb_web_fs_directory_list_files.sig="ipi";function _duckdb_web_fs_directory_remove(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.removeDirectory(Module,e,r)}_duckdb_web_fs_directory_remove.sig="vpi";function _duckdb_web_fs_file_close(e){return globalThis.DUCKDB_RUNTIME.closeFile(Module,e)}_duckdb_web_fs_file_close.sig="vi";function _duckdb_web_fs_file_exists(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkFile(Module,e,r)}_duckdb_web_fs_file_exists.sig="ipi";function _duckdb_web_fs_file_get_last_modified_time(e){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(Module,e)}_duckdb_web_fs_file_get_last_modified_time.sig="ii";function _duckdb_web_fs_file_move(e,r,t,n){return e>>>=0,t>>>=0,globalThis.DUCKDB_RUNTIME.moveFile(Module,e,r,t,n)}_duckdb_web_fs_file_move.sig="vpipi";function _duckdb_web_fs_file_open(e,r){return globalThis.DUCKDB_RUNTIME.openFile(Module,e,r)}_duckdb_web_fs_file_open.sig="pii";function _duckdb_web_fs_file_read(e,r,t,n){return r>>>=0,globalThis.DUCKDB_RUNTIME.readFile(Module,e,r,t,n)}_duckdb_web_fs_file_read.sig="iipid";function _duckdb_web_fs_file_truncate(e,r){return globalThis.DUCKDB_RUNTIME.truncateFile(Module,e,r)}_duckdb_web_fs_file_truncate.sig="vid";function _duckdb_web_fs_file_write(e,r,t,n){return r>>>=0,globalThis.DUCKDB_RUNTIME.writeFile(Module,e,r,t,n)}_duckdb_web_fs_file_write.sig="iipid";function _duckdb_web_fs_get_default_data_protocol(e){return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(e)}_duckdb_web_fs_get_default_data_protocol.sig="i";function _duckdb_web_fs_glob(e,r){return e>>>=0,globalThis.DUCKDB_RUNTIME.glob(Module,e,r)}_duckdb_web_fs_glob.sig="vpi";function _duckdb_web_test_platform_feature(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(Module,e)}_duckdb_web_test_platform_feature.sig="ii";function _duckdb_web_udf_scalar_call(e,r,t,n,a,o){return e>>>=0,t>>>=0,a>>>=0,globalThis.DUCKDB_RUNTIME.callScalarUDF(Module,e,r,t,n,a,o)}_duckdb_web_udf_scalar_call.sig="vpipipi";var _emscripten_alcDevicePauseSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.paused){AL.paused=!0;for(var r in AL.contexts){var t=AL.contexts[r];t.deviceId===e&&(t.audioCtx.suspend(),clearInterval(t.interval),t.interval=null)}}};_emscripten_alcDevicePauseSOFT.sig="vi";var _emscripten_alcDeviceResumeSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(AL.paused){AL.paused=!1;for(var r in AL.contexts){var t=AL.contexts[r];t.deviceId===e&&(t.interval=setInterval(()=>AL.scheduleContextAudio(t),AL.QUEUE_INTERVAL),t.audioCtx.resume())}}};_emscripten_alcDeviceResumeSOFT.sig="vi";var _emscripten_alcGetStringiSOFT=(e,r,t)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;if(AL.alcStringCache[r])return AL.alcStringCache[r];var n;switch(r){case 6549:if(t===0)n="Web Audio HRTF";else return AL.alcErr=40964,0;break;default:return t!==0?(AL.alcErr=40963,0):_alcGetString(e,r)}return n=stringToNewUTF8(n),AL.alcStringCache[r]=n,n};_emscripten_alcGetStringiSOFT.sig="iiii";var _emscripten_alcResetDeviceSOFT=(e,r)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var t=null;if(r>>=2,r)for(var n=0,a=0;n=HEAP32[r++>>>0],n!==0;)switch(a=HEAP32[r++>>>0],n){case 6546:a===1?t=!0:a===0&&(t=!1);break}if(t!==null)for(var o in AL.contexts){var _=AL.contexts[o];_.deviceId===e&&(_.hrtf=t,AL.updateContextGlobal(_))}return 1};_emscripten_alcResetDeviceSOFT.sig="iii";var readEmAsmArgsArray=[],readEmAsmArgs=(e,r)=>{readEmAsmArgsArray.length=0;for(var t;t=HEAPU8[e++>>>0];){var n=t!=105;n&=t!=112,r+=n&&r%8?4:0,readEmAsmArgsArray.push(t==112?HEAPU32[r>>>2>>>0]:t==105?HEAP32[r>>>2>>>0]:HEAPF64[r>>>3>>>0]),r+=n?8:4}return readEmAsmArgsArray},runEmAsmFunction=(e,r,t)=>{var n=readEmAsmArgs(r,t);return ASM_CONSTS[e](...n)};function _emscripten_asm_const_int(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runEmAsmFunction(e,r,t)}_emscripten_asm_const_int.sig="ippp";function _emscripten_asm_const_ptr(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runEmAsmFunction(e,r,t)}_emscripten_asm_const_ptr.sig="pppp";function _emscripten_console_error(e){e>>>=0,console.error(UTF8ToString(e))}_emscripten_console_error.sig="vp";function _emscripten_console_log(e){e>>>=0,console.log(UTF8ToString(e))}_emscripten_console_log.sig="vp";function _emscripten_console_warn(e){e>>>=0,console.warn(UTF8ToString(e))}_emscripten_console_warn.sig="vp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";function _emscripten_err(e){return e>>>=0,err(UTF8ToString(e))}_emscripten_err.sig="vp";var getHeapMax=()=>4294901760;function _emscripten_get_heap_max(){return getHeapMax()}_emscripten_get_heap_max.sig="p";var _emscripten_get_now_res=()=>ENVIRONMENT_IS_NODE?1:1e3;_emscripten_get_now_res.sig="d";var webgl_enable_ANGLE_instanced_arrays=e=>{var r=e.getExtension("ANGLE_instanced_arrays");if(r)return e.vertexAttribDivisor=(t,n)=>r.vertexAttribDivisorANGLE(t,n),e.drawArraysInstanced=(t,n,a,o)=>r.drawArraysInstancedANGLE(t,n,a,o),e.drawElementsInstanced=(t,n,a,o,_)=>r.drawElementsInstancedANGLE(t,n,a,o,_),1},webgl_enable_OES_vertex_array_object=e=>{var r=e.getExtension("OES_vertex_array_object");if(r)return e.createVertexArray=()=>r.createVertexArrayOES(),e.deleteVertexArray=t=>r.deleteVertexArrayOES(t),e.bindVertexArray=t=>r.bindVertexArrayOES(t),e.isVertexArray=t=>r.isVertexArrayOES(t),1},webgl_enable_WEBGL_draw_buffers=e=>{var r=e.getExtension("WEBGL_draw_buffers");if(r)return e.drawBuffers=(t,n)=>r.drawBuffersWEBGL(t,n),1},webgl_enable_WEBGL_multi_draw=e=>!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")),getEmscriptenSupportedExtensions=e=>{var r=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw"];return(e.getSupportedExtensions()||[]).filter(t=>r.includes(t))},GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],stringCache:{},unpackAlignment:4,recordError:e=>{GL.lastError||(GL.lastError=e)},getNewId:e=>{for(var r=GL.counter++,t=e.length;t{for(var a=0;a>>2>>>0]=_}},getSource:(e,r,t,n)=>{for(var a="",o=0;o>>2>>>0]:void 0;a+=UTF8ToString(HEAPU32[t+o*4>>>2>>>0],_)}return a},createContext:(e,r)=>{if(!e.getContextSafariWebGL2Fixed){let o=function(_,l){var c=e.getContextSafariWebGL2Fixed(_,l);return _=="webgl"==c instanceof WebGLRenderingContext?c:null};var a=o;e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=o}var t=e.getContext("webgl",r);if(!t)return 0;var n=GL.registerContext(t,r);return n},registerContext:(e,r)=>{var t=GL.getNewId(GL.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),GL.contexts[t]=n,(typeof r.enableExtensionsByDefault>"u"||r.enableExtensionsByDefault)&&GL.initExtensions(n),t},makeContextCurrent:e=>{var r;return GL.currentContext=GL.contexts[e],Module.ctx=GLctx=(r=GL.currentContext)==null?void 0:r.GLctx,!(e&&!GLctx)},getContext:e=>GL.contexts[e],deleteContext:e=>{GL.currentContext===GL.contexts[e]&&(GL.currentContext=null),typeof JSEvents=="object"&&JSEvents.removeAllHandlersOnTarget(GL.contexts[e].GLctx.canvas),GL.contexts[e]&&GL.contexts[e].GLctx.canvas&&(GL.contexts[e].GLctx.canvas.GLctxObject=void 0),GL.contexts[e]=null},initExtensions:e=>{if(e||(e=GL.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;webgl_enable_ANGLE_instanced_arrays(r),webgl_enable_OES_vertex_array_object(r),webgl_enable_WEBGL_draw_buffers(r),r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query"),webgl_enable_WEBGL_multi_draw(r),getEmscriptenSupportedExtensions(r).forEach(t=>{!t.includes("lose_context")&&!t.includes("debug")&&r.getExtension(t)})}}},_glActiveTexture=e=>GLctx.activeTexture(e);_glActiveTexture.sig="vi";var _emscripten_glActiveTexture=_glActiveTexture;_emscripten_glActiveTexture.sig="vi";var _glAttachShader=(e,r)=>{GLctx.attachShader(GL.programs[e],GL.shaders[r])};_glAttachShader.sig="vii";var _emscripten_glAttachShader=_glAttachShader;_emscripten_glAttachShader.sig="vii";var _glBeginQueryEXT=(e,r)=>{GLctx.disjointTimerQueryExt.beginQueryEXT(e,GL.queries[r])};_glBeginQueryEXT.sig="vii";var _emscripten_glBeginQueryEXT=_glBeginQueryEXT;function _glBindAttribLocation(e,r,t){t>>>=0,GLctx.bindAttribLocation(GL.programs[e],r,UTF8ToString(t))}_glBindAttribLocation.sig="viip";var _emscripten_glBindAttribLocation=_glBindAttribLocation;_emscripten_glBindAttribLocation.sig="viip";var _glBindBuffer=(e,r)=>{GLctx.bindBuffer(e,GL.buffers[r])};_glBindBuffer.sig="vii";var _emscripten_glBindBuffer=_glBindBuffer;_emscripten_glBindBuffer.sig="vii";var _glBindFramebuffer=(e,r)=>{GLctx.bindFramebuffer(e,GL.framebuffers[r])};_glBindFramebuffer.sig="vii";var _emscripten_glBindFramebuffer=_glBindFramebuffer;_emscripten_glBindFramebuffer.sig="vii";var _glBindRenderbuffer=(e,r)=>{GLctx.bindRenderbuffer(e,GL.renderbuffers[r])};_glBindRenderbuffer.sig="vii";var _emscripten_glBindRenderbuffer=_glBindRenderbuffer;_emscripten_glBindRenderbuffer.sig="vii";var _glBindTexture=(e,r)=>{GLctx.bindTexture(e,GL.textures[r])};_glBindTexture.sig="vii";var _emscripten_glBindTexture=_glBindTexture;_emscripten_glBindTexture.sig="vii";var _glBindVertexArray=e=>{GLctx.bindVertexArray(GL.vaos[e])};_glBindVertexArray.sig="vi";var _glBindVertexArrayOES=_glBindVertexArray;_glBindVertexArrayOES.sig="vi";var _emscripten_glBindVertexArrayOES=_glBindVertexArrayOES;_emscripten_glBindVertexArrayOES.sig="vi";var _glBlendColor=(e,r,t,n)=>GLctx.blendColor(e,r,t,n);_glBlendColor.sig="vffff";var _emscripten_glBlendColor=_glBlendColor;_emscripten_glBlendColor.sig="vffff";var _glBlendEquation=e=>GLctx.blendEquation(e);_glBlendEquation.sig="vi";var _emscripten_glBlendEquation=_glBlendEquation;_emscripten_glBlendEquation.sig="vi";var _glBlendEquationSeparate=(e,r)=>GLctx.blendEquationSeparate(e,r);_glBlendEquationSeparate.sig="vii";var _emscripten_glBlendEquationSeparate=_glBlendEquationSeparate;_emscripten_glBlendEquationSeparate.sig="vii";var _glBlendFunc=(e,r)=>GLctx.blendFunc(e,r);_glBlendFunc.sig="vii";var _emscripten_glBlendFunc=_glBlendFunc;_emscripten_glBlendFunc.sig="vii";var _glBlendFuncSeparate=(e,r,t,n)=>GLctx.blendFuncSeparate(e,r,t,n);_glBlendFuncSeparate.sig="viiii";var _emscripten_glBlendFuncSeparate=_glBlendFuncSeparate;_emscripten_glBlendFuncSeparate.sig="viiii";function _glBufferData(e,r,t,n){r>>>=0,t>>>=0,GLctx.bufferData(e,t?HEAPU8.subarray(t>>>0,t+r>>>0):r,n)}_glBufferData.sig="vippi";var _emscripten_glBufferData=_glBufferData;_emscripten_glBufferData.sig="vippi";function _glBufferSubData(e,r,t,n){r>>>=0,t>>>=0,n>>>=0,GLctx.bufferSubData(e,r,HEAPU8.subarray(n>>>0,n+t>>>0))}_glBufferSubData.sig="vippp";var _emscripten_glBufferSubData=_glBufferSubData;_emscripten_glBufferSubData.sig="vippp";var _glCheckFramebufferStatus=e=>GLctx.checkFramebufferStatus(e);_glCheckFramebufferStatus.sig="ii";var _emscripten_glCheckFramebufferStatus=_glCheckFramebufferStatus;_emscripten_glCheckFramebufferStatus.sig="ii";var _glClear=e=>GLctx.clear(e);_glClear.sig="vi";var _emscripten_glClear=_glClear;_emscripten_glClear.sig="vi";var _glClearColor=(e,r,t,n)=>GLctx.clearColor(e,r,t,n);_glClearColor.sig="vffff";var _emscripten_glClearColor=_glClearColor;_emscripten_glClearColor.sig="vffff";var _glClearDepthf=e=>GLctx.clearDepth(e);_glClearDepthf.sig="vf";var _emscripten_glClearDepthf=_glClearDepthf;_emscripten_glClearDepthf.sig="vf";var _glClearStencil=e=>GLctx.clearStencil(e);_glClearStencil.sig="vi";var _emscripten_glClearStencil=_glClearStencil;_emscripten_glClearStencil.sig="vi";var _glColorMask=(e,r,t,n)=>{GLctx.colorMask(!!e,!!r,!!t,!!n)};_glColorMask.sig="viiii";var _emscripten_glColorMask=_glColorMask;_emscripten_glColorMask.sig="viiii";var _glCompileShader=e=>{GLctx.compileShader(GL.shaders[e])};_glCompileShader.sig="vi";var _emscripten_glCompileShader=_glCompileShader;_emscripten_glCompileShader.sig="vi";function _glCompressedTexImage2D(e,r,t,n,a,o,_,l){l>>>=0,GLctx.compressedTexImage2D(e,r,t,n,a,o,l?HEAPU8.subarray(l>>>0,l+_>>>0):null)}_glCompressedTexImage2D.sig="viiiiiiip";var _emscripten_glCompressedTexImage2D=_glCompressedTexImage2D;_emscripten_glCompressedTexImage2D.sig="viiiiiiip";function _glCompressedTexSubImage2D(e,r,t,n,a,o,_,l,c){c>>>=0,GLctx.compressedTexSubImage2D(e,r,t,n,a,o,_,c?HEAPU8.subarray(c>>>0,c+l>>>0):null)}_glCompressedTexSubImage2D.sig="viiiiiiiip";var _emscripten_glCompressedTexSubImage2D=_glCompressedTexSubImage2D;_emscripten_glCompressedTexSubImage2D.sig="viiiiiiiip";var _glCopyTexImage2D=(e,r,t,n,a,o,_,l)=>GLctx.copyTexImage2D(e,r,t,n,a,o,_,l);_glCopyTexImage2D.sig="viiiiiiii";var _emscripten_glCopyTexImage2D=_glCopyTexImage2D;_emscripten_glCopyTexImage2D.sig="viiiiiiii";var _glCopyTexSubImage2D=(e,r,t,n,a,o,_,l)=>GLctx.copyTexSubImage2D(e,r,t,n,a,o,_,l);_glCopyTexSubImage2D.sig="viiiiiiii";var _emscripten_glCopyTexSubImage2D=_glCopyTexSubImage2D;_emscripten_glCopyTexSubImage2D.sig="viiiiiiii";var _glCreateProgram=()=>{var e=GL.getNewId(GL.programs),r=GLctx.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,GL.programs[e]=r,e};_glCreateProgram.sig="i";var _emscripten_glCreateProgram=_glCreateProgram;_emscripten_glCreateProgram.sig="i";var _glCreateShader=e=>{var r=GL.getNewId(GL.shaders);return GL.shaders[r]=GLctx.createShader(e),r};_glCreateShader.sig="ii";var _emscripten_glCreateShader=_glCreateShader;_emscripten_glCreateShader.sig="ii";var _glCullFace=e=>GLctx.cullFace(e);_glCullFace.sig="vi";var _emscripten_glCullFace=_glCullFace;_emscripten_glCullFace.sig="vi";function _glDeleteBuffers(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.buffers[n];a&&(GLctx.deleteBuffer(a),a.name=0,GL.buffers[n]=null)}}_glDeleteBuffers.sig="vip";var _emscripten_glDeleteBuffers=_glDeleteBuffers;_emscripten_glDeleteBuffers.sig="vip";function _glDeleteFramebuffers(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.framebuffers[n];a&&(GLctx.deleteFramebuffer(a),a.name=0,GL.framebuffers[n]=null)}}_glDeleteFramebuffers.sig="vip";var _emscripten_glDeleteFramebuffers=_glDeleteFramebuffers;_emscripten_glDeleteFramebuffers.sig="vip";var _glDeleteProgram=e=>{if(e){var r=GL.programs[e];if(!r){GL.recordError(1281);return}GLctx.deleteProgram(r),r.name=0,GL.programs[e]=null}};_glDeleteProgram.sig="vi";var _emscripten_glDeleteProgram=_glDeleteProgram;_emscripten_glDeleteProgram.sig="vi";function _glDeleteQueriesEXT(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.queries[n];a&&(GLctx.disjointTimerQueryExt.deleteQueryEXT(a),GL.queries[n]=null)}}_glDeleteQueriesEXT.sig="vip";var _emscripten_glDeleteQueriesEXT=_glDeleteQueriesEXT;function _glDeleteRenderbuffers(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.renderbuffers[n];a&&(GLctx.deleteRenderbuffer(a),a.name=0,GL.renderbuffers[n]=null)}}_glDeleteRenderbuffers.sig="vip";var _emscripten_glDeleteRenderbuffers=_glDeleteRenderbuffers;_emscripten_glDeleteRenderbuffers.sig="vip";var _glDeleteShader=e=>{if(e){var r=GL.shaders[e];if(!r){GL.recordError(1281);return}GLctx.deleteShader(r),GL.shaders[e]=null}};_glDeleteShader.sig="vi";var _emscripten_glDeleteShader=_glDeleteShader;_emscripten_glDeleteShader.sig="vi";function _glDeleteTextures(e,r){r>>>=0;for(var t=0;t>>2>>>0],a=GL.textures[n];a&&(GLctx.deleteTexture(a),a.name=0,GL.textures[n]=null)}}_glDeleteTextures.sig="vip";var _emscripten_glDeleteTextures=_glDeleteTextures;_emscripten_glDeleteTextures.sig="vip";function _glDeleteVertexArrays(e,r){r>>>=0;for(var t=0;t>>2>>>0];GLctx.deleteVertexArray(GL.vaos[n]),GL.vaos[n]=null}}_glDeleteVertexArrays.sig="vip";var _glDeleteVertexArraysOES=_glDeleteVertexArrays;_glDeleteVertexArraysOES.sig="vip";var _emscripten_glDeleteVertexArraysOES=_glDeleteVertexArraysOES;_emscripten_glDeleteVertexArraysOES.sig="vip";var _glDepthFunc=e=>GLctx.depthFunc(e);_glDepthFunc.sig="vi";var _emscripten_glDepthFunc=_glDepthFunc;_emscripten_glDepthFunc.sig="vi";var _glDepthMask=e=>{GLctx.depthMask(!!e)};_glDepthMask.sig="vi";var _emscripten_glDepthMask=_glDepthMask;_emscripten_glDepthMask.sig="vi";var _glDepthRangef=(e,r)=>GLctx.depthRange(e,r);_glDepthRangef.sig="vff";var _emscripten_glDepthRangef=_glDepthRangef;_emscripten_glDepthRangef.sig="vff";var _glDetachShader=(e,r)=>{GLctx.detachShader(GL.programs[e],GL.shaders[r])};_glDetachShader.sig="vii";var _emscripten_glDetachShader=_glDetachShader;_emscripten_glDetachShader.sig="vii";var _glDisable=e=>GLctx.disable(e);_glDisable.sig="vi";var _emscripten_glDisable=_glDisable;_emscripten_glDisable.sig="vi";var _glDisableVertexAttribArray=e=>{GLctx.disableVertexAttribArray(e)};_glDisableVertexAttribArray.sig="vi";var _emscripten_glDisableVertexAttribArray=_glDisableVertexAttribArray;_emscripten_glDisableVertexAttribArray.sig="vi";var _glDrawArrays=(e,r,t)=>{GLctx.drawArrays(e,r,t)};_glDrawArrays.sig="viii";var _emscripten_glDrawArrays=_glDrawArrays;_emscripten_glDrawArrays.sig="viii";var _glDrawArraysInstanced=(e,r,t,n)=>{GLctx.drawArraysInstanced(e,r,t,n)};_glDrawArraysInstanced.sig="viiii";var _glDrawArraysInstancedANGLE=_glDrawArraysInstanced,_emscripten_glDrawArraysInstancedANGLE=_glDrawArraysInstancedANGLE,tempFixedLengthArray=[];function _glDrawBuffers(e,r){r>>>=0;for(var t=tempFixedLengthArray[e],n=0;n>>2>>>0];GLctx.drawBuffers(t)}_glDrawBuffers.sig="vip";var _glDrawBuffersWEBGL=_glDrawBuffers,_emscripten_glDrawBuffersWEBGL=_glDrawBuffersWEBGL;function _glDrawElements(e,r,t,n){n>>>=0,GLctx.drawElements(e,r,t,n)}_glDrawElements.sig="viiip";var _emscripten_glDrawElements=_glDrawElements;_emscripten_glDrawElements.sig="viiip";function _glDrawElementsInstanced(e,r,t,n,a){n>>>=0,GLctx.drawElementsInstanced(e,r,t,n,a)}_glDrawElementsInstanced.sig="viiipi";var _glDrawElementsInstancedANGLE=_glDrawElementsInstanced,_emscripten_glDrawElementsInstancedANGLE=_glDrawElementsInstancedANGLE,_glEnable=e=>GLctx.enable(e);_glEnable.sig="vi";var _emscripten_glEnable=_glEnable;_emscripten_glEnable.sig="vi";var _glEnableVertexAttribArray=e=>{GLctx.enableVertexAttribArray(e)};_glEnableVertexAttribArray.sig="vi";var _emscripten_glEnableVertexAttribArray=_glEnableVertexAttribArray;_emscripten_glEnableVertexAttribArray.sig="vi";var _glEndQueryEXT=e=>{GLctx.disjointTimerQueryExt.endQueryEXT(e)};_glEndQueryEXT.sig="vi";var _emscripten_glEndQueryEXT=_glEndQueryEXT,_glFinish=()=>GLctx.finish();_glFinish.sig="v";var _emscripten_glFinish=_glFinish;_emscripten_glFinish.sig="v";var _glFlush=()=>GLctx.flush();_glFlush.sig="v";var _emscripten_glFlush=_glFlush;_emscripten_glFlush.sig="v";var _glFramebufferRenderbuffer=(e,r,t,n)=>{GLctx.framebufferRenderbuffer(e,r,t,GL.renderbuffers[n])};_glFramebufferRenderbuffer.sig="viiii";var _emscripten_glFramebufferRenderbuffer=_glFramebufferRenderbuffer;_emscripten_glFramebufferRenderbuffer.sig="viiii";var _glFramebufferTexture2D=(e,r,t,n,a)=>{GLctx.framebufferTexture2D(e,r,t,GL.textures[n],a)};_glFramebufferTexture2D.sig="viiiii";var _emscripten_glFramebufferTexture2D=_glFramebufferTexture2D;_emscripten_glFramebufferTexture2D.sig="viiiii";var _glFrontFace=e=>GLctx.frontFace(e);_glFrontFace.sig="vi";var _emscripten_glFrontFace=_glFrontFace;_emscripten_glFrontFace.sig="vi";function _glGenBuffers(e,r){r>>>=0,GL.genObject(e,r,"createBuffer",GL.buffers)}_glGenBuffers.sig="vip";var _emscripten_glGenBuffers=_glGenBuffers;_emscripten_glGenBuffers.sig="vip";function _glGenFramebuffers(e,r){r>>>=0,GL.genObject(e,r,"createFramebuffer",GL.framebuffers)}_glGenFramebuffers.sig="vip";var _emscripten_glGenFramebuffers=_glGenFramebuffers;_emscripten_glGenFramebuffers.sig="vip";function _glGenQueriesEXT(e,r){r>>>=0;for(var t=0;t>>2>>>0]=0;return}var a=GL.getNewId(GL.queries);n.name=a,GL.queries[a]=n,HEAP32[r+t*4>>>2>>>0]=a}}_glGenQueriesEXT.sig="vip";var _emscripten_glGenQueriesEXT=_glGenQueriesEXT;function _glGenRenderbuffers(e,r){r>>>=0,GL.genObject(e,r,"createRenderbuffer",GL.renderbuffers)}_glGenRenderbuffers.sig="vip";var _emscripten_glGenRenderbuffers=_glGenRenderbuffers;_emscripten_glGenRenderbuffers.sig="vip";function _glGenTextures(e,r){r>>>=0,GL.genObject(e,r,"createTexture",GL.textures)}_glGenTextures.sig="vip";var _emscripten_glGenTextures=_glGenTextures;_emscripten_glGenTextures.sig="vip";function _glGenVertexArrays(e,r){r>>>=0,GL.genObject(e,r,"createVertexArray",GL.vaos)}_glGenVertexArrays.sig="vip";var _glGenVertexArraysOES=_glGenVertexArrays;_glGenVertexArraysOES.sig="vip";var _emscripten_glGenVertexArraysOES=_glGenVertexArraysOES;_emscripten_glGenVertexArraysOES.sig="vip";var _glGenerateMipmap=e=>GLctx.generateMipmap(e);_glGenerateMipmap.sig="vi";var _emscripten_glGenerateMipmap=_glGenerateMipmap;_emscripten_glGenerateMipmap.sig="vi";var __glGetActiveAttribOrUniform=(e,r,t,n,a,o,_,l)=>{r=GL.programs[r];var c=GLctx[e](r,t);if(c){var u=l&&stringToUTF8(c.name,l,n);a&&(HEAP32[a>>>2>>>0]=u),o&&(HEAP32[o>>>2>>>0]=c.size),_&&(HEAP32[_>>>2>>>0]=c.type)}};function _glGetActiveAttrib(e,r,t,n,a,o,_){n>>>=0,a>>>=0,o>>>=0,_>>>=0,__glGetActiveAttribOrUniform("getActiveAttrib",e,r,t,n,a,o,_)}_glGetActiveAttrib.sig="viiipppp";var _emscripten_glGetActiveAttrib=_glGetActiveAttrib;_emscripten_glGetActiveAttrib.sig="viiipppp";function _glGetActiveUniform(e,r,t,n,a,o,_){n>>>=0,a>>>=0,o>>>=0,_>>>=0,__glGetActiveAttribOrUniform("getActiveUniform",e,r,t,n,a,o,_)}_glGetActiveUniform.sig="viiipppp";var _emscripten_glGetActiveUniform=_glGetActiveUniform;_emscripten_glGetActiveUniform.sig="viiipppp";function _glGetAttachedShaders(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getAttachedShaders(GL.programs[e]),o=a.length;o>r&&(o=r),HEAP32[t>>>2>>>0]=o;for(var _=0;_>>2>>>0]=l}}_glGetAttachedShaders.sig="viipp";var _emscripten_glGetAttachedShaders=_glGetAttachedShaders;_emscripten_glGetAttachedShaders.sig="viipp";function _glGetAttribLocation(e,r){return r>>>=0,GLctx.getAttribLocation(GL.programs[e],UTF8ToString(r))}_glGetAttribLocation.sig="iip";var _emscripten_glGetAttribLocation=_glGetAttribLocation;_emscripten_glGetAttribLocation.sig="iip";var writeI53ToI64=(e,r)=>{HEAPU32[e>>>2>>>0]=r;var t=HEAPU32[e>>>2>>>0];HEAPU32[e+4>>>2>>>0]=(r-t)/4294967296},emscriptenWebGLGet=(e,r,t)=>{if(!r){GL.recordError(1281);return}var n=void 0;switch(e){case 36346:n=1;break;case 36344:t!=0&&t!=1&&GL.recordError(1280);return;case 36345:n=0;break;case 34466:var a=GLctx.getParameter(34467);n=a?a.length:0;break}if(n===void 0){var o=GLctx.getParameter(e);switch(typeof o){case"number":n=o;break;case"boolean":n=o?1:0;break;case"string":GL.recordError(1280);return;case"object":if(o===null)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{n=0;break}default:{GL.recordError(1280);return}}else if(o instanceof Float32Array||o instanceof Uint32Array||o instanceof Int32Array||o instanceof Array){for(var _=0;_>>2>>>0]=o[_];break;case 2:HEAPF32[r+_*4>>>2>>>0]=o[_];break;case 4:HEAP8[r+_>>>0]=o[_]?1:0;break}return}else try{n=o.name|0}catch(l){GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(t,"v: Unknown object returned from WebGL getParameter(").concat(e,")! (error: ").concat(l,")"));return}break;default:GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(t,"v: Native code calling glGet").concat(t,"v(").concat(e,") and it returns ").concat(o," of type ").concat(typeof o,"!"));return}}switch(t){case 1:writeI53ToI64(r,n);break;case 0:HEAP32[r>>>2>>>0]=n;break;case 2:HEAPF32[r>>>2>>>0]=n;break;case 4:HEAP8[r>>>0]=n?1:0;break}};function _glGetBooleanv(e,r){return r>>>=0,emscriptenWebGLGet(e,r,4)}_glGetBooleanv.sig="vip";var _emscripten_glGetBooleanv=_glGetBooleanv;_emscripten_glGetBooleanv.sig="vip";function _glGetBufferParameteriv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getBufferParameter(e,r)}_glGetBufferParameteriv.sig="viip";var _emscripten_glGetBufferParameteriv=_glGetBufferParameteriv;_emscripten_glGetBufferParameteriv.sig="viip";var _glGetError=()=>{var e=GLctx.getError()||GL.lastError;return GL.lastError=0,e};_glGetError.sig="i";var _emscripten_glGetError=_glGetError;_emscripten_glGetError.sig="i";function _glGetFloatv(e,r){return r>>>=0,emscriptenWebGLGet(e,r,2)}_glGetFloatv.sig="vip";var _emscripten_glGetFloatv=_glGetFloatv;_emscripten_glGetFloatv.sig="vip";function _glGetFramebufferAttachmentParameteriv(e,r,t,n){n>>>=0;var a=GLctx.getFramebufferAttachmentParameter(e,r,t);(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)&&(a=a.name|0),HEAP32[n>>>2>>>0]=a}_glGetFramebufferAttachmentParameteriv.sig="viiip";var _emscripten_glGetFramebufferAttachmentParameteriv=_glGetFramebufferAttachmentParameteriv;_emscripten_glGetFramebufferAttachmentParameteriv.sig="viiip";function _glGetIntegerv(e,r){return r>>>=0,emscriptenWebGLGet(e,r,0)}_glGetIntegerv.sig="vip";var _emscripten_glGetIntegerv=_glGetIntegerv;_emscripten_glGetIntegerv.sig="vip";function _glGetProgramInfoLog(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getProgramInfoLog(GL.programs[e]);a===null&&(a="(unknown error)");var o=r>0&&n?stringToUTF8(a,n,r):0;t&&(HEAP32[t>>>2>>>0]=o)}_glGetProgramInfoLog.sig="viipp";var _emscripten_glGetProgramInfoLog=_glGetProgramInfoLog;_emscripten_glGetProgramInfoLog.sig="viipp";function _glGetProgramiv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}if(e>=GL.counter){GL.recordError(1281);return}if(e=GL.programs[e],r==35716){var n=GLctx.getProgramInfoLog(e);n===null&&(n="(unknown error)"),HEAP32[t>>>2>>>0]=n.length+1}else if(r==35719){if(!e.maxUniformLength)for(var a=0;a>>2>>>0]=e.maxUniformLength}else if(r==35722){if(!e.maxAttributeLength)for(var a=0;a>>2>>>0]=e.maxAttributeLength}else if(r==35381){if(!e.maxUniformBlockNameLength)for(var a=0;a>>2>>>0]=e.maxUniformBlockNameLength}else HEAP32[t>>>2>>>0]=GLctx.getProgramParameter(e,r)}_glGetProgramiv.sig="viip";var _emscripten_glGetProgramiv=_glGetProgramiv;_emscripten_glGetProgramiv.sig="viip";function _glGetQueryObjecti64vEXT(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}var n=GL.queries[e],a;a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,r);var o;typeof a=="boolean"?o=a?1:0:o=a,writeI53ToI64(t,o)}_glGetQueryObjecti64vEXT.sig="viip";var _emscripten_glGetQueryObjecti64vEXT=_glGetQueryObjecti64vEXT;function _glGetQueryObjectivEXT(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}var n=GL.queries[e],a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,r),o;typeof a=="boolean"?o=a?1:0:o=a,HEAP32[t>>>2>>>0]=o}_glGetQueryObjectivEXT.sig="viip";var _emscripten_glGetQueryObjectivEXT=_glGetQueryObjectivEXT,_glGetQueryObjectui64vEXT=_glGetQueryObjecti64vEXT,_emscripten_glGetQueryObjectui64vEXT=_glGetQueryObjectui64vEXT,_glGetQueryObjectuivEXT=_glGetQueryObjectivEXT,_emscripten_glGetQueryObjectuivEXT=_glGetQueryObjectuivEXT;function _glGetQueryivEXT(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.disjointTimerQueryExt.getQueryEXT(e,r)}_glGetQueryivEXT.sig="viip";var _emscripten_glGetQueryivEXT=_glGetQueryivEXT;function _glGetRenderbufferParameteriv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getRenderbufferParameter(e,r)}_glGetRenderbufferParameteriv.sig="viip";var _emscripten_glGetRenderbufferParameteriv=_glGetRenderbufferParameteriv;_emscripten_glGetRenderbufferParameteriv.sig="viip";function _glGetShaderInfoLog(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getShaderInfoLog(GL.shaders[e]);a===null&&(a="(unknown error)");var o=r>0&&n?stringToUTF8(a,n,r):0;t&&(HEAP32[t>>>2>>>0]=o)}_glGetShaderInfoLog.sig="viipp";var _emscripten_glGetShaderInfoLog=_glGetShaderInfoLog;_emscripten_glGetShaderInfoLog.sig="viipp";function _glGetShaderPrecisionFormat(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getShaderPrecisionFormat(e,r);HEAP32[t>>>2>>>0]=a.rangeMin,HEAP32[t+4>>>2>>>0]=a.rangeMax,HEAP32[n>>>2>>>0]=a.precision}_glGetShaderPrecisionFormat.sig="viipp";var _emscripten_glGetShaderPrecisionFormat=_glGetShaderPrecisionFormat;_emscripten_glGetShaderPrecisionFormat.sig="viipp";function _glGetShaderSource(e,r,t,n){t>>>=0,n>>>=0;var a=GLctx.getShaderSource(GL.shaders[e]);if(a){var o=r>0&&n?stringToUTF8(a,n,r):0;t&&(HEAP32[t>>>2>>>0]=o)}}_glGetShaderSource.sig="viipp";var _emscripten_glGetShaderSource=_glGetShaderSource;_emscripten_glGetShaderSource.sig="viipp";function _glGetShaderiv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}if(r==35716){var n=GLctx.getShaderInfoLog(GL.shaders[e]);n===null&&(n="(unknown error)");var a=n?n.length+1:0;HEAP32[t>>>2>>>0]=a}else if(r==35720){var o=GLctx.getShaderSource(GL.shaders[e]),_=o?o.length+1:0;HEAP32[t>>>2>>>0]=_}else HEAP32[t>>>2>>>0]=GLctx.getShaderParameter(GL.shaders[e],r)}_glGetShaderiv.sig="viip";var _emscripten_glGetShaderiv=_glGetShaderiv;_emscripten_glGetShaderiv.sig="viip";var webglGetExtensions=function e(){var r=getEmscriptenSupportedExtensions(GLctx);return r=r.concat(r.map(t=>"GL_"+t)),r};function _glGetString(e){var r=GL.stringCache[e];if(!r){switch(e){case 7939:r=stringToNewUTF8(webglGetExtensions().join(" "));break;case 7936:case 7937:case 37445:case 37446:var t=GLctx.getParameter(e);t||GL.recordError(1280),r=t?stringToNewUTF8(t):0;break;case 7938:var n=GLctx.getParameter(7938);n="OpenGL ES 2.0 (".concat(n,")"),r=stringToNewUTF8(n);break;case 35724:var a=GLctx.getParameter(35724),o=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/,_=a.match(o);_!==null&&(_[1].length==3&&(_[1]=_[1]+"0"),a="OpenGL ES GLSL ES ".concat(_[1]," (").concat(a,")")),r=stringToNewUTF8(a);break;default:GL.recordError(1280)}GL.stringCache[e]=r}return r}_glGetString.sig="pi";var _emscripten_glGetString=_glGetString;_emscripten_glGetString.sig="pi";function _glGetTexParameterfv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAPF32[t>>>2>>>0]=GLctx.getTexParameter(e,r)}_glGetTexParameterfv.sig="viip";var _emscripten_glGetTexParameterfv=_glGetTexParameterfv;_emscripten_glGetTexParameterfv.sig="viip";function _glGetTexParameteriv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getTexParameter(e,r)}_glGetTexParameteriv.sig="viip";var _emscripten_glGetTexParameteriv=_glGetTexParameteriv;_emscripten_glGetTexParameteriv.sig="viip";var webglGetLeftBracePos=e=>e.slice(-1)=="]"&&e.lastIndexOf("["),webglPrepareUniformLocationsBeforeFirstUse=e=>{var r=e.uniformLocsById,t=e.uniformSizeAndIdsByName,n,a;if(!r)for(e.uniformLocsById=r={},e.uniformArrayNamesById={},n=0;n0?_.slice(0,c):_,d=e.uniformIdCounter;for(e.uniformIdCounter+=l,t[u]=[l,d],a=0;a>>=0,r=UTF8ToString(r),e=GL.programs[e]){webglPrepareUniformLocationsBeforeFirstUse(e);var t=e.uniformLocsById,n=0,a=r,o=webglGetLeftBracePos(r);o>0&&(n=jstoi_q(r.slice(o+1))>>>0,a=r.slice(0,o));var _=e.uniformSizeAndIdsByName[a];if(_&&n<_[0]&&(n+=_[1],t[n]=t[n]||GLctx.getUniformLocation(e,r)))return n}else GL.recordError(1281);return-1}_glGetUniformLocation.sig="iip";var _emscripten_glGetUniformLocation=_glGetUniformLocation;_emscripten_glGetUniformLocation.sig="iip";var webglGetUniformLocation=e=>{var r=GLctx.currentProgram;if(r){var t=r.uniformLocsById[e];return typeof t=="number"&&(r.uniformLocsById[e]=t=GLctx.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?"[".concat(t,"]"):""))),t}else GL.recordError(1282)},emscriptenWebGLGetUniform=(e,r,t,n)=>{if(!t){GL.recordError(1281);return}e=GL.programs[e],webglPrepareUniformLocationsBeforeFirstUse(e);var a=GLctx.getUniform(e,webglGetUniformLocation(r));if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[t>>>2>>>0]=a;break;case 2:HEAPF32[t>>>2>>>0]=a;break}else for(var o=0;o>>2>>>0]=a[o];break;case 2:HEAPF32[t+o*4>>>2>>>0]=a[o];break}};function _glGetUniformfv(e,r,t){t>>>=0,emscriptenWebGLGetUniform(e,r,t,2)}_glGetUniformfv.sig="viip";var _emscripten_glGetUniformfv=_glGetUniformfv;_emscripten_glGetUniformfv.sig="viip";function _glGetUniformiv(e,r,t){t>>>=0,emscriptenWebGLGetUniform(e,r,t,0)}_glGetUniformiv.sig="viip";var _emscripten_glGetUniformiv=_glGetUniformiv;_emscripten_glGetUniformiv.sig="viip";function _glGetVertexAttribPointerv(e,r,t){if(t>>>=0,!t){GL.recordError(1281);return}HEAP32[t>>>2>>>0]=GLctx.getVertexAttribOffset(e,r)}_glGetVertexAttribPointerv.sig="viip";var _emscripten_glGetVertexAttribPointerv=_glGetVertexAttribPointerv;_emscripten_glGetVertexAttribPointerv.sig="viip";var emscriptenWebGLGetVertexAttrib=(e,r,t,n)=>{if(!t){GL.recordError(1281);return}var a=GLctx.getVertexAttrib(e,r);if(r==34975)HEAP32[t>>>2>>>0]=a&&a.name;else if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[t>>>2>>>0]=a;break;case 2:HEAPF32[t>>>2>>>0]=a;break;case 5:HEAP32[t>>>2>>>0]=Math.fround(a);break}else for(var o=0;o>>2>>>0]=a[o];break;case 2:HEAPF32[t+o*4>>>2>>>0]=a[o];break;case 5:HEAP32[t+o*4>>>2>>>0]=Math.fround(a[o]);break}};function _glGetVertexAttribfv(e,r,t){t>>>=0,emscriptenWebGLGetVertexAttrib(e,r,t,2)}_glGetVertexAttribfv.sig="viip";var _emscripten_glGetVertexAttribfv=_glGetVertexAttribfv;_emscripten_glGetVertexAttribfv.sig="viip";function _glGetVertexAttribiv(e,r,t){t>>>=0,emscriptenWebGLGetVertexAttrib(e,r,t,5)}_glGetVertexAttribiv.sig="viip";var _emscripten_glGetVertexAttribiv=_glGetVertexAttribiv;_emscripten_glGetVertexAttribiv.sig="viip";var _glHint=(e,r)=>GLctx.hint(e,r);_glHint.sig="vii";var _emscripten_glHint=_glHint;_emscripten_glHint.sig="vii";var _glIsBuffer=e=>{var r=GL.buffers[e];return r?GLctx.isBuffer(r):0};_glIsBuffer.sig="ii";var _emscripten_glIsBuffer=_glIsBuffer;_emscripten_glIsBuffer.sig="ii";var _glIsEnabled=e=>GLctx.isEnabled(e);_glIsEnabled.sig="ii";var _emscripten_glIsEnabled=_glIsEnabled;_emscripten_glIsEnabled.sig="ii";var _glIsFramebuffer=e=>{var r=GL.framebuffers[e];return r?GLctx.isFramebuffer(r):0};_glIsFramebuffer.sig="ii";var _emscripten_glIsFramebuffer=_glIsFramebuffer;_emscripten_glIsFramebuffer.sig="ii";var _glIsProgram=e=>(e=GL.programs[e],e?GLctx.isProgram(e):0);_glIsProgram.sig="ii";var _emscripten_glIsProgram=_glIsProgram;_emscripten_glIsProgram.sig="ii";var _glIsQueryEXT=e=>{var r=GL.queries[e];return r?GLctx.disjointTimerQueryExt.isQueryEXT(r):0};_glIsQueryEXT.sig="ii";var _emscripten_glIsQueryEXT=_glIsQueryEXT,_glIsRenderbuffer=e=>{var r=GL.renderbuffers[e];return r?GLctx.isRenderbuffer(r):0};_glIsRenderbuffer.sig="ii";var _emscripten_glIsRenderbuffer=_glIsRenderbuffer;_emscripten_glIsRenderbuffer.sig="ii";var _glIsShader=e=>{var r=GL.shaders[e];return r?GLctx.isShader(r):0};_glIsShader.sig="ii";var _emscripten_glIsShader=_glIsShader;_emscripten_glIsShader.sig="ii";var _glIsTexture=e=>{var r=GL.textures[e];return r?GLctx.isTexture(r):0};_glIsTexture.sig="ii";var _emscripten_glIsTexture=_glIsTexture;_emscripten_glIsTexture.sig="ii";var _glIsVertexArray=e=>{var r=GL.vaos[e];return r?GLctx.isVertexArray(r):0};_glIsVertexArray.sig="ii";var _glIsVertexArrayOES=_glIsVertexArray;_glIsVertexArrayOES.sig="ii";var _emscripten_glIsVertexArrayOES=_glIsVertexArrayOES;_emscripten_glIsVertexArrayOES.sig="ii";var _glLineWidth=e=>GLctx.lineWidth(e);_glLineWidth.sig="vf";var _emscripten_glLineWidth=_glLineWidth;_emscripten_glLineWidth.sig="vf";var _glLinkProgram=e=>{e=GL.programs[e],GLctx.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}};_glLinkProgram.sig="vi";var _emscripten_glLinkProgram=_glLinkProgram;_emscripten_glLinkProgram.sig="vi";var _glPixelStorei=(e,r)=>{e==3317&&(GL.unpackAlignment=r),GLctx.pixelStorei(e,r)};_glPixelStorei.sig="vii";var _emscripten_glPixelStorei=_glPixelStorei;_emscripten_glPixelStorei.sig="vii";var _glPolygonOffset=(e,r)=>GLctx.polygonOffset(e,r);_glPolygonOffset.sig="vff";var _emscripten_glPolygonOffset=_glPolygonOffset;_emscripten_glPolygonOffset.sig="vff";var _glQueryCounterEXT=(e,r)=>{GLctx.disjointTimerQueryExt.queryCounterEXT(GL.queries[e],r)};_glQueryCounterEXT.sig="vii";var _emscripten_glQueryCounterEXT=_glQueryCounterEXT,computeUnpackAlignedImageSize=(e,r,t,n)=>{function a(l,c){return l+c-1&-c}var o=e*t,_=a(o,n);return r*_},colorChannelsInGlTextureFormat=e=>{var r={5:3,6:4,8:2,29502:3,29504:4};return r[e-6402]||1},heapObjectForWebGLType=e=>(e-=5120,e==1?HEAPU8:e==4?HEAP32:e==6?HEAPF32:e==5||e==28922?HEAPU32:HEAPU16),toTypedArrayIndex=(e,r)=>e>>>31-Math.clz32(r.BYTES_PER_ELEMENT),emscriptenWebGLGetTexPixelData=(e,r,t,n,a,o)=>{var _=heapObjectForWebGLType(e),l=colorChannelsInGlTextureFormat(r)*_.BYTES_PER_ELEMENT,c=computeUnpackAlignedImageSize(t,n,l,GL.unpackAlignment);return _.subarray(toTypedArrayIndex(a,_)>>>0,toTypedArrayIndex(a+c,_)>>>0)};function _glReadPixels(e,r,t,n,a,o,_){_>>>=0;var l=emscriptenWebGLGetTexPixelData(o,a,t,n,_,a);if(!l){GL.recordError(1280);return}GLctx.readPixels(e,r,t,n,a,o,l)}_glReadPixels.sig="viiiiiip";var _emscripten_glReadPixels=_glReadPixels;_emscripten_glReadPixels.sig="viiiiiip";var _glReleaseShaderCompiler=()=>{};_glReleaseShaderCompiler.sig="v";var _emscripten_glReleaseShaderCompiler=_glReleaseShaderCompiler;_emscripten_glReleaseShaderCompiler.sig="v";var _glRenderbufferStorage=(e,r,t,n)=>GLctx.renderbufferStorage(e,r,t,n);_glRenderbufferStorage.sig="viiii";var _emscripten_glRenderbufferStorage=_glRenderbufferStorage;_emscripten_glRenderbufferStorage.sig="viiii";var _glSampleCoverage=(e,r)=>{GLctx.sampleCoverage(e,!!r)};_glSampleCoverage.sig="vfi";var _emscripten_glSampleCoverage=_glSampleCoverage;_emscripten_glSampleCoverage.sig="vfi";var _glScissor=(e,r,t,n)=>GLctx.scissor(e,r,t,n);_glScissor.sig="viiii";var _emscripten_glScissor=_glScissor;_emscripten_glScissor.sig="viiii";function _glShaderBinary(e,r,t,n,a){r>>>=0,n>>>=0,GL.recordError(1280)}_glShaderBinary.sig="vipipi";var _emscripten_glShaderBinary=_glShaderBinary;_emscripten_glShaderBinary.sig="vipipi";function _glShaderSource(e,r,t,n){t>>>=0,n>>>=0;var a=GL.getSource(e,r,t,n);GLctx.shaderSource(GL.shaders[e],a)}_glShaderSource.sig="viipp";var _emscripten_glShaderSource=_glShaderSource;_emscripten_glShaderSource.sig="viipp";var _glStencilFunc=(e,r,t)=>GLctx.stencilFunc(e,r,t);_glStencilFunc.sig="viii";var _emscripten_glStencilFunc=_glStencilFunc;_emscripten_glStencilFunc.sig="viii";var _glStencilFuncSeparate=(e,r,t,n)=>GLctx.stencilFuncSeparate(e,r,t,n);_glStencilFuncSeparate.sig="viiii";var _emscripten_glStencilFuncSeparate=_glStencilFuncSeparate;_emscripten_glStencilFuncSeparate.sig="viiii";var _glStencilMask=e=>GLctx.stencilMask(e);_glStencilMask.sig="vi";var _emscripten_glStencilMask=_glStencilMask;_emscripten_glStencilMask.sig="vi";var _glStencilMaskSeparate=(e,r)=>GLctx.stencilMaskSeparate(e,r);_glStencilMaskSeparate.sig="vii";var _emscripten_glStencilMaskSeparate=_glStencilMaskSeparate;_emscripten_glStencilMaskSeparate.sig="vii";var _glStencilOp=(e,r,t)=>GLctx.stencilOp(e,r,t);_glStencilOp.sig="viii";var _emscripten_glStencilOp=_glStencilOp;_emscripten_glStencilOp.sig="viii";var _glStencilOpSeparate=(e,r,t,n)=>GLctx.stencilOpSeparate(e,r,t,n);_glStencilOpSeparate.sig="viiii";var _emscripten_glStencilOpSeparate=_glStencilOpSeparate;_emscripten_glStencilOpSeparate.sig="viiii";function _glTexImage2D(e,r,t,n,a,o,_,l,c){c>>>=0,GLctx.texImage2D(e,r,t,n,a,o,_,l,c?emscriptenWebGLGetTexPixelData(l,_,n,a,c,t):null)}_glTexImage2D.sig="viiiiiiiip";var _emscripten_glTexImage2D=_glTexImage2D;_emscripten_glTexImage2D.sig="viiiiiiiip";var _glTexParameterf=(e,r,t)=>GLctx.texParameterf(e,r,t);_glTexParameterf.sig="viif";var _emscripten_glTexParameterf=_glTexParameterf;_emscripten_glTexParameterf.sig="viif";function _glTexParameterfv(e,r,t){t>>>=0;var n=HEAPF32[t>>>2>>>0];GLctx.texParameterf(e,r,n)}_glTexParameterfv.sig="viip";var _emscripten_glTexParameterfv=_glTexParameterfv;_emscripten_glTexParameterfv.sig="viip";var _glTexParameteri=(e,r,t)=>GLctx.texParameteri(e,r,t);_glTexParameteri.sig="viii";var _emscripten_glTexParameteri=_glTexParameteri;_emscripten_glTexParameteri.sig="viii";function _glTexParameteriv(e,r,t){t>>>=0;var n=HEAP32[t>>>2>>>0];GLctx.texParameteri(e,r,n)}_glTexParameteriv.sig="viip";var _emscripten_glTexParameteriv=_glTexParameteriv;_emscripten_glTexParameteriv.sig="viip";function _glTexSubImage2D(e,r,t,n,a,o,_,l,c){c>>>=0;var u=null;c&&(u=emscriptenWebGLGetTexPixelData(l,_,a,o,c,0)),GLctx.texSubImage2D(e,r,t,n,a,o,_,l,u)}_glTexSubImage2D.sig="viiiiiiiip";var _emscripten_glTexSubImage2D=_glTexSubImage2D;_emscripten_glTexSubImage2D.sig="viiiiiiiip";var _glUniform1f=(e,r)=>{GLctx.uniform1f(webglGetUniformLocation(e),r)};_glUniform1f.sig="vif";var _emscripten_glUniform1f=_glUniform1f;_emscripten_glUniform1f.sig="vif";var miniTempWebGLFloatBuffers=[];function _glUniform1fv(e,r,t){if(t>>>=0,r<=288)for(var n=miniTempWebGLFloatBuffers[r-1],a=0;a>>2>>>0];else var n=HEAPF32.subarray(t>>>2>>>0,t+r*4>>>2>>>0);GLctx.uniform1fv(webglGetUniformLocation(e),n)}_glUniform1fv.sig="viip";var _emscripten_glUniform1fv=_glUniform1fv;_emscripten_glUniform1fv.sig="viip";var _glUniform1i=(e,r)=>{GLctx.uniform1i(webglGetUniformLocation(e),r)};_glUniform1i.sig="vii";var _emscripten_glUniform1i=_glUniform1i;_emscripten_glUniform1i.sig="vii";var miniTempWebGLIntBuffers=[];function _glUniform1iv(e,r,t){if(t>>>=0,r<=288)for(var n=miniTempWebGLIntBuffers[r-1],a=0;a>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*4>>>2>>>0);GLctx.uniform1iv(webglGetUniformLocation(e),n)}_glUniform1iv.sig="viip";var _emscripten_glUniform1iv=_glUniform1iv;_emscripten_glUniform1iv.sig="viip";var _glUniform2f=(e,r,t)=>{GLctx.uniform2f(webglGetUniformLocation(e),r,t)};_glUniform2f.sig="viff";var _emscripten_glUniform2f=_glUniform2f;_emscripten_glUniform2f.sig="viff";function _glUniform2fv(e,r,t){if(t>>>=0,r<=144)for(var n=miniTempWebGLFloatBuffers[2*r-1],a=0;a<2*r;a+=2)n[a]=HEAPF32[t+4*a>>>2>>>0],n[a+1]=HEAPF32[t+(4*a+4)>>>2>>>0];else var n=HEAPF32.subarray(t>>>2>>>0,t+r*8>>>2>>>0);GLctx.uniform2fv(webglGetUniformLocation(e),n)}_glUniform2fv.sig="viip";var _emscripten_glUniform2fv=_glUniform2fv;_emscripten_glUniform2fv.sig="viip";var _glUniform2i=(e,r,t)=>{GLctx.uniform2i(webglGetUniformLocation(e),r,t)};_glUniform2i.sig="viii";var _emscripten_glUniform2i=_glUniform2i;_emscripten_glUniform2i.sig="viii";function _glUniform2iv(e,r,t){if(t>>>=0,r<=144)for(var n=miniTempWebGLIntBuffers[2*r-1],a=0;a<2*r;a+=2)n[a]=HEAP32[t+4*a>>>2>>>0],n[a+1]=HEAP32[t+(4*a+4)>>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*8>>>2>>>0);GLctx.uniform2iv(webglGetUniformLocation(e),n)}_glUniform2iv.sig="viip";var _emscripten_glUniform2iv=_glUniform2iv;_emscripten_glUniform2iv.sig="viip";var _glUniform3f=(e,r,t,n)=>{GLctx.uniform3f(webglGetUniformLocation(e),r,t,n)};_glUniform3f.sig="vifff";var _emscripten_glUniform3f=_glUniform3f;_emscripten_glUniform3f.sig="vifff";function _glUniform3fv(e,r,t){if(t>>>=0,r<=96)for(var n=miniTempWebGLFloatBuffers[3*r-1],a=0;a<3*r;a+=3)n[a]=HEAPF32[t+4*a>>>2>>>0],n[a+1]=HEAPF32[t+(4*a+4)>>>2>>>0],n[a+2]=HEAPF32[t+(4*a+8)>>>2>>>0];else var n=HEAPF32.subarray(t>>>2>>>0,t+r*12>>>2>>>0);GLctx.uniform3fv(webglGetUniformLocation(e),n)}_glUniform3fv.sig="viip";var _emscripten_glUniform3fv=_glUniform3fv;_emscripten_glUniform3fv.sig="viip";var _glUniform3i=(e,r,t,n)=>{GLctx.uniform3i(webglGetUniformLocation(e),r,t,n)};_glUniform3i.sig="viiii";var _emscripten_glUniform3i=_glUniform3i;_emscripten_glUniform3i.sig="viiii";function _glUniform3iv(e,r,t){if(t>>>=0,r<=96)for(var n=miniTempWebGLIntBuffers[3*r-1],a=0;a<3*r;a+=3)n[a]=HEAP32[t+4*a>>>2>>>0],n[a+1]=HEAP32[t+(4*a+4)>>>2>>>0],n[a+2]=HEAP32[t+(4*a+8)>>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*12>>>2>>>0);GLctx.uniform3iv(webglGetUniformLocation(e),n)}_glUniform3iv.sig="viip";var _emscripten_glUniform3iv=_glUniform3iv;_emscripten_glUniform3iv.sig="viip";var _glUniform4f=(e,r,t,n,a)=>{GLctx.uniform4f(webglGetUniformLocation(e),r,t,n,a)};_glUniform4f.sig="viffff";var _emscripten_glUniform4f=_glUniform4f;_emscripten_glUniform4f.sig="viffff";function _glUniform4fv(e,r,t){if(t>>>=0,r<=72){var n=miniTempWebGLFloatBuffers[4*r-1],a=HEAPF32;t=t>>>2;for(var o=0;o<4*r;o+=4){var _=t+o;n[o]=a[_>>>0],n[o+1]=a[_+1>>>0],n[o+2]=a[_+2>>>0],n[o+3]=a[_+3>>>0]}}else var n=HEAPF32.subarray(t>>>2>>>0,t+r*16>>>2>>>0);GLctx.uniform4fv(webglGetUniformLocation(e),n)}_glUniform4fv.sig="viip";var _emscripten_glUniform4fv=_glUniform4fv;_emscripten_glUniform4fv.sig="viip";var _glUniform4i=(e,r,t,n,a)=>{GLctx.uniform4i(webglGetUniformLocation(e),r,t,n,a)};_glUniform4i.sig="viiiii";var _emscripten_glUniform4i=_glUniform4i;_emscripten_glUniform4i.sig="viiiii";function _glUniform4iv(e,r,t){if(t>>>=0,r<=72)for(var n=miniTempWebGLIntBuffers[4*r-1],a=0;a<4*r;a+=4)n[a]=HEAP32[t+4*a>>>2>>>0],n[a+1]=HEAP32[t+(4*a+4)>>>2>>>0],n[a+2]=HEAP32[t+(4*a+8)>>>2>>>0],n[a+3]=HEAP32[t+(4*a+12)>>>2>>>0];else var n=HEAP32.subarray(t>>>2>>>0,t+r*16>>>2>>>0);GLctx.uniform4iv(webglGetUniformLocation(e),n)}_glUniform4iv.sig="viip";var _emscripten_glUniform4iv=_glUniform4iv;_emscripten_glUniform4iv.sig="viip";function _glUniformMatrix2fv(e,r,t,n){if(n>>>=0,r<=72)for(var a=miniTempWebGLFloatBuffers[4*r-1],o=0;o<4*r;o+=4)a[o]=HEAPF32[n+4*o>>>2>>>0],a[o+1]=HEAPF32[n+(4*o+4)>>>2>>>0],a[o+2]=HEAPF32[n+(4*o+8)>>>2>>>0],a[o+3]=HEAPF32[n+(4*o+12)>>>2>>>0];else var a=HEAPF32.subarray(n>>>2>>>0,n+r*16>>>2>>>0);GLctx.uniformMatrix2fv(webglGetUniformLocation(e),!!t,a)}_glUniformMatrix2fv.sig="viiip";var _emscripten_glUniformMatrix2fv=_glUniformMatrix2fv;_emscripten_glUniformMatrix2fv.sig="viiip";function _glUniformMatrix3fv(e,r,t,n){if(n>>>=0,r<=32)for(var a=miniTempWebGLFloatBuffers[9*r-1],o=0;o<9*r;o+=9)a[o]=HEAPF32[n+4*o>>>2>>>0],a[o+1]=HEAPF32[n+(4*o+4)>>>2>>>0],a[o+2]=HEAPF32[n+(4*o+8)>>>2>>>0],a[o+3]=HEAPF32[n+(4*o+12)>>>2>>>0],a[o+4]=HEAPF32[n+(4*o+16)>>>2>>>0],a[o+5]=HEAPF32[n+(4*o+20)>>>2>>>0],a[o+6]=HEAPF32[n+(4*o+24)>>>2>>>0],a[o+7]=HEAPF32[n+(4*o+28)>>>2>>>0],a[o+8]=HEAPF32[n+(4*o+32)>>>2>>>0];else var a=HEAPF32.subarray(n>>>2>>>0,n+r*36>>>2>>>0);GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!t,a)}_glUniformMatrix3fv.sig="viiip";var _emscripten_glUniformMatrix3fv=_glUniformMatrix3fv;_emscripten_glUniformMatrix3fv.sig="viiip";function _glUniformMatrix4fv(e,r,t,n){if(n>>>=0,r<=18){var a=miniTempWebGLFloatBuffers[16*r-1],o=HEAPF32;n=n>>>2;for(var _=0;_<16*r;_+=16){var l=n+_;a[_]=o[l>>>0],a[_+1]=o[l+1>>>0],a[_+2]=o[l+2>>>0],a[_+3]=o[l+3>>>0],a[_+4]=o[l+4>>>0],a[_+5]=o[l+5>>>0],a[_+6]=o[l+6>>>0],a[_+7]=o[l+7>>>0],a[_+8]=o[l+8>>>0],a[_+9]=o[l+9>>>0],a[_+10]=o[l+10>>>0],a[_+11]=o[l+11>>>0],a[_+12]=o[l+12>>>0],a[_+13]=o[l+13>>>0],a[_+14]=o[l+14>>>0],a[_+15]=o[l+15>>>0]}}else var a=HEAPF32.subarray(n>>>2>>>0,n+r*64>>>2>>>0);GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!t,a)}_glUniformMatrix4fv.sig="viiip";var _emscripten_glUniformMatrix4fv=_glUniformMatrix4fv;_emscripten_glUniformMatrix4fv.sig="viiip";var _glUseProgram=e=>{e=GL.programs[e],GLctx.useProgram(e),GLctx.currentProgram=e};_glUseProgram.sig="vi";var _emscripten_glUseProgram=_glUseProgram;_emscripten_glUseProgram.sig="vi";var _glValidateProgram=e=>{GLctx.validateProgram(GL.programs[e])};_glValidateProgram.sig="vi";var _emscripten_glValidateProgram=_glValidateProgram;_emscripten_glValidateProgram.sig="vi";var _glVertexAttrib1f=(e,r)=>GLctx.vertexAttrib1f(e,r);_glVertexAttrib1f.sig="vif";var _emscripten_glVertexAttrib1f=_glVertexAttrib1f;_emscripten_glVertexAttrib1f.sig="vif";function _glVertexAttrib1fv(e,r){r>>>=0,GLctx.vertexAttrib1f(e,HEAPF32[r>>>2])}_glVertexAttrib1fv.sig="vip";var _emscripten_glVertexAttrib1fv=_glVertexAttrib1fv;_emscripten_glVertexAttrib1fv.sig="vip";var _glVertexAttrib2f=(e,r,t)=>GLctx.vertexAttrib2f(e,r,t);_glVertexAttrib2f.sig="viff";var _emscripten_glVertexAttrib2f=_glVertexAttrib2f;_emscripten_glVertexAttrib2f.sig="viff";function _glVertexAttrib2fv(e,r){r>>>=0,GLctx.vertexAttrib2f(e,HEAPF32[r>>>2],HEAPF32[r+4>>>2])}_glVertexAttrib2fv.sig="vip";var _emscripten_glVertexAttrib2fv=_glVertexAttrib2fv;_emscripten_glVertexAttrib2fv.sig="vip";var _glVertexAttrib3f=(e,r,t,n)=>GLctx.vertexAttrib3f(e,r,t,n);_glVertexAttrib3f.sig="vifff";var _emscripten_glVertexAttrib3f=_glVertexAttrib3f;_emscripten_glVertexAttrib3f.sig="vifff";function _glVertexAttrib3fv(e,r){r>>>=0,GLctx.vertexAttrib3f(e,HEAPF32[r>>>2],HEAPF32[r+4>>>2],HEAPF32[r+8>>>2])}_glVertexAttrib3fv.sig="vip";var _emscripten_glVertexAttrib3fv=_glVertexAttrib3fv;_emscripten_glVertexAttrib3fv.sig="vip";var _glVertexAttrib4f=(e,r,t,n,a)=>GLctx.vertexAttrib4f(e,r,t,n,a);_glVertexAttrib4f.sig="viffff";var _emscripten_glVertexAttrib4f=_glVertexAttrib4f;_emscripten_glVertexAttrib4f.sig="viffff";function _glVertexAttrib4fv(e,r){r>>>=0,GLctx.vertexAttrib4f(e,HEAPF32[r>>>2],HEAPF32[r+4>>>2],HEAPF32[r+8>>>2],HEAPF32[r+12>>>2])}_glVertexAttrib4fv.sig="vip";var _emscripten_glVertexAttrib4fv=_glVertexAttrib4fv;_emscripten_glVertexAttrib4fv.sig="vip";var _glVertexAttribDivisor=(e,r)=>{GLctx.vertexAttribDivisor(e,r)};_glVertexAttribDivisor.sig="vii";var _glVertexAttribDivisorANGLE=_glVertexAttribDivisor,_emscripten_glVertexAttribDivisorANGLE=_glVertexAttribDivisorANGLE;function _glVertexAttribPointer(e,r,t,n,a,o){o>>>=0,GLctx.vertexAttribPointer(e,r,t,!!n,a,o)}_glVertexAttribPointer.sig="viiiiip";var _emscripten_glVertexAttribPointer=_glVertexAttribPointer;_emscripten_glVertexAttribPointer.sig="viiiiip";var _glViewport=(e,r,t,n)=>GLctx.viewport(e,r,t,n);_glViewport.sig="viiii";var _emscripten_glViewport=_glViewport;_emscripten_glViewport.sig="viiii";function _emscripten_memcpy_js(e,r,t){return e>>>=0,r>>>=0,t>>>=0,HEAPU8.copyWithin(e>>>0,r>>>0,r+t>>>0)}_emscripten_memcpy_js.sig="vppp";function _emscripten_out(e){return e>>>=0,out(UTF8ToString(e))}_emscripten_out.sig="vp";class HandleAllocator{constructor(){this.allocated=[void 0],this.freelist=[]}get(r){return this.allocated[r]}has(r){return this.allocated[r]!==void 0}allocate(r){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=r,t}free(r){this.allocated[r]=void 0,this.freelist.push(r)}}var promiseMap=new HandleAllocator,makePromise=()=>{var e={};return e.promise=new Promise((r,t)=>{e.reject=t,e.resolve=r}),e.id=promiseMap.allocate(e),e};function _emscripten_promise_create(){return makePromise().id}_emscripten_promise_create.sig="p";function _emscripten_promise_destroy(e){e>>>=0,promiseMap.free(e)}_emscripten_promise_destroy.sig="vp";var getPromise=e=>promiseMap.get(e).promise;function _emscripten_promise_resolve(e,r,t){e>>>=0,t>>>=0;var n=promiseMap.get(e);switch(r){case 0:n.resolve(t);return;case 1:n.resolve(getPromise(t));return;case 2:n.resolve(getPromise(t)),_emscripten_promise_destroy(t);return;case 3:n.reject(t);return}}_emscripten_promise_resolve.sig="vpip";var growMemory=e=>{var r=wasmMemory.buffer,t=(e-r.byteLength+65535)/65536;try{return wasmMemory.grow(t),updateMemoryViews(),1}catch(n){}};function _emscripten_resize_heap(e){e>>>=0;var r=HEAPU8.length,t=getHeapMax();if(e>t)return!1;for(var n=(c,u)=>c+(u-c%u)%u,a=1;a<=4;a*=2){var o=r*(1+.2/a);o=Math.min(o,e+100663296);var _=Math.min(t,n(Math.max(e,o),65536)),l=growMemory(_);if(l)return!0}return!1}_emscripten_resize_heap.sig="ip";function _emscripten_wget_data(e,r,t,n){throw e>>>=0,r>>>=0,t>>>=0,n>>>=0,"Please compile your program with async support in order to use asynchronous operations like emscripten_wget_data"}_emscripten_wget_data.sig="vpppp";var getExecutableName=()=>thisProgram||"./this.program",getEnvStrings=()=>{if(!getEnvStrings.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:getExecutableName()};for(var t in ENV)ENV[t]===void 0?delete r[t]:r[t]=ENV[t];var n=[];for(var t in r)n.push("".concat(t,"=").concat(r[t]));getEnvStrings.strings=n}return getEnvStrings.strings},stringToAscii=(e,r)=>{for(var t=0;t>>0]=e.charCodeAt(t);HEAP8[r>>>0]=0},_environ_get=function(e,r){e>>>=0,r>>>=0;var t=0;return getEnvStrings().forEach((n,a)=>{var o=r+t;HEAPU32[e+a*4>>>2>>>0]=o,stringToAscii(n,o),t+=n.length+1}),0};_environ_get.sig="ipp";var _environ_sizes_get=function(e,r){e>>>=0,r>>>=0;var t=getEnvStrings();HEAPU32[e>>>2>>>0]=t.length;var n=0;return t.forEach(a=>n+=a.length+1),HEAPU32[r>>>2>>>0]=n,0};_environ_sizes_get.sig="ipp";function _fd_close(e){try{var r=SYSCALLS.getStreamFromFD(e);return FS.close(r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return t.errno}}_fd_close.sig="ii";function _fd_fdstat_get(e,r){r>>>=0;try{var t=0,n=0,a=0,o=SYSCALLS.getStreamFromFD(e),_=o.tty?2:FS.isDir(o.mode)?3:FS.isLink(o.mode)?7:4;return HEAP8[r>>>0]=_,HEAP16[r+2>>>1>>>0]=a,tempI64=[t>>>0,(tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+8>>>2>>>0]=tempI64[0],HEAP32[r+12>>>2>>>0]=tempI64[1],tempI64=[n>>>0,(tempDouble=n,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+16>>>2>>>0]=tempI64[0],HEAP32[r+20>>>2>>>0]=tempI64[1],0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return l.errno}}_fd_fdstat_get.sig="iip";var doReadv=(e,r,t,n)=>{for(var a=0,o=0;o>>2>>>0],l=HEAPU32[r+4>>>2>>>0];r+=8;var c=FS.read(e,HEAP8,_,l,n);if(c<0)return-1;if(a+=c,c>>=0,t>>>=0;var _=convertI32PairToI53Checked(n,a);o>>>=0;try{if(isNaN(_))return 61;var l=SYSCALLS.getStreamFromFD(e),c=doReadv(l,r,t,_);return HEAPU32[o>>>2>>>0]=c,0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_pread.sig="iippiip";var doWritev=(e,r,t,n)=>{for(var a=0,o=0;o>>2>>>0],l=HEAPU32[r+4>>>2>>>0];r+=8;var c=FS.write(e,HEAP8,_,l,n);if(c<0)return-1;a+=c,typeof n<"u"&&(n+=c)}return a};function _fd_pwrite(e,r,t,n,a,o){r>>>=0,t>>>=0;var _=convertI32PairToI53Checked(n,a);o>>>=0;try{if(isNaN(_))return 61;var l=SYSCALLS.getStreamFromFD(e),c=doWritev(l,r,t,_);return HEAPU32[o>>>2>>>0]=c,0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_pwrite.sig="iippiip";function _fd_read(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),o=doReadv(a,r,t);return HEAPU32[n>>>2>>>0]=o,0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return _.errno}}_fd_read.sig="iippp";function _fd_seek(e,r,t,n,a){var o=convertI32PairToI53Checked(r,t);a>>>=0;try{if(isNaN(o))return 61;var _=SYSCALLS.getStreamFromFD(e);return FS.llseek(_,o,n),tempI64=[_.position>>>0,(tempDouble=_.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[a>>>2>>>0]=tempI64[0],HEAP32[a+4>>>2>>>0]=tempI64[1],_.getdents&&o===0&&n===0&&(_.getdents=null),0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return l.errno}}_fd_seek.sig="iiiiip";function _fd_sync(e){var t;try{var r=SYSCALLS.getStreamFromFD(e);return(t=r.stream_ops)!=null&&t.fsync?r.stream_ops.fsync(r):0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return n.errno}}_fd_sync.sig="ii";function _fd_write(e,r,t,n){r>>>=0,t>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),o=doWritev(a,r,t);return HEAPU32[n>>>2>>>0]=o,0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return _.errno}}_fd_write.sig="iippp";function _getaddrinfo(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=[],o=null,_=0,l=0,c=0,u=0,d=0,p=0,f,m;function g(v,S,y,h,b,w){var k,L,E,x;return L=v===10?28:16,b=v===10?inetNtop6(b):inetNtop4(b),k=_malloc(L),x=writeSockaddr(k,v,b,w),assert(!x),E=_malloc(32),HEAP32[E+4>>>2>>>0]=v,HEAP32[E+8>>>2>>>0]=S,HEAP32[E+12>>>2>>>0]=y,HEAPU32[E+24>>>2>>>0]=h,HEAPU32[E+20>>>2>>>0]=k,v===10?HEAP32[E+16>>>2>>>0]=28:HEAP32[E+16>>>2>>>0]=16,HEAP32[E+28>>>2>>>0]=0,E}if(t&&(c=HEAP32[t>>>2>>>0],u=HEAP32[t+4>>>2>>>0],d=HEAP32[t+8>>>2>>>0],p=HEAP32[t+12>>>2>>>0]),d&&!p&&(p=d===2?17:6),!d&&p&&(d=p===17?2:1),p===0&&(p=6),d===0&&(d=1),!e&&!r)return-2;if(c&-1088||t!==0&&HEAP32[t>>>2>>>0]&2&&!e)return-1;if(c&32)return-2;if(d!==0&&d!==1&&d!==2)return-7;if(u!==0&&u!==2&&u!==10)return-6;if(r&&(r=UTF8ToString(r),l=parseInt(r,10),isNaN(l)))return c&1024?-2:-8;if(!e)return u===0&&(u=2),c&1||(u===2?_=_htonl(2130706433):_=[0,0,0,1]),f=g(u,d,p,null,_,l),HEAPU32[n>>>2>>>0]=f,0;if(e=UTF8ToString(e),_=inetPton4(e),_!==null)if(u===0||u===2)u=2;else if(u===10&&c&8)_=[0,0,_htonl(65535),_],u=10;else return-2;else if(_=inetPton6(e),_!==null)if(u===0||u===10)u=10;else return-2;return _!=null?(f=g(u,d,p,e,_,l),HEAPU32[n>>>2>>>0]=f,0):c&4?-2:(e=DNS.lookup_name(e),_=inetPton4(e),u===0?u=2:u===10&&(_=[0,0,_htonl(65535),_]),f=g(u,d,p,null,_,l),HEAPU32[n>>>2>>>0]=f,0)}_getaddrinfo.sig="ipppp";function _getentropy(e,r){return e>>>=0,r>>>=0,randomFill(HEAPU8.subarray(e>>>0,e+r>>>0)),0}_getentropy.sig="ipp";function _getnameinfo(e,r,t,n,a,o,_){e>>>=0,t>>>=0,a>>>=0;var l=readSockaddr(e,r);if(l.errno)return-6;var c=l.port,u=l.addr,d=!1;if(t&&n){var p;if(_&1||!(p=DNS.lookup_addr(u))){if(_&8)return-2}else u=p;var f=stringToUTF8(u,t,n);f+1>=n&&(d=!0)}if(a&&o){c=""+c;var f=stringToUTF8(c,a,o);f+1>=o&&(d=!0)}return d?-12:0}_getnameinfo.sig="ipipipii";function _pthread_kill(...e){return wasmImports.pthread_kill(...e)}_pthread_kill.stub=!0;var arraySum=(e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t},MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31],addDays=(e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=isLeapYear(t.getFullYear()),a=t.getMonth(),o=(n?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[a];if(r>o-t.getDate())r-=o-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1));else return t.setDate(t.getDate()+r),t}return t},writeArrayToMemory=(e,r)=>{HEAP8.set(e,r>>>0)};function _strftime(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=HEAPU32[n+40>>>2>>>0],o={tm_sec:HEAP32[n>>>2>>>0],tm_min:HEAP32[n+4>>>2>>>0],tm_hour:HEAP32[n+8>>>2>>>0],tm_mday:HEAP32[n+12>>>2>>>0],tm_mon:HEAP32[n+16>>>2>>>0],tm_year:HEAP32[n+20>>>2>>>0],tm_wday:HEAP32[n+24>>>2>>>0],tm_yday:HEAP32[n+28>>>2>>>0],tm_isdst:HEAP32[n+32>>>2>>>0],tm_gmtoff:HEAP32[n+36>>>2>>>0],tm_zone:a?UTF8ToString(a):""},_=UTF8ToString(t),l={"%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 c in l)_=_.replace(new RegExp(c,"g"),l[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(h,b,w){for(var k=typeof h=="number"?h.toString():h||"";k.length0?1:0}var k;return(k=w(h.getFullYear()-b.getFullYear()))===0&&(k=w(h.getMonth()-b.getMonth()))===0&&(k=w(h.getDate()-b.getDate())),k}function g(h){switch(h.getDay()){case 0:return new Date(h.getFullYear()-1,11,29);case 1:return h;case 2:return new Date(h.getFullYear(),0,3);case 3:return new Date(h.getFullYear(),0,2);case 4:return new Date(h.getFullYear(),0,1);case 5:return new Date(h.getFullYear()-1,11,31);case 6:return new Date(h.getFullYear()-1,11,30)}}function v(h){var b=addDays(new Date(h.tm_year+1900,0,1),h.tm_yday),w=new Date(b.getFullYear(),0,4),k=new Date(b.getFullYear()+1,0,4),L=g(w),E=g(k);return m(L,b)<=0?m(E,b)<=0?b.getFullYear()+1:b.getFullYear():b.getFullYear()-1}var S={"%a":h=>u[h.tm_wday].substring(0,3),"%A":h=>u[h.tm_wday],"%b":h=>d[h.tm_mon].substring(0,3),"%B":h=>d[h.tm_mon],"%C":h=>{var b=h.tm_year+1900;return f(b/100|0,2)},"%d":h=>f(h.tm_mday,2),"%e":h=>p(h.tm_mday,2," "),"%g":h=>v(h).toString().substring(2),"%G":v,"%H":h=>f(h.tm_hour,2),"%I":h=>{var b=h.tm_hour;return b==0?b=12:b>12&&(b-=12),f(b,2)},"%j":h=>f(h.tm_mday+arraySum(isLeapYear(h.tm_year+1900)?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,h.tm_mon-1),3),"%m":h=>f(h.tm_mon+1,2),"%M":h=>f(h.tm_min,2),"%n":()=>"\n","%p":h=>h.tm_hour>=0&&h.tm_hour<12?"AM":"PM","%S":h=>f(h.tm_sec,2),"%t":()=>" ","%u":h=>h.tm_wday||7,"%U":h=>{var b=h.tm_yday+7-h.tm_wday;return f(Math.floor(b/7),2)},"%V":h=>{var b=Math.floor((h.tm_yday+7-(h.tm_wday+6)%7)/7);if((h.tm_wday+371-h.tm_yday-2)%7<=2&&b++,b){if(b==53){var k=(h.tm_wday+371-h.tm_yday)%7;k!=4&&(k!=3||!isLeapYear(h.tm_year))&&(b=1)}}else{b=52;var w=(h.tm_wday+7-h.tm_yday-1)%7;(w==4||w==5&&isLeapYear(h.tm_year%400-1))&&b++}return f(b,2)},"%w":h=>h.tm_wday,"%W":h=>{var b=h.tm_yday+7-(h.tm_wday+6)%7;return f(Math.floor(b/7),2)},"%y":h=>(h.tm_year+1900).toString().substring(2),"%Y":h=>h.tm_year+1900,"%z":h=>{var b=h.tm_gmtoff,w=b>=0;return b=Math.abs(b)/60,b=b/60*100+b%60,(w?"+":"-")+("0000"+b).slice(-4)},"%Z":h=>h.tm_zone,"%%":()=>"%"};_=_.replace(/%%/g,"\0\0");for(var c in S)_.includes(c)&&(_=_.replace(new RegExp(c,"g"),S[c](o)));_=_.replace(/\0\0/g,"%");var y=intArrayFromString(_,!1);return y.length>r?0:(writeArrayToMemory(y,e),y.length-1)}_strftime.sig="ppppp";function _strftime_l(e,r,t,n,a){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,_strftime(e,r,t,n)}_strftime_l.sig="pppppp";function _strptime(e,r,t){e>>>=0,r>>>=0,t>>>=0;for(var n=UTF8ToString(r),a="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,_=a.length;o<_;++o)n=n.replace(new RegExp("\\"+a[o],"g"),"\\"+a[o]);var l={A:"%a",B:"%b",c:"%a %b %d %H:%M:%S %Y",D:"%m\\/%d\\/%y",e:"%d",F:"%Y-%m-%d",h:"%b",R:"%H\\:%M",r:"%I\\:%M\\:%S\\s%p",T:"%H\\:%M\\:%S",x:"%m\\/%d\\/(?:%y|%Y)",X:"%H\\:%M\\:%S"},c={a:"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)",b:"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)",C:"\\d\\d",d:"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31",H:"\\d(?!\\d)|[0,1]\\d|20|21|22|23",I:"\\d(?!\\d)|0\\d|10|11|12",j:"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d",m:"0[1-9]|[1-9](?!\\d)|10|11|12",M:"0\\d|\\d(?!\\d)|[1-5]\\d",n:" ",p:"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.",S:"0\\d|\\d(?!\\d)|[1-5]\\d|60",U:"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53",W:"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53",w:"[0-6]",y:"\\d\\d",Y:"\\d\\d\\d\\d",t:" ",z:"Z|(?:[\\+\\-]\\d\\d:?(?:\\d\\d)?)"},u={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11},d={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},p={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6},f=[],m=n.replace(/%(.)/g,(G,I)=>l[I]||G).replace(/%(.)/g,(G,I)=>{let R=c[I];return R?(f.push(I),"(".concat(R,")")):I}).replace(/\s+/g,"\\s*"),g=new RegExp("^"+m,"i").exec(UTF8ToString(e));function v(){function G(I,R,H){return typeof I!="number"||isNaN(I)?R:I>=R?I<=H?I:H:R}return{year:G(HEAP32[t+20>>>2>>>0]+1900,1970,9999),month:G(HEAP32[t+16>>>2>>>0],0,11),day:G(HEAP32[t+12>>>2>>>0],1,31),hour:G(HEAP32[t+8>>>2>>>0],0,23),min:G(HEAP32[t+4>>>2>>>0],0,59),sec:G(HEAP32[t>>>2>>>0],0,59),gmtoff:0}}if(g){var S=v(),y,h=G=>{var I=f.indexOf(G);if(I>=0)return g[I+1]};if((y=h("S"))&&(S.sec=jstoi_q(y)),(y=h("M"))&&(S.min=jstoi_q(y)),y=h("H"))S.hour=jstoi_q(y);else if(y=h("I")){var b=jstoi_q(y);(y=h("p"))&&(b+=y.toUpperCase()[0]==="P"?12:0),S.hour=b}if(y=h("Y"))S.year=jstoi_q(y);else if(y=h("y")){var w=jstoi_q(y);(y=h("C"))?w+=jstoi_q(y)*100:w+=w<69?2e3:1900,S.year=w}if((y=h("m"))?S.month=jstoi_q(y)-1:(y=h("b"))&&(S.month=u[y.substring(0,3).toUpperCase()]||0),y=h("d"))S.day=jstoi_q(y);else if(y=h("j"))for(var k=jstoi_q(y),L=isLeapYear(S.year),E=0;E<12;++E){var x=arraySum(L?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,E-1);k<=x+(L?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[E]&&(S.day=k-x)}else if(y=h("a")){var A=y.substring(0,3).toUpperCase();if(y=h("U")){var D=d[A],F=jstoi_q(y),P=new Date(S.year,0,1),T;P.getDay()===0?T=addDays(P,D+7*(F-1)):T=addDays(P,7-P.getDay()+D+7*(F-1)),S.day=T.getDate(),S.month=T.getMonth()}else if(y=h("W")){var D=p[A],F=jstoi_q(y),P=new Date(S.year,0,1),T;P.getDay()===1?T=addDays(P,D+7*(F-1)):T=addDays(P,7-P.getDay()+1+D+7*(F-1)),S.day=T.getDate(),S.month=T.getMonth()}}if(y=h("z"))if(y.toLowerCase()==="z")S.gmtoff=0;else{var M=y.match(/^((?:\-|\+)\d\d):?(\d\d)?/);S.gmtoff=M[1]*3600,M[2]&&(S.gmtoff+=S.gmtoff>0?M[2]*60:-M[2]*60)}var C=new Date(S.year,S.month,S.day,S.hour,S.min,S.sec,0);return HEAP32[t>>>2>>>0]=C.getSeconds(),HEAP32[t+4>>>2>>>0]=C.getMinutes(),HEAP32[t+8>>>2>>>0]=C.getHours(),HEAP32[t+12>>>2>>>0]=C.getDate(),HEAP32[t+16>>>2>>>0]=C.getMonth(),HEAP32[t+20>>>2>>>0]=C.getFullYear()-1900,HEAP32[t+24>>>2>>>0]=C.getDay(),HEAP32[t+28>>>2>>>0]=arraySum(isLeapYear(C.getFullYear())?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,C.getMonth()-1)+C.getDate()-1,HEAP32[t+32>>>2>>>0]=0,HEAP32[t+36>>>2>>>0]=S.gmtoff,e+intArrayFromString(g[0]).length-1}return 0}_strptime.sig="pppp";var getCFunc=e=>{var r=Module["_"+e];return r},ccall=(e,r,t,n,a)=>{var o={string:g=>{var v=0;return g!=null&&g!==0&&(v=stringToUTF8OnStack(g)),v},array:g=>{var v=stackAlloc(g.length);return writeArrayToMemory(g,v),v}};function _(g){return r==="string"?UTF8ToString(g):r==="boolean"?!!g:g}var l=getCFunc(e),c=[],u=0;if(n)for(var d=0;d{r>9223372036854776e3?(HEAPU32[e>>>2>>>0]=4294967295,HEAPU32[e+4>>>2>>>0]=2147483647):r<-9223372036854776e3?(HEAPU32[e>>>2>>>0]=0,HEAPU32[e+4>>>2>>>0]=2147483648):writeI53ToI64(e,r)},writeI53ToI64Signaling=(e,r)=>{if(r>9223372036854776e3||r<-9223372036854776e3)throw"RangeError: ".concat(r);writeI53ToI64(e,r)},writeI53ToU64Clamped=(e,r)=>{r>18446744073709552e3?(HEAPU32[e>>>2>>>0]=4294967295,HEAPU32[e+4>>>2>>>0]=4294967295):r<0?(HEAPU32[e>>>2>>>0]=0,HEAPU32[e+4>>>2>>>0]=0):writeI53ToI64(e,r)},writeI53ToU64Signaling=(e,r)=>{if(r<0||r>18446744073709552e3)throw"RangeError: ".concat(r);writeI53ToI64(e,r)},readI53FromU64=e=>HEAPU32[e>>>2>>>0]+HEAPU32[e+4>>>2>>>0]*4294967296,convertI32PairToI53=(e,r)=>(e>>>0)+r*4294967296,convertU32PairToI53=(e,r)=>(e>>>0)+(r>>>0)*4294967296,ptrToString=e=>"0x"+e.toString(16).padStart(8,"0");function _emscripten_notify_memory_growth(e){e>>>=0,updateMemoryViews()}_emscripten_notify_memory_growth.sig="vp";function ___asctime_r(e,r){e>>>=0,r>>>=0;var t={tm_sec:HEAP32[e>>>2>>>0],tm_min:HEAP32[e+4>>>2>>>0],tm_hour:HEAP32[e+8>>>2>>>0],tm_mday:HEAP32[e+12>>>2>>>0],tm_mon:HEAP32[e+16>>>2>>>0],tm_year:HEAP32[e+20>>>2>>>0],tm_wday:HEAP32[e+24>>>2>>>0]},n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=n[t.tm_wday]+" "+a[t.tm_mon]+(t.tm_mday<10?" ":" ")+t.tm_mday+(t.tm_hour<10?" 0":" ")+t.tm_hour+(t.tm_min<10?":0":":")+t.tm_min+(t.tm_sec<10?":0":":")+t.tm_sec+" "+(1900+t.tm_year)+"\n";return stringToUTF8(o,r,26),r}___asctime_r.sig="ppp";function _strptime_l(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,_strptime(e,r,t)}_strptime_l.sig="ppppp";var ERRNO_CODES={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},ERRNO_MESSAGES={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"},Protocols={list:[],map:{}},_setprotoent=e=>{function r(o,_,l){var c=_malloc(o.length+1);stringToAscii(o,c);for(var u=0,d=l.length,p=_malloc((d+1)*4),f=0;f>>2>>>0]=g}HEAPU32[p+u>>>2>>>0]=0;var v=_malloc(12);return HEAPU32[v>>>2>>>0]=c,HEAPU32[v+4>>>2>>>0]=p,HEAP32[v+8>>>2>>>0]=_,v}var t=Protocols.list,n=Protocols.map;if(t.length===0){var a=r("tcp",6,["TCP"]);t.push(a),n.tcp=n[6]=a,a=r("udp",17,["UDP"]),t.push(a),n.udp=n[17]=a}_setprotoent.index=0};_setprotoent.sig="vi";var _endprotoent=()=>{};_endprotoent.sig="v";function _getprotoent(e){if(_setprotoent.index===Protocols.list.length)return 0;var r=Protocols.list[_setprotoent.index++];return r}_getprotoent.sig="p";function _getprotobyname(e){e>>>=0,e=UTF8ToString(e),_setprotoent(!0);var r=Protocols.map[e];return r}_getprotobyname.sig="pp";function _getprotobynumber(e){_setprotoent(!0);var r=Protocols.map[e];return r}_getprotobynumber.sig="pi";function _emscripten_run_script(ptr){ptr>>>=0,eval(UTF8ToString(ptr))}_emscripten_run_script.sig="vp";function _emscripten_run_script_int(ptr){return ptr>>>=0,eval(UTF8ToString(ptr))|0}_emscripten_run_script_int.sig="ip";function _emscripten_run_script_string(ptr){ptr>>>=0;var s=eval(UTF8ToString(ptr));if(s==null)return 0;s+="";var me=_emscripten_run_script_string,len=lengthBytesUTF8(s);return(!me.bufferSize||me.bufferSizeMath.random();_emscripten_random.sig="f";function jsStackTrace(){var e=new Error;if(!e.stack){try{throw new Error}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}function getCallstack(e){var r=jsStackTrace(),t=r.lastIndexOf("_emscripten_log"),n=r.lastIndexOf("_emscripten_get_callstack"),a=r.indexOf("\n",Math.max(t,n))+1;r=r.slice(a),e&8&&typeof emscripten_source_map>"u"&&(warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var o=r.split("\n");r="";var _=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),l=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),c=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var u in o){var d=o[u],p="",f="",m=0,g=0,v=c.exec(d);if(v&&v.length==5)p=v[1],f=v[2],m=v[3],g=v[4];else if(v=_.exec(d),v||(v=l.exec(d)),v&&v.length>=4)p=v[1],f=v[2],m=v[3],g=v[4]|0;else{r+=d+"\n";continue}var S=!1;if(e&8){var y=emscripten_source_map.originalPositionFor({line:m,column:g});S=y==null?void 0:y.source,S&&(e&64&&(y.source=y.source.substring(y.source.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=" at ".concat(p," (").concat(y.source,":").concat(y.line,":").concat(y.column,")\n"))}(e&16||!S)&&(e&64&&(f=f.substring(f.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=(S?" = ".concat(p):" at ".concat(p))+" (".concat(f,":").concat(m,":").concat(g,")\n"))}return r=r.replace(/\s+$/,""),r}function _emscripten_get_callstack(e,r,t){r>>>=0;var n=getCallstack(e);if(!r||t<=0)return lengthBytesUTF8(n)+1;var a=stringToUTF8(n,r,t);return a+1}_emscripten_get_callstack.sig="iipi";var emscriptenLog=(e,r)=>{e&24&&(r=r.replace(/\s+$/,""),r+=(r.length>0?"\n":"")+getCallstack(e)),e&1?e&4?console.error(r):e&2?console.warn(r):e&512?console.info(r):e&256?console.debug(r):console.log(r):e&6?err(r):out(r)},reallyNegative=e=>e<0||e===0&&1/e===-1/0,reSign=(e,r)=>{if(e<=0)return e;var t=r<=32?Math.abs(1<=t&&(r<=32||e>t)&&(e=-2*t+e),e},unSign=(e,r)=>e>=0?e:r<=32?2*Math.abs(1<{for(var r=e;HEAPU8[r>>>0];)++r;return r-e},formatString=(e,r)=>{var t=e,n=r;function a(U,j){return(j==="double"||j==="i64")&&U&7&&(U+=4),U}function o(U){var j;return n=a(n,U),U==="double"?(j=HEAPF64[n>>>3>>>0],n+=8):U=="i64"?(j=[HEAP32[n>>>2>>>0],HEAP32[n+4>>>2>>>0]],n+=8):(U="i32",j=HEAP32[n>>>2>>>0],n+=4),j}for(var _=[],l,c,u;;){var d=t;if(l=HEAP8[t>>>0],l===0)break;if(c=HEAP8[t+1>>>0],l==37){var p=!1,f=!1,m=!1,g=!1,v=!1;e:for(;;){switch(c){case 43:p=!0;break;case 45:f=!0;break;case 35:m=!0;break;case 48:if(g)break e;g=!0;break;case 32:v=!0;break;default:break e}t++,c=HEAP8[t+1>>>0]}var S=0;if(c==42)S=o("i32"),t++,c=HEAP8[t+1>>>0];else for(;c>=48&&c<=57;)S=S*10+(c-48),t++,c=HEAP8[t+1>>>0];var y=!1,h=-1;if(c==46){if(h=0,y=!0,t++,c=HEAP8[t+1>>>0],c==42)h=o("i32"),t++;else for(;;){var b=HEAP8[t+1>>>0];if(b<48||b>57)break;h=h*10+(b-48),t++}c=HEAP8[t+1>>>0]}h<0&&(h=6,y=!1);var w;switch(String.fromCharCode(c)){case"h":var k=HEAP8[t+2>>>0];k==104?(t++,w=1):w=2;break;case"l":var k=HEAP8[t+2>>>0];k==108?(t++,w=8):w=4;break;case"L":case"q":case"j":w=8;break;case"z":case"t":case"I":w=4;break;default:w=null}switch(w&&t++,c=HEAP8[t+1>>>0],String.fromCharCode(c)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var L=c==100||c==105;w=w||4,u=o("i"+w*8);var E;if(w==8&&(u=c==117?convertU32PairToI53(u[0],u[1]):convertI32PairToI53(u[0],u[1])),w<=4){var x=Math.pow(256,w)-1;u=(L?reSign:unSign)(u&x,w*8)}var A=Math.abs(u),D="";if(c==100||c==105)E=reSign(u,8*w).toString(10);else if(c==117)E=unSign(u,8*w).toString(10),u=Math.abs(u);else if(c==111)E=(m?"0":"")+A.toString(8);else if(c==120||c==88){if(D=m&&u!=0?"0x":"",u<0){u=-u,E=(A-1).toString(16);for(var F=[],P=0;P=0&&(p?D="+"+D:v&&(D=" "+D)),E.charAt(0)=="-"&&(D="-"+D,E=E.substr(1));D.length+E.lengthC&&C>=-4?(c=(c==103?"f":"F").charCodeAt(0),h-=C+1):(c=(c==103?"e":"E").charCodeAt(0),h--),M=Math.min(h,20)}c==101||c==69?(E=u.toExponential(M),/[eE][-+]\d$/.test(E)&&(E=E.slice(0,-1)+"0"+E.slice(-1))):(c==102||c==70)&&(E=u.toFixed(M),u===0&&reallyNegative(u)&&(E="-"+E));var G=E.split("e");if(T&&!m)for(;G[0].length>1&&G[0].includes(".")&&(G[0].slice(-1)=="0"||G[0].slice(-1)==".");)G[0]=G[0].slice(0,-1);else for(m&&E.indexOf(".")==-1&&(G[0]+=".");h>M++;)G[0]+="0";E=G[0]+(G.length>1?"e"+G[1]:""),c==69&&(E=E.toUpperCase()),u>=0&&(p?E="+"+E:v&&(E=" "+E))}for(;E.length>>0]);else _=_.concat(intArrayFromString("(null)".substr(0,R),!0));if(f)for(;R0;)_.push(32);f||_.push(o("i8"));break}case"n":{var H=o("i32*");HEAP32[H>>>2>>>0]=_.length;break}case"%":{_.push(l);break}default:for(var P=d;P>>0])}t+=2}else _.push(l),t+=1}return _};function _emscripten_log(e,r,t){r>>>=0,t>>>=0;var n=formatString(r,t),a=UTF8ArrayToString(n,0);emscriptenLog(e,a)}_emscripten_log.sig="vipp";function _emscripten_get_compiler_setting(e){throw e>>>=0,"You must build with -sRETAIN_COMPILER_SETTINGS for getCompilerSetting or emscripten_get_compiler_setting to work"}_emscripten_get_compiler_setting.sig="pp";var _emscripten_has_asyncify=()=>0;_emscripten_has_asyncify.sig="i";function _emscripten_debugger(){debugger}_emscripten_debugger.sig="v";function _emscripten_print_double(e,r,t){r>>>=0;var n=e+"";return r?stringToUTF8(n,r,t):lengthBytesUTF8(n)}_emscripten_print_double.sig="idpi";var convertFrameToPC=e=>(abort("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0);function _emscripten_return_address(e){var r=jsStackTrace().split("\n");r[0]=="Error"&&r.shift();var t=r[e+3];return convertFrameToPC(t)}_emscripten_return_address.sig="pi";var UNWIND_CACHE={},saveInUnwindCache=e=>{e.forEach(r=>{var t=convertFrameToPC(r);t&&(UNWIND_CACHE[t]=r)})};function _emscripten_stack_snapshot(){var e=jsStackTrace().split("\n");return e[0]=="Error"&&e.shift(),saveInUnwindCache(e),UNWIND_CACHE.last_addr=convertFrameToPC(e[3]),UNWIND_CACHE.last_stack=e,UNWIND_CACHE.last_addr}_emscripten_stack_snapshot.sig="p";function _emscripten_stack_unwind_buffer(e,r,t){e>>>=0,r>>>=0;var n;UNWIND_CACHE.last_addr==e?n=UNWIND_CACHE.last_stack:(n=jsStackTrace().split("\n"),n[0]=="Error"&&n.shift(),saveInUnwindCache(n));for(var a=3;n[a]&&convertFrameToPC(n[a])!=e;)++a;for(var o=0;o>>2>>>0]=convertFrameToPC(n[o+a]);return o}_emscripten_stack_unwind_buffer.sig="ippi";function _emscripten_pc_get_function(e){return e>>>=0,abort("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0}_emscripten_pc_get_function.sig="pp";var convertPCtoSourceLocation=e=>{if(UNWIND_CACHE.last_get_source_pc==e)return UNWIND_CACHE.last_source;var r,t;if(!t){var n=UNWIND_CACHE[e];if(!n)return null;(r=/\((.*):(\d+):(\d+)\)$/.exec(n))?t={file:r[1],line:r[2],column:r[3]}:(r=/@(.*):(\d+):(\d+)/.exec(n))&&(t={file:r[1],line:r[2],column:r[3]})}return UNWIND_CACHE.last_get_source_pc=e,UNWIND_CACHE.last_source=t,t};function _emscripten_pc_get_file(e){e>>>=0;var r=convertPCtoSourceLocation(e);return r?(_emscripten_pc_get_file.ret&&_free(_emscripten_pc_get_file.ret),_emscripten_pc_get_file.ret=stringToNewUTF8(r.file),_emscripten_pc_get_file.ret):0}_emscripten_pc_get_file.sig="pp";function _emscripten_pc_get_line(e){e>>>=0;var r=convertPCtoSourceLocation(e);return r?r.line:0}_emscripten_pc_get_line.sig="ip";function _emscripten_pc_get_column(e){e>>>=0;var r=convertPCtoSourceLocation(e);return r&&r.column||0}_emscripten_pc_get_column.sig="ip";function _emscripten_get_module_name(e,r){return e>>>=0,r>>>=0,stringToUTF8(wasmBinaryFile,e,r)}_emscripten_get_module_name.sig="ppp";function _emscripten_asm_const_double(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runEmAsmFunction(e,r,t)}_emscripten_asm_const_double.sig="dppp";var runMainThreadEmAsm=(e,r,t,n)=>{var a=readEmAsmArgs(r,t);return ASM_CONSTS[e](...a)};function _emscripten_asm_const_int_sync_on_main_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runMainThreadEmAsm(e,r,t,1)}_emscripten_asm_const_int_sync_on_main_thread.sig="ippp";function _emscripten_asm_const_ptr_sync_on_main_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runMainThreadEmAsm(e,r,t,1)}_emscripten_asm_const_ptr_sync_on_main_thread.sig="pppp";var _emscripten_asm_const_double_sync_on_main_thread=_emscripten_asm_const_int_sync_on_main_thread;_emscripten_asm_const_double_sync_on_main_thread.sig="dppp";function _emscripten_asm_const_async_on_main_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,runMainThreadEmAsm(e,r,t,0)}_emscripten_asm_const_async_on_main_thread.sig="vppp";var jstoi_s=Number;function __Unwind_Backtrace(e,r){e>>>=0,r>>>=0;for(var t=getCallstack(),n=t.split("\n"),a=0;a>>=0,r>>>=0,abort("Unwind_GetIPInfo")}__Unwind_GetIPInfo.sig="ppp";function __Unwind_FindEnclosingFunction(e){return e>>>=0,0}__Unwind_FindEnclosingFunction.sig="pp";var createDyncallWrapper=e=>{var r=[],t=[0,97,115,109,1,0,0,0];r.push(t);var n=[e[0].replace("j","i"),"i",e.slice(1).replace(/j/g,"ii")].join(""),a=[3];generateFuncType(n,a),generateFuncType(e,a),generateFuncType("vi",a);var o=[1];uleb128Encode(a.length,o),o.push(...a),r.push(o);var _=[2,15,2,1,101,1,116,1,112,0,0,1,101,1,114,0,2];r.push(_);var l=[3,2,1,0];r.push(l);var c=[7,5,1,1,102,0,1];r.push(c);var u=[];e[0]==="j"?u=[1,1,126]:u.push(0);function d(b){u.push(32),uleb128Encode(b,u)}for(var p=1,f=1;f{"dynCall_"+e in Module||(Module["dynCall_"+e]=createDyncallWrapper(e));var n=Module["dynCall_"+e];return n(r,...t)},dynCall=(e,r,t=[])=>{if(e.includes("j"))return dynCallLegacy(e,r,t);var n=getWasmTableEntry(r)(...t);return n},getDynCaller=(e,r)=>(...t)=>dynCall(e,r,t),_emscripten_exit_with_live_runtime=()=>{throw"unwind"};_emscripten_exit_with_live_runtime.sig="v";var _emscripten_force_exit=e=>{__emscripten_runtime_keepalive_clear(),_exit(e)};_emscripten_force_exit.sig="vi";function _emscripten_outn(e,r){return e>>>=0,r>>>=0,out(UTF8ToString(e,r))}_emscripten_outn.sig="vpp";function _emscripten_errn(e,r){return e>>>=0,r>>>=0,err(UTF8ToString(e,r))}_emscripten_errn.sig="vpp";var _emscripten_throw_number=e=>{throw e};_emscripten_throw_number.sig="vd";function _emscripten_throw_string(e){throw e>>>=0,UTF8ToString(e)}_emscripten_throw_string.sig="vp";var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};runtimeKeepalivePush.sig="v";var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};runtimeKeepalivePop.sig="v";var _emscripten_runtime_keepalive_push=runtimeKeepalivePush;_emscripten_runtime_keepalive_push.sig="v";var _emscripten_runtime_keepalive_pop=runtimeKeepalivePop;_emscripten_runtime_keepalive_pop.sig="v";var _emscripten_runtime_keepalive_check=keepRuntimeAlive;_emscripten_runtime_keepalive_check.sig="i";var asmjsMangle=e=>{var r=["stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0"];return e=="__main_argc_argv"&&(e="main"),e.startsWith("dynCall_")||r.includes(e)?e:"_"+e},___global_base=1024;function __emscripten_fs_load_embedded_files(e){e>>>=0;do{var r=HEAPU32[e>>>2>>>0];e+=4;var t=HEAPU32[e>>>2>>>0];e+=4;var n=HEAPU32[e>>>2>>>0];e+=4;var a=UTF8ToString(r);FS.createPath("/",PATH.dirname(a),!0,!0),FS.createDataFile(a,null,HEAP8.subarray(n>>>0,n+t>>>0),!0,!0,!0)}while(HEAPU32[e>>>2>>>0])}__emscripten_fs_load_embedded_files.sig="vp";var POINTER_SIZE=4;function getNativeTypeSize(e){switch(e){case"i1":case"i8":case"u8":return 1;case"i16":case"u16":return 2;case"i32":case"u32":return 4;case"i64":case"u64":return 8;case"float":return 4;case"double":return 8;default:{if(e[e.length-1]==="*")return POINTER_SIZE;if(e[0]==="i"){let r=Number(e.substr(1));return assert(r%8===0,"getNativeTypeSize invalid bits ".concat(r,", ").concat(e," type")),r/8}return 0}}}var STACK_SIZE=65536,STACK_ALIGN=16,ASSERTIONS=0,cwrap=(e,r,t,n)=>{var a=!t||t.every(_=>_==="number"||_==="boolean"),o=r!=="string";return o&&a&&!n?getCFunc(e):(..._)=>ccall(e,r,t,_,n)},removeFunction=e=>{functionsInTableMap.delete(getWasmTableEntry(e)),setWasmTableEntry(e,null),freeTableIndexes.push(e)},_emscripten_math_cbrt=e=>Math.cbrt(e);_emscripten_math_cbrt.sig="dd";var _emscripten_math_pow=(e,r)=>Math.pow(e,r);_emscripten_math_pow.sig="ddd";var _emscripten_math_random=()=>Math.random();_emscripten_math_random.sig="d";var _emscripten_math_sign=e=>Math.sign(e);_emscripten_math_sign.sig="dd";var _emscripten_math_sqrt=e=>Math.sqrt(e);_emscripten_math_sqrt.sig="dd";var _emscripten_math_exp=e=>Math.exp(e);_emscripten_math_exp.sig="dd";var _emscripten_math_expm1=e=>Math.expm1(e);_emscripten_math_expm1.sig="dd";var _emscripten_math_fmod=(e,r)=>e%r;_emscripten_math_fmod.sig="ddd";var _emscripten_math_log=e=>Math.log(e);_emscripten_math_log.sig="dd";var _emscripten_math_log1p=e=>Math.log1p(e);_emscripten_math_log1p.sig="dd";var _emscripten_math_log10=e=>Math.log10(e);_emscripten_math_log10.sig="dd";var _emscripten_math_log2=e=>Math.log2(e);_emscripten_math_log2.sig="dd";var _emscripten_math_round=e=>Math.round(e);_emscripten_math_round.sig="dd";var _emscripten_math_acos=e=>Math.acos(e);_emscripten_math_acos.sig="dd";var _emscripten_math_acosh=e=>Math.acosh(e);_emscripten_math_acosh.sig="dd";var _emscripten_math_asin=e=>Math.asin(e);_emscripten_math_asin.sig="dd";var _emscripten_math_asinh=e=>Math.asinh(e);_emscripten_math_asinh.sig="dd";var _emscripten_math_atan=e=>Math.atan(e);_emscripten_math_atan.sig="dd";var _emscripten_math_atanh=e=>Math.atanh(e);_emscripten_math_atanh.sig="dd";var _emscripten_math_atan2=(e,r)=>Math.atan2(e,r);_emscripten_math_atan2.sig="ddd";var _emscripten_math_cos=e=>Math.cos(e);_emscripten_math_cos.sig="dd";var _emscripten_math_cosh=e=>Math.cosh(e);_emscripten_math_cosh.sig="dd";function _emscripten_math_hypot(e,r){r>>>=0;for(var t=[],n=0;n>>3>>>0]);return Math.hypot(...t)}_emscripten_math_hypot.sig="dip";var _emscripten_math_sin=e=>Math.sin(e);_emscripten_math_sin.sig="dd";var _emscripten_math_sinh=e=>Math.sinh(e);_emscripten_math_sinh.sig="dd";var _emscripten_math_tan=e=>Math.tan(e);_emscripten_math_tan.sig="dd";var _emscripten_math_tanh=e=>Math.tanh(e);_emscripten_math_tanh.sig="dd";function intArrayToString(e){for(var r=[],t=0;t255&&(n&=255),r.push(String.fromCharCode(n))}return r.join("")}var AsciiToString=e=>{e>>>=0;for(var r="";;){var t=HEAPU8[e++>>>0];if(!t)return r;r+=String.fromCharCode(t)}},JSEvents={removeAllEventListeners(){for(;JSEvents.eventHandlers.length;)JSEvents._removeHandler(JSEvents.eventHandlers.length-1);JSEvents.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(e,r,t){function n(_,l){if(_.length!=l.length)return!1;for(var c in _)if(_[c]!=l[c])return!1;return!0}for(var a in JSEvents.deferredCalls){var o=JSEvents.deferredCalls[a];if(o.targetFunction==e&&n(o.argsList,t))return}JSEvents.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),JSEvents.deferredCalls.sort((_,l)=>_.precedence{for(var t=0;te>2?UTF8ToString(e):e,specialHTMLTargets=[0,typeof document<"u"?document:0,typeof window<"u"?window:0],findEventTarget=e=>{e=maybeCStringToJsString(e);var r=specialHTMLTargets[e]||(typeof document<"u"?document.querySelector(e):void 0);return r},registerKeyEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.keyEvent||(JSEvents.keyEvent=_malloc(176));var l=u=>{var d=JSEvents.keyEvent;HEAPF64[d>>>3>>>0]=u.timeStamp;var p=d>>>2;HEAP32[p+2>>>0]=u.location,HEAP32[p+3>>>0]=u.ctrlKey,HEAP32[p+4>>>0]=u.shiftKey,HEAP32[p+5>>>0]=u.altKey,HEAP32[p+6>>>0]=u.metaKey,HEAP32[p+7>>>0]=u.repeat,HEAP32[p+8>>>0]=u.charCode,HEAP32[p+9>>>0]=u.keyCode,HEAP32[p+10>>>0]=u.which,stringToUTF8(u.key||"",d+44,32),stringToUTF8(u.code||"",d+76,32),stringToUTF8(u.char||"",d+108,32),stringToUTF8(u.locale||"",d+140,32),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)},findCanvasEventTarget=findEventTarget;function _emscripten_set_keypress_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerKeyEventCallback(e,r,t,n,1,"keypress",a)}_emscripten_set_keypress_callback_on_thread.sig="ippipp";function _emscripten_set_keydown_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerKeyEventCallback(e,r,t,n,2,"keydown",a)}_emscripten_set_keydown_callback_on_thread.sig="ippipp";function _emscripten_set_keyup_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerKeyEventCallback(e,r,t,n,3,"keyup",a)}_emscripten_set_keyup_callback_on_thread.sig="ippipp";var getBoundingClientRect=e=>specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0},fillMouseEventData=(e,r,t)=>{HEAPF64[e>>>3>>>0]=r.timeStamp;var n=e>>>2;HEAP32[n+2>>>0]=r.screenX,HEAP32[n+3>>>0]=r.screenY,HEAP32[n+4>>>0]=r.clientX,HEAP32[n+5>>>0]=r.clientY,HEAP32[n+6>>>0]=r.ctrlKey,HEAP32[n+7>>>0]=r.shiftKey,HEAP32[n+8>>>0]=r.altKey,HEAP32[n+9>>>0]=r.metaKey,HEAP16[n*2+20>>>0]=r.button,HEAP16[n*2+21>>>0]=r.buttons,HEAP32[n+11>>>0]=r.movementX,HEAP32[n+12>>>0]=r.movementY;var a=getBoundingClientRect(t);HEAP32[n+13>>>0]=r.clientX-a.left,HEAP32[n+14>>>0]=r.clientY-a.top},registerMouseEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.mouseEvent||(JSEvents.mouseEvent=_malloc(72)),e=findEventTarget(e);var l=(u=event)=>{fillMouseEventData(JSEvents.mouseEvent,u,e),getWasmTableEntry(n)(a,JSEvents.mouseEvent,r)&&u.preventDefault()},c={target:e,allowsDeferredCalls:o!="mousemove"&&o!="mouseenter"&&o!="mouseleave",eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_click_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,4,"click",a)}_emscripten_set_click_callback_on_thread.sig="ippipp";function _emscripten_set_mousedown_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,5,"mousedown",a)}_emscripten_set_mousedown_callback_on_thread.sig="ippipp";function _emscripten_set_mouseup_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,6,"mouseup",a)}_emscripten_set_mouseup_callback_on_thread.sig="ippipp";function _emscripten_set_dblclick_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,7,"dblclick",a)}_emscripten_set_dblclick_callback_on_thread.sig="ippipp";function _emscripten_set_mousemove_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,8,"mousemove",a)}_emscripten_set_mousemove_callback_on_thread.sig="ippipp";function _emscripten_set_mouseenter_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,33,"mouseenter",a)}_emscripten_set_mouseenter_callback_on_thread.sig="ippipp";function _emscripten_set_mouseleave_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,34,"mouseleave",a)}_emscripten_set_mouseleave_callback_on_thread.sig="ippipp";function _emscripten_set_mouseover_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,35,"mouseover",a)}_emscripten_set_mouseover_callback_on_thread.sig="ippipp";function _emscripten_set_mouseout_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerMouseEventCallback(e,r,t,n,36,"mouseout",a)}_emscripten_set_mouseout_callback_on_thread.sig="ippipp";function _emscripten_get_mouse_status(e){return e>>>=0,JSEvents.mouseEvent?(HEAP8.set(HEAP8.subarray(JSEvents.mouseEvent>>>0,JSEvents.mouseEvent+72>>>0),e>>>0),0):-7}_emscripten_get_mouse_status.sig="ip";var registerWheelEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.wheelEvent||(JSEvents.wheelEvent=_malloc(104));var l=(u=event)=>{var d=JSEvents.wheelEvent;fillMouseEventData(d,u,e),HEAPF64[d+72>>>3>>>0]=u.deltaX,HEAPF64[d+80>>>3>>>0]=u.deltaY,HEAPF64[d+88>>>3>>>0]=u.deltaZ,HEAP32[d+96>>>2>>>0]=u.deltaMode,getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,allowsDeferredCalls:!0,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_wheel_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,e=findEventTarget(e),e?typeof e.onwheel<"u"?registerWheelEventCallback(e,r,t,n,9,"wheel",a):-1:-4}_emscripten_set_wheel_callback_on_thread.sig="ippipp";var registerUiEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.uiEvent||(JSEvents.uiEvent=_malloc(36)),e=findEventTarget(e);var l=(u=event)=>{if(u.target==e){var d=document.body;if(d){var p=JSEvents.uiEvent;HEAP32[p>>>2>>>0]=u.detail,HEAP32[p+4>>>2>>>0]=d.clientWidth,HEAP32[p+8>>>2>>>0]=d.clientHeight,HEAP32[p+12>>>2>>>0]=innerWidth,HEAP32[p+16>>>2>>>0]=innerHeight,HEAP32[p+20>>>2>>>0]=outerWidth,HEAP32[p+24>>>2>>>0]=outerHeight,HEAP32[p+28>>>2>>>0]=pageXOffset,HEAP32[p+32>>>2>>>0]=pageYOffset,getWasmTableEntry(n)(a,p,r)&&u.preventDefault()}}},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_resize_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerUiEventCallback(e,r,t,n,10,"resize",a)}_emscripten_set_resize_callback_on_thread.sig="ippipp";function _emscripten_set_scroll_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerUiEventCallback(e,r,t,n,11,"scroll",a)}_emscripten_set_scroll_callback_on_thread.sig="ippipp";var registerFocusEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.focusEvent||(JSEvents.focusEvent=_malloc(256));var l=(u=event)=>{var d=JSEvents.getNodeNameForTarget(u.target),p=u.target.id?u.target.id:"",f=JSEvents.focusEvent;stringToUTF8(d,f+0,128),stringToUTF8(p,f+128,128),getWasmTableEntry(n)(a,f,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_blur_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,12,"blur",a)}_emscripten_set_blur_callback_on_thread.sig="ippipp";function _emscripten_set_focus_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,13,"focus",a)}_emscripten_set_focus_callback_on_thread.sig="ippipp";function _emscripten_set_focusin_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,14,"focusin",a)}_emscripten_set_focusin_callback_on_thread.sig="ippipp";function _emscripten_set_focusout_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerFocusEventCallback(e,r,t,n,15,"focusout",a)}_emscripten_set_focusout_callback_on_thread.sig="ippipp";var fillDeviceOrientationEventData=(e,r,t)=>{HEAPF64[e>>>3>>>0]=r.alpha,HEAPF64[e+8>>>3>>>0]=r.beta,HEAPF64[e+16>>>3>>>0]=r.gamma,HEAP32[e+24>>>2>>>0]=r.absolute},registerDeviceOrientationEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.deviceOrientationEvent||(JSEvents.deviceOrientationEvent=_malloc(32));var l=(u=event)=>{fillDeviceOrientationEventData(JSEvents.deviceOrientationEvent,u,e),getWasmTableEntry(n)(a,JSEvents.deviceOrientationEvent,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_deviceorientation_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,registerDeviceOrientationEventCallback(2,e,r,t,16,"deviceorientation",n)}_emscripten_set_deviceorientation_callback_on_thread.sig="ipipp";function _emscripten_get_deviceorientation_status(e){return e>>>=0,JSEvents.deviceOrientationEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceOrientationEvent>>>0,32),e>>>0),0):-7}_emscripten_get_deviceorientation_status.sig="ip";var fillDeviceMotionEventData=(e,r,t)=>{var n=0,a=r.acceleration;n|=a&&1;var o=r.accelerationIncludingGravity;n|=o&&2;var _=r.rotationRate;n|=_&&4,a=a||{},o=o||{},_=_||{},HEAPF64[e>>>3>>>0]=a.x,HEAPF64[e+8>>>3>>>0]=a.y,HEAPF64[e+16>>>3>>>0]=a.z,HEAPF64[e+24>>>3>>>0]=o.x,HEAPF64[e+32>>>3>>>0]=o.y,HEAPF64[e+40>>>3>>>0]=o.z,HEAPF64[e+48>>>3>>>0]=_.alpha,HEAPF64[e+56>>>3>>>0]=_.beta,HEAPF64[e+64>>>3>>>0]=_.gamma},registerDeviceMotionEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.deviceMotionEvent||(JSEvents.deviceMotionEvent=_malloc(80));var l=(u=event)=>{fillDeviceMotionEventData(JSEvents.deviceMotionEvent,u,e),getWasmTableEntry(n)(a,JSEvents.deviceMotionEvent,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_devicemotion_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,registerDeviceMotionEventCallback(2,e,r,t,17,"devicemotion",n)}_emscripten_set_devicemotion_callback_on_thread.sig="ipipp";function _emscripten_get_devicemotion_status(e){return e>>>=0,JSEvents.deviceMotionEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceMotionEvent>>>0,80),e>>>0),0):-7}_emscripten_get_devicemotion_status.sig="ip";var screenOrientation=()=>{if(screen)return screen.orientation||screen.mozOrientation||screen.webkitOrientation||screen.msOrientation},fillOrientationChangeEventData=e=>{var r=["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"],t=["portrait","portrait","landscape","landscape"],n=screenOrientation(),a=r.indexOf(n);a==-1&&(a=t.indexOf(n)),HEAP32[e>>>2>>>0]=1<>>2>>>0]=a},registerOrientationChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.orientationChangeEvent||(JSEvents.orientationChangeEvent=_malloc(8));var l=(u=event)=>{var d=JSEvents.orientationChangeEvent;fillOrientationChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()};a==18&&screen.mozOrientation!==void 0&&(o="mozorientationchange");var c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_orientationchange_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,!screen||!screen.addEventListener?-1:registerOrientationChangeEventCallback(screen,e,r,t,18,"orientationchange",n)}_emscripten_set_orientationchange_callback_on_thread.sig="ipipp";function _emscripten_get_orientation_status(e){return e>>>=0,!screenOrientation()&&typeof orientation>"u"?-1:(fillOrientationChangeEventData(e),0)}_emscripten_get_orientation_status.sig="ip";var _emscripten_lock_orientation=e=>{var r=[];e&1&&r.push("portrait-primary"),e&2&&r.push("portrait-secondary"),e&4&&r.push("landscape-primary"),e&8&&r.push("landscape-secondary");var t;if(screen.lockOrientation)t=screen.lockOrientation(r);else if(screen.mozLockOrientation)t=screen.mozLockOrientation(r);else if(screen.webkitLockOrientation)t=screen.webkitLockOrientation(r);else if(screen.msLockOrientation)t=screen.msLockOrientation(r);else return-1;return t?0:-6};_emscripten_lock_orientation.sig="ii";var _emscripten_unlock_orientation=()=>{if(screen.unlockOrientation)screen.unlockOrientation();else if(screen.mozUnlockOrientation)screen.mozUnlockOrientation();else if(screen.webkitUnlockOrientation)screen.webkitUnlockOrientation();else if(screen.msUnlockOrientation)screen.msUnlockOrientation();else return-1;return 0};_emscripten_unlock_orientation.sig="i";var fillFullscreenChangeEventData=e=>{var r=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,t=!!r;HEAP32[e>>>2>>>0]=t,HEAP32[e+4>>>2>>>0]=JSEvents.fullscreenEnabled();var n=t?r:JSEvents.previousFullscreenElement,a=JSEvents.getNodeNameForTarget(n),o=(n==null?void 0:n.id)||"";stringToUTF8(a,e+8,128),stringToUTF8(o,e+136,128),HEAP32[e+264>>>2>>>0]=n?n.clientWidth:0,HEAP32[e+268>>>2>>>0]=n?n.clientHeight:0,HEAP32[e+272>>>2>>>0]=screen.width,HEAP32[e+276>>>2>>>0]=screen.height,t&&(JSEvents.previousFullscreenElement=r)},registerFullscreenChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.fullscreenChangeEvent||(JSEvents.fullscreenChangeEvent=_malloc(280));var l=(u=event)=>{var d=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_fullscreenchange_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,JSEvents.fullscreenEnabled()?(e=findEventTarget(e),e?(registerFullscreenChangeEventCallback(e,r,t,n,19,"webkitfullscreenchange",a),registerFullscreenChangeEventCallback(e,r,t,n,19,"fullscreenchange",a)):-4):-1}_emscripten_set_fullscreenchange_callback_on_thread.sig="ippipp";function _emscripten_get_fullscreen_status(e){return e>>>=0,JSEvents.fullscreenEnabled()?(fillFullscreenChangeEventData(e),0):-1}_emscripten_get_fullscreen_status.sig="ip";function _emscripten_get_canvas_element_size(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=findCanvasEventTarget(e);if(!n)return-4;HEAP32[r>>>2>>>0]=n.width,HEAP32[t>>>2>>>0]=n.height}_emscripten_get_canvas_element_size.sig="ippp";var getCanvasElementSize=e=>withStackSave(()=>{var r=stackAlloc(8),t=r+4,n=stringToUTF8OnStack(e.id),a=_emscripten_get_canvas_element_size(n,r,t),o=[HEAP32[r>>>2>>>0],HEAP32[t>>>2>>>0]];return o});function _emscripten_set_canvas_element_size(e,r,t){e>>>=0;var n=findCanvasEventTarget(e);return n?(n.width=r,n.height=t,0):-4}_emscripten_set_canvas_element_size.sig="ipii";var setCanvasElementSize=(e,r,t)=>{e.controlTransferredOffscreen?withStackSave(()=>{var n=stringToUTF8OnStack(e.id);_emscripten_set_canvas_element_size(n,r,t)}):(e.width=r,e.height=t)},registerRestoreOldStyle=e=>{var r=getCanvasElementSize(e),t=r[0],n=r[1],a=e.style.width,o=e.style.height,_=e.style.backgroundColor,l=document.body.style.backgroundColor,c=e.style.paddingLeft,u=e.style.paddingRight,d=e.style.paddingTop,p=e.style.paddingBottom,f=e.style.marginLeft,m=e.style.marginRight,g=e.style.marginTop,v=e.style.marginBottom,S=document.body.style.margin,y=document.documentElement.style.overflow,h=document.body.scroll,b=e.style.imageRendering;function w(){var k=document.fullscreenElement||document.webkitFullscreenElement;k||(document.removeEventListener("fullscreenchange",w),document.removeEventListener("webkitfullscreenchange",w),setCanvasElementSize(e,t,n),e.style.width=a,e.style.height=o,e.style.backgroundColor=_,l||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=l,e.style.paddingLeft=c,e.style.paddingRight=u,e.style.paddingTop=d,e.style.paddingBottom=p,e.style.marginLeft=f,e.style.marginRight=m,e.style.marginTop=g,e.style.marginBottom=v,document.body.style.margin=S,document.documentElement.style.overflow=y,document.body.scroll=h,e.style.imageRendering=b,e.GLctxObject&&e.GLctxObject.GLctx.viewport(0,0,t,n),currentFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData))}return document.addEventListener("fullscreenchange",w),document.addEventListener("webkitfullscreenchange",w),w},setLetterbox=(e,r,t)=>{e.style.paddingLeft=e.style.paddingRight=t+"px",e.style.paddingTop=e.style.paddingBottom=r+"px"},JSEvents_resizeCanvasForFullscreen=(e,r)=>{var t=registerRestoreOldStyle(e),n=r.softFullscreen?innerWidth:screen.width,a=r.softFullscreen?innerHeight:screen.height,o=getBoundingClientRect(e),_=o.width,l=o.height,c=getCanvasElementSize(e),u=c[0],d=c[1];if(r.scaleMode==3)setLetterbox(e,(a-l)/2,(n-_)/2),n=_,a=l;else if(r.scaleMode==2)if(n*d{if((r.scaleMode!=0||r.canvasResolutionScaleMode!=0)&&JSEvents_resizeCanvasForFullscreen(e,r),e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else return JSEvents.fullscreenEnabled()?-3:-1;return currentFullscreenStrategy=r,r.canvasResizedCallback&&getWasmTableEntry(r.canvasResizedCallback)(37,0,r.canvasResizedCallbackUserData),0},hideEverythingExceptGivenElement=e=>{for(var r=e,t=r.parentNode,n=[];r!=document.body;){for(var a=t.children,o=0;o{for(var r=0;r{var e=devicePixelRatio,r=currentFullscreenStrategy.canvasResolutionScaleMode==2,t=currentFullscreenStrategy.scaleMode==2,n=currentFullscreenStrategy.canvasResolutionScaleMode!=0,a=currentFullscreenStrategy.scaleMode==3,o=r?Math.round(innerWidth*e):innerWidth,_=r?Math.round(innerHeight*e):innerHeight,l=o,c=_,u=currentFullscreenStrategy.target,d=getCanvasElementSize(u),p=d[0],f=d[1],m;if(t&&(l*fp*c&&(l=c*p/f|0),m=(_-c)/2|0),n&&(setCanvasElementSize(u,l,c),u.GLctxObject&&u.GLctxObject.GLctx.viewport(0,0,l,c)),r&&(m/=e,l/=e,c/=e,l=Math.round(l*1e4)/1e4,c=Math.round(c*1e4)/1e4,m=Math.round(m*1e4)/1e4),a){var g=(innerHeight-jstoi_q(u.style.height))/2,v=(innerWidth-jstoi_q(u.style.width))/2;setLetterbox(u,g,v)}else{u.style.width=l+"px",u.style.height=c+"px";var v=(innerWidth-l)/2;setLetterbox(u,m,v)}!a&¤tFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)},doRequestFullscreen=(e,r)=>{if(!JSEvents.fullscreenEnabled())return-1;if(e=findEventTarget(e),!e)return-4;if(!e.requestFullscreen&&!e.webkitRequestFullscreen)return-3;var t=JSEvents.canPerformEventHandlerRequests();return t?JSEvents_requestFullscreen(e,r):r.deferUntilInEventHandler?(JSEvents.deferCall(JSEvents_requestFullscreen,1,[e,r]),1):-2};function _emscripten_request_fullscreen(e,r){e>>>=0;var t={scaleMode:0,canvasResolutionScaleMode:0,filteringMode:0,deferUntilInEventHandler:r,canvasResizedCallbackTargetThread:2};return doRequestFullscreen(e,t)}_emscripten_request_fullscreen.sig="ipi";function _emscripten_request_fullscreen_strategy(e,r,t){e>>>=0,t>>>=0;var n={scaleMode:HEAP32[t>>>2>>>0],canvasResolutionScaleMode:HEAP32[t+4>>>2>>>0],filteringMode:HEAP32[t+8>>>2>>>0],deferUntilInEventHandler:r,canvasResizedCallback:HEAP32[t+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[t+16>>>2>>>0]};return doRequestFullscreen(e,n)}_emscripten_request_fullscreen_strategy.sig="ipip";function _emscripten_enter_soft_fullscreen(e,r){if(e>>>=0,r>>>=0,e=findEventTarget(e),!e)return-4;var t={scaleMode:HEAP32[r>>>2>>>0],canvasResolutionScaleMode:HEAP32[r+4>>>2>>>0],filteringMode:HEAP32[r+8>>>2>>>0],canvasResizedCallback:HEAP32[r+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[r+16>>>2>>>0],target:e,softFullscreen:!0},n=JSEvents_resizeCanvasForFullscreen(e,t);document.documentElement.style.overflow="hidden",document.body.scroll="no",document.body.style.margin="0px";var a=hideEverythingExceptGivenElement(e);function o(){n(),restoreHiddenElements(a),removeEventListener("resize",softFullscreenResizeWebGLRenderTarget),t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),currentFullscreenStrategy=0}return restoreOldWindowedStyle=o,currentFullscreenStrategy=t,addEventListener("resize",softFullscreenResizeWebGLRenderTarget),t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),0}_emscripten_enter_soft_fullscreen.sig="ipp";var _emscripten_exit_soft_fullscreen=()=>(restoreOldWindowedStyle==null||restoreOldWindowedStyle(),restoreOldWindowedStyle=null,0);_emscripten_exit_soft_fullscreen.sig="i";var _emscripten_exit_fullscreen=()=>{if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var e=specialHTMLTargets[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else if(e.webkitExitFullscreen)e.webkitFullscreenElement&&e.webkitExitFullscreen();else return-1;return 0};_emscripten_exit_fullscreen.sig="i";var fillPointerlockChangeEventData=e=>{var r=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement,t=!!r;HEAP32[e>>>2>>>0]=t;var n=JSEvents.getNodeNameForTarget(r),a=(r==null?void 0:r.id)||"";stringToUTF8(n,e+4,128),stringToUTF8(a,e+132,128)},registerPointerlockChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.pointerlockChangeEvent||(JSEvents.pointerlockChangeEvent=_malloc(260));var l=(u=event)=>{var d=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_pointerlockchange_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,!document||!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockChangeEventCallback(e,r,t,n,20,"mozpointerlockchange",a),registerPointerlockChangeEventCallback(e,r,t,n,20,"webkitpointerlockchange",a),registerPointerlockChangeEventCallback(e,r,t,n,20,"mspointerlockchange",a),registerPointerlockChangeEventCallback(e,r,t,n,20,"pointerlockchange",a)):-4)}_emscripten_set_pointerlockchange_callback_on_thread.sig="ippipp";var registerPointerlockErrorEventCallback=(e,r,t,n,a,o,_)=>{var l=(u=event)=>{getWasmTableEntry(n)(a,0,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_pointerlockerror_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,!document||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockErrorEventCallback(e,r,t,n,38,"mozpointerlockerror",a),registerPointerlockErrorEventCallback(e,r,t,n,38,"webkitpointerlockerror",a),registerPointerlockErrorEventCallback(e,r,t,n,38,"mspointerlockerror",a),registerPointerlockErrorEventCallback(e,r,t,n,38,"pointerlockerror",a)):-4)}_emscripten_set_pointerlockerror_callback_on_thread.sig="ippipp";function _emscripten_get_pointerlock_status(e){return e>>>=0,e&&fillPointerlockChangeEventData(e),!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:0}_emscripten_get_pointerlock_status.sig="ip";var requestPointerLock=e=>{if(e.requestPointerLock)e.requestPointerLock();else return document.body.requestPointerLock?-3:-1;return 0};function _emscripten_request_pointerlock(e,r){if(e>>>=0,e=findEventTarget(e),!e)return-4;if(!e.requestPointerLock)return-1;var t=JSEvents.canPerformEventHandlerRequests();return t?requestPointerLock(e):r?(JSEvents.deferCall(requestPointerLock,2,[e]),1):-2}_emscripten_request_pointerlock.sig="ipi";var _emscripten_exit_pointerlock=()=>{if(JSEvents.removeDeferredCalls(requestPointerLock),document.exitPointerLock)document.exitPointerLock();else return-1;return 0};_emscripten_exit_pointerlock.sig="i";var _emscripten_vibrate=e=>navigator.vibrate?(navigator.vibrate(e),0):-1;_emscripten_vibrate.sig="ii";function _emscripten_vibrate_pattern(e,r){if(e>>>=0,!navigator.vibrate)return-1;for(var t=[],n=0;n>>2>>>0];t.push(a)}return navigator.vibrate(t),0}_emscripten_vibrate_pattern.sig="ipi";var fillVisibilityChangeEventData=e=>{var r=["hidden","visible","prerender","unloaded"],t=r.indexOf(document.visibilityState);HEAP32[e>>>2>>>0]=document.hidden,HEAP32[e+4>>>2>>>0]=t},registerVisibilityChangeEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.visibilityChangeEvent||(JSEvents.visibilityChangeEvent=_malloc(8));var l=(u=event)=>{var d=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(d),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_visibilitychange_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,specialHTMLTargets[1]?registerVisibilityChangeEventCallback(specialHTMLTargets[1],e,r,t,21,"visibilitychange",n):-4}_emscripten_set_visibilitychange_callback_on_thread.sig="ipipp";function _emscripten_get_visibility_status(e){return e>>>=0,typeof document.visibilityState>"u"&&typeof document.hidden>"u"?-1:(fillVisibilityChangeEventData(e),0)}_emscripten_get_visibility_status.sig="ip";var registerTouchEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.touchEvent||(JSEvents.touchEvent=_malloc(1696)),e=findEventTarget(e);var l=u=>{for(var d,p={},f=u.touches,m=0;m>>3>>>0]=u.timeStamp;var v=g>>>2;HEAP32[v+3>>>0]=u.ctrlKey,HEAP32[v+4>>>0]=u.shiftKey,HEAP32[v+5>>>0]=u.altKey,HEAP32[v+6>>>0]=u.metaKey,v+=7;var S=getBoundingClientRect(e),y=0;for(var m in p)if(d=p[m],HEAP32[v+0>>>0]=d.identifier,HEAP32[v+1>>>0]=d.screenX,HEAP32[v+2>>>0]=d.screenY,HEAP32[v+3>>>0]=d.clientX,HEAP32[v+4>>>0]=d.clientY,HEAP32[v+5>>>0]=d.pageX,HEAP32[v+6>>>0]=d.pageY,HEAP32[v+7>>>0]=d.isChanged,HEAP32[v+8>>>0]=d.onTarget,HEAP32[v+9>>>0]=d.clientX-S.left,HEAP32[v+10>>>0]=d.clientY-S.top,v+=13,++y>31)break;HEAP32[g+8>>>2>>>0]=y,getWasmTableEntry(n)(a,g,r)&&u.preventDefault()},c={target:e,allowsDeferredCalls:o=="touchstart"||o=="touchend",eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_touchstart_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,22,"touchstart",a)}_emscripten_set_touchstart_callback_on_thread.sig="ippipp";function _emscripten_set_touchend_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,23,"touchend",a)}_emscripten_set_touchend_callback_on_thread.sig="ippipp";function _emscripten_set_touchmove_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,24,"touchmove",a)}_emscripten_set_touchmove_callback_on_thread.sig="ippipp";function _emscripten_set_touchcancel_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerTouchEventCallback(e,r,t,n,25,"touchcancel",a)}_emscripten_set_touchcancel_callback_on_thread.sig="ippipp";var fillGamepadEventData=(e,r)=>{HEAPF64[e>>>3>>>0]=r.timestamp;for(var t=0;t>>3>>>0]=r.axes[t];for(var t=0;t>>3>>>0]=r.buttons[t].value:HEAPF64[e+t*8+528>>>3>>>0]=r.buttons[t];for(var t=0;t>>2>>>0]=r.buttons[t].pressed:HEAP32[e+t*4+1040>>>2>>>0]=r.buttons[t]==1;HEAP32[e+1296>>>2>>>0]=r.connected,HEAP32[e+1300>>>2>>>0]=r.index,HEAP32[e+8>>>2>>>0]=r.axes.length,HEAP32[e+12>>>2>>>0]=r.buttons.length,stringToUTF8(r.id,e+1304,64),stringToUTF8(r.mapping,e+1368,64)},registerGamepadEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.gamepadEvent||(JSEvents.gamepadEvent=_malloc(1432));var l=(u=event)=>{var d=JSEvents.gamepadEvent;fillGamepadEventData(d,u.gamepad),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:findEventTarget(e),allowsDeferredCalls:!0,eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)},_emscripten_sample_gamepad_data=()=>{try{if(navigator.getGamepads)return(JSEvents.lastGamepadState=navigator.getGamepads())?0:-1}catch(e){navigator.getGamepads=null}return-1};_emscripten_sample_gamepad_data.sig="i";function _emscripten_set_gamepadconnected_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,r,t,26,"gamepadconnected",n)}_emscripten_set_gamepadconnected_callback_on_thread.sig="ipipp";function _emscripten_set_gamepaddisconnected_callback_on_thread(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,r,t,27,"gamepaddisconnected",n)}_emscripten_set_gamepaddisconnected_callback_on_thread.sig="ipipp";var _emscripten_get_num_gamepads=()=>JSEvents.lastGamepadState.length;_emscripten_get_num_gamepads.sig="i";function _emscripten_get_gamepad_status(e,r){return r>>>=0,e<0||e>=JSEvents.lastGamepadState.length?-5:JSEvents.lastGamepadState[e]?(fillGamepadEventData(r,JSEvents.lastGamepadState[e]),0):-7}_emscripten_get_gamepad_status.sig="iip";var registerBeforeUnloadEventCallback=(e,r,t,n,a,o)=>{var _=(c=event)=>{var u=getWasmTableEntry(n)(a,0,r);if(u&&(u=UTF8ToString(u)),u)return c.preventDefault(),c.returnValue=u,u},l={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:_,useCapture:t};return JSEvents.registerOrRemoveHandler(l)};function _emscripten_set_beforeunload_callback_on_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,typeof onbeforeunload>"u"?-1:t!==1?-5:registerBeforeUnloadEventCallback(2,e,!0,r,28,"beforeunload")}_emscripten_set_beforeunload_callback_on_thread.sig="ippp";var fillBatteryEventData=(e,r)=>{HEAPF64[e>>>3>>>0]=r.chargingTime,HEAPF64[e+8>>>3>>>0]=r.dischargingTime,HEAPF64[e+16>>>3>>>0]=r.level,HEAP32[e+24>>>2>>>0]=r.charging},battery=()=>navigator.battery||navigator.mozBattery||navigator.webkitBattery,registerBatteryEventCallback=(e,r,t,n,a,o,_)=>{JSEvents.batteryEvent||(JSEvents.batteryEvent=_malloc(32));var l=(u=event)=>{var d=JSEvents.batteryEvent;fillBatteryEventData(d,battery()),getWasmTableEntry(n)(a,d,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};return JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_batterychargingchange_callback_on_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,r,29,"chargingchange",t):-1}_emscripten_set_batterychargingchange_callback_on_thread.sig="ippp";function _emscripten_set_batterylevelchange_callback_on_thread(e,r,t){return e>>>=0,r>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,r,30,"levelchange",t):-1}_emscripten_set_batterylevelchange_callback_on_thread.sig="ippp";function _emscripten_get_battery_status(e){return e>>>=0,battery()?(fillBatteryEventData(e,battery()),0):-1}_emscripten_get_battery_status.sig="ip";function _emscripten_set_element_css_size(e,r,t){return e>>>=0,e=findEventTarget(e),e?(e.style.width=r+"px",e.style.height=t+"px",0):-4}_emscripten_set_element_css_size.sig="ipdd";function _emscripten_get_element_css_size(e,r,t){if(e>>>=0,r>>>=0,t>>>=0,e=findEventTarget(e),!e)return-4;var n=getBoundingClientRect(e);return HEAPF64[r>>>3>>>0]=n.width,HEAPF64[t>>>3>>>0]=n.height,0}_emscripten_get_element_css_size.sig="ippp";var _emscripten_html5_remove_all_event_listeners=()=>JSEvents.removeAllEventListeners();_emscripten_html5_remove_all_event_listeners.sig="v";var _emscripten_request_animation_frame=function(e,r){return e>>>=0,r>>>=0,requestAnimationFrame(t=>getWasmTableEntry(e)(t,r))};_emscripten_request_animation_frame.sig="ipp";var _emscripten_cancel_animation_frame=e=>cancelAnimationFrame(e);_emscripten_cancel_animation_frame.sig="vi";function _emscripten_request_animation_frame_loop(e,r){e>>>=0,r>>>=0;function t(n){getWasmTableEntry(e)(n,r)&&requestAnimationFrame(t)}return requestAnimationFrame(t)}_emscripten_request_animation_frame_loop.sig="vpp";var _emscripten_performance_now=()=>performance.now();_emscripten_performance_now.sig="d";var _emscripten_get_device_pixel_ratio=()=>typeof devicePixelRatio=="number"&&devicePixelRatio||1;_emscripten_get_device_pixel_ratio.sig="d";function stackTrace(){var e=jsStackTrace();return Module.extraStackTrace&&(e+="\n"+Module.extraStackTrace()),e}function _random_get(e,r){e>>>=0,r>>>=0;try{return _getentropy(e,r),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return t.errno}}_random_get.sig="ipp";var checkWasiClock=e=>e==0||e==1||e==2||e==3;function _clock_time_get(e,r,t,n){var a=convertI32PairToI53Checked(r,t);if(n>>>=0,!checkWasiClock(e))return 28;var o;if(e===0)o=Date.now();else if(nowIsMonotonic)o=_emscripten_get_now();else return 52;var _=Math.round(o*1e3*1e3);return HEAP32[n>>>2>>>0]=_>>>0,HEAP32[n+4>>>2>>>0]=_/Math.pow(2,32)>>>0,0}_clock_time_get.sig="iiiip";function _clock_res_get(e,r){if(r>>>=0,!checkWasiClock(e))return 28;var t;if(e===0)t=1e6;else if(nowIsMonotonic)t=_emscripten_get_now_res();else return 52;return HEAP32[r>>>2>>>0]=t>>>0,HEAP32[r+4>>>2>>>0]=t/Math.pow(2,32)>>>0,0}_clock_res_get.sig="iip";var wasiRightsToMuslOFlags=e=>{if(e&2&&e&64)return 2;if(e&2)return 0;if(e&64)return 1;throw new FS.ErrnoError(28)},wasiOFlagsToMuslOFlags=e=>{var r=0;return e&1&&(r|=64),e&8&&(r|=512),e&2&&(r|=65536),e&4&&(r|=128),r},_emscripten_unwind_to_js_event_loop=()=>{throw"unwind"};_emscripten_unwind_to_js_event_loop.sig="v";var setImmediateWrapped=e=>{setImmediateWrapped.mapping||(setImmediateWrapped.mapping=[]);var r=setImmediateWrapped.mapping.length;return setImmediateWrapped.mapping[r]=setImmediate(()=>{setImmediateWrapped.mapping[r]=void 0,e()}),r},clearImmediateWrapped=e=>{clearImmediate(setImmediateWrapped.mapping[e]),setImmediateWrapped.mapping[e]=void 0},polyfillSetImmediate=()=>{},_emscripten_set_immediate=function(e,r){return e>>>=0,r>>>=0,emSetImmediate(()=>{callUserCallback(()=>getWasmTableEntry(e)(r))})};_emscripten_set_immediate.sig="ipp";var _emscripten_clear_immediate=e=>{emClearImmediate(e)};_emscripten_clear_immediate.sig="vi";var _emscripten_set_immediate_loop=function(e,r){e>>>=0,r>>>=0;function t(){callUserCallback(()=>{getWasmTableEntry(e)(r)&&emSetImmediate(t)})}emSetImmediate(t)};_emscripten_set_immediate_loop.sig="vpp";var _emscripten_set_timeout=function(e,r,t){return e>>>=0,t>>>=0,safeSetTimeout(()=>getWasmTableEntry(e)(t),r)};_emscripten_set_timeout.sig="ipdp";var _emscripten_clear_timeout=clearTimeout;_emscripten_clear_timeout.sig="vi";var _emscripten_set_timeout_loop=function(e,r,t){e>>>=0,t>>>=0;function n(){var a=_emscripten_get_now(),o=a+r;callUserCallback(()=>{getWasmTableEntry(e)(a,t)&&setTimeout(n,o-_emscripten_get_now())})}return setTimeout(n,0)};_emscripten_set_timeout_loop.sig="vpdp";var _emscripten_set_interval=function(e,r,t){return e>>>=0,t>>>=0,setInterval(()=>{callUserCallback(()=>getWasmTableEntry(e)(t))},r)};_emscripten_set_interval.sig="ipdp";var _emscripten_clear_interval=e=>{clearInterval(e)};_emscripten_clear_interval.sig="vi";var idsToPromises=(e,r)=>{for(var t=[],n=0;n>>2>>>0];t[n]=getPromise(a)}return t},makePromiseCallback=(e,r)=>t=>{var n=stackSave(),a=stackAlloc(POINTER_SIZE);HEAPU32[a>>>2>>>0]=0;try{var o=getWasmTableEntry(e)(a,r,t),_=HEAPU32[a>>>2>>>0]}catch(c){throw typeof c!="number"?0:c}finally{stackRestore(n)}switch(o){case 0:return _;case 1:return getPromise(_);case 2:var l=getPromise(_);return _emscripten_promise_destroy(_),l;case 3:throw _}};function _emscripten_promise_then(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=getPromise(e),o=promiseMap.allocate({promise:a.then(makePromiseCallback(r,n),makePromiseCallback(t,n))});return o}_emscripten_promise_then.sig="ppppp";var _emscripten_promise_all=function(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=idsToPromises(e,t),a=promiseMap.allocate({promise:Promise.all(n).then(o=>{if(r)for(var _=0;_>>2>>>0]=l}return r})});return a};_emscripten_promise_all.sig="pppp";var setPromiseResult=(e,r,t)=>{var n=r?0:3;HEAP32[e>>>2>>>0]=n,HEAPU32[e+4>>>2>>>0]=t},_emscripten_promise_all_settled=function(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=idsToPromises(e,t),a=promiseMap.allocate({promise:Promise.allSettled(n).then(o=>{if(r)for(var _=r,l=0;l>>=0,r>>>=0,t>>>=0;var n=idsToPromises(e,t),a=promiseMap.allocate({promise:Promise.any(n).catch(o=>{if(r)for(var _=0;_>>2>>>0]=o.errors[_];throw r})});return a};_emscripten_promise_any.sig="pppp";function _emscripten_promise_race(e,r){e>>>=0,r>>>=0;var t=idsToPromises(e,r),n=promiseMap.allocate({promise:Promise.race(t)});return n}_emscripten_promise_race.sig="ppp";function _emscripten_promise_await(e,r){e>>>=0,r>>>=0,abort("emscripten_promise_await is only available with ASYNCIFY")}_emscripten_promise_await.sig="vpp";var getExceptionMessageCommon=e=>withStackSave(()=>{var r=stackAlloc(4),t=stackAlloc(4);___get_exception_message(e,r,t);var n=HEAPU32[r>>>2>>>0],a=HEAPU32[t>>>2>>>0],o=UTF8ToString(n);_free(n);var _;return a&&(_=UTF8ToString(a),_free(a)),[o,_]}),getCppExceptionTag=()=>___cpp_exception,getCppExceptionThrownObjectFromWebAssemblyException=e=>{var r=e.getArg(getCppExceptionTag(),0);return ___thrown_object_from_unwind_exception(r)},incrementExceptionRefcount=e=>{var r=getCppExceptionThrownObjectFromWebAssemblyException(e);___cxa_increment_exception_refcount(r)},decrementExceptionRefcount=e=>{var r=getCppExceptionThrownObjectFromWebAssemblyException(e);___cxa_decrement_exception_refcount(r)},getExceptionMessage=e=>{var r=getCppExceptionThrownObjectFromWebAssemblyException(e);return getExceptionMessageCommon(r)},_emscripten_run_preload_plugins=function(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=UTF8ToString(e),a=FS.analyzePath(n);return a.exists?(FS.createPreloadedFile(PATH.dirname(n),PATH.basename(n),new Uint8Array(a.object.contents),!0,!0,()=>{r&&getWasmTableEntry(r)(e)},()=>{t&&getWasmTableEntry(t)(e)},!0),0):-1};_emscripten_run_preload_plugins.sig="ippp";var Browser_asyncPrepareDataCounter=0,_emscripten_run_preload_plugins_data=function(e,r,t,n,a,o){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0;var _=UTF8ToString(t),l="prepare_data_"+Browser_asyncPrepareDataCounter+++"."+_,c=stringToNewUTF8(l);FS.createPreloadedFile("/",l,HEAPU8.subarray(e>>>0,e+r>>>0),!0,!0,()=>{a&&getWasmTableEntry(a)(n,c)},()=>{o&&getWasmTableEntry(o)(n)},!0)};_emscripten_run_preload_plugins_data.sig="vpipppp";var _emscripten_async_run_script=function(e,r){e>>>=0,safeSetTimeout(()=>_emscripten_run_script(e),r)};_emscripten_async_run_script.sig="vpi";var _emscripten_async_load_script=function(url,onload,onerror){url>>>=0,onload>>>=0,onerror>>>=0,url=UTF8ToString(url),onload=getWasmTableEntry(onload),onerror=getWasmTableEntry(onerror),assert(runDependencies===0,"async_load_script must be run when no other dependencies are active");var loadDone=()=>{onload&&(runDependencies>0?dependenciesFulfilled=onload:onload())},loadError=()=>{onerror==null||onerror()};if(ENVIRONMENT_IS_NODE){readAsync(url,data=>{eval(data),loadDone()},loadError,!1);return}var script=document.createElement("script");script.onload=loadDone,script.onerror=loadError,script.src=url,document.body.appendChild(script)};_emscripten_async_load_script.sig="vppp";function _emscripten_get_main_loop_timing(e,r){e>>>=0,r>>>=0,e&&(HEAP32[e>>>2>>>0]=Browser.mainLoop.timingMode),r&&(HEAP32[r>>>2>>>0]=Browser.mainLoop.timingValue)}_emscripten_get_main_loop_timing.sig="vpp";function _emscripten_set_main_loop(e,r,t){e>>>=0;var n=getWasmTableEntry(e);setMainLoop(n,r,t)}_emscripten_set_main_loop.sig="vpii";var _emscripten_set_main_loop_arg=function(e,r,t,n){e>>>=0,r>>>=0;var a=()=>getWasmTableEntry(e)(r);setMainLoop(a,t,n,r)};_emscripten_set_main_loop_arg.sig="vppii";var _emscripten_cancel_main_loop=()=>{Browser.mainLoop.pause(),Browser.mainLoop.func=null};_emscripten_cancel_main_loop.sig="v";var _emscripten_pause_main_loop=()=>{Browser.mainLoop.pause()};_emscripten_pause_main_loop.sig="v";var _emscripten_resume_main_loop=()=>{Browser.mainLoop.resume()};_emscripten_resume_main_loop.sig="v";var __emscripten_push_main_loop_blocker=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,Browser.mainLoop.queue.push({func:()=>{getWasmTableEntry(e)(r)},name:UTF8ToString(t),counted:!0}),Browser.mainLoop.updateStatus()};__emscripten_push_main_loop_blocker.sig="vppp";var __emscripten_push_uncounted_main_loop_blocker=function(e,r,t){e>>>=0,r>>>=0,t>>>=0,Browser.mainLoop.queue.push({func:()=>{getWasmTableEntry(e)(r)},name:UTF8ToString(t),counted:!1}),Browser.mainLoop.updateStatus()};__emscripten_push_uncounted_main_loop_blocker.sig="vppp";var _emscripten_set_main_loop_expected_blockers=e=>{Browser.mainLoop.expectedBlockers=e,Browser.mainLoop.remainingBlockers=e,Browser.mainLoop.updateStatus()};_emscripten_set_main_loop_expected_blockers.sig="vi";function _emscripten_async_call(e,r,t){e>>>=0,r>>>=0;function n(){getWasmTableEntry(e)(r)}t>=0||ENVIRONMENT_IS_NODE?safeSetTimeout(n,t):Browser.safeRequestAnimationFrame(n)}_emscripten_async_call.sig="vppi";function _emscripten_get_window_title(){var e=256;return _emscripten_get_window_title.buffer||(_emscripten_get_window_title.buffer=_malloc(e)),stringToUTF8(document.title,_emscripten_get_window_title.buffer,e),_emscripten_get_window_title.buffer}_emscripten_get_window_title.sig="p";function _emscripten_set_window_title(e){return e>>>=0,document.title=UTF8ToString(e)}_emscripten_set_window_title.sig="vp";function _emscripten_get_screen_size(e,r){e>>>=0,r>>>=0,HEAP32[e>>>2>>>0]=screen.width,HEAP32[r>>>2>>>0]=screen.height}_emscripten_get_screen_size.sig="vpp";var _emscripten_hide_mouse=()=>{for(var e=document.styleSheets[0],r=e.cssRules,t=0;t{Browser.setCanvasSize(e,r)};_emscripten_set_canvas_size.sig="vii";function _emscripten_get_canvas_size(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=Module.canvas;HEAP32[e>>>2>>>0]=n.width,HEAP32[r>>>2>>>0]=n.height,HEAP32[t>>>2>>>0]=Browser.isFullscreen?1:0}_emscripten_get_canvas_size.sig="vppp";function _emscripten_create_worker(e){e>>>=0,e=UTF8ToString(e);var r=Browser.workers.length,t={worker:new Worker(e),callbacks:[],awaited:0,buffer:0,bufferSize:0};return t.worker.onmessage=function(a){if(!ABORT){var o=Browser.workers[r];if(o){var _=a.data.callbackId,l=o.callbacks[_];if(l){a.data.finalResponse&&(o.awaited--,o.callbacks[_]=null);var c=a.data.data;c?(c.byteLength||(c=new Uint8Array(c)),(!o.buffer||o.bufferSize>>0),l.func(o.buffer,c.length,l.arg)):l.func(0,0,l.arg)}}}},Browser.workers.push(t),r}_emscripten_create_worker.sig="ip";var _emscripten_destroy_worker=e=>{var r=Browser.workers[e];r.worker.terminate(),r.buffer&&_free(r.buffer),Browser.workers[e]=null};_emscripten_destroy_worker.sig="vi";function _emscripten_call_worker(e,r,t,n,a,o){r>>>=0,t>>>=0,a>>>=0,o>>>=0,r=UTF8ToString(r);var _=Browser.workers[e],l=-1;a&&(l=_.callbacks.length,_.callbacks.push({func:getWasmTableEntry(a),arg:o}),_.awaited++);var c={funcName:r,callbackId:l,data:t?new Uint8Array(HEAPU8.subarray(t>>>0,t+n>>>0)):0};t?_.worker.postMessage(c,[c.data.buffer]):_.worker.postMessage(c)}_emscripten_call_worker.sig="vippipp";var _emscripten_get_worker_queue_size=e=>{var r=Browser.workers[e];return r?r.awaited:-1};_emscripten_get_worker_queue_size.sig="ii";var getPreloadedImageData=(e,r,t)=>{e=PATH_FS.resolve(e);var n=preloadedImages[e];if(!n)return 0;var a=n.getContext("2d"),o=a.getImageData(0,0,n.width,n.height),_=_malloc(n.width*n.height*4);return HEAPU8.set(o.data,_>>>0),HEAP32[r>>>2>>>0]=n.width,HEAP32[t>>>2>>>0]=n.height,_};function _emscripten_get_preloaded_image_data(e,r,t){return e>>>=0,r>>>=0,t>>>=0,getPreloadedImageData(UTF8ToString(e),r,t)}_emscripten_get_preloaded_image_data.sig="pppp";var getPreloadedImageData__data=["$PATH_FS","malloc"];function _emscripten_get_preloaded_image_data_from_FILE(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=_fileno(e),a=FS.getStream(n);return a?getPreloadedImageData(a.path,r,t):0}_emscripten_get_preloaded_image_data_from_FILE.sig="pppp";var wget={wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle(){var e=wget.nextWgetRequestHandle;return wget.nextWgetRequestHandle++,e}},FS_mkdirTree=(e,r)=>FS.mkdirTree(e,r),FS_unlink=e=>FS.unlink(e),_emscripten_async_wget=function(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=UTF8ToString(e),o=UTF8ToString(r);o=PATH_FS.resolve(o);function _(c){c&&callUserCallback(()=>{withStackSave(()=>{getWasmTableEntry(c)(stringToUTF8OnStack(o))})})}var l=PATH.dirname(o);FS_createPreloadedFile(l,PATH.basename(o),a,!0,!0,()=>_(t),()=>_(n),!1,!1,()=>{try{FS_unlink(o)}catch(c){}FS_mkdirTree(l)})};_emscripten_async_wget.sig="vpppp";var _emscripten_async_wget_data=function(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0,asyncLoad(UTF8ToString(e),a=>{callUserCallback(()=>{var o=_malloc(a.length);HEAPU8.set(a,o>>>0),getWasmTableEntry(t)(r,o,a.length),_free(o)})},()=>{n&&callUserCallback(()=>{getWasmTableEntry(n)(r)})},!0)};_emscripten_async_wget_data.sig="vpppp";var _emscripten_async_wget2=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0;var c=UTF8ToString(e),u=UTF8ToString(r);u=PATH_FS.resolve(u);var d=UTF8ToString(t),p=UTF8ToString(n),f=u.lastIndexOf("/"),m=new XMLHttpRequest;m.open(d,c,!0),m.responseType="arraybuffer";var g=wget.getNextWgetRequestHandle(),v=PATH.dirname(u);return m.onload=S=>{if(m.status>=200&&m.status<300){try{FS.unlink(u)}catch(y){}FS.mkdirTree(v),FS.createDataFile(u.substr(0,f),u.substr(f+1),new Uint8Array(m.response),!0,!0,!1),o&&withStackSave(()=>{getWasmTableEntry(o)(g,a,stringToUTF8OnStack(u))})}else _&&getWasmTableEntry(_)(g,a,m.status);delete wget.wgetRequests[g]},m.onerror=S=>{_&&getWasmTableEntry(_)(g,a,m.status),delete wget.wgetRequests[g]},m.onprogress=S=>{if(S.lengthComputable||S.lengthComputable===void 0&&S.total!=0){var y=S.loaded/S.total*100;l&&getWasmTableEntry(l)(g,a,y)}},m.onabort=S=>{delete wget.wgetRequests[g]},d=="POST"?(m.setRequestHeader("Content-type","application/x-www-form-urlencoded"),m.send(p)):m.send(null),wget.wgetRequests[g]=m,g};_emscripten_async_wget2.sig="ipppppppp";var _emscripten_async_wget2_data=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,t>>>=0,n>>>=0,o>>>=0,_>>>=0,l>>>=0;var c=UTF8ToString(e),u=UTF8ToString(r),d=UTF8ToString(t),p=new XMLHttpRequest;p.open(u,c,!0),p.responseType="arraybuffer";var f=wget.getNextWgetRequestHandle();function m(){_&&withStackSave(()=>{var g=0;p.statusText&&(g=stringToUTF8OnStack(p.statusText)),getWasmTableEntry(_)(f,n,p.status,g)})}return p.onload=g=>{if(p.status>=200&&p.status<300||p.status===0&&c.substr(0,4).toLowerCase()!="http"){var v=new Uint8Array(p.response),S=_malloc(v.length);HEAPU8.set(v,S>>>0),o&&getWasmTableEntry(o)(f,n,S,v.length),a&&_free(S)}else m();delete wget.wgetRequests[f]},p.onerror=g=>{m(),delete wget.wgetRequests[f]},p.onprogress=g=>{l&&getWasmTableEntry(l)(f,n,g.loaded,g.lengthComputable||g.lengthComputable===void 0?g.total:0)},p.onabort=g=>{delete wget.wgetRequests[f]},u=="POST"?(p.setRequestHeader("Content-type","application/x-www-form-urlencoded"),p.send(d)):p.send(null),wget.wgetRequests[f]=p,f};_emscripten_async_wget2_data.sig="ippppippp";var _emscripten_async_wget2_abort=e=>{var r=wget.wgetRequests[e];r==null||r.abort()};_emscripten_async_wget2_abort.sig="vi";function __dlsym_catchup_js(e,r){e>>>=0;var t=LDSO.loadedLibsByHandle[e],n=t.exports,a=Object.keys(n)[r],o=n[a],_=addFunction(o,o.sig);return _}__dlsym_catchup_js.sig="ppi";var _setNetworkCallback=(e,r,t)=>{function n(a){try{e==="error"?withStackSave(function(){var o=stringToUTF8OnStack(a[2]);getWasmTableEntry(t)(a[0],a[1],o,r)}):getWasmTableEntry(t)(a,r)}catch(o){if(!(o instanceof ExitStatus))throw o&&typeof o=="object"&&o.stack&&err("exception thrown: "+[o,o.stack]),o}}Module.websocket.on(e,t?n:null)};function _emscripten_set_socket_error_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("error",e,r)}_emscripten_set_socket_error_callback.sig="vpp";function _emscripten_set_socket_open_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("open",e,r)}_emscripten_set_socket_open_callback.sig="vpp";function _emscripten_set_socket_listen_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("listen",e,r)}_emscripten_set_socket_listen_callback.sig="vpp";function _emscripten_set_socket_connection_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("connection",e,r)}_emscripten_set_socket_connection_callback.sig="vpp";function _emscripten_set_socket_message_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("message",e,r)}_emscripten_set_socket_message_callback.sig="vpp";function _emscripten_set_socket_close_callback(e,r){e>>>=0,r>>>=0,_setNetworkCallback("close",e,r)}_emscripten_set_socket_close_callback.sig="vpp";function _emscripten_webgl_enable_ANGLE_instanced_arrays(e){return e>>>=0,webgl_enable_ANGLE_instanced_arrays(GL.contexts[e].GLctx)}_emscripten_webgl_enable_ANGLE_instanced_arrays.sig="ip";function _emscripten_webgl_enable_OES_vertex_array_object(e){return e>>>=0,webgl_enable_OES_vertex_array_object(GL.contexts[e].GLctx)}_emscripten_webgl_enable_OES_vertex_array_object.sig="ip";function _emscripten_webgl_enable_WEBGL_draw_buffers(e){return e>>>=0,webgl_enable_WEBGL_draw_buffers(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_draw_buffers.sig="ip";function _emscripten_webgl_enable_WEBGL_multi_draw(e){return e>>>=0,webgl_enable_WEBGL_multi_draw(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_multi_draw.sig="ip";function _glVertexPointer(e,r,t,n){throw n>>>=0,"Legacy GL function (glVertexPointer) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."}_glVertexPointer.sig="viiip";var _glMatrixMode=()=>{throw"Legacy GL function (glMatrixMode) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glMatrixMode.sig="vi";var _glBegin=()=>{throw"Legacy GL function (glBegin) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glBegin.sig="vi";var _glLoadIdentity=()=>{throw"Legacy GL function (glLoadIdentity) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glLoadIdentity.sig="v";var _glVertexAttribDivisorNV=_glVertexAttribDivisor,_glDrawArraysInstancedNV=_glDrawArraysInstanced,_glDrawElementsInstancedNV=_glDrawElementsInstanced,_glVertexAttribDivisorEXT=_glVertexAttribDivisor,_glDrawArraysInstancedEXT=_glDrawArraysInstanced,_glDrawElementsInstancedEXT=_glDrawElementsInstanced,_glVertexAttribDivisorARB=_glVertexAttribDivisor,_glDrawArraysInstancedARB=_glDrawArraysInstanced,_glDrawElementsInstancedARB=_glDrawElementsInstanced,_glDrawBuffersEXT=_glDrawBuffers;function _glMultiDrawArraysWEBGL(e,r,t,n){r>>>=0,t>>>=0,GLctx.multiDrawWebgl.multiDrawArraysWEBGL(e,HEAP32,r>>>2,HEAP32,t>>>2,n)}_glMultiDrawArraysWEBGL.sig="vippi";var _glMultiDrawArrays=_glMultiDrawArraysWEBGL;_glMultiDrawArrays.sig="vippi";var _glMultiDrawArraysANGLE=_glMultiDrawArraysWEBGL;function _glMultiDrawArraysInstancedWEBGL(e,r,t,n,a){r>>>=0,t>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawArraysInstancedWEBGL(e,HEAP32,r>>>2,HEAP32,t>>>2,HEAP32,n>>>2,a)}_glMultiDrawArraysInstancedWEBGL.sig="vipppi";var _glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedWEBGL;function _glMultiDrawElementsWEBGL(e,r,t,n,a){r>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawElementsWEBGL(e,HEAP32,r>>>2,t,HEAP32,n>>>2,a)}_glMultiDrawElementsWEBGL.sig="vipipi";var _glMultiDrawElements=_glMultiDrawElementsWEBGL;_glMultiDrawElements.sig="vipipi";var _glMultiDrawElementsANGLE=_glMultiDrawElementsWEBGL;function _glMultiDrawElementsInstancedWEBGL(e,r,t,n,a,o){r>>>=0,n>>>=0,a>>>=0,GLctx.multiDrawWebgl.multiDrawElementsInstancedWEBGL(e,HEAP32,r>>>2,t,HEAP32,n>>>2,HEAP32,a>>>2,o)}_glMultiDrawElementsInstancedWEBGL.sig="vipippi";var _glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedWEBGL,_glClearDepth=e=>GLctx.clearDepth(e);_glClearDepth.sig="vd";var _glDepthRange=(e,r)=>GLctx.depthRange(e,r);_glDepthRange.sig="vdd";var _emscripten_glGenVertexArrays=_glGenVertexArrays;_emscripten_glGenVertexArrays.sig="vip";var _emscripten_glDeleteVertexArrays=_glDeleteVertexArrays;_emscripten_glDeleteVertexArrays.sig="vip";var _emscripten_glBindVertexArray=_glBindVertexArray;_emscripten_glBindVertexArray.sig="vi";var _emscripten_glIsVertexArray=_glIsVertexArray;_emscripten_glIsVertexArray.sig="ii";var _emscripten_glVertexPointer=_glVertexPointer;_emscripten_glVertexPointer.sig="viiip";var _emscripten_glMatrixMode=_glMatrixMode;_emscripten_glMatrixMode.sig="vi";var _emscripten_glBegin=_glBegin;_emscripten_glBegin.sig="vi";var _emscripten_glLoadIdentity=_glLoadIdentity;_emscripten_glLoadIdentity.sig="v";var _emscripten_glVertexAttribDivisor=_glVertexAttribDivisor;_emscripten_glVertexAttribDivisor.sig="vii";var _emscripten_glDrawArraysInstanced=_glDrawArraysInstanced;_emscripten_glDrawArraysInstanced.sig="viiii";var _emscripten_glDrawElementsInstanced=_glDrawElementsInstanced;_emscripten_glDrawElementsInstanced.sig="viiipi";var _emscripten_glVertexAttribDivisorNV=_glVertexAttribDivisorNV,_emscripten_glDrawArraysInstancedNV=_glDrawArraysInstancedNV,_emscripten_glDrawElementsInstancedNV=_glDrawElementsInstancedNV,_emscripten_glVertexAttribDivisorEXT=_glVertexAttribDivisorEXT,_emscripten_glDrawArraysInstancedEXT=_glDrawArraysInstancedEXT,_emscripten_glDrawElementsInstancedEXT=_glDrawElementsInstancedEXT,_emscripten_glVertexAttribDivisorARB=_glVertexAttribDivisorARB,_emscripten_glDrawArraysInstancedARB=_glDrawArraysInstancedARB,_emscripten_glDrawElementsInstancedARB=_glDrawElementsInstancedARB,_emscripten_glDrawBuffers=_glDrawBuffers;_emscripten_glDrawBuffers.sig="vip";var _emscripten_glDrawBuffersEXT=_glDrawBuffersEXT,_emscripten_glMultiDrawArrays=_glMultiDrawArrays;_emscripten_glMultiDrawArrays.sig="vippi";var _emscripten_glMultiDrawArraysANGLE=_glMultiDrawArraysANGLE,_emscripten_glMultiDrawArraysWEBGL=_glMultiDrawArraysWEBGL,_emscripten_glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedANGLE,_emscripten_glMultiDrawArraysInstancedWEBGL=_glMultiDrawArraysInstancedWEBGL,_emscripten_glMultiDrawElements=_glMultiDrawElements;_emscripten_glMultiDrawElements.sig="vipipi";var _emscripten_glMultiDrawElementsANGLE=_glMultiDrawElementsANGLE,_emscripten_glMultiDrawElementsWEBGL=_glMultiDrawElementsWEBGL,_emscripten_glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedANGLE,_emscripten_glMultiDrawElementsInstancedWEBGL=_glMultiDrawElementsInstancedWEBGL,_emscripten_glClearDepth=_glClearDepth;_emscripten_glClearDepth.sig="vd";var _emscripten_glDepthRange=_glDepthRange;_emscripten_glDepthRange.sig="vdd";var writeGLArray=(e,r,t,n)=>{var a=e.length,o=t>>2;for(var l=0;l>>0]=e[l];return a},webglPowerPreferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(e,r){e>>>=0,r>>>=0;var t=r>>>2,n=HEAP32[t+6>>>0],a={alpha:!!HEAP32[t+0>>>0],depth:!!HEAP32[t+1>>>0],stencil:!!HEAP32[t+2>>>0],antialias:!!HEAP32[t+3>>>0],premultipliedAlpha:!!HEAP32[t+4>>>0],preserveDrawingBuffer:!!HEAP32[t+5>>>0],powerPreference:webglPowerPreferences[n],failIfMajorPerformanceCaveat:!!HEAP32[t+7>>>0],majorVersion:HEAP32[t+8>>>0],minorVersion:HEAP32[t+9>>>0],enableExtensionsByDefault:HEAP32[t+10>>>0],explicitSwapControl:HEAP32[t+11>>>0],proxyContextToMainThread:HEAP32[t+12>>>0],renderViaOffscreenBackBuffer:HEAP32[t+13>>>0]},o=findCanvasEventTarget(e);if(!o||a.explicitSwapControl)return 0;var _=GL.createContext(o,a);return _}_emscripten_webgl_do_create_context.sig="ppp";var _emscripten_webgl_create_context=_emscripten_webgl_do_create_context;_emscripten_webgl_create_context.sig="ppp";function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}_emscripten_webgl_do_get_current_context.sig="p";var _emscripten_webgl_get_current_context=_emscripten_webgl_do_get_current_context;_emscripten_webgl_get_current_context.sig="p";var _emscripten_webgl_do_commit_frame=()=>!GL.currentContext||!GL.currentContext.GLctx||!GL.currentContext.attributes.explicitSwapControl?-3:0;_emscripten_webgl_do_commit_frame.sig="i";var _emscripten_webgl_commit_frame=_emscripten_webgl_do_commit_frame;_emscripten_webgl_commit_frame.sig="i";function _emscripten_webgl_make_context_current(e){e>>>=0;var r=GL.makeContextCurrent(e);return r?0:-5}_emscripten_webgl_make_context_current.sig="ip";function _emscripten_webgl_get_drawing_buffer_size(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=GL.getContext(e);return!n||!n.GLctx||!r||!t?-5:(HEAP32[r>>>2>>>0]=n.GLctx.drawingBufferWidth,HEAP32[t>>>2>>>0]=n.GLctx.drawingBufferHeight,0)}_emscripten_webgl_get_drawing_buffer_size.sig="ippp";function _emscripten_webgl_get_context_attributes(e,r){if(e>>>=0,r>>>=0,!r)return-5;if(e=GL.contexts[e],!e)return-3;var t=e.GLctx;if(!t)return-3;t=t.getContextAttributes(),HEAP32[r>>>2>>>0]=t.alpha,HEAP32[r+4>>>2>>>0]=t.depth,HEAP32[r+8>>>2>>>0]=t.stencil,HEAP32[r+12>>>2>>>0]=t.antialias,HEAP32[r+16>>>2>>>0]=t.premultipliedAlpha,HEAP32[r+20>>>2>>>0]=t.preserveDrawingBuffer;var n=t.powerPreference&&webglPowerPreferences.indexOf(t.powerPreference);return HEAP32[r+24>>>2>>>0]=n,HEAP32[r+28>>>2>>>0]=t.failIfMajorPerformanceCaveat,HEAP32[r+32>>>2>>>0]=e.version,HEAP32[r+36>>>2>>>0]=0,HEAP32[r+40>>>2>>>0]=e.attributes.enableExtensionsByDefault,0}_emscripten_webgl_get_context_attributes.sig="ipp";function _emscripten_webgl_destroy_context(e){e>>>=0,GL.currentContext==e&&(GL.currentContext=0),GL.deleteContext(e)}_emscripten_webgl_destroy_context.sig="ip";function _emscripten_webgl_enable_extension(e,r){e>>>=0,r>>>=0;var t=GL.getContext(e),n=UTF8ToString(r);n.startsWith("GL_")&&(n=n.substr(3)),n=="ANGLE_instanced_arrays"&&webgl_enable_ANGLE_instanced_arrays(GLctx),n=="OES_vertex_array_object"&&webgl_enable_OES_vertex_array_object(GLctx),n=="WEBGL_draw_buffers"&&webgl_enable_WEBGL_draw_buffers(GLctx),n=="WEBGL_multi_draw"&&webgl_enable_WEBGL_multi_draw(GLctx);var a=t.GLctx.getExtension(n);return!!a}_emscripten_webgl_enable_extension.sig="ipp";var _emscripten_supports_offscreencanvas=()=>0;_emscripten_supports_offscreencanvas.sig="i";var registerWebGlEventCallback=(e,r,t,n,a,o,_)=>{var l=(u=event)=>{getWasmTableEntry(n)(a,0,r)&&u.preventDefault()},c={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:t};JSEvents.registerOrRemoveHandler(c)};function _emscripten_set_webglcontextlost_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerWebGlEventCallback(e,r,t,n,31,"webglcontextlost",a),0}_emscripten_set_webglcontextlost_callback_on_thread.sig="ippipp";function _emscripten_set_webglcontextrestored_callback_on_thread(e,r,t,n,a){return e>>>=0,r>>>=0,n>>>=0,a>>>=0,registerWebGlEventCallback(e,r,t,n,32,"webglcontextrestored",a),0}_emscripten_set_webglcontextrestored_callback_on_thread.sig="ippipp";function _emscripten_is_webgl_context_lost(e){return e>>>=0,!GL.contexts[e]||GL.contexts[e].GLctx.isContextLost()}_emscripten_is_webgl_context_lost.sig="ip";function _emscripten_webgl_get_supported_extensions(){return stringToNewUTF8(GLctx.getSupportedExtensions().join(" "))}_emscripten_webgl_get_supported_extensions.sig="p";var _emscripten_webgl_get_program_parameter_d=(e,r)=>GLctx.getProgramParameter(GL.programs[e],r);_emscripten_webgl_get_program_parameter_d.sig="dii";function _emscripten_webgl_get_program_info_log_utf8(e){return stringToNewUTF8(GLctx.getProgramInfoLog(GL.programs[e]))}_emscripten_webgl_get_program_info_log_utf8.sig="pi";var _emscripten_webgl_get_shader_parameter_d=(e,r)=>GLctx.getShaderParameter(GL.shaders[e],r);_emscripten_webgl_get_shader_parameter_d.sig="dii";function _emscripten_webgl_get_shader_info_log_utf8(e){return stringToNewUTF8(GLctx.getShaderInfoLog(GL.shaders[e]))}_emscripten_webgl_get_shader_info_log_utf8.sig="pi";function _emscripten_webgl_get_shader_source_utf8(e){return stringToNewUTF8(GLctx.getShaderSource(GL.shaders[e]))}_emscripten_webgl_get_shader_source_utf8.sig="pi";var _emscripten_webgl_get_vertex_attrib_d=(e,r)=>GLctx.getVertexAttrib(e,r);_emscripten_webgl_get_vertex_attrib_d.sig="dii";var _emscripten_webgl_get_vertex_attrib_o=(e,r)=>{var t=GLctx.getVertexAttrib(e,r);return t==null?void 0:t.name};_emscripten_webgl_get_vertex_attrib_o.sig="iii";function _emscripten_webgl_get_vertex_attrib_v(e,r,t,n,a){return t>>>=0,writeGLArray(GLctx.getVertexAttrib(e,r),t,n,a)}_emscripten_webgl_get_vertex_attrib_v.sig="iiipii";var _emscripten_webgl_get_uniform_d=(e,r)=>GLctx.getUniform(GL.programs[e],webglGetUniformLocation(r));_emscripten_webgl_get_uniform_d.sig="dii";function _emscripten_webgl_get_uniform_v(e,r,t,n,a){return t>>>=0,writeGLArray(GLctx.getUniform(GL.programs[e],webglGetUniformLocation(r)),t,n,a)}_emscripten_webgl_get_uniform_v.sig="iiipii";function _emscripten_webgl_get_parameter_v(e,r,t,n){return r>>>=0,writeGLArray(GLctx.getParameter(e),r,t,n)}_emscripten_webgl_get_parameter_v.sig="iipii";var _emscripten_webgl_get_parameter_d=e=>GLctx.getParameter(e);_emscripten_webgl_get_parameter_d.sig="di";var _emscripten_webgl_get_parameter_o=e=>{var r=GLctx.getParameter(e);return r==null?void 0:r.name};_emscripten_webgl_get_parameter_o.sig="ii";function _emscripten_webgl_get_parameter_utf8(e){return stringToNewUTF8(GLctx.getParameter(e))}_emscripten_webgl_get_parameter_utf8.sig="pi";function _emscripten_webgl_get_parameter_i64v(e,r){return r>>>=0,writeI53ToI64(r,GLctx.getParameter(e))}_emscripten_webgl_get_parameter_i64v.sig="vip";var _glutPostRedisplay=()=>{GLUT.displayFunc&&!GLUT.requestedAnimationFrame&&(GLUT.requestedAnimationFrame=!0,Browser.requestAnimationFrame(function(){GLUT.requestedAnimationFrame=!1,Browser.mainLoop.runIter(function(){getWasmTableEntry(GLUT.displayFunc)()})}))};_glutPostRedisplay.sig="v";var GLUT={initTime:null,idleFunc:null,displayFunc:null,keyboardFunc:null,keyboardUpFunc:null,specialFunc:null,specialUpFunc:null,reshapeFunc:null,motionFunc:null,passiveMotionFunc:null,mouseFunc:null,buttons:0,modifiers:0,initWindowWidth:256,initWindowHeight:256,initDisplayMode:18,windowX:0,windowY:0,windowWidth:0,windowHeight:0,requestedAnimationFrame:!1,saveModifiers:e=>{GLUT.modifiers=0,e.shiftKey&&(GLUT.modifiers+=1),e.ctrlKey&&(GLUT.modifiers+=2),e.altKey&&(GLUT.modifiers+=4)},onMousemove:e=>{var r=Browser.mouseX,t=Browser.mouseY;Browser.calculateMouseEvent(e);var n=Browser.mouseX,a=Browser.mouseY;n==r&&a==t||(GLUT.buttons==0&&e.target==Module.canvas&&GLUT.passiveMotionFunc?(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.passiveMotionFunc)(r,t)):GLUT.buttons!=0&&GLUT.motionFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.motionFunc)(r,t)))},getSpecialKey:e=>{var r=null;switch(e){case 8:r=120;break;case 46:r=111;break;case 112:r=1;break;case 113:r=2;break;case 114:r=3;break;case 115:r=4;break;case 116:r=5;break;case 117:r=6;break;case 118:r=7;break;case 119:r=8;break;case 120:r=9;break;case 121:r=10;break;case 122:r=11;break;case 123:r=12;break;case 37:r=100;break;case 38:r=101;break;case 39:r=102;break;case 40:r=103;break;case 33:r=104;break;case 34:r=105;break;case 36:r=106;break;case 35:r=107;break;case 45:r=108;break;case 16:case 5:r=112;break;case 6:r=113;break;case 17:case 3:r=114;break;case 4:r=115;break;case 18:case 2:r=116;break;case 1:r=117;break}return r},getASCIIKey:e=>{if(e.ctrlKey||e.altKey||e.metaKey)return null;var r=e.keyCode;if(48<=r&&r<=57)return r;if(65<=r&&r<=90)return e.shiftKey?r:r+32;if(96<=r&&r<=105)return r-48;if(106<=r&&r<=111)return r-106+42;switch(r){case 9:case 13:case 27:case 32:case 61:return r}var t=e.shiftKey;switch(r){case 186:return t?58:59;case 187:return t?43:61;case 188:return t?60:44;case 189:return t?95:45;case 190:return t?62:46;case 191:return t?63:47;case 219:return t?123:91;case 220:return t?124:47;case 221:return t?125:93;case 222:return t?34:39}return null},onKeydown:e=>{if(GLUT.specialFunc||GLUT.keyboardFunc){var r=GLUT.getSpecialKey(e.keyCode);r!==null?GLUT.specialFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialFunc)(r,Browser.mouseX,Browser.mouseY)):(r=GLUT.getASCIIKey(e),r!==null&&GLUT.keyboardFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardFunc)(r,Browser.mouseX,Browser.mouseY)))}},onKeyup:e=>{if(GLUT.specialUpFunc||GLUT.keyboardUpFunc){var r=GLUT.getSpecialKey(e.keyCode);r!==null?GLUT.specialUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialUpFunc)(r,Browser.mouseX,Browser.mouseY)):(r=GLUT.getASCIIKey(e),r!==null&&GLUT.keyboardUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardUpFunc)(r,Browser.mouseX,Browser.mouseY)))}},touchHandler:e=>{if(e.target==Module.canvas){var r=e.changedTouches,t=r[0],n="";switch(e.type){case"touchstart":n="mousedown";break;case"touchmove":n="mousemove";break;case"touchend":n="mouseup";break;default:return}var a=document.createEvent("MouseEvent");a.initMouseEvent(n,!0,!0,window,1,t.screenX,t.screenY,t.clientX,t.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(a),e.preventDefault()}},onMouseButtonDown:e=>{if(Browser.calculateMouseEvent(e),GLUT.buttons|=1<{Browser.calculateMouseEvent(e),GLUT.buttons&=~(1<{Browser.calculateMouseEvent(e);var r=window.event||e,t=-Browser.getMouseWheelDelta(e);t=t==0?0:t>0?Math.max(t,1):Math.min(t,-1);var n=3;t<0&&(n=4),GLUT.mouseFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.mouseFunc)(n,0,Browser.mouseX,Browser.mouseY))},onFullscreenEventChange:e=>{var r,t;document.fullscreen||document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen?(r=screen.width,t=screen.height):(r=GLUT.windowWidth,t=GLUT.windowHeight,document.removeEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0)),Browser.setCanvasSize(r,t,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(r,t),_glutPostRedisplay()}},_glutGetModifiers=()=>GLUT.modifiers;_glutGetModifiers.sig="i";function _glutInit(e,r){e>>>=0,r>>>=0,GLUT.initTime=Date.now();var t="ontouchstart"in document.documentElement;t&&(window.addEventListener("touchmove",GLUT.touchHandler,!0),window.addEventListener("touchstart",GLUT.touchHandler,!0),window.addEventListener("touchend",GLUT.touchHandler,!0)),window.addEventListener("keydown",GLUT.onKeydown,!0),window.addEventListener("keyup",GLUT.onKeyup,!0),window.addEventListener("mousemove",GLUT.onMousemove,!0),window.addEventListener("mousedown",GLUT.onMouseButtonDown,!0),window.addEventListener("mouseup",GLUT.onMouseButtonUp,!0),window.addEventListener("mousewheel",GLUT.onMouseWheel,!0),window.addEventListener("DOMMouseScroll",GLUT.onMouseWheel,!0),Browser.resizeListeners.push(function(n,a){GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(n,a)}),__ATEXIT__.push(function(){t&&(window.removeEventListener("touchmove",GLUT.touchHandler,!0),window.removeEventListener("touchstart",GLUT.touchHandler,!0),window.removeEventListener("touchend",GLUT.touchHandler,!0)),window.removeEventListener("keydown",GLUT.onKeydown,!0),window.removeEventListener("keyup",GLUT.onKeyup,!0),window.removeEventListener("mousemove",GLUT.onMousemove,!0),window.removeEventListener("mousedown",GLUT.onMouseButtonDown,!0),window.removeEventListener("mouseup",GLUT.onMouseButtonUp,!0),window.removeEventListener("mousewheel",GLUT.onMouseWheel,!0),window.removeEventListener("DOMMouseScroll",GLUT.onMouseWheel,!0),Module.canvas.width=Module.canvas.height=1})}_glutInit.sig="vpp";var _glutInitWindowSize=(e,r)=>{Browser.setCanvasSize(GLUT.initWindowWidth=e,GLUT.initWindowHeight=r)};_glutInitWindowSize.sig="vii";var _glutInitWindowPosition=(e,r)=>{};_glutInitWindowPosition.sig="vii";var _glutGet=e=>{switch(e){case 100:return 0;case 101:return 0;case 102:return Module.canvas.width;case 103:return Module.canvas.height;case 200:return Module.canvas.width;case 201:return Module.canvas.height;case 500:return 0;case 501:return 0;case 502:return GLUT.initWindowWidth;case 503:return GLUT.initWindowHeight;case 700:var r=Date.now();return r-GLUT.initTime;case 105:return Module.ctx.getContextAttributes().stencil?8:0;case 106:return Module.ctx.getContextAttributes().depth?8:0;case 110:return Module.ctx.getContextAttributes().alpha?8:0;case 120:return Module.ctx.getContextAttributes().antialias?1:0;default:throw"glutGet("+e+") not implemented yet"}};_glutGet.sig="ii";function _glutIdleFunc(e){e>>>=0;function r(){GLUT.idleFunc&&(getWasmTableEntry(GLUT.idleFunc)(),safeSetTimeout(r,4))}GLUT.idleFunc||safeSetTimeout(r,0),GLUT.idleFunc=e}_glutIdleFunc.sig="vp";var _glutTimerFunc=function(e,r,t){return r>>>=0,safeSetTimeout(()=>getWasmTableEntry(r)(t),e)};_glutTimerFunc.sig="vipi";function _glutDisplayFunc(e){e>>>=0,GLUT.displayFunc=e}_glutDisplayFunc.sig="vp";function _glutKeyboardFunc(e){e>>>=0,GLUT.keyboardFunc=e}_glutKeyboardFunc.sig="vp";function _glutKeyboardUpFunc(e){e>>>=0,GLUT.keyboardUpFunc=e}_glutKeyboardUpFunc.sig="vp";function _glutSpecialFunc(e){e>>>=0,GLUT.specialFunc=e}_glutSpecialFunc.sig="vp";function _glutSpecialUpFunc(e){e>>>=0,GLUT.specialUpFunc=e}_glutSpecialUpFunc.sig="vp";function _glutReshapeFunc(e){e>>>=0,GLUT.reshapeFunc=e}_glutReshapeFunc.sig="vp";function _glutMotionFunc(e){e>>>=0,GLUT.motionFunc=e}_glutMotionFunc.sig="vp";function _glutPassiveMotionFunc(e){e>>>=0,GLUT.passiveMotionFunc=e}_glutPassiveMotionFunc.sig="vp";function _glutMouseFunc(e){e>>>=0,GLUT.mouseFunc=e}_glutMouseFunc.sig="vp";var _glutSetCursor=e=>{var r="auto";switch(e){case 0:break;case 1:break;case 2:r="pointer";break;case 3:break;case 4:r="help";break;case 5:break;case 6:break;case 7:r="wait";break;case 8:r="text";break;case 9:case 102:r="crosshair";break;case 10:r="ns-resize";break;case 11:r="ew-resize";break;case 12:r="n-resize";break;case 13:r="s-resize";break;case 14:r="w-resize";break;case 15:r="e-resize";break;case 16:r="nw-resize";break;case 17:r="ne-resize";break;case 18:r="se-resize";break;case 19:r="sw-resize";break;case 100:break;case 101:r="none";break;default:throw"glutSetCursor: Unknown cursor type: "+e}Module.canvas.style.cursor=r};_glutSetCursor.sig="vi";function _glutCreateWindow(e){e>>>=0;var r={antialias:(GLUT.initDisplayMode&128)!=0,depth:(GLUT.initDisplayMode&16)!=0,stencil:(GLUT.initDisplayMode&32)!=0,alpha:(GLUT.initDisplayMode&8)!=0};return Module.ctx=Browser.createContext(Module.canvas,!0,!0,r),Module.ctx?1:0}_glutCreateWindow.sig="ip";var _glutDestroyWindow=e=>(Module.ctx=Browser.destroyContext(Module.canvas,!0,!0),1);_glutDestroyWindow.sig="vi";var _glutReshapeWindow=(e,r)=>{Browser.exitFullscreen(),Browser.setCanvasSize(e,r,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(e,r),_glutPostRedisplay()};_glutReshapeWindow.sig="vii";var _glutPositionWindow=(e,r)=>{Browser.exitFullscreen(),_glutPostRedisplay()};_glutPositionWindow.sig="vii";var _glutFullScreen=()=>{GLUT.windowX=0,GLUT.windowY=0,GLUT.windowWidth=Module.canvas.width,GLUT.windowHeight=Module.canvas.height,document.addEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0),Browser.requestFullscreen(!1,!1)};_glutFullScreen.sig="v";var _glutInitDisplayMode=e=>GLUT.initDisplayMode=e;_glutInitDisplayMode.sig="vi";var _glutSwapBuffers=()=>{};_glutSwapBuffers.sig="v";var _glutMainLoop=()=>{throw _glutReshapeWindow(Module.canvas.width,Module.canvas.height),_glutPostRedisplay(),"unwind"};_glutMainLoop.sig="v";function _XOpenDisplay(e){return e>>>=0,1}_XOpenDisplay.sig="pp";function _XCreateWindow(e,r,t,n,a,o,_,l,c,u,d,p){return e>>>=0,r>>>=0,u>>>=0,d>>>=0,p>>>=0,Browser.setCanvasSize(a,o),2}_XCreateWindow.sig="pppiiiiiiippp";function _XChangeWindowAttributes(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0}_XChangeWindowAttributes.sig="ipppp";function _XSetWMHints(e,r,t){e>>>=0,r>>>=0,t>>>=0}_XSetWMHints.sig="ippp";function _XMapWindow(e,r){e>>>=0,r>>>=0}_XMapWindow.sig="ipp";function _XStoreName(e,r,t){e>>>=0,r>>>=0,t>>>=0}_XStoreName.sig="ippp";function _XInternAtom(e,r,t){return e>>>=0,r>>>=0,0}_XInternAtom.sig="pppi";function _XSendEvent(e,r,t,n,a){e>>>=0,r>>>=0,n>>>=0,a>>>=0}_XSendEvent.sig="ippipp";function _XPending(e){return e>>>=0,0}_XPending.sig="ip";var EGL={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode(e){EGL.errorCode=e},chooseConfig(e,r,t,n,a){if(e!=62e3)return EGL.setErrorCode(12296),0;if(r)for(;;){var o=HEAP32[r>>>2>>>0];if(o==12321){var _=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.alpha=_>0}else if(o==12325){var l=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.depth=l>0}else if(o==12326){var c=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.stencil=c>0}else if(o==12337){var u=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.antialias=u>0}else if(o==12338){var u=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.antialias=u==1}else if(o==12544){var d=HEAP32[r+4>>>2>>>0];EGL.contextAttributes.lowLatency=d!=12547}else if(o==12344)break;r+=8}return(!t||!n)&&!a?(EGL.setErrorCode(12300),0):(a&&(HEAP32[a>>>2>>>0]=1),t&&n>0&&(HEAPU32[t>>>2>>>0]=62002),EGL.setErrorCode(12288),1)}};function _eglGetDisplay(e){return e>>>=0,EGL.setErrorCode(12288),e!=0&&e!=1?0:62e3}_eglGetDisplay.sig="pp";function _eglInitialize(e,r,t){return e>>>=0,r>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(r&&(HEAP32[r>>>2>>>0]=1),t&&(HEAP32[t>>>2>>>0]=4),EGL.defaultDisplayInitialized=!0,EGL.setErrorCode(12288),1)}_eglInitialize.sig="ippp";function _eglTerminate(e){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.defaultDisplayInitialized=!1,EGL.setErrorCode(12288),1)}_eglTerminate.sig="ip";function _eglGetConfigs(e,r,t,n){return e>>>=0,r>>>=0,n>>>=0,EGL.chooseConfig(e,0,r,t,n)}_eglGetConfigs.sig="ippip";function _eglChooseConfig(e,r,t,n,a){return e>>>=0,r>>>=0,t>>>=0,a>>>=0,EGL.chooseConfig(e,r,t,n,a)}_eglChooseConfig.sig="ipppip";function _eglGetConfigAttrib(e,r,t,n){if(e>>>=0,r>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(r!=62002)return EGL.setErrorCode(12293),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),t){case 12320:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?32:24,1;case 12321:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?8:0,1;case 12322:return HEAP32[n>>>2>>>0]=8,1;case 12323:return HEAP32[n>>>2>>>0]=8,1;case 12324:return HEAP32[n>>>2>>>0]=8,1;case 12325:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.depth?24:0,1;case 12326:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.stencil?8:0,1;case 12327:return HEAP32[n>>>2>>>0]=12344,1;case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12329:return HEAP32[n>>>2>>>0]=0,1;case 12330:return HEAP32[n>>>2>>>0]=4096,1;case 12331:return HEAP32[n>>>2>>>0]=16777216,1;case 12332:return HEAP32[n>>>2>>>0]=4096,1;case 12333:return HEAP32[n>>>2>>>0]=0,1;case 12334:return HEAP32[n>>>2>>>0]=0,1;case 12335:return HEAP32[n>>>2>>>0]=12344,1;case 12337:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?4:0,1;case 12338:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?1:0,1;case 12339:return HEAP32[n>>>2>>>0]=4,1;case 12340:return HEAP32[n>>>2>>>0]=12344,1;case 12341:case 12342:case 12343:return HEAP32[n>>>2>>>0]=-1,1;case 12345:case 12346:return HEAP32[n>>>2>>>0]=0,1;case 12347:return HEAP32[n>>>2>>>0]=0,1;case 12348:return HEAP32[n>>>2>>>0]=1,1;case 12349:case 12350:return HEAP32[n>>>2>>>0]=0,1;case 12351:return HEAP32[n>>>2>>>0]=12430,1;case 12352:return HEAP32[n>>>2>>>0]=4,1;case 12354:return HEAP32[n>>>2>>>0]=0,1;default:return EGL.setErrorCode(12292),0}}_eglGetConfigAttrib.sig="ippip";function _eglCreateWindowSurface(e,r,t,n){return e>>>=0,r>>>=0,n>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):r!=62002?(EGL.setErrorCode(12293),0):(EGL.setErrorCode(12288),62006)}_eglCreateWindowSurface.sig="pppip";function _eglDestroySurface(e,r){return e>>>=0,r>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):r!=62006?(EGL.setErrorCode(12301),1):(EGL.currentReadSurface==r&&(EGL.currentReadSurface=0),EGL.currentDrawSurface==r&&(EGL.currentDrawSurface=0),EGL.setErrorCode(12288),1)}_eglDestroySurface.sig="ipp";function _eglCreateContext(e,r,t,n){if(e>>>=0,r>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;for(var a=1;;){var o=HEAP32[n>>>2>>>0];if(o==12440)a=HEAP32[n+4>>>2>>>0];else{if(o==12344)break;return EGL.setErrorCode(12292),0}n+=8}return a!=2?(EGL.setErrorCode(12293),0):(EGL.contextAttributes.majorVersion=a-1,EGL.contextAttributes.minorVersion=0,EGL.context=GL.createContext(Module.canvas,EGL.contextAttributes),EGL.context!=0?(EGL.setErrorCode(12288),GL.makeContextCurrent(EGL.context),Module.useWebGL=!0,Browser.moduleContextCreatedCallbacks.forEach(function(_){_()}),GL.makeContextCurrent(null),62004):(EGL.setErrorCode(12297),0))}_eglCreateContext.sig="ppppp";function _eglDestroyContext(e,r){return e>>>=0,r>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):r!=62004?(EGL.setErrorCode(12294),0):(GL.deleteContext(EGL.context),EGL.setErrorCode(12288),EGL.currentContext==r&&(EGL.currentContext=0),1)}_eglDestroyContext.sig="ipp";function _eglQuerySurface(e,r,t,n){if(e>>>=0,r>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(r!=62006)return EGL.setErrorCode(12301),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),t){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12376:return 1;case 12375:return HEAP32[n>>>2>>>0]=Module.canvas.width,1;case 12374:return HEAP32[n>>>2>>>0]=Module.canvas.height,1;case 12432:return HEAP32[n>>>2>>>0]=-1,1;case 12433:return HEAP32[n>>>2>>>0]=-1,1;case 12434:return HEAP32[n>>>2>>>0]=-1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;case 12441:return HEAP32[n>>>2>>>0]=12442,1;case 12435:return HEAP32[n>>>2>>>0]=12437,1;case 12416:case 12417:case 12418:case 12419:return 1;default:return EGL.setErrorCode(12292),0}}_eglQuerySurface.sig="ippip";function _eglQueryContext(e,r,t,n){if(e>>>=0,r>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(r!=62004)return EGL.setErrorCode(12294),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),t){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12439:return HEAP32[n>>>2>>>0]=12448,1;case 12440:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.majorVersion+1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;default:return EGL.setErrorCode(12292),0}}_eglQueryContext.sig="ippip";var _eglGetError=()=>EGL.errorCode;_eglGetError.sig="i";function _eglQueryString(e,r){if(e>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(EGL.setErrorCode(12288),EGL.stringCache[r])return EGL.stringCache[r];var t;switch(r){case 12371:t=stringToNewUTF8("Emscripten");break;case 12372:t=stringToNewUTF8("1.4 Emscripten EGL");break;case 12373:t=stringToNewUTF8("");break;case 12429:t=stringToNewUTF8("OpenGL_ES");break;default:return EGL.setErrorCode(12300),0}return EGL.stringCache[r]=t,t}_eglQueryString.sig="ppi";var _eglBindAPI=e=>e==12448?(EGL.setErrorCode(12288),1):(EGL.setErrorCode(12300),0);_eglBindAPI.sig="ii";var _eglQueryAPI=()=>(EGL.setErrorCode(12288),12448);_eglQueryAPI.sig="i";var _eglWaitClient=()=>(EGL.setErrorCode(12288),1);_eglWaitClient.sig="i";var _eglWaitNative=e=>(EGL.setErrorCode(12288),1);_eglWaitNative.sig="ii";var _eglWaitGL=_eglWaitClient;_eglWaitGL.sig="i";function _eglSwapInterval(e,r){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(r==0?_emscripten_set_main_loop_timing(0,0):_emscripten_set_main_loop_timing(1,r),EGL.setErrorCode(12288),1)}_eglSwapInterval.sig="ipi";function _eglMakeCurrent(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):n!=0&&n!=62004?(EGL.setErrorCode(12294),0):t!=0&&t!=62006||r!=0&&r!=62006?(EGL.setErrorCode(12301),0):(GL.makeContextCurrent(n?EGL.context:null),EGL.currentContext=n,EGL.currentDrawSurface=r,EGL.currentReadSurface=t,EGL.setErrorCode(12288),1)}_eglMakeCurrent.sig="ipppp";function _eglGetCurrentContext(){return EGL.currentContext}_eglGetCurrentContext.sig="p";function _eglGetCurrentSurface(e){return e==12378?EGL.currentReadSurface:e==12377?EGL.currentDrawSurface:(EGL.setErrorCode(12300),0)}_eglGetCurrentSurface.sig="pi";function _eglGetCurrentDisplay(){return EGL.currentContext?62e3:0}_eglGetCurrentDisplay.sig="p";function _eglSwapBuffers(e,r){if(e>>>=0,r>>>=0,!EGL.defaultDisplayInitialized)EGL.setErrorCode(12289);else if(!Module.ctx)EGL.setErrorCode(12290);else if(Module.ctx.isContextLost())EGL.setErrorCode(12302);else return EGL.setErrorCode(12288),1;return 0}_eglSwapBuffers.sig="ipp";var _eglReleaseThread=()=>(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.setErrorCode(12288),1);_eglReleaseThread.sig="i";function _uuid_clear(e){return e>>>=0,zeroMemory(e,16)}_uuid_clear.sig="vp";function _uuid_compare(e,r){return e>>>=0,r>>>=0,_memcmp(e,r,16)}_uuid_compare.sig="ipp";function _uuid_copy(e,r){return e>>>=0,r>>>=0,_memcpy(e,r,16)}_uuid_copy.sig="vpp";function _uuid_generate(e){e>>>=0;var r=null;if(ENVIRONMENT_IS_NODE)try{var t=Y("crypto").randomBytes;r=t(16)}catch(_){}else ENVIRONMENT_IS_WEB&&typeof window.crypto<"u"&&typeof window.crypto.getRandomValues<"u"&&(r=new Uint8Array(16),window.crypto.getRandomValues(r));if(!r){r=new Array(16);for(var n=new Date().getTime(),a=0;a<16;a++){var o=(n+Math.random()*256)%256|0;n=n/256|0,r[a]=o}}r[6]=r[6]&15|64,r[8]=r[8]&63|128,writeArrayToMemory(r,e)}_uuid_generate.sig="vp";function _uuid_is_null(e){e>>>=0;for(var r=0;r<4;r++,e=e+4|0){var t=HEAP32[e>>>2>>>0];if(t)return 0}return 1}_uuid_is_null.sig="ip";function _uuid_parse(e,r){if(e>>>=0,r>>>=0,e=UTF8ToString(e),e.length===36){var t=0,n=new Array(16);return e.toLowerCase().replace(/[0-9a-f]{2}/g,function(a){t<16&&(n[t++]=parseInt(a,16))}),t<16?-1:(writeArrayToMemory(n,r),0)}return-1}_uuid_parse.sig="ipp";function _uuid_unparse(e,r,t){e>>>=0,r>>>=0;var n=0,a="xxxx-xx-xx-xx-xxxxxx".replace(/[x]/g,function(o){var _=t?HEAPU8[e+n>>>0].toString(16).toUpperCase():HEAPU8[e+n>>>0].toString(16);return _=_.length===1?"0"+_:_,n++,_});stringToUTF8(a,r,37)}_uuid_unparse.sig="vpp";function _uuid_unparse_lower(e,r){e>>>=0,r>>>=0,_uuid_unparse(e,r)}_uuid_unparse_lower.sig="vpp";function _uuid_unparse_upper(e,r){e>>>=0,r>>>=0,_uuid_unparse(e,r,!0)}_uuid_unparse_upper.sig="vpp";function _uuid_type(e){return e>>>=0,4}_uuid_type.sig="ip";function _uuid_variant(e){return e>>>=0,1}_uuid_variant.sig="ip";var GLEW={isLinaroFork:1,extensions:null,error:{0:null,1:null,2:null,3:null,4:null,5:null,6:null,7:null,8:null},version:{1:null,2:null,3:null,4:null},errorStringConstantFromCode(e){if(GLEW.isLinaroFork)switch(e){case 4:return"OpenGL ES lib expected, found OpenGL lib";case 5:return"OpenGL lib expected, found OpenGL ES lib";case 6:return"Missing EGL version";case 7:return"EGL 1.1 and up are supported";default:break}switch(e){case 0:return"No error";case 1:return"Missing GL version";case 2:return"GL 1.1 and up are supported";case 3:return"GLX 1.2 and up are supported";default:return null}},errorString(e){if(!GLEW.error[e]){var r=GLEW.errorStringConstantFromCode(e);r||(r="Unknown error",e=8),GLEW.error[e]=stringToNewUTF8(r)}return GLEW.error[e]},versionStringConstantFromCode(e){switch(e){case 1:return"1.10.0";case 2:return"1";case 3:return"10";case 4:return"0";default:return null}},versionString(e){if(!GLEW.version[e]){var r=GLEW.versionStringConstantFromCode(e);if(!r)return 0;GLEW.version[e]=stringToNewUTF8(r)}return GLEW.version[e]},extensionIsSupported(e){return GLEW.extensions||(GLEW.extensions=webglGetExtensions()),GLEW.extensions.includes(e)?1:GLEW.extensions.includes("GL_"+e)}},_glewInit=()=>0;_glewInit.sig="i";function _glewIsSupported(e){e>>>=0;for(var r=UTF8ToString(e).split(" "),t=0;t>>=0,GLEW.extensionIsSupported(UTF8ToString(e))}_glewGetExtension.sig="ip";function _glewGetErrorString(e){return GLEW.errorString(e)}_glewGetErrorString.sig="pi";function _glewGetString(e){return GLEW.versionString(e)}_glewGetString.sig="pi";var IDBStore={indexedDB(){if(typeof indexedDB<"u")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(e,"IDBStore used, but indexedDB not supported"),e},DB_VERSION:22,DB_STORE_NAME:"FILE_DATA",dbs:{},blobs:[0],getDB(e,r){var t=IDBStore.dbs[e];if(t)return r(null,t);var n;try{n=IDBStore.indexedDB().open(e,IDBStore.DB_VERSION)}catch(a){return r(a)}n.onupgradeneeded=a=>{var o=a.target.result,_=a.target.transaction,l;o.objectStoreNames.contains(IDBStore.DB_STORE_NAME)?l=_.objectStore(IDBStore.DB_STORE_NAME):l=o.createObjectStore(IDBStore.DB_STORE_NAME)},n.onsuccess=()=>{t=n.result,IDBStore.dbs[e]=t,r(null,t)},n.onerror=function(a){r(a.target.error||"unknown error"),a.preventDefault()}},getStore(e,r,t){IDBStore.getDB(e,(n,a)=>{if(n)return t(n);var o=a.transaction([IDBStore.DB_STORE_NAME],r);o.onerror=l=>{t(l.target.error||"unknown error"),l.preventDefault()};var _=o.objectStore(IDBStore.DB_STORE_NAME);t(null,_)})},getFile(e,r,t){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return t(n);var o=a.get(r);o.onsuccess=_=>{var l=_.target.result;return l?t(null,l):t("file ".concat(r," not found"))},o.onerror=t})},setFile(e,r,t,n){IDBStore.getStore(e,"readwrite",(a,o)=>{if(a)return n(a);var _=o.put(t,r);_.onsuccess=l=>n(),_.onerror=n})},deleteFile(e,r,t){IDBStore.getStore(e,"readwrite",(n,a)=>{if(n)return t(n);var o=a.delete(r);o.onsuccess=_=>t(),o.onerror=t})},existsFile(e,r,t){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return t(n);var o=a.count(r);o.onsuccess=_=>t(null,_.target.result>0),o.onerror=t})},clearStore(e,r){IDBStore.getStore(e,"readwrite",(t,n)=>{if(t)return r(t);var a=n.clear();a.onsuccess=o=>r(),a.onerror=r})}},_emscripten_idb_async_load=function(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,IDBStore.getFile(UTF8ToString(e),UTF8ToString(r),(o,_)=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(t);return}var l=_malloc(_.length);HEAPU8.set(_,l>>>0),getWasmTableEntry(n)(t,l,_.length),_free(l)})})};_emscripten_idb_async_load.sig="vppppp";var _emscripten_idb_async_store=function(e,r,t,n,a,o,_){e>>>=0,r>>>=0,t>>>=0,a>>>=0,o>>>=0,_>>>=0,IDBStore.setFile(UTF8ToString(e),UTF8ToString(r),new Uint8Array(HEAPU8.subarray(t>>>0,t+n>>>0)),l=>{callUserCallback(()=>{if(l){_&&getWasmTableEntry(_)(a);return}o&&getWasmTableEntry(o)(a)})})};_emscripten_idb_async_store.sig="vpppippp";var _emscripten_idb_async_delete=function(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,IDBStore.deleteFile(UTF8ToString(e),UTF8ToString(r),o=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(t);return}n&&getWasmTableEntry(n)(t)})})};_emscripten_idb_async_delete.sig="vppppp";var _emscripten_idb_async_exists=function(e,r,t,n,a){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,IDBStore.existsFile(UTF8ToString(e),UTF8ToString(r),(o,_)=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(t);return}n&&getWasmTableEntry(n)(t,_)})})};_emscripten_idb_async_exists.sig="vppppp";var _emscripten_idb_async_clear=function(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0,IDBStore.clearStore(UTF8ToString(e),a=>{callUserCallback(()=>{if(a){n&&getWasmTableEntry(n)(r);return}t&&getWasmTableEntry(t)(r)})})};_emscripten_idb_async_clear.sig="vpppp";function _emscripten_idb_load(e,r,t,n,a){throw e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_load, etc."}_emscripten_idb_load.sig="vppppp";function _emscripten_idb_store(e,r,t,n,a){throw e>>>=0,r>>>=0,t>>>=0,a>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_store, etc."}_emscripten_idb_store.sig="vpppip";function _emscripten_idb_delete(e,r,t){throw e>>>=0,r>>>=0,t>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_delete, etc."}_emscripten_idb_delete.sig="vppp";function _emscripten_idb_exists(e,r,t,n){throw e>>>=0,r>>>=0,t>>>=0,n>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_exists, etc."}_emscripten_idb_exists.sig="vpppp";function _emscripten_idb_clear(e,r){throw e>>>=0,r>>>=0,"Please compile your program with async support in order to use synchronous operations like emscripten_idb_clear, etc."}_emscripten_idb_clear.sig="vpp";var runAndAbortIfError=e=>{try{return e()}catch(r){abort(r)}},_emscripten_sleep=()=>{throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"};_emscripten_sleep.sig="vi";function _emscripten_scan_registers(e){throw e>>>=0,"Please compile your program with async support in order to use asynchronous operations like emscripten_scan_registers"}_emscripten_scan_registers.sig="vp";function _emscripten_fiber_swap(e,r){throw e>>>=0,r>>>=0,"Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_swap"}_emscripten_fiber_swap.sig="vpp";var _SDL_GetTicks=()=>Date.now()-SDL.startTime|0;_SDL_GetTicks.sig="i";function _SDL_LockSurface(e){e>>>=0;var r=SDL.surfaces[e];if(r.locked++,r.locked>1||(r.buffer||(r.buffer=_malloc(r.width*r.height*4),HEAPU32[e+20>>>2>>>0]=r.buffer),HEAPU32[e+20>>>2>>>0]=r.buffer,e==SDL.screen&&Module.screenIsReadOnly&&r.image))return 0;if(SDL.defaults.discardOnLock){if(r.image||(r.image=r.ctx.createImageData(r.width,r.height)),!SDL.defaults.opaqueFrontBuffer)return}else r.image=r.ctx.getImageData(0,0,r.width,r.height);if(e==SDL.screen&&SDL.defaults.opaqueFrontBuffer)for(var t=r.image.data,n=t.length,a=0;a>>0)}return 0}_SDL_LockSurface.sig="ip";var SDL_ttfContext=()=>SDL.ttfContext,SDL_audio=()=>SDL.audio,SDL={defaults:{width:320,height:200,copyOnLock:!0,discardOnLock:!1,opaqueFrontBuffer:!0},version:null,surfaces:{},canvasPool:[],events:[],fonts:[null],audios:[null],rwops:[null],music:{audio:null,volume:1},mixerFrequency:22050,mixerFormat:32784,mixerNumChannels:2,mixerChunkSize:1024,channelMinimumNumber:0,GL:!1,glAttributes:{0:3,1:3,2:2,3:0,4:0,5:1,6:16,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:0,17:0,18:0},keyboardState:null,keyboardMap:{},canRequestFullscreen:!1,isRequestingFullscreen:!1,textInput:!1,startTime:null,initFlags:0,buttonState:0,modState:0,DOMButtons:[0,0,0],DOMEventToSDLEvent:{},TOUCH_DEFAULT_ID:0,eventHandler:null,eventHandlerContext:null,eventHandlerTemp:0,keyCodes:{16:1249,17:1248,18:1250,20:1081,33:1099,34:1102,35:1101,36:1098,37:1104,38:1106,39:1103,40:1105,44:316,45:1097,46:127,91:1251,93:1125,96:1122,97:1113,98:1114,99:1115,100:1116,101:1117,102:1118,103:1119,104:1120,105:1121,106:1109,107:1111,109:1110,110:1123,111:1108,112:1082,113:1083,114:1084,115:1085,116:1086,117:1087,118:1088,119:1089,120:1090,121:1091,122:1092,123:1093,124:1128,125:1129,126:1130,127:1131,128:1132,129:1133,130:1134,131:1135,132:1136,133:1137,134:1138,135:1139,144:1107,160:94,161:33,162:34,163:35,164:36,165:37,166:38,167:95,168:40,169:41,170:42,171:43,172:124,173:45,174:123,175:125,176:126,181:127,182:129,183:128,188:44,190:46,191:47,192:96,219:91,220:92,221:93,222:39,224:1251},scanCodes:{8:42,9:43,13:40,27:41,32:44,35:204,39:53,44:54,46:55,47:56,48:39,49:30,50:31,51:32,52:33,53:34,54:35,55:36,56:37,57:38,58:203,59:51,61:46,91:47,92:49,93:48,96:52,97:4,98:5,99:6,100:7,101:8,102:9,103:10,104:11,105:12,106:13,107:14,108:15,109:16,110:17,111:18,112:19,113:20,114:21,115:22,116:23,117:24,118:25,119:26,120:27,121:28,122:29,127:76,305:224,308:226,316:70},loadRect:e=>({x:HEAP32[e+0>>>2>>>0],y:HEAP32[e+4>>>2>>>0],w:HEAP32[e+8>>>2>>>0],h:HEAP32[e+12>>>2>>>0]}),updateRect:(e,r)=>{HEAP32[e>>>2>>>0]=r.x,HEAP32[e+4>>>2>>>0]=r.y,HEAP32[e+8>>>2>>>0]=r.w,HEAP32[e+12>>>2>>>0]=r.h},intersectionOfRects:(e,r)=>{var t=Math.max(e.x,r.x),n=Math.max(e.y,r.y),a=Math.min(e.x+e.w,r.x+r.w),o=Math.min(e.y+e.h,r.y+r.h);return{x:t,y:n,w:Math.max(t,a)-t,h:Math.max(n,o)-n}},checkPixelFormat:e=>{},loadColorToCSSRGB:e=>{var r=HEAP32[e>>>2>>>0];return"rgb("+(r&255)+","+(r>>8&255)+","+(r>>16&255)+")"},loadColorToCSSRGBA:e=>{var r=HEAP32[e>>>2>>>0];return"rgba("+(r&255)+","+(r>>8&255)+","+(r>>16&255)+","+(r>>24&255)/255+")"},translateColorToCSSRGBA:e=>"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>>24)/255+")",translateRGBAToCSSRGBA:(e,r,t,n)=>"rgba("+(e&255)+","+(r&255)+","+(t&255)+","+(n&255)/255+")",translateRGBAToColor:(e,r,t,n)=>e|r<<8|t<<16|n<<24,makeSurface:(e,r,t,n,a,o,_,l,c)=>{var u=t&1,d=t&2097152,p=t&67108864,f=_malloc(60),m=_malloc(44),g=d?1:4,v=0;!u&&!p&&(v=_malloc(e*r*4)),HEAP32[f>>>2>>>0]=t,HEAPU32[f+4>>>2>>>0]=m,HEAP32[f+8>>>2>>>0]=e,HEAP32[f+12>>>2>>>0]=r,HEAP32[f+16>>>2>>>0]=e*g,HEAPU32[f+20>>>2>>>0]=v,HEAP32[f+36>>>2>>>0]=0,HEAP32[f+40>>>2>>>0]=0,HEAP32[f+44>>>2>>>0]=Module.canvas.width,HEAP32[f+48>>>2>>>0]=Module.canvas.height,HEAP32[f+56>>>2>>>0]=1,HEAP32[m>>>2>>>0]=-2042224636,HEAP32[m+4>>>2>>>0]=0,HEAP8[m+8>>>0]=g*8,HEAP8[m+9>>>0]=g,HEAP32[m+12>>>2>>>0]=o||255,HEAP32[m+16>>>2>>>0]=_||65280,HEAP32[m+20>>>2>>>0]=l||16711680,HEAP32[m+24>>>2>>>0]=c||4278190080,SDL.GL=SDL.GL||p;var S;n?S=Module.canvas:(SDL.canvasPool.length>0?S=SDL.canvasPool.pop():S=document.createElement("canvas"),S.width=e,S.height=r);var y={antialias:SDL.glAttributes[13]!=0&&SDL.glAttributes[14]>1,depth:SDL.glAttributes[6]>0,stencil:SDL.glAttributes[7]>0,alpha:SDL.glAttributes[3]>0},h=Browser.createContext(S,p,n,y);return SDL.surfaces[f]={width:e,height:r,canvas:S,ctx:h,surf:f,buffer:v,pixelFormat:m,alpha:255,flags:t,locked:0,usePageCanvas:n,source:a,isFlagSet:b=>t&b},f},copyIndexedColorData:(e,r,t,n,a)=>{if(e.colors){var o=Module.canvas.width,_=Module.canvas.height,l=r||0,c=t||0,u=(n||o-l)+l,d=(a||_-c)+c,p=e.buffer;e.image.data32||(e.image.data32=new Uint32Array(e.image.data.buffer));for(var f=e.image.data32,m=e.colors32,g=c;g>>0]]}},freeSurface:e=>{var r=e+56,t=HEAP32[r>>>2>>>0];if(t>1){HEAP32[r>>>2>>>0]=t-1;return}var n=SDL.surfaces[e];!n.usePageCanvas&&n.canvas&&SDL.canvasPool.push(n.canvas),n.buffer&&_free(n.buffer),_free(n.pixelFormat),_free(e),SDL.surfaces[e]=null,e===SDL.screen&&(SDL.screen=null)},blitSurface:(e,r,t,n,a)=>{var o=SDL.surfaces[e],_=SDL.surfaces[t],l,c;if(r?l=SDL.loadRect(r):l={x:0,y:0,w:o.width,h:o.height},n?c=SDL.loadRect(n):c={x:0,y:0,w:o.width,h:o.height},_.clipRect){var u=!a||l.w===0?1:l.w/c.w,d=!a||l.h===0?1:l.h/c.h;c=SDL.intersectionOfRects(_.clipRect,c),l.w=c.w*u,l.h=c.h*d,n&&SDL.updateRect(n,c)}var p,f;if(a?(p=c.w,f=c.h):(p=l.w,f=l.h),l.w===0||l.h===0||p===0||f===0)return 0;var m=_.ctx.globalAlpha;return _.ctx.globalAlpha=o.alpha/255,_.ctx.drawImage(o.canvas,l.x,l.y,l.w,l.h,c.x,c.y,p,f),_.ctx.globalAlpha=m,t!=SDL.screen&&(warnOnce("WARNING: copying canvas data to memory for compatibility"),_SDL_LockSurface(t),_.locked--),0},downFingers:{},savedKeydown:null,receiveEvent:e=>{function r(){for(var d in SDL.keyboardMap)SDL.events.push({type:"keyup",keyCode:SDL.keyboardMap[d]})}switch(e.type){case"touchstart":case"touchmove":{e.preventDefault();var t=[];if(e.type==="touchstart")for(var n=0;n0?Math.max(c,1):Math.min(c,-1);var u=c>0?3:4;SDL.events.push({type:"mousedown",button:u,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"mouseup",button:u,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"wheel",deltaX:0,deltaY:c}),e.preventDefault();break;case"mousemove":if(SDL.DOMButtons[0]===1&&SDL.events.push({type:"touchmove",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),Browser.pointerLock&&("mozMovementX"in e&&(e.movementX=e.mozMovementX,e.movementY=e.mozMovementY),e.movementX==0&&e.movementY==0)){e.preventDefault();return}case"keydown":case"keyup":case"keypress":case"mousedown":case"mouseup":if((e.type!=="keydown"||!SDL_unicode()&&!SDL.textInput||e.keyCode===8||e.keyCode===9)&&e.preventDefault(),e.type=="mousedown")SDL.DOMButtons[e.button]=1,SDL.events.push({type:"touchstart",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}});else if(e.type=="mouseup"){if(!SDL.DOMButtons[e.button])return;SDL.events.push({type:"touchend",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),SDL.DOMButtons[e.button]=0}e.type==="keydown"||e.type==="mousedown"?SDL.canRequestFullscreen=!0:(e.type==="keyup"||e.type==="mouseup")&&(SDL.isRequestingFullscreen&&(Module.requestFullscreen(!0,!0),SDL.isRequestingFullscreen=!1),SDL.canRequestFullscreen=!1),e.type==="keypress"&&SDL.savedKeydown?(SDL.savedKeydown.keypressCharCode=e.charCode,SDL.savedKeydown=null):e.type==="keydown"&&(SDL.savedKeydown=e),(e.type!=="keypress"||SDL.textInput)&&SDL.events.push(e);break;case"mouseout":for(var n=0;n<3;n++)SDL.DOMButtons[n]&&(SDL.events.push({type:"mouseup",button:n,pageX:e.pageX,pageY:e.pageY}),SDL.DOMButtons[n]=0);e.preventDefault();break;case"focus":SDL.events.push(e),e.preventDefault();break;case"blur":SDL.events.push(e),r(),e.preventDefault();break;case"visibilitychange":SDL.events.push({type:"visibilitychange",visible:!document.hidden}),r(),e.preventDefault();break;case"unload":Browser.mainLoop.runner&&(SDL.events.push(e),Browser.mainLoop.runner());return;case"resize":SDL.events.push(e),e.preventDefault&&e.preventDefault();break}SDL.events.length>=1e4&&(err("SDL event queue full, dropping events"),SDL.events=SDL.events.slice(0,1e4)),SDL.flushEventsToHandler()},lookupKeyCodeForEvent:e=>{var r=e.keyCode;return r>=65&&r<=90?r+=32:(r=SDL.keyCodes[e.keyCode]||e.keyCode,e.location===2&&r>=1248&&r<=1251&&(r+=4)),r},handleEvent:e=>{if(!e.handled)switch(e.handled=!0,e.type){case"touchstart":case"touchend":case"touchmove":{Browser.calculateMouseEvent(e);break}case"keydown":case"keyup":{var r=e.type==="keydown",t=SDL.lookupKeyCodeForEvent(e);HEAP8[SDL.keyboardState+t>>>0]=r,SDL.modState=(HEAP8[SDL.keyboardState+1248>>>0]?64:0)|(HEAP8[SDL.keyboardState+1249>>>0]?1:0)|(HEAP8[SDL.keyboardState+1250>>>0]?256:0)|(HEAP8[SDL.keyboardState+1252>>>0]?128:0)|(HEAP8[SDL.keyboardState+1253>>>0]?2:0)|(HEAP8[SDL.keyboardState+1254>>>0]?512:0),r?SDL.keyboardMap[t]=e.keyCode:delete SDL.keyboardMap[t];break}case"mousedown":case"mouseup":e.type=="mousedown"?SDL.buttonState|=1<{if(SDL.eventHandler)for(;SDL.pollEvent(SDL.eventHandlerTemp);)getWasmTableEntry(SDL.eventHandler)(SDL.eventHandlerContext,SDL.eventHandlerTemp)},pollEvent:e=>{if(SDL.initFlags&512&&SDL.joystickEventState&&SDL.queryJoysticks(),e){for(;SDL.events.length>0;)if(SDL.makeCEvent(SDL.events.shift(),e)!==!1)return 1;return 0}return SDL.events.length>0},makeCEvent:(e,r)=>{if(typeof e=="number"){_memcpy(r,e,28),_free(e);return}switch(SDL.handleEvent(e),e.type){case"keydown":case"keyup":{var t=e.type==="keydown",n=SDL.lookupKeyCodeForEvent(e),a;n>=1024?a=n-1024:a=SDL.scanCodes[n]||n,HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[r+8>>>0]=t?1:0,HEAP8[r+9>>>0]=0,HEAP32[r+12>>>2>>>0]=a,HEAP32[r+16>>>2>>>0]=n,HEAP16[r+20>>>1>>>0]=SDL.modState,HEAP32[r+24>>>2>>>0]=e.keypressCharCode||n;break}case"keypress":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];for(var o=intArrayFromString(String.fromCharCode(e.charCode)),_=0;_>>0]=o[_];break}case"mousedown":case"mouseup":case"mousemove":{if(e.type!="mousemove"){var t=e.type==="mousedown";HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP32[r+8>>>2>>>0]=0,HEAP32[r+12>>>2>>>0]=0,HEAP8[r+16>>>0]=e.button+1,HEAP8[r+17>>>0]=t?1:0,HEAP32[r+20>>>2>>>0]=Browser.mouseX,HEAP32[r+24>>>2>>>0]=Browser.mouseY}else HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP32[r+8>>>2>>>0]=0,HEAP32[r+12>>>2>>>0]=0,HEAP32[r+16>>>2>>>0]=SDL.buttonState,HEAP32[r+20>>>2>>>0]=Browser.mouseX,HEAP32[r+24>>>2>>>0]=Browser.mouseY,HEAP32[r+28>>>2>>>0]=Browser.mouseMovementX,HEAP32[r+32>>>2>>>0]=Browser.mouseMovementY;break}case"wheel":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+16>>>2>>>0]=e.deltaX,HEAP32[r+20>>>2>>>0]=e.deltaY;break}case"touchstart":case"touchend":case"touchmove":{var l=e.touch;if(!Browser.touches[l.identifier])break;var c=Module.canvas.width,u=Module.canvas.height,d=Browser.touches[l.identifier].x/c,p=Browser.touches[l.identifier].y/u,f=Browser.lastTouches[l.identifier].x/c,m=Browser.lastTouches[l.identifier].y/u,g=d-f,v=p-m;if(l.deviceID===void 0&&(l.deviceID=SDL.TOUCH_DEFAULT_ID),g===0&&v===0&&e.type==="touchmove")return!1;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=_SDL_GetTicks(),tempI64=[l.deviceID>>>0,(tempDouble=l.deviceID,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+8>>>2>>>0]=tempI64[0],HEAP32[r+12>>>2>>>0]=tempI64[1],tempI64=[l.identifier>>>0,(tempDouble=l.identifier,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+16>>>2>>>0]=tempI64[0],HEAP32[r+20>>>2>>>0]=tempI64[1],HEAPF32[r+24>>>2>>>0]=d,HEAPF32[r+28>>>2>>>0]=p,HEAPF32[r+32>>>2>>>0]=g,HEAPF32[r+36>>>2>>>0]=v,l.force!==void 0?HEAPF32[r+40>>>2>>>0]=l.force:HEAPF32[r+40>>>2>>>0]=e.type=="touchend"?0:1;break}case"unload":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];break}case"resize":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=e.w,HEAP32[r+8>>>2>>>0]=e.h;break}case"joystick_button_up":case"joystick_button_down":{var S=e.type==="joystick_button_up"?0:1;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[r+4>>>0]=e.index,HEAP8[r+5>>>0]=e.button,HEAP8[r+6>>>0]=S;break}case"joystick_axis_motion":{HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[r+4>>>0]=e.index,HEAP8[r+5>>>0]=e.axis,HEAP32[r+8>>>2>>>0]=SDL.joystickAxisValueConversion(e.value);break}case"focus":{var y=12;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP8[r+8>>>0]=y;break}case"blur":{var h=13;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP8[r+8>>>0]=h;break}case"visibilitychange":{var b=1,w=2,k=e.visible?b:w;HEAP32[r>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[r+4>>>2>>>0]=0,HEAP8[r+8>>>0]=k;break}default:throw"Unhandled SDL event: "+e.type}},makeFontString:(e,r)=>(r.charAt(0)!="'"&&r.charAt(0)!='"'&&(r='"'+r+'"'),e+"px "+r+", serif"),estimateTextWidth:(e,r)=>{var t=e.size,n=SDL.makeFontString(t,e.name),a=SDL_ttfContext();a.font=n;var o=a.measureText(r).width|0;return o},allocateChannels:e=>{if(!(SDL.numChannels&&SDL.numChannels>=e&&e!=0)){SDL.numChannels=e,SDL.channels=[];for(var r=0;r{if(!e)return 0;var t=e.volume*128;if(r!=-1&&(e.volume=Math.min(Math.max(r,0),128)/128,e.audio))try{e.audio.volume=e.volume,e.audio.webAudioGainNode&&(e.audio.webAudioGainNode.gain.value=e.volume)}catch(n){err("setGetVolume failed to set audio volume: ".concat(n))}return t},setPannerPosition:(e,r,t,n)=>{e&&e.audio&&e.audio.webAudioPannerNode&&e.audio.webAudioPannerNode.setPosition(r,t,n)},playWebAudio:e=>{if(e&&!e.webAudioNode&&SDL.webAudioAvailable())try{var r=e.resource.webAudio;if(e.paused=!1,!r.decodedBuffer){r.onDecodeComplete===void 0&&abort("Cannot play back audio object that was not loaded"),r.onDecodeComplete.push(()=>{e.paused||SDL.playWebAudio(e)});return}e.webAudioNode=SDL.audioContext.createBufferSource(),e.webAudioNode.buffer=r.decodedBuffer,e.webAudioNode.loop=e.loop,e.webAudioNode.onended=e.onended,e.webAudioPannerNode=SDL.audioContext.createPanner(),e.webAudioPannerNode.setPosition(0,0,-.5),e.webAudioPannerNode.panningModel="equalpower",e.webAudioGainNode=SDL.audioContext.createGain(),e.webAudioGainNode.gain.value=e.volume,e.webAudioNode.connect(e.webAudioPannerNode),e.webAudioPannerNode.connect(e.webAudioGainNode),e.webAudioGainNode.connect(SDL.audioContext.destination),e.webAudioNode.start(0,e.currentPosition),e.startTime=SDL.audioContext.currentTime-e.currentPosition}catch(t){err("playWebAudio failed: ".concat(t))}},pauseWebAudio:e=>{if(e){if(e.webAudioNode)try{e.currentPosition=(SDL.audioContext.currentTime-e.startTime)%e.resource.webAudio.decodedBuffer.duration,e.webAudioNode.onended=void 0,e.webAudioNode.stop(0),e.webAudioNode=void 0}catch(r){err("pauseWebAudio failed: ".concat(r))}e.paused=!0}},openAudioContext:()=>{SDL.audioContext||(typeof AudioContext<"u"?SDL.audioContext=new AudioContext:typeof webkitAudioContext<"u"&&(SDL.audioContext=new webkitAudioContext))},webAudioAvailable:()=>!!SDL.audioContext,fillWebAudioBufferFromHeap:(e,r,t)=>{for(var n=SDL_audio(),a=n.channels,o=0;o>>1>>>0]/32768;else if(n.format==8)for(var l=0;l>>0];_[l]=(c>=0?c-128:c+128)/128}else if(n.format==33056)for(var l=0;l>>2>>>0];else throw"Invalid SDL audio format "+n.format+"!"}},joystickEventState:1,lastJoystickState:{},joystickNamePool:{},recordJoystickState:(e,r)=>{for(var t=new Array(r.buttons.length),n=0;ntypeof e=="object"?e.pressed:e>0,queryJoysticks:()=>{for(var e in SDL.lastJoystickState){var r=SDL.getGamepad(e-1),t=SDL.lastJoystickState[e];if(typeof r>"u"||r===null)return;if(typeof r.timestamp!="number"||r.timestamp!=t.timestamp||!r.timestamp){var n;for(n=0;n(e=Math.min(1,Math.max(e,-1)),Math.ceil((e+1)*32767.5-32768)),getGamepads:()=>{var e=navigator.getGamepads||navigator.webkitGamepads||navigator.mozGamepads||navigator.gamepads||navigator.webkitGetGamepads;return e!==void 0?e.apply(navigator):[]},getGamepad:e=>{var r=SDL.getGamepads();return r.length>e&&e>=0?r[e]:null}},SDL_unicode=()=>SDL.unicode;function _SDL_Linked_Version(){return SDL.version===null&&(SDL.version=_malloc(3),HEAP8[SDL.version+0>>>0]=1,HEAP8[SDL.version+1>>>0]=3,HEAP8[SDL.version+2>>>0]=0),SDL.version}_SDL_Linked_Version.sig="p";var _SDL_Init=e=>{if(SDL.startTime=Date.now(),SDL.initFlags=e,!Module.doNotCaptureKeyboard){var r=Module.keyboardListeningElement||document;r.addEventListener("keydown",SDL.receiveEvent),r.addEventListener("keyup",SDL.receiveEvent),r.addEventListener("keypress",SDL.receiveEvent),window.addEventListener("focus",SDL.receiveEvent),window.addEventListener("blur",SDL.receiveEvent),document.addEventListener("visibilitychange",SDL.receiveEvent)}return window.addEventListener("unload",SDL.receiveEvent),SDL.keyboardState=_malloc(65536),zeroMemory(SDL.keyboardState,65536),SDL.DOMEventToSDLEvent.keydown=768,SDL.DOMEventToSDLEvent.keyup=769,SDL.DOMEventToSDLEvent.keypress=771,SDL.DOMEventToSDLEvent.mousedown=1025,SDL.DOMEventToSDLEvent.mouseup=1026,SDL.DOMEventToSDLEvent.mousemove=1024,SDL.DOMEventToSDLEvent.wheel=1027,SDL.DOMEventToSDLEvent.touchstart=1792,SDL.DOMEventToSDLEvent.touchend=1793,SDL.DOMEventToSDLEvent.touchmove=1794,SDL.DOMEventToSDLEvent.unload=256,SDL.DOMEventToSDLEvent.resize=28673,SDL.DOMEventToSDLEvent.visibilitychange=512,SDL.DOMEventToSDLEvent.focus=512,SDL.DOMEventToSDLEvent.blur=512,SDL.DOMEventToSDLEvent.joystick_axis_motion=1536,SDL.DOMEventToSDLEvent.joystick_button_down=1539,SDL.DOMEventToSDLEvent.joystick_button_up=1540,0};_SDL_Init.sig="ii";var _SDL_WasInit=e=>(SDL.startTime===null&&_SDL_Init(0),1);_SDL_WasInit.sig="ii";function _SDL_GetVideoInfo(){var e=_malloc(20);return zeroMemory(e,3),HEAP32[e+12>>>2>>>0]=Module.canvas.width,HEAP32[e+16>>>2>>>0]=Module.canvas.height,e}_SDL_GetVideoInfo.sig="p";function _SDL_ListModes(e,r){return e>>>=0,-1}_SDL_ListModes.sig="ppi";var _SDL_VideoModeOK=(e,r,t,n)=>t;_SDL_VideoModeOK.sig="iiiii";function _SDL_VideoDriverName(e,r){if(e>>>=0,SDL.startTime===null)return 0;var t=[101,109,115,99,114,105,112,116,101,110,95,115,100,108,95,100,114,105,118,101,114],n=0,a=t.length;for(r<=a&&(a=r-1);n>>0]=o,n++}return HEAP8[e+n>>>0]=0,e}_SDL_VideoDriverName.sig="ppi";var _SDL_AudioDriverName=_SDL_VideoDriverName;_SDL_AudioDriverName.sig="ppi";var _SDL_SetVideoMode=function(e,r,t,n){["touchstart","touchend","touchmove","mousedown","mouseup","mousemove","mousewheel","wheel","mouseout","DOMMouseScroll"].forEach(o=>Module.canvas.addEventListener(o,SDL.receiveEvent,!0));var a=Module.canvas;return e==0&&r==0&&(e=a.width,r=a.height),SDL.addedResizeListener||(SDL.addedResizeListener=!0,Browser.resizeListeners.push((o,_)=>{SDL.settingVideoMode||SDL.receiveEvent({type:"resize",w:o,h:_})})),SDL.settingVideoMode=!0,Browser.setCanvasSize(e,r),SDL.settingVideoMode=!1,SDL.screen&&(SDL.freeSurface(SDL.screen),assert(!SDL.screen)),SDL.GL&&(n=n|67108864),SDL.screen=SDL.makeSurface(e,r,n,!0,"screen"),SDL.screen};_SDL_SetVideoMode.sig="piiii";function _SDL_GetVideoSurface(){return SDL.screen}_SDL_GetVideoSurface.sig="p";var _SDL_AudioQuit=()=>{for(var e=0;eout("SDL_VideoQuit called (and ignored)");_SDL_VideoQuit.sig="v";var _SDL_QuitSubSystem=e=>out("SDL_QuitSubSystem called (and ignored)");_SDL_QuitSubSystem.sig="vi";var _SDL_Quit=()=>{_SDL_AudioQuit(),out("SDL_Quit called (and ignored)")};_SDL_Quit.sig="v";function _SDL_UnlockSurface(e){e>>>=0,assert(!SDL.GL);var r=SDL.surfaces[e];if(!(!r.locked||--r.locked>0)){if(r.isFlagSet(2097152))SDL.copyIndexedColorData(r);else if(r.colors)for(var m=Module.canvas.width,g=Module.canvas.height,v=r.buffer,t=r.image.data,S=r.colors,y=0;y>>0]*4,w=h+b*4;t[w]=S[c],t[w+1]=S[c+1],t[w+2]=S[c+2]}v+=m*3}else{var t=r.image.data,n=r.buffer;assert(n%4==0,"Invalid buffer offset: "+n);var a=n>>>2,o=0,_=e==SDL.screen,l;if(typeof CanvasPixelArray<"u"&&t instanceof CanvasPixelArray)for(l=t.length;o>>0];t[o]=c&255,t[o+1]=c>>8&255,t[o+2]=c>>16&255,t[o+3]=_?255:c>>24&255,a++,o+=4}else{var u=new Uint32Array(t.buffer);if(_&&SDL.defaults.opaqueFrontBuffer){l=u.length,u.set(HEAP32.subarray(a>>>0,a+l>>>0));var d=new Uint8Array(t.buffer),p=3,f=p+4*l;if(l%8==0)for(;p>>0,a+u.length>>>0))}}r.ctx.putImageData(r.image,0,0)}}_SDL_UnlockSurface.sig="vp";function _SDL_Flip(e){e>>>=0}_SDL_Flip.sig="ip";function _SDL_UpdateRect(e,r,t,n,a){e>>>=0}_SDL_UpdateRect.sig="vpiiii";function _SDL_UpdateRects(e,r,t){e>>>=0,t>>>=0}_SDL_UpdateRects.sig="vpip";var _SDL_Delay=e=>{ENVIRONMENT_IS_WORKER||abort("SDL_Delay called on the main thread! Potential infinite loop, quitting. (consider building with async support like ASYNCIFY)");for(var r=Date.now();Date.now()-r>>=0,r>>>=0,e&&_emscripten_set_window_title(e),r&&(r=UTF8ToString(r))}_SDL_WM_SetCaption.sig="vpp";var _SDL_EnableKeyRepeat=(e,r)=>{};_SDL_EnableKeyRepeat.sig="iii";function _SDL_GetKeyboardState(e){return e>>>=0,e&&(HEAP32[e>>>2>>>0]=65536),SDL.keyboardState}_SDL_GetKeyboardState.sig="pp";var _SDL_GetKeyState=()=>_SDL_GetKeyboardState(0);function _SDL_GetKeyName(e){return SDL.keyName||(SDL.keyName=stringToNewUTF8("unknown key")),SDL.keyName}_SDL_GetKeyName.sig="pi";var _SDL_GetModState=()=>SDL.modState;_SDL_GetModState.sig="i";function _SDL_GetMouseState(e,r){return e>>>=0,r>>>=0,e&&(HEAP32[e>>>2>>>0]=Browser.mouseX),r&&(HEAP32[r>>>2>>>0]=Browser.mouseY),SDL.buttonState}_SDL_GetMouseState.sig="ipp";var _SDL_WarpMouse=(e,r)=>{};_SDL_WarpMouse.sig="vii";var _SDL_ShowCursor=e=>{switch(e){case 0:return Browser.isFullscreen?(Module.canvas.requestPointerLock(),0):1;case 1:return Module.canvas.exitPointerLock(),1;case-1:return!Browser.pointerLock;default:err("SDL_ShowCursor called with unknown toggle parameter value: ".concat(e));break}};_SDL_ShowCursor.sig="ii";function _SDL_GetError(){return SDL.errorMessage||(SDL.errorMessage=stringToNewUTF8("unknown SDL-emscripten error")),SDL.errorMessage}_SDL_GetError.sig="p";function _SDL_SetError(e,r){e>>>=0,r>>>=0}_SDL_SetError.sig="vpp";function _SDL_CreateRGBSurface(e,r,t,n,a,o,_,l){return SDL.makeSurface(r,t,e,!1,"CreateRGBSurface",a,o,_,l)}_SDL_CreateRGBSurface.sig="piiiiiiii";function _SDL_CreateRGBSurfaceFrom(e,r,t,n,a,o,_,l,c){e>>>=0;var u=SDL.makeSurface(r,t,0,!1,"CreateRGBSurfaceFrom",o,_,l,c);if(n!==32)return err("TODO: Partially unimplemented SDL_CreateRGBSurfaceFrom called!"),u;for(var d=SDL.surfaces[u],p=d.ctx.createImageData(r,t),f=r*4,m=0;m>>0];return d.ctx.putImageData(p,0,0),u}_SDL_CreateRGBSurfaceFrom.sig="ppiiiiiiii";function _SDL_ConvertSurface(e,r,t){e>>>=0,r>>>=0,r&&SDL.checkPixelFormat(r);var n=SDL.surfaces[e],a=SDL.makeSurface(n.width,n.height,n.flags,!1,"copy:"+n.source),o=SDL.surfaces[a];return o.ctx.globalCompositeOperation="copy",o.ctx.drawImage(n.canvas,0,0),o.ctx.globalCompositeOperation=n.ctx.globalCompositeOperation,a}_SDL_ConvertSurface.sig="pppi";function _SDL_DisplayFormatAlpha(e){return e>>>=0,_SDL_ConvertSurface(e,0,0)}_SDL_DisplayFormatAlpha.sig="pp";function _SDL_FreeSurface(e){e>>>=0,e&&SDL.freeSurface(e)}_SDL_FreeSurface.sig="vp";function _SDL_UpperBlit(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,SDL.blitSurface(e,r,t,n,!1)}_SDL_UpperBlit.sig="ipppp";function _SDL_UpperBlitScaled(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,SDL.blitSurface(e,r,t,n,!0)}_SDL_UpperBlitScaled.sig="ipppp";var _SDL_LowerBlit=_SDL_UpperBlit;_SDL_LowerBlit.sig="ipppp";var _SDL_LowerBlitScaled=_SDL_UpperBlitScaled;_SDL_LowerBlitScaled.sig="ipppp";function _SDL_GetClipRect(e,r){e>>>=0,r>>>=0,assert(r);var t=SDL.surfaces[e],n=t.clipRect||{x:0,y:0,w:t.width,h:t.height};SDL.updateRect(r,n)}_SDL_GetClipRect.sig="vpp";function _SDL_SetClipRect(e,r){e>>>=0,r>>>=0;var t=SDL.surfaces[e];r?t.clipRect=SDL.intersectionOfRects({x:0,y:0,w:t.width,h:t.height},SDL.loadRect(r)):delete t.clipRect}_SDL_SetClipRect.sig="ipp";function _SDL_FillRect(e,r,t){e>>>=0,r>>>=0;var n=SDL.surfaces[e];assert(!n.locked),n.isFlagSet(2097152)&&(t=n.colors32[t]);var a=r?SDL.loadRect(r):{x:0,y:0,w:n.width,h:n.height};return n.clipRect&&(a=SDL.intersectionOfRects(n.clipRect,a),r&&SDL.updateRect(r,a)),n.ctx.save(),n.ctx.fillStyle=SDL.translateColorToCSSRGBA(t),n.ctx.fillRect(a.x,a.y,a.w,a.h),n.ctx.restore(),0}_SDL_FillRect.sig="ippi";function _zoomSurface(e,r,t,n){e>>>=0;var a=SDL.surfaces[e],o=a.width*r,_=a.height*t,l=SDL.makeSurface(Math.abs(o),Math.abs(_),a.flags,!1,"zoomSurface"),c=SDL.surfaces[l];return r>=0&&t>=0?c.ctx.drawImage(a.canvas,0,0,o,_):(c.ctx.save(),c.ctx.scale(r<0?-1:1,t<0?-1:1),c.ctx.drawImage(a.canvas,o<0?o:0,_<0?_:0,Math.abs(o),Math.abs(_)),c.ctx.restore()),l}_zoomSurface.sig="ppddi";function _rotozoomSurface(e,r,t,n){if(e>>>=0,r%360===0)return _zoomSurface(e,t,t,n);var a=SDL.surfaces[e],o=a.width*t,_=a.height*t,l=Math.ceil(Math.sqrt(Math.pow(o,2)+Math.pow(_,2))),c=SDL.makeSurface(l,l,a.flags,!1,"rotozoomSurface"),u=SDL.surfaces[c];return u.ctx.translate(l/2,l/2),u.ctx.rotate(-r*Math.PI/180),u.ctx.drawImage(a.canvas,-o/2,-_/2,o,_),c}_rotozoomSurface.sig="ppddi";function _SDL_SetAlpha(e,r,t){e>>>=0;var n=SDL.surfaces[e];n.alpha=t,r&65536||(n.alpha=255)}_SDL_SetAlpha.sig="ipii";function _SDL_SetColorKey(e,r,t){return e>>>=0,warnOnce("SDL_SetColorKey is a no-op for performance reasons"),0}_SDL_SetColorKey.sig="ipii";function _SDL_PollEvent(e){return e>>>=0,SDL.pollEvent(e)}_SDL_PollEvent.sig="ip";function _SDL_PushEvent(e){e>>>=0;var r=_malloc(28);return _memcpy(r,e,28),SDL.events.push(r),0}_SDL_PushEvent.sig="ip";function _SDL_PeepEvents(e,r,t,n,a){switch(e>>>=0,t){case 2:{assert(r==1);for(var o=0,_=0;oSDL.events.forEach(SDL.handleEvent);_SDL_PumpEvents.sig="v";function _emscripten_SDL_SetEventHandler(e,r){e>>>=0,r>>>=0,SDL.eventHandler=e,SDL.eventHandlerContext=r,SDL.eventHandlerTemp||(SDL.eventHandlerTemp=_malloc(28))}_emscripten_SDL_SetEventHandler.sig="vpp";function _SDL_SetColors(e,r,t,n){e>>>=0,r>>>=0;var a=SDL.surfaces[e];if(!a.colors){var o=new ArrayBuffer(1024);a.colors=new Uint8Array(o),a.colors32=new Uint32Array(o)}for(var _=0;_>>0],a.colors[l+1]=HEAPU8[r+(_*4+1)>>>0],a.colors[l+2]=HEAPU8[r+(_*4+2)>>>0],a.colors[l+3]=255}return 1}_SDL_SetColors.sig="ippii";function _SDL_SetPalette(e,r,t,n,a){return e>>>=0,t>>>=0,_SDL_SetColors(e,t,n,a)}_SDL_SetPalette.sig="ipipii";function _SDL_MapRGB(e,r,t,n){return e>>>=0,SDL.checkPixelFormat(e),r&255|(t&255)<<8|(n&255)<<16|4278190080}_SDL_MapRGB.sig="ipiii";function _SDL_MapRGBA(e,r,t,n,a){return e>>>=0,SDL.checkPixelFormat(e),r&255|(t&255)<<8|(n&255)<<16|(a&255)<<24}_SDL_MapRGBA.sig="ipiiii";function _SDL_GetRGB(e,r,t,n,a){r>>>=0,t>>>=0,n>>>=0,a>>>=0,SDL.checkPixelFormat(r),t&&(HEAP8[t>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255)}_SDL_GetRGB.sig="vipppp";function _SDL_GetRGBA(e,r,t,n,a,o){r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,SDL.checkPixelFormat(r),t&&(HEAP8[t>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255),o&&(HEAP8[o>>>0]=e>>24&255)}_SDL_GetRGBA.sig="vippppp";var _SDL_GetAppState=()=>{var e=0;return Browser.pointerLock&&(e|=1),document.hasFocus()&&(e|=2),e|=4,e};_SDL_GetAppState.sig="i";var _SDL_WM_GrabInput=()=>{};_SDL_WM_GrabInput.sig="ii";function _SDL_WM_ToggleFullScreen(e){return e>>>=0,Browser.exitFullscreen()?1:SDL.canRequestFullscreen?(SDL.isRequestingFullscreen=!0,1):0}_SDL_WM_ToggleFullScreen.sig="ip";var _IMG_Init=e=>e;_IMG_Init.sig="ii";function _SDL_FreeRW(e){for(e>>>=0,SDL.rwops[e]=null;SDL.rwops.length>0&&SDL.rwops[SDL.rwops.length-1]===null;)SDL.rwops.pop()}_SDL_FreeRW.sig="vp";var _IMG_Load_RW=function(e,r){e>>>=0;try{var t=()=>{o&&r&&_SDL_FreeRW(e)},n=b=>{var w=t;t=()=>{w(),b()}},a=(b,w)=>withStackSave(()=>{var k=stackAlloc(4),L=stackAlloc(4),E=stackAlloc(4),x=Module["_"+b](...w,k,L,E,0);return x?(n(()=>Module._stbi_image_free(x)),{rawData:!0,data:x,width:HEAP32[k>>>2>>>0],height:HEAP32[L>>>2>>>0],size:HEAP32[k>>>2>>>0]*HEAP32[L>>>2>>>0]*HEAP32[E>>>2>>>0],bpp:HEAP32[E>>>2>>>0]}):null}),o=SDL.rwops[e];if(o===void 0)return 0;var _,l=o.filename;if(l===void 0)return warnOnce("Only file names that have been preloaded are supported for IMG_Load_RW. Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;if(!_)if(l=PATH_FS.resolve(l),_=preloadedImages[l],_)Module.freePreloadedMediaOnUse&&(preloadedImages[l]=null);else return _===null&&err("Trying to reuse preloaded image, but freePreloadedMediaOnUse is set!"),warnOnce("Cannot find preloaded image "+l),warnOnce("Cannot find preloaded image "+l+". Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;var c=SDL.makeSurface(_.width,_.height,0,!1,"load:"+l),u=SDL.surfaces[c];if(u.ctx.globalCompositeOperation="copy",!_.rawData)u.ctx.drawImage(_,0,0,_.width,_.height,0,0,_.width,_.height);else{var d=u.ctx.getImageData(0,0,u.width,u.height);if(_.bpp==4)d.data.set(HEAPU8.subarray(_.data>>>0,_.data+_.size>>>0));else if(_.bpp==3)for(var p=_.size/3,f=d.data,m=_.data,g=0,v=0;v>>0],f[g++]=HEAPU8[m++>>>0],f[g++]=HEAPU8[m++>>>0],f[g++]=255;else if(_.bpp==2)for(var p=_.size,f=d.data,m=_.data,g=0,v=0;v>>0],y=HEAPU8[m++>>>0];f[g++]=S,f[g++]=S,f[g++]=S,f[g++]=y}else if(_.bpp==1)for(var p=_.size,f=d.data,m=_.data,g=0,v=0;v>>0];f[g++]=h,f[g++]=h,f[g++]=h,f[g++]=255}else return err("cannot handle bpp ".concat(_.bpp)),0;u.ctx.putImageData(d,0,0)}return u.ctx.globalCompositeOperation="source-over",_SDL_LockSurface(c),u.locked--,SDL.GL&&(u.canvas=u.ctx=null),c}finally{t()}};_IMG_Load_RW.sig="ppi";var _SDL_LoadBMP_RW=_IMG_Load_RW;_SDL_LoadBMP_RW.sig="ppi";function _SDL_RWFromFile(e,r){e>>>=0,r>>>=0;var t=SDL.rwops.length,n=UTF8ToString(e);return SDL.rwops.push({filename:n,mimetype:Browser.getMimetype(n)}),t}_SDL_RWFromFile.sig="ppp";function _IMG_Load(e){e>>>=0;var r=_SDL_RWFromFile(e,0),t=_IMG_Load_RW(r,1);return t}_IMG_Load.sig="pp";var _IMG_Quit=()=>out("IMG_Quit called (and ignored)");_IMG_Quit.sig="v";function _SDL_OpenAudio(e,r){e>>>=0,r>>>=0;try{if(SDL.audio={freq:HEAPU32[e>>>2>>>0],format:HEAPU16[e+4>>>1>>>0],channels:HEAPU8[e+6>>>0],samples:HEAPU16[e+8>>>1>>>0],callback:HEAPU32[e+16>>>2>>>0],userdata:HEAPU32[e+20>>>2>>>0],paused:!0,timer:null},SDL.audio.format==8)SDL.audio.silence=128;else if(SDL.audio.format==32784)SDL.audio.silence=0;else if(SDL.audio.format==33056)SDL.audio.silence=0;else throw"Invalid SDL audio format "+SDL.audio.format+"!";if(SDL.audio.freq<=0)throw"Unsupported sound frequency "+SDL.audio.freq+"!";if(SDL.audio.freq<=22050)SDL.audio.freq=22050;else if(SDL.audio.freq<=32e3)SDL.audio.freq=32e3;else if(SDL.audio.freq<=44100)SDL.audio.freq=44100;else if(SDL.audio.freq<=48e3)SDL.audio.freq=48e3;else if(SDL.audio.freq<=96e3)SDL.audio.freq=96e3;else throw"Unsupported sound frequency ".concat(SDL.audio.freq,"!");if(SDL.audio.channels==0)SDL.audio.channels=1;else{if(SDL.audio.channels<0||SDL.audio.channels>32)throw"Unsupported number of audio channels for SDL audio: ".concat(SDL.audio.channels,"!");SDL.audio.channels!=1&&SDL.audio.channels!=2&&out("Warning: Using untested number of audio channels ".concat(SDL.audio.channels))}if(SDL.audio.samples<128||SDL.audio.samples>524288)throw"Unsupported audio callback buffer size ".concat(SDL.audio.samples,"!");if(SDL.audio.samples&SDL.audio.samples-1)throw"Audio callback buffer size ".concat(SDL.audio.samples," must be a power-of-two!");var t=SDL.audio.samples*SDL.audio.channels;if(SDL.audio.format==8)SDL.audio.bytesPerSample=1;else if(SDL.audio.format==32784)SDL.audio.bytesPerSample=2;else if(SDL.audio.format==33056)SDL.audio.bytesPerSample=4;else throw"Invalid SDL audio format ".concat(SDL.audio.format,"!");if(SDL.audio.bufferSize=t*SDL.audio.bytesPerSample,SDL.audio.bufferDurationSecs=SDL.audio.bufferSize/SDL.audio.bytesPerSample/SDL.audio.channels/SDL.audio.freq,SDL.audio.bufferingDelay=.05,SDL.audio.buffer=_malloc(SDL.audio.bufferSize),SDL.audio.numSimultaneouslyQueuedBuffers=Module.SDL_numSimultaneouslyQueuedBuffers||5,SDL.audio.queueNewAudioData=()=>{if(SDL.audio)for(var n=0;n=SDL.audio.bufferingDelay+SDL.audio.bufferDurationSecs*SDL.audio.numSimultaneouslyQueuedBuffers)return;getWasmTableEntry(SDL.audio.callback)(SDL.audio.userdata,SDL.audio.buffer,SDL.audio.bufferSize),SDL.audio.pushAudio(SDL.audio.buffer,SDL.audio.bufferSize)}},SDL.audio.caller=()=>{if(SDL.audio){--SDL.audio.numAudioTimersPending,SDL.audio.queueNewAudioData();var n=SDL.audio.nextPlayTime-SDL.audioContext.currentTime,a=SDL.audio.bufferDurationSecs/2;SDL.audio.numAudioTimersPending>>2>>>0]=SDL.audio.freq,HEAP16[r+4>>>1>>>0]=SDL.audio.format,HEAP8[r+6>>>0]=SDL.audio.channels,HEAP8[r+7>>>0]=SDL.audio.silence,HEAP16[r+8>>>1>>>0]=SDL.audio.samples,HEAPU32[r+16>>>2>>>0]=SDL.audio.callback,HEAPU32[r+20>>>2>>>0]=SDL.audio.userdata),SDL.allocateChannels(32)}catch(n){err('Initializing SDL audio threw an exception: "'.concat(n.toString(),'"! Continuing without audio')),SDL.audio=null,SDL.allocateChannels(0),r&&(HEAP32[r>>>2>>>0]=0,HEAP16[r+4>>>1>>>0]=0,HEAP8[r+6>>>0]=0,HEAP8[r+7>>>0]=0,HEAP16[r+8>>>1>>>0]=0,HEAPU32[r+16>>>2>>>0]=0,HEAPU32[r+20>>>2>>>0]=0)}return SDL.audio?0:-1}_SDL_OpenAudio.sig="ipp";var _SDL_PauseAudio=e=>{SDL.audio&&(e?SDL.audio.timer!==void 0&&(clearTimeout(SDL.audio.timer),SDL.audio.numAudioTimersPending=0,SDL.audio.timer=void 0):SDL.audio.timer||(SDL.audio.numAudioTimersPending=1,SDL.audio.timer=safeSetTimeout(SDL.audio.caller,1)),SDL.audio.paused=e)};_SDL_PauseAudio.sig="vi";var _SDL_CloseAudio=()=>{SDL.audio&&(SDL.audio.callbackRemover&&(SDL.audio.callbackRemover(),SDL.audio.callbackRemover=null),_SDL_PauseAudio(1),_free(SDL.audio.buffer),SDL.audio=null,SDL.allocateChannels(0))};_SDL_CloseAudio.sig="v";var _SDL_LockAudio=()=>{};_SDL_LockAudio.sig="v";var _SDL_UnlockAudio=()=>{};_SDL_UnlockAudio.sig="v";function _SDL_CreateMutex(){return 0}_SDL_CreateMutex.sig="p";function _SDL_mutexP(e){return e>>>=0,0}_SDL_mutexP.sig="ip";function _SDL_mutexV(e){return e>>>=0,0}_SDL_mutexV.sig="ip";function _SDL_DestroyMutex(e){e>>>=0}_SDL_DestroyMutex.sig="vp";function _SDL_CreateCond(){return 0}_SDL_CreateCond.sig="p";function _SDL_CondSignal(e){e>>>=0}_SDL_CondSignal.sig="ip";function _SDL_CondWait(e,r){e>>>=0,r>>>=0}_SDL_CondWait.sig="ipp";function _SDL_DestroyCond(e){e>>>=0}_SDL_DestroyCond.sig="vp";var _SDL_StartTextInput=()=>{SDL.textInput=!0};_SDL_StartTextInput.sig="v";var _SDL_StopTextInput=()=>{SDL.textInput=!1};_SDL_StopTextInput.sig="v";var _Mix_Init=e=>e?8:0;_Mix_Init.sig="ii";var _Mix_Quit=()=>{};_Mix_Quit.sig="v";var _Mix_OpenAudio=(e,r,t,n)=>(SDL.openAudioContext(),autoResumeAudioContext(SDL.audioContext),SDL.allocateChannels(32),SDL.mixerFrequency=e,SDL.mixerFormat=r,SDL.mixerNumChannels=t,SDL.mixerChunkSize=n,0);_Mix_OpenAudio.sig="iiiii";var _Mix_CloseAudio=_SDL_CloseAudio;_Mix_CloseAudio.sig="v";var _Mix_AllocateChannels=e=>(SDL.allocateChannels(e),e);_Mix_AllocateChannels.sig="ii";function _Mix_ChannelFinished(e){e>>>=0,SDL.channelFinished=e}_Mix_ChannelFinished.sig="vp";var _Mix_Volume=(e,r)=>{if(e==-1){for(var t=0;t(r/=255,t/=255,SDL.setPannerPosition(SDL.channels[e],t-r,0,.1),1);_Mix_SetPanning.sig="iiii";function _Mix_LoadWAV_RW(e,r){e>>>=0;var t=SDL.rwops[e];if(t===void 0)return 0;var n="",a,o,_;if(t.filename!==void 0){n=PATH_FS.resolve(t.filename);var l=preloadedAudios[n];if(!l){l===null&&err("Trying to reuse preloaded audio, but freePreloadedMediaOnUse is set!"),Module.noAudioDecoding||warnOnce("Cannot find preloaded audio "+n);try{_=FS.readFile(n)}catch(g){return err("Couldn't find file for: ".concat(n)),0}}Module.freePreloadedMediaOnUse&&(preloadedAudios[n]=null),a=l}else if(t.bytes!==void 0)SDL.webAudioAvailable()?_=HEAPU8.buffer.slice(t.bytes,t.bytes+t.count):_=HEAPU8.subarray(t.bytes>>>0,t.bytes+t.count>>>0);else return 0;var c=_&&(_.buffer||_),u=Module.SDL_canPlayWithWebAudio===void 0||Module.SDL_canPlayWithWebAudio(n,c);if(_!==void 0&&SDL.webAudioAvailable()&&u){a=void 0,o={},o.onDecodeComplete=[];var d=g=>{o.decodedBuffer=g,o.onDecodeComplete.forEach(v=>v()),o.onDecodeComplete=void 0};SDL.audioContext.decodeAudioData(c,d)}else if(a===void 0&&_){var p=new Blob([_],{type:t.mimetype}),f=URL.createObjectURL(p);a=new Audio,a.src=f,a.mozAudioChannelType="content"}var m=SDL.audios.length;return SDL.audios.push({source:n,audio:a,webAudio:o}),m}_Mix_LoadWAV_RW.sig="ppi";function _Mix_LoadWAV(e){e>>>=0;var r=_SDL_RWFromFile(e,0),t=_Mix_LoadWAV_RW(r,0);return _SDL_FreeRW(r),t}_Mix_LoadWAV.sig="pp";function _Mix_QuickLoad_RAW(e,r){e>>>=0;for(var t,n,a=r>>1,o=new Float32Array(a),_=0;_>>1>>>0]/32768;SDL.webAudioAvailable()?(n={},n.decodedBuffer=o):(t=new Audio,t.mozAudioChannelType="content",t.numChannels=SDL.mixerNumChannels,t.frequency=SDL.mixerFrequency);var l=SDL.audios.length;return SDL.audios.push({source:"",audio:t,webAudio:n,buffer:o}),l}_Mix_QuickLoad_RAW.sig="ppi";function _Mix_FreeChunk(e){e>>>=0,SDL.audios[e]=null}_Mix_FreeChunk.sig="vp";var _Mix_ReserveChannels=e=>{SDL.channelMinimumNumber=e};_Mix_ReserveChannels.sig="ii";function _Mix_PlayChannelTimed(e,r,t,n){r>>>=0,assert(n==-1);var a=SDL.audios[r];if(!a||!a.audio&&!a.webAudio)return-1;if(e==-1){for(var o=SDL.channelMinimumNumber;o0;_Mix_FadingChannel.sig="ii";var _Mix_HaltChannel=e=>{function r(n){var a=SDL.channels[n];a.audio&&(a.audio.pause(),a.audio=null),SDL.channelFinished&&getWasmTableEntry(SDL.channelFinished)(n)}if(e!=-1)r(e);else for(var t=0;t{var e=SDL.music.audio;return e&&(e.src=e.src,e.currentPosition=0,e.pause()),SDL.music.audio=null,SDL.hookMusicFinished&&getWasmTableEntry(SDL.hookMusicFinished)(),0};_Mix_HaltMusic.sig="i";function _Mix_HookMusicFinished(e){e>>>=0,SDL.hookMusicFinished=e,SDL.music.audio&&(SDL.music.audio.onended=_Mix_HaltMusic)}_Mix_HookMusicFinished.sig="vp";var _Mix_VolumeMusic=e=>SDL.setGetVolume(SDL.music,e);_Mix_VolumeMusic.sig="ii";var _Mix_LoadMUS_RW=_Mix_LoadWAV_RW;_Mix_LoadMUS_RW.sig="pp";function _Mix_LoadMUS(e){e>>>=0;var r=_SDL_RWFromFile(e,0),t=_Mix_LoadMUS_RW(r,0);return _SDL_FreeRW(r),t}_Mix_LoadMUS.sig="pp";var _Mix_FreeMusic=_Mix_FreeChunk;_Mix_FreeMusic.sig="vp";function _Mix_PlayMusic(e,r){e>>>=0,SDL.music.audio&&(SDL.music.audio.paused||err("Music is already playing. ".concat(SDL.music.source)),SDL.music.audio.pause());var t=SDL.audios[e],n;return t.webAudio?(n={},n.resource=t,n.paused=!1,n.currentPosition=0,n.play=function(){SDL.playWebAudio(this)},n.pause=function(){SDL.pauseWebAudio(this)}):t.audio&&(n=t.audio),n.onended=function(){SDL.music.audio==this&&_Mix_HaltMusic()},n.loop=r!=0&&r!=1,n.volume=SDL.music.volume,SDL.music.audio=n,n.play(),0}_Mix_PlayMusic.sig="ipi";var _Mix_PauseMusic=()=>{var e=SDL.music.audio;e==null||e.pause()};_Mix_PauseMusic.sig="v";var _Mix_ResumeMusic=()=>{var e=SDL.music.audio;e==null||e.play()};_Mix_ResumeMusic.sig="v";var _Mix_FadeInMusicPos=_Mix_PlayMusic;_Mix_FadeInMusicPos.sig="ipiid";var _Mix_FadeOutMusic=_Mix_HaltMusic;_Mix_FadeOutMusic.sig="ii";var _Mix_PlayingMusic=()=>SDL.music.audio&&!SDL.music.audio.paused?1:0;_Mix_PlayingMusic.sig="i";var _Mix_Playing=e=>{if(e===-1){for(var r=0,t=0;t{if(e===-1){for(var r=0;r{var a;if(e===-1){for(var r=0,t=0;t{var e;return(e=SDL.music.audio)!=null&&e.paused?1:0};_Mix_PausedMusic.sig="i";var _Mix_Resume=e=>{if(e===-1){for(var r=0;r{try{var e=new OffscreenCanvas(0,0);if(SDL.ttfContext=e.getContext("2d"),typeof SDL.ttfContext.measureText!="function")throw"bad context"}catch(t){var r=document.createElement("canvas");SDL.ttfContext=r.getContext("2d")}return 0};_TTF_Init.sig="i";function _TTF_OpenFont(e,r){e>>>=0,e=PATH.normalize(UTF8ToString(e));var t=SDL.fonts.length;return SDL.fonts.push({name:e,size:r}),t}_TTF_OpenFont.sig="ppi";function _TTF_CloseFont(e){e>>>=0,SDL.fonts[e]=null}_TTF_CloseFont.sig="vp";function _TTF_RenderText_Solid(e,r,t){e>>>=0,r>>>=0,t>>>=0,r=UTF8ToString(r)||" ";var n=SDL.fonts[e],a=SDL.estimateTextWidth(n,r),o=n.size;t=SDL.loadColorToCSSRGB(t);var _=SDL.makeFontString(o,n.name),l=SDL.makeSurface(a,o,0,!1,"text:"+r),c=SDL.surfaces[l];return c.ctx.save(),c.ctx.fillStyle=t,c.ctx.font=_,c.ctx.textBaseline="bottom",c.ctx.fillText(r,0,o|0),c.ctx.restore(),l}_TTF_RenderText_Solid.sig="pppp";var _TTF_RenderText_Blended=_TTF_RenderText_Solid;_TTF_RenderText_Blended.sig="pppp";var _TTF_RenderText_Shaded=_TTF_RenderText_Solid;_TTF_RenderText_Shaded.sig="ppppp";var _TTF_RenderUTF8_Solid=_TTF_RenderText_Solid;_TTF_RenderUTF8_Solid.sig="pppp";function _TTF_SizeText(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,n>>>=0;var a=SDL.fonts[e];return t&&(HEAP32[t>>>2>>>0]=SDL.estimateTextWidth(a,UTF8ToString(r))),n&&(HEAP32[n>>>2>>>0]=a.size),0}_TTF_SizeText.sig="ipppp";var _TTF_SizeUTF8=_TTF_SizeText;_TTF_SizeUTF8.sig="ipppp";function _TTF_GlyphMetrics(e,r,t,n,a,o,_){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0;var l=SDL.fonts[e],c=SDL.estimateTextWidth(l,String.fromCharCode(r));_&&(HEAP32[_>>>2>>>0]=c),t&&(HEAP32[t>>>2>>>0]=0),n&&(HEAP32[n>>>2>>>0]=c),a&&(HEAP32[a>>>2>>>0]=0),o&&(HEAP32[o>>>2>>>0]=l.size)}_TTF_GlyphMetrics.sig="ipippppp";function _TTF_FontAscent(e){e>>>=0;var r=SDL.fonts[e];return r.size*.98|0}_TTF_FontAscent.sig="ip";function _TTF_FontDescent(e){e>>>=0;var r=SDL.fonts[e];return r.size*.02|0}_TTF_FontDescent.sig="ip";function _TTF_FontHeight(e){e>>>=0;var r=SDL.fonts[e];return r.size}_TTF_FontHeight.sig="ip";var _TTF_FontLineSkip=_TTF_FontHeight;_TTF_FontLineSkip.sig="ip";var _TTF_Quit=()=>out("TTF_Quit called (and ignored)");_TTF_Quit.sig="v";var SDL_gfx={drawRectangle:(e,r,t,n,a,o,_)=>{r=r<<16>>16,t=t<<16>>16,n=n<<16>>16,a=a<<16>>16;var l=SDL.surfaces[e];assert(!l.locked);var c=r{r=r<<16>>16,t=t<<16>>16,n=n<<16>>16,a=a<<16>>16;var _=SDL.surfaces[e];assert(!_.locked),_.ctx.save(),_.ctx.strokeStyle=o,_.ctx.beginPath(),_.ctx.moveTo(r,t),_.ctx.lineTo(n,a),_.ctx.stroke(),_.ctx.restore()},drawEllipse:(e,r,t,n,a,o,_)=>{r=r<<16>>16,t=t<<16>>16,n=n<<16>>16,a=a<<16>>16;var l=SDL.surfaces[e];assert(!l.locked),l.ctx.save(),l.ctx.beginPath(),l.ctx.translate(r,t),l.ctx.scale(n,a),l.ctx.arc(0,0,1,0,2*Math.PI),l.ctx.restore(),l.ctx.save(),l.ctx[o+"Style"]=_,l.ctx[o](),l.ctx.restore()},translateColorToCSSRGBA:e=>"rgba(".concat(e>>>24,",").concat(e>>16&255,",").concat(e>>8&255,",").concat(e&255,")")};function _boxColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(o))}_boxColor.sig="ipiiiii";function _boxRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"fill",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_boxRGBA.sig="ipiiiiiiii";function _rectangleColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(o))}_rectangleColor.sig="ipiiiii";function _rectangleRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawRectangle(e,r,t,n,a,"stroke",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_rectangleRGBA.sig="ipiiiiiiii";function _ellipseColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(o))}_ellipseColor.sig="ipiiiii";function _ellipseRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"stroke",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_ellipseRGBA.sig="ipiiiiiiii";function _filledEllipseColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(o))}_filledEllipseColor.sig="ipiiiii";function _filledEllipseRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawEllipse(e,r,t,n,a,"fill",SDL.translateRGBAToCSSRGBA(o,_,l,c))}_filledEllipseRGBA.sig="ipiiiiiiii";function _lineColor(e,r,t,n,a,o){return e>>>=0,SDL_gfx.drawLine(e,r,t,n,a,SDL_gfx.translateColorToCSSRGBA(o))}_lineColor.sig="ipiiiii";function _lineRGBA(e,r,t,n,a,o,_,l,c){return e>>>=0,SDL_gfx.drawLine(e,r,t,n,a,SDL.translateRGBAToCSSRGBA(o,_,l,c))}_lineRGBA.sig="ipiiiiiiii";function _pixelRGBA(e,r,t,n,a,o,_){return e>>>=0,_boxRGBA(e,r,t,r,t,n,a,o,_)}_pixelRGBA.sig="ipiiiiii";var _SDL_GL_SetAttribute=(e,r)=>{e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),SDL.glAttributes[e]=r};_SDL_GL_SetAttribute.sig="iii";function _SDL_GL_GetAttribute(e,r){return r>>>=0,e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),r&&(HEAP32[r>>>2>>>0]=SDL.glAttributes[e]),0}_SDL_GL_GetAttribute.sig="iip";var _SDL_GL_SwapBuffers=()=>{var e;(e=Browser.doSwapBuffers)==null||e.call(Browser)};_SDL_GL_SwapBuffers.sig="v";function _SDL_GL_ExtensionSupported(e){return e>>>=0,Module.ctx.getExtension(e)|0}_SDL_GL_ExtensionSupported.sig="ip";function _SDL_DestroyWindow(e){e>>>=0}_SDL_DestroyWindow.sig="vp";function _SDL_DestroyRenderer(e){e>>>=0}_SDL_DestroyRenderer.sig="vp";function _SDL_GetWindowFlags(e){return e>>>=0,Browser.isFullscreen?1:0}_SDL_GetWindowFlags.sig="ip";function _SDL_GL_SwapWindow(e){e>>>=0}_SDL_GL_SwapWindow.sig="vp";function _SDL_GL_MakeCurrent(e,r){e>>>=0,r>>>=0}_SDL_GL_MakeCurrent.sig="ipp";function _SDL_GL_DeleteContext(e){e>>>=0}_SDL_GL_DeleteContext.sig="vp";var _SDL_GL_GetSwapInterval=()=>Browser.mainLoop.timingMode==1?Browser.mainLoop.timingValue:0;_SDL_GL_GetSwapInterval.sig="i";var _SDL_GL_SetSwapInterval=e=>{_emscripten_set_main_loop_timing(1,e)};_SDL_GL_SetSwapInterval.sig="ii";function _SDL_SetWindowTitle(e,r){e>>>=0,r>>>=0,r&&(document.title=UTF8ToString(r))}_SDL_SetWindowTitle.sig="vpp";function _SDL_GetWindowSize(e,r,t){e>>>=0,r>>>=0,t>>>=0;var n=Module.canvas.width,a=Module.canvas.height;r&&(HEAP32[r>>>2>>>0]=n),t&&(HEAP32[t>>>2>>>0]=a)}_SDL_GetWindowSize.sig="vppp";function _SDL_LogSetOutputFunction(e,r){e>>>=0,r>>>=0}_SDL_LogSetOutputFunction.sig="vpp";function _SDL_SetWindowFullscreen(e,r){return e>>>=0,Browser.isFullscreen?(Module.canvas.exitFullscreen(),1):0}_SDL_SetWindowFullscreen.sig="ipi";var _SDL_ClearError=()=>{};_SDL_ClearError.sig="v";var _SDL_SetGamma=(e,r,t)=>-1;_SDL_SetGamma.sig="ifff";function _SDL_SetGammaRamp(e,r,t){return e>>>=0,r>>>=0,t>>>=0,-1}_SDL_SetGammaRamp.sig="ippp";var _SDL_NumJoysticks=()=>{for(var e=0,r=SDL.getGamepads(),t=0;tSDL.lastJoystickState.hasOwnProperty(e+1)?1:0;_SDL_JoystickOpened.sig="ii";function _SDL_JoystickIndex(e){return e>>>=0,e-1}_SDL_JoystickIndex.sig="ip";function _SDL_JoystickNumAxes(e){e>>>=0;var r=SDL.getGamepad(e-1);return r?r.axes.length:0}_SDL_JoystickNumAxes.sig="ip";function _SDL_JoystickNumBalls(e){return e>>>=0,0}_SDL_JoystickNumBalls.sig="ip";function _SDL_JoystickNumHats(e){return e>>>=0,0}_SDL_JoystickNumHats.sig="ip";function _SDL_JoystickNumButtons(e){e>>>=0;var r=SDL.getGamepad(e-1);return r?r.buttons.length:0}_SDL_JoystickNumButtons.sig="ip";var _SDL_JoystickUpdate=()=>SDL.queryJoysticks();_SDL_JoystickUpdate.sig="v";var _SDL_JoystickEventState=e=>e<0?SDL.joystickEventState:SDL.joystickEventState=e;_SDL_JoystickEventState.sig="ii";function _SDL_JoystickGetAxis(e,r){e>>>=0;var t=SDL.getGamepad(e-1);return t&&t.axes.length>r?SDL.joystickAxisValueConversion(t.axes[r]):0}_SDL_JoystickGetAxis.sig="ipi";function _SDL_JoystickGetHat(e,r){return e>>>=0,0}_SDL_JoystickGetHat.sig="ipi";function _SDL_JoystickGetBall(e,r,t,n){return e>>>=0,t>>>=0,n>>>=0,-1}_SDL_JoystickGetBall.sig="ipipp";function _SDL_JoystickGetButton(e,r){e>>>=0;var t=SDL.getGamepad(e-1);return t&&t.buttons.length>r&&SDL.getJoystickButtonState(t.buttons[r])?1:0}_SDL_JoystickGetButton.sig="ipi";function _SDL_JoystickClose(e){e>>>=0,delete SDL.lastJoystickState[e]}_SDL_JoystickClose.sig="vp";var _SDL_InitSubSystem=e=>0;_SDL_InitSubSystem.sig="ii";function _SDL_RWFromConstMem(e,r){e>>>=0;var t=SDL.rwops.length;return SDL.rwops.push({bytes:e,count:r}),t}_SDL_RWFromConstMem.sig="ppi";var _SDL_RWFromMem=_SDL_RWFromConstMem;_SDL_RWFromMem.sig="ppi";var _SDL_GetNumAudioDrivers=()=>1;_SDL_GetNumAudioDrivers.sig="i";function _SDL_GetCurrentAudioDriver(){return stringToNewUTF8("Emscripten Audio")}_SDL_GetCurrentAudioDriver.sig="p";var _SDL_GetScancodeFromKey=e=>SDL.scanCodes[e];_SDL_GetScancodeFromKey.sig="ii";function _SDL_GetAudioDriver(e){return _SDL_GetCurrentAudioDriver()}_SDL_GetAudioDriver.sig="pi";var _SDL_EnableUNICODE=e=>{var r=SDL.unicode||0;return SDL.unicode=e,r};_SDL_EnableUNICODE.sig="ii";var _SDL_AddTimer=function(e,r,t){return r>>>=0,t>>>=0,safeSetTimeout(()=>getWasmTableEntry(r)(e,t),e)};_SDL_AddTimer.sig="iipp";var _SDL_RemoveTimer=e=>(clearTimeout(e),!0);_SDL_RemoveTimer.sig="ii";function _SDL_CreateThread(e,r,t,n){throw e>>>=0,r>>>=0,"SDL threads cannot be supported in the web platform because they assume shared state. See emscripten_create_worker etc. for a message-passing concurrency model that does let you run code in another thread."}_SDL_CreateThread.sig="ppp";function _SDL_WaitThread(e,r){throw e>>>=0,r>>>=0,"SDL_WaitThread"}_SDL_WaitThread.sig="vpp";function _SDL_GetThreadID(e){throw e>>>=0,"SDL_GetThreadID"}_SDL_GetThreadID.sig="pp";function _SDL_ThreadID(){return 0}_SDL_ThreadID.sig="p";function _SDL_AllocRW(){throw"SDL_AllocRW: TODO"}_SDL_AllocRW.sig="p";function _SDL_CondBroadcast(e){throw e>>>=0,"SDL_CondBroadcast: TODO"}_SDL_CondBroadcast.sig="ip";function _SDL_CondWaitTimeout(e,r,t){throw e>>>=0,r>>>=0,"SDL_CondWaitTimeout: TODO"}_SDL_CondWaitTimeout.sig="ippi";var _SDL_WM_IconifyWindow=()=>{throw"SDL_WM_IconifyWindow TODO"};_SDL_WM_IconifyWindow.sig="i";function _Mix_SetPostMix(e,r){return e>>>=0,r>>>=0,warnOnce("Mix_SetPostMix: TODO")}_Mix_SetPostMix.sig="vpp";function _Mix_VolumeChunk(e,r){throw e>>>=0,"Mix_VolumeChunk: TODO"}_Mix_VolumeChunk.sig="ipi";var _Mix_SetPosition=(e,r,t)=>{throw"Mix_SetPosition: TODO"};_Mix_SetPosition.sig="iiii";function _Mix_QuerySpec(e,r,t){throw e>>>=0,r>>>=0,t>>>=0,"Mix_QuerySpec: TODO"}_Mix_QuerySpec.sig="ippp";function _Mix_FadeInChannelTimed(e,r,t,n,a){throw r>>>=0,"Mix_FadeInChannelTimed"}_Mix_FadeInChannelTimed.sig="iipiii";var _Mix_FadeOutChannel=()=>{throw"Mix_FadeOutChannel"};_Mix_FadeOutChannel.sig="iii";function _Mix_Linked_Version(){throw"Mix_Linked_Version: TODO"}_Mix_Linked_Version.sig="p";function _SDL_SaveBMP_RW(e,r,t){throw e>>>=0,r>>>=0,"SDL_SaveBMP_RW: TODO"}_SDL_SaveBMP_RW.sig="ippi";function _SDL_WM_SetIcon(e,r){e>>>=0,r>>>=0}_SDL_WM_SetIcon.sig="vpp";var _SDL_HasRDTSC=()=>0;_SDL_HasRDTSC.sig="i";var _SDL_HasMMX=()=>0;_SDL_HasMMX.sig="i";var _SDL_HasMMXExt=()=>0;_SDL_HasMMXExt.sig="i";var _SDL_Has3DNow=()=>0;_SDL_Has3DNow.sig="i";var _SDL_Has3DNowExt=()=>0;_SDL_Has3DNowExt.sig="i";var _SDL_HasSSE=()=>0;_SDL_HasSSE.sig="i";var _SDL_HasSSE2=()=>0;_SDL_HasSSE2.sig="i";var _SDL_HasAltiVec=()=>0;_SDL_HasAltiVec.sig="i";var ALLOC_NORMAL=0,ALLOC_STACK=1,allocate=(e,r)=>{var t;return r==ALLOC_STACK?t=stackAlloc(e.length):t=_malloc(e.length),!e.subarray&&!e.slice&&(e=new Uint8Array(e)),HEAPU8.set(e,t>>>0),t},writeStringToMemory=(e,r,t)=>{warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var n,a;t&&(a=r+lengthBytesUTF8(e),n=HEAP8[a>>>0]),stringToUTF8(e,r,1/0),t&&(HEAP8[a>>>0]=n)},writeAsciiToMemory=(e,r,t)=>{for(var n=0;n>>0]=e.charCodeAt(n);t||(HEAP8[r>>>0]=0)},allocateUTF8=stringToNewUTF8,allocateUTF8OnStack=stringToUTF8OnStack,setErrNo=e=>(HEAP32[___errno_location()>>>2>>>0]=e,e),demangle=e=>(demangle.recursionGuard=(demangle.recursionGuard|0)+1,demangle.recursionGuard>1?e:withStackSave(()=>{try{var r=e;r.startsWith("__Z")&&(r=r.substr(1));var t=stringToUTF8OnStack(r),n=stackAlloc(4),a=___cxa_demangle(t,0,0,n);if(HEAP32[n>>>2>>>0]===0&&a)return UTF8ToString(a)}catch(o){}finally{_free(a),demangle.recursionGuard<2&&--demangle.recursionGuard}return e})),_emscripten_is_main_browser_thread=()=>!ENVIRONMENT_IS_WORKER,tupleRegistrations={},structRegistrations={},getTypeName=e=>{var r=___getTypeName(e),t=readLatin1String(r);return _free(r),t},getFunctionName=e=>{e=e.trim();let r=e.indexOf("(");return r!==-1?e.substr(0,r):e},getFunctionArgsName=e=>{e=e.trim();let r=e.indexOf("(")+1;return r!==0?e.substr(r,e.length-r-1).replaceAll(" ","").split(",").filter(t=>t.length):[]},heap32VectorToArray=(e,r)=>{for(var t=[],n=0;n>>2>>>0]);return t},requireRegisteredType=(e,r)=>{var t=registeredTypes[e];return t===void 0&&throwBindingError("".concat(r," has unknown type ").concat(getTypeName(e))),t};function usesDestructorStack(e){for(var r=1;r0?", ":"")+l),u+=(t||n?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n";var f=t?"rv":"";if(a)u+="runDestructors(destructors);\n";else for(var c=r?1:2;cObject.defineProperty(r,"name",{value:e}),extendError=(e,r)=>{var t=createNamedFunction(r,function(n){this.name=r,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+"\n"+a.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:"".concat(this.name,": ").concat(this.message)},t},UnboundTypeError,PureVirtualError,registeredInstances={},getInheritedInstanceCount=()=>Object.keys(registeredInstances).length,getLiveInheritedInstances=()=>{var e=[];for(var r in registeredInstances)registeredInstances.hasOwnProperty(r)&&e.push(registeredInstances[r]);return e},deletionQueue=[],flushPendingDeletes=()=>{for(;deletionQueue.length;){var e=deletionQueue.pop();e.$$.deleteScheduled=!1,e.delete()}},delayFunction,setDelayFunction=e=>{delayFunction=e,deletionQueue.length&&delayFunction&&delayFunction(flushPendingDeletes)},init_embind=()=>{Module.getInheritedInstanceCount=getInheritedInstanceCount,Module.getLiveInheritedInstances=getLiveInheritedInstances,Module.flushPendingDeletes=flushPendingDeletes,Module.setDelayFunction=setDelayFunction},throwUnboundTypeError=(e,r)=>{var t=[],n={};function a(o){if(!n[o]&&!registeredTypes[o]){if(typeDependencies[o]){typeDependencies[o].forEach(a);return}t.push(o),n[o]=!0}}throw r.forEach(a),new UnboundTypeError("".concat(e,": ")+t.map(getTypeName).join([", "]))},ensureOverloadTable=(e,r,t)=>{if(e[r].overloadTable===void 0){var n=e[r];e[r]=function(...a){return e[r].overloadTable.hasOwnProperty(a.length)||throwBindingError("Function '".concat(t,"' called with an invalid number of arguments (").concat(a.length,") - expects one of (").concat(e[r].overloadTable,")!")),e[r].overloadTable[a.length].apply(this,a)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},exposePublicSymbol=(e,r,t)=>{Module.hasOwnProperty(e)?((t===void 0||Module[e].overloadTable!==void 0&&Module[e].overloadTable[t]!==void 0)&&throwBindingError("Cannot register public name '".concat(e,"' twice")),ensureOverloadTable(Module,e,e),Module.hasOwnProperty(t)&&throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (".concat(t,")!")),Module[e].overloadTable[t]=r):(Module[e]=r,t!==void 0&&(Module[e].numArguments=t))},replacePublicSymbol=(e,r,t)=>{Module.hasOwnProperty(e)||throwInternalError("Replacing nonexistant public symbol"),Module[e].overloadTable!==void 0&&t!==void 0?Module[e].overloadTable[t]=r:(Module[e]=r,Module[e].argCount=t)},getBasestPointer=(e,r)=>{for(r===void 0&&throwBindingError("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},registerInheritedInstance=(e,r,t)=>{r=getBasestPointer(e,r),registeredInstances.hasOwnProperty(r)?throwBindingError("Tried to register registered instance: ".concat(r)):registeredInstances[r]=t},unregisterInheritedInstance=(e,r)=>{r=getBasestPointer(e,r),registeredInstances.hasOwnProperty(r)?delete registeredInstances[r]:throwBindingError("Tried to unregister unregistered instance: ".concat(r))},getInheritedInstance=(e,r)=>(r=getBasestPointer(e,r),registeredInstances[r]),registeredPointers={},enumReadValueFromPointer=(e,r,t)=>{switch(r){case 1:return t?function(n){return this.fromWireType(HEAP8[n>>>0])}:function(n){return this.fromWireType(HEAPU8[n>>>0])};case 2:return t?function(n){return this.fromWireType(HEAP16[n>>>1>>>0])}:function(n){return this.fromWireType(HEAPU16[n>>>1>>>0])};case 4:return t?function(n){return this.fromWireType(HEAP32[n>>>2>>>0])}:function(n){return this.fromWireType(HEAPU32[n>>>2>>>0])};default:throw new TypeError("invalid integer width (".concat(r,"): ").concat(e))}};function __embind_register_user_type(e,r){e>>>=0,r>>>=0,__embind_register_emval(e)}__embind_register_user_type.sig="vpp";function __embind_register_optional(e,r){e>>>=0,r>>>=0,__embind_register_emval(e)}__embind_register_optional.sig="vpp";var runDestructors=e=>{for(;e.length;){var r=e.pop(),t=e.pop();t(r)}};function newFunc(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type ".concat(typeof e," which is not a function"));var t=createNamedFunction(e.name||"unknownFunctionName",function(){});t.prototype=e.prototype;var n=new t,a=e.apply(n,r);return a instanceof Object?a:n}function craftInvokerFunction(e,r,t,n,a,o){var _=r.length;_<2&&throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var l=r[1]!==null&&t!==null,c=usesDestructorStack(r),u=r[0].name!=="void",d=[e,throwBindingError,n,a,runDestructors,r[0],r[1]],p=0;p<_-2;++p)d.push(r[p+2]);if(!c)for(var p=l?1:2;p{e=readLatin1String(e);function t(){return e.includes("j")?getDynCaller(e,r):getWasmTableEntry(r)}var n=t();return typeof n!="function"&&throwBindingError("unknown function pointer with signature ".concat(e,": ").concat(r)),n};function __embind_register_function(e,r,t,n,a,o,_){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0;var l=heap32VectorToArray(r,t);e=readLatin1String(e),e=getFunctionName(e),a=embind__requireFunction(n,a),exposePublicSymbol(e,function(){throwUnboundTypeError("Cannot call ".concat(e," due to unbound types"),l)},r-1),whenDependentTypesAreResolved([],l,c=>{var u=[c[0],null].concat(c.slice(1));return replacePublicSymbol(e,craftInvokerFunction(e,u,null,a,o,_),r-1),[]})}__embind_register_function.sig="vpippppi";function __embind_register_value_array(e,r,t,n,a,o){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,tupleRegistrations[e]={name:readLatin1String(r),rawConstructor:embind__requireFunction(t,n),rawDestructor:embind__requireFunction(a,o),elements:[]}}__embind_register_value_array.sig="vpppppp";function __embind_register_value_array_element(e,r,t,n,a,o,_,l,c){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,tupleRegistrations[e].elements.push({getterReturnType:r,getter:embind__requireFunction(t,n),getterContext:a,setterArgumentType:o,setter:embind__requireFunction(_,l),setterContext:c})}__embind_register_value_array_element.sig="vppppppppp";var __embind_finalize_value_array=function(e){e>>>=0;var r=tupleRegistrations[e];delete tupleRegistrations[e];var t=r.elements,n=t.length,a=t.map(l=>l.getterReturnType).concat(t.map(l=>l.setterArgumentType)),o=r.rawConstructor,_=r.rawDestructor;whenDependentTypesAreResolved([e],a,l=>(t.forEach((c,u)=>{var d=l[u],p=c.getter,f=c.getterContext,m=l[u+n],g=c.setter,v=c.setterContext;c.read=S=>d.fromWireType(p(f,S)),c.write=(S,y)=>{var h=[];g(v,S,m.toWireType(h,y)),runDestructors(h)}}),[{name:r.name,fromWireType:c=>{for(var u=new Array(n),d=0;d{if(n!==u.length)throw new TypeError("Incorrect number of tuple elements for ".concat(r.name,": expected=").concat(n,", actual=").concat(u.length));for(var d=o(),p=0;p>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,structRegistrations[e]={name:readLatin1String(r),rawConstructor:embind__requireFunction(t,n),rawDestructor:embind__requireFunction(a,o),fields:[]}}__embind_register_value_object.sig="vpppppp";function __embind_register_value_object_field(e,r,t,n,a,o,_,l,c,u){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,structRegistrations[e].fields.push({fieldName:readLatin1String(r),getterReturnType:t,getter:embind__requireFunction(n,a),getterContext:o,setterArgumentType:_,setter:embind__requireFunction(l,c),setterContext:u})}__embind_register_value_object_field.sig="vpppppppppp";var __embind_finalize_value_object=function(e){e>>>=0;var r=structRegistrations[e];delete structRegistrations[e];var t=r.rawConstructor,n=r.rawDestructor,a=r.fields,o=a.map(_=>_.getterReturnType).concat(a.map(_=>_.setterArgumentType));whenDependentTypesAreResolved([e],o,_=>{var l={};return a.forEach((c,u)=>{var d=c.fieldName,p=_[u],f=c.getter,m=c.getterContext,g=_[u+a.length],v=c.setter,S=c.setterContext;l[d]={read:y=>p.fromWireType(f(m,y)),write:(y,h)=>{var b=[];v(S,y,g.toWireType(b,h)),runDestructors(b)}}}),[{name:r.name,fromWireType:c=>{var u={};for(var d in l)u[d]=l[d].read(c);return n(c),u},toWireType:(c,u)=>{for(var d in l)if(!(d in u))throw new TypeError('Missing field: "'.concat(d,'"'));var p=t();for(d in l)l[d].write(p,u[d]);return c!==null&&c.push(n,p),p},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:n}]})};__embind_finalize_value_object.sig="vp";var upcastPointer=(e,r,t)=>{for(;r!==t;)r.upcast||throwBindingError("Expected null or instance of ".concat(t.name,", got an instance of ").concat(r.name)),e=r.upcast(e),r=r.baseClass;return e};function genericPointerToWireType(e,r){var t;if(r===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),this.isSmartPointer?(t=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,t),t):0;(!r||!r.$$)&&throwBindingError('Cannot pass "'.concat(embindRepr(r),'" as a ').concat(this.name)),r.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),!this.isConst&&r.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name," to parameter type ").concat(this.name));var n=r.$$.ptrType.registeredClass;if(t=upcastPointer(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(r.$$.smartPtr===void 0&&throwBindingError("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:throwBindingError("Cannot convert argument of type ".concat(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name," to parameter type ").concat(this.name));break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var a=r.clone();t=this.rawShare(t,Emval.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,t)}break;default:throwBindingError("Unsupporting sharing policy")}return t}function constNoSmartPtrRawPointerToWireType(e,r){if(r===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;r.$$||throwBindingError('Cannot pass "'.concat(embindRepr(r),'" as a ').concat(this.name)),r.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name));var t=r.$$.ptrType.registeredClass,n=upcastPointer(r.$$.ptr,t,this.registeredClass);return n}function nonConstNoSmartPtrRawPointerToWireType(e,r){if(r===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;r.$$||throwBindingError('Cannot pass "'.concat(embindRepr(r),'" as a ').concat(this.name)),r.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),r.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(r.$$.ptrType.name," to parameter type ").concat(this.name));var t=r.$$.ptrType.registeredClass,n=upcastPointer(r.$$.ptr,t,this.registeredClass);return n}function RegisteredPointer(e,r,t,n,a,o,_,l,c,u,d){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=_,this.rawGetPointee=l,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=d,!a&&r.baseClass===void 0?n?(this.toWireType=constNoSmartPtrRawPointerToWireType,this.destructorFunction=null):(this.toWireType=nonConstNoSmartPtrRawPointerToWireType,this.destructorFunction=null):this.toWireType=genericPointerToWireType}var downcastPointer=(e,r,t)=>{if(r===t)return e;if(t.baseClass===void 0)return null;var n=downcastPointer(e,r,t.baseClass);return n===null?null:t.downcast(n)},finalizationRegistry=!1,detachFinalizer=e=>{},runDestructor=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},releaseClassHandle=e=>{e.count.value-=1;var r=e.count.value===0;r&&runDestructor(e)},attachFinalizer=e=>typeof FinalizationRegistry>"u"?(attachFinalizer=r=>r,e):(finalizationRegistry=new FinalizationRegistry(r=>{releaseClassHandle(r.$$)}),attachFinalizer=r=>{var t=r.$$,n=!!t.smartPtr;if(n){var a={$$:t};finalizationRegistry.register(r,a,r)}return r},detachFinalizer=r=>finalizationRegistry.unregister(r),attachFinalizer(e)),makeClassHandle=(e,r)=>{(!r.ptrType||!r.ptr)&&throwInternalError("makeClassHandle requires ptr and ptrType");var t=!!r.smartPtrType,n=!!r.smartPtr;return t!==n&&throwInternalError("Both smartPtrType and smartPtr must be specified"),r.count={value:1},attachFinalizer(Object.create(e,{$$:{value:r,writable:!0}}))};function RegisteredPointer_fromWireType(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=getInheritedInstance(this.registeredClass,r);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(r),_=registeredPointers[o];if(!_)return a.call(this);var l;this.isConst?l=_.constPointerType:l=_.pointerType;var c=downcastPointer(r,this.registeredClass,l.registeredClass);return c===null?a.call(this):this.isSmartPointer?makeClassHandle(l.registeredClass.instancePrototype,{ptrType:l,ptr:c,smartPtrType:this,smartPtr:e}):makeClassHandle(l.registeredClass.instancePrototype,{ptrType:l,ptr:c})}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var r;(r=this.rawDestructor)==null||r.call(this,e)},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,fromWireType:RegisteredPointer_fromWireType})},detachFinalizer_deps=["$finalizationRegistry"];function ClassHandle(){}var shallowCopyInternalPointer=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),throwInstanceAlreadyDeleted=e=>{function r(t){return t.$$.ptrType.registeredClass.name}throwBindingError(r(e)+" instance already deleted")},init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{isAliasOf(e){if(!(this instanceof ClassHandle)||!(e instanceof ClassHandle))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,a=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return r===n&&t===a},clone(){if(this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),detachFinalizer(this),releaseClassHandle(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),deletionQueue.push(this),deletionQueue.length===1&&delayFunction&&delayFunction(flushPendingDeletes),this.$$.deleteScheduled=!0,this}})};function RegisteredClass(e,r,t,n,a,o,_,l){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=_,this.downcast=l,this.pureVirtualFunctions=[]}var char_0=48,char_9=57,makeLegalFunctionName=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var r=e.charCodeAt(0);return r>=char_0&&r<=char_9?"_".concat(e):e};function __embind_register_class(e,r,t,n,a,o,_,l,c,u,d,p,f){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,d>>>=0,p>>>=0,f>>>=0,d=readLatin1String(d),o=embind__requireFunction(a,o),l&&(l=embind__requireFunction(_,l)),u&&(u=embind__requireFunction(c,u)),f=embind__requireFunction(p,f);var m=makeLegalFunctionName(d);exposePublicSymbol(m,function(){throwUnboundTypeError("Cannot construct ".concat(d," due to unbound types"),[n])}),whenDependentTypesAreResolved([e,r,t],n?[n]:[],g=>{var E,x;g=g[0];var v,S;n?(v=g.registeredClass,S=v.instancePrototype):S=ClassHandle.prototype;var y=createNamedFunction(d,function(...A){if(Object.getPrototypeOf(this)!==h)throw new BindingError("Use 'new' to construct "+d);if(b.constructor_body===void 0)throw new BindingError(d+" has no accessible constructor");var D=b.constructor_body[A.length];if(D===void 0)throw new BindingError("Tried to invoke ctor of ".concat(d," with invalid number of parameters (").concat(A.length,") - expected (").concat(Object.keys(b.constructor_body).toString(),") parameters instead!"));return D.apply(this,A)}),h=Object.create(S,{constructor:{value:y}});y.prototype=h;var b=new RegisteredClass(d,y,h,f,v,o,l,u);b.baseClass&&((x=(E=b.baseClass).__derivedClasses)!=null||(E.__derivedClasses=[]),b.baseClass.__derivedClasses.push(b));var w=new RegisteredPointer(d,b,!0,!1,!1),k=new RegisteredPointer(d+"*",b,!1,!1,!1),L=new RegisteredPointer(d+" const*",b,!1,!0,!1);return registeredPointers[e]={pointerType:k,constPointerType:L},replacePublicSymbol(m,y),[w,k,L]})}__embind_register_class.sig="vppppppppppppp";var __embind_register_class_constructor=function(e,r,t,n,a,o){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0;var _=heap32VectorToArray(r,t);a=embind__requireFunction(n,a);var l=[o],c=[];whenDependentTypesAreResolved([],[e],u=>{u=u[0];var d="constructor ".concat(u.name);if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[r-1]!==void 0)throw new BindingError("Cannot register multiple constructors with identical number of parameters (".concat(r-1,") for class '").concat(u.name,"'! Overload resolution is currently only performed using the parameter count, not actual type info!"));return u.registeredClass.constructor_body[r-1]=()=>{throwUnboundTypeError("Cannot construct ".concat(u.name," due to unbound types"),_)},whenDependentTypesAreResolved([],_,p=>(p.splice(1,0,null),u.registeredClass.constructor_body[r-1]=craftInvokerFunction(d,p,null,a,o),[])),[]})};__embind_register_class_constructor.sig="vpipppp";var validateThis=(e,r,t)=>(e instanceof Object||throwBindingError("".concat(t,' with invalid "this": ').concat(e)),e instanceof r.registeredClass.constructor||throwBindingError("".concat(t,' incompatible with "this" of type ').concat(e.constructor.name)),e.$$.ptr||throwBindingError("cannot call emscripten binding method ".concat(t," on deleted object")),upcastPointer(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)),__embind_register_class_function=function(e,r,t,n,a,o,_,l,c){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0;var u=heap32VectorToArray(t,n);r=readLatin1String(r),r=getFunctionName(r),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],d=>{d=d[0];var p="".concat(d.name,".").concat(r);r.startsWith("@@")&&(r=Symbol[r.substring(2)]),l&&d.registeredClass.pureVirtualFunctions.push(r);function f(){throwUnboundTypeError("Cannot call ".concat(p," due to unbound types"),u)}var m=d.registeredClass.instancePrototype,g=m[r];return g===void 0||g.overloadTable===void 0&&g.className!==d.name&&g.argCount===t-2?(f.argCount=t-2,f.className=d.name,m[r]=f):(ensureOverloadTable(m,r,p),m[r].overloadTable[t-2]=f),whenDependentTypesAreResolved([],u,v=>{var S=craftInvokerFunction(p,v,d,o,_,c);return m[r].overloadTable===void 0?(S.argCount=t-2,m[r]=S):m[r].overloadTable[t-2]=S,[]}),[]})};__embind_register_class_function.sig="vppippppii";var __embind_register_class_property=function(e,r,t,n,a,o,_,l,c,u){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,r=readLatin1String(r),a=embind__requireFunction(n,a),whenDependentTypesAreResolved([],[e],d=>{d=d[0];var p="".concat(d.name,".").concat(r),f={get(){throwUnboundTypeError("Cannot access ".concat(p," due to unbound types"),[t,_])},enumerable:!0,configurable:!0};return c?f.set=()=>throwUnboundTypeError("Cannot access ".concat(p," due to unbound types"),[t,_]):f.set=m=>throwBindingError(p+" is a read-only property"),Object.defineProperty(d.registeredClass.instancePrototype,r,f),whenDependentTypesAreResolved([],c?[t,_]:[t],m=>{var g=m[0],v={get(){var y=validateThis(this,d,p+" getter");return g.fromWireType(a(o,y))},enumerable:!0};if(c){c=embind__requireFunction(l,c);var S=m[1];v.set=function(y){var h=validateThis(this,d,p+" setter"),b=[];c(u,h,S.toWireType(b,y)),runDestructors(b)}}return Object.defineProperty(d.registeredClass.instancePrototype,r,v),[]}),[]})};__embind_register_class_property.sig="vpppppppppp";var __embind_register_class_class_function=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0;var c=heap32VectorToArray(t,n);r=readLatin1String(r),r=getFunctionName(r),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],u=>{u=u[0];var d="".concat(u.name,".").concat(r);function p(){throwUnboundTypeError("Cannot call ".concat(d," due to unbound types"),c)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var f=u.registeredClass.constructor;return f[r]===void 0?(p.argCount=t-1,f[r]=p):(ensureOverloadTable(f,r,d),f[r].overloadTable[t-1]=p),whenDependentTypesAreResolved([],c,m=>{var g=[m[0],null].concat(m.slice(1)),v=craftInvokerFunction(d,g,null,o,_,l);if(f[r].overloadTable===void 0?(v.argCount=t-1,f[r]=v):f[r].overloadTable[t-1]=v,u.registeredClass.__derivedClasses)for(let S of u.registeredClass.__derivedClasses)S.constructor.hasOwnProperty(r)||(S.constructor[r]=v);return[]}),[]})};__embind_register_class_class_function.sig="vppippppi";var __embind_register_class_class_property=function(e,r,t,n,a,o,_,l){e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,r=readLatin1String(r),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],c=>{c=c[0];var u="".concat(c.name,".").concat(r),d={get(){throwUnboundTypeError("Cannot access ".concat(u," due to unbound types"),[t])},enumerable:!0,configurable:!0};return l?d.set=()=>{throwUnboundTypeError("Cannot access ".concat(u," due to unbound types"),[t])}:d.set=p=>{throwBindingError("".concat(u," is a read-only property"))},Object.defineProperty(c.registeredClass.constructor,r,d),whenDependentTypesAreResolved([],[t],p=>{p=p[0];var f={get(){return p.fromWireType(o(n))},enumerable:!0};return l&&(l=embind__requireFunction(_,l),f.set=m=>{var g=[];l(n,p.toWireType(g,m)),runDestructors(g)}),Object.defineProperty(c.registeredClass.constructor,r,f),[]}),[]})};__embind_register_class_class_property.sig="vpppppppp";function __embind_create_inheriting_constructor(e,r,t){e>>>=0,r>>>=0,t>>>=0,e=readLatin1String(e),r=requireRegisteredType(r,"wrapper"),t=Emval.toValue(t);var n=r.registeredClass,a=n.instancePrototype,o=n.baseClass,_=o.instancePrototype,l=n.baseClass.constructor,c=createNamedFunction(e,function(...u){n.baseClass.pureVirtualFunctions.forEach((function(d){if(this[d]===_[d])throw new PureVirtualError("Pure virtual function ".concat(d," must be implemented in JavaScript"))}).bind(this)),Object.defineProperty(this,"__parent",{value:a}),this.__construct(...u)});return a.__construct=function(...d){this===a&&throwBindingError("Pass correct 'this' to __construct");var p=l.implement(this,...d);detachFinalizer(p);var f=p.$$;p.notifyOnDestruction(),f.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:f}}),attachFinalizer(this),registerInheritedInstance(n,f.ptr,this)},a.__destruct=function(){this===a&&throwBindingError("Pass correct 'this' to __destruct"),detachFinalizer(this),unregisterInheritedInstance(n,this.$$.ptr)},c.prototype=Object.create(a),Object.assign(c.prototype,t),Emval.toHandle(c)}__embind_create_inheriting_constructor.sig="pppp";var __embind_register_smart_ptr=function(e,r,t,n,a,o,_,l,c,u,d,p){e>>>=0,r>>>=0,t>>>=0,a>>>=0,o>>>=0,_>>>=0,l>>>=0,c>>>=0,u>>>=0,d>>>=0,p>>>=0,t=readLatin1String(t),o=embind__requireFunction(a,o),l=embind__requireFunction(_,l),u=embind__requireFunction(c,u),p=embind__requireFunction(d,p),whenDependentTypesAreResolved([e],[r],f=>{f=f[0];var m=new RegisteredPointer(t,f.registeredClass,!1,!1,!0,f,n,o,l,u,p);return[m]})};__embind_register_smart_ptr.sig="vpppipppppppp";function __embind_register_enum(e,r,t,n){e>>>=0,r>>>=0,t>>>=0,r=readLatin1String(r);function a(){}a.values={},registerType(e,{name:r,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,_)=>_.value,argPackAdvance:GenericWireTypeSize,readValueFromPointer:enumReadValueFromPointer(r,t,n),destructorFunction:null}),exposePublicSymbol(r,a)}__embind_register_enum.sig="vpppi";function __embind_register_enum_value(e,r,t){e>>>=0,r>>>=0;var n=requireRegisteredType(e,"enum");r=readLatin1String(r);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:createNamedFunction("".concat(n.name,"_").concat(r),function(){})}});a.values[t]=o,a[r]=o}__embind_register_enum_value.sig="vppi";var __embind_register_constant=function(e,r,t){e>>>=0,r>>>=0,e=readLatin1String(e),whenDependentTypesAreResolved([],[r],n=>(n=n[0],Module[e]=n.fromWireType(t),[]))};__embind_register_constant.sig="vppd";var emval_symbols={};function __emval_register_symbol(e){e>>>=0,emval_symbols[e]=readLatin1String(e)}__emval_register_symbol.sig="vp";var getStringOrSymbol=e=>{var r=emval_symbols[e];return r===void 0?readLatin1String(e):r};function __emval_incref(e){e>>>=0,e>9&&(emval_handles[e+1]+=1)}__emval_incref.sig="vp";function __emval_run_destructors(e){e>>>=0;var r=Emval.toValue(e);runDestructors(r),__emval_decref(e)}__emval_run_destructors.sig="vp";function __emval_new_array(){return Emval.toHandle([])}__emval_new_array.sig="p";function __emval_new_array_from_memory_view(e){e>>>=0,e=Emval.toValue(e);for(var r=new Array(e.length),t=0;t>>=0,Emval.toHandle(getStringOrSymbol(e))}__emval_new_cstring.sig="pp";function __emval_new_u8string(e){return e>>>=0,Emval.toHandle(UTF8ToString(e))}__emval_new_u8string.sig="pp";function __emval_new_u16string(e){return e>>>=0,Emval.toHandle(UTF16ToString(e))}__emval_new_u16string.sig="pp";function __emval_take_value(e,r){e>>>=0,r>>>=0,e=requireRegisteredType(e,"_emval_take_value");var t=e.readValueFromPointer(r);return Emval.toHandle(t)}__emval_take_value.sig="ppp";var emval_get_global=()=>typeof globalThis=="object"?globalThis:function(){return Function}()("return this")();function __emval_get_global(e){return e>>>=0,e===0?Emval.toHandle(emval_get_global()):(e=getStringOrSymbol(e),Emval.toHandle(emval_get_global()[e]))}__emval_get_global.sig="pp";function __emval_get_module_property(e){return e>>>=0,e=getStringOrSymbol(e),Emval.toHandle(Module[e])}__emval_get_module_property.sig="pp";function __emval_get_property(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),Emval.toHandle(e[r])}__emval_get_property.sig="ppp";function __emval_set_property(e,r,t){e>>>=0,r>>>=0,t>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),t=Emval.toValue(t),e[r]=t}__emval_set_property.sig="vppp";var emval_returnValue=(e,r,t)=>{var n=[],a=e.toWireType(n,t);return n.length&&(HEAPU32[r>>>2>>>0]=Emval.toHandle(n)),a};function __emval_as(e,r,t){return e>>>=0,r>>>=0,t>>>=0,e=Emval.toValue(e),r=requireRegisteredType(r,"emval::as"),emval_returnValue(r,t,e)}__emval_as.sig="dppp";function __emval_as_int64(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=requireRegisteredType(r,"emval::as"),r.toWireType(null,e)}__emval_as_int64.sig="ipp";function __emval_as_uint64(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=requireRegisteredType(r,"emval::as"),r.toWireType(null,e)}__emval_as_uint64.sig="ipp";function __emval_equals(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e==r}__emval_equals.sig="ipp";function __emval_strictly_equals(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e===r}__emval_strictly_equals.sig="ipp";function __emval_greater_than(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e>r}__emval_greater_than.sig="ipp";function __emval_less_than(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e>>=0,e=Emval.toValue(e),!e}__emval_not.sig="ip";var emval_methodCallers=[];function __emval_call(e,r,t,n){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,e=emval_methodCallers[e],r=Emval.toValue(r),e(null,r,t,n)}__emval_call.sig="dpppp";var emval_lookupTypes=(e,r)=>{for(var t=new Array(e),n=0;n>>2>>>0],"parameter "+n);return t},emval_addMethodCaller=e=>{var r=emval_methodCallers.length;return emval_methodCallers.push(e),r},reflectConstruct=Reflect.construct;function __emval_get_method_caller(e,r,t){r>>>=0;var n=emval_lookupTypes(e,r),a=n.shift();e--;var o="return function (obj, func, destructorsRef, args) {\n",_=0,l=[];t===0&&l.push("obj");for(var c=["retType"],u=[a],d=0;dg.name).join(", "),") => ").concat(a.name,">");return emval_addMethodCaller(createNamedFunction(m,f))}__emval_get_method_caller.sig="pipi";function __emval_call_method(e,r,t,n,a){return e>>>=0,r>>>=0,t>>>=0,n>>>=0,a>>>=0,e=emval_methodCallers[e],r=Emval.toValue(r),t=getStringOrSymbol(t),e(r,r[t],n,a)}__emval_call_method.sig="dppppp";function __emval_typeof(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(typeof e)}__emval_typeof.sig="pp";function __emval_instanceof(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e instanceof r}__emval_instanceof.sig="ipp";function __emval_is_number(e){return e>>>=0,e=Emval.toValue(e),typeof e=="number"}__emval_is_number.sig="ip";function __emval_is_string(e){return e>>>=0,e=Emval.toValue(e),typeof e=="string"}__emval_is_string.sig="ip";function __emval_in(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),e in r}__emval_in.sig="ipp";function __emval_delete(e,r){return e>>>=0,r>>>=0,e=Emval.toValue(e),r=Emval.toValue(r),delete e[r]}__emval_delete.sig="ipp";function __emval_throw(e){throw e>>>=0,e=Emval.toValue(e),e}__emval_throw.sig="ip";function __emval_iter_begin(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(e[Symbol.iterator]())}__emval_iter_begin.sig="pp";function __emval_iter_next(e){e>>>=0,e=Emval.toValue(e);var r=e.next();return r.done?0:Emval.toHandle(r.value)}__emval_iter_next.sig="pp";var __emval_coro_suspend=function(e,r){e>>>=0,r>>>=0,Emval.toValue(e).then(t=>{__emval_coro_resume(r,Emval.toHandle(t))})};__emval_coro_suspend.sig="vpp";var __emval_coro_make_promise=function(e,r){return e>>>=0,r>>>=0,Emval.toHandle(new Promise((t,n)=>{let a=()=>{try{___cxa_rethrow()}catch(o){n(o)}};HEAPU32[e>>>2>>>0]=Emval.toHandle(t),HEAPU32[r>>>2>>>0]=Emval.toHandle(a)}))};__emval_coro_make_promise.sig="ppp";function _duckdb_web_fs_file_sync(e){return globalThis.DUCKDB_RUNTIME.syncFile(Module,e)}_duckdb_web_fs_file_sync.sig="vi";function _duckdb_web_fs_file_remove(e,r){return globalThis.DUCKDB_RUNTIME.removeFile(Module,e,r)}registerWasmPlugin();var FSNode=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},readMode=365,writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(e){e?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(e){e?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}),FS.FSNode=FSNode,FS.createPreloadedFile=FS_createPreloadedFile,FS.staticInit(),embind_init_charCodes(),BindingError=Module.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},InternalError=Module.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},init_emval(),Module.requestFullscreen=Browser.requestFullscreen,Module.requestAnimationFrame=Browser.requestAnimationFrame,Module.setCanvasSize=Browser.setCanvasSize,Module.pauseMainLoop=Browser.mainLoop.pause,Module.resumeMainLoop=Browser.mainLoop.resume,Module.getUserMedia=Browser.getUserMedia,Module.createContext=Browser.createContext;for(var preloadedImages={},preloadedAudios={},GLctx,i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));for(var miniTempWebGLFloatBuffersStorage=new Float32Array(288),i=0;i<288;++i)miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i+1);for(var miniTempWebGLIntBuffersStorage=new Int32Array(288),i=0;i<288;++i)miniTempWebGLIntBuffers[i]=miniTempWebGLIntBuffersStorage.subarray(0,i+1);var emSetImmediate,emClearImmediate;if(typeof setImmediate<"u")emSetImmediate=setImmediateWrapped,emClearImmediate=clearImmediateWrapped;else if(typeof addEventListener=="function"){var __setImmediate_id_counter=0,__setImmediate_queue=[],__setImmediate_message_id="_si",__setImmediate_cb=e=>{e.data===__setImmediate_message_id&&(e.stopPropagation(),__setImmediate_queue.shift()(),++__setImmediate_id_counter)};addEventListener("message",__setImmediate_cb,!0),emSetImmediate=e=>(postMessage(__setImmediate_message_id,"*"),__setImmediate_id_counter+__setImmediate_queue.push(e)-1),emClearImmediate=e=>{var r=e-__setImmediate_id_counter;r>=0&&r<__setImmediate_queue.length&&(__setImmediate_queue[r]=()=>{})}}UnboundTypeError=Module.UnboundTypeError=extendError(Error,"UnboundTypeError"),PureVirtualError=Module.PureVirtualError=extendError(Error,"PureVirtualError"),init_embind(),init_RegisteredPointer(),init_ClassHandle();var wasmImports={IMG_Init:_IMG_Init,IMG_Load:_IMG_Load,IMG_Load_RW:_IMG_Load_RW,IMG_Quit:_IMG_Quit,Mix_AllocateChannels:_Mix_AllocateChannels,Mix_ChannelFinished:_Mix_ChannelFinished,Mix_CloseAudio:_Mix_CloseAudio,Mix_FadeInChannelTimed:_Mix_FadeInChannelTimed,Mix_FadeInMusicPos:_Mix_FadeInMusicPos,Mix_FadeOutChannel:_Mix_FadeOutChannel,Mix_FadeOutMusic:_Mix_FadeOutMusic,Mix_FadingChannel:_Mix_FadingChannel,Mix_FreeChunk:_Mix_FreeChunk,Mix_FreeMusic:_Mix_FreeMusic,Mix_HaltChannel:_Mix_HaltChannel,Mix_HaltMusic:_Mix_HaltMusic,Mix_HookMusicFinished:_Mix_HookMusicFinished,Mix_Init:_Mix_Init,Mix_Linked_Version:_Mix_Linked_Version,Mix_LoadMUS:_Mix_LoadMUS,Mix_LoadMUS_RW:_Mix_LoadMUS_RW,Mix_LoadWAV:_Mix_LoadWAV,Mix_LoadWAV_RW:_Mix_LoadWAV_RW,Mix_OpenAudio:_Mix_OpenAudio,Mix_Pause:_Mix_Pause,Mix_PauseMusic:_Mix_PauseMusic,Mix_Paused:_Mix_Paused,Mix_PausedMusic:_Mix_PausedMusic,Mix_PlayChannelTimed:_Mix_PlayChannelTimed,Mix_PlayMusic:_Mix_PlayMusic,Mix_Playing:_Mix_Playing,Mix_PlayingMusic:_Mix_PlayingMusic,Mix_QuerySpec:_Mix_QuerySpec,Mix_QuickLoad_RAW:_Mix_QuickLoad_RAW,Mix_Quit:_Mix_Quit,Mix_ReserveChannels:_Mix_ReserveChannels,Mix_Resume:_Mix_Resume,Mix_ResumeMusic:_Mix_ResumeMusic,Mix_SetPanning:_Mix_SetPanning,Mix_SetPosition:_Mix_SetPosition,Mix_SetPostMix:_Mix_SetPostMix,Mix_Volume:_Mix_Volume,Mix_VolumeChunk:_Mix_VolumeChunk,Mix_VolumeMusic:_Mix_VolumeMusic,SDL_AddTimer:_SDL_AddTimer,SDL_AllocRW:_SDL_AllocRW,SDL_AudioDriverName:_SDL_AudioDriverName,SDL_AudioQuit:_SDL_AudioQuit,SDL_ClearError:_SDL_ClearError,SDL_CloseAudio:_SDL_CloseAudio,SDL_CondBroadcast:_SDL_CondBroadcast,SDL_CondSignal:_SDL_CondSignal,SDL_CondWait:_SDL_CondWait,SDL_CondWaitTimeout:_SDL_CondWaitTimeout,SDL_ConvertSurface:_SDL_ConvertSurface,SDL_CreateCond:_SDL_CreateCond,SDL_CreateMutex:_SDL_CreateMutex,SDL_CreateRGBSurface:_SDL_CreateRGBSurface,SDL_CreateRGBSurfaceFrom:_SDL_CreateRGBSurfaceFrom,SDL_CreateThread:_SDL_CreateThread,SDL_Delay:_SDL_Delay,SDL_DestroyCond:_SDL_DestroyCond,SDL_DestroyMutex:_SDL_DestroyMutex,SDL_DestroyRenderer:_SDL_DestroyRenderer,SDL_DestroyWindow:_SDL_DestroyWindow,SDL_DisplayFormatAlpha:_SDL_DisplayFormatAlpha,SDL_EnableKeyRepeat:_SDL_EnableKeyRepeat,SDL_EnableUNICODE:_SDL_EnableUNICODE,SDL_FillRect:_SDL_FillRect,SDL_Flip:_SDL_Flip,SDL_FreeRW:_SDL_FreeRW,SDL_FreeSurface:_SDL_FreeSurface,SDL_GL_DeleteContext:_SDL_GL_DeleteContext,SDL_GL_ExtensionSupported:_SDL_GL_ExtensionSupported,SDL_GL_GetAttribute:_SDL_GL_GetAttribute,SDL_GL_GetSwapInterval:_SDL_GL_GetSwapInterval,SDL_GL_MakeCurrent:_SDL_GL_MakeCurrent,SDL_GL_SetAttribute:_SDL_GL_SetAttribute,SDL_GL_SetSwapInterval:_SDL_GL_SetSwapInterval,SDL_GL_SwapBuffers:_SDL_GL_SwapBuffers,SDL_GL_SwapWindow:_SDL_GL_SwapWindow,SDL_GetAppState:_SDL_GetAppState,SDL_GetAudioDriver:_SDL_GetAudioDriver,SDL_GetClipRect:_SDL_GetClipRect,SDL_GetCurrentAudioDriver:_SDL_GetCurrentAudioDriver,SDL_GetError:_SDL_GetError,SDL_GetKeyName:_SDL_GetKeyName,SDL_GetKeyState:_SDL_GetKeyState,SDL_GetKeyboardState:_SDL_GetKeyboardState,SDL_GetModState:_SDL_GetModState,SDL_GetMouseState:_SDL_GetMouseState,SDL_GetNumAudioDrivers:_SDL_GetNumAudioDrivers,SDL_GetRGB:_SDL_GetRGB,SDL_GetRGBA:_SDL_GetRGBA,SDL_GetScancodeFromKey:_SDL_GetScancodeFromKey,SDL_GetThreadID:_SDL_GetThreadID,SDL_GetTicks:_SDL_GetTicks,SDL_GetVideoInfo:_SDL_GetVideoInfo,SDL_GetVideoSurface:_SDL_GetVideoSurface,SDL_GetWindowFlags:_SDL_GetWindowFlags,SDL_GetWindowSize:_SDL_GetWindowSize,SDL_Has3DNow:_SDL_Has3DNow,SDL_Has3DNowExt:_SDL_Has3DNowExt,SDL_HasAltiVec:_SDL_HasAltiVec,SDL_HasMMX:_SDL_HasMMX,SDL_HasMMXExt:_SDL_HasMMXExt,SDL_HasRDTSC:_SDL_HasRDTSC,SDL_HasSSE:_SDL_HasSSE,SDL_HasSSE2:_SDL_HasSSE2,SDL_Init:_SDL_Init,SDL_InitSubSystem:_SDL_InitSubSystem,SDL_JoystickClose:_SDL_JoystickClose,SDL_JoystickEventState:_SDL_JoystickEventState,SDL_JoystickGetAxis:_SDL_JoystickGetAxis,SDL_JoystickGetBall:_SDL_JoystickGetBall,SDL_JoystickGetButton:_SDL_JoystickGetButton,SDL_JoystickGetHat:_SDL_JoystickGetHat,SDL_JoystickIndex:_SDL_JoystickIndex,SDL_JoystickName:_SDL_JoystickName,SDL_JoystickNumAxes:_SDL_JoystickNumAxes,SDL_JoystickNumBalls:_SDL_JoystickNumBalls,SDL_JoystickNumButtons:_SDL_JoystickNumButtons,SDL_JoystickNumHats:_SDL_JoystickNumHats,SDL_JoystickOpen:_SDL_JoystickOpen,SDL_JoystickOpened:_SDL_JoystickOpened,SDL_JoystickUpdate:_SDL_JoystickUpdate,SDL_Linked_Version:_SDL_Linked_Version,SDL_ListModes:_SDL_ListModes,SDL_LoadBMP_RW:_SDL_LoadBMP_RW,SDL_LockAudio:_SDL_LockAudio,SDL_LockSurface:_SDL_LockSurface,SDL_LogSetOutputFunction:_SDL_LogSetOutputFunction,SDL_LowerBlit:_SDL_LowerBlit,SDL_LowerBlitScaled:_SDL_LowerBlitScaled,SDL_MapRGB:_SDL_MapRGB,SDL_MapRGBA:_SDL_MapRGBA,SDL_NumJoysticks:_SDL_NumJoysticks,SDL_OpenAudio:_SDL_OpenAudio,SDL_PauseAudio:_SDL_PauseAudio,SDL_PeepEvents:_SDL_PeepEvents,SDL_PollEvent:_SDL_PollEvent,SDL_PumpEvents:_SDL_PumpEvents,SDL_PushEvent:_SDL_PushEvent,SDL_Quit:_SDL_Quit,SDL_QuitSubSystem:_SDL_QuitSubSystem,SDL_RWFromConstMem:_SDL_RWFromConstMem,SDL_RWFromFile:_SDL_RWFromFile,SDL_RWFromMem:_SDL_RWFromMem,SDL_RemoveTimer:_SDL_RemoveTimer,SDL_SaveBMP_RW:_SDL_SaveBMP_RW,SDL_SetAlpha:_SDL_SetAlpha,SDL_SetClipRect:_SDL_SetClipRect,SDL_SetColorKey:_SDL_SetColorKey,SDL_SetColors:_SDL_SetColors,SDL_SetError:_SDL_SetError,SDL_SetGamma:_SDL_SetGamma,SDL_SetGammaRamp:_SDL_SetGammaRamp,SDL_SetPalette:_SDL_SetPalette,SDL_SetVideoMode:_SDL_SetVideoMode,SDL_SetWindowFullscreen:_SDL_SetWindowFullscreen,SDL_SetWindowTitle:_SDL_SetWindowTitle,SDL_ShowCursor:_SDL_ShowCursor,SDL_StartTextInput:_SDL_StartTextInput,SDL_StopTextInput:_SDL_StopTextInput,SDL_ThreadID:_SDL_ThreadID,SDL_UnlockAudio:_SDL_UnlockAudio,SDL_UnlockSurface:_SDL_UnlockSurface,SDL_UpdateRect:_SDL_UpdateRect,SDL_UpdateRects:_SDL_UpdateRects,SDL_UpperBlit:_SDL_UpperBlit,SDL_UpperBlitScaled:_SDL_UpperBlitScaled,SDL_VideoDriverName:_SDL_VideoDriverName,SDL_VideoModeOK:_SDL_VideoModeOK,SDL_VideoQuit:_SDL_VideoQuit,SDL_WM_GrabInput:_SDL_WM_GrabInput,SDL_WM_IconifyWindow:_SDL_WM_IconifyWindow,SDL_WM_SetCaption:_SDL_WM_SetCaption,SDL_WM_SetIcon:_SDL_WM_SetIcon,SDL_WM_ToggleFullScreen:_SDL_WM_ToggleFullScreen,SDL_WaitThread:_SDL_WaitThread,SDL_WarpMouse:_SDL_WarpMouse,SDL_WasInit:_SDL_WasInit,SDL_mutexP:_SDL_mutexP,SDL_mutexV:_SDL_mutexV,TTF_CloseFont:_TTF_CloseFont,TTF_FontAscent:_TTF_FontAscent,TTF_FontDescent:_TTF_FontDescent,TTF_FontHeight:_TTF_FontHeight,TTF_FontLineSkip:_TTF_FontLineSkip,TTF_GlyphMetrics:_TTF_GlyphMetrics,TTF_Init:_TTF_Init,TTF_OpenFont:_TTF_OpenFont,TTF_Quit:_TTF_Quit,TTF_RenderText_Blended:_TTF_RenderText_Blended,TTF_RenderText_Shaded:_TTF_RenderText_Shaded,TTF_RenderText_Solid:_TTF_RenderText_Solid,TTF_RenderUTF8_Solid:_TTF_RenderUTF8_Solid,TTF_SizeText:_TTF_SizeText,TTF_SizeUTF8:_TTF_SizeUTF8,XChangeWindowAttributes:_XChangeWindowAttributes,XCreateWindow:_XCreateWindow,XInternAtom:_XInternAtom,XMapWindow:_XMapWindow,XOpenDisplay:_XOpenDisplay,XPending:_XPending,XSendEvent:_XSendEvent,XSetWMHints:_XSetWMHints,XStoreName:_XStoreName,_Unwind_Backtrace:__Unwind_Backtrace,_Unwind_FindEnclosingFunction:__Unwind_FindEnclosingFunction,_Unwind_GetIPInfo:__Unwind_GetIPInfo,_ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm:__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm,__asctime_r:___asctime_r,__assert_fail:___assert_fail,__c_longjmp:___c_longjmp,__call_sighandler:___call_sighandler,__cpp_exception:___cpp_exception,__global_base:___global_base,__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__syscall__newselect:___syscall__newselect,__syscall_accept4:___syscall_accept4,__syscall_bind:___syscall_bind,__syscall_chdir:___syscall_chdir,__syscall_chmod:___syscall_chmod,__syscall_connect:___syscall_connect,__syscall_dup:___syscall_dup,__syscall_dup3:___syscall_dup3,__syscall_faccessat:___syscall_faccessat,__syscall_fadvise64:___syscall_fadvise64,__syscall_fallocate:___syscall_fallocate,__syscall_fchdir:___syscall_fchdir,__syscall_fchmod:___syscall_fchmod,__syscall_fchmodat:___syscall_fchmodat,__syscall_fchown32:___syscall_fchown32,__syscall_fchownat:___syscall_fchownat,__syscall_fcntl64:___syscall_fcntl64,__syscall_fdatasync:___syscall_fdatasync,__syscall_fstat64:___syscall_fstat64,__syscall_fstatfs64:___syscall_fstatfs64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getcwd:___syscall_getcwd,__syscall_getdents64:___syscall_getdents64,__syscall_getpeername:___syscall_getpeername,__syscall_getsockname:___syscall_getsockname,__syscall_getsockopt:___syscall_getsockopt,__syscall_ioctl:___syscall_ioctl,__syscall_listen:___syscall_listen,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_mknodat:___syscall_mknodat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_pipe:___syscall_pipe,__syscall_poll:___syscall_poll,__syscall_readlinkat:___syscall_readlinkat,__syscall_recvfrom:___syscall_recvfrom,__syscall_recvmsg:___syscall_recvmsg,__syscall_renameat:___syscall_renameat,__syscall_rmdir:___syscall_rmdir,__syscall_sendmsg:___syscall_sendmsg,__syscall_sendto:___syscall_sendto,__syscall_socket:___syscall_socket,__syscall_stat64:___syscall_stat64,__syscall_statfs64:___syscall_statfs64,__syscall_symlink:___syscall_symlink,__syscall_symlinkat:___syscall_symlinkat,__syscall_truncate64:___syscall_truncate64,__syscall_unlinkat:___syscall_unlinkat,__syscall_utimensat:___syscall_utimensat,__table_base:___table_base,_dlopen_js:__dlopen_js,_dlsym_catchup_js:__dlsym_catchup_js,_dlsym_js:__dlsym_js,_embind_create_inheriting_constructor:__embind_create_inheriting_constructor,_embind_finalize_value_array:__embind_finalize_value_array,_embind_finalize_value_object:__embind_finalize_value_object,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_class:__embind_register_class,_embind_register_class_class_function:__embind_register_class_class_function,_embind_register_class_class_property:__embind_register_class_class_property,_embind_register_class_constructor:__embind_register_class_constructor,_embind_register_class_function:__embind_register_class_function,_embind_register_class_property:__embind_register_class_property,_embind_register_constant:__embind_register_constant,_embind_register_emval:__embind_register_emval,_embind_register_enum:__embind_register_enum,_embind_register_enum_value:__embind_register_enum_value,_embind_register_float:__embind_register_float,_embind_register_function:__embind_register_function,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_optional:__embind_register_optional,_embind_register_smart_ptr:__embind_register_smart_ptr,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_user_type:__embind_register_user_type,_embind_register_value_array:__embind_register_value_array,_embind_register_value_array_element:__embind_register_value_array_element,_embind_register_value_object:__embind_register_value_object,_embind_register_value_object_field:__embind_register_value_object_field,_embind_register_void:__embind_register_void,_emscripten_dlopen_js:__emscripten_dlopen_js,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_get_progname:__emscripten_get_progname,_emscripten_lookup_name:__emscripten_lookup_name,_emscripten_push_main_loop_blocker:__emscripten_push_main_loop_blocker,_emscripten_push_uncounted_main_loop_blocker:__emscripten_push_uncounted_main_loop_blocker,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_set_offscreencanvas_size:__emscripten_set_offscreencanvas_size,_emscripten_system:__emscripten_system,_emval_as:__emval_as,_emval_as_int64:__emval_as_int64,_emval_as_uint64:__emval_as_uint64,_emval_call:__emval_call,_emval_call_method:__emval_call_method,_emval_coro_make_promise:__emval_coro_make_promise,_emval_coro_suspend:__emval_coro_suspend,_emval_decref:__emval_decref,_emval_delete:__emval_delete,_emval_equals:__emval_equals,_emval_get_global:__emval_get_global,_emval_get_method_caller:__emval_get_method_caller,_emval_get_module_property:__emval_get_module_property,_emval_get_property:__emval_get_property,_emval_greater_than:__emval_greater_than,_emval_in:__emval_in,_emval_incref:__emval_incref,_emval_instanceof:__emval_instanceof,_emval_is_number:__emval_is_number,_emval_is_string:__emval_is_string,_emval_iter_begin:__emval_iter_begin,_emval_iter_next:__emval_iter_next,_emval_less_than:__emval_less_than,_emval_new_array:__emval_new_array,_emval_new_array_from_memory_view:__emval_new_array_from_memory_view,_emval_new_cstring:__emval_new_cstring,_emval_new_object:__emval_new_object,_emval_new_u16string:__emval_new_u16string,_emval_new_u8string:__emval_new_u8string,_emval_not:__emval_not,_emval_register_symbol:__emval_register_symbol,_emval_run_destructors:__emval_run_destructors,_emval_set_property:__emval_set_property,_emval_strictly_equals:__emval_strictly_equals,_emval_take_value:__emval_take_value,_emval_throw:__emval_throw,_emval_typeof:__emval_typeof,_glGetActiveAttribOrUniform:__glGetActiveAttribOrUniform,_gmtime_js:__gmtime_js,_localtime_js:__localtime_js,_mktime_js:__mktime_js,_mmap_js:__mmap_js,_msync_js:__msync_js,_munmap_js:__munmap_js,_setitimer_js:__setitimer_js,_timegm_js:__timegm_js,_tzset_js:__tzset_js,abort:_abort,alBuffer3f:_alBuffer3f,alBuffer3i:_alBuffer3i,alBufferData:_alBufferData,alBufferf:_alBufferf,alBufferfv:_alBufferfv,alBufferi:_alBufferi,alBufferiv:_alBufferiv,alDeleteBuffers:_alDeleteBuffers,alDeleteSources:_alDeleteSources,alDisable:_alDisable,alDistanceModel:_alDistanceModel,alDopplerFactor:_alDopplerFactor,alDopplerVelocity:_alDopplerVelocity,alEnable:_alEnable,alGenBuffers:_alGenBuffers,alGenSources:_alGenSources,alGetBoolean:_alGetBoolean,alGetBooleanv:_alGetBooleanv,alGetBuffer3f:_alGetBuffer3f,alGetBuffer3i:_alGetBuffer3i,alGetBufferf:_alGetBufferf,alGetBufferfv:_alGetBufferfv,alGetBufferi:_alGetBufferi,alGetBufferiv:_alGetBufferiv,alGetDouble:_alGetDouble,alGetDoublev:_alGetDoublev,alGetEnumValue:_alGetEnumValue,alGetError:_alGetError,alGetFloat:_alGetFloat,alGetFloatv:_alGetFloatv,alGetInteger:_alGetInteger,alGetIntegerv:_alGetIntegerv,alGetListener3f:_alGetListener3f,alGetListener3i:_alGetListener3i,alGetListenerf:_alGetListenerf,alGetListenerfv:_alGetListenerfv,alGetListeneri:_alGetListeneri,alGetListeneriv:_alGetListeneriv,alGetSource3f:_alGetSource3f,alGetSource3i:_alGetSource3i,alGetSourcef:_alGetSourcef,alGetSourcefv:_alGetSourcefv,alGetSourcei:_alGetSourcei,alGetSourceiv:_alGetSourceiv,alGetString:_alGetString,alIsBuffer:_alIsBuffer,alIsEnabled:_alIsEnabled,alIsExtensionPresent:_alIsExtensionPresent,alIsSource:_alIsSource,alListener3f:_alListener3f,alListener3i:_alListener3i,alListenerf:_alListenerf,alListenerfv:_alListenerfv,alListeneri:_alListeneri,alListeneriv:_alListeneriv,alSource3f:_alSource3f,alSource3i:_alSource3i,alSourcePause:_alSourcePause,alSourcePausev:_alSourcePausev,alSourcePlay:_alSourcePlay,alSourcePlayv:_alSourcePlayv,alSourceQueueBuffers:_alSourceQueueBuffers,alSourceRewind:_alSourceRewind,alSourceRewindv:_alSourceRewindv,alSourceStop:_alSourceStop,alSourceStopv:_alSourceStopv,alSourceUnqueueBuffers:_alSourceUnqueueBuffers,alSourcef:_alSourcef,alSourcefv:_alSourcefv,alSourcei:_alSourcei,alSourceiv:_alSourceiv,alSpeedOfSound:_alSpeedOfSound,alcCaptureCloseDevice:_alcCaptureCloseDevice,alcCaptureOpenDevice:_alcCaptureOpenDevice,alcCaptureSamples:_alcCaptureSamples,alcCaptureStart:_alcCaptureStart,alcCaptureStop:_alcCaptureStop,alcCloseDevice:_alcCloseDevice,alcCreateContext:_alcCreateContext,alcDestroyContext:_alcDestroyContext,alcGetContextsDevice:_alcGetContextsDevice,alcGetCurrentContext:_alcGetCurrentContext,alcGetEnumValue:_alcGetEnumValue,alcGetError:_alcGetError,alcGetIntegerv:_alcGetIntegerv,alcGetString:_alcGetString,alcIsExtensionPresent:_alcIsExtensionPresent,alcMakeContextCurrent:_alcMakeContextCurrent,alcOpenDevice:_alcOpenDevice,alcProcessContext:_alcProcessContext,alcSuspendContext:_alcSuspendContext,boxColor:_boxColor,boxRGBA:_boxRGBA,clock_res_get:_clock_res_get,clock_time_get:_clock_time_get,duckdb_web_fs_directory_create:_duckdb_web_fs_directory_create,duckdb_web_fs_directory_exists:_duckdb_web_fs_directory_exists,duckdb_web_fs_directory_list_files:_duckdb_web_fs_directory_list_files,duckdb_web_fs_directory_remove:_duckdb_web_fs_directory_remove,duckdb_web_fs_file_close:_duckdb_web_fs_file_close,duckdb_web_fs_file_exists:_duckdb_web_fs_file_exists,duckdb_web_fs_file_get_last_modified_time:_duckdb_web_fs_file_get_last_modified_time,duckdb_web_fs_file_move:_duckdb_web_fs_file_move,duckdb_web_fs_file_open:_duckdb_web_fs_file_open,duckdb_web_fs_file_read:_duckdb_web_fs_file_read,duckdb_web_fs_file_remove:_duckdb_web_fs_file_remove,duckdb_web_fs_file_sync:_duckdb_web_fs_file_sync,duckdb_web_fs_file_truncate:_duckdb_web_fs_file_truncate,duckdb_web_fs_file_write:_duckdb_web_fs_file_write,duckdb_web_fs_get_default_data_protocol:_duckdb_web_fs_get_default_data_protocol,duckdb_web_fs_glob:_duckdb_web_fs_glob,duckdb_web_test_platform_feature:_duckdb_web_test_platform_feature,duckdb_web_udf_scalar_call:_duckdb_web_udf_scalar_call,eglBindAPI:_eglBindAPI,eglChooseConfig:_eglChooseConfig,eglCreateContext:_eglCreateContext,eglCreateWindowSurface:_eglCreateWindowSurface,eglDestroyContext:_eglDestroyContext,eglDestroySurface:_eglDestroySurface,eglGetConfigAttrib:_eglGetConfigAttrib,eglGetConfigs:_eglGetConfigs,eglGetCurrentContext:_eglGetCurrentContext,eglGetCurrentDisplay:_eglGetCurrentDisplay,eglGetCurrentSurface:_eglGetCurrentSurface,eglGetDisplay:_eglGetDisplay,eglGetError:_eglGetError,eglInitialize:_eglInitialize,eglMakeCurrent:_eglMakeCurrent,eglQueryAPI:_eglQueryAPI,eglQueryContext:_eglQueryContext,eglQueryString:_eglQueryString,eglQuerySurface:_eglQuerySurface,eglReleaseThread:_eglReleaseThread,eglSwapBuffers:_eglSwapBuffers,eglSwapInterval:_eglSwapInterval,eglTerminate:_eglTerminate,eglWaitClient:_eglWaitClient,eglWaitGL:_eglWaitGL,eglWaitNative:_eglWaitNative,ellipseColor:_ellipseColor,ellipseRGBA:_ellipseRGBA,emscripten_SDL_SetEventHandler:_emscripten_SDL_SetEventHandler,emscripten_alcDevicePauseSOFT:_emscripten_alcDevicePauseSOFT,emscripten_alcDeviceResumeSOFT:_emscripten_alcDeviceResumeSOFT,emscripten_alcGetStringiSOFT:_emscripten_alcGetStringiSOFT,emscripten_alcResetDeviceSOFT:_emscripten_alcResetDeviceSOFT,emscripten_asm_const_async_on_main_thread:_emscripten_asm_const_async_on_main_thread,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_double_sync_on_main_thread:_emscripten_asm_const_double_sync_on_main_thread,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_asm_const_int_sync_on_main_thread:_emscripten_asm_const_int_sync_on_main_thread,emscripten_asm_const_ptr:_emscripten_asm_const_ptr,emscripten_asm_const_ptr_sync_on_main_thread:_emscripten_asm_const_ptr_sync_on_main_thread,emscripten_async_call:_emscripten_async_call,emscripten_async_load_script:_emscripten_async_load_script,emscripten_async_run_script:_emscripten_async_run_script,emscripten_async_wget:_emscripten_async_wget,emscripten_async_wget2:_emscripten_async_wget2,emscripten_async_wget2_abort:_emscripten_async_wget2_abort,emscripten_async_wget2_data:_emscripten_async_wget2_data,emscripten_async_wget_data:_emscripten_async_wget_data,emscripten_call_worker:_emscripten_call_worker,emscripten_cancel_animation_frame:_emscripten_cancel_animation_frame,emscripten_cancel_main_loop:_emscripten_cancel_main_loop,emscripten_clear_immediate:_emscripten_clear_immediate,emscripten_clear_interval:_emscripten_clear_interval,emscripten_clear_timeout:_emscripten_clear_timeout,emscripten_console_error:_emscripten_console_error,emscripten_console_log:_emscripten_console_log,emscripten_console_warn:_emscripten_console_warn,emscripten_create_worker:_emscripten_create_worker,emscripten_date_now:_emscripten_date_now,emscripten_debugger:_emscripten_debugger,emscripten_destroy_worker:_emscripten_destroy_worker,emscripten_enter_soft_fullscreen:_emscripten_enter_soft_fullscreen,emscripten_err:_emscripten_err,emscripten_errn:_emscripten_errn,emscripten_exit_fullscreen:_emscripten_exit_fullscreen,emscripten_exit_pointerlock:_emscripten_exit_pointerlock,emscripten_exit_soft_fullscreen:_emscripten_exit_soft_fullscreen,emscripten_exit_with_live_runtime:_emscripten_exit_with_live_runtime,emscripten_fiber_swap:_emscripten_fiber_swap,emscripten_force_exit:_emscripten_force_exit,emscripten_get_battery_status:_emscripten_get_battery_status,emscripten_get_callstack:_emscripten_get_callstack,emscripten_get_canvas_element_size:_emscripten_get_canvas_element_size,emscripten_get_canvas_size:_emscripten_get_canvas_size,emscripten_get_compiler_setting:_emscripten_get_compiler_setting,emscripten_get_device_pixel_ratio:_emscripten_get_device_pixel_ratio,emscripten_get_devicemotion_status:_emscripten_get_devicemotion_status,emscripten_get_deviceorientation_status:_emscripten_get_deviceorientation_status,emscripten_get_element_css_size:_emscripten_get_element_css_size,emscripten_get_fullscreen_status:_emscripten_get_fullscreen_status,emscripten_get_gamepad_status:_emscripten_get_gamepad_status,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_main_loop_timing:_emscripten_get_main_loop_timing,emscripten_get_module_name:_emscripten_get_module_name,emscripten_get_mouse_status:_emscripten_get_mouse_status,emscripten_get_now:_emscripten_get_now,emscripten_get_now_res:_emscripten_get_now_res,emscripten_get_num_gamepads:_emscripten_get_num_gamepads,emscripten_get_orientation_status:_emscripten_get_orientation_status,emscripten_get_pointerlock_status:_emscripten_get_pointerlock_status,emscripten_get_preloaded_image_data:_emscripten_get_preloaded_image_data,emscripten_get_preloaded_image_data_from_FILE:_emscripten_get_preloaded_image_data_from_FILE,emscripten_get_screen_size:_emscripten_get_screen_size,emscripten_get_visibility_status:_emscripten_get_visibility_status,emscripten_get_window_title:_emscripten_get_window_title,emscripten_get_worker_queue_size:_emscripten_get_worker_queue_size,emscripten_glActiveTexture:_emscripten_glActiveTexture,emscripten_glAttachShader:_emscripten_glAttachShader,emscripten_glBegin:_emscripten_glBegin,emscripten_glBeginQueryEXT:_emscripten_glBeginQueryEXT,emscripten_glBindAttribLocation:_emscripten_glBindAttribLocation,emscripten_glBindBuffer:_emscripten_glBindBuffer,emscripten_glBindFramebuffer:_emscripten_glBindFramebuffer,emscripten_glBindRenderbuffer:_emscripten_glBindRenderbuffer,emscripten_glBindTexture:_emscripten_glBindTexture,emscripten_glBindVertexArray:_emscripten_glBindVertexArray,emscripten_glBindVertexArrayOES:_emscripten_glBindVertexArrayOES,emscripten_glBlendColor:_emscripten_glBlendColor,emscripten_glBlendEquation:_emscripten_glBlendEquation,emscripten_glBlendEquationSeparate:_emscripten_glBlendEquationSeparate,emscripten_glBlendFunc:_emscripten_glBlendFunc,emscripten_glBlendFuncSeparate:_emscripten_glBlendFuncSeparate,emscripten_glBufferData:_emscripten_glBufferData,emscripten_glBufferSubData:_emscripten_glBufferSubData,emscripten_glCheckFramebufferStatus:_emscripten_glCheckFramebufferStatus,emscripten_glClear:_emscripten_glClear,emscripten_glClearColor:_emscripten_glClearColor,emscripten_glClearDepth:_emscripten_glClearDepth,emscripten_glClearDepthf:_emscripten_glClearDepthf,emscripten_glClearStencil:_emscripten_glClearStencil,emscripten_glColorMask:_emscripten_glColorMask,emscripten_glCompileShader:_emscripten_glCompileShader,emscripten_glCompressedTexImage2D:_emscripten_glCompressedTexImage2D,emscripten_glCompressedTexSubImage2D:_emscripten_glCompressedTexSubImage2D,emscripten_glCopyTexImage2D:_emscripten_glCopyTexImage2D,emscripten_glCopyTexSubImage2D:_emscripten_glCopyTexSubImage2D,emscripten_glCreateProgram:_emscripten_glCreateProgram,emscripten_glCreateShader:_emscripten_glCreateShader,emscripten_glCullFace:_emscripten_glCullFace,emscripten_glDeleteBuffers:_emscripten_glDeleteBuffers,emscripten_glDeleteFramebuffers:_emscripten_glDeleteFramebuffers,emscripten_glDeleteProgram:_emscripten_glDeleteProgram,emscripten_glDeleteQueriesEXT:_emscripten_glDeleteQueriesEXT,emscripten_glDeleteRenderbuffers:_emscripten_glDeleteRenderbuffers,emscripten_glDeleteShader:_emscripten_glDeleteShader,emscripten_glDeleteTextures:_emscripten_glDeleteTextures,emscripten_glDeleteVertexArrays:_emscripten_glDeleteVertexArrays,emscripten_glDeleteVertexArraysOES:_emscripten_glDeleteVertexArraysOES,emscripten_glDepthFunc:_emscripten_glDepthFunc,emscripten_glDepthMask:_emscripten_glDepthMask,emscripten_glDepthRange:_emscripten_glDepthRange,emscripten_glDepthRangef:_emscripten_glDepthRangef,emscripten_glDetachShader:_emscripten_glDetachShader,emscripten_glDisable:_emscripten_glDisable,emscripten_glDisableVertexAttribArray:_emscripten_glDisableVertexAttribArray,emscripten_glDrawArrays:_emscripten_glDrawArrays,emscripten_glDrawArraysInstanced:_emscripten_glDrawArraysInstanced,emscripten_glDrawArraysInstancedANGLE:_emscripten_glDrawArraysInstancedANGLE,emscripten_glDrawArraysInstancedARB:_emscripten_glDrawArraysInstancedARB,emscripten_glDrawArraysInstancedEXT:_emscripten_glDrawArraysInstancedEXT,emscripten_glDrawArraysInstancedNV:_emscripten_glDrawArraysInstancedNV,emscripten_glDrawBuffers:_emscripten_glDrawBuffers,emscripten_glDrawBuffersEXT:_emscripten_glDrawBuffersEXT,emscripten_glDrawBuffersWEBGL:_emscripten_glDrawBuffersWEBGL,emscripten_glDrawElements:_emscripten_glDrawElements,emscripten_glDrawElementsInstanced:_emscripten_glDrawElementsInstanced,emscripten_glDrawElementsInstancedANGLE:_emscripten_glDrawElementsInstancedANGLE,emscripten_glDrawElementsInstancedARB:_emscripten_glDrawElementsInstancedARB,emscripten_glDrawElementsInstancedEXT:_emscripten_glDrawElementsInstancedEXT,emscripten_glDrawElementsInstancedNV:_emscripten_glDrawElementsInstancedNV,emscripten_glEnable:_emscripten_glEnable,emscripten_glEnableVertexAttribArray:_emscripten_glEnableVertexAttribArray,emscripten_glEndQueryEXT:_emscripten_glEndQueryEXT,emscripten_glFinish:_emscripten_glFinish,emscripten_glFlush:_emscripten_glFlush,emscripten_glFramebufferRenderbuffer:_emscripten_glFramebufferRenderbuffer,emscripten_glFramebufferTexture2D:_emscripten_glFramebufferTexture2D,emscripten_glFrontFace:_emscripten_glFrontFace,emscripten_glGenBuffers:_emscripten_glGenBuffers,emscripten_glGenFramebuffers:_emscripten_glGenFramebuffers,emscripten_glGenQueriesEXT:_emscripten_glGenQueriesEXT,emscripten_glGenRenderbuffers:_emscripten_glGenRenderbuffers,emscripten_glGenTextures:_emscripten_glGenTextures,emscripten_glGenVertexArrays:_emscripten_glGenVertexArrays,emscripten_glGenVertexArraysOES:_emscripten_glGenVertexArraysOES,emscripten_glGenerateMipmap:_emscripten_glGenerateMipmap,emscripten_glGetActiveAttrib:_emscripten_glGetActiveAttrib,emscripten_glGetActiveUniform:_emscripten_glGetActiveUniform,emscripten_glGetAttachedShaders:_emscripten_glGetAttachedShaders,emscripten_glGetAttribLocation:_emscripten_glGetAttribLocation,emscripten_glGetBooleanv:_emscripten_glGetBooleanv,emscripten_glGetBufferParameteriv:_emscripten_glGetBufferParameteriv,emscripten_glGetError:_emscripten_glGetError,emscripten_glGetFloatv:_emscripten_glGetFloatv,emscripten_glGetFramebufferAttachmentParameteriv:_emscripten_glGetFramebufferAttachmentParameteriv,emscripten_glGetIntegerv:_emscripten_glGetIntegerv,emscripten_glGetProgramInfoLog:_emscripten_glGetProgramInfoLog,emscripten_glGetProgramiv:_emscripten_glGetProgramiv,emscripten_glGetQueryObjecti64vEXT:_emscripten_glGetQueryObjecti64vEXT,emscripten_glGetQueryObjectivEXT:_emscripten_glGetQueryObjectivEXT,emscripten_glGetQueryObjectui64vEXT:_emscripten_glGetQueryObjectui64vEXT,emscripten_glGetQueryObjectuivEXT:_emscripten_glGetQueryObjectuivEXT,emscripten_glGetQueryivEXT:_emscripten_glGetQueryivEXT,emscripten_glGetRenderbufferParameteriv:_emscripten_glGetRenderbufferParameteriv,emscripten_glGetShaderInfoLog:_emscripten_glGetShaderInfoLog,emscripten_glGetShaderPrecisionFormat:_emscripten_glGetShaderPrecisionFormat,emscripten_glGetShaderSource:_emscripten_glGetShaderSource,emscripten_glGetShaderiv:_emscripten_glGetShaderiv,emscripten_glGetString:_emscripten_glGetString,emscripten_glGetTexParameterfv:_emscripten_glGetTexParameterfv,emscripten_glGetTexParameteriv:_emscripten_glGetTexParameteriv,emscripten_glGetUniformLocation:_emscripten_glGetUniformLocation,emscripten_glGetUniformfv:_emscripten_glGetUniformfv,emscripten_glGetUniformiv:_emscripten_glGetUniformiv,emscripten_glGetVertexAttribPointerv:_emscripten_glGetVertexAttribPointerv,emscripten_glGetVertexAttribfv:_emscripten_glGetVertexAttribfv,emscripten_glGetVertexAttribiv:_emscripten_glGetVertexAttribiv,emscripten_glHint:_emscripten_glHint,emscripten_glIsBuffer:_emscripten_glIsBuffer,emscripten_glIsEnabled:_emscripten_glIsEnabled,emscripten_glIsFramebuffer:_emscripten_glIsFramebuffer,emscripten_glIsProgram:_emscripten_glIsProgram,emscripten_glIsQueryEXT:_emscripten_glIsQueryEXT,emscripten_glIsRenderbuffer:_emscripten_glIsRenderbuffer,emscripten_glIsShader:_emscripten_glIsShader,emscripten_glIsTexture:_emscripten_glIsTexture,emscripten_glIsVertexArray:_emscripten_glIsVertexArray,emscripten_glIsVertexArrayOES:_emscripten_glIsVertexArrayOES,emscripten_glLineWidth:_emscripten_glLineWidth,emscripten_glLinkProgram:_emscripten_glLinkProgram,emscripten_glLoadIdentity:_emscripten_glLoadIdentity,emscripten_glMatrixMode:_emscripten_glMatrixMode,emscripten_glMultiDrawArrays:_emscripten_glMultiDrawArrays,emscripten_glMultiDrawArraysANGLE:_emscripten_glMultiDrawArraysANGLE,emscripten_glMultiDrawArraysInstancedANGLE:_emscripten_glMultiDrawArraysInstancedANGLE,emscripten_glMultiDrawArraysInstancedWEBGL:_emscripten_glMultiDrawArraysInstancedWEBGL,emscripten_glMultiDrawArraysWEBGL:_emscripten_glMultiDrawArraysWEBGL,emscripten_glMultiDrawElements:_emscripten_glMultiDrawElements,emscripten_glMultiDrawElementsANGLE:_emscripten_glMultiDrawElementsANGLE,emscripten_glMultiDrawElementsInstancedANGLE:_emscripten_glMultiDrawElementsInstancedANGLE,emscripten_glMultiDrawElementsInstancedWEBGL:_emscripten_glMultiDrawElementsInstancedWEBGL,emscripten_glMultiDrawElementsWEBGL:_emscripten_glMultiDrawElementsWEBGL,emscripten_glPixelStorei:_emscripten_glPixelStorei,emscripten_glPolygonOffset:_emscripten_glPolygonOffset,emscripten_glQueryCounterEXT:_emscripten_glQueryCounterEXT,emscripten_glReadPixels:_emscripten_glReadPixels,emscripten_glReleaseShaderCompiler:_emscripten_glReleaseShaderCompiler,emscripten_glRenderbufferStorage:_emscripten_glRenderbufferStorage,emscripten_glSampleCoverage:_emscripten_glSampleCoverage,emscripten_glScissor:_emscripten_glScissor,emscripten_glShaderBinary:_emscripten_glShaderBinary,emscripten_glShaderSource:_emscripten_glShaderSource,emscripten_glStencilFunc:_emscripten_glStencilFunc,emscripten_glStencilFuncSeparate:_emscripten_glStencilFuncSeparate,emscripten_glStencilMask:_emscripten_glStencilMask,emscripten_glStencilMaskSeparate:_emscripten_glStencilMaskSeparate,emscripten_glStencilOp:_emscripten_glStencilOp,emscripten_glStencilOpSeparate:_emscripten_glStencilOpSeparate,emscripten_glTexImage2D:_emscripten_glTexImage2D,emscripten_glTexParameterf:_emscripten_glTexParameterf,emscripten_glTexParameterfv:_emscripten_glTexParameterfv,emscripten_glTexParameteri:_emscripten_glTexParameteri,emscripten_glTexParameteriv:_emscripten_glTexParameteriv,emscripten_glTexSubImage2D:_emscripten_glTexSubImage2D,emscripten_glUniform1f:_emscripten_glUniform1f,emscripten_glUniform1fv:_emscripten_glUniform1fv,emscripten_glUniform1i:_emscripten_glUniform1i,emscripten_glUniform1iv:_emscripten_glUniform1iv,emscripten_glUniform2f:_emscripten_glUniform2f,emscripten_glUniform2fv:_emscripten_glUniform2fv,emscripten_glUniform2i:_emscripten_glUniform2i,emscripten_glUniform2iv:_emscripten_glUniform2iv,emscripten_glUniform3f:_emscripten_glUniform3f,emscripten_glUniform3fv:_emscripten_glUniform3fv,emscripten_glUniform3i:_emscripten_glUniform3i,emscripten_glUniform3iv:_emscripten_glUniform3iv,emscripten_glUniform4f:_emscripten_glUniform4f,emscripten_glUniform4fv:_emscripten_glUniform4fv,emscripten_glUniform4i:_emscripten_glUniform4i,emscripten_glUniform4iv:_emscripten_glUniform4iv,emscripten_glUniformMatrix2fv:_emscripten_glUniformMatrix2fv,emscripten_glUniformMatrix3fv:_emscripten_glUniformMatrix3fv,emscripten_glUniformMatrix4fv:_emscripten_glUniformMatrix4fv,emscripten_glUseProgram:_emscripten_glUseProgram,emscripten_glValidateProgram:_emscripten_glValidateProgram,emscripten_glVertexAttrib1f:_emscripten_glVertexAttrib1f,emscripten_glVertexAttrib1fv:_emscripten_glVertexAttrib1fv,emscripten_glVertexAttrib2f:_emscripten_glVertexAttrib2f,emscripten_glVertexAttrib2fv:_emscripten_glVertexAttrib2fv,emscripten_glVertexAttrib3f:_emscripten_glVertexAttrib3f,emscripten_glVertexAttrib3fv:_emscripten_glVertexAttrib3fv,emscripten_glVertexAttrib4f:_emscripten_glVertexAttrib4f,emscripten_glVertexAttrib4fv:_emscripten_glVertexAttrib4fv,emscripten_glVertexAttribDivisor:_emscripten_glVertexAttribDivisor,emscripten_glVertexAttribDivisorANGLE:_emscripten_glVertexAttribDivisorANGLE,emscripten_glVertexAttribDivisorARB:_emscripten_glVertexAttribDivisorARB,emscripten_glVertexAttribDivisorEXT:_emscripten_glVertexAttribDivisorEXT,emscripten_glVertexAttribDivisorNV:_emscripten_glVertexAttribDivisorNV,emscripten_glVertexAttribPointer:_emscripten_glVertexAttribPointer,emscripten_glVertexPointer:_emscripten_glVertexPointer,emscripten_glViewport:_emscripten_glViewport,emscripten_has_asyncify:_emscripten_has_asyncify,emscripten_hide_mouse:_emscripten_hide_mouse,emscripten_html5_remove_all_event_listeners:_emscripten_html5_remove_all_event_listeners,emscripten_idb_async_clear:_emscripten_idb_async_clear,emscripten_idb_async_delete:_emscripten_idb_async_delete,emscripten_idb_async_exists:_emscripten_idb_async_exists,emscripten_idb_async_load:_emscripten_idb_async_load,emscripten_idb_async_store:_emscripten_idb_async_store,emscripten_idb_clear:_emscripten_idb_clear,emscripten_idb_delete:_emscripten_idb_delete,emscripten_idb_exists:_emscripten_idb_exists,emscripten_idb_load:_emscripten_idb_load,emscripten_idb_store:_emscripten_idb_store,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_is_webgl_context_lost:_emscripten_is_webgl_context_lost,emscripten_lock_orientation:_emscripten_lock_orientation,emscripten_log:_emscripten_log,emscripten_math_acos:_emscripten_math_acos,emscripten_math_acosh:_emscripten_math_acosh,emscripten_math_asin:_emscripten_math_asin,emscripten_math_asinh:_emscripten_math_asinh,emscripten_math_atan:_emscripten_math_atan,emscripten_math_atan2:_emscripten_math_atan2,emscripten_math_atanh:_emscripten_math_atanh,emscripten_math_cbrt:_emscripten_math_cbrt,emscripten_math_cos:_emscripten_math_cos,emscripten_math_cosh:_emscripten_math_cosh,emscripten_math_exp:_emscripten_math_exp,emscripten_math_expm1:_emscripten_math_expm1,emscripten_math_fmod:_emscripten_math_fmod,emscripten_math_hypot:_emscripten_math_hypot,emscripten_math_log:_emscripten_math_log,emscripten_math_log10:_emscripten_math_log10,emscripten_math_log1p:_emscripten_math_log1p,emscripten_math_log2:_emscripten_math_log2,emscripten_math_pow:_emscripten_math_pow,emscripten_math_random:_emscripten_math_random,emscripten_math_round:_emscripten_math_round,emscripten_math_sign:_emscripten_math_sign,emscripten_math_sin:_emscripten_math_sin,emscripten_math_sinh:_emscripten_math_sinh,emscripten_math_sqrt:_emscripten_math_sqrt,emscripten_math_tan:_emscripten_math_tan,emscripten_math_tanh:_emscripten_math_tanh,emscripten_memcpy_js:_emscripten_memcpy_js,emscripten_notify_memory_growth:_emscripten_notify_memory_growth,emscripten_out:_emscripten_out,emscripten_outn:_emscripten_outn,emscripten_pause_main_loop:_emscripten_pause_main_loop,emscripten_pc_get_column:_emscripten_pc_get_column,emscripten_pc_get_file:_emscripten_pc_get_file,emscripten_pc_get_function:_emscripten_pc_get_function,emscripten_pc_get_line:_emscripten_pc_get_line,emscripten_performance_now:_emscripten_performance_now,emscripten_print_double:_emscripten_print_double,emscripten_promise_all:_emscripten_promise_all,emscripten_promise_all_settled:_emscripten_promise_all_settled,emscripten_promise_any:_emscripten_promise_any,emscripten_promise_await:_emscripten_promise_await,emscripten_promise_create:_emscripten_promise_create,emscripten_promise_destroy:_emscripten_promise_destroy,emscripten_promise_race:_emscripten_promise_race,emscripten_promise_resolve:_emscripten_promise_resolve,emscripten_promise_then:_emscripten_promise_then,emscripten_random:_emscripten_random,emscripten_request_animation_frame:_emscripten_request_animation_frame,emscripten_request_animation_frame_loop:_emscripten_request_animation_frame_loop,emscripten_request_fullscreen:_emscripten_request_fullscreen,emscripten_request_fullscreen_strategy:_emscripten_request_fullscreen_strategy,emscripten_request_pointerlock:_emscripten_request_pointerlock,emscripten_resize_heap:_emscripten_resize_heap,emscripten_resume_main_loop:_emscripten_resume_main_loop,emscripten_return_address:_emscripten_return_address,emscripten_run_preload_plugins:_emscripten_run_preload_plugins,emscripten_run_preload_plugins_data:_emscripten_run_preload_plugins_data,emscripten_run_script:_emscripten_run_script,emscripten_run_script_int:_emscripten_run_script_int,emscripten_run_script_string:_emscripten_run_script_string,emscripten_runtime_keepalive_check:_emscripten_runtime_keepalive_check,emscripten_runtime_keepalive_pop:_emscripten_runtime_keepalive_pop,emscripten_runtime_keepalive_push:_emscripten_runtime_keepalive_push,emscripten_sample_gamepad_data:_emscripten_sample_gamepad_data,emscripten_scan_registers:_emscripten_scan_registers,emscripten_set_batterychargingchange_callback_on_thread:_emscripten_set_batterychargingchange_callback_on_thread,emscripten_set_batterylevelchange_callback_on_thread:_emscripten_set_batterylevelchange_callback_on_thread,emscripten_set_beforeunload_callback_on_thread:_emscripten_set_beforeunload_callback_on_thread,emscripten_set_blur_callback_on_thread:_emscripten_set_blur_callback_on_thread,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_canvas_size:_emscripten_set_canvas_size,emscripten_set_click_callback_on_thread:_emscripten_set_click_callback_on_thread,emscripten_set_dblclick_callback_on_thread:_emscripten_set_dblclick_callback_on_thread,emscripten_set_devicemotion_callback_on_thread:_emscripten_set_devicemotion_callback_on_thread,emscripten_set_deviceorientation_callback_on_thread:_emscripten_set_deviceorientation_callback_on_thread,emscripten_set_element_css_size:_emscripten_set_element_css_size,emscripten_set_focus_callback_on_thread:_emscripten_set_focus_callback_on_thread,emscripten_set_focusin_callback_on_thread:_emscripten_set_focusin_callback_on_thread,emscripten_set_focusout_callback_on_thread:_emscripten_set_focusout_callback_on_thread,emscripten_set_fullscreenchange_callback_on_thread:_emscripten_set_fullscreenchange_callback_on_thread,emscripten_set_gamepadconnected_callback_on_thread:_emscripten_set_gamepadconnected_callback_on_thread,emscripten_set_gamepaddisconnected_callback_on_thread:_emscripten_set_gamepaddisconnected_callback_on_thread,emscripten_set_immediate:_emscripten_set_immediate,emscripten_set_immediate_loop:_emscripten_set_immediate_loop,emscripten_set_interval:_emscripten_set_interval,emscripten_set_keydown_callback_on_thread:_emscripten_set_keydown_callback_on_thread,emscripten_set_keypress_callback_on_thread:_emscripten_set_keypress_callback_on_thread,emscripten_set_keyup_callback_on_thread:_emscripten_set_keyup_callback_on_thread,emscripten_set_main_loop:_emscripten_set_main_loop,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_main_loop_expected_blockers:_emscripten_set_main_loop_expected_blockers,emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,emscripten_set_mousedown_callback_on_thread:_emscripten_set_mousedown_callback_on_thread,emscripten_set_mouseenter_callback_on_thread:_emscripten_set_mouseenter_callback_on_thread,emscripten_set_mouseleave_callback_on_thread:_emscripten_set_mouseleave_callback_on_thread,emscripten_set_mousemove_callback_on_thread:_emscripten_set_mousemove_callback_on_thread,emscripten_set_mouseout_callback_on_thread:_emscripten_set_mouseout_callback_on_thread,emscripten_set_mouseover_callback_on_thread:_emscripten_set_mouseover_callback_on_thread,emscripten_set_mouseup_callback_on_thread:_emscripten_set_mouseup_callback_on_thread,emscripten_set_orientationchange_callback_on_thread:_emscripten_set_orientationchange_callback_on_thread,emscripten_set_pointerlockchange_callback_on_thread:_emscripten_set_pointerlockchange_callback_on_thread,emscripten_set_pointerlockerror_callback_on_thread:_emscripten_set_pointerlockerror_callback_on_thread,emscripten_set_resize_callback_on_thread:_emscripten_set_resize_callback_on_thread,emscripten_set_scroll_callback_on_thread:_emscripten_set_scroll_callback_on_thread,emscripten_set_socket_close_callback:_emscripten_set_socket_close_callback,emscripten_set_socket_connection_callback:_emscripten_set_socket_connection_callback,emscripten_set_socket_error_callback:_emscripten_set_socket_error_callback,emscripten_set_socket_listen_callback:_emscripten_set_socket_listen_callback,emscripten_set_socket_message_callback:_emscripten_set_socket_message_callback,emscripten_set_socket_open_callback:_emscripten_set_socket_open_callback,emscripten_set_timeout:_emscripten_set_timeout,emscripten_set_timeout_loop:_emscripten_set_timeout_loop,emscripten_set_touchcancel_callback_on_thread:_emscripten_set_touchcancel_callback_on_thread,emscripten_set_touchend_callback_on_thread:_emscripten_set_touchend_callback_on_thread,emscripten_set_touchmove_callback_on_thread:_emscripten_set_touchmove_callback_on_thread,emscripten_set_touchstart_callback_on_thread:_emscripten_set_touchstart_callback_on_thread,emscripten_set_visibilitychange_callback_on_thread:_emscripten_set_visibilitychange_callback_on_thread,emscripten_set_webglcontextlost_callback_on_thread:_emscripten_set_webglcontextlost_callback_on_thread,emscripten_set_webglcontextrestored_callback_on_thread:_emscripten_set_webglcontextrestored_callback_on_thread,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_sleep:_emscripten_sleep,emscripten_stack_snapshot:_emscripten_stack_snapshot,emscripten_stack_unwind_buffer:_emscripten_stack_unwind_buffer,emscripten_supports_offscreencanvas:_emscripten_supports_offscreencanvas,emscripten_throw_number:_emscripten_throw_number,emscripten_throw_string:_emscripten_throw_string,emscripten_unlock_orientation:_emscripten_unlock_orientation,emscripten_unwind_to_js_event_loop:_emscripten_unwind_to_js_event_loop,emscripten_vibrate:_emscripten_vibrate,emscripten_vibrate_pattern:_emscripten_vibrate_pattern,emscripten_webgl_commit_frame:_emscripten_webgl_commit_frame,emscripten_webgl_create_context:_emscripten_webgl_create_context,emscripten_webgl_destroy_context:_emscripten_webgl_destroy_context,emscripten_webgl_do_commit_frame:_emscripten_webgl_do_commit_frame,emscripten_webgl_do_create_context:_emscripten_webgl_do_create_context,emscripten_webgl_do_get_current_context:_emscripten_webgl_do_get_current_context,emscripten_webgl_enable_ANGLE_instanced_arrays:_emscripten_webgl_enable_ANGLE_instanced_arrays,emscripten_webgl_enable_OES_vertex_array_object:_emscripten_webgl_enable_OES_vertex_array_object,emscripten_webgl_enable_WEBGL_draw_buffers:_emscripten_webgl_enable_WEBGL_draw_buffers,emscripten_webgl_enable_WEBGL_multi_draw:_emscripten_webgl_enable_WEBGL_multi_draw,emscripten_webgl_enable_extension:_emscripten_webgl_enable_extension,emscripten_webgl_get_context_attributes:_emscripten_webgl_get_context_attributes,emscripten_webgl_get_current_context:_emscripten_webgl_get_current_context,emscripten_webgl_get_drawing_buffer_size:_emscripten_webgl_get_drawing_buffer_size,emscripten_webgl_get_parameter_d:_emscripten_webgl_get_parameter_d,emscripten_webgl_get_parameter_i64v:_emscripten_webgl_get_parameter_i64v,emscripten_webgl_get_parameter_o:_emscripten_webgl_get_parameter_o,emscripten_webgl_get_parameter_utf8:_emscripten_webgl_get_parameter_utf8,emscripten_webgl_get_parameter_v:_emscripten_webgl_get_parameter_v,emscripten_webgl_get_program_info_log_utf8:_emscripten_webgl_get_program_info_log_utf8,emscripten_webgl_get_program_parameter_d:_emscripten_webgl_get_program_parameter_d,emscripten_webgl_get_shader_info_log_utf8:_emscripten_webgl_get_shader_info_log_utf8,emscripten_webgl_get_shader_parameter_d:_emscripten_webgl_get_shader_parameter_d,emscripten_webgl_get_shader_source_utf8:_emscripten_webgl_get_shader_source_utf8,emscripten_webgl_get_supported_extensions:_emscripten_webgl_get_supported_extensions,emscripten_webgl_get_uniform_d:_emscripten_webgl_get_uniform_d,emscripten_webgl_get_uniform_v:_emscripten_webgl_get_uniform_v,emscripten_webgl_get_vertex_attrib_d:_emscripten_webgl_get_vertex_attrib_d,emscripten_webgl_get_vertex_attrib_o:_emscripten_webgl_get_vertex_attrib_o,emscripten_webgl_get_vertex_attrib_v:_emscripten_webgl_get_vertex_attrib_v,emscripten_webgl_make_context_current:_emscripten_webgl_make_context_current,emscripten_wget_data:_emscripten_wget_data,endprotoent:_endprotoent,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_pread:_fd_pread,fd_pwrite:_fd_pwrite,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,filledEllipseColor:_filledEllipseColor,filledEllipseRGBA:_filledEllipseRGBA,getaddrinfo:_getaddrinfo,getentropy:_getentropy,getnameinfo:_getnameinfo,getprotobyname:_getprotobyname,getprotobynumber:_getprotobynumber,getprotoent:_getprotoent,glActiveTexture:_glActiveTexture,glAttachShader:_glAttachShader,glBegin:_glBegin,glBeginQueryEXT:_glBeginQueryEXT,glBindAttribLocation:_glBindAttribLocation,glBindBuffer:_glBindBuffer,glBindFramebuffer:_glBindFramebuffer,glBindRenderbuffer:_glBindRenderbuffer,glBindTexture:_glBindTexture,glBindVertexArray:_glBindVertexArray,glBindVertexArrayOES:_glBindVertexArrayOES,glBlendColor:_glBlendColor,glBlendEquation:_glBlendEquation,glBlendEquationSeparate:_glBlendEquationSeparate,glBlendFunc:_glBlendFunc,glBlendFuncSeparate:_glBlendFuncSeparate,glBufferData:_glBufferData,glBufferSubData:_glBufferSubData,glCheckFramebufferStatus:_glCheckFramebufferStatus,glClear:_glClear,glClearColor:_glClearColor,glClearDepth:_glClearDepth,glClearDepthf:_glClearDepthf,glClearStencil:_glClearStencil,glColorMask:_glColorMask,glCompileShader:_glCompileShader,glCompressedTexImage2D:_glCompressedTexImage2D,glCompressedTexSubImage2D:_glCompressedTexSubImage2D,glCopyTexImage2D:_glCopyTexImage2D,glCopyTexSubImage2D:_glCopyTexSubImage2D,glCreateProgram:_glCreateProgram,glCreateShader:_glCreateShader,glCullFace:_glCullFace,glDeleteBuffers:_glDeleteBuffers,glDeleteFramebuffers:_glDeleteFramebuffers,glDeleteProgram:_glDeleteProgram,glDeleteQueriesEXT:_glDeleteQueriesEXT,glDeleteRenderbuffers:_glDeleteRenderbuffers,glDeleteShader:_glDeleteShader,glDeleteTextures:_glDeleteTextures,glDeleteVertexArrays:_glDeleteVertexArrays,glDeleteVertexArraysOES:_glDeleteVertexArraysOES,glDepthFunc:_glDepthFunc,glDepthMask:_glDepthMask,glDepthRange:_glDepthRange,glDepthRangef:_glDepthRangef,glDetachShader:_glDetachShader,glDisable:_glDisable,glDisableVertexAttribArray:_glDisableVertexAttribArray,glDrawArrays:_glDrawArrays,glDrawArraysInstanced:_glDrawArraysInstanced,glDrawArraysInstancedANGLE:_glDrawArraysInstancedANGLE,glDrawArraysInstancedARB:_glDrawArraysInstancedARB,glDrawArraysInstancedEXT:_glDrawArraysInstancedEXT,glDrawArraysInstancedNV:_glDrawArraysInstancedNV,glDrawBuffers:_glDrawBuffers,glDrawBuffersEXT:_glDrawBuffersEXT,glDrawBuffersWEBGL:_glDrawBuffersWEBGL,glDrawElements:_glDrawElements,glDrawElementsInstanced:_glDrawElementsInstanced,glDrawElementsInstancedANGLE:_glDrawElementsInstancedANGLE,glDrawElementsInstancedARB:_glDrawElementsInstancedARB,glDrawElementsInstancedEXT:_glDrawElementsInstancedEXT,glDrawElementsInstancedNV:_glDrawElementsInstancedNV,glEnable:_glEnable,glEnableVertexAttribArray:_glEnableVertexAttribArray,glEndQueryEXT:_glEndQueryEXT,glFinish:_glFinish,glFlush:_glFlush,glFramebufferRenderbuffer:_glFramebufferRenderbuffer,glFramebufferTexture2D:_glFramebufferTexture2D,glFrontFace:_glFrontFace,glGenBuffers:_glGenBuffers,glGenFramebuffers:_glGenFramebuffers,glGenQueriesEXT:_glGenQueriesEXT,glGenRenderbuffers:_glGenRenderbuffers,glGenTextures:_glGenTextures,glGenVertexArrays:_glGenVertexArrays,glGenVertexArraysOES:_glGenVertexArraysOES,glGenerateMipmap:_glGenerateMipmap,glGetActiveAttrib:_glGetActiveAttrib,glGetActiveUniform:_glGetActiveUniform,glGetAttachedShaders:_glGetAttachedShaders,glGetAttribLocation:_glGetAttribLocation,glGetBooleanv:_glGetBooleanv,glGetBufferParameteriv:_glGetBufferParameteriv,glGetError:_glGetError,glGetFloatv:_glGetFloatv,glGetFramebufferAttachmentParameteriv:_glGetFramebufferAttachmentParameteriv,glGetIntegerv:_glGetIntegerv,glGetProgramInfoLog:_glGetProgramInfoLog,glGetProgramiv:_glGetProgramiv,glGetQueryObjecti64vEXT:_glGetQueryObjecti64vEXT,glGetQueryObjectivEXT:_glGetQueryObjectivEXT,glGetQueryObjectui64vEXT:_glGetQueryObjectui64vEXT,glGetQueryObjectuivEXT:_glGetQueryObjectuivEXT,glGetQueryivEXT:_glGetQueryivEXT,glGetRenderbufferParameteriv:_glGetRenderbufferParameteriv,glGetShaderInfoLog:_glGetShaderInfoLog,glGetShaderPrecisionFormat:_glGetShaderPrecisionFormat,glGetShaderSource:_glGetShaderSource,glGetShaderiv:_glGetShaderiv,glGetString:_glGetString,glGetTexParameterfv:_glGetTexParameterfv,glGetTexParameteriv:_glGetTexParameteriv,glGetUniformLocation:_glGetUniformLocation,glGetUniformfv:_glGetUniformfv,glGetUniformiv:_glGetUniformiv,glGetVertexAttribPointerv:_glGetVertexAttribPointerv,glGetVertexAttribfv:_glGetVertexAttribfv,glGetVertexAttribiv:_glGetVertexAttribiv,glHint:_glHint,glIsBuffer:_glIsBuffer,glIsEnabled:_glIsEnabled,glIsFramebuffer:_glIsFramebuffer,glIsProgram:_glIsProgram,glIsQueryEXT:_glIsQueryEXT,glIsRenderbuffer:_glIsRenderbuffer,glIsShader:_glIsShader,glIsTexture:_glIsTexture,glIsVertexArray:_glIsVertexArray,glIsVertexArrayOES:_glIsVertexArrayOES,glLineWidth:_glLineWidth,glLinkProgram:_glLinkProgram,glLoadIdentity:_glLoadIdentity,glMatrixMode:_glMatrixMode,glMultiDrawArrays:_glMultiDrawArrays,glMultiDrawArraysANGLE:_glMultiDrawArraysANGLE,glMultiDrawArraysInstancedANGLE:_glMultiDrawArraysInstancedANGLE,glMultiDrawArraysInstancedWEBGL:_glMultiDrawArraysInstancedWEBGL,glMultiDrawArraysWEBGL:_glMultiDrawArraysWEBGL,glMultiDrawElements:_glMultiDrawElements,glMultiDrawElementsANGLE:_glMultiDrawElementsANGLE,glMultiDrawElementsInstancedANGLE:_glMultiDrawElementsInstancedANGLE,glMultiDrawElementsInstancedWEBGL:_glMultiDrawElementsInstancedWEBGL,glMultiDrawElementsWEBGL:_glMultiDrawElementsWEBGL,glPixelStorei:_glPixelStorei,glPolygonOffset:_glPolygonOffset,glQueryCounterEXT:_glQueryCounterEXT,glReadPixels:_glReadPixels,glReleaseShaderCompiler:_glReleaseShaderCompiler,glRenderbufferStorage:_glRenderbufferStorage,glSampleCoverage:_glSampleCoverage,glScissor:_glScissor,glShaderBinary:_glShaderBinary,glShaderSource:_glShaderSource,glStencilFunc:_glStencilFunc,glStencilFuncSeparate:_glStencilFuncSeparate,glStencilMask:_glStencilMask,glStencilMaskSeparate:_glStencilMaskSeparate,glStencilOp:_glStencilOp,glStencilOpSeparate:_glStencilOpSeparate,glTexImage2D:_glTexImage2D,glTexParameterf:_glTexParameterf,glTexParameterfv:_glTexParameterfv,glTexParameteri:_glTexParameteri,glTexParameteriv:_glTexParameteriv,glTexSubImage2D:_glTexSubImage2D,glUniform1f:_glUniform1f,glUniform1fv:_glUniform1fv,glUniform1i:_glUniform1i,glUniform1iv:_glUniform1iv,glUniform2f:_glUniform2f,glUniform2fv:_glUniform2fv,glUniform2i:_glUniform2i,glUniform2iv:_glUniform2iv,glUniform3f:_glUniform3f,glUniform3fv:_glUniform3fv,glUniform3i:_glUniform3i,glUniform3iv:_glUniform3iv,glUniform4f:_glUniform4f,glUniform4fv:_glUniform4fv,glUniform4i:_glUniform4i,glUniform4iv:_glUniform4iv,glUniformMatrix2fv:_glUniformMatrix2fv,glUniformMatrix3fv:_glUniformMatrix3fv,glUniformMatrix4fv:_glUniformMatrix4fv,glUseProgram:_glUseProgram,glValidateProgram:_glValidateProgram,glVertexAttrib1f:_glVertexAttrib1f,glVertexAttrib1fv:_glVertexAttrib1fv,glVertexAttrib2f:_glVertexAttrib2f,glVertexAttrib2fv:_glVertexAttrib2fv,glVertexAttrib3f:_glVertexAttrib3f,glVertexAttrib3fv:_glVertexAttrib3fv,glVertexAttrib4f:_glVertexAttrib4f,glVertexAttrib4fv:_glVertexAttrib4fv,glVertexAttribDivisor:_glVertexAttribDivisor,glVertexAttribDivisorANGLE:_glVertexAttribDivisorANGLE,glVertexAttribDivisorARB:_glVertexAttribDivisorARB,glVertexAttribDivisorEXT:_glVertexAttribDivisorEXT,glVertexAttribDivisorNV:_glVertexAttribDivisorNV,glVertexAttribPointer:_glVertexAttribPointer,glVertexPointer:_glVertexPointer,glViewport:_glViewport,glewGetErrorString:_glewGetErrorString,glewGetExtension:_glewGetExtension,glewGetString:_glewGetString,glewInit:_glewInit,glewIsSupported:_glewIsSupported,glutCreateWindow:_glutCreateWindow,glutDestroyWindow:_glutDestroyWindow,glutDisplayFunc:_glutDisplayFunc,glutFullScreen:_glutFullScreen,glutGet:_glutGet,glutGetModifiers:_glutGetModifiers,glutIdleFunc:_glutIdleFunc,glutInit:_glutInit,glutInitDisplayMode:_glutInitDisplayMode,glutInitWindowPosition:_glutInitWindowPosition,glutInitWindowSize:_glutInitWindowSize,glutKeyboardFunc:_glutKeyboardFunc,glutKeyboardUpFunc:_glutKeyboardUpFunc,glutMainLoop:_glutMainLoop,glutMotionFunc:_glutMotionFunc,glutMouseFunc:_glutMouseFunc,glutPassiveMotionFunc:_glutPassiveMotionFunc,glutPositionWindow:_glutPositionWindow,glutPostRedisplay:_glutPostRedisplay,glutReshapeFunc:_glutReshapeFunc,glutReshapeWindow:_glutReshapeWindow,glutSetCursor:_glutSetCursor,glutSpecialFunc:_glutSpecialFunc,glutSpecialUpFunc:_glutSpecialUpFunc,glutSwapBuffers:_glutSwapBuffers,glutTimerFunc:_glutTimerFunc,lineColor:_lineColor,lineRGBA:_lineRGBA,memory:wasmMemory,pixelRGBA:_pixelRGBA,proc_exit:_proc_exit,pthread_kill:_pthread_kill,random_get:_random_get,rectangleColor:_rectangleColor,rectangleRGBA:_rectangleRGBA,rotozoomSurface:_rotozoomSurface,setNetworkCallback:_setNetworkCallback,setprotoent:_setprotoent,strftime:_strftime,strftime_l:_strftime_l,strptime:_strptime,strptime_l:_strptime_l,uuid_clear:_uuid_clear,uuid_compare:_uuid_compare,uuid_copy:_uuid_copy,uuid_generate:_uuid_generate,uuid_is_null:_uuid_is_null,uuid_parse:_uuid_parse,uuid_type:_uuid_type,uuid_unparse:_uuid_unparse,uuid_unparse_lower:_uuid_unparse_lower,uuid_unparse_upper:_uuid_unparse_upper,uuid_variant:_uuid_variant,zoomSurface:_zoomSurface},wasmExports=createWasm(),_main=Module._main=(e,r)=>(_main=Module._main=wasmExports.main)(e,r),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e),_free=Module._free=e=>(_free=Module._free=wasmExports.free)(e),_duckdb_web_fs_glob_add_path=Module._duckdb_web_fs_glob_add_path=e=>(_duckdb_web_fs_glob_add_path=Module._duckdb_web_fs_glob_add_path=wasmExports.duckdb_web_fs_glob_add_path)(e),_duckdb_web_clear_response=Module._duckdb_web_clear_response=()=>(_duckdb_web_clear_response=Module._duckdb_web_clear_response=wasmExports.duckdb_web_clear_response)(),_duckdb_web_fail_with=Module._duckdb_web_fail_with=e=>(_duckdb_web_fail_with=Module._duckdb_web_fail_with=wasmExports.duckdb_web_fail_with)(e),_duckdb_web_reset=Module._duckdb_web_reset=e=>(_duckdb_web_reset=Module._duckdb_web_reset=wasmExports.duckdb_web_reset)(e),_duckdb_web_connect=Module._duckdb_web_connect=()=>(_duckdb_web_connect=Module._duckdb_web_connect=wasmExports.duckdb_web_connect)(),_duckdb_web_disconnect=Module._duckdb_web_disconnect=e=>(_duckdb_web_disconnect=Module._duckdb_web_disconnect=wasmExports.duckdb_web_disconnect)(e),_duckdb_web_access_buffer=Module._duckdb_web_access_buffer=(e,r)=>(_duckdb_web_access_buffer=Module._duckdb_web_access_buffer=wasmExports.duckdb_web_access_buffer)(e,r),_duckdb_web_flush_files=Module._duckdb_web_flush_files=()=>(_duckdb_web_flush_files=Module._duckdb_web_flush_files=wasmExports.duckdb_web_flush_files)(),_duckdb_web_flush_file=Module._duckdb_web_flush_file=e=>(_duckdb_web_flush_file=Module._duckdb_web_flush_file=wasmExports.duckdb_web_flush_file)(e),_duckdb_web_open=Module._duckdb_web_open=(e,r)=>(_duckdb_web_open=Module._duckdb_web_open=wasmExports.duckdb_web_open)(e,r),_duckdb_web_get_global_file_info=Module._duckdb_web_get_global_file_info=(e,r)=>(_duckdb_web_get_global_file_info=Module._duckdb_web_get_global_file_info=wasmExports.duckdb_web_get_global_file_info)(e,r),_duckdb_web_collect_file_stats=Module._duckdb_web_collect_file_stats=(e,r,t)=>(_duckdb_web_collect_file_stats=Module._duckdb_web_collect_file_stats=wasmExports.duckdb_web_collect_file_stats)(e,r,t),_duckdb_web_export_file_stats=Module._duckdb_web_export_file_stats=(e,r)=>(_duckdb_web_export_file_stats=Module._duckdb_web_export_file_stats=wasmExports.duckdb_web_export_file_stats)(e,r),_duckdb_web_fs_drop_file=Module._duckdb_web_fs_drop_file=(e,r)=>(_duckdb_web_fs_drop_file=Module._duckdb_web_fs_drop_file=wasmExports.duckdb_web_fs_drop_file)(e,r),_duckdb_web_fs_drop_files=Module._duckdb_web_fs_drop_files=e=>(_duckdb_web_fs_drop_files=Module._duckdb_web_fs_drop_files=wasmExports.duckdb_web_fs_drop_files)(e),_duckdb_web_fs_glob_file_infos=Module._duckdb_web_fs_glob_file_infos=(e,r)=>(_duckdb_web_fs_glob_file_infos=Module._duckdb_web_fs_glob_file_infos=wasmExports.duckdb_web_fs_glob_file_infos)(e,r),_duckdb_web_fs_get_file_info_by_id=Module._duckdb_web_fs_get_file_info_by_id=(e,r,t)=>(_duckdb_web_fs_get_file_info_by_id=Module._duckdb_web_fs_get_file_info_by_id=wasmExports.duckdb_web_fs_get_file_info_by_id)(e,r,t),_duckdb_web_fs_get_file_info_by_name=Module._duckdb_web_fs_get_file_info_by_name=(e,r,t)=>(_duckdb_web_fs_get_file_info_by_name=Module._duckdb_web_fs_get_file_info_by_name=wasmExports.duckdb_web_fs_get_file_info_by_name)(e,r,t),_duckdb_web_fs_register_file_url=Module._duckdb_web_fs_register_file_url=(e,r,t,n,a)=>(_duckdb_web_fs_register_file_url=Module._duckdb_web_fs_register_file_url=wasmExports.duckdb_web_fs_register_file_url)(e,r,t,n,a),_duckdb_web_fs_register_file_buffer=Module._duckdb_web_fs_register_file_buffer=(e,r,t,n)=>(_duckdb_web_fs_register_file_buffer=Module._duckdb_web_fs_register_file_buffer=wasmExports.duckdb_web_fs_register_file_buffer)(e,r,t,n),_duckdb_web_copy_file_to_buffer=Module._duckdb_web_copy_file_to_buffer=(e,r)=>(_duckdb_web_copy_file_to_buffer=Module._duckdb_web_copy_file_to_buffer=wasmExports.duckdb_web_copy_file_to_buffer)(e,r),_duckdb_web_copy_file_to_path=Module._duckdb_web_copy_file_to_path=(e,r,t)=>(_duckdb_web_copy_file_to_path=Module._duckdb_web_copy_file_to_path=wasmExports.duckdb_web_copy_file_to_path)(e,r,t),_duckdb_web_get_version=Module._duckdb_web_get_version=e=>(_duckdb_web_get_version=Module._duckdb_web_get_version=wasmExports.duckdb_web_get_version)(e),_duckdb_web_get_feature_flags=Module._duckdb_web_get_feature_flags=()=>(_duckdb_web_get_feature_flags=Module._duckdb_web_get_feature_flags=wasmExports.duckdb_web_get_feature_flags)(),_duckdb_web_tokenize=Module._duckdb_web_tokenize=(e,r)=>(_duckdb_web_tokenize=Module._duckdb_web_tokenize=wasmExports.duckdb_web_tokenize)(e,r),_duckdb_web_udf_scalar_create=Module._duckdb_web_udf_scalar_create=(e,r,t)=>(_duckdb_web_udf_scalar_create=Module._duckdb_web_udf_scalar_create=wasmExports.duckdb_web_udf_scalar_create)(e,r,t),_duckdb_web_prepared_create=Module._duckdb_web_prepared_create=(e,r,t)=>(_duckdb_web_prepared_create=Module._duckdb_web_prepared_create=wasmExports.duckdb_web_prepared_create)(e,r,t),_duckdb_web_prepared_close=Module._duckdb_web_prepared_close=(e,r,t)=>(_duckdb_web_prepared_close=Module._duckdb_web_prepared_close=wasmExports.duckdb_web_prepared_close)(e,r,t),_duckdb_web_prepared_run=Module._duckdb_web_prepared_run=(e,r,t,n)=>(_duckdb_web_prepared_run=Module._duckdb_web_prepared_run=wasmExports.duckdb_web_prepared_run)(e,r,t,n),_duckdb_web_prepared_send=Module._duckdb_web_prepared_send=(e,r,t,n)=>(_duckdb_web_prepared_send=Module._duckdb_web_prepared_send=wasmExports.duckdb_web_prepared_send)(e,r,t,n),_duckdb_web_query_run=Module._duckdb_web_query_run=(e,r,t)=>(_duckdb_web_query_run=Module._duckdb_web_query_run=wasmExports.duckdb_web_query_run)(e,r,t),_duckdb_web_pending_query_start=Module._duckdb_web_pending_query_start=(e,r,t)=>(_duckdb_web_pending_query_start=Module._duckdb_web_pending_query_start=wasmExports.duckdb_web_pending_query_start)(e,r,t),_duckdb_web_pending_query_poll=Module._duckdb_web_pending_query_poll=(e,r,t)=>(_duckdb_web_pending_query_poll=Module._duckdb_web_pending_query_poll=wasmExports.duckdb_web_pending_query_poll)(e,r,t),_duckdb_web_pending_query_cancel=Module._duckdb_web_pending_query_cancel=(e,r)=>(_duckdb_web_pending_query_cancel=Module._duckdb_web_pending_query_cancel=wasmExports.duckdb_web_pending_query_cancel)(e,r),_duckdb_web_query_fetch_results=Module._duckdb_web_query_fetch_results=(e,r)=>(_duckdb_web_query_fetch_results=Module._duckdb_web_query_fetch_results=wasmExports.duckdb_web_query_fetch_results)(e,r),_duckdb_web_get_tablenames=Module._duckdb_web_get_tablenames=(e,r,t)=>(_duckdb_web_get_tablenames=Module._duckdb_web_get_tablenames=wasmExports.duckdb_web_get_tablenames)(e,r,t),_duckdb_web_insert_arrow_from_ipc_stream=Module._duckdb_web_insert_arrow_from_ipc_stream=(e,r,t,n,a)=>(_duckdb_web_insert_arrow_from_ipc_stream=Module._duckdb_web_insert_arrow_from_ipc_stream=wasmExports.duckdb_web_insert_arrow_from_ipc_stream)(e,r,t,n,a),_duckdb_web_insert_csv_from_path=Module._duckdb_web_insert_csv_from_path=(e,r,t,n)=>(_duckdb_web_insert_csv_from_path=Module._duckdb_web_insert_csv_from_path=wasmExports.duckdb_web_insert_csv_from_path)(e,r,t,n),_duckdb_web_insert_json_from_path=Module._duckdb_web_insert_json_from_path=(e,r,t,n)=>(_duckdb_web_insert_json_from_path=Module._duckdb_web_insert_json_from_path=wasmExports.duckdb_web_insert_json_from_path)(e,r,t,n),_duckdb_web_fts_init=Module._duckdb_web_fts_init=e=>(_duckdb_web_fts_init=Module._duckdb_web_fts_init=wasmExports.duckdb_web_fts_init)(e),_duckdb_web_parquet_init=Module._duckdb_web_parquet_init=e=>(_duckdb_web_parquet_init=Module._duckdb_web_parquet_init=wasmExports.duckdb_web_parquet_init)(e),_freeaddrinfo=Module._freeaddrinfo=e=>(_freeaddrinfo=Module._freeaddrinfo=wasmExports.freeaddrinfo)(e),_freeifaddrs=Module._freeifaddrs=e=>(_freeifaddrs=Module._freeifaddrs=wasmExports.freeifaddrs)(e),_pthread_self=Module._pthread_self=()=>(_pthread_self=Module._pthread_self=wasmExports.pthread_self)(),_pthread_atfork=Module._pthread_atfork=(e,r,t)=>(_pthread_atfork=Module._pthread_atfork=wasmExports.pthread_atfork)(e,r,t),_pthread_create=Module._pthread_create=(e,r,t,n)=>(_pthread_create=Module._pthread_create=wasmExports.pthread_create)(e,r,t,n),_pthread_setspecific=Module._pthread_setspecific=(e,r)=>(_pthread_setspecific=Module._pthread_setspecific=wasmExports.pthread_setspecific)(e,r),__embind_initialize_bindings=Module.__embind_initialize_bindings=()=>(__embind_initialize_bindings=Module.__embind_initialize_bindings=wasmExports._embind_initialize_bindings)(),__embind_register_bindings=Module.__embind_register_bindings=e=>(__embind_register_bindings=Module.__embind_register_bindings=wasmExports._embind_register_bindings)(e),__emval_coro_resume=(e,r)=>(__emval_coro_resume=wasmExports._emval_coro_resume)(e,r),_emscripten_GetProcAddress=Module._emscripten_GetProcAddress=e=>(_emscripten_GetProcAddress=Module._emscripten_GetProcAddress=wasmExports.emscripten_GetProcAddress)(e),_emscripten_webgl1_get_proc_address=Module._emscripten_webgl1_get_proc_address=e=>(_emscripten_webgl1_get_proc_address=Module._emscripten_webgl1_get_proc_address=wasmExports.emscripten_webgl1_get_proc_address)(e),_emscripten_webgl_get_proc_address=Module._emscripten_webgl_get_proc_address=e=>(_emscripten_webgl_get_proc_address=Module._emscripten_webgl_get_proc_address=wasmExports.emscripten_webgl_get_proc_address)(e),_emscripten_webgl_init_context_attributes=Module._emscripten_webgl_init_context_attributes=e=>(_emscripten_webgl_init_context_attributes=Module._emscripten_webgl_init_context_attributes=wasmExports.emscripten_webgl_init_context_attributes)(e),_emscripten_is_main_runtime_thread=Module._emscripten_is_main_runtime_thread=()=>(_emscripten_is_main_runtime_thread=Module._emscripten_is_main_runtime_thread=wasmExports.emscripten_is_main_runtime_thread)(),_emscripten_errf=Module._emscripten_errf=(e,r)=>(_emscripten_errf=Module._emscripten_errf=wasmExports.emscripten_errf)(e,r),__emscripten_run_callback_on_thread=Module.__emscripten_run_callback_on_thread=(e,r,t,n,a)=>(__emscripten_run_callback_on_thread=Module.__emscripten_run_callback_on_thread=wasmExports._emscripten_run_callback_on_thread)(e,r,t,n,a),_emscripten_proxy_get_system_queue=Module._emscripten_proxy_get_system_queue=()=>(_emscripten_proxy_get_system_queue=Module._emscripten_proxy_get_system_queue=wasmExports.emscripten_proxy_get_system_queue)(),_emscripten_proxy_sync=Module._emscripten_proxy_sync=(e,r,t,n)=>(_emscripten_proxy_sync=Module._emscripten_proxy_sync=wasmExports.emscripten_proxy_sync)(e,r,t,n),_emscripten_compute_dom_pk_code=Module._emscripten_compute_dom_pk_code=e=>(_emscripten_compute_dom_pk_code=Module._emscripten_compute_dom_pk_code=wasmExports.emscripten_compute_dom_pk_code)(e),_emscripten_dom_pk_code_to_string=Module._emscripten_dom_pk_code_to_string=e=>(_emscripten_dom_pk_code_to_string=Module._emscripten_dom_pk_code_to_string=wasmExports.emscripten_dom_pk_code_to_string)(e),_emscripten_wget=Module._emscripten_wget=(e,r)=>(_emscripten_wget=Module._emscripten_wget=wasmExports.emscripten_wget)(e,r),_emscripten_dom_vk_to_string=Module._emscripten_dom_vk_to_string=e=>(_emscripten_dom_vk_to_string=Module._emscripten_dom_vk_to_string=wasmExports.emscripten_dom_vk_to_string)(e),__emscripten_set_offscreencanvas_size_on_thread=Module.__emscripten_set_offscreencanvas_size_on_thread=(e,r,t,n)=>(__emscripten_set_offscreencanvas_size_on_thread=Module.__emscripten_set_offscreencanvas_size_on_thread=wasmExports._emscripten_set_offscreencanvas_size_on_thread)(e,r,t,n),_emscripten_proxy_async=Module._emscripten_proxy_async=(e,r,t,n)=>(_emscripten_proxy_async=Module._emscripten_proxy_async=wasmExports.emscripten_proxy_async)(e,r,t,n),_emscripten_builtin_malloc=Module._emscripten_builtin_malloc=e=>(_emscripten_builtin_malloc=Module._emscripten_builtin_malloc=wasmExports.emscripten_builtin_malloc)(e),_emscripten_thread_sleep=Module._emscripten_thread_sleep=e=>(_emscripten_thread_sleep=Module._emscripten_thread_sleep=wasmExports.emscripten_thread_sleep)(e),___dl_seterr=(e,r)=>(___dl_seterr=wasmExports.__dl_seterr)(e,r),_pthread_setcancelstate=Module._pthread_setcancelstate=(e,r)=>(_pthread_setcancelstate=Module._pthread_setcancelstate=wasmExports.pthread_setcancelstate)(e,r),_emscripten_dlopen=Module._emscripten_dlopen=(e,r,t,n,a)=>(_emscripten_dlopen=Module._emscripten_dlopen=wasmExports.emscripten_dlopen)(e,r,t,n,a),_emscripten_dlopen_promise=Module._emscripten_dlopen_promise=(e,r)=>(_emscripten_dlopen_promise=Module._emscripten_dlopen_promise=wasmExports.emscripten_dlopen_promise)(e,r),_emscripten_console_logf=Module._emscripten_console_logf=(e,r)=>(_emscripten_console_logf=Module._emscripten_console_logf=wasmExports.emscripten_console_logf)(e,r),_emscripten_console_errorf=Module._emscripten_console_errorf=(e,r)=>(_emscripten_console_errorf=Module._emscripten_console_errorf=wasmExports.emscripten_console_errorf)(e,r),_emscripten_console_warnf=Module._emscripten_console_warnf=(e,r)=>(_emscripten_console_warnf=Module._emscripten_console_warnf=wasmExports.emscripten_console_warnf)(e,r),_emscripten_outf=Module._emscripten_outf=(e,r)=>(_emscripten_outf=Module._emscripten_outf=wasmExports.emscripten_outf)(e,r),_emscripten_fiber_init=Module._emscripten_fiber_init=(e,r,t,n,a,o,_)=>(_emscripten_fiber_init=Module._emscripten_fiber_init=wasmExports.emscripten_fiber_init)(e,r,t,n,a,o,_),_emscripten_fiber_init_from_current_context=Module._emscripten_fiber_init_from_current_context=(e,r,t)=>(_emscripten_fiber_init_from_current_context=Module._emscripten_fiber_init_from_current_context=wasmExports.emscripten_fiber_init_from_current_context)(e,r,t),_emscripten_stack_get_base=Module._emscripten_stack_get_base=()=>(_emscripten_stack_get_base=Module._emscripten_stack_get_base=wasmExports.emscripten_stack_get_base)(),_emscripten_stack_get_end=Module._emscripten_stack_get_end=()=>(_emscripten_stack_get_end=Module._emscripten_stack_get_end=wasmExports.emscripten_stack_get_end)(),_emscripten_get_heap_size=Module._emscripten_get_heap_size=()=>(_emscripten_get_heap_size=Module._emscripten_get_heap_size=wasmExports.emscripten_get_heap_size)(),_emscripten_builtin_memcpy=Module._emscripten_builtin_memcpy=(e,r,t)=>(_emscripten_builtin_memcpy=Module._emscripten_builtin_memcpy=wasmExports.emscripten_builtin_memcpy)(e,r,t),_emscripten_builtin_memset=Module._emscripten_builtin_memset=(e,r,t)=>(_emscripten_builtin_memset=Module._emscripten_builtin_memset=wasmExports.emscripten_builtin_memset)(e,r,t),_emscripten_builtin_free=Module._emscripten_builtin_free=e=>(_emscripten_builtin_free=Module._emscripten_builtin_free=wasmExports.emscripten_builtin_free)(e),_emscripten_builtin_memalign=(e,r)=>(_emscripten_builtin_memalign=wasmExports.emscripten_builtin_memalign)(e,r),_emscripten_scan_stack=Module._emscripten_scan_stack=e=>(_emscripten_scan_stack=Module._emscripten_scan_stack=wasmExports.emscripten_scan_stack)(e),_emscripten_stack_get_current=Module._emscripten_stack_get_current=()=>(_emscripten_stack_get_current=Module._emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)(),_emscripten_futex_wake=Module._emscripten_futex_wake=(e,r)=>(_emscripten_futex_wake=Module._emscripten_futex_wake=wasmExports.emscripten_futex_wake)(e,r),_pthread_sigmask=Module._pthread_sigmask=(e,r,t)=>(_pthread_sigmask=Module._pthread_sigmask=wasmExports.pthread_sigmask)(e,r,t),_freelocale=Module._freelocale=e=>(_freelocale=Module._freelocale=wasmExports.freelocale)(e),_emscripten_has_threading_support=Module._emscripten_has_threading_support=()=>(_emscripten_has_threading_support=Module._emscripten_has_threading_support=wasmExports.emscripten_has_threading_support)(),_emscripten_num_logical_cores=Module._emscripten_num_logical_cores=()=>(_emscripten_num_logical_cores=Module._emscripten_num_logical_cores=wasmExports.emscripten_num_logical_cores)(),_emscripten_force_num_logical_cores=Module._emscripten_force_num_logical_cores=e=>(_emscripten_force_num_logical_cores=Module._emscripten_force_num_logical_cores=wasmExports.emscripten_force_num_logical_cores)(e),_emscripten_futex_wait=Module._emscripten_futex_wait=(e,r,t)=>(_emscripten_futex_wait=Module._emscripten_futex_wait=wasmExports.emscripten_futex_wait)(e,r,t),_emscripten_main_thread_process_queued_calls=Module._emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=Module._emscripten_main_thread_process_queued_calls=wasmExports.emscripten_main_thread_process_queued_calls)(),_emscripten_current_thread_process_queued_calls=Module._emscripten_current_thread_process_queued_calls=()=>(_emscripten_current_thread_process_queued_calls=Module._emscripten_current_thread_process_queued_calls=wasmExports.emscripten_current_thread_process_queued_calls)(),__emscripten_yield=Module.__emscripten_yield=e=>(__emscripten_yield=Module.__emscripten_yield=wasmExports._emscripten_yield)(e),__emscripten_check_timers=Module.__emscripten_check_timers=e=>(__emscripten_check_timers=Module.__emscripten_check_timers=wasmExports._emscripten_check_timers)(e),_pthread_mutex_init=Module._pthread_mutex_init=(e,r)=>(_pthread_mutex_init=Module._pthread_mutex_init=wasmExports.pthread_mutex_init)(e,r),_pthread_mutex_destroy=Module._pthread_mutex_destroy=e=>(_pthread_mutex_destroy=Module._pthread_mutex_destroy=wasmExports.pthread_mutex_destroy)(e),_pthread_mutex_consistent=Module._pthread_mutex_consistent=e=>(_pthread_mutex_consistent=Module._pthread_mutex_consistent=wasmExports.pthread_mutex_consistent)(e),_pthread_barrier_init=Module._pthread_barrier_init=(e,r,t)=>(_pthread_barrier_init=Module._pthread_barrier_init=wasmExports.pthread_barrier_init)(e,r,t),_pthread_barrier_destroy=Module._pthread_barrier_destroy=e=>(_pthread_barrier_destroy=Module._pthread_barrier_destroy=wasmExports.pthread_barrier_destroy)(e),_pthread_barrier_wait=Module._pthread_barrier_wait=e=>(_pthread_barrier_wait=Module._pthread_barrier_wait=wasmExports.pthread_barrier_wait)(e),_pthread_getspecific=Module._pthread_getspecific=e=>(_pthread_getspecific=Module._pthread_getspecific=wasmExports.pthread_getspecific)(e),_pthread_cond_wait=Module._pthread_cond_wait=(e,r)=>(_pthread_cond_wait=Module._pthread_cond_wait=wasmExports.pthread_cond_wait)(e,r),_pthread_cond_signal=Module._pthread_cond_signal=e=>(_pthread_cond_signal=Module._pthread_cond_signal=wasmExports.pthread_cond_signal)(e),_pthread_cond_broadcast=Module._pthread_cond_broadcast=e=>(_pthread_cond_broadcast=Module._pthread_cond_broadcast=wasmExports.pthread_cond_broadcast)(e),_pthread_cond_init=Module._pthread_cond_init=(e,r)=>(_pthread_cond_init=Module._pthread_cond_init=wasmExports.pthread_cond_init)(e,r),_pthread_cond_destroy=Module._pthread_cond_destroy=e=>(_pthread_cond_destroy=Module._pthread_cond_destroy=wasmExports.pthread_cond_destroy)(e),_pthread_cancel=Module._pthread_cancel=e=>(_pthread_cancel=Module._pthread_cancel=wasmExports.pthread_cancel)(e),_pthread_testcancel=Module._pthread_testcancel=()=>(_pthread_testcancel=Module._pthread_testcancel=wasmExports.pthread_testcancel)(),_pthread_equal=Module._pthread_equal=(e,r)=>(_pthread_equal=Module._pthread_equal=wasmExports.pthread_equal)(e,r),_pthread_mutexattr_init=Module._pthread_mutexattr_init=e=>(_pthread_mutexattr_init=Module._pthread_mutexattr_init=wasmExports.pthread_mutexattr_init)(e),_pthread_mutexattr_setprotocol=Module._pthread_mutexattr_setprotocol=(e,r)=>(_pthread_mutexattr_setprotocol=Module._pthread_mutexattr_setprotocol=wasmExports.pthread_mutexattr_setprotocol)(e,r),_pthread_mutexattr_settype=Module._pthread_mutexattr_settype=(e,r)=>(_pthread_mutexattr_settype=Module._pthread_mutexattr_settype=wasmExports.pthread_mutexattr_settype)(e,r),_pthread_mutexattr_destroy=Module._pthread_mutexattr_destroy=e=>(_pthread_mutexattr_destroy=Module._pthread_mutexattr_destroy=wasmExports.pthread_mutexattr_destroy)(e),_pthread_mutexattr_setpshared=Module._pthread_mutexattr_setpshared=(e,r)=>(_pthread_mutexattr_setpshared=Module._pthread_mutexattr_setpshared=wasmExports.pthread_mutexattr_setpshared)(e,r),_pthread_condattr_init=Module._pthread_condattr_init=e=>(_pthread_condattr_init=Module._pthread_condattr_init=wasmExports.pthread_condattr_init)(e),_pthread_condattr_destroy=Module._pthread_condattr_destroy=e=>(_pthread_condattr_destroy=Module._pthread_condattr_destroy=wasmExports.pthread_condattr_destroy)(e),_pthread_condattr_setclock=Module._pthread_condattr_setclock=(e,r)=>(_pthread_condattr_setclock=Module._pthread_condattr_setclock=wasmExports.pthread_condattr_setclock)(e,r),_pthread_condattr_setpshared=Module._pthread_condattr_setpshared=(e,r)=>(_pthread_condattr_setpshared=Module._pthread_condattr_setpshared=wasmExports.pthread_condattr_setpshared)(e,r),_pthread_getattr_np=Module._pthread_getattr_np=(e,r)=>(_pthread_getattr_np=Module._pthread_getattr_np=wasmExports.pthread_getattr_np)(e,r),_pthread_setcanceltype=Module._pthread_setcanceltype=(e,r)=>(_pthread_setcanceltype=Module._pthread_setcanceltype=wasmExports.pthread_setcanceltype)(e,r),_pthread_rwlock_init=Module._pthread_rwlock_init=(e,r)=>(_pthread_rwlock_init=Module._pthread_rwlock_init=wasmExports.pthread_rwlock_init)(e,r),_pthread_rwlock_destroy=Module._pthread_rwlock_destroy=e=>(_pthread_rwlock_destroy=Module._pthread_rwlock_destroy=wasmExports.pthread_rwlock_destroy)(e),_pthread_rwlock_rdlock=Module._pthread_rwlock_rdlock=e=>(_pthread_rwlock_rdlock=Module._pthread_rwlock_rdlock=wasmExports.pthread_rwlock_rdlock)(e),_pthread_rwlock_tryrdlock=Module._pthread_rwlock_tryrdlock=e=>(_pthread_rwlock_tryrdlock=Module._pthread_rwlock_tryrdlock=wasmExports.pthread_rwlock_tryrdlock)(e),_pthread_rwlock_timedrdlock=Module._pthread_rwlock_timedrdlock=(e,r)=>(_pthread_rwlock_timedrdlock=Module._pthread_rwlock_timedrdlock=wasmExports.pthread_rwlock_timedrdlock)(e,r),_pthread_rwlock_wrlock=Module._pthread_rwlock_wrlock=e=>(_pthread_rwlock_wrlock=Module._pthread_rwlock_wrlock=wasmExports.pthread_rwlock_wrlock)(e),_pthread_rwlock_trywrlock=Module._pthread_rwlock_trywrlock=e=>(_pthread_rwlock_trywrlock=Module._pthread_rwlock_trywrlock=wasmExports.pthread_rwlock_trywrlock)(e),_pthread_rwlock_timedwrlock=Module._pthread_rwlock_timedwrlock=(e,r)=>(_pthread_rwlock_timedwrlock=Module._pthread_rwlock_timedwrlock=wasmExports.pthread_rwlock_timedwrlock)(e,r),_pthread_rwlock_unlock=Module._pthread_rwlock_unlock=e=>(_pthread_rwlock_unlock=Module._pthread_rwlock_unlock=wasmExports.pthread_rwlock_unlock)(e),_pthread_rwlockattr_init=Module._pthread_rwlockattr_init=e=>(_pthread_rwlockattr_init=Module._pthread_rwlockattr_init=wasmExports.pthread_rwlockattr_init)(e),_pthread_rwlockattr_destroy=Module._pthread_rwlockattr_destroy=e=>(_pthread_rwlockattr_destroy=Module._pthread_rwlockattr_destroy=wasmExports.pthread_rwlockattr_destroy)(e),_pthread_rwlockattr_setpshared=Module._pthread_rwlockattr_setpshared=(e,r)=>(_pthread_rwlockattr_setpshared=Module._pthread_rwlockattr_setpshared=wasmExports.pthread_rwlockattr_setpshared)(e,r),_pthread_spin_init=Module._pthread_spin_init=(e,r)=>(_pthread_spin_init=Module._pthread_spin_init=wasmExports.pthread_spin_init)(e,r),_pthread_spin_destroy=Module._pthread_spin_destroy=e=>(_pthread_spin_destroy=Module._pthread_spin_destroy=wasmExports.pthread_spin_destroy)(e),_pthread_spin_lock=Module._pthread_spin_lock=e=>(_pthread_spin_lock=Module._pthread_spin_lock=wasmExports.pthread_spin_lock)(e),_pthread_spin_trylock=Module._pthread_spin_trylock=e=>(_pthread_spin_trylock=Module._pthread_spin_trylock=wasmExports.pthread_spin_trylock)(e),_pthread_spin_unlock=Module._pthread_spin_unlock=e=>(_pthread_spin_unlock=Module._pthread_spin_unlock=wasmExports.pthread_spin_unlock)(e),_pthread_mutex_lock=Module._pthread_mutex_lock=e=>(_pthread_mutex_lock=Module._pthread_mutex_lock=wasmExports.pthread_mutex_lock)(e),_pthread_mutex_unlock=Module._pthread_mutex_unlock=e=>(_pthread_mutex_unlock=Module._pthread_mutex_unlock=wasmExports.pthread_mutex_unlock)(e),_pthread_mutex_trylock=Module._pthread_mutex_trylock=e=>(_pthread_mutex_trylock=Module._pthread_mutex_trylock=wasmExports.pthread_mutex_trylock)(e),_pthread_mutex_timedlock=Module._pthread_mutex_timedlock=(e,r)=>(_pthread_mutex_timedlock=Module._pthread_mutex_timedlock=wasmExports.pthread_mutex_timedlock)(e,r),_emscripten_builtin_pthread_create=Module._emscripten_builtin_pthread_create=(e,r,t,n)=>(_emscripten_builtin_pthread_create=Module._emscripten_builtin_pthread_create=wasmExports.emscripten_builtin_pthread_create)(e,r,t,n),_emscripten_builtin_pthread_join=Module._emscripten_builtin_pthread_join=(e,r)=>(_emscripten_builtin_pthread_join=Module._emscripten_builtin_pthread_join=wasmExports.emscripten_builtin_pthread_join)(e,r),_pthread_join=Module._pthread_join=(e,r)=>(_pthread_join=Module._pthread_join=wasmExports.pthread_join)(e,r),_pthread_key_delete=Module._pthread_key_delete=e=>(_pthread_key_delete=Module._pthread_key_delete=wasmExports.pthread_key_delete)(e),_pthread_key_create=Module._pthread_key_create=(e,r)=>(_pthread_key_create=Module._pthread_key_create=wasmExports.pthread_key_create)(e,r),_pthread_once=Module._pthread_once=(e,r)=>(_pthread_once=Module._pthread_once=wasmExports.pthread_once)(e,r),_pthread_cond_timedwait=Module._pthread_cond_timedwait=(e,r,t)=>(_pthread_cond_timedwait=Module._pthread_cond_timedwait=wasmExports.pthread_cond_timedwait)(e,r,t),_emscripten_builtin_pthread_exit=Module._emscripten_builtin_pthread_exit=e=>(_emscripten_builtin_pthread_exit=Module._emscripten_builtin_pthread_exit=wasmExports.emscripten_builtin_pthread_exit)(e),_pthread_exit=Module._pthread_exit=e=>(_pthread_exit=Module._pthread_exit=wasmExports.pthread_exit)(e),_emscripten_builtin_pthread_detach=Module._emscripten_builtin_pthread_detach=e=>(_emscripten_builtin_pthread_detach=Module._emscripten_builtin_pthread_detach=wasmExports.emscripten_builtin_pthread_detach)(e),_pthread_detach=Module._pthread_detach=e=>(_pthread_detach=Module._pthread_detach=wasmExports.pthread_detach)(e),_emscripten_builtin_mmap=Module._emscripten_builtin_mmap=(e,r,t,n,a,o,_)=>(_emscripten_builtin_mmap=Module._emscripten_builtin_mmap=wasmExports.emscripten_builtin_mmap)(e,r,t,n,a,o,_),_emscripten_builtin_munmap=Module._emscripten_builtin_munmap=(e,r)=>(_emscripten_builtin_munmap=Module._emscripten_builtin_munmap=wasmExports.emscripten_builtin_munmap)(e,r),_em_proxying_queue_create=Module._em_proxying_queue_create=()=>(_em_proxying_queue_create=Module._em_proxying_queue_create=wasmExports.em_proxying_queue_create)(),_em_proxying_queue_destroy=Module._em_proxying_queue_destroy=e=>(_em_proxying_queue_destroy=Module._em_proxying_queue_destroy=wasmExports.em_proxying_queue_destroy)(e),_emscripten_proxy_execute_queue=Module._emscripten_proxy_execute_queue=e=>(_emscripten_proxy_execute_queue=Module._emscripten_proxy_execute_queue=wasmExports.emscripten_proxy_execute_queue)(e),_emscripten_proxy_finish=Module._emscripten_proxy_finish=e=>(_emscripten_proxy_finish=Module._emscripten_proxy_finish=wasmExports.emscripten_proxy_finish)(e),_emscripten_proxy_sync_with_ctx=Module._emscripten_proxy_sync_with_ctx=(e,r,t,n)=>(_emscripten_proxy_sync_with_ctx=Module._emscripten_proxy_sync_with_ctx=wasmExports.emscripten_proxy_sync_with_ctx)(e,r,t,n),_pthread_attr_destroy=Module._pthread_attr_destroy=e=>(_pthread_attr_destroy=Module._pthread_attr_destroy=wasmExports.pthread_attr_destroy)(e),_pthread_attr_getdetachstate=Module._pthread_attr_getdetachstate=(e,r)=>(_pthread_attr_getdetachstate=Module._pthread_attr_getdetachstate=wasmExports.pthread_attr_getdetachstate)(e,r),_pthread_attr_getguardsize=Module._pthread_attr_getguardsize=(e,r)=>(_pthread_attr_getguardsize=Module._pthread_attr_getguardsize=wasmExports.pthread_attr_getguardsize)(e,r),_pthread_attr_getinheritsched=Module._pthread_attr_getinheritsched=(e,r)=>(_pthread_attr_getinheritsched=Module._pthread_attr_getinheritsched=wasmExports.pthread_attr_getinheritsched)(e,r),_pthread_attr_getschedparam=Module._pthread_attr_getschedparam=(e,r)=>(_pthread_attr_getschedparam=Module._pthread_attr_getschedparam=wasmExports.pthread_attr_getschedparam)(e,r),_pthread_attr_getschedpolicy=Module._pthread_attr_getschedpolicy=(e,r)=>(_pthread_attr_getschedpolicy=Module._pthread_attr_getschedpolicy=wasmExports.pthread_attr_getschedpolicy)(e,r),_pthread_attr_getscope=Module._pthread_attr_getscope=(e,r)=>(_pthread_attr_getscope=Module._pthread_attr_getscope=wasmExports.pthread_attr_getscope)(e,r),_pthread_attr_getstack=Module._pthread_attr_getstack=(e,r,t)=>(_pthread_attr_getstack=Module._pthread_attr_getstack=wasmExports.pthread_attr_getstack)(e,r,t),_pthread_attr_getstacksize=Module._pthread_attr_getstacksize=(e,r)=>(_pthread_attr_getstacksize=Module._pthread_attr_getstacksize=wasmExports.pthread_attr_getstacksize)(e,r),_pthread_barrierattr_getpshared=Module._pthread_barrierattr_getpshared=(e,r)=>(_pthread_barrierattr_getpshared=Module._pthread_barrierattr_getpshared=wasmExports.pthread_barrierattr_getpshared)(e,r),_pthread_condattr_getclock=Module._pthread_condattr_getclock=(e,r)=>(_pthread_condattr_getclock=Module._pthread_condattr_getclock=wasmExports.pthread_condattr_getclock)(e,r),_pthread_condattr_getpshared=Module._pthread_condattr_getpshared=(e,r)=>(_pthread_condattr_getpshared=Module._pthread_condattr_getpshared=wasmExports.pthread_condattr_getpshared)(e,r),_pthread_mutexattr_getprotocol=Module._pthread_mutexattr_getprotocol=(e,r)=>(_pthread_mutexattr_getprotocol=Module._pthread_mutexattr_getprotocol=wasmExports.pthread_mutexattr_getprotocol)(e,r),_pthread_mutexattr_getpshared=Module._pthread_mutexattr_getpshared=(e,r)=>(_pthread_mutexattr_getpshared=Module._pthread_mutexattr_getpshared=wasmExports.pthread_mutexattr_getpshared)(e,r),_pthread_mutexattr_getrobust=Module._pthread_mutexattr_getrobust=(e,r)=>(_pthread_mutexattr_getrobust=Module._pthread_mutexattr_getrobust=wasmExports.pthread_mutexattr_getrobust)(e,r),_pthread_mutexattr_gettype=Module._pthread_mutexattr_gettype=(e,r)=>(_pthread_mutexattr_gettype=Module._pthread_mutexattr_gettype=wasmExports.pthread_mutexattr_gettype)(e,r),_pthread_rwlockattr_getpshared=Module._pthread_rwlockattr_getpshared=(e,r)=>(_pthread_rwlockattr_getpshared=Module._pthread_rwlockattr_getpshared=wasmExports.pthread_rwlockattr_getpshared)(e,r),_pthread_attr_init=Module._pthread_attr_init=e=>(_pthread_attr_init=Module._pthread_attr_init=wasmExports.pthread_attr_init)(e),_pthread_attr_setdetachstate=Module._pthread_attr_setdetachstate=(e,r)=>(_pthread_attr_setdetachstate=Module._pthread_attr_setdetachstate=wasmExports.pthread_attr_setdetachstate)(e,r),_pthread_attr_setguardsize=Module._pthread_attr_setguardsize=(e,r)=>(_pthread_attr_setguardsize=Module._pthread_attr_setguardsize=wasmExports.pthread_attr_setguardsize)(e,r),_pthread_attr_setinheritsched=Module._pthread_attr_setinheritsched=(e,r)=>(_pthread_attr_setinheritsched=Module._pthread_attr_setinheritsched=wasmExports.pthread_attr_setinheritsched)(e,r),_pthread_attr_setschedparam=Module._pthread_attr_setschedparam=(e,r)=>(_pthread_attr_setschedparam=Module._pthread_attr_setschedparam=wasmExports.pthread_attr_setschedparam)(e,r),_pthread_attr_setschedpolicy=Module._pthread_attr_setschedpolicy=(e,r)=>(_pthread_attr_setschedpolicy=Module._pthread_attr_setschedpolicy=wasmExports.pthread_attr_setschedpolicy)(e,r),_pthread_attr_setscope=Module._pthread_attr_setscope=(e,r)=>(_pthread_attr_setscope=Module._pthread_attr_setscope=wasmExports.pthread_attr_setscope)(e,r),_pthread_attr_setstack=Module._pthread_attr_setstack=(e,r,t)=>(_pthread_attr_setstack=Module._pthread_attr_setstack=wasmExports.pthread_attr_setstack)(e,r,t),_pthread_attr_setstacksize=Module._pthread_attr_setstacksize=(e,r)=>(_pthread_attr_setstacksize=Module._pthread_attr_setstacksize=wasmExports.pthread_attr_setstacksize)(e,r),_pthread_getconcurrency=Module._pthread_getconcurrency=()=>(_pthread_getconcurrency=Module._pthread_getconcurrency=wasmExports.pthread_getconcurrency)(),_pthread_getcpuclockid=Module._pthread_getcpuclockid=(e,r)=>(_pthread_getcpuclockid=Module._pthread_getcpuclockid=wasmExports.pthread_getcpuclockid)(e,r),_pthread_getschedparam=Module._pthread_getschedparam=(e,r,t)=>(_pthread_getschedparam=Module._pthread_getschedparam=wasmExports.pthread_getschedparam)(e,r,t),_emscripten_main_runtime_thread_id=Module._emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=Module._emscripten_main_runtime_thread_id=wasmExports.emscripten_main_runtime_thread_id)(),_pthread_setconcurrency=Module._pthread_setconcurrency=e=>(_pthread_setconcurrency=Module._pthread_setconcurrency=wasmExports.pthread_setconcurrency)(e),_pthread_setschedprio=Module._pthread_setschedprio=(e,r)=>(_pthread_setschedprio=Module._pthread_setschedprio=wasmExports.pthread_setschedprio)(e,r),_emscripten_get_sbrk_ptr=Module._emscripten_get_sbrk_ptr=()=>(_emscripten_get_sbrk_ptr=Module._emscripten_get_sbrk_ptr=wasmExports.emscripten_get_sbrk_ptr)(),__emscripten_timeout=(e,r)=>(__emscripten_timeout=wasmExports._emscripten_timeout)(e,r),_emscripten_set_thread_name=Module._emscripten_set_thread_name=(e,r)=>(_emscripten_set_thread_name=Module._emscripten_set_thread_name=wasmExports.emscripten_set_thread_name)(e,r),_malloc_trim=Module._malloc_trim=e=>(_malloc_trim=Module._malloc_trim=wasmExports.malloc_trim)(e),_malloc_usable_size=Module._malloc_usable_size=e=>(_malloc_usable_size=Module._malloc_usable_size=wasmExports.malloc_usable_size)(e),_malloc_footprint=Module._malloc_footprint=()=>(_malloc_footprint=Module._malloc_footprint=wasmExports.malloc_footprint)(),_malloc_max_footprint=Module._malloc_max_footprint=()=>(_malloc_max_footprint=Module._malloc_max_footprint=wasmExports.malloc_max_footprint)(),_malloc_footprint_limit=Module._malloc_footprint_limit=()=>(_malloc_footprint_limit=Module._malloc_footprint_limit=wasmExports.malloc_footprint_limit)(),_malloc_set_footprint_limit=Module._malloc_set_footprint_limit=e=>(_malloc_set_footprint_limit=Module._malloc_set_footprint_limit=wasmExports.malloc_set_footprint_limit)(e),_emscripten_stack_init=Module._emscripten_stack_init=()=>(_emscripten_stack_init=Module._emscripten_stack_init=wasmExports.emscripten_stack_init)(),_emscripten_stack_set_limits=Module._emscripten_stack_set_limits=(e,r)=>(_emscripten_stack_set_limits=Module._emscripten_stack_set_limits=wasmExports.emscripten_stack_set_limits)(e,r),_emscripten_stack_get_free=Module._emscripten_stack_get_free=()=>(_emscripten_stack_get_free=Module._emscripten_stack_get_free=wasmExports.emscripten_stack_get_free)(),stackSave=()=>(stackSave=wasmExports.stackSave)(),stackRestore=e=>(stackRestore=wasmExports.stackRestore)(e),stackAlloc=e=>(stackAlloc=wasmExports.stackAlloc)(e),__ZTVN6duckdb7BindingE=Module.__ZTVN6duckdb7BindingE=1989e3,__ZTSN6duckdb16LogicalAggregateE=Module.__ZTSN6duckdb16LogicalAggregateE=473e3,__ZTIN6duckdb23CachingPhysicalOperatorE=Module.__ZTIN6duckdb23CachingPhysicalOperatorE=2059e3,__ZTVN6duckdb15ReservoirSampleE=Module.__ZTVN6duckdb15ReservoirSampleE=2058e3,__ZTIN6duckdb16OpenerFileSystemE=Module.__ZTIN6duckdb16OpenerFileSystemE=2068e3,__ZTIN6duckdb19BitpackingScanStateINS_10uhugeint_tENS_9hugeint_tEEE=Module.__ZTIN6duckdb19BitpackingScanStateINS_10uhugeint_tENS_9hugeint_tEEE=2073e3,__ZTSN6duckdb19DecimalColumnReaderINS_9hugeint_tELb0EEE=Module.__ZTSN6duckdb19DecimalColumnReaderINS_9hugeint_tELb0EEE=1287e3,__ZTSN6duckdb21TemplatedColumnReaderINS_10dtime_tz_tENS_30CallbackParquetValueConversionIiS1_XadL_ZNS_20ParquetIntToTimeMsTZERKiEEEEEE=Module.__ZTSN6duckdb21TemplatedColumnReaderINS_10dtime_tz_tENS_30CallbackParquetValueConversionIiS1_XadL_ZNS_20ParquetIntToTimeMsTZERKiEEEEEE=129e4,__ZTVN14duckdb_parquet6format7IntTypeE=Module.__ZTVN14duckdb_parquet6format7IntTypeE=2108e3,__ZTVNSt3__220__shared_ptr_emplaceIN5arrow16DenseUnionScalarENS_9allocatorIS2_EEEE=Module.__ZTVNSt3__220__shared_ptr_emplaceIN5arrow16DenseUnionScalarENS_9allocatorIS2_EEEE=2115e3,__ZTINSt3__220__shared_ptr_emplaceIN5arrow12Date64ScalarENS_9allocatorIS2_EEEE=Module.__ZTINSt3__220__shared_ptr_emplaceIN5arrow12Date64ScalarENS_9allocatorIS2_EEEE=2113e3,__ZTIN5arrow16BaseBinaryScalarE=Module.__ZTIN5arrow16BaseBinaryScalarE=2114e3,__ZTVNSt3__220__shared_ptr_emplaceIN5arrow8MapArrayENS_9allocatorIS2_EEEE=Module.__ZTVNSt3__220__shared_ptr_emplaceIN5arrow8MapArrayENS_9allocatorIS2_EEEE=2118e3,__ZTIZN5arrow22ValueComparatorVisitor5VisitINS_13HalfFloatTypeEEENS_6StatusERKT_EUlRKNS_5ArrayExS9_xE_=Module.__ZTIZN5arrow22ValueComparatorVisitor5VisitINS_13HalfFloatTypeEEENS_6StatusERKT_EUlRKNS_5ArrayExS9_xE_=2121e3,__ZTIN5arrow16CPUMemoryManagerE=Module.__ZTIN5arrow16CPUMemoryManagerE=2135e3,__ZTVN5arrow11BooleanTypeE=Module.__ZTVN5arrow11BooleanTypeE=214e4,__ZTVNSt3__220__shared_ptr_emplaceIN5arrow14Decimal256TypeENS_9allocatorIS2_EEEE=Module.__ZTVNSt3__220__shared_ptr_emplaceIN5arrow14Decimal256TypeENS_9allocatorIS2_EEEE=2141e3,__ZTVNSt3__220__shared_ptr_emplaceIN5arrow8internal10ThreadPool5StateENS_9allocatorIS4_EEEE=Module.__ZTVNSt3__220__shared_ptr_emplaceIN5arrow8internal10ThreadPool5StateENS_9allocatorIS4_EEEE=2157e3,__ZTIZN5arrow7compute8internal22GetFunctionOptionsTypeINS0_14TDigestOptionsEJNS_8internal18DataMemberPropertyIS3_NSt3__26vectorIdNS6_9allocatorIdEEEEEENS5_IS3_jEESC_NS5_IS3_bEESC_EEEPKNS0_19FunctionOptionsTypeEDpRKT0_E11OptionsType=Module.__ZTIZN5arrow7compute8internal22GetFunctionOptionsTypeINS0_14TDigestOptionsEJNS_8internal18DataMemberPropertyIS3_NSt3__26vectorIdNS6_9allocatorIdEEEEEENS5_IS3_jEESC_NS5_IS3_bEESC_EEEPKNS0_19FunctionOptionsTypeEDpRKT0_E11OptionsType=2163e3,__ZN5arrow7compute21MatchSubstringOptions9kTypeNameE=Module.__ZN5arrow7compute21MatchSubstringOptions9kTypeNameE=1426e3,__ZGVZN5arrow7compute8internal22GetFunctionOptionsTypeINS0_22RoundToMultipleOptionsEJNS_8internal18DataMemberPropertyIS3_NSt3__210shared_ptrINS_6ScalarEEEEENS5_IS3_NS0_9RoundModeEEEEEEPKNS0_19FunctionOptionsTypeEDpRKT0_E8instance=Module.__ZGVZN5arrow7compute8internal22GetFunctionOptionsTypeINS0_22RoundToMultipleOptionsEJNS_8internal18DataMemberPropertyIS3_NSt3__210shared_ptrINS_6ScalarEEEEENS5_IS3_NS0_9RoundModeEEEEEEPKNS0_19FunctionOptionsTypeEDpRKT0_E8instance=2239e3,__ZTIZN5arrow7compute8internal22GetFunctionOptionsTypeINS0_23DictionaryEncodeOptionsEJNS_8internal18DataMemberPropertyIS3_NS3_20NullEncodingBehaviorEEEEEEPKNS0_19FunctionOptionsTypeEDpRKT0_E11OptionsType=Module.__ZTIZN5arrow7compute8internal22GetFunctionOptionsTypeINS0_23DictionaryEncodeOptionsEJNS_8internal18DataMemberPropertyIS3_NS3_20NullEncodingBehaviorEEEEEEPKNS0_19FunctionOptionsTypeEDpRKT0_E11OptionsType=2167e3,__ZTVN5arrow7compute8internal18GenericOptionsTypeE=Module.__ZTVN5arrow7compute8internal18GenericOptionsTypeE=2169e3,__ZTVNSt3__220__shared_ptr_emplaceIN5arrow3ipc25RecordBatchFileReaderImpl28CachedRecordBatchReadContextENS_9allocatorIS4_EEEE=Module.__ZTVNSt3__220__shared_ptr_emplaceIN5arrow3ipc25RecordBatchFileReaderImpl28CachedRecordBatchReadContextENS_9allocatorIS4_EEEE=2176e3,__ZTINSt3__212ctype_bynameIwEE=Module.__ZTINSt3__212ctype_bynameIwEE=2185e3,__ZTINSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE=Module.__ZTINSt3__215time_get_bynameIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE=2186e3,__ZTINSt3__217moneypunct_bynameIwLb1EEE=Module.__ZTINSt3__217moneypunct_bynameIwLb1EEE=2187e3;function applySignatureConversions(e){e=Object.assign({},e);var r=_=>(l,c,u)=>_(l,c,u)>>>0,t=_=>l=>_(l)>>>0,n=_=>()=>_()>>>0,a=_=>(l,c)=>_(l,c)>>>0,o=_=>l=>_(l)>>>0;return e.memcpy=r(e.memcpy),e.malloc=t(e.malloc),e.__errno_location=n(e.__errno_location),e.pthread_self=n(e.pthread_self),e.__getTypeName=t(e.__getTypeName),e.emscripten_builtin_malloc=t(e.emscripten_builtin_malloc),e.emscripten_stack_get_base=n(e.emscripten_stack_get_base),e.emscripten_stack_get_end=n(e.emscripten_stack_get_end),e.emscripten_builtin_memalign=a(e.emscripten_builtin_memalign),e.emscripten_stack_get_current=n(e.emscripten_stack_get_current),e.emscripten_main_runtime_thread_id=n(e.emscripten_main_runtime_thread_id),e.sbrk=o(e.sbrk),e.memalign=a(e.memalign),e.stackSave=n(e.stackSave),e.stackAlloc=t(e.stackAlloc),e}Module.stackAlloc=stackAlloc,Module.stackSave=stackSave,Module.stackRestore=stackRestore,Module.ccall=ccall;var calledRun;dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)};function callMain(e=[]){var r=resolveGlobalSymbol("main").sym;if(r){e.unshift(thisProgram);var t=e.length,n=stackAlloc((t+1)*4),a=n;e.forEach(_=>{HEAPU32[a>>>2>>>0]=stringToUTF8OnStack(_),a+=4}),HEAPU32[a>>>2>>>0]=0;try{var o=r(t,n);return exitJS(o,!0),o}catch(_){return handleException(_)}}}function run(e=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function r(){calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),readyPromiseResolve(Module),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(e),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),r()},1)):r()}if(Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),moduleArg.ready}})();typeof exports=="object"&&typeof module=="object"?module.exports=DuckDB:typeof define=="function"&&define.amd&&define([],()=>DuckDB)});import*as J from"apache-arrow";var ue=class{constructor(r,t){this._bindings=r,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}query(r){let t=this._bindings.runQuery(this._conn,r),n=J.RecordBatchReader.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new J.Table(n)}async send(r){let t=this._bindings.startPendingQuery(this._conn,r);for(;t==null;)t=await new Promise((o,_)=>{try{o(this._bindings.pollPendingQuery(this._conn))}catch(l){console.log(l),_(l)}});let n=new de(this._bindings,this._conn,t),a=J.RecordBatchReader.from(n);return console.assert(a.isSync()),console.assert(a.isStream()),a}cancelSent(){return this._bindings.cancelPendingQuery(this._conn)}getTableNames(r){return this._bindings.getTableNames(this._conn,r)}prepare(r){let t=this._bindings.createPrepared(this._conn,r);return new Le(this._bindings,this._conn,t)}createScalarFunction(r,t,n){this._bindings.createScalarFunction(this._conn,r,t,n)}insertArrowTable(r,t){let n=J.tableToIPC(r,"stream");this.insertArrowFromIPCStream(n,t)}insertArrowFromIPCStream(r,t){this._bindings.insertArrowFromIPCStream(this._conn,r,t)}insertCSVFromPath(r,t){this._bindings.insertCSVFromPath(this._conn,r,t)}insertJSONFromPath(r,t){this._bindings.insertJSONFromPath(this._conn,r,t)}},de=class{constructor(r,t,n){this.bindings=r;this.conn=t;this.header=n;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let r=this.bindings.fetchQueryResults(this.conn);return this._depleted=r.length==0,{done:this._depleted,value:r}}[Symbol.iterator](){return this}},Le=class{constructor(r,t,n){this.bindings=r,this.connectionId=t,this.statementId=n}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...r){let t=this.bindings.runPrepared(this.connectionId,this.statementId,r),n=J.RecordBatchReader.from(t);return console.assert(n.isSync()),console.assert(n.isFile()),new J.Table(n)}send(...r){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,r),n=new de(this.bindings,this.connectionId,t),a=J.RecordBatchReader.from(n);return console.assert(a.isSync()),console.assert(a.isStream()),a}};var vr=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(vr||{});var je=new TextEncoder,Be=new TextDecoder("utf-8");function Ae(e,r,t){let n=je.encode(t),a=e._malloc(n.byteLength),o=e.HEAPU8.subarray(a,a+n.byteLength);o.set(n),e.HEAPF64[(r>>3)+0]=1,e.HEAPF64[(r>>3)+1]=a,e.HEAPF64[(r>>3)+2]=o.byteLength}function De(e){switch(e){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function ke(e,r,t,n){let a=e.HEAPU8.subarray(r,r+n*De(t));switch(t){case"UINT8":return new Uint8Array(a.buffer,a.byteOffset,n);case"INT8":return new Int8Array(a.buffer,a.byteOffset,n);case"INT32":return new Int32Array(a.buffer,a.byteOffset,n);case"FLOAT":return new Float32Array(a.buffer,a.byteOffset,n);case"DOUBLE":return new Float64Array(a.buffer,a.byteOffset,n);case"VARCHAR":return new Float64Array(a.buffer,a.byteOffset,n);default:return new Array(0)}}function Ue(e,r,t){let n=e.HEAPU8.subarray(r,r+t);return new Uint8Array(n.buffer,n.byteOffset,t)}function pe(e,r,t){let n=e.HEAPU8.subarray(r,r+t*8);return new Float64Array(n.buffer,n.byteOffset,t)}function fe(e,r,t,n,a,o,_,l){try{let c=e._udfFunctions.get(n);if(!c){Ae(r,t,"Unknown UDF with id: "+n);return}let u=Be.decode(r.HEAPU8.subarray(a,a+o)),d=JSON.parse(u),p=pe(r,_,l/8),f=A=>{var F;let D=null;switch(A.validityBuffer!==void 0&&(D=Ue(r,p[A.validityBuffer],d.rows)),A.physicalType){case"VARCHAR":{if(A.dataBuffer===null||A.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for VARCHAR argument");if(A.lengthBuffer===null||A.lengthBuffer===void 0)throw new Error("malformed data view, expected data length buffer for VARCHAR argument");let P=ke(r,p[A.dataBuffer],A.physicalType,d.rows),T=[],M=pe(r,p[A.lengthBuffer],d.rows);for(let C=0;CT[C]}case"STRUCT":{let P={},T=[];for(let M=0;M<(((F=A.children)==null?void 0:F.length)||0);++M){let C=A.children[M],G=f(C);T.push(I=>{P[C.name]=G(I)})}return D!=null?M=>{if(!D[M])return null;for(let C of T)C(M);return P}:M=>{for(let C of T)C(M);return P}}default:{if(A.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for argument of type: "+A.physicalType);let P=ke(r,p[A.dataBuffer],A.physicalType,d.rows);return D!=null?T=>D[T]?P[T]:null:T=>P[T]}}},m=[];for(let A=0;A>3)+0]=0,r.HEAPF64[(t>>3)+1]=E,r.HEAPF64[(t>>3)+2]=0}catch(c){Ae(r,t,c.toString())}}function hr(){let e=new TextDecoder;return r=>(typeof SharedArrayBuffer<"u"&&r.buffer instanceof SharedArrayBuffer&&(r=new Uint8Array(r)),e.decode(r))}var Sr=hr();function q(e,r){console.error("FAIL WITH: ".concat(r)),e.ccall("duckdb_web_fail_with",null,["string"],[r])}function te(e,r,t){let n=e.HEAPU8.subarray(r,r+t),a=new Uint8Array(new ArrayBuffer(n.byteLength));return a.set(n),a}function B(e,r,t){return Sr(e.HEAPU8.subarray(r,r+t))}var xe=(_=>(_[_.BUFFER=0]="BUFFER",_[_.NODE_FS=1]="NODE_FS",_[_.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",_[_.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",_[_.HTTP=4]="HTTP",_[_.S3=5]="S3",_))(xe||{}),Ne=(_=>(_[_.FILE_FLAGS_READ=1]="FILE_FLAGS_READ",_[_.FILE_FLAGS_WRITE=2]="FILE_FLAGS_WRITE",_[_.FILE_FLAGS_DIRECT_IO=4]="FILE_FLAGS_DIRECT_IO",_[_.FILE_FLAGS_FILE_CREATE=8]="FILE_FLAGS_FILE_CREATE",_[_.FILE_FLAGS_FILE_CREATE_NEW=16]="FILE_FLAGS_FILE_CREATE_NEW",_[_.FILE_FLAGS_APPEND=32]="FILE_FLAGS_APPEND",_))(Ne||{});function W(e,r,t,n){let a=e.stackSave(),o=e.stackAlloc(3*8);t.unshift("number"),n.unshift(o),e.ccall(r,null,t,n);let _=e.HEAPF64[(o>>3)+0],l=e.HEAPF64[(o>>3)+1],c=e.HEAPF64[(o>>3)+2];return e.stackRestore(a),[_,l,c]}function V(e){e.ccall("duckdb_web_clear_response",null,[],[])}var We={_udfFunctions:new Map,testPlatformFeature:(e,r)=>!1,getDefaultDataProtocol:e=>0,openFile:(e,r,t)=>{},syncFile:(e,r)=>{},closeFile:(e,r)=>{},getLastFileModificationTime:(e,r)=>0,truncateFile:(e,r,t)=>{},readFile:(e,r,t,n,a)=>0,writeFile:(e,r,t,n,a)=>0,removeDirectory:(e,r,t)=>{},checkDirectory:(e,r,t)=>!1,createDirectory:(e,r,t)=>{},listDirectoryEntries:(e,r,t)=>!1,glob:(e,r,t)=>{},moveFile:(e,r,t,n,a)=>{},checkFile:(e,r,t)=>!1,removeFile:(e,r,t)=>{},callScalarUDF:(e,r,t,n,a,o,_)=>{fe(We,e,r,t,n,a,o,_)}};var ge=class{constructor(r){let t=new Float64Array(r.buffer,r.byteOffset,r.byteLength/8),n=new Uint8Array(new ArrayBuffer(r.byteLength));n.set(r.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=n}getBlockStats(r,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[r*3+0]&15,t.file_reads_cold=this.blockStats[r*3+0]>>4,t.file_reads_ahead=this.blockStats[r*3+1]&15,t.file_reads_cached=this.blockStats[r*3+1]>>4,t.page_accesses=this.blockStats[r*3+1]&15,t.page_loads=this.blockStats[r*3+1]>>4,t}};import*as O from"apache-arrow";function ie(e){switch(e.typeId){case O.Type.Binary:return{sqlType:"binary"};case O.Type.Bool:return{sqlType:"bool"};case O.Type.Date:return{sqlType:"date"};case O.Type.DateDay:return{sqlType:"date32[d]"};case O.Type.DateMillisecond:return{sqlType:"date64[ms]"};case O.Type.Decimal:{let r=e;return{sqlType:"decimal",precision:r.precision,scale:r.scale}}case O.Type.Float:return{sqlType:"float"};case O.Type.Float16:return{sqlType:"float16"};case O.Type.Float32:return{sqlType:"float32"};case O.Type.Float64:return{sqlType:"float64"};case O.Type.Int:return{sqlType:"int32"};case O.Type.Int16:return{sqlType:"int16"};case O.Type.Int32:return{sqlType:"int32"};case O.Type.Int64:return{sqlType:"int64"};case O.Type.Uint16:return{sqlType:"uint16"};case O.Type.Uint32:return{sqlType:"uint32"};case O.Type.Uint64:return{sqlType:"uint64"};case O.Type.Uint8:return{sqlType:"uint8"};case O.Type.IntervalDayTime:return{sqlType:"interval[dt]"};case O.Type.IntervalYearMonth:return{sqlType:"interval[m]"};case O.Type.List:return{sqlType:"list",valueType:ie(e.valueType)};case O.Type.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:e.byteWidth};case O.Type.Null:return{sqlType:"null"};case O.Type.Utf8:return{sqlType:"utf8"};case O.Type.Struct:return{sqlType:"struct",fields:e.children.map(t=>ve(t.name,t.type))};case O.Type.Map:{let r=e;return{sqlType:"map",keyType:ie(r.keyType),valueType:ie(r.valueType)}}case O.Type.Time:return{sqlType:"time[s]"};case O.Type.TimeMicrosecond:return{sqlType:"time[us]"};case O.Type.TimeMillisecond:return{sqlType:"time[ms]"};case O.Type.TimeNanosecond:return{sqlType:"time[ns]"};case O.Type.TimeSecond:return{sqlType:"time[s]"};case O.Type.Timestamp:return{sqlType:"timestamp",timezone:e.timezone||void 0};case O.Type.TimestampSecond:return{sqlType:"timestamp[s]",timezone:e.timezone||void 0};case O.Type.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:e.timezone||void 0};case O.Type.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:e.timezone||void 0};case O.Type.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(e.toString()))}function ve(e,r){let t=ie(r);return t.name=e,t}var Er=new TextEncoder,br=(o=>(o[o.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",o[o.WASM_THREADS=2]="WASM_THREADS",o[o.WASM_SIMD=4]="WASM_SIMD",o[o.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",o[o.EMIT_BIGINT=16]="EMIT_BIGINT",o))(br||{}),he=class{constructor(r,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=r,this._runtime=t,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(r=t=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(r),await this._initPromise),this._initPromise=new Promise(t=>{this._initPromiseResolver=t}),this.onInstantiationProgress=[r],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(t=>t!=r),globalThis.DUCKDB_BINDINGS=this,this)}open(r){let[t,n,a]=W(this.mod,"duckdb_web_open",["string"],[JSON.stringify(r)]);if(t!==0)throw new Error(B(this.mod,n,a));V(this.mod)}reset(){let[r,t,n]=W(this.mod,"duckdb_web_reset",[],[]);if(r!==0)throw new Error(B(this.mod,t,n));V(this.mod)}getVersion(){let[r,t,n]=W(this.mod,"duckdb_web_get_version",[],[]);if(r!==0)throw new Error(B(this.mod,t,n));let a=B(this.mod,t,n);return V(this.mod),a}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(r){let[t,n,a]=W(this.mod,"duckdb_web_tokenize",["string"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));let o=B(this.mod,n,a);return V(this.mod),JSON.parse(o)}connect(){let r=this.mod.ccall("duckdb_web_connect","number",[],[]);return new ue(this,r)}disconnect(r){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[r]),this.pthread)for(let t of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])t.postMessage({cmd:"dropUDFFunctions",connectionId:r})}runQuery(r,t){let[n,a,o]=W(this.mod,"duckdb_web_query_run",["number","string"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o));let _=te(this.mod,a,o);return V(this.mod),_}startPendingQuery(r,t){let[n,a,o]=W(this.mod,"duckdb_web_pending_query_start",["number","string"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o));if(a==0)return null;let _=te(this.mod,a,o);return V(this.mod),_}pollPendingQuery(r){let[t,n,a]=W(this.mod,"duckdb_web_pending_query_poll",["number"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));if(n==0)return null;let o=te(this.mod,n,a);return V(this.mod),o}cancelPendingQuery(r){return this.mod.ccall("duckdb_web_pending_query_cancel","boolean",["number"],[r])}fetchQueryResults(r){let[t,n,a]=W(this.mod,"duckdb_web_query_fetch_results",["number"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));let o=te(this.mod,n,a);return V(this.mod),o}getTableNames(r,t){let[n,a,o]=W(this.mod,"duckdb_web_get_tablenames",["number","string"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o));let _=B(this.mod,a,o);return V(this.mod),JSON.parse(_)}createScalarFunction(r,t,n,a){let o={functionId:this._nextUDFId,name:t,returnType:ie(n)},_={functionId:o.functionId,connectionId:r,name:t,returnType:n,func:a};this._nextUDFId+=1;let[l,c,u]=W(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[r,JSON.stringify(o)]);if(l!==0)throw new Error(B(this.mod,c,u));if(V(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(_.functionId,_),this.pthread)for(let d of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])d.postMessage({cmd:"registerUDFFunction",udf:_})}createPrepared(r,t){let[n,a,o]=W(this.mod,"duckdb_web_prepared_create",["number","string"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o));return V(this.mod),a}closePrepared(r,t){let[n,a,o]=W(this.mod,"duckdb_web_prepared_close",["number","number"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o));V(this.mod)}runPrepared(r,t,n){let[a,o,_]=W(this.mod,"duckdb_web_prepared_run",["number","number","string"],[r,t,JSON.stringify(n)]);if(a!==0)throw new Error(B(this.mod,o,_));let l=te(this.mod,o,_);return V(this.mod),l}sendPrepared(r,t,n){let[a,o,_]=W(this.mod,"duckdb_web_prepared_send",["number","number","string"],[r,t,JSON.stringify(n)]);if(a!==0)throw new Error(B(this.mod,o,_));let l=te(this.mod,o,_);return V(this.mod),l}insertArrowFromIPCStream(r,t,n){if(t.length==0)return;let a=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(a,a+t.length).set(t);let _=n?JSON.stringify(n):"",[l,c,u]=W(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[r,a,t.length,_]);if(l!==0)throw new Error(B(this.mod,c,u))}insertCSVFromPath(r,t,n){if(n.columns!==void 0){n.columnsFlat=[];for(let u in n.columns)n.columnsFlat.push(ve(u,n.columns[u]))}let a={...n};a.columns=a.columnsFlat,delete a.columnsFlat;let o=JSON.stringify(a),[_,l,c]=W(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[r,t,o]);if(_!==0)throw new Error(B(this.mod,l,c))}insertJSONFromPath(r,t,n){if(n.columns!==void 0){n.columnsFlat=[];for(let u in n.columns)n.columnsFlat.push(ve(u,n.columns[u]))}let a={...n};a.columns=a.columnsFlat,delete a.columnsFlat;let o=JSON.stringify(a),[_,l,c]=W(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[r,t,o]);if(_!==0)throw new Error(B(this.mod,l,c))}globFiles(r){let[t,n,a]=W(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));let o=B(this.mod,n,a);V(this.mod);let _=JSON.parse(o);return _==null?[]:_}registerFileURL(r,t,n,a=!1){t===void 0&&(t=r);let[o,_,l]=W(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[r,t,n,a]);if(o!==0)throw new Error(B(this.mod,_,l));V(this.mod)}registerFileText(r,t){let n=Er.encode(t);this.registerFileBuffer(r,n)}registerFileBuffer(r,t){let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let[o,_,l]=W(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[r,n,t.length]);if(o!==0)throw new Error(B(this.mod,_,l));V(this.mod)}registerFileHandle(r,t,n,a){let[o,_,l]=W(this.mod,"duckdb_web_fs_register_file_url",["string","string","number","boolean"],[r,r,n,a]);if(o!==0)throw new Error(B(this.mod,_,l));if(V(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(r,t),this.pthread){for(let c of this.pthread.runningWorkers)c.postMessage({cmd:"registerFileHandle",fileName:r,fileHandle:t});for(let c of this.pthread.unusedWorkers)c.postMessage({cmd:"dropFileHandle",fileName:r})}}dropFile(r){let[t,n,a]=W(this.mod,"duckdb_web_fs_drop_file",["string"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));V(this.mod)}dropFiles(){let[r,t,n]=W(this.mod,"duckdb_web_fs_drop_files",[],[]);if(r!==0)throw new Error(B(this.mod,t,n));V(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(r,t){let[n,a,o]=W(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o));V(this.mod)}copyFileToBuffer(r){let[t,n,a]=W(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));let o=this.mod.HEAPU8.subarray(n,n+a),_=new Uint8Array(o.length);return _.set(o),V(this.mod),_}collectFileStatistics(r,t){let[n,a,o]=W(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[r,t]);if(n!==0)throw new Error(B(this.mod,a,o))}exportFileStatistics(r){let[t,n,a]=W(this.mod,"duckdb_web_export_file_stats",["string"],[r]);if(t!==0)throw new Error(B(this.mod,n,a));return new ge(this.mod.HEAPU8.subarray(n,n+a))}};var yr=(a=>(a[a.UNDEFINED=0]="UNDEFINED",a[a.AUTOMATIC=1]="AUTOMATIC",a[a.READ_ONLY=2]="READ_ONLY",a[a.READ_WRITE=3]="READ_WRITE",a))(yr||{});var wr=(t=>(t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object",t))(wr||{});var Lr=(_=>(_[_.IDENTIFIER=0]="IDENTIFIER",_[_.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",_[_.STRING_CONSTANT=2]="STRING_CONSTANT",_[_.OPERATOR=3]="OPERATOR",_[_.KEYWORD=4]="KEYWORD",_[_.COMMENT=5]="COMMENT",_))(Lr||{});var Ar=(o=>(o[o.NONE=0]="NONE",o[o.DEBUG=1]="DEBUG",o[o.INFO=2]="INFO",o[o.WARNING=3]="WARNING",o[o.ERROR=4]="ERROR",o))(Ar||{}),kr=(_=>(_[_.NONE=0]="NONE",_[_.CONNECT=1]="CONNECT",_[_.DISCONNECT=2]="DISCONNECT",_[_.OPEN=3]="OPEN",_[_.QUERY=4]="QUERY",_[_.INSTANTIATE=5]="INSTANTIATE",_))(kr||{}),Dr=(_=>(_[_.NONE=0]="NONE",_[_.OK=1]="OK",_[_.ERROR=2]="ERROR",_[_.START=3]="START",_[_.RUN=4]="RUN",_[_.CAPTURE=5]="CAPTURE",_))(Dr||{}),xr=(o=>(o[o.NONE=0]="NONE",o[o.WEB_WORKER=1]="WEB_WORKER",o[o.NODE_WORKER=2]="NODE_WORKER",o[o.BINDINGS=3]="BINDINGS",o[o.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",o))(xr||{}),Ve=class{log(r){}},qe=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}};function Jr(e){switch(e){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function Kr(e){switch(e){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function Zr(e){switch(e){case 1:return"CONNECT";case 2:return"DISCONNECT";case 5:return"INSTANTIATE";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function et(e){switch(e){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var ze=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),$e=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11]));var Xe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]));var Qe=()=>(async e=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(e)}catch(r){return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var Se={name:"@duckdb/duckdb-wasm",version:"1.28.1-dev149.0",description:"DuckDB powered by WebAssembly",license:"MIT",repository:{type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},keywords:["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],dependencies:{"apache-arrow":"^15.0.0"},devDependencies:{"@types/emscripten":"^1.39.10","@types/jasmine":"^5.1.4","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0",esbuild:"^0.20.0",eslint:"^8.56.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.33.2","fast-glob":"^3.3.2",jasmine:"^5.1.0","jasmine-core":"^5.1.1","jasmine-spec-reporter":"^7.0.0","js-sha256":"^0.11.0",karma:"^6.4.2","karma-chrome-launcher":"^3.2.0","karma-coverage":"^2.2.1","karma-firefox-launcher":"^2.1.2","karma-jasmine":"^5.1.0","karma-jasmine-html-reporter":"^2.1.0","karma-sourcemap-loader":"^0.4.0","karma-spec-reporter":"^0.0.36","make-dir":"^4.0.0",nyc:"^15.1.0",prettier:"^3.2.4",puppeteer:"^21.7.0",rimraf:"^5.0.5",s3rver:"^3.7.1",typedoc:"^0.25.7",typescript:"^5.3.3","wasm-feature-detect":"^1.6.1","web-worker":"^1.2.0"},scripts:{"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},files:["dist","!dist/tests-*","!dist/duckdb-browser-mvp.worker.js.map","!dist/types/test"],main:"dist/duckdb-browser.cjs",module:"dist/duckdb-browser.mjs",types:"dist/duckdb-browser.d.ts",jsdelivr:"dist/duckdb-browser.cjs",unpkg:"dist/duckdb-browser.mjs",sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":"./dist/duckdb-mvp.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-blocking":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.mjs":"./dist/duckdb-browser-blocking.mjs","./dist/duckdb-browser-blocking.cjs":"./dist/duckdb-browser-blocking.cjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser-mvp.worker.js":"./dist/duckdb-browser-mvp.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node-mvp.worker.cjs":"./dist/duckdb-node-mvp.worker.cjs","./blocking":{browser:{types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-browser-blocking.d.ts",import:"./dist/duckdb-browser-blocking.mjs",require:"./dist/duckdb-browser-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}}};var Ye=Se.name,Je=Se.version,Te=Se.version.split("."),nt=Te[0],at=Te[1],st=Te[2];var Ke=()=>typeof navigator>"u",Ze=()=>Ke()?"node":navigator.userAgent,lt=()=>Ze().includes("Firefox"),ct=()=>/^((?!chrome|android).)*safari/i.test(Ze());function ut(){let e="https://cdn.jsdelivr.net/npm/".concat(Ye,"@").concat(Je,"/dist/");return{mvp:{mainModule:"".concat(e,"duckdb-mvp.wasm"),mainWorker:"".concat(e,"duckdb-browser-mvp.worker.js")},eh:{mainModule:"".concat(e,"duckdb-eh.wasm"),mainWorker:"".concat(e,"duckdb-browser-eh.worker.js")}}}var Fe=null,Pe=null,Ce=null,Me=null,Ge=null;async function Ie(){return Fe==null&&(Fe=typeof BigInt64Array<"u"),Pe==null&&(Pe=await $e()),Ce==null&&(Ce=await Qe()),Me==null&&(Me=await Xe()),Ge==null&&(Ge=await ze()),{bigInt64Array:Fe,crossOriginIsolated:Ke()||globalThis.crossOriginIsolated||!1,wasmExceptions:Pe,wasmSIMD:Me,wasmThreads:Ce,wasmBulkMemory:Ge}}async function dt(e){let r=await Ie();if(r.wasmExceptions){if(r.wasmSIMD&&r.wasmThreads&&r.crossOriginIsolated&&e.coi)return{mainModule:e.coi.mainModule,mainWorker:e.coi.mainWorker,pthreadWorker:e.coi.pthreadWorker};if(e.eh)return{mainModule:e.eh.mainModule,mainWorker:e.eh.mainWorker,pthreadWorker:null}}return{mainModule:e.mvp.mainModule,mainWorker:e.mvp.mainWorker,pthreadWorker:null}}var re=we(tr()),ir=function(e,r,t){var n;if((n=e==null?void 0:e.endpoint)!=null&&n.startsWith("http")){let a="".concat(e==null?void 0:e.endpoint),o=a.indexOf("://")+3;return a.substring(o)}else return e!=null&&e.endpoint?"".concat(t,".").concat(e==null?void 0:e.endpoint):"".concat(t,".s3.amazonaws.com")};function Pr(e,r,t){var o,_,l,c;let n=nr(r),a=n.path;return ar(e)&&(a="/".concat(n.bucket).concat(a)),{url:a,query:"",host:ir(e,r,n.bucket),region:(o=e==null?void 0:e.region)!=null?o:"",service:"s3",method:t,accessKeyId:(_=e==null?void 0:e.accessKeyId)!=null?_:"",secretAccessKey:(l=e==null?void 0:e.secretAccessKey)!=null?l:"",sessionToken:(c=e==null?void 0:e.sessionToken)!=null?c:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function Cr(e,r=!1){let t="0123456789ABCDEF",n="";for(let a=0;a="A"&&o<="Z"||o>="a"&&o<="z"||o>="0"&&o<="9"||o=="_"||o=="-"||o=="~"||o=="."?n+=o:o=="/"?r?n+="%2F":n+=o:(n+="%",n+=t[o.charCodeAt(0)>>4],n+=t[o.charCodeAt(0)&15])}return n}function Mr(e,r=null){var g;let t=(g=r==null?void 0:r.contentHash)!=null?g:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",n=new Map;n.set("x-amz-date",e.datetimeNow),n.set("x-amz-content-sha256",t),e.sessionToken&&n.set("x-amz-security-token",e.sessionToken);let a="";r!=null&&r.contentType&&(a+="content-type;"),a+="host;x-amz-content-sha256;x-amz-date",e.sessionToken&&(a+=";x-amz-security-token");let o=e.method+"\n"+Cr(e.url)+"\n"+e.query;r!=null&&r.contentType&&(o+="\ncontent-type:"+(r==null?void 0:r.contentType)),o+="\nhost:"+e.host+"\nx-amz-content-sha256:"+t+"\nx-amz-date:"+e.datetimeNow,e.sessionToken&&e.sessionToken.length>0&&(o+="\nx-amz-security-token:"+e.sessionToken),o+="\n\n"+a+"\n"+t;let _=(0,re.sha256)(o),l="AWS4-HMAC-SHA256\n"+e.datetimeNow+"\n"+e.dateNow+"/"+e.region+"/"+e.service+"/aws4_request\n"+_,c="AWS4"+e.secretAccessKey,u=re.sha256.hmac.arrayBuffer(c,e.dateNow),d=re.sha256.hmac.arrayBuffer(u,e.region),p=re.sha256.hmac.arrayBuffer(d,e.service),f=re.sha256.hmac.arrayBuffer(p,"aws4_request"),m=re.sha256.hmac(f,l);return n.set("Authorization","AWS4-HMAC-SHA256 Credential="+e.accessKeyId+"/"+e.dateNow+"/"+e.region+"/"+e.service+"/aws4_request, SignedHeaders="+a+", Signature="+m),n}var Gr=function(e,r,t,n=null,a=null){let o=Pr(e,r,t),_={contentType:n,contentHash:a?re.sha256.hex(a):null};return Mr(o,_)};function K(e,r,t,n,a=null,o=null){(r!=null&&r.accessKeyId||r!=null&&r.sessionToken)&&(Gr(r,t,n,a,o).forEach((l,c)=>{e.setRequestHeader(c,l)}),a&&e.setRequestHeader("content-type",a))}function nr(e){if(e.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let r=e.indexOf("/",5);if(r==-1)throw new Error("URL needs to contain a '/' after the host");let t=e.substring(5,r);if(!t)throw new Error("URL needs to contain a bucket name");let n=e.substring(r);if(!n)throw new Error("URL needs to contain key");return{bucket:t,path:n}}function ar(e){var r;return!!((r=e==null?void 0:e.endpoint)!=null&&r.startsWith("http"))}function Z(e,r){let t=nr(r);return ar(e)?"".concat(e==null?void 0:e.endpoint,"/").concat(t.bucket)+t.path:"https://"+ir(e,r,t.bucket)+t.path}var N={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,getFileInfo(e,r){try{let t=N._fileInfoCache.get(r),[n,a,o]=W(e,"duckdb_web_fs_get_file_info_by_id",["number","number"],[r,(t==null?void 0:t.cacheEpoch)||0]);if(n!==0)return null;if(o===0)return t;let _=B(e,a,o);V(e);try{let l=JSON.parse(_);if(l==null)return null;let c={...l,blob:null};return N._fileInfoCache.set(r,c),c}catch(l){return console.warn(l),null}}catch(t){return console.log(t),null}},getGlobalFileInfo(e){var r;try{let[t,n,a]=W(e,"duckdb_web_get_global_file_info",["number"],[((r=N._globalFileInfo)==null?void 0:r.cacheEpoch)||0]);if(t!==0)return null;if(a===0)return N._globalFileInfo;let o=B(e,n,a);V(e);let _=JSON.parse(o);return _==null?null:(N._globalFileInfo={..._,blob:null},N._globalFileInfo)}catch(t){return console.log(t),null}},testPlatformFeature:(e,r)=>{switch(r){case 1:return typeof BigInt64Array<"u";default:return console.warn("test for unknown feature: ".concat(r)),!1}},getDefaultDataProtocol(e){return 2},openFile:(e,r,t)=>{var n;try{N._fileInfoCache.delete(r);let a=N.getFileInfo(e,r);switch(a==null?void 0:a.dataProtocol){case 4:case 5:{if(t&1&&t&2)throw new Error("Opening file ".concat(a.fileName," failed: cannot open file with both read and write flags set"));if(t&32)throw new Error("Opening file ".concat(a.fileName," failed: appending to HTTP/S3 files is not supported"));if(t&2){let l=new XMLHttpRequest;if(a.dataProtocol==5?(l.open("HEAD",Z(a.s3Config,a.dataUrl),!1),K(l,a.s3Config,a.dataUrl,"HEAD")):l.open("HEAD",a.dataUrl,!1),l.send(null),l.status!=200&&l.status!=404)throw new Error("Opening file ".concat(a.fileName," failed: Unexpected return status from server (").concat(l.status,")"));if(l.status==404&&!(t&8||t&16))throw new Error("Opening file ".concat(a.fileName," failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag."));let c=e._malloc(1),u=new Uint8Array;e.HEAPU8.set(u,c);let d=e._malloc(2*8);return e.HEAPF64[(d>>3)+0]=1,e.HEAPF64[(d>>3)+1]=c,d}else if(t!=1)throw new Error("Opening file ".concat(a.fileName," failed: unsupported file flags: ").concat(t));let o=null,_=null;try{let l=new XMLHttpRequest;if(a.dataProtocol==5?(l.open("HEAD",Z(a.s3Config,a.dataUrl),!1),K(l,a.s3Config,a.dataUrl,"HEAD")):l.open("HEAD",a.dataUrl,!1),l.setRequestHeader("Range","bytes=0-"),l.send(null),o=l.getResponseHeader("Content-Length"),o!==null&&l.status==206){let c=e._malloc(16);return e.HEAPF64[(c>>3)+0]=+o,e.HEAPF64[(c>>3)+1]=0,c}}catch(l){_=l,console.warn("HEAD request with range header failed: ".concat(l))}if(a.allowFullHttpReads){if(o!==null&&+o>1){let c=new XMLHttpRequest;a.dataProtocol==5?(c.open("GET",Z(a.s3Config,a.dataUrl),!1),K(c,a.s3Config,a.dataUrl,"GET")):c.open("GET",a.dataUrl,!1),c.responseType="arraybuffer",c.setRequestHeader("Range","bytes=0-0"),c.send(null);let u=c.getResponseHeader("Content-Length");if(c.status==206&&u!==null&&+u==1){let d=e._malloc(16);return e.HEAPF64[(d>>3)+0]=+o,e.HEAPF64[(d>>3)+1]=0,d}if(c.status==200&&u!==null&&+u==+o){console.warn("fall back to full HTTP read for: ".concat(a.dataUrl));let d=e._malloc(c.response.byteLength),p=new Uint8Array(c.response,0,c.response.byteLength);e.HEAPU8.set(p,d);let f=e._malloc(2*8);return e.HEAPF64[(f>>3)+0]=c.response.byteLength,e.HEAPF64[(f>>3)+1]=d,f}}console.warn("falling back to full HTTP read for: ".concat(a.dataUrl));let l=new XMLHttpRequest;if(a.dataProtocol==5?(l.open("GET",Z(a.s3Config,a.dataUrl),!1),K(l,a.s3Config,a.dataUrl,"GET")):l.open("GET",a.dataUrl,!1),l.responseType="arraybuffer",l.send(null),l.status==200){let c=e._malloc(l.response.byteLength),u=new Uint8Array(l.response,0,l.response.byteLength);e.HEAPU8.set(u,c);let d=e._malloc(2*8);return e.HEAPF64[(d>>3)+0]=l.response.byteLength,e.HEAPF64[(d>>3)+1]=c,d}}if(_!=null)throw new Error("Reading file ".concat(a.fileName," failed with error: ").concat(_));return 0}case 2:{let o=(n=N._files)==null?void 0:n.get(a.fileName);if(o){let c=e._malloc(16);return e.HEAPF64[(c>>3)+0]=o.size,e.HEAPF64[(c>>3)+1]=0,c}console.warn("Buffering missing file: ".concat(a.fileName));let _=e._malloc(2*8),l=e._malloc(1);return e.HEAPF64[(_>>3)+0]=1,e.HEAPF64[(_>>3)+1]=l,_}}}catch(a){console.error(a.toString()),q(e,a.toString())}return 0},glob:(e,r,t)=>{var n;try{let a=B(e,r,t);if(a.startsWith("http")||a.startsWith("s3://")){let o=new XMLHttpRequest;if(a.startsWith("s3://")){let _=N.getGlobalFileInfo(e);o.open("HEAD",Z(_==null?void 0:_.s3Config,a),!1),K(o,_==null?void 0:_.s3Config,a,"HEAD")}else o.open("HEAD",a,!1);if(o.send(null),o.status!=200&&o.status!==206){if(!((n=N.getGlobalFileInfo(e))!=null&&n.allowFullHttpReads)){q(e,"HEAD request failed: ".concat(a,", with full http reads are disabled"));return}let _=new XMLHttpRequest;if(a.startsWith("s3://")){let c=N.getGlobalFileInfo(e);_.open("GET",Z(c==null?void 0:c.s3Config,a),!1),K(_,c==null?void 0:c.s3Config,a,"HEAD")}else _.open("GET",a,!1);if(_.setRequestHeader("Range","bytes=0-0"),_.send(null),_.status!=200&&_.status!==206){q(e,"HEAD and GET requests failed: ".concat(a));return}let l=_.getResponseHeader("Content-Length");l&&+l>1&&console.warn("Range request for ".concat(a," did not return a partial response: ").concat(_.status,' "').concat(_.statusText,'"'))}e.ccall("duckdb_web_fs_glob_add_path",null,["string"],[a])}}catch(a){return console.log(a),q(e,a.toString()),0}},checkFile:(e,r,t)=>{try{let n=B(e,r,t);if(n.startsWith("http")||n.startsWith("s3://")){let a=new XMLHttpRequest;if(n.startsWith("s3://")){let o=N.getGlobalFileInfo(e);a.open("HEAD",Z(o==null?void 0:o.s3Config,n),!1),K(a,o==null?void 0:o.s3Config,n,"HEAD")}else a.open("HEAD",n,!1);return a.send(null),a.status==206||a.status==200}}catch(n){return console.log(n),!1}return!1},syncFile:(e,r)=>{},closeFile:(e,r)=>{var n;let t=N.getFileInfo(e,r);switch(N._fileInfoCache.delete(r),t==null?void 0:t.dataProtocol){case 0:case 4:case 5:break;case 1:case 2:return;case 3:{let a=(n=N._files)==null?void 0:n.get(t.fileName);if(!a)throw new Error("No OPFS access handle registered with name: ".concat(t.fileName));return a.flush()}}},truncateFile:(e,r,t)=>{var a;let n=N.getFileInfo(e,r);switch(n==null?void 0:n.dataProtocol){case 4:q(e,"Cannot truncate a http file");return;case 5:q(e,"Cannot truncate an s3 file");return;case 0:case 1:case 2:q(e,"truncateFile not implemented");return;case 3:{let o=(a=N._files)==null?void 0:a.get(n.fileName);if(!o)throw new Error("No OPFS access handle registered with name: ".concat(n.fileName));return o.truncate(t)}}return 0},readFile(e,r,t,n,a){var o,_;if(n==0)return 0;try{let l=N.getFileInfo(e,r);switch(l==null?void 0:l.dataProtocol){case 4:case 5:{if(!l.dataUrl)throw new Error("Missing data URL for file ".concat(r));try{let c=new XMLHttpRequest;if(l.dataProtocol==5?(c.open("GET",Z(l==null?void 0:l.s3Config,l.dataUrl),!1),K(c,l==null?void 0:l.s3Config,l.dataUrl,"GET")):c.open("GET",l.dataUrl,!1),c.responseType="arraybuffer",c.setRequestHeader("Range","bytes=".concat(a,"-").concat(a+n-1)),c.send(null),c.status==206||c.status==200&&n==c.response.byteLength&&a==0){let u=new Uint8Array(c.response,0,Math.min(c.response.byteLength,n));return e.HEAPU8.set(u,t),u.byteLength}else if(c.status==200){console.warn("Range request for ".concat(l.dataUrl," did not return a partial response: ").concat(c.status,' "').concat(c.statusText,'"'));let u=new Uint8Array(c.response,a,Math.min(c.response.byteLength-a,n));return e.HEAPU8.set(u,t),u.byteLength}else throw new Error("Range request for ".concat(l.dataUrl," did returned non-success status: ").concat(c.status,' "').concat(c.statusText,'"'))}catch(c){throw console.log(c),new Error("Range request for ".concat(l.dataUrl," failed with error: ").concat(c,'"'))}}case 2:{let c=(o=N._files)==null?void 0:o.get(l.fileName);if(!c)throw new Error("No HTML5 file registered with name: ".concat(l.fileName));let u=c.slice(a,a+n),d=new Uint8Array(new FileReaderSync().readAsArrayBuffer(u));return e.HEAPU8.set(d,t),d.byteLength}case 3:{let c=(_=N._files)==null?void 0:_.get(l.fileName);if(!c)throw new Error("No OPFS access handle registered with name: ".concat(l.fileName));let u=e.HEAPU8.subarray(t,t+n);return c.read(u,{at:a})}}return 0}catch(l){return console.log(l),q(e,l.toString()),0}},writeFile:(e,r,t,n,a)=>{var _;let o=N.getFileInfo(e,r);switch(o==null?void 0:o.dataProtocol){case 4:return q(e,"Cannot write to HTTP file"),0;case 5:{let l=e.HEAPU8.subarray(t,t+n),c=new XMLHttpRequest;return c.open("PUT",Z(o==null?void 0:o.s3Config,o.dataUrl),!1),K(c,o==null?void 0:o.s3Config,o.dataUrl,"PUT","",l),c.send(l),c.status!==200?(q(e,"Failed writing file: HTTP "+c.status),0):n}case 2:return q(e,"cannot write using the html5 file reader api"),0;case 3:{let l=(_=N._files)==null?void 0:_.get(o.fileName);if(!l)throw new Error("No OPFS access handle registered with name: ".concat(o.fileName));let c=e.HEAPU8.subarray(t,t+n);return l.write(c,{at:a})}}return 0},getLastFileModificationTime:(e,r)=>{var n;let t=N.getFileInfo(e,r);switch(t==null?void 0:t.dataProtocol){case 2:{if(!((n=N._files)==null?void 0:n.get(t.fileName)))throw Error("No handle available for file: ".concat(t.fileName));return 0}case 4:case 5:return new Date().getTime()}return 0},checkDirectory:(e,r,t)=>{let n=B(e,r,t);return console.log("checkDirectory: ".concat(n)),!1},createDirectory:(e,r,t)=>{let n=B(e,r,t);console.log("createDirectory: ".concat(n))},removeDirectory:(e,r,t)=>{let n=B(e,r,t);console.log("removeDirectory: ".concat(n))},listDirectoryEntries:(e,r,t)=>{let n=B(e,r,t);return console.log("listDirectoryEntries: ".concat(n)),!1},moveFile:(e,r,t,n,a)=>{var c,u;let o=B(e,r,t),_=B(e,n,a),l=(c=N._files)==null?void 0:c.get(o);l!==void 0&&(N._files.delete(l),N._files.set(_,l));for(let[d,p]of((u=N._fileInfoCache)==null?void 0:u.entries())||[])if(p.dataUrl==o){N._fileInfoCache.delete(d);break}return!0},removeFile:(e,r,t)=>{},callScalarUDF:(e,r,t,n,a,o,_)=>{fe(N,e,r,t,n,a,o,_)}};var _r=we(or());var ne=class extends he{constructor(r,t,n,a){super(r,t),this.mainModuleURL=n,this.pthreadWorkerURL=a}locateFile(r,t){if(r.endsWith(".wasm"))return this.mainModuleURL;if(r.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error("WASM instantiation requested unexpected file: prefix=".concat(t," path=").concat(r))}instantiateWasm(r,t){globalThis.DUCKDB_RUNTIME=this._runtime;let n=this.onInstantiationProgress;if(WebAssembly.instantiateStreaming)if(typeof TransformStream=="function"){let o=(async()=>{var g;let _=new Request(this.mainModuleURL),l=await fetch(_),c=l.headers.get("content-length"),u=c&&parseInt(c,10)||0,d=new Date,p={startedAt:d,updatedAt:d,bytesTotal:u||0,bytesLoaded:0},f={transform(v,S){p.bytesLoaded+=v.byteLength;let y=new Date;if(y.getTime()-p.updatedAt.getTime()<20){p.updatedAt=y,S.enqueue(v);return}for(let h of n)h(p);S.enqueue(v)}},m=new TransformStream(f);return new Response((g=l.body)==null?void 0:g.pipeThrough(m),l)})();WebAssembly.instantiateStreaming(o,r).then(_=>{t(_.instance,_.module)})}else{console.warn("instantiating without progress handler since transform streams are unavailable");let a=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(a),r).then(o=>{t(o.instance,o.module)})}else if(typeof XMLHttpRequest=="function"){let a=new XMLHttpRequest,o=this.mainModuleURL,_=new Date,l={startedAt:_,updatedAt:_,bytesTotal:0,bytesLoaded:0};a.open("GET",o),a.responseType="arraybuffer",a.onerror=c=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+c}),new Error(c.toString())},a.onprogress=c=>{l.bytesTotal=c.total,l.bytesLoaded=c.loaded;let u=new Date;if(u.getTime()-l.updatedAt.getTime()<20){l.updatedAt=u;return}for(let d of n)d(l)},a.onload=()=>{WebAssembly.instantiate(a.response,r).then(c=>{t(c.instance,c.module)}).catch(c=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+c}),new Error(c)})},a.send()}else console.warn("instantiating with manual fetch since streaming instantiation and xhrs are unavailable"),(async()=>{let o=new Request(this.mainModuleURL),l=await(await fetch(o)).arrayBuffer();WebAssembly.instantiate(l,r).then(c=>{t(c.instance,c.module)})})();return[]}};var be=class extends ne{constructor(r,t,n,a=null){super(r,t,n,a)}instantiateImpl(r){return(0,_r.default)({...r,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var cr=we(lr());var ye=class extends ne{constructor(r,t,n,a=null){super(r,t,n,a)}instantiateImpl(r){return(0,cr.default)({...r,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};async function Jt(e,r,t){return(await Ie()).wasmExceptions&&e.eh?new ye(r,t,e.eh.mainModule):new be(r,t,e.mvp.mainModule)}export{N as BROWSER_RUNTIME,qe as ConsoleLogger,We as DEFAULT_RUNTIME,yr as DuckDBAccessMode,he as DuckDBBindingsBase,ue as DuckDBConnection,xe as DuckDBDataProtocol,br as DuckDBFeature,Ne as FileFlags,ge as FileStatistics,wr as JSONTableShape,Dr as LogEvent,Ar as LogLevel,xr as LogOrigin,kr as LogTopic,Ye as PACKAGE_NAME,Je as PACKAGE_VERSION,nt as PACKAGE_VERSION_MAJOR,at as PACKAGE_VERSION_MINOR,st as PACKAGE_VERSION_PATCH,Le as PreparedStatement,de as ResultStreamIterator,vr as StatusCode,Lr as TokenType,Ve as VoidLogger,W as callSRet,te as copyBuffer,Jt as createDuckDB,Sr as decodeText,V as dropResponseBuffers,q as failWith,ut as getJsDelivrBundles,Kr as getLogEventLabel,Jr as getLogLevelLabel,et as getLogOriginLabel,Zr as getLogTopicLabel,Ie as getPlatformFeatures,lt as isFirefox,Ke as isNode,ct as isSafari,B as readString,dt as selectBundle}; /*! Bundled license information: js-sha256/src/sha256.js: (** * [js-sha256]{@link https://github.com/emn178/js-sha256} * * @version 0.11.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2014-2024 * @license MIT *) */ //# sourceMappingURL=duckdb-browser-blocking.mjs.map