varft=(()=>{varqe=import.meta.url;returnfunction(oe={}){varfe,i=oe,ye,be,Oe=newPromise((e,t)=>{ye=e,be=t}),Xe=typeofwindow=="object",Ce=typeofimportScripts=="function";typeofprocess=="object"&&typeofprocess.versions=="object"&&typeofprocess.versions.node=="string"&&process.type!="renderer";constPe=globalThis.sqlite3InitModuleState||Object.assign(Object.create(null),{debugModule:()=>{}});deleteglobalThis.sqlite3InitModuleState,Pe.debugModule("globalThis.location =",globalThis.location);varHe=Object.assign({},i),re="./this.program",me="";functionIe(e){returni.locateFile?i.locateFile(e,me):me+e}varDe,je;(Xe||Ce)&&(Ce?me=self.location.href:typeofdocument<"u"&&document.currentScript&&(me=document.currentScript.src),qe&&(me=qe),me.startsWith("blob:")?me="":me=me.substr(0,me.replace(/[?#].*/,"").lastIndexOf("/")+1),Ce&&(je=e=>{vart=newXMLHttpRequest;returnt.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),newUint8Array(t.response)}),De=e=>fetch(e,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(newError(t.status+" : "+t.url))));varVe=i.print||console.log.bind(console),Le=i.printErr||console.error.bind(console);Object.assign(i,He),He=null,i.arguments&&i.arguments,i.thisProgram&&(re=i.thisProgram);varYe=i.wasmBinary,Re,dt=!1,xe,Be,Ge,ue,Ee,ke;functionpt(){vare=Re.buffer;i.HEAP8=xe=newInt8Array(e),i.HEAP16=Ge=newInt16Array(e),i.HEAPU8=Be=newUint8Array(e),i.HEAPU16=newUint16Array(e),i.HEAP32=ue=newInt32Array(e),i.HEAPU32=Ee=newUint32Array(e),i.HEAPF32=newFloat32Array(e),i.HEAPF64=newFloat64Array(e),i.HEAP64=ke=newBigInt64Array(e),i.HEAPU64=newBigUint64Array(e)}if(i.wasmMemory)Re=i.wasmMemory;else{varPt=i.INITIAL_MEMORY||16777216;Re=newWebAssembly.Memory({initial:Pt/65536,maximum:32768})}pt();varht=[],mt=[],gt=[];functionLt(){vare=i.preRun;e&&(typeofe=="function"&&(e=[e]),e.forEach(Rt)),ot(ht)}functionCt(){!i.noFSInit&&!a.initialized&&a.init(),a.ignorePermissions=!1,ot(mt)}functionDt(){vare=i.postRun;e&&(typeofe=="function"&&(e=[e]),e.forEach(Mt)),ot(gt)}functionRt(e){ht.unshift(e)}functionNt(e){mt.unshift(e)}functionMt(e){gt.unshift(e)}varNe=0,$e=null;functiontr(e){returne}functionrt(e){Ne++,i.monitorRunDependencies?.(Ne)}functionZe(e){if(Ne--,i.monitorRunDependencies?.(Ne),Ne==0&&$e){vart=$e;$e=null,t()}}functionst(e){i.onAbort?.(e),e="Aborted("+e+")",Le(e),dt=!0,e+=". Build with -sASSERTIONS for more info.";vart=newWebAssembly.RuntimeError(e);throwbe(t),t}varjt="data:application/octet-stream;base64,",qt=e=>e.startsWith(jt);functionBt(){if(i.locateFile){vare="sqlite3.wasm";returnqt(e)?e:Ie(e)}returnnewURL("/assets/sqlite3-DBpDb1lf.wasm",import.meta.url).href}varit;functionbt(e){if(e==it&&Ye)returnnewUint8Array(Ye);if(je)returnje(e);throw"both async and sync fetching of the wasm failed"}functionUt(e){returnYe?Promise.resolve().then(()=>bt(e)):De(e).then(t=>newUint8Array(t),()=>bt(e))}functionyt(e,t,n){returnUt(e).then(r=>WebAssembly.instantiate(r,t)).then(n,r=>{Le(`failed to asynchronously prepare wasm: ${r}`),st(r)})}functionzt(e,t,n,r){return!e&&typeofWebAssembly.instantiateStreaming=="function"&&!qt(t)&&typeoffetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{varo=WebAssembly.instantiateStreaming(s,n);returno.then(r,function(p){returnLe(`wasm streaming compile failed: ${p}`),Le("falling back to ArrayBuffer instantiation"),yt(t,n,r)})}):yt(t,n,r)}functionWt(){return{env:It,wasi_snapshot_preview1:It}}functionQt(){vare=Wt();functiont(r,s){returnh=r.exports,Nt(h.__wasm_call_ctors),Ze(),h}rt();functionn(r){t(r.instance)}if(i.instantiateWasm)try{returni.instantiateWasm(e,t)}catch(r){Le(`Module.instantiateWasm callback failed with error: ${r}`),be(r)}returnit??=Bt(),zt(Ye,it,e,n).catch(be),{}}varot=e=>{e.forEach(t=>t(i))};i.noExitRuntime;varde={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{vart=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;returnt.exec(e).slice(1)},normalizeArray:(e,t)=>{for(varn=0,r=e.length-1;r>=0;r--){vars=e[r];s==="."?e.splice(r,1):s===".."?(e.splice(r,1),n++):n
`)),!e)return null;lt=vt(e)}return lt.shift()},Me={ttys:[],init(){},shutdown(){},register(e,t){Me.ttys[e]={input:[],output:[],ops:t},a.registerDevice(e,Me.stream_ops)},stream_ops:{open(e){var t=Me.ttys[e.node.rdev];if(!t)throw new a.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,s){if(!e.tty||!e.tty.ops.get_char)throw new a.ErrnoError(60);for(var o=0,p=0;p<r;p++){var g;try{g=e.tty.ops.get_char(e.tty)}catch{throw new a.ErrnoError(29)}if(g===void 0&&o===0)throw new a.ErrnoError(6);if(g==null)break;o++,t[n+p]=g}return o&&(e.node.timestamp=Date.now()),o},write(e,t,n,r,s){if(!e.tty||!e.tty.ops.put_char)throw new a.ErrnoError(60);try{for(var o=0;o<r;o++)e.tty.ops.put_char(e.tty,t[n+o])}catch{throw new a.ErrnoError(29)}return r&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char(e){return Vt()},put_char(e,t){t===null||t===10?(Ve(Ue(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(Ve(Ue(e.output)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,n){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(Le(Ue(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(Le(Ue(e.output)),e.output=[])}}},Gt=(e,t)=>{Be.fill(0,e,e+t)},xt=(e,t)=>Math.ceil(e/t)*t,St=e=>{e=xt(e,65536);var t=kt(65536,e);return t&&Gt(t,e),t},le={ops_table:null,mount(e){return le.createNode(null,"/",16895,0)},createNode(e,t,n,r){if(a.isBlkdev(n)||a.isFIFO(n))throw new a.ErrnoError(63);le.ops_table||={dir:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,lookup:le.node_ops.lookup,mknod:le.node_ops.mknod,rename:le.node_ops.rename,unlink:le.node_ops.unlink,rmdir:le.node_ops.rmdir,readdir:le.node_ops.readdir,symlink:le.node_ops.symlink},stream:{llseek:le.stream_ops.llseek}},file:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:{llseek:le.stream_ops.llseek,read:le.stream_ops.read,write:le.stream_ops.write,allocate:le.stream_ops.allocate,mmap:le.stream_ops.mmap,msync:le.stream_ops.msync}},link:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr,readlink:le.node_ops.readlink},stream:{}},chrdev:{node:{getattr:le.node_ops.getattr,setattr:le.node_ops.setattr},stream:a.chrdev_stream_ops}};var s=a.createNode(e,t,n,r);return a.isDir(s.mode)?(s.node_ops=le.ops_table.dir.node,s.stream_ops=le.ops_table.dir.stream,s.contents={}):a.isFile(s.mode)?(s.node_ops=le.ops_table.file.node,s.stream_ops=le.ops_table.file.stream,s.usedBytes=0,s.contents=null):a.isLink(s.mode)?(s.node_ops=le.ops_table.link.node,s.stream_ops=le.ops_table.link.stream):a.isChrdev(s.mode)&&(s.node_ops=le.ops_table.chrdev.node,s.stream_ops=le.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){var r=1024*1024;t=Math.max(t,n*(n<r?2:1.125)>>>0),n!=0&&(t=Math.max(t,256));var s=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(s.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(t==0)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=a.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,a.isDir(e.mode)?t.size=4096:a.isFile(e.mode)?t.size=e.usedBytes:a.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&le.resizeFileStorage(e,t.
Total of`,C,"op(s) for",M,"ms (incl. "+J+" ms of waiting on the async side)"),t.config.log("Serialization metrics:",I.s11n),m.postMessage({type:"opfs-async-metrics"})},reset:function(){letE;constC=J=>J.count=J.time=J.wait=0;for(Einu.opIds)C(I[E]=Object.create(null));letM=I.s11n=Object.create(null);M=M.serialize=Object.create(null),M.count=M.time=0,M=I.s11n.deserialize=Object.create(null),M.count=M.time=0}};constc=newS,d=newN().addOnDispose(()=>c.dispose());lety;constB=E=>(y=!0,d.dispose(),O(E)),f=()=>(y=!1,g(t)),m=newWorker(newURL("/assets/sqlite3-opfs-async-proxy-B_ImRJXp.js",import.meta.url));setTimeout(()=>{y===void0&&B(newError("Timeout while waiting for OPFS async proxy worker."))},4e3),m._originalOnError=m.onerror,m.onerror=function(E){A("Error initializing OPFS asyncer:",E),B(newError("Loading OPFS async Worker failed for unknown reasons."))};constl=q.sqlite3_vfs_find(null),_=l?newN(l):null;c.$iVersion=1,d.$iVersion=2,d.$szOsFile=q.sqlite3_file.structInfo.sizeof,d.$mxPathname=1024,d.$zName=x.allocCString("opfs"),d.$xDlOpen=d.$xDlError=d.$xDlSym=d.$xDlClose=null,d.addOnDispose("$zName",d.$zName,"cleanup default VFS wrapper",()=>_?_.dispose():null);constu=Object.create(null);u.verbose=s.verbose,u.littleEndian=(()=>{constE=newArrayBuffer(2);returnnewDataView(E).setInt16(0,256,!0),newInt16Array(E)[0]===256})(),u.asyncIdleWaitTime=150,u.asyncS11nExceptions=1,u.fileBufferSize=1024*64,u.sabS11nOffset=u.fileBufferSize,u.sabS11nSize=d.$mxPathname*2,u.sabIO=newSharedArrayBuffer(u.fileBufferSize+u.sabS11nSize),u.opIds=Object.create(null);constI=Object.create(null);{letE=0;u.opIds.whichOp=E++,u.opIds.rc=E++,u.opIds.xAccess=E++,u.opIds.xClose=E++,u.opIds.xDelete=E++,u.opIds.xDeleteNoWait=E++,u.opIds.xFileSize=E++,u.opIds.xLock=E++,u.opIds.xOpen=E++,u.opIds.xRead=E++,u.opIds.xSleep=E++,u.opIds.xSync=E++,u.opIds.xTruncate=E++,u.opIds.xUnlock=E++,u.opIds.xWrite=E++,u.opIds.mkdir=E++,u.opIds["opfs-async-metrics"]=E++,u.opIds["opfs-async-shutdown"]=E++,u.opIds.retry=E++,u.sabOP=newSharedArrayBuffer(E*4),L.metrics.reset()}u.sq3Codes=Object.create(null),["SQLITE_ACCESS_EXISTS","SQLITE_ACCESS_READWRITE","SQLITE_BUSY","SQLITE_CANTOPEN","SQLITE_ERROR","SQLITE_IOERR","SQLITE_IOERR_ACCESS","SQLITE_IOERR_CLOSE","SQLITE_IOERR_DELETE","SQLITE_IOERR_FSYNC","SQLITE_IOERR_LOCK","SQLITE_IOERR_READ","SQLITE_IOERR_SHORT_READ","SQLITE_IOERR_TRUNCATE","SQLITE_IOERR_UNLOCK","SQLITE_IOERR_WRITE","SQLITE_LOCK_EXCLUSIVE","SQLITE_LOCK_NONE","SQLITE_LOCK_PENDING","SQLITE_LOCK_RESERVED","SQLITE_LOCK_SHARED","SQLITE_LOCKED","SQLITE_MISUSE","SQLITE_NOTFOUND","SQLITE_OPEN_CREATE","SQLITE_OPEN_DELETEONCLOSE","SQLITE_OPEN_MAIN_DB","SQLITE_OPEN_READONLY"].forEach(E=>{(u.sq3Codes[E]=q[E])===void0&&D("Maintenance required: not found:",E)}),u.opfsFlags=Object.assign(Object.create(null),{OPFS_UNLOCK_ASAP:1,OPFS_UNLINK_BEFORE_OPEN:2,defaultUnlockAsap:!1});constU=(E,...C)=>{constM=u.opIds[E]||D("Invalid op ID:",E);u.s11n.serialize(...C),Atomics.store(u.sabOPView,u.opIds.rc,-1),Atomics.store(u.sabOPView,u.opIds.whichOp,M),Atomics.notify(u.sabOPView,u.opIds.whichOp);constJ=performance.now();for(;Atomics.wait(u.sabOPView,u.opIds.rc,-1)!=="not-equal";);constG=Atomics.load(u.sabOPView,u.opIds.rc);if(I[E].wait+=performance.now()-J,G&&u.asyncS11nExceptions){constte=u.s11n.deserialize();te&&A(E+"() async error:",...te)}returnG};L.debug={asyncShutdown:()=>{T("Shutting down OPFS async listener. The OPFS VFS will no longer work."),U("opfs-async-shutdown")},asyncRestart:()=>{T("Attempting to restart OPFS VFS async listener. Might work, might not."),m.postMessage({type:"opfs-async-restart"})}};constee=()=>{if(u.s11n)returnu.s11n;constE=newTextDecoder,C=newTextEncoder("utf-8"),M=newUint8Array(u.sabIO,u.sabS11nOffset,u.sabS11nSize),J=newDataView(u.sabIO,u.sabS11nOffset,u.sabS11nSize);u.s11n=Object.create(null);constG=Object.create(null);G.number={id:1,size:8,getter:"getFloat64",setter:"setFloat64"},G.bigint={id:2,size:8,getter:"getBigInt64",setter:"setBigInt64"},G.boolean={id:3,size:4,getter:"getInt32",setter:"setInt32"},G.string={id:4};con