Page MenuHomePhabricator

D10450.diff
No OneTemporary

D10450.diff

diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -640,8 +640,13 @@
}
}
+// We don't want to run `PRAGMA key = ...;`
+// on main web database. The context is here:
+// https://linear.app/comm/issue/ENG-6398/issues-with-sqlcipher-on-web
void on_database_open(sqlite3 *db) {
+#ifndef EMSCRIPTEN
set_encryption_key(db);
+#endif
trace_queries(db);
}
@@ -868,7 +873,12 @@
}
void SQLiteQueryExecutor::migrate() {
+// We don't want to run `PRAGMA key = ...;`
+// on main web database. The context is here:
+// https://linear.app/comm/issue/ENG-6398/issues-with-sqlcipher-on-web
+#ifndef EMSCRIPTEN
validate_encryption();
+#endif
sqlite3 *db;
sqlite3_open(SQLiteQueryExecutor::sqliteFilePath.c_str(), &db);
diff --git a/web/database/_generated/comm-query-executor.js b/web/database/_generated/comm-query-executor.js
--- a/web/database/_generated/comm-query-executor.js
+++ b/web/database/_generated/comm-query-executor.js
@@ -11,141 +11,143 @@
var e;e||(e=typeof Module !== 'undefined' ? Module : {});var aa,ba;e.ready=new Promise(function(a,b){aa=a;ba=b});var ca=Object.assign({},e),da="./this.program",ea="object"==typeof window,fa="function"==typeof importScripts,ha="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,m="",ia,ja,ka,fs,la,ma;
if(ha)m=fa?require("path").dirname(m)+"/":__dirname+"/",ma=()=>{la||(fs=require("fs"),la=require("path"))},ia=function(a,b){ma();a=la.normalize(a);return fs.readFileSync(a,b?void 0:"utf8")},ka=a=>{a=ia(a,!0);a.buffer||(a=new Uint8Array(a));return a},ja=(a,b,c)=>{ma();a=la.normalize(a);fs.readFile(a,function(d,f){d?c(d):b(f.buffer)})},1<process.argv.length&&(da=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),e.inspect=function(){return"[Emscripten Module object]"};else if(ea||fa)fa?m=self.location.href:
"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),_scriptDir&&(m=_scriptDir),0!==m.indexOf("blob:")?m=m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):m="",ia=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},fa&&(ka=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ja=(a,b,c)=>{var d=new XMLHttpRequest;d.open("GET",a,!0);d.responseType="arraybuffer";
-d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var na=e.print||console.log.bind(console),u=e.printErr||console.warn.bind(console);Object.assign(e,ca);ca=null;e.thisProgram&&(da=e.thisProgram);var oa;e.wasmBinary&&(oa=e.wasmBinary);var noExitRuntime=e.noExitRuntime||!0;"object"!=typeof WebAssembly&&x("no native wasm support detected");var pa,qa=!1,ra="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
+d.onload=()=>{200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};var na=e.print||console.log.bind(console),r=e.printErr||console.warn.bind(console);Object.assign(e,ca);ca=null;e.thisProgram&&(da=e.thisProgram);var oa;e.wasmBinary&&(oa=e.wasmBinary);var noExitRuntime=e.noExitRuntime||!0;"object"!=typeof WebAssembly&&v("no native wasm support detected");var pa,qa=!1,ra="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;
function sa(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.buffer&&ra)return ra.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function y(a,b){return a?sa(z,a,b):""}
-function ta(a,b,c,d){if(!(0<d))return 0;var f=c;d=c+d-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var h=a.charCodeAt(++g);k=65536+((k&1023)<<10)|h&1023}if(127>=k){if(c>=d)break;b[c++]=k}else{if(2047>=k){if(c+1>=d)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++]=224|k>>12}else{if(c+3>=d)break;b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f}
-function ua(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b}var va,A,z,C,wa,D,E,xa,ya;function za(){var a=pa.buffer;va=a;e.HEAP8=A=new Int8Array(a);e.HEAP16=C=new Int16Array(a);e.HEAP32=D=new Int32Array(a);e.HEAPU8=z=new Uint8Array(a);e.HEAPU16=wa=new Uint16Array(a);e.HEAPU32=E=new Uint32Array(a);e.HEAPF32=xa=new Float32Array(a);e.HEAPF64=ya=new Float64Array(a)}var Aa,Ba=[],Ca=[],Da=[];
-function Ea(){var a=e.preRun.shift();Ba.unshift(a)}var F=0,Fa=null,Ha=null;function Ia(){F++;e.monitorRunDependencies&&e.monitorRunDependencies(F)}function Ja(){F--;e.monitorRunDependencies&&e.monitorRunDependencies(F);if(0==F&&(null!==Fa&&(clearInterval(Fa),Fa=null),Ha)){var a=Ha;Ha=null;a()}}function x(a){if(e.onAbort)e.onAbort(a);a="Aborted("+a+")";u(a);qa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ka;Ka="comm-query-executor.wasm";
+function A(a,b,c,d){if(!(0<d))return 0;var f=c;d=c+d-1;for(var g=0;g<a.length;++g){var k=a.charCodeAt(g);if(55296<=k&&57343>=k){var h=a.charCodeAt(++g);k=65536+((k&1023)<<10)|h&1023}if(127>=k){if(c>=d)break;b[c++]=k}else{if(2047>=k){if(c+1>=d)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=d)break;b[c++]=224|k>>12}else{if(c+3>=d)break;b[c++]=240|k>>18;b[c++]=128|k>>12&63}b[c++]=128|k>>6&63}b[c++]=128|k&63}}b[c]=0;return c-f}
+function ta(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,++c):b+=3}return b}var ua,B,z,D,va,E,F,wa,xa;function ya(){var a=pa.buffer;ua=a;e.HEAP8=B=new Int8Array(a);e.HEAP16=D=new Int16Array(a);e.HEAP32=E=new Int32Array(a);e.HEAPU8=z=new Uint8Array(a);e.HEAPU16=va=new Uint16Array(a);e.HEAPU32=F=new Uint32Array(a);e.HEAPF32=wa=new Float32Array(a);e.HEAPF64=xa=new Float64Array(a)}var za,Aa=[],Ba=[],Ca=[];
+function Da(){var a=e.preRun.shift();Aa.unshift(a)}var Ea=0,Fa=null,Ha=null;function Ia(){Ea++;e.monitorRunDependencies&&e.monitorRunDependencies(Ea)}function Ja(){Ea--;e.monitorRunDependencies&&e.monitorRunDependencies(Ea);if(0==Ea&&(null!==Fa&&(clearInterval(Fa),Fa=null),Ha)){var a=Ha;Ha=null;a()}}function v(a){if(e.onAbort)e.onAbort(a);a="Aborted("+a+")";r(a);qa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ka;Ka="comm-query-executor.wasm";
if(!Ka.startsWith("data:application/octet-stream;base64,")){var La=Ka;Ka=e.locateFile?e.locateFile(La,m):m+La}
-function Ma(a){var b=Ka;try{a:{try{if(b==Ka&&oa){var c=new Uint8Array(oa);break a}if(ka){c=ka(b);break a}throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)";}catch(g){x(g)}c=void 0}var d=new WebAssembly.Module(c);var f=new WebAssembly.Instance(d,a)}catch(g){throw a=g.toString(),u("failed to compile wasm module: "+a),(a.includes("imported Memory")||a.includes("memory import"))&&u("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),
-g;}return[f,d]}var G,J;function Na(a){for(;0<a.length;)a.shift()(e)}function Oa(a){this.La=a-24;this.Tc=function(b){E[this.La+4>>2]=b};this.Qc=function(b){E[this.La+8>>2]=b};this.Rc=function(){D[this.La>>2]=0};this.Ub=function(){A[this.La+12>>0]=0};this.Sc=function(){A[this.La+13>>0]=0};this.vb=function(b,c){this.Wa();this.Tc(b);this.Qc(c);this.Rc();this.Ub();this.Sc()};this.Wa=function(){E[this.La+16>>2]=0}}
+function Ma(a){var b=Ka;try{a:{try{if(b==Ka&&oa){var c=new Uint8Array(oa);break a}if(ka){c=ka(b);break a}throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)";}catch(g){v(g)}c=void 0}var d=new WebAssembly.Module(c);var f=new WebAssembly.Instance(d,a)}catch(g){throw a=g.toString(),r("failed to compile wasm module: "+a),(a.includes("imported Memory")||a.includes("memory import"))&&r("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),
+g;}return[f,d]}var G,J;function Na(a){for(;0<a.length;)a.shift()(e)}function Oa(a){this.Ra=a-24;this.Zc=function(b){F[this.Ra+4>>2]=b};this.Wc=function(b){F[this.Ra+8>>2]=b};this.Xc=function(){E[this.Ra>>2]=0};this.$b=function(){B[this.Ra+12>>0]=0};this.Yc=function(){B[this.Ra+13>>0]=0};this.Cb=function(b,c){this.bb();this.Zc(b);this.Wc(c);this.Xc();this.$b();this.Yc()};this.bb=function(){F[this.Ra+16>>2]=0}}
var Pa=0,Qa=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var f=a[d];"."===f?a.splice(d,1):".."===f?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},L=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Qa(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Ra=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},M=
-a=>{if("/"===a)return"/";a=L(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Sa=(a,b)=>L(a+"/"+b);function Ta(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return()=>{crypto.getRandomValues(a);return a[0]}}if(ha)try{var b=require("crypto");return()=>b.randomBytes(1)[0]}catch(c){}return()=>x("randomDevice")}
+a=>{if("/"===a)return"/";a=L(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Sa=(a,b)=>L(a+"/"+b);function Ta(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var a=new Uint8Array(1);return()=>{crypto.getRandomValues(a);return a[0]}}if(ha)try{var b=require("crypto");return()=>b.randomBytes(1)[0]}catch(c){}return()=>v("randomDevice")}
function Ua(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:N.cwd();if("string"!=typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Qa(a.split("/").filter(d=>!!d),!b).join("/");return(b?"/":"")+a||"."}
-var Va=(a,b)=>{function c(k){for(var h=0;h<k.length&&""===k[h];h++);for(var n=k.length-1;0<=n&&""===k[n];n--);return h>n?[]:k.slice(h,n-h+1)}a=Ua(a).substr(1);b=Ua(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),f=d,g=0;g<d;g++)if(a[g]!==b[g]){f=g;break}d=[];for(g=f;g<a.length;g++)d.push("..");d=d.concat(b.slice(f));return d.join("/")};function Wa(a,b){var c=Array(ua(a)+1);a=ta(a,c,0,c.length);b&&(c.length=a);return c}var Xa=[];
-function Ya(a,b){Xa[a]={input:[],output:[],zb:b};N.pc(a,Za)}
-var Za={open:function(a){var b=Xa[a.node.rdev];if(!b)throw new N.Ga(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.zb.flush(a.tty)},flush:function(a){a.tty.zb.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.zb.Ic)throw new N.Ga(60);for(var f=0,g=0;g<d;g++){try{var k=a.tty.zb.Ic(a.tty)}catch(h){throw new N.Ga(29);}if(void 0===k&&0===f)throw new N.Ga(6);if(null===k||void 0===k)break;f++;b[c+g]=k}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,c,d){if(!a.tty||!a.tty.zb.kc)throw new N.Ga(60);
-try{for(var f=0;f<d;f++)a.tty.zb.kc(a.tty,b[c+f])}catch(g){throw new N.Ga(29);}d&&(a.node.timestamp=Date.now());return f}},$a={Ic:function(a){if(!a.input.length){var b=null;if(ha){var c=Buffer.alloc(256),d=0;try{d=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(f){if(f.toString().includes("EOF"))d=0;else throw f;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==typeof readline&&
-(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=Wa(b,!0)}return a.input.shift()},kc:function(a,b){null===b||10===b?(na(sa(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(na(sa(a.output,0)),a.output=[])}},ab={kc:function(a,b){null===b||10===b?(u(sa(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(u(sa(a.output,0)),a.output=[])}};
+var Va=(a,b)=>{function c(k){for(var h=0;h<k.length&&""===k[h];h++);for(var n=k.length-1;0<=n&&""===k[n];n--);return h>n?[]:k.slice(h,n-h+1)}a=Ua(a).substr(1);b=Ua(b).substr(1);a=c(a.split("/"));b=c(b.split("/"));for(var d=Math.min(a.length,b.length),f=d,g=0;g<d;g++)if(a[g]!==b[g]){f=g;break}d=[];for(g=f;g<a.length;g++)d.push("..");d=d.concat(b.slice(f));return d.join("/")};function Wa(a,b){var c=Array(ta(a)+1);a=A(a,c,0,c.length);b&&(c.length=a);return c}var Xa=[];
+function Ya(a,b){Xa[a]={input:[],output:[],Fb:b};N.uc(a,Za)}
+var Za={open:function(a){var b=Xa[a.node.rdev];if(!b)throw new N.La(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.Fb.flush(a.tty)},flush:function(a){a.tty.Fb.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.Fb.Nc)throw new N.La(60);for(var f=0,g=0;g<d;g++){try{var k=a.tty.Fb.Nc(a.tty)}catch(h){throw new N.La(29);}if(void 0===k&&0===f)throw new N.La(6);if(null===k||void 0===k)break;f++;b[c+g]=k}f&&(a.node.timestamp=Date.now());return f},write:function(a,b,c,d){if(!a.tty||!a.tty.Fb.pc)throw new N.La(60);
+try{for(var f=0;f<d;f++)a.tty.Fb.pc(a.tty,b[c+f])}catch(g){throw new N.La(29);}d&&(a.node.timestamp=Date.now());return f}},$a={Nc:function(a){if(!a.input.length){var b=null;if(ha){var c=Buffer.alloc(256),d=0;try{d=fs.readSync(process.stdin.fd,c,0,256,-1)}catch(f){if(f.toString().includes("EOF"))d=0;else throw f;}0<d?b=c.slice(0,d).toString("utf-8"):b=null}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),null!==b&&(b+="\n")):"function"==typeof readline&&
+(b=readline(),null!==b&&(b+="\n"));if(!b)return null;a.input=Wa(b,!0)}return a.input.shift()},pc:function(a,b){null===b||10===b?(na(sa(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(na(sa(a.output,0)),a.output=[])}},ab={pc:function(a,b){null===b||10===b?(r(sa(a.output,0)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(r(sa(a.output,0)),a.output=[])}};
function bb(a){a=65536*Math.ceil(a/65536);var b=cb(65536,a);if(!b)return 0;z.fill(0,b,b+a);return b}
-var O={fb:null,Qa:function(){return O.createNode(null,"/",16895,0)},createNode:function(a,b,c,d){if(N.vd(c)||N.isFIFO(c))throw new N.Ga(63);O.fb||(O.fb={dir:{node:{bb:O.Ia.bb,Ta:O.Ia.Ta,lookup:O.Ia.lookup,ib:O.Ia.ib,rename:O.Ia.rename,unlink:O.Ia.unlink,rmdir:O.Ia.rmdir,readdir:O.Ia.readdir,symlink:O.Ia.symlink},stream:{cb:O.Ka.cb}},file:{node:{bb:O.Ia.bb,Ta:O.Ia.Ta},stream:{cb:O.Ka.cb,read:O.Ka.read,write:O.Ka.write,Bb:O.Ka.Bb,qb:O.Ka.qb,yb:O.Ka.yb}},link:{node:{bb:O.Ia.bb,Ta:O.Ia.Ta,readlink:O.Ia.readlink},
-stream:{}},vc:{node:{bb:O.Ia.bb,Ta:O.Ia.Ta},stream:N.$c}});c=N.createNode(a,b,c,d);N.Sa(c.mode)?(c.Ia=O.fb.dir.node,c.Ka=O.fb.dir.stream,c.Ja={}):N.isFile(c.mode)?(c.Ia=O.fb.file.node,c.Ka=O.fb.file.stream,c.Pa=0,c.Ja=null):N.xb(c.mode)?(c.Ia=O.fb.link.node,c.Ka=O.fb.link.stream):N.Lb(c.mode)&&(c.Ia=O.fb.vc.node,c.Ka=O.fb.vc.stream);c.timestamp=Date.now();a&&(a.Ja[b]=c,a.timestamp=c.timestamp);return c},Xd:function(a){return a.Ja?a.Ja.subarray?a.Ja.subarray(0,a.Pa):new Uint8Array(a.Ja):new Uint8Array(0)},
-Ec:function(a,b){var c=a.Ja?a.Ja.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Ja,a.Ja=new Uint8Array(b),0<a.Pa&&a.Ja.set(c.subarray(0,a.Pa),0))},Jd:function(a,b){if(a.Pa!=b)if(0==b)a.Ja=null,a.Pa=0;else{var c=a.Ja;a.Ja=new Uint8Array(b);c&&a.Ja.set(c.subarray(0,Math.min(b,a.Pa)));a.Pa=b}},Ia:{bb:function(a){var b={};b.dev=N.Lb(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;N.Sa(a.mode)?b.size=4096:N.isFile(a.mode)?b.size=a.Pa:
-N.xb(a.mode)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Xc=4096;b.blocks=Math.ceil(b.size/b.Xc);return b},Ta:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&O.Jd(a,b.size)},lookup:function(){throw N.Zb[44];},ib:function(a,b,c,d){return O.createNode(a,b,c,d)},rename:function(a,b,c){if(N.Sa(a.mode)){try{var d=N.hb(b,c)}catch(g){}if(d)for(var f in d.Ja)throw new N.Ga(55);
-}delete a.parent.Ja[a.name];a.parent.timestamp=Date.now();a.name=c;b.Ja[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},unlink:function(a,b){delete a.Ja[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=N.hb(a,b),d;for(d in c.Ja)throw new N.Ga(55);delete a.Ja[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.Ja)a.Ja.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=O.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(!N.xb(a.mode))throw new N.Ga(28);
-return a.link}},Ka:{read:function(a,b,c,d,f){var g=a.node.Ja;if(f>=a.node.Pa)return 0;a=Math.min(a.node.Pa-f,d);if(8<a&&g.subarray)b.set(g.subarray(f,f+a),c);else for(d=0;d<a;d++)b[c+d]=g[f+d];return a},write:function(a,b,c,d,f,g){b.buffer===A.buffer&&(g=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Ja||a.Ja.subarray)){if(g)return a.Ja=b.subarray(c,c+d),a.Pa=d;if(0===a.Pa&&0===f)return a.Ja=b.slice(c,c+d),a.Pa=d;if(f+d<=a.Pa)return a.Ja.set(b.subarray(c,c+d),f),d}O.Ec(a,f+
-d);if(a.Ja.subarray&&b.subarray)a.Ja.set(b.subarray(c,c+d),f);else for(g=0;g<d;g++)a.Ja[f+g]=b[c+g];a.Pa=Math.max(a.Pa,f+d);return d},cb:function(a,b,c){1===c?b+=a.position:2===c&&N.isFile(a.node.mode)&&(b+=a.node.Pa);if(0>b)throw new N.Ga(28);return b},Bb:function(a,b,c){O.Ec(a.node,b+c);a.node.Pa=Math.max(a.node.Pa,b+c)},qb:function(a,b,c,d,f){if(!N.isFile(a.node.mode))throw new N.Ga(43);a=a.node.Ja;if(f&2||a.buffer!==va){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,
-c,c+b);c=!0;b=bb(b);if(!b)throw new N.Ga(48);A.set(a,b)}else c=!1,b=a.byteOffset;return{La:b,tc:c}},yb:function(a,b,c,d,f){if(!N.isFile(a.node.mode))throw new N.Ga(43);if(f&2)return 0;O.Ka.write(a,b,0,d,c,!1);return 0}}};function db(a,b,c){var d="al "+a;ja(a,f=>{f||x('Loading data file "'+a+'" failed (no arrayBuffer).');b(new Uint8Array(f));d&&Ja(d)},()=>{if(c)c();else throw'Loading data file "'+a+'" failed.';});d&&Ia(d)}
-var N={root:null,Eb:[],Cc:{},streams:[],Bd:1,eb:null,Ac:"/",cc:!1,Lc:!0,Ga:null,Zb:{},md:null,Rb:0,Oa:(a,b={})=>{a=Ua(N.cwd(),a);if(!a)return{path:"",node:null};b=Object.assign({Xb:!0,nc:0},b);if(8<b.nc)throw new N.Ga(32);a=Qa(a.split("/").filter(k=>!!k),!1);for(var c=N.root,d="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;c=N.hb(c,a[f]);d=L(d+"/"+a[f]);N.ob(c)&&(!g||g&&b.Xb)&&(c=c.Db.root);if(!g||b.Xa)for(g=0;N.xb(c.mode);)if(c=N.readlink(d),d=Ua(Ra(d),c),c=N.Oa(d,{nc:b.nc+1}).node,
-40<g++)throw new N.Ga(32);}return{path:d,node:c}},kb:a=>{for(var b;;){if(N.Nb(a))return a=a.Qa.Mc,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},bc:(a,b)=>{for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%N.eb.length},Jc:a=>{var b=N.bc(a.parent.id,a.name);a.rb=N.eb[b];N.eb[b]=a},Kc:a=>{var b=N.bc(a.parent.id,a.name);if(N.eb[b]===a)N.eb[b]=a.rb;else for(b=N.eb[b];b;){if(b.rb===a){b.rb=a.rb;break}b=b.rb}},hb:(a,b)=>{var c=N.yd(a);if(c)throw new N.Ga(c,
-a);for(c=N.eb[N.bc(a.id,b)];c;c=c.rb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return N.lookup(a,b)},createNode:(a,b,c,d)=>{a=new N.Pc(a,b,c,d);N.Jc(a);return a},Wb:a=>{N.Kc(a)},Nb:a=>a===a.parent,ob:a=>!!a.Db,isFile:a=>32768===(a&61440),Sa:a=>16384===(a&61440),xb:a=>40960===(a&61440),Lb:a=>8192===(a&61440),vd:a=>24576===(a&61440),isFIFO:a=>4096===(a&61440),isSocket:a=>49152===(a&49152),nd:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},Ad:a=>{var b=N.nd[a];if("undefined"==typeof b)throw Error("Unknown file open mode: "+
-a);return b},Gc:a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},mb:(a,b)=>{if(N.Lc)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0},yd:a=>{var b=N.mb(a,"x");return b?b:a.Ia.lookup?0:2},jc:(a,b)=>{try{return N.hb(a,b),20}catch(c){}return N.mb(a,"wx")},Pb:(a,b,c)=>{try{var d=N.hb(a,b)}catch(f){return f.Ma}if(a=N.mb(a,"wx"))return a;if(c){if(!N.Sa(d.mode))return 54;if(N.Nb(d)||N.kb(d)===N.cwd())return 10}else if(N.Sa(d.mode))return 31;
-return 0},zd:(a,b)=>a?N.xb(a.mode)?32:N.Sa(a.mode)&&("r"!==N.Gc(b)||b&512)?31:N.mb(a,N.Gc(b)):44,Uc:4096,Cd:(a=0,b=N.Uc)=>{for(;a<=b;a++)if(!N.streams[a])return a;throw new N.Ga(33);},lb:a=>N.streams[a],zc:(a,b,c)=>{N.Hb||(N.Hb=function(){this.Wa={}},N.Hb.prototype={},Object.defineProperties(N.Hb.prototype,{object:{get:function(){return this.node},set:function(d){this.node=d}},flags:{get:function(){return this.Wa.flags},set:function(d){this.Wa.flags=d}},position:{get:function(){return this.Wa.position},
-set:function(d){this.Wa.position=d}}}));a=Object.assign(new N.Hb,a);b=N.Cd(b,c);a.fd=b;return N.streams[b]=a},ad:a=>{N.streams[a]=null},$c:{open:a=>{a.Ka=N.qd(a.node.rdev).Ka;a.Ka.open&&a.Ka.open(a)},cb:()=>{throw new N.Ga(70);}},ic:a=>a>>8,$d:a=>a&255,pb:(a,b)=>a<<8|b,pc:(a,b)=>{N.Cc[a]={Ka:b}},qd:a=>N.Cc[a],Hc:a=>{var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push.apply(a,c.Eb)}return b},Oc:(a,b)=>{function c(k){N.Rb--;return b(k)}function d(k){if(k){if(!d.kd)return d.kd=!0,c(k)}else++g>=
-f.length&&c(null)}"function"==typeof a&&(b=a,a=!1);N.Rb++;1<N.Rb&&u("warning: "+N.Rb+" FS.syncfs operations in flight at once, probably just doing extra work");var f=N.Hc(N.root.Qa),g=0;f.forEach(k=>{if(!k.type.Oc)return d(null);k.type.Oc(k,a,d)})},Qa:(a,b,c)=>{var d="/"===c,f=!c;if(d&&N.root)throw new N.Ga(10);if(!d&&!f){var g=N.Oa(c,{Xb:!1});c=g.path;g=g.node;if(N.ob(g))throw new N.Ga(10);if(!N.Sa(g.mode))throw new N.Ga(54);}b={type:a,de:b,Mc:c,Eb:[]};a=a.Qa(b);a.Qa=b;b.root=a;d?N.root=a:g&&(g.Db=
-b,g.Qa&&g.Qa.Eb.push(b));return a},he:a=>{a=N.Oa(a,{Xb:!1});if(!N.ob(a.node))throw new N.Ga(28);a=a.node;var b=a.Db,c=N.Hc(b);Object.keys(N.eb).forEach(d=>{for(d=N.eb[d];d;){var f=d.rb;c.includes(d.Qa)&&N.Wb(d);d=f}});a.Db=null;a.Qa.Eb.splice(a.Qa.Eb.indexOf(b),1)},lookup:(a,b)=>a.Ia.lookup(a,b),ib:(a,b,c)=>{var d=N.Oa(a,{parent:!0}).node;a=M(a);if(!a||"."===a||".."===a)throw new N.Ga(28);var f=N.jc(d,a);if(f)throw new N.Ga(f);if(!d.Ia.ib)throw new N.Ga(63);return d.Ia.ib(d,a,b,c)},create:(a,b)=>
-N.ib(a,(void 0!==b?b:438)&4095|32768,0),mkdir:(a,b)=>N.ib(a,(void 0!==b?b:511)&1023|16384,0),ae:(a,b)=>{a=a.split("/");for(var c="",d=0;d<a.length;++d)if(a[d]){c+="/"+a[d];try{N.mkdir(c,b)}catch(f){if(20!=f.Ma)throw f;}}},Qb:(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);return N.ib(a,b|8192,c)},symlink:(a,b)=>{if(!Ua(a))throw new N.Ga(44);var c=N.Oa(b,{parent:!0}).node;if(!c)throw new N.Ga(44);b=M(b);var d=N.jc(c,b);if(d)throw new N.Ga(d);if(!c.Ia.symlink)throw new N.Ga(63);return c.Ia.symlink(c,b,
-a)},rename:(a,b)=>{var c=Ra(a),d=Ra(b),f=M(a),g=M(b);var k=N.Oa(a,{parent:!0});var h=k.node;k=N.Oa(b,{parent:!0});k=k.node;if(!h||!k)throw new N.Ga(44);if(h.Qa!==k.Qa)throw new N.Ga(75);var n=N.hb(h,f);a=Va(a,d);if("."!==a.charAt(0))throw new N.Ga(28);a=Va(b,c);if("."!==a.charAt(0))throw new N.Ga(55);try{var q=N.hb(k,g)}catch(p){}if(n!==q){b=N.Sa(n.mode);if(f=N.Pb(h,f,b))throw new N.Ga(f);if(f=q?N.Pb(k,g,b):N.jc(k,g))throw new N.Ga(f);if(!h.Ia.rename)throw new N.Ga(63);if(N.ob(n)||q&&N.ob(q))throw new N.Ga(10);
-if(k!==h&&(f=N.mb(h,"w")))throw new N.Ga(f);N.Kc(n);try{h.Ia.rename(n,k,g)}catch(p){throw p;}finally{N.Jc(n)}}},rmdir:a=>{var b=N.Oa(a,{parent:!0}).node;a=M(a);var c=N.hb(b,a),d=N.Pb(b,a,!0);if(d)throw new N.Ga(d);if(!b.Ia.rmdir)throw new N.Ga(63);if(N.ob(c))throw new N.Ga(10);b.Ia.rmdir(b,a);N.Wb(c)},readdir:a=>{a=N.Oa(a,{Xa:!0}).node;if(!a.Ia.readdir)throw new N.Ga(54);return a.Ia.readdir(a)},unlink:a=>{var b=N.Oa(a,{parent:!0}).node;if(!b)throw new N.Ga(44);a=M(a);var c=N.hb(b,a),d=N.Pb(b,a,!1);
-if(d)throw new N.Ga(d);if(!b.Ia.unlink)throw new N.Ga(63);if(N.ob(c))throw new N.Ga(10);b.Ia.unlink(b,a);N.Wb(c)},readlink:a=>{a=N.Oa(a).node;if(!a)throw new N.Ga(44);if(!a.Ia.readlink)throw new N.Ga(28);return Ua(N.kb(a.parent),a.Ia.readlink(a))},stat:(a,b)=>{a=N.Oa(a,{Xa:!b}).node;if(!a)throw new N.Ga(44);if(!a.Ia.bb)throw new N.Ga(63);return a.Ia.bb(a)},lstat:a=>N.stat(a,!0),chmod:(a,b,c)=>{a="string"==typeof a?N.Oa(a,{Xa:!c}).node:a;if(!a.Ia.Ta)throw new N.Ga(63);a.Ia.Ta(a,{mode:b&4095|a.mode&
--4096,timestamp:Date.now()})},lchmod:(a,b)=>{N.chmod(a,b,!0)},fchmod:(a,b)=>{a=N.lb(a);if(!a)throw new N.Ga(8);N.chmod(a.node,b)},chown:(a,b,c,d)=>{a="string"==typeof a?N.Oa(a,{Xa:!d}).node:a;if(!a.Ia.Ta)throw new N.Ga(63);a.Ia.Ta(a,{timestamp:Date.now()})},lchown:(a,b,c)=>{N.chown(a,b,c,!0)},fchown:(a,b,c)=>{a=N.lb(a);if(!a)throw new N.Ga(8);N.chown(a.node,b,c)},truncate:(a,b)=>{if(0>b)throw new N.Ga(28);a="string"==typeof a?N.Oa(a,{Xa:!0}).node:a;if(!a.Ia.Ta)throw new N.Ga(63);if(N.Sa(a.mode))throw new N.Ga(31);
-if(!N.isFile(a.mode))throw new N.Ga(28);var c=N.mb(a,"w");if(c)throw new N.Ga(c);a.Ia.Ta(a,{size:b,timestamp:Date.now()})},od:(a,b)=>{a=N.lb(a);if(!a)throw new N.Ga(8);if(0===(a.flags&2097155))throw new N.Ga(28);N.truncate(a.node,b)},Vd:(a,b,c)=>{a=N.Oa(a,{Xa:!0}).node;a.Ia.Ta(a,{timestamp:Math.max(b,c)})},open:(a,b,c)=>{if(""===a)throw new N.Ga(44);b="string"==typeof b?N.Ad(b):b;c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var d=a;else{a=L(a);try{d=N.Oa(a,{Xa:!(b&131072)}).node}catch(g){}}var f=
-!1;if(b&64)if(d){if(b&128)throw new N.Ga(20);}else d=N.ib(a,c,0),f=!0;if(!d)throw new N.Ga(44);N.Lb(d.mode)&&(b&=-513);if(b&65536&&!N.Sa(d.mode))throw new N.Ga(54);if(!f&&(c=N.zd(d,b)))throw new N.Ga(c);b&512&&!f&&N.truncate(d,0);b&=-131713;d=N.zc({node:d,path:N.kb(d),flags:b,seekable:!0,position:0,Ka:d.Ka,Ud:[],error:!1});d.Ka.open&&d.Ka.open(d);!e.logReadFiles||b&1||(N.mc||(N.mc={}),a in N.mc||(N.mc[a]=1));return d},close:a=>{if(N.Cb(a))throw new N.Ga(8);a.ac&&(a.ac=null);try{a.Ka.close&&a.Ka.close(a)}catch(b){throw b;
-}finally{N.ad(a.fd)}a.fd=null},Cb:a=>null===a.fd,cb:(a,b,c)=>{if(N.Cb(a))throw new N.Ga(8);if(!a.seekable||!a.Ka.cb)throw new N.Ga(70);if(0!=c&&1!=c&&2!=c)throw new N.Ga(28);a.position=a.Ka.cb(a,b,c);a.Ud=[];return a.position},read:(a,b,c,d,f)=>{if(0>d||0>f)throw new N.Ga(28);if(N.Cb(a))throw new N.Ga(8);if(1===(a.flags&2097155))throw new N.Ga(8);if(N.Sa(a.node.mode))throw new N.Ga(31);if(!a.Ka.read)throw new N.Ga(28);var g="undefined"!=typeof f;if(!g)f=a.position;else if(!a.seekable)throw new N.Ga(70);
-b=a.Ka.read(a,b,c,d,f);g||(a.position+=b);return b},write:(a,b,c,d,f,g)=>{if(0>d||0>f)throw new N.Ga(28);if(N.Cb(a))throw new N.Ga(8);if(0===(a.flags&2097155))throw new N.Ga(8);if(N.Sa(a.node.mode))throw new N.Ga(31);if(!a.Ka.write)throw new N.Ga(28);a.seekable&&a.flags&1024&&N.cb(a,0,2);var k="undefined"!=typeof f;if(!k)f=a.position;else if(!a.seekable)throw new N.Ga(70);b=a.Ka.write(a,b,c,d,f,g);k||(a.position+=b);return b},Bb:(a,b,c)=>{if(N.Cb(a))throw new N.Ga(8);if(0>b||0>=c)throw new N.Ga(28);
-if(0===(a.flags&2097155))throw new N.Ga(8);if(!N.isFile(a.node.mode)&&!N.Sa(a.node.mode))throw new N.Ga(43);if(!a.Ka.Bb)throw new N.Ga(138);a.Ka.Bb(a,b,c)},qb:(a,b,c,d,f)=>{if(0!==(d&2)&&0===(f&2)&&2!==(a.flags&2097155))throw new N.Ga(2);if(1===(a.flags&2097155))throw new N.Ga(2);if(!a.Ka.qb)throw new N.Ga(43);return a.Ka.qb(a,b,c,d,f)},yb:(a,b,c,d,f)=>a&&a.Ka.yb?a.Ka.yb(a,b,c,d,f):0,be:()=>0,dc:(a,b,c)=>{if(!a.Ka.dc)throw new N.Ga(59);return a.Ka.dc(a,b,c)},readFile:(a,b={})=>{b.flags=b.flags||0;
-b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=N.open(a,b.flags);a=N.stat(a).size;var f=new Uint8Array(a);N.read(d,f,0,a,0);"utf8"===b.encoding?c=sa(f,0):"binary"===b.encoding&&(c=f);N.close(d);return c},writeFile:(a,b,c={})=>{c.flags=c.flags||577;a=N.open(a,c.flags,c.mode);if("string"==typeof b){var d=new Uint8Array(ua(b)+1);b=ta(b,d,0,d.length);N.write(a,d,0,b,void 0,c.Zc)}else if(ArrayBuffer.isView(b))N.write(a,
-b,0,b.byteLength,void 0,c.Zc);else throw Error("Unsupported data type");N.close(a)},cwd:()=>N.Ac,chdir:a=>{a=N.Oa(a,{Xa:!0});if(null===a.node)throw new N.Ga(44);if(!N.Sa(a.node.mode))throw new N.Ga(54);var b=N.mb(a.node,"x");if(b)throw new N.Ga(b);N.Ac=a.path},dd:()=>{N.mkdir("/tmp");N.mkdir("/home");N.mkdir("/home/web_user")},cd:()=>{N.mkdir("/dev");N.pc(N.pb(1,3),{read:()=>0,write:(b,c,d,f)=>f});N.Qb("/dev/null",N.pb(1,3));Ya(N.pb(5,0),$a);Ya(N.pb(6,0),ab);N.Qb("/dev/tty",N.pb(5,0));N.Qb("/dev/tty1",
-N.pb(6,0));var a=Ta();N.$a("/dev","random",a);N.$a("/dev","urandom",a);N.mkdir("/dev/shm");N.mkdir("/dev/shm/tmp")},gd:()=>{N.mkdir("/proc");var a=N.mkdir("/proc/self");N.mkdir("/proc/self/fd");N.Qa({Qa:()=>{var b=N.createNode(a,"fd",16895,73);b.Ia={lookup:(c,d)=>{var f=N.lb(+d);if(!f)throw new N.Ga(8);c={parent:null,Qa:{Mc:"fake"},Ia:{readlink:()=>f.path}};return c.parent=c}};return b}},{},"/proc/self/fd")},hd:()=>{e.stdin?N.$a("/dev","stdin",e.stdin):N.symlink("/dev/tty","/dev/stdin");e.stdout?
-N.$a("/dev","stdout",null,e.stdout):N.symlink("/dev/tty","/dev/stdout");e.stderr?N.$a("/dev","stderr",null,e.stderr):N.symlink("/dev/tty1","/dev/stderr");N.open("/dev/stdin",0);N.open("/dev/stdout",1);N.open("/dev/stderr",1)},Dc:()=>{N.Ga||(N.Ga=function(a,b){this.node=b;this.Kd=function(c){this.Ma=c};this.Kd(a);this.message="FS error"},N.Ga.prototype=Error(),N.Ga.prototype.constructor=N.Ga,[44].forEach(a=>{N.Zb[a]=new N.Ga(a);N.Zb[a].stack="<generic error, no stack>"}))},Pd:()=>{N.Dc();N.eb=Array(4096);
-N.Qa(O,{},"/");N.dd();N.cd();N.gd();N.md={MEMFS:O}},vb:(a,b,c)=>{N.vb.cc=!0;N.Dc();e.stdin=a||e.stdin;e.stdout=b||e.stdout;e.stderr=c||e.stderr;N.hd()},ee:()=>{N.vb.cc=!1;for(var a=0;a<N.streams.length;a++){var b=N.streams[a];b&&N.close(b)}},$b:(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},Wd:(a,b)=>{a=N.Vb(a,b);return a.exists?a.object:null},Vb:(a,b)=>{try{var c=N.Oa(a,{Xa:!b});a=c.path}catch(f){}var d={Nb:!1,exists:!1,error:0,name:null,path:null,object:null,Dd:!1,Fd:null,Ed:null};try{c=N.Oa(a,
-{parent:!0}),d.Dd=!0,d.Fd=c.path,d.Ed=c.node,d.name=M(a),c=N.Oa(a,{Xa:!b}),d.exists=!0,d.path=c.path,d.object=c.node,d.name=c.node.name,d.Nb="/"===c.path}catch(f){d.error=f.Ma}return d},xc:(a,b)=>{a="string"==typeof a?a:N.kb(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=L(a+"/"+c);try{N.mkdir(d)}catch(f){}a=d}}return d},ed:(a,b,c,d,f)=>{a="string"==typeof a?a:N.kb(a);b=L(a+"/"+b);return N.create(b,N.$b(d,f))},Jb:(a,b,c,d,f,g)=>{var k=b;a&&(a="string"==typeof a?a:N.kb(a),k=b?
-L(a+"/"+b):a);a=N.$b(d,f);k=N.create(k,a);if(c){if("string"==typeof c){b=Array(c.length);d=0;for(f=c.length;d<f;++d)b[d]=c.charCodeAt(d);c=b}N.chmod(k,a|146);b=N.open(k,577);N.write(b,c,0,c.length,0,g);N.close(b);N.chmod(k,a)}return k},$a:(a,b,c,d)=>{a=Sa("string"==typeof a?a:N.kb(a),b);b=N.$b(!!c,!!d);N.$a.ic||(N.$a.ic=64);var f=N.pb(N.$a.ic++,0);N.pc(f,{open:g=>{g.seekable=!1},close:()=>{d&&d.buffer&&d.buffer.length&&d(10)},read:(g,k,h,n)=>{for(var q=0,p=0;p<n;p++){try{var r=c()}catch(w){throw new N.Ga(29);
-}if(void 0===r&&0===q)throw new N.Ga(6);if(null===r||void 0===r)break;q++;k[h+p]=r}q&&(g.node.timestamp=Date.now());return q},write:(g,k,h,n)=>{for(var q=0;q<n;q++)try{d(k[h+q])}catch(p){throw new N.Ga(29);}n&&(g.node.timestamp=Date.now());return q}});return N.Qb(a,b,f)},Yb:a=>{if(a.ec||a.wd||a.link||a.Ja)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
-if(ia)try{a.Ja=Wa(ia(a.url),!0),a.Pa=a.Ja.length}catch(b){throw new N.Ga(29);}else throw Error("Cannot load without read() or XMLHttpRequest.");},wc:(a,b,c,d,f)=>{function g(){this.hc=!1;this.Wa=[]}function k(p,r,w,l,t){p=p.node.Ja;if(t>=p.length)return 0;l=Math.min(p.length-t,l);if(p.slice)for(var v=0;v<l;v++)r[w+v]=p[t+v];else for(v=0;v<l;v++)r[w+v]=p.get(t+v);return l}g.prototype.get=function(p){if(!(p>this.length-1||0>p)){var r=p%this.chunkSize;return this.Kb(p/this.chunkSize|0)[r]}};g.prototype.Ub=
-function(p){this.Kb=p};g.prototype.uc=function(){var p=new XMLHttpRequest;p.open("HEAD",c,!1);p.send(null);if(!(200<=p.status&&300>p.status||304===p.status))throw Error("Couldn't load "+c+". Status: "+p.status);var r=Number(p.getResponseHeader("Content-length")),w,l=(w=p.getResponseHeader("Accept-Ranges"))&&"bytes"===w;p=(w=p.getResponseHeader("Content-Encoding"))&&"gzip"===w;var t=1048576;l||(t=r);var v=this;v.Ub(B=>{var K=B*t,H=(B+1)*t-1;H=Math.min(H,r-1);if("undefined"==typeof v.Wa[B]){var Ga=
-v.Wa;if(K>H)throw Error("invalid range ("+K+", "+H+") or no bytes requested!");if(H>r-1)throw Error("only "+r+" bytes available! programmer error!");var I=new XMLHttpRequest;I.open("GET",c,!1);r!==t&&I.setRequestHeader("Range","bytes="+K+"-"+H);I.responseType="arraybuffer";I.overrideMimeType&&I.overrideMimeType("text/plain; charset=x-user-defined");I.send(null);if(!(200<=I.status&&300>I.status||304===I.status))throw Error("Couldn't load "+c+". Status: "+I.status);K=void 0!==I.response?new Uint8Array(I.response||
-[]):Wa(I.responseText||"",!0);Ga[B]=K}if("undefined"==typeof v.Wa[B])throw Error("doXHR failed!");return v.Wa[B]});if(p||!r)t=r=1,t=r=this.Kb(0).length,na("LazyFiles on gzip forces download of the whole file when length is accessed");this.Wc=r;this.Vc=t;this.hc=!0};if("undefined"!=typeof XMLHttpRequest){if(!fa)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new g;Object.defineProperties(h,{length:{get:function(){this.hc||
-this.uc();return this.Wc}},chunkSize:{get:function(){this.hc||this.uc();return this.Vc}}});h={ec:!1,Ja:h}}else h={ec:!1,url:c};var n=N.ed(a,b,h,d,f);h.Ja?n.Ja=h.Ja:h.url&&(n.Ja=null,n.url=h.url);Object.defineProperties(n,{Pa:{get:function(){return this.Ja.length}}});var q={};Object.keys(n.Ka).forEach(p=>{var r=n.Ka[p];q[p]=function(){N.Yb(n);return r.apply(null,arguments)}});q.read=(p,r,w,l,t)=>{N.Yb(n);return k(p,r,w,l,t)};q.qb=(p,r,w)=>{N.Yb(n);var l=bb(r);if(!l)throw new N.Ga(48);k(p,A,l,r,w);
-return{La:l,tc:!0}};n.Ka=q;return n},yc:(a,b,c,d,f,g,k,h,n,q)=>{function p(l){function t(v){q&&q();h||N.Jb(a,b,v,d,f,n);g&&g();Ja(w)}eb.Yd(l,r,t,()=>{k&&k();Ja(w)})||t(l)}var r=b?Ua(L(a+"/"+b)):a,w="cp "+r;Ia(w);"string"==typeof c?db(c,l=>p(l),k):p(c)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,rc:()=>"EM_FS_"+window.location.pathname,sc:20,Ab:"FILE_DATA",fe:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var d=N.indexedDB();try{var f=d.open(N.rc(),N.sc)}catch(g){return c(g)}f.onupgradeneeded=
-()=>{na("creating db");f.result.createObjectStore(N.Ab)};f.onsuccess=()=>{var g=f.result.transaction([N.Ab],"readwrite"),k=g.objectStore(N.Ab),h=0,n=0,q=a.length;a.forEach(p=>{p=k.put(N.Vb(p).object.Ja,p);p.onsuccess=()=>{h++;h+n==q&&(0==n?b():c())};p.onerror=()=>{n++;h+n==q&&(0==n?b():c())}});g.onerror=c};f.onerror=c},Zd:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var d=N.indexedDB();try{var f=d.open(N.rc(),N.sc)}catch(g){return c(g)}f.onupgradeneeded=c;f.onsuccess=()=>{var g=f.result;try{var k=g.transaction([N.Ab],
-"readonly")}catch(r){c(r);return}var h=k.objectStore(N.Ab),n=0,q=0,p=a.length;a.forEach(r=>{var w=h.get(r);w.onsuccess=()=>{N.Vb(r).exists&&N.unlink(r);N.Jb(Ra(r),M(r),w.result,!0,!0,!0);n++;n+q==p&&(0==q?b():c())};w.onerror=()=>{q++;n+q==p&&(0==q?b():c())}});k.onerror=c};f.onerror=c}};function P(a,b,c){if("/"===b.charAt(0))return b;if(-100===a)a=N.cwd();else{a=N.lb(a);if(!a)throw new N.Ga(8);a=a.path}if(0==b.length){if(!c)throw new N.Ga(44);return a}return L(a+"/"+b)}
-function fb(a,b,c){try{var d=a(b)}catch(f){if(f&&f.node&&L(b)!==L(N.kb(f.node)))return-54;throw f;}D[c>>2]=d.dev;D[c+4>>2]=0;D[c+8>>2]=d.ino;D[c+12>>2]=d.mode;D[c+16>>2]=d.nlink;D[c+20>>2]=d.uid;D[c+24>>2]=d.gid;D[c+28>>2]=d.rdev;D[c+32>>2]=0;J=[d.size>>>0,(G=d.size,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];D[c+40>>2]=J[0];D[c+44>>2]=J[1];D[c+48>>2]=4096;D[c+52>>2]=d.blocks;J=[Math.floor(d.atime.getTime()/1E3)>>>0,(G=
-Math.floor(d.atime.getTime()/1E3),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];D[c+56>>2]=J[0];D[c+60>>2]=J[1];D[c+64>>2]=0;J=[Math.floor(d.mtime.getTime()/1E3)>>>0,(G=Math.floor(d.mtime.getTime()/1E3),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];D[c+72>>2]=J[0];D[c+76>>2]=J[1];D[c+80>>2]=0;J=[Math.floor(d.ctime.getTime()/1E3)>>>0,(G=Math.floor(d.ctime.getTime()/
-1E3),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];D[c+88>>2]=J[0];D[c+92>>2]=J[1];D[c+96>>2]=0;J=[d.ino>>>0,(G=d.ino,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];D[c+104>>2]=J[0];D[c+108>>2]=J[1];return 0}var gb=void 0;function hb(){gb+=4;return D[gb-4>>2]}function Q(a){a=N.lb(a);if(!a)throw new N.Ga(8);return a}
-function ib(a){return E[a>>2]+4294967296*D[a+4>>2]}var jb={};function kb(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function lb(a){return this.fromWireType(D[a>>2])}var mb={},nb={},ob={};function pb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function qb(a,b){a=pb(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)}
+var O={lb:null,Va:function(){return O.createNode(null,"/",16895,0)},createNode:function(a,b,c,d){if(N.Ad(c)||N.isFIFO(c))throw new N.La(63);O.lb||(O.lb={dir:{node:{ib:O.Na.ib,Ya:O.Na.Ya,lookup:O.Na.lookup,nb:O.Na.nb,rename:O.Na.rename,unlink:O.Na.unlink,rmdir:O.Na.rmdir,readdir:O.Na.readdir,symlink:O.Na.symlink},stream:{ab:O.Pa.ab}},file:{node:{ib:O.Na.ib,Ya:O.Na.Ya},stream:{ab:O.Pa.ab,read:O.Pa.read,write:O.Pa.write,Hb:O.Pa.Hb,xb:O.Pa.xb,Eb:O.Pa.Eb}},link:{node:{ib:O.Na.ib,Ya:O.Na.Ya,readlink:O.Na.readlink},
+stream:{}},Ac:{node:{ib:O.Na.ib,Ya:O.Na.Ya},stream:N.ed}});c=N.createNode(a,b,c,d);N.Xa(c.mode)?(c.Na=O.lb.dir.node,c.Pa=O.lb.dir.stream,c.Oa={}):N.isFile(c.mode)?(c.Na=O.lb.file.node,c.Pa=O.lb.file.stream,c.Ua=0,c.Oa=null):N.ub(c.mode)?(c.Na=O.lb.link.node,c.Pa=O.lb.link.stream):N.Ib(c.mode)&&(c.Na=O.lb.Ac.node,c.Pa=O.lb.Ac.stream);c.timestamp=Date.now();a&&(a.Oa[b]=c,a.timestamp=c.timestamp);return c},be:function(a){return a.Oa?a.Oa.subarray?a.Oa.subarray(0,a.Ua):new Uint8Array(a.Oa):new Uint8Array(0)},
+Jc:function(a,b){var c=a.Oa?a.Oa.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Oa,a.Oa=new Uint8Array(b),0<a.Ua&&a.Oa.set(c.subarray(0,a.Ua),0))},Od:function(a,b){if(a.Ua!=b)if(0==b)a.Oa=null,a.Ua=0;else{var c=a.Oa;a.Oa=new Uint8Array(b);c&&a.Oa.set(c.subarray(0,Math.min(b,a.Ua)));a.Ua=b}},Na:{ib:function(a){var b={};b.dev=N.Ib(a.mode)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;N.Xa(a.mode)?b.size=4096:N.isFile(a.mode)?b.size=a.Ua:
+N.ub(a.mode)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.bd=4096;b.blocks=Math.ceil(b.size/b.bd);return b},Ya:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&O.Od(a,b.size)},lookup:function(){throw N.ec[44];},nb:function(a,b,c,d){return O.createNode(a,b,c,d)},rename:function(a,b,c){if(N.Xa(a.mode)){try{var d=N.jb(b,c)}catch(g){}if(d)for(var f in d.Oa)throw new N.La(55);
+}delete a.parent.Oa[a.name];a.parent.timestamp=Date.now();a.name=c;b.Oa[c]=a;b.timestamp=a.parent.timestamp;a.parent=b},unlink:function(a,b){delete a.Oa[b];a.timestamp=Date.now()},rmdir:function(a,b){var c=N.jb(a,b),d;for(d in c.Oa)throw new N.La(55);delete a.Oa[b];a.timestamp=Date.now()},readdir:function(a){var b=[".",".."],c;for(c in a.Oa)a.Oa.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=O.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(!N.ub(a.mode))throw new N.La(28);
+return a.link}},Pa:{read:function(a,b,c,d,f){var g=a.node.Oa;if(f>=a.node.Ua)return 0;a=Math.min(a.node.Ua-f,d);if(8<a&&g.subarray)b.set(g.subarray(f,f+a),c);else for(d=0;d<a;d++)b[c+d]=g[f+d];return a},write:function(a,b,c,d,f,g){b.buffer===B.buffer&&(g=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.Oa||a.Oa.subarray)){if(g)return a.Oa=b.subarray(c,c+d),a.Ua=d;if(0===a.Ua&&0===f)return a.Oa=b.slice(c,c+d),a.Ua=d;if(f+d<=a.Ua)return a.Oa.set(b.subarray(c,c+d),f),d}O.Jc(a,f+
+d);if(a.Oa.subarray&&b.subarray)a.Oa.set(b.subarray(c,c+d),f);else for(g=0;g<d;g++)a.Oa[f+g]=b[c+g];a.Ua=Math.max(a.Ua,f+d);return d},ab:function(a,b,c){1===c?b+=a.position:2===c&&N.isFile(a.node.mode)&&(b+=a.node.Ua);if(0>b)throw new N.La(28);return b},Hb:function(a,b,c){O.Jc(a.node,b+c);a.node.Ua=Math.max(a.node.Ua,b+c)},xb:function(a,b,c,d,f){if(!N.isFile(a.node.mode))throw new N.La(43);a=a.node.Oa;if(f&2||a.buffer!==ua){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,
+c,c+b);c=!0;b=bb(b);if(!b)throw new N.La(48);B.set(a,b)}else c=!1,b=a.byteOffset;return{Ra:b,yc:c}},Eb:function(a,b,c,d,f){if(!N.isFile(a.node.mode))throw new N.La(43);if(f&2)return 0;O.Pa.write(a,b,0,d,c,!1);return 0}}};function db(a,b,c){var d="al "+a;ja(a,f=>{f||v('Loading data file "'+a+'" failed (no arrayBuffer).');b(new Uint8Array(f));d&&Ja(d)},()=>{if(c)c();else throw'Loading data file "'+a+'" failed.';});d&&Ia(d)}
+var N={root:null,Lb:[],Hc:{},streams:[],Gd:1,kb:null,Fc:"/",ic:!1,Qc:!0,La:null,ec:{},rd:null,Xb:0,Ta:(a,b={})=>{a=Ua(N.cwd(),a);if(!a)return{path:"",node:null};b=Object.assign({cc:!0,sc:0},b);if(8<b.sc)throw new N.La(32);a=Qa(a.split("/").filter(k=>!!k),!1);for(var c=N.root,d="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;c=N.jb(c,a[f]);d=L(d+"/"+a[f]);N.vb(c)&&(!g||g&&b.cc)&&(c=c.Kb.root);if(!g||b.cb)for(g=0;N.ub(c.mode);)if(c=N.readlink(d),d=Ua(Ra(d),c),c=N.Ta(d,{sc:b.sc+1}).node,
+40<g++)throw new N.La(32);}return{path:d,node:c}},pb:a=>{for(var b;;){if(N.Tb(a))return a=a.Va.Rc,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}},hc:(a,b)=>{for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%N.kb.length},Oc:a=>{var b=N.hc(a.parent.id,a.name);a.yb=N.kb[b];N.kb[b]=a},Pc:a=>{var b=N.hc(a.parent.id,a.name);if(N.kb[b]===a)N.kb[b]=a.yb;else for(b=N.kb[b];b;){if(b.yb===a){b.yb=a.yb;break}b=b.yb}},jb:(a,b)=>{var c=N.Dd(a);if(c)throw new N.La(c,
+a);for(c=N.kb[N.hc(a.id,b)];c;c=c.yb){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return N.lookup(a,b)},createNode:(a,b,c,d)=>{a=new N.Uc(a,b,c,d);N.Oc(a);return a},bc:a=>{N.Pc(a)},Tb:a=>a===a.parent,vb:a=>!!a.Kb,isFile:a=>32768===(a&61440),Xa:a=>16384===(a&61440),ub:a=>40960===(a&61440),Ib:a=>8192===(a&61440),Ad:a=>24576===(a&61440),isFIFO:a=>4096===(a&61440),isSocket:a=>49152===(a&49152),sd:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},Fd:a=>{var b=N.sd[a];if("undefined"==typeof b)throw Error("Unknown file open mode: "+
+a);return b},Lc:a=>{var b=["r","w","rw"][a&3];a&512&&(b+="w");return b},rb:(a,b)=>{if(N.Qc)return 0;if(!b.includes("r")||a.mode&292){if(b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73))return 2}else return 2;return 0},Dd:a=>{var b=N.rb(a,"x");return b?b:a.Na.lookup?0:2},oc:(a,b)=>{try{return N.jb(a,b),20}catch(c){}return N.rb(a,"wx")},Vb:(a,b,c)=>{try{var d=N.jb(a,b)}catch(f){return f.Qa}if(a=N.rb(a,"wx"))return a;if(c){if(!N.Xa(d.mode))return 54;if(N.Tb(d)||N.pb(d)===N.cwd())return 10}else if(N.Xa(d.mode))return 31;
+return 0},Ed:(a,b)=>a?N.ub(a.mode)?32:N.Xa(a.mode)&&("r"!==N.Lc(b)||b&512)?31:N.rb(a,N.Lc(b)):44,Vc:4096,Hd:(a=0,b=N.Vc)=>{for(;a<=b;a++)if(!N.streams[a])return a;throw new N.La(33);},qb:a=>N.streams[a],Ec:(a,b,c)=>{N.Ob||(N.Ob=function(){this.bb={}},N.Ob.prototype={},Object.defineProperties(N.Ob.prototype,{object:{get:function(){return this.node},set:function(d){this.node=d}},flags:{get:function(){return this.bb.flags},set:function(d){this.bb.flags=d}},position:{get:function(){return this.bb.position},
+set:function(d){this.bb.position=d}}}));a=Object.assign(new N.Ob,a);b=N.Hd(b,c);a.fd=b;return N.streams[b]=a},gd:a=>{N.streams[a]=null},ed:{open:a=>{a.Pa=N.vd(a.node.rdev).Pa;a.Pa.open&&a.Pa.open(a)},ab:()=>{throw new N.La(70);}},nc:a=>a>>8,ee:a=>a&255,wb:(a,b)=>a<<8|b,uc:(a,b)=>{N.Hc[a]={Pa:b}},vd:a=>N.Hc[a],Mc:a=>{var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push.apply(a,c.Lb)}return b},Tc:(a,b)=>{function c(k){N.Xb--;return b(k)}function d(k){if(k){if(!d.pd)return d.pd=!0,c(k)}else++g>=
+f.length&&c(null)}"function"==typeof a&&(b=a,a=!1);N.Xb++;1<N.Xb&&r("warning: "+N.Xb+" FS.syncfs operations in flight at once, probably just doing extra work");var f=N.Mc(N.root.Va),g=0;f.forEach(k=>{if(!k.type.Tc)return d(null);k.type.Tc(k,a,d)})},Va:(a,b,c)=>{var d="/"===c,f=!c;if(d&&N.root)throw new N.La(10);if(!d&&!f){var g=N.Ta(c,{cc:!1});c=g.path;g=g.node;if(N.vb(g))throw new N.La(10);if(!N.Xa(g.mode))throw new N.La(54);}b={type:a,ie:b,Rc:c,Lb:[]};a=a.Va(b);a.Va=b;b.root=a;d?N.root=a:g&&(g.Kb=
+b,g.Va&&g.Va.Lb.push(b));return a},me:a=>{a=N.Ta(a,{cc:!1});if(!N.vb(a.node))throw new N.La(28);a=a.node;var b=a.Kb,c=N.Mc(b);Object.keys(N.kb).forEach(d=>{for(d=N.kb[d];d;){var f=d.yb;c.includes(d.Va)&&N.bc(d);d=f}});a.Kb=null;a.Va.Lb.splice(a.Va.Lb.indexOf(b),1)},lookup:(a,b)=>a.Na.lookup(a,b),nb:(a,b,c)=>{var d=N.Ta(a,{parent:!0}).node;a=M(a);if(!a||"."===a||".."===a)throw new N.La(28);var f=N.oc(d,a);if(f)throw new N.La(f);if(!d.Na.nb)throw new N.La(63);return d.Na.nb(d,a,b,c)},create:(a,b)=>
+N.nb(a,(void 0!==b?b:438)&4095|32768,0),mkdir:(a,b)=>N.nb(a,(void 0!==b?b:511)&1023|16384,0),fe:(a,b)=>{a=a.split("/");for(var c="",d=0;d<a.length;++d)if(a[d]){c+="/"+a[d];try{N.mkdir(c,b)}catch(f){if(20!=f.Qa)throw f;}}},Wb:(a,b,c)=>{"undefined"==typeof c&&(c=b,b=438);return N.nb(a,b|8192,c)},symlink:(a,b)=>{if(!Ua(a))throw new N.La(44);var c=N.Ta(b,{parent:!0}).node;if(!c)throw new N.La(44);b=M(b);var d=N.oc(c,b);if(d)throw new N.La(d);if(!c.Na.symlink)throw new N.La(63);return c.Na.symlink(c,b,
+a)},rename:(a,b)=>{var c=Ra(a),d=Ra(b),f=M(a),g=M(b);var k=N.Ta(a,{parent:!0});var h=k.node;k=N.Ta(b,{parent:!0});k=k.node;if(!h||!k)throw new N.La(44);if(h.Va!==k.Va)throw new N.La(75);var n=N.jb(h,f);a=Va(a,d);if("."!==a.charAt(0))throw new N.La(28);a=Va(b,c);if("."!==a.charAt(0))throw new N.La(55);try{var q=N.jb(k,g)}catch(p){}if(n!==q){b=N.Xa(n.mode);if(f=N.Vb(h,f,b))throw new N.La(f);if(f=q?N.Vb(k,g,b):N.oc(k,g))throw new N.La(f);if(!h.Na.rename)throw new N.La(63);if(N.vb(n)||q&&N.vb(q))throw new N.La(10);
+if(k!==h&&(f=N.rb(h,"w")))throw new N.La(f);N.Pc(n);try{h.Na.rename(n,k,g)}catch(p){throw p;}finally{N.Oc(n)}}},rmdir:a=>{var b=N.Ta(a,{parent:!0}).node;a=M(a);var c=N.jb(b,a),d=N.Vb(b,a,!0);if(d)throw new N.La(d);if(!b.Na.rmdir)throw new N.La(63);if(N.vb(c))throw new N.La(10);b.Na.rmdir(b,a);N.bc(c)},readdir:a=>{a=N.Ta(a,{cb:!0}).node;if(!a.Na.readdir)throw new N.La(54);return a.Na.readdir(a)},unlink:a=>{var b=N.Ta(a,{parent:!0}).node;if(!b)throw new N.La(44);a=M(a);var c=N.jb(b,a),d=N.Vb(b,a,!1);
+if(d)throw new N.La(d);if(!b.Na.unlink)throw new N.La(63);if(N.vb(c))throw new N.La(10);b.Na.unlink(b,a);N.bc(c)},readlink:a=>{a=N.Ta(a).node;if(!a)throw new N.La(44);if(!a.Na.readlink)throw new N.La(28);return Ua(N.pb(a.parent),a.Na.readlink(a))},stat:(a,b)=>{a=N.Ta(a,{cb:!b}).node;if(!a)throw new N.La(44);if(!a.Na.ib)throw new N.La(63);return a.Na.ib(a)},lstat:a=>N.stat(a,!0),chmod:(a,b,c)=>{a="string"==typeof a?N.Ta(a,{cb:!c}).node:a;if(!a.Na.Ya)throw new N.La(63);a.Na.Ya(a,{mode:b&4095|a.mode&
+-4096,timestamp:Date.now()})},lchmod:(a,b)=>{N.chmod(a,b,!0)},fchmod:(a,b)=>{a=N.qb(a);if(!a)throw new N.La(8);N.chmod(a.node,b)},chown:(a,b,c,d)=>{a="string"==typeof a?N.Ta(a,{cb:!d}).node:a;if(!a.Na.Ya)throw new N.La(63);a.Na.Ya(a,{timestamp:Date.now()})},lchown:(a,b,c)=>{N.chown(a,b,c,!0)},fchown:(a,b,c)=>{a=N.qb(a);if(!a)throw new N.La(8);N.chown(a.node,b,c)},truncate:(a,b)=>{if(0>b)throw new N.La(28);a="string"==typeof a?N.Ta(a,{cb:!0}).node:a;if(!a.Na.Ya)throw new N.La(63);if(N.Xa(a.mode))throw new N.La(31);
+if(!N.isFile(a.mode))throw new N.La(28);var c=N.rb(a,"w");if(c)throw new N.La(c);a.Na.Ya(a,{size:b,timestamp:Date.now()})},td:(a,b)=>{a=N.qb(a);if(!a)throw new N.La(8);if(0===(a.flags&2097155))throw new N.La(28);N.truncate(a.node,b)},$d:(a,b,c)=>{a=N.Ta(a,{cb:!0}).node;a.Na.Ya(a,{timestamp:Math.max(b,c)})},open:(a,b,c)=>{if(""===a)throw new N.La(44);b="string"==typeof b?N.Fd(b):b;c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var d=a;else{a=L(a);try{d=N.Ta(a,{cb:!(b&131072)}).node}catch(g){}}var f=
+!1;if(b&64)if(d){if(b&128)throw new N.La(20);}else d=N.nb(a,c,0),f=!0;if(!d)throw new N.La(44);N.Ib(d.mode)&&(b&=-513);if(b&65536&&!N.Xa(d.mode))throw new N.La(54);if(!f&&(c=N.Ed(d,b)))throw new N.La(c);b&512&&!f&&N.truncate(d,0);b&=-131713;d=N.Ec({node:d,path:N.pb(d),flags:b,seekable:!0,position:0,Pa:d.Pa,Zd:[],error:!1});d.Pa.open&&d.Pa.open(d);!e.logReadFiles||b&1||(N.rc||(N.rc={}),a in N.rc||(N.rc[a]=1));return d},close:a=>{if(N.Jb(a))throw new N.La(8);a.tb&&(a.tb=null);try{a.Pa.close&&a.Pa.close(a)}catch(b){throw b;
+}finally{N.gd(a.fd)}a.fd=null},Jb:a=>null===a.fd,ab:(a,b,c)=>{if(N.Jb(a))throw new N.La(8);if(!a.seekable||!a.Pa.ab)throw new N.La(70);if(0!=c&&1!=c&&2!=c)throw new N.La(28);a.position=a.Pa.ab(a,b,c);a.Zd=[];return a.position},read:(a,b,c,d,f)=>{if(0>d||0>f)throw new N.La(28);if(N.Jb(a))throw new N.La(8);if(1===(a.flags&2097155))throw new N.La(8);if(N.Xa(a.node.mode))throw new N.La(31);if(!a.Pa.read)throw new N.La(28);var g="undefined"!=typeof f;if(!g)f=a.position;else if(!a.seekable)throw new N.La(70);
+b=a.Pa.read(a,b,c,d,f);g||(a.position+=b);return b},write:(a,b,c,d,f,g)=>{if(0>d||0>f)throw new N.La(28);if(N.Jb(a))throw new N.La(8);if(0===(a.flags&2097155))throw new N.La(8);if(N.Xa(a.node.mode))throw new N.La(31);if(!a.Pa.write)throw new N.La(28);a.seekable&&a.flags&1024&&N.ab(a,0,2);var k="undefined"!=typeof f;if(!k)f=a.position;else if(!a.seekable)throw new N.La(70);b=a.Pa.write(a,b,c,d,f,g);k||(a.position+=b);return b},Hb:(a,b,c)=>{if(N.Jb(a))throw new N.La(8);if(0>b||0>=c)throw new N.La(28);
+if(0===(a.flags&2097155))throw new N.La(8);if(!N.isFile(a.node.mode)&&!N.Xa(a.node.mode))throw new N.La(43);if(!a.Pa.Hb)throw new N.La(138);a.Pa.Hb(a,b,c)},xb:(a,b,c,d,f)=>{if(0!==(d&2)&&0===(f&2)&&2!==(a.flags&2097155))throw new N.La(2);if(1===(a.flags&2097155))throw new N.La(2);if(!a.Pa.xb)throw new N.La(43);return a.Pa.xb(a,b,c,d,f)},Eb:(a,b,c,d,f)=>a&&a.Pa.Eb?a.Pa.Eb(a,b,c,d,f):0,ge:()=>0,jc:(a,b,c)=>{if(!a.Pa.jc)throw new N.La(59);return a.Pa.jc(a,b,c)},readFile:(a,b={})=>{b.flags=b.flags||0;
+b.encoding=b.encoding||"binary";if("utf8"!==b.encoding&&"binary"!==b.encoding)throw Error('Invalid encoding type "'+b.encoding+'"');var c,d=N.open(a,b.flags);a=N.stat(a).size;var f=new Uint8Array(a);N.read(d,f,0,a,0);"utf8"===b.encoding?c=sa(f,0):"binary"===b.encoding&&(c=f);N.close(d);return c},writeFile:(a,b,c={})=>{c.flags=c.flags||577;a=N.open(a,c.flags,c.mode);if("string"==typeof b){var d=new Uint8Array(ta(b)+1);b=A(b,d,0,d.length);N.write(a,d,0,b,void 0,c.dd)}else if(ArrayBuffer.isView(b))N.write(a,
+b,0,b.byteLength,void 0,c.dd);else throw Error("Unsupported data type");N.close(a)},cwd:()=>N.Fc,chdir:a=>{a=N.Ta(a,{cb:!0});if(null===a.node)throw new N.La(44);if(!N.Xa(a.node.mode))throw new N.La(54);var b=N.rb(a.node,"x");if(b)throw new N.La(b);N.Fc=a.path},kd:()=>{N.mkdir("/tmp");N.mkdir("/home");N.mkdir("/home/web_user")},jd:()=>{N.mkdir("/dev");N.uc(N.wb(1,3),{read:()=>0,write:(b,c,d,f)=>f});N.Wb("/dev/null",N.wb(1,3));Ya(N.wb(5,0),$a);Ya(N.wb(6,0),ab);N.Wb("/dev/tty",N.wb(5,0));N.Wb("/dev/tty1",
+N.wb(6,0));var a=Ta();N.gb("/dev","random",a);N.gb("/dev","urandom",a);N.mkdir("/dev/shm");N.mkdir("/dev/shm/tmp")},md:()=>{N.mkdir("/proc");var a=N.mkdir("/proc/self");N.mkdir("/proc/self/fd");N.Va({Va:()=>{var b=N.createNode(a,"fd",16895,73);b.Na={lookup:(c,d)=>{var f=N.qb(+d);if(!f)throw new N.La(8);c={parent:null,Va:{Rc:"fake"},Na:{readlink:()=>f.path}};return c.parent=c}};return b}},{},"/proc/self/fd")},nd:()=>{e.stdin?N.gb("/dev","stdin",e.stdin):N.symlink("/dev/tty","/dev/stdin");e.stdout?
+N.gb("/dev","stdout",null,e.stdout):N.symlink("/dev/tty","/dev/stdout");e.stderr?N.gb("/dev","stderr",null,e.stderr):N.symlink("/dev/tty1","/dev/stderr");N.open("/dev/stdin",0);N.open("/dev/stdout",1);N.open("/dev/stderr",1)},Ic:()=>{N.La||(N.La=function(a,b){this.node=b;this.Pd=function(c){this.Qa=c};this.Pd(a);this.message="FS error"},N.La.prototype=Error(),N.La.prototype.constructor=N.La,[44].forEach(a=>{N.ec[a]=new N.La(a);N.ec[a].stack="<generic error, no stack>"}))},Ud:()=>{N.Ic();N.kb=Array(4096);
+N.Va(O,{},"/");N.kd();N.jd();N.md();N.rd={MEMFS:O}},Cb:(a,b,c)=>{N.Cb.ic=!0;N.Ic();e.stdin=a||e.stdin;e.stdout=b||e.stdout;e.stderr=c||e.stderr;N.nd()},je:()=>{N.Cb.ic=!1;for(var a=0;a<N.streams.length;a++){var b=N.streams[a];b&&N.close(b)}},fc:(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},ae:(a,b)=>{a=N.ac(a,b);return a.exists?a.object:null},ac:(a,b)=>{try{var c=N.Ta(a,{cb:!b});a=c.path}catch(f){}var d={Tb:!1,exists:!1,error:0,name:null,path:null,object:null,Id:!1,Kd:null,Jd:null};try{c=N.Ta(a,
+{parent:!0}),d.Id=!0,d.Kd=c.path,d.Jd=c.node,d.name=M(a),c=N.Ta(a,{cb:!b}),d.exists=!0,d.path=c.path,d.object=c.node,d.name=c.node.name,d.Tb="/"===c.path}catch(f){d.error=f.Qa}return d},Cc:(a,b)=>{a="string"==typeof a?a:N.pb(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=L(a+"/"+c);try{N.mkdir(d)}catch(f){}a=d}}return d},ld:(a,b,c,d,f)=>{a="string"==typeof a?a:N.pb(a);b=L(a+"/"+b);return N.create(b,N.fc(d,f))},Qb:(a,b,c,d,f,g)=>{var k=b;a&&(a="string"==typeof a?a:N.pb(a),k=b?
+L(a+"/"+b):a);a=N.fc(d,f);k=N.create(k,a);if(c){if("string"==typeof c){b=Array(c.length);d=0;for(f=c.length;d<f;++d)b[d]=c.charCodeAt(d);c=b}N.chmod(k,a|146);b=N.open(k,577);N.write(b,c,0,c.length,0,g);N.close(b);N.chmod(k,a)}return k},gb:(a,b,c,d)=>{a=Sa("string"==typeof a?a:N.pb(a),b);b=N.fc(!!c,!!d);N.gb.nc||(N.gb.nc=64);var f=N.wb(N.gb.nc++,0);N.uc(f,{open:g=>{g.seekable=!1},close:()=>{d&&d.buffer&&d.buffer.length&&d(10)},read:(g,k,h,n)=>{for(var q=0,p=0;p<n;p++){try{var t=c()}catch(x){throw new N.La(29);
+}if(void 0===t&&0===q)throw new N.La(6);if(null===t||void 0===t)break;q++;k[h+p]=t}q&&(g.node.timestamp=Date.now());return q},write:(g,k,h,n)=>{for(var q=0;q<n;q++)try{d(k[h+q])}catch(p){throw new N.La(29);}n&&(g.node.timestamp=Date.now());return q}});return N.Wb(a,b,f)},dc:a=>{if(a.kc||a.Bd||a.link||a.Oa)return!0;if("undefined"!=typeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
+if(ia)try{a.Oa=Wa(ia(a.url),!0),a.Ua=a.Oa.length}catch(b){throw new N.La(29);}else throw Error("Cannot load without read() or XMLHttpRequest.");},Bc:(a,b,c,d,f)=>{function g(){this.mc=!1;this.bb=[]}function k(p,t,x,l,u){p=p.node.Oa;if(u>=p.length)return 0;l=Math.min(p.length-u,l);if(p.slice)for(var w=0;w<l;w++)t[x+w]=p[u+w];else for(w=0;w<l;w++)t[x+w]=p.get(u+w);return l}g.prototype.get=function(p){if(!(p>this.length-1||0>p)){var t=p%this.chunkSize;return this.Rb(p/this.chunkSize|0)[t]}};g.prototype.$b=
+function(p){this.Rb=p};g.prototype.zc=function(){var p=new XMLHttpRequest;p.open("HEAD",c,!1);p.send(null);if(!(200<=p.status&&300>p.status||304===p.status))throw Error("Couldn't load "+c+". Status: "+p.status);var t=Number(p.getResponseHeader("Content-length")),x,l=(x=p.getResponseHeader("Accept-Ranges"))&&"bytes"===x;p=(x=p.getResponseHeader("Content-Encoding"))&&"gzip"===x;var u=1048576;l||(u=t);var w=this;w.$b(C=>{var K=C*u,H=(C+1)*u-1;H=Math.min(H,t-1);if("undefined"==typeof w.bb[C]){var Ga=
+w.bb;if(K>H)throw Error("invalid range ("+K+", "+H+") or no bytes requested!");if(H>t-1)throw Error("only "+t+" bytes available! programmer error!");var I=new XMLHttpRequest;I.open("GET",c,!1);t!==u&&I.setRequestHeader("Range","bytes="+K+"-"+H);I.responseType="arraybuffer";I.overrideMimeType&&I.overrideMimeType("text/plain; charset=x-user-defined");I.send(null);if(!(200<=I.status&&300>I.status||304===I.status))throw Error("Couldn't load "+c+". Status: "+I.status);K=void 0!==I.response?new Uint8Array(I.response||
+[]):Wa(I.responseText||"",!0);Ga[C]=K}if("undefined"==typeof w.bb[C])throw Error("doXHR failed!");return w.bb[C]});if(p||!t)u=t=1,u=t=this.Rb(0).length,na("LazyFiles on gzip forces download of the whole file when length is accessed");this.ad=t;this.$c=u;this.mc=!0};if("undefined"!=typeof XMLHttpRequest){if(!fa)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new g;Object.defineProperties(h,{length:{get:function(){this.mc||
+this.zc();return this.ad}},chunkSize:{get:function(){this.mc||this.zc();return this.$c}}});h={kc:!1,Oa:h}}else h={kc:!1,url:c};var n=N.ld(a,b,h,d,f);h.Oa?n.Oa=h.Oa:h.url&&(n.Oa=null,n.url=h.url);Object.defineProperties(n,{Ua:{get:function(){return this.Oa.length}}});var q={};Object.keys(n.Pa).forEach(p=>{var t=n.Pa[p];q[p]=function(){N.dc(n);return t.apply(null,arguments)}});q.read=(p,t,x,l,u)=>{N.dc(n);return k(p,t,x,l,u)};q.xb=(p,t,x)=>{N.dc(n);var l=bb(t);if(!l)throw new N.La(48);k(p,B,l,t,x);
+return{Ra:l,yc:!0}};n.Pa=q;return n},Dc:(a,b,c,d,f,g,k,h,n,q)=>{function p(l){function u(w){q&&q();h||N.Qb(a,b,w,d,f,n);g&&g();Ja(x)}eb.ce(l,t,u,()=>{k&&k();Ja(x)})||u(l)}var t=b?Ua(L(a+"/"+b)):a,x="cp "+t;Ia(x);"string"==typeof c?db(c,l=>p(l),k):p(c)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,wc:()=>"EM_FS_"+window.location.pathname,xc:20,Gb:"FILE_DATA",ke:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var d=N.indexedDB();try{var f=d.open(N.wc(),N.xc)}catch(g){return c(g)}f.onupgradeneeded=
+()=>{na("creating db");f.result.createObjectStore(N.Gb)};f.onsuccess=()=>{var g=f.result.transaction([N.Gb],"readwrite"),k=g.objectStore(N.Gb),h=0,n=0,q=a.length;a.forEach(p=>{p=k.put(N.ac(p).object.Oa,p);p.onsuccess=()=>{h++;h+n==q&&(0==n?b():c())};p.onerror=()=>{n++;h+n==q&&(0==n?b():c())}});g.onerror=c};f.onerror=c},de:(a,b,c)=>{b=b||(()=>{});c=c||(()=>{});var d=N.indexedDB();try{var f=d.open(N.wc(),N.xc)}catch(g){return c(g)}f.onupgradeneeded=c;f.onsuccess=()=>{var g=f.result;try{var k=g.transaction([N.Gb],
+"readonly")}catch(t){c(t);return}var h=k.objectStore(N.Gb),n=0,q=0,p=a.length;a.forEach(t=>{var x=h.get(t);x.onsuccess=()=>{N.ac(t).exists&&N.unlink(t);N.Qb(Ra(t),M(t),x.result,!0,!0,!0);n++;n+q==p&&(0==q?b():c())};x.onerror=()=>{q++;n+q==p&&(0==q?b():c())}});k.onerror=c};f.onerror=c}};function P(a,b,c){if("/"===b.charAt(0))return b;if(-100===a)a=N.cwd();else{a=N.qb(a);if(!a)throw new N.La(8);a=a.path}if(0==b.length){if(!c)throw new N.La(44);return a}return L(a+"/"+b)}
+function fb(a,b,c){try{var d=a(b)}catch(f){if(f&&f.node&&L(b)!==L(N.pb(f.node)))return-54;throw f;}E[c>>2]=d.dev;E[c+4>>2]=0;E[c+8>>2]=d.ino;E[c+12>>2]=d.mode;E[c+16>>2]=d.nlink;E[c+20>>2]=d.uid;E[c+24>>2]=d.gid;E[c+28>>2]=d.rdev;E[c+32>>2]=0;J=[d.size>>>0,(G=d.size,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[c+40>>2]=J[0];E[c+44>>2]=J[1];E[c+48>>2]=4096;E[c+52>>2]=d.blocks;J=[Math.floor(d.atime.getTime()/1E3)>>>0,(G=
+Math.floor(d.atime.getTime()/1E3),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[c+56>>2]=J[0];E[c+60>>2]=J[1];E[c+64>>2]=0;J=[Math.floor(d.mtime.getTime()/1E3)>>>0,(G=Math.floor(d.mtime.getTime()/1E3),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[c+72>>2]=J[0];E[c+76>>2]=J[1];E[c+80>>2]=0;J=[Math.floor(d.ctime.getTime()/1E3)>>>0,(G=Math.floor(d.ctime.getTime()/
+1E3),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[c+88>>2]=J[0];E[c+92>>2]=J[1];E[c+96>>2]=0;J=[d.ino>>>0,(G=d.ino,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[c+104>>2]=J[0];E[c+108>>2]=J[1];return 0}var gb=void 0;function hb(){gb+=4;return E[gb-4>>2]}function Q(a){a=N.qb(a);if(!a)throw new N.La(8);return a}
+function ib(a){return F[a>>2]+4294967296*E[a+4>>2]}var jb={};function kb(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function lb(a){return this.fromWireType(E[a>>2])}var mb={},nb={},ob={};function pb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function qb(a,b){a=pb(a);return(new Function("body","return function "+a+'() {\n "use strict"; return body.apply(this, arguments);\n};\n'))(b)}
function rb(a){var b=Error,c=qb(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var sb=void 0;function tb(a){throw new sb(a);}
function ub(a,b,c){function d(h){h=c(h);h.length!==a.length&&tb("Mismatched type converter count");for(var n=0;n<a.length;++n)R(a[n],h[n])}a.forEach(function(h){ob[h]=b});var f=Array(b.length),g=[],k=0;b.forEach((h,n)=>{nb.hasOwnProperty(h)?f[n]=nb[h]:(g.push(h),mb.hasOwnProperty(h)||(mb[h]=[]),mb[h].push(()=>{f[n]=nb[h];++k;k===g.length&&d(f)}))});0===g.length&&d(f)}
function vb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var wb=void 0;function S(a){for(var b="";z[a];)b+=wb[z[a++]];return b}var xb=void 0;function T(a){throw new xb(a);}
-function R(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||T('type "'+d+'" must have a positive integer typeid pointer');if(nb.hasOwnProperty(a)){if(c.ud)return;T("Cannot register type '"+d+"' twice")}nb[a]=b;delete ob[a];mb.hasOwnProperty(a)&&(b=mb[a],delete mb[a],b.forEach(f=>f()))}function yb(a){T(a.Ha.Ra.Na.name+" instance already deleted")}var zb=!1;function Ab(){}
-function Bb(a){--a.count.value;0===a.count.value&&(a.Va?a.Ya.jb(a.Va):a.Ra.Na.jb(a.La))}function Cb(a,b,c){if(b===c)return a;if(void 0===c.Za)return null;a=Cb(a,b,c.Za);return null===a?null:c.jd(a)}var Db={},Eb=[];function Fb(){for(;Eb.length;){var a=Eb.pop();a.Ha.ub=!1;a["delete"]()}}var Gb=void 0,Hb={};function Ib(a,b){for(void 0===b&&T("ptr should not be undefined");a.Za;)b=a.Gb(b),a=a.Za;return Hb[b]}
-function Jb(a,b){b.Ra&&b.La||tb("makeClassHandle requires ptr and ptrType");!!b.Ya!==!!b.Va&&tb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Kb(Object.create(a,{Ha:{value:b}}))}function Kb(a){if("undefined"===typeof FinalizationRegistry)return Kb=b=>b,a;zb=new FinalizationRegistry(b=>{Bb(b.Ha)});Kb=b=>{var c=b.Ha;c.Va&&zb.register(b,{Ha:c},b);return b};Ab=b=>{zb.unregister(b)};return Kb(a)}function U(){}
-function Lb(a,b,c){if(void 0===a[b].Ua){var d=a[b];a[b]=function(){a[b].Ua.hasOwnProperty(arguments.length)||T("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].Ua+")!");return a[b].Ua[arguments.length].apply(this,arguments)};a[b].Ua=[];a[b].Ua[d.Ib]=d}}
-function Mb(a,b,c){e.hasOwnProperty(a)?((void 0===c||void 0!==e[a].Ua&&void 0!==e[a].Ua[c])&&T("Cannot register public name '"+a+"' twice"),Lb(e,a,a),e.hasOwnProperty(c)&&T("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),e[a].Ua[c]=b):(e[a]=b,void 0!==c&&(e[a].ce=c))}function Nb(a,b,c,d,f,g,k,h){this.name=a;this.constructor=b;this.wb=c;this.jb=d;this.Za=f;this.pd=g;this.Gb=k;this.jd=h;this.Hd=[]}
-function Ob(a,b,c){for(;b!==c;)b.Gb||T("Expected null or instance of "+c.name+", got an instance of "+b.name),a=b.Gb(a),b=b.Za;return a}function Pb(a,b){if(null===b)return this.fc&&T("null is not a valid "+this.name),0;b.Ha||T('Cannot pass "'+Qb(b)+'" as a '+this.name);b.Ha.La||T("Cannot pass deleted object as a pointer of type "+this.name);return Ob(b.Ha.La,b.Ha.Ra.Na,this.Na)}
-function Rb(a,b){if(null===b){this.fc&&T("null is not a valid "+this.name);if(this.Ob){var c=this.lc();null!==a&&a.push(this.jb,c);return c}return 0}b.Ha||T('Cannot pass "'+Qb(b)+'" as a '+this.name);b.Ha.La||T("Cannot pass deleted object as a pointer of type "+this.name);!this.Mb&&b.Ha.Ra.Mb&&T("Cannot convert argument of type "+(b.Ha.Ya?b.Ha.Ya.name:b.Ha.Ra.name)+" to parameter type "+this.name);c=Ob(b.Ha.La,b.Ha.Ra.Na,this.Na);if(this.Ob)switch(void 0===b.Ha.Va&&T("Passing raw pointer to smart pointer is illegal"),
-this.Od){case 0:b.Ha.Ya===this?c=b.Ha.Va:T("Cannot convert argument of type "+(b.Ha.Ya?b.Ha.Ya.name:b.Ha.Ra.name)+" to parameter type "+this.name);break;case 1:c=b.Ha.Va;break;case 2:if(b.Ha.Ya===this)c=b.Ha.Va;else{var d=b.clone();c=this.Id(c,Sb(function(){d["delete"]()}));null!==a&&a.push(this.jb,c)}break;default:T("Unsupporting sharing policy")}return c}
-function Tb(a,b){if(null===b)return this.fc&&T("null is not a valid "+this.name),0;b.Ha||T('Cannot pass "'+Qb(b)+'" as a '+this.name);b.Ha.La||T("Cannot pass deleted object as a pointer of type "+this.name);b.Ha.Ra.Mb&&T("Cannot convert argument of type "+b.Ha.Ra.name+" to parameter type "+this.name);return Ob(b.Ha.La,b.Ha.Ra.Na,this.Na)}
-function V(a,b,c,d){this.name=a;this.Na=b;this.fc=c;this.Mb=d;this.Ob=!1;this.jb=this.Id=this.lc=this.Nc=this.Od=this.Gd=void 0;void 0!==b.Za?this.toWireType=Rb:(this.toWireType=d?Pb:Tb,this.ab=null)}function Ub(a,b,c){e.hasOwnProperty(a)||tb("Replacing nonexistant public symbol");void 0!==e[a].Ua&&void 0!==c?e[a].Ua[c]=b:(e[a]=b,e[a].Ib=c)}
-function Vb(a,b){var c=[];return function(){c.length=0;Object.assign(c,arguments);if(a.includes("j")){var d=e["dynCall_"+a];d=c&&c.length?d.apply(null,[b].concat(c)):d.call(null,b)}else d=Aa.get(b).apply(null,c);return d}}function W(a,b){a=S(a);var c=a.includes("j")?Vb(a,b):Aa.get(b);"function"!=typeof c&&T("unknown function pointer with signature "+a+": "+b);return c}var Wb=void 0;function Xb(a){a=Yb(a);var b=S(a);X(a);return b}
-function Zb(a,b){function c(g){f[g]||nb[g]||(ob[g]?ob[g].forEach(c):(d.push(g),f[g]=!0))}var d=[],f={};b.forEach(c);throw new Wb(a+": "+d.map(Xb).join([", "]));}function $b(a,b){for(var c=[],d=0;d<a;d++)c.push(E[b+4*d>>2]);return c}
+function R(a,b,c={}){if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||T('type "'+d+'" must have a positive integer typeid pointer');if(nb.hasOwnProperty(a)){if(c.zd)return;T("Cannot register type '"+d+"' twice")}nb[a]=b;delete ob[a];mb.hasOwnProperty(a)&&(b=mb[a],delete mb[a],b.forEach(f=>f()))}function yb(a){T(a.Ma.Wa.Sa.name+" instance already deleted")}var zb=!1;function Ab(){}
+function Bb(a){--a.count.value;0===a.count.value&&(a.$a?a.eb.ob(a.$a):a.Wa.Sa.ob(a.Ra))}function Cb(a,b,c){if(b===c)return a;if(void 0===c.fb)return null;a=Cb(a,b,c.fb);return null===a?null:c.od(a)}var Db={},Eb=[];function Fb(){for(;Eb.length;){var a=Eb.pop();a.Ma.Bb=!1;a["delete"]()}}var Gb=void 0,Hb={};function Ib(a,b){for(void 0===b&&T("ptr should not be undefined");a.fb;)b=a.Nb(b),a=a.fb;return Hb[b]}
+function Jb(a,b){b.Wa&&b.Ra||tb("makeClassHandle requires ptr and ptrType");!!b.eb!==!!b.$a&&tb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Kb(Object.create(a,{Ma:{value:b}}))}function Kb(a){if("undefined"===typeof FinalizationRegistry)return Kb=b=>b,a;zb=new FinalizationRegistry(b=>{Bb(b.Ma)});Kb=b=>{var c=b.Ma;c.$a&&zb.register(b,{Ma:c},b);return b};Ab=b=>{zb.unregister(b)};return Kb(a)}function U(){}
+function Lb(a,b,c){if(void 0===a[b].Za){var d=a[b];a[b]=function(){a[b].Za.hasOwnProperty(arguments.length)||T("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].Za+")!");return a[b].Za[arguments.length].apply(this,arguments)};a[b].Za=[];a[b].Za[d.Pb]=d}}
+function Mb(a,b,c){e.hasOwnProperty(a)?((void 0===c||void 0!==e[a].Za&&void 0!==e[a].Za[c])&&T("Cannot register public name '"+a+"' twice"),Lb(e,a,a),e.hasOwnProperty(c)&&T("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),e[a].Za[c]=b):(e[a]=b,void 0!==c&&(e[a].he=c))}function Nb(a,b,c,d,f,g,k,h){this.name=a;this.constructor=b;this.Db=c;this.ob=d;this.fb=f;this.ud=g;this.Nb=k;this.od=h;this.Md=[]}
+function Ob(a,b,c){for(;b!==c;)b.Nb||T("Expected null or instance of "+c.name+", got an instance of "+b.name),a=b.Nb(a),b=b.fb;return a}function Pb(a,b){if(null===b)return this.lc&&T("null is not a valid "+this.name),0;b.Ma||T('Cannot pass "'+Qb(b)+'" as a '+this.name);b.Ma.Ra||T("Cannot pass deleted object as a pointer of type "+this.name);return Ob(b.Ma.Ra,b.Ma.Wa.Sa,this.Sa)}
+function Rb(a,b){if(null===b){this.lc&&T("null is not a valid "+this.name);if(this.Ub){var c=this.qc();null!==a&&a.push(this.ob,c);return c}return 0}b.Ma||T('Cannot pass "'+Qb(b)+'" as a '+this.name);b.Ma.Ra||T("Cannot pass deleted object as a pointer of type "+this.name);!this.Sb&&b.Ma.Wa.Sb&&T("Cannot convert argument of type "+(b.Ma.eb?b.Ma.eb.name:b.Ma.Wa.name)+" to parameter type "+this.name);c=Ob(b.Ma.Ra,b.Ma.Wa.Sa,this.Sa);if(this.Ub)switch(void 0===b.Ma.$a&&T("Passing raw pointer to smart pointer is illegal"),
+this.Td){case 0:b.Ma.eb===this?c=b.Ma.$a:T("Cannot convert argument of type "+(b.Ma.eb?b.Ma.eb.name:b.Ma.Wa.name)+" to parameter type "+this.name);break;case 1:c=b.Ma.$a;break;case 2:if(b.Ma.eb===this)c=b.Ma.$a;else{var d=b.clone();c=this.Nd(c,Sb(function(){d["delete"]()}));null!==a&&a.push(this.ob,c)}break;default:T("Unsupporting sharing policy")}return c}
+function Tb(a,b){if(null===b)return this.lc&&T("null is not a valid "+this.name),0;b.Ma||T('Cannot pass "'+Qb(b)+'" as a '+this.name);b.Ma.Ra||T("Cannot pass deleted object as a pointer of type "+this.name);b.Ma.Wa.Sb&&T("Cannot convert argument of type "+b.Ma.Wa.name+" to parameter type "+this.name);return Ob(b.Ma.Ra,b.Ma.Wa.Sa,this.Sa)}
+function V(a,b,c,d){this.name=a;this.Sa=b;this.lc=c;this.Sb=d;this.Ub=!1;this.ob=this.Nd=this.qc=this.Sc=this.Td=this.Ld=void 0;void 0!==b.fb?this.toWireType=Rb:(this.toWireType=d?Pb:Tb,this.hb=null)}function Ub(a,b,c){e.hasOwnProperty(a)||tb("Replacing nonexistant public symbol");void 0!==e[a].Za&&void 0!==c?e[a].Za[c]=b:(e[a]=b,e[a].Pb=c)}
+function Vb(a,b){var c=[];return function(){c.length=0;Object.assign(c,arguments);if(a.includes("j")){var d=e["dynCall_"+a];d=c&&c.length?d.apply(null,[b].concat(c)):d.call(null,b)}else d=za.get(b).apply(null,c);return d}}function W(a,b){a=S(a);var c=a.includes("j")?Vb(a,b):za.get(b);"function"!=typeof c&&T("unknown function pointer with signature "+a+": "+b);return c}var Wb=void 0;function Xb(a){a=Yb(a);var b=S(a);X(a);return b}
+function Zb(a,b){function c(g){f[g]||nb[g]||(ob[g]?ob[g].forEach(c):(d.push(g),f[g]=!0))}var d=[],f={};b.forEach(c);throw new Wb(a+": "+d.map(Xb).join([", "]));}function $b(a,b){for(var c=[],d=0;d<a;d++)c.push(F[b+4*d>>2]);return c}
function ac(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=qb(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}
-function bc(a,b,c,d,f){var g=b.length;2>g&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var k=null!==b[1]&&null!==c,h=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].ab){h=!0;break}var n="void"!==b[0].name,q="",p="";for(c=0;c<g-2;++c)q+=(0!==c?", ":"")+"arg"+c,p+=(0!==c?", ":"")+"arg"+c+"Wired";a="return function "+pb(a)+"("+q+") {\nif (arguments.length !== "+(g-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+
-(g-2)+" args!');\n}\n";h&&(a+="var destructors = [];\n");var r=h?"destructors":"null";q="throwBindingError invoker fn runDestructors retType classParam".split(" ");d=[T,d,f,kb,b[0],b[1]];k&&(a+="var thisWired = classParam.toWireType("+r+", this);\n");for(c=0;c<g-2;++c)a+="var arg"+c+"Wired = argType"+c+".toWireType("+r+", arg"+c+"); // "+b[c+2].name+"\n",q.push("argType"+c),d.push(b[c+2]);k&&(p="thisWired"+(0<p.length?", ":"")+p);a+=(n?"var rv = ":"")+"invoker(fn"+(0<p.length?", ":"")+p+");\n";if(h)a+=
-"runDestructors(destructors);\n";else for(c=k?1:2;c<b.length;++c)g=1===c?"thisWired":"arg"+(c-2)+"Wired",null!==b[c].ab&&(a+=g+"_dtor("+g+"); // "+b[c].name+"\n",q.push(g+"_dtor"),d.push(b[c].ab));n&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n");q.push(a+"}\n");return ac(q).apply(null,d)}var cc=[],Y=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function dc(a){4<a&&0===--Y[a].oc&&(Y[a]=void 0,cc.push(a))}
-var ec=a=>{a||T("Cannot use deleted val. handle = "+a);return Y[a].value},Sb=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=cc.length?cc.pop():Y.length;Y[b]={oc:1,value:a};return b}};function Qb(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}
-function fc(a,b){switch(b){case 2:return function(c){return this.fromWireType(xa[c>>2])};case 3:return function(c){return this.fromWireType(ya[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
-function gc(a,b,c){switch(b){case 0:return c?function(d){return A[d]}:function(d){return z[d]};case 1:return c?function(d){return C[d>>1]}:function(d){return wa[d>>1]};case 2:return c?function(d){return D[d>>2]}:function(d){return E[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var hc="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;
-function ic(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&wa[c];)++c;c<<=1;if(32<c-a&&hc)return hc.decode(z.subarray(a,c));c="";for(d=0;!(d>=b/2);++d){var f=C[a+2*d>>1];if(0==f)break;c+=String.fromCharCode(f)}return c}function jc(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)C[b>>1]=a.charCodeAt(f),b+=2;C[b>>1]=0;return b-d}function kc(a){return 2*a.length}
-function lc(a,b){for(var c=0,d="";!(c>=b/4);){var f=D[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d}function mc(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}D[b>>2]=g;b+=4;if(b+4>c)break}D[b>>2]=0;return b-d}
-function nc(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}function oc(a,b){var c=nb[a];void 0===c&&T(b+" has unknown type "+Xb(a));return c}var pc={};function qc(a){var b=pc[a];return void 0===b?S(a):b}var rc=[];function sc(a){var b=rc.length;rc.push(a);return b}function tc(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=oc(E[b+4*d>>2],"parameter "+d);return c}var uc=[];function vc(a){var b=ua(a)+1,c=wc(b);c&&ta(a,A,c,b);return c}
-function xc(a,b,c){function d(n){return(n=n.toTimeString().match(/\(([A-Za-z ]+)\)$/))?n[1]:"GMT"}var f=(new Date).getFullYear(),g=new Date(f,0,1),k=new Date(f,6,1);f=g.getTimezoneOffset();var h=k.getTimezoneOffset();D[a>>2]=60*Math.max(f,h);D[b>>2]=Number(f!=h);a=d(g);b=d(k);a=vc(a);b=vc(b);h<f?(E[c>>2]=a,E[c+4>>2]=b):(E[c>>2]=b,E[c+4>>2]=a)}function yc(a,b,c){yc.Yc||(yc.Yc=!0,xc(a,b,c))}var zc;zc=ha?()=>{var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:()=>performance.now();var Ac={};
+function bc(a,b,c,d,f){var g=b.length;2>g&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");var k=null!==b[1]&&null!==c,h=!1;for(c=1;c<b.length;++c)if(null!==b[c]&&void 0===b[c].hb){h=!0;break}var n="void"!==b[0].name,q="",p="";for(c=0;c<g-2;++c)q+=(0!==c?", ":"")+"arg"+c,p+=(0!==c?", ":"")+"arg"+c+"Wired";a="return function "+pb(a)+"("+q+") {\nif (arguments.length !== "+(g-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+
+(g-2)+" args!');\n}\n";h&&(a+="var destructors = [];\n");var t=h?"destructors":"null";q="throwBindingError invoker fn runDestructors retType classParam".split(" ");d=[T,d,f,kb,b[0],b[1]];k&&(a+="var thisWired = classParam.toWireType("+t+", this);\n");for(c=0;c<g-2;++c)a+="var arg"+c+"Wired = argType"+c+".toWireType("+t+", arg"+c+"); // "+b[c+2].name+"\n",q.push("argType"+c),d.push(b[c+2]);k&&(p="thisWired"+(0<p.length?", ":"")+p);a+=(n?"var rv = ":"")+"invoker(fn"+(0<p.length?", ":"")+p+");\n";if(h)a+=
+"runDestructors(destructors);\n";else for(c=k?1:2;c<b.length;++c)g=1===c?"thisWired":"arg"+(c-2)+"Wired",null!==b[c].hb&&(a+=g+"_dtor("+g+"); // "+b[c].name+"\n",q.push(g+"_dtor"),d.push(b[c].hb));n&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n");q.push(a+"}\n");return ac(q).apply(null,d)}var cc=[],Y=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function dc(a){4<a&&0===--Y[a].tc&&(Y[a]=void 0,cc.push(a))}
+var ec=a=>{a||T("Cannot use deleted val. handle = "+a);return Y[a].value},Sb=a=>{switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=cc.length?cc.pop():Y.length;Y[b]={tc:1,value:a};return b}};function Qb(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}
+function fc(a,b){switch(b){case 2:return function(c){return this.fromWireType(wa[c>>2])};case 3:return function(c){return this.fromWireType(xa[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}
+function gc(a,b,c){switch(b){case 0:return c?function(d){return B[d]}:function(d){return z[d]};case 1:return c?function(d){return D[d>>1]}:function(d){return va[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return F[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var hc="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;
+function ic(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&va[c];)++c;c<<=1;if(32<c-a&&hc)return hc.decode(z.subarray(a,c));c="";for(d=0;!(d>=b/2);++d){var f=D[a+2*d>>1];if(0==f)break;c+=String.fromCharCode(f)}return c}function jc(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)D[b>>1]=a.charCodeAt(f),b+=2;D[b>>1]=0;return b-d}function kc(a){return 2*a.length}
+function lc(a,b){for(var c=0,d="";!(c>=b/4);){var f=E[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d}function mc(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}E[b>>2]=g;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}
+function nc(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}function oc(a,b){var c=nb[a];void 0===c&&T(b+" has unknown type "+Xb(a));return c}var pc={};function qc(a){var b=pc[a];return void 0===b?S(a):b}var rc=[];function sc(a){var b=rc.length;rc.push(a);return b}function tc(a,b){for(var c=Array(a),d=0;d<a;++d)c[d]=oc(F[b+4*d>>2],"parameter "+d);return c}var uc=[];function vc(a){var b=ta(a)+1,c=wc(b);c&&A(a,B,c,b);return c}
+function xc(a,b,c){function d(n){return(n=n.toTimeString().match(/\(([A-Za-z ]+)\)$/))?n[1]:"GMT"}var f=(new Date).getFullYear(),g=new Date(f,0,1),k=new Date(f,6,1);f=g.getTimezoneOffset();var h=k.getTimezoneOffset();E[a>>2]=60*Math.max(f,h);E[b>>2]=Number(f!=h);a=d(g);b=d(k);a=vc(a);b=vc(b);h<f?(F[c>>2]=a,F[c+4>>2]=b):(F[c>>2]=b,F[c+4>>2]=a)}function yc(a,b,c){yc.cd||(yc.cd=!0,xc(a,b,c))}var zc;zc=ha?()=>{var a=process.hrtime();return 1E3*a[0]+a[1]/1E6}:()=>performance.now();var Ac={};
function Bc(){if(!Cc){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},b;for(b in Ac)void 0===Ac[b]?delete a[b]:a[b]=Ac[b];var c=[];for(b in a)c.push(b+"="+a[b]);Cc=c}return Cc}var Cc;function Dc(a){return 0===a%4&&(0!==a%100||0===a%400)}var Ec=[31,29,31,30,31,30,31,31,30,31,30,31],Fc=[31,28,31,30,31,30,31,31,30,31,30,31];
-function Gc(a,b,c,d){function f(l,t,v){for(l="number"==typeof l?l.toString():l||"";l.length<t;)l=v[0]+l;return l}function g(l,t){return f(l,t,"0")}function k(l,t){function v(K){return 0>K?-1:0<K?1:0}var B;0===(B=v(l.getFullYear()-t.getFullYear()))&&0===(B=v(l.getMonth()-t.getMonth()))&&(B=v(l.getDate()-t.getDate()));return B}function h(l){switch(l.getDay()){case 0:return new Date(l.getFullYear()-1,11,29);case 1:return l;case 2:return new Date(l.getFullYear(),0,3);case 3:return new Date(l.getFullYear(),
-0,2);case 4:return new Date(l.getFullYear(),0,1);case 5:return new Date(l.getFullYear()-1,11,31);case 6:return new Date(l.getFullYear()-1,11,30)}}function n(l){var t=l.sb;for(l=new Date((new Date(l.tb+1900,0,1)).getTime());0<t;){var v=l.getMonth(),B=(Dc(l.getFullYear())?Ec:Fc)[v];if(t>B-l.getDate())t-=B-l.getDate()+1,l.setDate(1),11>v?l.setMonth(v+1):(l.setMonth(0),l.setFullYear(l.getFullYear()+1));else{l.setDate(l.getDate()+t);break}}v=new Date(l.getFullYear()+1,0,4);t=h(new Date(l.getFullYear(),
-0,4));v=h(v);return 0>=k(t,l)?0>=k(v,l)?l.getFullYear()+1:l.getFullYear():l.getFullYear()-1}var q=D[d+40>>2];d={Sd:D[d>>2],Rd:D[d+4>>2],Sb:D[d+8>>2],qc:D[d+12>>2],Tb:D[d+16>>2],tb:D[d+20>>2],gb:D[d+24>>2],sb:D[d+28>>2],ge:D[d+32>>2],Qd:D[d+36>>2],Td:q?y(q):""};c=y(c);q={"%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 p in q)c=c.replace(new RegExp(p,"g"),q[p]);var r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),w="January February March April May June July August September October November December".split(" ");q={"%a":function(l){return r[l.gb].substring(0,3)},"%A":function(l){return r[l.gb]},"%b":function(l){return w[l.Tb].substring(0,3)},"%B":function(l){return w[l.Tb]},
-"%C":function(l){return g((l.tb+1900)/100|0,2)},"%d":function(l){return g(l.qc,2)},"%e":function(l){return f(l.qc,2," ")},"%g":function(l){return n(l).toString().substring(2)},"%G":function(l){return n(l)},"%H":function(l){return g(l.Sb,2)},"%I":function(l){l=l.Sb;0==l?l=12:12<l&&(l-=12);return g(l,2)},"%j":function(l){for(var t=0,v=0;v<=l.Tb-1;t+=(Dc(l.tb+1900)?Ec:Fc)[v++]);return g(l.qc+t,3)},"%m":function(l){return g(l.Tb+1,2)},"%M":function(l){return g(l.Rd,2)},"%n":function(){return"\n"},"%p":function(l){return 0<=
-l.Sb&&12>l.Sb?"AM":"PM"},"%S":function(l){return g(l.Sd,2)},"%t":function(){return"\t"},"%u":function(l){return l.gb||7},"%U":function(l){return g(Math.floor((l.sb+7-l.gb)/7),2)},"%V":function(l){var t=Math.floor((l.sb+7-(l.gb+6)%7)/7);2>=(l.gb+371-l.sb-2)%7&&t++;if(t)53==t&&(v=(l.gb+371-l.sb)%7,4==v||3==v&&Dc(l.tb)||(t=1));else{t=52;var v=(l.gb+7-l.sb-1)%7;(4==v||5==v&&Dc(l.tb%400-1))&&t++}return g(t,2)},"%w":function(l){return l.gb},"%W":function(l){return g(Math.floor((l.sb+7-(l.gb+6)%7)/7),2)},
-"%y":function(l){return(l.tb+1900).toString().substring(2)},"%Y":function(l){return l.tb+1900},"%z":function(l){l=l.Qd;var t=0<=l;l=Math.abs(l)/60;return(t?"+":"-")+String("0000"+(l/60*100+l%60)).slice(-4)},"%Z":function(l){return l.Td},"%%":function(){return"%"}};c=c.replace(/%%/g,"\x00\x00");for(p in q)c.includes(p)&&(c=c.replace(new RegExp(p,"g"),q[p](d)));c=c.replace(/\0\0/g,"%");p=Wa(c,!1);if(p.length>b)return 0;A.set(p,a);return p.length-1}
-function Hc(a,b,c,d){a||(a=this);this.parent=a;this.Qa=a.Qa;this.Db=null;this.id=N.Bd++;this.name=b;this.mode=c;this.Ia={};this.Ka={};this.rdev=d}Object.defineProperties(Hc.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},wd:{get:function(){return N.Sa(this.mode)}},ec:{get:function(){return N.Lb(this.mode)}}});N.Pc=Hc;N.Pd();var eb;
-e.FS_createPath=N.xc;e.FS_createDataFile=N.Jb;e.FS_createPreloadedFile=N.yc;e.FS_unlink=N.unlink;e.FS_createLazyFile=N.wc;e.FS_createDevice=N.$a;sb=e.InternalError=rb("InternalError");for(var Ic=Array(256),Jc=0;256>Jc;++Jc)Ic[Jc]=String.fromCharCode(Jc);wb=Ic;xb=e.BindingError=rb("BindingError");
-U.prototype.isAliasOf=function(a){if(!(this instanceof U&&a instanceof U))return!1;var b=this.Ha.Ra.Na,c=this.Ha.La,d=a.Ha.Ra.Na;for(a=a.Ha.La;b.Za;)c=b.Gb(c),b=b.Za;for(;d.Za;)a=d.Gb(a),d=d.Za;return b===d&&c===a};
-U.prototype.clone=function(){this.Ha.La||yb(this);if(this.Ha.Fb)return this.Ha.count.value+=1,this;var a=Kb,b=Object,c=b.create,d=Object.getPrototypeOf(this),f=this.Ha;a=a(c.call(b,d,{Ha:{value:{count:f.count,ub:f.ub,Fb:f.Fb,La:f.La,Ra:f.Ra,Va:f.Va,Ya:f.Ya}}}));a.Ha.count.value+=1;a.Ha.ub=!1;return a};U.prototype["delete"]=function(){this.Ha.La||yb(this);this.Ha.ub&&!this.Ha.Fb&&T("Object already scheduled for deletion");Ab(this);Bb(this.Ha);this.Ha.Fb||(this.Ha.Va=void 0,this.Ha.La=void 0)};
-U.prototype.isDeleted=function(){return!this.Ha.La};U.prototype.deleteLater=function(){this.Ha.La||yb(this);this.Ha.ub&&!this.Ha.Fb&&T("Object already scheduled for deletion");Eb.push(this);1===Eb.length&&Gb&&Gb(Fb);this.Ha.ub=!0;return this};e.getInheritedInstanceCount=function(){return Object.keys(Hb).length};e.getLiveInheritedInstances=function(){var a=[],b;for(b in Hb)Hb.hasOwnProperty(b)&&a.push(Hb[b]);return a};e.flushPendingDeletes=Fb;e.setDelayFunction=function(a){Gb=a;Eb.length&&Gb&&Gb(Fb)};
-V.prototype.rd=function(a){this.Nc&&(a=this.Nc(a));return a};V.prototype.Bc=function(a){this.jb&&this.jb(a)};V.prototype.argPackAdvance=8;V.prototype.readValueFromPointer=lb;V.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
-V.prototype.fromWireType=function(a){function b(){return this.Ob?Jb(this.Na.wb,{Ra:this.Gd,La:c,Ya:this,Va:a}):Jb(this.Na.wb,{Ra:this,La:a})}var c=this.rd(a);if(!c)return this.Bc(a),null;var d=Ib(this.Na,c);if(void 0!==d){if(0===d.Ha.count.value)return d.Ha.La=c,d.Ha.Va=a,d.clone();d=d.clone();this.Bc(a);return d}d=this.Na.pd(c);d=Db[d];if(!d)return b.call(this);d=this.Mb?d.bd:d.pointerType;var f=Cb(c,this.Na,d.Na);return null===f?b.call(this):this.Ob?Jb(d.Na.wb,{Ra:d,La:f,Ya:this,Va:a}):Jb(d.Na.wb,
-{Ra:d,La:f})};Wb=e.UnboundTypeError=rb("UnboundTypeError");e.count_emval_handles=function(){for(var a=0,b=5;b<Y.length;++b)void 0!==Y[b]&&++a;return a};e.get_first_emval=function(){for(var a=5;a<Y.length;++a)if(void 0!==Y[a])return Y[a];return null};
-var Lc={a:function(a){return wc(a+24)+24},b:function(a,b,c){(new Oa(a)).vb(b,c);Pa++;throw a;},Y:function(a,b){try{return a=y(a),N.chmod(a,b),0}catch(c){if("undefined"==typeof N||!(c instanceof N.Ga))throw c;return-c.Ma}},aa:function(a,b,c){try{b=y(b);b=P(a,b);if(c&-8)return-28;var d=N.Oa(b,{Xa:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&N.mb(d,a)?-2:0}catch(f){if("undefined"==typeof N||!(f instanceof N.Ga))throw f;return-f.Ma}},Z:function(a,b){try{return N.fchmod(a,
-b),0}catch(c){if("undefined"==typeof N||!(c instanceof N.Ga))throw c;return-c.Ma}},X:function(a,b,c){try{return N.fchown(a,b,c),0}catch(d){if("undefined"==typeof N||!(d instanceof N.Ga))throw d;return-d.Ma}},e:function(a,b,c){gb=c;try{var d=Q(a);switch(b){case 0:var f=hb();return 0>f?-28:N.zc(d,f).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return f=hb(),d.flags|=f,0;case 5:return f=hb(),C[f+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return D[Kc()>>2]=28,-1;default:return-28}}catch(g){if("undefined"==
-typeof N||!(g instanceof N.Ga))throw g;return-g.Ma}},W:function(a,b){try{var c=Q(a);return fb(N.stat,c.path,b)}catch(d){if("undefined"==typeof N||!(d instanceof N.Ga))throw d;return-d.Ma}},B:function(a,b,c){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return-61;N.od(a,b);return 0}catch(d){if("undefined"==typeof N||!(d instanceof N.Ga))throw d;return-d.Ma}},R:function(a,b){try{if(0===b)return-28;var c=N.cwd(),d=ua(c)+1;if(b<d)return-68;ta(c,z,a,b);return d}catch(f){if("undefined"==
-typeof N||!(f instanceof N.Ga))throw f;return-f.Ma}},G:function(a,b,c){gb=c;try{var d=Q(a);switch(b){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?0:-59;case 21519:if(!d.tty)return-59;var f=hb();return D[f>>2]=0;case 21520:return d.tty?-28:-59;case 21531:return f=hb(),N.dc(d,b,f);case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:x("bad ioctl syscall "+b)}}catch(g){if("undefined"==typeof N||!(g instanceof N.Ga))throw g;
-return-g.Ma}},U:function(a,b){try{return a=y(a),fb(N.lstat,a,b)}catch(c){if("undefined"==typeof N||!(c instanceof N.Ga))throw c;return-c.Ma}},O:function(a,b,c){try{return b=y(b),b=P(a,b),b=L(b),"/"===b[b.length-1]&&(b=b.substr(0,b.length-1)),N.mkdir(b,c,0),0}catch(d){if("undefined"==typeof N||!(d instanceof N.Ga))throw d;return-d.Ma}},T:function(a,b,c,d){try{b=y(b);var f=d&256;b=P(a,b,d&4096);return fb(f?N.lstat:N.stat,b,c)}catch(g){if("undefined"==typeof N||!(g instanceof N.Ga))throw g;return-g.Ma}},
-s:function(a,b,c,d){gb=d;try{b=y(b);b=P(a,b);var f=d?hb():0;return N.open(b,c,f).fd}catch(g){if("undefined"==typeof N||!(g instanceof N.Ga))throw g;return-g.Ma}},L:function(a,b,c,d){try{b=y(b);b=P(a,b);if(0>=d)return-28;var f=N.readlink(b),g=Math.min(d,ua(f)),k=A[c+g];ta(f,z,c,d+1);A[c+g]=k;return g}catch(h){if("undefined"==typeof N||!(h instanceof N.Ga))throw h;return-h.Ma}},K:function(a,b,c,d){try{return b=y(b),d=y(d),b=P(a,b),d=P(c,d),N.rename(b,d),0}catch(f){if("undefined"==typeof N||!(f instanceof
-N.Ga))throw f;return-f.Ma}},p:function(a){try{return a=y(a),N.rmdir(a),0}catch(b){if("undefined"==typeof N||!(b instanceof N.Ga))throw b;return-b.Ma}},V:function(a,b){try{return a=y(a),fb(N.stat,a,b)}catch(c){if("undefined"==typeof N||!(c instanceof N.Ga))throw c;return-c.Ma}},q:function(a,b,c){try{return b=y(b),b=P(a,b),0===c?N.unlink(b):512===c?N.rmdir(b):x("Invalid flags passed to unlinkat"),0}catch(d){if("undefined"==typeof N||!(d instanceof N.Ga))throw d;return-d.Ma}},I:function(a,b,c){try{b=
-y(b);b=P(a,b,!0);if(c){var d=ib(c),f=D[c+8>>2];g=1E3*d+f/1E6;c+=16;d=ib(c);f=D[c+8>>2];k=1E3*d+f/1E6}else var g=Date.now(),k=g;N.Vd(b,g,k);return 0}catch(h){if("undefined"==typeof N||!(h instanceof N.Ga))throw h;return-h.Ma}},h:function(a){var b=jb[a];delete jb[a];var c=b.lc,d=b.jb,f=b.Fc,g=f.map(k=>k.td).concat(f.map(k=>k.Md));ub([a],g,k=>{var h={};f.forEach((n,q)=>{var p=k[q],r=n.Kb,w=n.sd,l=k[q+f.length],t=n.Ld,v=n.Nd;h[n.ld]={read:B=>p.fromWireType(r(w,B)),write:(B,K)=>{var H=[];t(v,B,l.toWireType(H,
-K));kb(H)}}});return[{name:b.name,fromWireType:function(n){var q={},p;for(p in h)q[p]=h[p].read(n);d(n);return q},toWireType:function(n,q){for(var p in h)if(!(p in q))throw new TypeError('Missing field: "'+p+'"');var r=c();for(p in h)h[p].write(r,q[p]);null!==n&&n.push(d,r);return r},argPackAdvance:8,readValueFromPointer:lb,ab:d}]})},C:function(){},ca:function(a,b,c,d,f){var g=vb(c);b=S(b);R(a,{name:b,fromWireType:function(k){return!!k},toWireType:function(k,h){return h?d:f},argPackAdvance:8,readValueFromPointer:function(k){if(1===
-c)var h=A;else if(2===c)h=C;else if(4===c)h=D;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[k>>g])},ab:null})},F:function(a,b,c,d,f,g,k,h,n,q,p,r,w){p=S(p);g=W(f,g);h&&(h=W(k,h));q&&(q=W(n,q));w=W(r,w);var l=pb(p);Mb(l,function(){Zb("Cannot construct "+p+" due to unbound types",[d])});ub([a,b,c],d?[d]:[],function(t){t=t[0];if(d){var v=t.Na;var B=v.wb}else B=U.prototype;t=qb(l,function(){if(Object.getPrototypeOf(this)!==K)throw new xb("Use 'new' to construct "+
-p);if(void 0===H.nb)throw new xb(p+" has no accessible constructor");var I=H.nb[arguments.length];if(void 0===I)throw new xb("Tried to invoke ctor of "+p+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(H.nb).toString()+") parameters instead!");return I.apply(this,arguments)});var K=Object.create(B,{constructor:{value:t}});t.prototype=K;var H=new Nb(p,t,K,w,v,g,h,q);v=new V(p,H,!0,!1);B=new V(p+"*",H,!1,!1);var Ga=new V(p+" const*",H,!1,!0);Db[a]={pointerType:B,
-bd:Ga};Ub(l,t);return[v,B,Ga]})},z:function(a,b,c,d,f,g){0<b||x();var k=$b(b,c);f=W(d,f);ub([],[a],function(h){h=h[0];var n="constructor "+h.name;void 0===h.Na.nb&&(h.Na.nb=[]);if(void 0!==h.Na.nb[b-1])throw new xb("Cannot register multiple constructors with identical number of parameters ("+(b-1)+") for class '"+h.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");h.Na.nb[b-1]=()=>{Zb("Cannot construct "+h.name+" due to unbound types",k)};
-ub([],k,function(q){q.splice(1,0,null);h.Na.nb[b-1]=bc(n,q,null,f,g);return[]});return[]})},d:function(a,b,c,d,f,g,k,h){var n=$b(c,d);b=S(b);g=W(f,g);ub([],[a],function(q){function p(){Zb("Cannot call "+r+" due to unbound types",n)}q=q[0];var r=q.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);h&&q.Na.Hd.push(b);var w=q.Na.wb,l=w[b];void 0===l||void 0===l.Ua&&l.className!==q.name&&l.Ib===c-2?(p.Ib=c-2,p.className=q.name,w[b]=p):(Lb(w,b,r),w[b].Ua[c-2]=p);ub([],n,function(t){t=bc(r,t,q,g,
-k);void 0===w[b].Ua?(t.Ib=c-2,w[b]=t):w[b].Ua[c-2]=t;return[]});return[]})},ba:function(a,b){b=S(b);R(a,{name:b,fromWireType:function(c){var d=ec(c);dc(c);return d},toWireType:function(c,d){return Sb(d)},argPackAdvance:8,readValueFromPointer:lb,ab:null})},v:function(a,b,c){c=vb(c);b=S(b);R(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){return f},argPackAdvance:8,readValueFromPointer:fc(b,c),ab:null})},da:function(a,b,c,d,f,g){var k=$b(b,c);a=S(a);f=W(d,f);Mb(a,function(){Zb("Cannot call "+
-a+" due to unbound types",k)},b-1);ub([],k,function(h){h=[h[0],null].concat(h.slice(1));Ub(a,bc(a,h,null,f,g),b-1);return[]})},g:function(a,b,c,d,f){b=S(b);-1===f&&(f=4294967295);f=vb(c);var g=h=>h;if(0===d){var k=32-8*c;g=h=>h<<k>>>k}c=b.includes("unsigned")?function(h,n){return n>>>0}:function(h,n){return n};R(a,{name:b,fromWireType:g,toWireType:c,argPackAdvance:8,readValueFromPointer:gc(b,f,0!==d),ab:null})},c:function(a,b,c){function d(g){g>>=2;var k=E;return new f(va,k[g+1],k[g])}var f=[Int8Array,
-Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);R(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{ud:!0})},w:function(a,b){b=S(b);var c="std::string"===b;R(a,{name:b,fromWireType:function(d){var f=E[d>>2],g=d+4;if(c)for(var k=g,h=0;h<=f;++h){var n=g+h;if(h==f||0==z[n]){k=y(k,n-k);if(void 0===q)var q=k;else q+=String.fromCharCode(0),q+=k;k=n+1}}else{q=Array(f);for(h=0;h<f;++h)q[h]=String.fromCharCode(z[g+h]);q=q.join("")}X(d);return q},
-toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"==typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||T("Cannot pass non-string to std::string");var k=c&&g?ua(f):f.length;var h=wc(4+k+1),n=h+4;E[h>>2]=k;if(c&&g)ta(f,z,n,k+1);else if(g)for(g=0;g<k;++g){var q=f.charCodeAt(g);255<q&&(X(n),T("String has UTF-16 code units that do not fit in 8 bits"));z[n+g]=q}else for(g=0;g<k;++g)z[n+g]=f[g];null!==d&&d.push(X,h);return h},
-argPackAdvance:8,readValueFromPointer:lb,ab:function(d){X(d)}})},n:function(a,b,c){c=S(c);if(2===b){var d=ic;var f=jc;var g=kc;var k=()=>wa;var h=1}else 4===b&&(d=lc,f=mc,g=nc,k=()=>E,h=2);R(a,{name:c,fromWireType:function(n){for(var q=E[n>>2],p=k(),r,w=n+4,l=0;l<=q;++l){var t=n+4+l*b;if(l==q||0==p[t>>h])w=d(w,t-w),void 0===r?r=w:(r+=String.fromCharCode(0),r+=w),w=t+b}X(n);return r},toWireType:function(n,q){"string"!=typeof q&&T("Cannot pass non-string to C++ string type "+c);var p=g(q),r=wc(4+p+
-b);E[r>>2]=p>>h;f(q,r+4,p+b);null!==n&&n.push(X,r);return r},argPackAdvance:8,readValueFromPointer:lb,ab:function(n){X(n)}})},i:function(a,b,c,d,f,g){jb[a]={name:S(b),lc:W(c,d),jb:W(f,g),Fc:[]}},f:function(a,b,c,d,f,g,k,h,n,q){jb[a].Fc.push({ld:S(b),td:c,Kb:W(d,f),sd:g,Md:k,Ld:W(h,n),Nd:q})},ea:function(a,b){b=S(b);R(a,{xd:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},u:function(){return Date.now()},x:function(a,b,c){a=ec(a);b=oc(b,"emval::as");var d=[],f=Sb(d);E[c>>
-2]=f;return b.toWireType(d,a)},ja:function(a,b,c,d){a=rc[a];b=ec(b);c=qc(c);a(b,c,null,d)},ha:dc,ia:function(a,b){var c=tc(a,b),d=c[0];b=d.name+"_$"+c.slice(1).map(function(p){return p.name}).join("_")+"$";var f=uc[b];if(void 0!==f)return f;f=["retType"];for(var g=[d],k="",h=0;h<a-1;++h)k+=(0!==h?", ":"")+"arg"+h,f.push("argType"+h),g.push(c[1+h]);var n="return function "+pb("methodCaller_"+b)+"(handle, name, destructors, args) {\n",q=0;for(h=0;h<a-1;++h)n+=" var arg"+h+" = argType"+h+".readValueFromPointer(args"+
-(q?"+"+q:"")+");\n",q+=c[h+1].argPackAdvance;n+=" var rv = handle[name]("+k+");\n";for(h=0;h<a-1;++h)c[h+1].deleteObject&&(n+=" argType"+h+".deleteObject(arg"+h+");\n");d.xd||(n+=" return retType.toWireType(destructors, rv);\n");f.push(n+"};\n");a=ac(f).apply(null,g);f=sc(a);return uc[b]=f},y:function(a,b){a=ec(a);b=ec(b);return Sb(a[b])},la:function(a){4<a&&(Y[a].oc+=1)},ka:function(){return Sb([])},ga:function(a){return Sb(qc(a))},fa:function(a){var b=ec(a);kb(b);dc(a)},l:function(a,b){a=
-oc(a,"_emval_take_value");a=a.readValueFromPointer(b);return Sb(a)},_:function(a,b){a=new Date(1E3*ib(a));D[b>>2]=a.getSeconds();D[b+4>>2]=a.getMinutes();D[b+8>>2]=a.getHours();D[b+12>>2]=a.getDate();D[b+16>>2]=a.getMonth();D[b+20>>2]=a.getFullYear()-1900;D[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);D[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;D[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();D[b+32>>2]=(d!=c&&a.getTimezoneOffset()==
-Math.min(c,d))|0},M:function(a,b,c,d,f,g){try{var k=N.lb(d);if(!k)return-8;var h=N.qb(k,a,f,b,c),n=h.La;D[g>>2]=h.tc;return n}catch(q){if("undefined"==typeof N||!(q instanceof N.Ga))throw q;return-q.Ma}},N:function(a,b,c,d,f,g){try{var k=N.lb(f);if(k&&c&2){var h=z.slice(a,a+b);N.yb(k,h,g,b,d)}}catch(n){if("undefined"==typeof N||!(n instanceof N.Ga))throw n;return-n.Ma}},$:yc,j:function(){x("")},J:function(){return 2147483648},t:zc,m:function(a){var b=z.length;a>>>=0;if(2147483648<a)return!1;for(var c=
-1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var f=Math;d=Math.max(a,d);f=f.min.call(f,2147483648,d+(65536-d%65536)%65536);a:{try{pa.grow(f-va.byteLength+65535>>>16);za();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1},P:function(a,b){var c=0;Bc().forEach(function(d,f){var g=b+c;f=E[a+4*f>>2]=g;for(g=0;g<d.length;++g)A[f++>>0]=d.charCodeAt(g);A[f>>0]=0;c+=d.length+1});return 0},Q:function(a,b){var c=Bc();E[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});E[b>>2]=
-d;return 0},k:function(a){try{var b=Q(a);N.close(b);return 0}catch(c){if("undefined"==typeof N||!(c instanceof N.Ga))throw c;return c.Ma}},H:function(a,b){try{var c=Q(a);A[b>>0]=c.tty?2:N.Sa(c.mode)?3:N.xb(c.mode)?7:4;return 0}catch(d){if("undefined"==typeof N||!(d instanceof N.Ga))throw d;return d.Ma}},r:function(a,b,c,d){try{a:{var f=Q(a);a=b;for(var g=b=0;g<c;g++){var k=E[a>>2],h=E[a+4>>2];a+=8;var n=N.read(f,A,k,h,void 0);if(0>n){var q=-1;break a}b+=n;if(n<h)break}q=b}D[d>>2]=q;return 0}catch(p){if("undefined"==
-typeof N||!(p instanceof N.Ga))throw p;return p.Ma}},A:function(a,b,c,d,f){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return 61;var g=Q(a);N.cb(g,b,d);J=[g.position>>>0,(G=g.position,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];D[f>>2]=J[0];D[f+4>>2]=J[1];g.ac&&0===b&&0===d&&(g.ac=null);return 0}catch(k){if("undefined"==typeof N||!(k instanceof N.Ga))throw k;return k.Ma}},S:function(a){try{var b=
-Q(a);return b.Ka&&b.Ka.fsync?-b.Ka.fsync(b):0}catch(c){if("undefined"==typeof N||!(c instanceof N.Ga))throw c;return c.Ma}},o:function(a,b,c,d){try{a:{var f=Q(a);a=b;for(var g=b=0;g<c;g++){var k=E[a>>2],h=E[a+4>>2];a+=8;var n=N.write(f,A,k,h,void 0);if(0>n){var q=-1;break a}b+=n}q=b}E[d>>2]=q;return 0}catch(p){if("undefined"==typeof N||!(p instanceof N.Ga))throw p;return p.Ma}},D:function(){},E:function(a,b,c,d){return Gc(a,b,c,d)}},Z=function(){function a(c){e.asm=c.exports;pa=e.asm.ma;za();Aa=e.asm.ra;
-Ca.unshift(e.asm.na);Ja("wasm-instantiate")}var b={a:Lc};Ia("wasm-instantiate");if(e.instantiateWasm)try{return e.instantiateWasm(b,a)}catch(c){return u("Module.instantiateWasm callback failed with error: "+c),!1}b=Ma(b);a(b[0]);return e.asm}();e.___wasm_call_ctors=Z.na;var Kc=e.___errno_location=Z.oa,wc=e._malloc=Z.pa,X=e._free=Z.qa,Yb=e.___getTypeName=Z.sa;e.___embind_register_native_and_builtin_types=Z.ta;var cb=e._emscripten_builtin_memalign=Z.ua;e.___cxa_is_pointer_type=Z.va;
-e.dynCall_iiiij=Z.wa;e.dynCall_iij=Z.xa;e.dynCall_iijii=Z.ya;e.dynCall_iiji=Z.za;e.dynCall_iiiiiij=Z.Aa;e.dynCall_jiji=Z.Ba;e.dynCall_viijii=Z.Ca;e.dynCall_iiiiij=Z.Da;e.dynCall_iiiiijj=Z.Ea;e.dynCall_iiiiiijj=Z.Fa;e.addRunDependency=Ia;e.removeRunDependency=Ja;e.FS_createPath=N.xc;e.FS_createDataFile=N.Jb;e.FS_createPreloadedFile=N.yc;e.FS_createLazyFile=N.wc;e.FS_createDevice=N.$a;e.FS_unlink=N.unlink;e.FS=N;var Mc;Ha=function Nc(){Mc||Oc();Mc||(Ha=Nc)};
-function Oc(){function a(){if(!Mc&&(Mc=!0,e.calledRun=!0,!qa)){e.noFSInit||N.vb.cc||N.vb();N.Lc=!1;Na(Ca);aa(e);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();Da.unshift(b)}Na(Da)}}if(!(0<F)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)Ea();Na(Ba);0<F||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},
+function Gc(a,b,c,d){function f(l,u,w){for(l="number"==typeof l?l.toString():l||"";l.length<u;)l=w[0]+l;return l}function g(l,u){return f(l,u,"0")}function k(l,u){function w(K){return 0>K?-1:0<K?1:0}var C;0===(C=w(l.getFullYear()-u.getFullYear()))&&0===(C=w(l.getMonth()-u.getMonth()))&&(C=w(l.getDate()-u.getDate()));return C}function h(l){switch(l.getDay()){case 0:return new Date(l.getFullYear()-1,11,29);case 1:return l;case 2:return new Date(l.getFullYear(),0,3);case 3:return new Date(l.getFullYear(),
+0,2);case 4:return new Date(l.getFullYear(),0,1);case 5:return new Date(l.getFullYear()-1,11,31);case 6:return new Date(l.getFullYear()-1,11,30)}}function n(l){var u=l.zb;for(l=new Date((new Date(l.Ab+1900,0,1)).getTime());0<u;){var w=l.getMonth(),C=(Dc(l.getFullYear())?Ec:Fc)[w];if(u>C-l.getDate())u-=C-l.getDate()+1,l.setDate(1),11>w?l.setMonth(w+1):(l.setMonth(0),l.setFullYear(l.getFullYear()+1));else{l.setDate(l.getDate()+u);break}}w=new Date(l.getFullYear()+1,0,4);u=h(new Date(l.getFullYear(),
+0,4));w=h(w);return 0>=k(u,l)?0>=k(w,l)?l.getFullYear()+1:l.getFullYear():l.getFullYear()-1}var q=E[d+40>>2];d={Xd:E[d>>2],Wd:E[d+4>>2],Yb:E[d+8>>2],vc:E[d+12>>2],Zb:E[d+16>>2],Ab:E[d+20>>2],mb:E[d+24>>2],zb:E[d+28>>2],le:E[d+32>>2],Vd:E[d+36>>2],Yd:q?y(q):""};c=y(c);q={"%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 p in q)c=c.replace(new RegExp(p,"g"),q[p]);var t="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),x="January February March April May June July August September October November December".split(" ");q={"%a":function(l){return t[l.mb].substring(0,3)},"%A":function(l){return t[l.mb]},"%b":function(l){return x[l.Zb].substring(0,3)},"%B":function(l){return x[l.Zb]},
+"%C":function(l){return g((l.Ab+1900)/100|0,2)},"%d":function(l){return g(l.vc,2)},"%e":function(l){return f(l.vc,2," ")},"%g":function(l){return n(l).toString().substring(2)},"%G":function(l){return n(l)},"%H":function(l){return g(l.Yb,2)},"%I":function(l){l=l.Yb;0==l?l=12:12<l&&(l-=12);return g(l,2)},"%j":function(l){for(var u=0,w=0;w<=l.Zb-1;u+=(Dc(l.Ab+1900)?Ec:Fc)[w++]);return g(l.vc+u,3)},"%m":function(l){return g(l.Zb+1,2)},"%M":function(l){return g(l.Wd,2)},"%n":function(){return"\n"},"%p":function(l){return 0<=
+l.Yb&&12>l.Yb?"AM":"PM"},"%S":function(l){return g(l.Xd,2)},"%t":function(){return"\t"},"%u":function(l){return l.mb||7},"%U":function(l){return g(Math.floor((l.zb+7-l.mb)/7),2)},"%V":function(l){var u=Math.floor((l.zb+7-(l.mb+6)%7)/7);2>=(l.mb+371-l.zb-2)%7&&u++;if(u)53==u&&(w=(l.mb+371-l.zb)%7,4==w||3==w&&Dc(l.Ab)||(u=1));else{u=52;var w=(l.mb+7-l.zb-1)%7;(4==w||5==w&&Dc(l.Ab%400-1))&&u++}return g(u,2)},"%w":function(l){return l.mb},"%W":function(l){return g(Math.floor((l.zb+7-(l.mb+6)%7)/7),2)},
+"%y":function(l){return(l.Ab+1900).toString().substring(2)},"%Y":function(l){return l.Ab+1900},"%z":function(l){l=l.Vd;var u=0<=l;l=Math.abs(l)/60;return(u?"+":"-")+String("0000"+(l/60*100+l%60)).slice(-4)},"%Z":function(l){return l.Yd},"%%":function(){return"%"}};c=c.replace(/%%/g,"\x00\x00");for(p in q)c.includes(p)&&(c=c.replace(new RegExp(p,"g"),q[p](d)));c=c.replace(/\0\0/g,"%");p=Wa(c,!1);if(p.length>b)return 0;B.set(p,a);return p.length-1}
+function Hc(a,b,c,d){a||(a=this);this.parent=a;this.Va=a.Va;this.Kb=null;this.id=N.Gd++;this.name=b;this.mode=c;this.Na={};this.Pa={};this.rdev=d}Object.defineProperties(Hc.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Bd:{get:function(){return N.Xa(this.mode)}},kc:{get:function(){return N.Ib(this.mode)}}});N.Uc=Hc;N.Ud();var eb;
+e.FS_createPath=N.Cc;e.FS_createDataFile=N.Qb;e.FS_createPreloadedFile=N.Dc;e.FS_unlink=N.unlink;e.FS_createLazyFile=N.Bc;e.FS_createDevice=N.gb;sb=e.InternalError=rb("InternalError");for(var Ic=Array(256),Jc=0;256>Jc;++Jc)Ic[Jc]=String.fromCharCode(Jc);wb=Ic;xb=e.BindingError=rb("BindingError");
+U.prototype.isAliasOf=function(a){if(!(this instanceof U&&a instanceof U))return!1;var b=this.Ma.Wa.Sa,c=this.Ma.Ra,d=a.Ma.Wa.Sa;for(a=a.Ma.Ra;b.fb;)c=b.Nb(c),b=b.fb;for(;d.fb;)a=d.Nb(a),d=d.fb;return b===d&&c===a};
+U.prototype.clone=function(){this.Ma.Ra||yb(this);if(this.Ma.Mb)return this.Ma.count.value+=1,this;var a=Kb,b=Object,c=b.create,d=Object.getPrototypeOf(this),f=this.Ma;a=a(c.call(b,d,{Ma:{value:{count:f.count,Bb:f.Bb,Mb:f.Mb,Ra:f.Ra,Wa:f.Wa,$a:f.$a,eb:f.eb}}}));a.Ma.count.value+=1;a.Ma.Bb=!1;return a};U.prototype["delete"]=function(){this.Ma.Ra||yb(this);this.Ma.Bb&&!this.Ma.Mb&&T("Object already scheduled for deletion");Ab(this);Bb(this.Ma);this.Ma.Mb||(this.Ma.$a=void 0,this.Ma.Ra=void 0)};
+U.prototype.isDeleted=function(){return!this.Ma.Ra};U.prototype.deleteLater=function(){this.Ma.Ra||yb(this);this.Ma.Bb&&!this.Ma.Mb&&T("Object already scheduled for deletion");Eb.push(this);1===Eb.length&&Gb&&Gb(Fb);this.Ma.Bb=!0;return this};e.getInheritedInstanceCount=function(){return Object.keys(Hb).length};e.getLiveInheritedInstances=function(){var a=[],b;for(b in Hb)Hb.hasOwnProperty(b)&&a.push(Hb[b]);return a};e.flushPendingDeletes=Fb;e.setDelayFunction=function(a){Gb=a;Eb.length&&Gb&&Gb(Fb)};
+V.prototype.wd=function(a){this.Sc&&(a=this.Sc(a));return a};V.prototype.Gc=function(a){this.ob&&this.ob(a)};V.prototype.argPackAdvance=8;V.prototype.readValueFromPointer=lb;V.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};
+V.prototype.fromWireType=function(a){function b(){return this.Ub?Jb(this.Sa.Db,{Wa:this.Ld,Ra:c,eb:this,$a:a}):Jb(this.Sa.Db,{Wa:this,Ra:a})}var c=this.wd(a);if(!c)return this.Gc(a),null;var d=Ib(this.Sa,c);if(void 0!==d){if(0===d.Ma.count.value)return d.Ma.Ra=c,d.Ma.$a=a,d.clone();d=d.clone();this.Gc(a);return d}d=this.Sa.ud(c);d=Db[d];if(!d)return b.call(this);d=this.Sb?d.hd:d.pointerType;var f=Cb(c,this.Sa,d.Sa);return null===f?b.call(this):this.Ub?Jb(d.Sa.Db,{Wa:d,Ra:f,eb:this,$a:a}):Jb(d.Sa.Db,
+{Wa:d,Ra:f})};Wb=e.UnboundTypeError=rb("UnboundTypeError");e.count_emval_handles=function(){for(var a=0,b=5;b<Y.length;++b)void 0!==Y[b]&&++a;return a};e.get_first_emval=function(){for(var a=5;a<Y.length;++a)if(void 0!==Y[a])return Y[a];return null};
+var Lc={a:function(a){return wc(a+24)+24},b:function(a,b,c){(new Oa(a)).Cb(b,c);Pa++;throw a;},Z:function(a,b){try{return a=y(a),N.chmod(a,b),0}catch(c){if("undefined"==typeof N||!(c instanceof N.La))throw c;return-c.Qa}},ca:function(a,b,c){try{b=y(b);b=P(a,b);if(c&-8)return-28;var d=N.Ta(b,{cb:!0}).node;if(!d)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&N.rb(d,a)?-2:0}catch(f){if("undefined"==typeof N||!(f instanceof N.La))throw f;return-f.Qa}},_:function(a,b){try{return N.fchmod(a,
+b),0}catch(c){if("undefined"==typeof N||!(c instanceof N.La))throw c;return-c.Qa}},Y:function(a,b,c){try{return N.fchown(a,b,c),0}catch(d){if("undefined"==typeof N||!(d instanceof N.La))throw d;return-d.Qa}},e:function(a,b,c){gb=c;try{var d=Q(a);switch(b){case 0:var f=hb();return 0>f?-28:N.Ec(d,f).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return f=hb(),d.flags|=f,0;case 5:return f=hb(),D[f+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return E[Kc()>>2]=28,-1;default:return-28}}catch(g){if("undefined"==
+typeof N||!(g instanceof N.La))throw g;return-g.Qa}},W:function(a,b){try{var c=Q(a);return fb(N.stat,c.path,b)}catch(d){if("undefined"==typeof N||!(d instanceof N.La))throw d;return-d.Qa}},z:function(a,b,c){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return-61;N.td(a,b);return 0}catch(d){if("undefined"==typeof N||!(d instanceof N.La))throw d;return-d.Qa}},R:function(a,b){try{if(0===b)return-28;var c=N.cwd(),d=ta(c)+1;if(b<d)return-68;A(c,z,a,b);return d}catch(f){if("undefined"==
+typeof N||!(f instanceof N.La))throw f;return-f.Qa}},L:function(a,b,c){try{var d=Q(a);d.tb||(d.tb=N.readdir(d.path));a=0;for(var f=N.ab(d,0,1),g=Math.floor(f/280);g<d.tb.length&&a+280<=c;){var k=d.tb[g];if("."===k){var h=d.node.id;var n=4}else if(".."===k)h=N.Ta(d.path,{parent:!0}).node.id,n=4;else{var q=N.jb(d.node,k);h=q.id;n=N.Ib(q.mode)?2:N.Xa(q.mode)?4:N.ub(q.mode)?10:8}J=[h>>>0,(G=h,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>
+0:0)];E[b+a>>2]=J[0];E[b+a+4>>2]=J[1];J=[280*(g+1)>>>0,(G=280*(g+1),1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[b+a+8>>2]=J[0];E[b+a+12>>2]=J[1];D[b+a+16>>1]=280;B[b+a+18>>0]=n;A(k,z,b+a+19,256);a+=280;g+=1}N.ab(d,280*g,0);return a}catch(p){if("undefined"==typeof N||!(p instanceof N.La))throw p;return-p.Qa}},X:function(a,b,c){gb=c;try{var d=Q(a);switch(b){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?
+0:-59;case 21519:if(!d.tty)return-59;var f=hb();return E[f>>2]=0;case 21520:return d.tty?-28:-59;case 21531:return f=hb(),N.jc(d,b,f);case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:v("bad ioctl syscall "+b)}}catch(g){if("undefined"==typeof N||!(g instanceof N.La))throw g;return-g.Qa}},U:function(a,b){try{return a=y(a),fb(N.lstat,a,b)}catch(c){if("undefined"==typeof N||!(c instanceof N.La))throw c;return-c.Qa}},O:function(a,b,c){try{return b=y(b),b=P(a,b),b=L(b),"/"===b[b.length-
+1]&&(b=b.substr(0,b.length-1)),N.mkdir(b,c,0),0}catch(d){if("undefined"==typeof N||!(d instanceof N.La))throw d;return-d.Qa}},T:function(a,b,c,d){try{b=y(b);var f=d&256;b=P(a,b,d&4096);return fb(f?N.lstat:N.stat,b,c)}catch(g){if("undefined"==typeof N||!(g instanceof N.La))throw g;return-g.Qa}},r:function(a,b,c,d){gb=d;try{b=y(b);b=P(a,b);var f=d?hb():0;return N.open(b,c,f).fd}catch(g){if("undefined"==typeof N||!(g instanceof N.La))throw g;return-g.Qa}},K:function(a,b,c,d){try{b=y(b);b=P(a,b);if(0>=
+d)return-28;var f=N.readlink(b),g=Math.min(d,ta(f)),k=B[c+g];A(f,z,c,d+1);B[c+g]=k;return g}catch(h){if("undefined"==typeof N||!(h instanceof N.La))throw h;return-h.Qa}},H:function(a,b,c,d){try{return b=y(b),d=y(d),b=P(a,b),d=P(c,d),N.rename(b,d),0}catch(f){if("undefined"==typeof N||!(f instanceof N.La))throw f;return-f.Qa}},I:function(a){try{return a=y(a),N.rmdir(a),0}catch(b){if("undefined"==typeof N||!(b instanceof N.La))throw b;return-b.Qa}},V:function(a,b){try{return a=y(a),fb(N.stat,a,b)}catch(c){if("undefined"==
+typeof N||!(c instanceof N.La))throw c;return-c.Qa}},J:function(a,b,c){try{return b=y(b),b=P(a,b),0===c?N.unlink(b):512===c?N.rmdir(b):v("Invalid flags passed to unlinkat"),0}catch(d){if("undefined"==typeof N||!(d instanceof N.La))throw d;return-d.Qa}},E:function(a,b,c){try{b=y(b);b=P(a,b,!0);if(c){var d=ib(c),f=E[c+8>>2];g=1E3*d+f/1E6;c+=16;d=ib(c);f=E[c+8>>2];k=1E3*d+f/1E6}else var g=Date.now(),k=g;N.$d(b,g,k);return 0}catch(h){if("undefined"==typeof N||!(h instanceof N.La))throw h;return-h.Qa}},
+h:function(a){var b=jb[a];delete jb[a];var c=b.qc,d=b.ob,f=b.Kc,g=f.map(k=>k.yd).concat(f.map(k=>k.Rd));ub([a],g,k=>{var h={};f.forEach((n,q)=>{var p=k[q],t=n.Rb,x=n.xd,l=k[q+f.length],u=n.Qd,w=n.Sd;h[n.qd]={read:C=>p.fromWireType(t(x,C)),write:(C,K)=>{var H=[];u(w,C,l.toWireType(H,K));kb(H)}}});return[{name:b.name,fromWireType:function(n){var q={},p;for(p in h)q[p]=h[p].read(n);d(n);return q},toWireType:function(n,q){for(var p in h)if(!(p in q))throw new TypeError('Missing field: "'+p+'"');var t=
+c();for(p in h)h[p].write(t,q[p]);null!==n&&n.push(d,t);return t},argPackAdvance:8,readValueFromPointer:lb,hb:d}]})},A:function(){},ea:function(a,b,c,d,f){var g=vb(c);b=S(b);R(a,{name:b,fromWireType:function(k){return!!k},toWireType:function(k,h){return h?d:f},argPackAdvance:8,readValueFromPointer:function(k){if(1===c)var h=B;else if(2===c)h=D;else if(4===c)h=E;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[k>>g])},hb:null})},G:function(a,b,c,d,f,g,k,h,n,q,p,
+t,x){p=S(p);g=W(f,g);h&&(h=W(k,h));q&&(q=W(n,q));x=W(t,x);var l=pb(p);Mb(l,function(){Zb("Cannot construct "+p+" due to unbound types",[d])});ub([a,b,c],d?[d]:[],function(u){u=u[0];if(d){var w=u.Sa;var C=w.Db}else C=U.prototype;u=qb(l,function(){if(Object.getPrototypeOf(this)!==K)throw new xb("Use 'new' to construct "+p);if(void 0===H.sb)throw new xb(p+" has no accessible constructor");var I=H.sb[arguments.length];if(void 0===I)throw new xb("Tried to invoke ctor of "+p+" with invalid number of parameters ("+
+arguments.length+") - expected ("+Object.keys(H.sb).toString()+") parameters instead!");return I.apply(this,arguments)});var K=Object.create(C,{constructor:{value:u}});u.prototype=K;var H=new Nb(p,u,K,x,w,g,h,q);w=new V(p,H,!0,!1);C=new V(p+"*",H,!1,!1);var Ga=new V(p+" const*",H,!1,!0);Db[a]={pointerType:C,hd:Ga};Ub(l,u);return[w,C,Ga]})},x:function(a,b,c,d,f,g){0<b||v();var k=$b(b,c);f=W(d,f);ub([],[a],function(h){h=h[0];var n="constructor "+h.name;void 0===h.Sa.sb&&(h.Sa.sb=[]);if(void 0!==h.Sa.sb[b-
+1])throw new xb("Cannot register multiple constructors with identical number of parameters ("+(b-1)+") for class '"+h.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");h.Sa.sb[b-1]=()=>{Zb("Cannot construct "+h.name+" due to unbound types",k)};ub([],k,function(q){q.splice(1,0,null);h.Sa.sb[b-1]=bc(n,q,null,f,g);return[]});return[]})},d:function(a,b,c,d,f,g,k,h){var n=$b(c,d);b=S(b);g=W(f,g);ub([],[a],function(q){function p(){Zb("Cannot call "+
+t+" due to unbound types",n)}q=q[0];var t=q.name+"."+b;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);h&&q.Sa.Md.push(b);var x=q.Sa.Db,l=x[b];void 0===l||void 0===l.Za&&l.className!==q.name&&l.Pb===c-2?(p.Pb=c-2,p.className=q.name,x[b]=p):(Lb(x,b,t),x[b].Za[c-2]=p);ub([],n,function(u){u=bc(t,u,q,g,k);void 0===x[b].Za?(u.Pb=c-2,x[b]=u):x[b].Za[c-2]=u;return[]});return[]})},da:function(a,b){b=S(b);R(a,{name:b,fromWireType:function(c){var d=ec(c);dc(c);return d},toWireType:function(c,d){return Sb(d)},
+argPackAdvance:8,readValueFromPointer:lb,hb:null})},t:function(a,b,c){c=vb(c);b=S(b);R(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){return f},argPackAdvance:8,readValueFromPointer:fc(b,c),hb:null})},ga:function(a,b,c,d,f,g){var k=$b(b,c);a=S(a);f=W(d,f);Mb(a,function(){Zb("Cannot call "+a+" due to unbound types",k)},b-1);ub([],k,function(h){h=[h[0],null].concat(h.slice(1));Ub(a,bc(a,h,null,f,g),b-1);return[]})},g:function(a,b,c,d,f){b=S(b);-1===f&&(f=4294967295);f=vb(c);var g=
+h=>h;if(0===d){var k=32-8*c;g=h=>h<<k>>>k}c=b.includes("unsigned")?function(h,n){return n>>>0}:function(h,n){return n};R(a,{name:b,fromWireType:g,toWireType:c,argPackAdvance:8,readValueFromPointer:gc(b,f,0!==d),hb:null})},c:function(a,b,c){function d(g){g>>=2;var k=F;return new f(ua,k[g+1],k[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);R(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{zd:!0})},u:function(a,b){b=
+S(b);var c="std::string"===b;R(a,{name:b,fromWireType:function(d){var f=F[d>>2],g=d+4;if(c)for(var k=g,h=0;h<=f;++h){var n=g+h;if(h==f||0==z[n]){k=y(k,n-k);if(void 0===q)var q=k;else q+=String.fromCharCode(0),q+=k;k=n+1}}else{q=Array(f);for(h=0;h<f;++h)q[h]=String.fromCharCode(z[g+h]);q=q.join("")}X(d);return q},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"==typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||T("Cannot pass non-string to std::string");
+var k=c&&g?ta(f):f.length;var h=wc(4+k+1),n=h+4;F[h>>2]=k;if(c&&g)A(f,z,n,k+1);else if(g)for(g=0;g<k;++g){var q=f.charCodeAt(g);255<q&&(X(n),T("String has UTF-16 code units that do not fit in 8 bits"));z[n+g]=q}else for(g=0;g<k;++g)z[n+g]=f[g];null!==d&&d.push(X,h);return h},argPackAdvance:8,readValueFromPointer:lb,hb:function(d){X(d)}})},o:function(a,b,c){c=S(c);if(2===b){var d=ic;var f=jc;var g=kc;var k=()=>va;var h=1}else 4===b&&(d=lc,f=mc,g=nc,k=()=>F,h=2);R(a,{name:c,fromWireType:function(n){for(var q=
+F[n>>2],p=k(),t,x=n+4,l=0;l<=q;++l){var u=n+4+l*b;if(l==q||0==p[u>>h])x=d(x,u-x),void 0===t?t=x:(t+=String.fromCharCode(0),t+=x),x=u+b}X(n);return t},toWireType:function(n,q){"string"!=typeof q&&T("Cannot pass non-string to C++ string type "+c);var p=g(q),t=wc(4+p+b);F[t>>2]=p>>h;f(q,t+4,p+b);null!==n&&n.push(X,t);return t},argPackAdvance:8,readValueFromPointer:lb,hb:function(n){X(n)}})},i:function(a,b,c,d,f,g){jb[a]={name:S(b),qc:W(c,d),ob:W(f,g),Kc:[]}},f:function(a,b,c,d,f,g,k,h,n,q){jb[a].Kc.push({qd:S(b),
+yd:c,Rb:W(d,f),xd:g,Rd:k,Qd:W(h,n),Sd:q})},fa:function(a,b){b=S(b);R(a,{Cd:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},n:function(){return Date.now()},$:function(){return!0},v:function(a,b,c){a=ec(a);b=oc(b,"emval::as");var d=[],f=Sb(d);F[c>>2]=f;return b.toWireType(d,a)},ma:function(a,b,c,d){a=rc[a];b=ec(b);c=qc(c);a(b,c,null,d)},ka:dc,la:function(a,b){var c=tc(a,b),d=c[0];b=d.name+"_$"+c.slice(1).map(function(p){return p.name}).join("_")+"$";var f=uc[b];if(void 0!==
+f)return f;f=["retType"];for(var g=[d],k="",h=0;h<a-1;++h)k+=(0!==h?", ":"")+"arg"+h,f.push("argType"+h),g.push(c[1+h]);var n="return function "+pb("methodCaller_"+b)+"(handle, name, destructors, args) {\n",q=0;for(h=0;h<a-1;++h)n+=" var arg"+h+" = argType"+h+".readValueFromPointer(args"+(q?"+"+q:"")+");\n",q+=c[h+1].argPackAdvance;n+=" var rv = handle[name]("+k+");\n";for(h=0;h<a-1;++h)c[h+1].deleteObject&&(n+=" argType"+h+".deleteObject(arg"+h+");\n");d.Cd||(n+=" return retType.toWireType(destructors, rv);\n");
+f.push(n+"};\n");a=ac(f).apply(null,g);f=sc(a);return uc[b]=f},w:function(a,b){a=ec(a);b=ec(b);return Sb(a[b])},oa:function(a){4<a&&(Y[a].tc+=1)},na:function(){return Sb([])},ja:function(a){return Sb(qc(a))},ia:function(a){var b=ec(a);kb(b);dc(a)},l:function(a,b){a=oc(a,"_emval_take_value");a=a.readValueFromPointer(b);return Sb(a)},aa:function(a,b){a=new Date(1E3*ib(a));E[b>>2]=a.getSeconds();E[b+4>>2]=a.getMinutes();E[b+8>>2]=a.getHours();E[b+12>>2]=a.getDate();E[b+16>>2]=a.getMonth();E[b+20>>2]=
+a.getFullYear()-1900;E[b+24>>2]=a.getDay();var c=new Date(a.getFullYear(),0,1);E[b+28>>2]=(a.getTime()-c.getTime())/864E5|0;E[b+36>>2]=-(60*a.getTimezoneOffset());var d=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();c=c.getTimezoneOffset();E[b+32>>2]=(d!=c&&a.getTimezoneOffset()==Math.min(c,d))|0},M:function(a,b,c,d,f,g){try{var k=N.qb(d);if(!k)return-8;var h=N.xb(k,a,f,b,c),n=h.Ra;E[g>>2]=h.yc;return n}catch(q){if("undefined"==typeof N||!(q instanceof N.La))throw q;return-q.Qa}},N:function(a,
+b,c,d,f,g){try{var k=N.qb(f);if(k&&c&2){var h=z.slice(a,a+b);N.Eb(k,h,g,b,d)}}catch(n){if("undefined"==typeof N||!(n instanceof N.La))throw n;return-n.Qa}},ba:yc,k:function(){v("")},F:function(){return 2147483648},s:zc,m:function(a){var b=z.length;a>>>=0;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);var f=Math;d=Math.max(a,d);f=f.min.call(f,2147483648,d+(65536-d%65536)%65536);a:{try{pa.grow(f-ua.byteLength+65535>>>16);ya();var g=1;break a}catch(k){}g=void 0}if(g)return!0}return!1},
+P:function(a,b){var c=0;Bc().forEach(function(d,f){var g=b+c;f=F[a+4*f>>2]=g;for(g=0;g<d.length;++g)B[f++>>0]=d.charCodeAt(g);B[f>>0]=0;c+=d.length+1});return 0},Q:function(a,b){var c=Bc();F[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});F[b>>2]=d;return 0},j:function(a){try{var b=Q(a);N.close(b);return 0}catch(c){if("undefined"==typeof N||!(c instanceof N.La))throw c;return c.Qa}},D:function(a,b){try{var c=Q(a);B[b>>0]=c.tty?2:N.Xa(c.mode)?3:N.ub(c.mode)?7:4;return 0}catch(d){if("undefined"==
+typeof N||!(d instanceof N.La))throw d;return d.Qa}},q:function(a,b,c,d){try{a:{var f=Q(a);a=b;for(var g=b=0;g<c;g++){var k=F[a>>2],h=F[a+4>>2];a+=8;var n=N.read(f,B,k,h,void 0);if(0>n){var q=-1;break a}b+=n;if(n<h)break}q=b}E[d>>2]=q;return 0}catch(p){if("undefined"==typeof N||!(p instanceof N.La))throw p;return p.Qa}},y:function(a,b,c,d,f){try{b=c+2097152>>>0<4194305-!!b?(b>>>0)+4294967296*c:NaN;if(isNaN(b))return 61;var g=Q(a);N.ab(g,b,d);J=[g.position>>>0,(G=g.position,1<=+Math.abs(G)?0<G?(Math.min(+Math.floor(G/
+4294967296),4294967295)|0)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)];E[f>>2]=J[0];E[f+4>>2]=J[1];g.tb&&0===b&&0===d&&(g.tb=null);return 0}catch(k){if("undefined"==typeof N||!(k instanceof N.La))throw k;return k.Qa}},S:function(a){try{var b=Q(a);return b.Pa&&b.Pa.fsync?-b.Pa.fsync(b):0}catch(c){if("undefined"==typeof N||!(c instanceof N.La))throw c;return c.Qa}},p:function(a,b,c,d){try{a:{var f=Q(a);a=b;for(var g=b=0;g<c;g++){var k=F[a>>2],h=F[a+4>>2];a+=8;var n=N.write(f,B,k,h,void 0);if(0>
+n){var q=-1;break a}b+=n}q=b}F[d>>2]=q;return 0}catch(p){if("undefined"==typeof N||!(p instanceof N.La))throw p;return p.Qa}},B:function(){},ha:Gc,C:function(a,b,c,d){return Gc(a,b,c,d)}},Z=function(){function a(c){e.asm=c.exports;pa=e.asm.pa;ya();za=e.asm.ua;Ba.unshift(e.asm.qa);Ja("wasm-instantiate")}var b={a:Lc};Ia("wasm-instantiate");if(e.instantiateWasm)try{return e.instantiateWasm(b,a)}catch(c){return r("Module.instantiateWasm callback failed with error: "+c),!1}b=Ma(b);a(b[0]);return e.asm}();
+e.___wasm_call_ctors=Z.qa;var Kc=e.___errno_location=Z.ra,wc=e._malloc=Z.sa,X=e._free=Z.ta,Yb=e.___getTypeName=Z.va;e.___embind_register_native_and_builtin_types=Z.wa;var cb=e._emscripten_builtin_memalign=Z.xa;e.___cxa_is_pointer_type=Z.ya;e.dynCall_iiiij=Z.za;e.dynCall_iij=Z.Aa;e.dynCall_iijii=Z.Ba;e.dynCall_iiji=Z.Ca;e.dynCall_iiiiiij=Z.Da;e.dynCall_vjii=Z.Ea;e.dynCall_vji=Z.Fa;e.dynCall_jiji=Z.Ga;e.dynCall_viijii=Z.Ha;e.dynCall_iiiiij=Z.Ia;e.dynCall_iiiiijj=Z.Ja;e.dynCall_iiiiiijj=Z.Ka;
+e.addRunDependency=Ia;e.removeRunDependency=Ja;e.FS_createPath=N.Cc;e.FS_createDataFile=N.Qb;e.FS_createPreloadedFile=N.Dc;e.FS_createLazyFile=N.Bc;e.FS_createDevice=N.gb;e.FS_unlink=N.unlink;e.FS=N;var Mc;Ha=function Nc(){Mc||Oc();Mc||(Ha=Nc)};
+function Oc(){function a(){if(!Mc&&(Mc=!0,e.calledRun=!0,!qa)){e.noFSInit||N.Cb.ic||N.Cb();N.Qc=!1;Na(Ba);aa(e);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();Ca.unshift(b)}Na(Ca)}}if(!(0<Ea)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)Da();Na(Aa);0<Ea||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},
1);a()},1)):a())}}if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();Oc();
diff --git a/web/database/_generated/comm_query_executor.wasm b/web/database/_generated/comm_query_executor.wasm
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/web/scripts/run_emscripten.sh b/web/scripts/run_emscripten.sh
--- a/web/scripts/run_emscripten.sh
+++ b/web/scripts/run_emscripten.sh
@@ -21,10 +21,19 @@
OUTPUT_FILE_NAME="comm-query-executor"
OUTPUT_FILE="${OUTPUT_DIR}${OUTPUT_FILE_NAME}.js"
-# SQLite resources
-SQLITE_AMALGAMATION="sqlite-amalgamation-3390300"
-SQLITE_AMALGAMATION_URL="https://www.sqlite.org/2022/${SQLITE_AMALGAMATION}.zip"
-SQLITE_AMALGAMATION_FILE="${SQLITE_DIR}${SQLITE_AMALGAMATION}.zip"
+# OpenSSL resources
+OPENSSL_VERSION="3.2.0"
+OPENSSL_URL="https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
+OPENSSL_FILE="${SQLITE_DIR}openssl-file"
+OPENSSL_DIR="${SQLITE_DIR}openssl-${OPENSSL_VERSION}"
+OPENSSL_HEADERS="${OPENSSL_DIR}/include"
+OPENSSL_LIBCRYPTO="${OPENSSL_DIR}/libcrypto.a"
+
+# SQLCipher resources
+SQLCIPHER_AMALGAMATION_VERSION="4.5.5b"
+SQLCIPHER_AMALGAMATION="sqlcipher-amalgamation-${SQLCIPHER_AMALGAMATION_VERSION}"
+SQLCIPHER_AMALGAMATION_URL="https://codeload.github.com/CommE2E/sqlcipher-amalgamation/zip/refs/tags/${SQLCIPHER_AMALGAMATION_VERSION}"
+SQLCIPHER_AMALGAMATION_FILE="${SQLITE_DIR}${SQLCIPHER_AMALGAMATION}"
SQLITE_COMPILATION_FLAGS=(
-Oz
@@ -34,15 +43,62 @@
-DSQLITE_ENABLE_FTS3_PARENTHESIS
-DSQLITE_THREADSAFE=0
-DSQLITE_ENABLE_NORMALIZE
+ -DSQLITE_HAS_CODEC
+ -DSQLITE_TEMP_STORE=2
+ -DSQLCIPHER_CRYPTO_OPENSSL
)
+download_openssl() {
+ mkdir -p "$SQLITE_DIR"
+
+ curl "${OPENSSL_URL}" --output "${OPENSSL_FILE}"
+
+ tar -xf "${OPENSSL_FILE}" -C "${SQLITE_DIR}"
+ rm -f "${OPENSSL_FILE}"
+}
+
+build_openssl() {
+ pushd "${OPENSSL_DIR}"
+
+ ./Configure \
+ no-asm \
+ no-async \
+ no-egd \
+ no-ktls \
+ no-module \
+ no-posix-io \
+ no-secure-memory \
+ no-dso \
+ no-shared \
+ no-sock \
+ no-stdio \
+ no-ui-console \
+ no-weak-ssl-ciphers \
+ no-engine \
+ linux-generic32
+
+ make CC="emcc" AR="emar" RANLIB="emranlib"
+
+ popd
+}
+
+if [ ! -d "$OPENSSL_DIR" ]; then
+ echo "OpenSSL sources not found. Downloading."
+ download_openssl
+fi
+
+if [ ! -f "$OPENSSL_LIBCRYPTO" ]; then
+ echo "OpenSSL binary not found. Building."
+ build_openssl
+fi
+
download_sqlite() {
mkdir -p "$SQLITE_DIR"
- curl "${SQLITE_AMALGAMATION_URL}" --output "${SQLITE_AMALGAMATION_FILE}"
+ curl "${SQLCIPHER_AMALGAMATION_URL}" --output "${SQLCIPHER_AMALGAMATION_FILE}"
- unzip -jo "${SQLITE_AMALGAMATION_FILE}" -d "${SQLITE_DIR}"
- rm -f "${SQLITE_AMALGAMATION_FILE}"
+ unzip -jo "${SQLCIPHER_AMALGAMATION_FILE}" -d "${SQLITE_DIR}"
+ rm -f "${SQLCIPHER_AMALGAMATION_FILE}"
}
if [ ! -f "$SQLITE_BITCODE_FILE" ]; then
@@ -50,6 +106,7 @@
download_sqlite
emcc "${SQLITE_COMPILATION_FLAGS[@]}" \
+ -I "${OPENSSL_HEADERS}" \
-c "$SQLITE_SOURCE" \
-o "$SQLITE_BITCODE_FILE"
fi
@@ -98,6 +155,7 @@
"${EMCC_FLAGS[@]}" \
"${CFLAGS[@]}" \
"${INPUT_FILES[@]}" \
+ "${OPENSSL_LIBCRYPTO}" \
-o "${OUTPUT_FILE}" \
-std=c++17

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 3:25 PM (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2593705
Default Alt Text
D10450.diff (126 KB)

Event Timeline