@run-trace/duckdb-wasm 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- "use strict";var duckdb=(()=>{var Jh=Object.create;var Oe=Object.defineProperty;var zh=Object.getOwnPropertyDescriptor;var Yh=Object.getOwnPropertyNames;var Qh=Object.getPrototypeOf,Zh=Object.prototype.hasOwnProperty;var e_=(b,f,p)=>f in b?Oe(b,f,{enumerable:!0,configurable:!0,writable:!0,value:p}):b[f]=p;var Wt=(b=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(f,p)=>(typeof require<"u"?require:f)[p]}):b)(function(b){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var xe=(b,f)=>()=>(f||b((f={exports:{}}).exports,f),f.exports),t_=(b,f)=>{for(var p in f)Oe(b,p,{get:f[p],enumerable:!0})},Gt=(b,f,p,y)=>{if(f&&typeof f=="object"||typeof f=="function")for(let d of Yh(f))!Zh.call(b,d)&&d!==p&&Oe(b,d,{get:()=>f[d],enumerable:!(y=zh(f,d))||y.enumerable});return b};var Kt=(b,f,p)=>(p=b!=null?Jh(Qh(b)):{},Gt(f||!b||!b.__esModule?Oe(p,"default",{value:b,enumerable:!0}):p,b)),r_=b=>Gt(Oe({},"__esModule",{value:!0}),b);var $t=(b,f,p)=>e_(b,typeof f!="symbol"?f+"":f,p);var Qt=xe(()=>{});var Zt=xe(()=>{});var tr=xe((er,et)=>{"use strict";var vt=(()=>{var f;var b=typeof document<"u"?(f=document.currentScript)==null?void 0:f.src:void 0;return typeof __filename<"u"&&(b=b||__filename),async function(p={}){var y,d=p,g,T,E=new Promise((e,t)=>{g=e,T=t}),m=typeof window=="object",$=typeof WorkerGlobalScope<"u",F=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer",X=Object.assign({},d),ie=[],P="./this.program",G=(e,t)=>{throw t},Y="";function ne(e){return d.locateFile?d.locateFile(e,Y):Y+e}var oe,Z;if(F){var Q=Qt(),ue=Zt();Y=__dirname+"/",Z=e=>{e=Re(e)?new URL(e):e;var t=Q.readFileSync(e);return t},oe=async(e,t=!0)=>{e=Re(e)?new URL(e):e;var r=Q.readFileSync(e,t?void 0:"utf8");return r},!d.thisProgram&&process.argv.length>1&&(P=process.argv[1].replace(/\\/g,"/")),ie=process.argv.slice(2),G=(e,t)=>{throw process.exitCode=e,t}}else(m||$)&&($?Y=self.location.href:typeof document<"u"&&document.currentScript&&(Y=document.currentScript.src),b&&(Y=b),Y.startsWith("blob:")?Y="":Y=Y.slice(0,Y.replace(/[?#].*/,"").lastIndexOf("/")+1),$&&(Z=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),oe=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var ae=d.print||console.log.bind(console),A=d.printErr||console.error.bind(console);Object.assign(d,X),X=null,d.arguments&&(ie=d.arguments),d.thisProgram&&(P=d.thisProgram);var x=d.wasmBinary,L,D=!1,B;function U(e,t){e||de(t)}var C,R,O,N,H,J,be,z,ye,le,Fe=!1,Re=e=>e.startsWith("file://");function De(){var e=L.buffer;d.HEAP8=C=new Int8Array(e),d.HEAP16=O=new Int16Array(e),d.HEAPU8=R=new Uint8Array(e),d.HEAPU16=N=new Uint16Array(e),d.HEAP32=H=new Int32Array(e),d.HEAPU32=J=new Uint32Array(e),d.HEAPF32=be=new Float32Array(e),d.HEAPF64=le=new Float64Array(e),d.HEAP64=z=new BigInt64Array(e),d.HEAPU64=ye=new BigUint64Array(e)}function Ie(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)jr(d.preRun.shift());bt(gt)}function hr(){Fe=!0,M.Wh()}function l_(){}function _r(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)Tr(d.postRun.shift());bt(yt)}var Ae=0,Be=null;function lr(e){var t;Ae++,(t=d.monitorRunDependencies)==null||t.call(d,Ae)}function dr(e){var r;if(Ae--,(r=d.monitorRunDependencies)==null||r.call(d,Ae),Ae==0&&Be){var t=Be;Be=null,t()}}function de(e){var r;(r=d.onAbort)==null||r.call(d,e),e="Aborted("+e+")",A(e),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw T(t),t}var Me;function vr(){return ne("./duckdb-mvp.wasm")}function pr(e){if(e==Me&&x)return new Uint8Array(x);if(Z)return Z(e);throw"both async and sync fetching of the wasm failed"}async function wr(e){if(!x)try{var t=await oe(e);return new Uint8Array(t)}catch{}return pr(e)}async function br(e,t){try{var r=await wr(e),i=await WebAssembly.instantiate(r,t);return i}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),de(n)}}async function yr(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function"&&!F)try{var i=fetch(t,{credentials:"same-origin"}),n=await WebAssembly.instantiateStreaming(i,r);return n}catch(s){A(`wasm streaming compile failed: ${s}`),A("falling back to ArrayBuffer instantiation")}return br(t,r)}function gr(){return{a:jn}}async function mr(){function e(s,o){return M=s.exports,M=Vh(M),L=M.Vh,De(),Ot=M.Yh,dr("wasm-instantiate"),M}lr("wasm-instantiate");function t(s){return e(s.instance)}var r=gr();if(d.instantiateWasm)return new Promise((s,o)=>{d.instantiateWasm(r,(a,c)=>{e(a,c),s(a.exports)})});Me!=null||(Me=vr());try{var i=await yr(x,Me,r),n=t(i);return n}catch(s){return T(s),Promise.reject(s)}}var kr={10291953:(e,t,r,i)=>{var n=te(e);if(typeof XMLHttpRequest>"u")return 0;let s=new XMLHttpRequest;s.open(te(i),n,!1),s.responseType="arraybuffer";for(var o=0,w=t;o<w*2;){var a=H[r/4+o>>>0],c=H[r/4+o+1>>>0];try{var u=encodeURI(te(a));u==="Host"&&(u="X-Host-Override"),u==="User-Agent"&&(u="X-user-agent"),u==="Authorization"?s.setRequestHeader(u,te(c)):s.setRequestHeader(u,encodeURI(te(c)))}catch(K){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",K)}o+=2}try{s.send(null)}catch{return 0}if(s.status>=400)return 0;for(var v=s.response,w=v.byteLength,k=je(w+4),S=new Uint8Array(v),I=0;I<w;I++)d.HEAPU8[I+k+4]=S[I];var j=new Uint8Array(4);return j[0]=w%256,w-=j[0],w/=256,j[1]=w%256,w-=j[1],w/=256,j[2]=w%256,w-=j[2],w/=256,j[3]=w%256,w-=j[3],w/=256,d.HEAPU8.set(j,k),k},10293360:(e,t,r,i,n,s)=>{var o=te(e);if(typeof XMLHttpRequest>"u")return 0;let a=new XMLHttpRequest;a.open(te(i),o,!1),a.responseType="arraybuffer";for(var c=0,j=t;c<j*2;){var u=H[r/4+c>>>0],v=H[r/4+c+1>>>0];try{var w=encodeURI(te(u));w==="Host"&&(w="X-Host-Override"),w==="User-Agent"&&(w="X-user-agent"),w==="Authorization"?a.setRequestHeader(w,te(v)):a.setRequestHeader(w,encodeURI(te(v)))}catch(ce){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",ce)}c+=2}try{for(var k=new Uint8Array(s),S=0;S<s;S++)k[S]=d.HEAPU8[S+n];a.send(k)}catch{return 0}if(a.status>=400)return 0;for(var I=Uint8Array.from(Array.from(a.getResponseHeader("Etag")).map(ce=>ce.charCodeAt(0))),j=I.byteLength,K=je(j+4),re=new Uint8Array(I),S=0;S<j;S++)d.HEAPU8[S+K+4]=re[S];var V=new Uint8Array(4);return V[0]=j%256,j-=V[0],j/=256,V[1]=j%256,j-=V[1],j/=256,V[2]=j%256,j-=V[2],j/=256,V[3]=j%256,j-=V[3],j/=256,d.HEAPU8.set(V,K),K},10294980:(e,t,r,i)=>{var n=te(e);if(typeof XMLHttpRequest>"u")return 0;let s=new XMLHttpRequest;s.open(te(i),n,!1),s.responseType="arraybuffer";for(var o=0,w=t;o<w*2;){var a=H[r/4+o>>>0],c=H[r/4+o+1>>>0];try{var u=encodeURI(te(a));u==="Host"&&(u="X-Host-Override"),u==="User-Agent"&&(u="X-user-agent"),u==="Authorization"?s.setRequestHeader(u,te(c)):s.setRequestHeader(u,encodeURI(te(c)))}catch(V){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",V)}o+=2}try{s.send(null)}catch{return 0}if(s.status>=400)return 0;for(var v=s.response,w=v.byteLength,k=je(w+8),S=new Uint8Array(v),I=0;I<w;I++)d.HEAPU8[I+k+8]=S[I];var j=new Uint8Array(4);j[0]=w%256,w-=j[0],w/=256,j[1]=w%256,w-=j[1],w/=256,j[2]=w%256,w-=j[2],w/=256,j[3]=w%256,w-=j[3],w/=256,d.HEAPU8.set(j,k+4);var K=Uint8Array.from(Array.from(s.getAllResponseHeaders()).map(V=>V.charCodeAt(0)));w=K.byteLength;for(var re=je(w+8),I=0;I<w;I++)d.HEAPU8[I+re+8]=K[I];return j=new Uint8Array(4),j[0]=w%256,w-=j[0],w/=256,j[1]=w%256,w-=j[1],w/=256,j[2]=w%256,w-=j[2],w/=256,j[3]=w%256,w-=j[3],w/=256,d.HEAPU8.set(j,re+4),w=re,j=new Uint8Array(4),j[0]=w%256,w-=j[0],w/=256,j[1]=w%256,w-=j[1],w/=256,j[2]=w%256,w-=j[2],w/=256,j[3]=w%256,w-=j[3],w/=256,d.HEAPU8.set(j,k),k},10297264:(e,t,r,i)=>{var n=te(e);if(typeof XMLHttpRequest>"u")return 0;let s=new XMLHttpRequest;s.open(te(i),n,!1),s.responseType="arraybuffer";for(var o=0,w=t;o<w*2;){var a=H[r/4+o>>>0],c=H[r/4+o+1>>>0];try{var u=encodeURI(te(a));u==="Host"&&(u="X-Host-Override"),u==="User-Agent"&&(u="X-user-agent"),u==="Authorization"?s.setRequestHeader(u,te(c)):s.setRequestHeader(u,encodeURI(te(c)))}catch(K){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",K)}o+=2}try{s.send(null)}catch{return 0}if(s.status>=400)return 0;for(var v=s.response,w=v.byteLength,k=je(w+4),S=new Uint8Array(v),I=0;I<w;I++)d.HEAPU8[I+k+4]=S[I];var j=new Uint8Array(4);return j[0]=w%256,w-=j[0],w/=256,j[1]=w%256,w-=j[1],w/=256,j[2]=w%256,w-=j[2],w/=256,j[3]=w%256,w-=j[3],w/=256,d.HEAPU8.set(j,k),k},10298671:(e,t,r,i,n,s)=>{var o=te(e);if(typeof XMLHttpRequest>"u")return 0;let a=new XMLHttpRequest;a.open(te(i),o,!1),a.responseType="arraybuffer";for(var c=0,j=t;c<j*2;){var u=H[r/4+c>>>0],v=H[r/4+c+1>>>0];try{var w=encodeURI(te(u));w==="Host"&&(w="X-Host-Override"),w==="User-Agent"&&(w="X-user-agent"),w==="Authorization"?a.setRequestHeader(w,te(v)):a.setRequestHeader(w,encodeURI(te(v)))}catch(ce){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",ce)}c+=2}try{for(var k=new Uint8Array(s),S=0;S<s;S++)k[S]=d.HEAPU8[S+n];a.send(k)}catch{return 0}if(a.status>=400)return 0;for(var I=a.response,j=I.byteLength,K=je(j+4),re=new Uint8Array(I),S=0;S<j;S++)d.HEAPU8[S+K+4]=re[S];var V=new Uint8Array(4);return V[0]=j%256,j-=V[0],j/=256,V[1]=j%256,j-=V[1],j/=256,V[2]=j%256,j-=V[2],j/=256,V[3]=j%256,j-=V[3],j/=256,d.HEAPU8.set(V,K),K}};class wt{constructor(t){$t(this,"name","ExitStatus");this.message=`Program terminated with exit(${t})`,this.status=t}}var bt=e=>{for(;e.length>0;)e.shift()(d)},yt=[],Tr=e=>yt.unshift(e),gt=[],jr=e=>gt.unshift(e),Er=d.noExitRuntime||!0,h=e=>Sn(e),_=()=>Dn(),me=[],Ne=0,Fr=9007199254740992,Ar=-9007199254740992,ke=e=>e<Ar||e>Fr?NaN:Number(e);function Sr(e){e>>>=0;var t=new We(e);return t.get_caught()||(t.set_caught(!0),Ne--),t.set_rethrown(!1),me.push(t),___cxa_increment_exception_refcount(e),___cxa_get_exception_ptr(e)}function Rr(){if(!me.length)return 0;var e=me[me.length-1];return ___cxa_increment_exception_refcount(e.excPtr),e.excPtr}var ge=0,Dr=()=>{_setThrew(0,0);var e=me.pop();___cxa_decrement_exception_refcount(e.excPtr),ge=0};class We{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){J[this.ptr+4>>>2>>>0]=t}get_type(){return J[this.ptr+4>>>2>>>0]}set_destructor(t){J[this.ptr+8>>>2>>>0]=t}get_destructor(){return J[this.ptr+8>>>2>>>0]}set_caught(t){t=t?1:0,C[this.ptr+12>>>0]=t}get_caught(){return C[this.ptr+12>>>0]!=0}set_rethrown(t){t=t?1:0,C[this.ptr+13>>>0]=t}get_rethrown(){return C[this.ptr+13>>>0]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){J[this.ptr+16>>>2>>>0]=t}get_adjusted_ptr(){return J[this.ptr+16>>>2>>>0]}}function Ir(e){throw e>>>=0,ge||(ge=e),ge}var Le=e=>Fn(e),Ge=e=>{var t=ge;if(!t)return Le(0),0;var r=new We(t);r.set_adjusted_ptr(t);var i=r.get_type();if(!i)return Le(0),t;for(var n of e){if(n===0||n===i)break;var s=r.ptr+16;if(___cxa_can_catch(n,i,s))return Le(n),t}return Le(i),t};function Ur(){return Ge([])}function xr(e){return e>>>=0,Ge([e])}function Hr(e,t){return e>>>=0,t>>>=0,Ge([e,t])}function Pr(e,t,r){return e>>>=0,t>>>=0,r>>>=0,Ge([e,t,r])}var mt=()=>{var e=me.pop();e||de("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(me.push(e),e.set_rethrown(!0),e.set_caught(!1),Ne++),ge=t,ge};function Br(e){if(e>>>=0,!!e){var t=new We(e);me.push(t),t.set_rethrown(!0),mt()}}function Mr(e,t,r){e>>>=0,t>>>=0,r>>>=0;var i=new We(e);throw i.init(t,r),ge=e,Ne++,ge}var Lr=()=>Ne;function kt(){de("missing function: $SOCKFS")}kt.stub=!0;function nt(){de("missing function: $FS")}nt.stub=!0;var Ue=e=>{var t=kt.getSocket(e);if(!t)throw new nt.ErrnoError(8);return t},st=e=>(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255),Tt=e=>{var t="",r=0,i=0,n=0,s=0,o=0,a=0,c=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],u=!0,v="";for(a=0;a<5;a++)if(c[a]!==0){u=!1;break}if(u){if(v=st(c[6]|c[7]<<16),c[5]===-1)return t="::ffff:",t+=v,t;if(c[5]===0)return t="::",v==="0.0.0.0"&&(v=""),v==="0.0.0.1"&&(v="1"),t+=v,t}for(r=0;r<8;r++)c[r]===0&&(r-n>1&&(o=0),n=r,o++),o>i&&(i=o,s=r-i+1);for(r=0;r<8;r++){if(i>1&&c[r]===0&&r>=s&&r<s+i){r===s&&(t+=":",s===0&&(t+=":"));continue}t+=Number(_ntohs(c[r]&65535)).toString(16),t+=r<7?":":""}return t},jt=(e,t)=>{var r=O[e>>>1>>>0],i=_ntohs(N[e+2>>>1>>>0]),n;switch(r){case 2:if(t!==16)return{errno:28};n=H[e+4>>>2>>>0],n=st(n);break;case 10:if(t!==28)return{errno:28};n=[H[e+8>>>2>>>0],H[e+12>>>2>>>0],H[e+16>>>2>>>0],H[e+20>>>2>>>0]],n=Tt(n);break;default:return{errno:5}}return{family:r,addr:n,port:i}},Ke=e=>{for(var t=e.split("."),r=0;r<4;r++){var i=Number(t[r]);if(isNaN(i))return null;t[r]=i}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0},$e=e=>parseInt(e),ot=e=>{var t,r,i,n,s=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,o=[];if(!s.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),t=e.split(":"),t[t.length-4]=$e(t[t.length-4])+$e(t[t.length-3])*256,t[t.length-3]=$e(t[t.length-2])+$e(t[t.length-1])*256,t=t.slice(0,t.length-2)):t=e.split(":"),i=0,n=0,r=0;r<t.length;r++)if(typeof t[r]=="string")if(t[r]==="Z"){for(n=0;n<8-t.length+1;n++)o[r+n]=0;i=n-1}else o[r+i]=_htons(parseInt(t[r],16));else o[r+i]=t[r];return[o[1]<<16|o[0],o[3]<<16|o[2],o[5]<<16|o[4],o[7]<<16|o[6]]},_e={address_map:{id:1,addrs:{},names:{}},lookup_name(e){var t=Ke(e);if(t!==null||(t=ot(e),t!==null))return e;var r;if(_e.address_map.addrs[e])r=_e.address_map.addrs[e];else{var i=_e.address_map.id++;U(i<65535,"exceeded max address mappings of 65535"),r="172.29."+(i&255)+"."+(i&65280),_e.address_map.names[r]=e,_e.address_map.addrs[e]=r}return r},lookup_addr(e){return _e.address_map.names[e]?_e.address_map.names[e]:null}},Et=(e,t)=>{var r=jt(e,t);if(r.errno)throw new nt.ErrnoError(r.errno);return r.addr=_e.lookup_addr(r.addr)||r.addr,r};function Cr(e,t,r,i,n,s){t>>>=0,r>>>=0;var o=Ue(e),a=Et(t,r);return o.sock_ops.bind(o,a.addr,a.port),0}function Or(e,t,r,i,n,s){t>>>=0,r>>>=0;var o=Ue(e),a=Et(t,r);return o.sock_ops.connect(o,a.addr,a.port),0}var Nr=(e,t,r)=>{};function Wr(e,t,r,i){t>>>=0}var Ft=typeof TextDecoder<"u"?new TextDecoder:void 0,At=(e,t=0,r=NaN)=>{t>>>=0;for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&Ft)return Ft.decode(e.subarray(t,n));for(var s="";t<n;){var o=e[t++];if(!(o&128)){s+=String.fromCharCode(o);continue}var a=e[t++]&63;if((o&224)==192){s+=String.fromCharCode((o&31)<<6|a);continue}var c=e[t++]&63;if((o&240)==224?o=(o&15)<<12|a<<6|c:o=(o&7)<<18|a<<12|c<<6|e[t++]&63,o<65536)s+=String.fromCharCode(o);else{var u=o-65536;s+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return s},te=(e,t)=>(e>>>=0,e?At(R,e,t):""),at={varargs:void 0,getStr(e){var t=te(e);return t}};function Gr(e,t,r){return r>>>=0,at.varargs=r,0}function Kr(e,t){t>>>=0}function $r(e,t){t=ke(t)}var St=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t};d.lengthBytesUTF8=St;var Xr=(e,t,r,i)=>{if(r>>>=0,!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a>=55296&&a<=57343){var c=e.charCodeAt(++o);a=65536+((a&1023)<<10)|c&1023}if(a<=127){if(r>=s)break;t[r++>>>0]=a}else if(a<=2047){if(r+1>=s)break;t[r++>>>0]=192|a>>6,t[r++>>>0]=128|a&63}else if(a<=65535){if(r+2>=s)break;t[r++>>>0]=224|a>>12,t[r++>>>0]=128|a>>6&63,t[r++>>>0]=128|a&63}else{if(r+3>=s)break;t[r++>>>0]=240|a>>18,t[r++>>>0]=128|a>>12&63,t[r++>>>0]=128|a>>6&63,t[r++>>>0]=128|a&63}}return t[r>>>0]=0,r-n},Te=(e,t,r)=>Xr(e,R,t,r);d.stringToUTF8=Te;function Vr(e,t){e>>>=0,t>>>=0}function qr(e,t,r){t>>>=0,r>>>=0}var Rt=(e,t)=>{R.fill(0,e,e+t)},Xe=(e,t,r,i,n)=>{switch(t){case 2:r=Ke(r),Rt(e,16),n&&(H[n>>>2>>>0]=16),O[e>>>1>>>0]=t,H[e+4>>>2>>>0]=r,O[e+2>>>1>>>0]=_htons(i);break;case 10:r=ot(r),Rt(e,28),n&&(H[n>>>2>>>0]=28),H[e>>>2>>>0]=t,H[e+8>>>2>>>0]=r[0],H[e+12>>>2>>>0]=r[1],H[e+16>>>2>>>0]=r[2],H[e+20>>>2>>>0]=r[3],O[e+2>>>1>>>0]=_htons(i);break;default:return 5}return 0};function Jr(e,t,r,i,n,s){t>>>=0,r>>>=0;var o=Ue(e);if(!o.daddr)return-53;var a=Xe(t,o.family,_e.lookup_name(o.daddr),o.dport,r);return 0}function zr(e,t,r,i,n,s){t>>>=0,r>>>=0;var o=Ue(e),a=Xe(t,o.family,_e.lookup_name(o.saddr||"0.0.0.0"),o.sport,r);return 0}function Yr(e,t,r,i,n,s){i>>>=0,n>>>=0;var o=Ue(e);return t===1&&r===4?(H[i>>>2>>>0]=o.error,H[n>>>2>>>0]=4,o.error=null,0):-50}function Qr(e,t,r){return r>>>=0,at.varargs=r,0}function Zr(e,t){e>>>=0,t>>>=0}function ei(e,t,r){t>>>=0}function ti(e,t,r,i){t>>>=0,r>>>=0}function ri(e,t,r,i){t>>>=0,i>>>=0,at.varargs=i}function ii(e,t,r){e>>>=0}function ni(e,t,r,i,n,s){t>>>=0,r>>>=0,n>>>=0,s>>>=0;var o=Ue(e),a=o.sock_ops.recvmsg(o,r);if(!a)return 0;if(n)var c=Xe(n,o.family,_e.lookup_name(a.addr),a.port,s);return R.set(a.buffer,t>>>0),a.buffer.byteLength}function si(e,t,r,i){t>>>=0,i>>>=0}function oi(e){e>>>=0}function ai(e,t,r,i,n,s){t>>>=0,r>>>=0,n>>>=0,s>>>=0}var ci=(e,t,r)=>{};function ui(e,t){e>>>=0,t>>>=0}function fi(e,t,r){e>>>=0,t>>>=0,r>>>=0}function hi(e,t,r){t>>>=0}var _i=()=>de(""),li=()=>{throw 1/0};function Dt(){de("missing function: _emval_call_method")}Dt.stub=!0;function It(){de("missing function: _emval_decref")}It.stub=!0;function Ut(){de("missing function: _emval_get_global")}Ut.stub=!0;function xt(){de("missing function: _emval_get_method_caller")}xt.stub=!0;function Ht(){de("missing function: _emval_run_destructors")}Ht.stub=!0;var di=e=>e%4===0&&(e%100!==0||e%400===0),vi=[0,31,60,91,121,152,182,213,244,274,305,335],pi=[0,31,59,90,120,151,181,212,243,273,304,334],wi=e=>{var t=di(e.getFullYear()),r=t?vi:pi,i=r[e.getMonth()]+e.getDate()-1;return i};function bi(e,t){e=ke(e),t>>>=0;var r=new Date(e*1e3);H[t>>>2>>>0]=r.getSeconds(),H[t+4>>>2>>>0]=r.getMinutes(),H[t+8>>>2>>>0]=r.getHours(),H[t+12>>>2>>>0]=r.getDate(),H[t+16>>>2>>>0]=r.getMonth(),H[t+20>>>2>>>0]=r.getFullYear()-1900,H[t+24>>>2>>>0]=r.getDay();var i=wi(r)|0;H[t+28>>>2>>>0]=i,H[t+36>>>2>>>0]=-(r.getTimezoneOffset()*60);var n=new Date(r.getFullYear(),0,1),s=new Date(r.getFullYear(),6,1).getTimezoneOffset(),o=n.getTimezoneOffset(),a=(s!=o&&r.getTimezoneOffset()==Math.min(o,s))|0;H[t+32>>>2>>>0]=a}function yi(e,t,r,i,n,s,o){return e>>>=0,n=ke(n),s>>>=0,o>>>=0,-52}function gi(e,t,r,i,n,s){e>>>=0,t>>>=0,s=ke(s)}var mi=function(e,t,r,i){e>>>=0,t>>>=0,r>>>=0,i>>>=0;var n=new Date().getFullYear(),s=new Date(n,0,1),o=new Date(n,6,1),a=s.getTimezoneOffset(),c=o.getTimezoneOffset(),u=Math.max(a,c);J[e>>>2>>>0]=u*60,H[t>>>2>>>0]=+(a!=c);var v=S=>{var I=S>=0?"-":"+",j=Math.abs(S),K=String(Math.floor(j/60)).padStart(2,"0"),re=String(j%60).padStart(2,"0");return`UTC${I}${K}${re}`},w=v(a),k=v(c);c<a?(Te(w,r,17),Te(k,i,17)):(Te(w,i,17),Te(k,r,17))},Pt=()=>performance.now(),Bt=()=>Date.now(),ki=1,Ti=e=>e>=0&&e<=3;function ji(e,t,r){if(t=ke(t),r>>>=0,!Ti(e))return 28;var i;if(e===0)i=Bt();else if(ki)i=Pt();else return 52;var n=Math.round(i*1e3*1e3);return z[r>>>3]=BigInt(n),0}function Ei(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.createDirectory(d,e,t)}function Fi(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkDirectory(d,e,t)}function Ai(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.listDirectoryEntries(d,e,t)}function Si(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.removeDirectory(d,e,t)}function Ri(e){return globalThis.DUCKDB_RUNTIME.closeFile(d,e)}function Di(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.dropFile(d,e,t)}function Ii(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkFile(d,e,t)}function Ui(e,t,r,i){return e>>>=0,r>>>=0,globalThis.DUCKDB_RUNTIME.moveFile(d,e,t,r,i)}function xi(e,t){return globalThis.DUCKDB_RUNTIME.openFile(d,e,t)}function Hi(e,t,r,i){return t>>>=0,globalThis.DUCKDB_RUNTIME.readFile(d,e,t,r,i)}function Pi(e,t){return globalThis.DUCKDB_RUNTIME.truncateFile(d,e,t)}function Bi(e,t,r,i){return t>>>=0,globalThis.DUCKDB_RUNTIME.writeFile(d,e,t,r,i)}function Mi(e){return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(e)}function Li(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.glob(d,e,t)}function Ci(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(d,e)}function Oi(e,t,r,i,n,s){return e>>>=0,r>>>=0,n>>>=0,globalThis.DUCKDB_RUNTIME.callScalarUDF(d,e,t,r,i,n,s)}var ct=[],Ni=(e,t)=>{ct.length=0;for(var r;r=R[e++>>>0];){var i=r!=105;i&=r!=112,t+=i&&t%8?4:0,ct.push(r==112?J[t>>>2>>>0]:r==106?z[t>>>3]:r==105?H[t>>>2>>>0]:le[t>>>3>>>0]),t+=i?8:4}return ct},Wi=(e,t,r)=>{var i=Ni(t,r);return kr[e](...i)};function Gi(e,t,r){return e>>>=0,t>>>=0,r>>>=0,Wi(e,t,r)}var Mt=()=>4294901760;function Ki(){return Mt()}var $i=(e,t)=>Math.ceil(e/t)*t,Xi=e=>{var t=L.buffer,r=(e-t.byteLength+65535)/65536|0;try{return L.grow(r),De(),1}catch{}};function Vi(e){e>>>=0;var t=R.length,r=Mt();if(e>r)return!1;for(var i=1;i<=4;i*=2){var n=t*(1+.2/i);n=Math.min(n,e+100663296);var s=Math.min(r,$i(Math.max(e,n),65536)),o=Xi(s);if(o)return!0}return!1}var ut={},qi=()=>P||"./this.program",Ce=()=>{if(!Ce.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:qi()};for(var r in ut)ut[r]===void 0?delete t[r]:t[r]=ut[r];var i=[];for(var r in t)i.push(`${r}=${t[r]}`);Ce.strings=i}return Ce.strings},Ji=(e,t)=>{for(var r=0;r<e.length;++r)C[t++>>>0]=e.charCodeAt(r);C[t>>>0]=0},zi=function(e,t){e>>>=0,t>>>=0;var r=0;return Ce().forEach((i,n)=>{var s=t+r;J[e+n*4>>>2>>>0]=s,Ji(i,s),r+=i.length+1}),0},Yi=function(e,t){e>>>=0,t>>>=0;var r=Ce();J[e>>>2>>>0]=r.length;var i=0;return r.forEach(n=>i+=n.length+1),J[t>>>2>>>0]=i,0},Qi=0,Zi=()=>Er||Qi>0,en=e=>{var t;B=e,Zi()||((t=d.onExit)==null||t.call(d,e),D=!0),G(e,new wt(e))},Lt=(e,t)=>{B=e,en(e)},tn=Lt,rn=e=>52;function nn(e,t){t>>>=0;var r=0,i=0,n=0;{var s=2;e==0?r=2:(e==1||e==2)&&(r=64),n=1}return C[t>>>0]=s,O[t+2>>>1>>>0]=n,z[t+8>>>3]=BigInt(r),z[t+16>>>3]=BigInt(i),0}function sn(e,t,r,i,n){return t>>>=0,r>>>=0,i=ke(i),n>>>=0,52}function on(e,t,r,i,n){return t>>>=0,r>>>=0,i=ke(i),n>>>=0,52}function an(e,t,r,i){return t>>>=0,r>>>=0,i>>>=0,52}function cn(e,t,r,i){return t=ke(t),i>>>=0,70}var un=e=>52,fn=[null,[],[]],hn=(e,t)=>{var r=fn[e];t===0||t===10?((e===1?ae:A)(At(r)),r.length=0):r.push(t)};function _n(e,t,r,i){t>>>=0,r>>>=0,i>>>=0;for(var n=0,s=0;s<r;s++){var o=J[t>>>2>>>0],a=J[t+4>>>2>>>0];t+=8;for(var c=0;c<a;c++)hn(e,R[o+c>>>0]);n+=a}return J[i>>>2>>>0]=n,0}function ln(e,t,r,i){e>>>=0,t>>>=0,r>>>=0,i>>>=0;var n=0,s=0,o=0,a=0,c=0,u=0,v;function w(k,S,I,j,K,re){var V,ce,he,Nt;return ce=k===10?28:16,K=k===10?Tt(K):st(K),V=je(ce),Nt=Xe(V,k,K,re),U(!Nt),he=je(32),H[he+4>>>2>>>0]=k,H[he+8>>>2>>>0]=S,H[he+12>>>2>>>0]=I,J[he+24>>>2>>>0]=j,J[he+20>>>2>>>0]=V,k===10?H[he+16>>>2>>>0]=28:H[he+16>>>2>>>0]=16,H[he+28>>>2>>>0]=0,he}if(r&&(o=H[r>>>2>>>0],a=H[r+4>>>2>>>0],c=H[r+8>>>2>>>0],u=H[r+12>>>2>>>0]),c&&!u&&(u=c===2?17:6),!c&&u&&(c=u===17?2:1),u===0&&(u=6),c===0&&(c=1),!e&&!t)return-2;if(o&-1088||r!==0&&H[r>>>2>>>0]&2&&!e)return-1;if(o&32)return-2;if(c!==0&&c!==1&&c!==2)return-7;if(a!==0&&a!==2&&a!==10)return-6;if(t&&(t=te(t),s=parseInt(t,10),isNaN(s)))return o&1024?-2:-8;if(!e)return a===0&&(a=2),(o&1)===0&&(a===2?n=_htonl(2130706433):n=[0,0,0,_htonl(1)]),v=w(a,c,u,null,n,s),J[i>>>2>>>0]=v,0;if(e=te(e),n=Ke(e),n!==null)if(a===0||a===2)a=2;else if(a===10&&o&8)n=[0,0,_htonl(65535),n],a=10;else return-2;else if(n=ot(e),n!==null)if(a===0||a===10)a=10;else return-2;return n!=null?(v=w(a,c,u,e,n,s),J[i>>>2>>>0]=v,0):o&4?-2:(e=_e.lookup_name(e),n=Ke(e),a===0?a=2:a===10&&(n=[0,0,_htonl(65535),n]),v=w(a,c,u,null,n,s),J[i>>>2>>>0]=v,0)}function dn(e,t,r,i,n,s,o){e>>>=0,r>>>=0,n>>>=0;var a=jt(e,t);if(a.errno)return-6;var c=a.port,u=a.addr,v=!1;if(r&&i){var w;if(o&1||!(w=_e.lookup_addr(u))){if(o&8)return-2}else u=w;var k=Te(u,r,i);k+1>=i&&(v=!0)}if(n&&s){c=""+c;var k=Te(c,n,s);k+1>=s&&(v=!0)}return v?-12:0}function vn(e){return e>>>=0,e}var pn=()=>{if(F){var e=["crypto"].map(Wt)[0];return t=>e.randomFillSync(t)}return t=>crypto.getRandomValues(t)},Ct=e=>{(Ct=pn())(e)};function wn(e,t){return e>>>=0,t>>>=0,Ct(R.subarray(e>>>0,e+t>>>0)),0}var bn=e=>{if(e instanceof wt||e=="unwind")return B;G(1,e)},Ot,l=e=>Ot.get(e),yn=e=>{var t=d["_"+e];return t},gn=(e,t)=>{C.set(e,t>>>0)},Ve=e=>Rn(e);d.stackAlloc=Ve;var mn=e=>{var t=St(e)+1,r=Ve(t);return Te(e,r,t),r},kn=(e,t,r,i,n)=>{var s={string:I=>{var j=0;return I!=null&&I!==0&&(j=mn(I)),j},array:I=>{var j=Ve(I.length);return gn(I,j),j}};function o(I){return t==="string"?te(I):t==="boolean"?!!I:I}var a=yn(e),c=[],u=0;if(i)for(var v=0;v<i.length;v++){var w=s[r[v]];w?(u===0&&(u=_()),c[v]=w(i[v])):c[v]=i[v]}var k=a(...c);function S(I){return u!==0&&h(u),o(I)}return k=S(k),k},Tn=e=>An(),jn={z:Sr,Af:Rr,D:Dr,a:Ur,m:xr,ha:Hr,qc:Pr,ye:mt,sf:Br,B:Mr,La:Lr,d:Ir,tg:Cr,sg:Or,yf:Nr,Lg:Wr,yb:Gr,Kg:Kr,Eg:$r,Mg:Vr,Bg:qr,ng:Jr,mg:zr,qg:Yr,Gd:Qr,Hg:Zr,Dg:ei,Ig:ti,ne:ri,rg:ii,og:ni,zg:si,He:oi,pg:ai,Fe:ci,Jg:ui,Og:fi,Ie:hi,hh:_i,zf:li,vf:Dt,wf:It,xf:Ut,uf:xt,tf:Ht,xg:bi,ig:yi,jg:gi,hg:mi,qf:ji,Wf:Ei,Xf:Fi,Uf:Ai,Vf:Si,ze:Ri,_f:Di,Sf:Ii,Tf:Ui,Zf:xi,_c:Hi,Yf:Pi,Md:Bi,$f:Mi,Rf:Li,xe:Ci,ag:Oi,Gc:Gi,te:Bt,rf:Ki,ge:Pt,Ih:Vi,Cg:zi,Ng:Yi,vb:tn,tc:rn,th:nn,Gg:sn,Fg:on,Re:an,lh:cn,Ag:un,pd:_n,ug:ln,Ee:dn,Wa:Rh,Ga:To,Wc:jo,pa:Es,af:Za,Cb:Ea,se:Sh,ie:On,pe:Lh,gc:df,Kb:Sa,Hf:xh,pb:Ia,Bc:Oa,kb:hf,ue:Ah,gd:lf,jf:ia,qb:ka,Vb:ja,cf:Ga,zc:Wa,xb:js,mf:Cn,ad:oh,fb:ff,rb:ma,Wb:Ta,u:zn,Na:ao,vg:Uf,kg:Bf,ub:Pa,Yc:Hs,dd:Mf,db:Eo,wg:If,lg:Pf,Jb:Hf,c:$n,Ia:Na,Be:Jf,ea:Qa,Jc:th,fc:rh,Ug:mf,Rd:Wf,nc:ih,b:In,Mb:Ys,Kd:Bh,We:qc,g:Pn,Mh:Ua,Jd:Ch,Id:Oh,l:Mn,oe:ss,Gf:Hh,ec:Mh,t:Un,Wg:vf,F:Qn,J:Vn,na:Ks,bb:Gs,Eb:qn,oc:Zn,G:Jn,Y:Ds,Ef:Nh,Gb:fo,P:uo,Ze:Hc,Ve:zc,Jf:jh,Te:Qc,zh:$c,Ye:Lc,kf:zo,Ue:Yc,_d:Rc,xd:Cc,Fh:Tc,Zd:xc,Uc:Jo,wd:Jc,vc:Pc,Ge:xf,ka:ro,xc:vc,he:ga,$d:yc,rh:lu,Pe:Su,O:ns,Za:sa,Xc:co,Fd:Ws,$e:dc,Eh:Fc,Ch:Nc,Nb:os,xh:Zc,wh:eu,Ne:Lu,E:ds,Ja:Zo,sb:Qo,Qc:Ac,vh:tu,uh:ru,ic:au,Mf:mh,fa:Vs,Rb:Bc,nb:Du,lf:qo,lc:Ms,Nf:gh,Ob:dh,w:us,A:As,za:Js,Ea:of,ve:Eh,Nd:ah,cg:uh,Le:Yu,Qd:Xf,De:Gf,Ib:Vf,gb:hc,Qh:oa,C:cs,ib:fc,Oe:Iu,of:yo,Xe:Xc,ih:Ru,cb:no,Ke:Zu,ae:wc,gh:xu,yd:bc,oh:gu,p:_s,Hc:yh,W:Ss,ca:$s,Da:Rs,bc:lo,ce:ac,td:cu,dg:ch,Od:eh,id:uf,Th:$o,Ha:xs,Fc:go,Oc:zu,ke:bo,_e:Dc,Sg:jf,Tg:Tf,Fb:Uo,Q:Ls,Ta:Lo,ba:$a,ee:La,rc:vu,me:Ps,ga:Is,Ua:Ts,Va:ks,n:hs,T:ps,sa:Yo,ya:Ln,eb:_o,Rc:Ec,Ah:Gc,Je:kf,ob:kc,Ca:gf,Pa:Ko,Ec:Vo,ed:yf,Mc:pf,Me:Xu,R:Ka,kh:ju,Xb:ea,qa:Ho,Bd:da,qd:Fu,zd:pc,Yd:Oc,ia:qa,Z:Au,wc:Sc,zb:Df,fd:bf,$a:Rf,jh:Eu,Qb:Kc,Vg:wf,da:Us,nd:qu,Ld:hh,lb:Aa,dc:Bs,Pf:vh,Df:Kh,eh:Mu,Rh:ra,bg:fh,Zc:Gh,K:ws,wb:Io,ja:Ma,Hd:Wh,ua:Fo,nf:Do,U:Va,ac:Ro,bf:za,k:xn,Cf:$h,If:Dh,re:Ih,h:Xn,aa:Qs,df:Fa,ab:rc,bd:sh,qe:Uh,Bf:Xh,la:tc,Bb:ec,cd:nh,e:Hn,Ac:Gn,Ph:Wn,f:Bn,Ed:Zs,Ff:Ph,ld:sf,md:nf,j:Nn,r:vs,s:rs,_:Yn,H:to,Qa:Uc,ta:es,Hb:Fs,Se:fu,Sc:Ba,$c:ts,Pg:Af,pf:wo,ph:bu,Sa:Wo,Yg:Ju,Qg:Ff,dh:Cu,Qe:wu,Ic:bh,jb:No,Sb:jc,Ad:uc,M:Ra,Wd:yu,Dd:eo,Rg:Ef,Sd:Of,S:ls,va:Oo,qh:pu,Pd:zf,Kh:nc,Lh:ic,Ya:Xo,sd:_u,ch:Ou,Lf:kh,ff:pa,ma:qs,Ud:Vu,Ra:ya,ef:wa,_a:_h,kd:af,Kf:Th,x:ys,cc:ko,mc:Fh,L:ms,xa:Cs,hb:lc,Td:Qu,Zg:$u,Oh:ha,Nh:ba,Cd:la,Pc:Tu,jc:_c,Sh:ta,Dc:aa,fg:qf,N:fs,Zb:Os,hc:Uu,uc:Mc,_g:Ku,Cc:ca,yh:Vc,Lb:so,Nc:rf,$g:Gu,Hh:gc,Vc:Mo,Xd:nu,ah:Wu,Gh:mc,bh:Nu,q:as,hd:_f,I:Xs,Xa:is,wa:vo,rd:du,y:Ao,od:Hu,Db:fa,fh:Pu,gg:Kf,mb:Nf,Ab:hu,Aa:xo,Ae:Yf,$b:va,gf:_a,Pb:ef,sc:ou,vd:iu,Ba:Cf,V:Kn,Fa:Po,Bh:Wc,sh:uu,Ma:Go,je:Co,Qf:lh,ud:su,nh:mu,o:bs,i:gs,$:ho,oa:po,Yb:Ns,Jh:sc,yc:oc,we:ph,Of:wh,eg:Qf,Vd:Bu,Ce:$f,jd:cf,kc:Ca,fe:xa,Dh:Ic,Tc:ua,Uh:Bo,hf:na,pc:Lf,ra:io,v:mo,Kc:Zf,_b:Ha,Oa:Da,Tb:Ya,Ka:zs,Lc:Sf,Ub:Xa,tb:So,be:cc,de:Ja,Xg:tf,le:oo,mh:ku,X:vn,yg:wn},M=await mr(),En=d._main=M.Xh,d_=d._duckdb_web_fs_glob_add_path=M.Zh,v_=d._duckdb_web_clear_response=M._h,p_=d._duckdb_web_fail_with=M.$h,w_=d._duckdb_web_reset=M.ai,b_=d._duckdb_web_connect=M.bi,y_=d._duckdb_web_disconnect=M.ci,g_=d._duckdb_web_flush_files=M.di,m_=d._duckdb_web_flush_file=M.ei,k_=d._duckdb_web_open=M.fi,T_=d._duckdb_web_get_global_file_info=M.gi,j_=d._duckdb_web_collect_file_stats=M.hi,E_=d._duckdb_web_export_file_stats=M.ii,F_=d._duckdb_web_fs_drop_file=M.ji,A_=d._duckdb_web_fs_drop_files=M.ki,S_=d._duckdb_web_fs_glob_file_infos=M.li,R_=d._duckdb_web_fs_get_file_info_by_id=M.mi,D_=d._duckdb_web_fs_get_file_info_by_name=M.ni,I_=d._duckdb_web_fs_register_file_url=M.oi,U_=d._duckdb_web_fs_register_file_buffer=M.pi,x_=d._duckdb_web_copy_file_to_buffer=M.qi,H_=d._duckdb_web_copy_file_to_path=M.ri,P_=d._duckdb_web_get_version=M.si,B_=d._duckdb_web_get_feature_flags=M.ti,M_=d._duckdb_web_tokenize=M.ui,L_=d._duckdb_web_tokenize_buffer=M.vi,C_=d._duckdb_web_udf_scalar_create=M.wi,O_=d._duckdb_web_prepared_create=M.xi,N_=d._duckdb_web_prepared_create_buffer=M.yi,W_=d._duckdb_web_prepared_close=M.zi,G_=d._duckdb_web_prepared_run=M.Ai,K_=d._duckdb_web_prepared_send=M.Bi,$_=d._duckdb_web_query_run=M.Ci,X_=d._duckdb_web_query_run_buffer=M.Di,V_=d._duckdb_web_pending_query_start=M.Ei,q_=d._duckdb_web_pending_query_start_buffer=M.Fi,J_=d._duckdb_web_pending_query_poll=M.Gi,z_=d._duckdb_web_pending_query_cancel=M.Hi,Y_=d._duckdb_web_query_fetch_results=M.Ii,Q_=d._duckdb_web_get_tablenames=M.Ji,Z_=d._duckdb_web_get_tablenames_buffer=M.Ki,el=d._duckdb_web_insert_arrow_from_ipc_stream=M.Li,tl=d._duckdb_web_insert_csv_from_path=M.Mi,rl=d._duckdb_web_insert_json_from_path=M.Ni,je=d._malloc=M.Ri,il=d._free=M.Si,nl=d._calloc=M.Ti,Fn=M.Vi,An=M.Wi,Sn=M.Xi,Rn=M.Yi,Dn=M.Zi;function In(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Un(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function xn(e){var t=_();try{l(e)()}catch(r){if(h(t),r!==r+0)throw r;_setThrew(1,0)}}function Hn(e,t,r){var i=_();try{l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Pn(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Bn(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Mn(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Ln(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function Cn(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function On(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Nn(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Wn(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Gn(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Kn(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function $n(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Xn(e,t){var r=_();try{l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Vn(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function qn(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function Jn(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function zn(e){var t=_();try{return l(e)()}catch(r){if(h(t),r!==r+0)throw r;_setThrew(1,0)}}function Yn(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Qn(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Zn(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function es(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function ts(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j){var K=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j)}catch(re){if(h(K),re!==re+0)throw re;_setThrew(1,0)}}function rs(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function is(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ns(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ss(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function os(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function as(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function cs(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function us(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function fs(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function hs(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _setThrew(1,0),0n}}function _s(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function ls(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ds(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function vs(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ps(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _setThrew(1,0),0n}}function ws(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _setThrew(1,0),0n}}function bs(e,t,r){var i=_();try{l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function ys(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function gs(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function ms(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ks(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _setThrew(1,0),0n}}function Ts(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _setThrew(1,0),0n}}function js(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Es(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Fs(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function As(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Ss(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Rs(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ds(e,t,r,i,n,s,o,a,c,u,v,w,k,S){var I=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S)}catch(j){if(h(I),j!==j+0)throw j;_setThrew(1,0)}}function Is(e){var t=_();try{return l(e)()}catch(r){if(h(t),r!==r+0)throw r;return _setThrew(1,0),0n}}function Us(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _setThrew(1,0),0n}}function xs(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Hs(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Ps(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Bs(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;return _setThrew(1,0),0n}}function Ms(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Ls(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Cs(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Os(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Ns(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Ws(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Gs(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Ks(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function $s(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Xs(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Vs(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function qs(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Js(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function zs(e,t){var r=_();try{l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Ys(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Qs(e,t,r){var i=_();try{l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Zs(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function eo(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function to(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ro(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function io(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function no(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function so(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function oo(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function ao(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function co(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function uo(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K,re){var V=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K,re)}catch(ce){if(h(V),ce!==ce+0)throw ce;_setThrew(1,0)}}function fo(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K){var re=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K)}catch(V){if(h(re),V!==V+0)throw V;_setThrew(1,0)}}function ho(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function _o(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function lo(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function vo(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function po(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function wo(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function bo(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function yo(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function go(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function mo(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function ko(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function To(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function jo(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Eo(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Fo(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _setThrew(1,0),0n}}function Ao(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function So(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ro(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function Do(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function Io(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _setThrew(1,0),0n}}function Uo(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function xo(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ho(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function Po(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Bo(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Mo(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Lo(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Co(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Oo(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function No(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Wo(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Go(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ko(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function $o(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Xo(e,t,r,i,n,s,o,a,c,u,v,w,k,S){var I=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S)}catch(j){if(h(I),j!==j+0)throw j;_setThrew(1,0)}}function Vo(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function qo(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Jo(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function zo(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function Yo(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;return _setThrew(1,0),0n}}function Qo(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Zo(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ea(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function ta(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function ra(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function ia(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function na(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function sa(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function oa(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function aa(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function ca(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function ua(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function fa(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ha(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function _a(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function la(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function da(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;return _setThrew(1,0),0n}}function va(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function pa(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function wa(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ba(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function ya(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ga(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ma(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function ka(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ta(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function ja(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Ea(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Fa(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Aa(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function Sa(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ra(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function Da(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Ia(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Ua(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function xa(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ha(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Pa(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Ba(e,t,r,i,n,s,o,a,c,u,v,w,k,S){var I=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S)}catch(j){if(h(I),j!==j+0)throw j;_setThrew(1,0)}}function Ma(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;return _setThrew(1,0),0n}}function La(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Ca(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Oa(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Na(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Wa(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Ga(e,t){var r=_();try{return l(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_setThrew(1,0)}}function Ka(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function $a(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Xa(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Va(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function qa(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;return _setThrew(1,0),0n}}function Ja(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function za(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function Ya(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Qa(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Za(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function ec(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function tc(e,t,r){var i=_();try{l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function rc(e,t,r,i){var n=_();try{l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function ic(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function nc(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function sc(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function oc(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ac(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function cc(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function uc(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function fc(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function hc(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function _c(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function lc(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function dc(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function vc(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function pc(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function wc(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function bc(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function yc(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function gc(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function mc(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function kc(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function Tc(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function jc(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Ec(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function Fc(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function Ac(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Sc(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function Rc(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Dc(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Ic(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function Uc(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function xc(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Hc(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function Pc(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Bc(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Mc(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Lc(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function Cc(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Oc(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function Nc(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Wc(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Gc(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function Kc(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function $c(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Xc(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Vc(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function qc(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Jc(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function zc(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I){var j=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I)}catch(K){if(h(j),K!==K+0)throw K;_setThrew(1,0)}}function Yc(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K,re){var V=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K,re)}catch(ce){if(h(V),ce!==ce+0)throw ce;_setThrew(1,0)}}function Qc(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function Zc(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function eu(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function tu(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function ru(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function iu(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function nu(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function su(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function ou(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function au(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function cu(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function uu(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function fu(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function hu(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function _u(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function lu(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K){var re=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K)}catch(V){if(h(re),V!==V+0)throw V;_setThrew(1,0)}}function du(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function vu(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function pu(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function wu(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function bu(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function yu(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function gu(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function mu(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function ku(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Tu(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function ju(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function Eu(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function Fu(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function Au(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function Su(e,t,r,i,n,s,o,a,c,u,v,w,k,S){var I=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S)}catch(j){if(h(I),j!==j+0)throw j;_setThrew(1,0)}}function Ru(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function Du(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Iu(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Uu(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function xu(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Hu(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Pu(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Bu(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Mu(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function Lu(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Cu(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Ou(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Nu(e,t,r,i,n,s,o,a,c,u,v,w,k,S){var I=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S)}catch(j){if(h(I),j!==j+0)throw j;_setThrew(1,0)}}function Wu(e,t,r,i,n,s,o,a,c,u,v,w,k){var S=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k)}catch(I){if(h(S),I!==I+0)throw I;_setThrew(1,0)}}function Gu(e,t,r,i,n,s,o,a,c,u,v,w){var k=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w)}catch(S){if(h(k),S!==S+0)throw S;_setThrew(1,0)}}function Ku(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function $u(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Xu(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function Vu(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function qu(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;return _setThrew(1,0),0n}}function Ju(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function zu(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Yu(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Qu(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Zu(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function ef(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function tf(e,t,r){var i=_();try{l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function rf(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function nf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function sf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function of(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function af(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function cf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function uf(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function ff(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function hf(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function _f(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function lf(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function df(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function vf(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function pf(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;return _setThrew(1,0),0n}}function wf(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function bf(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function yf(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function gf(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;return _setThrew(1,0),0n}}function mf(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function kf(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;return _setThrew(1,0),0n}}function Tf(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function jf(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Ef(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Ff(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Af(e,t,r,i,n,s,o,a,c,u,v,w,k,S){var I=_();try{l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S)}catch(j){if(h(I),j!==j+0)throw j;_setThrew(1,0)}}function Sf(e,t,r){var i=_();try{l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Rf(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;return _setThrew(1,0),0n}}function Df(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function If(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Uf(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function xf(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I){var j=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I)}catch(K){if(h(j),K!==K+0)throw K;_setThrew(1,0)}}function Hf(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function Pf(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Bf(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Mf(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Lf(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Cf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Of(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Nf(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Wf(e,t,r){var i=_();try{return l(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_setThrew(1,0)}}function Gf(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Kf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function $f(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Xf(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Vf(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function qf(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Jf(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function zf(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Yf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Qf(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Zf(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function eh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function th(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function rh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function ih(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function nh(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function sh(e,t,r,i,n){var s=_();try{l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function oh(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function ah(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function ch(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function uh(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function fh(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function hh(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;return _setThrew(1,0),0n}}function _h(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function lh(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function dh(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function vh(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function ph(e,t,r,i,n,s,o,a,c,u,v){var w=_();try{l(e)(t,r,i,n,s,o,a,c,u,v)}catch(k){if(h(w),k!==k+0)throw k;_setThrew(1,0)}}function wh(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function bh(e,t,r,i,n,s,o,a,c,u){var v=_();try{l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function yh(e,t,r,i){var n=_();try{return l(e)(t,r,i)}catch(s){if(h(n),s!==s+0)throw s;_setThrew(1,0)}}function gh(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function mh(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function kh(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Th(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function jh(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K,re,V){var ce=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j,K,re,V)}catch(he){if(h(ce),he!==he+0)throw he;_setThrew(1,0)}}function Eh(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Fh(e,t,r,i,n,s,o,a,c){var u=_();try{l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Ah(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;_setThrew(1,0)}}function Sh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Rh(e){var t=_();try{return l(e)()}catch(r){if(h(t),r!==r+0)throw r;_setThrew(1,0)}}function Dh(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Ih(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Uh(e,t,r,i,n,s,o){var a=_();try{l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function xh(e,t,r,i,n,s){var o=_();try{return l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Hh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Ph(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Bh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Mh(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Lh(e,t,r,i,n,s,o,a,c,u){var v=_();try{return l(e)(t,r,i,n,s,o,a,c,u)}catch(w){if(h(v),w!==w+0)throw w;_setThrew(1,0)}}function Ch(e,t,r,i,n,s,o,a,c){var u=_();try{return l(e)(t,r,i,n,s,o,a,c)}catch(v){if(h(u),v!==v+0)throw v;_setThrew(1,0)}}function Oh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;_setThrew(1,0)}}function Nh(e,t,r,i,n,s,o,a,c,u,v,w,k,S,I,j){var K=_();try{return l(e)(t,r,i,n,s,o,a,c,u,v,w,k,S,I,j)}catch(re){if(h(K),re!==re+0)throw re;_setThrew(1,0)}}function Wh(e,t,r,i,n){var s=_();try{return l(e)(t,r,i,n)}catch(o){if(h(s),o!==o+0)throw o;return _setThrew(1,0),0n}}function Gh(e,t,r,i,n,s,o,a){var c=_();try{return l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;return _setThrew(1,0),0n}}function Kh(e,t,r,i,n,s,o){var a=_();try{return l(e)(t,r,i,n,s,o)}catch(c){if(h(a),c!==c+0)throw c;return _setThrew(1,0),0n}}function $h(e,t,r,i,n,s){var o=_();try{l(e)(t,r,i,n,s)}catch(a){if(h(o),a!==a+0)throw a;_setThrew(1,0)}}function Xh(e,t,r,i,n,s,o,a){var c=_();try{l(e)(t,r,i,n,s,o,a)}catch(u){if(h(c),u!==u+0)throw u;_setThrew(1,0)}}function Vh(e){e=Object.assign({},e);var t=n=>s=>n(s)>>>0,r=n=>(s,o)=>n(s,o)>>>0,i=n=>()=>n()>>>0;return e.Ri=t(e.Ri),e.Ti=r(e.Ti),e.Yi=t(e.Yi),e.Zi=i(e.Zi),e.bj=t(e.bj),e}d.stackSave=_,d.stackRestore=h,d.stackAlloc=Ve,d.getTempRet0=Tn,d.setTempRet0=Le,d.ccall=kn;function qh(){var e=En,t=0,r=0;try{var i=e(t,r);return Lt(i,!0),i}catch(n){return bn(n)}}function ft(){if(Ae>0){Be=ft;return}if(Ie(),Ae>0){Be=ft;return}function e(){var r;if(d.calledRun=!0,!D){hr(),g(d),(r=d.onRuntimeInitialized)==null||r.call(d);var t=d.noInitialRun;t||qh(),_r()}}d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1),e()},1)):e()}if(d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();return ft(),y=E,y}})();typeof er=="object"&&typeof et=="object"?(et.exports=vt,et.exports.default=vt):typeof define=="function"&&define.amd&&define([],()=>vt)});var ir=xe(()=>{});var nr=xe(()=>{});var sr=xe((Il,it)=>{(function(){"use strict";var b="input is invalid type",f=typeof window=="object",p=f?window:{};p.JS_SHA256_NO_WINDOW&&(f=!1);var y=!f&&typeof self=="object",d=!p.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node&&process.type!="renderer";d?p=global:y&&(p=self);var g=!p.JS_SHA256_NO_COMMON_JS&&typeof it=="object"&&it.exports,T=typeof define=="function"&&define.amd,E=!p.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),$=[-2147483648,8388608,32768,128],F=[24,16,8,0],X=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],ie=["hex","array","digest","arrayBuffer"],P=[];(p.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(A){return Object.prototype.toString.call(A)==="[object Array]"}),E&&(p.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(A){return typeof A=="object"&&A.buffer&&A.buffer.constructor===ArrayBuffer});var G=function(A,x){return function(L){return new Q(x,!0).update(L)[A]()}},Y=function(A){var x=G("hex",A);d&&(x=ne(x,A)),x.create=function(){return new Q(A)},x.update=function(B){return x.create().update(B)};for(var L=0;L<ie.length;++L){var D=ie[L];x[D]=G(D,A)}return x},ne=function(A,x){var L=ir(),D=nr().Buffer,B=x?"sha224":"sha256",U;D.from&&!p.JS_SHA256_NO_BUFFER_FROM?U=D.from:U=function(R){return new D(R)};var C=function(R){if(typeof R=="string")return L.createHash(B).update(R,"utf8").digest("hex");if(R==null)throw new Error(b);return R.constructor===ArrayBuffer&&(R=new Uint8Array(R)),Array.isArray(R)||ArrayBuffer.isView(R)||R.constructor===D?L.createHash(B).update(U(R)).digest("hex"):A(R)};return C},oe=function(A,x){return function(L,D){return new ue(L,x,!0).update(D)[A]()}},Z=function(A){var x=oe("hex",A);x.create=function(B){return new ue(B,A)},x.update=function(B,U){return x.create(B).update(U)};for(var L=0;L<ie.length;++L){var D=ie[L];x[D]=oe(D,A)}return x};function Q(A,x){x?(P[0]=P[16]=P[1]=P[2]=P[3]=P[4]=P[5]=P[6]=P[7]=P[8]=P[9]=P[10]=P[11]=P[12]=P[13]=P[14]=P[15]=0,this.blocks=P):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],A?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=A}Q.prototype.update=function(A){if(!this.finalized){var x,L=typeof A;if(L!=="string"){if(L==="object"){if(A===null)throw new Error(b);if(E&&A.constructor===ArrayBuffer)A=new Uint8Array(A);else if(!Array.isArray(A)&&(!E||!ArrayBuffer.isView(A)))throw new Error(b)}else throw new Error(b);x=!0}for(var D,B=0,U,C=A.length,R=this.blocks;B<C;){if(this.hashed&&(this.hashed=!1,R[0]=this.block,this.block=R[16]=R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=0),x)for(U=this.start;B<C&&U<64;++B)R[U>>>2]|=A[B]<<F[U++&3];else for(U=this.start;B<C&&U<64;++B)D=A.charCodeAt(B),D<128?R[U>>>2]|=D<<F[U++&3]:D<2048?(R[U>>>2]|=(192|D>>>6)<<F[U++&3],R[U>>>2]|=(128|D&63)<<F[U++&3]):D<55296||D>=57344?(R[U>>>2]|=(224|D>>>12)<<F[U++&3],R[U>>>2]|=(128|D>>>6&63)<<F[U++&3],R[U>>>2]|=(128|D&63)<<F[U++&3]):(D=65536+((D&1023)<<10|A.charCodeAt(++B)&1023),R[U>>>2]|=(240|D>>>18)<<F[U++&3],R[U>>>2]|=(128|D>>>12&63)<<F[U++&3],R[U>>>2]|=(128|D>>>6&63)<<F[U++&3],R[U>>>2]|=(128|D&63)<<F[U++&3]);this.lastByteIndex=U,this.bytes+=U-this.start,U>=64?(this.block=R[16],this.start=U-64,this.hash(),this.hashed=!0):this.start=U}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Q.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,x=this.lastByteIndex;A[16]=this.block,A[x>>>2]|=$[x&3],this.block=A[16],x>=56&&(this.hashed||this.hash(),A[0]=this.block,A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.hBytes<<3|this.bytes>>>29,A[15]=this.bytes<<3,this.hash()}},Q.prototype.hash=function(){var A=this.h0,x=this.h1,L=this.h2,D=this.h3,B=this.h4,U=this.h5,C=this.h6,R=this.h7,O=this.blocks,N,H,J,be,z,ye,le,Fe,Re,De,Ie;for(N=16;N<64;++N)z=O[N-15],H=(z>>>7|z<<25)^(z>>>18|z<<14)^z>>>3,z=O[N-2],J=(z>>>17|z<<15)^(z>>>19|z<<13)^z>>>10,O[N]=O[N-16]+H+O[N-7]+J<<0;for(Ie=x&L,N=0;N<64;N+=4)this.first?(this.is224?(Fe=300032,z=O[0]-1413257819,R=z-150054599<<0,D=z+24177077<<0):(Fe=704751109,z=O[0]-210244248,R=z-1521486534<<0,D=z+143694565<<0),this.first=!1):(H=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),J=(B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7),Fe=A&x,be=Fe^A&L^Ie,le=B&U^~B&C,z=R+J+le+X[N]+O[N],ye=H+be,R=D+z<<0,D=z+ye<<0),H=(D>>>2|D<<30)^(D>>>13|D<<19)^(D>>>22|D<<10),J=(R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7),Re=D&A,be=Re^D&x^Fe,le=R&B^~R&U,z=C+J+le+X[N+1]+O[N+1],ye=H+be,C=L+z<<0,L=z+ye<<0,H=(L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10),J=(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7),De=L&D,be=De^L&A^Re,le=C&R^~C&B,z=U+J+le+X[N+2]+O[N+2],ye=H+be,U=x+z<<0,x=z+ye<<0,H=(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10),J=(U>>>6|U<<26)^(U>>>11|U<<21)^(U>>>25|U<<7),Ie=x&L,be=Ie^x&D^De,le=U&C^~U&R,z=B+J+le+X[N+3]+O[N+3],ye=H+be,B=A+z<<0,A=z+ye<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+A<<0,this.h1=this.h1+x<<0,this.h2=this.h2+L<<0,this.h3=this.h3+D<<0,this.h4=this.h4+B<<0,this.h5=this.h5+U<<0,this.h6=this.h6+C<<0,this.h7=this.h7+R<<0},Q.prototype.hex=function(){this.finalize();var A=this.h0,x=this.h1,L=this.h2,D=this.h3,B=this.h4,U=this.h5,C=this.h6,R=this.h7,O=m[A>>>28&15]+m[A>>>24&15]+m[A>>>20&15]+m[A>>>16&15]+m[A>>>12&15]+m[A>>>8&15]+m[A>>>4&15]+m[A&15]+m[x>>>28&15]+m[x>>>24&15]+m[x>>>20&15]+m[x>>>16&15]+m[x>>>12&15]+m[x>>>8&15]+m[x>>>4&15]+m[x&15]+m[L>>>28&15]+m[L>>>24&15]+m[L>>>20&15]+m[L>>>16&15]+m[L>>>12&15]+m[L>>>8&15]+m[L>>>4&15]+m[L&15]+m[D>>>28&15]+m[D>>>24&15]+m[D>>>20&15]+m[D>>>16&15]+m[D>>>12&15]+m[D>>>8&15]+m[D>>>4&15]+m[D&15]+m[B>>>28&15]+m[B>>>24&15]+m[B>>>20&15]+m[B>>>16&15]+m[B>>>12&15]+m[B>>>8&15]+m[B>>>4&15]+m[B&15]+m[U>>>28&15]+m[U>>>24&15]+m[U>>>20&15]+m[U>>>16&15]+m[U>>>12&15]+m[U>>>8&15]+m[U>>>4&15]+m[U&15]+m[C>>>28&15]+m[C>>>24&15]+m[C>>>20&15]+m[C>>>16&15]+m[C>>>12&15]+m[C>>>8&15]+m[C>>>4&15]+m[C&15];return this.is224||(O+=m[R>>>28&15]+m[R>>>24&15]+m[R>>>20&15]+m[R>>>16&15]+m[R>>>12&15]+m[R>>>8&15]+m[R>>>4&15]+m[R&15]),O},Q.prototype.toString=Q.prototype.hex,Q.prototype.digest=function(){this.finalize();var A=this.h0,x=this.h1,L=this.h2,D=this.h3,B=this.h4,U=this.h5,C=this.h6,R=this.h7,O=[A>>>24&255,A>>>16&255,A>>>8&255,A&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,L>>>24&255,L>>>16&255,L>>>8&255,L&255,D>>>24&255,D>>>16&255,D>>>8&255,D&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255];return this.is224||O.push(R>>>24&255,R>>>16&255,R>>>8&255,R&255),O},Q.prototype.array=Q.prototype.digest,Q.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(this.is224?28:32),x=new DataView(A);return x.setUint32(0,this.h0),x.setUint32(4,this.h1),x.setUint32(8,this.h2),x.setUint32(12,this.h3),x.setUint32(16,this.h4),x.setUint32(20,this.h5),x.setUint32(24,this.h6),this.is224||x.setUint32(28,this.h7),A};function ue(A,x,L){var D,B=typeof A;if(B==="string"){var U=[],C=A.length,R=0,O;for(D=0;D<C;++D)O=A.charCodeAt(D),O<128?U[R++]=O:O<2048?(U[R++]=192|O>>>6,U[R++]=128|O&63):O<55296||O>=57344?(U[R++]=224|O>>>12,U[R++]=128|O>>>6&63,U[R++]=128|O&63):(O=65536+((O&1023)<<10|A.charCodeAt(++D)&1023),U[R++]=240|O>>>18,U[R++]=128|O>>>12&63,U[R++]=128|O>>>6&63,U[R++]=128|O&63);A=U}else if(B==="object"){if(A===null)throw new Error(b);if(E&&A.constructor===ArrayBuffer)A=new Uint8Array(A);else if(!Array.isArray(A)&&(!E||!ArrayBuffer.isView(A)))throw new Error(b)}else throw new Error(b);A.length>64&&(A=new Q(x,!0).update(A).array());var N=[],H=[];for(D=0;D<64;++D){var J=A[D]||0;N[D]=92^J,H[D]=54^J}Q.call(this,x,L),this.update(H),this.oKeyPad=N,this.inner=!0,this.sharedMemory=L}ue.prototype=new Q,ue.prototype.finalize=function(){if(Q.prototype.finalize.call(this),this.inner){this.inner=!1;var A=this.array();Q.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(A),Q.prototype.finalize.call(this)}};var ae=Y();ae.sha256=ae,ae.sha224=Y(!0),ae.sha256.hmac=Z(),ae.sha224.hmac=Z(!0),g?it.exports=ae:(p.sha256=ae.sha256,p.sha224=ae.sha224,T&&define(function(){return ae}))})()});var __={};t_(__,{registerWorker:()=>fr});var qe=class{constructor(f,p){this._bindings=f,this._conn=p}close(){this._bindings.disconnect(this._conn)}useUnsafe(f){return f(this._bindings,this._conn)}query(f){return this._bindings.runQuery(this._conn,f)}async send(f,p=!1){let y=this._bindings.startPendingQuery(this._conn,f,p);for(;y==null;)y=await new Promise((d,g)=>{try{d(this._bindings.pollPendingQuery(this._conn))}catch(T){console.log(T),T.message.includes("worker is not set!")?g(new Error("Worker has been terminated")):g(T)}});return new Je(this._bindings,this._conn,y)}cancelSent(){return this._bindings.cancelPendingQuery(this._conn)}getTableNames(f){return this._bindings.getTableNames(this._conn,f)}prepare(f){let p=this._bindings.createPrepared(this._conn,f);return new ht(this._bindings,this._conn,p)}insertArrowFromIPCStream(f,p){this._bindings.insertArrowFromIPCStream(this._conn,f,p)}insertCSVFromPath(f,p){this._bindings.insertCSVFromPath(this._conn,f,p)}insertJSONFromPath(f,p){this._bindings.insertJSONFromPath(this._conn,f,p)}},Je=class{constructor(f,p,y){this.bindings=f;this.conn=p;this.header=y;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let f=null;do f=this.bindings.fetchQueryResults(this.conn);while(f==null);return this._depleted=f.length==0,{done:this._depleted,value:f}}[Symbol.iterator](){return this}},ht=class{constructor(f,p,y){this.bindings=f,this.connectionId=p,this.statementId=y}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...f){return this.bindings.runPrepared(this.connectionId,this.statementId,f)}send(...f){let p=this.bindings.sendPrepared(this.connectionId,this.statementId,f);return new Je(this.bindings,this.connectionId,p)}};function Xt(b){return b<=255}function Vt(b){return b===256}var zt=new TextEncoder,qt=new TextDecoder("utf-8");function _t(b,f,p){let y=zt.encode(p),d=b._malloc(y.byteLength),g=b.HEAPU8.subarray(d,d+y.byteLength);g.set(y),b.HEAPF64[(f>>3)+0]=1,b.HEAPF64[(f>>3)+1]=d,b.HEAPF64[(f>>3)+2]=g.byteLength}function dt(b){switch(b){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function lt(b,f,p,y){let d=b.HEAPU8.subarray(f,f+y*dt(p));switch(p){case"UINT8":return new Uint8Array(d.buffer,d.byteOffset,y);case"INT8":return new Int8Array(d.buffer,d.byteOffset,y);case"INT32":return new Int32Array(d.buffer,d.byteOffset,y);case"FLOAT":return new Float32Array(d.buffer,d.byteOffset,y);case"DOUBLE":return new Float64Array(d.buffer,d.byteOffset,y);case"VARCHAR":return new Float64Array(d.buffer,d.byteOffset,y);default:return new Array(0)}}function Jt(b,f,p){let y=b.HEAPU8.subarray(f,f+p);return new Uint8Array(y.buffer,y.byteOffset,p)}function ze(b,f,p){let y=b.HEAPU8.subarray(f,f+p*8);return new Float64Array(y.buffer,y.byteOffset,p)}function Yt(b,f,p,y,d,g,T,E){try{let m=b._udfFunctions.get(y);if(!m){_t(f,p,"Unknown UDF with id: "+y);return}let $=qt.decode(f.HEAPU8.subarray(d,d+g)),F=JSON.parse($),X=ze(f,T,E/8),ie=D=>{var U;let B=null;switch(D.validityBuffer!==void 0&&(B=Jt(f,X[D.validityBuffer],F.rows)),D.physicalType){case"VARCHAR":{if(D.dataBuffer===null||D.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for VARCHAR argument");if(D.lengthBuffer===null||D.lengthBuffer===void 0)throw new Error("malformed data view, expected data length buffer for VARCHAR argument");let C=lt(f,X[D.dataBuffer],D.physicalType,F.rows),R=[],O=ze(f,X[D.lengthBuffer],F.rows);for(let N=0;N<F.rows;++N){if(B!=null&&!B[N]){R.push(null);continue}let H=f.HEAPU8.subarray(C[N],C[N]+O[N]),J=qt.decode(H);R.push(J)}return N=>R[N]}case"STRUCT":{let C={},R=[];for(let O=0;O<(((U=D.children)==null?void 0:U.length)||0);++O){let N=D.children[O],H=ie(N);R.push(J=>{C[N.name]=H(J)})}return B!=null?O=>{if(!B[O])return null;for(let N of R)N(O);return C}:O=>{for(let N of R)N(O);return C}}default:{if(D.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for argument of type: "+D.physicalType);let C=lt(f,X[D.dataBuffer],D.physicalType,F.rows);return B!=null?R=>B[R]?C[R]:null:R=>C[R]}}},P=[];for(let D=0;D<F.args.length;++D)P.push(ie(F.args[D]));let G=F.rows*dt(F.ret.physicalType),Y=f._malloc(G),ne=lt(f,Y,F.ret.physicalType,F.rows),oe=f._malloc(F.rows),Z=Jt(f,oe,F.rows);if(ne.length==0||Z.length==0){_t(f,p,"Can't create physical arrays for result");return}let Q=ne;F.ret.physicalType=="VARCHAR"&&(Q=new Array(F.rows));let ue=[];for(let D=0;D<F.args.length;++D)ue.push(null);for(let D=0;D<F.rows;++D){for(let U=0;U<F.args.length;++U)ue[U]=P[U](D);let B=m.func(...ue);Q[D]=B,Z[D]=B==null?0:1}let ae=0;switch(F.ret.physicalType){case"VARCHAR":{let D=new Array(0);ae=f._malloc(F.rows*dt("DOUBLE"));let B=ze(f,ae,F.rows),U=0;for(let N=0;N<F.rows;++N){let H=zt.encode(Q[N]||"");D.push(H),B[N]=H.length,U+=H.length}let C=f._malloc(U),R=f.HEAPU8.subarray(C,C+U),O=0;for(let N=0;N<F.rows;++N){ne[N]=O;let H=D[N];R.subarray(O,O+H.length).set(H),O+=H.length}}}let A=3*8,x=f._malloc(A),L=ze(f,x,3);L[0]=Y,L[1]=oe,L[2]=ae,f.HEAPF64[(p>>3)+0]=0,f.HEAPF64[(p>>3)+1]=x,f.HEAPF64[(p>>3)+2]=0}catch(m){_t(f,p,m.toString())}}function n_(){let b=new TextDecoder;return f=>(typeof SharedArrayBuffer<"u"&&f.buffer instanceof SharedArrayBuffer&&(f=new Uint8Array(f)),b.decode(f))}var s_=n_();function ve(b,f){console.error(`FAIL WITH: ${f}`),b.ccall("duckdb_web_fail_with",null,["string"],[f])}function He(b){let f=b.wasmMemory;if(f&&f.buffer!==b.HEAPU8.buffer){let p=f.buffer;b.HEAPU8=new Uint8Array(p),b.HEAPF64=new Float64Array(p)}}function Se(b,f,p){He(b);let y=new Uint8Array(b.HEAPU8.buffer,f,p),d=new Uint8Array(new ArrayBuffer(y.byteLength));return d.set(y),d}function q(b,f,p){return He(b),s_(new Uint8Array(b.HEAPU8.buffer,f,p))}function ee(b,f,p,y){let d=b.stackSave(),g=b.stackAlloc(3*8);p.unshift("number"),y.unshift(g),b.ccall(f,null,p,y),He(b);let T=b.HEAPF64[(g>>3)+0],E=b.HEAPF64[(g>>3)+1],m=b.HEAPF64[(g>>3)+2];return b.stackRestore(d),[T,E,m]}function se(b){b.ccall("duckdb_web_clear_response",null,[],[])}var Ye=class{constructor(f){let p=new Float64Array(f.buffer,f.byteOffset,f.byteLength/8),y=new Uint8Array(new ArrayBuffer(f.byteLength));y.set(f.subarray(7*8)),this.totalFileReadsCold=p[0],this.totalFileReadsAhead=p[1],this.totalFileReadsCached=p[2],this.totalFileWrites=p[3],this.totalPageAccesses=p[4],this.totalPageLoads=p[5],this.blockSize=p[6],this.blockStats=y}getBlockStats(f,p){return p=p||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},p.file_writes=this.blockStats[f*3+0]&15,p.file_reads_cold=this.blockStats[f*3+0]>>4,p.file_reads_ahead=this.blockStats[f*3+1]&15,p.file_reads_cached=this.blockStats[f*3+1]>>4,p.page_accesses=this.blockStats[f*3+1]&15,p.page_loads=this.blockStats[f*3+1]>>4,p}};var Pe=new TextEncoder;function fe(b){return b!==0}var Qe=class{constructor(f,p){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=f,this._runtime=p,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(f=p=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(f),await this._initPromise),this._initPromise=new Promise(p=>{this._initPromiseResolver=p}),this.onInstantiationProgress=[f],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(p=>p!=f),globalThis.DUCKDB_BINDINGS=this,this)}open(f){let[p,y,d]=ee(this.mod,"duckdb_web_open",["string"],[JSON.stringify(f)]);if(p!==0)throw new Error(q(this.mod,y,d));se(this.mod)}reset(){let[f,p,y]=ee(this.mod,"duckdb_web_reset",[],[]);if(f!==0)throw new Error(q(this.mod,p,y));se(this.mod)}getVersion(){let[f,p,y]=ee(this.mod,"duckdb_web_get_version",[],[]);if(f!==0)throw new Error(q(this.mod,p,y));let d=q(this.mod,p,y);return se(this.mod),d}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(f){let p=Pe.encode(f),y=this.mod._malloc(p.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,y,p.length).set(p);let[g,T,E]=ee(this.mod,"duckdb_web_tokenize_buffer",["number","number"],[y,p.length]);if(this.mod._free(y),g!==0)throw new Error(q(this.mod,T,E));let m=q(this.mod,T,E);return se(this.mod),JSON.parse(m)}connect(){let f=this.mod.ccall("duckdb_web_connect","number",[],[]);return new qe(this,f)}disconnect(f){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[f]),this.pthread)for(let p of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])p.postMessage({cmd:"dropUDFFunctions",connectionId:f})}runQuery(f,p){let y=Pe.encode(p),d=this.mod._malloc(y.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,d,y.length).set(y);let[T,E,m]=ee(this.mod,"duckdb_web_query_run_buffer",["number","number","number"],[f,d,y.length]);if(this.mod._free(d),T!==0)throw new Error(q(this.mod,E,m));let $=Se(this.mod,E,m);return se(this.mod),$}startPendingQuery(f,p,y=!1){let d=Pe.encode(p),g=this.mod._malloc(d.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,g,d.length).set(d);let[E,m,$]=ee(this.mod,"duckdb_web_pending_query_start_buffer",["number","number","number","boolean"],[f,g,d.length,y]);if(this.mod._free(g),E!==0)throw new Error(q(this.mod,m,$));if(m==0)return null;let F=Se(this.mod,m,$);return se(this.mod),F}pollPendingQuery(f){let[p,y,d]=ee(this.mod,"duckdb_web_pending_query_poll",["number"],[f]);if(p!==0)throw new Error(q(this.mod,y,d));if(y==0)return null;let g=Se(this.mod,y,d);return se(this.mod),g}cancelPendingQuery(f){return this.mod.ccall("duckdb_web_pending_query_cancel","boolean",["number"],[f])}fetchQueryResults(f){let[p,y,d]=ee(this.mod,"duckdb_web_query_fetch_results",["number"],[f]);if(Vt(p))return se(this.mod),null;if(!Xt(p))throw new Error("Unexpected StatusCode from duckdb_web_query_fetch_results ("+p+") and with self reported error as"+q(this.mod,y,d));if(p!==0)throw new Error(q(this.mod,y,d));let g=Se(this.mod,y,d);return se(this.mod),g}getTableNames(f,p){let y=Pe.encode(p),d=this.mod._malloc(y.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,d,y.length).set(y);let[T,E,m]=ee(this.mod,"duckdb_web_get_tablenames_buffer",["number","number","number"],[f,d,y.length]);if(this.mod._free(d),T!==0)throw new Error(q(this.mod,E,m));let $=q(this.mod,E,m);return se(this.mod),JSON.parse($)}createPrepared(f,p){let y=Pe.encode(p),d=this.mod._malloc(y.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,d,y.length).set(y);let[T,E,m]=ee(this.mod,"duckdb_web_prepared_create_buffer",["number","number","number"],[f,d,y.length]);if(this.mod._free(d),fe(T))throw new Error(q(this.mod,E,m));return se(this.mod),E}closePrepared(f,p){let[y,d,g]=ee(this.mod,"duckdb_web_prepared_close",["number","number"],[f,p]);if(fe(y))throw new Error(q(this.mod,d,g));se(this.mod)}runPrepared(f,p,y){let[d,g,T]=ee(this.mod,"duckdb_web_prepared_run",["number","number","string"],[f,p,JSON.stringify(y)]);if(fe(d))throw new Error(q(this.mod,g,T));let E=Se(this.mod,g,T);return se(this.mod),E}sendPrepared(f,p,y){let[d,g,T]=ee(this.mod,"duckdb_web_prepared_send",["number","number","string"],[f,p,JSON.stringify(y)]);if(fe(d))throw new Error(q(this.mod,g,T));let E=Se(this.mod,g,T);return se(this.mod),E}insertArrowFromIPCStream(f,p,y){if(p.length==0)return;let d=this.mod._malloc(p.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,d,p.length).set(p);let T=y?JSON.stringify(y):"",[E,m,$]=ee(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[f,d,p.length,T]);if(this.mod._free(d),E!==0)throw new Error(q(this.mod,m,$))}insertCSVFromPath(f,p,y){let d=JSON.stringify(y),[g,T,E]=ee(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[f,p,d]);if(fe(g))throw new Error(q(this.mod,T,E))}insertJSONFromPath(f,p,y){let d=JSON.stringify(y),[g,T,E]=ee(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[f,p,d]);if(fe(g))throw new Error(q(this.mod,T,E))}globFiles(f){let[p,y,d]=ee(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[f]);if(fe(p))throw new Error(q(this.mod,y,d));let g=q(this.mod,y,d);se(this.mod);let T=JSON.parse(g);return T==null?[]:T}registerFileURL(f,p,y,d=!1){p===void 0&&(p=f);let[g,T,E]=ee(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[f,p,y,d]);if(fe(g))throw new Error(q(this.mod,T,E));se(this.mod)}registerFileText(f,p){let y=Pe.encode(p);this.registerFileBuffer(f,y)}registerFileBuffer(f,p){let y=this.mod._malloc(p.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,y,p.length).set(p);let[g,T,E]=ee(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[f,y,p.length]);if(fe(g))throw new Error(q(this.mod,T,E));se(this.mod)}async prepareFileHandle(f,p){if(p===3&&this._runtime.prepareFileHandles){let y=await this._runtime.prepareFileHandles([f],3);for(let d of y){let{handle:g,path:T,fromCached:E}=d;!E&&g.getSize()&&await this.registerFileHandleAsync(T,g,3,!0)}return}throw new Error(`prepareFileHandle: unsupported protocol ${p}`)}async prepareDBFileHandle(f,p){if(p===3&&this._runtime.prepareDBFileHandle){let y=await this._runtime.prepareDBFileHandle(f,3);for(let d of y){let{handle:g,path:T,fromCached:E}=d;!E&&g.getSize()&&await this.registerFileHandleAsync(T,g,3,!0)}return}throw new Error(`prepareDBFileHandle: unsupported protocol ${p}`)}async prepareFileHandleAsync(f,p,y,d){if(y===3&&!(p instanceof FileSystemSyncAccessHandle)){if(p instanceof FileSystemFileHandle){let g=p;try{p=await g.createSyncAccessHandle()}catch(T){throw new Error(T.message+":"+f)}}else if(f!=null)try{p=await(await(await navigator.storage.getDirectory()).getFileHandle(f)).createSyncAccessHandle()}catch(g){throw new Error(g.message+":"+f)}}return p}async registerFileHandleAsync(f,p,y,d){let g=await this.prepareFileHandleAsync(f,p,y,d);this.registerFileHandle(f,g,y,d)}registerFileHandle(f,p,y,d){var m;let[g,T,E]=ee(this.mod,"duckdb_web_fs_register_file_url",["string","string","number","boolean"],[f,f,y,d]);if(fe(g))throw new Error(q(this.mod,T,E));if(se(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(f,p),(m=globalThis.DUCKDB_RUNTIME._preparedHandles)!=null&&m[f]&&delete globalThis.DUCKDB_RUNTIME._preparedHandles[f],this.pthread){for(let $ of this.pthread.runningWorkers)$.postMessage({cmd:"registerFileHandle",fileName:f,fileHandle:p});for(let $ of this.pthread.unusedWorkers)$.postMessage({cmd:"dropFileHandle",fileName:f})}}dropFile(f){let[p,y,d]=ee(this.mod,"duckdb_web_fs_drop_file",["string"],[f]);if(fe(p))throw new Error(q(this.mod,y,d));se(this.mod)}dropFiles(f){let p=[],y=-1;try{for(let E of f!=null?f:[])if(E!=null&&E.length>0){let m=this.mod.lengthBytesUTF8(E)+1,$=this.mod._malloc(m)>>>0;if(!$)throw new Error(`Failed to allocate memory for string: ${E}`);this.mod.stringToUTF8(E,$,m),p.push($)}if(y=this.mod._malloc(p.length*4)>>>0,!y)throw new Error("Failed to allocate memory for pointers array");for(let E=0;E<p.length;E++)this.mod.HEAP32[(y>>2)+E]=p[E];let[d,g,T]=ee(this.mod,"duckdb_web_fs_drop_files",["number","number"],[y,p.length]);if(d!==0)throw new Error(q(this.mod,g,T));se(this.mod)}finally{for(let d of p)this.mod._free(d);y>0&&this.mod._free(y)}}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(f,p){let[y,d,g]=ee(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[f,p]);if(fe(y))throw new Error(q(this.mod,d,g));se(this.mod)}copyFileToBuffer(f){let[p,y,d]=ee(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[f]);if(fe(p))throw new Error(q(this.mod,y,d));He(this.mod);let g=new Uint8Array(this.mod.HEAPU8.buffer,y,d),T=new Uint8Array(g.length);return T.set(g),se(this.mod),T}async registerOPFSFileName(f){if(f.startsWith("opfs://"))return this.prepareFileHandle(f,3);throw new Error("Not an OPFS file name: "+f)}collectFileStatistics(f,p){let[y,d,g]=ee(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[f,p]);if(fe(y))throw new Error(q(this.mod,d,g))}exportFileStatistics(f){let[p,y,d]=ee(this.mod,"duckdb_web_export_file_stats",["string"],[f]);if(fe(p))throw new Error(q(this.mod,y,d));return He(this.mod),new Ye(new Uint8Array(this.mod.HEAPU8.buffer,y,d))}};var Ze=class{constructor(){this._bindings=null;this._nextMessageId=0}log(f){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:f},[])}sendOK(f){this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"OK",data:null},[])}failWith(f,p){let y={name:p.name,message:p.message,stack:p.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"ERROR",data:y},[])}async onMessage(f){switch(f.type){case"PING":this.sendOK(f);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(f,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(f.data[0],f.data[1],p=>{this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"INSTANTIATE_PROGRESS",data:p},[])}),this.sendOK(f)}catch(p){console.log(p),this._bindings=null,this.failWith(f,p)}return;default:break}if(!this._bindings)return this.failWith(f,new Error("duckdb is not initialized"));try{switch(f.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(f);break;case"OPEN":{let p=f.data.path,y=!!(this._bindings.getFeatureFlags()&2);if(p!=null&&p.startsWith("opfs://")&&!y){let d=globalThis.DUCKDB_RUNTIME;d!=null&&d.prepareDBFileHandle&&await d.prepareDBFileHandle(p,3),f.data.useDirectIO=!0}this._bindings.open(f.data),this.sendOK(f);break}case"DROP_FILE":this._bindings.dropFile(f.data),this.sendOK(f);break;case"DROP_FILES":this._bindings.dropFiles(f.data),this.sendOK(f);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(f);break;case"CONNECT":{let p=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"CONNECTION_INFO",data:p.useUnsafe((y,d)=>d)},[]);break}case"DISCONNECT":this._bindings.disconnect(f.data),this.sendOK(f);break;case"CREATE_PREPARED":{let p=this._bindings.createPrepared(f.data[0],f.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"PREPARED_STATEMENT_ID",data:p},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(f.data[0],f.data[1]),this.sendOK(f);break}case"RUN_PREPARED":{let p=this._bindings.runPrepared(f.data[0],f.data[1],f.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT",data:p},[p.buffer]);break}case"RUN_QUERY":{let p=this._bindings.runQuery(f.data[0],f.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT",data:p},[p.buffer]);break}case"SEND_PREPARED":{let p=this._bindings.sendPrepared(f.data[0],f.data[1],f.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_HEADER",data:p},[p.buffer]);break}case"START_PENDING_QUERY":{let p=this._bindings.startPendingQuery(f.data[0],f.data[1],f.data[2]),y=[];p&&y.push(p.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:p},y);break}case"POLL_PENDING_QUERY":{let p=this._bindings.pollPendingQuery(f.data),y=[];p&&y.push(p.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:p},y);break}case"CANCEL_PENDING_QUERY":{let p=this._bindings.cancelPendingQuery(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"SUCCESS",data:p},[]);break}case"FETCH_QUERY_RESULTS":{let p=this._bindings.fetchQueryResults(f.data),y=p?[p.buffer]:[];this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_CHUNK",data:p},y);break}case"GET_TABLE_NAMES":{let p=this._bindings.getTableNames(f.data[0],f.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"TABLE_NAMES",data:p},[]);break}case"GLOB_FILE_INFOS":{let p=this._bindings.globFiles(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FILE_INFOS",data:p},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(f.data[0],f.data[1],f.data[2],f.data[3]),this.sendOK(f);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(f.data[0],f.data[1]),this.sendOK(f);break;case"REGISTER_FILE_HANDLE":await this._bindings.registerFileHandleAsync(f.data[0],f.data[1],f.data[2],f.data[3]),this.sendOK(f);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(f.data[0],f.data[1]),this.sendOK(f);break;case"COPY_FILE_TO_BUFFER":{let p=this._bindings.copyFileToBuffer(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FILE_BUFFER",data:p},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(f.data[0],f.data[1]),this.sendOK(f);break;case"REGISTER_OPFS_FILE_NAME":await this._bindings.registerOPFSFileName(f.data[0]),this.sendOK(f);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(f.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(f.data[0],f.data[1],f.data[2]),this.sendOK(f);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(f.data[0],f.data[1],f.data[2]),this.sendOK(f);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(f.data[0],f.data[1],f.data[2]),this.sendOK(f);break}case"TOKENIZE":{let p=this._bindings.tokenize(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"SCRIPT_TOKENS",data:p},[]);break}}}catch(p){return console.log(p),this.failWith(f,p)}}};var rr=Kt(tr());var tt=class extends Qe{constructor(f,p,y,d){super(f,p),this.mainModuleURL=y,this.pthreadWorkerURL=d}locateFile(f,p){if(f.endsWith(".wasm"))return this.mainModuleURL;if(f.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${p} path=${f}`)}instantiateWasm(f,p){globalThis.DUCKDB_RUNTIME=this._runtime;let y=this.onInstantiationProgress;if(WebAssembly.instantiateStreaming)if(typeof TransformStream=="function"){let g=(async()=>{var G;let T=new Request(this.mainModuleURL),E=await fetch(T),m=E.headers.get("content-length"),$=m&&parseInt(m,10)||0,F=new Date,X={startedAt:F,updatedAt:F,bytesTotal:$||0,bytesLoaded:0},ie={transform(Y,ne){X.bytesLoaded+=Y.byteLength;let oe=new Date;if(oe.getTime()-X.updatedAt.getTime()<20){X.updatedAt=oe,ne.enqueue(Y);return}for(let Z of y)Z(X);ne.enqueue(Y)}},P=new TransformStream(ie);return new Response((G=E.body)==null?void 0:G.pipeThrough(P),E)})();WebAssembly.instantiateStreaming(g,f).then(T=>{p(T.instance,T.module)})}else{console.warn("instantiating without progress handler since transform streams are unavailable");let d=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(d),f).then(g=>{p(g.instance,g.module)})}else if(typeof XMLHttpRequest=="function"){let d=new XMLHttpRequest,g=this.mainModuleURL,T=new Date,E={startedAt:T,updatedAt:T,bytesTotal:0,bytesLoaded:0};d.open("GET",g),d.responseType="arraybuffer",d.onerror=m=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+m}),new Error(m.toString())},d.onprogress=m=>{E.bytesTotal=m.total,E.bytesLoaded=m.loaded;let $=new Date;if($.getTime()-E.updatedAt.getTime()<20){E.updatedAt=$;return}for(let F of y)F(E)},d.onload=()=>{WebAssembly.instantiate(d.response,f).then(m=>{p(m.instance,m.module)}).catch(m=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+m}),new Error(m)})},d.send()}else console.warn("instantiating with manual fetch since streaming instantiation and xhrs are unavailable"),(async()=>{let g=new Request(this.mainModuleURL),E=await(await fetch(g)).arrayBuffer();WebAssembly.instantiate(E,f).then(m=>{p(m.instance,m.module)})})();return{}}};var rt=class extends tt{constructor(f,p,y,d=null){super(f,p,y,d)}instantiateImpl(f){return(0,rr.default)({...f,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var Ee=Kt(sr()),or=function(b,f,p){var y;if((y=b==null?void 0:b.endpoint)!=null&&y.startsWith("http")){let d=`${b==null?void 0:b.endpoint}`,g=d.indexOf("://")+3;return d.substring(g)}else return b!=null&&b.endpoint?`${p}.${b==null?void 0:b.endpoint}`:`${p}.s3.amazonaws.com`};function a_(b,f,p){var g,T,E,m;let y=ar(f),d=y.path;return cr(b)&&(d=`/${y.bucket}${d}`),{url:d,query:"",host:or(b,f,y.bucket),region:(g=b==null?void 0:b.region)!=null?g:"",service:"s3",method:p,accessKeyId:(T=b==null?void 0:b.accessKeyId)!=null?T:"",secretAccessKey:(E=b==null?void 0:b.secretAccessKey)!=null?E:"",sessionToken:(m=b==null?void 0:b.sessionToken)!=null?m:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function c_(b,f=!1){let p="0123456789ABCDEF",y="";for(let d=0;d<b.length;d++){let g=b[d];g>="A"&&g<="Z"||g>="a"&&g<="z"||g>="0"&&g<="9"||g=="_"||g=="-"||g=="~"||g=="."?y+=g:g=="/"?f?y+="%2F":y+=g:(y+="%",y+=p[g.charCodeAt(0)>>4],y+=p[g.charCodeAt(0)&15])}return y}function u_(b,f=null){var G;let p=(G=f==null?void 0:f.contentHash)!=null?G:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",y=new Map;y.set("x-amz-date",b.datetimeNow),y.set("x-amz-content-sha256",p),b.sessionToken&&y.set("x-amz-security-token",b.sessionToken);let d="";f!=null&&f.contentType&&(d+="content-type;"),d+="host;x-amz-content-sha256;x-amz-date",b.sessionToken&&(d+=";x-amz-security-token");let g=b.method+`
2
- `+c_(b.url)+`
3
- `+b.query;f!=null&&f.contentType&&(g+=`
4
- content-type:`+(f==null?void 0:f.contentType)),g+=`
5
- host:`+b.host+`
6
- x-amz-content-sha256:`+p+`
7
- x-amz-date:`+b.datetimeNow,b.sessionToken&&b.sessionToken.length>0&&(g+=`
8
- x-amz-security-token:`+b.sessionToken),g+=`
1
+ "use strict";var duckdb=(()=>{var tl=Object.create;var Ne=Object.defineProperty;var rl=Object.getOwnPropertyDescriptor;var il=Object.getOwnPropertyNames;var nl=Object.getPrototypeOf,ol=Object.prototype.hasOwnProperty;var al=(y,f,b)=>f in y?Ne(y,f,{enumerable:!0,configurable:!0,writable:!0,value:b}):y[f]=b;var Kt=(y=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(y,{get:(f,b)=>(typeof require<"u"?require:f)[b]}):y)(function(y){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+y+'" is not supported')});var He=(y,f)=>()=>(f||y((f={exports:{}}).exports,f),f.exports),sl=(y,f)=>{for(var b in f)Ne(y,b,{get:f[b],enumerable:!0})},$t=(y,f,b,g)=>{if(f&&typeof f=="object"||typeof f=="function")for(let v of il(f))!ol.call(y,v)&&v!==b&&Ne(y,v,{get:()=>f[v],enumerable:!(g=rl(f,v))||g.enumerable});return y};var Xt=(y,f,b)=>(b=y!=null?tl(nl(y)):{},$t(f||!y||!y.__esModule?Ne(b,"default",{value:y,enumerable:!0}):b,y)),cl=y=>$t(Ne({},"__esModule",{value:!0}),y);var Vt=(y,f,b)=>al(y,typeof f!="symbol"?f+"":f,b);var er=He(()=>{});var tr=He(()=>{});var ir=He((rr,tt)=>{"use strict";var pt=(()=>{var f;var y=typeof document<"u"?(f=document.currentScript)==null?void 0:f.src:void 0;return typeof __filename<"u"&&(y=y||__filename),async function(b={}){var g,v=b,m,E,A=new Promise((e,t)=>{m=e,E=t}),k=typeof window=="object",X=typeof WorkerGlobalScope<"u",S=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer",V=Object.assign({},v),ne=[],B="./this.program",K=(e,t)=>{throw t},Q="";function oe(e){return v.locateFile?v.locateFile(e,Q):Q+e}var se,ee;if(S){var Z=er(),fe=tr();Q=__dirname+"/",ee=e=>{e=Ie(e)?new URL(e):e;var t=Z.readFileSync(e);return t},se=async(e,t=!0)=>{e=Ie(e)?new URL(e):e;var r=Z.readFileSync(e,t?void 0:"utf8");return r},!v.thisProgram&&process.argv.length>1&&(B=process.argv[1].replace(/\\/g,"/")),ne=process.argv.slice(2),K=(e,t)=>{throw process.exitCode=e,t}}else(k||X)&&(X?Q=self.location.href:typeof document<"u"&&document.currentScript&&(Q=document.currentScript.src),y&&(Q=y),Q.startsWith("blob:")?Q="":Q=Q.slice(0,Q.replace(/[?#].*/,"").lastIndexOf("/")+1),X&&(ee=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),se=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var ce=v.print||console.log.bind(console),R=v.printErr||console.error.bind(console);Object.assign(v,V),V=null,v.arguments&&(ne=v.arguments),v.thisProgram&&(B=v.thisProgram);var H=v.wasmBinary,C,U=!1,M;function x(e,t){e||ve(t)}var O,I,N,W,P,z,ye,Y,ge,de,Se=!1,Ie=e=>e.startsWith("file://");function Ue(){var e=C.buffer;v.HEAP8=O=new Int8Array(e),v.HEAP16=N=new Int16Array(e),v.HEAPU8=I=new Uint8Array(e),v.HEAPU16=W=new Uint16Array(e),v.HEAP32=P=new Int32Array(e),v.HEAPU32=z=new Uint32Array(e),v.HEAPF32=ye=new Float32Array(e),v.HEAPF64=de=new Float64Array(e),v.HEAP64=Y=new BigInt64Array(e),v.HEAPU64=ge=new BigUint64Array(e)}function Te(){if(v.preRun)for(typeof v.preRun=="function"&&(v.preRun=[v.preRun]);v.preRun.length;)Ar(v.preRun.shift());yt(mt)}function _r(){Se=!0,L.Xh()}function yl(){}function dr(){if(v.postRun)for(typeof v.postRun=="function"&&(v.postRun=[v.postRun]);v.postRun.length;)Fr(v.postRun.shift());yt(gt)}var Re=0,Me=null;function vr(e){var t;Re++,(t=v.monitorRunDependencies)==null||t.call(v,Re)}function pr(e){var r;if(Re--,(r=v.monitorRunDependencies)==null||r.call(v,Re),Re==0&&Me){var t=Me;Me=null,t()}}function ve(e){var r;(r=v.onAbort)==null||r.call(v,e),e="Aborted("+e+")",R(e),U=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw E(t),t}var Le;function br(){return oe("./duckdb-mvp.wasm")}function wr(e){if(e==Le&&H)return new Uint8Array(H);if(ee)return ee(e);throw"both async and sync fetching of the wasm failed"}async function yr(e){if(!H)try{var t=await se(e);return new Uint8Array(t)}catch{}return wr(e)}async function gr(e,t){try{var r=await yr(e),i=await WebAssembly.instantiate(r,t);return i}catch(n){R(`failed to asynchronously prepare wasm: ${n}`),ve(n)}}async function mr(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function"&&!S)try{var i=fetch(t,{credentials:"same-origin"}),n=await WebAssembly.instantiateStreaming(i,r);return n}catch(o){R(`wasm streaming compile failed: ${o}`),R("falling back to ArrayBuffer instantiation")}return gr(t,r)}function kr(){return{a:An}}async function jr(){function e(o,a){return L=o.exports,L=Zh(L),C=L.Wh,Ue(),Nt=L.Zh,pr("wasm-instantiate"),L}vr("wasm-instantiate");function t(o){return e(o.instance)}var r=kr();if(v.instantiateWasm)return new Promise((o,a)=>{v.instantiateWasm(r,(s,c)=>{e(s,c),o(s.exports)})});Le!=null||(Le=br());try{var i=await mr(H,Le,r),n=t(i);return n}catch(o){return E(o),Promise.reject(o)}}var Er={10314049:(e,t,r,i)=>{var n=re(e);if(typeof XMLHttpRequest>"u")return 0;let o=new XMLHttpRequest;o.open(re(i),n,!1),o.responseType="arraybuffer";for(var a=0,w=t;a<w*2;){var s=P[r/4+a>>>0],c=P[r/4+a+1>>>0];try{var u=encodeURI(re(s));u==="Host"&&(u="X-Host-Override"),u==="User-Agent"&&(u="X-user-agent"),u==="Authorization"?o.setRequestHeader(u,re(c)):o.setRequestHeader(u,encodeURI(re(c)))}catch($){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",$)}a+=2}try{o.send(null)}catch{return 0}if(o.status>=400)return 0;for(var p=o.response,w=p.byteLength,j=Fe(w+4),D=new Uint8Array(p),T=0;T<w;T++)v.HEAPU8[T+j+4]=D[T];var F=new Uint8Array(4);return F[0]=w%256,w-=F[0],w/=256,F[1]=w%256,w-=F[1],w/=256,F[2]=w%256,w-=F[2],w/=256,F[3]=w%256,w-=F[3],w/=256,v.HEAPU8.set(F,j),j},10315456:(e,t,r,i,n,o)=>{var a=re(e);if(typeof XMLHttpRequest>"u")return 0;let s=new XMLHttpRequest;s.open(re(i),a,!1),s.responseType="arraybuffer";for(var c=0,F=t;c<F*2;){var u=P[r/4+c>>>0],p=P[r/4+c+1>>>0];try{var w=encodeURI(re(u));w==="Host"&&(w="X-Host-Override"),w==="User-Agent"&&(w="X-user-agent"),w==="Authorization"?s.setRequestHeader(w,re(p)):s.setRequestHeader(w,encodeURI(re(p)))}catch(ue){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",ue)}c+=2}try{for(var j=new Uint8Array(o),D=0;D<o;D++)j[D]=v.HEAPU8[D+n];s.send(j)}catch{return 0}if(s.status>=400)return 0;for(var T=Uint8Array.from(Array.from(s.getResponseHeader("Etag")).map(ue=>ue.charCodeAt(0))),F=T.byteLength,$=Fe(F+4),ie=new Uint8Array(T),D=0;D<F;D++)v.HEAPU8[D+$+4]=ie[D];var q=new Uint8Array(4);return q[0]=F%256,F-=q[0],F/=256,q[1]=F%256,F-=q[1],F/=256,q[2]=F%256,F-=q[2],F/=256,q[3]=F%256,F-=q[3],F/=256,v.HEAPU8.set(q,$),$},10317076:(e,t,r,i)=>{var n=re(e);if(typeof XMLHttpRequest>"u")return 0;let o=new XMLHttpRequest;o.open(re(i),n,!1),o.responseType="arraybuffer";for(var a=0,w=t;a<w*2;){var s=P[r/4+a>>>0],c=P[r/4+a+1>>>0];try{var u=encodeURI(re(s));u==="Host"&&(u="X-Host-Override"),u==="User-Agent"&&(u="X-user-agent"),u==="Authorization"?o.setRequestHeader(u,re(c)):o.setRequestHeader(u,encodeURI(re(c)))}catch(q){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",q)}a+=2}try{o.send(null)}catch{return 0}if(o.status>=400)return 0;for(var p=o.response,w=p.byteLength,j=Fe(w+8),D=new Uint8Array(p),T=0;T<w;T++)v.HEAPU8[T+j+8]=D[T];var F=new Uint8Array(4);F[0]=w%256,w-=F[0],w/=256,F[1]=w%256,w-=F[1],w/=256,F[2]=w%256,w-=F[2],w/=256,F[3]=w%256,w-=F[3],w/=256,v.HEAPU8.set(F,j+4);var $=Uint8Array.from(Array.from(o.getAllResponseHeaders()).map(q=>q.charCodeAt(0)));w=$.byteLength;for(var ie=Fe(w+8),T=0;T<w;T++)v.HEAPU8[T+ie+8]=$[T];return F=new Uint8Array(4),F[0]=w%256,w-=F[0],w/=256,F[1]=w%256,w-=F[1],w/=256,F[2]=w%256,w-=F[2],w/=256,F[3]=w%256,w-=F[3],w/=256,v.HEAPU8.set(F,ie+4),w=ie,F=new Uint8Array(4),F[0]=w%256,w-=F[0],w/=256,F[1]=w%256,w-=F[1],w/=256,F[2]=w%256,w-=F[2],w/=256,F[3]=w%256,w-=F[3],w/=256,v.HEAPU8.set(F,j),j},10319360:(e,t,r,i)=>{var n=re(e);if(typeof XMLHttpRequest>"u")return 0;let o=new XMLHttpRequest;o.open(re(i),n,!1),o.responseType="arraybuffer";for(var a=0,w=t;a<w*2;){var s=P[r/4+a>>>0],c=P[r/4+a+1>>>0];try{var u=encodeURI(re(s));u==="Host"&&(u="X-Host-Override"),u==="User-Agent"&&(u="X-user-agent"),u==="Authorization"?o.setRequestHeader(u,re(c)):o.setRequestHeader(u,encodeURI(re(c)))}catch($){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",$)}a+=2}try{o.send(null)}catch{return 0}if(o.status>=400)return 0;for(var p=o.response,w=p.byteLength,j=Fe(w+4),D=new Uint8Array(p),T=0;T<w;T++)v.HEAPU8[T+j+4]=D[T];var F=new Uint8Array(4);return F[0]=w%256,w-=F[0],w/=256,F[1]=w%256,w-=F[1],w/=256,F[2]=w%256,w-=F[2],w/=256,F[3]=w%256,w-=F[3],w/=256,v.HEAPU8.set(F,j),j},10320767:(e,t,r,i,n,o)=>{var a=re(e);if(typeof XMLHttpRequest>"u")return 0;let s=new XMLHttpRequest;s.open(re(i),a,!1),s.responseType="arraybuffer";for(var c=0,F=t;c<F*2;){var u=P[r/4+c>>>0],p=P[r/4+c+1>>>0];try{var w=encodeURI(re(u));w==="Host"&&(w="X-Host-Override"),w==="User-Agent"&&(w="X-user-agent"),w==="Authorization"?s.setRequestHeader(w,re(p)):s.setRequestHeader(w,encodeURI(re(p)))}catch(ue){console.warn("Error while performing XMLHttpRequest.setRequestHeader()",ue)}c+=2}try{for(var j=new Uint8Array(o),D=0;D<o;D++)j[D]=v.HEAPU8[D+n];s.send(j)}catch{return 0}if(s.status>=400)return 0;for(var T=s.response,F=T.byteLength,$=Fe(F+4),ie=new Uint8Array(T),D=0;D<F;D++)v.HEAPU8[D+$+4]=ie[D];var q=new Uint8Array(4);return q[0]=F%256,F-=q[0],F/=256,q[1]=F%256,F-=q[1],F/=256,q[2]=F%256,F-=q[2],F/=256,q[3]=F%256,F-=q[3],F/=256,v.HEAPU8.set(q,$),$}};class wt{constructor(t){Vt(this,"name","ExitStatus");this.message=`Program terminated with exit(${t})`,this.status=t}}var yt=e=>{for(;e.length>0;)e.shift()(v)},gt=[],Fr=e=>gt.unshift(e),mt=[],Ar=e=>mt.unshift(e),Sr=v.noExitRuntime||!0,h=e=>In(e),l=()=>Tn(),ke=[],We=0,Rr=9007199254740992,Dr=-9007199254740992,je=e=>e<Dr||e>Rr?NaN:Number(e);function Ir(e){e>>>=0;var t=new Ge(e);return t.get_caught()||(t.set_caught(!0),We--),t.set_rethrown(!1),ke.push(t),Wt(e),Pn(e)}function Ur(){if(!ke.length)return 0;var e=ke[ke.length-1];return Wt(e.excPtr),e.excPtr}var me=0,Tr=()=>{_(0,0);var e=ke.pop();xn(e.excPtr),me=0};class Ge{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){z[this.ptr+4>>>2>>>0]=t}get_type(){return z[this.ptr+4>>>2>>>0]}set_destructor(t){z[this.ptr+8>>>2>>>0]=t}get_destructor(){return z[this.ptr+8>>>2>>>0]}set_caught(t){t=t?1:0,O[this.ptr+12>>>0]=t}get_caught(){return O[this.ptr+12>>>0]!=0}set_rethrown(t){t=t?1:0,O[this.ptr+13>>>0]=t}get_rethrown(){return O[this.ptr+13>>>0]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){z[this.ptr+16>>>2>>>0]=t}get_adjusted_ptr(){return z[this.ptr+16>>>2>>>0]}}function xr(e){throw e>>>=0,me||(me=e),me}var Ce=e=>Rn(e),Ke=e=>{var t=me;if(!t)return Ce(0),0;var r=new Ge(t);r.set_adjusted_ptr(t);var i=r.get_type();if(!i)return Ce(0),t;for(var n of e){if(n===0||n===i)break;var o=r.ptr+16;if(Hn(n,i,o))return Ce(n),t}return Ce(i),t};function Hr(){return Ke([])}function Pr(e){return e>>>=0,Ke([e])}function Br(e,t){return e>>>=0,t>>>=0,Ke([e,t])}function Mr(e,t,r){return e>>>=0,t>>>=0,r>>>=0,Ke([e,t,r])}var kt=()=>{var e=ke.pop();e||ve("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(ke.push(e),e.set_rethrown(!0),e.set_caught(!1),We++),me=t,me};function Lr(e){if(e>>>=0,!!e){var t=new Ge(e);ke.push(t),t.set_rethrown(!0),kt()}}function Cr(e,t,r){e>>>=0,t>>>=0,r>>>=0;var i=new Ge(e);throw i.init(t,r),me=e,We++,me}var Or=()=>We;function jt(){ve("missing function: $SOCKFS")}jt.stub=!0;function ot(){ve("missing function: $FS")}ot.stub=!0;var xe=e=>{var t=jt.getSocket(e);if(!t)throw new ot.ErrnoError(8);return t},at=e=>(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255),Et=e=>{var t="",r=0,i=0,n=0,o=0,a=0,s=0,c=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],u=!0,p="";for(s=0;s<5;s++)if(c[s]!==0){u=!1;break}if(u){if(p=at(c[6]|c[7]<<16),c[5]===-1)return t="::ffff:",t+=p,t;if(c[5]===0)return t="::",p==="0.0.0.0"&&(p=""),p==="0.0.0.1"&&(p="1"),t+=p,t}for(r=0;r<8;r++)c[r]===0&&(r-n>1&&(a=0),n=r,a++),a>i&&(i=a,o=r-i+1);for(r=0;r<8;r++){if(i>1&&c[r]===0&&r>=o&&r<o+i){r===o&&(t+=":",o===0&&(t+=":"));continue}t+=Number(_ntohs(c[r]&65535)).toString(16),t+=r<7?":":""}return t},Ft=(e,t)=>{var r=N[e>>>1>>>0],i=_ntohs(W[e+2>>>1>>>0]),n;switch(r){case 2:if(t!==16)return{errno:28};n=P[e+4>>>2>>>0],n=at(n);break;case 10:if(t!==28)return{errno:28};n=[P[e+8>>>2>>>0],P[e+12>>>2>>>0],P[e+16>>>2>>>0],P[e+20>>>2>>>0]],n=Et(n);break;default:return{errno:5}}return{family:r,addr:n,port:i}},$e=e=>{for(var t=e.split("."),r=0;r<4;r++){var i=Number(t[r]);if(isNaN(i))return null;t[r]=i}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0},Xe=e=>parseInt(e),st=e=>{var t,r,i,n,o=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,a=[];if(!o.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),t=e.split(":"),t[t.length-4]=Xe(t[t.length-4])+Xe(t[t.length-3])*256,t[t.length-3]=Xe(t[t.length-2])+Xe(t[t.length-1])*256,t=t.slice(0,t.length-2)):t=e.split(":"),i=0,n=0,r=0;r<t.length;r++)if(typeof t[r]=="string")if(t[r]==="Z"){for(n=0;n<8-t.length+1;n++)a[r+n]=0;i=n-1}else a[r+i]=_htons(parseInt(t[r],16));else a[r+i]=t[r];return[a[1]<<16|a[0],a[3]<<16|a[2],a[5]<<16|a[4],a[7]<<16|a[6]]},_e={address_map:{id:1,addrs:{},names:{}},lookup_name(e){var t=$e(e);if(t!==null||(t=st(e),t!==null))return e;var r;if(_e.address_map.addrs[e])r=_e.address_map.addrs[e];else{var i=_e.address_map.id++;x(i<65535,"exceeded max address mappings of 65535"),r="172.29."+(i&255)+"."+(i&65280),_e.address_map.names[r]=e,_e.address_map.addrs[e]=r}return r},lookup_addr(e){return _e.address_map.names[e]?_e.address_map.names[e]:null}},At=(e,t)=>{var r=Ft(e,t);if(r.errno)throw new ot.ErrnoError(r.errno);return r.addr=_e.lookup_addr(r.addr)||r.addr,r};function Nr(e,t,r,i,n,o){t>>>=0,r>>>=0;var a=xe(e),s=At(t,r);return a.sock_ops.bind(a,s.addr,s.port),0}function Wr(e,t,r,i,n,o){t>>>=0,r>>>=0;var a=xe(e),s=At(t,r);return a.sock_ops.connect(a,s.addr,s.port),0}var Gr=(e,t,r)=>{};function Kr(e,t,r,i){t>>>=0}var St=typeof TextDecoder<"u"?new TextDecoder:void 0,Rt=(e,t=0,r=NaN)=>{t>>>=0;for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&St)return St.decode(e.subarray(t,n));for(var o="";t<n;){var a=e[t++];if(!(a&128)){o+=String.fromCharCode(a);continue}var s=e[t++]&63;if((a&224)==192){o+=String.fromCharCode((a&31)<<6|s);continue}var c=e[t++]&63;if((a&240)==224?a=(a&15)<<12|s<<6|c:a=(a&7)<<18|s<<12|c<<6|e[t++]&63,a<65536)o+=String.fromCharCode(a);else{var u=a-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return o},re=(e,t)=>(e>>>=0,e?Rt(I,e,t):""),ct={varargs:void 0,getStr(e){var t=re(e);return t}};function $r(e,t,r){return r>>>=0,ct.varargs=r,0}function Xr(e,t){t>>>=0}function Vr(e,t){t=je(t)}var Dt=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++r):t+=3}return t};v.lengthBytesUTF8=Dt;var qr=(e,t,r,i)=>{if(r>>>=0,!(i>0))return 0;for(var n=r,o=r+i-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343){var c=e.charCodeAt(++a);s=65536+((s&1023)<<10)|c&1023}if(s<=127){if(r>=o)break;t[r++>>>0]=s}else if(s<=2047){if(r+1>=o)break;t[r++>>>0]=192|s>>6,t[r++>>>0]=128|s&63}else if(s<=65535){if(r+2>=o)break;t[r++>>>0]=224|s>>12,t[r++>>>0]=128|s>>6&63,t[r++>>>0]=128|s&63}else{if(r+3>=o)break;t[r++>>>0]=240|s>>18,t[r++>>>0]=128|s>>12&63,t[r++>>>0]=128|s>>6&63,t[r++>>>0]=128|s&63}}return t[r>>>0]=0,r-n},Ee=(e,t,r)=>qr(e,I,t,r);v.stringToUTF8=Ee;function Jr(e,t){e>>>=0,t>>>=0}function zr(e,t,r){t>>>=0,r>>>=0}var It=(e,t)=>{I.fill(0,e,e+t)},Ve=(e,t,r,i,n)=>{switch(t){case 2:r=$e(r),It(e,16),n&&(P[n>>>2>>>0]=16),N[e>>>1>>>0]=t,P[e+4>>>2>>>0]=r,N[e+2>>>1>>>0]=_htons(i);break;case 10:r=st(r),It(e,28),n&&(P[n>>>2>>>0]=28),P[e>>>2>>>0]=t,P[e+8>>>2>>>0]=r[0],P[e+12>>>2>>>0]=r[1],P[e+16>>>2>>>0]=r[2],P[e+20>>>2>>>0]=r[3],N[e+2>>>1>>>0]=_htons(i);break;default:return 5}return 0};function Yr(e,t,r,i,n,o){t>>>=0,r>>>=0;var a=xe(e);if(!a.daddr)return-53;var s=Ve(t,a.family,_e.lookup_name(a.daddr),a.dport,r);return 0}function Qr(e,t,r,i,n,o){t>>>=0,r>>>=0;var a=xe(e),s=Ve(t,a.family,_e.lookup_name(a.saddr||"0.0.0.0"),a.sport,r);return 0}function Zr(e,t,r,i,n,o){i>>>=0,n>>>=0;var a=xe(e);return t===1&&r===4?(P[i>>>2>>>0]=a.error,P[n>>>2>>>0]=4,a.error=null,0):-50}function ei(e,t,r){return r>>>=0,ct.varargs=r,0}function ti(e,t){e>>>=0,t>>>=0}function ri(e,t,r){t>>>=0}function ii(e,t,r,i){t>>>=0,r>>>=0}function ni(e,t,r,i){t>>>=0,i>>>=0,ct.varargs=i}function oi(e,t,r){e>>>=0}function ai(e,t,r,i,n,o){t>>>=0,r>>>=0,n>>>=0,o>>>=0;var a=xe(e),s=a.sock_ops.recvmsg(a,r);if(!s)return 0;if(n)var c=Ve(n,a.family,_e.lookup_name(s.addr),s.port,o);return I.set(s.buffer,t>>>0),s.buffer.byteLength}function si(e,t,r,i){t>>>=0,i>>>=0}function ci(e){e>>>=0}function ui(e,t,r,i,n,o){t>>>=0,r>>>=0,n>>>=0,o>>>=0}var fi=(e,t,r)=>{};function hi(e,t){e>>>=0,t>>>=0}function li(e,t,r){e>>>=0,t>>>=0,r>>>=0}function _i(e,t,r){t>>>=0}var di=()=>ve(""),vi=()=>{throw 1/0};function Ut(){ve("missing function: _emval_call_method")}Ut.stub=!0;function Tt(){ve("missing function: _emval_decref")}Tt.stub=!0;function xt(){ve("missing function: _emval_get_global")}xt.stub=!0;function Ht(){ve("missing function: _emval_get_method_caller")}Ht.stub=!0;function Pt(){ve("missing function: _emval_run_destructors")}Pt.stub=!0;var pi=e=>e%4===0&&(e%100!==0||e%400===0),bi=[0,31,60,91,121,152,182,213,244,274,305,335],wi=[0,31,59,90,120,151,181,212,243,273,304,334],yi=e=>{var t=pi(e.getFullYear()),r=t?bi:wi,i=r[e.getMonth()]+e.getDate()-1;return i};function gi(e,t){e=je(e),t>>>=0;var r=new Date(e*1e3);P[t>>>2>>>0]=r.getSeconds(),P[t+4>>>2>>>0]=r.getMinutes(),P[t+8>>>2>>>0]=r.getHours(),P[t+12>>>2>>>0]=r.getDate(),P[t+16>>>2>>>0]=r.getMonth(),P[t+20>>>2>>>0]=r.getFullYear()-1900,P[t+24>>>2>>>0]=r.getDay();var i=yi(r)|0;P[t+28>>>2>>>0]=i,P[t+36>>>2>>>0]=-(r.getTimezoneOffset()*60);var n=new Date(r.getFullYear(),0,1),o=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=(o!=a&&r.getTimezoneOffset()==Math.min(a,o))|0;P[t+32>>>2>>>0]=s}function mi(e,t,r,i,n,o,a){return e>>>=0,n=je(n),o>>>=0,a>>>=0,-52}function ki(e,t,r,i,n,o){e>>>=0,t>>>=0,o=je(o)}var ji=function(e,t,r,i){e>>>=0,t>>>=0,r>>>=0,i>>>=0;var n=new Date().getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),s=o.getTimezoneOffset(),c=a.getTimezoneOffset(),u=Math.max(s,c);z[e>>>2>>>0]=u*60,P[t>>>2>>>0]=+(s!=c);var p=D=>{var T=D>=0?"-":"+",F=Math.abs(D),$=String(Math.floor(F/60)).padStart(2,"0"),ie=String(F%60).padStart(2,"0");return`UTC${T}${$}${ie}`},w=p(s),j=p(c);c<s?(Ee(w,r,17),Ee(j,i,17)):(Ee(w,i,17),Ee(j,r,17))},Bt=()=>performance.now(),Mt=()=>Date.now(),Ei=1,Fi=e=>e>=0&&e<=3;function Ai(e,t,r){if(t=je(t),r>>>=0,!Fi(e))return 28;var i;if(e===0)i=Mt();else if(Ei)i=Bt();else return 52;var n=Math.round(i*1e3*1e3);return Y[r>>>3]=BigInt(n),0}function Si(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.createDirectory(v,e,t)}function Ri(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkDirectory(v,e,t)}function Di(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.listDirectoryEntries(v,e,t)}function Ii(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.removeDirectory(v,e,t)}function Ui(e){return globalThis.DUCKDB_RUNTIME.closeFile(v,e)}function Ti(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.dropFile(v,e,t)}function xi(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkFile(v,e,t)}function Hi(e,t,r,i){return e>>>=0,r>>>=0,globalThis.DUCKDB_RUNTIME.moveFile(v,e,t,r,i)}function Pi(e,t){return globalThis.DUCKDB_RUNTIME.openFile(v,e,t)}function Bi(e,t,r,i){return t>>>=0,globalThis.DUCKDB_RUNTIME.readFile(v,e,t,r,i)}function Mi(e,t){return globalThis.DUCKDB_RUNTIME.truncateFile(v,e,t)}function Li(e,t,r,i){return t>>>=0,globalThis.DUCKDB_RUNTIME.writeFile(v,e,t,r,i)}function Ci(e){return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(e)}function Oi(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.glob(v,e,t)}function Ni(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(v,e)}function Wi(e,t,r,i,n,o){return e>>>=0,r>>>=0,n>>>=0,globalThis.DUCKDB_RUNTIME.callScalarUDF(v,e,t,r,i,n,o)}var ut=[],Gi=(e,t)=>{ut.length=0;for(var r;r=I[e++>>>0];){var i=r!=105;i&=r!=112,t+=i&&t%8?4:0,ut.push(r==112?z[t>>>2>>>0]:r==106?Y[t>>>3]:r==105?P[t>>>2>>>0]:de[t>>>3>>>0]),t+=i?8:4}return ut},Ki=(e,t,r)=>{var i=Gi(t,r);return Er[e](...i)};function $i(e,t,r){return e>>>=0,t>>>=0,r>>>=0,Ki(e,t,r)}var Lt=()=>4294901760;function Xi(){return Lt()}var Vi=(e,t)=>Math.ceil(e/t)*t,qi=e=>{var t=C.buffer,r=(e-t.byteLength+65535)/65536|0;try{return C.grow(r),Ue(),1}catch{}};function Ji(e){e>>>=0;var t=I.length,r=Lt();if(e>r)return!1;for(var i=1;i<=4;i*=2){var n=t*(1+.2/i);n=Math.min(n,e+100663296);var o=Math.min(r,Vi(Math.max(e,n),65536)),a=qi(o);if(a)return!0}return!1}var ft={},zi=()=>B||"./this.program",Oe=()=>{if(!Oe.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:zi()};for(var r in ft)ft[r]===void 0?delete t[r]:t[r]=ft[r];var i=[];for(var r in t)i.push(`${r}=${t[r]}`);Oe.strings=i}return Oe.strings},Yi=(e,t)=>{for(var r=0;r<e.length;++r)O[t++>>>0]=e.charCodeAt(r);O[t>>>0]=0},Qi=function(e,t){e>>>=0,t>>>=0;var r=0;return Oe().forEach((i,n)=>{var o=t+r;z[e+n*4>>>2>>>0]=o,Yi(i,o),r+=i.length+1}),0},Zi=function(e,t){e>>>=0,t>>>=0;var r=Oe();z[e>>>2>>>0]=r.length;var i=0;return r.forEach(n=>i+=n.length+1),z[t>>>2>>>0]=i,0},en=0,tn=()=>Sr||en>0,rn=e=>{var t;M=e,tn()||((t=v.onExit)==null||t.call(v,e),U=!0),K(e,new wt(e))},Ct=(e,t)=>{M=e,rn(e)},nn=Ct,on=e=>52;function an(e,t){t>>>=0;var r=0,i=0,n=0;{var o=2;e==0?r=2:(e==1||e==2)&&(r=64),n=1}return O[t>>>0]=o,N[t+2>>>1>>>0]=n,Y[t+8>>>3]=BigInt(r),Y[t+16>>>3]=BigInt(i),0}function sn(e,t,r,i,n){return t>>>=0,r>>>=0,i=je(i),n>>>=0,52}function cn(e,t,r,i,n){return t>>>=0,r>>>=0,i=je(i),n>>>=0,52}function un(e,t,r,i){return t>>>=0,r>>>=0,i>>>=0,52}function fn(e,t,r,i){return t=je(t),i>>>=0,70}var hn=e=>52,ln=[null,[],[]],_n=(e,t)=>{var r=ln[e];t===0||t===10?((e===1?ce:R)(Rt(r)),r.length=0):r.push(t)};function dn(e,t,r,i){t>>>=0,r>>>=0,i>>>=0;for(var n=0,o=0;o<r;o++){var a=z[t>>>2>>>0],s=z[t+4>>>2>>>0];t+=8;for(var c=0;c<s;c++)_n(e,I[a+c>>>0]);n+=s}return z[i>>>2>>>0]=n,0}function vn(e,t,r,i){e>>>=0,t>>>=0,r>>>=0,i>>>=0;var n=0,o=0,a=0,s=0,c=0,u=0,p;function w(j,D,T,F,$,ie){var q,ue,le,Gt;return ue=j===10?28:16,$=j===10?Et($):at($),q=Fe(ue),Gt=Ve(q,j,$,ie),x(!Gt),le=Fe(32),P[le+4>>>2>>>0]=j,P[le+8>>>2>>>0]=D,P[le+12>>>2>>>0]=T,z[le+24>>>2>>>0]=F,z[le+20>>>2>>>0]=q,j===10?P[le+16>>>2>>>0]=28:P[le+16>>>2>>>0]=16,P[le+28>>>2>>>0]=0,le}if(r&&(a=P[r>>>2>>>0],s=P[r+4>>>2>>>0],c=P[r+8>>>2>>>0],u=P[r+12>>>2>>>0]),c&&!u&&(u=c===2?17:6),!c&&u&&(c=u===17?2:1),u===0&&(u=6),c===0&&(c=1),!e&&!t)return-2;if(a&-1088||r!==0&&P[r>>>2>>>0]&2&&!e)return-1;if(a&32)return-2;if(c!==0&&c!==1&&c!==2)return-7;if(s!==0&&s!==2&&s!==10)return-6;if(t&&(t=re(t),o=parseInt(t,10),isNaN(o)))return a&1024?-2:-8;if(!e)return s===0&&(s=2),(a&1)===0&&(s===2?n=_htonl(2130706433):n=[0,0,0,_htonl(1)]),p=w(s,c,u,null,n,o),z[i>>>2>>>0]=p,0;if(e=re(e),n=$e(e),n!==null)if(s===0||s===2)s=2;else if(s===10&&a&8)n=[0,0,_htonl(65535),n],s=10;else return-2;else if(n=st(e),n!==null)if(s===0||s===10)s=10;else return-2;return n!=null?(p=w(s,c,u,e,n,o),z[i>>>2>>>0]=p,0):a&4?-2:(e=_e.lookup_name(e),n=$e(e),s===0?s=2:s===10&&(n=[0,0,_htonl(65535),n]),p=w(s,c,u,null,n,o),z[i>>>2>>>0]=p,0)}function pn(e,t,r,i,n,o,a){e>>>=0,r>>>=0,n>>>=0;var s=Ft(e,t);if(s.errno)return-6;var c=s.port,u=s.addr,p=!1;if(r&&i){var w;if(a&1||!(w=_e.lookup_addr(u))){if(a&8)return-2}else u=w;var j=Ee(u,r,i);j+1>=i&&(p=!0)}if(n&&o){c=""+c;var j=Ee(c,n,o);j+1>=o&&(p=!0)}return p?-12:0}function bn(e){return e>>>=0,e}var wn=()=>{if(S){var e=["crypto"].map(Kt)[0];return t=>e.randomFillSync(t)}return t=>crypto.getRandomValues(t)},Ot=e=>{(Ot=wn())(e)};function yn(e,t){return e>>>=0,t>>>=0,Ot(I.subarray(e>>>0,e+t>>>0)),0}var gn=e=>{if(e instanceof wt||e=="unwind")return M;K(1,e)},Nt,d=e=>Nt.get(e),mn=e=>{var t=v["_"+e];return t},kn=(e,t)=>{O.set(e,t>>>0)},qe=e=>Un(e);v.stackAlloc=qe;var jn=e=>{var t=Dt(e)+1,r=qe(t);return Ee(e,r,t),r},En=(e,t,r,i,n)=>{var o={string:T=>{var F=0;return T!=null&&T!==0&&(F=jn(T)),F},array:T=>{var F=qe(T.length);return kn(T,F),F}};function a(T){return t==="string"?re(T):t==="boolean"?!!T:T}var s=mn(e),c=[],u=0;if(i)for(var p=0;p<i.length;p++){var w=o[r[p]];w?(u===0&&(u=l()),c[p]=w(i[p])):c[p]=i[p]}var j=s(...c);function D(T){return u!==0&&h(u),a(T)}return j=D(j),j},Fn=e=>Dn(),An={z:Ir,Bf:Ur,D:Tr,a:Hr,m:Pr,ha:Br,qc:Mr,ye:kt,sf:Lr,B:Cr,La:Or,d:xr,Th:Nr,Sh:Wr,yf:Gr,Bg:Kr,yb:$r,Ag:Xr,ug:Vr,Cg:Jr,sg:zr,Nh:Yr,Mh:Qr,Qh:Zr,Gd:ei,xg:ti,tg:ri,yg:ii,ne:ni,Rh:oi,Oh:ai,qg:si,Ee:ci,Ph:ui,mf:fi,zg:hi,Dg:li,Fe:_i,eh:di,zf:vi,vf:Ut,wf:Tt,xf:xt,uf:Ht,tf:Pt,og:gi,hg:mi,jg:ki,ig:ji,qf:Ai,Wf:Si,Xf:Ri,Uf:Di,Vf:Ii,ze:Ui,_f:Ti,Sf:xi,Tf:Hi,Zf:Pi,$c:Bi,Yf:Mi,Md:Li,$f:Ci,Rf:Oi,xe:Ni,ag:Wi,Hc:$i,te:Mt,rf:Xi,he:Bt,Ch:Ji,Fg:Qi,Mg:Zi,vb:nn,vc:on,qh:an,wg:sn,vg:cn,Pe:un,ih:fn,rg:hn,rd:dn,Uh:vn,kf:pn,Xa:Ph,Ga:Ta,Xc:xa,pa:Uo,Ze:sc,Db:Hs,se:Hh,je:$n,pe:Kh,gc:mf,Kb:Ms,Hf:Ch,pb:Os,Ac:Js,kb:wf,ue:xh,hd:gf,ff:ls,qb:Us,Vb:xs,$e:Qs,zc:Ys,xb:Io,lf:Kn,bd:lh,fb:bf,rb:Is,Wb:Ts,u:to,Na:_a,mg:Cf,kg:Wf,ub:Ks,Zc:Oo,ed:Gf,db:Ha,ng:Lf,lg:Nf,Jb:Of,c:zn,Ia:zs,Be:th,fa:ac,Kc:sh,fc:ch,Kg:Rf,Rd:qf,nc:uh,b:Bn,Mb:ia,Kd:Wh,Te:tu,g:On,Dh:Ns,Jd:$h,Id:Xh,l:Wn,oe:fo,Gf:Oh,ec:Gh,t:Mn,Ng:kf,F:io,I:Qn,ma:zo,bb:Jo,Ab:Zn,oc:no,G:eo,Y:Bo,Ef:Vh,Gb:pa,P:va,We:Nc,Se:iu,Jf:Ih,Qe:ou,ph:Qc,Ve:$c,gf:os,Re:nu,_d:Bc,yd:Xc,wh:Ic,Zd:Oc,Vc:ns,xd:ru,uc:Wc,nf:Ua,ka:ca,xc:kc,ge:Ds,$d:Ac,hh:gu,Me:Pu,O:uo,Za:ds,Yc:da,Fd:qo,Ye:mc,vh:xc,th:qc,Nb:ho,nh:au,mh:su,Ke:$u,E:go,Ja:cs,sb:ss,Rc:Hc,lh:cu,kh:uu,ic:du,Mf:Sh,ga:Zo,Rb:Gc,nb:Mu,hf:is,lc:Go,Nf:Ah,Ob:gh,w:vo,A:xo,za:ta,Ea:_f,ve:Uh,Nd:_h,cg:vh,Ie:of,Qd:Qf,De:Jf,Ib:Zf,gb:wc,Gh:vs,C:_o,ib:bc,Le:Lu,of:Ea,Ue:Zc,_g:Bu,cb:fa,He:sf,ae:Ec,Zg:Ou,zd:Fc,dh:Su,p:wo,Ic:Fh,W:Ho,ca:Yo,Da:Po,cc:ya,ce:vc,ud:vu,dg:dh,Od:ah,jd:pf,Kh:es,Ha:Co,Gc:Fa,Pc:nf,ke:ja,Xe:Mc,Ig:Uf,Jg:If,Fb:Na,Q:Ko,Ua:Va,ba:Zs,ee:Vs,rc:ku,me:No,Vh:Ra,ea:Mo,Va:Do,Wa:Ro,n:bo,T:ko,sa:as,ya:Gn,eb:wa,Sc:Tc,rh:zc,Ge:Df,ob:Dc,Ca:Sf,Pa:Za,Ec:rs,fd:Af,Nc:jf,Je:Zu,R:Da,ah:Uu,Xb:us,qa:Ga,Bd:js,qd:xu,Ad:jc,Yd:Vc,ia:rc,Z:Hu,wc:Pc,zb:Mf,gd:Ff,$a:Bf,$g:Tu,Qb:Yc,Lg:Ef,da:Lo,od:tf,Ld:bh,lb:Bs,dc:Wo,Pf:mh,Df:zh,Xg:Ku,Hh:hs,bg:ph,_c:Jh,K:jo,wb:Oa,ja:Xs,Hd:qh,ua:Pa,jf:Ca,U:tc,ac:La,_e:nc,k:Ln,Cf:Yh,If:Bh,re:Mh,h:Yn,aa:na,af:Ps,ab:fc,cd:hh,qe:Lh,Af:Qh,la:uc,Cb:cc,dd:fh,e:Cn,Bc:qn,Jh:Vn,f:Nn,Ed:oa,Ff:Nh,md:lf,nd:hf,j:Xn,r:mo,s:so,_:ro,H:sa,Qa:Cc,ta:oo,Hb:To,Oe:bu,Tc:$s,ad:ao,Eg:Hf,pf:ka,fh:Fu,Sa:Ya,Pg:rf,Gg:xf,Wg:Xu,Ne:Eu,Jc:Eh,jb:za,Sb:Uc,Fc:Ia,M:Ls,Wd:Au,Dd:aa,Hg:Tf,Sd:Xf,S:yo,va:Ja,gh:ju,Pd:rh,Ah:lc,Bh:hc,Ya:ts,td:yu,Vg:Vu,Lf:Rh,cf:Fs,na:ea,Ud:ef,Ra:Rs,bf:As,_a:wh,ld:df,Kf:Dh,x:Fo,bc:Sa,mc:Th,L:So,xa:$o,hb:gc,Td:af,Qg:Qu,Fh:gs,Eh:Ss,Cd:ks,Qc:Iu,jc:yc,Ih:fs,Dc:ps,fg:eh,N:po,Zb:Xo,hc:Cu,tc:Kc,Rg:Yu,Cc:bs,oh:eu,Lb:ha,Oc:ff,Sg:zu,yh:Sc,Wc:Xa,Xd:hu,Tg:Ju,xh:Rc,Ug:qu,q:lo,id:yf,J:Qo,Ta:co,wa:ga,sd:mu,y:Ba,pd:Nu,Eb:ys,Yg:Wu,gg:zf,mb:Vf,Bb:wu,Aa:Wa,Ae:ih,$b:Es,df:ms,Pb:cf,sc:_u,wd:fu,Ba:$f,V:Jn,Fa:Ka,sh:Jc,jh:pu,Ma:Qa,ie:qa,Qf:yh,vd:lu,ch:Ru,o:Eo,i:Ao,$:ba,oa:ma,Yb:Vo,zh:_c,yc:dc,we:kh,Of:jh,eg:nh,Vd:Gu,Ce:Yf,kd:vf,kc:qs,fe:Ws,uh:Lc,Uc:ws,Lh:$a,ef:_s,pc:Kf,ra:ua,v:Aa,Lc:oh,_b:Gs,Oa:Cs,Tb:oc,Ka:ra,Mc:Pf,Ub:ec,tb:Ma,be:pc,de:ic,Og:uf,le:la,bh:Du,X:bn,pg:yn},L=await jr(),Sn=v._main=L.Yh,gl=v._duckdb_web_fs_glob_add_path=L._h,ml=v._duckdb_web_clear_response=L.$h,kl=v._duckdb_web_fail_with=L.ai,jl=v._duckdb_web_reset=L.bi,El=v._duckdb_web_connect=L.ci,Fl=v._duckdb_web_disconnect=L.di,Al=v._duckdb_web_flush_files=L.ei,Sl=v._duckdb_web_flush_file=L.fi,Rl=v._duckdb_web_open=L.gi,Dl=v._duckdb_web_get_global_file_info=L.hi,Il=v._duckdb_web_collect_file_stats=L.ii,Ul=v._duckdb_web_export_file_stats=L.ji,Tl=v._duckdb_web_fs_drop_file=L.ki,xl=v._duckdb_web_fs_drop_files=L.li,Hl=v._duckdb_web_fs_glob_file_infos=L.mi,Pl=v._duckdb_web_fs_get_file_info_by_id=L.ni,Bl=v._duckdb_web_fs_get_file_info_by_name=L.oi,Ml=v._duckdb_web_fs_register_file_url=L.pi,Ll=v._duckdb_web_fs_register_file_buffer=L.qi,Cl=v._duckdb_web_copy_file_to_buffer=L.ri,Ol=v._duckdb_web_copy_file_to_path=L.si,Nl=v._duckdb_web_get_version=L.ti,Wl=v._duckdb_web_get_feature_flags=L.ui,Gl=v._duckdb_web_tokenize=L.vi,Kl=v._duckdb_web_tokenize_buffer=L.wi,$l=v._duckdb_web_udf_scalar_create=L.xi,Xl=v._duckdb_web_prepared_create=L.yi,Vl=v._duckdb_web_prepared_create_buffer=L.zi,ql=v._duckdb_web_prepared_close=L.Ai,Jl=v._duckdb_web_prepared_run=L.Bi,zl=v._duckdb_web_prepared_send=L.Ci,Yl=v._duckdb_web_query_run=L.Di,Ql=v._duckdb_web_query_run_buffer=L.Ei,Zl=v._duckdb_web_pending_query_start=L.Fi,e_=v._duckdb_web_pending_query_start_buffer=L.Gi,t_=v._duckdb_web_pending_query_poll=L.Hi,r_=v._duckdb_web_pending_query_cancel=L.Ii,i_=v._duckdb_web_query_fetch_results=L.Ji,n_=v._duckdb_web_get_tablenames=L.Ki,o_=v._duckdb_web_get_tablenames_buffer=L.Li,a_=v._duckdb_web_insert_arrow_from_ipc_stream=L.Mi,s_=v._duckdb_web_insert_csv_from_path=L.Ni,c_=v._duckdb_web_insert_json_from_path=L.Oi,Fe=v._malloc=L.Si,u_=v._free=L.Ti,f_=v._calloc=L.Ui,_=L.Vi,Rn=L.Wi,Dn=L.Xi,In=L.Yi,Un=L.Zi,Tn=L._i,Wt=L.$i,xn=L.aj,Hn=L.bj,Pn=L.cj;function Bn(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Mn(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ln(e){var t=l();try{d(e)()}catch(r){if(h(t),r!==r+0)throw r;_(1,0)}}function Cn(e,t,r){var i=l();try{d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function On(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Nn(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Wn(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Gn(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Kn(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function $n(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Xn(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Vn(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function qn(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Jn(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function zn(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function Yn(e,t){var r=l();try{d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function Qn(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Zn(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function eo(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function to(e){var t=l();try{return d(e)()}catch(r){if(h(t),r!==r+0)throw r;_(1,0)}}function ro(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function io(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function no(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function oo(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function ao(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F){var $=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F)}catch(ie){if(h($),ie!==ie+0)throw ie;_(1,0)}}function so(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function co(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function uo(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function fo(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ho(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function lo(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function _o(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function vo(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function po(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function bo(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _(1,0),0n}}function wo(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function yo(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function go(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function mo(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ko(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _(1,0),0n}}function jo(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _(1,0),0n}}function Eo(e,t,r){var i=l();try{d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Fo(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Ao(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function So(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ro(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _(1,0),0n}}function Do(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;return _(1,0),0n}}function Io(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function Uo(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function To(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function xo(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Ho(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Po(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Bo(e,t,r,i,n,o,a,s,c,u,p,w,j,D){var T=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D)}catch(F){if(h(T),F!==F+0)throw F;_(1,0)}}function Mo(e){var t=l();try{return d(e)()}catch(r){if(h(t),r!==r+0)throw r;return _(1,0),0n}}function Lo(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _(1,0),0n}}function Co(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Oo(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function No(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Wo(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;return _(1,0),0n}}function Go(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Ko(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function $o(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Xo(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Vo(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function qo(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Jo(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function zo(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Yo(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Qo(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Zo(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ea(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ta(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ra(e,t){var r=l();try{d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function ia(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function na(e,t,r){var i=l();try{d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function oa(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function aa(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function sa(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function ca(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ua(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function fa(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ha(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function la(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function _a(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function da(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function va(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$,ie){var q=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$,ie)}catch(ue){if(h(q),ue!==ue+0)throw ue;_(1,0)}}function pa(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$){var ie=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$)}catch(q){if(h(ie),q!==q+0)throw q;_(1,0)}}function ba(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function wa(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function ya(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ga(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ma(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ka(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function ja(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Ea(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Fa(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Aa(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Sa(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ra(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Da(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Ia(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Ua(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T){var F=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T)}catch($){if(h(F),$!==$+0)throw $;_(1,0)}}function Ta(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function xa(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Ha(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function Pa(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _(1,0),0n}}function Ba(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Ma(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function La(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Ca(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Oa(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;return _(1,0),0n}}function Na(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Wa(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ga(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function Ka(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function $a(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Xa(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Va(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function qa(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Ja(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function za(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Ya(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Qa(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Za(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function es(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ts(e,t,r,i,n,o,a,s,c,u,p,w,j,D){var T=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D)}catch(F){if(h(T),F!==F+0)throw F;_(1,0)}}function rs(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function is(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function ns(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function os(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function as(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;return _(1,0),0n}}function ss(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function cs(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function us(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function fs(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function hs(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function ls(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function _s(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ds(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function vs(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ps(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function bs(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function ws(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function ys(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function gs(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function ms(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function ks(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function js(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;return _(1,0),0n}}function Es(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Fs(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function As(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Ss(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Rs(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Ds(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Is(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Us(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ts(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function xs(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Hs(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Ps(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Bs(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Ms(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ls(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Cs(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Os(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Ns(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Ws(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Gs(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Ks(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function $s(e,t,r,i,n,o,a,s,c,u,p,w,j,D){var T=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D)}catch(F){if(h(T),F!==F+0)throw F;_(1,0)}}function Xs(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;return _(1,0),0n}}function Vs(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function qs(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Js(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function zs(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Ys(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Qs(e,t){var r=l();try{return d(e)(t)}catch(i){if(h(r),i!==i+0)throw i;_(1,0)}}function Zs(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function ec(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function tc(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function rc(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;return _(1,0),0n}}function ic(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function nc(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function oc(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ac(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function sc(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function cc(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function uc(e,t,r){var i=l();try{d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function fc(e,t,r,i){var n=l();try{d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function hc(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function lc(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function _c(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function dc(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function vc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function pc(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function bc(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function wc(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function yc(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function gc(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function mc(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function kc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function jc(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function Ec(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Fc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Ac(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Sc(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Rc(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Dc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function Ic(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Uc(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Tc(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function xc(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Hc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Pc(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function Bc(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Mc(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Lc(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function Cc(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Oc(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Nc(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function Wc(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Gc(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Kc(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function $c(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Xc(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Vc(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function qc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Jc(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function zc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function Yc(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Qc(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Zc(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function eu(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function tu(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function ru(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function iu(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T){var F=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T)}catch($){if(h(F),$!==$+0)throw $;_(1,0)}}function nu(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$,ie){var q=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$,ie)}catch(ue){if(h(q),ue!==ue+0)throw ue;_(1,0)}}function ou(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function au(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function su(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function cu(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function uu(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function fu(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function hu(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function lu(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function _u(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function du(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function vu(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function pu(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function bu(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function wu(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function yu(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function gu(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$){var ie=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$)}catch(q){if(h(ie),q!==q+0)throw q;_(1,0)}}function mu(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function ku(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function ju(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Eu(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Fu(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Au(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Su(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function Ru(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function Du(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Iu(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Uu(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function Tu(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function xu(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function Hu(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Pu(e,t,r,i,n,o,a,s,c,u,p,w,j,D){var T=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D)}catch(F){if(h(T),F!==F+0)throw F;_(1,0)}}function Bu(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Mu(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Lu(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Cu(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Ou(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Nu(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Wu(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Gu(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Ku(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function $u(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Xu(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Vu(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function qu(e,t,r,i,n,o,a,s,c,u,p,w,j,D){var T=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D)}catch(F){if(h(T),F!==F+0)throw F;_(1,0)}}function Ju(e,t,r,i,n,o,a,s,c,u,p,w,j){var D=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j)}catch(T){if(h(D),T!==T+0)throw T;_(1,0)}}function zu(e,t,r,i,n,o,a,s,c,u,p,w){var j=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w)}catch(D){if(h(j),D!==D+0)throw D;_(1,0)}}function Yu(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function Qu(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Zu(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function ef(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function tf(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;return _(1,0),0n}}function rf(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function nf(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function of(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function af(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function sf(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function cf(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function uf(e,t,r){var i=l();try{d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function ff(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function hf(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function lf(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function _f(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function df(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function vf(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function pf(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function bf(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function wf(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function yf(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function gf(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function mf(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function kf(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function jf(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;return _(1,0),0n}}function Ef(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function Ff(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function Af(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function Sf(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;return _(1,0),0n}}function Rf(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Df(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;return _(1,0),0n}}function If(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Uf(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Tf(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function xf(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Hf(e,t,r,i,n,o,a,s,c,u,p,w,j,D){var T=l();try{d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D)}catch(F){if(h(T),F!==F+0)throw F;_(1,0)}}function Pf(e,t,r){var i=l();try{d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Bf(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;return _(1,0),0n}}function Mf(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function Lf(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Cf(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Of(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Nf(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Wf(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Gf(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Kf(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function $f(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Xf(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Vf(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function qf(e,t,r){var i=l();try{return d(e)(t,r)}catch(n){if(h(i),n!==n+0)throw n;_(1,0)}}function Jf(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function zf(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Yf(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Qf(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Zf(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function eh(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function th(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function rh(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function ih(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function nh(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function oh(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function ah(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function sh(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function ch(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function uh(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function fh(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function hh(e,t,r,i,n){var o=l();try{d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function lh(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function _h(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function dh(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function vh(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function ph(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function bh(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;return _(1,0),0n}}function wh(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function yh(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function gh(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function mh(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function kh(e,t,r,i,n,o,a,s,c,u,p){var w=l();try{d(e)(t,r,i,n,o,a,s,c,u,p)}catch(j){if(h(w),j!==j+0)throw j;_(1,0)}}function jh(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Eh(e,t,r,i,n,o,a,s,c,u){var p=l();try{d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function Fh(e,t,r,i){var n=l();try{return d(e)(t,r,i)}catch(o){if(h(n),o!==o+0)throw o;_(1,0)}}function Ah(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Sh(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Rh(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Dh(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Ih(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$,ie,q){var ue=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F,$,ie,q)}catch(le){if(h(ue),le!==le+0)throw le;_(1,0)}}function Uh(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Th(e,t,r,i,n,o,a,s,c){var u=l();try{d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function xh(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;_(1,0)}}function Hh(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Ph(e){var t=l();try{return d(e)()}catch(r){if(h(t),r!==r+0)throw r;_(1,0)}}function Bh(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Mh(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Lh(e,t,r,i,n,o,a){var s=l();try{d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Ch(e,t,r,i,n,o){var a=l();try{return d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Oh(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Nh(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Wh(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Gh(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Kh(e,t,r,i,n,o,a,s,c,u){var p=l();try{return d(e)(t,r,i,n,o,a,s,c,u)}catch(w){if(h(p),w!==w+0)throw w;_(1,0)}}function $h(e,t,r,i,n,o,a,s,c){var u=l();try{return d(e)(t,r,i,n,o,a,s,c)}catch(p){if(h(u),p!==p+0)throw p;_(1,0)}}function Xh(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;_(1,0)}}function Vh(e,t,r,i,n,o,a,s,c,u,p,w,j,D,T,F){var $=l();try{return d(e)(t,r,i,n,o,a,s,c,u,p,w,j,D,T,F)}catch(ie){if(h($),ie!==ie+0)throw ie;_(1,0)}}function qh(e,t,r,i,n){var o=l();try{return d(e)(t,r,i,n)}catch(a){if(h(o),a!==a+0)throw a;return _(1,0),0n}}function Jh(e,t,r,i,n,o,a,s){var c=l();try{return d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;return _(1,0),0n}}function zh(e,t,r,i,n,o,a){var s=l();try{return d(e)(t,r,i,n,o,a)}catch(c){if(h(s),c!==c+0)throw c;return _(1,0),0n}}function Yh(e,t,r,i,n,o){var a=l();try{d(e)(t,r,i,n,o)}catch(s){if(h(a),s!==s+0)throw s;_(1,0)}}function Qh(e,t,r,i,n,o,a,s){var c=l();try{d(e)(t,r,i,n,o,a,s)}catch(u){if(h(c),u!==u+0)throw u;_(1,0)}}function Zh(e){e=Object.assign({},e);var t=n=>o=>n(o)>>>0,r=n=>(o,a)=>n(o,a)>>>0,i=n=>()=>n()>>>0;return e.Si=t(e.Si),e.Ui=r(e.Ui),e.Zi=t(e.Zi),e._i=i(e._i),e.cj=t(e.cj),e}v.stackSave=l,v.stackRestore=h,v.stackAlloc=qe,v.getTempRet0=Fn,v.setTempRet0=Ce,v.ccall=En;function el(){var e=Sn,t=0,r=0;try{var i=e(t,r);return Ct(i,!0),i}catch(n){return gn(n)}}function ht(){if(Re>0){Me=ht;return}if(Te(),Re>0){Me=ht;return}function e(){var r;if(v.calledRun=!0,!U){_r(),m(v),(r=v.onRuntimeInitialized)==null||r.call(v);var t=v.noInitialRun;t||el(),dr()}}v.setStatus?(v.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>v.setStatus(""),1),e()},1)):e()}if(v.preInit)for(typeof v.preInit=="function"&&(v.preInit=[v.preInit]);v.preInit.length>0;)v.preInit.pop()();return ht(),g=A,g}})();typeof rr=="object"&&typeof tt=="object"?(tt.exports=pt,tt.exports.default=pt):typeof define=="function"&&define.amd&&define([],()=>pt)});var or=He(()=>{});var ar=He(()=>{});var sr=He((M_,nt)=>{(function(){"use strict";var y="input is invalid type",f=typeof window=="object",b=f?window:{};b.JS_SHA256_NO_WINDOW&&(f=!1);var g=!f&&typeof self=="object",v=!b.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node&&process.type!="renderer";v?b=global:g&&(b=self);var m=!b.JS_SHA256_NO_COMMON_JS&&typeof nt=="object"&&nt.exports,E=typeof define=="function"&&define.amd,A=!b.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",k="0123456789abcdef".split(""),X=[-2147483648,8388608,32768,128],S=[24,16,8,0],V=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],ne=["hex","array","digest","arrayBuffer"],B=[];(b.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),A&&(b.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(R){return typeof R=="object"&&R.buffer&&R.buffer.constructor===ArrayBuffer});var K=function(R,H){return function(C){return new Z(H,!0).update(C)[R]()}},Q=function(R){var H=K("hex",R);v&&(H=oe(H,R)),H.create=function(){return new Z(R)},H.update=function(M){return H.create().update(M)};for(var C=0;C<ne.length;++C){var U=ne[C];H[U]=K(U,R)}return H},oe=function(R,H){var C=or(),U=ar().Buffer,M=H?"sha224":"sha256",x;U.from&&!b.JS_SHA256_NO_BUFFER_FROM?x=U.from:x=function(I){return new U(I)};var O=function(I){if(typeof I=="string")return C.createHash(M).update(I,"utf8").digest("hex");if(I==null)throw new Error(y);return I.constructor===ArrayBuffer&&(I=new Uint8Array(I)),Array.isArray(I)||ArrayBuffer.isView(I)||I.constructor===U?C.createHash(M).update(x(I)).digest("hex"):R(I)};return O},se=function(R,H){return function(C,U){return new fe(C,H,!0).update(U)[R]()}},ee=function(R){var H=se("hex",R);H.create=function(M){return new fe(M,R)},H.update=function(M,x){return H.create(M).update(x)};for(var C=0;C<ne.length;++C){var U=ne[C];H[U]=se(U,R)}return H};function Z(R,H){H?(B[0]=B[16]=B[1]=B[2]=B[3]=B[4]=B[5]=B[6]=B[7]=B[8]=B[9]=B[10]=B[11]=B[12]=B[13]=B[14]=B[15]=0,this.blocks=B):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],R?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=R}Z.prototype.update=function(R){if(!this.finalized){var H,C=typeof R;if(C!=="string"){if(C==="object"){if(R===null)throw new Error(y);if(A&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!A||!ArrayBuffer.isView(R)))throw new Error(y)}else throw new Error(y);H=!0}for(var U,M=0,x,O=R.length,I=this.blocks;M<O;){if(this.hashed&&(this.hashed=!1,I[0]=this.block,this.block=I[16]=I[1]=I[2]=I[3]=I[4]=I[5]=I[6]=I[7]=I[8]=I[9]=I[10]=I[11]=I[12]=I[13]=I[14]=I[15]=0),H)for(x=this.start;M<O&&x<64;++M)I[x>>>2]|=R[M]<<S[x++&3];else for(x=this.start;M<O&&x<64;++M)U=R.charCodeAt(M),U<128?I[x>>>2]|=U<<S[x++&3]:U<2048?(I[x>>>2]|=(192|U>>>6)<<S[x++&3],I[x>>>2]|=(128|U&63)<<S[x++&3]):U<55296||U>=57344?(I[x>>>2]|=(224|U>>>12)<<S[x++&3],I[x>>>2]|=(128|U>>>6&63)<<S[x++&3],I[x>>>2]|=(128|U&63)<<S[x++&3]):(U=65536+((U&1023)<<10|R.charCodeAt(++M)&1023),I[x>>>2]|=(240|U>>>18)<<S[x++&3],I[x>>>2]|=(128|U>>>12&63)<<S[x++&3],I[x>>>2]|=(128|U>>>6&63)<<S[x++&3],I[x>>>2]|=(128|U&63)<<S[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=I[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Z.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var R=this.blocks,H=this.lastByteIndex;R[16]=this.block,R[H>>>2]|=X[H&3],this.block=R[16],H>=56&&(this.hashed||this.hash(),R[0]=this.block,R[16]=R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=0),R[14]=this.hBytes<<3|this.bytes>>>29,R[15]=this.bytes<<3,this.hash()}},Z.prototype.hash=function(){var R=this.h0,H=this.h1,C=this.h2,U=this.h3,M=this.h4,x=this.h5,O=this.h6,I=this.h7,N=this.blocks,W,P,z,ye,Y,ge,de,Se,Ie,Ue,Te;for(W=16;W<64;++W)Y=N[W-15],P=(Y>>>7|Y<<25)^(Y>>>18|Y<<14)^Y>>>3,Y=N[W-2],z=(Y>>>17|Y<<15)^(Y>>>19|Y<<13)^Y>>>10,N[W]=N[W-16]+P+N[W-7]+z<<0;for(Te=H&C,W=0;W<64;W+=4)this.first?(this.is224?(Se=300032,Y=N[0]-1413257819,I=Y-150054599<<0,U=Y+24177077<<0):(Se=704751109,Y=N[0]-210244248,I=Y-1521486534<<0,U=Y+143694565<<0),this.first=!1):(P=(R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10),z=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7),Se=R&H,ye=Se^R&C^Te,de=M&x^~M&O,Y=I+z+de+V[W]+N[W],ge=P+ye,I=U+Y<<0,U=Y+ge<<0),P=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),z=(I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25|I<<7),Ie=U&R,ye=Ie^U&H^Se,de=I&M^~I&x,Y=O+z+de+V[W+1]+N[W+1],ge=P+ye,O=C+Y<<0,C=Y+ge<<0,P=(C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10),z=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),Ue=C&U,ye=Ue^C&R^Ie,de=O&I^~O&M,Y=x+z+de+V[W+2]+N[W+2],ge=P+ye,x=H+Y<<0,H=Y+ge<<0,P=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),z=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),Te=H&C,ye=Te^H&U^Ue,de=x&O^~x&I,Y=M+z+de+V[W+3]+N[W+3],ge=P+ye,M=R+Y<<0,R=Y+ge<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+R<<0,this.h1=this.h1+H<<0,this.h2=this.h2+C<<0,this.h3=this.h3+U<<0,this.h4=this.h4+M<<0,this.h5=this.h5+x<<0,this.h6=this.h6+O<<0,this.h7=this.h7+I<<0},Z.prototype.hex=function(){this.finalize();var R=this.h0,H=this.h1,C=this.h2,U=this.h3,M=this.h4,x=this.h5,O=this.h6,I=this.h7,N=k[R>>>28&15]+k[R>>>24&15]+k[R>>>20&15]+k[R>>>16&15]+k[R>>>12&15]+k[R>>>8&15]+k[R>>>4&15]+k[R&15]+k[H>>>28&15]+k[H>>>24&15]+k[H>>>20&15]+k[H>>>16&15]+k[H>>>12&15]+k[H>>>8&15]+k[H>>>4&15]+k[H&15]+k[C>>>28&15]+k[C>>>24&15]+k[C>>>20&15]+k[C>>>16&15]+k[C>>>12&15]+k[C>>>8&15]+k[C>>>4&15]+k[C&15]+k[U>>>28&15]+k[U>>>24&15]+k[U>>>20&15]+k[U>>>16&15]+k[U>>>12&15]+k[U>>>8&15]+k[U>>>4&15]+k[U&15]+k[M>>>28&15]+k[M>>>24&15]+k[M>>>20&15]+k[M>>>16&15]+k[M>>>12&15]+k[M>>>8&15]+k[M>>>4&15]+k[M&15]+k[x>>>28&15]+k[x>>>24&15]+k[x>>>20&15]+k[x>>>16&15]+k[x>>>12&15]+k[x>>>8&15]+k[x>>>4&15]+k[x&15]+k[O>>>28&15]+k[O>>>24&15]+k[O>>>20&15]+k[O>>>16&15]+k[O>>>12&15]+k[O>>>8&15]+k[O>>>4&15]+k[O&15];return this.is224||(N+=k[I>>>28&15]+k[I>>>24&15]+k[I>>>20&15]+k[I>>>16&15]+k[I>>>12&15]+k[I>>>8&15]+k[I>>>4&15]+k[I&15]),N},Z.prototype.toString=Z.prototype.hex,Z.prototype.digest=function(){this.finalize();var R=this.h0,H=this.h1,C=this.h2,U=this.h3,M=this.h4,x=this.h5,O=this.h6,I=this.h7,N=[R>>>24&255,R>>>16&255,R>>>8&255,R&255,H>>>24&255,H>>>16&255,H>>>8&255,H&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,O>>>24&255,O>>>16&255,O>>>8&255,O&255];return this.is224||N.push(I>>>24&255,I>>>16&255,I>>>8&255,I&255),N},Z.prototype.array=Z.prototype.digest,Z.prototype.arrayBuffer=function(){this.finalize();var R=new ArrayBuffer(this.is224?28:32),H=new DataView(R);return H.setUint32(0,this.h0),H.setUint32(4,this.h1),H.setUint32(8,this.h2),H.setUint32(12,this.h3),H.setUint32(16,this.h4),H.setUint32(20,this.h5),H.setUint32(24,this.h6),this.is224||H.setUint32(28,this.h7),R};function fe(R,H,C){var U,M=typeof R;if(M==="string"){var x=[],O=R.length,I=0,N;for(U=0;U<O;++U)N=R.charCodeAt(U),N<128?x[I++]=N:N<2048?(x[I++]=192|N>>>6,x[I++]=128|N&63):N<55296||N>=57344?(x[I++]=224|N>>>12,x[I++]=128|N>>>6&63,x[I++]=128|N&63):(N=65536+((N&1023)<<10|R.charCodeAt(++U)&1023),x[I++]=240|N>>>18,x[I++]=128|N>>>12&63,x[I++]=128|N>>>6&63,x[I++]=128|N&63);R=x}else if(M==="object"){if(R===null)throw new Error(y);if(A&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!A||!ArrayBuffer.isView(R)))throw new Error(y)}else throw new Error(y);R.length>64&&(R=new Z(H,!0).update(R).array());var W=[],P=[];for(U=0;U<64;++U){var z=R[U]||0;W[U]=92^z,P[U]=54^z}Z.call(this,H,C),this.update(P),this.oKeyPad=W,this.inner=!0,this.sharedMemory=C}fe.prototype=new Z,fe.prototype.finalize=function(){if(Z.prototype.finalize.call(this),this.inner){this.inner=!1;var R=this.array();Z.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(R),Z.prototype.finalize.call(this)}};var ce=Q();ce.sha256=ce,ce.sha224=Q(!0),ce.sha256.hmac=ee(),ce.sha224.hmac=ee(!0),m?nt.exports=ce:(b.sha256=ce.sha256,b.sha224=ce.sha224,E&&define(function(){return ce}))})()});var wl={};sl(wl,{registerWorker:()=>lr});var Je=class{constructor(f,b){this._bindings=f,this._conn=b}close(){this._bindings.disconnect(this._conn)}useUnsafe(f){return f(this._bindings,this._conn)}query(f){return this._bindings.runQuery(this._conn,f)}async send(f,b=!1){let g=this._bindings.startPendingQuery(this._conn,f,b);for(;g==null;)g=await new Promise((v,m)=>{try{v(this._bindings.pollPendingQuery(this._conn))}catch(E){console.log(E),E.message.includes("worker is not set!")?m(new Error("Worker has been terminated")):m(E)}});return new ze(this._bindings,this._conn,g)}cancelSent(){return this._bindings.cancelPendingQuery(this._conn)}getTableNames(f){return this._bindings.getTableNames(this._conn,f)}prepare(f){let b=this._bindings.createPrepared(this._conn,f);return new lt(this._bindings,this._conn,b)}insertArrowFromIPCStream(f,b){this._bindings.insertArrowFromIPCStream(this._conn,f,b)}insertCSVFromPath(f,b){this._bindings.insertCSVFromPath(this._conn,f,b)}insertJSONFromPath(f,b){this._bindings.insertJSONFromPath(this._conn,f,b)}},ze=class{constructor(f,b,g){this.bindings=f;this.conn=b;this.header=g;this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let f=null;do f=this.bindings.fetchQueryResults(this.conn);while(f==null);return this._depleted=f.length==0,{done:this._depleted,value:f}}[Symbol.iterator](){return this}},lt=class{constructor(f,b,g){this.bindings=f,this.connectionId=b,this.statementId=g}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...f){return this.bindings.runPrepared(this.connectionId,this.statementId,f)}send(...f){let b=this.bindings.sendPrepared(this.connectionId,this.statementId,f);return new ze(this.bindings,this.connectionId,b)}};function qt(y){return y<=255}function Jt(y){return y===256}var Qt=new TextEncoder,zt=new TextDecoder("utf-8");function _t(y,f,b){let g=Qt.encode(b),v=y._malloc(g.byteLength),m=y.HEAPU8.subarray(v,v+g.byteLength);m.set(g),y.HEAPF64[(f>>3)+0]=1,y.HEAPF64[(f>>3)+1]=v,y.HEAPF64[(f>>3)+2]=m.byteLength}function vt(y){switch(y){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function dt(y,f,b,g){let v=y.HEAPU8.subarray(f,f+g*vt(b));switch(b){case"UINT8":return new Uint8Array(v.buffer,v.byteOffset,g);case"INT8":return new Int8Array(v.buffer,v.byteOffset,g);case"INT32":return new Int32Array(v.buffer,v.byteOffset,g);case"FLOAT":return new Float32Array(v.buffer,v.byteOffset,g);case"DOUBLE":return new Float64Array(v.buffer,v.byteOffset,g);case"VARCHAR":return new Float64Array(v.buffer,v.byteOffset,g);default:return new Array(0)}}function Yt(y,f,b){let g=y.HEAPU8.subarray(f,f+b);return new Uint8Array(g.buffer,g.byteOffset,b)}function Ye(y,f,b){let g=y.HEAPU8.subarray(f,f+b*8);return new Float64Array(g.buffer,g.byteOffset,b)}function Zt(y,f,b,g,v,m,E,A){try{let k=y._udfFunctions.get(g);if(!k){_t(f,b,"Unknown UDF with id: "+g);return}let X=zt.decode(f.HEAPU8.subarray(v,v+m)),S=JSON.parse(X),V=Ye(f,E,A/8),ne=U=>{var x;let M=null;switch(U.validityBuffer!==void 0&&(M=Yt(f,V[U.validityBuffer],S.rows)),U.physicalType){case"VARCHAR":{if(U.dataBuffer===null||U.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for VARCHAR argument");if(U.lengthBuffer===null||U.lengthBuffer===void 0)throw new Error("malformed data view, expected data length buffer for VARCHAR argument");let O=dt(f,V[U.dataBuffer],U.physicalType,S.rows),I=[],N=Ye(f,V[U.lengthBuffer],S.rows);for(let W=0;W<S.rows;++W){if(M!=null&&!M[W]){I.push(null);continue}let P=f.HEAPU8.subarray(O[W],O[W]+N[W]),z=zt.decode(P);I.push(z)}return W=>I[W]}case"STRUCT":{let O={},I=[];for(let N=0;N<(((x=U.children)==null?void 0:x.length)||0);++N){let W=U.children[N],P=ne(W);I.push(z=>{O[W.name]=P(z)})}return M!=null?N=>{if(!M[N])return null;for(let W of I)W(N);return O}:N=>{for(let W of I)W(N);return O}}default:{if(U.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for argument of type: "+U.physicalType);let O=dt(f,V[U.dataBuffer],U.physicalType,S.rows);return M!=null?I=>M[I]?O[I]:null:I=>O[I]}}},B=[];for(let U=0;U<S.args.length;++U)B.push(ne(S.args[U]));let K=S.rows*vt(S.ret.physicalType),Q=f._malloc(K),oe=dt(f,Q,S.ret.physicalType,S.rows),se=f._malloc(S.rows),ee=Yt(f,se,S.rows);if(oe.length==0||ee.length==0){_t(f,b,"Can't create physical arrays for result");return}let Z=oe;S.ret.physicalType=="VARCHAR"&&(Z=new Array(S.rows));let fe=[];for(let U=0;U<S.args.length;++U)fe.push(null);for(let U=0;U<S.rows;++U){for(let x=0;x<S.args.length;++x)fe[x]=B[x](U);let M=k.func(...fe);Z[U]=M,ee[U]=M==null?0:1}let ce=0;switch(S.ret.physicalType){case"VARCHAR":{let U=new Array(0);ce=f._malloc(S.rows*vt("DOUBLE"));let M=Ye(f,ce,S.rows),x=0;for(let W=0;W<S.rows;++W){let P=Qt.encode(Z[W]||"");U.push(P),M[W]=P.length,x+=P.length}let O=f._malloc(x),I=f.HEAPU8.subarray(O,O+x),N=0;for(let W=0;W<S.rows;++W){oe[W]=N;let P=U[W];I.subarray(N,N+P.length).set(P),N+=P.length}}}let R=3*8,H=f._malloc(R),C=Ye(f,H,3);C[0]=Q,C[1]=se,C[2]=ce,f.HEAPF64[(b>>3)+0]=0,f.HEAPF64[(b>>3)+1]=H,f.HEAPF64[(b>>3)+2]=0}catch(k){_t(f,b,k.toString())}}function fl(){let y=new TextDecoder;return f=>(typeof SharedArrayBuffer<"u"&&f.buffer instanceof SharedArrayBuffer&&(f=new Uint8Array(f)),y.decode(f))}var hl=fl();function pe(y,f){console.error(`FAIL WITH: ${f}`),y.ccall("duckdb_web_fail_with",null,["string"],[f])}function Pe(y){let f=y.wasmMemory;if(f&&f.buffer!==y.HEAPU8.buffer){let b=f.buffer;y.HEAPU8=new Uint8Array(b),y.HEAPF64=new Float64Array(b)}}function De(y,f,b){Pe(y);let g=new Uint8Array(y.HEAPU8.buffer,f,b),v=new Uint8Array(new ArrayBuffer(g.byteLength));return v.set(g),v}function J(y,f,b){return Pe(y),hl(new Uint8Array(y.HEAPU8.buffer,f,b))}function te(y,f,b,g){let v=y.stackSave(),m=y.stackAlloc(3*8);b.unshift("number"),g.unshift(m),y.ccall(f,null,b,g),Pe(y);let E=y.HEAPF64[(m>>3)+0],A=y.HEAPF64[(m>>3)+1],k=y.HEAPF64[(m>>3)+2];return y.stackRestore(v),[E,A,k]}function ae(y){y.ccall("duckdb_web_clear_response",null,[],[])}var Qe=class{constructor(f){let b=new Float64Array(f.buffer,f.byteOffset,f.byteLength/8),g=new Uint8Array(new ArrayBuffer(f.byteLength));g.set(f.subarray(7*8)),this.totalFileReadsCold=b[0],this.totalFileReadsAhead=b[1],this.totalFileReadsCached=b[2],this.totalFileWrites=b[3],this.totalPageAccesses=b[4],this.totalPageLoads=b[5],this.blockSize=b[6],this.blockStats=g}getBlockStats(f,b){return b=b||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},b.file_writes=this.blockStats[f*3+0]&15,b.file_reads_cold=this.blockStats[f*3+0]>>4,b.file_reads_ahead=this.blockStats[f*3+1]&15,b.file_reads_cached=this.blockStats[f*3+1]>>4,b.page_accesses=this.blockStats[f*3+1]&15,b.page_loads=this.blockStats[f*3+1]>>4,b}};var Be=new TextEncoder;function he(y){return y!==0}var Ze=class{constructor(f,b){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=f,this._runtime=b,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(f=b=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(f),await this._initPromise),this._initPromise=new Promise(b=>{this._initPromiseResolver=b}),this.onInstantiationProgress=[f],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(b=>b!=f),globalThis.DUCKDB_BINDINGS=this,this)}open(f){let[b,g,v]=te(this.mod,"duckdb_web_open",["string"],[JSON.stringify(f)]);if(b!==0)throw new Error(J(this.mod,g,v));ae(this.mod)}reset(){let[f,b,g]=te(this.mod,"duckdb_web_reset",[],[]);if(f!==0)throw new Error(J(this.mod,b,g));ae(this.mod)}getVersion(){let[f,b,g]=te(this.mod,"duckdb_web_get_version",[],[]);if(f!==0)throw new Error(J(this.mod,b,g));let v=J(this.mod,b,g);return ae(this.mod),v}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(f){let b=Be.encode(f),g=this.mod._malloc(b.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,g,b.length).set(b);let[m,E,A]=te(this.mod,"duckdb_web_tokenize_buffer",["number","number"],[g,b.length]);if(this.mod._free(g),m!==0)throw new Error(J(this.mod,E,A));let k=J(this.mod,E,A);return ae(this.mod),JSON.parse(k)}connect(){let f=this.mod.ccall("duckdb_web_connect","number",[],[]);return new Je(this,f)}disconnect(f){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[f]),this.pthread)for(let b of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])b.postMessage({cmd:"dropUDFFunctions",connectionId:f})}runQuery(f,b){let g=Be.encode(b),v=this.mod._malloc(g.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,v,g.length).set(g);let[E,A,k]=te(this.mod,"duckdb_web_query_run_buffer",["number","number","number"],[f,v,g.length]);if(this.mod._free(v),E!==0)throw new Error(J(this.mod,A,k));let X=De(this.mod,A,k);return ae(this.mod),X}startPendingQuery(f,b,g=!1){let v=Be.encode(b),m=this.mod._malloc(v.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,m,v.length).set(v);let[A,k,X]=te(this.mod,"duckdb_web_pending_query_start_buffer",["number","number","number","boolean"],[f,m,v.length,g]);if(this.mod._free(m),A!==0)throw new Error(J(this.mod,k,X));if(k==0)return null;let S=De(this.mod,k,X);return ae(this.mod),S}pollPendingQuery(f){let[b,g,v]=te(this.mod,"duckdb_web_pending_query_poll",["number"],[f]);if(b!==0)throw new Error(J(this.mod,g,v));if(g==0)return null;let m=De(this.mod,g,v);return ae(this.mod),m}cancelPendingQuery(f){return this.mod.ccall("duckdb_web_pending_query_cancel","boolean",["number"],[f])}fetchQueryResults(f){let[b,g,v]=te(this.mod,"duckdb_web_query_fetch_results",["number"],[f]);if(Jt(b))return ae(this.mod),null;if(!qt(b))throw new Error("Unexpected StatusCode from duckdb_web_query_fetch_results ("+b+") and with self reported error as"+J(this.mod,g,v));if(b!==0)throw new Error(J(this.mod,g,v));let m=De(this.mod,g,v);return ae(this.mod),m}getTableNames(f,b){let g=Be.encode(b),v=this.mod._malloc(g.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,v,g.length).set(g);let[E,A,k]=te(this.mod,"duckdb_web_get_tablenames_buffer",["number","number","number"],[f,v,g.length]);if(this.mod._free(v),E!==0)throw new Error(J(this.mod,A,k));let X=J(this.mod,A,k);return ae(this.mod),JSON.parse(X)}createPrepared(f,b){let g=Be.encode(b),v=this.mod._malloc(g.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,v,g.length).set(g);let[E,A,k]=te(this.mod,"duckdb_web_prepared_create_buffer",["number","number","number"],[f,v,g.length]);if(this.mod._free(v),he(E))throw new Error(J(this.mod,A,k));return ae(this.mod),A}closePrepared(f,b){let[g,v,m]=te(this.mod,"duckdb_web_prepared_close",["number","number"],[f,b]);if(he(g))throw new Error(J(this.mod,v,m));ae(this.mod)}runPrepared(f,b,g){let[v,m,E]=te(this.mod,"duckdb_web_prepared_run",["number","number","string"],[f,b,JSON.stringify(g)]);if(he(v))throw new Error(J(this.mod,m,E));let A=De(this.mod,m,E);return ae(this.mod),A}sendPrepared(f,b,g){let[v,m,E]=te(this.mod,"duckdb_web_prepared_send",["number","number","string"],[f,b,JSON.stringify(g)]);if(he(v))throw new Error(J(this.mod,m,E));let A=De(this.mod,m,E);return ae(this.mod),A}insertArrowFromIPCStream(f,b,g){if(b.length==0)return;let v=this.mod._malloc(b.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,v,b.length).set(b);let E=g?JSON.stringify(g):"",[A,k,X]=te(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[f,v,b.length,E]);if(this.mod._free(v),A!==0)throw new Error(J(this.mod,k,X))}insertCSVFromPath(f,b,g){let v=JSON.stringify(g),[m,E,A]=te(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[f,b,v]);if(he(m))throw new Error(J(this.mod,E,A))}insertJSONFromPath(f,b,g){let v=JSON.stringify(g),[m,E,A]=te(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[f,b,v]);if(he(m))throw new Error(J(this.mod,E,A))}globFiles(f){let[b,g,v]=te(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[f]);if(he(b))throw new Error(J(this.mod,g,v));let m=J(this.mod,g,v);ae(this.mod);let E=JSON.parse(m);return E==null?[]:E}registerFileURL(f,b,g,v=!1){b===void 0&&(b=f);let[m,E,A]=te(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[f,b,g,v]);if(he(m))throw new Error(J(this.mod,E,A));ae(this.mod)}registerFileText(f,b){let g=Be.encode(b);this.registerFileBuffer(f,g)}registerFileBuffer(f,b){let g=this.mod._malloc(b.length)>>>0;new Uint8Array(this.mod.HEAPU8.buffer,g,b.length).set(b);let[m,E,A]=te(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[f,g,b.length]);if(he(m))throw new Error(J(this.mod,E,A));ae(this.mod)}async prepareFileHandle(f,b){if(b===3&&this._runtime.prepareFileHandles){let g=await this._runtime.prepareFileHandles([f],3);for(let v of g){let{handle:m,path:E,fromCached:A}=v;!A&&m.getSize()&&await this.registerFileHandleAsync(E,m,3,!0)}return}throw new Error(`prepareFileHandle: unsupported protocol ${b}`)}async prepareDBFileHandle(f,b){if(b===3&&this._runtime.prepareDBFileHandle){let g=await this._runtime.prepareDBFileHandle(f,3);for(let v of g){let{handle:m,path:E,fromCached:A}=v;!A&&m.getSize()&&await this.registerFileHandleAsync(E,m,3,!0)}return}throw new Error(`prepareDBFileHandle: unsupported protocol ${b}`)}async prepareFileHandleAsync(f,b,g,v){if(g===3&&!(b instanceof FileSystemSyncAccessHandle)){if(b instanceof FileSystemFileHandle){let m=b;try{b=await m.createSyncAccessHandle()}catch(E){throw new Error(E.message+":"+f)}}else if(f!=null)try{b=await(await(await navigator.storage.getDirectory()).getFileHandle(f)).createSyncAccessHandle()}catch(m){throw new Error(m.message+":"+f)}}return b}async registerFileHandleAsync(f,b,g,v){let m=await this.prepareFileHandleAsync(f,b,g,v);this.registerFileHandle(f,m,g,v)}registerFileHandle(f,b,g,v){var k;let[m,E,A]=te(this.mod,"duckdb_web_fs_register_file_url",["string","string","number","boolean"],[f,f,g,v]);if(he(m))throw new Error(J(this.mod,E,A));if(ae(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(f,b),(k=globalThis.DUCKDB_RUNTIME._preparedHandles)!=null&&k[f]&&delete globalThis.DUCKDB_RUNTIME._preparedHandles[f],this.pthread){for(let X of this.pthread.runningWorkers)X.postMessage({cmd:"registerFileHandle",fileName:f,fileHandle:b});for(let X of this.pthread.unusedWorkers)X.postMessage({cmd:"dropFileHandle",fileName:f})}}dropFile(f){let[b,g,v]=te(this.mod,"duckdb_web_fs_drop_file",["string"],[f]);if(he(b))throw new Error(J(this.mod,g,v));ae(this.mod)}dropFiles(f){let b=[],g=-1;try{for(let A of f!=null?f:[])if(A!=null&&A.length>0){let k=this.mod.lengthBytesUTF8(A)+1,X=this.mod._malloc(k)>>>0;if(!X)throw new Error(`Failed to allocate memory for string: ${A}`);this.mod.stringToUTF8(A,X,k),b.push(X)}if(g=this.mod._malloc(b.length*4)>>>0,!g)throw new Error("Failed to allocate memory for pointers array");for(let A=0;A<b.length;A++)this.mod.HEAP32[(g>>2)+A]=b[A];let[v,m,E]=te(this.mod,"duckdb_web_fs_drop_files",["number","number"],[g,b.length]);if(v!==0)throw new Error(J(this.mod,m,E));ae(this.mod)}finally{for(let v of b)this.mod._free(v);g>0&&this.mod._free(g)}}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(f,b){let[g,v,m]=te(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[f,b]);if(he(g))throw new Error(J(this.mod,v,m));ae(this.mod)}copyFileToBuffer(f){let[b,g,v]=te(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[f]);if(he(b))throw new Error(J(this.mod,g,v));Pe(this.mod);let m=new Uint8Array(this.mod.HEAPU8.buffer,g,v),E=new Uint8Array(m.length);return E.set(m),ae(this.mod),E}async registerOPFSFileName(f){if(f.startsWith("opfs://"))return this.prepareFileHandle(f,3);throw new Error("Not an OPFS file name: "+f)}collectFileStatistics(f,b){let[g,v,m]=te(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[f,b]);if(he(g))throw new Error(J(this.mod,v,m))}exportFileStatistics(f){let[b,g,v]=te(this.mod,"duckdb_web_export_file_stats",["string"],[f]);if(he(b))throw new Error(J(this.mod,g,v));return Pe(this.mod),new Qe(new Uint8Array(this.mod.HEAPU8.buffer,g,v))}};var et=class{constructor(){this._bindings=null;this._nextMessageId=0}log(f){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:f},[])}sendOK(f){this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"OK",data:null},[])}failWith(f,b){let g={name:b.name,message:b.message,stack:b.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"ERROR",data:g},[])}async onMessage(f){switch(f.type){case"PING":this.sendOK(f);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(f,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(f.data[0],f.data[1],b=>{this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"INSTANTIATE_PROGRESS",data:b},[])}),this.sendOK(f)}catch(b){console.log(b),this._bindings=null,this.failWith(f,b)}return;default:break}if(!this._bindings)return this.failWith(f,new Error("duckdb is not initialized"));try{switch(f.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(f);break;case"OPEN":{let b=f.data.path,g=!!(this._bindings.getFeatureFlags()&2);if(b!=null&&b.startsWith("opfs://")&&!g){let v=globalThis.DUCKDB_RUNTIME;v!=null&&v.prepareDBFileHandle&&await v.prepareDBFileHandle(b,3),f.data.useDirectIO=!0}this._bindings.open(f.data),this.sendOK(f);break}case"DROP_FILE":this._bindings.dropFile(f.data),this.sendOK(f);break;case"DROP_FILES":this._bindings.dropFiles(f.data),this.sendOK(f);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(f);break;case"CONNECT":{let b=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"CONNECTION_INFO",data:b.useUnsafe((g,v)=>v)},[]);break}case"DISCONNECT":this._bindings.disconnect(f.data),this.sendOK(f);break;case"CREATE_PREPARED":{let b=this._bindings.createPrepared(f.data[0],f.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"PREPARED_STATEMENT_ID",data:b},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(f.data[0],f.data[1]),this.sendOK(f);break}case"RUN_PREPARED":{let b=this._bindings.runPrepared(f.data[0],f.data[1],f.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT",data:b},[b.buffer]);break}case"RUN_QUERY":{let b=this._bindings.runQuery(f.data[0],f.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT",data:b},[b.buffer]);break}case"SEND_PREPARED":{let b=this._bindings.sendPrepared(f.data[0],f.data[1],f.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_HEADER",data:b},[b.buffer]);break}case"START_PENDING_QUERY":{let b=this._bindings.startPendingQuery(f.data[0],f.data[1],f.data[2]),g=[];b&&g.push(b.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:b},g);break}case"POLL_PENDING_QUERY":{let b=this._bindings.pollPendingQuery(f.data),g=[];b&&g.push(b.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:b},g);break}case"CANCEL_PENDING_QUERY":{let b=this._bindings.cancelPendingQuery(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"SUCCESS",data:b},[]);break}case"FETCH_QUERY_RESULTS":{let b=this._bindings.fetchQueryResults(f.data),g=b?[b.buffer]:[];this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"QUERY_RESULT_CHUNK",data:b},g);break}case"GET_TABLE_NAMES":{let b=this._bindings.getTableNames(f.data[0],f.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"TABLE_NAMES",data:b},[]);break}case"GLOB_FILE_INFOS":{let b=this._bindings.globFiles(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FILE_INFOS",data:b},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(f.data[0],f.data[1],f.data[2],f.data[3]),this.sendOK(f);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(f.data[0],f.data[1]),this.sendOK(f);break;case"REGISTER_FILE_HANDLE":await this._bindings.registerFileHandleAsync(f.data[0],f.data[1],f.data[2],f.data[3]),this.sendOK(f);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(f.data[0],f.data[1]),this.sendOK(f);break;case"COPY_FILE_TO_BUFFER":{let b=this._bindings.copyFileToBuffer(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FILE_BUFFER",data:b},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(f.data[0],f.data[1]),this.sendOK(f);break;case"REGISTER_OPFS_FILE_NAME":await this._bindings.registerOPFSFileName(f.data[0]),this.sendOK(f);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(f.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(f.data[0],f.data[1],f.data[2]),this.sendOK(f);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(f.data[0],f.data[1],f.data[2]),this.sendOK(f);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(f.data[0],f.data[1],f.data[2]),this.sendOK(f);break}case"TOKENIZE":{let b=this._bindings.tokenize(f.data);this.postMessage({messageId:this._nextMessageId++,requestId:f.messageId,type:"SCRIPT_TOKENS",data:b},[]);break}}}catch(b){return console.log(b),this.failWith(f,b)}}};var nr=Xt(ir());var rt=class extends Ze{constructor(f,b,g,v){super(f,b),this.mainModuleURL=g,this.pthreadWorkerURL=v}locateFile(f,b){if(f.endsWith(".wasm"))return this.mainModuleURL;if(f.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error(`WASM instantiation requested unexpected file: prefix=${b} path=${f}`)}instantiateWasm(f,b){globalThis.DUCKDB_RUNTIME=this._runtime;let g=this.onInstantiationProgress;if(WebAssembly.instantiateStreaming)if(typeof TransformStream=="function"){let m=(async()=>{var K;let E=new Request(this.mainModuleURL),A=await fetch(E),k=A.headers.get("content-length"),X=k&&parseInt(k,10)||0,S=new Date,V={startedAt:S,updatedAt:S,bytesTotal:X||0,bytesLoaded:0},ne={transform(Q,oe){V.bytesLoaded+=Q.byteLength;let se=new Date;if(se.getTime()-V.updatedAt.getTime()<20){V.updatedAt=se,oe.enqueue(Q);return}for(let ee of g)ee(V);oe.enqueue(Q)}},B=new TransformStream(ne);return new Response((K=A.body)==null?void 0:K.pipeThrough(B),A)})();WebAssembly.instantiateStreaming(m,f).then(E=>{b(E.instance,E.module)})}else{console.warn("instantiating without progress handler since transform streams are unavailable");let v=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(v),f).then(m=>{b(m.instance,m.module)})}else if(typeof XMLHttpRequest=="function"){let v=new XMLHttpRequest,m=this.mainModuleURL,E=new Date,A={startedAt:E,updatedAt:E,bytesTotal:0,bytesLoaded:0};v.open("GET",m),v.responseType="arraybuffer",v.onerror=k=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+k}),new Error(k.toString())},v.onprogress=k=>{A.bytesTotal=k.total,A.bytesLoaded=k.loaded;let X=new Date;if(X.getTime()-A.updatedAt.getTime()<20){A.updatedAt=X;return}for(let S of g)S(A)},v.onload=()=>{WebAssembly.instantiate(v.response,f).then(k=>{b(k.instance,k.module)}).catch(k=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+k}),new Error(k)})},v.send()}else console.warn("instantiating with manual fetch since streaming instantiation and xhrs are unavailable"),(async()=>{let m=new Request(this.mainModuleURL),A=await(await fetch(m)).arrayBuffer();WebAssembly.instantiate(A,f).then(k=>{b(k.instance,k.module)})})();return{}}};var it=class extends rt{constructor(f,b,g,v=null){super(f,b,g,v)}instantiateImpl(f){return(0,nr.default)({...f,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var Ae=Xt(sr()),cr=function(y,f,b){var g;if((g=y==null?void 0:y.endpoint)!=null&&g.startsWith("http")){let v=`${y==null?void 0:y.endpoint}`,m=v.indexOf("://")+3;return v.substring(m)}else return y!=null&&y.endpoint?`${b}.${y==null?void 0:y.endpoint}`:`${b}.s3.amazonaws.com`};function _l(y,f,b){var m,E,A,k;let g=ur(f),v=g.path;return fr(y)&&(v=`/${g.bucket}${v}`),{url:v,query:"",host:cr(y,f,g.bucket),region:(m=y==null?void 0:y.region)!=null?m:"",service:"s3",method:b,accessKeyId:(E=y==null?void 0:y.accessKeyId)!=null?E:"",secretAccessKey:(A=y==null?void 0:y.secretAccessKey)!=null?A:"",sessionToken:(k=y==null?void 0:y.sessionToken)!=null?k:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function dl(y,f=!1){let b="0123456789ABCDEF",g="";for(let v=0;v<y.length;v++){let m=y[v];m>="A"&&m<="Z"||m>="a"&&m<="z"||m>="0"&&m<="9"||m=="_"||m=="-"||m=="~"||m=="."?g+=m:m=="/"?f?g+="%2F":g+=m:(g+="%",g+=b[m.charCodeAt(0)>>4],g+=b[m.charCodeAt(0)&15])}return g}function vl(y,f=null){var K;let b=(K=f==null?void 0:f.contentHash)!=null?K:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",g=new Map;g.set("x-amz-date",y.datetimeNow),g.set("x-amz-content-sha256",b),y.sessionToken&&g.set("x-amz-security-token",y.sessionToken);let v="";f!=null&&f.contentType&&(v+="content-type;"),v+="host;x-amz-content-sha256;x-amz-date",y.sessionToken&&(v+=";x-amz-security-token");let m=y.method+`
2
+ `+dl(y.url)+`
3
+ `+y.query;f!=null&&f.contentType&&(m+=`
4
+ content-type:`+(f==null?void 0:f.contentType)),m+=`
5
+ host:`+y.host+`
6
+ x-amz-content-sha256:`+b+`
7
+ x-amz-date:`+y.datetimeNow,y.sessionToken&&y.sessionToken.length>0&&(m+=`
8
+ x-amz-security-token:`+y.sessionToken),m+=`
9
9
 
10
- `+d+`
11
- `+p;let T=(0,Ee.sha256)(g),E=`AWS4-HMAC-SHA256
12
- `+b.datetimeNow+`
13
- `+b.dateNow+"/"+b.region+"/"+b.service+`/aws4_request
14
- `+T,m="AWS4"+b.secretAccessKey,$=Ee.sha256.hmac.arrayBuffer(m,b.dateNow),F=Ee.sha256.hmac.arrayBuffer($,b.region),X=Ee.sha256.hmac.arrayBuffer(F,b.service),ie=Ee.sha256.hmac.arrayBuffer(X,"aws4_request"),P=Ee.sha256.hmac(ie,E);return y.set("Authorization","AWS4-HMAC-SHA256 Credential="+b.accessKeyId+"/"+b.dateNow+"/"+b.region+"/"+b.service+"/aws4_request, SignedHeaders="+d+", Signature="+P),y}var f_=function(b,f,p,y=null,d=null){let g=a_(b,f,p),T={contentType:y,contentHash:d?Ee.sha256.hex(d):null};return u_(g,T)};function pe(b,f,p,y,d=null,g=null){(f!=null&&f.accessKeyId||f!=null&&f.sessionToken)&&(f_(f,p,y,d,g).forEach((E,m)=>{b.setRequestHeader(m,E)}),d&&b.setRequestHeader("content-type",d))}function ar(b){if(b.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let f=b.indexOf("/",5);if(f==-1)throw new Error("URL needs to contain a '/' after the host");let p=b.substring(5,f);if(!p)throw new Error("URL needs to contain a bucket name");let y=b.substring(f);if(!y)throw new Error("URL needs to contain key");return{bucket:p,path:y}}function cr(b){var f;return!!((f=b==null?void 0:b.endpoint)!=null&&f.startsWith("http"))}function we(b,f){let p=ar(f);return cr(b)?`${b==null?void 0:b.endpoint}/${p.bucket}`+p.path:"https://"+or(b,f,p.bucket)+p.path}var h_=7,ur=/\/|\\/,W={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,_preparedHandles:{},_opfsRoot:null,getFileInfo(b,f){try{let p=W._fileInfoCache.get(f),[y,d,g]=ee(b,"duckdb_web_fs_get_file_info_by_id",["number","number"],[f,(p==null?void 0:p.cacheEpoch)||0]);if(y!==0)return null;if(g===0)return p;let T=q(b,d,g);se(b);try{let E=JSON.parse(T);if(E==null)return null;let m={...E,blob:null};return W._fileInfoCache.set(f,m),!W._files.has(m.fileName)&&W._preparedHandles[m.fileName]&&(W._files.set(m.fileName,W._preparedHandles[m.fileName]),delete W._preparedHandles[m.fileName]),m}catch(E){return console.warn(E),null}}catch(p){return console.log(p),null}},getGlobalFileInfo(b){var f;try{let[p,y,d]=ee(b,"duckdb_web_get_global_file_info",["number"],[((f=W._globalFileInfo)==null?void 0:f.cacheEpoch)||0]);if(p!==0)return null;if(d===0)return W._globalFileInfo;let g=q(b,y,d);se(b);let T=JSON.parse(g);return T==null?null:(W._globalFileInfo={...T,blob:null},W._globalFileInfo)}catch(p){return console.log(p),null}},async assignOPFSRoot(){W._opfsRoot||(W._opfsRoot=await navigator.storage.getDirectory())},async prepareFileHandles(b,f){if(f===3){await W.assignOPFSRoot();let p=async d=>{if(W._files.has(d))return{path:d,handle:W._files.get(d),fromCached:!0};let T=W._opfsRoot,E=d.slice(h_),m=E;if(ur.test(E)){let F=E.split(ur);if(F.length===0)throw new Error(`Invalid path ${E}`);if(m=F[F.length-1],!m)throw new Error(`Invalid path ${E}. File Not Found.`);F.pop();for(let X of F)T=await T.getDirectoryHandle(X,{create:!0})}let $=await T.getFileHandle(m,{create:!1}).catch(F=>{if((F==null?void 0:F.name)==="NotFoundError")return console.debug(`File ${d} does not exists yet, creating...`),T.getFileHandle(m,{create:!0});throw F});try{let F=await $.createSyncAccessHandle();return W._preparedHandles[d]=F,{path:d,handle:F,fromCached:!1}}catch(F){throw new Error(F.message+":"+name)}},y=[];for(let d of b){let g=await p(d);y.push(g)}return y}throw new Error(`Unsupported protocol ${f} for paths ${b} with protocol ${f}`)},async prepareDBFileHandle(b,f){if(f===3&&this.prepareFileHandles){let p=[b,`${b}.wal`];return this.prepareFileHandles(p,f)}throw new Error(`Unsupported protocol ${f} for path ${b} with protocol ${f}`)},testPlatformFeature:(b,f)=>{switch(f){case 1:return typeof BigInt64Array<"u";default:return console.warn(`test for unknown feature: ${f}`),!1}},getDefaultDataProtocol(b){return 2},openFile:(b,f,p)=>{var y,d,g,T,E,m,$;try{W._fileInfoCache.delete(f);let F=W.getFileInfo(b,f);switch(F==null?void 0:F.dataProtocol){case 4:case 5:{if(p&1&&p&2)throw new Error(`Opening file ${F.fileName} failed: cannot open file with both read and write flags set`);if(p&32)throw new Error(`Opening file ${F.fileName} failed: appending to HTTP/S3 files is not supported`);if(p&2){let P=new XMLHttpRequest;if(F.dataProtocol==5?(P.open("HEAD",we(F.s3Config,F.dataUrl),!1),pe(P,F.s3Config,F.dataUrl,"HEAD")):P.open("HEAD",F.dataUrl,!1),P.send(null),P.status!=200&&P.status!=404)throw new Error(`Opening file ${F.fileName} failed: Unexpected return status from server (${P.status})`);if(P.status==404&&!(p&8||p&16))throw new Error(`Opening file ${F.fileName} failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag.`);let G=b._malloc(1),Y=new Uint8Array;b.HEAPU8.set(Y,G);let ne=b._malloc(3*8);return b.HEAPF64[(ne>>>3)+0]=1,b.HEAPF64[(ne>>>3)+1]=G,b.HEAPF64[(ne>>>3)+2]=new Date().getTime()/1e3,ne}else if((p&1)==0)throw new Error(`Opening file ${F.fileName} failed: unsupported file flags: ${p}`);let X=null,ie=null;if(!F.forceFullHttpReads&&(F.reliableHeadRequests||!F.allowFullHttpReads))try{let P=new XMLHttpRequest;F.dataProtocol==5?(P.open("HEAD",we(F.s3Config,F.dataUrl),!1),pe(P,F.s3Config,F.dataUrl,"HEAD")):P.open("HEAD",F.dataUrl,!1),P.setRequestHeader("Range","bytes=0-"),P.send(null),X=null;try{X=P.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}if(X!==null&&P.status==206){let G=b._malloc(24);b.HEAPF64[(G>>>3)+0]=+X,b.HEAPF64[(G>>>3)+1]=0;let Y=0;try{Y=new Date((y=P.getResponseHeader("Last-Modified"))!=null?y:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return b.HEAPF64[(G>>>3)+2]=+Y,G}}catch(P){ie=P,console.warn(`HEAD request with range header failed: ${P}`)}if(F.allowFullHttpReads){if(!F.forceFullHttpReads){let G=new XMLHttpRequest;F.dataProtocol==5?(G.open("GET",we(F.s3Config,F.dataUrl),!1),pe(G,F.s3Config,F.dataUrl,"GET")):G.open("GET",F.dataUrl,!1),G.responseType="arraybuffer",G.setRequestHeader("Range","bytes=0-0"),G.send(null);let Y=null;try{Y=(d=G.getResponseHeader("Content-Range"))==null?void 0:d.split("/")[1]}catch{console.warn("Failed to get Content-Range on request")}let ne=null;try{ne=G.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}let oe=null;if(Y!==void 0)oe=Y;else if(!F.reliableHeadRequests){let Z=new XMLHttpRequest;F.dataProtocol==5?(Z.open("HEAD",we(F.s3Config,F.dataUrl),!1),pe(Z,F.s3Config,F.dataUrl,"HEAD")):Z.open("HEAD",F.dataUrl,!1),Z.setRequestHeader("Range","bytes=0-"),Z.send(null),X=null;try{X=Z.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}X!==null&&+X>1&&(oe=X)}if(G.status==206&&ne!==null&&+ne==1&&oe!==null){let Z=b._malloc(24);b.HEAPF64[(Z>>>3)+0]=+oe,b.HEAPF64[(Z>>>3)+1]=0;let Q=0;try{Q=new Date((g=G.getResponseHeader("Last-Modified"))!=null?g:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return b.HEAPF64[(Z>>>3)+2]=+Q,Z}if(G.status==200&&ne!==null&&X!==null&&+ne==+X){console.warn(`fall back to full HTTP read for: ${F.dataUrl}`);let Z=b._malloc(G.response.byteLength),Q=new Uint8Array(G.response,0,G.response.byteLength);b.HEAPU8.set(Q,Z);let ue=b._malloc(3*8);b.HEAPF64[(ue>>>3)+0]=G.response.byteLength,b.HEAPF64[(ue>>>3)+1]=Z;let ae=0;try{ae=new Date((T=G.getResponseHeader("Last-Modified"))!=null?T:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return b.HEAPF64[(ue>>>3)+2]=+ae,ue}console.warn(`falling back to full HTTP read for: ${F.dataUrl}`)}let P=new XMLHttpRequest;if(F.dataProtocol==5?(P.open("GET",we(F.s3Config,F.dataUrl),!1),pe(P,F.s3Config,F.dataUrl,"GET")):P.open("GET",F.dataUrl,!1),P.responseType="arraybuffer",P.send(null),P.status==200){let G=b._malloc(P.response.byteLength),Y=new Uint8Array(P.response,0,P.response.byteLength);b.HEAPU8.set(Y,G);let ne=b._malloc(3*8);b.HEAPF64[(ne>>>3)+0]=P.response.byteLength,b.HEAPF64[(ne>>>3)+1]=G;let oe=0;try{oe=new Date((E=P.getResponseHeader("Last-Modified"))!=null?E:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return b.HEAPF64[(ne>>>3)+2]=+oe,ne}}if(ie!=null)throw new Error(`Reading file ${F.fileName} failed with error: ${ie}`);return 0}case 2:{let X=(m=W._files)==null?void 0:m.get(F.fileName);if(X){let G=b._malloc(24);return b.HEAPF64[(G>>>3)+0]=X.size,b.HEAPF64[(G>>>3)+1]=0,b.HEAPF64[(G>>>3)+2]=0,G}if(p&128)return 0;console.warn(`Buffering missing file: ${F.fileName}`);let ie=b._malloc(3*8),P=b._malloc(1);return b.HEAPF64[(ie>>>3)+0]=1,b.HEAPF64[(ie>>>3)+1]=P,b.HEAPF64[(ie>>>3)+2]=0,ie}case 3:{let X=($=W._files)==null?void 0:$.get(F.fileName);if(!X)throw new Error(`No OPFS access handle registered with name: ${F.fileName}`);p&16&&X.truncate(0);let ie=b._malloc(3*8),P=X.getSize();return b.HEAPF64[(ie>>>3)+0]=P,b.HEAPF64[(ie>>>3)+1]=0,b.HEAPF64[(ie>>>3)+2]=0,ie}}}catch(F){console.error(F.toString()),ve(b,F.toString())}return 0},glob:(b,f,p)=>{var y;try{let d=q(b,f,p);if(d.startsWith("http")||d.startsWith("s3://")){let g=new XMLHttpRequest;if(d.startsWith("s3://")){let T=W.getGlobalFileInfo(b);g.open("HEAD",we(T==null?void 0:T.s3Config,d),!1),pe(g,T==null?void 0:T.s3Config,d,"HEAD")}else g.open("HEAD",d,!1);if(g.send(null),g.status!=200&&g.status!==206){if(!((y=W.getGlobalFileInfo(b))!=null&&y.allowFullHttpReads))return console.log(`HEAD request failed: ${d}, with full http reads are disabled`),0;let T=new XMLHttpRequest;if(d.startsWith("s3://")){let m=W.getGlobalFileInfo(b);T.open("GET",we(m==null?void 0:m.s3Config,d),!1),pe(T,m==null?void 0:m.s3Config,d,"HEAD")}else T.open("GET",d,!1);if(T.setRequestHeader("Range","bytes=0-0"),T.send(null),T.status!=200&&T.status!==206)return console.log(`HEAD and GET requests failed: ${d}`),0;let E=null;try{E=T.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}E&&+E>1&&console.warn(`Range request for ${d} did not return a partial response: ${T.status} "${T.statusText}"`)}b.ccall("duckdb_web_fs_glob_add_path",null,["string"],[d])}else for(let[g]of W._files.entries()||[])g.startsWith(d)&&b.ccall("duckdb_web_fs_glob_add_path",null,["string"],[g])}catch(d){return console.log(d),ve(b,d.toString()),0}},checkFile:(b,f,p)=>{try{let y=q(b,f,p);if(y.startsWith("http")||y.startsWith("s3://")){let d=new XMLHttpRequest;if(y.startsWith("s3://")){let g=W.getGlobalFileInfo(b);d.open("HEAD",we(g==null?void 0:g.s3Config,y),!1),pe(d,g==null?void 0:g.s3Config,y,"HEAD")}else d.open("HEAD",y,!1);return d.send(null),d.status==206||d.status==200}else return W._files.has(y)}catch(y){return console.log(y),!1}return!1},syncFile:(b,f)=>{},closeFile:(b,f)=>{var y;let p=W.getFileInfo(b,f);W._fileInfoCache.delete(f);try{switch(p==null?void 0:p.dataProtocol){case 0:case 4:case 5:break;case 1:case 2:return;case 3:{let d=(y=W._files)==null?void 0:y.get(p.fileName);if(!d)throw new Error(`No OPFS access handle registered with name: ${p.fileName}`);return d.flush()}}}catch(d){console.log(d),ve(b,d.toString())}},dropFile:(b,f,p)=>{var g;let y=q(b,f,p),d=(g=W._files)==null?void 0:g.get(y);if(d){if(W._files.delete(y),d instanceof FileSystemSyncAccessHandle)try{d.flush(),d.close()}catch{throw new Error(`Cannot drop file with name: ${y}`)}d instanceof Blob}},truncateFile:(b,f,p)=>{var d;let y=W.getFileInfo(b,f);switch(y==null?void 0:y.dataProtocol){case 4:ve(b,"Cannot truncate a http file");return;case 5:ve(b,"Cannot truncate an s3 file");return;case 0:case 1:case 2:ve(b,"truncateFile not implemented");return;case 3:{let g=(d=W._files)==null?void 0:d.get(y.fileName);if(!g)throw new Error(`No OPFS access handle registered with name: ${y.fileName}`);return g.truncate(p)}}return 0},readFile(b,f,p,y,d){var g;if(y==0)return 0;try{let T=W.getFileInfo(b,f);switch(T==null?void 0:T.dataProtocol){case 4:case 5:{if(!T.dataUrl)throw new Error(`Missing data URL for file ${f}`);try{let E=new XMLHttpRequest;if(T.dataProtocol==5?(E.open("GET",we(T==null?void 0:T.s3Config,T.dataUrl),!1),pe(E,T==null?void 0:T.s3Config,T.dataUrl,"GET")):E.open("GET",T.dataUrl,!1),E.responseType="arraybuffer",E.setRequestHeader("Range",`bytes=${d}-${d+y-1}`),E.send(null),E.status==206||E.status==200&&y==E.response.byteLength&&d==0){let m=new Uint8Array(E.response,0,Math.min(E.response.byteLength,y));return b.HEAPU8.set(m,p),m.byteLength}else if(E.status==200){console.warn(`Range request for ${T.dataUrl} did not return a partial response: ${E.status} "${E.statusText}"`);let m=new Uint8Array(E.response,d,Math.min(E.response.byteLength-d,y));return b.HEAPU8.set(m,p),m.byteLength}else throw new Error(`Range request for ${T.dataUrl} did returned non-success status: ${E.status} "${E.statusText}"`)}catch(E){throw console.log(E),new Error(`Range request for ${T.dataUrl} failed with error: ${E}"`)}}case 2:{let E=(g=W._files)==null?void 0:g.get(T.fileName);if(!E)throw new Error(`No HTML5 file registered with name: ${T.fileName}`);let m=E.slice(d,d+y),$=new Uint8Array(new FileReaderSync().readAsArrayBuffer(m));return b.HEAPU8.set($,p),$.byteLength}case 3:{let E=W._files.get(T.fileName);if(!E)throw new Error(`No OPFS access handle registered with name: ${T.fileName}`);let m=b.HEAPU8.subarray(p,p+y);return E.read(m,{at:d})}}return 0}catch(T){return console.log(T),ve(b,T.toString()),0}},writeFile:(b,f,p,y,d)=>{var T;let g=W.getFileInfo(b,f);switch(g==null?void 0:g.dataProtocol){case 4:return ve(b,"Cannot write to HTTP file"),0;case 5:{let E=b.HEAPU8.subarray(p,p+y),m=new XMLHttpRequest;return m.open("PUT",we(g==null?void 0:g.s3Config,g.dataUrl),!1),pe(m,g==null?void 0:g.s3Config,g.dataUrl,"PUT","",E),m.send(E),m.status!==200?(ve(b,"Failed writing file: HTTP "+m.status),0):y}case 2:return ve(b,"cannot write using the html5 file reader api"),0;case 3:{let E=(T=W._files)==null?void 0:T.get(g.fileName);if(!E)throw new Error(`No OPFS access handle registered with name: ${g.fileName}`);let m=b.HEAPU8.subarray(p,p+y);return E.write(m,{at:d})}}return 0},getLastFileModificationTime:(b,f)=>{var y;let p=W.getFileInfo(b,f);switch(p==null?void 0:p.dataProtocol){case 2:{if(!((y=W._files)==null?void 0:y.get(p.fileName)))throw Error(`No handle available for file: ${p.fileName}`);return 0}case 4:case 5:return new Date().getTime()/1e3}return 0},progressUpdate:(b,f,p)=>{postMessage&&postMessage({requestId:0,type:"PROGRESS_UPDATE",data:{status:b?"completed":"in-progress",percentage:f,repetitions:p}})},checkDirectory:(b,f,p)=>!1,createDirectory:(b,f,p)=>{},removeDirectory:(b,f,p)=>{},listDirectoryEntries:(b,f,p)=>!1,moveFile:(b,f,p,y,d)=>{var m,$;let g=q(b,f,p),T=q(b,y,d),E=(m=W._files)==null?void 0:m.get(g);E!==void 0&&(W._files.delete(E),W._files.set(T,E));for(let[F,X]of(($=W._fileInfoCache)==null?void 0:$.entries())||[])if(X.dataUrl==g){W._fileInfoCache.delete(F);break}return!0},removeFile:(b,f,p)=>{},callScalarUDF:(b,f,p,y,d,g,T)=>{Yt(W,b,f,p,y,d,g,T)}};var pt=class extends Ze{postMessage(f,p){globalThis.postMessage(f,p)}async instantiate(f,p,y){return await new rt(this,W,f,p).instantiate(y)}};function fr(){let b=new pt;globalThis.onmessage=async f=>{await b.onMessage(f.data)}}fr();return r_(__);})();
10
+ `+v+`
11
+ `+b;let E=(0,Ae.sha256)(m),A=`AWS4-HMAC-SHA256
12
+ `+y.datetimeNow+`
13
+ `+y.dateNow+"/"+y.region+"/"+y.service+`/aws4_request
14
+ `+E,k="AWS4"+y.secretAccessKey,X=Ae.sha256.hmac.arrayBuffer(k,y.dateNow),S=Ae.sha256.hmac.arrayBuffer(X,y.region),V=Ae.sha256.hmac.arrayBuffer(S,y.service),ne=Ae.sha256.hmac.arrayBuffer(V,"aws4_request"),B=Ae.sha256.hmac(ne,A);return g.set("Authorization","AWS4-HMAC-SHA256 Credential="+y.accessKeyId+"/"+y.dateNow+"/"+y.region+"/"+y.service+"/aws4_request, SignedHeaders="+v+", Signature="+B),g}var pl=function(y,f,b,g=null,v=null){let m=_l(y,f,b),E={contentType:g,contentHash:v?Ae.sha256.hex(v):null};return vl(m,E)};function be(y,f,b,g,v=null,m=null){(f!=null&&f.accessKeyId||f!=null&&f.sessionToken)&&(pl(f,b,g,v,m).forEach((A,k)=>{y.setRequestHeader(k,A)}),v&&y.setRequestHeader("content-type",v))}function ur(y){if(y.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let f=y.indexOf("/",5);if(f==-1)throw new Error("URL needs to contain a '/' after the host");let b=y.substring(5,f);if(!b)throw new Error("URL needs to contain a bucket name");let g=y.substring(f);if(!g)throw new Error("URL needs to contain key");return{bucket:b,path:g}}function fr(y){var f;return!!((f=y==null?void 0:y.endpoint)!=null&&f.startsWith("http"))}function we(y,f){let b=ur(f);return fr(y)?`${y==null?void 0:y.endpoint}/${b.bucket}`+b.path:"https://"+cr(y,f,b.bucket)+b.path}var bl=7,hr=/\/|\\/,G={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,_preparedHandles:{},_opfsRoot:null,getFileInfo(y,f){try{let b=G._fileInfoCache.get(f),[g,v,m]=te(y,"duckdb_web_fs_get_file_info_by_id",["number","number"],[f,(b==null?void 0:b.cacheEpoch)||0]);if(g!==0)return null;if(m===0)return b;let E=J(y,v,m);ae(y);try{let A=JSON.parse(E);if(A==null)return null;let k={...A,blob:null};return G._fileInfoCache.set(f,k),!G._files.has(k.fileName)&&G._preparedHandles[k.fileName]&&(G._files.set(k.fileName,G._preparedHandles[k.fileName]),delete G._preparedHandles[k.fileName]),k}catch(A){return console.warn(A),null}}catch(b){return console.log(b),null}},getGlobalFileInfo(y){var f;try{let[b,g,v]=te(y,"duckdb_web_get_global_file_info",["number"],[((f=G._globalFileInfo)==null?void 0:f.cacheEpoch)||0]);if(b!==0)return null;if(v===0)return G._globalFileInfo;let m=J(y,g,v);ae(y);let E=JSON.parse(m);return E==null?null:(G._globalFileInfo={...E,blob:null},G._globalFileInfo)}catch(b){return console.log(b),null}},async assignOPFSRoot(){G._opfsRoot||(G._opfsRoot=await navigator.storage.getDirectory())},async prepareFileHandles(y,f){if(f===3){await G.assignOPFSRoot();let b=async v=>{if(G._files.has(v))return{path:v,handle:G._files.get(v),fromCached:!0};let E=G._opfsRoot,A=v.slice(bl),k=A;if(hr.test(A)){let S=A.split(hr);if(S.length===0)throw new Error(`Invalid path ${A}`);if(k=S[S.length-1],!k)throw new Error(`Invalid path ${A}. File Not Found.`);S.pop();for(let V of S)E=await E.getDirectoryHandle(V,{create:!0})}let X=await E.getFileHandle(k,{create:!1}).catch(S=>{if((S==null?void 0:S.name)==="NotFoundError")return console.debug(`File ${v} does not exists yet, creating...`),E.getFileHandle(k,{create:!0});throw S});try{let S=await X.createSyncAccessHandle();return G._preparedHandles[v]=S,{path:v,handle:S,fromCached:!1}}catch(S){throw new Error(S.message+":"+name)}},g=[];for(let v of y){let m=await b(v);g.push(m)}return g}throw new Error(`Unsupported protocol ${f} for paths ${y} with protocol ${f}`)},async prepareDBFileHandle(y,f){if(f===3&&this.prepareFileHandles){let b=[y,`${y}.wal`];return this.prepareFileHandles(b,f)}throw new Error(`Unsupported protocol ${f} for path ${y} with protocol ${f}`)},testPlatformFeature:(y,f)=>{switch(f){case 1:return typeof BigInt64Array<"u";default:return console.warn(`test for unknown feature: ${f}`),!1}},getDefaultDataProtocol(y){return 2},openFile:(y,f,b)=>{var g,v,m,E,A,k,X;try{G._fileInfoCache.delete(f);let S=G.getFileInfo(y,f);switch(S==null?void 0:S.dataProtocol){case 4:case 5:{if(b&1&&b&2)throw new Error(`Opening file ${S.fileName} failed: cannot open file with both read and write flags set`);if(b&32)throw new Error(`Opening file ${S.fileName} failed: appending to HTTP/S3 files is not supported`);if(b&2){let B=new XMLHttpRequest;if(S.dataProtocol==5?(B.open("HEAD",we(S.s3Config,S.dataUrl),!1),be(B,S.s3Config,S.dataUrl,"HEAD")):B.open("HEAD",S.dataUrl,!1),B.send(null),B.status!=200&&B.status!=404)throw new Error(`Opening file ${S.fileName} failed: Unexpected return status from server (${B.status})`);if(B.status==404&&!(b&8||b&16))throw new Error(`Opening file ${S.fileName} failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag.`);let K=y._malloc(1),Q=new Uint8Array;y.HEAPU8.set(Q,K);let oe=y._malloc(3*8);return y.HEAPF64[(oe>>>3)+0]=1,y.HEAPF64[(oe>>>3)+1]=K,y.HEAPF64[(oe>>>3)+2]=new Date().getTime()/1e3,oe}else if((b&1)==0)throw new Error(`Opening file ${S.fileName} failed: unsupported file flags: ${b}`);let V=null,ne=null;if(!S.forceFullHttpReads&&(S.reliableHeadRequests||!S.allowFullHttpReads))try{let B=new XMLHttpRequest;S.dataProtocol==5?(B.open("HEAD",we(S.s3Config,S.dataUrl),!1),be(B,S.s3Config,S.dataUrl,"HEAD")):B.open("HEAD",S.dataUrl,!1),B.setRequestHeader("Range","bytes=0-"),B.send(null),V=null;try{V=B.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}if(V!==null&&B.status==206){let K=y._malloc(24);y.HEAPF64[(K>>>3)+0]=+V,y.HEAPF64[(K>>>3)+1]=0;let Q=0;try{Q=new Date((g=B.getResponseHeader("Last-Modified"))!=null?g:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return y.HEAPF64[(K>>>3)+2]=+Q,K}}catch(B){ne=B,console.warn(`HEAD request with range header failed: ${B}`)}if(S.allowFullHttpReads){if(!S.forceFullHttpReads){let K=new XMLHttpRequest;S.dataProtocol==5?(K.open("GET",we(S.s3Config,S.dataUrl),!1),be(K,S.s3Config,S.dataUrl,"GET")):K.open("GET",S.dataUrl,!1),K.responseType="arraybuffer",K.setRequestHeader("Range","bytes=0-0"),K.send(null);let Q=null;try{Q=(v=K.getResponseHeader("Content-Range"))==null?void 0:v.split("/")[1]}catch{console.warn("Failed to get Content-Range on request")}let oe=null;try{oe=K.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}let se=null;if(Q!==void 0)se=Q;else if(!S.reliableHeadRequests){let ee=new XMLHttpRequest;S.dataProtocol==5?(ee.open("HEAD",we(S.s3Config,S.dataUrl),!1),be(ee,S.s3Config,S.dataUrl,"HEAD")):ee.open("HEAD",S.dataUrl,!1),ee.setRequestHeader("Range","bytes=0-"),ee.send(null),V=null;try{V=ee.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}V!==null&&+V>1&&(se=V)}if(K.status==206&&oe!==null&&+oe==1&&se!==null){let ee=y._malloc(24);y.HEAPF64[(ee>>>3)+0]=+se,y.HEAPF64[(ee>>>3)+1]=0;let Z=0;try{Z=new Date((m=K.getResponseHeader("Last-Modified"))!=null?m:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return y.HEAPF64[(ee>>>3)+2]=+Z,ee}if(K.status==200&&oe!==null&&V!==null&&+oe==+V){console.warn(`fall back to full HTTP read for: ${S.dataUrl}`);let ee=y._malloc(K.response.byteLength),Z=new Uint8Array(K.response,0,K.response.byteLength);y.HEAPU8.set(Z,ee);let fe=y._malloc(3*8);y.HEAPF64[(fe>>>3)+0]=K.response.byteLength,y.HEAPF64[(fe>>>3)+1]=ee;let ce=0;try{ce=new Date((E=K.getResponseHeader("Last-Modified"))!=null?E:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return y.HEAPF64[(fe>>>3)+2]=+ce,fe}console.warn(`falling back to full HTTP read for: ${S.dataUrl}`)}let B=new XMLHttpRequest;if(S.dataProtocol==5?(B.open("GET",we(S.s3Config,S.dataUrl),!1),be(B,S.s3Config,S.dataUrl,"GET")):B.open("GET",S.dataUrl,!1),B.responseType="arraybuffer",B.send(null),B.status==200){let K=y._malloc(B.response.byteLength),Q=new Uint8Array(B.response,0,B.response.byteLength);y.HEAPU8.set(Q,K);let oe=y._malloc(3*8);y.HEAPF64[(oe>>>3)+0]=B.response.byteLength,y.HEAPF64[(oe>>>3)+1]=K;let se=0;try{se=new Date((A=B.getResponseHeader("Last-Modified"))!=null?A:"").getTime()/1e3}catch{console.warn("Failed to get Last-Modified on request")}return y.HEAPF64[(oe>>>3)+2]=+se,oe}}if(ne!=null)throw new Error(`Reading file ${S.fileName} failed with error: ${ne}`);return 0}case 2:{let V=(k=G._files)==null?void 0:k.get(S.fileName);if(V){let K=y._malloc(24);return y.HEAPF64[(K>>>3)+0]=V.size,y.HEAPF64[(K>>>3)+1]=0,y.HEAPF64[(K>>>3)+2]=0,K}if(b&128)return 0;console.warn(`Buffering missing file: ${S.fileName}`);let ne=y._malloc(3*8),B=y._malloc(1);return y.HEAPF64[(ne>>>3)+0]=1,y.HEAPF64[(ne>>>3)+1]=B,y.HEAPF64[(ne>>>3)+2]=0,ne}case 3:{let V=(X=G._files)==null?void 0:X.get(S.fileName);if(!V)throw new Error(`No OPFS access handle registered with name: ${S.fileName}`);b&16&&V.truncate(0);let ne=y._malloc(3*8),B=V.getSize();return y.HEAPF64[(ne>>>3)+0]=B,y.HEAPF64[(ne>>>3)+1]=0,y.HEAPF64[(ne>>>3)+2]=0,ne}}}catch(S){console.error(S.toString()),pe(y,S.toString())}return 0},glob:(y,f,b)=>{var g;try{let v=J(y,f,b);if(v.startsWith("http")||v.startsWith("s3://")){let m=new XMLHttpRequest;if(v.startsWith("s3://")){let E=G.getGlobalFileInfo(y);m.open("HEAD",we(E==null?void 0:E.s3Config,v),!1),be(m,E==null?void 0:E.s3Config,v,"HEAD")}else m.open("HEAD",v,!1);if(m.send(null),m.status!=200&&m.status!==206){if(!((g=G.getGlobalFileInfo(y))!=null&&g.allowFullHttpReads))return console.log(`HEAD request failed: ${v}, with full http reads are disabled`),0;let E=new XMLHttpRequest;if(v.startsWith("s3://")){let k=G.getGlobalFileInfo(y);E.open("GET",we(k==null?void 0:k.s3Config,v),!1),be(E,k==null?void 0:k.s3Config,v,"HEAD")}else E.open("GET",v,!1);if(E.setRequestHeader("Range","bytes=0-0"),E.send(null),E.status!=200&&E.status!==206)return console.log(`HEAD and GET requests failed: ${v}`),0;let A=null;try{A=E.getResponseHeader("Content-Length")}catch{console.warn("Failed to get Content-Length on request")}A&&+A>1&&console.warn(`Range request for ${v} did not return a partial response: ${E.status} "${E.statusText}"`)}y.ccall("duckdb_web_fs_glob_add_path",null,["string"],[v])}else for(let[m]of G._files.entries()||[])m.startsWith(v)&&y.ccall("duckdb_web_fs_glob_add_path",null,["string"],[m])}catch(v){return console.log(v),pe(y,v.toString()),0}},checkFile:(y,f,b)=>{try{let g=J(y,f,b);if(g.startsWith("http")||g.startsWith("s3://")){let v=new XMLHttpRequest;if(g.startsWith("s3://")){let m=G.getGlobalFileInfo(y);v.open("HEAD",we(m==null?void 0:m.s3Config,g),!1),be(v,m==null?void 0:m.s3Config,g,"HEAD")}else v.open("HEAD",g,!1);return v.send(null),v.status==206||v.status==200}else return G._files.has(g)}catch(g){return console.log(g),!1}return!1},syncFile:(y,f)=>{},closeFile:(y,f)=>{var g;let b=G.getFileInfo(y,f);G._fileInfoCache.delete(f);try{switch(b==null?void 0:b.dataProtocol){case 0:case 4:case 5:break;case 1:case 2:return;case 3:{let v=(g=G._files)==null?void 0:g.get(b.fileName);if(!v)throw new Error(`No OPFS access handle registered with name: ${b.fileName}`);return v.flush()}}}catch(v){console.log(v),pe(y,v.toString())}},dropFile:(y,f,b)=>{var m;let g=J(y,f,b),v=(m=G._files)==null?void 0:m.get(g);if(v){if(G._files.delete(g),v instanceof FileSystemSyncAccessHandle)try{v.flush(),v.close()}catch{throw new Error(`Cannot drop file with name: ${g}`)}v instanceof Blob}},truncateFile:(y,f,b)=>{var v;let g=G.getFileInfo(y,f);switch(g==null?void 0:g.dataProtocol){case 4:pe(y,"Cannot truncate a http file");return;case 5:pe(y,"Cannot truncate an s3 file");return;case 0:case 1:case 2:pe(y,"truncateFile not implemented");return;case 3:{let m=(v=G._files)==null?void 0:v.get(g.fileName);if(!m)throw new Error(`No OPFS access handle registered with name: ${g.fileName}`);return m.truncate(b)}}return 0},readFile(y,f,b,g,v){var m;if(g==0)return 0;try{let E=G.getFileInfo(y,f);switch(E==null?void 0:E.dataProtocol){case 4:case 5:{if(!E.dataUrl)throw new Error(`Missing data URL for file ${f}`);try{let A=new XMLHttpRequest;if(E.dataProtocol==5?(A.open("GET",we(E==null?void 0:E.s3Config,E.dataUrl),!1),be(A,E==null?void 0:E.s3Config,E.dataUrl,"GET")):A.open("GET",E.dataUrl,!1),A.responseType="arraybuffer",A.setRequestHeader("Range",`bytes=${v}-${v+g-1}`),A.send(null),A.status==206||A.status==200&&g==A.response.byteLength&&v==0){let k=new Uint8Array(A.response,0,Math.min(A.response.byteLength,g));return y.HEAPU8.set(k,b),k.byteLength}else if(A.status==200){console.warn(`Range request for ${E.dataUrl} did not return a partial response: ${A.status} "${A.statusText}"`);let k=new Uint8Array(A.response,v,Math.min(A.response.byteLength-v,g));return y.HEAPU8.set(k,b),k.byteLength}else throw new Error(`Range request for ${E.dataUrl} did returned non-success status: ${A.status} "${A.statusText}"`)}catch(A){throw console.log(A),new Error(`Range request for ${E.dataUrl} failed with error: ${A}"`)}}case 2:{let A=(m=G._files)==null?void 0:m.get(E.fileName);if(!A)throw new Error(`No HTML5 file registered with name: ${E.fileName}`);let k=A.slice(v,v+g),X=new Uint8Array(new FileReaderSync().readAsArrayBuffer(k));return y.HEAPU8.set(X,b),X.byteLength}case 3:{let A=G._files.get(E.fileName);if(!A)throw new Error(`No OPFS access handle registered with name: ${E.fileName}`);let k=y.HEAPU8.subarray(b,b+g);return A.read(k,{at:v})}}return 0}catch(E){return console.log(E),pe(y,E.toString()),0}},writeFile:(y,f,b,g,v)=>{var E;let m=G.getFileInfo(y,f);switch(m==null?void 0:m.dataProtocol){case 4:return pe(y,"Cannot write to HTTP file"),0;case 5:{let A=y.HEAPU8.subarray(b,b+g),k=new XMLHttpRequest;return k.open("PUT",we(m==null?void 0:m.s3Config,m.dataUrl),!1),be(k,m==null?void 0:m.s3Config,m.dataUrl,"PUT","",A),k.send(A),k.status!==200?(pe(y,"Failed writing file: HTTP "+k.status),0):g}case 2:return pe(y,"cannot write using the html5 file reader api"),0;case 3:{let A=(E=G._files)==null?void 0:E.get(m.fileName);if(!A)throw new Error(`No OPFS access handle registered with name: ${m.fileName}`);let k=y.HEAPU8.subarray(b,b+g);return A.write(k,{at:v})}}return 0},getLastFileModificationTime:(y,f)=>{var g;let b=G.getFileInfo(y,f);switch(b==null?void 0:b.dataProtocol){case 2:{if(!((g=G._files)==null?void 0:g.get(b.fileName)))throw Error(`No handle available for file: ${b.fileName}`);return 0}case 4:case 5:return new Date().getTime()/1e3}return 0},progressUpdate:(y,f,b)=>{postMessage&&postMessage({requestId:0,type:"PROGRESS_UPDATE",data:{status:y?"completed":"in-progress",percentage:f,repetitions:b}})},checkDirectory:(y,f,b)=>!1,createDirectory:(y,f,b)=>{},removeDirectory:(y,f,b)=>{},listDirectoryEntries:(y,f,b)=>!1,moveFile:(y,f,b,g,v)=>{var k,X;let m=J(y,f,b),E=J(y,g,v),A=(k=G._files)==null?void 0:k.get(m);A!==void 0&&(G._files.delete(A),G._files.set(E,A));for(let[S,V]of((X=G._fileInfoCache)==null?void 0:X.entries())||[])if(V.dataUrl==m){G._fileInfoCache.delete(S);break}return!0},removeFile:(y,f,b)=>{},callScalarUDF:(y,f,b,g,v,m,E)=>{Zt(G,y,f,b,g,v,m,E)}};var bt=class extends et{postMessage(f,b){globalThis.postMessage(f,b)}async instantiate(f,b,g){return await new it(this,G,f,b).instantiate(g)}};function lr(){let y=new bt;globalThis.onmessage=async f=>{await y.onMessage(f.data)}}lr();return cl(wl);})();
15
15
  /*! Bundled license information:
16
16
 
17
17
  js-sha256/src/sha256.js: