diff --git a/.changeset/empty-walls-doubt.md b/.changeset/empty-walls-doubt.md new file mode 100644 index 00000000..d990b650 --- /dev/null +++ b/.changeset/empty-walls-doubt.md @@ -0,0 +1,5 @@ +--- +"@journeyapps/wa-sqlite": patch +--- + +Fix some type declarations diff --git a/.changeset/hungry-mangos-admire.md b/.changeset/hungry-mangos-admire.md new file mode 100644 index 00000000..01f6829b --- /dev/null +++ b/.changeset/hungry-mangos-admire.md @@ -0,0 +1,5 @@ +--- +"@journeyapps/wa-sqlite": minor +--- + +Update powersync-sqlite-core to v0.2.0 diff --git a/.changeset/red-cars-attack.md b/.changeset/red-cars-attack.md new file mode 100644 index 00000000..bf809187 --- /dev/null +++ b/.changeset/red-cars-attack.md @@ -0,0 +1,5 @@ +--- +"@journeyapps/wa-sqlite": minor +--- + +Rename back to @journeyapps/wa-sqlite diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 161f1d7d..d18618b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,13 +5,13 @@ name: wa-sqlite CI on: push: - branches: ['master'] + branches: ["master"] pull_request: - branches: ['master'] + branches: ["master"] env: - EM_VERSION: 3.1.45 - EM_CACHE_FOLDER: 'emsdk-cache' + EM_VERSION: 3.1.64 + EM_CACHE_FOLDER: "emsdk-cache" jobs: build: @@ -24,12 +24,12 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: "recursive" - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' + cache: "npm" # Install yarn dependencies. - name: Get yarn cache directory path @@ -45,8 +45,8 @@ jobs: - run: yarn install - name: Rust Setup run: | - rustup toolchain install nightly-2023-08-28-x86_64-unknown-linux-gnu - rustup component add rust-src --toolchain nightly-2023-08-28-x86_64-unknown-linux-gnu + rustup toolchain install nightly-2024-05-18-x86_64-unknown-linux-gnu + rustup component add rust-src --toolchain nightly-2024-05-18-x86_64-unknown-linux-gnu - name: Test with checked-in WASM files run: yarn test --reporters progress diff --git a/CHANGELOG.md b/CHANGELOG.md index a71e3159..810f989a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# @powersync/wa-sqlite +# @journeyapps/wa-sqlite ## 0.2.1 diff --git a/dist/wa-sqlite-async.mjs b/dist/wa-sqlite-async.mjs index 002a9d64..de6be05f 100644 --- a/dist/wa-sqlite-async.mjs +++ b/dist/wa-sqlite-async.mjs @@ -1,145 +1,146 @@ var Module = (() => { - var _scriptDir = import.meta.url; + var _scriptName = import.meta.url; return ( function(moduleArg = {}) { + var moduleRtn; -var d=moduleArg,aa,ba,readyPromise=new Promise((a,b)=>{aa=a;ba=b}),ca=Object.assign({},d),da="./this.program",ea=(a,b)=>{throw b;},fa="object"==typeof window,ha="function"==typeof importScripts,g="",ia; -if(fa||ha)ha?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),_scriptDir&&(g=_scriptDir),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),ha&&(ia=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var ja=d.print||console.log.bind(console),r=d.printErr||console.error.bind(console);Object.assign(d,ca);ca=null;d.thisProgram&&(da=d.thisProgram); -d.quit&&(ea=d.quit);var la;d.wasmBinary&&(la=d.wasmBinary);var ma,u=!1,na,v,w,x,oa,z,B,pa,qa;function ra(){var a=ma.buffer;d.HEAP8=v=new Int8Array(a);d.HEAP16=x=new Int16Array(a);d.HEAPU8=w=new Uint8Array(a);d.HEAPU16=oa=new Uint16Array(a);d.HEAP32=z=new Int32Array(a);d.HEAPU32=B=new Uint32Array(a);d.HEAPF32=pa=new Float32Array(a);d.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[];function wa(){var a=d.preRun.shift();sa.unshift(a)}var xa=0,ya=null,za=null; -function C(a){d.onAbort?.(a);a="Aborted("+a+")";r(a);u=!0;na=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Aa=a=>a.startsWith("data:application/octet-stream;base64,"),Ba;if(d.locateFile){if(Ba="wa-sqlite-async.wasm",!Aa(Ba)){var Ca=Ba;Ba=d.locateFile?d.locateFile(Ca,g):g+Ca}}else Ba=(new URL("wa-sqlite-async.wasm",import.meta.url)).href; -function Da(a){if(a==Ba&&la)return new Uint8Array(la);if(ia)return ia(a);throw"both async and sync fetching of the wasm failed";}function Ea(a){return la||!fa&&!ha||"function"!=typeof fetch?Promise.resolve().then(()=>Da(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Da(a))} -function Fa(a,b,c){return Ea(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);C(e)})}function Ga(a,b){var c=Ba;return la||"function"!=typeof WebAssembly.instantiateStreaming||Aa(c)||"function"!=typeof fetch?Fa(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Fa(c,a,b)}))}var D,F; -function Ha(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ia=a=>{for(;0>1];case "i32":return z[a>>2];case "i64":C("to do getValue(i64) use WASM_BIGINT");case "float":return pa[a>>2];case "double":return qa[a>>3];case "*":return B[a>>2];default:C(`invalid type for getValue: ${b}`)}} -var Ja=d.noExitRuntime||!0;function I(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":v[a]=b;break;case "i8":v[a]=b;break;case "i16":x[a>>1]=b;break;case "i32":z[a>>2]=b;break;case "i64":C("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":B[a>>2]=b;break;default:C(`invalid type for setValue: ${c}`)}} -var Ka="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,J=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e}, -La=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ma=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=La(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Na=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},Oa=a=>{if("/"=== -a)return"/";a=Ma(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Pa=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);C("initRandomDevice")},Qa=a=>(Qa=Pa())(a),Ra=(...a)=>{for(var b="",c=!1,e=a.length-1;-1<=e&&!c;e--){c=0<=e?a[e]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=La(b.split("/").filter(f=>!!f),!c).join("/"); -return(c?"/":"")+b||"."},Sa=[],Ta=a=>{for(var b=0,c=0;c=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},K=(a,b,c,e)=>{if(!(0=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)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,b,c){c=Array(0=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Cf,a.Cf=new Uint8Array(b),0=a.node.Ef)return 0;a=Math.min(a.node.Ef-f,e);if(8b)throw new N(28);return b},ig(a,b,c){ab(a.node,b+c);a.node.Ef=Math.max(a.node.Ef,b+c)},Zf(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new N(43);a=a.node.Cf;if(f&2||a.buffer!==v.buffer){if(0< -c||c+b{var c=0;a&&(c|=365);b&&(c|=146);return c},hb=null,ib={},jb=[],kb=1,Q=null,lb=!0,N=class{constructor(a){this.name="ErrnoError";this.Df=a}},db={},mb=class{constructor(){this.Wf={};this.node=null}get flags(){return this.Wf.flags}set flags(a){this.Wf.flags= -a}get position(){return this.Wf.position}set position(a){this.Wf.position=a}},nb=class{constructor(a,b,c,e){a||=this;this.parent=a;this.Jf=a.Jf;this.Pf=null;this.id=kb++;this.name=b;this.mode=c;this.Af={};this.Bf={};this.Uf=e}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}}; -function R(a,b={}){a=Ra(a);if(!a)return{path:"",node:null};b=Object.assign({kg:!0,gg:0},b);if(8!!k);for(var c=hb,e="/",f=0;f>>0)%Q.length}function rb(a){var b=qb(a.parent.id,a.name);if(Q[b]===a)Q[b]=a.Qf;else for(b=Q[b];b;){if(b.Qf===a){b.Qf=a.Qf;break}b=b.Qf}} -function eb(a,b){var c=P(a.mode)?(c=sb(a,"x"))?c:a.Af.Sf?0:2:54;if(c)throw new N(c);for(c=Q[qb(a.id,b)];c;c=c.Qf){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.Af.Sf(a,b)}function cb(a,b,c,e){a=new nb(a,b,c,e);b=qb(a.parent.id,a.name);a.Qf=Q[b];return Q[b]=a}function P(a){return 16384===(a&61440)}function tb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b} -function sb(a,b){if(lb)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}function ub(a,b){try{return eb(a,b),20}catch(c){}return sb(a,"wx")}function vb(a,b,c){try{var e=eb(a,b)}catch(f){return f.Df}if(a=sb(a,"wx"))return a;if(c){if(!P(e.mode))return 54;if(e===e.parent||"/"===pb(e))return 10}else if(P(e.mode))return 31;return 0}function S(a){a=jb[a];if(!a)throw new N(8);return a} -function wb(a,b=-1){a=Object.assign(new mb,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!jb[b])break a;throw new N(33);}a.Lf=b;return jb[b]=a}function xb(a,b=-1){a=wb(a,b);a.Bf?.Kg?.(a);return a}var bb={open(a){a.Bf=ib[a.node.Uf].Bf;a.Bf.open?.(a)},Of(){throw new N(70);}};function Xa(a,b){ib[a]={Bf:b}} -function yb(a,b){var c="/"===b;if(c&&hb)throw new N(10);if(!c&&b){var e=R(b,{kg:!1});b=e.path;e=e.node;if(e.Pf)throw new N(10);if(!P(e.mode))throw new N(54);}b={type:a,Pg:{},ng:b,zg:[]};a=a.Jf(b);a.Jf=b;b.root=a;c?hb=a:e&&(e.Pf=b,e.Jf&&e.Jf.zg.push(b))}function zb(a,b,c){var e=R(a,{parent:!0}).node;a=Oa(a);if(!a||"."===a||".."===a)throw new N(28);var f=ub(e,a);if(f)throw new N(f);if(!e.Af.Yf)throw new N(63);return e.Af.Yf(e,a,b,c)}function T(a,b){return zb(a,(void 0!==b?b:511)&1023|16384,0)} -function Ab(a,b,c){"undefined"==typeof c&&(c=b,b=438);zb(a,b|8192,c)}function Bb(a,b){if(!Ra(a))throw new N(44);var c=R(b,{parent:!0}).node;if(!c)throw new N(44);b=Oa(b);var e=ub(c,b);if(e)throw new N(e);if(!c.Af.bg)throw new N(63);c.Af.bg(c,b,a)}function Cb(a){var b=R(a,{parent:!0}).node;a=Oa(a);var c=eb(b,a),e=vb(b,a,!0);if(e)throw new N(e);if(!b.Af.ag)throw new N(63);if(c.Pf)throw new N(10);b.Af.ag(b,a);rb(c)} -function ob(a){a=R(a).node;if(!a)throw new N(44);if(!a.Af.Vf)throw new N(28);return Ra(pb(a.parent),a.Af.Vf(a))}function Db(a,b){a=R(a,{Nf:!b}).node;if(!a)throw new N(44);if(!a.Af.If)throw new N(63);return a.Af.If(a)}function Eb(a){return Db(a,!0)}function Fb(a,b){a="string"==typeof a?R(a,{Nf:!0}).node:a;if(!a.Af.Ff)throw new N(63);a.Af.Ff(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} -function Gb(a,b){if(0>b)throw new N(28);a="string"==typeof a?R(a,{Nf:!0}).node:a;if(!a.Af.Ff)throw new N(63);if(P(a.mode))throw new N(31);if(32768!==(a.mode&61440))throw new N(28);var c=sb(a,"w");if(c)throw new N(c);a.Af.Ff(a,{size:b,timestamp:Date.now()})} -function Hb(a,b,c){if(""===a)throw new N(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=Ma(a);try{f=R(a,{Nf:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new N(20);}else f=zb(a,c,0),e=!0;if(!f)throw new N(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!P(f.mode))throw new N(54);if(!e&&(c= -f?40960===(f.mode&61440)?32:P(f.mode)&&("r"!==tb(b)||b&512)?31:sb(f,tb(b)):44))throw new N(c);b&512&&!e&&Gb(f,0);b&=-131713;f=wb({node:f,path:pb(f),flags:b,seekable:!0,position:0,Bf:f.Bf,Eg:[],error:!1});f.Bf.open&&f.Bf.open(f);!d.logReadFiles||b&1||(Ib||={},a in Ib||(Ib[a]=1));return f}function Jb(a,b,c){if(null===a.Lf)throw new N(8);if(!a.seekable||!a.Bf.Of)throw new N(70);if(0!=c&&1!=c&&2!=c)throw new N(28);a.position=a.Bf.Of(a,b,c);a.Eg=[]}var Kb; -function Lb(a,b,c){a=Ma("/dev/"+a);var e=gb(!!b,!!c);Mb||=64;var f=Mb++<<8|0;Xa(f,{open(h){h.seekable=!1},close(){c?.buffer?.length&&c(10)},read(h,k,n,l){for(var m=0,p=0;p>2]=a.vg;z[c+4>>2]=a.mode;B[c+8>>2]=a.Bg;z[c+12>>2]=a.uid;z[c+16>>2]=a.yg;z[c+20>>2]=a.Uf;F=[a.size>>>0,(D=a.size,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+24>>2]=F[0];z[c+28>>2]=F[1];z[c+32>>2]=4096;z[c+36>>2]=a.tg;b=a.rg.getTime();var e=a.Ag.getTime(),f=a.ug.getTime();F=[Math.floor(b/1E3)>>>0,(D=Math.floor(b/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0: -0)];z[c+40>>2]=F[0];z[c+44>>2]=F[1];B[c+48>>2]=b%1E3*1E3;F=[Math.floor(e/1E3)>>>0,(D=Math.floor(e/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+56>>2]=F[0];z[c+60>>2]=F[1];B[c+64>>2]=e%1E3*1E3;F=[Math.floor(f/1E3)>>>0,(D=Math.floor(f/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+72>>2]=F[0];z[c+76>>2]=F[1];B[c+80>>2]=f%1E3*1E3;F=[a.mg>>>0,(D=a.mg,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+88>>2]=F[0];z[c+92>>2]=F[1];return 0}var Pb=void 0;function Qb(){var a=z[+Pb>>2];Pb+=4;return a} -var Rb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Sb=[0,31,60,91,121,152,182,213,244,274,305,335],Tb=[0,31,59,90,120,151,181,212,243,273,304,334],Ub={},Wb=()=>{if(!Vb){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 Ub)void 0===Ub[b]?delete a[b]:a[b]=Ub[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Vb=c}return Vb}, -Vb;function Xb(){}function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){} -function Dc(){}function Ec(){}function Fc(){}function Gc(){}function Hc(){}function Ic(){}var Jc=0,Kc=a=>{na=a;Ja||0{a instanceof Ha||"unwind"==a||ea(1,a)},Mc=a=>{try{a()}catch(b){C(b)}},Nc=a=>{if(!u)try{if(a(),!(Ja||0{Pc.push(c);try{return e(...f)}finally{u||(Pc.pop(),W&&1===Y&&0===Pc.length&&(Y=0,Mc(Qc),"undefined"!=typeof Fibers&&Fibers.Qg()))}}:e;return b}var Y=0,W=null,Rc=0,Pc=[],Sc={},Tc={},Uc=0,Vc=null,Wc=[];function Xc(){return new Promise((a,b)=>{Vc={resolve:a,reject:b}})} -function Yc(){var a=Zc(16396),b=a+12;B[a>>2]=b;B[a+4>>2]=b+16384;b=Pc[0];var c=Sc[b];void 0===c&&(c=Uc++,Sc[b]=c,Tc[c]=b);z[a+8>>2]=c;return a} -function $c(a){if(!u){if(0===Y){var b=!1,c=!1;a((e=0)=>{if(!u&&(Rc=e,b=!0,c)){Y=2;Mc(()=>ad(W));"undefined"!=typeof Browser&&Browser.eg.xg&&Browser.eg.resume();e=!1;try{var f=(0,V[Tc[z[W+8>>2]]])()}catch(n){f=n,e=!0}var h=!1;if(!W){var k=Vc;k&&(Vc=null,(e?k.reject:k.resolve)(f),h=!0)}if(e&&!h)throw f;}});c=!0;b||(Y=1,W=Yc(),"undefined"!=typeof Browser&&Browser.eg.xg&&Browser.eg.pause(),Mc(()=>bd(W)))}else 2===Y?(Y=0,Mc(cd),dd(W),W=null,Wc.forEach(Nc)):C(`invalid state: ${Y}`);return Rc}} -function ed(a){return $c(b=>{a().then(b)})} -var fd={},gd,hd,jd=[],Z=(a,b,c,e,f)=>{function h(q){--Jc;0!==l&&kd(l);return"string"===b?q?J(w,q):"":"boolean"===b?!!q:q}var k={string:q=>{var t=0;if(null!==q&&void 0!==q&&0!==q){t=Ta(q)+1;var y=ld(t);K(q,w,y,t);t=y}return t},array:q=>{var t=ld(q.length);v.set(q,t);return t}};a=d["_"+a];var n=[],l=0;if(e)for(var m=0;m{db[a]=new N(a);db[a].stack=""});Q=Array(4096);yb(O,"/");T("/tmp");T("/home");T("/home/web_user");(function(){T("/dev");Xa(259,{read:()=>0,write:(e,f,h,k)=>k});Ab("/dev/null",259);Wa(1280,Za);Wa(1536,$a);Ab("/dev/tty",1280);Ab("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Qa(a).byteLength);return a[--b]};Lb("random",c);Lb("urandom",c);T("/dev/shm");T("/dev/shm/tmp")})(); -(function(){T("/proc");var a=T("/proc/self");T("/proc/self/fd");yb({Jf(){var b=cb(a,"fd",16895,73);b.Af={Sf(c,e){var f=S(+e);c={parent:null,Jf:{ng:"fake"},Af:{Vf:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); -(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,hg:e}):a.delete(b);return Z("set_authorizer","number",["number"],[b])};Xb=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,hg:l}=a.get(b);return n(l,c,e?e?J(w,e):"":null,f?f?J(w,f):"":null,h?h?J(w,h):"":null,k?k?J(w,k):"":null)}return 0}})(); -(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,Mf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,wg:l,Mf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};Zb=function(c,e,f,h){c=a.get(c);b.set(e, -c.Mf);c.f(e,new Uint32Array(w.buffer,h,f));b.delete(e)};ac=function(c,e,f,h){c=a.get(c);b.set(e,c.Mf);c.step(e,new Uint32Array(w.buffer,h,f));b.delete(e)};Yb=function(c,e){c=a.get(c);b.set(e,c.Mf);c.wg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,hg:f}):a.delete(b);return Z("progress_handler",null,["number","number"],[b,c])};$b=function(b){if(a.has(b)){const {f:c,hg:e}=a.get(b);return c(e)}return 0}})(); -(function(){function a(l,m){const p=`get${l}`,q=`set${l}`;return new Proxy(new DataView(w.buffer,m,"Int32"===l?4:8),{get(t,y){if(y===p)return function(A,G){if(!G)throw Error("must be little endian");return t[y](A,G)};if(y===q)return function(A,G,E){if(!E)throw Error("must be little endian");return t[y](A,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return t[y]}})}const b="object"===typeof fd,c=new Map,e=new Map,f=new Map,h=b?new Set:null,k=b?new Set:null,n=new Map; -rc=function(l,m,p,q){n.set(l?J(w,l):"",{size:m,Tf:Array.from(new Uint32Array(w.buffer,q,p))})};d.createModule=function(l,m,p,q){b&&(p.handleAsync=ed);const t=c.size;c.set(t,{module:p,Mf:q});q=0;p.xCreate&&(q|=1);p.xConnect&&(q|=2);p.xBestIndex&&(q|=4);p.xDisconnect&&(q|=8);p.xDestroy&&(q|=16);p.xOpen&&(q|=32);p.xClose&&(q|=64);p.xFilter&&(q|=128);p.xNext&&(q|=256);p.xEof&&(q|=512);p.xColumn&&(q|=1024);p.xRowid&&(q|=2048);p.xUpdate&&(q|=4096);p.xBegin&&(q|=8192);p.xSync&&(q|=16384);p.xCommit&&(q|= -32768);p.xRollback&&(q|=65536);p.xFindFunction&&(q|=131072);p.xRename&&(q|=262144);return Z("create_module","number",["number","string","number","number"],[l,m,t,q])};hc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(w.buffer,q,p)).map(A=>A?J(w,A):"");return m.module.xCreate(l,m.Mf,q,t,a("Int32",y))};gc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(w.buffer, -q,p)).map(A=>A?J(w,A):"");return m.module.xConnect(l,m.Mf,q,t,a("Int32",y))};cc=function(l,m){var p=e.get(l),q=n.get("sqlite3_index_info").Tf;const t={};t.nConstraint=H(m+q[0],"i32");t.aConstraint=[];var y=H(m+q[1],"*"),A=n.get("sqlite3_index_constraint").size;for(var G=0;Gl?2**32:0))}; -Ic=function(h,k,n,l,m){return e.get(h).xWrite(h,w.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Gc=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Fc=function(h,k){return e.get(h).xSync(h,k)};Ac=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};Bc=function(h,k){return e.get(h).xLock(h,k)};Hc=function(h,k){return e.get(h).xUnlock(h,k)};vc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};zc=function(h,k,n){const l=e.get(h); -n=new DataView(w.buffer,n);return l.xFileControl(h,k,n)};Ec=function(h){return e.get(h).xSectorSize(h)};yc=function(h){return e.get(h).xDeviceCharacteristics(h)};Cc=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var p of f)e.delete(p)}p=null;if(l&64){p=1;const q=[];for(;p;){const t=w[k++];if(t)q.push(t);else switch(w[k]||(p=null),p){case 1:q.push(63);p=2;break;case 2:q.push(61);p=3;break;case 3:q.push(38),p=2}}p=(new TextDecoder).decode(new Uint8Array(q))}else k&&(p=k?J(w,k):""); -m=a("Int32",m);return h.xOpen(p,n,l,m)};xc=function(h,k,n){return c.get(h).xDelete(k?J(w,k):"",n)};uc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?J(w,k):"",n,l)}})(); -var od={a:(a,b,c,e)=>{C(`Assertion failed: ${a?J(w,a):""}, at: `+[b?b?J(w,b):"":"unknown filename",c,e?e?J(w,e):"":"unknown function"])},N:function(a,b){try{return a=a?J(w,a):"",Fb(a,b),0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Df}},Q:function(a,b,c){try{b=b?J(w,b):"";b=Nb(a,b);if(c&-8)return-28;var e=R(b,{Nf:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&sb(e,a)?-2:0}catch(f){if("undefined"==typeof U||"ErrnoError"!==f.name)throw f; -return-f.Df}},O:function(a,b){try{var c=S(a);Fb(c.node,b);return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Df}},M:function(a){try{var b=S(a).node;var c="string"==typeof b?R(b,{Nf:!0}).node:b;if(!c.Af.Ff)throw new N(63);c.Af.Ff(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Df}},b:function(a,b,c){Pb=c;try{var e=S(a);switch(b){case 0:var f=Qb();if(0>f)break;for(;jb[f];)f++;return xb(e,f).Lf;case 1:case 2:return 0; -case 3:return e.flags;case 4:return f=Qb(),e.flags|=f,0;case 12:return f=Qb(),x[f+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Df}},L:function(a,b){try{var c=S(a);return Ob(Db,c.path,b)}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Df}},n:function(a,b,c){b=Rb(b,c);try{if(isNaN(b))return 61;var e=S(a);if(0===(e.flags&2097155))throw new N(28);Gb(e.node,b);return 0}catch(f){if("undefined"==typeof U|| -"ErrnoError"!==f.name)throw f;return-f.Df}},F:function(a,b){try{if(0===b)return-28;var c=Ta("/")+1;if(b=e)return-28;var f=ob(b),h=Math.min(e,Ta(f)),k=v[c+h];K(f,w,c,e+1);v[c+ -h]=k;return h}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Df}},y:function(a){try{return a=a?J(w,a):"",Cb(a),0}catch(b){if("undefined"==typeof U||"ErrnoError"!==b.name)throw b;return-b.Df}},K:function(a,b){try{return a=a?J(w,a):"",Ob(Db,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Df}},u:function(a,b,c){try{b=b?J(w,b):"";b=Nb(a,b);if(0===c){a=b;var e=R(a,{parent:!0}).node;if(!e)throw new N(44);var f=Oa(a),h=eb(e,f),k=vb(e,f,!1);if(k)throw new N(k); -if(!e.Af.cg)throw new N(63);if(h.Pf)throw new N(10);e.Af.cg(e,f);rb(h)}else 512===c?Cb(b):C("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Df}},t:function(a,b,c){try{b=b?J(w,b):"";b=Nb(a,b,!0);if(c){var e=B[c>>2]+4294967296*z[c+4>>2],f=z[c+8>>2];h=1E3*e+f/1E6;c+=16;e=B[c>>2]+4294967296*z[c+4>>2];f=z[c+8>>2];k=1E3*e+f/1E6}else var h=Date.now(),k=h;a=h;var n=R(b,{Nf:!0}).node;n.Af.Ff(n,{timestamp:Math.max(a,k)});return 0}catch(l){if("undefined"== -typeof U||"ErrnoError"!==l.name)throw l;return-l.Df}},k:function(a,b,c){a=new Date(1E3*Rb(a,b));z[c>>2]=a.getSeconds();z[c+4>>2]=a.getMinutes();z[c+8>>2]=a.getHours();z[c+12>>2]=a.getDate();z[c+16>>2]=a.getMonth();z[c+20>>2]=a.getFullYear()-1900;z[c+24>>2]=a.getDay();b=a.getFullYear();z[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Tb:Sb)[a.getMonth()]+a.getDate()-1|0;z[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset(); -z[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},i:function(a,b,c,e,f,h,k,n){f=Rb(f,h);try{if(isNaN(f))return 61;var l=S(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new N(2);if(1===(l.flags&2097155))throw new N(2);if(!l.Bf.Zf)throw new N(43);var m=l.Bf.Zf(l,a,f,b,c);var p=m.Cg;z[k>>2]=m.qg;B[n>>2]=p;return 0}catch(q){if("undefined"==typeof U||"ErrnoError"!==q.name)throw q;return-q.Df}},j:function(a,b,c,e,f,h,k){h=Rb(h,k);try{var n=S(f);if(c&2){if(32768!==(n.node.mode&61440))throw new N(43); -e&2||n.Bf.$f&&n.Bf.$f(n,w.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof U||"ErrnoError"!==l.name)throw l;return-l.Df}},v:(a,b,c,e)=>{var f=(new Date).getFullYear(),h=new Date(f,0,1),k=new Date(f,6,1);f=h.getTimezoneOffset();var n=k.getTimezoneOffset();B[a>>2]=60*Math.max(f,n);z[b>>2]=Number(f!=n);a=l=>l.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];h=a(h);k=a(k);nDate.now(),d:()=>performance.now(),r:a=> -{var b=w.length;a>>>=0;if(2147483648=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=(f.min.call(f,2147483648,e+(65536-e%65536)%65536)-ma.buffer.byteLength+65535)/65536;try{ma.grow(f);ra();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1},D:(a,b)=>{var c=0;Wb().forEach((e,f)=>{var h=b+c;f=B[a+4*f>>2]=h;for(h=0;h{var c=Wb();B[a>>2]=c.length;var e=0;c.forEach(f=> -e+=f.length+1);B[b>>2]=e;return 0},f:function(a){try{var b=S(a);if(null===b.Lf)throw new N(8);b.dg&&(b.dg=null);try{b.Bf.close&&b.Bf.close(b)}catch(c){throw c;}finally{jb[b.Lf]=null}b.Lf=null;return 0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Df}},s:function(a,b){try{var c=S(a);v[b]=c.Hf?2:P(c.mode)?3:40960===(c.mode&61440)?7:4;x[b+2>>1]=0;F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[b+8>>2]=F[0];z[b+ -12>>2]=F[1];F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[b+16>>2]=F[0];z[b+20>>2]=F[1];return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return e.Df}},A:function(a,b,c,e){try{a:{var f=S(a);a=b;for(var h,k=b=0;k>2],l=B[a+4>>2];a+=8;var m=f,p=h,q=v;if(0>l||0>p)throw new N(28);if(null===m.Lf)throw new N(8);if(1===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31);if(!m.Bf.read)throw new N(28); -var t="undefined"!=typeof p;if(!t)p=m.position;else if(!m.seekable)throw new N(70);var y=m.Bf.read(m,q,n,l,p);t||(m.position+=y);var A=y;if(0>A){var G=-1;break a}b+=A;if(A>2]=G;return 0}catch(E){if("undefined"==typeof U||"ErrnoError"!==E.name)throw E;return E.Df}},l:function(a,b,c,e,f){b=Rb(b,c);try{if(isNaN(b))return 61;var h=S(a);Jb(h,b,e);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/ -4294967296)>>>0:0)];z[f>>2]=F[0];z[f+4>>2]=F[1];h.dg&&0===b&&0===e&&(h.dg=null);return 0}catch(k){if("undefined"==typeof U||"ErrnoError"!==k.name)throw k;return k.Df}},G:function(a){try{var b=S(a);return $c(c=>{var e=b.node.Jf;e.type.Dg?e.type.Dg(e,!1,f=>{f?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Df}},w:function(a,b,c,e){try{a:{var f=S(a);a=b;for(var h,k=b=0;k>2],l=B[a+4>>2];a+=8;var m=f,p=n,q=l,t=h,y=v;if(0>q||0>t)throw new N(28); -if(null===m.Lf)throw new N(8);if(0===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31);if(!m.Bf.write)throw new N(28);m.seekable&&m.flags&1024&&Jb(m,0,2);var A="undefined"!=typeof t;if(!A)t=m.position;else if(!m.seekable)throw new N(70);var G=m.Bf.write(m,y,p,q,t,void 0);A||(m.position+=G);var E=G;if(0>E){var M=-1;break a}b+=E;"undefined"!=typeof h&&(h+=E)}M=b}B[e>>2]=M;return 0}catch(L){if("undefined"==typeof U||"ErrnoError"!==L.name)throw L;return L.Df}},ta:(a,b)=>{Qa(w.subarray(a, -a+b));return 0},ia:Xb,I:Yb,_:Zb,ca:$b,P:ac,la:bc,m:cc,sa:dc,oa:ec,ja:fc,ea:gc,fa:hc,g:ic,h:jc,pa:kc,ra:lc,qa:mc,da:nc,ga:oc,ha:pc,na:qc,c:rc,ka:sc,ma:tc,x:function(a,b,c,e){(0,globalThis.__onTablesChanged)?.(a,b,c,e)},aa:uc,V:vc,$:wc,ba:xc,S:yc,U:zc,Y:Ac,X:Bc,R:Cc,q:Dc,T:Ec,Z:Fc,o:Gc,W:Hc,p:Ic},V=function(){function a(c){V=c.exports;V=Oc();ma=V.ua;ra();gd=V.qf;ta.unshift(V.va);xa--;d.monitorRunDependencies?.(xa);0==xa&&(null!==ya&&(clearInterval(ya),ya=null),za&&(c=za,za=null,c()));return V}var b= -{a:od};xa++;d.monitorRunDependencies?.(xa);if(d.instantiateWasm)try{return d.instantiateWasm(b,a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ga(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=V.wa)(a);d._sqlite3_free=a=>(d._sqlite3_free=V.xa)(a);d._sqlite3_malloc=a=>(d._sqlite3_malloc=V.ya)(a);d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=V.za)(a,b,c,e,f); -d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=V.Aa)();d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=V.Ba)(a,b,c);d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=V.Ca)(a,b,c,e);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=V.Da)(a,b,c);d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=V.Ea)(a,b);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=V.Fa)(a);d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=V.Ga)(a,b,c,e,f); -d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=V.Ha)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=V.Ia)(a,b,c);d._sqlite3_close=a=>(d._sqlite3_close=V.Ja)(a);d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=V.Ka)(a,b,c);d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=V.La)(a,b,c);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=V.Ma)(a,b);d._sqlite3_column_count=a=>(d._sqlite3_column_count=V.Na)(a); -d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=V.Oa)(a,b);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=V.Pa)(a,b);d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=V.Qa)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=V.Ra)(a,b);d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=V.Sa)(a,b);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=V.Ta)(a,b);d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=V.Ua)(a,b); -d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=V.Va)(a,b);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=V.Wa)(a);d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=V.Xa)(a,b,c,e,f,h,k,n,l);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=V.Ya)(a,b,c,e,f);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=V.Za)(a,b);d._sqlite3_errcode=a=>(d._sqlite3_errcode=V._a)(a);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=V.$a)(a); -d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=V.ab)(a,b,c,e,f);d._sqlite3_finalize=a=>(d._sqlite3_finalize=V.bb)(a);d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=V.cb)(a,b);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=V.db)(a,b);d._sqlite3_open=(a,b)=>(d._sqlite3_open=V.eb)(a,b);d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=V.fb)(a,b,c,e,f);d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=V.gb)(a,b,c,e,f,h); -d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=V.hb)(a,b);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=V.ib)(a,b);d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=V.jb)(a,b,c,e);d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=V.kb)(a,b,c);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=V.lb)(a,b);d._sqlite3_result_null=a=>(d._sqlite3_result_null=V.mb)(a);d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=V.nb)(a,b,c,e); -d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=V.ob)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=V.pb)(a,b);d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=V.qb)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=V.rb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=V.sb)(a,b);d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=V.tb)(a,b,c); -d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=V.ub)(a,b,c,e);d._sqlite3_sql=a=>(d._sqlite3_sql=V.vb)(a);d._sqlite3_reset=a=>(d._sqlite3_reset=V.wb)(a);d._sqlite3_value_text=a=>(d._sqlite3_value_text=V.xb)(a);d._sqlite3_value_type=a=>(d._sqlite3_value_type=V.yb)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=V.zb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=V.Ab)(a);d._sqlite3_value_int=a=>(d._sqlite3_value_int=V.Bb)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=V.Cb)(a); -d._sqlite3_value_double=a=>(d._sqlite3_value_double=V.Db)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=V.Eb)(a,b);d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=V.Fb)(a);d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=V.Gb)(a);d._sqlite3_step=a=>(d._sqlite3_step=V.Hb)(a);d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=V.Ib)(a,b,c,e);d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=V.Jb)(a,b,c,e); -d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=V.Kb)(a,b,c,e,f);d._sqlite3_msize=a=>(d._sqlite3_msize=V.Lb)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=V.Mb)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=V.Nb)(a,b);d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=V.Ob)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=V.Pb)(a);d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=V.Qb)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=V.Rb)(); -d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=V.Sb)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=V.Tb)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=V.Ub)(a,b);d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=V.Vb)(a,b);d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=V.Wb)(a,b,c);d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=V.Xb)(a,b,c);d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=V.Yb)(a,b,c); -d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=V.Zb)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=V._b)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=V.$b)(a,b,c);d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=V.ac)(a);d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=V.bc)(a);d._sqlite3_str_length=a=>(d._sqlite3_str_length=V.cc)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=V.dc)(a);d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=V.ec)(a); -d._sqlite3_str_new=a=>(d._sqlite3_str_new=V.fc)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=V.gc)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=V.hc)(a,b);d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=V.ic)(a,b,c,e);d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=V.jc)(a,b,c,e);d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=V.kc)(a,b,c);d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=V.lc)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=V.mc)(a,b,c); -d._sqlite3_os_init=()=>(d._sqlite3_os_init=V.nc)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=V.oc)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=V.pc)(a,b,c,e);d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=V.qc)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=V.rc)(a);d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=V.sc)(a,b,c,e);d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=V.tc)(a,b); -d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=V.uc)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=V.vc)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=V.wc)(a);d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=V.xc)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=V.yc)(a);d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=V.zc)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=V.Ac)(a); -d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=V.Bc)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=V.Cc)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=V.Dc)(a);d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=V.Ec)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=V.Fc)(a);d._sqlite3_value_free=a=>(d._sqlite3_value_free=V.Gc)(a);d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=V.Hc)(a,b,c,e,f); -d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=V.Ic)(a,b,c);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=V.Jc)(a,b,c,e,f,h);d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=V.Kc)(a,b,c,e);d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=V.Lc)(a,b,c,e);d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=V.Mc)(a,b,c,e);d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=V.Nc)(a); -d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=V.Oc)(a,b);d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=V.Pc)(a,b,c);d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=V.Qc)(a);d._sqlite3_user_data=a=>(d._sqlite3_user_data=V.Rc)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=V.Sc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=V.Tc)(a,b);d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=V.Uc)(a,b); -d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=V.Vc)(a,b);d._sqlite3_data_count=a=>(d._sqlite3_data_count=V.Wc)(a);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=V.Xc)(a,b);d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=V.Yc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=V.Zc)(a,b);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=V._c)(a,b,c,e,f,h); -d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=V.$c)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=V.ad)(a,b,c,e,f);d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=V.bd)(a,b,c);d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=V.cd)(a,b,c,e);d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=V.dd)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=V.ed)(a,b); -d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=V.fd)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=V.gd)(a);d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=V.hd)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=V.id)(a);d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=V.jd)(a,b);d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=V.kd)(a);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=V.ld)(a,b,c); -d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=V.md)(a);d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=V.nd)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=V.od)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=V.pd)(a);d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=V.qd)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=V.rd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=V.sd)(a); -d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=V.td)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=V.ud)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=V.vd)(a,b,c);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=V.wd)(a);d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=V.xd)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=V.yd)(a,b,c,e,f);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=V.zd)(a,b,c,e,f); -d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=V.Ad)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=V.Bd)(a,b,c,e,f,h);d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=V.Cd)(a,b,c,e,f,h);d._sqlite3_free_table=a=>(d._sqlite3_free_table=V.Dd)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=V.Ed)(a,b,c,e);d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=V.Fd)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=V.Gd)(a); -d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=V.Hd)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=V.Id)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=V.Jd)(a,b,c);d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=V.Kd)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=V.Ld)();d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=V.Md)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=V.Nd)(a); -d._sqlite3_complete16=a=>(d._sqlite3_complete16=V.Od)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=V.Pd)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=V.Qd)();d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=V.Rd)();d._sqlite3_initialize=()=>(d._sqlite3_initialize=V.Sd)();d._sqlite3_config=(a,b)=>(d._sqlite3_config=V.Td)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=V.Ud)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=V.Vd)(a); -d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=V.Wd)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=V.Xd)(a,b,c);d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=V.Yd)(a);d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=V.Zd)(a,b,c);d._sqlite3_changes64=a=>(d._sqlite3_changes64=V._d)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=V.$d)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=V.ae)(a); -d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=V.be)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=V.ce)(a,b);d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=V.de)(a);d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=V.ee)(a,b,c);d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=V.fe)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=V.ge)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=V.he)(a); -d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=V.ie)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=V.je)(a,b,c,e,f,h,k,n);d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=V.ke)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=V.le)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=V.me)(a,b,c); -d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=V.ne)(a,b,c,e);d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=V.oe)(a,b,c);d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=V.pe)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=V.qe)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=V.re)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=V.se)(a,b,c); -d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=V.te)(a,b,c,e,f);d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=V.ue)(a,b);d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=V.ve)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=V.we)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=V.xe)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=V.ye)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=V.ze)(a); -d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=V.Ae)(a,b,c);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=V.Be)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=V.Ce)(a,b);d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=V.De)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=V.Ee)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=V.Fe)(a,b,c,e,f); -d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=V.Ge)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=V.He)(a,b,c);d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=V.Ie)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=V.Je)(a,b,c,e);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=V.Ke)(a,b,c,e,f,h,k,n,l);d._sqlite3_sleep=a=>(d._sqlite3_sleep=V.Le)(a); -d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=V.Me)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=V.Ne)(a,b,c,e);d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=V.Oe)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=V.Pe)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=V.Qe)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=V.Re)(a,b);d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=V.Se)(a,b); -d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=V.Te)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=V.Ue)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=V.Ve)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=V.We)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=V.Xe)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=V.Ye)(a,b);d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=V.Ze)(a,b); -d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=V._e)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=V.$e)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=V.af)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=V.bf)();var Zc=d._malloc=a=>(Zc=d._malloc=V.cf)(a),dd=d._free=a=>(dd=d._free=V.df)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=V.ef)(a);d._set_authorizer=a=>(d._set_authorizer=V.ff)(a); -d._create_function=(a,b,c,e,f,h)=>(d._create_function=V.gf)(a,b,c,e,f,h);d._on_tables_changed=(a,b,c,e,f,h)=>(d._on_tables_changed=V.hf)(a,b,c,e,f,h);d._register_table_update_hook=a=>(d._register_table_update_hook=V.jf)(a);d._create_module=(a,b,c,e)=>(d._create_module=V.kf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=V.lf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=V.mf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=V.nf)();var pd=d._main=(a,b)=>(pd=d._main=V.of)(a,b); -d._setup_powersync=()=>(d._setup_powersync=V.pf)();var fb=(a,b)=>(fb=V.rf)(a,b),qd=()=>(qd=V.sf)(),kd=a=>(kd=V.tf)(a),ld=a=>(ld=V.uf)(a),md=()=>(md=V.vf)(),bd=a=>(bd=V.wf)(a),Qc=()=>(Qc=V.xf)(),ad=a=>(ad=V.yf)(a),cd=()=>(cd=V.zf)();d._sqlite3_version=44971;d.getTempRet0=()=>qd();d.ccall=Z;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Z(a,b,c,h,e)}; -d.addFunction=(a,b)=>{if(!hd){hd=new WeakMap;var c=gd.length;if(hd)for(var e=0;e<0+c;e++){var f=gd.get(e);f&&hd.set(f,e)}}if(c=hd.get(a)||0)return c;if(jd.length)c=jd.pop();else{try{gd.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=gd.length-1}try{gd.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h= +var d=moduleArg,aa,ba,ca=new Promise((a,b)=>{aa=a;ba=b}),da="object"==typeof window,ea="function"==typeof importScripts,fa=Object.assign({},d),ha="./this.program",ia=(a,b)=>{throw b;},g="",ka,la; +if(da||ea)ea?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),_scriptName&&(g=_scriptName),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),ea&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=a=>fetch(a,{credentials:"same-origin"}).then(b=>b.ok?b.arrayBuffer():Promise.reject(Error(b.status+" : "+b.url))); +var ma=d.print||console.log.bind(console),r=d.printErr||console.error.bind(console);Object.assign(d,fa);fa=null;d.thisProgram&&(ha=d.thisProgram);d.quit&&(ia=d.quit);var na;d.wasmBinary&&(na=d.wasmBinary);var oa,u=!1,pa,v,w,x,qa,z,B,ra,sa; +function ta(){var a=oa.buffer;d.HEAP8=v=new Int8Array(a);d.HEAP16=x=new Int16Array(a);d.HEAPU8=w=new Uint8Array(a);d.HEAPU16=qa=new Uint16Array(a);d.HEAP32=z=new Int32Array(a);d.HEAPU32=B=new Uint32Array(a);d.HEAPF32=ra=new Float32Array(a);d.HEAPF64=sa=new Float64Array(a)}var ua=[],va=[],wa=[],xa=[];function ya(){var a=d.preRun.shift();ua.unshift(a)}var za=0,Aa=null,Ba=null; +function C(a){d.onAbort?.(a);a="Aborted("+a+")";r(a);u=!0;pa=1;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ca=a=>a.startsWith("data:application/octet-stream;base64,"),Da;function Ea(a){if(a==Da&&na)return new Uint8Array(na);if(la)return la(a);throw"both async and sync fetching of the wasm failed";}function Fa(a){return na?Promise.resolve().then(()=>Ea(a)):ka(a).then(b=>new Uint8Array(b),()=>Ea(a))} +function Ga(a,b,c){return Fa(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);C(e)})}function Ha(a,b){var c=Da;return na||"function"!=typeof WebAssembly.instantiateStreaming||Ca(c)||"function"!=typeof fetch?Ga(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Ga(c,a,b)}))}var D,F; +function Ia(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ja=a=>{for(;0>1];case "i32":return z[a>>2];case "i64":C("to do getValue(i64) use WASM_BIGINT");case "float":return ra[a>>2];case "double":return sa[a>>3];case "*":return B[a>>2];default:C(`invalid type for getValue: ${b}`)}} +var Ka=d.noExitRuntime||!0;function I(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":v[a]=b;break;case "i8":v[a]=b;break;case "i16":x[a>>1]=b;break;case "i32":z[a>>2]=b;break;case "i64":C("to do setValue(i64) use WASM_BIGINT");case "float":ra[a>>2]=b;break;case "double":sa[a>>3]=b;break;case "*":B[a>>2]=b;break;default:C(`invalid type for setValue: ${c}`)}} +var La="undefined"!=typeof TextDecoder?new TextDecoder:void 0,J=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},Ma=(a, +b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Na=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ma(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Oa=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},Pa=a=>{if("/"===a)return"/"; +a=Na(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Qa=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);C("initRandomDevice")},Ra=a=>(Ra=Qa())(a),Sa=(...a)=>{for(var b="",c=!1,e=a.length-1;-1<=e&&!c;e--){c=0<=e?a[e]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Ma(b.split("/").filter(f=>!!f),!c).join("/");return(c? +"/":"")+b||"."},Ta=[],Ua=a=>{for(var b=0,c=0;c=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},K=(a,b,c,e)=>{if(!(0=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)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 Va(a,b,c){c=Array(0=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.Bf,a.Bf=new Uint8Array(b),0=a.node.Df)return 0;a=Math.min(a.node.Df-f,e);if(8b)throw new N(28);return b},hg(a,b,c){bb(a.node,b+c);a.node.Df=Math.max(a.node.Df,b+c)},Xf(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new N(43);a=a.node.Bf;if(f&2||a.buffer!==v.buffer){if(0{var c=0;a&&(c|=365);b&&(c|=146);return c},ib=null,jb={},kb=[],lb=1,Q=null,mb=!0,N=class{constructor(a){this.name="ErrnoError";this.Cf=a}},eb={},nb=class{constructor(){this.bg={};this.node=null}get flags(){return this.bg.flags}set flags(a){this.bg.flags= +a}get position(){return this.bg.position}set position(a){this.bg.position=a}},ob=class{constructor(a,b,c,e){a||=this;this.parent=a;this.If=a.If;this.Of=null;this.id=lb++;this.name=b;this.mode=c;this.zf={};this.Af={};this.Tf=e}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}}; +function R(a,b={}){a=Sa(a);if(!a)return{path:"",node:null};b=Object.assign({jg:!0,fg:0},b);if(8!!k);for(var c=ib,e="/",f=0;f>>0)%Q.length}function sb(a){var b=rb(a.parent.id,a.name);if(Q[b]===a)Q[b]=a.Pf;else for(b=Q[b];b;){if(b.Pf===a){b.Pf=a.Pf;break}b=b.Pf}} +function fb(a,b){var c=P(a.mode)?(c=tb(a,"x"))?c:a.zf.Rf?0:2:54;if(c)throw new N(c);for(c=Q[rb(a.id,b)];c;c=c.Pf){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.zf.Rf(a,b)}function db(a,b,c,e){a=new ob(a,b,c,e);b=rb(a.parent.id,a.name);a.Pf=Q[b];return Q[b]=a}function P(a){return 16384===(a&61440)}function ub(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b} +function tb(a,b){if(mb)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}function vb(a,b){try{return fb(a,b),20}catch(c){}return tb(a,"wx")}function wb(a,b,c){try{var e=fb(a,b)}catch(f){return f.Cf}if(a=tb(a,"wx"))return a;if(c){if(!P(e.mode))return 54;if(e===e.parent||"/"===qb(e))return 10}else if(P(e.mode))return 31;return 0}function S(a){a=kb[a];if(!a)throw new N(8);return a} +function xb(a,b=-1){a=Object.assign(new nb,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!kb[b])break a;throw new N(33);}a.Kf=b;return kb[b]=a}function yb(a,b=-1){a=xb(a,b);a.Af?.Jg?.(a);return a}var cb={open(a){a.Af=jb[a.node.Tf].Af;a.Af.open?.(a)},Nf(){throw new N(70);}};function Ya(a,b){jb[a]={Af:b}} +function zb(a,b){var c="/"===b;if(c&&ib)throw new N(10);if(!c&&b){var e=R(b,{jg:!1});b=e.path;e=e.node;if(e.Of)throw new N(10);if(!P(e.mode))throw new N(54);}b={type:a,Og:{},mg:b,yg:[]};a=a.If(b);a.If=b;b.root=a;c?ib=a:e&&(e.Of=b,e.If&&e.If.yg.push(b))}function Ab(a,b,c){var e=R(a,{parent:!0}).node;a=Pa(a);if(!a||"."===a||".."===a)throw new N(28);var f=vb(e,a);if(f)throw new N(f);if(!e.zf.Wf)throw new N(63);return e.zf.Wf(e,a,b,c)}function T(a,b){return Ab(a,(void 0!==b?b:511)&1023|16384,0)} +function Bb(a,b,c){"undefined"==typeof c&&(c=b,b=438);Ab(a,b|8192,c)}function Cb(a,b){if(!Sa(a))throw new N(44);var c=R(b,{parent:!0}).node;if(!c)throw new N(44);b=Pa(b);var e=vb(c,b);if(e)throw new N(e);if(!c.zf.$f)throw new N(63);c.zf.$f(c,b,a)}function Db(a){var b=R(a,{parent:!0}).node;a=Pa(a);var c=fb(b,a),e=wb(b,a,!0);if(e)throw new N(e);if(!b.zf.Zf)throw new N(63);if(c.Of)throw new N(10);b.zf.Zf(b,a);sb(c)} +function pb(a){a=R(a).node;if(!a)throw new N(44);if(!a.zf.Uf)throw new N(28);return Sa(qb(a.parent),a.zf.Uf(a))}function Eb(a,b){a=R(a,{Mf:!b}).node;if(!a)throw new N(44);if(!a.zf.Hf)throw new N(63);return a.zf.Hf(a)}function Fb(a){return Eb(a,!0)}function Gb(a,b){a="string"==typeof a?R(a,{Mf:!0}).node:a;if(!a.zf.Ef)throw new N(63);a.zf.Ef(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} +function Hb(a,b){if(0>b)throw new N(28);a="string"==typeof a?R(a,{Mf:!0}).node:a;if(!a.zf.Ef)throw new N(63);if(P(a.mode))throw new N(31);if(32768!==(a.mode&61440))throw new N(28);var c=tb(a,"w");if(c)throw new N(c);a.zf.Ef(a,{size:b,timestamp:Date.now()})} +function Ib(a,b,c){if(""===a)throw new N(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=Na(a);try{f=R(a,{Mf:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new N(20);}else f=Ab(a,c,0),e=!0;if(!f)throw new N(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!P(f.mode))throw new N(54);if(!e&&(c= +f?40960===(f.mode&61440)?32:P(f.mode)&&("r"!==ub(b)||b&512)?31:tb(f,ub(b)):44))throw new N(c);b&512&&!e&&Hb(f,0);b&=-131713;f=xb({node:f,path:qb(f),flags:b,seekable:!0,position:0,Af:f.Af,Dg:[],error:!1});f.Af.open&&f.Af.open(f);!d.logReadFiles||b&1||(Jb||={},a in Jb||(Jb[a]=1));return f}function Kb(a,b,c){if(null===a.Kf)throw new N(8);if(!a.seekable||!a.Af.Nf)throw new N(70);if(0!=c&&1!=c&&2!=c)throw new N(28);a.position=a.Af.Nf(a,b,c);a.Dg=[]}var Lb; +function Mb(a,b,c){a=Na("/dev/"+a);var e=hb(!!b,!!c);Nb||=64;var f=Nb++<<8|0;Ya(f,{open(h){h.seekable=!1},close(){c?.buffer?.length&&c(10)},read(h,k,n,l){for(var m=0,p=0;p>2]=a.ug;z[c+4>>2]=a.mode;B[c+8>>2]=a.Ag;z[c+12>>2]=a.uid;z[c+16>>2]=a.xg;z[c+20>>2]=a.Tf;F=[a.size>>>0,(D=a.size,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+24>>2]=F[0];z[c+28>>2]=F[1];z[c+32>>2]=4096;z[c+36>>2]=a.sg;b=a.qg.getTime();var e=a.zg.getTime(),f=a.tg.getTime();F=[Math.floor(b/1E3)>>>0,(D=Math.floor(b/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0: +0)];z[c+40>>2]=F[0];z[c+44>>2]=F[1];B[c+48>>2]=b%1E3*1E3;F=[Math.floor(e/1E3)>>>0,(D=Math.floor(e/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+56>>2]=F[0];z[c+60>>2]=F[1];B[c+64>>2]=e%1E3*1E3;F=[Math.floor(f/1E3)>>>0,(D=Math.floor(f/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+72>>2]=F[0];z[c+76>>2]=F[1];B[c+80>>2]=f%1E3*1E3;F=[a.lg>>>0,(D=a.lg,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[c+88>>2]=F[0];z[c+92>>2]=F[1];return 0}var Qb=void 0;function Rb(){var a=z[+Qb>>2];Qb+=4;return a} +var Sb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Tb=[0,31,60,91,121,152,182,213,244,274,305,335],Ub=[0,31,59,90,120,151,181,212,243,273,304,334],Vb={},Xb=()=>{if(!Wb){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",_:ha||"./this.program"},b;for(b in Vb)void 0===Vb[b]?delete a[b]:a[b]=Vb[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Wb=c}return Wb}, +Wb;function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){}function Bc(){}function Cc(){}function Dc(){} +function Ec(){}function Fc(){}function Gc(){}function Hc(){}function Ic(){}function Jc(){}var Kc=0,Lc=a=>{pa=a;Ka||0{a instanceof Ia||"unwind"==a||ia(1,a)},Nc=a=>{try{a()}catch(b){C(b)}},Oc=a=>{if(!u)try{if(a(),!(Ka||0{Qc.push(c);try{return e(...f)}finally{u||(Qc.pop(),W&&1===Y&&0===Qc.length&&(Y=0,Nc(Rc),"undefined"!=typeof Fibers&&Fibers.Pg()))}}:e;return b}var Y=0,W=null,Sc=0,Qc=[],Tc={},Uc={},Vc=0,Wc=null,Xc=[];function Yc(){return new Promise((a,b)=>{Wc={resolve:a,reject:b}})} +function Zc(){var a=$c(16396),b=a+12;B[a>>2]=b;B[a+4>>2]=b+16384;b=Qc[0];var c=Tc[b];void 0===c&&(c=Vc++,Tc[b]=c,Uc[c]=b);z[a+8>>2]=c;return a} +function ad(a){if(!u){if(0===Y){var b=!1,c=!1;a((e=0)=>{if(!u&&(Sc=e,b=!0,c)){Y=2;Nc(()=>bd(W));"undefined"!=typeof Browser&&Browser.dg.wg&&Browser.dg.resume();e=!1;try{var f=(0,V[Uc[z[W+8>>2]]])()}catch(n){f=n,e=!0}var h=!1;if(!W){var k=Wc;k&&(Wc=null,(e?k.reject:k.resolve)(f),h=!0)}if(e&&!h)throw f;}});c=!0;b||(Y=1,W=Zc(),"undefined"!=typeof Browser&&Browser.dg.wg&&Browser.dg.pause(),Nc(()=>cd(W)))}else 2===Y?(Y=0,Nc(dd),ed(W),W=null,Xc.forEach(Oc)):C(`invalid state: ${Y}`);return Sc}} +function fd(a){return ad(b=>{a().then(b)})} +var gd={},hd,jd,kd=[],Z=(a,b,c,e,f)=>{function h(q){--Kc;0!==l&&ld(l);return"string"===b?q?J(w,q):"":"boolean"===b?!!q:q}var k={string:q=>{var t=0;if(null!==q&&void 0!==q&&0!==q){t=Ua(q)+1;var y=md(t);K(q,w,y,t);t=y}return t},array:q=>{var t=md(q.length);v.set(q,t);return t}};a=d["_"+a];var n=[],l=0;if(e)for(var m=0;m{eb[a]=new N(a);eb[a].stack=""});Q=Array(4096);zb(O,"/");T("/tmp");T("/home");T("/home/web_user");(function(){T("/dev");Ya(259,{read:()=>0,write:(e,f,h,k)=>k});Bb("/dev/null",259);Xa(1280,$a);Xa(1536,ab);Bb("/dev/tty",1280);Bb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Ra(a).byteLength);return a[--b]};Mb("random",c);Mb("urandom",c);T("/dev/shm");T("/dev/shm/tmp")})(); +(function(){T("/proc");var a=T("/proc/self");T("/proc/self/fd");zb({If(){var b=db(a,"fd",16895,73);b.zf={Rf(c,e){var f=S(+e);c={parent:null,If:{mg:"fake"},zf:{Uf:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); +(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,gg:e}):a.delete(b);return Z("set_authorizer","number",["number"],[b])};Yb=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,gg:l}=a.get(b);return n(l,c,e?e?J(w,e):"":null,f?f?J(w,f):"":null,h?h?J(w,h):"":null,k?k?J(w,k):"":null)}return 0}})(); +(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,Lf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,vg:l,Lf:k});return Z("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};$b=function(c,e,f,h){c=a.get(c);b.set(e, +c.Lf);c.f(e,new Uint32Array(w.buffer,h,f));b.delete(e)};bc=function(c,e,f,h){c=a.get(c);b.set(e,c.Lf);c.step(e,new Uint32Array(w.buffer,h,f));b.delete(e)};Zb=function(c,e){c=a.get(c);b.set(e,c.Lf);c.vg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,gg:f}):a.delete(b);return Z("progress_handler",null,["number","number"],[b,c])};ac=function(b){if(a.has(b)){const {f:c,gg:e}=a.get(b);return c(e)}return 0}})(); +(function(){function a(l,m){const p=`get${l}`,q=`set${l}`;return new Proxy(new DataView(w.buffer,m,"Int32"===l?4:8),{get(t,y){if(y===p)return function(A,G){if(!G)throw Error("must be little endian");return t[y](A,G)};if(y===q)return function(A,G,E){if(!E)throw Error("must be little endian");return t[y](A,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return t[y]}})}const b="object"===typeof gd,c=new Map,e=new Map,f=new Map,h=b?new Set:null,k=b?new Set:null,n=new Map; +sc=function(l,m,p,q){n.set(l?J(w,l):"",{size:m,Sf:Array.from(new Uint32Array(w.buffer,q,p))})};d.createModule=function(l,m,p,q){b&&(p.handleAsync=fd);const t=c.size;c.set(t,{module:p,Lf:q});q=0;p.xCreate&&(q|=1);p.xConnect&&(q|=2);p.xBestIndex&&(q|=4);p.xDisconnect&&(q|=8);p.xDestroy&&(q|=16);p.xOpen&&(q|=32);p.xClose&&(q|=64);p.xFilter&&(q|=128);p.xNext&&(q|=256);p.xEof&&(q|=512);p.xColumn&&(q|=1024);p.xRowid&&(q|=2048);p.xUpdate&&(q|=4096);p.xBegin&&(q|=8192);p.xSync&&(q|=16384);p.xCommit&&(q|= +32768);p.xRollback&&(q|=65536);p.xFindFunction&&(q|=131072);p.xRename&&(q|=262144);return Z("create_module","number",["number","string","number","number"],[l,m,t,q])};ic=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(w.buffer,q,p)).map(A=>A?J(w,A):"");return m.module.xCreate(l,m.Lf,q,t,a("Int32",y))};hc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(w.buffer, +q,p)).map(A=>A?J(w,A):"");return m.module.xConnect(l,m.Lf,q,t,a("Int32",y))};dc=function(l,m){var p=e.get(l),q=n.get("sqlite3_index_info").Sf;const t={};t.nConstraint=H(m+q[0],"i32");t.aConstraint=[];var y=H(m+q[1],"*"),A=n.get("sqlite3_index_constraint").size;for(var G=0;Gl?2**32:0))}; +Jc=function(h,k,n,l,m){return e.get(h).xWrite(h,w.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Hc=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Gc=function(h,k){return e.get(h).xSync(h,k)};Bc=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};Cc=function(h,k){return e.get(h).xLock(h,k)};Ic=function(h,k){return e.get(h).xUnlock(h,k)};wc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};Ac=function(h,k,n){const l=e.get(h); +n=new DataView(w.buffer,n);return l.xFileControl(h,k,n)};Fc=function(h){return e.get(h).xSectorSize(h)};zc=function(h){return e.get(h).xDeviceCharacteristics(h)};Dc=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var p of f)e.delete(p)}p=null;if(l&64){p=1;const q=[];for(;p;){const t=w[k++];if(t)q.push(t);else switch(w[k]||(p=null),p){case 1:q.push(63);p=2;break;case 2:q.push(61);p=3;break;case 3:q.push(38),p=2}}p=(new TextDecoder).decode(new Uint8Array(q))}else k&&(p=k?J(w,k):""); +m=a("Int32",m);return h.xOpen(p,n,l,m)};yc=function(h,k,n){return c.get(h).xDelete(k?J(w,k):"",n)};vc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?J(w,k):"",n,l)}})(); +var pd={a:(a,b,c,e)=>{C(`Assertion failed: ${a?J(w,a):""}, at: `+[b?b?J(w,b):"":"unknown filename",c,e?e?J(w,e):"":"unknown function"])},N:function(a,b){try{return a=a?J(w,a):"",Gb(a,b),0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Cf}},Q:function(a,b,c){try{b=b?J(w,b):"";b=Ob(a,b);if(c&-8)return-28;var e=R(b,{Mf:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&tb(e,a)?-2:0}catch(f){if("undefined"==typeof U||"ErrnoError"!==f.name)throw f; +return-f.Cf}},O:function(a,b){try{var c=S(a);Gb(c.node,b);return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Cf}},M:function(a){try{var b=S(a).node;var c="string"==typeof b?R(b,{Mf:!0}).node:b;if(!c.zf.Ef)throw new N(63);c.zf.Ef(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Cf}},b:function(a,b,c){Qb=c;try{var e=S(a);switch(b){case 0:var f=Rb();if(0>f)break;for(;kb[f];)f++;return yb(e,f).Kf;case 1:case 2:return 0; +case 3:return e.flags;case 4:return f=Rb(),e.flags|=f,0;case 12:return f=Rb(),x[f+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(h){if("undefined"==typeof U||"ErrnoError"!==h.name)throw h;return-h.Cf}},L:function(a,b){try{var c=S(a);return Pb(Eb,c.path,b)}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return-e.Cf}},n:function(a,b,c){b=Sb(b,c);try{if(isNaN(b))return 61;var e=S(a);if(0===(e.flags&2097155))throw new N(28);Hb(e.node,b);return 0}catch(f){if("undefined"==typeof U|| +"ErrnoError"!==f.name)throw f;return-f.Cf}},F:function(a,b){try{if(0===b)return-28;var c=Ua("/")+1;if(b=e)return-28;var f=pb(b),h=Math.min(e,Ua(f)),k=v[c+h];K(f,w,c,e+1);v[c+ +h]=k;return h}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Cf}},x:function(a){try{return a=a?J(w,a):"",Db(a),0}catch(b){if("undefined"==typeof U||"ErrnoError"!==b.name)throw b;return-b.Cf}},K:function(a,b){try{return a=a?J(w,a):"",Pb(Eb,a,b)}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return-c.Cf}},u:function(a,b,c){try{b=b?J(w,b):"";b=Ob(a,b);if(0===c){a=b;var e=R(a,{parent:!0}).node;if(!e)throw new N(44);var f=Pa(a),h=fb(e,f),k=wb(e,f,!1);if(k)throw new N(k); +if(!e.zf.ag)throw new N(63);if(h.Of)throw new N(10);e.zf.ag(e,f);sb(h)}else 512===c?Db(b):C("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof U||"ErrnoError"!==n.name)throw n;return-n.Cf}},t:function(a,b,c){try{b=b?J(w,b):"";b=Ob(a,b,!0);if(c){var e=B[c>>2]+4294967296*z[c+4>>2],f=z[c+8>>2];h=1E3*e+f/1E6;c+=16;e=B[c>>2]+4294967296*z[c+4>>2];f=z[c+8>>2];k=1E3*e+f/1E6}else var h=Date.now(),k=h;a=h;var n=R(b,{Mf:!0}).node;n.zf.Ef(n,{timestamp:Math.max(a,k)});return 0}catch(l){if("undefined"== +typeof U||"ErrnoError"!==l.name)throw l;return-l.Cf}},k:function(a,b,c){a=new Date(1E3*Sb(a,b));z[c>>2]=a.getSeconds();z[c+4>>2]=a.getMinutes();z[c+8>>2]=a.getHours();z[c+12>>2]=a.getDate();z[c+16>>2]=a.getMonth();z[c+20>>2]=a.getFullYear()-1900;z[c+24>>2]=a.getDay();b=a.getFullYear();z[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Ub:Tb)[a.getMonth()]+a.getDate()-1|0;z[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset(); +z[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},i:function(a,b,c,e,f,h,k,n){f=Sb(f,h);try{if(isNaN(f))return 61;var l=S(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new N(2);if(1===(l.flags&2097155))throw new N(2);if(!l.Af.Xf)throw new N(43);var m=l.Af.Xf(l,a,f,b,c);var p=m.Bg;z[k>>2]=m.pg;B[n>>2]=p;return 0}catch(q){if("undefined"==typeof U||"ErrnoError"!==q.name)throw q;return-q.Cf}},j:function(a,b,c,e,f,h,k){h=Sb(h,k);try{var n=S(f);if(c&2){if(32768!==(n.node.mode&61440))throw new N(43); +e&2||n.Af.Yf&&n.Af.Yf(n,w.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof U||"ErrnoError"!==l.name)throw l;return-l.Cf}},B:(a,b,c,e)=>{var f=(new Date).getFullYear(),h=(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();B[a>>2]=60*Math.max(h,f);z[b>>2]=Number(h!=f);b=k=>{var n=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`};a=b(h);b=b(f);fDate.now(), +d:()=>performance.now(),r:a=>{var b=w.length;a>>>=0;if(2147483648=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=(f.min.call(f,2147483648,e+(65536-e%65536)%65536)-oa.buffer.byteLength+65535)/65536;try{oa.grow(f);ta();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1},D:(a,b)=>{var c=0;Xb().forEach((e,f)=>{var h=b+c;f=B[a+4*f>>2]=h;for(h=0;h{var c=Xb(); +B[a>>2]=c.length;var e=0;c.forEach(f=>e+=f.length+1);B[b>>2]=e;return 0},f:function(a){try{var b=S(a);if(null===b.Kf)throw new N(8);b.cg&&(b.cg=null);try{b.Af.close&&b.Af.close(b)}catch(c){throw c;}finally{kb[b.Kf]=null}b.Kf=null;return 0}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Cf}},s:function(a,b){try{var c=S(a);v[b]=c.Gf?2:P(c.mode)?3:40960===(c.mode&61440)?7:4;x[b+2>>1]=0;F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>> +0:0)];z[b+8>>2]=F[0];z[b+12>>2]=F[1];F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[b+16>>2]=F[0];z[b+20>>2]=F[1];return 0}catch(e){if("undefined"==typeof U||"ErrnoError"!==e.name)throw e;return e.Cf}},z:function(a,b,c,e){try{a:{var f=S(a);a=b;for(var h,k=b=0;k>2],l=B[a+4>>2];a+=8;var m=f,p=h,q=v;if(0>l||0>p)throw new N(28);if(null===m.Kf)throw new N(8);if(1===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31); +if(!m.Af.read)throw new N(28);var t="undefined"!=typeof p;if(!t)p=m.position;else if(!m.seekable)throw new N(70);var y=m.Af.read(m,q,n,l,p);t||(m.position+=y);var A=y;if(0>A){var G=-1;break a}b+=A;if(A>2]=G;return 0}catch(E){if("undefined"==typeof U||"ErrnoError"!==E.name)throw E;return E.Cf}},m:function(a,b,c,e,f){b=Sb(b,c);try{if(isNaN(b))return 61;var h=S(a);Kb(h,b,e);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>> +0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];z[f>>2]=F[0];z[f+4>>2]=F[1];h.cg&&0===b&&0===e&&(h.cg=null);return 0}catch(k){if("undefined"==typeof U||"ErrnoError"!==k.name)throw k;return k.Cf}},G:function(a){try{var b=S(a);return ad(c=>{var e=b.node.If;e.type.Cg?e.type.Cg(e,!1,f=>{f?c(29):c(0)}):c(0)})}catch(c){if("undefined"==typeof U||"ErrnoError"!==c.name)throw c;return c.Cf}},v:function(a,b,c,e){try{a:{var f=S(a);a=b;for(var h,k=b=0;k>2],l=B[a+4>>2];a+=8;var m=f,p=n,q=l, +t=h,y=v;if(0>q||0>t)throw new N(28);if(null===m.Kf)throw new N(8);if(0===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31);if(!m.Af.write)throw new N(28);m.seekable&&m.flags&1024&&Kb(m,0,2);var A="undefined"!=typeof t;if(!A)t=m.position;else if(!m.seekable)throw new N(70);var G=m.Af.write(m,y,p,q,t,void 0);A||(m.position+=G);var E=G;if(0>E){var M=-1;break a}b+=E;"undefined"!=typeof h&&(h+=E)}M=b}B[e>>2]=M;return 0}catch(L){if("undefined"==typeof U||"ErrnoError"!==L.name)throw L;return L.Cf}}, +sa:Yb,P:Zb,ha:$b,ca:ac,Z:bc,la:cc,w:dc,g:ec,oa:fc,ja:gc,ea:hc,fa:ic,h:jc,l:kc,pa:lc,ra:mc,qa:nc,da:oc,ga:pc,ia:qc,na:rc,c:sc,ka:tc,ma:uc,H:function(a,b,c,e){(0,globalThis.__onTablesChanged)?.(a,b,c,e)},aa:vc,V:wc,$:xc,ba:yc,S:zc,U:Ac,Y:Bc,X:Cc,R:Dc,q:Ec,T:Fc,_:Gc,o:Hc,W:Ic,p:Jc},V=function(){function a(c){V=c.exports;V=Pc();oa=V.ta;ta();hd=V.pf;va.unshift(V.ua);za--;d.monitorRunDependencies?.(za);0==za&&(null!==Aa&&(clearInterval(Aa),Aa=null),Ba&&(c=Ba,Ba=null,c()));return V}var b={a:pd};za++;d.monitorRunDependencies?.(za); +if(d.instantiateWasm)try{return d.instantiateWasm(b,a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Da||=d.locateFile?Ca("wa-sqlite-async.wasm")?"wa-sqlite-async.wasm":d.locateFile?d.locateFile("wa-sqlite-async.wasm",g):g+"wa-sqlite-async.wasm":(new URL("wa-sqlite-async.wasm",import.meta.url)).href;Ha(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=V.va)(a);d._sqlite3_free=a=>(d._sqlite3_free=V.wa)(a); +d._sqlite3_malloc=a=>(d._sqlite3_malloc=V.xa)(a);d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=V.ya)(a,b,c,e,f);d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=V.za)();d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=V.Aa)(a,b,c);d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=V.Ba)(a,b,c,e);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=V.Ca)(a,b,c);d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=V.Da)(a,b);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=V.Ea)(a); +d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=V.Fa)(a,b,c,e,f);d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=V.Ga)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=V.Ha)(a,b,c);d._sqlite3_close=a=>(d._sqlite3_close=V.Ia)(a);d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=V.Ja)(a,b,c);d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=V.Ka)(a,b,c);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=V.La)(a,b); +d._sqlite3_column_count=a=>(d._sqlite3_column_count=V.Ma)(a);d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=V.Na)(a,b);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=V.Oa)(a,b);d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=V.Pa)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=V.Qa)(a,b);d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=V.Ra)(a,b);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=V.Sa)(a,b); +d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=V.Ta)(a,b);d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=V.Ua)(a,b);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=V.Va)(a);d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=V.Wa)(a,b,c,e,f,h,k,n,l);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=V.Xa)(a,b,c,e,f);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=V.Ya)(a,b); +d._sqlite3_errcode=a=>(d._sqlite3_errcode=V.Za)(a);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=V._a)(a);d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=V.$a)(a,b,c,e,f);d._sqlite3_finalize=a=>(d._sqlite3_finalize=V.ab)(a);d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=V.bb)(a,b);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=V.cb)(a,b);d._sqlite3_open=(a,b)=>(d._sqlite3_open=V.db)(a,b);d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=V.eb)(a,b,c,e,f); +d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=V.fb)(a,b,c,e,f,h);d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=V.gb)(a,b);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=V.hb)(a,b);d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=V.ib)(a,b,c,e);d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=V.jb)(a,b,c);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=V.kb)(a,b);d._sqlite3_result_null=a=>(d._sqlite3_result_null=V.lb)(a); +d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=V.mb)(a,b,c,e);d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=V.nb)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=V.ob)(a,b);d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=V.pb)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=V.qb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=V.rb)(a,b); +d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=V.sb)(a,b,c);d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=V.tb)(a,b,c,e);d._sqlite3_sql=a=>(d._sqlite3_sql=V.ub)(a);d._sqlite3_reset=a=>(d._sqlite3_reset=V.vb)(a);d._sqlite3_value_text=a=>(d._sqlite3_value_text=V.wb)(a);d._sqlite3_value_type=a=>(d._sqlite3_value_type=V.xb)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=V.yb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=V.zb)(a); +d._sqlite3_value_int=a=>(d._sqlite3_value_int=V.Ab)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=V.Bb)(a);d._sqlite3_value_double=a=>(d._sqlite3_value_double=V.Cb)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=V.Db)(a,b);d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=V.Eb)(a);d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=V.Fb)(a);d._sqlite3_step=a=>(d._sqlite3_step=V.Gb)(a);d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=V.Hb)(a,b,c,e); +d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=V.Ib)(a,b,c,e);d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=V.Jb)(a,b,c,e,f);d._sqlite3_msize=a=>(d._sqlite3_msize=V.Kb)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=V.Lb)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=V.Mb)(a,b);d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=V.Nb)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=V.Ob)(a); +d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=V.Pb)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=V.Qb)();d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=V.Rb)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=V.Sb)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=V.Tb)(a,b);d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=V.Ub)(a,b);d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=V.Vb)(a,b,c); +d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=V.Wb)(a,b,c);d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=V.Xb)(a,b,c);d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=V.Yb)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=V.Zb)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=V._b)(a,b,c);d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=V.$b)(a);d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=V.ac)(a); +d._sqlite3_str_length=a=>(d._sqlite3_str_length=V.bc)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=V.cc)(a);d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=V.dc)(a);d._sqlite3_str_new=a=>(d._sqlite3_str_new=V.ec)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=V.fc)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=V.gc)(a,b);d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=V.hc)(a,b,c,e);d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=V.ic)(a,b,c,e); +d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=V.jc)(a,b,c);d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=V.kc)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=V.lc)(a,b,c);d._sqlite3_os_init=()=>(d._sqlite3_os_init=V.mc)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=V.nc)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=V.oc)(a,b,c,e);d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=V.pc)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=V.qc)(a); +d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=V.rc)(a,b,c,e);d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=V.sc)(a,b);d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=V.tc)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=V.uc)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=V.vc)(a);d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=V.wc)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=V.xc)(a); +d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=V.yc)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=V.zc)(a);d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=V.Ac)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=V.Bc)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=V.Cc)(a);d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=V.Dc)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=V.Ec)(a);d._sqlite3_value_free=a=>(d._sqlite3_value_free=V.Fc)(a); +d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=V.Gc)(a,b,c,e,f);d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=V.Hc)(a,b,c);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=V.Ic)(a,b,c,e,f,h);d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=V.Jc)(a,b,c,e);d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=V.Kc)(a,b,c,e);d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=V.Lc)(a,b,c,e); +d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=V.Mc)(a);d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=V.Nc)(a,b);d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=V.Oc)(a,b,c);d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=V.Pc)(a);d._sqlite3_user_data=a=>(d._sqlite3_user_data=V.Qc)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=V.Rc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=V.Sc)(a,b); +d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=V.Tc)(a,b);d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=V.Uc)(a,b);d._sqlite3_data_count=a=>(d._sqlite3_data_count=V.Vc)(a);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=V.Wc)(a,b);d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=V.Xc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=V.Yc)(a,b);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=V.Zc)(a,b,c,e,f,h); +d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=V._c)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=V.$c)(a,b,c,e,f);d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=V.ad)(a,b,c);d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=V.bd)(a,b,c,e);d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=V.cd)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=V.dd)(a,b); +d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=V.ed)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=V.fd)(a);d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=V.gd)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=V.hd)(a);d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=V.id)(a,b);d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=V.jd)(a);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=V.kd)(a,b,c); +d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=V.ld)(a);d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=V.md)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=V.nd)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=V.od)(a);d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=V.pd)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=V.qd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=V.rd)(a); +d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=V.sd)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=V.td)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=V.ud)(a,b,c);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=V.vd)(a);d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=V.wd)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=V.xd)(a,b,c,e,f);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=V.yd)(a,b,c,e,f); +d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=V.zd)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=V.Ad)(a,b,c,e,f,h);d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=V.Bd)(a,b,c,e,f,h);d._sqlite3_free_table=a=>(d._sqlite3_free_table=V.Cd)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=V.Dd)(a,b,c,e);d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=V.Ed)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=V.Fd)(a); +d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=V.Gd)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=V.Hd)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=V.Id)(a,b,c);d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=V.Jd)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=V.Kd)();d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=V.Ld)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=V.Md)(a); +d._sqlite3_complete16=a=>(d._sqlite3_complete16=V.Nd)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=V.Od)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=V.Pd)();d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=V.Qd)();d._sqlite3_initialize=()=>(d._sqlite3_initialize=V.Rd)();d._sqlite3_config=(a,b)=>(d._sqlite3_config=V.Sd)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=V.Td)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=V.Ud)(a); +d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=V.Vd)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=V.Wd)(a,b,c);d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=V.Xd)(a);d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=V.Yd)(a,b,c);d._sqlite3_changes64=a=>(d._sqlite3_changes64=V.Zd)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=V._d)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=V.$d)(a); +d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=V.ae)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=V.be)(a,b);d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=V.ce)(a);d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=V.de)(a,b,c);d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=V.ee)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=V.fe)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=V.ge)(a); +d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=V.he)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=V.ie)(a,b,c,e,f,h,k,n);d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=V.je)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=V.ke)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=V.le)(a,b,c); +d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=V.me)(a,b,c,e);d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=V.ne)(a,b,c);d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=V.oe)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=V.pe)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=V.qe)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=V.re)(a,b,c); +d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=V.se)(a,b,c,e,f);d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=V.te)(a,b);d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=V.ue)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=V.ve)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=V.we)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=V.xe)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=V.ye)(a); +d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=V.ze)(a,b,c);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=V.Ae)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=V.Be)(a,b);d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=V.Ce)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=V.De)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=V.Ee)(a,b,c,e,f); +d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=V.Fe)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=V.Ge)(a,b,c);d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=V.He)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=V.Ie)(a,b,c,e);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=V.Je)(a,b,c,e,f,h,k,n,l);d._sqlite3_sleep=a=>(d._sqlite3_sleep=V.Ke)(a); +d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=V.Le)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=V.Me)(a,b,c,e);d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=V.Ne)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=V.Oe)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=V.Pe)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=V.Qe)(a,b);d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=V.Re)(a,b); +d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=V.Se)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=V.Te)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=V.Ue)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=V.Ve)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=V.We)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=V.Xe)(a,b);d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=V.Ye)(a,b); +d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=V.Ze)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=V._e)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=V.$e)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=V.af)();var $c=d._malloc=a=>($c=d._malloc=V.bf)(a),ed=d._free=a=>(ed=d._free=V.cf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=V.df)(a);d._set_authorizer=a=>(d._set_authorizer=V.ef)(a); +d._create_function=(a,b,c,e,f,h)=>(d._create_function=V.ff)(a,b,c,e,f,h);d._on_tables_changed=(a,b,c,e,f,h)=>(d._on_tables_changed=V.gf)(a,b,c,e,f,h);d._register_table_update_hook=a=>(d._register_table_update_hook=V.hf)(a);d._create_module=(a,b,c,e)=>(d._create_module=V.jf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=V.kf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=V.lf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=V.mf)();var qd=d._main=(a,b)=>(qd=d._main=V.nf)(a,b); +d._setup_powersync=()=>(d._setup_powersync=V.of)();var gb=(a,b)=>(gb=V.qf)(a,b),rd=()=>(rd=V.rf)(),ld=a=>(ld=V.sf)(a),md=a=>(md=V.tf)(a),nd=()=>(nd=V.uf)(),cd=a=>(cd=V.vf)(a),Rc=()=>(Rc=V.wf)(),bd=a=>(bd=V.xf)(a),dd=()=>(dd=V.yf)();d._sqlite3_version=46872;d.getTempRet0=()=>rd();d.ccall=Z;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Z(a,b,c,h,e)}; +d.addFunction=(a,b)=>{if(!jd){jd=new WeakMap;var c=hd.length;if(jd)for(var e=0;e<0+c;e++){var f=hd.get(e);f&&jd.set(f,e)}}if(c=jd.get(a)||0)return c;if(kd.length)c=kd.pop();else{try{hd.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=hd.length-1}try{hd.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h= {parameters:[],results:"v"==b[0]?[]:[f[b[0]]]},k=1;kk?e.push(k):e.push(k%128|128,k>>7);for(k=0;kf?b.push(f):b.push(f%128|128,f>>7);b.push(...e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b, -{e:{f:a}})).exports.f}gd.set(c,b)}hd.set(a,c);return c};d.setValue=I;d.getValue=H;d.UTF8ToString=(a,b)=>a?J(w,a,b):"";d.stringToUTF8=(a,b,c)=>K(a,w,b,c);d.lengthBytesUTF8=Ta;d.intArrayFromString=Ua;d.intArrayToString=function(a){for(var b=[],c=0;c{for(var b="";;){var c=w[a++];if(!c)return b;b+=String.fromCharCode(c)}}; -d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&oa[c];)++c;c<<=1;if(32=b/2);++e){var f=x[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f>1]=a.charCodeAt(f),b+=2;x[b>>1]=0;return b-e}; -d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=z[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}z[b>>2]=h;b+=4;if(b+4>c)break}z[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{v.set(a,b)};var rd; -za=function sd(){rd||td();rd||(za=sd)}; -function td(){function a(){if(!rd&&(rd=!0,d.calledRun=!0,!u)){d.noFSInit||Kb||(Kb=!0,d.stdin=d.stdin,d.stdout=d.stdout,d.stderr=d.stderr,d.stdin?Lb("stdin",d.stdin):Bb("/dev/tty","/dev/stdin"),d.stdout?Lb("stdout",null,d.stdout):Bb("/dev/tty","/dev/stdout"),d.stderr?Lb("stderr",null,d.stderr):Bb("/dev/tty1","/dev/stderr"),Hb("/dev/stdin",0),Hb("/dev/stdout",1),Hb("/dev/stderr",1));lb=!1;Ia(ta);Ia(ua);aa(d);if(d.onRuntimeInitialized)d.onRuntimeInitialized();if(ud){var b=pd;try{var c=b(0,0);na=c;Kc(c)}catch(e){Lc(e)}}if(d.postRun)for("function"== -typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)b=d.postRun.shift(),va.unshift(b);Ia(va)}}if(!(0a?J(w,a,b):"";d.stringToUTF8=(a,b,c)=>K(a,w,b,c);d.lengthBytesUTF8=Ua;d.intArrayFromString=Va;d.intArrayToString=function(a){for(var b=[],c=0;c{for(var b="";;){var c=w[a++];if(!c)return b;b+=String.fromCharCode(c)}}; +d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&qa[c];)++c;c<<=1;if(32=b/2);++e){var f=x[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f>1]=a.charCodeAt(f),b+=2;x[b>>1]=0;return b-e}; +d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=z[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}z[b>>2]=h;b+=4;if(b+4>c)break}z[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{v.set(a,b)};var sd; +Ba=function td(){sd||ud();sd||(Ba=td)}; +function ud(){function a(){if(!sd&&(sd=!0,d.calledRun=!0,!u)){d.noFSInit||Lb||(Lb=!0,d.stdin=d.stdin,d.stdout=d.stdout,d.stderr=d.stderr,d.stdin?Mb("stdin",d.stdin):Cb("/dev/tty","/dev/stdin"),d.stdout?Mb("stdout",null,d.stdout):Cb("/dev/tty","/dev/stdout"),d.stderr?Mb("stderr",null,d.stderr):Cb("/dev/tty1","/dev/stderr"),Ib("/dev/stdin",0),Ib("/dev/stdout",1),Ib("/dev/stderr",1));mb=!1;Ja(va);Ja(wa);aa(d);d.onRuntimeInitialized?.();if(vd){var b=qd;try{var c=b(0,0);pa=c;Lc(c)}catch(e){Mc(e)}}if(d.postRun)for("function"== +typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)b=d.postRun.shift(),xa.unshift(b);Ja(xa)}}if(!(0 { - var _scriptDir = import.meta.url; + var _scriptName = import.meta.url; return ( function(moduleArg = {}) { + var moduleRtn; -var d=moduleArg,aa,ba,readyPromise=new Promise((a,b)=>{aa=a;ba=b}),ca=Object.assign({},d),da="./this.program",ea=(a,b)=>{throw b;},fa="object"==typeof window,ia="function"==typeof importScripts,g="",ja; -if(fa||ia)ia?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),_scriptDir&&(g=_scriptDir),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),ia&&(ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var ka=d.print||console.log.bind(console),r=d.printErr||console.error.bind(console);Object.assign(d,ca);ca=null;d.thisProgram&&(da=d.thisProgram); -d.quit&&(ea=d.quit);var la;d.wasmBinary&&(la=d.wasmBinary);var ma,na=!1,u,v,w,oa,x,z,pa,qa;function ra(){var a=ma.buffer;d.HEAP8=u=new Int8Array(a);d.HEAP16=w=new Int16Array(a);d.HEAPU8=v=new Uint8Array(a);d.HEAPU16=oa=new Uint16Array(a);d.HEAP32=x=new Int32Array(a);d.HEAPU32=z=new Uint32Array(a);d.HEAPF32=pa=new Float32Array(a);d.HEAPF64=qa=new Float64Array(a)}var sa=[],ta=[],ua=[],va=[];function wa(){var a=d.preRun.shift();sa.unshift(a)}var B=0,xa=null,ya=null; -function C(a){d.onAbort?.(a);a="Aborted("+a+")";r(a);na=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var za=a=>a.startsWith("data:application/octet-stream;base64,"),D;if(d.locateFile){if(D="wa-sqlite.wasm",!za(D)){var Aa=D;D=d.locateFile?d.locateFile(Aa,g):g+Aa}}else D=(new URL("wa-sqlite.wasm",import.meta.url)).href; -function Ba(a){if(a==D&&la)return new Uint8Array(la);if(ja)return ja(a);throw"both async and sync fetching of the wasm failed";}function Ca(a){return la||!fa&&!ia||"function"!=typeof fetch?Promise.resolve().then(()=>Ba(a)):fetch(a,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${a}'`;return b.arrayBuffer()}).catch(()=>Ba(a))} -function Da(a,b,c){return Ca(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);C(e)})}function Ea(a,b){var c=D;return la||"function"!=typeof WebAssembly.instantiateStreaming||za(c)||"function"!=typeof fetch?Da(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Da(c,a,b)}))}var F,H; -function Fa(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ga=a=>{for(;0>1];case "i32":return x[a>>2];case "i64":C("to do getValue(i64) use WASM_BIGINT");case "float":return pa[a>>2];case "double":return qa[a>>3];case "*":return z[a>>2];default:C(`invalid type for getValue: ${b}`)}} -var Ha=d.noExitRuntime||!0;function J(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":u[a]=b;break;case "i8":u[a]=b;break;case "i16":w[a>>1]=b;break;case "i32":x[a>>2]=b;break;case "i64":C("to do setValue(i64) use WASM_BIGINT");case "float":pa[a>>2]=b;break;case "double":qa[a>>3]=b;break;case "*":z[a>>2]=b;break;default:C(`invalid type for setValue: ${c}`)}} -var Ia="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e}, -Ja=(a,b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ka=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Ja(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},La=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},Ma=a=>{if("/"=== -a)return"/";a=Ka(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Na=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);C("initRandomDevice")},Oa=a=>(Oa=Na())(a),Pa=(...a)=>{for(var b="",c=!1,e=a.length-1;-1<=e&&!c;e--){c=0<=e?a[e]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=Ja(b.split("/").filter(f=>!!f),!c).join("/"); -return(c?"/":"")+b||"."},Qa=[],Ra=a=>{for(var b=0,c=0;c=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},N=(a,b,c,e)=>{if(!(0=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)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 Sa(a,b,c){c=Array(0=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.yf,a.yf=new Uint8Array(b),0=a.node.Af)return 0;a=Math.min(a.node.Af-f,e);if(8b)throw new O(28);return b},dg(a,b,c){Za(a.node,b+c);a.node.Af=Math.max(a.node.Af,b+c)},Uf(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new O(43);a=a.node.yf;if(f&2||a.buffer!==u.buffer){if(0< -c||c+b{var c=0;a&&(c|=365);b&&(c|=146);return c},eb=null,fb={},gb=[],hb=1,S=null,ib=!0,O=class{constructor(a){this.name="ErrnoError";this.zf=a}},bb={},jb=class{constructor(){this.Zf={};this.node=null}get flags(){return this.Zf.flags}set flags(a){this.Zf.flags= -a}get position(){return this.Zf.position}set position(a){this.Zf.position=a}},kb=class{constructor(a,b,c,e){a||=this;this.parent=a;this.Gf=a.Gf;this.Mf=null;this.id=hb++;this.name=b;this.mode=c;this.wf={};this.xf={};this.Rf=e}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}}; -function T(a,b={}){a=Pa(a);if(!a)return{path:"",node:null};b=Object.assign({fg:!0,bg:0},b);if(8!!k);for(var c=eb,e="/",f=0;f>>0)%S.length}function ob(a){var b=nb(a.parent.id,a.name);if(S[b]===a)S[b]=a.Nf;else for(b=S[b];b;){if(b.Nf===a){b.Nf=a.Nf;break}b=b.Nf}} -function R(a,b){var c=Q(a.mode)?(c=pb(a,"x"))?c:a.wf.Pf?0:2:54;if(c)throw new O(c);for(c=S[nb(a.id,b)];c;c=c.Nf){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.wf.Pf(a,b)}function ab(a,b,c,e){a=new kb(a,b,c,e);b=nb(a.parent.id,a.name);a.Nf=S[b];return S[b]=a}function Q(a){return 16384===(a&61440)}function qb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b} -function pb(a,b){if(ib)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}function rb(a,b){try{return R(a,b),20}catch(c){}return pb(a,"wx")}function sb(a,b,c){try{var e=R(a,b)}catch(f){return f.zf}if(a=pb(a,"wx"))return a;if(c){if(!Q(e.mode))return 54;if(e===e.parent||"/"===mb(e))return 10}else if(Q(e.mode))return 31;return 0}function U(a){a=gb[a];if(!a)throw new O(8);return a} -function tb(a,b=-1){a=Object.assign(new jb,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!gb[b])break a;throw new O(33);}a.Hf=b;return gb[b]=a}function ub(a,b=-1){a=tb(a,b);a.xf?.Eg?.(a);return a}var $a={open(a){a.xf=fb[a.node.Rf].xf;a.xf.open?.(a)},Kf(){throw new O(70);}};function Va(a,b){fb[a]={xf:b}} -function vb(a,b){var c="/"===b;if(c&&eb)throw new O(10);if(!c&&b){var e=T(b,{fg:!1});b=e.path;e=e.node;if(e.Mf)throw new O(10);if(!Q(e.mode))throw new O(54);}b={type:a,Jg:{},jg:b,ug:[]};a=a.Gf(b);a.Gf=b;b.root=a;c?eb=a:e&&(e.Mf=b,e.Gf&&e.Gf.ug.push(b))}function wb(a,b,c){var e=T(a,{parent:!0}).node;a=Ma(a);if(!a||"."===a||".."===a)throw new O(28);var f=rb(e,a);if(f)throw new O(f);if(!e.wf.Tf)throw new O(63);return e.wf.Tf(e,a,b,c)}function W(a,b){return wb(a,(void 0!==b?b:511)&1023|16384,0)} -function xb(a,b,c){"undefined"==typeof c&&(c=b,b=438);wb(a,b|8192,c)}function yb(a,b){if(!Pa(a))throw new O(44);var c=T(b,{parent:!0}).node;if(!c)throw new O(44);b=Ma(b);var e=rb(c,b);if(e)throw new O(e);if(!c.wf.Xf)throw new O(63);c.wf.Xf(c,b,a)}function zb(a){var b=T(a,{parent:!0}).node;a=Ma(a);var c=R(b,a),e=sb(b,a,!0);if(e)throw new O(e);if(!b.wf.Wf)throw new O(63);if(c.Mf)throw new O(10);b.wf.Wf(b,a);ob(c)} -function lb(a){a=T(a).node;if(!a)throw new O(44);if(!a.wf.Sf)throw new O(28);return Pa(mb(a.parent),a.wf.Sf(a))}function Ab(a,b){a=T(a,{Jf:!b}).node;if(!a)throw new O(44);if(!a.wf.Ef)throw new O(63);return a.wf.Ef(a)}function Bb(a){return Ab(a,!0)}function Cb(a,b){a="string"==typeof a?T(a,{Jf:!0}).node:a;if(!a.wf.Bf)throw new O(63);a.wf.Bf(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} -function Db(a,b){if(0>b)throw new O(28);a="string"==typeof a?T(a,{Jf:!0}).node:a;if(!a.wf.Bf)throw new O(63);if(Q(a.mode))throw new O(31);if(32768!==(a.mode&61440))throw new O(28);var c=pb(a,"w");if(c)throw new O(c);a.wf.Bf(a,{size:b,timestamp:Date.now()})} -function Eb(a,b,c){if(""===a)throw new O(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=Ka(a);try{f=T(a,{Jf:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new O(20);}else f=wb(a,c,0),e=!0;if(!f)throw new O(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!Q(f.mode))throw new O(54);if(!e&&(c= -f?40960===(f.mode&61440)?32:Q(f.mode)&&("r"!==qb(b)||b&512)?31:pb(f,qb(b)):44))throw new O(c);b&512&&!e&&Db(f,0);b&=-131713;f=tb({node:f,path:mb(f),flags:b,seekable:!0,position:0,xf:f.xf,yg:[],error:!1});f.xf.open&&f.xf.open(f);!d.logReadFiles||b&1||(Fb||={},a in Fb||(Fb[a]=1));return f}function Gb(a,b,c){if(null===a.Hf)throw new O(8);if(!a.seekable||!a.xf.Kf)throw new O(70);if(0!=c&&1!=c&&2!=c)throw new O(28);a.position=a.xf.Kf(a,b,c);a.yg=[]}var Hb; -function Ib(a,b,c){a=Ka("/dev/"+a);var e=db(!!b,!!c);Jb||=64;var f=Jb++<<8|0;Va(f,{open(h){h.seekable=!1},close(){c?.buffer?.length&&c(10)},read(h,k,n,l){for(var m=0,p=0;p>2]=a.rg;x[c+4>>2]=a.mode;z[c+8>>2]=a.wg;x[c+12>>2]=a.uid;x[c+16>>2]=a.tg;x[c+20>>2]=a.Rf;H=[a.size>>>0,(F=a.size,1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0:0)];x[c+24>>2]=H[0];x[c+28>>2]=H[1];x[c+32>>2]=4096;x[c+36>>2]=a.pg;b=a.ng.getTime();var e=a.vg.getTime(),f=a.qg.getTime();H=[Math.floor(b/1E3)>>>0,(F=Math.floor(b/1E3),1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0: -0)];x[c+40>>2]=H[0];x[c+44>>2]=H[1];z[c+48>>2]=b%1E3*1E3;H=[Math.floor(e/1E3)>>>0,(F=Math.floor(e/1E3),1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0:0)];x[c+56>>2]=H[0];x[c+60>>2]=H[1];z[c+64>>2]=e%1E3*1E3;H=[Math.floor(f/1E3)>>>0,(F=Math.floor(f/1E3),1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0:0)];x[c+72>>2]=H[0];x[c+76>>2]=H[1];z[c+80>>2]=f%1E3*1E3;H=[a.ig>>>0,(F=a.ig,1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0:0)];x[c+88>>2]=H[0];x[c+92>>2]=H[1];return 0}var Mb=void 0;function Nb(){var a=x[+Mb>>2];Mb+=4;return a} -var Ob=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Pb=[0,31,60,91,121,152,182,213,244,274,305,335],Qb=[0,31,59,90,120,151,181,212,243,273,304,334],Rb={},Tb=()=>{if(!Sb){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 Rb)void 0===Rb[b]?delete a[b]:a[b]=Rb[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Sb=c}return Sb}, -Sb;function Ub(){}function Vb(){}function Wb(){}function Xb(){}function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){} -function Ac(){}function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){} -var Gc,Hc,Ic=[],Y=(a,b,c,e)=>{var f={string:m=>{var p=0;if(null!==m&&void 0!==m&&0!==m){p=Ra(m)+1;var q=Jc(p);N(m,v,q,p);p=q}return p},array:m=>{var p=Jc(m.length);u.set(m,p);return p}};a=d["_"+a];var h=[],k=0;if(e)for(var n=0;n{bb[a]=new O(a);bb[a].stack=""});S=Array(4096);vb(P,"/");W("/tmp");W("/home");W("/home/web_user");(function(){W("/dev");Va(259,{read:()=>0,write:(e,f,h,k)=>k});xb("/dev/null",259);Ua(1280,Xa);Ua(1536,Ya);xb("/dev/tty",1280);xb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Oa(a).byteLength);return a[--b]};Ib("random",c);Ib("urandom",c);W("/dev/shm");W("/dev/shm/tmp")})(); -(function(){W("/proc");var a=W("/proc/self");W("/proc/self/fd");vb({Gf(){var b=ab(a,"fd",16895,73);b.wf={Pf(c,e){var f=U(+e);c={parent:null,Gf:{jg:"fake"},wf:{Sf:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); -(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,cg:e}):a.delete(b);return Y("set_authorizer","number",["number"],[b])};Ub=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,cg:l}=a.get(b);return n(l,c,e?e?K(v,e):"":null,f?f?K(v,f):"":null,h?h?K(v,h):"":null,k?k?K(v,k):"":null)}return 0}})(); -(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,If:k});return Y("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,sg:l,If:k});return Y("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};Wb=function(c,e,f,h){c=a.get(c);b.set(e, -c.If);c.f(e,new Uint32Array(v.buffer,h,f));b.delete(e)};Yb=function(c,e,f,h){c=a.get(c);b.set(e,c.If);c.step(e,new Uint32Array(v.buffer,h,f));b.delete(e)};Vb=function(c,e){c=a.get(c);b.set(e,c.If);c.sg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,cg:f}):a.delete(b);return Y("progress_handler",null,["number","number"],[b,c])};Xb=function(b){if(a.has(b)){const {f:c,cg:e}=a.get(b);return c(e)}return 0}})(); +var d=moduleArg,aa,ba,ca=new Promise((a,b)=>{aa=a;ba=b}),da="object"==typeof window,ea="function"==typeof importScripts,ha=Object.assign({},d),ia="./this.program",ja=(a,b)=>{throw b;},g="",ka,la; +if(da||ea)ea?g=self.location.href:"undefined"!=typeof document&&document.currentScript&&(g=document.currentScript.src),_scriptName&&(g=_scriptName),g.startsWith("blob:")?g="":g=g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1),ea&&(la=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),ka=a=>fetch(a,{credentials:"same-origin"}).then(b=>b.ok?b.arrayBuffer():Promise.reject(Error(b.status+" : "+b.url))); +var ma=d.print||console.log.bind(console),r=d.printErr||console.error.bind(console);Object.assign(d,ha);ha=null;d.thisProgram&&(ia=d.thisProgram);d.quit&&(ja=d.quit);var na;d.wasmBinary&&(na=d.wasmBinary);var oa,pa=!1,u,v,w,qa,x,z,ra,sa; +function ta(){var a=oa.buffer;d.HEAP8=u=new Int8Array(a);d.HEAP16=w=new Int16Array(a);d.HEAPU8=v=new Uint8Array(a);d.HEAPU16=qa=new Uint16Array(a);d.HEAP32=x=new Int32Array(a);d.HEAPU32=z=new Uint32Array(a);d.HEAPF32=ra=new Float32Array(a);d.HEAPF64=sa=new Float64Array(a)}var ua=[],va=[],wa=[],xa=[];function ya(){var a=d.preRun.shift();ua.unshift(a)}var B=0,za=null,Aa=null; +function C(a){d.onAbort?.(a);a="Aborted("+a+")";r(a);pa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ba(a);throw a;}var Ba=a=>a.startsWith("data:application/octet-stream;base64,"),Ca;function Da(a){if(a==Ca&&na)return new Uint8Array(na);if(la)return la(a);throw"both async and sync fetching of the wasm failed";}function Ea(a){return na?Promise.resolve().then(()=>Da(a)):ka(a).then(b=>new Uint8Array(b),()=>Da(a))} +function Fa(a,b,c){return Ea(a).then(e=>WebAssembly.instantiate(e,b)).then(c,e=>{r(`failed to asynchronously prepare wasm: ${e}`);C(e)})}function Ga(a,b){var c=Ca;return na||"function"!=typeof WebAssembly.instantiateStreaming||Ba(c)||"function"!=typeof fetch?Fa(c,a,b):fetch(c,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,a).then(b,function(f){r(`wasm streaming compile failed: ${f}`);r("falling back to ArrayBuffer instantiation");return Fa(c,a,b)}))}var D,F; +function Ha(a){this.name="ExitStatus";this.message=`Program terminated with exit(${a})`;this.status=a}var Ia=a=>{for(;0>1];case "i32":return x[a>>2];case "i64":C("to do getValue(i64) use WASM_BIGINT");case "float":return ra[a>>2];case "double":return sa[a>>3];case "*":return z[a>>2];default:C(`invalid type for getValue: ${b}`)}} +var Ja=d.noExitRuntime||!0;function I(a,b,c="i8"){c.endsWith("*")&&(c="*");switch(c){case "i1":u[a]=b;break;case "i8":u[a]=b;break;case "i16":w[a>>1]=b;break;case "i32":x[a>>2]=b;break;case "i64":C("to do setValue(i64) use WASM_BIGINT");case "float":ra[a>>2]=b;break;case "double":sa[a>>3]=b;break;case "*":z[a>>2]=b;break;default:C(`invalid type for setValue: ${c}`)}} +var Ka="undefined"!=typeof TextDecoder?new TextDecoder:void 0,J=(a,b,c)=>{var e=b+c;for(c=b;a[c]&&!(c>=e);)++c;if(16f?e+=String.fromCharCode(f):(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else e+=String.fromCharCode(f)}return e},La=(a, +b)=>{for(var c=0,e=a.length-1;0<=e;e--){var f=a[e];"."===f?a.splice(e,1):".."===f?(a.splice(e,1),c++):c&&(a.splice(e,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},Ma=a=>{var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=La(a.split("/").filter(e=>!!e),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},Na=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.substr(0,b.length-1);return a+b},Oa=a=>{if("/"===a)return"/"; +a=Ma(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Pa=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return a=>crypto.getRandomValues(a);C("initRandomDevice")},Qa=a=>(Qa=Pa())(a),Ra=(...a)=>{for(var b="",c=!1,e=a.length-1;-1<=e&&!c;e--){c=0<=e?a[e]:"/";if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=La(b.split("/").filter(f=>!!f),!c).join("/");return(c? +"/":"")+b||"."},Sa=[],Ta=a=>{for(var b=0,c=0;c=e?b++:2047>=e?b+=2:55296<=e&&57343>=e?(b+=4,++c):b+=3}return b},K=(a,b,c,e)=>{if(!(0=k){var n=a.charCodeAt(++h);k=65536+((k&1023)<<10)|n&1023}if(127>=k){if(c>=e)break;b[c++]=k}else{if(2047>=k){if(c+1>=e)break;b[c++]=192|k>>6}else{if(65535>=k){if(c+2>=e)break;b[c++]=224|k>>12}else{if(c+3>=e)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,b,c){c=Array(0=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.xf,a.xf=new Uint8Array(b),0=a.node.zf)return 0;a=Math.min(a.node.zf-f,e);if(8b)throw new N(28);return b},cg(a,b,c){ab(a.node,b+c);a.node.zf=Math.max(a.node.zf,b+c)},Tf(a,b,c,e,f){if(32768!==(a.node.mode&61440))throw new N(43);a=a.node.xf;if(f&2||a.buffer!==u.buffer){if(0{var c=0;a&&(c|=365);b&&(c|=146);return c},gb=null,hb={},ib=[],jb=1,R=null,kb=!0,N=class{constructor(a){this.name="ErrnoError";this.yf=a}},db={},lb=class{constructor(){this.Yf={};this.node=null}get flags(){return this.Yf.flags}set flags(a){this.Yf.flags= +a}get position(){return this.Yf.position}set position(a){this.Yf.position=a}},mb=class{constructor(a,b,c,e){a||=this;this.parent=a;this.Ff=a.Ff;this.Lf=null;this.id=jb++;this.name=b;this.mode=c;this.vf={};this.wf={};this.Qf=e}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}}; +function S(a,b={}){a=Ra(a);if(!a)return{path:"",node:null};b=Object.assign({eg:!0,ag:0},b);if(8!!k);for(var c=gb,e="/",f=0;f>>0)%R.length}function qb(a){var b=pb(a.parent.id,a.name);if(R[b]===a)R[b]=a.Mf;else for(b=R[b];b;){if(b.Mf===a){b.Mf=a.Mf;break}b=b.Mf}} +function Q(a,b){var c=P(a.mode)?(c=rb(a,"x"))?c:a.vf.Of?0:2:54;if(c)throw new N(c);for(c=R[pb(a.id,b)];c;c=c.Mf){var e=c.name;if(c.parent.id===a.id&&e===b)return c}return a.vf.Of(a,b)}function cb(a,b,c,e){a=new mb(a,b,c,e);b=pb(a.parent.id,a.name);a.Mf=R[b];return R[b]=a}function P(a){return 16384===(a&61440)}function sb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b} +function rb(a,b){if(kb)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}function tb(a,b){try{return Q(a,b),20}catch(c){}return rb(a,"wx")}function ub(a,b,c){try{var e=Q(a,b)}catch(f){return f.yf}if(a=rb(a,"wx"))return a;if(c){if(!P(e.mode))return 54;if(e===e.parent||"/"===ob(e))return 10}else if(P(e.mode))return 31;return 0}function T(a){a=ib[a];if(!a)throw new N(8);return a} +function vb(a,b=-1){a=Object.assign(new lb,a);if(-1==b)a:{for(b=0;4096>=b;b++)if(!ib[b])break a;throw new N(33);}a.Gf=b;return ib[b]=a}function wb(a,b=-1){a=vb(a,b);a.wf?.Dg?.(a);return a}var bb={open(a){a.wf=hb[a.node.Qf].wf;a.wf.open?.(a)},Jf(){throw new N(70);}};function Xa(a,b){hb[a]={wf:b}} +function xb(a,b){var c="/"===b;if(c&&gb)throw new N(10);if(!c&&b){var e=S(b,{eg:!1});b=e.path;e=e.node;if(e.Lf)throw new N(10);if(!P(e.mode))throw new N(54);}b={type:a,Ig:{},ig:b,tg:[]};a=a.Ff(b);a.Ff=b;b.root=a;c?gb=a:e&&(e.Lf=b,e.Ff&&e.Ff.tg.push(b))}function yb(a,b,c){var e=S(a,{parent:!0}).node;a=Oa(a);if(!a||"."===a||".."===a)throw new N(28);var f=tb(e,a);if(f)throw new N(f);if(!e.vf.Sf)throw new N(63);return e.vf.Sf(e,a,b,c)}function U(a,b){return yb(a,(void 0!==b?b:511)&1023|16384,0)} +function zb(a,b,c){"undefined"==typeof c&&(c=b,b=438);yb(a,b|8192,c)}function Ab(a,b){if(!Ra(a))throw new N(44);var c=S(b,{parent:!0}).node;if(!c)throw new N(44);b=Oa(b);var e=tb(c,b);if(e)throw new N(e);if(!c.vf.Wf)throw new N(63);c.vf.Wf(c,b,a)}function Bb(a){var b=S(a,{parent:!0}).node;a=Oa(a);var c=Q(b,a),e=ub(b,a,!0);if(e)throw new N(e);if(!b.vf.Vf)throw new N(63);if(c.Lf)throw new N(10);b.vf.Vf(b,a);qb(c)} +function nb(a){a=S(a).node;if(!a)throw new N(44);if(!a.vf.Rf)throw new N(28);return Ra(ob(a.parent),a.vf.Rf(a))}function Cb(a,b){a=S(a,{If:!b}).node;if(!a)throw new N(44);if(!a.vf.Df)throw new N(63);return a.vf.Df(a)}function Db(a){return Cb(a,!0)}function Eb(a,b){a="string"==typeof a?S(a,{If:!0}).node:a;if(!a.vf.Af)throw new N(63);a.vf.Af(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})} +function Fb(a,b){if(0>b)throw new N(28);a="string"==typeof a?S(a,{If:!0}).node:a;if(!a.vf.Af)throw new N(63);if(P(a.mode))throw new N(31);if(32768!==(a.mode&61440))throw new N(28);var c=rb(a,"w");if(c)throw new N(c);a.vf.Af(a,{size:b,timestamp:Date.now()})} +function Gb(a,b,c){if(""===a)throw new N(44);if("string"==typeof b){var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof e)throw Error(`Unknown file open mode: ${b}`);b=e}c=b&64?("undefined"==typeof c?438:c)&4095|32768:0;if("object"==typeof a)var f=a;else{a=Ma(a);try{f=S(a,{If:!(b&131072)}).node}catch(h){}}e=!1;if(b&64)if(f){if(b&128)throw new N(20);}else f=yb(a,c,0),e=!0;if(!f)throw new N(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&!P(f.mode))throw new N(54);if(!e&&(c= +f?40960===(f.mode&61440)?32:P(f.mode)&&("r"!==sb(b)||b&512)?31:rb(f,sb(b)):44))throw new N(c);b&512&&!e&&Fb(f,0);b&=-131713;f=vb({node:f,path:ob(f),flags:b,seekable:!0,position:0,wf:f.wf,xg:[],error:!1});f.wf.open&&f.wf.open(f);!d.logReadFiles||b&1||(Hb||={},a in Hb||(Hb[a]=1));return f}function Ib(a,b,c){if(null===a.Gf)throw new N(8);if(!a.seekable||!a.wf.Jf)throw new N(70);if(0!=c&&1!=c&&2!=c)throw new N(28);a.position=a.wf.Jf(a,b,c);a.xg=[]}var Jb; +function Kb(a,b,c){a=Ma("/dev/"+a);var e=fb(!!b,!!c);Lb||=64;var f=Lb++<<8|0;Xa(f,{open(h){h.seekable=!1},close(){c?.buffer?.length&&c(10)},read(h,k,n,l){for(var m=0,p=0;p>2]=a.qg;x[c+4>>2]=a.mode;z[c+8>>2]=a.vg;x[c+12>>2]=a.uid;x[c+16>>2]=a.sg;x[c+20>>2]=a.Qf;F=[a.size>>>0,(D=a.size,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+24>>2]=F[0];x[c+28>>2]=F[1];x[c+32>>2]=4096;x[c+36>>2]=a.og;b=a.mg.getTime();var e=a.ug.getTime(),f=a.pg.getTime();F=[Math.floor(b/1E3)>>>0,(D=Math.floor(b/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0: +0)];x[c+40>>2]=F[0];x[c+44>>2]=F[1];z[c+48>>2]=b%1E3*1E3;F=[Math.floor(e/1E3)>>>0,(D=Math.floor(e/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+56>>2]=F[0];x[c+60>>2]=F[1];z[c+64>>2]=e%1E3*1E3;F=[Math.floor(f/1E3)>>>0,(D=Math.floor(f/1E3),1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+72>>2]=F[0];x[c+76>>2]=F[1];z[c+80>>2]=f%1E3*1E3;F=[a.hg>>>0,(D=a.hg,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[c+88>>2]=F[0];x[c+92>>2]=F[1];return 0}var Nb=void 0;function Ob(){var a=x[+Nb>>2];Nb+=4;return a} +var Pb=(a,b)=>b+2097152>>>0<4194305-!!a?(a>>>0)+4294967296*b:NaN,Qb=[0,31,60,91,121,152,182,213,244,274,305,335],Rb=[0,31,59,90,120,151,181,212,243,273,304,334],Sb={},Ub=()=>{if(!Tb){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",_:ia||"./this.program"},b;for(b in Sb)void 0===Sb[b]?delete a[b]:a[b]=Sb[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Tb=c}return Tb}, +Tb;function Vb(){}function Wb(){}function Xb(){}function Yb(){}function Zb(){}function $b(){}function ac(){}function bc(){}function cc(){}function dc(){}function ec(){}function fc(){}function gc(){}function hc(){}function ic(){}function jc(){}function kc(){}function lc(){}function mc(){}function nc(){}function oc(){}function pc(){}function qc(){}function rc(){}function sc(){}function tc(){}function uc(){}function vc(){}function wc(){}function xc(){}function yc(){}function zc(){}function Ac(){} +function Bc(){}function Cc(){}function Dc(){}function Ec(){}function Fc(){}function Gc(){} +var Hc,Ic,Jc=[],Y=(a,b,c,e)=>{var f={string:m=>{var p=0;if(null!==m&&void 0!==m&&0!==m){p=Ta(m)+1;var q=Kc(p);K(m,v,q,p);p=q}return p},array:m=>{var p=Kc(m.length);u.set(m,p);return p}};a=d["_"+a];var h=[],k=0;if(e)for(var n=0;n{db[a]=new N(a);db[a].stack=""});R=Array(4096);xb(O,"/");U("/tmp");U("/home");U("/home/web_user");(function(){U("/dev");Xa(259,{read:()=>0,write:(e,f,h,k)=>k});zb("/dev/null",259);Wa(1280,Za);Wa(1536,$a);zb("/dev/tty",1280);zb("/dev/tty1",1536);var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(b=Qa(a).byteLength);return a[--b]};Kb("random",c);Kb("urandom",c);U("/dev/shm");U("/dev/shm/tmp")})(); +(function(){U("/proc");var a=U("/proc/self");U("/proc/self/fd");xb({Ff(){var b=cb(a,"fd",16895,73);b.vf={Of(c,e){var f=T(+e);c={parent:null,Ff:{ig:"fake"},vf:{Rf:()=>f.path}};return c.parent=c}};return b}},"/proc/self/fd")})(); +(function(){const a=new Map;d.setAuthorizer=function(b,c,e){c?a.set(b,{f:c,bg:e}):a.delete(b);return Y("set_authorizer","number",["number"],[b])};Vb=function(b,c,e,f,h,k){if(a.has(b)){const {f:n,bg:l}=a.get(b);return n(l,c,e?e?J(v,e):"":null,f?f?J(v,f):"":null,h?h?J(v,h):"":null,k?k?J(v,k):"":null)}return 0}})(); +(function(){const a=new Map,b=new Map;d.createFunction=function(c,e,f,h,k,n){const l=a.size;a.set(l,{f:n,Hf:k});return Y("create_function","number","number string number number number number".split(" "),[c,e,f,h,l,0])};d.createAggregate=function(c,e,f,h,k,n,l){const m=a.size;a.set(m,{step:n,rg:l,Hf:k});return Y("create_function","number","number string number number number number".split(" "),[c,e,f,h,m,1])};d.getFunctionUserData=function(c){return b.get(c)};Xb=function(c,e,f,h){c=a.get(c);b.set(e, +c.Hf);c.f(e,new Uint32Array(v.buffer,h,f));b.delete(e)};Zb=function(c,e,f,h){c=a.get(c);b.set(e,c.Hf);c.step(e,new Uint32Array(v.buffer,h,f));b.delete(e)};Wb=function(c,e){c=a.get(c);b.set(e,c.Hf);c.rg(e);b.delete(e)}})();(function(){const a=new Map;d.progressHandler=function(b,c,e,f){e?a.set(b,{f:e,bg:f}):a.delete(b);return Y("progress_handler",null,["number","number"],[b,c])};Yb=function(b){if(a.has(b)){const {f:c,bg:e}=a.get(b);return c(e)}return 0}})(); (function(){function a(l,m){const p=`get${l}`,q=`set${l}`;return new Proxy(new DataView(v.buffer,m,"Int32"===l?4:8),{get(t,y){if(y===p)return function(A,G){if(!G)throw Error("must be little endian");return t[y](A,G)};if(y===q)return function(A,G,E){if(!E)throw Error("must be little endian");return t[y](A,G,E)};if("string"===typeof y&&y.match(/^(get)|(set)/))throw Error("invalid type");return t[y]}})}const b="object"===typeof Asyncify,c=new Map,e=new Map,f=new Map,h=b?new Set:null,k=b?new Set:null, -n=new Map;oc=function(l,m,p,q){n.set(l?K(v,l):"",{size:m,Qf:Array.from(new Uint32Array(v.buffer,q,p))})};d.createModule=function(l,m,p,q){b&&(p.handleAsync=Asyncify.hg);const t=c.size;c.set(t,{module:p,If:q});q=0;p.xCreate&&(q|=1);p.xConnect&&(q|=2);p.xBestIndex&&(q|=4);p.xDisconnect&&(q|=8);p.xDestroy&&(q|=16);p.xOpen&&(q|=32);p.xClose&&(q|=64);p.xFilter&&(q|=128);p.xNext&&(q|=256);p.xEof&&(q|=512);p.xColumn&&(q|=1024);p.xRowid&&(q|=2048);p.xUpdate&&(q|=4096);p.xBegin&&(q|=8192);p.xSync&&(q|=16384); -p.xCommit&&(q|=32768);p.xRollback&&(q|=65536);p.xFindFunction&&(q|=131072);p.xRename&&(q|=262144);return Y("create_module","number",["number","string","number","number"],[l,m,t,q])};ec=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(v.buffer,q,p)).map(A=>A?K(v,A):"");return m.module.xCreate(l,m.If,q,t,a("Int32",y))};dc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(v.buffer, -q,p)).map(A=>A?K(v,A):"");return m.module.xConnect(l,m.If,q,t,a("Int32",y))};$b=function(l,m){var p=e.get(l),q=n.get("sqlite3_index_info").Qf;const t={};t.nConstraint=I(m+q[0],"i32");t.aConstraint=[];var y=I(m+q[1],"*"),A=n.get("sqlite3_index_constraint").size;for(var G=0;Gl?2**32:0))};Fc=function(h,k,n,l,m){return e.get(h).xWrite(h,v.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Dc=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Cc=function(h,k){return e.get(h).xSync(h,k)};xc=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};yc=function(h,k){return e.get(h).xLock(h,k)};Ec=function(h,k){return e.get(h).xUnlock(h,k)};sc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};wc=function(h, -k,n){const l=e.get(h);n=new DataView(v.buffer,n);return l.xFileControl(h,k,n)};Bc=function(h){return e.get(h).xSectorSize(h)};vc=function(h){return e.get(h).xDeviceCharacteristics(h)};zc=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var p of f)e.delete(p)}p=null;if(l&64){p=1;const q=[];for(;p;){const t=v[k++];if(t)q.push(t);else switch(v[k]||(p=null),p){case 1:q.push(63);p=2;break;case 2:q.push(61);p=3;break;case 3:q.push(38),p=2}}p=(new TextDecoder).decode(new Uint8Array(q))}else k&& -(p=k?K(v,k):"");m=a("Int32",m);return h.xOpen(p,n,l,m)};uc=function(h,k,n){return c.get(h).xDelete(k?K(v,k):"",n)};rc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?K(v,k):"",n,l)}})(); -var Nc={a:(a,b,c,e)=>{C(`Assertion failed: ${a?K(v,a):""}, at: `+[b?b?K(v,b):"":"unknown filename",c,e?e?K(v,e):"":"unknown function"])},N:function(a,b){try{return a=a?K(v,a):"",Cb(a,b),0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return-c.zf}},Q:function(a,b,c){try{b=b?K(v,b):"";b=Kb(a,b);if(c&-8)return-28;var e=T(b,{Jf:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&pb(e,a)?-2:0}catch(f){if("undefined"==typeof X||"ErrnoError"!==f.name)throw f; -return-f.zf}},O:function(a,b){try{var c=U(a);Cb(c.node,b);return 0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e;return-e.zf}},M:function(a){try{var b=U(a).node;var c="string"==typeof b?T(b,{Jf:!0}).node:b;if(!c.wf.Bf)throw new O(63);c.wf.Bf(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e;return-e.zf}},b:function(a,b,c){Mb=c;try{var e=U(a);switch(b){case 0:var f=Nb();if(0>f)break;for(;gb[f];)f++;return ub(e,f).Hf;case 1:case 2:return 0; -case 3:return e.flags;case 4:return f=Nb(),e.flags|=f,0;case 12:return f=Nb(),w[f+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(h){if("undefined"==typeof X||"ErrnoError"!==h.name)throw h;return-h.zf}},L:function(a,b){try{var c=U(a);return Lb(Ab,c.path,b)}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e;return-e.zf}},n:function(a,b,c){b=Ob(b,c);try{if(isNaN(b))return 61;var e=U(a);if(0===(e.flags&2097155))throw new O(28);Db(e.node,b);return 0}catch(f){if("undefined"==typeof X|| -"ErrnoError"!==f.name)throw f;return-f.zf}},F:function(a,b){try{if(0===b)return-28;var c=Ra("/")+1;if(b=e)return-28;var f=lb(b),h=Math.min(e,Ra(f)),k=u[c+h];N(f,v,c,e+1);u[c+ -h]=k;return h}catch(n){if("undefined"==typeof X||"ErrnoError"!==n.name)throw n;return-n.zf}},y:function(a){try{return a=a?K(v,a):"",zb(a),0}catch(b){if("undefined"==typeof X||"ErrnoError"!==b.name)throw b;return-b.zf}},K:function(a,b){try{return a=a?K(v,a):"",Lb(Ab,a,b)}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return-c.zf}},u:function(a,b,c){try{b=b?K(v,b):"";b=Kb(a,b);if(0===c){a=b;var e=T(a,{parent:!0}).node;if(!e)throw new O(44);var f=Ma(a),h=R(e,f),k=sb(e,f,!1);if(k)throw new O(k); -if(!e.wf.Yf)throw new O(63);if(h.Mf)throw new O(10);e.wf.Yf(e,f);ob(h)}else 512===c?zb(b):C("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof X||"ErrnoError"!==n.name)throw n;return-n.zf}},t:function(a,b,c){try{b=b?K(v,b):"";b=Kb(a,b,!0);if(c){var e=z[c>>2]+4294967296*x[c+4>>2],f=x[c+8>>2];h=1E3*e+f/1E6;c+=16;e=z[c>>2]+4294967296*x[c+4>>2];f=x[c+8>>2];k=1E3*e+f/1E6}else var h=Date.now(),k=h;a=h;var n=T(b,{Jf:!0}).node;n.wf.Bf(n,{timestamp:Math.max(a,k)});return 0}catch(l){if("undefined"== -typeof X||"ErrnoError"!==l.name)throw l;return-l.zf}},k:function(a,b,c){a=new Date(1E3*Ob(a,b));x[c>>2]=a.getSeconds();x[c+4>>2]=a.getMinutes();x[c+8>>2]=a.getHours();x[c+12>>2]=a.getDate();x[c+16>>2]=a.getMonth();x[c+20>>2]=a.getFullYear()-1900;x[c+24>>2]=a.getDay();b=a.getFullYear();x[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Qb:Pb)[a.getMonth()]+a.getDate()-1|0;x[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset(); -x[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},i:function(a,b,c,e,f,h,k,n){f=Ob(f,h);try{if(isNaN(f))return 61;var l=U(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new O(2);if(1===(l.flags&2097155))throw new O(2);if(!l.xf.Uf)throw new O(43);var m=l.xf.Uf(l,a,f,b,c);var p=m.xg;x[k>>2]=m.mg;z[n>>2]=p;return 0}catch(q){if("undefined"==typeof X||"ErrnoError"!==q.name)throw q;return-q.zf}},j:function(a,b,c,e,f,h,k){h=Ob(h,k);try{var n=U(f);if(c&2){if(32768!==(n.node.mode&61440))throw new O(43); -e&2||n.xf.Vf&&n.xf.Vf(n,v.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof X||"ErrnoError"!==l.name)throw l;return-l.zf}},v:(a,b,c,e)=>{var f=(new Date).getFullYear(),h=new Date(f,0,1),k=new Date(f,6,1);f=h.getTimezoneOffset();var n=k.getTimezoneOffset();z[a>>2]=60*Math.max(f,n);x[b>>2]=Number(f!=n);a=l=>l.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1];h=a(h);k=a(k);nDate.now(),d:()=>performance.now(),r:a=> -{var b=v.length;a>>>=0;if(2147483648=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=(f.min.call(f,2147483648,e+(65536-e%65536)%65536)-ma.buffer.byteLength+65535)/65536;try{ma.grow(f);ra();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1},D:(a,b)=>{var c=0;Tb().forEach((e,f)=>{var h=b+c;f=z[a+4*f>>2]=h;for(h=0;h{var c=Tb();z[a>>2]=c.length;var e=0;c.forEach(f=> -e+=f.length+1);z[b>>2]=e;return 0},f:function(a){try{var b=U(a);if(null===b.Hf)throw new O(8);b.$f&&(b.$f=null);try{b.xf.close&&b.xf.close(b)}catch(c){throw c;}finally{gb[b.Hf]=null}b.Hf=null;return 0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return c.zf}},s:function(a,b){try{var c=U(a);u[b]=c.Df?2:Q(c.mode)?3:40960===(c.mode&61440)?7:4;w[b+2>>1]=0;H=[0,(F=0,1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0:0)];x[b+8>>2]=H[0];x[b+ -12>>2]=H[1];H=[0,(F=0,1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/4294967296)>>>0:0)];x[b+16>>2]=H[0];x[b+20>>2]=H[1];return 0}catch(e){if("undefined"==typeof X||"ErrnoError"!==e.name)throw e;return e.zf}},A:function(a,b,c,e){try{a:{var f=U(a);a=b;for(var h,k=b=0;k>2],l=z[a+4>>2];a+=8;var m=f,p=h,q=u;if(0>l||0>p)throw new O(28);if(null===m.Hf)throw new O(8);if(1===(m.flags&2097155))throw new O(8);if(Q(m.node.mode))throw new O(31);if(!m.xf.read)throw new O(28); -var t="undefined"!=typeof p;if(!t)p=m.position;else if(!m.seekable)throw new O(70);var y=m.xf.read(m,q,n,l,p);t||(m.position+=y);var A=y;if(0>A){var G=-1;break a}b+=A;if(A>2]=G;return 0}catch(E){if("undefined"==typeof X||"ErrnoError"!==E.name)throw E;return E.zf}},l:function(a,b,c,e,f){b=Ob(b,c);try{if(isNaN(b))return 61;var h=U(a);Gb(h,b,e);H=[h.position>>>0,(F=h.position,1<=+Math.abs(F)?0>>0:~~+Math.ceil((F-+(~~F>>>0))/ -4294967296)>>>0:0)];x[f>>2]=H[0];x[f+4>>2]=H[1];h.$f&&0===b&&0===e&&(h.$f=null);return 0}catch(k){if("undefined"==typeof X||"ErrnoError"!==k.name)throw k;return k.zf}},G:function(a){try{var b=U(a);return b.xf?.Lf?b.xf.Lf(b):0}catch(c){if("undefined"==typeof X||"ErrnoError"!==c.name)throw c;return c.zf}},w:function(a,b,c,e){try{a:{var f=U(a);a=b;for(var h,k=b=0;k>2],l=z[a+4>>2];a+=8;var m=f,p=n,q=l,t=h,y=u;if(0>q||0>t)throw new O(28);if(null===m.Hf)throw new O(8);if(0===(m.flags& -2097155))throw new O(8);if(Q(m.node.mode))throw new O(31);if(!m.xf.write)throw new O(28);m.seekable&&m.flags&1024&&Gb(m,0,2);var A="undefined"!=typeof t;if(!A)t=m.position;else if(!m.seekable)throw new O(70);var G=m.xf.write(m,y,p,q,t,void 0);A||(m.position+=G);var E=G;if(0>E){var M=-1;break a}b+=E;"undefined"!=typeof h&&(h+=E)}M=b}z[e>>2]=M;return 0}catch(L){if("undefined"==typeof X||"ErrnoError"!==L.name)throw L;return L.zf}},ta:(a,b)=>{Oa(v.subarray(a,a+b));return 0},ia:Ub,I:Vb,_:Wb,ca:Xb,P:Yb, -la:Zb,m:$b,sa:ac,oa:bc,ja:cc,ea:dc,fa:ec,g:fc,h:gc,pa:hc,ra:ic,qa:jc,da:kc,ga:lc,ha:mc,na:nc,c:oc,ka:pc,ma:qc,x:function(a,b,c,e){(0,globalThis.__onTablesChanged)?.(a,b,c,e)},aa:rc,V:sc,$:tc,ba:uc,S:vc,U:wc,Y:xc,X:yc,R:zc,q:Ac,T:Bc,Z:Cc,o:Dc,W:Ec,p:Fc},Z=function(){function a(c){Z=c.exports;ma=Z.ua;ra();Gc=Z.qf;ta.unshift(Z.va);B--;d.monitorRunDependencies?.(B);0==B&&(null!==xa&&(clearInterval(xa),xa=null),ya&&(c=ya,ya=null,c()));return Z}var b={a:Nc};B++;d.monitorRunDependencies?.(B);if(d.instantiateWasm)try{return d.instantiateWasm(b, -a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ea(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=Z.wa)(a);d._sqlite3_free=a=>(d._sqlite3_free=Z.xa)(a);d._sqlite3_malloc=a=>(d._sqlite3_malloc=Z.ya)(a);d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=Z.za)(a,b,c,e,f);d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=Z.Aa)();d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=Z.Ba)(a,b,c); -d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=Z.Ca)(a,b,c,e);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=Z.Da)(a,b,c);d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=Z.Ea)(a,b);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=Z.Fa)(a);d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=Z.Ga)(a,b,c,e,f);d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=Z.Ha)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=Z.Ia)(a,b,c); -d._sqlite3_close=a=>(d._sqlite3_close=Z.Ja)(a);d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=Z.Ka)(a,b,c);d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=Z.La)(a,b,c);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=Z.Ma)(a,b);d._sqlite3_column_count=a=>(d._sqlite3_column_count=Z.Na)(a);d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=Z.Oa)(a,b);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=Z.Pa)(a,b); -d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=Z.Qa)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=Z.Ra)(a,b);d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=Z.Sa)(a,b);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=Z.Ta)(a,b);d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=Z.Ua)(a,b);d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=Z.Va)(a,b);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=Z.Wa)(a); -d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=Z.Xa)(a,b,c,e,f,h,k,n,l);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=Z.Ya)(a,b,c,e,f);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=Z.Za)(a,b);d._sqlite3_errcode=a=>(d._sqlite3_errcode=Z._a)(a);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=Z.$a)(a);d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=Z.ab)(a,b,c,e,f);d._sqlite3_finalize=a=>(d._sqlite3_finalize=Z.bb)(a); -d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=Z.cb)(a,b);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=Z.db)(a,b);d._sqlite3_open=(a,b)=>(d._sqlite3_open=Z.eb)(a,b);d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=Z.fb)(a,b,c,e,f);d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=Z.gb)(a,b,c,e,f,h);d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=Z.hb)(a,b);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=Z.ib)(a,b); -d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=Z.jb)(a,b,c,e);d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=Z.kb)(a,b,c);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=Z.lb)(a,b);d._sqlite3_result_null=a=>(d._sqlite3_result_null=Z.mb)(a);d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=Z.nb)(a,b,c,e);d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=Z.ob)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=Z.pb)(a,b); -d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=Z.qb)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=Z.rb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=Z.sb)(a,b);d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=Z.tb)(a,b,c);d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=Z.ub)(a,b,c,e);d._sqlite3_sql=a=>(d._sqlite3_sql=Z.vb)(a);d._sqlite3_reset=a=>(d._sqlite3_reset=Z.wb)(a);d._sqlite3_value_text=a=>(d._sqlite3_value_text=Z.xb)(a); -d._sqlite3_value_type=a=>(d._sqlite3_value_type=Z.yb)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=Z.zb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=Z.Ab)(a);d._sqlite3_value_int=a=>(d._sqlite3_value_int=Z.Bb)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=Z.Cb)(a);d._sqlite3_value_double=a=>(d._sqlite3_value_double=Z.Db)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=Z.Eb)(a,b);d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=Z.Fb)(a); -d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=Z.Gb)(a);d._sqlite3_step=a=>(d._sqlite3_step=Z.Hb)(a);d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=Z.Ib)(a,b,c,e);d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=Z.Jb)(a,b,c,e);d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=Z.Kb)(a,b,c,e,f);d._sqlite3_msize=a=>(d._sqlite3_msize=Z.Lb)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=Z.Mb)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=Z.Nb)(a,b); -d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=Z.Ob)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=Z.Pb)(a);d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=Z.Qb)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=Z.Rb)();d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=Z.Sb)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=Z.Tb)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=Z.Ub)(a,b); -d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=Z.Vb)(a,b);d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=Z.Wb)(a,b,c);d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=Z.Xb)(a,b,c);d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=Z.Yb)(a,b,c);d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=Z.Zb)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=Z._b)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=Z.$b)(a,b,c); -d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=Z.ac)(a);d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=Z.bc)(a);d._sqlite3_str_length=a=>(d._sqlite3_str_length=Z.cc)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=Z.dc)(a);d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=Z.ec)(a);d._sqlite3_str_new=a=>(d._sqlite3_str_new=Z.fc)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=Z.gc)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=Z.hc)(a,b); -d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=Z.ic)(a,b,c,e);d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=Z.jc)(a,b,c,e);d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=Z.kc)(a,b,c);d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=Z.lc)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=Z.mc)(a,b,c);d._sqlite3_os_init=()=>(d._sqlite3_os_init=Z.nc)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=Z.oc)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=Z.pc)(a,b,c,e); -d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=Z.qc)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=Z.rc)(a);d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=Z.sc)(a,b,c,e);d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=Z.tc)(a,b);d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=Z.uc)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=Z.vc)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=Z.wc)(a); -d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=Z.xc)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=Z.yc)(a);d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=Z.zc)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=Z.Ac)(a);d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=Z.Bc)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=Z.Cc)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=Z.Dc)(a); -d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=Z.Ec)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=Z.Fc)(a);d._sqlite3_value_free=a=>(d._sqlite3_value_free=Z.Gc)(a);d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=Z.Hc)(a,b,c,e,f);d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=Z.Ic)(a,b,c);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=Z.Jc)(a,b,c,e,f,h);d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=Z.Kc)(a,b,c,e); -d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=Z.Lc)(a,b,c,e);d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=Z.Mc)(a,b,c,e);d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=Z.Nc)(a);d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=Z.Oc)(a,b);d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=Z.Pc)(a,b,c);d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=Z.Qc)(a); -d._sqlite3_user_data=a=>(d._sqlite3_user_data=Z.Rc)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=Z.Sc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=Z.Tc)(a,b);d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=Z.Uc)(a,b);d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=Z.Vc)(a,b);d._sqlite3_data_count=a=>(d._sqlite3_data_count=Z.Wc)(a);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=Z.Xc)(a,b); -d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=Z.Yc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=Z.Zc)(a,b);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=Z._c)(a,b,c,e,f,h);d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=Z.$c)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=Z.ad)(a,b,c,e,f);d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=Z.bd)(a,b,c); -d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=Z.cd)(a,b,c,e);d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=Z.dd)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=Z.ed)(a,b);d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=Z.fd)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=Z.gd)(a);d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=Z.hd)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=Z.id)(a); -d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=Z.jd)(a,b);d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=Z.kd)(a);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=Z.ld)(a,b,c);d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=Z.md)(a);d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=Z.nd)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=Z.od)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=Z.pd)(a); -d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=Z.qd)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=Z.rd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=Z.sd)(a);d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=Z.td)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=Z.ud)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=Z.vd)(a,b,c);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=Z.wd)(a); -d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=Z.xd)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=Z.yd)(a,b,c,e,f);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=Z.zd)(a,b,c,e,f);d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=Z.Ad)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=Z.Bd)(a,b,c,e,f,h);d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=Z.Cd)(a,b,c,e,f,h); -d._sqlite3_free_table=a=>(d._sqlite3_free_table=Z.Dd)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=Z.Ed)(a,b,c,e);d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=Z.Fd)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=Z.Gd)(a);d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=Z.Hd)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=Z.Id)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=Z.Jd)(a,b,c); -d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=Z.Kd)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=Z.Ld)();d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=Z.Md)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=Z.Nd)(a);d._sqlite3_complete16=a=>(d._sqlite3_complete16=Z.Od)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=Z.Pd)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=Z.Qd)();d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=Z.Rd)(); -d._sqlite3_initialize=()=>(d._sqlite3_initialize=Z.Sd)();d._sqlite3_config=(a,b)=>(d._sqlite3_config=Z.Td)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=Z.Ud)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=Z.Vd)(a);d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=Z.Wd)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=Z.Xd)(a,b,c);d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=Z.Yd)(a); -d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=Z.Zd)(a,b,c);d._sqlite3_changes64=a=>(d._sqlite3_changes64=Z._d)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=Z.$d)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=Z.ae)(a);d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=Z.be)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=Z.ce)(a,b);d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=Z.de)(a); -d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=Z.ee)(a,b,c);d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=Z.fe)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=Z.ge)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=Z.he)(a);d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=Z.ie)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=Z.je)(a,b,c,e,f,h,k,n); -d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=Z.ke)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=Z.le)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=Z.me)(a,b,c);d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=Z.ne)(a,b,c,e);d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=Z.oe)(a,b,c); -d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=Z.pe)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=Z.qe)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=Z.re)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=Z.se)(a,b,c);d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=Z.te)(a,b,c,e,f);d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=Z.ue)(a,b); -d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=Z.ve)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=Z.we)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=Z.xe)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=Z.ye)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=Z.ze)(a);d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=Z.Ae)(a,b,c);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=Z.Be)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=Z.Ce)(a,b); -d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=Z.De)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=Z.Ee)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=Z.Fe)(a,b,c,e,f);d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=Z.Ge)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=Z.He)(a,b,c); -d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=Z.Ie)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=Z.Je)(a,b,c,e);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=Z.Ke)(a,b,c,e,f,h,k,n,l);d._sqlite3_sleep=a=>(d._sqlite3_sleep=Z.Le)(a);d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=Z.Me)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=Z.Ne)(a,b,c,e); -d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=Z.Oe)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=Z.Pe)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=Z.Qe)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=Z.Re)(a,b);d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=Z.Se)(a,b);d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=Z.Te)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=Z.Ue)(a,b,c,e); -d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=Z.Ve)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=Z.We)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=Z.Xe)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=Z.Ye)(a,b);d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=Z.Ze)(a,b);d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=Z._e)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=Z.$e)(a); -d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=Z.af)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=Z.bf)();d._malloc=a=>(d._malloc=Z.cf)(a);d._free=a=>(d._free=Z.df)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=Z.ef)(a);d._set_authorizer=a=>(d._set_authorizer=Z.ff)(a);d._create_function=(a,b,c,e,f,h)=>(d._create_function=Z.gf)(a,b,c,e,f,h);d._on_tables_changed=(a,b,c,e,f,h)=>(d._on_tables_changed=Z.hf)(a,b,c,e,f,h); -d._register_table_update_hook=a=>(d._register_table_update_hook=Z.jf)(a);d._create_module=(a,b,c,e)=>(d._create_module=Z.kf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=Z.lf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=Z.mf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=Z.nf)();var Oc=d._main=(a,b)=>(Oc=d._main=Z.of)(a,b);d._setup_powersync=()=>(d._setup_powersync=Z.pf)();var cb=(a,b)=>(cb=Z.rf)(a,b),Pc=()=>(Pc=Z.sf)(),Lc=a=>(Lc=Z.tf)(a),Jc=a=>(Jc=Z.uf)(a),Kc=()=>(Kc=Z.vf)(); -d._sqlite3_version=44971;d.getTempRet0=()=>Pc();d.ccall=Y;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Y(a,b,c,h,e)}; -d.addFunction=(a,b)=>{if(!Hc){Hc=new WeakMap;var c=Gc.length;if(Hc)for(var e=0;e<0+c;e++){var f=Gc.get(e);f&&Hc.set(f,e)}}if(c=Hc.get(a)||0)return c;if(Ic.length)c=Ic.pop();else{try{Gc.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=Gc.length-1}try{Gc.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h= +n=new Map;pc=function(l,m,p,q){n.set(l?J(v,l):"",{size:m,Pf:Array.from(new Uint32Array(v.buffer,q,p))})};d.createModule=function(l,m,p,q){b&&(p.handleAsync=Asyncify.gg);const t=c.size;c.set(t,{module:p,Hf:q});q=0;p.xCreate&&(q|=1);p.xConnect&&(q|=2);p.xBestIndex&&(q|=4);p.xDisconnect&&(q|=8);p.xDestroy&&(q|=16);p.xOpen&&(q|=32);p.xClose&&(q|=64);p.xFilter&&(q|=128);p.xNext&&(q|=256);p.xEof&&(q|=512);p.xColumn&&(q|=1024);p.xRowid&&(q|=2048);p.xUpdate&&(q|=4096);p.xBegin&&(q|=8192);p.xSync&&(q|=16384); +p.xCommit&&(q|=32768);p.xRollback&&(q|=65536);p.xFindFunction&&(q|=131072);p.xRename&&(q|=262144);return Y("create_module","number",["number","string","number","number"],[l,m,t,q])};fc=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(v.buffer,q,p)).map(A=>A?J(v,A):"");return m.module.xCreate(l,m.Hf,q,t,a("Int32",y))};ec=function(l,m,p,q,t,y){m=c.get(m);e.set(t,m);if(b){h.delete(t);for(const A of h)e.delete(A)}q=Array.from(new Uint32Array(v.buffer, +q,p)).map(A=>A?J(v,A):"");return m.module.xConnect(l,m.Hf,q,t,a("Int32",y))};ac=function(l,m){var p=e.get(l),q=n.get("sqlite3_index_info").Pf;const t={};t.nConstraint=H(m+q[0],"i32");t.aConstraint=[];var y=H(m+q[1],"*"),A=n.get("sqlite3_index_constraint").size;for(var G=0;Gl?2**32:0))};Gc=function(h,k,n,l,m){return e.get(h).xWrite(h,v.subarray(k,k+n),4294967296*m+l+(0>l?2**32:0))};Ec=function(h,k,n){return e.get(h).xTruncate(h,4294967296*n+k+(0>k?2**32:0))};Dc=function(h,k){return e.get(h).xSync(h,k)};yc=function(h,k){const n=e.get(h);k=a("BigInt64",k);return n.xFileSize(h,k)};zc=function(h,k){return e.get(h).xLock(h,k)};Fc=function(h,k){return e.get(h).xUnlock(h,k)};tc=function(h,k){const n=e.get(h);k=a("Int32",k);return n.xCheckReservedLock(h,k)};xc=function(h, +k,n){const l=e.get(h);n=new DataView(v.buffer,n);return l.xFileControl(h,k,n)};Cc=function(h){return e.get(h).xSectorSize(h)};wc=function(h){return e.get(h).xDeviceCharacteristics(h)};Ac=function(h,k,n,l,m){h=c.get(h);e.set(n,h);if(b){f.delete(n);for(var p of f)e.delete(p)}p=null;if(l&64){p=1;const q=[];for(;p;){const t=v[k++];if(t)q.push(t);else switch(v[k]||(p=null),p){case 1:q.push(63);p=2;break;case 2:q.push(61);p=3;break;case 3:q.push(38),p=2}}p=(new TextDecoder).decode(new Uint8Array(q))}else k&& +(p=k?J(v,k):"");m=a("Int32",m);return h.xOpen(p,n,l,m)};vc=function(h,k,n){return c.get(h).xDelete(k?J(v,k):"",n)};sc=function(h,k,n,l){h=c.get(h);l=a("Int32",l);return h.xAccess(k?J(v,k):"",n,l)}})(); +var Oc={a:(a,b,c,e)=>{C(`Assertion failed: ${a?J(v,a):""}, at: `+[b?b?J(v,b):"":"unknown filename",c,e?e?J(v,e):"":"unknown function"])},N:function(a,b){try{return a=a?J(v,a):"",Eb(a,b),0}catch(c){if("undefined"==typeof W||"ErrnoError"!==c.name)throw c;return-c.yf}},Q:function(a,b,c){try{b=b?J(v,b):"";b=X(a,b);if(c&-8)return-28;var e=S(b,{If:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&rb(e,a)?-2:0}catch(f){if("undefined"==typeof W||"ErrnoError"!==f.name)throw f; +return-f.yf}},O:function(a,b){try{var c=T(a);Eb(c.node,b);return 0}catch(e){if("undefined"==typeof W||"ErrnoError"!==e.name)throw e;return-e.yf}},M:function(a){try{var b=T(a).node;var c="string"==typeof b?S(b,{If:!0}).node:b;if(!c.vf.Af)throw new N(63);c.vf.Af(c,{timestamp:Date.now()});return 0}catch(e){if("undefined"==typeof W||"ErrnoError"!==e.name)throw e;return-e.yf}},b:function(a,b,c){Nb=c;try{var e=T(a);switch(b){case 0:var f=Ob();if(0>f)break;for(;ib[f];)f++;return wb(e,f).Gf;case 1:case 2:return 0; +case 3:return e.flags;case 4:return f=Ob(),e.flags|=f,0;case 12:return f=Ob(),w[f+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(h){if("undefined"==typeof W||"ErrnoError"!==h.name)throw h;return-h.yf}},L:function(a,b){try{var c=T(a);return Mb(Cb,c.path,b)}catch(e){if("undefined"==typeof W||"ErrnoError"!==e.name)throw e;return-e.yf}},n:function(a,b,c){b=Pb(b,c);try{if(isNaN(b))return 61;var e=T(a);if(0===(e.flags&2097155))throw new N(28);Fb(e.node,b);return 0}catch(f){if("undefined"==typeof W|| +"ErrnoError"!==f.name)throw f;return-f.yf}},F:function(a,b){try{if(0===b)return-28;var c=Ta("/")+1;if(b=e)return-28;var f=nb(b),h=Math.min(e,Ta(f)),k=u[c+h];K(f,v,c,e+1);u[c+h]=k;return h}catch(n){if("undefined"== +typeof W||"ErrnoError"!==n.name)throw n;return-n.yf}},x:function(a){try{return a=a?J(v,a):"",Bb(a),0}catch(b){if("undefined"==typeof W||"ErrnoError"!==b.name)throw b;return-b.yf}},K:function(a,b){try{return a=a?J(v,a):"",Mb(Cb,a,b)}catch(c){if("undefined"==typeof W||"ErrnoError"!==c.name)throw c;return-c.yf}},u:function(a,b,c){try{b=b?J(v,b):"";b=X(a,b);if(0===c){a=b;var e=S(a,{parent:!0}).node;if(!e)throw new N(44);var f=Oa(a),h=Q(e,f),k=ub(e,f,!1);if(k)throw new N(k);if(!e.vf.Xf)throw new N(63); +if(h.Lf)throw new N(10);e.vf.Xf(e,f);qb(h)}else 512===c?Bb(b):C("Invalid flags passed to unlinkat");return 0}catch(n){if("undefined"==typeof W||"ErrnoError"!==n.name)throw n;return-n.yf}},t:function(a,b,c){try{b=b?J(v,b):"";b=X(a,b,!0);if(c){var e=z[c>>2]+4294967296*x[c+4>>2],f=x[c+8>>2];h=1E3*e+f/1E6;c+=16;e=z[c>>2]+4294967296*x[c+4>>2];f=x[c+8>>2];k=1E3*e+f/1E6}else var h=Date.now(),k=h;a=h;var n=S(b,{If:!0}).node;n.vf.Af(n,{timestamp:Math.max(a,k)});return 0}catch(l){if("undefined"==typeof W|| +"ErrnoError"!==l.name)throw l;return-l.yf}},k:function(a,b,c){a=new Date(1E3*Pb(a,b));x[c>>2]=a.getSeconds();x[c+4>>2]=a.getMinutes();x[c+8>>2]=a.getHours();x[c+12>>2]=a.getDate();x[c+16>>2]=a.getMonth();x[c+20>>2]=a.getFullYear()-1900;x[c+24>>2]=a.getDay();b=a.getFullYear();x[c+28>>2]=(0!==b%4||0===b%100&&0!==b%400?Rb:Qb)[a.getMonth()]+a.getDate()-1|0;x[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset(); +x[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},i:function(a,b,c,e,f,h,k,n){f=Pb(f,h);try{if(isNaN(f))return 61;var l=T(e);if(0!==(b&2)&&0===(c&2)&&2!==(l.flags&2097155))throw new N(2);if(1===(l.flags&2097155))throw new N(2);if(!l.wf.Tf)throw new N(43);var m=l.wf.Tf(l,a,f,b,c);var p=m.wg;x[k>>2]=m.lg;z[n>>2]=p;return 0}catch(q){if("undefined"==typeof W||"ErrnoError"!==q.name)throw q;return-q.yf}},j:function(a,b,c,e,f,h,k){h=Pb(h,k);try{var n=T(f);if(c&2){if(32768!==(n.node.mode&61440))throw new N(43); +e&2||n.wf.Uf&&n.wf.Uf(n,v.slice(a,a+b),h,b,e)}}catch(l){if("undefined"==typeof W||"ErrnoError"!==l.name)throw l;return-l.yf}},B:(a,b,c,e)=>{var f=(new Date).getFullYear(),h=(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();z[a>>2]=60*Math.max(h,f);x[b>>2]=Number(h!=f);b=k=>{var n=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(n/60)).padStart(2,"0")}${String(n%60).padStart(2,"0")}`};a=b(h);b=b(f);fDate.now(), +d:()=>performance.now(),r:a=>{var b=v.length;a>>>=0;if(2147483648=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);var f=Math;e=Math.max(a,e);a:{f=(f.min.call(f,2147483648,e+(65536-e%65536)%65536)-oa.buffer.byteLength+65535)/65536;try{oa.grow(f);ta();var h=1;break a}catch(k){}h=void 0}if(h)return!0}return!1},D:(a,b)=>{var c=0;Ub().forEach((e,f)=>{var h=b+c;f=z[a+4*f>>2]=h;for(h=0;h{var c=Ub(); +z[a>>2]=c.length;var e=0;c.forEach(f=>e+=f.length+1);z[b>>2]=e;return 0},f:function(a){try{var b=T(a);if(null===b.Gf)throw new N(8);b.Zf&&(b.Zf=null);try{b.wf.close&&b.wf.close(b)}catch(c){throw c;}finally{ib[b.Gf]=null}b.Gf=null;return 0}catch(c){if("undefined"==typeof W||"ErrnoError"!==c.name)throw c;return c.yf}},s:function(a,b){try{var c=T(a);u[b]=c.Cf?2:P(c.mode)?3:40960===(c.mode&61440)?7:4;w[b+2>>1]=0;F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>> +0:0)];x[b+8>>2]=F[0];x[b+12>>2]=F[1];F=[0,(D=0,1<=+Math.abs(D)?0>>0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[b+16>>2]=F[0];x[b+20>>2]=F[1];return 0}catch(e){if("undefined"==typeof W||"ErrnoError"!==e.name)throw e;return e.yf}},z:function(a,b,c,e){try{a:{var f=T(a);a=b;for(var h,k=b=0;k>2],l=z[a+4>>2];a+=8;var m=f,p=h,q=u;if(0>l||0>p)throw new N(28);if(null===m.Gf)throw new N(8);if(1===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31); +if(!m.wf.read)throw new N(28);var t="undefined"!=typeof p;if(!t)p=m.position;else if(!m.seekable)throw new N(70);var y=m.wf.read(m,q,n,l,p);t||(m.position+=y);var A=y;if(0>A){var G=-1;break a}b+=A;if(A>2]=G;return 0}catch(E){if("undefined"==typeof W||"ErrnoError"!==E.name)throw E;return E.yf}},m:function(a,b,c,e,f){b=Pb(b,c);try{if(isNaN(b))return 61;var h=T(a);Ib(h,b,e);F=[h.position>>>0,(D=h.position,1<=+Math.abs(D)?0>> +0:~~+Math.ceil((D-+(~~D>>>0))/4294967296)>>>0:0)];x[f>>2]=F[0];x[f+4>>2]=F[1];h.Zf&&0===b&&0===e&&(h.Zf=null);return 0}catch(k){if("undefined"==typeof W||"ErrnoError"!==k.name)throw k;return k.yf}},G:function(a){try{var b=T(a);return b.wf?.Kf?b.wf.Kf(b):0}catch(c){if("undefined"==typeof W||"ErrnoError"!==c.name)throw c;return c.yf}},v:function(a,b,c,e){try{a:{var f=T(a);a=b;for(var h,k=b=0;k>2],l=z[a+4>>2];a+=8;var m=f,p=n,q=l,t=h,y=u;if(0>q||0>t)throw new N(28);if(null===m.Gf)throw new N(8); +if(0===(m.flags&2097155))throw new N(8);if(P(m.node.mode))throw new N(31);if(!m.wf.write)throw new N(28);m.seekable&&m.flags&1024&&Ib(m,0,2);var A="undefined"!=typeof t;if(!A)t=m.position;else if(!m.seekable)throw new N(70);var G=m.wf.write(m,y,p,q,t,void 0);A||(m.position+=G);var E=G;if(0>E){var M=-1;break a}b+=E;"undefined"!=typeof h&&(h+=E)}M=b}z[e>>2]=M;return 0}catch(L){if("undefined"==typeof W||"ErrnoError"!==L.name)throw L;return L.yf}},sa:Vb,P:Wb,ha:Xb,ca:Yb,Z:Zb,la:$b,w:ac,g:bc,oa:cc,ja:dc, +ea:ec,fa:fc,h:gc,l:hc,pa:ic,ra:jc,qa:kc,da:lc,ga:mc,ia:nc,na:oc,c:pc,ka:qc,ma:rc,H:function(a,b,c,e){(0,globalThis.__onTablesChanged)?.(a,b,c,e)},aa:sc,V:tc,$:uc,ba:vc,S:wc,U:xc,Y:yc,X:zc,R:Ac,q:Bc,T:Cc,_:Dc,o:Ec,W:Fc,p:Gc},Z=function(){function a(c){Z=c.exports;oa=Z.ta;ta();Hc=Z.pf;va.unshift(Z.ua);B--;d.monitorRunDependencies?.(B);0==B&&(null!==za&&(clearInterval(za),za=null),Aa&&(c=Aa,Aa=null,c()));return Z}var b={a:Oc};B++;d.monitorRunDependencies?.(B);if(d.instantiateWasm)try{return d.instantiateWasm(b, +a)}catch(c){r(`Module.instantiateWasm callback failed with error: ${c}`),ba(c)}Ca||=d.locateFile?Ba("wa-sqlite.wasm")?"wa-sqlite.wasm":d.locateFile?d.locateFile("wa-sqlite.wasm",g):g+"wa-sqlite.wasm":(new URL("wa-sqlite.wasm",import.meta.url)).href;Ga(b,function(c){a(c.instance)}).catch(ba);return{}}();d._sqlite3_auto_extension=a=>(d._sqlite3_auto_extension=Z.va)(a);d._sqlite3_free=a=>(d._sqlite3_free=Z.wa)(a);d._sqlite3_malloc=a=>(d._sqlite3_malloc=Z.xa)(a); +d._sqlite3_bind_blob=(a,b,c,e,f)=>(d._sqlite3_bind_blob=Z.ya)(a,b,c,e,f);d._sqlite3_shutdown=()=>(d._sqlite3_shutdown=Z.za)();d._sqlite3_bind_int=(a,b,c)=>(d._sqlite3_bind_int=Z.Aa)(a,b,c);d._sqlite3_bind_int64=(a,b,c,e)=>(d._sqlite3_bind_int64=Z.Ba)(a,b,c,e);d._sqlite3_bind_double=(a,b,c)=>(d._sqlite3_bind_double=Z.Ca)(a,b,c);d._sqlite3_bind_null=(a,b)=>(d._sqlite3_bind_null=Z.Da)(a,b);d._sqlite3_clear_bindings=a=>(d._sqlite3_clear_bindings=Z.Ea)(a); +d._sqlite3_bind_text=(a,b,c,e,f)=>(d._sqlite3_bind_text=Z.Fa)(a,b,c,e,f);d._sqlite3_bind_pointer=(a,b,c,e,f)=>(d._sqlite3_bind_pointer=Z.Ga)(a,b,c,e,f);d._sqlite3_bind_value=(a,b,c)=>(d._sqlite3_bind_value=Z.Ha)(a,b,c);d._sqlite3_close=a=>(d._sqlite3_close=Z.Ia)(a);d._sqlite3_vtab_config=(a,b,c)=>(d._sqlite3_vtab_config=Z.Ja)(a,b,c);d._sqlite3_commit_hook=(a,b,c)=>(d._sqlite3_commit_hook=Z.Ka)(a,b,c);d._sqlite3_column_type=(a,b)=>(d._sqlite3_column_type=Z.La)(a,b); +d._sqlite3_column_count=a=>(d._sqlite3_column_count=Z.Ma)(a);d._sqlite3_column_text=(a,b)=>(d._sqlite3_column_text=Z.Na)(a,b);d._sqlite3_column_blob=(a,b)=>(d._sqlite3_column_blob=Z.Oa)(a,b);d._sqlite3_column_bytes=(a,b)=>(d._sqlite3_column_bytes=Z.Pa)(a,b);d._sqlite3_column_value=(a,b)=>(d._sqlite3_column_value=Z.Qa)(a,b);d._sqlite3_column_double=(a,b)=>(d._sqlite3_column_double=Z.Ra)(a,b);d._sqlite3_column_int=(a,b)=>(d._sqlite3_column_int=Z.Sa)(a,b); +d._sqlite3_column_int64=(a,b)=>(d._sqlite3_column_int64=Z.Ta)(a,b);d._sqlite3_column_name=(a,b)=>(d._sqlite3_column_name=Z.Ua)(a,b);d._sqlite3_context_db_handle=a=>(d._sqlite3_context_db_handle=Z.Va)(a);d._sqlite3_create_function_v2=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_create_function_v2=Z.Wa)(a,b,c,e,f,h,k,n,l);d._sqlite3_create_module_v2=(a,b,c,e,f)=>(d._sqlite3_create_module_v2=Z.Xa)(a,b,c,e,f);d._sqlite3_declare_vtab=(a,b)=>(d._sqlite3_declare_vtab=Z.Ya)(a,b); +d._sqlite3_errcode=a=>(d._sqlite3_errcode=Z.Za)(a);d._sqlite3_errmsg=a=>(d._sqlite3_errmsg=Z._a)(a);d._sqlite3_exec=(a,b,c,e,f)=>(d._sqlite3_exec=Z.$a)(a,b,c,e,f);d._sqlite3_finalize=a=>(d._sqlite3_finalize=Z.ab)(a);d._sqlite3_get_auxdata=(a,b)=>(d._sqlite3_get_auxdata=Z.bb)(a,b);d._sqlite3_next_stmt=(a,b)=>(d._sqlite3_next_stmt=Z.cb)(a,b);d._sqlite3_open=(a,b)=>(d._sqlite3_open=Z.db)(a,b);d._sqlite3_prepare_v2=(a,b,c,e,f)=>(d._sqlite3_prepare_v2=Z.eb)(a,b,c,e,f); +d._sqlite3_prepare_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare_v3=Z.fb)(a,b,c,e,f,h);d._sqlite3_randomness=(a,b)=>(d._sqlite3_randomness=Z.gb)(a,b);d._sqlite3_result_int=(a,b)=>(d._sqlite3_result_int=Z.hb)(a,b);d._sqlite3_result_blob=(a,b,c,e)=>(d._sqlite3_result_blob=Z.ib)(a,b,c,e);d._sqlite3_result_int64=(a,b,c)=>(d._sqlite3_result_int64=Z.jb)(a,b,c);d._sqlite3_result_double=(a,b)=>(d._sqlite3_result_double=Z.kb)(a,b);d._sqlite3_result_null=a=>(d._sqlite3_result_null=Z.lb)(a); +d._sqlite3_result_pointer=(a,b,c,e)=>(d._sqlite3_result_pointer=Z.mb)(a,b,c,e);d._sqlite3_result_error=(a,b,c)=>(d._sqlite3_result_error=Z.nb)(a,b,c);d._sqlite3_result_error_code=(a,b)=>(d._sqlite3_result_error_code=Z.ob)(a,b);d._sqlite3_result_value=(a,b)=>(d._sqlite3_result_value=Z.pb)(a,b);d._sqlite3_result_text=(a,b,c,e)=>(d._sqlite3_result_text=Z.qb)(a,b,c,e);d._sqlite3_result_subtype=(a,b)=>(d._sqlite3_result_subtype=Z.rb)(a,b); +d._sqlite3_set_authorizer=(a,b,c)=>(d._sqlite3_set_authorizer=Z.sb)(a,b,c);d._sqlite3_set_auxdata=(a,b,c,e)=>(d._sqlite3_set_auxdata=Z.tb)(a,b,c,e);d._sqlite3_sql=a=>(d._sqlite3_sql=Z.ub)(a);d._sqlite3_reset=a=>(d._sqlite3_reset=Z.vb)(a);d._sqlite3_value_text=a=>(d._sqlite3_value_text=Z.wb)(a);d._sqlite3_value_type=a=>(d._sqlite3_value_type=Z.xb)(a);d._sqlite3_value_bytes=a=>(d._sqlite3_value_bytes=Z.yb)(a);d._sqlite3_value_blob=a=>(d._sqlite3_value_blob=Z.zb)(a); +d._sqlite3_value_int=a=>(d._sqlite3_value_int=Z.Ab)(a);d._sqlite3_value_int64=a=>(d._sqlite3_value_int64=Z.Bb)(a);d._sqlite3_value_double=a=>(d._sqlite3_value_double=Z.Cb)(a);d._sqlite3_value_pointer=(a,b)=>(d._sqlite3_value_pointer=Z.Db)(a,b);d._sqlite3_vtab_distinct=a=>(d._sqlite3_vtab_distinct=Z.Eb)(a);d._sqlite3_get_autocommit=a=>(d._sqlite3_get_autocommit=Z.Fb)(a);d._sqlite3_step=a=>(d._sqlite3_step=Z.Gb)(a);d._sqlite3_status64=(a,b,c,e)=>(d._sqlite3_status64=Z.Hb)(a,b,c,e); +d._sqlite3_status=(a,b,c,e)=>(d._sqlite3_status=Z.Ib)(a,b,c,e);d._sqlite3_db_status=(a,b,c,e,f)=>(d._sqlite3_db_status=Z.Jb)(a,b,c,e,f);d._sqlite3_msize=a=>(d._sqlite3_msize=Z.Kb)(a);d._sqlite3_vfs_find=a=>(d._sqlite3_vfs_find=Z.Lb)(a);d._sqlite3_vfs_register=(a,b)=>(d._sqlite3_vfs_register=Z.Mb)(a,b);d._sqlite3_vfs_unregister=a=>(d._sqlite3_vfs_unregister=Z.Nb)(a);d._sqlite3_release_memory=a=>(d._sqlite3_release_memory=Z.Ob)(a); +d._sqlite3_soft_heap_limit64=(a,b)=>(d._sqlite3_soft_heap_limit64=Z.Pb)(a,b);d._sqlite3_memory_used=()=>(d._sqlite3_memory_used=Z.Qb)();d._sqlite3_hard_heap_limit64=(a,b)=>(d._sqlite3_hard_heap_limit64=Z.Rb)(a,b);d._sqlite3_memory_highwater=a=>(d._sqlite3_memory_highwater=Z.Sb)(a);d._sqlite3_malloc64=(a,b)=>(d._sqlite3_malloc64=Z.Tb)(a,b);d._sqlite3_realloc=(a,b)=>(d._sqlite3_realloc=Z.Ub)(a,b);d._sqlite3_realloc64=(a,b,c)=>(d._sqlite3_realloc64=Z.Vb)(a,b,c); +d._sqlite3_str_vappendf=(a,b,c)=>(d._sqlite3_str_vappendf=Z.Wb)(a,b,c);d._sqlite3_str_append=(a,b,c)=>(d._sqlite3_str_append=Z.Xb)(a,b,c);d._sqlite3_str_appendchar=(a,b,c)=>(d._sqlite3_str_appendchar=Z.Yb)(a,b,c);d._sqlite3_str_appendall=(a,b)=>(d._sqlite3_str_appendall=Z.Zb)(a,b);d._sqlite3_str_appendf=(a,b,c)=>(d._sqlite3_str_appendf=Z._b)(a,b,c);d._sqlite3_str_finish=a=>(d._sqlite3_str_finish=Z.$b)(a);d._sqlite3_str_errcode=a=>(d._sqlite3_str_errcode=Z.ac)(a); +d._sqlite3_str_length=a=>(d._sqlite3_str_length=Z.bc)(a);d._sqlite3_str_value=a=>(d._sqlite3_str_value=Z.cc)(a);d._sqlite3_str_reset=a=>(d._sqlite3_str_reset=Z.dc)(a);d._sqlite3_str_new=a=>(d._sqlite3_str_new=Z.ec)(a);d._sqlite3_vmprintf=(a,b)=>(d._sqlite3_vmprintf=Z.fc)(a,b);d._sqlite3_mprintf=(a,b)=>(d._sqlite3_mprintf=Z.gc)(a,b);d._sqlite3_vsnprintf=(a,b,c,e)=>(d._sqlite3_vsnprintf=Z.hc)(a,b,c,e);d._sqlite3_snprintf=(a,b,c,e)=>(d._sqlite3_snprintf=Z.ic)(a,b,c,e); +d._sqlite3_log=(a,b,c)=>(d._sqlite3_log=Z.jc)(a,b,c);d._sqlite3_stricmp=(a,b)=>(d._sqlite3_stricmp=Z.kc)(a,b);d._sqlite3_strnicmp=(a,b,c)=>(d._sqlite3_strnicmp=Z.lc)(a,b,c);d._sqlite3_os_init=()=>(d._sqlite3_os_init=Z.mc)();d._sqlite3_os_end=()=>(d._sqlite3_os_end=Z.nc)();d._sqlite3_serialize=(a,b,c,e)=>(d._sqlite3_serialize=Z.oc)(a,b,c,e);d._sqlite3_deserialize=(a,b,c,e,f,h,k,n)=>(d._sqlite3_deserialize=Z.pc)(a,b,c,e,f,h,k,n);d._sqlite3_database_file_object=a=>(d._sqlite3_database_file_object=Z.qc)(a); +d._sqlite3_backup_init=(a,b,c,e)=>(d._sqlite3_backup_init=Z.rc)(a,b,c,e);d._sqlite3_backup_step=(a,b)=>(d._sqlite3_backup_step=Z.sc)(a,b);d._sqlite3_backup_finish=a=>(d._sqlite3_backup_finish=Z.tc)(a);d._sqlite3_backup_remaining=a=>(d._sqlite3_backup_remaining=Z.uc)(a);d._sqlite3_backup_pagecount=a=>(d._sqlite3_backup_pagecount=Z.vc)(a);d._sqlite3_value_bytes16=a=>(d._sqlite3_value_bytes16=Z.wc)(a);d._sqlite3_value_subtype=a=>(d._sqlite3_value_subtype=Z.xc)(a); +d._sqlite3_value_text16=a=>(d._sqlite3_value_text16=Z.yc)(a);d._sqlite3_value_text16be=a=>(d._sqlite3_value_text16be=Z.zc)(a);d._sqlite3_value_text16le=a=>(d._sqlite3_value_text16le=Z.Ac)(a);d._sqlite3_value_encoding=a=>(d._sqlite3_value_encoding=Z.Bc)(a);d._sqlite3_value_nochange=a=>(d._sqlite3_value_nochange=Z.Cc)(a);d._sqlite3_value_frombind=a=>(d._sqlite3_value_frombind=Z.Dc)(a);d._sqlite3_value_dup=a=>(d._sqlite3_value_dup=Z.Ec)(a);d._sqlite3_value_free=a=>(d._sqlite3_value_free=Z.Fc)(a); +d._sqlite3_result_blob64=(a,b,c,e,f)=>(d._sqlite3_result_blob64=Z.Gc)(a,b,c,e,f);d._sqlite3_result_error16=(a,b,c)=>(d._sqlite3_result_error16=Z.Hc)(a,b,c);d._sqlite3_result_text64=(a,b,c,e,f,h)=>(d._sqlite3_result_text64=Z.Ic)(a,b,c,e,f,h);d._sqlite3_result_text16=(a,b,c,e)=>(d._sqlite3_result_text16=Z.Jc)(a,b,c,e);d._sqlite3_result_text16be=(a,b,c,e)=>(d._sqlite3_result_text16be=Z.Kc)(a,b,c,e);d._sqlite3_result_text16le=(a,b,c,e)=>(d._sqlite3_result_text16le=Z.Lc)(a,b,c,e); +d._sqlite3_result_error_toobig=a=>(d._sqlite3_result_error_toobig=Z.Mc)(a);d._sqlite3_result_zeroblob=(a,b)=>(d._sqlite3_result_zeroblob=Z.Nc)(a,b);d._sqlite3_result_zeroblob64=(a,b,c)=>(d._sqlite3_result_zeroblob64=Z.Oc)(a,b,c);d._sqlite3_result_error_nomem=a=>(d._sqlite3_result_error_nomem=Z.Pc)(a);d._sqlite3_user_data=a=>(d._sqlite3_user_data=Z.Qc)(a);d._sqlite3_vtab_nochange=a=>(d._sqlite3_vtab_nochange=Z.Rc)(a);d._sqlite3_vtab_in_first=(a,b)=>(d._sqlite3_vtab_in_first=Z.Sc)(a,b); +d._sqlite3_vtab_in_next=(a,b)=>(d._sqlite3_vtab_in_next=Z.Tc)(a,b);d._sqlite3_aggregate_context=(a,b)=>(d._sqlite3_aggregate_context=Z.Uc)(a,b);d._sqlite3_data_count=a=>(d._sqlite3_data_count=Z.Vc)(a);d._sqlite3_column_bytes16=(a,b)=>(d._sqlite3_column_bytes16=Z.Wc)(a,b);d._sqlite3_column_text16=(a,b)=>(d._sqlite3_column_text16=Z.Xc)(a,b);d._sqlite3_column_name16=(a,b)=>(d._sqlite3_column_name16=Z.Yc)(a,b);d._sqlite3_bind_blob64=(a,b,c,e,f,h)=>(d._sqlite3_bind_blob64=Z.Zc)(a,b,c,e,f,h); +d._sqlite3_bind_text64=(a,b,c,e,f,h,k)=>(d._sqlite3_bind_text64=Z._c)(a,b,c,e,f,h,k);d._sqlite3_bind_text16=(a,b,c,e,f)=>(d._sqlite3_bind_text16=Z.$c)(a,b,c,e,f);d._sqlite3_bind_zeroblob=(a,b,c)=>(d._sqlite3_bind_zeroblob=Z.ad)(a,b,c);d._sqlite3_bind_zeroblob64=(a,b,c,e)=>(d._sqlite3_bind_zeroblob64=Z.bd)(a,b,c,e);d._sqlite3_bind_parameter_count=a=>(d._sqlite3_bind_parameter_count=Z.cd)(a);d._sqlite3_bind_parameter_name=(a,b)=>(d._sqlite3_bind_parameter_name=Z.dd)(a,b); +d._sqlite3_bind_parameter_index=(a,b)=>(d._sqlite3_bind_parameter_index=Z.ed)(a,b);d._sqlite3_db_handle=a=>(d._sqlite3_db_handle=Z.fd)(a);d._sqlite3_stmt_readonly=a=>(d._sqlite3_stmt_readonly=Z.gd)(a);d._sqlite3_stmt_isexplain=a=>(d._sqlite3_stmt_isexplain=Z.hd)(a);d._sqlite3_stmt_explain=(a,b)=>(d._sqlite3_stmt_explain=Z.id)(a,b);d._sqlite3_stmt_busy=a=>(d._sqlite3_stmt_busy=Z.jd)(a);d._sqlite3_stmt_status=(a,b,c)=>(d._sqlite3_stmt_status=Z.kd)(a,b,c); +d._sqlite3_expanded_sql=a=>(d._sqlite3_expanded_sql=Z.ld)(a);d._sqlite3_value_numeric_type=a=>(d._sqlite3_value_numeric_type=Z.md)(a);d._sqlite3_blob_open=(a,b,c,e,f,h,k,n)=>(d._sqlite3_blob_open=Z.nd)(a,b,c,e,f,h,k,n);d._sqlite3_blob_close=a=>(d._sqlite3_blob_close=Z.od)(a);d._sqlite3_blob_read=(a,b,c,e)=>(d._sqlite3_blob_read=Z.pd)(a,b,c,e);d._sqlite3_blob_write=(a,b,c,e)=>(d._sqlite3_blob_write=Z.qd)(a,b,c,e);d._sqlite3_blob_bytes=a=>(d._sqlite3_blob_bytes=Z.rd)(a); +d._sqlite3_blob_reopen=(a,b,c)=>(d._sqlite3_blob_reopen=Z.sd)(a,b,c);d._sqlite3_strglob=(a,b)=>(d._sqlite3_strglob=Z.td)(a,b);d._sqlite3_strlike=(a,b,c)=>(d._sqlite3_strlike=Z.ud)(a,b,c);d._sqlite3_cancel_auto_extension=a=>(d._sqlite3_cancel_auto_extension=Z.vd)(a);d._sqlite3_reset_auto_extension=()=>(d._sqlite3_reset_auto_extension=Z.wd)();d._sqlite3_prepare=(a,b,c,e,f)=>(d._sqlite3_prepare=Z.xd)(a,b,c,e,f);d._sqlite3_prepare16=(a,b,c,e,f)=>(d._sqlite3_prepare16=Z.yd)(a,b,c,e,f); +d._sqlite3_prepare16_v2=(a,b,c,e,f)=>(d._sqlite3_prepare16_v2=Z.zd)(a,b,c,e,f);d._sqlite3_prepare16_v3=(a,b,c,e,f,h)=>(d._sqlite3_prepare16_v3=Z.Ad)(a,b,c,e,f,h);d._sqlite3_get_table=(a,b,c,e,f,h)=>(d._sqlite3_get_table=Z.Bd)(a,b,c,e,f,h);d._sqlite3_free_table=a=>(d._sqlite3_free_table=Z.Cd)(a);d._sqlite3_create_module=(a,b,c,e)=>(d._sqlite3_create_module=Z.Dd)(a,b,c,e);d._sqlite3_drop_modules=(a,b)=>(d._sqlite3_drop_modules=Z.Ed)(a,b);d._sqlite3_vtab_on_conflict=a=>(d._sqlite3_vtab_on_conflict=Z.Fd)(a); +d._sqlite3_vtab_collation=(a,b)=>(d._sqlite3_vtab_collation=Z.Gd)(a,b);d._sqlite3_vtab_in=(a,b,c)=>(d._sqlite3_vtab_in=Z.Hd)(a,b,c);d._sqlite3_vtab_rhs_value=(a,b,c)=>(d._sqlite3_vtab_rhs_value=Z.Id)(a,b,c);d._sqlite3_keyword_name=(a,b,c)=>(d._sqlite3_keyword_name=Z.Jd)(a,b,c);d._sqlite3_keyword_count=()=>(d._sqlite3_keyword_count=Z.Kd)();d._sqlite3_keyword_check=(a,b)=>(d._sqlite3_keyword_check=Z.Ld)(a,b);d._sqlite3_complete=a=>(d._sqlite3_complete=Z.Md)(a); +d._sqlite3_complete16=a=>(d._sqlite3_complete16=Z.Nd)(a);d._sqlite3_libversion=()=>(d._sqlite3_libversion=Z.Od)();d._sqlite3_libversion_number=()=>(d._sqlite3_libversion_number=Z.Pd)();d._sqlite3_threadsafe=()=>(d._sqlite3_threadsafe=Z.Qd)();d._sqlite3_initialize=()=>(d._sqlite3_initialize=Z.Rd)();d._sqlite3_config=(a,b)=>(d._sqlite3_config=Z.Sd)(a,b);d._sqlite3_db_mutex=a=>(d._sqlite3_db_mutex=Z.Td)(a);d._sqlite3_db_release_memory=a=>(d._sqlite3_db_release_memory=Z.Ud)(a); +d._sqlite3_db_cacheflush=a=>(d._sqlite3_db_cacheflush=Z.Vd)(a);d._sqlite3_db_config=(a,b,c)=>(d._sqlite3_db_config=Z.Wd)(a,b,c);d._sqlite3_last_insert_rowid=a=>(d._sqlite3_last_insert_rowid=Z.Xd)(a);d._sqlite3_set_last_insert_rowid=(a,b,c)=>(d._sqlite3_set_last_insert_rowid=Z.Yd)(a,b,c);d._sqlite3_changes64=a=>(d._sqlite3_changes64=Z.Zd)(a);d._sqlite3_changes=a=>(d._sqlite3_changes=Z._d)(a);d._sqlite3_total_changes64=a=>(d._sqlite3_total_changes64=Z.$d)(a); +d._sqlite3_total_changes=a=>(d._sqlite3_total_changes=Z.ae)(a);d._sqlite3_txn_state=(a,b)=>(d._sqlite3_txn_state=Z.be)(a,b);d._sqlite3_close_v2=a=>(d._sqlite3_close_v2=Z.ce)(a);d._sqlite3_busy_handler=(a,b,c)=>(d._sqlite3_busy_handler=Z.de)(a,b,c);d._sqlite3_progress_handler=(a,b,c,e)=>(d._sqlite3_progress_handler=Z.ee)(a,b,c,e);d._sqlite3_busy_timeout=(a,b)=>(d._sqlite3_busy_timeout=Z.fe)(a,b);d._sqlite3_interrupt=a=>(d._sqlite3_interrupt=Z.ge)(a); +d._sqlite3_is_interrupted=a=>(d._sqlite3_is_interrupted=Z.he)(a);d._sqlite3_create_function=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function=Z.ie)(a,b,c,e,f,h,k,n);d._sqlite3_create_window_function=(a,b,c,e,f,h,k,n,l,m)=>(d._sqlite3_create_window_function=Z.je)(a,b,c,e,f,h,k,n,l,m);d._sqlite3_create_function16=(a,b,c,e,f,h,k,n)=>(d._sqlite3_create_function16=Z.ke)(a,b,c,e,f,h,k,n);d._sqlite3_overload_function=(a,b,c)=>(d._sqlite3_overload_function=Z.le)(a,b,c); +d._sqlite3_trace_v2=(a,b,c,e)=>(d._sqlite3_trace_v2=Z.me)(a,b,c,e);d._sqlite3_update_hook=(a,b,c)=>(d._sqlite3_update_hook=Z.ne)(a,b,c);d._sqlite3_rollback_hook=(a,b,c)=>(d._sqlite3_rollback_hook=Z.oe)(a,b,c);d._sqlite3_autovacuum_pages=(a,b,c,e)=>(d._sqlite3_autovacuum_pages=Z.pe)(a,b,c,e);d._sqlite3_wal_autocheckpoint=(a,b)=>(d._sqlite3_wal_autocheckpoint=Z.qe)(a,b);d._sqlite3_wal_hook=(a,b,c)=>(d._sqlite3_wal_hook=Z.re)(a,b,c); +d._sqlite3_wal_checkpoint_v2=(a,b,c,e,f)=>(d._sqlite3_wal_checkpoint_v2=Z.se)(a,b,c,e,f);d._sqlite3_wal_checkpoint=(a,b)=>(d._sqlite3_wal_checkpoint=Z.te)(a,b);d._sqlite3_error_offset=a=>(d._sqlite3_error_offset=Z.ue)(a);d._sqlite3_errmsg16=a=>(d._sqlite3_errmsg16=Z.ve)(a);d._sqlite3_extended_errcode=a=>(d._sqlite3_extended_errcode=Z.we)(a);d._sqlite3_system_errno=a=>(d._sqlite3_system_errno=Z.xe)(a);d._sqlite3_errstr=a=>(d._sqlite3_errstr=Z.ye)(a); +d._sqlite3_limit=(a,b,c)=>(d._sqlite3_limit=Z.ze)(a,b,c);d._sqlite3_open_v2=(a,b,c,e)=>(d._sqlite3_open_v2=Z.Ae)(a,b,c,e);d._sqlite3_open16=(a,b)=>(d._sqlite3_open16=Z.Be)(a,b);d._sqlite3_create_collation=(a,b,c,e,f)=>(d._sqlite3_create_collation=Z.Ce)(a,b,c,e,f);d._sqlite3_create_collation_v2=(a,b,c,e,f,h)=>(d._sqlite3_create_collation_v2=Z.De)(a,b,c,e,f,h);d._sqlite3_create_collation16=(a,b,c,e,f)=>(d._sqlite3_create_collation16=Z.Ee)(a,b,c,e,f); +d._sqlite3_collation_needed=(a,b,c)=>(d._sqlite3_collation_needed=Z.Fe)(a,b,c);d._sqlite3_collation_needed16=(a,b,c)=>(d._sqlite3_collation_needed16=Z.Ge)(a,b,c);d._sqlite3_get_clientdata=(a,b)=>(d._sqlite3_get_clientdata=Z.He)(a,b);d._sqlite3_set_clientdata=(a,b,c,e)=>(d._sqlite3_set_clientdata=Z.Ie)(a,b,c,e);d._sqlite3_table_column_metadata=(a,b,c,e,f,h,k,n,l)=>(d._sqlite3_table_column_metadata=Z.Je)(a,b,c,e,f,h,k,n,l);d._sqlite3_sleep=a=>(d._sqlite3_sleep=Z.Ke)(a); +d._sqlite3_extended_result_codes=(a,b)=>(d._sqlite3_extended_result_codes=Z.Le)(a,b);d._sqlite3_file_control=(a,b,c,e)=>(d._sqlite3_file_control=Z.Me)(a,b,c,e);d._sqlite3_test_control=(a,b)=>(d._sqlite3_test_control=Z.Ne)(a,b);d._sqlite3_create_filename=(a,b,c,e,f)=>(d._sqlite3_create_filename=Z.Oe)(a,b,c,e,f);d._sqlite3_free_filename=a=>(d._sqlite3_free_filename=Z.Pe)(a);d._sqlite3_uri_parameter=(a,b)=>(d._sqlite3_uri_parameter=Z.Qe)(a,b);d._sqlite3_uri_key=(a,b)=>(d._sqlite3_uri_key=Z.Re)(a,b); +d._sqlite3_uri_boolean=(a,b,c)=>(d._sqlite3_uri_boolean=Z.Se)(a,b,c);d._sqlite3_uri_int64=(a,b,c,e)=>(d._sqlite3_uri_int64=Z.Te)(a,b,c,e);d._sqlite3_filename_database=a=>(d._sqlite3_filename_database=Z.Ue)(a);d._sqlite3_filename_journal=a=>(d._sqlite3_filename_journal=Z.Ve)(a);d._sqlite3_filename_wal=a=>(d._sqlite3_filename_wal=Z.We)(a);d._sqlite3_db_name=(a,b)=>(d._sqlite3_db_name=Z.Xe)(a,b);d._sqlite3_db_filename=(a,b)=>(d._sqlite3_db_filename=Z.Ye)(a,b); +d._sqlite3_db_readonly=(a,b)=>(d._sqlite3_db_readonly=Z.Ze)(a,b);d._sqlite3_compileoption_used=a=>(d._sqlite3_compileoption_used=Z._e)(a);d._sqlite3_compileoption_get=a=>(d._sqlite3_compileoption_get=Z.$e)(a);d._sqlite3_sourceid=()=>(d._sqlite3_sourceid=Z.af)();d._malloc=a=>(d._malloc=Z.bf)(a);d._free=a=>(d._free=Z.cf)(a);d._RegisterExtensionFunctions=a=>(d._RegisterExtensionFunctions=Z.df)(a);d._set_authorizer=a=>(d._set_authorizer=Z.ef)(a); +d._create_function=(a,b,c,e,f,h)=>(d._create_function=Z.ff)(a,b,c,e,f,h);d._on_tables_changed=(a,b,c,e,f,h)=>(d._on_tables_changed=Z.gf)(a,b,c,e,f,h);d._register_table_update_hook=a=>(d._register_table_update_hook=Z.hf)(a);d._create_module=(a,b,c,e)=>(d._create_module=Z.jf)(a,b,c,e);d._progress_handler=(a,b)=>(d._progress_handler=Z.kf)(a,b);d._register_vfs=(a,b,c,e)=>(d._register_vfs=Z.lf)(a,b,c,e);d._getSqliteFree=()=>(d._getSqliteFree=Z.mf)();var Pc=d._main=(a,b)=>(Pc=d._main=Z.nf)(a,b); +d._setup_powersync=()=>(d._setup_powersync=Z.of)();var eb=(a,b)=>(eb=Z.qf)(a,b),Qc=()=>(Qc=Z.rf)(),Mc=a=>(Mc=Z.sf)(a),Kc=a=>(Kc=Z.tf)(a),Lc=()=>(Lc=Z.uf)();d._sqlite3_version=46872;d.getTempRet0=()=>Qc();d.ccall=Y;d.cwrap=(a,b,c,e)=>{var f=!c||c.every(h=>"number"===h||"boolean"===h);return"string"!==b&&f&&!e?d["_"+a]:(...h)=>Y(a,b,c,h,e)}; +d.addFunction=(a,b)=>{if(!Ic){Ic=new WeakMap;var c=Hc.length;if(Ic)for(var e=0;e<0+c;e++){var f=Hc.get(e);f&&Ic.set(f,e)}}if(c=Ic.get(a)||0)return c;if(Jc.length)c=Jc.pop();else{try{Hc.grow(1)}catch(n){if(!(n instanceof RangeError))throw n;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.";}c=Hc.length-1}try{Hc.set(c,a)}catch(n){if(!(n instanceof TypeError))throw n;if("function"==typeof WebAssembly.Function){e=WebAssembly.Function;f={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"};for(var h= {parameters:[],results:"v"==b[0]?[]:[f[b[0]]]},k=1;kk?e.push(k):e.push(k%128|128,k>>7);for(k=0;kf?b.push(f):b.push(f%128|128,f>>7);b.push(...e);b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(new Uint8Array(b));b=(new WebAssembly.Instance(b, -{e:{f:a}})).exports.f}Gc.set(c,b)}Hc.set(a,c);return c};d.setValue=J;d.getValue=I;d.UTF8ToString=(a,b)=>a?K(v,a,b):"";d.stringToUTF8=(a,b,c)=>N(a,v,b,c);d.lengthBytesUTF8=Ra;d.intArrayFromString=Sa;d.intArrayToString=function(a){for(var b=[],c=0;c{for(var b="";;){var c=v[a++];if(!c)return b;b+=String.fromCharCode(c)}}; -d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&oa[c];)++c;c<<=1;if(32=b/2);++e){var f=w[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f>1]=a.charCodeAt(f),b+=2;w[b>>1]=0;return b-e}; -d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=x[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}x[b>>2]=h;b+=4;if(b+4>c)break}x[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{u.set(a,b)};var Qc; -ya=function Rc(){Qc||Sc();Qc||(ya=Rc)}; -function Sc(){function a(){if(!Qc&&(Qc=!0,d.calledRun=!0,!na)){d.noFSInit||Hb||(Hb=!0,d.stdin=d.stdin,d.stdout=d.stdout,d.stderr=d.stderr,d.stdin?Ib("stdin",d.stdin):yb("/dev/tty","/dev/stdin"),d.stdout?Ib("stdout",null,d.stdout):yb("/dev/tty","/dev/stdout"),d.stderr?Ib("stderr",null,d.stderr):yb("/dev/tty1","/dev/stderr"),Eb("/dev/stdin",0),Eb("/dev/stdout",1),Eb("/dev/stderr",1));ib=!1;Ga(ta);Ga(ua);aa(d);if(d.onRuntimeInitialized)d.onRuntimeInitialized();if(Tc){var b=Oc;try{var c=b(0,0);Ha||(d.onExit?.(c), -na=!0);ea(c,new Fa(c))}catch(e){e instanceof Fa||"unwind"==e||ea(1,e)}}if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)b=d.postRun.shift(),va.unshift(b);Ga(va)}}if(!(0a?J(v,a,b):"";d.stringToUTF8=(a,b,c)=>K(a,v,b,c);d.lengthBytesUTF8=Ta;d.intArrayFromString=Ua;d.intArrayToString=function(a){for(var b=[],c=0;c{for(var b="";;){var c=v[a++];if(!c)return b;b+=String.fromCharCode(c)}}; +d.UTF16ToString=(a,b)=>{var c=a>>1;for(var e=c+b/2;!(c>=e)&&qa[c];)++c;c<<=1;if(32=b/2);++e){var f=w[a+2*e>>1];if(0==f)break;c+=String.fromCharCode(f)}return c};d.stringToUTF16=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f>1]=a.charCodeAt(f),b+=2;w[b>>1]=0;return b-e}; +d.UTF32ToString=(a,b)=>{for(var c=0,e="";!(c>=b/4);){var f=x[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e};d.stringToUTF32=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}x[b>>2]=h;b+=4;if(b+4>c)break}x[b>>2]=0;return b-e};d.writeArrayToMemory=(a,b)=>{u.set(a,b)};var Rc; +Aa=function Sc(){Rc||Tc();Rc||(Aa=Sc)}; +function Tc(){function a(){if(!Rc&&(Rc=!0,d.calledRun=!0,!pa)){d.noFSInit||Jb||(Jb=!0,d.stdin=d.stdin,d.stdout=d.stdout,d.stderr=d.stderr,d.stdin?Kb("stdin",d.stdin):Ab("/dev/tty","/dev/stdin"),d.stdout?Kb("stdout",null,d.stdout):Ab("/dev/tty","/dev/stdout"),d.stderr?Kb("stderr",null,d.stderr):Ab("/dev/tty1","/dev/stderr"),Gb("/dev/stdin",0),Gb("/dev/stdout",1),Gb("/dev/stderr",1));kb=!1;Ia(va);Ia(wa);aa(d);d.onRuntimeInitialized?.();if(Uc){var b=Pc;try{var c=b(0,0);Ja||(d.onExit?.(c),pa=!0);ja(c, +new Ha(c))}catch(e){e instanceof Ha||"unwind"==e||ja(1,e)}}if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)b=d.postRun.shift(),xa.unshift(b);Ia(xa)}}if(!(0 | bigint | null; +type SQLiteCompatibleType = + | number + | string + | Uint8Array + | Array + | bigint + | null; /** * SQLite Virtual File System object @@ -71,7 +77,12 @@ declare interface SQLiteVFS { xDeviceCharacteristics(fileId: number): number; /** @see https://sqlite.org/c3ref/vfs.html */ - xOpen(name: string | null, fileId: number, flags: number, pOutFlags: DataView): number; + xOpen( + name: string | null, + fileId: number, + flags: number, + pOutFlags: DataView + ): number; /** @see https://sqlite.org/c3ref/vfs.html */ xDelete(name: string, syncDir: number): number; @@ -126,12 +137,24 @@ declare interface SQLiteModule { /** * @see https://sqlite.org/vtab.html#the_xcreate_method */ - xCreate?(db: number, appData, argv: string[], pVTab: number, pzErr: DataView): number; + xCreate?( + db: number, + appData, + argv: string[], + pVTab: number, + pzErr: DataView + ): number; /** * @see https://sqlite.org/vtab.html#the_xconnect_method */ - xConnect(db: number, appData, argv: string[], pVTab: number, pzErr: DataView): number; + xConnect( + db: number, + appData, + argv: string[], + pVTab: number, + pzErr: DataView + ): number; /** * @see https://sqlite.org/vtab.html#the_xbestindex_method @@ -161,7 +184,12 @@ declare interface SQLiteModule { /** * @see https://sqlite.org/vtab.html#the_xfilter_method */ - xFilter(pCursor: number, idxNum: number, idxString: string | null, values: number[]): number; + xFilter( + pCursor: number, + idxNum: number, + idxString: string | null, + values: number[] + ): number; /** * @see https://sqlite.org/vtab.html#the_xnext_method @@ -298,7 +326,9 @@ declare interface SQLiteAPI { */ bind_collection( stmt: number, - bindings: { [index: string]: SQLiteCompatibleType | null } | Array + bindings: + | { [index: string]: SQLiteCompatibleType | null } + | Array ): number; /** @@ -572,7 +602,12 @@ declare interface SQLiteAPI { * @param appData * @returns `SQLITE_OK` (throws exception on error) */ - create_module(db: number, zName: string, module: SQLiteModule, appData?): number; + create_module( + db: number, + zName: string, + module: SQLiteModule, + appData? + ): number; /** * Get number of columns in current row of a prepared statement @@ -608,7 +643,10 @@ declare interface SQLiteAPI { exec( db: number, zSQL: string, - callback?: (row: Array, columns: string[]) => void + callback?: ( + row: Array, + columns: string[] + ) => void ): Promise; /** @@ -667,12 +705,14 @@ declare interface SQLiteAPI { */ open_v2(zFilename: string, iFlags?: number, zVfs?: string): Promise; - /** * Registers table row on change callback * */ - register_table_onchange_hook(db: number, callback: (opType: number, tableName: string, rowId: number) => void): void; + register_table_onchange_hook( + db: number, + callback: (opType: number, tableName: string, rowId: number) => void + ): void; /** * Compile an SQL statement @@ -717,7 +757,10 @@ declare interface SQLiteAPI { * pointer and next SQL pointer, or a Promise containing `null` when * no statement remains */ - prepare_v2(db: number, sql: number): Promise<{ stmt: number; sql: number } | null>; + prepare_v2( + db: number, + sql: number + ): Promise<{ stmt: number; sql: number } | null>; /** * Specify callback to be invoked between long-running queries @@ -726,7 +769,12 @@ declare interface SQLiteAPI { * @param handler * @param userData */ - progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number, userData); + progress_handler( + db: number, + nProgressOps: number, + handler: (userData: any) => number, + userData + ); /** * Reset a prepared statement object @@ -741,7 +789,10 @@ declare interface SQLiteAPI { * @param context context pointer * @param value */ - result(context: number, value: (SQLiteCompatibleType | number[]) | null): void; + result( + context: number, + value: (SQLiteCompatibleType | number[]) | null + ): void; /** * Set the result of a function or vtable column @@ -1023,7 +1074,7 @@ declare interface SQLiteAPI { } /** @ignore */ -declare module '@powersync/wa-sqlite/src/sqlite-constants.js' { +declare module "@journeyapps/wa-sqlite/src/sqlite-constants.js" { export const SQLITE_OK: 0; export const SQLITE_ERROR: 1; export const SQLITE_INTERNAL: 2; @@ -1256,8 +1307,8 @@ declare module '@powersync/wa-sqlite/src/sqlite-constants.js' { } /** @ignore */ -declare module '@powersync/wa-sqlite' { - export * from '@powersync/wa-sqlite/src/sqlite-constants.js'; +declare module "@journeyapps/wa-sqlite" { + export * from "@journeyapps/wa-sqlite/src/sqlite-constants.js"; /** * Builds a Javascript API from the Emscripten module. This API is still @@ -1275,20 +1326,20 @@ declare module '@powersync/wa-sqlite' { } /** @ignore */ -declare module '@powersync/wa-sqlite/dist/wa-sqlite.mjs' { +declare module "@journeyapps/wa-sqlite/dist/wa-sqlite.mjs" { function ModuleFactory(config?: object): Promise; export = ModuleFactory; } /** @ignore */ -declare module '@powersync/wa-sqlite/dist/wa-sqlite-async.mjs' { +declare module "@journeyapps/wa-sqlite/dist/wa-sqlite-async.mjs" { function ModuleFactory(config?: object): Promise; export = ModuleFactory; } /** @ignore */ -declare module '@powersync/wa-sqlite/src/VFS.js' { - export * from '@powersync/wa-sqlite/src/sqlite-constants.js'; +declare module "@journeyapps/wa-sqlite/src/VFS.js" { + export * from "@journeyapps/wa-sqlite/src/sqlite-constants.js"; export class Base { mxPathName: number; @@ -1303,22 +1354,14 @@ declare module '@powersync/wa-sqlite/src/VFS.js' { * @param {number} iOffset * @returns {number} */ - xRead( - fileId: number, - pData: Uint8Array, - iOffset: number - ): number; + xRead(fileId: number, pData: Uint8Array, iOffset: number): number; /** * @param {number} fileId * @param {Uint8Array} pData * @param {number} iOffset * @returns {number} */ - xWrite( - fileId: number, - pData: Uint8Array, - iOffset: number - ): number; + xWrite(fileId: number, pData: Uint8Array, iOffset: number): number; /** * @param {number} fileId * @param {number} iSize @@ -1379,7 +1422,12 @@ declare module '@powersync/wa-sqlite/src/VFS.js' { * @param {DataView} pOutFlags * @returns {number} */ - xOpen(name: string | null, fileId: number, flags: number, pOutFlags: DataView): number; + xOpen( + name: string | null, + fileId: number, + flags: number, + pOutFlags: DataView + ): number; /** * * @param {string} name @@ -1405,7 +1453,7 @@ declare module '@powersync/wa-sqlite/src/VFS.js' { } /** @ignore */ -declare module 'wa-sqlite/src/examples/ArrayModule.js' { +declare module "@journeyapps/wa-sqlite/src/examples/ArrayModule.js" { export class ArrayModule { /** * @param {SQLiteAPI} sqlite3 @@ -1413,7 +1461,12 @@ declare module 'wa-sqlite/src/examples/ArrayModule.js' { * @param {Array} rows Table data. * @param {Array} columns Column names. */ - constructor(sqlite3: SQLiteAPI, db: number, rows: Array, columns: Array); + constructor( + sqlite3: SQLiteAPI, + db: number, + rows: Array, + columns: Array + ); mapCursorToState: Map; sqlite3: any; db: number; @@ -1487,7 +1540,12 @@ declare module 'wa-sqlite/src/examples/ArrayModule.js' { * @param {Array} values * @returns {number|Promise} */ - xFilter(pCursor: number, idxNum: number, idxStr: string | null, values: Array): number | Promise; + xFilter( + pCursor: number, + idxNum: number, + idxStr: string | null, + values: Array + ): number | Promise; /** * @param {number} pCursor * @returns {number|Promise} @@ -1504,7 +1562,11 @@ declare module 'wa-sqlite/src/examples/ArrayModule.js' { * @param {number} iCol * @returns {number|Promise} */ - xColumn(pCursor: number, pContext: number, iCol: number): number | Promise; + xColumn( + pCursor: number, + pContext: number, + iCol: number + ): number | Promise; /** * @param {number} pCursor * @param {{ set: function(number): void}} pRowid @@ -1533,8 +1595,8 @@ declare module 'wa-sqlite/src/examples/ArrayModule.js' { } /** @ignore */ -declare module '@powersync/wa-sqlite/src/examples/ArrayAsyncModule.js' { - import { ArrayModule } from 'wa-sqlite/src/examples/ArrayModule.js'; +declare module "@journeyapps/wa-sqlite/src/examples/ArrayAsyncModule.js" { + import { ArrayModule } from "@journeyapps/wa-sqlite/src/examples/ArrayModule.js"; export class ArrayAsyncModule extends ArrayModule { /** * @param {function} f @@ -1545,8 +1607,8 @@ declare module '@powersync/wa-sqlite/src/examples/ArrayAsyncModule.js' { } /** @ignore */ -declare module '@powersync/wa-sqlite/src/examples/AccessHandlePoolVFS.js' { - import * as VFS from '@powersync/wa-sqlite/src/VFS.js'; +declare module "@journeyapps/wa-sqlite/src/examples/AccessHandlePoolVFS.js" { + import * as VFS from "@journeyapps/wa-sqlite/src/VFS.js"; export class AccessHandlePoolVFS extends VFS.Base { /** * @param {string} directoryPath Flat directory where all OPFS files are stored @@ -1556,108 +1618,60 @@ declare module '@powersync/wa-sqlite/src/examples/AccessHandlePoolVFS.js' { } /** @ignore */ -declare module '@powersync/wa-sqlite/src/examples/IDBBatchAtomicVFS.js' { - import * as VFS from '@powersync/wa-sqlite/src/VFS.js'; +declare module "@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js" { + import * as VFS from "@journeyapps/wa-sqlite/src/VFS.js"; export class IDBBatchAtomicVFS extends VFS.Base { /** * @param {string} idbDatabaseName IndexDB DB name */ - constructor(idbDatabaseName?: string, options?: Partial<{ - durability: string, - purge: string, - purgeAtLeast: number - }>); + constructor( + idbDatabaseName?: string, + options?: Partial<{ + durability: string; + purge: string; + purgeAtLeast: number; + }> + ); close(): Promise; } } /** @ignore */ -declare module '@journeyapp/wa-sqlite/src/examples/IDBVersionedVFS.js' { - import {IDBBatchAtomicVFS} from '@powersync/wa-sqlite/src/examples/IDBBatchAtomicVFS.js'; +declare module "@journeyapp/wa-sqlite/src/examples/IDBVersionedVFS.js" { + import { IDBBatchAtomicVFS } from "@journeyapps/wa-sqlite/src/examples/IDBBatchAtomicVFS.js"; export class IDBVersionedVFS extends IDBBatchAtomicVFS {} } - /** @ignore */ -declare module '@journeyapp/wa-sqlite/src/examples/OriginPrivatefileSystemVFS.js' { - import * as VFS from '@powersync/wa-sqlite/src/VFS.js'; +declare module "@journeyapp/wa-sqlite/src/examples/OriginPrivateFileSystemVFS.js" { + import * as VFS from "@journeyapps/wa-sqlite/src/VFS.js"; export class OriginPrivateFileSystemVFS extends VFS.Base { close(): Promise; } } /** @ignore */ -declare module 'wa-sqlite/src/examples/IDBMinimalVFS.js' { - import * as VFS from '@powersync/wa-sqlite/src/VFS.js'; +declare module "@journeyapps/wa-sqlite/src/examples/IDBMinimalVFS.js" { + import * as VFS from "@journeyapps/wa-sqlite/src/VFS.js"; export class IDBMinimalVFS extends VFS.Base { /** * @param {string} idbDatabaseName IndexDB DB name */ - constructor(idbDatabaseName?: string, options?: Partial<{ - durability: string, - }>); + constructor( + idbDatabaseName?: string, + options?: Partial<{ + durability: string; + }> + ); close(): Promise; } } /** @ignore */ -declare module '@powersync/wa-sqlite/src/examples/IndexedDbVFS.js' { - import * as VFS from '@powersync/wa-sqlite/src/VFS.js'; - export class IndexedDbVFS extends VFS.Base { - /** - * @param {string} idbName Name of IndexedDB database. - */ - constructor(idbName?: string); - name: string; - mapIdToFile: Map; - cacheSize: number; - db: any; - close(): Promise; - /** - * Delete a file from IndexedDB. - * @param {string} name - */ - deleteFile(name: string): Promise; - /** - * Forcibly clear an orphaned file lock. - * @param {string} name - */ - forceClearLock(name: string): Promise; - _getStore(mode?: string): any; - /** - * Returns the key for file metadata. - * @param {string} name - * @returns - */ - _metaKey(name: string): string; - /** - * Returns the key for file block data. - * @param {string} name - * @param {number} index - * @returns - */ - _blockKey(name: string, index: number): string; - _getBlock(store: any, file: any, index: any): Promise; - _putBlock(store: any, file: any, index: any, blockData: any): void; - _purgeCache(store: any, file: any, size?: number): void; - _flushCache(store: any, file: any): Promise; - _sync(file: any): Promise; - /** - * Helper function that deletes all keys greater or equal to `key` - * provided they start with `prefix`. - * @param {string} key - * @param {string} [prefix] - * @returns - */ - _delete(key: string, prefix?: string): Promise; - } -} - -/** @ignore */ -declare module 'wa-sqlite/src/examples/MemoryVFS.js' { - import * as VFS from '@powersync/wa-sqlite/src/VFS.js'; +declare module "@journeyapps/wa-sqlite/src/examples/MemoryVFS.js" { + import * as VFS from "@journeyapps/wa-sqlite/src/VFS.js"; export class MemoryVFS extends VFS.Base { name: string; mapNameToFile: Map; @@ -1666,13 +1680,13 @@ declare module 'wa-sqlite/src/examples/MemoryVFS.js' { } /** @ignore */ -declare module 'wa-sqlite/src/examples/MemoryAsyncVFS.js' { - import { MemoryVFS } from 'wa-sqlite/src/examples/MemoryVFS.js'; +declare module "@journeyapps/wa-sqlite/src/examples/MemoryAsyncVFS.js" { + import { MemoryVFS } from "@journeyapps/wa-sqlite/src/examples/MemoryVFS.js"; export class MemoryAsyncVFS extends MemoryVFS {} } /** @ignore */ -declare module 'wa-sqlite/src/examples/tag.js' { +declare module "@journeyapps/wa-sqlite/src/examples/tag.js" { /** * Template tag builder. This function creates a tag with an API and * database from the same module, then the tag can be used like this: @@ -1691,5 +1705,8 @@ declare module 'wa-sqlite/src/examples/tag.js' { * @param {number} db * @returns {function(TemplateStringsArray, ...any): Promise} */ - export function tag(sqlite3: any, db: number): (arg0: TemplateStringsArray, ...args: any[]) => Promise; + export function tag( + sqlite3: any, + db: number + ): (arg0: TemplateStringsArray, ...args: any[]) => Promise; } diff --git a/yarn.lock b/yarn.lock index 8ef9c781..833da113 100644 --- a/yarn.lock +++ b/yarn.lock @@ -309,6 +309,32 @@ __metadata: languageName: node linkType: hard +"@journeyapps/wa-sqlite@workspace:.": + version: 0.0.0-use.local + resolution: "@journeyapps/wa-sqlite@workspace:." + dependencies: + "@changesets/cli": ^2.26.2 + "@web/dev-server": ^0.1.13 + comlink: ^4.4.1 + jasmine-core: ^4.5.0 + karma: ^6.4.1 + karma-chrome-launcher: ^3.1.1 + karma-jasmine: ^5.1.0 + monaco-editor: ^0.34.1 + puppeteer: ^19.6.3 + sinon: 15.0.1 + typedoc: ^0.22.11 + typescript: ^4.2.4 + dependenciesMeta: + comlink@4.4.1: + unplugged: true + monaco-editor@0.34.1: + unplugged: true + sinon@15.0.1: + unplugged: true + languageName: unknown + linkType: soft + "@manypkg/find-root@npm:^1.1.0": version: 1.1.0 resolution: "@manypkg/find-root@npm:1.1.0" @@ -391,32 +417,6 @@ __metadata: languageName: node linkType: hard -"@powersync/wa-sqlite@workspace:.": - version: 0.0.0-use.local - resolution: "@powersync/wa-sqlite@workspace:." - dependencies: - "@changesets/cli": ^2.26.2 - "@web/dev-server": ^0.1.13 - comlink: ^4.4.1 - jasmine-core: ^4.5.0 - karma: ^6.4.1 - karma-chrome-launcher: ^3.1.1 - karma-jasmine: ^5.1.0 - monaco-editor: ^0.34.1 - puppeteer: ^19.6.3 - sinon: 15.0.1 - typedoc: ^0.22.11 - typescript: ^4.2.4 - dependenciesMeta: - comlink@4.4.1: - unplugged: true - monaco-editor@0.34.1: - unplugged: true - sinon@15.0.1: - unplugged: true - languageName: unknown - linkType: soft - "@puppeteer/browsers@npm:0.5.0": version: 0.5.0 resolution: "@puppeteer/browsers@npm:0.5.0"