@duckdb/duckdb-wasm 1.13.1-dev7.0 → 1.13.1-dev94.0
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.
- package/README.md +2 -2
- package/dist/duckdb-browser-blocking.cjs +37 -23104
- package/dist/duckdb-browser-blocking.cjs.map +3 -3
- package/dist/duckdb-browser-blocking.mjs +30 -9
- package/dist/duckdb-browser-blocking.mjs.map +3 -3
- package/dist/duckdb-browser-coi.pthread.worker.js +53 -2
- package/dist/duckdb-browser-coi.pthread.worker.js.map +3 -3
- package/dist/duckdb-browser-coi.worker.js +29 -8
- package/dist/duckdb-browser-coi.worker.js.map +3 -3
- package/dist/duckdb-browser-eh.worker.js +30 -9
- package/dist/duckdb-browser-eh.worker.js.map +3 -3
- package/dist/duckdb-browser-mvp.worker.js +54 -0
- package/dist/duckdb-browser-mvp.worker.js.map +7 -0
- package/dist/duckdb-browser.cjs +14 -15988
- package/dist/duckdb-browser.cjs.map +2 -2
- package/dist/duckdb-browser.mjs +3 -3
- package/dist/duckdb-browser.mjs.map +2 -2
- package/dist/duckdb-coi.wasm +0 -0
- package/dist/duckdb-eh.wasm +0 -0
- package/dist/{duckdb.wasm → duckdb-mvp.wasm} +0 -0
- package/dist/duckdb-node-blocking.cjs +4 -4
- package/dist/duckdb-node-blocking.cjs.map +3 -3
- package/dist/duckdb-node-eh.worker.cjs +4 -4
- package/dist/duckdb-node-eh.worker.cjs.map +3 -3
- package/dist/duckdb-node-mvp.worker.cjs +36 -0
- package/dist/duckdb-node-mvp.worker.cjs.map +7 -0
- package/dist/duckdb-node.cjs +1 -1
- package/dist/duckdb-node.cjs.map +2 -2
- package/dist/tests-browser.js +2697 -1439
- package/dist/tests-browser.js.map +3 -3
- package/dist/tests-node.cjs +4951 -4745
- package/dist/tests-node.cjs.map +3 -3
- package/dist/types/src/bindings/bindings_base.d.ts +10 -2
- package/dist/types/src/bindings/{bindings_browser.d.ts → bindings_browser_mvp.d.ts} +0 -0
- package/dist/types/src/bindings/bindings_interface.d.ts +5 -3
- package/dist/types/src/bindings/{bindings_node.d.ts → bindings_node_mvp.d.ts} +0 -0
- package/dist/types/src/bindings/connection.d.ts +2 -0
- package/dist/types/src/bindings/index.d.ts +1 -1
- package/dist/types/src/bindings/progress.d.ts +8 -0
- package/dist/types/src/bindings/runtime.d.ts +31 -2
- package/dist/types/src/bindings/runtime_browser.d.ts +4 -2
- package/dist/types/src/bindings/runtime_node.d.ts +1 -1
- package/dist/types/src/bindings/udf_function.d.ts +14 -0
- package/dist/types/src/bindings/udf_runtime.d.ts +3 -0
- package/dist/types/src/bindings/web_file.d.ts +1 -0
- package/dist/types/src/flat_arrow.d.ts +1 -0
- package/dist/types/src/log.d.ts +3 -2
- package/dist/types/src/parallel/async_bindings.d.ts +5 -2
- package/dist/types/src/parallel/worker_dispatcher.d.ts +2 -1
- package/dist/types/src/parallel/worker_request.d.ts +4 -2
- package/dist/types/src/targets/duckdb-browser-blocking.d.ts +1 -1
- package/dist/types/src/targets/{duckdb-browser.worker.d.ts → duckdb-browser-mvp.worker.d.ts} +0 -0
- package/dist/types/src/targets/duckdb-node-blocking.d.ts +2 -2
- package/dist/types/src/targets/{duckdb-node.worker.d.ts → duckdb-node-mvp.worker.d.ts} +0 -0
- package/dist/types/src/targets/duckdb.d.ts +1 -0
- package/dist/types/src/utils/index.d.ts +1 -0
- package/dist/types/src/utils/s3_helper.d.ts +26 -0
- package/package.json +16 -17
- package/dist/duckdb-browser-coi.d.ts +0 -1
- package/dist/duckdb-browser-eh.d.ts +0 -1
- package/dist/duckdb-browser.worker.js +0 -33
- package/dist/duckdb-browser.worker.js.map +0 -7
- package/dist/duckdb-node-coi.d.ts +0 -1
- package/dist/duckdb-node-eh.d.ts +0 -1
- package/dist/duckdb-node.worker.cjs +0 -36
- package/dist/duckdb-node.worker.cjs.map +0 -7
- package/dist/types/src/bindings/insert.d.ts +0 -7
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var duckdb=(()=>{var iA=Object.create;var gs=Object.defineProperty,rA=Object.defineProperties,nA=Object.getOwnPropertyDescriptor,sA=Object.getOwnPropertyDescriptors,oA=Object.getOwnPropertyNames,f_=Object.getOwnPropertySymbols,aA=Object.getPrototypeOf,h_=Object.prototype.hasOwnProperty,uA=Object.prototype.propertyIsEnumerable;var p_=(i,e,t)=>e in i?gs(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Yi=(i,e)=>{for(var t in e||(e={}))h_.call(e,t)&&p_(i,t,e[t]);if(f_)for(var t of f_(e))uA.call(e,t)&&p_(i,t,e[t]);return i},vs=(i,e)=>rA(i,sA(e)),y_=i=>gs(i,"__esModule",{value:!0});var cA=(i=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(i,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):i)(function(i){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+i+'" is not supported')});var C=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),lA=(i,e)=>{for(var t in e)gs(i,t,{get:e[t],enumerable:!0})},__=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of oA(e))!h_.call(i,n)&&(t||n!=="default")&&gs(i,n,{get:()=>e[n],enumerable:!(r=nA(e,n))||r.enumerable});return i},ii=(i,e)=>__(y_(gs(i!=null?iA(aA(i)):{},"default",!e&&i&&i.__esModule?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i),dA=(i=>(e,t)=>i&&i.get(e)||(t=__(y_({}),e,1),i&&i.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var lt=C((lE,Do)=>{var m_,b_,g_,v_,j_,w_,B_,I_,S_,Ao,zu,T_,A_,F_,dn,D_,O_,M_,C_,U_,E_,R_,k_,Fo;(function(i){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){i(t(e,t(r)))}):typeof Do=="object"&&typeof Do.exports=="object"?i(t(e,t(Do.exports))):i(t(e));function t(r,n){return r!==e&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(s,c){return r[s]=n?n(s,c):c}}})(function(i){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])};m_=function(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(r,n);function s(){this.constructor=r}r.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)},b_=Object.assign||function(r){for(var n,s=1,c=arguments.length;s<c;s++){n=arguments[s];for(var p in n)Object.prototype.hasOwnProperty.call(n,p)&&(r[p]=n[p])}return r},g_=function(r,n){var s={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&n.indexOf(c)<0&&(s[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var p=0,c=Object.getOwnPropertySymbols(r);p<c.length;p++)n.indexOf(c[p])<0&&Object.prototype.propertyIsEnumerable.call(r,c[p])&&(s[c[p]]=r[c[p]]);return s},v_=function(r,n,s,c){var p=arguments.length,m=p<3?n:c===null?c=Object.getOwnPropertyDescriptor(n,s):c,j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,n,s,c);else for(var F=r.length-1;F>=0;F--)(j=r[F])&&(m=(p<3?j(m):p>3?j(n,s,m):j(n,s))||m);return p>3&&m&&Object.defineProperty(n,s,m),m},j_=function(r,n){return function(s,c){n(s,c,r)}},w_=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},B_=function(r,n,s,c){function p(m){return m instanceof s?m:new s(function(j){j(m)})}return new(s||(s=Promise))(function(m,j){function F(P){try{L(c.next(P))}catch(ae){j(ae)}}function R(P){try{L(c.throw(P))}catch(ae){j(ae)}}function L(P){P.done?m(P.value):p(P.value).then(F,R)}L((c=c.apply(r,n||[])).next())})},I_=function(r,n){var s={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},c,p,m,j;return j={next:F(0),throw:F(1),return:F(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function F(L){return function(P){return R([L,P])}}function R(L){if(c)throw new TypeError("Generator is already executing.");for(;s;)try{if(c=1,p&&(m=L[0]&2?p.return:L[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,L[1])).done)return m;switch(p=0,m&&(L=[L[0]&2,m.value]),L[0]){case 0:case 1:m=L;break;case 4:return s.label++,{value:L[1],done:!1};case 5:s.label++,p=L[1],L=[0];continue;case 7:L=s.ops.pop(),s.trys.pop();continue;default:if(m=s.trys,!(m=m.length>0&&m[m.length-1])&&(L[0]===6||L[0]===2)){s=0;continue}if(L[0]===3&&(!m||L[1]>m[0]&&L[1]<m[3])){s.label=L[1];break}if(L[0]===6&&s.label<m[1]){s.label=m[1],m=L;break}if(m&&s.label<m[2]){s.label=m[2],s.ops.push(L);break}m[2]&&s.ops.pop(),s.trys.pop();continue}L=n.call(r,s)}catch(P){L=[6,P],p=0}finally{c=m=0}if(L[0]&5)throw L[1];return{value:L[0]?L[1]:void 0,done:!0}}},S_=function(r,n){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(n,s)&&Fo(n,r,s)},Fo=Object.create?function(r,n,s,c){c===void 0&&(c=s),Object.defineProperty(r,c,{enumerable:!0,get:function(){return n[s]}})}:function(r,n,s,c){c===void 0&&(c=s),r[c]=n[s]},Ao=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,s=n&&r[n],c=0;if(s)return s.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&c>=r.length&&(r=void 0),{value:r&&r[c++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},zu=function(r,n){var s=typeof Symbol=="function"&&r[Symbol.iterator];if(!s)return r;var c=s.call(r),p,m=[],j;try{for(;(n===void 0||n-- >0)&&!(p=c.next()).done;)m.push(p.value)}catch(F){j={error:F}}finally{try{p&&!p.done&&(s=c.return)&&s.call(c)}finally{if(j)throw j.error}}return m},T_=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(zu(arguments[n]));return r},A_=function(){for(var r=0,n=0,s=arguments.length;n<s;n++)r+=arguments[n].length;for(var c=Array(r),p=0,n=0;n<s;n++)for(var m=arguments[n],j=0,F=m.length;j<F;j++,p++)c[p]=m[j];return c},F_=function(r,n,s){if(s||arguments.length===2)for(var c=0,p=n.length,m;c<p;c++)(m||!(c in n))&&(m||(m=Array.prototype.slice.call(n,0,c)),m[c]=n[c]);return r.concat(m||Array.prototype.slice.call(n))},dn=function(r){return this instanceof dn?(this.v=r,this):new dn(r)},D_=function(r,n,s){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=s.apply(r,n||[]),p,m=[];return p={},j("next"),j("throw"),j("return"),p[Symbol.asyncIterator]=function(){return this},p;function j(he){c[he]&&(p[he]=function(je){return new Promise(function(Se,gt){m.push([he,je,Se,gt])>1||F(he,je)})})}function F(he,je){try{R(c[he](je))}catch(Se){ae(m[0][3],Se)}}function R(he){he.value instanceof dn?Promise.resolve(he.value.v).then(L,P):ae(m[0][2],he)}function L(he){F("next",he)}function P(he){F("throw",he)}function ae(he,je){he(je),m.shift(),m.length&&F(m[0][0],m[0][1])}},O_=function(r){var n,s;return n={},c("next"),c("throw",function(p){throw p}),c("return"),n[Symbol.iterator]=function(){return this},n;function c(p,m){n[p]=r[p]?function(j){return(s=!s)?{value:dn(r[p](j)),done:p==="return"}:m?m(j):j}:m}},M_=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],s;return n?n.call(r):(r=typeof Ao=="function"?Ao(r):r[Symbol.iterator](),s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s);function c(m){s[m]=r[m]&&function(j){return new Promise(function(F,R){j=r[m](j),p(F,R,j.done,j.value)})}}function p(m,j,F,R){Promise.resolve(R).then(function(L){m({value:L,done:F})},j)}},C_=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r};var t=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};U_=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var s in r)s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)&&Fo(n,r,s);return t(n,r),n},E_=function(r){return r&&r.__esModule?r:{default:r}},R_=function(r,n,s,c){if(s==="a"&&!c)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!c:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?c:s==="a"?c.call(r):c?c.value:n.get(r)},k_=function(r,n,s,c,p){if(c==="m")throw new TypeError("Private method is not writable");if(c==="a"&&!p)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!p:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return c==="a"?p.call(r,s):p?p.value=s:n.set(r,s),s},i("__extends",m_),i("__assign",b_),i("__rest",g_),i("__decorate",v_),i("__param",j_),i("__metadata",w_),i("__awaiter",B_),i("__generator",I_),i("__exportStar",S_),i("__createBinding",Fo),i("__values",Ao),i("__read",zu),i("__spread",T_),i("__spreadArrays",A_),i("__spreadArray",F_),i("__await",dn),i("__asyncGenerator",D_),i("__asyncDelegator",O_),i("__asyncValues",M_),i("__makeTemplateObject",C_),i("__importStar",U_),i("__importDefault",E_),i("__classPrivateFieldGet",R_),i("__classPrivateFieldSet",k_)})});var Fi=C(V_=>{var D={};D.Offset;D.Table;D.SIZEOF_SHORT=2;D.SIZEOF_INT=4;D.FILE_IDENTIFIER_LENGTH=4;D.SIZE_PREFIX_LENGTH=4;D.Encoding={UTF8_BYTES:1,UTF16_STRING:2};D.int32=new Int32Array(2);D.float32=new Float32Array(D.int32.buffer);D.float64=new Float64Array(D.int32.buffer);D.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;D.Long=function(i,e){this.low=i|0,this.high=e|0};D.Long.create=function(i,e){return i==0&&e==0?D.Long.ZERO:new D.Long(i,e)};D.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};D.Long.prototype.equals=function(i){return this.low==i.low&&this.high==i.high};D.Long.ZERO=new D.Long(0,0);D.Builder=function(i){if(i)var e=i;else var e=1024;this.bb=D.ByteBuffer.allocate(e),this.space=e,this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};D.Builder.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1};D.Builder.prototype.forceDefaults=function(i){this.force_defaults=i};D.Builder.prototype.dataBuffer=function(){return this.bb};D.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};D.Builder.prototype.prep=function(i,e){i>this.minalign&&(this.minalign=i);for(var t=~(this.bb.capacity()-this.space+e)+1&i-1;this.space<t+i+e;){var r=this.bb.capacity();this.bb=D.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-r}this.pad(t)};D.Builder.prototype.pad=function(i){for(var e=0;e<i;e++)this.bb.writeInt8(--this.space,0)};D.Builder.prototype.writeInt8=function(i){this.bb.writeInt8(this.space-=1,i)};D.Builder.prototype.writeInt16=function(i){this.bb.writeInt16(this.space-=2,i)};D.Builder.prototype.writeInt32=function(i){this.bb.writeInt32(this.space-=4,i)};D.Builder.prototype.writeInt64=function(i){this.bb.writeInt64(this.space-=8,i)};D.Builder.prototype.writeFloat32=function(i){this.bb.writeFloat32(this.space-=4,i)};D.Builder.prototype.writeFloat64=function(i){this.bb.writeFloat64(this.space-=8,i)};D.Builder.prototype.addInt8=function(i){this.prep(1,0),this.writeInt8(i)};D.Builder.prototype.addInt16=function(i){this.prep(2,0),this.writeInt16(i)};D.Builder.prototype.addInt32=function(i){this.prep(4,0),this.writeInt32(i)};D.Builder.prototype.addInt64=function(i){this.prep(8,0),this.writeInt64(i)};D.Builder.prototype.addFloat32=function(i){this.prep(4,0),this.writeFloat32(i)};D.Builder.prototype.addFloat64=function(i){this.prep(8,0),this.writeFloat64(i)};D.Builder.prototype.addFieldInt8=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(i))};D.Builder.prototype.addFieldInt16=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(i))};D.Builder.prototype.addFieldInt32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(i))};D.Builder.prototype.addFieldInt64=function(i,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(i))};D.Builder.prototype.addFieldFloat32=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(i))};D.Builder.prototype.addFieldFloat64=function(i,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(i))};D.Builder.prototype.addFieldOffset=function(i,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(i))};D.Builder.prototype.addFieldStruct=function(i,e,t){e!=t&&(this.nested(e),this.slot(i))};D.Builder.prototype.nested=function(i){if(i!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};D.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};D.Builder.prototype.slot=function(i){this.vtable[i]=this.offset()};D.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};D.Builder.growByteBuffer=function(i){var e=i.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,r=D.ByteBuffer.allocate(t);return r.setPosition(t-e),r.bytes().set(i.bytes(),t-e),r};D.Builder.prototype.addOffset=function(i){this.prep(D.SIZEOF_INT,0),this.writeInt32(this.offset()-i+D.SIZEOF_INT)};D.Builder.prototype.startObject=function(i){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=i;for(var e=0;e<i;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};D.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var i=this.offset(),e=this.vtable_in_use-1;e>=0&&this.vtable[e]==0;e--);for(var t=e+1;e>=0;e--)this.addInt16(this.vtable[e]!=0?i-this.vtable[e]:0);var r=2;this.addInt16(i-this.object_start);var n=(t+r)*D.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var p=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(p)){for(var m=D.SIZEOF_SHORT;m<n;m+=D.SIZEOF_SHORT)if(this.bb.readInt16(c+m)!=this.bb.readInt16(p+m))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-i,this.bb.writeInt32(this.space,s-i)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-i,this.offset()-i)),this.isNested=!1,i};D.Builder.prototype.finish=function(i,e,t){var r=t?D.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,D.SIZEOF_INT+D.FILE_IDENTIFIER_LENGTH+r),n.length!=D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+D.FILE_IDENTIFIER_LENGTH);for(var s=D.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,D.SIZEOF_INT+r),this.addOffset(i),r&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};D.Builder.prototype.finishSizePrefixed=function(i,e){this.finish(i,e,!0)};D.Builder.prototype.requiredField=function(i,e){var t=this.bb.capacity()-i,r=t-this.bb.readInt32(t),n=this.bb.readInt16(r+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};D.Builder.prototype.startVector=function(i,e,t){this.notNested(),this.vector_num_elems=e,this.prep(D.SIZEOF_INT,i*e),this.prep(t,i*e)};D.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};D.Builder.prototype.createString=function(i){if(i instanceof Uint8Array)var e=i;else for(var e=[],t=0;t<i.length;){var r,n=i.charCodeAt(t++);if(n<55296||n>=56320)r=n;else{var s=i.charCodeAt(t++);r=(n<<10)+s+(65536-(55296<<10)-56320)}r<128?e.push(r):(r<2048?e.push(r>>6&31|192):(r<65536?e.push(r>>12&15|224):e.push(r>>18&7|240,r>>12&63|128),e.push(r>>6&63|128)),e.push(r&63|128))}this.addInt8(0),this.startVector(1,e.length,1),this.bb.setPosition(this.space-=e.length);for(var t=0,c=this.space,p=this.bb.bytes();t<e.length;t++)p[c++]=e[t];return this.endVector()};D.Builder.prototype.createLong=function(i,e){return D.Long.create(i,e)};D.ByteBuffer=function(i){this.bytes_=i,this.position_=0};D.ByteBuffer.allocate=function(i){return new D.ByteBuffer(new Uint8Array(i))};D.ByteBuffer.prototype.clear=function(){this.position_=0};D.ByteBuffer.prototype.bytes=function(){return this.bytes_};D.ByteBuffer.prototype.position=function(){return this.position_};D.ByteBuffer.prototype.setPosition=function(i){this.position_=i};D.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};D.ByteBuffer.prototype.readInt8=function(i){return this.readUint8(i)<<24>>24};D.ByteBuffer.prototype.readUint8=function(i){return this.bytes_[i]};D.ByteBuffer.prototype.readInt16=function(i){return this.readUint16(i)<<16>>16};D.ByteBuffer.prototype.readUint16=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8};D.ByteBuffer.prototype.readInt32=function(i){return this.bytes_[i]|this.bytes_[i+1]<<8|this.bytes_[i+2]<<16|this.bytes_[i+3]<<24};D.ByteBuffer.prototype.readUint32=function(i){return this.readInt32(i)>>>0};D.ByteBuffer.prototype.readInt64=function(i){return new D.Long(this.readInt32(i),this.readInt32(i+4))};D.ByteBuffer.prototype.readUint64=function(i){return new D.Long(this.readUint32(i),this.readUint32(i+4))};D.ByteBuffer.prototype.readFloat32=function(i){return D.int32[0]=this.readInt32(i),D.float32[0]};D.ByteBuffer.prototype.readFloat64=function(i){return D.int32[D.isLittleEndian?0:1]=this.readInt32(i),D.int32[D.isLittleEndian?1:0]=this.readInt32(i+4),D.float64[0]};D.ByteBuffer.prototype.writeInt8=function(i,e){this.bytes_[i]=e};D.ByteBuffer.prototype.writeUint8=function(i,e){this.bytes_[i]=e};D.ByteBuffer.prototype.writeInt16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};D.ByteBuffer.prototype.writeUint16=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8};D.ByteBuffer.prototype.writeInt32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};D.ByteBuffer.prototype.writeUint32=function(i,e){this.bytes_[i]=e,this.bytes_[i+1]=e>>8,this.bytes_[i+2]=e>>16,this.bytes_[i+3]=e>>24};D.ByteBuffer.prototype.writeInt64=function(i,e){this.writeInt32(i,e.low),this.writeInt32(i+4,e.high)};D.ByteBuffer.prototype.writeUint64=function(i,e){this.writeUint32(i,e.low),this.writeUint32(i+4,e.high)};D.ByteBuffer.prototype.writeFloat32=function(i,e){D.float32[0]=e,this.writeInt32(i,D.int32[0])};D.ByteBuffer.prototype.writeFloat64=function(i,e){D.float64[0]=e,this.writeInt32(i,D.int32[D.isLittleEndian?0:1]),this.writeInt32(i+4,D.int32[D.isLittleEndian?1:0])};D.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+D.SIZEOF_INT+D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var i="",e=0;e<D.FILE_IDENTIFIER_LENGTH;e++)i+=String.fromCharCode(this.readInt8(this.position_+D.SIZEOF_INT+e));return i};D.ByteBuffer.prototype.__offset=function(i,e){var t=i-this.readInt32(i);return e<this.readInt16(t)?this.readInt16(t+e):0};D.ByteBuffer.prototype.__union=function(i,e){return i.bb_pos=e+this.readInt32(e),i.bb=this,i};D.ByteBuffer.prototype.__string=function(i,e){i+=this.readInt32(i);var t=this.readInt32(i),r="",n=0;if(i+=D.SIZEOF_INT,e===D.Encoding.UTF8_BYTES)return this.bytes_.subarray(i,i+t);for(;n<t;){var s,c=this.readUint8(i+n++);if(c<192)s=c;else{var p=this.readUint8(i+n++);if(c<224)s=(c&31)<<6|p&63;else{var m=this.readUint8(i+n++);if(c<240)s=(c&15)<<12|(p&63)<<6|m&63;else{var j=this.readUint8(i+n++);s=(c&7)<<18|(p&63)<<12|(m&63)<<6|j&63}}}s<65536?r+=String.fromCharCode(s):(s-=65536,r+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return r};D.ByteBuffer.prototype.__indirect=function(i){return i+this.readInt32(i)};D.ByteBuffer.prototype.__vector=function(i){return i+this.readInt32(i)+D.SIZEOF_INT};D.ByteBuffer.prototype.__vector_len=function(i){return this.readInt32(i+this.readInt32(i))};D.ByteBuffer.prototype.__has_identifier=function(i){if(i.length!=D.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+D.FILE_IDENTIFIER_LENGTH);for(var e=0;e<D.FILE_IDENTIFIER_LENGTH;e++)if(i.charCodeAt(e)!=this.readInt8(this.position_+D.SIZEOF_INT+e))return!1;return!0};D.ByteBuffer.prototype.createLong=function(i,e){return D.Long.create(i,e)};V_.flatbuffers=D});var kr=C(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.encodeUtf8=fn.decodeUtf8=void 0;var fA=new TextDecoder("utf-8");fn.decodeUtf8=i=>fA.decode(i);var hA=new TextEncoder;fn.encodeUtf8=i=>hA.encode(i)});var hn=C(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.AsyncQueue=mt.ReadableInterop=mt.ArrowJSON=mt.ITERATOR_DONE=void 0;var js=lt(),x_=ws();mt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var P_=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};mt.ArrowJSON=P_;var Wu=class{tee(){return this._getDOMStream().tee()}pipe(e,t){return this._getNodeStream().pipe(e,t)}pipeTo(e,t){return this._getDOMStream().pipeTo(e,t)}pipeThrough(e,t){return this._getDOMStream().pipeThrough(e,t)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}};mt.ReadableInterop=Wu;var N_=class extends Wu{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return js.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(mt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return x_.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return x_.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return js.__awaiter(this,void 0,void 0,function*(){return yield this.abort(e),mt.ITERATOR_DONE})}return(e){return js.__awaiter(this,void 0,void 0,function*(){return yield this.close(),mt.ITERATOR_DONE})}read(e){return js.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return js.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,r)=>{this.resolvers.push({resolve:t,reject:r})}):Promise.resolve(mt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}};mt.AsyncQueue=N_});var dt=C(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.isReadableNodeStream=W.isWritableNodeStream=W.isReadableDOMStream=W.isWritableDOMStream=W.isFetchResponse=W.isFSReadStream=W.isFileHandle=W.isUnderlyingSink=W.isIteratorResult=W.isArrayLike=W.isArrowJSON=W.isAsyncIterable=W.isIterable=W.isObservable=W.isPromise=W.isObject=W.BigUint64ArrayAvailable=W.BigUint64Array=W.BigInt64ArrayAvailable=W.BigInt64Array=W.BigIntAvailable=W.BigInt=void 0;var Oo=hn(),[pA,yA]=(()=>{let i=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw i()}return e.asIntN=()=>{throw i()},e.asUintN=()=>{throw i()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();W.BigInt=pA;W.BigIntAvailable=yA;var[_A,mA]=(()=>{let i=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();W.BigInt64Array=_A;W.BigInt64ArrayAvailable=mA;var[bA,gA]=(()=>{let i=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw i()}static from(){throw i()}constructor(){throw i()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();W.BigUint64Array=bA;W.BigUint64ArrayAvailable=gA;var Yu=i=>typeof i=="number",L_=i=>typeof i=="boolean",ot=i=>typeof i=="function";W.isObject=i=>i!=null&&Object(i)===i;W.isPromise=i=>W.isObject(i)&&ot(i.then);W.isObservable=i=>W.isObject(i)&&ot(i.subscribe);W.isIterable=i=>W.isObject(i)&&ot(i[Symbol.iterator]);W.isAsyncIterable=i=>W.isObject(i)&&ot(i[Symbol.asyncIterator]);W.isArrowJSON=i=>W.isObject(i)&&W.isObject(i.schema);W.isArrayLike=i=>W.isObject(i)&&Yu(i.length);W.isIteratorResult=i=>W.isObject(i)&&"done"in i&&"value"in i;W.isUnderlyingSink=i=>W.isObject(i)&&ot(i.abort)&&ot(i.close)&&ot(i.start)&&ot(i.write);W.isFileHandle=i=>W.isObject(i)&&ot(i.stat)&&Yu(i.fd);W.isFSReadStream=i=>W.isReadableNodeStream(i)&&Yu(i.bytesRead);W.isFetchResponse=i=>W.isObject(i)&&W.isReadableDOMStream(i.body);W.isWritableDOMStream=i=>W.isObject(i)&&ot(i.abort)&&ot(i.getWriter)&&!(i instanceof Oo.ReadableInterop);W.isReadableDOMStream=i=>W.isObject(i)&&ot(i.cancel)&&ot(i.getReader)&&!(i instanceof Oo.ReadableInterop);W.isWritableNodeStream=i=>W.isObject(i)&&ot(i.end)&&ot(i.write)&&L_(i.writable)&&!(i instanceof Oo.ReadableInterop);W.isReadableNodeStream=i=>W.isObject(i)&&ot(i.read)&&ot(i.pipe)&&L_(i.readable)&&!(i instanceof Oo.ReadableInterop)});var Xe=C(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.compareArrayLike=q.rebaseValueOffsets=q.toUint8ClampedArrayAsyncIterator=q.toFloat64ArrayAsyncIterator=q.toFloat32ArrayAsyncIterator=q.toUint32ArrayAsyncIterator=q.toUint16ArrayAsyncIterator=q.toUint8ArrayAsyncIterator=q.toInt32ArrayAsyncIterator=q.toInt16ArrayAsyncIterator=q.toInt8ArrayAsyncIterator=q.toArrayBufferViewAsyncIterator=q.toUint8ClampedArrayIterator=q.toFloat64ArrayIterator=q.toFloat32ArrayIterator=q.toUint32ArrayIterator=q.toUint16ArrayIterator=q.toUint8ArrayIterator=q.toInt32ArrayIterator=q.toInt16ArrayIterator=q.toInt8ArrayIterator=q.toArrayBufferViewIterator=q.toUint8ClampedArray=q.toFloat64Array=q.toFloat32Array=q.toBigUint64Array=q.toUint32Array=q.toUint16Array=q.toUint8Array=q.toBigInt64Array=q.toInt32Array=q.toInt16Array=q.toInt8Array=q.toArrayBufferView=q.joinUint8Arrays=q.memcpy=void 0;var Ye=lt(),vA=Fi(),jA=kr(),wA=vA.flatbuffers.ByteBuffer,Vr=dt(),Gu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function BA(i){let e=i[0]?[i[0]]:[],t,r,n,s;for(let c,p,m=0,j=0,F=i.length;++m<F;){if(c=e[j],p=i[m],!c||!p||c.buffer!==p.buffer||p.byteOffset<c.byteOffset){p&&(e[++j]=p);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:r,byteLength:s}=p,t+n<r||r+s<t){p&&(e[++j]=p);continue}e[j]=new Uint8Array(c.buffer,t,r-t+s)}return e}function $u(i,e,t=0,r=e.byteLength){let n=i.byteLength,s=new Uint8Array(i.buffer,i.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(r,n));return s.set(c,t),i}q.memcpy=$u;function IA(i,e){let t=BA(i),r=t.reduce((F,R)=>F+R.byteLength,0),n,s,c,p=0,m=-1,j=Math.min(e||1/0,r);for(let F=t.length;++m<F;){if(n=t[m],s=n.subarray(0,Math.min(n.length,j-p)),j<=p+s.length){s.length<n.length?t[m]=n.subarray(s.length):s.length===n.length&&m++,c?$u(c,s,p):c=s;break}$u(c||(c=new Uint8Array(j)),s,p),p+=s.length}return[c||new Uint8Array(0),t.slice(m),r-(c?c.byteLength:0)]}q.joinUint8Arrays=IA;function pt(i,e){let t=Vr.isIteratorResult(e)?e.value:e;return t instanceof i?i===Uint8Array?new i(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=jA.encodeUtf8(t)),t instanceof ArrayBuffer?new i(t):t instanceof Gu?new i(t):t instanceof wA?pt(i,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new i(0):new i(t.buffer,t.byteOffset,t.byteLength/i.BYTES_PER_ELEMENT):i.from(t)):new i(0)}q.toArrayBufferView=pt;q.toInt8Array=i=>pt(Int8Array,i);q.toInt16Array=i=>pt(Int16Array,i);q.toInt32Array=i=>pt(Int32Array,i);q.toBigInt64Array=i=>pt(Vr.BigInt64Array,i);q.toUint8Array=i=>pt(Uint8Array,i);q.toUint16Array=i=>pt(Uint16Array,i);q.toUint32Array=i=>pt(Uint32Array,i);q.toBigUint64Array=i=>pt(Vr.BigUint64Array,i);q.toFloat32Array=i=>pt(Float32Array,i);q.toFloat64Array=i=>pt(Float64Array,i);q.toUint8ClampedArray=i=>pt(Uint8ClampedArray,i);var Ku=i=>(i.next(),i);function*ri(i,e){let t=function*(n){yield n},r=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Gu?t(e):Vr.isIterable(e)?e:t(e);return yield*Ku(function*(n){let s=null;do s=n.next(yield pt(i,s));while(!s.done)}(r[Symbol.iterator]())),new i}q.toArrayBufferViewIterator=ri;q.toInt8ArrayIterator=i=>ri(Int8Array,i);q.toInt16ArrayIterator=i=>ri(Int16Array,i);q.toInt32ArrayIterator=i=>ri(Int32Array,i);q.toUint8ArrayIterator=i=>ri(Uint8Array,i);q.toUint16ArrayIterator=i=>ri(Uint16Array,i);q.toUint32ArrayIterator=i=>ri(Uint32Array,i);q.toFloat32ArrayIterator=i=>ri(Float32Array,i);q.toFloat64ArrayIterator=i=>ri(Float64Array,i);q.toUint8ClampedArrayIterator=i=>ri(Uint8ClampedArray,i);function Yt(i,e){return Ye.__asyncGenerator(this,arguments,function*(){if(Vr.isPromise(e))return yield Ye.__await(yield Ye.__await(yield*Ye.__asyncDelegator(Ye.__asyncValues(Yt(i,yield Ye.__await(e))))));let r=function(c){return Ye.__asyncGenerator(this,arguments,function*(){yield yield Ye.__await(yield Ye.__await(c))})},n=function(c){return Ye.__asyncGenerator(this,arguments,function*(){yield Ye.__await(yield*Ye.__asyncDelegator(Ye.__asyncValues(Ku(function*(p){let m=null;do m=p.next(yield m==null?void 0:m.value);while(!m.done)}(c[Symbol.iterator]())))))})},s=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Gu?r(e):Vr.isIterable(e)?n(e):Vr.isAsyncIterable(e)?e:r(e);return yield Ye.__await(yield*Ye.__asyncDelegator(Ye.__asyncValues(Ku(function(c){return Ye.__asyncGenerator(this,arguments,function*(){let p=null;do p=yield Ye.__await(c.next(yield yield Ye.__await(pt(i,p))));while(!p.done)})}(s[Symbol.asyncIterator]()))))),yield Ye.__await(new i)})}q.toArrayBufferViewAsyncIterator=Yt;q.toInt8ArrayAsyncIterator=i=>Yt(Int8Array,i);q.toInt16ArrayAsyncIterator=i=>Yt(Int16Array,i);q.toInt32ArrayAsyncIterator=i=>Yt(Int32Array,i);q.toUint8ArrayAsyncIterator=i=>Yt(Uint8Array,i);q.toUint16ArrayAsyncIterator=i=>Yt(Uint16Array,i);q.toUint32ArrayAsyncIterator=i=>Yt(Uint32Array,i);q.toFloat32ArrayAsyncIterator=i=>Yt(Float32Array,i);q.toFloat64ArrayAsyncIterator=i=>Yt(Float64Array,i);q.toUint8ClampedArrayAsyncIterator=i=>Yt(Uint8ClampedArray,i);function SA(i,e,t){if(i!==0){t=t.slice(0,e+1);for(let r=-1;++r<=e;)t[r]+=i}return t}q.rebaseValueOffsets=SA;function TA(i,e){let t=0,r=i.length;if(r!==e.length)return!1;if(r>0)do if(i[t]!==e[t])return!1;while(++t<r);return!0}q.compareArrayLike=TA});var ws=C(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var Te=lt(),yt=Xe();Xu.default={fromIterable(i){return Mo(AA(i))},fromAsyncIterable(i){return Mo(FA(i))},fromDOMStream(i){return Mo(DA(i))},fromNodeStream(i){return Mo(OA(i))},toDOMStream(i,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(i,e){throw new Error('"toNodeStream" not available in this environment')}};var Mo=i=>(i.next(),i);function*AA(i){let e,t=!1,r=[],n,s,c,p=0;function m(){return s==="peek"?yt.joinUint8Arrays(r,c)[0]:([n,r,p]=yt.joinUint8Arrays(r,c),n)}({cmd:s,size:c}=yield null);let j=yt.toUint8ArrayIterator(i)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-p)?j.next(void 0):j.next(c-p),!e&&n.byteLength>0&&(r.push(n),p+=n.byteLength),e||c<=p)do({cmd:s,size:c}=yield m());while(c<p);while(!e)}catch(F){(t=!0)&&typeof j.throw=="function"&&j.throw(F)}finally{t===!1&&typeof j.return=="function"&&j.return(null)}return null}function FA(i){return Te.__asyncGenerator(this,arguments,function*(){let t,r=!1,n=[],s,c,p,m=0;function j(){return c==="peek"?yt.joinUint8Arrays(n,p)[0]:([s,n,m]=yt.joinUint8Arrays(n,p),s)}({cmd:c,size:p}=yield yield Te.__await(null));let F=yt.toUint8ArrayAsyncIterator(i)[Symbol.asyncIterator]();try{do if({done:t,value:s}=isNaN(p-m)?yield Te.__await(F.next(void 0)):yield Te.__await(F.next(p-m)),!t&&s.byteLength>0&&(n.push(s),m+=s.byteLength),t||p<=m)do({cmd:c,size:p}=yield yield Te.__await(j()));while(p<m);while(!t)}catch(R){(r=!0)&&typeof F.throw=="function"&&(yield Te.__await(F.throw(R)))}finally{r===!1&&typeof F.return=="function"&&(yield Te.__await(F.return(new Uint8Array(0))))}return yield Te.__await(null)})}function DA(i){return Te.__asyncGenerator(this,arguments,function*(){let t=!1,r=!1,n=[],s,c,p,m=0;function j(){return c==="peek"?yt.joinUint8Arrays(n,p)[0]:([s,n,m]=yt.joinUint8Arrays(n,p),s)}({cmd:c,size:p}=yield yield Te.__await(null));let F=new q_(i);try{do if({done:t,value:s}=isNaN(p-m)?yield Te.__await(F.read(void 0)):yield Te.__await(F.read(p-m)),!t&&s.byteLength>0&&(n.push(yt.toUint8Array(s)),m+=s.byteLength),t||p<=m)do({cmd:c,size:p}=yield yield Te.__await(j()));while(p<m);while(!t)}catch(R){(r=!0)&&(yield Te.__await(F.cancel(R)))}finally{r===!1?yield Te.__await(F.cancel()):i.locked&&F.releaseLock()}return yield Te.__await(null)})}var q_=class{constructor(e){this.source=e,this.byobReader=null,this.defaultReader=null;try{this.supportsBYOB=!!(this.reader=this.getBYOBReader())}catch(t){this.supportsBYOB=!(this.reader=this.getDefaultReader())}}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=this.byobReader=this.defaultReader=null}cancel(e){return Te.__awaiter(this,void 0,void 0,function*(){let{reader:t,source:r}=this;t&&(yield t.cancel(e).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(e){return Te.__awaiter(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?yield this.getDefaultReader().read():yield this.readFromBYOBReader(e);return!t.done&&(t.value=yt.toUint8Array(t)),t})}getDefaultReader(){return this.byobReader&&this.releaseLock(),this.defaultReader||(this.defaultReader=this.source.getReader(),this.defaultReader.closed.catch(()=>{})),this.reader=this.defaultReader}getBYOBReader(){return this.defaultReader&&this.releaseLock(),this.byobReader||(this.byobReader=this.source.getReader({mode:"byob"}),this.byobReader.closed.catch(()=>{})),this.reader=this.byobReader}readFromBYOBReader(e){return Te.__awaiter(this,void 0,void 0,function*(){return yield H_(this.getBYOBReader(),new ArrayBuffer(e),0,e)})}};function H_(i,e,t,r){return Te.__awaiter(this,void 0,void 0,function*(){if(t>=r)return{done:!1,value:new Uint8Array(e,0,r)};let{done:n,value:s}=yield i.read(new Uint8Array(e,t,r-t));return(t+=s.byteLength)<r&&!n?yield H_(i,s.buffer,t,r):{done:n,value:new Uint8Array(s.buffer,0,t)}})}var Ju=(i,e)=>{let t=n=>r([e,n]),r;return[e,t,new Promise(n=>(r=n)&&i.once(e,t))]};function OA(i){return Te.__asyncGenerator(this,arguments,function*(){let t=[],r="error",n=!1,s=null,c,p,m=0,j=[],F;function R(){return c==="peek"?yt.joinUint8Arrays(j,p)[0]:([F,j,m]=yt.joinUint8Arrays(j,p),F)}if({cmd:c,size:p}=yield yield Te.__await(null),i.isTTY)return yield yield Te.__await(new Uint8Array(0)),yield Te.__await(null);try{t[0]=Ju(i,"end"),t[1]=Ju(i,"error");do{if(t[2]=Ju(i,"readable"),[r,s]=yield Te.__await(Promise.race(t.map(P=>P[2]))),r==="error")break;if((n=r==="end")||(isFinite(p-m)?(F=yt.toUint8Array(i.read(p-m)),F.byteLength<p-m&&(F=yt.toUint8Array(i.read(void 0)))):F=yt.toUint8Array(i.read(void 0)),F.byteLength>0&&(j.push(F),m+=F.byteLength)),n||p<=m)do({cmd:c,size:p}=yield yield Te.__await(R()));while(p<m)}while(!n)}finally{yield Te.__await(L(t,r==="error"?s:null))}return yield Te.__await(null);function L(P,ae){return F=j=null,new Promise((he,je)=>{for(let[Se,gt]of P)i.off(Se,gt);try{let Se=i.destroy;Se&&Se.call(i,ae),ae=void 0}catch(Se){ae=Se||ae}finally{ae!=null?je(ae):he()}})}})}});var He=C(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.Vector=pn.AbstractVector=void 0;var Co=class{};pn.AbstractVector=Co;pn.Vector=Co;Co.prototype.data=null});var er=C(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.Schema=N.Buffer=N.Field=N.DictionaryEncoding=N.KeyValue=N.Duration=N.Interval=N.Timestamp=N.Time=N.Date=N.Decimal=N.Bool=N.FixedSizeBinary=N.LargeBinary=N.LargeUtf8=N.Binary=N.Utf8=N.FloatingPoint=N.Int=N.Union=N.Map=N.FixedSizeList=N.LargeList=N.List=N.Struct_=N.Null=N.Endianness=N.DictionaryKind=N.Type=N.IntervalUnit=N.TimeUnit=N.DateUnit=N.Precision=N.UnionMode=N.Feature=N.MetadataVersion=void 0;var De=Fi(),MA;(function(i){i[i.V1=0]="V1",i[i.V2=1]="V2",i[i.V3=2]="V3",i[i.V4=3]="V4",i[i.V5=4]="V5"})(MA=N.MetadataVersion||(N.MetadataVersion={}));var CA;(function(i){i[i.UNUSED=0]="UNUSED",i[i.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",i[i.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(CA=N.Feature||(N.Feature={}));var Zu;(function(i){i[i.Sparse=0]="Sparse",i[i.Dense=1]="Dense"})(Zu=N.UnionMode||(N.UnionMode={}));var Qu;(function(i){i[i.HALF=0]="HALF",i[i.SINGLE=1]="SINGLE",i[i.DOUBLE=2]="DOUBLE"})(Qu=N.Precision||(N.Precision={}));var ec;(function(i){i[i.DAY=0]="DAY",i[i.MILLISECOND=1]="MILLISECOND"})(ec=N.DateUnit||(N.DateUnit={}));var xr;(function(i){i[i.SECOND=0]="SECOND",i[i.MILLISECOND=1]="MILLISECOND",i[i.MICROSECOND=2]="MICROSECOND",i[i.NANOSECOND=3]="NANOSECOND"})(xr=N.TimeUnit||(N.TimeUnit={}));var tc;(function(i){i[i.YEAR_MONTH=0]="YEAR_MONTH",i[i.DAY_TIME=1]="DAY_TIME"})(tc=N.IntervalUnit||(N.IntervalUnit={}));var ic;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.FloatingPoint=3]="FloatingPoint",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct_=13]="Struct_",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Duration=18]="Duration",i[i.LargeBinary=19]="LargeBinary",i[i.LargeUtf8=20]="LargeUtf8",i[i.LargeList=21]="LargeList"})(ic=N.Type||(N.Type={}));var rc;(function(i){i[i.DenseArray=0]="DenseArray"})(rc=N.DictionaryKind||(N.DictionaryKind={}));var nc;(function(i){i[i.Little=0]="Little",i[i.Big=1]="Big"})(nc=N.Endianness||(N.Endianness={}));var Pr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsNull(e,t){return(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pr).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Pr.startNull(e),Pr.endNull(e)}};N.Null=Pr;var Nr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsStruct_(e,t){return(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Nr).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Nr.startStruct_(e),Nr.endStruct_(e)}};N.Struct_=Nr;var Lr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsList(e,t){return(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Lr.startList(e),Lr.endList(e)}};N.List=Lr;var qr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeList(e,t){return(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return qr.startLargeList(e),qr.endLargeList(e)}};N.LargeList=qr;var Gi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeList(e,t){return(t||new Gi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Gi).__init(e.readInt32(e.position())+e.position(),e)}listSize(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeList(e){e.startObject(1)}static addListSize(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeList(e){return e.endObject()}static createFixedSizeList(e,t){return Gi.startFixedSizeList(e),Gi.addListSize(e,t),Gi.endFixedSizeList(e)}};N.FixedSizeList=Gi;var $i=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMap(e,t){return(t||new $i).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $i).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){let e=this.bb.__offset(this.bb_pos,4);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startMap(e){e.startObject(1)}static addKeysSorted(e,t){e.addFieldInt8(0,+t,0)}static endMap(e){return e.endObject()}static createMap(e,t){return $i.startMap(e),$i.addKeysSorted(e,t),$i.endMap(e)}};N.Map=$i;var Di=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUnion(e,t){return(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}mode(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Zu.Sparse}typeIds(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readInt32(this.bb.__vector(this.bb_pos+t)+e*4):0}typeIdsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}typeIdsArray(){let e=this.bb.__offset(this.bb_pos,6);return e?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}static startUnion(e){e.startObject(2)}static addMode(e,t){e.addFieldInt16(0,t,Zu.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addInt32(t[r]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,r){return Di.startUnion(e),Di.addMode(e,t),Di.addTypeIds(e,r),Di.endUnion(e)}};N.Union=Di;var ni=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInt(e,t){return(t||new ni).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ni).__init(e.readInt32(e.position())+e.position(),e)}bitWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}isSigned(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startInt(e){e.startObject(2)}static addBitWidth(e,t){e.addFieldInt32(0,t,0)}static addIsSigned(e,t){e.addFieldInt8(1,+t,0)}static endInt(e){return e.endObject()}static createInt(e,t,r){return ni.startInt(e),ni.addBitWidth(e,t),ni.addIsSigned(e,r),ni.endInt(e)}};N.Int=ni;var Ki=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFloatingPoint(e,t){return(t||new Ki).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ki).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Qu.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Qu.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return Ki.startFloatingPoint(e),Ki.addPrecision(e,t),Ki.endFloatingPoint(e)}};N.FloatingPoint=Ki;var Hr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hr).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Hr.startUtf8(e),Hr.endUtf8(e)}};N.Utf8=Hr;var zr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBinary(e,t){return(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zr).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return zr.startBinary(e),zr.endBinary(e)}};N.Binary=zr;var Wr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeUtf8(e,t){return(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Wr.startLargeUtf8(e),Wr.endLargeUtf8(e)}};N.LargeUtf8=Wr;var Yr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsLargeBinary(e,t){return(t||new Yr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yr).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Yr.startLargeBinary(e),Yr.endLargeBinary(e)}};N.LargeBinary=Yr;var Ji=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFixedSizeBinary(e,t){return(t||new Ji).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ji).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}static startFixedSizeBinary(e){e.startObject(1)}static addByteWidth(e,t){e.addFieldInt32(0,t,0)}static endFixedSizeBinary(e){return e.endObject()}static createFixedSizeBinary(e,t){return Ji.startFixedSizeBinary(e),Ji.addByteWidth(e,t),Ji.endFixedSizeBinary(e)}};N.FixedSizeBinary=Ji;var Gr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBool(e,t){return(t||new Gr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Gr).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Gr.startBool(e),Gr.endBool(e)}};N.Bool=Gr;var si=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDecimal(e,t){return(t||new si).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new si).__init(e.readInt32(e.position())+e.position(),e)}precision(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt32(this.bb_pos+e):0}scale(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):0}bitWidth(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readInt32(this.bb_pos+e):128}static startDecimal(e){e.startObject(3)}static addPrecision(e,t){e.addFieldInt32(0,t,0)}static addScale(e,t){e.addFieldInt32(1,t,0)}static addBitWidth(e,t){e.addFieldInt32(2,t,128)}static endDecimal(e){return e.endObject()}static createDecimal(e,t,r,n){return si.startDecimal(e),si.addPrecision(e,t),si.addScale(e,r),si.addBitWidth(e,n),si.endDecimal(e)}};N.Decimal=si;var Xi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDate(e,t){return(t||new Xi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Xi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ec.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,ec.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Xi.startDate(e),Xi.addUnit(e,t),Xi.endDate(e)}};N.Date=Xi;var Oi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTime(e,t){return(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):xr.MILLISECOND}bitWidth(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt32(this.bb_pos+e):32}static startTime(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,xr.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,r){return Oi.startTime(e),Oi.addUnit(e,t),Oi.addBitWidth(e,r),Oi.endTime(e)}};N.Time=Oi;var Mi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsTimestamp(e,t){return(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):xr.SECOND}timezone(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startTimestamp(e){e.startObject(2)}static addUnit(e,t){e.addFieldInt16(0,t,xr.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,r){return Mi.startTimestamp(e),Mi.addUnit(e,t),Mi.addTimezone(e,r),Mi.endTimestamp(e)}};N.Timestamp=Mi;var Zi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsInterval(e,t){return(t||new Zi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Zi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):tc.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,tc.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Zi.startInterval(e),Zi.addUnit(e,t),Zi.endInterval(e)}};N.Interval=Zi;var Qi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDuration(e,t){return(t||new Qi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qi).__init(e.readInt32(e.position())+e.position(),e)}unit(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):xr.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,xr.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Qi.startDuration(e),Qi.addUnit(e,t),Qi.endDuration(e)}};N.Duration=Qi;var Gt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsKeyValue(e,t){return(t||new Gt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Gt).__init(e.readInt32(e.position())+e.position(),e)}key(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}value(e){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__string(this.bb_pos+t,e):null}static startKeyValue(e){e.startObject(2)}static addKey(e,t){e.addFieldOffset(0,t,0)}static addValue(e,t){e.addFieldOffset(1,t,0)}static endKeyValue(e){return e.endObject()}static createKeyValue(e,t,r){return Gt.startKeyValue(e),Gt.addKey(e,t),Gt.addValue(e,r),Gt.endKeyValue(e)}};N.KeyValue=Gt;var Tt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryEncoding(e,t){return(t||new Tt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Tt).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}indexType(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new ni).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isOrdered(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}dictionaryKind(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt16(this.bb_pos+e):rc.DenseArray}static startDictionaryEncoding(e){e.startObject(4)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addIndexType(e,t){e.addFieldOffset(1,t,0)}static addIsOrdered(e,t){e.addFieldInt8(2,+t,0)}static addDictionaryKind(e,t){e.addFieldInt16(3,t,rc.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,r,n,s){return Tt.startDictionaryEncoding(e),Tt.addId(e,t),Tt.addIndexType(e,r),Tt.addIsOrdered(e,n),Tt.addDictionaryKind(e,s),Tt.endDictionaryEncoding(e)}};N.DictionaryEncoding=Tt;var ft=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new ft).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ft).__init(e.readInt32(e.position())+e.position(),e)}name(e){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){let e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):ic.NONE}type(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){let t=this.bb.__offset(this.bb_pos,12);return t?(e||new Tt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let r=this.bb.__offset(this.bb_pos,14);return r?(t||new ft).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}childrenLength(){let e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,16);return r?(t||new Gt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,ic.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,r,n,s,c,p,m){return ft.startField(e),ft.addName(e,t),ft.addNullable(e,r),ft.addTypeType(e,n),ft.addType(e,s),ft.addDictionary(e,c),ft.addChildren(e,p),ft.addCustomMetadata(e,m),ft.endField(e)}};N.Field=ft;var z_=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static createBuffer(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};N.Buffer=z_;var $t=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new $t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+De.flatbuffers.SIZE_PREFIX_LENGTH),(t||new $t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):nc.Little}fields(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new ft).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}fieldsLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new Gt).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):this.bb.createLong(0,0)}featuresLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,nc.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let r=t.length-1;r>=0;r--)e.addInt64(t[r]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,r,n,s){return $t.startSchema(e),$t.addEndianness(e,t),$t.addFields(e,r),$t.addCustomMetadata(e,n),$t.addFeatures(e,s),$t.endSchema(e)}};N.Schema=$t});var Ro=C(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.Message=ze.DictionaryBatch=ze.RecordBatch=ze.BodyCompression=ze.FieldNode=ze.MessageHeader=ze.BodyCompressionMethod=ze.CompressionType=void 0;var Uo=Fi(),Eo=er(),sc;(function(i){i[i.LZ4_FRAME=0]="LZ4_FRAME",i[i.ZSTD=1]="ZSTD"})(sc=ze.CompressionType||(ze.CompressionType={}));var oc;(function(i){i[i.BUFFER=0]="BUFFER"})(oc=ze.BodyCompressionMethod||(ze.BodyCompressionMethod={}));var ac;(function(i){i[i.NONE=0]="NONE",i[i.Schema=1]="Schema",i[i.DictionaryBatch=2]="DictionaryBatch",i[i.RecordBatch=3]="RecordBatch",i[i.Tensor=4]="Tensor",i[i.SparseTensor=5]="SparseTensor"})(ac=ze.MessageHeader||(ze.MessageHeader={}));var uc=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static createFieldNode(e,t,r){return e.prep(8,16),e.writeInt64(r),e.writeInt64(t),e.offset()}};ze.FieldNode=uc;var oi=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsBodyCompression(e,t){return(t||new oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+Uo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new oi).__init(e.readInt32(e.position())+e.position(),e)}codec(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt8(this.bb_pos+e):sc.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):oc.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,sc.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,oc.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,r){return oi.startBodyCompression(e),oi.addCodec(e,t),oi.addMethod(e,r),oi.endBodyCompression(e)}};ze.BodyCompression=oi;var At=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsRecordBatch(e,t){return(t||new At).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+Uo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new At).__init(e.readInt32(e.position())+e.position(),e)}length(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}nodes(e,t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new uc).__init(this.bb.__vector(this.bb_pos+r)+e*16,this.bb):null}nodesLength(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}buffers(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new Eo.Buffer).__init(this.bb.__vector(this.bb_pos+r)+e*16,this.bb):null}buffersLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}compression(e){let t=this.bb.__offset(this.bb_pos,10);return t?(e||new oi).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}static startRecordBatch(e){e.startObject(4)}static addLength(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addNodes(e,t){e.addFieldOffset(1,t,0)}static startNodesVector(e,t){e.startVector(16,t,8)}static addBuffers(e,t){e.addFieldOffset(2,t,0)}static startBuffersVector(e,t){e.startVector(16,t,8)}static addCompression(e,t){e.addFieldOffset(3,t,0)}static endRecordBatch(e){return e.endObject()}static createRecordBatch(e,t,r,n,s){return At.startRecordBatch(e),At.addLength(e,t),At.addNodes(e,r),At.addBuffers(e,n),At.addCompression(e,s),At.endRecordBatch(e)}};ze.RecordBatch=At;var ai=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsDictionaryBatch(e,t){return(t||new ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+Uo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ai).__init(e.readInt32(e.position())+e.position(),e)}id(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}data(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new At).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}isDelta(){let e=this.bb.__offset(this.bb_pos,8);return e?!!this.bb.readInt8(this.bb_pos+e):!1}static startDictionaryBatch(e){e.startObject(3)}static addId(e,t){e.addFieldInt64(0,t,e.createLong(0,0))}static addData(e,t){e.addFieldOffset(1,t,0)}static addIsDelta(e,t){e.addFieldInt8(2,+t,0)}static endDictionaryBatch(e){return e.endObject()}static createDictionaryBatch(e,t,r,n){return ai.startDictionaryBatch(e),ai.addId(e,t),ai.addData(e,r),ai.addIsDelta(e,n),ai.endDictionaryBatch(e)}};ze.DictionaryBatch=ai;var Ft=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new Ft).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+Uo.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ft).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Eo.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):ac.NONE}header(e){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):this.bb.createLong(0,0)}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new Eo.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,Eo.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,ac.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,e.createLong(0,0))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,r,n,s,c){return Ft.startMessage(e),Ft.addVersion(e,t),Ft.addHeaderType(e,r),Ft.addHeader(e,n),Ft.addBodyLength(e,s),Ft.addCustomMetadata(e,c),Ft.endMessage(e)}};ze.Message=Ft});var Fe=C(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.BufferType=ke.Type=ke.MessageHeader=ke.MetadataVersion=ke.IntervalUnit=ke.UnionMode=ke.Precision=ke.TimeUnit=ke.DateUnit=void 0;var yn=er();Object.defineProperty(ke,"DateUnit",{enumerable:!0,get:function(){return yn.DateUnit}});Object.defineProperty(ke,"TimeUnit",{enumerable:!0,get:function(){return yn.TimeUnit}});Object.defineProperty(ke,"Precision",{enumerable:!0,get:function(){return yn.Precision}});Object.defineProperty(ke,"UnionMode",{enumerable:!0,get:function(){return yn.UnionMode}});Object.defineProperty(ke,"IntervalUnit",{enumerable:!0,get:function(){return yn.IntervalUnit}});Object.defineProperty(ke,"MetadataVersion",{enumerable:!0,get:function(){return yn.MetadataVersion}});var UA=Ro();Object.defineProperty(ke,"MessageHeader",{enumerable:!0,get:function(){return UA.MessageHeader}});var EA;(function(i){i[i.NONE=0]="NONE",i[i.Null=1]="Null",i[i.Int=2]="Int",i[i.Float=3]="Float",i[i.Binary=4]="Binary",i[i.Utf8=5]="Utf8",i[i.Bool=6]="Bool",i[i.Decimal=7]="Decimal",i[i.Date=8]="Date",i[i.Time=9]="Time",i[i.Timestamp=10]="Timestamp",i[i.Interval=11]="Interval",i[i.List=12]="List",i[i.Struct=13]="Struct",i[i.Union=14]="Union",i[i.FixedSizeBinary=15]="FixedSizeBinary",i[i.FixedSizeList=16]="FixedSizeList",i[i.Map=17]="Map",i[i.Dictionary=-1]="Dictionary",i[i.Int8=-2]="Int8",i[i.Int16=-3]="Int16",i[i.Int32=-4]="Int32",i[i.Int64=-5]="Int64",i[i.Uint8=-6]="Uint8",i[i.Uint16=-7]="Uint16",i[i.Uint32=-8]="Uint32",i[i.Uint64=-9]="Uint64",i[i.Float16=-10]="Float16",i[i.Float32=-11]="Float32",i[i.Float64=-12]="Float64",i[i.DateDay=-13]="DateDay",i[i.DateMillisecond=-14]="DateMillisecond",i[i.TimestampSecond=-15]="TimestampSecond",i[i.TimestampMillisecond=-16]="TimestampMillisecond",i[i.TimestampMicrosecond=-17]="TimestampMicrosecond",i[i.TimestampNanosecond=-18]="TimestampNanosecond",i[i.TimeSecond=-19]="TimeSecond",i[i.TimeMillisecond=-20]="TimeMillisecond",i[i.TimeMicrosecond=-21]="TimeMicrosecond",i[i.TimeNanosecond=-22]="TimeNanosecond",i[i.DenseUnion=-23]="DenseUnion",i[i.SparseUnion=-24]="SparseUnion",i[i.IntervalDayTime=-25]="IntervalDayTime",i[i.IntervalYearMonth=-26]="IntervalYearMonth"})(EA=ke.Type||(ke.Type={}));var RA;(function(i){i[i.OFFSET=0]="OFFSET",i[i.DATA=1]="DATA",i[i.VALIDITY=2]="VALIDITY",i[i.TYPE=3]="TYPE"})(RA=ke.BufferType||(ke.BufferType={}))});var ui=C(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.popcnt_uint32=Ge.popcnt_array=Ge.popcnt_bit_range=Ge.BitIterator=Ge.packBools=Ge.truncateBitmap=Ge.setBool=Ge.getBit=Ge.getBool=void 0;function W_(i,e,t,r){return(t&1<<r)!==0}Ge.getBool=W_;function Y_(i,e,t,r){return(t&1<<r)>>r}Ge.getBit=Y_;function kA(i,e,t){return t?!!(i[e>>3]|=1<<e%8)||!0:!(i[e>>3]&=~(1<<e%8))&&!1}Ge.setBool=kA;function VA(i,e,t){let r=t.byteLength+7&~7;if(i>0||t.byteLength<r){let n=new Uint8Array(r);return n.set(i%8===0?t.subarray(i>>3):G_(new ko(t,i,e,null,W_)).subarray(0,r)),n}return t}Ge.truncateBitmap=VA;function G_(i){let e=[],t=0,r=0,n=0;for(let c of i)c&&(n|=1<<r),++r===8&&(e[t++]=n,n=r=0);(t===0||r>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ge.packBools=G_;var ko=class{constructor(e,t,r,n,s){this.bytes=e,this.length=r,this.context=n,this.get=s,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index<this.length?(this.bit===8&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}};Ge.BitIterator=ko;function cc(i,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new ko(i,e,t-e,i,Y_))s+=c;return s}let r=t>>3<<3,n=e+(e%8===0?0:8-e%8);return cc(i,e,n)+cc(i,r,t)+$_(i,n>>3,r-n>>3)}Ge.popcnt_bit_range=cc;function $_(i,e,t){let r=0,n=e|0,s=new DataView(i.buffer,i.byteOffset,i.byteLength),c=t===void 0?i.byteLength:n+t;for(;c-n>=4;)r+=Vo(s.getUint32(n)),n+=4;for(;c-n>=2;)r+=Vo(s.getUint16(n)),n+=2;for(;c-n>=1;)r+=Vo(s.getUint8(n)),n+=1;return r}Ge.popcnt_array=$_;function Vo(i){let e=i|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ge.popcnt_uint32=Vo});var we=C(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.strideForType=k.Dictionary=k.Map_=k.FixedSizeList=k.FixedSizeBinary=k.SparseUnion=k.DenseUnion=k.Union=k.Struct=k.List=k.IntervalYearMonth=k.IntervalDayTime=k.Interval=k.TimestampNanosecond=k.TimestampMicrosecond=k.TimestampMillisecond=k.TimestampSecond=k.Timestamp=k.TimeNanosecond=k.TimeMicrosecond=k.TimeMillisecond=k.TimeSecond=k.Time=k.DateMillisecond=k.DateDay=k.Date_=k.Decimal=k.Bool=k.Utf8=k.Binary=k.Float64=k.Float32=k.Float16=k.Float=k.Uint64=k.Uint32=k.Uint16=k.Uint8=k.Int64=k.Int32=k.Int16=k.Int8=k.Int=k.Null=k.DataType=void 0;var z=Fe(),Ve=class{static isNull(e){return(e==null?void 0:e.typeId)===z.Type.Null}static isInt(e){return(e==null?void 0:e.typeId)===z.Type.Int}static isFloat(e){return(e==null?void 0:e.typeId)===z.Type.Float}static isBinary(e){return(e==null?void 0:e.typeId)===z.Type.Binary}static isUtf8(e){return(e==null?void 0:e.typeId)===z.Type.Utf8}static isBool(e){return(e==null?void 0:e.typeId)===z.Type.Bool}static isDecimal(e){return(e==null?void 0:e.typeId)===z.Type.Decimal}static isDate(e){return(e==null?void 0:e.typeId)===z.Type.Date}static isTime(e){return(e==null?void 0:e.typeId)===z.Type.Time}static isTimestamp(e){return(e==null?void 0:e.typeId)===z.Type.Timestamp}static isInterval(e){return(e==null?void 0:e.typeId)===z.Type.Interval}static isList(e){return(e==null?void 0:e.typeId)===z.Type.List}static isStruct(e){return(e==null?void 0:e.typeId)===z.Type.Struct}static isUnion(e){return(e==null?void 0:e.typeId)===z.Type.Union}static isFixedSizeBinary(e){return(e==null?void 0:e.typeId)===z.Type.FixedSizeBinary}static isFixedSizeList(e){return(e==null?void 0:e.typeId)===z.Type.FixedSizeList}static isMap(e){return(e==null?void 0:e.typeId)===z.Type.Map}static isDictionary(e){return(e==null?void 0:e.typeId)===z.Type.Dictionary}get typeId(){return z.Type.NONE}};k.DataType=Ve;Ve[Symbol.toStringTag]=(i=>(i.children=null,i.ArrayType=Array,i[Symbol.toStringTag]="DataType"))(Ve.prototype);var xo=class extends Ve{toString(){return"Null"}get typeId(){return z.Type.Null}};k.Null=xo;xo[Symbol.toStringTag]=(i=>i[Symbol.toStringTag]="Null")(xo.prototype);var Dt=class extends Ve{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return z.Type.Int}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?Int32Array:Uint32Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};k.Int=Dt;Dt[Symbol.toStringTag]=(i=>(i.isSigned=null,i.bitWidth=null,i[Symbol.toStringTag]="Int"))(Dt.prototype);var lc=class extends Dt{constructor(){super(!0,8)}};k.Int8=lc;var dc=class extends Dt{constructor(){super(!0,16)}};k.Int16=dc;var fc=class extends Dt{constructor(){super(!0,32)}};k.Int32=fc;var hc=class extends Dt{constructor(){super(!0,64)}};k.Int64=hc;var pc=class extends Dt{constructor(){super(!1,8)}};k.Uint8=pc;var yc=class extends Dt{constructor(){super(!1,16)}};k.Uint16=yc;var _c=class extends Dt{constructor(){super(!1,32)}};k.Uint32=_c;var mc=class extends Dt{constructor(){super(!1,64)}};k.Uint64=mc;Object.defineProperty(lc.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(dc.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(fc.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(hc.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(pc.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(yc.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(_c.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty(mc.prototype,"ArrayType",{value:Uint32Array});var $r=class extends Ve{constructor(e){super();this.precision=e}get typeId(){return z.Type.Float}get ArrayType(){switch(this.precision){case z.Precision.HALF:return Uint16Array;case z.Precision.SINGLE:return Float32Array;case z.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=$r;$r[Symbol.toStringTag]=(i=>(i.precision=null,i[Symbol.toStringTag]="Float"))($r.prototype);var bc=class extends $r{constructor(){super(z.Precision.HALF)}};k.Float16=bc;var gc=class extends $r{constructor(){super(z.Precision.SINGLE)}};k.Float32=gc;var vc=class extends $r{constructor(){super(z.Precision.DOUBLE)}};k.Float64=vc;Object.defineProperty(bc.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(gc.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(vc.prototype,"ArrayType",{value:Float64Array});var Po=class extends Ve{constructor(){super()}get typeId(){return z.Type.Binary}toString(){return"Binary"}};k.Binary=Po;Po[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Binary"))(Po.prototype);var No=class extends Ve{constructor(){super()}get typeId(){return z.Type.Utf8}toString(){return"Utf8"}};k.Utf8=No;No[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Utf8"))(No.prototype);var Lo=class extends Ve{constructor(){super()}get typeId(){return z.Type.Bool}toString(){return"Bool"}};k.Bool=Lo;Lo[Symbol.toStringTag]=(i=>(i.ArrayType=Uint8Array,i[Symbol.toStringTag]="Bool"))(Lo.prototype);var qo=class extends Ve{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return z.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=qo;qo[Symbol.toStringTag]=(i=>(i.scale=null,i.precision=null,i.ArrayType=Uint32Array,i[Symbol.toStringTag]="Decimal"))(qo.prototype);var _n=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return z.Type.Date}toString(){return`Date${(this.unit+1)*32}<${z.DateUnit[this.unit]}>`}};k.Date_=_n;_n[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Date"))(_n.prototype);var K_=class extends _n{constructor(){super(z.DateUnit.DAY)}};k.DateDay=K_;var J_=class extends _n{constructor(){super(z.DateUnit.MILLISECOND)}};k.DateMillisecond=J_;var tr=class extends Ve{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return z.Type.Time}toString(){return`Time${this.bitWidth}<${z.TimeUnit[this.unit]}>`}};k.Time=tr;tr[Symbol.toStringTag]=(i=>(i.unit=null,i.bitWidth=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Time"))(tr.prototype);var X_=class extends tr{constructor(){super(z.TimeUnit.SECOND,32)}};k.TimeSecond=X_;var Z_=class extends tr{constructor(){super(z.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=Z_;var Q_=class extends tr{constructor(){super(z.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=Q_;var em=class extends tr{constructor(){super(z.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=em;var ir=class extends Ve{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return z.Type.Timestamp}toString(){return`Timestamp<${z.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=ir;ir[Symbol.toStringTag]=(i=>(i.unit=null,i.timezone=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Timestamp"))(ir.prototype);var tm=class extends ir{constructor(e){super(z.TimeUnit.SECOND,e)}};k.TimestampSecond=tm;var im=class extends ir{constructor(e){super(z.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=im;var rm=class extends ir{constructor(e){super(z.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=rm;var nm=class extends ir{constructor(e){super(z.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=nm;var mn=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return z.Type.Interval}toString(){return`Interval<${z.IntervalUnit[this.unit]}>`}};k.Interval=mn;mn[Symbol.toStringTag]=(i=>(i.unit=null,i.ArrayType=Int32Array,i[Symbol.toStringTag]="Interval"))(mn.prototype);var sm=class extends mn{constructor(){super(z.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=sm;var om=class extends mn{constructor(){super(z.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=om;var Ho=class extends Ve{constructor(e){super();this.children=[e]}get typeId(){return z.Type.List}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};k.List=Ho;Ho[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="List"))(Ho.prototype);var zo=class extends Ve{constructor(e){super();this.children=e}get typeId(){return z.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=zo;zo[Symbol.toStringTag]=(i=>(i.children=null,i[Symbol.toStringTag]="Struct"))(zo.prototype);var bn=class extends Ve{constructor(e,t,r){super();this.mode=e,this.children=r,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return z.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=bn;bn[Symbol.toStringTag]=(i=>(i.mode=null,i.typeIds=null,i.children=null,i.typeIdToChildIndex=null,i.ArrayType=Int8Array,i[Symbol.toStringTag]="Union"))(bn.prototype);var am=class extends bn{constructor(e,t){super(z.UnionMode.Dense,e,t)}};k.DenseUnion=am;var um=class extends bn{constructor(e,t){super(z.UnionMode.Sparse,e,t)}};k.SparseUnion=um;var Wo=class extends Ve{constructor(e){super();this.byteWidth=e}get typeId(){return z.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Wo;Wo[Symbol.toStringTag]=(i=>(i.byteWidth=null,i.ArrayType=Uint8Array,i[Symbol.toStringTag]="FixedSizeBinary"))(Wo.prototype);var Yo=class extends Ve{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return z.Type.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};k.FixedSizeList=Yo;Yo[Symbol.toStringTag]=(i=>(i.children=null,i.listSize=null,i[Symbol.toStringTag]="FixedSizeList"))(Yo.prototype);var Go=class extends Ve{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return z.Type.Map}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Map_=Go;Go[Symbol.toStringTag]=(i=>(i.children=null,i.keysSorted=null,i[Symbol.toStringTag]="Map_"))(Go.prototype);var xA=(i=>()=>++i)(-1),$o=class extends Ve{constructor(e,t,r,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?xA():typeof r=="number"?r:r.low}get typeId(){return z.Type.Dictionary}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};k.Dictionary=$o;$o[Symbol.toStringTag]=(i=>(i.id=null,i.indices=null,i.isOrdered=null,i.dictionary=null,i[Symbol.toStringTag]="Dictionary"))($o.prototype);function PA(i){let e=i;switch(i.typeId){case z.Type.Decimal:return 4;case z.Type.Timestamp:return 2;case z.Type.Date:return 1+e.unit;case z.Type.Interval:return 1+e.unit;case z.Type.Int:return 1+ +(e.bitWidth>32);case z.Type.Time:return 1+ +(e.bitWidth>32);case z.Type.FixedSizeList:return e.listSize;case z.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=PA});var Kt=C(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.Data=Kr.kUnknownNullCount=void 0;var NA=ui(),LA=ui(),Y=Fe(),qA=we(),be=Xe();Kr.kUnknownNullCount=-1;var se=class{constructor(e,t,r,n,s,c,p){this.type=e,this.dictionary=p,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(j=>j instanceof se?j:j.data);let m;s instanceof se?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=qA.strideForType(e),s&&((m=s[0])&&(this.valueOffsets=m),(m=s[1])&&(this.values=m),(m=s[2])&&(this.nullBitmap=m),(m=s[3])&&(this.typeIds=m)))}get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get byteLength(){let e=0,{valueOffsets:t,values:r,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,p)=>c+p.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Kr.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-LA.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,r=this.length,n=this._nullCount,s=this,c=this.childData){return new se(e,t,r,n,s,c,this.dictionary)}slice(e,t){let{stride:r,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,p=n===16?r:1,m=this._sliceBuffers(e,t,r,n);return this.clone(this.type,this.offset+e,t,c,m,!s.length||this.valueOffsets?s:this._sliceChildren(s,p*e,p*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===Y.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:r}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,r>0&&n.set(NA.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[Y.BufferType.VALIDITY]=n,this.clone(this.type,0,e,r+(e-t),s)}_sliceBuffers(e,t,r,n){let s,{buffers:c}=this;return(s=c[Y.BufferType.TYPE])&&(c[Y.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[Y.BufferType.OFFSET])&&(c[Y.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[Y.BufferType.DATA])&&(c[Y.BufferType.DATA]=n===6?s:s.subarray(r*e,r*(e+t))),c}_sliceChildren(e,t,r){return e.map(n=>n.slice(t,r))}static new(e,t,r,n,s,c,p){switch(s instanceof se?s=s.buffers:s||(s=[]),e.typeId){case Y.Type.Null:return se.Null(e,t,r);case Y.Type.Int:return se.Int(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Dictionary:return se.Dictionary(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[],p);case Y.Type.Float:return se.Float(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Bool:return se.Bool(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Decimal:return se.Decimal(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Date:return se.Date(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Time:return se.Time(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Timestamp:return se.Timestamp(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Interval:return se.Interval(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.FixedSizeBinary:return se.FixedSizeBinary(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.DATA]||[]);case Y.Type.Binary:return se.Binary(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.OFFSET]||[],s[Y.BufferType.DATA]||[]);case Y.Type.Utf8:return se.Utf8(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.OFFSET]||[],s[Y.BufferType.DATA]||[]);case Y.Type.List:return se.List(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.OFFSET]||[],(c||[])[0]);case Y.Type.FixedSizeList:return se.FixedSizeList(e,t,r,n||0,s[Y.BufferType.VALIDITY],(c||[])[0]);case Y.Type.Struct:return se.Struct(e,t,r,n||0,s[Y.BufferType.VALIDITY],c||[]);case Y.Type.Map:return se.Map(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.OFFSET]||[],(c||[])[0]);case Y.Type.Union:return se.Union(e,t,r,n||0,s[Y.BufferType.VALIDITY],s[Y.BufferType.TYPE]||[],s[Y.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,r){return new se(e,t,r,0)}static Int(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Dictionary(e,t,r,n,s,c,p){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.indices.ArrayType,c),be.toUint8Array(s)],[],p)}static Float(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Bool(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Decimal(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Date(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Time(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Timestamp(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Interval(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static FixedSizeBinary(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,be.toArrayBufferView(e.ArrayType,c),be.toUint8Array(s)])}static Binary(e,t,r,n,s,c,p){return new se(e,t,r,n,[be.toInt32Array(c),be.toUint8Array(p),be.toUint8Array(s)])}static Utf8(e,t,r,n,s,c,p){return new se(e,t,r,n,[be.toInt32Array(c),be.toUint8Array(p),be.toUint8Array(s)])}static List(e,t,r,n,s,c,p){return new se(e,t,r,n,[be.toInt32Array(c),void 0,be.toUint8Array(s)],p?[p]:[])}static FixedSizeList(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,void 0,be.toUint8Array(s)],c?[c]:[])}static Struct(e,t,r,n,s,c){return new se(e,t,r,n,[void 0,void 0,be.toUint8Array(s)],c)}static Map(e,t,r,n,s,c,p){return new se(e,t,r,n,[be.toInt32Array(c),void 0,be.toUint8Array(s)],p?[p]:[])}static Union(e,t,r,n,s,c,p,m){let j=[void 0,void 0,be.toUint8Array(s),be.toArrayBufferView(e.ArrayType,c)];return e.mode===Y.UnionMode.Sparse?new se(e,t,r,n,j,p):(j[Y.BufferType.OFFSET]=be.toInt32Array(p),new se(e,t,r,n,j,m))}};Kr.Data=se;se.prototype.childData=Object.freeze([])});var jc=C(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.valueToString=void 0;var HA=void 0;function zA(i){if(i===null)return"null";if(i===HA)return"undefined";switch(typeof i){case"number":return`${i}`;case"bigint":return`${i}`;case"string":return`"${i}"`}return typeof i[Symbol.toPrimitive]=="function"?i[Symbol.toPrimitive]("string"):ArrayBuffer.isView(i)?`[${i}]`:JSON.stringify(i)}Ko.valueToString=zA});var cm=C(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.createIsValidFunction=void 0;var wc=jc(),WA=dt();function YA(i){if(!i||i.length<=0)return function(n){return!0};let e="",t=i.filter(r=>r===r);return t.length>0&&(e=`
|
|
2
|
+
switch (x) {${t.map(r=>`
|
|
3
|
+
case ${GA(r)}:`).join("")}
|
|
4
|
+
return false;
|
|
5
|
+
}`),i.length!==t.length&&(e=`if (x !== x) return false;
|
|
6
|
+
${e}`),new Function("x",`${e}
|
|
7
|
+
return true;`)}Jo.createIsValidFunction=YA;function GA(i){return typeof i!="bigint"?wc.valueToString(i):WA.BigIntAvailable?`${wc.valueToString(i)}n`:`"${wc.valueToString(i)}"`}});var rr=C(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.WideBufferBuilder=Ot.OffsetsBufferBuilder=Ot.BitmapBufferBuilder=Ot.DataBufferBuilder=Ot.BufferBuilder=void 0;var lm=Xe(),Bc=dt(),Ic=(i,e)=>(i*e+63&~63||64)/e,$A=(i,e=0)=>i.length>=e?i.subarray(0,e):lm.memcpy(new i.constructor(e),i,0),Bs=class{constructor(e,t=1){this.buffer=e,this.stride=t,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e.constructor,this._resize(this.length=e.length/t|0)}get byteLength(){return this.length*this.stride*this.BYTES_PER_ELEMENT|0}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,r=this.length*t,n=this.buffer.length;r>=n&&this._resize(n===0?Ic(r*1,this.BYTES_PER_ELEMENT):Ic(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=Ic(e*this.stride,this.BYTES_PER_ELEMENT);let t=$A(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=lm.memcpy(new this.ArrayType(e),this.buffer)}};Ot.BufferBuilder=Bs;Bs.prototype.offset=0;var Xo=class extends Bs{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}};Ot.DataBufferBuilder=Xo;var dm=class extends Xo{constructor(e=new Uint8Array(0)){super(e,1/8);this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:r}=this.reserve(e-this.length+1),n=e>>3,s=e%8,c=r[n]>>s&1;return t?c===0&&(r[n]|=1<<s,++this.numValid):c===1&&(r[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};Ot.BitmapBufferBuilder=dm;var fm=class extends Xo{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let r=this.length-1,n=this.reserve(e-r+1).buffer;return r<e++&&n.fill(n[r],r,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,0),super.flush(e+1)}};Ot.OffsetsBufferBuilder=fm;var hm=class extends Bs{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Bc.BigInt64Array:Bc.BigUint64Array)}set(e,t){switch(this.reserve(e-this.length+1),typeof t){case"bigint":this.buffer64[e]=t;break;case"number":this.buffer[e*this.stride]=t;break;default:this.buffer.set(t,e*this.stride)}return this}_resize(e){let t=super._resize(e),r=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return Bc.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,r)),t}};Ot.WideBufferBuilder=hm});var xe=C(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.VariableWidthBuilder=nr.FixedWidthBuilder=nr.Builder=void 0;var gn=lt(),KA=He(),vn=Fe(),JA=Kt(),XA=cm(),Sc=rr(),ZA=we(),Mt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=ZA.strideForType(e),this._nulls=new Sc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=XA.createIsValidFunction(t))}static new(e){}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}static throughIterable(e){return QA(e)}static throughAsyncIterable(e){return eF(e)}toVector(){return KA.Vector.new(this.flush())}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),this._typeIds&&(e+=this._typeIds.byteLength),this.children.reduce((t,r)=>t+r.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,r)=>t+r.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t=`${this.numChildren}`){throw new Error(`Cannot append children to non-nested type "${this.type}"`)}getChildAt(e){return this.children[e]||null}flush(){let e=[],t=this._values,r=this._offsets,n=this._typeIds,{length:s,nullCount:c}=this;n?(e[vn.BufferType.TYPE]=n.flush(s),r&&(e[vn.BufferType.OFFSET]=r.flush(s))):r?(t&&(e[vn.BufferType.DATA]=t.flush(r.last())),e[vn.BufferType.OFFSET]=r.flush(s)):t&&(e[vn.BufferType.DATA]=t.flush(s)),c>0&&(e[vn.BufferType.VALIDITY]=this._nulls.flush(s));let p=JA.Data.new(this.type,0,s,c,e,this.children.map(m=>m.flush()));return this.clear(),p}finish(){return this.finished=!0,this.children.forEach(e=>e.finish()),this}clear(){return this.length=0,this._offsets&&this._offsets.clear(),this._values&&this._values.clear(),this._nulls&&this._nulls.clear(),this._typeIds&&this._typeIds.clear(),this.children.forEach(e=>e.clear()),this}};nr.Builder=Mt;Mt.prototype.length=1;Mt.prototype.stride=1;Mt.prototype.children=null;Mt.prototype.finished=!1;Mt.prototype.nullValues=null;Mt.prototype._isValid=()=>!0;var pm=class extends Mt{constructor(e){super(e);this._values=new Sc.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}};nr.FixedWidthBuilder=pm;var ym=class extends Mt{constructor(e){super(e);this._pendingLength=0,this._offsets=new Sc.OffsetsBufferBuilder}setValue(e,t){let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,r.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}};nr.VariableWidthBuilder=ym;function QA(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Mt.new(i);for(let p of n)c.append(p)[r]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function eF(i){let{["queueingStrategy"]:e="count"}=i,{["highWaterMark"]:t=e!=="bytes"?1e3:Math.pow(2,14)}=i,r=e!=="bytes"?"length":"byteLength";return function(n){return gn.__asyncGenerator(this,arguments,function*(){var s,c;let p=0,m=Mt.new(i);try{for(var j=gn.__asyncValues(n),F;F=yield gn.__await(j.next()),!F.done;){let R=F.value;m.append(R)[r]>=t&&++p&&(yield yield gn.__await(m.toVector()))}}catch(R){s={error:R}}finally{try{F&&!F.done&&(c=j.return)&&(yield gn.__await(c.call(j)))}finally{if(s)throw s.error}}(m.finish().length>0||p===0)&&(yield yield gn.__await(m.toVector()))})}}});var Tc=C(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.BoolBuilder=void 0;var tF=rr(),iF=xe(),_m=class extends iF.Builder{constructor(e){super(e);this._values=new tF.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Zo.BoolBuilder=_m});var Ac=C(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.NullBuilder=void 0;var rF=xe(),mm=class extends rF.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Qo.NullBuilder=mm});var Fc=C(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.DateMillisecondBuilder=sr.DateDayBuilder=sr.DateBuilder=void 0;var nF=xe(),ea=class extends nF.FixedWidthBuilder{};sr.DateBuilder=ea;var bm=class extends ea{};sr.DateDayBuilder=bm;var gm=class extends ea{};sr.DateMillisecondBuilder=gm});var Dc=C(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.DecimalBuilder=void 0;var sF=xe(),vm=class extends sF.FixedWidthBuilder{};ta.DecimalBuilder=vm});var Mc=C(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.DictionaryBuilder=void 0;var oF=we(),Oc=xe(),jm=class extends Oc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new oF.Dictionary(e.dictionary,e.indices,e.id,e.isOrdered)});this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=Oc.Builder.new({type:this.type.indices,nullValues:t}),this.dictionary=Oc.Builder.new({type:this.type.dictionary,nullValues:null}),typeof r=="function"&&(this.valueToKey=r)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){let r=this._keysToIndices,n=this.valueToKey(t),s=r[n];return s===void 0&&(r[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,r=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:`${e}`}};ia.DictionaryBuilder=jm});var Cc=C(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.FixedSizeBinaryBuilder=void 0;var aF=xe(),wm=class extends aF.FixedWidthBuilder{};ra.FixedSizeBinaryBuilder=wm});var Is=C(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.float64ToUint16=wn.uint16ToFloat64=void 0;var Bm=new Float64Array(1),jn=new Uint32Array(Bm.buffer);function uF(i){let e=(i&31744)>>10,t=(i&1023)/1024,r=Math.pow(-1,(i&32768)>>15);switch(e){case 31:return r*(t?NaN:1/0);case 0:return r*(t?6103515625e-14*t:0)}return r*Math.pow(2,e-15)*(1+t)}wn.uint16ToFloat64=uF;function cF(i){if(i!==i)return 32256;Bm[0]=i;let e=(jn[1]&2147483648)>>16&65535,t=jn[1]&2146435072,r=0;return t>=1089470464?jn[0]>0?t=31744:(t=(t&2080374784)>>16,r=(jn[1]&1048575)>>10):t<=1056964608?(r=1048576+(jn[1]&1048575),r=1048576+(r<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,r=(jn[1]&1048575)+512>>10),e|t|r&65535}wn.float64ToUint16=cF});var Uc=C(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.Float64Builder=ci.Float32Builder=ci.Float16Builder=ci.FloatBuilder=void 0;var lF=Is(),dF=xe(),Ss=class extends dF.FixedWidthBuilder{};ci.FloatBuilder=Ss;var Im=class extends Ss{setValue(e,t){this._values.set(e,lF.float64ToUint16(t))}};ci.Float16Builder=Im;var Sm=class extends Ss{setValue(e,t){this._values.set(e,t)}};ci.Float32Builder=Sm;var Tm=class extends Ss{setValue(e,t){this._values.set(e,t)}};ci.Float64Builder=Tm});var Fs=C(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.BN=Ze.bignumToBigInt=Ze.bignumToString=Ze.isArrowBigNumSymbol=void 0;var fF=Xe(),Ts=dt();Ze.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function Jt(i,...e){return e.length===0?Object.setPrototypeOf(fF.toArrayBufferView(this.TypedArray,i),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(i,...e),this.constructor.prototype)}Jt.prototype[Ze.isArrowBigNumSymbol]=!0;Jt.prototype.toJSON=function(){return`"${Ze.bignumToString(this)}"`};Jt.prototype.valueOf=function(){return Am(this)};Jt.prototype.toString=function(){return Ze.bignumToString(this)};Jt.prototype[Symbol.toPrimitive]=function(i="default"){switch(i){case"number":return Am(this);case"string":return Ze.bignumToString(this);case"default":return Ze.bignumToBigInt(this)}return Ze.bignumToString(this)};function Bn(...i){return Jt.apply(this,i)}function In(...i){return Jt.apply(this,i)}function As(...i){return Jt.apply(this,i)}Object.setPrototypeOf(Bn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(In.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(As.prototype,Object.create(Uint32Array.prototype));Object.assign(Bn.prototype,Jt.prototype,{constructor:Bn,signed:!0,TypedArray:Int32Array,BigIntArray:Ts.BigInt64Array});Object.assign(In.prototype,Jt.prototype,{constructor:In,signed:!1,TypedArray:Uint32Array,BigIntArray:Ts.BigUint64Array});Object.assign(As.prototype,Jt.prototype,{constructor:As,signed:!0,TypedArray:Uint32Array,BigIntArray:Ts.BigUint64Array});function Am(i){let{buffer:e,byteOffset:t,length:r,signed:n}=i,s=new Int32Array(e,t,r),c=0,p=0,m=s.length,j,F;for(;p<m;)F=s[p++],j=s[p++],n||(j=j>>>0),c+=(F>>>0)+j*Math.pow(p,32);return c}Ts.BigIntAvailable?(Ze.bignumToBigInt=i=>i.byteLength===8?new i.BigIntArray(i.buffer,i.byteOffset,1)[0]:Ec(i),Ze.bignumToString=i=>i.byteLength===8?`${new i.BigIntArray(i.buffer,i.byteOffset,1)[0]}`:Ec(i)):(Ze.bignumToString=Ec,Ze.bignumToBigInt=Ze.bignumToString);function Ec(i){let e="",t=new Uint32Array(2),r=new Uint16Array(i.buffer,i.byteOffset,i.byteLength/2),n=new Uint32Array((r=new Uint16Array(r).reverse()).buffer),s=-1,c=r.length-1;do{for(t[0]=r[s=0];s<c;)r[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+r[s];r[s]=t[1]=t[0]/10,t[0]=t[0]-t[1]*10,e=`${t[0]}${e}`}while(n[0]||n[1]||n[2]||n[3]);return e||"0"}var na=class{static new(e,t){switch(t){case!0:return new Bn(e);case!1:return new In(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case Ts.BigInt64Array:return new Bn(e)}return e.byteLength===16?new As(e):new In(e)}static signed(e){return new Bn(e)}static unsigned(e){return new In(e)}static decimal(e){return new As(e)}constructor(e,t){return na.new(e,t)}};Ze.BN=na});var Rc=C($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.Uint64Builder=$e.Uint32Builder=$e.Uint16Builder=$e.Uint8Builder=$e.Int64Builder=$e.Int32Builder=$e.Int16Builder=$e.Int8Builder=$e.IntBuilder=void 0;var hF=Fs(),Fm=rr(),pF=dt(),yF=xe(),li=class extends yF.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};$e.IntBuilder=li;var Dm=class extends li{};$e.Int8Builder=Dm;var Om=class extends li{};$e.Int16Builder=Om;var Mm=class extends li{};$e.Int32Builder=Mm;var Cm=class extends li{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(sa));super(e);this._values=new Fm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(sa(e))}};$e.Int64Builder=Cm;var Um=class extends li{};$e.Uint8Builder=Um;var Em=class extends li{};$e.Uint16Builder=Em;var Rm=class extends li{};$e.Uint32Builder=Rm;var km=class extends li{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(sa));super(e);this._values=new Fm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(sa(e))}};$e.Uint64Builder=km;var sa=(i=>e=>(ArrayBuffer.isView(e)&&(i.buffer=e.buffer,i.byteOffset=e.byteOffset,i.byteLength=e.byteLength,e=hF.bignumToBigInt(i),i.buffer=null),e))({BigIntArray:pF.BigInt64Array})});var kc=C(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.TimeNanosecondBuilder=Ct.TimeMicrosecondBuilder=Ct.TimeMillisecondBuilder=Ct.TimeSecondBuilder=Ct.TimeBuilder=void 0;var _F=xe(),Sn=class extends _F.FixedWidthBuilder{};Ct.TimeBuilder=Sn;var Vm=class extends Sn{};Ct.TimeSecondBuilder=Vm;var xm=class extends Sn{};Ct.TimeMillisecondBuilder=xm;var Pm=class extends Sn{};Ct.TimeMicrosecondBuilder=Pm;var Nm=class extends Sn{};Ct.TimeNanosecondBuilder=Nm});var Vc=C(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.TimestampNanosecondBuilder=Ut.TimestampMicrosecondBuilder=Ut.TimestampMillisecondBuilder=Ut.TimestampSecondBuilder=Ut.TimestampBuilder=void 0;var mF=xe(),Tn=class extends mF.FixedWidthBuilder{};Ut.TimestampBuilder=Tn;var Lm=class extends Tn{};Ut.TimestampSecondBuilder=Lm;var qm=class extends Tn{};Ut.TimestampMillisecondBuilder=qm;var Hm=class extends Tn{};Ut.TimestampMicrosecondBuilder=Hm;var zm=class extends Tn{};Ut.TimestampNanosecondBuilder=zm});var xc=C(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.IntervalYearMonthBuilder=or.IntervalDayTimeBuilder=or.IntervalBuilder=void 0;var bF=xe(),oa=class extends bF.FixedWidthBuilder{};or.IntervalBuilder=oa;var Wm=class extends oa{};or.IntervalDayTimeBuilder=Wm;var Ym=class extends oa{};or.IntervalYearMonthBuilder=Ym});var ua=C(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.BinaryBuilder=void 0;var gF=Xe(),vF=rr(),jF=xe(),Gm=class extends jF.VariableWidthBuilder{constructor(e){super(e);this._values=new vF.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,gF.toUint8Array(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,p=0,m;for([s,m]of e)m===void 0?r.set(s,0):(c=m.length,n.set(m,p),r.set(s,c),p+=c)}};aa.BinaryBuilder=Gm});var la=C(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.Utf8Builder=void 0;var wF=kr(),BF=ua(),IF=rr(),SF=xe(),Pc=class extends SF.VariableWidthBuilder{constructor(e){super(e);this._values=new IF.BufferBuilder(new Uint8Array(0))}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,wF.encodeUtf8(t))}_flushPending(e,t){}};ca.Utf8Builder=Pc;Pc.prototype._flushPending=BF.BinaryBuilder.prototype._flushPending});var Nc=C(da=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});da.Run=void 0;var TF=He(),$m=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof TF.Vector?e:(this._values=e,this)}};da.Run=$m});var it=C(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.Field=An.Schema=void 0;var AF=we(),Et=class{constructor(e=[],t,r){this.fields=e||[],this.metadata=t||new Map,r||(r=Lc(e)),this.dictionaries=r}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((r,n)=>(r[n]=!0)&&r,Object.create(null));return new Et(this.fields.filter(r=>t[r.name]),this.metadata)}selectAt(...e){return new Et(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof Et?e[0]:Array.isArray(e[0])?new Et(e[0]):new Et(e),r=[...this.fields],n=fa(fa(new Map,this.metadata),t.metadata),s=t.fields.filter(p=>{let m=r.findIndex(j=>j.name===p.name);return~m?(r[m]=p.clone({metadata:fa(fa(new Map,r[m].metadata),p.metadata)}))&&!1:!0}),c=Lc(s,new Map);return new Et([...r,...s],n,new Map([...this.dictionaries,...c]))}};An.Schema=Et;var Ci=class{constructor(e,t,r=!1,n){this.name=e,this.type=t,this.nullable=r,this.metadata=n||new Map}static new(...e){let[t,r,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],r===void 0&&(r=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new Ci(`${t}`,r,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,r,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,r=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:r=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Ci.new(t,r,n,s)}};An.Field=Ci;function fa(i,e){return new Map([...i||new Map,...e||new Map])}function Lc(i,e=new Map){for(let t=-1,r=i.length;++t<r;){let s=i[t].type;if(AF.DataType.isDictionary(s)){if(!e.has(s.id))e.set(s.id,s.dictionary);else if(e.get(s.id)!==s.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}s.children&&s.children.length>0&&Lc(s.children,e)}return e}Et.prototype.fields=null;Et.prototype.metadata=null;Et.prototype.dictionaries=null;Ci.prototype.type=null;Ci.prototype.name=null;Ci.prototype.nullable=null;Ci.prototype.metadata=null});var qc=C(ha=>{"use strict";Object.defineProperty(ha,"__esModule",{value:!0});ha.ListBuilder=void 0;var FF=Nc(),DF=it(),OF=we(),MF=rr(),CF=xe(),Km=class extends CF.VariableWidthBuilder{constructor(e){super(e);this._run=new FF.Run,this._offsets=new MF.OffsetsBufferBuilder}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new OF.List(new DF.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,r=this._offsets,n=this._setValue,s=0,c;for([s,c]of e)c===void 0?r.set(s,0):(r.set(s,c.length),n(this,s,t.bind(c)))}};ha.ListBuilder=Km});var Hc=C(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.FixedSizeListBuilder=void 0;var UF=Nc(),EF=it(),RF=xe(),kF=we(),Jm=class extends RF.Builder{constructor(){super(...arguments);this._run=new UF.Run}setValue(e,t){super.setValue(e,this._run.bind(t))}addChild(e,t="0"){if(this.numChildren>0)throw new Error("FixedSizeListBuilder can only have one child.");let r=this.children.push(e);return this.type=new kF.FixedSizeList(this.type.listSize,new EF.Field(t,e.type,!0)),r}clear(){return this._run.clear(),super.clear()}};pa.FixedSizeListBuilder=Jm});var zc=C(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.MapBuilder=void 0;var VF=it(),xF=we(),PF=xe(),Xm=class extends PF.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,r.set(e,t)}addChild(e,t=`${this.numChildren}`){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new xF.Map_(new VF.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,r=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),r(this,s,n))})}};ya.MapBuilder=Xm});var Wc=C(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.StructBuilder=void 0;var NF=it(),LF=xe(),qF=we(),Zm=class extends LF.Builder{addChild(e,t=`${this.numChildren}`){let r=this.children.push(e);return this.type=new qF.Struct([...this.type.children,new NF.Field(t,e.type,!0)]),r}};_a.StructBuilder=Zm});var Yc=C(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.DenseUnionBuilder=ar.SparseUnionBuilder=ar.UnionBuilder=void 0;var HF=it(),Qm=rr(),zF=xe(),WF=we(),ma=class extends zF.Builder{constructor(e){super(e);this._typeIds=new Qm.DataBufferBuilder(new Int8Array(0),1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,r){return r===void 0&&(r=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let r=this.children.push(e),{type:{children:n,mode:s,typeIds:c}}=this,p=[...n,new HF.Field(t,e.type)];return this.type=new WF.Union(s,[...c,r],p),r}_valueToChildTypeId(e,t,r){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}};ar.UnionBuilder=ma;var eb=class extends ma{};ar.SparseUnionBuilder=eb;var tb=class extends ma{constructor(e){super(e);this._offsets=new Qm.DataBufferBuilder(new Int32Array(0))}setValue(e,t,r){let n=this.type.typeIdToChildIndex[r];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,r)}};ar.DenseUnionBuilder=tb});var at=C(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.Visitor=void 0;var YF=Kt(),GF=He(),O=Fe(),$F=we(),Ae=class{visitMany(e,...t){return e.map((r,n)=>this.visit(r,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return KF(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};ba.Visitor=Ae;function KF(i,e,t=!0){let r=null,n=O.Type.NONE;switch(e instanceof YF.Data||e instanceof GF.Vector?n=Gc(e.type):e instanceof $F.DataType?n=Gc(e):typeof(n=e)!="number"&&(n=O.Type[e]),n){case O.Type.Null:r=i.visitNull;break;case O.Type.Bool:r=i.visitBool;break;case O.Type.Int:r=i.visitInt;break;case O.Type.Int8:r=i.visitInt8||i.visitInt;break;case O.Type.Int16:r=i.visitInt16||i.visitInt;break;case O.Type.Int32:r=i.visitInt32||i.visitInt;break;case O.Type.Int64:r=i.visitInt64||i.visitInt;break;case O.Type.Uint8:r=i.visitUint8||i.visitInt;break;case O.Type.Uint16:r=i.visitUint16||i.visitInt;break;case O.Type.Uint32:r=i.visitUint32||i.visitInt;break;case O.Type.Uint64:r=i.visitUint64||i.visitInt;break;case O.Type.Float:r=i.visitFloat;break;case O.Type.Float16:r=i.visitFloat16||i.visitFloat;break;case O.Type.Float32:r=i.visitFloat32||i.visitFloat;break;case O.Type.Float64:r=i.visitFloat64||i.visitFloat;break;case O.Type.Utf8:r=i.visitUtf8;break;case O.Type.Binary:r=i.visitBinary;break;case O.Type.FixedSizeBinary:r=i.visitFixedSizeBinary;break;case O.Type.Date:r=i.visitDate;break;case O.Type.DateDay:r=i.visitDateDay||i.visitDate;break;case O.Type.DateMillisecond:r=i.visitDateMillisecond||i.visitDate;break;case O.Type.Timestamp:r=i.visitTimestamp;break;case O.Type.TimestampSecond:r=i.visitTimestampSecond||i.visitTimestamp;break;case O.Type.TimestampMillisecond:r=i.visitTimestampMillisecond||i.visitTimestamp;break;case O.Type.TimestampMicrosecond:r=i.visitTimestampMicrosecond||i.visitTimestamp;break;case O.Type.TimestampNanosecond:r=i.visitTimestampNanosecond||i.visitTimestamp;break;case O.Type.Time:r=i.visitTime;break;case O.Type.TimeSecond:r=i.visitTimeSecond||i.visitTime;break;case O.Type.TimeMillisecond:r=i.visitTimeMillisecond||i.visitTime;break;case O.Type.TimeMicrosecond:r=i.visitTimeMicrosecond||i.visitTime;break;case O.Type.TimeNanosecond:r=i.visitTimeNanosecond||i.visitTime;break;case O.Type.Decimal:r=i.visitDecimal;break;case O.Type.List:r=i.visitList;break;case O.Type.Struct:r=i.visitStruct;break;case O.Type.Union:r=i.visitUnion;break;case O.Type.DenseUnion:r=i.visitDenseUnion||i.visitUnion;break;case O.Type.SparseUnion:r=i.visitSparseUnion||i.visitUnion;break;case O.Type.Dictionary:r=i.visitDictionary;break;case O.Type.Interval:r=i.visitInterval;break;case O.Type.IntervalDayTime:r=i.visitIntervalDayTime||i.visitInterval;break;case O.Type.IntervalYearMonth:r=i.visitIntervalYearMonth||i.visitInterval;break;case O.Type.FixedSizeList:r=i.visitFixedSizeList;break;case O.Type.Map:r=i.visitMap;break}if(typeof r=="function")return r;if(!t)return()=>null;throw new Error(`Unrecognized type '${O.Type[n]}'`)}function Gc(i){switch(i.typeId){case O.Type.Null:return O.Type.Null;case O.Type.Int:{let{bitWidth:e,isSigned:t}=i;switch(e){case 8:return t?O.Type.Int8:O.Type.Uint8;case 16:return t?O.Type.Int16:O.Type.Uint16;case 32:return t?O.Type.Int32:O.Type.Uint32;case 64:return t?O.Type.Int64:O.Type.Uint64}return O.Type.Int}case O.Type.Float:switch(i.precision){case O.Precision.HALF:return O.Type.Float16;case O.Precision.SINGLE:return O.Type.Float32;case O.Precision.DOUBLE:return O.Type.Float64}return O.Type.Float;case O.Type.Binary:return O.Type.Binary;case O.Type.Utf8:return O.Type.Utf8;case O.Type.Bool:return O.Type.Bool;case O.Type.Decimal:return O.Type.Decimal;case O.Type.Time:switch(i.unit){case O.TimeUnit.SECOND:return O.Type.TimeSecond;case O.TimeUnit.MILLISECOND:return O.Type.TimeMillisecond;case O.TimeUnit.MICROSECOND:return O.Type.TimeMicrosecond;case O.TimeUnit.NANOSECOND:return O.Type.TimeNanosecond}return O.Type.Time;case O.Type.Timestamp:switch(i.unit){case O.TimeUnit.SECOND:return O.Type.TimestampSecond;case O.TimeUnit.MILLISECOND:return O.Type.TimestampMillisecond;case O.TimeUnit.MICROSECOND:return O.Type.TimestampMicrosecond;case O.TimeUnit.NANOSECOND:return O.Type.TimestampNanosecond}return O.Type.Timestamp;case O.Type.Date:switch(i.unit){case O.DateUnit.DAY:return O.Type.DateDay;case O.DateUnit.MILLISECOND:return O.Type.DateMillisecond}return O.Type.Date;case O.Type.Interval:switch(i.unit){case O.IntervalUnit.DAY_TIME:return O.Type.IntervalDayTime;case O.IntervalUnit.YEAR_MONTH:return O.Type.IntervalYearMonth}return O.Type.Interval;case O.Type.Map:return O.Type.Map;case O.Type.List:return O.Type.List;case O.Type.Struct:return O.Type.Struct;case O.Type.Union:switch(i.mode){case O.UnionMode.Dense:return O.Type.DenseUnion;case O.UnionMode.Sparse:return O.Type.SparseUnion}return O.Type.Union;case O.Type.FixedSizeBinary:return O.Type.FixedSizeBinary;case O.Type.FixedSizeList:return O.Type.FixedSizeList;case O.Type.Dictionary:return O.Type.Dictionary}throw new Error(`Unrecognized type '${O.Type[i.typeId]}'`)}Ae.prototype.visitInt8=null;Ae.prototype.visitInt16=null;Ae.prototype.visitInt32=null;Ae.prototype.visitInt64=null;Ae.prototype.visitUint8=null;Ae.prototype.visitUint16=null;Ae.prototype.visitUint32=null;Ae.prototype.visitUint64=null;Ae.prototype.visitFloat16=null;Ae.prototype.visitFloat32=null;Ae.prototype.visitFloat64=null;Ae.prototype.visitDateDay=null;Ae.prototype.visitDateMillisecond=null;Ae.prototype.visitTimestampSecond=null;Ae.prototype.visitTimestampMillisecond=null;Ae.prototype.visitTimestampMicrosecond=null;Ae.prototype.visitTimestampNanosecond=null;Ae.prototype.visitTimeSecond=null;Ae.prototype.visitTimeMillisecond=null;Ae.prototype.visitTimeMicrosecond=null;Ae.prototype.visitTimeNanosecond=null;Ae.prototype.visitDenseUnion=null;Ae.prototype.visitSparseUnion=null;Ae.prototype.visitIntervalDayTime=null;Ae.prototype.visitIntervalYearMonth=null});var Jc=C(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.instance=Fn.SetVisitor=void 0;var JF=He(),XF=at(),ZF=kr(),QF=Is(),eD=Xe(),Rt=Fe(),oe=class extends XF.Visitor{};Fn.SetVisitor=oe;var tD=(i,e,t)=>{i[e]=t/864e5|0},$c=(i,e,t)=>{i[e]=t%4294967296|0,i[e+1]=t/4294967296|0},iD=(i,e,t)=>{i[e]=t*1e3%4294967296|0,i[e+1]=t*1e3/4294967296|0},rD=(i,e,t)=>{i[e]=t*1e6%4294967296|0,i[e+1]=t*1e6/4294967296|0},ib=(i,e,t,r)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&i.set(r.subarray(0,s-n),n)},nD=({offset:i,values:e},t,r)=>{let n=i+t;r?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},rb=({values:i},e,t)=>{tD(i,e,t.valueOf())},nb=({values:i},e,t)=>{$c(i,e*2,t.valueOf())},di=({stride:i,values:e},t,r)=>{e[i*t]=r},sb=({stride:i,values:e},t,r)=>{e[i*t]=QF.float64ToUint16(r)},Kc=(i,e,t)=>{switch(typeof t){case"bigint":i.values64[e]=t;break;case"number":i.values[e*i.stride]=t;break;default:{let r=t,{stride:n,ArrayType:s}=i,c=eD.toArrayBufferView(s,r);i.values.set(c.subarray(0,n),n*e)}}},sD=({stride:i,values:e},t,r)=>{e.set(r.subarray(0,i),i*t)},oD=({values:i,valueOffsets:e},t,r)=>ib(i,e,t,r),aD=({values:i,valueOffsets:e},t,r)=>{ib(i,e,t,ZF.encodeUtf8(r))},uD=(i,e,t)=>{i.type.bitWidth<64?di(i,e,t):Kc(i,e,t)},cD=(i,e,t)=>{i.type.precision!==Rt.Precision.HALF?di(i,e,t):sb(i,e,t)},lD=(i,e,t)=>{i.type.unit===Rt.DateUnit.DAY?rb(i,e,t):nb(i,e,t)},ob=({values:i},e,t)=>$c(i,e*2,t/1e3),ab=({values:i},e,t)=>$c(i,e*2,t),ub=({values:i},e,t)=>iD(i,e*2,t),cb=({values:i},e,t)=>rD(i,e*2,t),dD=(i,e,t)=>{switch(i.type.unit){case Rt.TimeUnit.SECOND:return ob(i,e,t);case Rt.TimeUnit.MILLISECOND:return ab(i,e,t);case Rt.TimeUnit.MICROSECOND:return ub(i,e,t);case Rt.TimeUnit.NANOSECOND:return cb(i,e,t)}},lb=({values:i,stride:e},t,r)=>{i[e*t]=r},db=({values:i,stride:e},t,r)=>{i[e*t]=r},fb=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},hb=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},fD=(i,e,t)=>{switch(i.type.unit){case Rt.TimeUnit.SECOND:return lb(i,e,t);case Rt.TimeUnit.MILLISECOND:return db(i,e,t);case Rt.TimeUnit.MICROSECOND:return fb(i,e,t);case Rt.TimeUnit.NANOSECOND:return hb(i,e,t)}},hD=({values:i},e,t)=>{i.set(t.subarray(0,4),4*e)},pD=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets;for(let s=-1,c=n[e],p=n[e+1];c<p;)r.set(c++,t.get(++s))},yD=(i,e,t)=>{let r=i.getChildAt(0),n=i.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,p=n[e],m=n[e+1];p<m;)r.set(p++,s[++c])},_D=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[n]),mD=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(n)),bD=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e.get(r.name)),gD=(i,e)=>(t,r,n)=>t==null?void 0:t.set(i,e[r.name]),vD=(i,e,t)=>{let r=t instanceof Map?bD(e,t):t instanceof JF.Vector?mD(e,t):Array.isArray(t)?_D(e,t):gD(e,t);i.type.children.forEach((n,s)=>r(i.getChildAt(s),n,s))},jD=(i,e,t)=>{i.type.mode===Rt.UnionMode.Dense?pb(i,e,t):yb(i,e,t)},pb=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(i.valueOffsets[e],t)},yb=(i,e,t)=>{let r=i.typeIdToChildIndex[i.typeIds[e]],n=i.getChildAt(r);n&&n.set(e,t)},wD=(i,e,t)=>{let r=i.getKey(e);r!==null&&i.setValue(r,t)},BD=(i,e,t)=>{i.type.unit===Rt.IntervalUnit.DAY_TIME?_b(i,e,t):mb(i,e,t)},_b=({values:i},e,t)=>{i.set(t.subarray(0,2),2*e)},mb=({values:i},e,t)=>{i[e]=t[0]*12+t[1]%12},ID=(i,e,t)=>{let r=i.getChildAt(0),{stride:n}=i;for(let s=-1,c=e*n;++s<n;)r.set(c+s,t.get(s))};oe.prototype.visitBool=nD;oe.prototype.visitInt=uD;oe.prototype.visitInt8=di;oe.prototype.visitInt16=di;oe.prototype.visitInt32=di;oe.prototype.visitInt64=Kc;oe.prototype.visitUint8=di;oe.prototype.visitUint16=di;oe.prototype.visitUint32=di;oe.prototype.visitUint64=Kc;oe.prototype.visitFloat=cD;oe.prototype.visitFloat16=sb;oe.prototype.visitFloat32=di;oe.prototype.visitFloat64=di;oe.prototype.visitUtf8=aD;oe.prototype.visitBinary=oD;oe.prototype.visitFixedSizeBinary=sD;oe.prototype.visitDate=lD;oe.prototype.visitDateDay=rb;oe.prototype.visitDateMillisecond=nb;oe.prototype.visitTimestamp=dD;oe.prototype.visitTimestampSecond=ob;oe.prototype.visitTimestampMillisecond=ab;oe.prototype.visitTimestampMicrosecond=ub;oe.prototype.visitTimestampNanosecond=cb;oe.prototype.visitTime=fD;oe.prototype.visitTimeSecond=lb;oe.prototype.visitTimeMillisecond=db;oe.prototype.visitTimeMicrosecond=fb;oe.prototype.visitTimeNanosecond=hb;oe.prototype.visitDecimal=hD;oe.prototype.visitList=pD;oe.prototype.visitStruct=vD;oe.prototype.visitUnion=jD;oe.prototype.visitDenseUnion=pb;oe.prototype.visitSparseUnion=yb;oe.prototype.visitDictionary=wD;oe.prototype.visitInterval=BD;oe.prototype.visitIntervalDayTime=_b;oe.prototype.visitIntervalYearMonth=mb;oe.prototype.visitFixedSizeList=ID;oe.prototype.visitMap=yD;Fn.instance=new oe});var bb=C(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.instance=Dn.GetBuilderCtor=void 0;var SD=at(),TD=ua(),AD=Tc(),Xc=Fc(),FD=Dc(),DD=Mc(),OD=Cc(),MD=Hc(),ga=Uc(),Zc=xc(),Ui=Rc(),CD=qc(),UD=zc(),ED=Ac(),RD=Wc(),Ds=Vc(),Os=kc(),Qc=Yc(),kD=la(),el=class extends SD.Visitor{visitNull(){return ED.NullBuilder}visitBool(){return AD.BoolBuilder}visitInt(){return Ui.IntBuilder}visitInt8(){return Ui.Int8Builder}visitInt16(){return Ui.Int16Builder}visitInt32(){return Ui.Int32Builder}visitInt64(){return Ui.Int64Builder}visitUint8(){return Ui.Uint8Builder}visitUint16(){return Ui.Uint16Builder}visitUint32(){return Ui.Uint32Builder}visitUint64(){return Ui.Uint64Builder}visitFloat(){return ga.FloatBuilder}visitFloat16(){return ga.Float16Builder}visitFloat32(){return ga.Float32Builder}visitFloat64(){return ga.Float64Builder}visitUtf8(){return kD.Utf8Builder}visitBinary(){return TD.BinaryBuilder}visitFixedSizeBinary(){return OD.FixedSizeBinaryBuilder}visitDate(){return Xc.DateBuilder}visitDateDay(){return Xc.DateDayBuilder}visitDateMillisecond(){return Xc.DateMillisecondBuilder}visitTimestamp(){return Ds.TimestampBuilder}visitTimestampSecond(){return Ds.TimestampSecondBuilder}visitTimestampMillisecond(){return Ds.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return Ds.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return Ds.TimestampNanosecondBuilder}visitTime(){return Os.TimeBuilder}visitTimeSecond(){return Os.TimeSecondBuilder}visitTimeMillisecond(){return Os.TimeMillisecondBuilder}visitTimeMicrosecond(){return Os.TimeMicrosecondBuilder}visitTimeNanosecond(){return Os.TimeNanosecondBuilder}visitDecimal(){return FD.DecimalBuilder}visitList(){return CD.ListBuilder}visitStruct(){return RD.StructBuilder}visitUnion(){return Qc.UnionBuilder}visitDenseUnion(){return Qc.DenseUnionBuilder}visitSparseUnion(){return Qc.SparseUnionBuilder}visitDictionary(){return DD.DictionaryBuilder}visitInterval(){return Zc.IntervalBuilder}visitIntervalDayTime(){return Zc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Zc.IntervalYearMonthBuilder}visitFixedSizeList(){return MD.FixedSizeListBuilder}visitMap(){return UD.MapBuilder}};Dn.GetBuilderCtor=el;Dn.instance=new el});var ja=C(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.DenseUnionBuilder=V.SparseUnionBuilder=V.UnionBuilder=V.StructBuilder=V.MapBuilder=V.FixedSizeListBuilder=V.ListBuilder=V.BinaryBuilder=V.Utf8Builder=V.IntervalYearMonthBuilder=V.IntervalDayTimeBuilder=V.IntervalBuilder=V.TimestampNanosecondBuilder=V.TimestampMicrosecondBuilder=V.TimestampMillisecondBuilder=V.TimestampSecondBuilder=V.TimestampBuilder=V.TimeNanosecondBuilder=V.TimeMicrosecondBuilder=V.TimeMillisecondBuilder=V.TimeSecondBuilder=V.TimeBuilder=V.Uint64Builder=V.Uint32Builder=V.Uint16Builder=V.Uint8Builder=V.Int64Builder=V.Int32Builder=V.Int16Builder=V.Int8Builder=V.IntBuilder=V.Float64Builder=V.Float32Builder=V.Float16Builder=V.FloatBuilder=V.FixedSizeBinaryBuilder=V.DictionaryBuilder=V.DecimalBuilder=V.DateMillisecondBuilder=V.DateDayBuilder=V.DateBuilder=V.NullBuilder=V.BoolBuilder=V.Builder=void 0;var VD=xe();Object.defineProperty(V,"Builder",{enumerable:!0,get:function(){return VD.Builder}});var xD=Tc();Object.defineProperty(V,"BoolBuilder",{enumerable:!0,get:function(){return xD.BoolBuilder}});var PD=Ac();Object.defineProperty(V,"NullBuilder",{enumerable:!0,get:function(){return PD.NullBuilder}});var tl=Fc();Object.defineProperty(V,"DateBuilder",{enumerable:!0,get:function(){return tl.DateBuilder}});Object.defineProperty(V,"DateDayBuilder",{enumerable:!0,get:function(){return tl.DateDayBuilder}});Object.defineProperty(V,"DateMillisecondBuilder",{enumerable:!0,get:function(){return tl.DateMillisecondBuilder}});var ND=Dc();Object.defineProperty(V,"DecimalBuilder",{enumerable:!0,get:function(){return ND.DecimalBuilder}});var LD=Mc();Object.defineProperty(V,"DictionaryBuilder",{enumerable:!0,get:function(){return LD.DictionaryBuilder}});var qD=Cc();Object.defineProperty(V,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return qD.FixedSizeBinaryBuilder}});var va=Uc();Object.defineProperty(V,"FloatBuilder",{enumerable:!0,get:function(){return va.FloatBuilder}});Object.defineProperty(V,"Float16Builder",{enumerable:!0,get:function(){return va.Float16Builder}});Object.defineProperty(V,"Float32Builder",{enumerable:!0,get:function(){return va.Float32Builder}});Object.defineProperty(V,"Float64Builder",{enumerable:!0,get:function(){return va.Float64Builder}});var Ei=Rc();Object.defineProperty(V,"IntBuilder",{enumerable:!0,get:function(){return Ei.IntBuilder}});Object.defineProperty(V,"Int8Builder",{enumerable:!0,get:function(){return Ei.Int8Builder}});Object.defineProperty(V,"Int16Builder",{enumerable:!0,get:function(){return Ei.Int16Builder}});Object.defineProperty(V,"Int32Builder",{enumerable:!0,get:function(){return Ei.Int32Builder}});Object.defineProperty(V,"Int64Builder",{enumerable:!0,get:function(){return Ei.Int64Builder}});Object.defineProperty(V,"Uint8Builder",{enumerable:!0,get:function(){return Ei.Uint8Builder}});Object.defineProperty(V,"Uint16Builder",{enumerable:!0,get:function(){return Ei.Uint16Builder}});Object.defineProperty(V,"Uint32Builder",{enumerable:!0,get:function(){return Ei.Uint32Builder}});Object.defineProperty(V,"Uint64Builder",{enumerable:!0,get:function(){return Ei.Uint64Builder}});var Ms=kc();Object.defineProperty(V,"TimeBuilder",{enumerable:!0,get:function(){return Ms.TimeBuilder}});Object.defineProperty(V,"TimeSecondBuilder",{enumerable:!0,get:function(){return Ms.TimeSecondBuilder}});Object.defineProperty(V,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return Ms.TimeMillisecondBuilder}});Object.defineProperty(V,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return Ms.TimeMicrosecondBuilder}});Object.defineProperty(V,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return Ms.TimeNanosecondBuilder}});var Cs=Vc();Object.defineProperty(V,"TimestampBuilder",{enumerable:!0,get:function(){return Cs.TimestampBuilder}});Object.defineProperty(V,"TimestampSecondBuilder",{enumerable:!0,get:function(){return Cs.TimestampSecondBuilder}});Object.defineProperty(V,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return Cs.TimestampMillisecondBuilder}});Object.defineProperty(V,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return Cs.TimestampMicrosecondBuilder}});Object.defineProperty(V,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return Cs.TimestampNanosecondBuilder}});var il=xc();Object.defineProperty(V,"IntervalBuilder",{enumerable:!0,get:function(){return il.IntervalBuilder}});Object.defineProperty(V,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return il.IntervalDayTimeBuilder}});Object.defineProperty(V,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return il.IntervalYearMonthBuilder}});var HD=la();Object.defineProperty(V,"Utf8Builder",{enumerable:!0,get:function(){return HD.Utf8Builder}});var zD=ua();Object.defineProperty(V,"BinaryBuilder",{enumerable:!0,get:function(){return zD.BinaryBuilder}});var WD=qc();Object.defineProperty(V,"ListBuilder",{enumerable:!0,get:function(){return WD.ListBuilder}});var YD=Hc();Object.defineProperty(V,"FixedSizeListBuilder",{enumerable:!0,get:function(){return YD.FixedSizeListBuilder}});var GD=zc();Object.defineProperty(V,"MapBuilder",{enumerable:!0,get:function(){return GD.MapBuilder}});var $D=Wc();Object.defineProperty(V,"StructBuilder",{enumerable:!0,get:function(){return $D.StructBuilder}});var rl=Yc();Object.defineProperty(V,"UnionBuilder",{enumerable:!0,get:function(){return rl.UnionBuilder}});Object.defineProperty(V,"SparseUnionBuilder",{enumerable:!0,get:function(){return rl.SparseUnionBuilder}});Object.defineProperty(V,"DenseUnionBuilder",{enumerable:!0,get:function(){return rl.DenseUnionBuilder}});var nl=Fe(),KD=la(),JD=xe(),gb=Jc(),vb=bb();JD.Builder.new=jb;function jb(i){let e=i.type,t=new(vb.instance.getVisitFn(e)())(i);if(e.children&&e.children.length>0){let r=i.children||[],n={nullValues:i.nullValues},s=Array.isArray(r)?(c,p)=>r[p]||n:({name:c})=>r[c]||n;e.children.forEach((c,p)=>{let{type:m}=c,j=s(c,p);t.children.push(jb(Object.assign(Object.assign({},j),{type:m})))})}return t}Object.keys(nl.Type).map(i=>nl.Type[i]).filter(i=>typeof i=="number"&&i!==nl.Type.NONE).forEach(i=>{let e=vb.instance.visit(i);e.prototype._setValue=gb.instance.getVisitFn(i)});KD.Utf8Builder.prototype._setValue=gb.instance.visitBinary});var wb=C(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.Block=On.Footer=void 0;var XD=Fi(),wa=er(),kt=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new kt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+XD.flatbuffers.SIZE_PREFIX_LENGTH),(t||new kt).__init(e.readInt32(e.position())+e.position(),e)}version(){let e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):wa.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new wa.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let r=this.bb.__offset(this.bb_pos,8);return r?(t||new Ba).__init(this.bb.__vector(this.bb_pos+r)+e*24,this.bb):null}dictionariesLength(){let e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){let r=this.bb.__offset(this.bb_pos,10);return r?(t||new Ba).__init(this.bb.__vector(this.bb_pos+r)+e*24,this.bb):null}recordBatchesLength(){let e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new wa.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+e*4),this.bb):null}customMetadataLength(){let e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,wa.MetadataVersion.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}static createFooter(e,t,r,n,s,c){return kt.startFooter(e),kt.addVersion(e,t),kt.addSchema(e,r),kt.addDictionaries(e,n),kt.addRecordBatches(e,s),kt.addCustomMetadata(e,c),kt.endFooter(e)}};On.Footer=kt;var Ba=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static createBlock(e,t,r,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(r),e.writeInt64(t),e.offset()}};On.Block=Ba});var al=C(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.FileBlock=Mn.Footer=void 0;var Xt=wb(),sl=Fi(),Bb=sl.flatbuffers.Long,ZD=sl.flatbuffers.Builder,QD=sl.flatbuffers.ByteBuffer,Ib=it(),Sb=Fe(),eO=Xe(),ol=class{constructor(e,t=Sb.MetadataVersion.V4,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}static decode(e){e=new QD(eO.toUint8Array(e));let t=Xt.Footer.getRootAsFooter(e),r=Ib.Schema.decode(t.schema());return new Tb(r,t)}static encode(e){let t=new ZD,r=Ib.Schema.encode(t,e.schema);Xt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>ur.encode(t,c));let n=t.endVector();Xt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>ur.encode(t,c));let s=t.endVector();return Xt.Footer.startFooter(t),Xt.Footer.addSchema(t,r),Xt.Footer.addVersion(t,Sb.MetadataVersion.V4),Xt.Footer.addRecordBatches(t,n),Xt.Footer.addDictionaries(t,s),Xt.Footer.finishFooterBuffer(t,Xt.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t<r;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,r=this.numDictionaries;++t<r;)(e=this.getDictionaryBatch(t))&&(yield e)}getRecordBatch(e){return e>=0&&e<this.numRecordBatches&&this._recordBatches[e]||null}getDictionaryBatch(e){return e>=0&&e<this.numDictionaries&&this._dictionaryBatches[e]||null}};Mn.Footer=ol;var Tb=class extends ol{constructor(e,t){super(e,t.version());this._footer=t}get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}getRecordBatch(e){if(e>=0&&e<this.numRecordBatches){let t=this._footer.recordBatches(e);if(t)return ur.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return ur.decode(t)}return null}},ur=class{constructor(e,t,r){this.metaDataLength=e,this.offset=typeof r=="number"?r:r.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new ur(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:r}=t,n=new Bb(t.offset,0),s=new Bb(t.bodyLength,0);return Xt.Block.createBlock(e,n,r,s)}};Mn.FileBlock=ur});var hr=C(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.AsyncByteStream=fr.ByteStream=fr.AsyncByteQueue=void 0;var cr=lt(),lr=ws(),Ab=kr(),Us=hn(),ul=Xe(),Cn=dt(),cl=class extends Us.AsyncQueue{write(e){if((e=ul.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Ab.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(Ab.decodeUtf8)}toUint8Array(e=!1){return e?ul.joinUint8Arrays(this._values)[0]:(()=>cr.__awaiter(this,void 0,void 0,function*(){var t,r;let n=[],s=0;try{for(var c=cr.__asyncValues(this),p;p=yield c.next(),!p.done;){let m=p.value;n.push(m),s+=m.byteLength}}catch(m){t={error:m}}finally{try{p&&!p.done&&(r=c.return)&&(yield r.call(c))}finally{if(t)throw t.error}}return ul.joinUint8Arrays(n,s)[0]}))()}};fr.AsyncByteQueue=cl;var Fb=class{constructor(e){e&&(this.source=new Db(lr.default.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};fr.ByteStream=Fb;var Ia=class{constructor(e){e instanceof Ia?this.source=e.source:e instanceof cl?this.source=new dr(lr.default.fromAsyncIterable(e)):Cn.isReadableNodeStream(e)?this.source=new dr(lr.default.fromNodeStream(e)):Cn.isReadableDOMStream(e)?this.source=new dr(lr.default.fromDOMStream(e)):Cn.isFetchResponse(e)?this.source=new dr(lr.default.fromDOMStream(e.body)):Cn.isIterable(e)?this.source=new dr(lr.default.fromIterable(e)):Cn.isPromise(e)?this.source=new dr(lr.default.fromAsyncIterable(e)):Cn.isAsyncIterable(e)&&(this.source=new dr(lr.default.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}};fr.AsyncByteStream=Ia;var Db=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Us.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||Us.ITERATOR_DONE)}},dr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return cr.__awaiter(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return cr.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return cr.__awaiter(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e,t="read"){return cr.__awaiter(this,void 0,void 0,function*(){return yield this.source.next({cmd:t,size:e})})}throw(e){return cr.__awaiter(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||Us.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return cr.__awaiter(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||Us.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}});var ll=C(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.AsyncRandomAccessFile=Un.RandomAccessFile=void 0;var pr=lt(),Ob=hr(),tO=Xe(),Mb=class extends Ob.ByteStream{constructor(e,t){super();this.position=0,this.buffer=tO.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:r,position:n}=this;return t&&n<r?(typeof e!="number"&&(e=1/0),this.position=Math.min(r,n+Math.min(r-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let r=this.buffer,n=Math.min(this.size,e+t);return r?r.subarray(e,n):new Uint8Array(t)}close(){this.buffer&&(this.buffer=null)}throw(e){return this.close(),{done:!0,value:e}}return(e){return this.close(),{done:!0,value:e}}};Un.RandomAccessFile=Mb;var Cb=class extends Ob.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(()=>pr.__awaiter(this,void 0,void 0,function*(){this.size=(yield e.stat()).size,delete this._pending}))()}readInt32(e){return pr.__awaiter(this,void 0,void 0,function*(){let{buffer:t,byteOffset:r}=yield this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)})}seek(e){return pr.__awaiter(this,void 0,void 0,function*(){return this._pending&&(yield this._pending),this.position=Math.min(e,this.size),e<this.size})}read(e){return pr.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:t,size:r,position:n}=this;if(t&&n<r){typeof e!="number"&&(e=1/0);let s=n,c=0,p=0,m=Math.min(r,s+Math.min(r-s,e)),j=new Uint8Array(Math.max(0,(this.position=m)-s));for(;(s+=p)<m&&(c+=p)<j.byteLength;)({bytesRead:p}=yield t.read(j,c,j.byteLength-c,s));return j}return null})}readAt(e,t){return pr.__awaiter(this,void 0,void 0,function*(){this._pending&&(yield this._pending);let{_handle:r,size:n}=this;if(r&&e+t<n){let s=Math.min(n,e+t),c=new Uint8Array(s-e);return(yield r.read(c,0,t,e)).buffer}return new Uint8Array(t)})}close(){return pr.__awaiter(this,void 0,void 0,function*(){let e=this._handle;this._handle=null,e&&(yield e.close())})}throw(e){return pr.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}return(e){return pr.__awaiter(this,void 0,void 0,function*(){return yield this.close(),{done:!0,value:e}})}};Un.AsyncRandomAccessFile=Cb});var fl=C(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.Int128=fi.Int64=fi.Uint64=fi.BaseInt64=void 0;var iO=1<<16;function En(i){return i<0&&(i=4294967295+i+1),`0x${i.toString(16)}`}var Rn=8,dl=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],Sa=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),r=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*r[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*r[3],s+=n,n=t[3]*r[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?iO:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]<e.buffer[1]||this.buffer[1]===e.buffer[1]&&this.buffer[0]<e.buffer[0]}equals(e){return this.buffer[1]===e.buffer[1]&&this.buffer[0]==e.buffer[0]}greaterThan(e){return e.lessThan(this)}hex(){return`${En(this.buffer[1])} ${En(this.buffer[0])}`}};fi.BaseInt64=Sa;var Be=class extends Sa{times(e){return this._times(e),this}plus(e){return this._plus(e),this}static from(e,t=new Uint32Array(2)){return Be.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return Be.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.length,n=new Be(t);for(let s=0;s<r;){let c=Rn<r-s?Rn:r-s,p=new Be(new Uint32Array([parseInt(e.substr(s,c),10),0])),m=new Be(new Uint32Array([dl[c],0]));n.times(m),n.plus(p),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)Be.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new Be(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Be(new Uint32Array(e.buffer)).plus(t)}};fi.Uint64=Be;var vt=class extends Sa{negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[0]==0&&++this.buffer[1],this}times(e){return this._times(e),this}plus(e){return this._plus(e),this}lessThan(e){let t=this.buffer[1]<<0,r=e.buffer[1]<<0;return t<r||t===r&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return vt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return vt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let r=e.startsWith("-"),n=e.length,s=new vt(t);for(let c=r?1:0;c<n;){let p=Rn<n-c?Rn:n-c,m=new vt(new Uint32Array([parseInt(e.substr(c,p),10),0])),j=new vt(new Uint32Array([dl[p],0]));s.times(j),s.plus(m),c+=p}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let r=-1,n=e.length;++r<n;)vt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+2*r*4,2));return t}static multiply(e,t){return new vt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new vt(new Uint32Array(e.buffer)).plus(t)}};fi.Int64=vt;var Zt=class{constructor(e){this.buffer=e}high(){return new vt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new vt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=~this.buffer[0]+1,this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],this.buffer[0]==0&&++this.buffer[1],this.buffer[1]==0&&++this.buffer[2],this.buffer[2]==0&&++this.buffer[3],this}times(e){let t=new Be(new Uint32Array([this.buffer[3],0])),r=new Be(new Uint32Array([this.buffer[2],0])),n=new Be(new Uint32Array([this.buffer[1],0])),s=new Be(new Uint32Array([this.buffer[0],0])),c=new Be(new Uint32Array([e.buffer[3],0])),p=new Be(new Uint32Array([e.buffer[2],0])),m=new Be(new Uint32Array([e.buffer[1],0])),j=new Be(new Uint32Array([e.buffer[0],0])),F=Be.multiply(s,j);this.buffer[0]=F.low();let R=new Be(new Uint32Array([F.high(),0]));return F=Be.multiply(n,j),R.plus(F),F=Be.multiply(s,m),R.plus(F),this.buffer[1]=R.low(),this.buffer[3]=R.lessThan(F)?1:0,this.buffer[2]=R.high(),new Be(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(Be.multiply(r,j)).plus(Be.multiply(n,m)).plus(Be.multiply(s,p)),this.buffer[3]+=Be.multiply(t,j).plus(Be.multiply(r,m)).plus(Be.multiply(n,p)).plus(Be.multiply(s,c)).low(),this}plus(e){let t=new Uint32Array(4);return t[3]=this.buffer[3]+e.buffer[3]>>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]<this.buffer[0]>>>0&&++t[1],t[1]<this.buffer[1]>>>0&&++t[2],t[2]<this.buffer[2]>>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${En(this.buffer[3])} ${En(this.buffer[2])} ${En(this.buffer[1])} ${En(this.buffer[0])}`}static multiply(e,t){return new Zt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Zt(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Zt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Zt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let r=e.startsWith("-"),n=e.length,s=new Zt(t);for(let c=r?1:0;c<n;){let p=Rn<n-c?Rn:n-c,m=new Zt(new Uint32Array([parseInt(e.substr(c,p),10),0,0,0])),j=new Zt(new Uint32Array([dl[p],0,0,0]));s.times(j),s.plus(m),c+=p}return r?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let r=-1,n=e.length;++r<n;)Zt.from(e[r],new Uint32Array(t.buffer,t.byteOffset+4*4*r,4));return t}};fi.Int128=Zt});var kb=C(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.JSONVectorLoader=kn.VectorLoader=void 0;var Qe=Kt(),rO=it(),Ri=we(),nO=at(),Ub=ui(),sO=kr(),Ta=fl(),Eb=Fe(),hi=Xe(),hl=class extends nO.Visitor{constructor(e,t,r,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=r,this.dictionaries=n}visit(e){return super.visit(e instanceof rO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Qe.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Bool(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitInt(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Int(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFloat(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Float(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitUtf8(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Utf8(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Binary(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.FixedSizeBinary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDate(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Date(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTimestamp(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Timestamp(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitTime(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Time(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitDecimal(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Decimal(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitList(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.List(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Struct(e,0,t,r,this.readNullBitmap(e,r),this.visitMany(e.children))}visitUnion(e){return e.mode===Eb.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Union(e,0,t,r,this.readNullBitmap(e,r),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Dictionary(e,0,t,r,this.readNullBitmap(e,r),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Interval(e,0,t,r,this.readNullBitmap(e,r),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.FixedSizeList(e,0,t,r,this.readNullBitmap(e,r),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:r}=this.nextFieldNode()){return Qe.Data.Map(e,0,t,r,this.readNullBitmap(e,r),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,r=this.nextBufferRange()){return t>0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}};kn.VectorLoader=hl;var Rb=class extends hl{constructor(e,t,r,n){super(new Uint8Array(0),t,r,n);this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):Ub.packBools(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return hi.toArrayBufferView(Uint8Array,hi.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return hi.toArrayBufferView(Uint8Array,hi.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:r}=this;return Ri.DataType.isTimestamp(e)||(Ri.DataType.isInt(e)||Ri.DataType.isTime(e))&&e.bitWidth===64||Ri.DataType.isDate(e)&&e.unit===Eb.DateUnit.MILLISECOND?hi.toArrayBufferView(Uint8Array,Ta.Int64.convertArray(r[t])):Ri.DataType.isDecimal(e)?hi.toArrayBufferView(Uint8Array,Ta.Int128.convertArray(r[t])):Ri.DataType.isBinary(e)||Ri.DataType.isFixedSizeBinary(e)?oO(r[t]):Ri.DataType.isBool(e)?Ub.packBools(r[t]):Ri.DataType.isUtf8(e)?sO.encodeUtf8(r[t].join("")):hi.toArrayBufferView(Uint8Array,hi.toArrayBufferView(e.ArrayType,r[t].map(n=>+n)))}};kn.JSONVectorLoader=Rb;function oO(i){let e=i.join(""),t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r>>1]=parseInt(e.substr(r,2),16);return t}});var Es=C(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.StructRow=xn.MapRow=void 0;var Vb=jc(),ut=Symbol.for("parent"),Vn=Symbol.for("rowIndex"),jt=Symbol.for("keyToIdx"),wt=Symbol.for("idxToVal"),pl=Symbol.for("nodejs.util.inspect.custom"),pi=class{constructor(e,t){this[ut]=e,this.size=t}entries(){return this[Symbol.iterator]()}has(e){return this.get(e)!==void 0}get(e){let t;if(e!=null){let r=this[jt]||(this[jt]=new Map),n=r.get(e);if(n!==void 0){let s=this[wt]||(this[wt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){r.set(e,n);let s=this[wt]||(this[wt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let r=this[jt]||(this[jt]=new Map),n=r.get(e);if(n===void 0&&r.set(e,n=this.getIndex(e)),n>-1){let s=this[wt]||(this[wt]=new Array(this.size));s[n]=this.setValue(n,t)}}return this}clear(){throw new Error(`Clearing ${this[Symbol.toStringTag]} not supported.`)}delete(e){throw new Error(`Deleting ${this[Symbol.toStringTag]} values not supported.`)}*[Symbol.iterator](){let e=this.keys(),t=this.values(),r=this[jt]||(this[jt]=new Map),n=this[wt]||(this[wt]=new Array(this.size));for(let s,c,p=0,m,j;!((m=e.next()).done||(j=t.next()).done);++p)s=m.value,c=j.value,n[p]=c,r.has(s)||r.set(s,p),yield[s,c]}forEach(e,t){let r=this.keys(),n=this.values(),s=t===void 0?e:(m,j,F)=>e.call(t,m,j,F),c=this[jt]||(this[jt]=new Map),p=this[wt]||(this[wt]=new Array(this.size));for(let m,j,F=0,R,L;!((R=r.next()).done||(L=n.next()).done);++F)m=R.value,j=L.value,p[F]=j,c.has(m)||c.set(m,F),s(j,m,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,r)=>e[r]=t),e}inspect(){return this.toString()}[pl](){return this.toString()}toString(){let e=[];return this.forEach((t,r)=>{r=Vb.valueToString(r),t=Vb.valueToString(t),e.push(`${r}: ${t}`)}),`{ ${e.join(", ")} }`}};pi[Symbol.toStringTag]=(i=>(Object.defineProperties(i,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[ut]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Vn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),i[Symbol.toStringTag]="Row"))(pi.prototype);var xb=class extends pi{constructor(e){super(e,e.length);return aO(this)}keys(){return this[ut].getChildAt(0)[Symbol.iterator]()}values(){return this[ut].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[ut].getChildAt(0).get(e)}getIndex(e){return this[ut].getChildAt(0).indexOf(e)}getValue(e){return this[ut].getChildAt(1).get(e)}setValue(e,t){this[ut].getChildAt(1).set(e,t)}};xn.MapRow=xb;var Pb=class extends pi{constructor(e){super(e,e.type.children.length);return Nb(this)}*keys(){for(let e of this[ut].type.children)yield e.name}*values(){for(let e of this[ut].type.children)yield this[e.name]}getKey(e){return this[ut].type.children[e].name}getIndex(e){return this[ut].type.children.findIndex(t=>t.name===e)}getValue(e){return this[ut].getChildAt(e).get(this[Vn])}setValue(e,t){return this[ut].getChildAt(e).set(this[Vn],t)}};xn.StructRow=Pb;Object.setPrototypeOf(pi.prototype,Map.prototype);var Nb=(()=>{let i={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,r=e[jt]||(e[jt]=new Map),n=c=>function(){return this.get(c)},s=c=>function(p){return this.set(c,p)};for(let c of e.keys())r.set(c,++t),i.get=n(c),i.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(i.enumerable=!0,Object.defineProperty(e,c,i)),Object.prototype.hasOwnProperty.call(e,t)||(i.enumerable=!1,Object.defineProperty(e,t,i));return i.get=i.set=null,e}})(),aO=(()=>{if(typeof Proxy=="undefined")return Nb;let i=pi.prototype.has,e=pi.prototype.get,t=pi.prototype.set,r=pi.prototype.getKey,n={isExtensible(){return!1},deleteProperty(){return!1},preventExtensions(){return!0},ownKeys(s){return[...s.keys()].map(c=>`${c}`)},has(s,c){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case ut:case Vn:case wt:case jt:case pl:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(s,c,p){switch(c){case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:case ut:case Vn:case wt:case jt:case pl:return Reflect.get(s,c,p)}return typeof c=="number"&&!i.call(p,c)&&(c=r.call(p,c)),e.call(p,c)},set(s,c,p,m){switch(c){case ut:case Vn:case wt:case jt:return Reflect.set(s,c,p,m);case"getKey":case"getIndex":case"getValue":case"setValue":case"toArray":case"toJSON":case"inspect":case"constructor":case"isPrototypeOf":case"propertyIsEnumerable":case"toString":case"toLocaleString":case"valueOf":case"size":case"has":case"get":case"set":case"clear":case"delete":case"keys":case"values":case"entries":case"forEach":case"__proto__":case"__defineGetter__":case"__defineSetter__":case"hasOwnProperty":case"__lookupGetter__":case"__lookupSetter__":case Symbol.iterator:case Symbol.toStringTag:return!1}return typeof c=="number"&&!i.call(m,c)&&(c=r.call(m,c)),i.call(m,c)?!!t.call(m,c,p):!1}};return s=>new Proxy(s,n)})()});var ks=C(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.createElementComparator=yr.clampRange=yr.clampIndex=void 0;var Lb=He(),qb=Es(),uO=Xe(),Hb=dt();function cO(i,e,t){let r=i.length,n=e>-1?e:r+e%r;return t?t(i,n):n}yr.clampIndex=cO;var zb;function lO(i,e,t,r){let{length:n=0}=i,s=typeof e!="number"?0:e,c=typeof t!="number"?n:t;return s<0&&(s=(s%n+n)%n),c<0&&(c=(c%n+n)%n),c<s&&(zb=s,s=c,c=zb),c>n&&(c=n),r?r(i,s,c):[s,c]}yr.clampRange=lO;var dO=Hb.BigIntAvailable?Hb.BigInt(0):0,Wb=i=>i!==i;function Rs(i){let e=typeof i;if(e!=="object"||i===null)return Wb(i)?Wb:e!=="bigint"?t=>t===i:t=>dO+t===i;if(i instanceof Date){let t=i.valueOf();return r=>r instanceof Date?r.valueOf()===t:!1}return ArrayBuffer.isView(i)?t=>t?uO.compareArrayLike(i,t):!1:i instanceof Map?hO(i):Array.isArray(i)?fO(i):i instanceof Lb.Vector?pO(i):yO(i)}yr.createElementComparator=Rs;function fO(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=Rs(i[t]);return Aa(e)}function hO(i){let e=-1,t=[];return i.forEach(r=>t[++e]=Rs(r)),Aa(t)}function pO(i){let e=[];for(let t=-1,r=i.length;++t<r;)e[t]=Rs(i.get(t));return Aa(e)}function yO(i){let e=Object.keys(i);if(e.length===0)return()=>!1;let t=[];for(let r=-1,n=e.length;++r<n;)t[r]=Rs(i[e[r]]);return Aa(t,e)}function Aa(i,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return _O(i,t);case Map:case qb.MapRow:case qb.StructRow:return Yb(i,t,t.keys());case Object:case void 0:return Yb(i,t,e||Object.keys(t))}return t instanceof Lb.Vector?mO(i,t):!1}}function _O(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e[r]))return!1;return!0}function mO(i,e){let t=i.length;if(e.length!==t)return!1;for(let r=-1;++r<t;)if(!i[r](e.get(r)))return!1;return!0}function Yb(i,e,t){let r=t[Symbol.iterator](),n=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),s=e instanceof Map?e.values():Object.values(e)[Symbol.iterator](),c=0,p=i.length,m=s.next(),j=r.next(),F=n.next();for(;c<p&&!j.done&&!F.done&&!m.done&&!(j.value!==F.value||!i[c](m.value));++c,j=r.next(),F=n.next(),m=s.next());return c===p&&j.done&&F.done&&m.done?!0:(r.return&&r.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var Jr=C(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.selectColumnChildrenArgs=rt.selectVectorChildrenArgs=rt.selectChunkArgs=rt.selectFieldArgs=rt.selectColumnArgs=rt.selectArgs=rt.arrayTypeToDataType=rt.isTypedArray=void 0;var yl=Kt(),Gb=it(),ki=Nn(),Pn=He(),Vt=we(),bO=mr(),_r=Array.isArray;function _l(i){return ArrayBuffer.isView(i)&&"BYTES_PER_ELEMENT"in i}rt.isTypedArray=_l;function $b(i){switch(i){case Int8Array:return Vt.Int8;case Int16Array:return Vt.Int16;case Int32Array:return Vt.Int32;case BigInt64Array:return Vt.Int64;case Uint8Array:return Vt.Uint8;case Uint16Array:return Vt.Uint16;case Uint32Array:return Vt.Uint32;case BigUint64Array:return Vt.Uint64;case Float32Array:return Vt.Float32;case Float64Array:return Vt.Float64;default:return null}}rt.arrayTypeToDataType=$b;function gO(i){let e=$b(i.constructor);if(!e)throw new TypeError("Unrecognized Array input");let t=new e,r=yl.Data.new(t,0,i.length,0,[void 0,i]);return Pn.Vector.new(r)}rt.selectArgs=(i,e)=>Fa(i,e,[],0);rt.selectColumnArgs=i=>{let[e,t]=bl(i,[[],[]]);return t.map((r,n)=>r instanceof ki.Column?ki.Column.new(r.field.clone(e[n]),r):r instanceof Pn.Vector?ki.Column.new(e[n],r):_l(r)?ki.Column.new(e[n],gO(r)):ki.Column.new(e[n],[]))};rt.selectFieldArgs=i=>bl(i,[[],[]]);rt.selectChunkArgs=(i,e)=>ml(i,e,[],0);rt.selectVectorChildrenArgs=(i,e)=>Kb(i,e,[],0);rt.selectColumnChildrenArgs=(i,e)=>Jb(i,e,[],0);function Fa(i,e,t,r){let n,s=r,c=-1,p=e.length;for(;++c<p;)_r(n=e[c])?s=Fa(i,n,t,s).length:n instanceof i&&(t[s++]=n);return t}function ml(i,e,t,r){let n,s=r,c=-1,p=e.length;for(;++c<p;)_r(n=e[c])?s=ml(i,n,t,s).length:n instanceof bO.Chunked?s=ml(i,n.chunks,t,s).length:n instanceof i&&(t[s++]=n);return t}function Kb(i,e,t,r){let n,s=r,c=-1,p=e.length;for(;++c<p;)_r(n=e[c])?s=Kb(i,n,t,s).length:n instanceof i?s=Fa(Pn.Vector,n.schema.fields.map((m,j)=>n.getChildAt(j)),t,s).length:n instanceof Pn.Vector&&(t[s++]=n);return t}function Jb(i,e,t,r){let n,s=r,c=-1,p=e.length;for(;++c<p;)_r(n=e[c])?s=Jb(i,n,t,s).length:n instanceof i?s=Fa(ki.Column,n.schema.fields.map((m,j)=>ki.Column.new(m,n.getChildAt(j))),t,s).length:n instanceof ki.Column&&(t[s++]=n);return t}var vO=(i,[e,t],r)=>(i[0][r]=e,i[1][r]=t,i);function bl(i,e){let t,r;switch(r=i.length){case 0:return e;case 1:if(t=e[0],!i[0])return e;if(_r(i[0]))return bl(i[0],e);i[0]instanceof yl.Data||i[0]instanceof Pn.Vector||_l(i[0])||i[0]instanceof Vt.DataType||([t,i]=Object.entries(i[0]).reduce(vO,e));break;default:_r(t=i[r-1])?i=_r(i[0])?i[0]:i.slice(0,r-1):(i=_r(i[0])?i[0]:i,t=[])}let n=-1,s=-1,c=-1,p=i.length,m,j,[F,R]=e;for(;++c<p;)j=i[c],j instanceof ki.Column&&(R[++s]=j)?F[++n]=j.field.clone(t[c],j.type,!0):({[c]:m=c}=t,j instanceof Vt.DataType&&(R[++s]=j)?F[++n]=Gb.Field.new(m,j,!0):(j==null?void 0:j.type)&&(R[++s]=j)&&(j instanceof yl.Data&&(R[s]=j=Pn.Vector.new(j)),F[++n]=Gb.Field.new(m,j.type,!0)));return e}});var mr=C(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.Chunked=void 0;var jO=ks(),Xb=we(),wO=Jr(),Zb=He(),Qb=class{constructor(e){this.chunks=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator()}next(){for(;this.chunkIndex<this.chunks.length;){let e=this.chunkIterator.next();if(!e.done)return e;++this.chunkIndex<this.chunks.length&&(this.chunkIterator=this.getChunkIterator())}return{done:!0,value:null}}getChunkIterator(){return this.chunks[this.chunkIndex][Symbol.iterator]()}[Symbol.iterator](){return this}},Vi=class extends Zb.AbstractVector{constructor(e,t=[],r=BO(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=r,this._length=r[r.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return wO.selectChunkArgs(Zb.Vector,e)}static concat(...e){let t=Vi.flatten(...e);return new Vi(t[0].type,t)}get type(){return this._type}get length(){return this._length}get chunks(){return this._chunks}get typeId(){return this._type.typeId}get VectorName(){return`Chunked<${this._type}>`}get data(){return this._chunks[0]?this._chunks[0].data:null}get ArrayType(){return this._type.ArrayType}get numChildren(){return this._numChildren}get stride(){return this._chunks[0]?this._chunks[0].stride:1}get byteLength(){return this._chunks.reduce((e,t)=>e+t.byteLength,0)}get nullCount(){let e=this._nullCount;return e<0&&(this._nullCount=e=this._chunks.reduce((t,{nullCount:r})=>t+r,0)),e}get indices(){if(Xb.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Vi.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return Xb.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new Qb(this._chunks)}clone(e=this._chunks){return new Vi(this._type,e)}concat(...e){return this.clone(Vi.flatten(this,...e))}slice(e,t){return jO.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Vi(n.type,s):null}search(e,t){let r=e,n=this._chunkOffsets,s=n.length-1;if(r<0||r>=n[s])return null;if(s<=1)return t?t(this,0,r):[0,r];let c=0,p=0,m=0;do{if(c+1===s)return t?t(this,c,r-p):[c,r-p];m=c+(s-c)/2|0,r>=n[m]?c=m:s=m}while(r<n[s]&&r>=(p=n[c]));return null}isValid(e){return!!this.search(e,this.isValidInternal)}get(e){return this.search(e,this.getInternal)}set(e,t){this.search(e,({chunks:r},n,s)=>r[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(r,n,s)=>this.indexOfInternal(r,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,r=this._type.ArrayType;if(t<=0)return new r(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let m=-1;++m<t;)n+=(s[m]=e[m].toArray()).length;r!==s[0].constructor&&(r=s[0].constructor);let c=new r(n),p=r===Array?SO:IO;for(let m=-1,j=0;++m<t;)j=p(s[m],c,j);return c}getInternal({_chunks:e},t,r){return e[t].get(r)}isValidInternal({_chunks:e},t,r){return e[t].isValid(r)}indexOfInternal({_chunks:e},t,r,n){let s=t-1,c=e.length,p=r,m=0,j=-1;for(;++s<c;){if(~(j=e[s].indexOf(n,p)))return m+j;p=0,m+=e[s].length}return-1}_sliceInternal(e,t,r){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let p=-1,m=s.length;++p<m;){let j=s[p],F=j.length,R=c[p];if(R>=r)break;if(t>=R+F)continue;if(R>=t&&R+F<=r){n.push(j);continue}let L=Math.max(0,t-R),P=Math.min(r-R,F);n.push(j.slice(L,P))}return e.clone(n)}};Da.Chunked=Vi;function BO(i){let e=new Uint32Array((i||[]).length+1),t=e[0]=0,r=e.length;for(let n=0;++n<r;)e[n]=t+=i[n-1].length;return e}var IO=(i,e,t)=>(e.set(i,t),t+i.length),SO=(i,e,t)=>{let r=t;for(let n=-1,s=i.length;++n<s;)e[r++]=i[n];return r}});var Nn=C(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.Column=void 0;var eg=it(),tg=He(),gl=mr(),Xr=class extends gl.Chunked{constructor(e,t=[],r){t=gl.Chunked.flatten(...t);super(e.type,t,r);if(this._field=e,t.length===1&&!(this instanceof vl))return new vl(e,t[0],this._chunkOffsets)}static new(...e){let[t,r,...n]=e;typeof t!="string"&&!(t instanceof eg.Field)&&(r=t,t="");let s=gl.Chunked.flatten(Array.isArray(r)?[...r,...n]:r instanceof tg.Vector?[r,...n]:[tg.Vector.new(r,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new eg.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Xr(t,s)}get field(){return this._field}get name(){return this._field.name}get nullable(){return this._field.nullable}get metadata(){return this._field.metadata}clone(e=this._chunks){return new Xr(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),r,n,s;return(r=t[e])?r:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Xr(n,s):null}};Oa.Column=Xr;var vl=class extends Xr{constructor(e,t,r){super(e,[t],r);this._chunk=t}search(e,t){return t?t(this,0,e):[0,e]}isValid(e){return this._chunk.isValid(e)}get(e){return this._chunk.get(e)}set(e,t){this._chunk.set(e,t)}indexOf(e,t){return this._chunk.indexOf(e,t)}}});var ig=C(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.instance=Ln.TypeAssembler=void 0;var TO=Fi(),AO=TO.flatbuffers.Long,FO=at(),X=er(),jl=class extends FO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return X.Null.startNull(t),X.Null.endNull(t)}visitInt(e,t){return X.Int.startInt(t),X.Int.addBitWidth(t,e.bitWidth),X.Int.addIsSigned(t,e.isSigned),X.Int.endInt(t)}visitFloat(e,t){return X.FloatingPoint.startFloatingPoint(t),X.FloatingPoint.addPrecision(t,e.precision),X.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return X.Binary.startBinary(t),X.Binary.endBinary(t)}visitBool(e,t){return X.Bool.startBool(t),X.Bool.endBool(t)}visitUtf8(e,t){return X.Utf8.startUtf8(t),X.Utf8.endUtf8(t)}visitDecimal(e,t){return X.Decimal.startDecimal(t),X.Decimal.addScale(t,e.scale),X.Decimal.addPrecision(t,e.precision),X.Decimal.endDecimal(t)}visitDate(e,t){return X.Date.startDate(t),X.Date.addUnit(t,e.unit),X.Date.endDate(t)}visitTime(e,t){return X.Time.startTime(t),X.Time.addUnit(t,e.unit),X.Time.addBitWidth(t,e.bitWidth),X.Time.endTime(t)}visitTimestamp(e,t){let r=e.timezone&&t.createString(e.timezone)||void 0;return X.Timestamp.startTimestamp(t),X.Timestamp.addUnit(t,e.unit),r!==void 0&&X.Timestamp.addTimezone(t,r),X.Timestamp.endTimestamp(t)}visitInterval(e,t){return X.Interval.startInterval(t),X.Interval.addUnit(t,e.unit),X.Interval.endInterval(t)}visitList(e,t){return X.List.startList(t),X.List.endList(t)}visitStruct(e,t){return X.Struct_.startStruct_(t),X.Struct_.endStruct_(t)}visitUnion(e,t){X.Union.startTypeIdsVector(t,e.typeIds.length);let r=X.Union.createTypeIdsVector(t,e.typeIds);return X.Union.startUnion(t),X.Union.addMode(t,e.mode),X.Union.addTypeIds(t,r),X.Union.endUnion(t)}visitDictionary(e,t){let r=this.visit(e.indices,t);return X.DictionaryEncoding.startDictionaryEncoding(t),X.DictionaryEncoding.addId(t,new AO(e.id,0)),X.DictionaryEncoding.addIsOrdered(t,e.isOrdered),r!==void 0&&X.DictionaryEncoding.addIndexType(t,r),X.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return X.FixedSizeBinary.startFixedSizeBinary(t),X.FixedSizeBinary.addByteWidth(t,e.byteWidth),X.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return X.FixedSizeList.startFixedSizeList(t),X.FixedSizeList.addListSize(t,e.listSize),X.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return X.Map.startMap(t),X.Map.addKeysSorted(t,e.keysSorted),X.Map.endMap(t)}};Ln.TypeAssembler=jl;Ln.instance=new jl});var cg=C(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.fieldFromJSON=yi.dictionaryBatchFromJSON=yi.recordBatchFromJSON=yi.schemaFromJSON=void 0;var qn=it(),Ce=we(),Zr=Qr(),Hn=Fe();function DO(i,e=new Map){return new qn.Schema(MO(i,e),Ma(i.customMetadata),e)}yi.schemaFromJSON=DO;function rg(i){return new Zr.RecordBatch(i.count,sg(i.columns),og(i.columns))}yi.recordBatchFromJSON=rg;function OO(i){return new Zr.DictionaryBatch(rg(i.data),i.id,i.isDelta)}yi.dictionaryBatchFromJSON=OO;function MO(i,e){return(i.fields||[]).filter(Boolean).map(t=>qn.Field.fromJSON(t,e))}function ng(i,e){return(i.children||[]).filter(Boolean).map(t=>qn.Field.fromJSON(t,e))}function sg(i){return(i||[]).reduce((e,t)=>[...e,new Zr.FieldNode(t.count,CO(t.VALIDITY)),...sg(t.children)],[])}function og(i,e=[]){for(let t=-1,r=(i||[]).length;++t<r;){let n=i[t];n.VALIDITY&&e.push(new Zr.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new Zr.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new Zr.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new Zr.BufferRegion(e.length,n.DATA.length)),e=og(n.children,e)}return e}function CO(i){return(i||[]).reduce((e,t)=>e+ +(t===0),0)}function UO(i,e){let t,r,n,s,c,p;return!e||!(s=i.dictionary)?(c=ug(i,ng(i,e)),n=new qn.Field(i.name,c,i.nullable,Ma(i.customMetadata))):e.has(t=s.id)?(r=(r=s.indexType)?ag(r):new Ce.Int32,p=new Ce.Dictionary(e.get(t),r,t,s.isOrdered),n=new qn.Field(i.name,p,i.nullable,Ma(i.customMetadata))):(r=(r=s.indexType)?ag(r):new Ce.Int32,e.set(t,c=ug(i,ng(i,e))),p=new Ce.Dictionary(c,r,t,s.isOrdered),n=new qn.Field(i.name,p,i.nullable,Ma(i.customMetadata))),n||null}yi.fieldFromJSON=UO;function Ma(i){return new Map(Object.entries(i||{}))}function ag(i){return new Ce.Int(i.isSigned,i.bitWidth)}function ug(i,e){let t=i.type.name;switch(t){case"NONE":return new Ce.Null;case"null":return new Ce.Null;case"binary":return new Ce.Binary;case"utf8":return new Ce.Utf8;case"bool":return new Ce.Bool;case"list":return new Ce.List((e||[])[0]);case"struct":return new Ce.Struct(e||[]);case"struct_":return new Ce.Struct(e||[])}switch(t){case"int":{let r=i.type;return new Ce.Int(r.isSigned,r.bitWidth)}case"floatingpoint":{let r=i.type;return new Ce.Float(Hn.Precision[r.precision])}case"decimal":{let r=i.type;return new Ce.Decimal(r.scale,r.precision)}case"date":{let r=i.type;return new Ce.Date_(Hn.DateUnit[r.unit])}case"time":{let r=i.type;return new Ce.Time(Hn.TimeUnit[r.unit],r.bitWidth)}case"timestamp":{let r=i.type;return new Ce.Timestamp(Hn.TimeUnit[r.unit],r.timezone)}case"interval":{let r=i.type;return new Ce.Interval(Hn.IntervalUnit[r.unit])}case"union":{let r=i.type;return new Ce.Union(Hn.UnionMode[r.mode],r.typeIds||[],e||[])}case"fixedsizebinary":{let r=i.type;return new Ce.FixedSizeBinary(r.byteWidth)}case"fixedsizelist":{let r=i.type;return new Ce.FixedSizeList(r.listSize,(e||[])[0])}case"map":{let r=i.type;return new Ce.Map_((e||[])[0],r.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Qr=C(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.FieldNode=Pt.BufferRegion=Pt.DictionaryBatch=Pt.RecordBatch=Pt.Message=void 0;var wl=Fi(),G=er(),Re=Ro(),nt=it(),EO=Xe(),Pe=Fe(),Bl=ig(),Ca=cg(),en=wl.flatbuffers.Long,RO=wl.flatbuffers.Builder,kO=wl.flatbuffers.ByteBuffer,Ue=we(),br=class{constructor(e,t,r,n){this._version=t,this._headerType=r,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let r=new br(0,Pe.MetadataVersion.V4,t);return r._createHeader=VO(e,t),r}static decode(e){e=new kO(EO.toUint8Array(e));let t=Re.Message.getRootAsMessage(e),r=t.bodyLength(),n=t.version(),s=t.headerType(),c=new br(r,n,s);return c._createHeader=xO(t,s),c}static encode(e){let t=new RO,r=-1;return e.isSchema()?r=nt.Schema.encode(t,e.header()):e.isRecordBatch()?r=xt.encode(t,e.header()):e.isDictionaryBatch()&&(r=_i.encode(t,e.header())),Re.Message.startMessage(t),Re.Message.addVersion(t,Pe.MetadataVersion.V4),Re.Message.addHeader(t,r),Re.Message.addHeaderType(t,e.headerType),Re.Message.addBodyLength(t,new en(e.bodyLength,0)),Re.Message.finishMessageBuffer(t,Re.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof nt.Schema)return new br(0,Pe.MetadataVersion.V4,Pe.MessageHeader.Schema,e);if(e instanceof xt)return new br(t,Pe.MetadataVersion.V4,Pe.MessageHeader.RecordBatch,e);if(e instanceof _i)return new br(t,Pe.MetadataVersion.V4,Pe.MessageHeader.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===Pe.MessageHeader.Schema}isRecordBatch(){return this.headerType===Pe.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Pe.MessageHeader.DictionaryBatch}};Pt.Message=br;var xt=class{constructor(e,t,r){this._nodes=t,this._buffers=r,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};Pt.RecordBatch=xt;var _i=class{constructor(e,t,r=!1){this._data=e,this._isDelta=r,this._id=typeof t=="number"?t:t.low}get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}};Pt.DictionaryBatch=_i;var tn=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Pt.BufferRegion=tn;var rn=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Pt.FieldNode=rn;function VO(i,e){return()=>{switch(e){case Pe.MessageHeader.Schema:return nt.Schema.fromJSON(i);case Pe.MessageHeader.RecordBatch:return xt.fromJSON(i);case Pe.MessageHeader.DictionaryBatch:return _i.fromJSON(i)}throw new Error(`Unrecognized Message type: { name: ${Pe.MessageHeader[e]}, type: ${e} }`)}}function xO(i,e){return()=>{switch(e){case Pe.MessageHeader.Schema:return nt.Schema.decode(i.header(new G.Schema));case Pe.MessageHeader.RecordBatch:return xt.decode(i.header(new Re.RecordBatch),i.version());case Pe.MessageHeader.DictionaryBatch:return _i.decode(i.header(new Re.DictionaryBatch),i.version())}throw new Error(`Unrecognized Message type: { name: ${Pe.MessageHeader[e]}, type: ${e} }`)}}nt.Field.encode=KO;nt.Field.decode=GO;nt.Field.fromJSON=Ca.fieldFromJSON;nt.Schema.encode=$O;nt.Schema.decode=PO;nt.Schema.fromJSON=Ca.schemaFromJSON;xt.encode=JO;xt.decode=NO;xt.fromJSON=Ca.recordBatchFromJSON;_i.encode=XO;_i.decode=LO;_i.fromJSON=Ca.dictionaryBatchFromJSON;rn.encode=ZO;rn.decode=HO;tn.encode=QO;tn.decode=qO;function PO(i,e=new Map){let t=YO(i,e);return new nt.Schema(t,Ua(i),e)}function NO(i,e=Pe.MetadataVersion.V4){return new xt(i.length(),zO(i),WO(i,e))}function LO(i,e=Pe.MetadataVersion.V4){return new _i(xt.decode(i.data(),e),i.id(),i.isDelta())}function qO(i){return new tn(i.offset(),i.length())}function HO(i){return new rn(i.length(),i.nullCount())}function zO(i){let e=[];for(let t,r=-1,n=-1,s=i.nodesLength();++r<s;)(t=i.nodes(r))&&(e[++n]=rn.decode(t));return e}function WO(i,e){let t=[];for(let r,n=-1,s=-1,c=i.buffersLength();++n<c;)(r=i.buffers(n))&&(e<Pe.MetadataVersion.V4&&(r.bb_pos+=8*(n+1)),t[++s]=tn.decode(r));return t}function YO(i,e){let t=[];for(let r,n=-1,s=-1,c=i.fieldsLength();++n<c;)(r=i.fields(n))&&(t[++s]=nt.Field.decode(r,e));return t}function lg(i,e){let t=[];for(let r,n=-1,s=-1,c=i.childrenLength();++n<c;)(r=i.children(n))&&(t[++s]=nt.Field.decode(r,e));return t}function GO(i,e){let t,r,n,s,c,p;return!e||!(p=i.dictionary())?(n=fg(i,lg(i,e)),r=new nt.Field(i.name(),n,i.nullable(),Ua(i))):e.has(t=p.id().low)?(s=(s=p.indexType())?dg(s):new Ue.Int32,c=new Ue.Dictionary(e.get(t),s,t,p.isOrdered()),r=new nt.Field(i.name(),c,i.nullable(),Ua(i))):(s=(s=p.indexType())?dg(s):new Ue.Int32,e.set(t,n=fg(i,lg(i,e))),c=new Ue.Dictionary(n,s,t,p.isOrdered()),r=new nt.Field(i.name(),c,i.nullable(),Ua(i))),r||null}function Ua(i){let e=new Map;if(i)for(let t,r,n=-1,s=i.customMetadataLength()|0;++n<s;)(t=i.customMetadata(n))&&(r=t.key())!=null&&e.set(r,t.value());return e}function dg(i){return new Ue.Int(i.isSigned(),i.bitWidth())}function fg(i,e){let t=i.typeType();switch(t){case G.Type.NONE:return new Ue.Null;case G.Type.Null:return new Ue.Null;case G.Type.Binary:return new Ue.Binary;case G.Type.Utf8:return new Ue.Utf8;case G.Type.Bool:return new Ue.Bool;case G.Type.List:return new Ue.List((e||[])[0]);case G.Type.Struct_:return new Ue.Struct(e||[])}switch(t){case G.Type.Int:{let r=i.type(new G.Int);return new Ue.Int(r.isSigned(),r.bitWidth())}case G.Type.FloatingPoint:{let r=i.type(new G.FloatingPoint);return new Ue.Float(r.precision())}case G.Type.Decimal:{let r=i.type(new G.Decimal);return new Ue.Decimal(r.scale(),r.precision())}case G.Type.Date:{let r=i.type(new G.Date);return new Ue.Date_(r.unit())}case G.Type.Time:{let r=i.type(new G.Time);return new Ue.Time(r.unit(),r.bitWidth())}case G.Type.Timestamp:{let r=i.type(new G.Timestamp);return new Ue.Timestamp(r.unit(),r.timezone())}case G.Type.Interval:{let r=i.type(new G.Interval);return new Ue.Interval(r.unit())}case G.Type.Union:{let r=i.type(new G.Union);return new Ue.Union(r.mode(),r.typeIdsArray()||[],e||[])}case G.Type.FixedSizeBinary:{let r=i.type(new G.FixedSizeBinary);return new Ue.FixedSizeBinary(r.byteWidth())}case G.Type.FixedSizeList:{let r=i.type(new G.FixedSizeList);return new Ue.FixedSizeList(r.listSize(),(e||[])[0])}case G.Type.Map:{let r=i.type(new G.Map);return new Ue.Map_((e||[])[0],r.keysSorted())}}throw new Error(`Unrecognized type: "${G.Type[t]}" (${t})`)}function $O(i,e){let t=e.fields.map(s=>nt.Field.encode(i,s));G.Schema.startFieldsVector(i,t.length);let r=G.Schema.createFieldsVector(i,t),n=e.metadata&&e.metadata.size>0?G.Schema.createCustomMetadataVector(i,[...e.metadata].map(([s,c])=>{let p=i.createString(`${s}`),m=i.createString(`${c}`);return G.KeyValue.startKeyValue(i),G.KeyValue.addKey(i,p),G.KeyValue.addValue(i,m),G.KeyValue.endKeyValue(i)})):-1;return G.Schema.startSchema(i),G.Schema.addFields(i,r),G.Schema.addEndianness(i,eM?G.Endianness.Little:G.Endianness.Big),n!==-1&&G.Schema.addCustomMetadata(i,n),G.Schema.endSchema(i)}function KO(i,e){let t=-1,r=-1,n=-1,s=e.type,c=e.typeId;Ue.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=Bl.instance.visit(s,i),r=Bl.instance.visit(s.dictionary,i)):r=Bl.instance.visit(s,i);let p=(s.children||[]).map(F=>nt.Field.encode(i,F)),m=G.Field.createChildrenVector(i,p),j=e.metadata&&e.metadata.size>0?G.Field.createCustomMetadataVector(i,[...e.metadata].map(([F,R])=>{let L=i.createString(`${F}`),P=i.createString(`${R}`);return G.KeyValue.startKeyValue(i),G.KeyValue.addKey(i,L),G.KeyValue.addValue(i,P),G.KeyValue.endKeyValue(i)})):-1;return e.name&&(t=i.createString(e.name)),G.Field.startField(i),G.Field.addType(i,r),G.Field.addTypeType(i,c),G.Field.addChildren(i,m),G.Field.addNullable(i,!!e.nullable),t!==-1&&G.Field.addName(i,t),n!==-1&&G.Field.addDictionary(i,n),j!==-1&&G.Field.addCustomMetadata(i,j),G.Field.endField(i)}function JO(i,e){let t=e.nodes||[],r=e.buffers||[];Re.RecordBatch.startNodesVector(i,t.length),t.slice().reverse().forEach(c=>rn.encode(i,c));let n=i.endVector();Re.RecordBatch.startBuffersVector(i,r.length),r.slice().reverse().forEach(c=>tn.encode(i,c));let s=i.endVector();return Re.RecordBatch.startRecordBatch(i),Re.RecordBatch.addLength(i,new en(e.length,0)),Re.RecordBatch.addNodes(i,n),Re.RecordBatch.addBuffers(i,s),Re.RecordBatch.endRecordBatch(i)}function XO(i,e){let t=xt.encode(i,e.data);return Re.DictionaryBatch.startDictionaryBatch(i),Re.DictionaryBatch.addId(i,new en(e.id,0)),Re.DictionaryBatch.addIsDelta(i,e.isDelta),Re.DictionaryBatch.addData(i,t),Re.DictionaryBatch.endDictionaryBatch(i)}function ZO(i,e){return Re.FieldNode.createFieldNode(i,new en(e.length,0),new en(e.nullCount,0))}function QO(i,e){return G.Buffer.createBuffer(i,new en(e.offset,0),new en(e.length,0))}var eM=function(){let i=new ArrayBuffer(2);return new DataView(i).setInt16(0,256,!0),new Int16Array(i)[0]===256}()});var Ra=C(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.magicX2AndPadding=ge.magicAndPadding=ge.magicLength=ge.checkForMagicArrowString=ge.MAGIC=ge.MAGIC_STR=ge.PADDING=ge.JSONMessageReader=ge.AsyncMessageReader=ge.MessageReader=void 0;var gr=lt(),vr=Fe(),tM=Fi(),hg=tM.flatbuffers.ByteBuffer,Vs=Qr(),iM=dt(),rM=ll(),pg=Xe(),Ea=hr(),Qt=hn(),Il=i=>`Expected ${vr.MessageHeader[i]} Message in stream, but was null or length 0.`,Sl=i=>`Header pointer of flatbuffer-encoded ${vr.MessageHeader[i]} Message is null or length 0.`,yg=(i,e)=>`Expected to read ${i} metadata bytes, but only read ${e}.`,_g=(i,e)=>`Expected to read ${i} bytes for message body, but only read ${e}.`,Tl=class{constructor(e){this.source=e instanceof Ea.ByteStream?e:new Ea.ByteStream(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Qt.ITERATOR_DONE:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Il(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=pg.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(_g(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=vr.MessageHeader.Schema,r=this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(Sl(t));return n}readMetadataLength(){let e=this.source.read(ge.PADDING),t=e&&new hg(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}}readMetadata(e){let t=this.source.read(e);if(!t)return Qt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(yg(e,t.byteLength));return{done:!1,value:Vs.Message.decode(t)}}};ge.MessageReader=Tl;var mg=class{constructor(e,t){this.source=e instanceof Ea.AsyncByteStream?e:iM.isFileHandle(e)?new rM.AsyncRandomAccessFile(e,t):new Ea.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}next(){return gr.__awaiter(this,void 0,void 0,function*(){let e;return(e=yield this.readMetadataLength()).done||e.value===-1&&(e=yield this.readMetadataLength()).done||(e=yield this.readMetadata(e.value)).done?Qt.ITERATOR_DONE:e})}throw(e){return gr.__awaiter(this,void 0,void 0,function*(){return yield this.source.throw(e)})}return(e){return gr.__awaiter(this,void 0,void 0,function*(){return yield this.source.return(e)})}readMessage(e){return gr.__awaiter(this,void 0,void 0,function*(){let t;if((t=yield this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Il(e));return t.value})}readMessageBody(e){return gr.__awaiter(this,void 0,void 0,function*(){if(e<=0)return new Uint8Array(0);let t=pg.toUint8Array(yield this.source.read(e));if(t.byteLength<e)throw new Error(_g(e,t.byteLength));return t.byteOffset%8===0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()})}readSchema(e=!1){return gr.__awaiter(this,void 0,void 0,function*(){let t=vr.MessageHeader.Schema,r=yield this.readMessage(t),n=r==null?void 0:r.header();if(e&&!n)throw new Error(Sl(t));return n})}readMetadataLength(){return gr.__awaiter(this,void 0,void 0,function*(){let e=yield this.source.read(ge.PADDING),t=e&&new hg(e),r=(t==null?void 0:t.readInt32(0))||0;return{done:r===0,value:r}})}readMetadata(e){return gr.__awaiter(this,void 0,void 0,function*(){let t=yield this.source.read(e);if(!t)return Qt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(yg(e,t.byteLength));return{done:!1,value:Vs.Message.decode(t)}})}};ge.AsyncMessageReader=mg;var bg=class extends Tl{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Qt.ArrowJSON?e:new Qt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=Vs.Message.fromJSON(e.schema,vr.MessageHeader.Schema);return{done:!1,value:t}}if(this._dictionaryIndex<e.dictionaries.length){let t=e.dictionaries[this._dictionaryIndex++];this._body=t.data.columns;let r=Vs.Message.fromJSON(t,vr.MessageHeader.DictionaryBatch);return{done:!1,value:r}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let r=Vs.Message.fromJSON(t,vr.MessageHeader.RecordBatch);return{done:!1,value:r}}return this._body=[],Qt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(r){return(r||[]).reduce((n,s)=>[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE&&[s.TYPE]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...t(s.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Il(e));return t.value}readSchema(){let e=vr.MessageHeader.Schema,t=this.readMessage(e),r=t==null?void 0:t.header();if(!t||!r)throw new Error(Sl(e));return r}};ge.JSONMessageReader=bg;ge.PADDING=4;ge.MAGIC_STR="ARROW1";ge.MAGIC=new Uint8Array(ge.MAGIC_STR.length);for(let i=0;i<ge.MAGIC_STR.length;i+=1|0)ge.MAGIC[i]=ge.MAGIC_STR.charCodeAt(i);function nM(i,e=0){for(let t=-1,r=ge.MAGIC.length;++t<r;)if(ge.MAGIC[t]!==i[e+t])return!1;return!0}ge.checkForMagicArrowString=nM;ge.magicLength=ge.MAGIC.length;ge.magicAndPadding=ge.magicLength+ge.PADDING;ge.magicX2AndPadding=ge.magicLength*2+ge.PADDING});var Ol=C(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.compareTypes=Ne.compareFields=Ne.compareSchemas=Ne.instance=Ne.TypeComparator=void 0;var sM=at(),Q=class extends sM.Visitor{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,n)=>this.compareFields(r,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};Ne.TypeComparator=Q;function bt(i,e){return e instanceof i.constructor}function xs(i,e){return i===e||bt(i,e)}function xi(i,e){return i===e||bt(i,e)&&i.bitWidth===e.bitWidth&&i.isSigned===e.isSigned}function ka(i,e){return i===e||bt(i,e)&&i.precision===e.precision}function oM(i,e){return i===e||bt(i,e)&&i.byteWidth===e.byteWidth}function Al(i,e){return i===e||bt(i,e)&&i.unit===e.unit}function Ps(i,e){return i===e||bt(i,e)&&i.unit===e.unit&&i.timezone===e.timezone}function Ns(i,e){return i===e||bt(i,e)&&i.unit===e.unit&&i.bitWidth===e.bitWidth}function aM(i,e){return i===e||bt(i,e)&&i.children.length===e.children.length&&Ne.instance.compareManyFields(i.children,e.children)}function uM(i,e){return i===e||bt(i,e)&&i.children.length===e.children.length&&Ne.instance.compareManyFields(i.children,e.children)}function Fl(i,e){return i===e||bt(i,e)&&i.mode===e.mode&&i.typeIds.every((t,r)=>t===e.typeIds[r])&&Ne.instance.compareManyFields(i.children,e.children)}function cM(i,e){return i===e||bt(i,e)&&i.id===e.id&&i.isOrdered===e.isOrdered&&Ne.instance.visit(i.indices,e.indices)&&Ne.instance.visit(i.dictionary,e.dictionary)}function Dl(i,e){return i===e||bt(i,e)&&i.unit===e.unit}function lM(i,e){return i===e||bt(i,e)&&i.listSize===e.listSize&&i.children.length===e.children.length&&Ne.instance.compareManyFields(i.children,e.children)}function dM(i,e){return i===e||bt(i,e)&&i.keysSorted===e.keysSorted&&i.children.length===e.children.length&&Ne.instance.compareManyFields(i.children,e.children)}Q.prototype.visitNull=xs;Q.prototype.visitBool=xs;Q.prototype.visitInt=xi;Q.prototype.visitInt8=xi;Q.prototype.visitInt16=xi;Q.prototype.visitInt32=xi;Q.prototype.visitInt64=xi;Q.prototype.visitUint8=xi;Q.prototype.visitUint16=xi;Q.prototype.visitUint32=xi;Q.prototype.visitUint64=xi;Q.prototype.visitFloat=ka;Q.prototype.visitFloat16=ka;Q.prototype.visitFloat32=ka;Q.prototype.visitFloat64=ka;Q.prototype.visitUtf8=xs;Q.prototype.visitBinary=xs;Q.prototype.visitFixedSizeBinary=oM;Q.prototype.visitDate=Al;Q.prototype.visitDateDay=Al;Q.prototype.visitDateMillisecond=Al;Q.prototype.visitTimestamp=Ps;Q.prototype.visitTimestampSecond=Ps;Q.prototype.visitTimestampMillisecond=Ps;Q.prototype.visitTimestampMicrosecond=Ps;Q.prototype.visitTimestampNanosecond=Ps;Q.prototype.visitTime=Ns;Q.prototype.visitTimeSecond=Ns;Q.prototype.visitTimeMillisecond=Ns;Q.prototype.visitTimeMicrosecond=Ns;Q.prototype.visitTimeNanosecond=Ns;Q.prototype.visitDecimal=xs;Q.prototype.visitList=aM;Q.prototype.visitStruct=uM;Q.prototype.visitUnion=Fl;Q.prototype.visitDenseUnion=Fl;Q.prototype.visitSparseUnion=Fl;Q.prototype.visitDictionary=cM;Q.prototype.visitInterval=Dl;Q.prototype.visitIntervalDayTime=Dl;Q.prototype.visitIntervalYearMonth=Dl;Q.prototype.visitFixedSizeList=lM;Q.prototype.visitMap=dM;Ne.instance=new Q;function fM(i,e){return Ne.instance.compareSchemas(i,e)}Ne.compareSchemas=fM;function hM(i,e){return Ne.instance.compareFields(i,e)}Ne.compareFields=hM;function pM(i,e){return Ne.instance.visit(i,e)}Ne.compareTypes=pM});var Bg=C(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.VectorAssembler=void 0;var yM=at(),gg=Fe(),_M=Pi(),Ml=Xe(),Cl=ui(),mM=Jr(),vg=Qr(),jg=we(),Ke=class extends yM.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new Ke,r=mM.selectVectorChildrenArgs(_M.RecordBatch,e),[n=t]=t.visitMany(r);return n}visit(e){if(!jg.DataType.isDictionary(e.type)){let{data:t,length:r,nullCount:n}=e;if(r>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");jg.DataType.isNull(e.type)||ei.call(this,n<=0?new Uint8Array(0):Cl.truncateBitmap(t.offset,r,t.nullBitmap)),this.nodes.push(new vg.FieldNode(r,n))}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.indices)}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};Va.VectorAssembler=Ke;function ei(i){let e=i.byteLength+7&~7;return this.buffers.push(i),this.bufferRegions.push(new vg.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function bM(i){let{type:e,length:t,typeIds:r,valueOffsets:n}=i;if(ei.call(this,r),e.mode===gg.UnionMode.Sparse)return El.call(this,i);if(e.mode===gg.UnionMode.Dense){if(i.offset<=0)return ei.call(this,n),El.call(this,i);{let s=r.reduce((F,R)=>Math.max(F,R),r[0]),c=new Int32Array(s+1),p=new Int32Array(s+1).fill(-1),m=new Int32Array(t),j=Ml.rebaseValueOffsets(-n[0],t,n);for(let F,R,L=-1;++L<t;)(R=p[F=r[L]])===-1&&(R=p[F]=j[F]),m[L]=j[L]-R,++c[F];ei.call(this,m);for(let F,R=-1,L=e.children.length;++R<L;)if(F=i.getChildAt(R)){let P=e.typeIds[R],ae=Math.min(t,c[P]);this.visit(F.slice(p[P],ae))}}}return this}function gM(i){let e;return i.nullCount>=i.length?ei.call(this,new Uint8Array(0)):(e=i.values)instanceof Uint8Array?ei.call(this,Cl.truncateBitmap(i.offset,i.length,e)):ei.call(this,Cl.packBools(i))}function jr(i){return ei.call(this,i.values.subarray(0,i.length*i.stride))}function wg(i){let{length:e,values:t,valueOffsets:r}=i,n=r[0],s=r[e],c=Math.min(s-n,t.byteLength-n);return ei.call(this,Ml.rebaseValueOffsets(-r[0],e,r)),ei.call(this,t.subarray(n,n+c)),this}function Ul(i){let{length:e,valueOffsets:t}=i;return t&&ei.call(this,Ml.rebaseValueOffsets(t[0],e,t)),this.visit(i.getChildAt(0))}function El(i){return this.visitMany(i.type.children.map((e,t)=>i.getChildAt(t)).filter(Boolean))[0]}Ke.prototype.visitBool=gM;Ke.prototype.visitInt=jr;Ke.prototype.visitFloat=jr;Ke.prototype.visitUtf8=wg;Ke.prototype.visitBinary=wg;Ke.prototype.visitFixedSizeBinary=jr;Ke.prototype.visitDate=jr;Ke.prototype.visitTimestamp=jr;Ke.prototype.visitTime=jr;Ke.prototype.visitDecimal=jr;Ke.prototype.visitList=Ul;Ke.prototype.visitStruct=El;Ke.prototype.visitUnion=bM;Ke.prototype.visitInterval=jr;Ke.prototype.visitFixedSizeList=Ul;Ke.prototype.visitMap=Ul});var Sg=C(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.JSONTypeAssembler=void 0;var vM=at(),ct=er(),zn=Fe(),Ig=class extends vM.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:ct.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:r}){return{name:ct.Type[e].toLowerCase(),bitWidth:t,isSigned:r}}visitFloat({typeId:e,precision:t}){return{name:ct.Type[e].toLowerCase(),precision:zn.Precision[t]}}visitBinary({typeId:e}){return{name:ct.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:ct.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:ct.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:r}){return{name:ct.Type[e].toLowerCase(),scale:t,precision:r}}visitDate({typeId:e,unit:t}){return{name:ct.Type[e].toLowerCase(),unit:zn.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:r}){return{name:ct.Type[e].toLowerCase(),unit:zn.TimeUnit[t],bitWidth:r}}visitTimestamp({typeId:e,timezone:t,unit:r}){return{name:ct.Type[e].toLowerCase(),unit:zn.TimeUnit[r],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:ct.Type[e].toLowerCase(),unit:zn.IntervalUnit[t]}}visitList({typeId:e}){return{name:ct.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:ct.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:r}){return{name:ct.Type[e].toLowerCase(),mode:zn.UnionMode[t],typeIds:[...r]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:ct.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:ct.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:ct.Type[e].toLowerCase(),keysSorted:t}}};xa.JSONTypeAssembler=Ig});var Fg=C(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.JSONVectorAssembler=void 0;var jM=Fs(),Ls=Nn(),wM=He(),BM=at(),IM=Fe(),SM=Pi(),Rl=Fe(),Pa=ui(),TM=Jr(),Tg=we(),Na=class extends BM.Visitor{static assemble(...e){return new Na().visitMany(TM.selectColumnChildrenArgs(SM.RecordBatch,e))}visit(e){let{data:t,name:r,length:n}=e,{offset:s,nullCount:c,nullBitmap:p}=t,m=Tg.DataType.isDictionary(e.type)?e.type.indices:e.type,j=Object.assign([],t.buffers,{[IM.BufferType.VALIDITY]:void 0});return Object.assign({name:r,count:n,VALIDITY:Tg.DataType.isNull(m)?void 0:c<=0?Array.from({length:n},()=>1):[...new Pa.BitIterator(p,s,n,null,Pa.getBit)]},super.visit(wM.Vector.new(t.clone(m,s,n,0,j))))}visitNull(){return{}}visitBool({values:e,offset:t,length:r}){return{DATA:[...new Pa.BitIterator(e,t,r,null,Pa.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...qs(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...Ag(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...Ag(e)]}}visitDate(e){return{DATA:e.type.unit===Rl.DateUnit.DAY?[...e.values]:[...qs(e.values,2)]}}visitTimestamp(e){return{DATA:[...qs(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<Rl.TimeUnit.MICROSECOND?[...e.values]:[...qs(e.values,2)]}}visitDecimal(e){return{DATA:[...qs(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Ls.Column(t,[e.getChildAt(r)])))}}visitStruct(e){return{children:e.type.children.map((t,r)=>this.visit(new Ls.Column(t,[e.getChildAt(r)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===Rl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,r)=>this.visit(new Ls.Column(t,[e.getChildAt(r)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,r)=>this.visit(new Ls.Column(t,[e.getChildAt(r)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,r)=>this.visit(new Ls.Column(t,[e.getChildAt(r)])))}}};La.JSONVectorAssembler=Na;function*Ag(i){for(let e of i)yield e.reduce((t,r)=>`${t}${("0"+(r&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*qs(i,e){for(let t=-1,r=i.length/e;++t<r;)yield`${jM.BN.new(i.subarray((t+0)*e,(t+1)*e),!1)}`}});var Ya=C(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.RecordBatchJSONWriter=bi.RecordBatchFileWriter=bi.RecordBatchStreamWriter=bi.RecordBatchWriter=void 0;var Dg=lt(),kl=zs(),AM=Ra(),FM=Nn(),DM=we(),OM=it(),qa=Qr(),Vl=Qr(),Wn=al(),xl=Fe(),Og=Ol(),Pl=hr(),Mg=Bg(),MM=Sg(),Cg=Fg(),CM=Xe(),Nl=Pi(),UM=hn(),mi=dt(),Hs=class extends UM.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new Pl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,mi.isObject(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return mi.isPromise(e)?e.then(t=>this.writeAll(t)):mi.isAsyncIterable(e)?ql(this,e):Ll(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Pl.AsyncByteQueue?this._sink=e:(this._sink=new Pl.AsyncByteQueue,e&&mi.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&mi.isWritableNodeStream(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,(!t||!Og.compareSchemas(t,this._schema))&&(t===null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof kl.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Nl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!Og.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Nl.RecordBatch?e instanceof Nl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof kl.Table?this.writeAll(e.chunks):mi.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=qa.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,p=s+c+r&~r,m=p-s-c;return e.headerType===xl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Wn.FileBlock(p,e.bodyLength,this._position)):e.headerType===xl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Wn.FileBlock(p,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(p-c)),s>0&&this._write(n),this._writePadding(m)}_write(e){if(this._started){let t=CM.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(qa.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(AM.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:s}=Mg.VectorAssembler.assemble(e),c=new Vl.RecordBatch(e.length,r,n),p=qa.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(p)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,r=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:p}=Mg.VectorAssembler.assemble(e),m=new Vl.RecordBatch(e.length,s,c),j=new Vl.DictionaryBatch(m,t,r),F=qa.Message.from(j,n);return this._writeMessage(F)._writeBodyBuffers(p)}_writeBodyBuffers(e){let t,r,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(r=t.byteLength)>0&&(this._write(t),(n=(r+7&~7)-r)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,r]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(r=r.slice(n)).length>0){let s="chunks"in r?r.chunks:[r];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};bi.RecordBatchWriter=Hs;var Ha=class extends Hs{static writeAll(e,t){let r=new Ha(t);return mi.isPromise(e)?e.then(n=>r.writeAll(n)):mi.isAsyncIterable(e)?ql(r,e):Ll(r,e)}};bi.RecordBatchStreamWriter=Ha;var za=class extends Hs{static writeAll(e){let t=new za;return mi.isPromise(e)?e.then(r=>t.writeAll(r)):mi.isAsyncIterable(e)?ql(t,e):Ll(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Wn.Footer.encode(new Wn.Footer(e,xl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};bi.RecordBatchFileWriter=za;var Wa=class extends Hs{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Wa().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
+
"schema": ${JSON.stringify({fields:e.fields.map(Ug)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,r=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
|
|
9
|
+
`),this._write(`${EM(e,t,r)}`),this._dictionaryBlocks.push(new Wn.FileBlock(0,0,0)),this}_writeRecordBatch(e){return this._writeDictionaries(e),this._recordBatches.push(e),this}close(){if(this._dictionaries.length>0){this._write(`,
|
|
10
|
+
"dictionaries": [
|
|
11
|
+
`);for(let e of this._dictionaries)super._writeDictionaries(e);this._write(`
|
|
12
|
+
]`)}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e<t;)this._write(e===0?`,
|
|
13
|
+
"batches": [
|
|
14
|
+
`:`,
|
|
15
|
+
`),this._write(`${RM(this._recordBatches[e])}`),this._recordBatchBlocks.push(new Wn.FileBlock(0,0,0));this._write(`
|
|
16
|
+
]`)}return this._schema&&this._write(`
|
|
17
|
+
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};bi.RecordBatchJSONWriter=Wa;function Ll(i,e){let t=e;e instanceof kl.Table&&(t=e.chunks,i.reset(void 0,e.schema));for(let r of t)i.write(r);return i.finish()}function ql(i,e){var t,r,n,s;return Dg.__awaiter(this,void 0,void 0,function*(){try{for(t=Dg.__asyncValues(e);r=yield t.next(),!r.done;){let c=r.value;i.write(c)}}catch(c){n={error:c}}finally{try{r&&!r.done&&(s=t.return)&&(yield s.call(t))}finally{if(n)throw n.error}}return i.finish()})}function Ug({name:i,type:e,nullable:t}){let r=new MM.JSONTypeAssembler;return{name:i,nullable:t,type:r.visit(e),children:(e.children||[]).map(Ug),dictionary:DM.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:r.visit(e.indices)}:void 0}}function EM(i,e,t=!1){let r=new OM.Field(`${e}`,i.type,i.nullCount>0),n=Cg.JSONVectorAssembler.assemble(new FM.Column(r,[i]));return JSON.stringify({id:e,isDelta:t,data:{count:i.length,columns:n}},null,2)}function RM(i){return JSON.stringify({count:i.length,columns:Cg.JSONVectorAssembler.assemble(i)},null,2)}});var Wl=C(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.distributeVectorsIntoRecordBatches=wr.distributeColumnsIntoRecordBatches=wr.ensureSameLengthData=void 0;var Eg=Kt(),Hl=it(),kM=mr(),VM=Pi(),zl=new Uint8Array(0),Rg=i=>[zl,zl,new Uint8Array(i),zl];function xM(i,e,t=e.reduce((r,n)=>Math.max(r,n.length),0)){let r,n,s=-1,c=e.length,p=[...i.fields],m=[],j=(t+63&~63)>>3;for(;++s<c;)(r=e[s])&&r.length===t?m[s]=r:((n=p[s]).nullable||(p[s]=p[s].clone({nullable:!0})),m[s]=r?r._changeLengthAndBackfillNullBitmap(t):Eg.Data.new(n.type,0,t,t,Rg(j)));return[new Hl.Schema(p),t,m]}wr.ensureSameLengthData=xM;function PM(i){return kg(new Hl.Schema(i.map(({field:e})=>e)),i)}wr.distributeColumnsIntoRecordBatches=PM;function kg(i,e){return NM(i,e.map(t=>t instanceof kM.Chunked?t.chunks.map(r=>r.data):[t.data]))}wr.distributeVectorsIntoRecordBatches=kg;function NM(i,e){let t=[...i.fields],r=[],n={numBatches:e.reduce((R,L)=>Math.max(R,L.length),0)},s=0,c=0,p=-1,m=e.length,j,F=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,p=-1;++p<m;)F[p]=j=e[p].shift(),c=Math.min(c,j?j.length:c);isFinite(c)&&(F=LM(t,c,F,e,n),c>0&&(r[s++]=[c,F.slice()]))}return[i=new Hl.Schema(t,i.metadata),r.map(R=>new VM.RecordBatch(i,...R))]}function LM(i,e,t,r,n){let s,c,p=0,m=-1,j=r.length,F=(e+63&~63)>>3;for(;++m<j;)(s=t[m])&&(p=s.length)>=e?p===e?t[m]=s:(t[m]=s.slice(0,e),s=s.slice(e,p-e),n.numBatches=Math.max(n.numBatches,r[m].unshift(s))):((c=i[m]).nullable||(i[m]=c.clone({nullable:!0})),t[m]=s?s._changeLengthAndBackfillNullBitmap(e):Eg.Data.new(c.type,0,e,e,Rg(F)));return t}});var We=C(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.BaseVector=void 0;var qM=Fe(),HM=mr(),zM=ks(),Yl=He(),Gl=class extends Yl.AbstractVector{constructor(e,t){super();this._children=t,this.numChildren=e.childData.length,this._bindDataAccessors(this.data=e)}get type(){return this.data.type}get typeId(){return this.data.typeId}get length(){return this.data.length}get offset(){return this.data.offset}get stride(){return this.data.stride}get nullCount(){return this.data.nullCount}get byteLength(){return this.data.byteLength}get VectorName(){return`${qM.Type[this.typeId]}Vector`}get ArrayType(){return this.type.ArrayType}get values(){return this.data.values}get typeIds(){return this.data.typeIds}get nullBitmap(){return this.data.nullBitmap}get valueOffsets(){return this.data.valueOffsets}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}clone(e,t=this._children){return Yl.Vector.new(e,t)}concat(...e){return HM.Chunked.concat(this,...e)}slice(e,t){return zM.clampRange(this,e,t,this._sliceInternal)}isValid(e){if(this.nullCount>0){let t=this.offset+e;return(this.nullBitmap[t>>3]&1<<t%8)!==0}return!0}getChildAt(e){return e<0||e>=this.numChildren?null:(this._children||(this._children=[]))[e]||(this._children[e]=Yl.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,r){return e.clone(e.data.slice(t,r-t),null)}_bindDataAccessors(e){}};Ga.BaseVector=Gl;Gl.prototype[Symbol.isConcatSpreadable]=!0});var $l=C($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.BinaryVector=void 0;var WM=He(),YM=We(),GM=we(),Vg=class extends YM.BaseVector{asUtf8(){return WM.Vector.new(this.data.clone(new GM.Utf8))}};$a.BinaryVector=Vg});var Kl=C(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.BoolVector=void 0;var $M=we(),KM=We(),JM=gi(),xg=class extends KM.BaseVector{static from(e){return JM.vectorFromValuesWithType(()=>new $M.Bool,e)}};Ka.BoolVector=xg});var Xl=C(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.DateMillisecondVector=Br.DateDayVector=Br.DateVector=void 0;var XM=Fe(),ZM=We(),Pg=gi(),Jl=we(),Ja=class extends ZM.BaseVector{static from(...e){return e.length===2?Pg.vectorFromValuesWithType(()=>e[1]===XM.DateUnit.DAY?new Jl.DateDay:new Jl.DateMillisecond,e[0]):Pg.vectorFromValuesWithType(()=>new Jl.DateMillisecond,e[0])}};Br.DateVector=Ja;var Ng=class extends Ja{};Br.DateDayVector=Ng;var Lg=class extends Ja{};Br.DateMillisecondVector=Lg});var Zl=C(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.DecimalVector=void 0;var QM=We(),qg=class extends QM.BaseVector{};Xa.DecimalVector=qg});var Qa=C(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.DictionaryVector=void 0;var eC=Kt(),Hg=He(),tC=We(),iC=gi(),rC=we(),Ql=class extends tC.BaseVector{constructor(e){super(e);this.indices=Hg.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,r,n]=e,s=new rC.Dictionary(t.type,r,null,null);return Hg.Vector.new(eC.Data.Dictionary(s,0,n.length,0,null,n,t))}return iC.vectorFromValuesWithType(()=>e[0].type,e[0])}get dictionary(){return this.data.dictionary}reverseLookup(e){return this.dictionary.indexOf(e)}getKey(e){return this.indices.get(e)}getValue(e){return this.dictionary.get(e)}setKey(e,t){return this.indices.set(e,t)}setValue(e,t){return this.dictionary.set(e,t)}};Za.DictionaryVector=Ql;Ql.prototype.indices=null});var ed=C(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.FixedSizeBinaryVector=void 0;var nC=We(),zg=class extends nC.BaseVector{};eu.FixedSizeBinaryVector=zg});var td=C(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.FixedSizeListVector=void 0;var sC=We(),Wg=class extends sC.BaseVector{};tu.FixedSizeListVector=Wg});var sd=C(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.Float64Vector=vi.Float32Vector=vi.Float16Vector=vi.FloatVector=void 0;var oC=Kt(),aC=He(),uC=We(),cC=gi(),nn=we(),Ws=class extends uC.BaseVector{static from(e){let t=fC(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let r=dC(e.constructor)||t;if(t===null&&(t=r),t&&t===r){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!lC(t,e.constructor))return aC.Vector.new(oC.Data.Float(n,0,s,0,null,e))}}if(t)return cC.vectorFromValuesWithType(()=>new t,e);throw e instanceof DataView||e instanceof ArrayBuffer?new TypeError(`Cannot infer float type from instance of ${e.constructor.name}`):new TypeError("Unrecognized FloatVector input")}};vi.FloatVector=Ws;var id=class extends Ws{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};vi.Float16Vector=id;var rd=class extends Ws{};vi.Float32Vector=rd;var nd=class extends Ws{};vi.Float64Vector=nd;var lC=(i,e)=>i===nn.Float16&&e!==Uint16Array,dC=i=>{switch(i){case Uint16Array:return nn.Float16;case Float32Array:return nn.Float32;case Float64Array:return nn.Float64;default:return null}},fC=i=>{switch(i){case id:return nn.Float16;case rd:return nn.Float32;case nd:return nn.Float64;default:return null}}});var od=C(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.IntervalYearMonthVector=Ir.IntervalDayTimeVector=Ir.IntervalVector=void 0;var hC=We(),iu=class extends hC.BaseVector{};Ir.IntervalVector=iu;var Yg=class extends iu{};Ir.IntervalDayTimeVector=Yg;var Gg=class extends iu{};Ir.IntervalYearMonthVector=Gg});var ru=C(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.Uint64Vector=Je.Uint32Vector=Je.Uint16Vector=Je.Uint8Vector=Je.Int64Vector=Je.Int32Vector=Je.Int16Vector=Je.Int8Vector=Je.IntVector=void 0;var pC=Kt(),yC=He(),_C=We(),mC=gi(),$g=dt(),Kg=Xe(),Le=we(),ji=class extends _C.BaseVector{static from(...e){let[t,r=!1]=e,n=vC(this,r);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=gC(t.constructor,r)||n;if(n===null&&(n=s),n&&n===s){let c=new n,p=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return bC(n,t.constructor)&&(p*=.5),yC.Vector.new(pC.Data.Int(c,0,p,0,null,t))}}if(n)return mC.vectorFromValuesWithType(()=>new n,t);throw t instanceof DataView||t instanceof ArrayBuffer?new TypeError(`Cannot infer integer type from instance of ${t.constructor.name}`):new TypeError("Unrecognized IntVector input")}};Je.IntVector=ji;var ad=class extends ji{};Je.Int8Vector=ad;var ud=class extends ji{};Je.Int16Vector=ud;var cd=class extends ji{};Je.Int32Vector=cd;var ld=class extends ji{toBigInt64Array(){return Kg.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};Je.Int64Vector=ld;var dd=class extends ji{};Je.Uint8Vector=dd;var fd=class extends ji{};Je.Uint16Vector=fd;var hd=class extends ji{};Je.Uint32Vector=hd;var pd=class extends ji{toBigUint64Array(){return Kg.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};Je.Uint64Vector=pd;var bC=(i,e)=>(i===Le.Int64||i===Le.Uint64)&&(e===Int32Array||e===Uint32Array),gC=(i,e)=>{switch(i){case Int8Array:return Le.Int8;case Int16Array:return Le.Int16;case Int32Array:return e?Le.Int64:Le.Int32;case $g.BigInt64Array:return Le.Int64;case Uint8Array:return Le.Uint8;case Uint16Array:return Le.Uint16;case Uint32Array:return e?Le.Uint64:Le.Uint32;case $g.BigUint64Array:return Le.Uint64;default:return null}},vC=(i,e)=>{switch(i){case ad:return Le.Int8;case ud:return Le.Int16;case cd:return e?Le.Int64:Le.Int32;case ld:return Le.Int64;case dd:return Le.Uint8;case fd:return Le.Uint16;case hd:return e?Le.Uint64:Le.Uint32;case pd:return Le.Uint64;default:return null}}});var yd=C(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.ListVector=void 0;var jC=We(),Jg=class extends jC.BaseVector{};nu.ListVector=Jg});var _d=C(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.MapVector=void 0;var wC=Es(),BC=He(),IC=We(),SC=we(),Xg=class extends IC.BaseVector{asList(){let e=this.type.children[0];return BC.Vector.new(this.data.clone(new SC.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:r,[e+1]:n}=this.valueOffsets;return new wC.MapRow(t.slice(r,n))}};su.MapVector=Xg});var md=C(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.NullVector=void 0;var TC=We(),Zg=class extends TC.BaseVector{};ou.NullVector=Zg});var bd=C(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.StructVector=void 0;var AC=Es(),FC=We(),DC=Symbol.for("rowIndex"),Qg=class extends FC.BaseVector{bind(e){let t=this._row||(this._row=new AC.StructRow(this)),r=Object.create(t);return r[DC]=e,r}};au.StructVector=Qg});var gd=C(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.TimestampNanosecondVector=Nt.TimestampMicrosecondVector=Nt.TimestampMillisecondVector=Nt.TimestampSecondVector=Nt.TimestampVector=void 0;var OC=We(),Yn=class extends OC.BaseVector{};Nt.TimestampVector=Yn;var ev=class extends Yn{};Nt.TimestampSecondVector=ev;var tv=class extends Yn{};Nt.TimestampMillisecondVector=tv;var iv=class extends Yn{};Nt.TimestampMicrosecondVector=iv;var rv=class extends Yn{};Nt.TimestampNanosecondVector=rv});var vd=C(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.TimeNanosecondVector=Lt.TimeMicrosecondVector=Lt.TimeMillisecondVector=Lt.TimeSecondVector=Lt.TimeVector=void 0;var MC=We(),Gn=class extends MC.BaseVector{};Lt.TimeVector=Gn;var nv=class extends Gn{};Lt.TimeSecondVector=nv;var sv=class extends Gn{};Lt.TimeMillisecondVector=sv;var ov=class extends Gn{};Lt.TimeMicrosecondVector=ov;var av=class extends Gn{};Lt.TimeNanosecondVector=av});var jd=C(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.SparseUnionVector=Sr.DenseUnionVector=Sr.UnionVector=void 0;var CC=We(),uu=class extends CC.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};Sr.UnionVector=uu;var uv=class extends uu{get valueOffsets(){return this.data.valueOffsets}};Sr.DenseUnionVector=uv;var cv=class extends uu{};Sr.SparseUnionVector=cv});var wd=C(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.Utf8Vector=void 0;var UC=He(),EC=We(),lv=we(),RC=gi(),dv=class extends EC.BaseVector{static from(e){return RC.vectorFromValuesWithType(()=>new lv.Utf8,e)}asBinary(){return UC.Vector.new(this.data.clone(new lv.Binary))}};cu.Utf8Vector=dv});var fv=C(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.partial2=Tr.partial1=Tr.partial0=void 0;function kC(i){return function(){return i(this)}}Tr.partial0=kC;function VC(i){return function(e){return i(this,e)}}Tr.partial1=VC;function xC(i){return function(e,t){return i(this,e,t)}}Tr.partial2=xC});var Sd=C($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.instance=$n.GetVisitor=void 0;var lu=Fs(),PC=at(),NC=kr(),LC=Is(),qt=Fe(),ee=class extends PC.Visitor{};$n.GetVisitor=ee;var qC=(i,e)=>864e5*i[e],Bd=(i,e)=>4294967296*i[e+1]+(i[e]>>>0),HC=(i,e)=>4294967296*(i[e+1]/1e3)+(i[e]>>>0)/1e3,zC=(i,e)=>4294967296*(i[e+1]/1e6)+(i[e]>>>0)/1e6,hv=i=>new Date(i),WC=(i,e)=>hv(qC(i,e)),YC=(i,e)=>hv(Bd(i,e)),GC=(i,e)=>null,pv=(i,e,t)=>{let{[t]:r,[t+1]:n}=e;return r!=null&&n!=null?i.subarray(r,n):null},$C=({offset:i,values:e},t)=>{let r=i+t;return(e[r>>3]&1<<r%8)!==0},yv=({values:i},e)=>WC(i,e),_v=({values:i},e)=>YC(i,e*2),wi=({stride:i,values:e},t)=>e[i*t],mv=({stride:i,values:e},t)=>LC.uint16ToFloat64(e[i*t]),Id=({stride:i,values:e,type:t},r)=>lu.BN.new(e.subarray(i*r,i*(r+1)),t.isSigned),KC=({stride:i,values:e},t)=>e.subarray(i*t,i*(t+1)),JC=({values:i,valueOffsets:e},t)=>pv(i,e,t),XC=({values:i,valueOffsets:e},t)=>{let r=pv(i,e,t);return r!==null?NC.decodeUtf8(r):null},ZC=(i,e)=>i.type.bitWidth<64?wi(i,e):Id(i,e),QC=(i,e)=>i.type.precision!==qt.Precision.HALF?wi(i,e):mv(i,e),eU=(i,e)=>i.type.unit===qt.DateUnit.DAY?yv(i,e):_v(i,e),bv=({values:i},e)=>1e3*Bd(i,e*2),gv=({values:i},e)=>Bd(i,e*2),vv=({values:i},e)=>HC(i,e*2),jv=({values:i},e)=>zC(i,e*2),tU=(i,e)=>{switch(i.type.unit){case qt.TimeUnit.SECOND:return bv(i,e);case qt.TimeUnit.MILLISECOND:return gv(i,e);case qt.TimeUnit.MICROSECOND:return vv(i,e);case qt.TimeUnit.NANOSECOND:return jv(i,e)}},wv=({values:i,stride:e},t)=>i[e*t],Bv=({values:i,stride:e},t)=>i[e*t],Iv=({values:i},e)=>lu.BN.signed(i.subarray(2*e,2*(e+1))),Sv=({values:i},e)=>lu.BN.signed(i.subarray(2*e,2*(e+1))),iU=(i,e)=>{switch(i.type.unit){case qt.TimeUnit.SECOND:return wv(i,e);case qt.TimeUnit.MILLISECOND:return Bv(i,e);case qt.TimeUnit.MICROSECOND:return Iv(i,e);case qt.TimeUnit.NANOSECOND:return Sv(i,e)}},rU=({values:i},e)=>lu.BN.decimal(i.subarray(4*e,4*(e+1))),nU=(i,e)=>{let t=i.getChildAt(0),{valueOffsets:r,stride:n}=i;return t.slice(r[e*n],r[e*n+1])},sU=(i,e)=>i.bind(e),oU=(i,e)=>i.bind(e),aU=(i,e)=>i.type.mode===qt.UnionMode.Dense?Tv(i,e):Av(i,e),Tv=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(i.valueOffsets[e]):null},Av=(i,e)=>{let t=i.typeIdToChildIndex[i.typeIds[e]],r=i.getChildAt(t);return r?r.get(e):null},uU=(i,e)=>i.getValue(i.getKey(e)),cU=(i,e)=>i.type.unit===qt.IntervalUnit.DAY_TIME?Fv(i,e):Dv(i,e),Fv=({values:i},e)=>i.subarray(2*e,2*(e+1)),Dv=({values:i},e)=>{let t=i[e],r=new Int32Array(2);return r[0]=t/12|0,r[1]=t%12|0,r},lU=(i,e)=>{let t=i.getChildAt(0),{stride:r}=i;return t.slice(e*r,(e+1)*r)};ee.prototype.visitNull=GC;ee.prototype.visitBool=$C;ee.prototype.visitInt=ZC;ee.prototype.visitInt8=wi;ee.prototype.visitInt16=wi;ee.prototype.visitInt32=wi;ee.prototype.visitInt64=Id;ee.prototype.visitUint8=wi;ee.prototype.visitUint16=wi;ee.prototype.visitUint32=wi;ee.prototype.visitUint64=Id;ee.prototype.visitFloat=QC;ee.prototype.visitFloat16=mv;ee.prototype.visitFloat32=wi;ee.prototype.visitFloat64=wi;ee.prototype.visitUtf8=XC;ee.prototype.visitBinary=JC;ee.prototype.visitFixedSizeBinary=KC;ee.prototype.visitDate=eU;ee.prototype.visitDateDay=yv;ee.prototype.visitDateMillisecond=_v;ee.prototype.visitTimestamp=tU;ee.prototype.visitTimestampSecond=bv;ee.prototype.visitTimestampMillisecond=gv;ee.prototype.visitTimestampMicrosecond=vv;ee.prototype.visitTimestampNanosecond=jv;ee.prototype.visitTime=iU;ee.prototype.visitTimeSecond=wv;ee.prototype.visitTimeMillisecond=Bv;ee.prototype.visitTimeMicrosecond=Iv;ee.prototype.visitTimeNanosecond=Sv;ee.prototype.visitDecimal=rU;ee.prototype.visitList=nU;ee.prototype.visitStruct=oU;ee.prototype.visitUnion=aU;ee.prototype.visitDenseUnion=Tv;ee.prototype.visitSparseUnion=Av;ee.prototype.visitDictionary=uU;ee.prototype.visitInterval=cU;ee.prototype.visitIntervalDayTime=Fv;ee.prototype.visitIntervalYearMonth=Dv;ee.prototype.visitFixedSizeList=lU;ee.prototype.visitMap=sU;$n.instance=new ee});var Uv=C(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.instance=Kn.IndexOfVisitor=void 0;var dU=at(),Ov=ui(),Mv=ks(),te=class extends dU.Visitor{};Kn.IndexOfVisitor=te;function fU(i,e){return e===null&&i.length>0?0:-1}function hU(i,e){let{nullBitmap:t}=i.data;if(!t||i.nullCount<=0)return-1;let r=0;for(let n of new Ov.BitIterator(t,i.data.offset+(e||0),i.length,t,Ov.getBool)){if(!n)return r;++r}return-1}function pe(i,e,t){if(e===void 0)return-1;if(e===null)return hU(i,t);let r=Mv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}function Cv(i,e,t){let r=Mv.createElementComparator(e);for(let n=(t||0)-1,s=i.length;++n<s;)if(r(i.get(n)))return n;return-1}te.prototype.visitNull=fU;te.prototype.visitBool=pe;te.prototype.visitInt=pe;te.prototype.visitInt8=pe;te.prototype.visitInt16=pe;te.prototype.visitInt32=pe;te.prototype.visitInt64=pe;te.prototype.visitUint8=pe;te.prototype.visitUint16=pe;te.prototype.visitUint32=pe;te.prototype.visitUint64=pe;te.prototype.visitFloat=pe;te.prototype.visitFloat16=pe;te.prototype.visitFloat32=pe;te.prototype.visitFloat64=pe;te.prototype.visitUtf8=pe;te.prototype.visitBinary=pe;te.prototype.visitFixedSizeBinary=pe;te.prototype.visitDate=pe;te.prototype.visitDateDay=pe;te.prototype.visitDateMillisecond=pe;te.prototype.visitTimestamp=pe;te.prototype.visitTimestampSecond=pe;te.prototype.visitTimestampMillisecond=pe;te.prototype.visitTimestampMicrosecond=pe;te.prototype.visitTimestampNanosecond=pe;te.prototype.visitTime=pe;te.prototype.visitTimeSecond=pe;te.prototype.visitTimeMillisecond=pe;te.prototype.visitTimeMicrosecond=pe;te.prototype.visitTimeNanosecond=pe;te.prototype.visitDecimal=pe;te.prototype.visitList=pe;te.prototype.visitStruct=pe;te.prototype.visitUnion=pe;te.prototype.visitDenseUnion=Cv;te.prototype.visitSparseUnion=Cv;te.prototype.visitDictionary=pe;te.prototype.visitInterval=pe;te.prototype.visitIntervalDayTime=pe;te.prototype.visitIntervalYearMonth=pe;te.prototype.visitFixedSizeList=pe;te.prototype.visitMap=pe;Kn.instance=new te});var Td=C(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.instance=Jn.IteratorVisitor=void 0;var du=Fe(),pU=at(),yU=ui(),Ev=Sd(),ie=class extends pU.Visitor{};Jn.IteratorVisitor=ie;function _U(i){let e=Ev.instance.getVisitFn(i);return new yU.BitIterator(i.data.nullBitmap,i.data.offset,i.length,i,(t,r,n,s)=>(n&1<<s)!==0?e(t,r):null)}var Rv=class{constructor(e,t){this.vector=e,this.getFn=t,this.index=0}next(){return this.index<this.vector.length?{value:this.getFn(this.vector,this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}};function le(i){if(i.nullCount>0)return _U(i);let{type:e,typeId:t,length:r}=i;return i.stride===1&&(t===du.Type.Timestamp||t===du.Type.Int&&e.bitWidth!==64||t===du.Type.Time&&e.bitWidth!==64||t===du.Type.Float&&e.precision>0)?i.data.values.subarray(0,r)[Symbol.iterator]():new Rv(i,Ev.instance.getVisitFn(i))}ie.prototype.visitNull=le;ie.prototype.visitBool=le;ie.prototype.visitInt=le;ie.prototype.visitInt8=le;ie.prototype.visitInt16=le;ie.prototype.visitInt32=le;ie.prototype.visitInt64=le;ie.prototype.visitUint8=le;ie.prototype.visitUint16=le;ie.prototype.visitUint32=le;ie.prototype.visitUint64=le;ie.prototype.visitFloat=le;ie.prototype.visitFloat16=le;ie.prototype.visitFloat32=le;ie.prototype.visitFloat64=le;ie.prototype.visitUtf8=le;ie.prototype.visitBinary=le;ie.prototype.visitFixedSizeBinary=le;ie.prototype.visitDate=le;ie.prototype.visitDateDay=le;ie.prototype.visitDateMillisecond=le;ie.prototype.visitTimestamp=le;ie.prototype.visitTimestampSecond=le;ie.prototype.visitTimestampMillisecond=le;ie.prototype.visitTimestampMicrosecond=le;ie.prototype.visitTimestampNanosecond=le;ie.prototype.visitTime=le;ie.prototype.visitTimeSecond=le;ie.prototype.visitTimeMillisecond=le;ie.prototype.visitTimeMicrosecond=le;ie.prototype.visitTimeNanosecond=le;ie.prototype.visitDecimal=le;ie.prototype.visitList=le;ie.prototype.visitStruct=le;ie.prototype.visitUnion=le;ie.prototype.visitDenseUnion=le;ie.prototype.visitSparseUnion=le;ie.prototype.visitDictionary=le;ie.prototype.visitInterval=le;ie.prototype.visitIntervalDayTime=le;ie.prototype.visitIntervalYearMonth=le;ie.prototype.visitFixedSizeList=le;ie.prototype.visitMap=le;Jn.instance=new ie});var kv=C(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.instance=Xn.ToArrayVisitor=void 0;var Ys=Fe(),mU=at(),bU=Td(),re=class extends mU.Visitor{};Xn.ToArrayVisitor=re;function de(i){let{type:e,length:t,stride:r}=i;switch(e.typeId){case Ys.Type.Int:case Ys.Type.Float:case Ys.Type.Decimal:case Ys.Type.Time:case Ys.Type.Timestamp:return i.data.values.subarray(0,t*r)}return[...bU.instance.visit(i)]}re.prototype.visitNull=de;re.prototype.visitBool=de;re.prototype.visitInt=de;re.prototype.visitInt8=de;re.prototype.visitInt16=de;re.prototype.visitInt32=de;re.prototype.visitInt64=de;re.prototype.visitUint8=de;re.prototype.visitUint16=de;re.prototype.visitUint32=de;re.prototype.visitUint64=de;re.prototype.visitFloat=de;re.prototype.visitFloat16=de;re.prototype.visitFloat32=de;re.prototype.visitFloat64=de;re.prototype.visitUtf8=de;re.prototype.visitBinary=de;re.prototype.visitFixedSizeBinary=de;re.prototype.visitDate=de;re.prototype.visitDateDay=de;re.prototype.visitDateMillisecond=de;re.prototype.visitTimestamp=de;re.prototype.visitTimestampSecond=de;re.prototype.visitTimestampMillisecond=de;re.prototype.visitTimestampMicrosecond=de;re.prototype.visitTimestampNanosecond=de;re.prototype.visitTime=de;re.prototype.visitTimeSecond=de;re.prototype.visitTimeMillisecond=de;re.prototype.visitTimeMicrosecond=de;re.prototype.visitTimeNanosecond=de;re.prototype.visitDecimal=de;re.prototype.visitList=de;re.prototype.visitStruct=de;re.prototype.visitUnion=de;re.prototype.visitDenseUnion=de;re.prototype.visitSparseUnion=de;re.prototype.visitDictionary=de;re.prototype.visitInterval=de;re.prototype.visitIntervalDayTime=de;re.prototype.visitIntervalYearMonth=de;re.prototype.visitFixedSizeList=de;re.prototype.visitMap=de;Xn.instance=new re});var Vv=C(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.instance=Zn.ByteWidthVisitor=void 0;var gU=at(),vU=Fe(),Gs=(i,e)=>i+e,Ad=i=>`Cannot compute the byte width of variable-width column ${i}`,Fd=class extends gU.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(Ad(e))}visitUtf8(e){throw new Error(Ad(e))}visitBool(e){return 1/8}visitDecimal(e){return 16}visitDate(e){return(e.unit+1)*4}visitTime(e){return e.bitWidth/8}visitTimestamp(e){return e.unit===vU.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(Ad(e))}visitStruct(e){return this.visitFields(e.children).reduce(Gs,0)}visitUnion(e){return this.visitFields(e.children).reduce(Gs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Gs,0)}visitMap(e){return this.visitFields(e.children).reduce(Gs,0)}visitDictionary(e){return this.visit(e.indices)}visitFields(e){return(e||[]).map(t=>this.visit(t.type))}visitSchema(e){return this.visitFields(e.fields).reduce(Gs,0)}};Zn.ByteWidthVisitor=Fd;Zn.instance=new Fd});var xv=C(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.instance=Qn.GetVectorConstructor=void 0;var jU=at(),wU=$l(),BU=Kl(),Dd=Xl(),IU=Zl(),SU=Qa(),TU=ed(),AU=td(),fu=sd(),Od=od(),Ni=ru(),FU=yd(),DU=_d(),OU=md(),MU=bd(),$s=gd(),Ks=vd(),Md=jd(),CU=wd(),Cd=class extends jU.Visitor{visitNull(){return OU.NullVector}visitBool(){return BU.BoolVector}visitInt(){return Ni.IntVector}visitInt8(){return Ni.Int8Vector}visitInt16(){return Ni.Int16Vector}visitInt32(){return Ni.Int32Vector}visitInt64(){return Ni.Int64Vector}visitUint8(){return Ni.Uint8Vector}visitUint16(){return Ni.Uint16Vector}visitUint32(){return Ni.Uint32Vector}visitUint64(){return Ni.Uint64Vector}visitFloat(){return fu.FloatVector}visitFloat16(){return fu.Float16Vector}visitFloat32(){return fu.Float32Vector}visitFloat64(){return fu.Float64Vector}visitUtf8(){return CU.Utf8Vector}visitBinary(){return wU.BinaryVector}visitFixedSizeBinary(){return TU.FixedSizeBinaryVector}visitDate(){return Dd.DateVector}visitDateDay(){return Dd.DateDayVector}visitDateMillisecond(){return Dd.DateMillisecondVector}visitTimestamp(){return $s.TimestampVector}visitTimestampSecond(){return $s.TimestampSecondVector}visitTimestampMillisecond(){return $s.TimestampMillisecondVector}visitTimestampMicrosecond(){return $s.TimestampMicrosecondVector}visitTimestampNanosecond(){return $s.TimestampNanosecondVector}visitTime(){return Ks.TimeVector}visitTimeSecond(){return Ks.TimeSecondVector}visitTimeMillisecond(){return Ks.TimeMillisecondVector}visitTimeMicrosecond(){return Ks.TimeMicrosecondVector}visitTimeNanosecond(){return Ks.TimeNanosecondVector}visitDecimal(){return IU.DecimalVector}visitList(){return FU.ListVector}visitStruct(){return MU.StructVector}visitUnion(){return Md.UnionVector}visitDenseUnion(){return Md.DenseUnionVector}visitSparseUnion(){return Md.SparseUnionVector}visitDictionary(){return SU.DictionaryVector}visitInterval(){return Od.IntervalVector}visitIntervalDayTime(){return Od.IntervalDayTimeVector}visitIntervalYearMonth(){return Od.IntervalYearMonthVector}visitFixedSizeList(){return AU.FixedSizeListVector}visitMap(){return DU.MapVector}};Qn.GetVectorConstructor=Cd;Qn.instance=new Cd});var gi=C(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.vectorFromValuesWithType=E.StructRow=E.MapRow=E.Utf8Vector=E.SparseUnionVector=E.DenseUnionVector=E.UnionVector=E.TimeNanosecondVector=E.TimeMicrosecondVector=E.TimeMillisecondVector=E.TimeSecondVector=E.TimeVector=E.TimestampNanosecondVector=E.TimestampMicrosecondVector=E.TimestampMillisecondVector=E.TimestampSecondVector=E.TimestampVector=E.StructVector=E.NullVector=E.MapVector=E.ListVector=E.Uint64Vector=E.Uint32Vector=E.Uint16Vector=E.Uint8Vector=E.Int64Vector=E.Int32Vector=E.Int16Vector=E.Int8Vector=E.IntVector=E.IntervalYearMonthVector=E.IntervalDayTimeVector=E.IntervalVector=E.Float64Vector=E.Float32Vector=E.Float16Vector=E.FloatVector=E.FixedSizeListVector=E.FixedSizeBinaryVector=E.DictionaryVector=E.DecimalVector=E.DateMillisecondVector=E.DateDayVector=E.DateVector=E.Chunked=E.BoolVector=E.BinaryVector=E.BaseVector=E.Vector=void 0;var Ud=lt(),UU=He();Object.defineProperty(E,"Vector",{enumerable:!0,get:function(){return UU.Vector}});var EU=We();Object.defineProperty(E,"BaseVector",{enumerable:!0,get:function(){return EU.BaseVector}});var RU=$l();Object.defineProperty(E,"BinaryVector",{enumerable:!0,get:function(){return RU.BinaryVector}});var kU=Kl();Object.defineProperty(E,"BoolVector",{enumerable:!0,get:function(){return kU.BoolVector}});var VU=mr();Object.defineProperty(E,"Chunked",{enumerable:!0,get:function(){return VU.Chunked}});var Ed=Xl();Object.defineProperty(E,"DateVector",{enumerable:!0,get:function(){return Ed.DateVector}});Object.defineProperty(E,"DateDayVector",{enumerable:!0,get:function(){return Ed.DateDayVector}});Object.defineProperty(E,"DateMillisecondVector",{enumerable:!0,get:function(){return Ed.DateMillisecondVector}});var xU=Zl();Object.defineProperty(E,"DecimalVector",{enumerable:!0,get:function(){return xU.DecimalVector}});var PU=Qa();Object.defineProperty(E,"DictionaryVector",{enumerable:!0,get:function(){return PU.DictionaryVector}});var NU=ed();Object.defineProperty(E,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return NU.FixedSizeBinaryVector}});var LU=td();Object.defineProperty(E,"FixedSizeListVector",{enumerable:!0,get:function(){return LU.FixedSizeListVector}});var hu=sd();Object.defineProperty(E,"FloatVector",{enumerable:!0,get:function(){return hu.FloatVector}});Object.defineProperty(E,"Float16Vector",{enumerable:!0,get:function(){return hu.Float16Vector}});Object.defineProperty(E,"Float32Vector",{enumerable:!0,get:function(){return hu.Float32Vector}});Object.defineProperty(E,"Float64Vector",{enumerable:!0,get:function(){return hu.Float64Vector}});var Rd=od();Object.defineProperty(E,"IntervalVector",{enumerable:!0,get:function(){return Rd.IntervalVector}});Object.defineProperty(E,"IntervalDayTimeVector",{enumerable:!0,get:function(){return Rd.IntervalDayTimeVector}});Object.defineProperty(E,"IntervalYearMonthVector",{enumerable:!0,get:function(){return Rd.IntervalYearMonthVector}});var Li=ru();Object.defineProperty(E,"IntVector",{enumerable:!0,get:function(){return Li.IntVector}});Object.defineProperty(E,"Int8Vector",{enumerable:!0,get:function(){return Li.Int8Vector}});Object.defineProperty(E,"Int16Vector",{enumerable:!0,get:function(){return Li.Int16Vector}});Object.defineProperty(E,"Int32Vector",{enumerable:!0,get:function(){return Li.Int32Vector}});Object.defineProperty(E,"Int64Vector",{enumerable:!0,get:function(){return Li.Int64Vector}});Object.defineProperty(E,"Uint8Vector",{enumerable:!0,get:function(){return Li.Uint8Vector}});Object.defineProperty(E,"Uint16Vector",{enumerable:!0,get:function(){return Li.Uint16Vector}});Object.defineProperty(E,"Uint32Vector",{enumerable:!0,get:function(){return Li.Uint32Vector}});Object.defineProperty(E,"Uint64Vector",{enumerable:!0,get:function(){return Li.Uint64Vector}});var qU=yd();Object.defineProperty(E,"ListVector",{enumerable:!0,get:function(){return qU.ListVector}});var HU=_d();Object.defineProperty(E,"MapVector",{enumerable:!0,get:function(){return HU.MapVector}});var zU=md();Object.defineProperty(E,"NullVector",{enumerable:!0,get:function(){return zU.NullVector}});var WU=bd();Object.defineProperty(E,"StructVector",{enumerable:!0,get:function(){return WU.StructVector}});var Js=gd();Object.defineProperty(E,"TimestampVector",{enumerable:!0,get:function(){return Js.TimestampVector}});Object.defineProperty(E,"TimestampSecondVector",{enumerable:!0,get:function(){return Js.TimestampSecondVector}});Object.defineProperty(E,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Js.TimestampMillisecondVector}});Object.defineProperty(E,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Js.TimestampMicrosecondVector}});Object.defineProperty(E,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Js.TimestampNanosecondVector}});var Xs=vd();Object.defineProperty(E,"TimeVector",{enumerable:!0,get:function(){return Xs.TimeVector}});Object.defineProperty(E,"TimeSecondVector",{enumerable:!0,get:function(){return Xs.TimeSecondVector}});Object.defineProperty(E,"TimeMillisecondVector",{enumerable:!0,get:function(){return Xs.TimeMillisecondVector}});Object.defineProperty(E,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Xs.TimeMicrosecondVector}});Object.defineProperty(E,"TimeNanosecondVector",{enumerable:!0,get:function(){return Xs.TimeNanosecondVector}});var kd=jd();Object.defineProperty(E,"UnionVector",{enumerable:!0,get:function(){return kd.UnionVector}});Object.defineProperty(E,"DenseUnionVector",{enumerable:!0,get:function(){return kd.DenseUnionVector}});Object.defineProperty(E,"SparseUnionVector",{enumerable:!0,get:function(){return kd.SparseUnionVector}});var YU=wd();Object.defineProperty(E,"Utf8Vector",{enumerable:!0,get:function(){return YU.Utf8Vector}});var Pv=Es();Object.defineProperty(E,"MapRow",{enumerable:!0,get:function(){return Pv.MapRow}});Object.defineProperty(E,"StructRow",{enumerable:!0,get:function(){return Pv.StructRow}});var Zs=fv(),Vd=Fe(),es=He(),Nv=mr(),sn=We(),GU=ui(),pu=dt(),Lv=xe(),qv=Sd(),Hv=Jc(),zv=Uv(),Wv=kv(),Yv=Td(),Gv=Vv(),$v=xv();es.Vector.new=$U;es.Vector.from=JU;function $U(i,...e){return new($v.instance.getVisitFn(i)())(i,...e)}function KU(i,e){if(pu.isIterable(e))return es.Vector.from({nullValues:[null,void 0],type:i(),values:e});if(pu.isAsyncIterable(e))return es.Vector.from({nullValues:[null,void 0],type:i(),values:e});let{values:t=[],type:r=i(),nullValues:n=[null,void 0]}=Object.assign({},e);return pu.isIterable(t)?es.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r})):es.Vector.from(Object.assign(Object.assign({nullValues:n},e),{type:r}))}E.vectorFromValuesWithType=KU;function JU(i){let e=Object.assign({nullValues:[null,void 0]},i),{values:t=[]}=e,r=Ud.__rest(e,["values"]);if(pu.isIterable(t)){let n=[...Lv.Builder.throughIterable(r)(t)];return n.length===1?n[0]:Nv.Chunked.concat(n)}return(n=>Ud.__awaiter(this,void 0,void 0,function*(){var s,c;let p=Lv.Builder.throughAsyncIterable(r);try{for(var m=Ud.__asyncValues(p(t)),j;j=yield m.next(),!j.done;){let F=j.value;n.push(F)}}catch(F){s={error:F}}finally{try{j&&!j.done&&(c=m.return)&&(yield c.call(m))}finally{if(s)throw s.error}}return n.length===1?n[0]:Nv.Chunked.concat(n)}))([])}sn.BaseVector.prototype.get=function(e){return qv.instance.visit(this,e)};sn.BaseVector.prototype.set=function(e,t){return Hv.instance.visit(this,e,t)};sn.BaseVector.prototype.indexOf=function(e,t){return zv.instance.visit(this,e,t)};sn.BaseVector.prototype.toArray=function(){return Wv.instance.visit(this)};sn.BaseVector.prototype.getByteWidth=function(){return Gv.instance.visit(this.type)};sn.BaseVector.prototype[Symbol.iterator]=function(){return Yv.instance.visit(this)};sn.BaseVector.prototype._bindDataAccessors=e2;Object.keys(Vd.Type).map(i=>Vd.Type[i]).filter(i=>typeof i=="number").filter(i=>i!==Vd.Type.NONE).forEach(i=>{let e=$v.instance.visit(i);e.prototype.get=Zs.partial1(qv.instance.getVisitFn(i)),e.prototype.set=Zs.partial2(Hv.instance.getVisitFn(i)),e.prototype.indexOf=Zs.partial2(zv.instance.getVisitFn(i)),e.prototype.toArray=Zs.partial0(Wv.instance.getVisitFn(i)),e.prototype.getByteWidth=XU(Gv.instance.getVisitFn(i)),e.prototype[Symbol.iterator]=Zs.partial0(Yv.instance.getVisitFn(i))});function XU(i){return function(){return i(this.type)}}function ZU(i){return function(e){return this.isValid(e)?i.call(this,e):null}}function QU(i){return function(e,t){GU.setBool(this.nullBitmap,this.offset+e,t!=null)&&i.call(this,e,t)}}function e2(){let i=this.nullBitmap;i&&i.byteLength>0&&(this.get=ZU(this.get),this.set=QU(this.set))}});var zs=C(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.Table=void 0;var yu=lt(),t2=Nn(),i2=Qs(),Kv=Ya(),xd=Pi(),Jv=it(),Pd=we(),Xv=Jr(),Nd=dt(),Zv=Wl(),Ld=gi(),et=class extends Ld.Chunked{constructor(...e){var t;let r=null;e[0]instanceof Jv.Schema&&(r=e[0]);let n=e[0]instanceof et?e[0].chunks:Xv.selectArgs(xd.RecordBatch,e);if(!r&&!(r=(t=n[0])===null||t===void 0?void 0:t.schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");n[0]||(n[0]=new xd._InternalEmptyPlaceholderRecordBatch(r));super(new Pd.Struct(r.fields),n);this._schema=r,this._chunks=n}static empty(e=new Jv.Schema([])){return new et(e,[])}static from(e){if(!e)return et.empty();if(typeof e=="object"){let r=Nd.isIterable(e.values)?r2(e):Nd.isAsyncIterable(e.values)?n2(e):null;if(r!==null)return r}let t=i2.RecordBatchReader.from(e);return Nd.isPromise(t)?(()=>yu.__awaiter(this,void 0,void 0,function*(){return yield et.from(yield t)}))():t.isSync()&&(t=t.open())?t.schema?new et(t.schema,[...t]):et.empty():(r=>yu.__awaiter(this,void 0,void 0,function*(){var n,s;let c=yield r,p=c.schema,m=[];if(p){try{for(var j=yu.__asyncValues(c),F;F=yield j.next(),!F.done;){let R=F.value;m.push(R)}}catch(R){n={error:R}}finally{try{F&&!F.done&&(s=j.return)&&(yield s.call(j))}finally{if(n)throw n.error}}return new et(p,m)}return et.empty()}))(t.open())}static fromAsync(e){return yu.__awaiter(this,void 0,void 0,function*(){return yield et.from(e)})}static fromStruct(e){return et.new(e.data.childData,e.type.children)}static new(...e){return new et(...Zv.distributeColumnsIntoRecordBatches(Xv.selectColumnArgs(e)))}get schema(){return this._schema}get length(){return this._length}get chunks(){return this._chunks}get numCols(){return this._numChildren}clone(e=this._chunks){return new et(this._schema,e)}getColumn(e){return this.getColumnAt(this.getColumnIndex(e))}getColumnAt(e){return this.getChildAt(e)}getColumnIndex(e){return this._schema.fields.findIndex(t=>t.name===e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t,r,n=this._schema.fields,s=this._children||(this._children=[]);if(r=s[e])return r;if(t=n[e]){let c=this._chunks.map(p=>p.getChildAt(e)).filter(p=>p!=null);if(c.length>0)return s[e]=new t2.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Kv.RecordBatchStreamWriter:Kv.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new et(t,this._chunks.map(({length:r,data:{childData:n}})=>new xd.RecordBatch(t,r,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[r,n]=e.schema.fields.reduce((p,m,j)=>{let[F,R]=p,L=t.findIndex(P=>P.name===m.name);return~L?R[L]=j:F.push(j),p},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((p,m,j,F=n[m])=>F===void 0?this.getColumnAt(m):e.getColumnAt(F)),...r.map(p=>e.getColumnAt(p))].filter(Boolean);return new et(...Zv.distributeVectorsIntoRecordBatches(s,c))}};_u.Table=et;function r2(i){let{type:e}=i;return e instanceof Pd.Struct?et.fromStruct(Ld.StructVector.from(i)):null}function n2(i){let{type:e}=i;return e instanceof Pd.Struct?Ld.StructVector.from(i).then(t=>et.fromStruct(t)):null}});var Pi=C(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts._InternalEmptyPlaceholderRecordBatch=ts.RecordBatch=void 0;var qd=Kt(),Hd=zs(),s2=He(),o2=at(),a2=it(),u2=dt(),c2=mr(),l2=Jr(),zd=we(),d2=Wl(),f2=gi(),Ar=class extends f2.StructVector{constructor(...e){let t,r=e[0],n;if(e[1]instanceof qd.Data)[,t,n]=e;else{let s=r.fields,[,c,p]=e;t=qd.Data.Struct(new zd.Struct(s),0,c,0,null,p)}super(t,n);this._schema=r}static from(e){return u2.isIterable(e.values),Hd.Table.from(e)}static new(...e){let[t,r]=l2.selectFieldArgs(e),n=r.filter(s=>s instanceof s2.Vector);return new Ar(...d2.ensureSameLengthData(new a2.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new Ar(this._schema,e,t)}concat(...e){let t=this._schema,r=c2.Chunked.flatten(this,...e);return new Hd.Table(t,r.map(({data:n})=>new Ar(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=mu.collect(this))}select(...e){let t=this._schema.fields.reduce((r,n,s)=>r.set(n.name,s),new Map);return this.selectAt(...e.map(r=>t.get(r)).filter(r=>r>-1))}selectAt(...e){let t=this._schema.selectAt(...e),r=e.map(n=>this.data.childData[n]).filter(Boolean);return new Ar(t,this.length,r)}};ts.RecordBatch=Ar;var Qv=class extends Ar{constructor(e){super(e,0,e.fields.map(t=>qd.Data.new(t.type,0,0,0)))}};ts._InternalEmptyPlaceholderRecordBatch=Qv;var mu=class extends o2.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new mu().visit(e.data,new zd.Struct(e.schema.fields)).dictionaries}visit(e,t){return zd.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((r,n)=>this.visit(r,t.children[n].type)),this)}visitDictionary(e,t){let r=e.dictionary;return r&&r.length>0&&this.dictionaries.set(t.id,r),this}}});var Qs=C(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.AsyncRecordBatchFileReader=Wt.RecordBatchFileReader=Wt.AsyncRecordBatchStreamReader=Wt.RecordBatchStreamReader=Wt.RecordBatchReader=void 0;var Oe=lt(),e0=He(),bu=Fe(),t0=al(),i0=ws(),r0=hr(),eo=ll(),n0=kb(),Wd=Pi(),on=hn(),Ht=Ra(),zt=dt(),Bi=class extends on.ReadableInterop{constructor(e){super();this._impl=e}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(e){return this._impl.throw(e)}return(e){return this._impl.return(e)}cancel(){return this._impl.cancel()}reset(e){return this._impl.reset(e),this._DOMStream=void 0,this._nodeStream=void 0,this}open(e){let t=this._impl.open(e);return zt.isPromise(t)?t.then(()=>this):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return i0.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return i0.default.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof Bi?e:zt.isArrowJSON(e)?h2(e):zt.isFileHandle(e)?_2(e):zt.isPromise(e)?(()=>Oe.__awaiter(this,void 0,void 0,function*(){return yield Bi.from(yield e)}))():zt.isFetchResponse(e)||zt.isReadableDOMStream(e)||zt.isReadableNodeStream(e)||zt.isAsyncIterable(e)?y2(new r0.AsyncByteStream(e)):p2(new r0.ByteStream(e))}static readAll(e){return e instanceof Bi?e.isSync()?u0(e):c0(e):zt.isArrowJSON(e)||ArrayBuffer.isView(e)||zt.isIterable(e)||zt.isIteratorResult(e)?u0(e):c0(e)}};Wt.RecordBatchReader=Bi;var is=class extends Bi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Oe.__asyncGenerator(this,arguments,function*(){yield Oe.__await(yield*Oe.__asyncDelegator(Oe.__asyncValues(this[Symbol.iterator]())))})}};Wt.RecordBatchStreamReader=is;var rs=class extends Bi{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};Wt.AsyncRecordBatchStreamReader=rs;var gu=class extends is{constructor(e){super(e);this._impl=e}};Wt.RecordBatchFileReader=gu;var Yd=class extends rs{constructor(e){super(e);this._impl=e}};Wt.AsyncRecordBatchFileReader=Yd;var Gd=class{constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){return new Wd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:r,isDelta:n,data:s}=e,{dictionaries:c,schema:p}=this,m=c.get(r);if(n||!m){let j=p.dictionaries.get(r);return m&&n?m.concat(e0.Vector.new(this._loadVectors(s,t,[j])[0])):e0.Vector.new(this._loadVectors(s,t,[j])[0])}return m}_loadVectors(e,t,r){return new n0.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}},to=class extends Gd{constructor(e,t){super(t);this._reader=zt.isArrowJSON(e)?new Ht.JSONMessageReader(this._handle=e):new Ht.MessageReader(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=a0(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):on.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):on.ITERATOR_DONE}next(){if(this.closed)return on.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Wd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},io=class extends Gd{constructor(e,t){super(t);this._reader=new Ht.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Oe.__awaiter(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return Oe.__awaiter(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=a0(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return Oe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):on.ITERATOR_DONE})}return(e){return Oe.__awaiter(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):on.ITERATOR_DONE})}next(){return Oe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return on.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(r,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Wd._InternalEmptyPlaceholderRecordBatch(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return Oe.__awaiter(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},$d=class extends to{constructor(e,t){super(e instanceof eo.RandomAccessFile?e:new eo.RandomAccessFile(e),t)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){if(this.closed)return null;this._footer||this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(bu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null}_readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&this._handle.seek(t.offset)){let r=this._reader.readMessage(bu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ht.magicAndPadding,r=e.readInt32(t),n=e.readAt(t-r,r);return t0.Footer.decode(n)}_readNextMessageAndValidate(e){if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer&&this._footer.getRecordBatch(this._recordBatchIndex);if(t&&this._handle.seek(t.offset))return this._reader.readMessage(e)}return null}},s0=class extends io{constructor(e,...t){let r=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof eo.AsyncRandomAccessFile?e:new eo.AsyncRandomAccessFile(e,r),n)}get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}isFile(){return!0}isAsync(){return!0}open(e){let t=Object.create(null,{open:{get:()=>super.open}});return Oe.__awaiter(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return Oe.__awaiter(this,void 0,void 0,function*(){if(this.closed)return null;this._footer||(yield this.open());let t=this._footer&&this._footer.getRecordBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(bu.MessageHeader.RecordBatch);if(r==null?void 0:r.isRecordBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength);return this._loadRecordBatch(n,s)}}return null})}_readDictionaryBatch(e){return Oe.__awaiter(this,void 0,void 0,function*(){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&(yield this._handle.seek(t.offset))){let r=yield this._reader.readMessage(bu.MessageHeader.DictionaryBatch);if(r==null?void 0:r.isDictionaryBatch()){let n=r.header(),s=yield this._reader.readMessageBody(r.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}})}_readFooter(){return Oe.__awaiter(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-Ht.magicAndPadding,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return t0.Footer.decode(n)})}_readNextMessageAndValidate(e){return Oe.__awaiter(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&(yield this._handle.seek(t.offset)))return yield this._reader.readMessage(e)}return null})}},o0=class extends to{constructor(e,t){super(e,t)}_loadVectors(e,t,r){return new n0.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(r)}};function a0(i,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:i.autoDestroy}function*u0(i){let e=Bi.from(i);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}function c0(i){return Oe.__asyncGenerator(this,arguments,function*(){let t=yield Oe.__await(Bi.from(i));try{if(!(yield Oe.__await(t.open({autoDestroy:!1}))).closed)do yield yield Oe.__await(t);while(!(yield Oe.__await(t.reset().open())).closed)}finally{yield Oe.__await(t.cancel())}})}function h2(i){return new is(new o0(i))}function p2(i){let e=i.peek(Ht.magicLength+7&~7);return e&&e.byteLength>=4?Ht.checkForMagicArrowString(e)?new gu(new $d(i.read())):new is(new to(i)):new is(new to(function*(){}()))}function y2(i){return Oe.__awaiter(this,void 0,void 0,function*(){let e=yield i.peek(Ht.magicLength+7&~7);return e&&e.byteLength>=4?Ht.checkForMagicArrowString(e)?new gu(new $d(yield i.read())):new rs(new io(i)):new rs(new io(function(){return Oe.__asyncGenerator(this,arguments,function*(){})}()))})}function _2(i){return Oe.__awaiter(this,void 0,void 0,function*(){let{size:e}=yield i.stat(),t=new eo.AsyncRandomAccessFile(i,e);return e>=Ht.magicX2AndPadding&&Ht.checkForMagicArrowString(yield t.readAt(0,Ht.magicLength+7&~7))?new Yd(new s0(t)):new rs(new io(t))})}});var f0=C(ju=>{"use strict";Object.defineProperty(ju,"__esModule",{value:!0});ju.toDOMStream=void 0;var vu=lt(),l0=Xe(),d0=dt();function m2(i,e){if(d0.isAsyncIterable(i))return g2(i,e);if(d0.isIterable(i))return b2(i,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}ju.toDOMStream=m2;function b2(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){s(c,t||(t=i[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){((t==null?void 0:t.return)&&t.return()||!0)&&(t=null)}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,p){let m,j=null,F=c.desiredSize||null;for(;!(j=p.next(r?F:null)).done;)if(ArrayBuffer.isView(j.value)&&(m=l0.toUint8Array(j.value))&&(F!=null&&r&&(F=F-m.byteLength+1),j.value=m),c.enqueue(j.value),F!=null&&--F<=0)return;c.close()}}function g2(i,e){let t=null,r=(e==null?void 0:e.type)==="bytes"||!1,n=(e==null?void 0:e.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},e),{start(c){return vu.__awaiter(this,void 0,void 0,function*(){yield s(c,t||(t=i[Symbol.asyncIterator]()))})},pull(c){return vu.__awaiter(this,void 0,void 0,function*(){t?yield s(c,t):c.close()})},cancel(){return vu.__awaiter(this,void 0,void 0,function*(){((t==null?void 0:t.return)&&(yield t.return())||!0)&&(t=null)})}}),Object.assign({highWaterMark:r?n:void 0},e));function s(c,p){return vu.__awaiter(this,void 0,void 0,function*(){let m,j=null,F=c.desiredSize||null;for(;!(j=yield p.next(r?F:null)).done;)if(ArrayBuffer.isView(j.value)&&(m=l0.toUint8Array(j.value))&&(F!=null&&r&&(F=F-m.byteLength+1),j.value=m),c.enqueue(j.value),F!=null&&--F<=0)return;c.close()})}}});var y0=C(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.BuilderTransform=ns.builderThroughDOMStream=void 0;var v2=lt(),j2=ja();function w2(i){return new Kd(i)}ns.builderThroughDOMStream=w2;var Kd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,s=v2.__rest(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=j2.Builder.new(s),this._getSize=n!=="bytes"?h0:p0;let{["highWaterMark"]:c=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:p=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:m=>{this._maybeFlush(this._builder,this._controller=m)},start:m=>{this._maybeFlush(this._builder,this._controller=m)}},{highWaterMark:c,size:n!=="bytes"?h0:p0}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:p,size:m=>this._writeValueAndReturnChunkSize(m)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!==null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t===null?e.close():e.enqueue(t)}};ns.BuilderTransform=Kd;var h0=i=>i.length,p0=i=>i.byteLength});var _0=C(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.recordBatchReaderThroughDOMStream=void 0;var ro=lt(),B2=hr(),I2=Qs();function S2(i,e){let t=new B2.AsyncByteQueue,r=null,n=new ReadableStream({cancel(){return ro.__awaiter(this,void 0,void 0,function*(){yield t.close()})},start(p){return ro.__awaiter(this,void 0,void 0,function*(){yield c(p,r||(r=yield s()))})},pull(p){return ro.__awaiter(this,void 0,void 0,function*(){r?yield c(p,r):p.close()})}});return{writable:new WritableStream(t,Object.assign({highWaterMark:Math.pow(2,14)},i)),readable:n};function s(){return ro.__awaiter(this,void 0,void 0,function*(){return yield(yield I2.RecordBatchReader.from(t)).open(e)})}function c(p,m){return ro.__awaiter(this,void 0,void 0,function*(){let j=p.desiredSize,F=null;for(;!(F=yield m.next()).done;)if(p.enqueue(F.value),j!=null&&--j<=0)return;p.close()})}}wu.recordBatchReaderThroughDOMStream=S2});var m0=C(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.recordBatchWriterThroughDOMStream=void 0;var Bu=lt(),T2=hr();function A2(i,e){let t=new this(i),r=new T2.AsyncByteStream(t),n=new ReadableStream({type:"bytes",cancel(){return Bu.__awaiter(this,void 0,void 0,function*(){yield r.cancel()})},pull(c){return Bu.__awaiter(this,void 0,void 0,function*(){yield s(c)})},start(c){return Bu.__awaiter(this,void 0,void 0,function*(){yield s(c)})}},Object.assign({highWaterMark:Math.pow(2,14)},e));return{writable:new WritableStream(t,i),readable:n};function s(c){return Bu.__awaiter(this,void 0,void 0,function*(){let p=null,m=c.desiredSize;for(;p=yield r.read(m||null);)if(c.enqueue(p),m!=null&&(m-=p.byteLength)<=0)return;c.close()})}}Iu.recordBatchWriterThroughDOMStream=A2});var tf=C(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.custom=_e.or=_e.and=_e.col=_e.lit=_e.CustomPredicate=_e.Not=_e.GTeq=_e.LTeq=_e.Equals=_e.Or=_e.And=_e.CombinationPredicate=_e.ComparisonPredicate=_e.Predicate=_e.Col=_e.Literal=_e.Value=void 0;var F2=Qa(),Fr=class{eq(e){return e instanceof Fr||(e=new qi(e)),new Xd(this,e)}le(e){return e instanceof Fr||(e=new qi(e)),new Zd(this,e)}ge(e){return e instanceof Fr||(e=new qi(e)),new Qd(this,e)}lt(e){return new us(this.ge(e))}gt(e){return new us(this.le(e))}ne(e){return new us(this.eq(e))}};_e.Value=Fr;var qi=class extends Fr{constructor(e){super();this.v=e}};_e.Literal=qi;var Jd=class extends Fr{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let r=e.schema.fields;for(let n=-1;++n<r.length;)if(r[n].name===this.name){this.colidx=n;break}if(this.colidx<0)throw new Error(`Failed to bind Col "${this.name}"`)}let t=this.vector=e.getChildAt(this.colidx);return r=>t.get(r)}};_e.Col=Jd;var ss=class{and(...e){return new os(this,...e)}or(...e){return new as(this,...e)}not(){return new us(this)}};_e.Predicate=ss;var no=class extends ss{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof qi?this.right instanceof qi?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof qi?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};_e.ComparisonPredicate=no;var so=class extends ss{constructor(...e){super();this.children=e}};_e.CombinationPredicate=so;so.prototype.children=Object.freeze([]);var os=class extends so{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof os?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.every(s=>s(r,n))}};_e.And=os;var as=class extends so{constructor(...e){e=e.reduce((t,r)=>t.concat(r instanceof as?r.children:r),[]);super(...e)}bind(e){let t=this.children.map(r=>r.bind(e));return(r,n)=>t.some(s=>s(r,n))}};_e.Or=as;var Xd=class extends no{_bindLitLit(e,t,r){let n=t.v==r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,p)=>n(c,p)==s(c,p)}_bindColLit(e,t,r){let n=t.bind(e);if(t.vector instanceof F2.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(r.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:p=>c.getKey(p)===s}else return(s,c)=>n(s,c)==r.v}_bindLitCol(e,t,r){return this._bindColLit(e,r,t)}};_e.Equals=Xd;var Zd=class extends no{_bindLitLit(e,t,r){let n=t.v<=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,p)=>n(c,p)<=s(c,p)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)<=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v<=n(s,c)}};_e.LTeq=Zd;var Qd=class extends no{_bindLitLit(e,t,r){let n=t.v>=r.v;return()=>n}_bindColCol(e,t,r){let n=t.bind(e),s=r.bind(e);return(c,p)=>n(c,p)>=s(c,p)}_bindColLit(e,t,r){let n=t.bind(e);return(s,c)=>n(s,c)>=r.v}_bindLitCol(e,t,r){let n=r.bind(e);return(s,c)=>t.v>=n(s,c)}};_e.GTeq=Qd;var us=class extends ss{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(r,n)=>!t(r,n)}};_e.Not=us;var ef=class extends ss{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};_e.CustomPredicate=ef;function D2(i){return new qi(i)}_e.lit=D2;function O2(i){return new Jd(i)}_e.col=O2;function M2(...i){return new os(...i)}_e.and=M2;function C2(...i){return new as(...i)}_e.or=C2;function U2(i,e){return new ef(i,e)}_e.custom=U2});var B0=C(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.FilteredDataFrame=Dr.CountByResult=Dr.DataFrame=void 0;var b0=zs(),g0=ru(),rf=it(),v0=tf(),E2=Pi(),j0=we(),nf=class extends b0.Table{filter(e){return new oo(this.chunks,e)}scan(e,t){let r=this.chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s];t&&t(c);for(let p=-1,m=c.length;++p<m;)e(p,c)}}scanReverse(e,t){let r=this.chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s];t&&t(c);for(let p=c.length;--p>=0;)e(p,c)}}countBy(e){let t=this.chunks,r=t.length,n=typeof e=="string"?new v0.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!j0.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(s.length)/Math.log(256)),p=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,m=new p(s.dictionary.length);for(let j=-1;++j<r;){let F=t[j];n.bind(F);let R=n.vector.indices;for(let L=-1,P=F.length;++L<P;){let ae=R.get(L);ae!==null&&m[ae]++}}return new Su(s.dictionary,g0.IntVector.from(m))}};Dr.DataFrame=nf;var Su=class extends b0.Table{constructor(e,t){let r=new rf.Schema([new rf.Field("values",e.type),new rf.Field("counts",t.type)]);super(new E2.RecordBatch(r,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),r={};for(let n=-1;++n<this.length;)r[e.get(n)]=t.get(n);return r}};Dr.CountByResult=Su;var w0=class{constructor(e,t){this.batches=e,this.predicate=t,this.batchIndex=0,this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch)}next(){for(;this.batchIndex<this.batches.length;){for(;this.index<this.batch.length;){if(this.predicateFunc(this.index,this.batch))return{value:this.batch.get(this.index++)};this.index++}++this.batchIndex<this.batches.length&&(this.index=0,this.batch=this.batches[this.batchIndex],this.predicateFunc=this.predicate.bind(this.batch))}return{done:!0,value:null}}[Symbol.iterator](){return this}},oo=class extends nf{constructor(e,t){super(e);this._predicate=t}scan(e,t){let r=this._chunks,n=r.length;for(let s=-1;++s<n;){let c=r[s],p=this._predicate.bind(c),m=!1;for(let j=-1,F=c.length;++j<F;)p(j,c)&&(t&&!m&&(t(c),m=!0),e(j,c))}}scanReverse(e,t){let r=this._chunks,n=r.length;for(let s=n;--s>=0;){let c=r[s],p=this._predicate.bind(c),m=!1;for(let j=c.length;--j>=0;)p(j,c)&&(t&&!m&&(t(c),m=!0),e(j,c))}}count(){let e=0,t=this._chunks,r=t.length;for(let n=-1;++n<r;){let s=t[n],c=this._predicate.bind(s);for(let p=-1,m=s.length;++p<m;)c(p,s)&&++e}return e}[Symbol.iterator](){return new w0(this._chunks,this._predicate)}filter(e){return new oo(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,r=t.length,n=typeof e=="string"?new v0.Col(e):e;n.bind(t[r-1]);let s=n.vector;if(!j0.DataType.isDictionary(s.type))throw new Error("countBy currently only supports dictionary-encoded columns");let c=Math.ceil(Math.log(s.length)/Math.log(256)),p=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,m=new p(s.dictionary.length);for(let j=-1;++j<r;){let F=t[j],R=this._predicate.bind(F);n.bind(F);let L=n.vector.indices;for(let P=-1,ae=F.length;++P<ae;){let he=L.get(P);he!==null&&R(P,F)&&m[he]++}}return new Su(s.dictionary,g0.IntVector.from(m))}};Dr.FilteredDataFrame=oo});var T0=C(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.isTypedArray=v.util=v.predicate=v.CountByResult=v.FilteredDataFrame=v.DataFrame=v.RecordBatch=v.Message=v.JSONMessageReader=v.AsyncMessageReader=v.MessageReader=v.RecordBatchJSONWriter=v.RecordBatchStreamWriter=v.RecordBatchFileWriter=v.RecordBatchWriter=v.AsyncRecordBatchStreamReader=v.AsyncRecordBatchFileReader=v.RecordBatchStreamReader=v.RecordBatchFileReader=v.RecordBatchReader=v.AsyncByteQueue=v.AsyncByteStream=v.ByteStream=v.Utf8Builder=v.SparseUnionBuilder=v.DenseUnionBuilder=v.UnionBuilder=v.TimeNanosecondBuilder=v.TimeMicrosecondBuilder=v.TimeMillisecondBuilder=v.TimeSecondBuilder=v.TimeBuilder=v.TimestampNanosecondBuilder=v.TimestampMicrosecondBuilder=v.TimestampMillisecondBuilder=v.TimestampSecondBuilder=v.TimestampBuilder=v.StructBuilder=v.NullBuilder=v.MapBuilder=v.ListBuilder=v.Uint64Builder=v.Uint32Builder=v.Uint16Builder=v.Uint8Builder=v.Int64Builder=v.Int32Builder=v.Int16Builder=v.Int8Builder=v.IntBuilder=v.IntervalYearMonthBuilder=v.IntervalDayTimeBuilder=v.IntervalBuilder=v.Float64Builder=v.Float32Builder=v.Float16Builder=v.FloatBuilder=v.FixedSizeListBuilder=v.FixedSizeBinaryBuilder=v.DictionaryBuilder=v.DecimalBuilder=v.DateMillisecondBuilder=v.DateDayBuilder=v.DateBuilder=v.BoolBuilder=v.BinaryBuilder=v.Builder=v.Utf8Vector=v.SparseUnionVector=v.DenseUnionVector=v.UnionVector=v.TimeNanosecondVector=v.TimeMicrosecondVector=v.TimeMillisecondVector=v.TimeSecondVector=v.TimeVector=v.TimestampNanosecondVector=v.TimestampMicrosecondVector=v.TimestampMillisecondVector=v.TimestampSecondVector=v.TimestampVector=v.StructVector=v.NullVector=v.MapVector=v.ListVector=v.Uint64Vector=v.Uint32Vector=v.Uint16Vector=v.Uint8Vector=v.Int64Vector=v.Int32Vector=v.Int16Vector=v.Int8Vector=v.IntVector=v.IntervalYearMonthVector=v.IntervalDayTimeVector=v.IntervalVector=v.Float64Vector=v.Float32Vector=v.Float16Vector=v.FloatVector=v.FixedSizeListVector=v.FixedSizeBinaryVector=v.DictionaryVector=v.DecimalVector=v.DateMillisecondVector=v.DateDayVector=v.DateVector=v.Chunked=v.BoolVector=v.BinaryVector=v.BaseVector=v.Vector=v.Field=v.Schema=v.Visitor=v.Column=v.Table=v.Map_=v.FixedSizeList=v.IntervalYearMonth=v.IntervalDayTime=v.Interval=v.Dictionary=v.SparseUnion=v.DenseUnion=v.Union=v.Struct=v.List=v.Decimal=v.TimeNanosecond=v.TimeMicrosecond=v.TimeMillisecond=v.TimeSecond=v.Time=v.TimestampNanosecond=v.TimestampMicrosecond=v.TimestampMillisecond=v.TimestampSecond=v.Timestamp=v.DateMillisecond=v.DateDay=v.Date_=v.FixedSizeBinary=v.Binary=v.Utf8=v.Float64=v.Float32=v.Float16=v.Float=v.Uint64=v.Uint32=v.Uint16=v.Uint8=v.Int64=v.Int32=v.Int16=v.Int8=v.Int=v.Bool=v.Null=v.DataType=v.Data=v.BufferType=v.Type=v.MessageHeader=v.MetadataVersion=v.IntervalUnit=v.UnionMode=v.Precision=v.TimeUnit=v.DateUnit=void 0;var cs=er();Object.defineProperty(v,"DateUnit",{enumerable:!0,get:function(){return cs.DateUnit}});Object.defineProperty(v,"TimeUnit",{enumerable:!0,get:function(){return cs.TimeUnit}});Object.defineProperty(v,"Precision",{enumerable:!0,get:function(){return cs.Precision}});Object.defineProperty(v,"UnionMode",{enumerable:!0,get:function(){return cs.UnionMode}});Object.defineProperty(v,"IntervalUnit",{enumerable:!0,get:function(){return cs.IntervalUnit}});Object.defineProperty(v,"MetadataVersion",{enumerable:!0,get:function(){return cs.MetadataVersion}});var R2=Ro();Object.defineProperty(v,"MessageHeader",{enumerable:!0,get:function(){return R2.MessageHeader}});var I0=Fe();Object.defineProperty(v,"Type",{enumerable:!0,get:function(){return I0.Type}});Object.defineProperty(v,"BufferType",{enumerable:!0,get:function(){return I0.BufferType}});var k2=Kt();Object.defineProperty(v,"Data",{enumerable:!0,get:function(){return k2.Data}});var ue=we();Object.defineProperty(v,"DataType",{enumerable:!0,get:function(){return ue.DataType}});Object.defineProperty(v,"Null",{enumerable:!0,get:function(){return ue.Null}});Object.defineProperty(v,"Bool",{enumerable:!0,get:function(){return ue.Bool}});Object.defineProperty(v,"Int",{enumerable:!0,get:function(){return ue.Int}});Object.defineProperty(v,"Int8",{enumerable:!0,get:function(){return ue.Int8}});Object.defineProperty(v,"Int16",{enumerable:!0,get:function(){return ue.Int16}});Object.defineProperty(v,"Int32",{enumerable:!0,get:function(){return ue.Int32}});Object.defineProperty(v,"Int64",{enumerable:!0,get:function(){return ue.Int64}});Object.defineProperty(v,"Uint8",{enumerable:!0,get:function(){return ue.Uint8}});Object.defineProperty(v,"Uint16",{enumerable:!0,get:function(){return ue.Uint16}});Object.defineProperty(v,"Uint32",{enumerable:!0,get:function(){return ue.Uint32}});Object.defineProperty(v,"Uint64",{enumerable:!0,get:function(){return ue.Uint64}});Object.defineProperty(v,"Float",{enumerable:!0,get:function(){return ue.Float}});Object.defineProperty(v,"Float16",{enumerable:!0,get:function(){return ue.Float16}});Object.defineProperty(v,"Float32",{enumerable:!0,get:function(){return ue.Float32}});Object.defineProperty(v,"Float64",{enumerable:!0,get:function(){return ue.Float64}});Object.defineProperty(v,"Utf8",{enumerable:!0,get:function(){return ue.Utf8}});Object.defineProperty(v,"Binary",{enumerable:!0,get:function(){return ue.Binary}});Object.defineProperty(v,"FixedSizeBinary",{enumerable:!0,get:function(){return ue.FixedSizeBinary}});Object.defineProperty(v,"Date_",{enumerable:!0,get:function(){return ue.Date_}});Object.defineProperty(v,"DateDay",{enumerable:!0,get:function(){return ue.DateDay}});Object.defineProperty(v,"DateMillisecond",{enumerable:!0,get:function(){return ue.DateMillisecond}});Object.defineProperty(v,"Timestamp",{enumerable:!0,get:function(){return ue.Timestamp}});Object.defineProperty(v,"TimestampSecond",{enumerable:!0,get:function(){return ue.TimestampSecond}});Object.defineProperty(v,"TimestampMillisecond",{enumerable:!0,get:function(){return ue.TimestampMillisecond}});Object.defineProperty(v,"TimestampMicrosecond",{enumerable:!0,get:function(){return ue.TimestampMicrosecond}});Object.defineProperty(v,"TimestampNanosecond",{enumerable:!0,get:function(){return ue.TimestampNanosecond}});Object.defineProperty(v,"Time",{enumerable:!0,get:function(){return ue.Time}});Object.defineProperty(v,"TimeSecond",{enumerable:!0,get:function(){return ue.TimeSecond}});Object.defineProperty(v,"TimeMillisecond",{enumerable:!0,get:function(){return ue.TimeMillisecond}});Object.defineProperty(v,"TimeMicrosecond",{enumerable:!0,get:function(){return ue.TimeMicrosecond}});Object.defineProperty(v,"TimeNanosecond",{enumerable:!0,get:function(){return ue.TimeNanosecond}});Object.defineProperty(v,"Decimal",{enumerable:!0,get:function(){return ue.Decimal}});Object.defineProperty(v,"List",{enumerable:!0,get:function(){return ue.List}});Object.defineProperty(v,"Struct",{enumerable:!0,get:function(){return ue.Struct}});Object.defineProperty(v,"Union",{enumerable:!0,get:function(){return ue.Union}});Object.defineProperty(v,"DenseUnion",{enumerable:!0,get:function(){return ue.DenseUnion}});Object.defineProperty(v,"SparseUnion",{enumerable:!0,get:function(){return ue.SparseUnion}});Object.defineProperty(v,"Dictionary",{enumerable:!0,get:function(){return ue.Dictionary}});Object.defineProperty(v,"Interval",{enumerable:!0,get:function(){return ue.Interval}});Object.defineProperty(v,"IntervalDayTime",{enumerable:!0,get:function(){return ue.IntervalDayTime}});Object.defineProperty(v,"IntervalYearMonth",{enumerable:!0,get:function(){return ue.IntervalYearMonth}});Object.defineProperty(v,"FixedSizeList",{enumerable:!0,get:function(){return ue.FixedSizeList}});Object.defineProperty(v,"Map_",{enumerable:!0,get:function(){return ue.Map_}});var V2=zs();Object.defineProperty(v,"Table",{enumerable:!0,get:function(){return V2.Table}});var x2=Nn();Object.defineProperty(v,"Column",{enumerable:!0,get:function(){return x2.Column}});var P2=at();Object.defineProperty(v,"Visitor",{enumerable:!0,get:function(){return P2.Visitor}});var S0=it();Object.defineProperty(v,"Schema",{enumerable:!0,get:function(){return S0.Schema}});Object.defineProperty(v,"Field",{enumerable:!0,get:function(){return S0.Field}});var ne=gi();Object.defineProperty(v,"Vector",{enumerable:!0,get:function(){return ne.Vector}});Object.defineProperty(v,"BaseVector",{enumerable:!0,get:function(){return ne.BaseVector}});Object.defineProperty(v,"BinaryVector",{enumerable:!0,get:function(){return ne.BinaryVector}});Object.defineProperty(v,"BoolVector",{enumerable:!0,get:function(){return ne.BoolVector}});Object.defineProperty(v,"Chunked",{enumerable:!0,get:function(){return ne.Chunked}});Object.defineProperty(v,"DateVector",{enumerable:!0,get:function(){return ne.DateVector}});Object.defineProperty(v,"DateDayVector",{enumerable:!0,get:function(){return ne.DateDayVector}});Object.defineProperty(v,"DateMillisecondVector",{enumerable:!0,get:function(){return ne.DateMillisecondVector}});Object.defineProperty(v,"DecimalVector",{enumerable:!0,get:function(){return ne.DecimalVector}});Object.defineProperty(v,"DictionaryVector",{enumerable:!0,get:function(){return ne.DictionaryVector}});Object.defineProperty(v,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ne.FixedSizeBinaryVector}});Object.defineProperty(v,"FixedSizeListVector",{enumerable:!0,get:function(){return ne.FixedSizeListVector}});Object.defineProperty(v,"FloatVector",{enumerable:!0,get:function(){return ne.FloatVector}});Object.defineProperty(v,"Float16Vector",{enumerable:!0,get:function(){return ne.Float16Vector}});Object.defineProperty(v,"Float32Vector",{enumerable:!0,get:function(){return ne.Float32Vector}});Object.defineProperty(v,"Float64Vector",{enumerable:!0,get:function(){return ne.Float64Vector}});Object.defineProperty(v,"IntervalVector",{enumerable:!0,get:function(){return ne.IntervalVector}});Object.defineProperty(v,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ne.IntervalDayTimeVector}});Object.defineProperty(v,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ne.IntervalYearMonthVector}});Object.defineProperty(v,"IntVector",{enumerable:!0,get:function(){return ne.IntVector}});Object.defineProperty(v,"Int8Vector",{enumerable:!0,get:function(){return ne.Int8Vector}});Object.defineProperty(v,"Int16Vector",{enumerable:!0,get:function(){return ne.Int16Vector}});Object.defineProperty(v,"Int32Vector",{enumerable:!0,get:function(){return ne.Int32Vector}});Object.defineProperty(v,"Int64Vector",{enumerable:!0,get:function(){return ne.Int64Vector}});Object.defineProperty(v,"Uint8Vector",{enumerable:!0,get:function(){return ne.Uint8Vector}});Object.defineProperty(v,"Uint16Vector",{enumerable:!0,get:function(){return ne.Uint16Vector}});Object.defineProperty(v,"Uint32Vector",{enumerable:!0,get:function(){return ne.Uint32Vector}});Object.defineProperty(v,"Uint64Vector",{enumerable:!0,get:function(){return ne.Uint64Vector}});Object.defineProperty(v,"ListVector",{enumerable:!0,get:function(){return ne.ListVector}});Object.defineProperty(v,"MapVector",{enumerable:!0,get:function(){return ne.MapVector}});Object.defineProperty(v,"NullVector",{enumerable:!0,get:function(){return ne.NullVector}});Object.defineProperty(v,"StructVector",{enumerable:!0,get:function(){return ne.StructVector}});Object.defineProperty(v,"TimestampVector",{enumerable:!0,get:function(){return ne.TimestampVector}});Object.defineProperty(v,"TimestampSecondVector",{enumerable:!0,get:function(){return ne.TimestampSecondVector}});Object.defineProperty(v,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ne.TimestampMillisecondVector}});Object.defineProperty(v,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ne.TimestampMicrosecondVector}});Object.defineProperty(v,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ne.TimestampNanosecondVector}});Object.defineProperty(v,"TimeVector",{enumerable:!0,get:function(){return ne.TimeVector}});Object.defineProperty(v,"TimeSecondVector",{enumerable:!0,get:function(){return ne.TimeSecondVector}});Object.defineProperty(v,"TimeMillisecondVector",{enumerable:!0,get:function(){return ne.TimeMillisecondVector}});Object.defineProperty(v,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ne.TimeMicrosecondVector}});Object.defineProperty(v,"TimeNanosecondVector",{enumerable:!0,get:function(){return ne.TimeNanosecondVector}});Object.defineProperty(v,"UnionVector",{enumerable:!0,get:function(){return ne.UnionVector}});Object.defineProperty(v,"DenseUnionVector",{enumerable:!0,get:function(){return ne.DenseUnionVector}});Object.defineProperty(v,"SparseUnionVector",{enumerable:!0,get:function(){return ne.SparseUnionVector}});Object.defineProperty(v,"Utf8Vector",{enumerable:!0,get:function(){return ne.Utf8Vector}});var ce=ja();Object.defineProperty(v,"Builder",{enumerable:!0,get:function(){return ce.Builder}});Object.defineProperty(v,"BinaryBuilder",{enumerable:!0,get:function(){return ce.BinaryBuilder}});Object.defineProperty(v,"BoolBuilder",{enumerable:!0,get:function(){return ce.BoolBuilder}});Object.defineProperty(v,"DateBuilder",{enumerable:!0,get:function(){return ce.DateBuilder}});Object.defineProperty(v,"DateDayBuilder",{enumerable:!0,get:function(){return ce.DateDayBuilder}});Object.defineProperty(v,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ce.DateMillisecondBuilder}});Object.defineProperty(v,"DecimalBuilder",{enumerable:!0,get:function(){return ce.DecimalBuilder}});Object.defineProperty(v,"DictionaryBuilder",{enumerable:!0,get:function(){return ce.DictionaryBuilder}});Object.defineProperty(v,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ce.FixedSizeBinaryBuilder}});Object.defineProperty(v,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ce.FixedSizeListBuilder}});Object.defineProperty(v,"FloatBuilder",{enumerable:!0,get:function(){return ce.FloatBuilder}});Object.defineProperty(v,"Float16Builder",{enumerable:!0,get:function(){return ce.Float16Builder}});Object.defineProperty(v,"Float32Builder",{enumerable:!0,get:function(){return ce.Float32Builder}});Object.defineProperty(v,"Float64Builder",{enumerable:!0,get:function(){return ce.Float64Builder}});Object.defineProperty(v,"IntervalBuilder",{enumerable:!0,get:function(){return ce.IntervalBuilder}});Object.defineProperty(v,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ce.IntervalDayTimeBuilder}});Object.defineProperty(v,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ce.IntervalYearMonthBuilder}});Object.defineProperty(v,"IntBuilder",{enumerable:!0,get:function(){return ce.IntBuilder}});Object.defineProperty(v,"Int8Builder",{enumerable:!0,get:function(){return ce.Int8Builder}});Object.defineProperty(v,"Int16Builder",{enumerable:!0,get:function(){return ce.Int16Builder}});Object.defineProperty(v,"Int32Builder",{enumerable:!0,get:function(){return ce.Int32Builder}});Object.defineProperty(v,"Int64Builder",{enumerable:!0,get:function(){return ce.Int64Builder}});Object.defineProperty(v,"Uint8Builder",{enumerable:!0,get:function(){return ce.Uint8Builder}});Object.defineProperty(v,"Uint16Builder",{enumerable:!0,get:function(){return ce.Uint16Builder}});Object.defineProperty(v,"Uint32Builder",{enumerable:!0,get:function(){return ce.Uint32Builder}});Object.defineProperty(v,"Uint64Builder",{enumerable:!0,get:function(){return ce.Uint64Builder}});Object.defineProperty(v,"ListBuilder",{enumerable:!0,get:function(){return ce.ListBuilder}});Object.defineProperty(v,"MapBuilder",{enumerable:!0,get:function(){return ce.MapBuilder}});Object.defineProperty(v,"NullBuilder",{enumerable:!0,get:function(){return ce.NullBuilder}});Object.defineProperty(v,"StructBuilder",{enumerable:!0,get:function(){return ce.StructBuilder}});Object.defineProperty(v,"TimestampBuilder",{enumerable:!0,get:function(){return ce.TimestampBuilder}});Object.defineProperty(v,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ce.TimestampSecondBuilder}});Object.defineProperty(v,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ce.TimestampMillisecondBuilder}});Object.defineProperty(v,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ce.TimestampMicrosecondBuilder}});Object.defineProperty(v,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ce.TimestampNanosecondBuilder}});Object.defineProperty(v,"TimeBuilder",{enumerable:!0,get:function(){return ce.TimeBuilder}});Object.defineProperty(v,"TimeSecondBuilder",{enumerable:!0,get:function(){return ce.TimeSecondBuilder}});Object.defineProperty(v,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ce.TimeMillisecondBuilder}});Object.defineProperty(v,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ce.TimeMicrosecondBuilder}});Object.defineProperty(v,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ce.TimeNanosecondBuilder}});Object.defineProperty(v,"UnionBuilder",{enumerable:!0,get:function(){return ce.UnionBuilder}});Object.defineProperty(v,"DenseUnionBuilder",{enumerable:!0,get:function(){return ce.DenseUnionBuilder}});Object.defineProperty(v,"SparseUnionBuilder",{enumerable:!0,get:function(){return ce.SparseUnionBuilder}});Object.defineProperty(v,"Utf8Builder",{enumerable:!0,get:function(){return ce.Utf8Builder}});var sf=hr();Object.defineProperty(v,"ByteStream",{enumerable:!0,get:function(){return sf.ByteStream}});Object.defineProperty(v,"AsyncByteStream",{enumerable:!0,get:function(){return sf.AsyncByteStream}});Object.defineProperty(v,"AsyncByteQueue",{enumerable:!0,get:function(){return sf.AsyncByteQueue}});var ao=Qs();Object.defineProperty(v,"RecordBatchReader",{enumerable:!0,get:function(){return ao.RecordBatchReader}});Object.defineProperty(v,"RecordBatchFileReader",{enumerable:!0,get:function(){return ao.RecordBatchFileReader}});Object.defineProperty(v,"RecordBatchStreamReader",{enumerable:!0,get:function(){return ao.RecordBatchStreamReader}});Object.defineProperty(v,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return ao.AsyncRecordBatchFileReader}});Object.defineProperty(v,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return ao.AsyncRecordBatchStreamReader}});var Tu=Ya();Object.defineProperty(v,"RecordBatchWriter",{enumerable:!0,get:function(){return Tu.RecordBatchWriter}});Object.defineProperty(v,"RecordBatchFileWriter",{enumerable:!0,get:function(){return Tu.RecordBatchFileWriter}});Object.defineProperty(v,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return Tu.RecordBatchStreamWriter}});Object.defineProperty(v,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return Tu.RecordBatchJSONWriter}});var of=Ra();Object.defineProperty(v,"MessageReader",{enumerable:!0,get:function(){return of.MessageReader}});Object.defineProperty(v,"AsyncMessageReader",{enumerable:!0,get:function(){return of.AsyncMessageReader}});Object.defineProperty(v,"JSONMessageReader",{enumerable:!0,get:function(){return of.JSONMessageReader}});var N2=Qr();Object.defineProperty(v,"Message",{enumerable:!0,get:function(){return N2.Message}});var L2=Pi();Object.defineProperty(v,"RecordBatch",{enumerable:!0,get:function(){return L2.RecordBatch}});var af=B0();Object.defineProperty(v,"DataFrame",{enumerable:!0,get:function(){return af.DataFrame}});Object.defineProperty(v,"FilteredDataFrame",{enumerable:!0,get:function(){return af.FilteredDataFrame}});Object.defineProperty(v,"CountByResult",{enumerable:!0,get:function(){return af.CountByResult}});var q2=Fs(),H2=fl(),z2=ui(),W2=Is(),Y2=Xe(),G2=ks(),$2=tf();v.predicate=$2;var uf=Ol();v.util=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},q2),H2),z2),W2),Y2),G2),{compareSchemas:uf.compareSchemas,compareFields:uf.compareFields,compareTypes:uf.compareTypes});var K2=Jr();Object.defineProperty(v,"isTypedArray",{enumerable:!0,get:function(){return K2.isTypedArray}})});var Du=C(()=>{});var ff=C(()=>{});var R0=C((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(i){return Object.prototype.toString.call(i)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(i){return typeof i=="object"&&i.buffer&&i.buffer.constructor===ArrayBuffer});var createOutputMethod=function(i,e){return function(t){return new Sha256(e,!0).update(t)[i]()}},createMethod=function(i){var e=createOutputMethod("hex",i);NODE_JS&&(e=nodeWrap(e,i)),e.create=function(){return new Sha256(i)},e.update=function(n){return e.create().update(n)};for(var t=0;t<OUTPUT_TYPES.length;++t){var r=OUTPUT_TYPES[t];e[r]=createOutputMethod(r,i)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(i){if(typeof i=="string")return crypto.createHash(algorithm).update(i,"utf8").digest("hex");if(i==null)throw new Error(ERROR);return i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),Array.isArray(i)||ArrayBuffer.isView(i)||i.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(i)).digest("hex"):method(i)};return nodeMethod},createHmacOutputMethod=function(i,e){return function(t,r){return new HmacSha256(t,e,!0).update(r)[i]()}},createHmacMethod=function(i){var e=createHmacOutputMethod("hex",i);e.create=function(n){return new HmacSha256(n,i)},e.update=function(n,s){return e.create(n).update(s)};for(var t=0;t<OUTPUT_TYPES.length;++t){var r=OUTPUT_TYPES[t];e[r]=createHmacOutputMethod(r,i)}return e};function Sha256(i,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i?(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=i}Sha256.prototype.update=function(i){if(!this.finalized){var e,t=typeof i;if(t!=="string"){if(t==="object"){if(i===null)throw new Error(ERROR);if(ARRAY_BUFFER&&i.constructor===ArrayBuffer)i=new Uint8Array(i);else if(!Array.isArray(i)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(i)))throw new Error(ERROR)}else throw new Error(ERROR);e=!0}for(var r,n=0,s,c=i.length,p=this.blocks;n<c;){if(this.hashed&&(this.hashed=!1,p[0]=this.block,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),e)for(s=this.start;n<c&&s<64;++n)p[s>>2]|=i[n]<<SHIFT[s++&3];else for(s=this.start;n<c&&s<64;++n)r=i.charCodeAt(n),r<128?p[s>>2]|=r<<SHIFT[s++&3]:r<2048?(p[s>>2]|=(192|r>>6)<<SHIFT[s++&3],p[s>>2]|=(128|r&63)<<SHIFT[s++&3]):r<55296||r>=57344?(p[s>>2]|=(224|r>>12)<<SHIFT[s++&3],p[s>>2]|=(128|r>>6&63)<<SHIFT[s++&3],p[s>>2]|=(128|r&63)<<SHIFT[s++&3]):(r=65536+((r&1023)<<10|i.charCodeAt(++n)&1023),p[s>>2]|=(240|r>>18)<<SHIFT[s++&3],p[s>>2]|=(128|r>>12&63)<<SHIFT[s++&3],p[s>>2]|=(128|r>>6&63)<<SHIFT[s++&3],p[s>>2]|=(128|r&63)<<SHIFT[s++&3]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=p[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var i=this.blocks,e=this.lastByteIndex;i[16]=this.block,i[e>>2]|=EXTRA[e&3],this.block=i[16],e>=56&&(this.hashed||this.hash(),i[0]=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),i[14]=this.hBytes<<3|this.bytes>>>29,i[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var i=this.h0,e=this.h1,t=this.h2,r=this.h3,n=this.h4,s=this.h5,c=this.h6,p=this.h7,m=this.blocks,j,F,R,L,P,ae,he,je,Se,gt,Si;for(j=16;j<64;++j)P=m[j-15],F=(P>>>7|P<<25)^(P>>>18|P<<14)^P>>>3,P=m[j-2],R=(P>>>17|P<<15)^(P>>>19|P<<13)^P>>>10,m[j]=m[j-16]+F+m[j-7]+R<<0;for(Si=e&t,j=0;j<64;j+=4)this.first?(this.is224?(je=300032,P=m[0]-1413257819,p=P-150054599<<0,r=P+24177077<<0):(je=704751109,P=m[0]-210244248,p=P-1521486534<<0,r=P+143694565<<0),this.first=!1):(F=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),R=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),je=i&e,L=je^i&t^Si,he=n&s^~n&c,P=p+R+he+K[j]+m[j],ae=F+L,p=r+P<<0,r=P+ae<<0),F=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),R=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7),Se=r&i,L=Se^r&e^je,he=p&n^~p&s,P=c+R+he+K[j+1]+m[j+1],ae=F+L,c=t+P<<0,t=P+ae<<0,F=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),R=(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7),gt=t&r,L=gt^t&i^Se,he=c&p^~c&n,P=s+R+he+K[j+2]+m[j+2],ae=F+L,s=e+P<<0,e=P+ae<<0,F=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),R=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),Si=e&t,L=Si^e&r^gt,he=s&c^~s&p,P=n+R+he+K[j+3]+m[j+3],ae=F+L,n=i+P<<0,i=P+ae<<0;this.h0=this.h0+i<<0,this.h1=this.h1+e<<0,this.h2=this.h2+t<<0,this.h3=this.h3+r<<0,this.h4=this.h4+n<<0,this.h5=this.h5+s<<0,this.h6=this.h6+c<<0,this.h7=this.h7+p<<0},Sha256.prototype.hex=function(){this.finalize();var i=this.h0,e=this.h1,t=this.h2,r=this.h3,n=this.h4,s=this.h5,c=this.h6,p=this.h7,m=HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[c&15];return this.is224||(m+=HEX_CHARS[p>>28&15]+HEX_CHARS[p>>24&15]+HEX_CHARS[p>>20&15]+HEX_CHARS[p>>16&15]+HEX_CHARS[p>>12&15]+HEX_CHARS[p>>8&15]+HEX_CHARS[p>>4&15]+HEX_CHARS[p&15]),m},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var i=this.h0,e=this.h1,t=this.h2,r=this.h3,n=this.h4,s=this.h5,c=this.h6,p=this.h7,m=[i>>24&255,i>>16&255,i>>8&255,i&255,e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,n>>24&255,n>>16&255,n>>8&255,n&255,s>>24&255,s>>16&255,s>>8&255,s&255,c>>24&255,c>>16&255,c>>8&255,c&255];return this.is224||m.push(p>>24&255,p>>16&255,p>>8&255,p&255),m},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var i=new ArrayBuffer(this.is224?28:32),e=new DataView(i);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),i};function HmacSha256(i,e,t){var r,n=typeof i;if(n==="string"){var s=[],c=i.length,p=0,m;for(r=0;r<c;++r)m=i.charCodeAt(r),m<128?s[p++]=m:m<2048?(s[p++]=192|m>>6,s[p++]=128|m&63):m<55296||m>=57344?(s[p++]=224|m>>12,s[p++]=128|m>>6&63,s[p++]=128|m&63):(m=65536+((m&1023)<<10|i.charCodeAt(++r)&1023),s[p++]=240|m>>18,s[p++]=128|m>>12&63,s[p++]=128|m>>6&63,s[p++]=128|m&63);i=s}else if(n==="object"){if(i===null)throw new Error(ERROR);if(ARRAY_BUFFER&&i.constructor===ArrayBuffer)i=new Uint8Array(i);else if(!Array.isArray(i)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(i)))throw new Error(ERROR)}else throw new Error(ERROR);i.length>64&&(i=new Sha256(e,!0).update(i).array());var j=[],F=[];for(r=0;r<64;++r){var R=i[r]||0;j[r]=92^R,F[r]=54^R}Sha256.call(this,e,t),this.update(F),this.oKeyPad=j,this.inner=!0,this.sharedMemory=t}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var i=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(i),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var oE={};lA(oE,{registerWorker:()=>x0});var A0=ii(ws(),1),F0=ii(ja(),1),ls=ii(Qs(),1),ds=ii(Ya(),1),D0=ii(f0(),1),O0=ii(y0(),1),Au=ii(_0(),1),Fu=ii(m0(),1),T=ii(T0(),1);A0.default.toDOMStream=D0.toDOMStream;F0.Builder.throughDOM=O0.builderThroughDOMStream;ls.RecordBatchReader.throughDOM=Au.recordBatchReaderThroughDOMStream;ls.RecordBatchFileReader.throughDOM=Au.recordBatchReaderThroughDOMStream;ls.RecordBatchStreamReader.throughDOM=Au.recordBatchReaderThroughDOMStream;ds.RecordBatchWriter.throughDOM=Fu.recordBatchWriterThroughDOMStream;ds.RecordBatchFileWriter.throughDOM=Fu.recordBatchWriterThroughDOMStream;ds.RecordBatchStreamWriter.throughDOM=Fu.recordBatchWriterThroughDOMStream;function lf(i){switch(i.typeId){case T.Type.Binary:return{type:"binary"};case T.Type.Bool:return{type:"bool"};case T.Type.Date:return{type:"date"};case T.Type.DateDay:return{type:"date32[d]"};case T.Type.DateMillisecond:return{type:"date64[ms]"};case T.Type.Decimal:{let e=i;return{type:"decimal",precision:e.precision,scale:e.scale}}case T.Type.Float:return{type:"float"};case T.Type.Float16:return{type:"float16"};case T.Type.Float32:return{type:"float32"};case T.Type.Float64:return{type:"float64"};case T.Type.Int:return{type:"int32"};case T.Type.Int16:return{type:"int16"};case T.Type.Int32:return{type:"int32"};case T.Type.Int64:return{type:"int64"};case T.Type.Uint16:return{type:"uint16"};case T.Type.Uint32:return{type:"uint32"};case T.Type.Uint64:return{type:"uint64"};case T.Type.Uint8:return{type:"uint8"};case T.Type.IntervalDayTime:return{type:"interval[dt]"};case T.Type.IntervalYearMonth:return{type:"interval[m]"};case T.Type.List:{let e=i;return{type:"list",children:[uo(e.valueField.name,e.valueField.type)]}}case T.Type.FixedSizeBinary:return{type:"fixedsizebinary",byteWidth:i.byteWidth};case T.Type.Null:return{type:"null"};case T.Type.Utf8:return{type:"utf8"};case T.Type.Struct:return{type:"struct",children:i.children.map(t=>uo(t.name,t.type))};case T.Type.Time:return{type:"time[s]"};case T.Type.TimeMicrosecond:return{type:"time[us]"};case T.Type.TimeMillisecond:return{type:"time[ms]"};case T.Type.TimeNanosecond:return{type:"time[ns]"};case T.Type.TimeSecond:return{type:"time[s]"};case T.Type.Timestamp:return{type:"timestamp",timezone:i.timezone||void 0};case T.Type.TimestampSecond:return{type:"timestamp[s]",timezone:i.timezone||void 0};case T.Type.TimestampMicrosecond:return{type:"timestamp[us]",timezone:i.timezone||void 0};case T.Type.TimestampNanosecond:return{type:"timestamp[ns]",timezone:i.timezone||void 0};case T.Type.TimestampMillisecond:return{type:"timestamp[ms]",timezone:i.timezone||void 0}}throw new Error(`unsupported arrow type: ${i.toString()}`)}function uo(i,e){let t=lf(e);return t.name=i,t}var df=class{constructor(){this._bindings=null;this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"OK",data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"ERROR",data:r},[])}async onMessage(e){switch(e.type){case"PING":this.sendOK(e);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1],t=>{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"INSTANTIATE_PROGRESS",data:t},[])}),this.sendOK(e)}catch(t){this._bindings=null,this.failWith(e,t)}return;default:break}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(e);break;case"OPEN":this._bindings.open(e.data),this.sendOK(e);break;case"DROP_FILE":this._bindings.dropFile(e.data),this.sendOK(e);break;case"DROP_FILES":this._bindings.dropFiles(),this.sendOK(e);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(e);break;case"CONNECT":{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"CONNECTION_INFO",data:t.useUnsafe((r,n)=>n)},[]);break}case"DISCONNECT":this._bindings.disconnect(e.data),this.sendOK(e);break;case"CREATE_PREPARED":{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"PREPARED_STATEMENT_ID",data:t},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case"RUN_PREPARED":{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"RUN_QUERY":{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"SEND_PREPARED":{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_START",data:t},[t.buffer]);break}case"SEND_QUERY":{let t=this._bindings.sendQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_START",data:t},[t.buffer]);break}case"FETCH_QUERY_RESULTS":{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_CHUNK",data:t},[t.buffer]);break}case"GET_TABLE_NAMES":{let t=this._bindings.getTableNames(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"TABLE_NAMES",data:t},[]);break}case"GLOB_FILE_INFOS":{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_INFOS",data:t},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_HANDLE":this._bindings.registerFileHandle(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_BUFFER":{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_BUFFER",data:t},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(e.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"TOKENIZE":{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SCRIPT_TOKENS",data:t},[]);break}}}catch(t){return this.failWith(e,t)}}};var C0={},J2=function(){var i=C0.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},r,n;t.ready=new Promise(function(o,a){r=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var p=[],m="./this.program",j=function(o,a){throw a},F=typeof window=="object",R=typeof importScripts=="function",L=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",P="";function ae(o){return t.locateFile?t.locateFile(o,P):P+o}var he,je,Se,gt;function Si(o){if(!(o instanceof To)){var a=o;Ti("exiting due to exception: "+a)}}var _t,Hi;L?(R?P=Du().dirname(P)+"/":P=__dirname+"/",he=function(a,u){return _t||(_t=ff()),Hi||(Hi=Du()),a=Hi.normalize(a),_t.readFileSync(a,u?null:"utf8")},Se=function(a){var u=he(a,!0);return u.buffer||(u=new Uint8Array(u)),fo(u.buffer),u},je=function(a,u,l){_t||(_t=ff()),Hi||(Hi=Du()),a=Hi.normalize(a),_t.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),p=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof To))throw o}),process.on("unhandledRejection",function(o){throw o}),j=function(o,a){if(Cu())throw process.exitCode=o,a;Si(a),process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(F||R)&&(R?P=self.location.href:typeof document!="undefined"&&document.currentScript&&(P=document.currentScript.src),i&&(P=i),P.indexOf("blob:")!==0?P=P.substr(0,P.replace(/[?#].*/,"").lastIndexOf("/")+1):P="",he=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},R&&(Se=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),je=function(o,a,u){var l=new XMLHttpRequest;l.open("GET",o,!0),l.responseType="arraybuffer",l.onload=function(){if(l.status==200||l.status==0&&l.response){a(l.response);return}u()},l.onerror=u,l.send(null)},gt=function(o){document.title=o});var an=t.print||console.log.bind(console),Ti=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(p=t.arguments),t.thisProgram&&(m=t.thisProgram),t.quit&&(j=t.quit);var vf=0,st=function(o){vf=o},P0=function(){return vf},hs;t.wasmBinary&&(hs=t.wasmBinary);var N0=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Bt("no native wasm support detected");var co,Ou=!1,lo;function fo(o,a){o||Bt("Assertion failed: "+a)}function L0(o){var a=t["_"+o];return fo(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function q0(o,a,u,l,d){var f={string:function(x){var Z=0;if(x!=null&&x!==0){var fe=(x.length<<2)+1;Z=Lu(fe),Mu(x,Z,fe)}return Z},array:function(x){var Z=Lu(x.length);return If(x,Z),Z}};function h(x){return a==="string"?un(x):a==="boolean"?Boolean(x):x}var y=L0(o),_=[],b=0;if(l)for(var g=0;g<l.length;g++){var w=f[u[g]];w?(b===0&&(b=B()),_[g]=w(l[g])):_[g]=l[g]}var A=y.apply(null,_);function M(x){return b!==0&&I(b),h(x)}return A=M(A),A}var jf=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function wf(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&jf)return jf.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var y=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|y);continue}var _=o[a++]&63;if((h&240)==224?h=(h&15)<<12|y<<6|_:h=(h&7)<<18|y<<12|_<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var b=h-65536;f+=String.fromCharCode(55296|b>>10,56320|b&1023)}}return f}function un(o,a){return o?wf(zi,o,a):""}function Bf(o,a,u,l){if(!(l>0))return 0;for(var d=u,f=u+l-1,h=0;h<o.length;++h){var y=o.charCodeAt(h);if(y>=55296&&y<=57343){var _=o.charCodeAt(++h);y=65536+((y&1023)<<10)|_&1023}if(y<=127){if(u>=f)break;a[u++]=y}else if(y<=2047){if(u+1>=f)break;a[u++]=192|y>>6,a[u++]=128|y&63}else if(y<=65535){if(u+2>=f)break;a[u++]=224|y>>12,a[u++]=128|y>>6&63,a[u++]=128|y&63}else{if(u+3>=f)break;a[u++]=240|y>>18,a[u++]=128|y>>12&63,a[u++]=128|y>>6&63,a[u++]=128|y&63}}return a[u]=0,u-d}function Mu(o,a,u){return Bf(o,zi,a,u)}function H0(o){for(var a=0,u=0;u<o.length;++u){var l=o.charCodeAt(u);l>=55296&&l<=57343&&(l=65536+((l&1023)<<10)|o.charCodeAt(++u)&1023),l<=127?++a:l<=2047?a+=2:l<=65535?a+=3:a+=4}return a}function If(o,a){ti.set(o,a)}function z0(o,a,u){for(var l=0;l<o.length;++l)ti[a++>>0]=o.charCodeAt(l);u||(ti[a>>0]=0)}function W0(o,a){return o%a>0&&(o+=a-o%a),o}var Sf,ti,zi,ps,Tf,H,Y0,G0,$0;function Af(o){Sf=o,t.HEAP8=ti=new Int8Array(o),t.HEAP16=ps=new Int16Array(o),t.HEAP32=H=new Int32Array(o),t.HEAPU8=zi=new Uint8Array(o),t.HEAPU16=Tf=new Uint16Array(o),t.HEAPU32=Y0=new Uint32Array(o),t.HEAPF32=G0=new Float32Array(o),t.HEAPF64=$0=new Float64Array(o)}var aE=t.INITIAL_MEMORY||16777216,$,Ff=[],Df=[],K0=[],Of=[],J0=!1,X0=!1,Z0=0;function Cu(){return N0||Z0>0}function Q0(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)nj(t.preRun.shift());ho(Ff)}function ej(){J0=!0,ho(Df)}function tj(){ho(K0)}function ij(){X0=!0}function rj(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)oj(t.postRun.shift());ho(Of)}function nj(o){Ff.unshift(o)}function sj(o){Df.unshift(o)}function oj(o){Of.unshift(o)}var Ur=0,Uu=null,ys=null;function aj(o){Ur++,t.monitorRunDependencies&&t.monitorRunDependencies(Ur)}function uj(o){if(Ur--,t.monitorRunDependencies&&t.monitorRunDependencies(Ur),Ur==0&&(Uu!==null&&(clearInterval(Uu),Uu=null),ys)){var a=ys;ys=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Bt(o){t.onAbort&&t.onAbort(o),o="Aborted("+o+")",Ti(o),Ou=!0,lo=1,o+=". Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var cj="data:application/octet-stream;base64,";function Mf(o){return o.startsWith(cj)}var It;t.locateFile?(It="./duckdb-mvp.wasm",Mf(It)||(It=ae(It))):It=new URL("./duckdb-mvp.wasm",C0.url).toString();function Cf(o){try{if(o==It&&hs)return new Uint8Array(hs);if(Se)return Se(o);throw"both async and sync fetching of the wasm failed"}catch(a){Bt(a)}}function lj(){return!hs&&(F||R)&&typeof fetch=="function"?fetch(It,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+It+"'";return o.arrayBuffer()}).catch(function(){return Cf(It)}):Promise.resolve().then(function(){return Cf(It)})}function dj(){var o={a:qw};function a(h,y){var _=h.exports;t.asm=_,co=t.asm.Te,Af(co.buffer),$=t.asm.We,sj(t.asm.Ue),uj("wasm-instantiate")}aj("wasm-instantiate");function u(h){a(h.instance)}function l(h){return lj().then(function(y){return WebAssembly.instantiate(y,o)}).then(function(y){return y}).then(h,function(y){Ti("failed to asynchronously prepare wasm: "+y),Bt(y)})}function d(){return!hs&&typeof WebAssembly.instantiateStreaming=="function"&&!Mf(It)&&typeof fetch=="function"?fetch(It,{credentials:"same-origin"}).then(function(h){var y=WebAssembly.instantiateStreaming(h,o);return y.then(u,function(_){return Ti("wasm streaming compile failed: "+_),Ti("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Ti("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function ho(o){for(;o.length>0;){var a=o.shift();if(typeof a=="function"){a(t);continue}var u=a.func;typeof u=="number"?a.arg===void 0?$.get(u)():$.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function fj(o){if(o instanceof To||o=="unwind")return lo;j(1,o)}function hj(o){return bs(o+16)+16}function Er(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){H[this.ptr+4>>2]=a},this.get_type=function(){return H[this.ptr+4>>2]},this.set_destructor=function(a){H[this.ptr+8>>2]=a},this.get_destructor=function(){return H[this.ptr+8>>2]},this.set_refcount=function(a){H[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,ti[this.ptr+12>>0]=a},this.get_caught=function(){return ti[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,ti[this.ptr+13>>0]=a},this.get_rethrown=function(){return ti[this.ptr+13>>0]!=0},this.init=function(a,u){this.set_type(a),this.set_destructor(u),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var a=H[this.ptr>>2];H[this.ptr>>2]=a+1},this.release_ref=function(){var a=H[this.ptr>>2];return H[this.ptr>>2]=a-1,a===1}}function cn(o){this.free=function(){qu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){H[this.ptr>>2]=a},this.get_base_ptr=function(){return H[this.ptr>>2]},this.set_adjusted_ptr=function(a){H[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return H[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=Nf(this.get_exception_info().get_type());if(a)return H[this.get_base_ptr()>>2];var u=this.get_adjusted_ptr();return u!==0?u:this.get_base_ptr()},this.get_exception_info=function(){return new Er(this.get_base_ptr())},o===void 0?(this.ptr=bs(8),this.set_adjusted_ptr(0)):this.ptr=o}var po=[];function pj(o){o.add_ref()}var yo=0;function yj(o){var a=new cn(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),yo--),u.set_rethrown(!1),po.push(a),pj(u),a.get_exception_ptr()}var Ai=0;function Uf(o){return qu(new Er(o).ptr)}function _j(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&$.get(a)(o.excPtr),Uf(o.excPtr)}}function mj(){S(0);var o=po.pop();_j(o.get_exception_info()),o.free(),Ai=0}function bj(o){var a=new cn(o),u=a.get_base_ptr();throw Ai||(Ai=u),a.free(),u}function gj(){var o=Ai;if(!o)return st(0),0|0;var a=new Er(o),u=a.get_type(),l=new cn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return st(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ms(h,u,l.get_adjusted_ptr_addr()))return st(h),l.ptr|0}return st(u),l.ptr|0}function vj(){var o=Ai;if(!o)return st(0),0|0;var a=new Er(o),u=a.get_type(),l=new cn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return st(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ms(h,u,l.get_adjusted_ptr_addr()))return st(h),l.ptr|0}return st(u),l.ptr|0}function jj(){var o=Ai;if(!o)return st(0),0|0;var a=new Er(o),u=a.get_type(),l=new cn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return st(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ms(h,u,l.get_adjusted_ptr_addr()))return st(h),l.ptr|0}return st(u),l.ptr|0}function wj(){var o=Ai;if(!o)return st(0),0|0;var a=new Er(o),u=a.get_type(),l=new cn;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return st(0),l.ptr|0;for(var d=Array.prototype.slice.call(arguments),f=0;f<d.length;f++){var h=d[f];if(h===0||h===u)break;if(ms(h,u,l.get_adjusted_ptr_addr()))return st(h),l.ptr|0}return st(u),l.ptr|0}function Bj(){var o=po.pop();o||Bt("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(po.push(o),a.set_rethrown(!0),a.set_caught(!1),yo++),Ai=u,u}function Ij(o,a,u){var l=new Er(o);throw l.init(a,u),Ai=o,yo++,o}function Sj(){return yo}var tt={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=tt.buffers[o];a===0||a===10?((o===1?an:Ti)(wf(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){tt.varargs+=4;var o=H[tt.varargs-4>>2];return o},getStr:function(o){var a=un(o);return a},get64:function(o,a){return o}};function Tj(o,a,u,l,d){}function Aj(o,a){return o=tt.getStr(o),tt.doAccess(o,a)}function Fj(){Ti("missing function: $SOCKFS"),Bt(-1)}function Ef(){Ti("missing function: $FS"),Bt(-1)}function ln(o){var a=Fj.getSocket(o);if(!a)throw new Ef.ErrnoError(8);return a}function Dj(o){return H[Pf()>>2]=o,o}function Eu(o){return(o&255)+"."+(o>>8&255)+"."+(o>>16&255)+"."+(o>>24&255)}function Rf(o){var a="",u=0,l=0,d=0,f=0,h=0,y=0,_=[o[0]&65535,o[0]>>16,o[1]&65535,o[1]>>16,o[2]&65535,o[2]>>16,o[3]&65535,o[3]>>16],b=!0,g="";for(y=0;y<5;y++)if(_[y]!==0){b=!1;break}if(b){if(g=Eu(_[6]|_[7]<<16),_[5]===-1)return a="::ffff:",a+=g,a;if(_[5]===0)return a="::",g==="0.0.0.0"&&(g=""),g==="0.0.0.1"&&(g="1"),a+=g,a}for(u=0;u<8;u++)_[u]===0&&(u-d>1&&(h=0),d=u,h++),h>l&&(l=h,f=u-l+1);for(u=0;u<8;u++){if(l>1&&_[u]===0&&u>=f&&u<f+l){u===f&&(a+=":",f===0&&(a+=":"));continue}a+=Number(Nu(_[u]&65535)).toString(16),a+=u<7?":":""}return a}function kf(o,a){var u=ps[o>>1],l=Nu(Tf[o+2>>1]),d;switch(u){case 2:if(a!==16)return{errno:28};d=H[o+4>>2],d=Eu(d);break;case 10:if(a!==28)return{errno:28};d=[H[o+8>>2],H[o+12>>2],H[o+16>>2],H[o+20>>2]],d=Rf(d);break;default:return{errno:5}}return{family:u,addr:d,port:l}}function Vf(o,a,u){if(u&&o===0)return null;var l=kf(o,a);if(l.errno)throw new Ef.ErrnoError(l.errno);return l.addr=St.lookup_addr(l.addr)||l.addr,l}function Oj(o,a,u){var l=ln(o),d=Vf(a,u);return l.sock_ops.bind(l,d.addr,d.port),0}function Mj(o,a,u){var l=ln(o),d=Vf(a,u);return l.sock_ops.connect(l,d.addr,d.port),0}function Cj(o,a,u){return tt.varargs=u,0}function Uj(o,a){}function Ej(o,a,u,l){}function Rj(o,a,u){}function _o(o){for(var a=o.split("."),u=0;u<4;u++){var l=Number(a[u]);if(isNaN(l))return null;a[u]=l}return(a[0]|a[1]<<8|a[2]<<16|a[3]<<24)>>>0}function mo(o){return parseInt(o)}function Ru(o){var a,u,l,d,f=/^((?=.*::)(?!.*::.+::)(::)?([\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,h=[];if(!f.test(o))return null;if(o==="::")return[0,0,0,0,0,0,0,0];for(o.startsWith("::")?o=o.replace("::","Z:"):o=o.replace("::",":Z:"),o.indexOf(".")>0?(o=o.replace(new RegExp("[.]","g"),":"),a=o.split(":"),a[a.length-4]=mo(a[a.length-4])+mo(a[a.length-3])*256,a[a.length-3]=mo(a[a.length-2])+mo(a[a.length-1])*256,a=a.slice(0,a.length-2)):a=o.split(":"),l=0,d=0,u=0;u<a.length;u++)if(typeof a[u]=="string")if(a[u]==="Z"){for(d=0;d<8-a.length+1;d++)h[u+d]=0;l=d-1}else h[u+l]=Io(parseInt(a[u],16));else h[u+l]=a[u];return[h[1]<<16|h[0],h[3]<<16|h[2],h[5]<<16|h[4],h[7]<<16|h[6]]}function xf(o,a){zi.fill(0,o,o+a)}function ku(o,a,u,l,d){switch(a){case 2:u=_o(u),xf(o,16),d&&(H[d>>2]=16),ps[o>>1]=a,H[o+4>>2]=u,ps[o+2>>1]=Io(l);break;case 10:u=Ru(u),xf(o,28),d&&(H[d>>2]=28),H[o>>2]=a,H[o+8>>2]=u[0],H[o+12>>2]=u[1],H[o+16>>2]=u[2],H[o+20>>2]=u[3],ps[o+2>>1]=Io(l);break;default:return 5}return 0}var St={address_map:{id:1,addrs:{},names:{}},lookup_name:function(o){var a=_o(o);if(a!==null||(a=Ru(o),a!==null))return o;var u;if(St.address_map.addrs[o])u=St.address_map.addrs[o];else{var l=St.address_map.id++;fo(l<65535,"exceeded max address mappings of 65535"),u="172.29."+(l&255)+"."+(l&65280),St.address_map.names[u]=o,St.address_map.addrs[o]=u}return u},lookup_addr:function(o){return St.address_map.names[o]?St.address_map.names[o]:null}};function kj(o,a,u){var l=ln(o);if(!l.daddr)return-53;var d=ku(a,l.family,St.lookup_name(l.daddr),l.dport,u);return 0}function Vj(){return 42}function xj(o,a,u,l,d){var f=ln(o);return a===1&&u===4?(H[l>>2]=f.error,H[d>>2]=4,f.error=null,0):-50}function Pj(o,a,u){return tt.varargs=u,0}function Nj(o,a,u){return 0}function Lj(o,a){return o=tt.getStr(o),tt.doMkdir(o,a)}function qj(o,a,u){tt.varargs=u}function Hj(o,a,u,l,d,f){var h=ln(o),y=h.sock_ops.recvmsg(h,u);if(!y)return 0;if(d)var _=ku(d,h.family,St.lookup_name(y.addr),y.port,f);return zi.set(y.buffer,a),y.buffer.byteLength}function zj(o,a){}function Wj(o){}function Yj(o,a,u,l,d,f){}function Gj(o){return-50}function $j(o,a){return ln(o),-52}function Kj(o,a,u){}function Jj(o,a){}function Xj(o){}function Zj(o,a){Bt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Qj(o,a){Bt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function ew(){Bt("")}var Vu;L?Vu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:Vu=function(){return performance.now()};var tw=!0;function iw(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&tw)u=Vu();else return Dj(28),-1;return H[a>>2]=u/1e3|0,H[a+4>>2]=u%1e3*1e3*1e3|0,0}function rw(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function nw(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function sw(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function ow(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function aw(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function uw(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function cw(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function lw(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function dw(o,a){return globalThis.DUCKDB_RUNTIME.openFile(t,o,a)}function fw(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function hw(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function pw(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function yw(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function _w(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function mw(o,a,u,l){return globalThis.DUCKDB_RUNTIME.callScalarUDF(t,o,a,u,l)}function bw(){return 2147483648}function gw(o,a,u){zi.copyWithin(o,a,a+u)}function vw(o){try{return co.grow(o-Sf.byteLength+65535>>>16),Af(co.buffer),1}catch(a){}}function jw(o){var a=zi.length;o=o>>>0;var u=2147483648;if(o>u)return!1;for(var l=1;l<=4;l*=2){var d=a*(1+.2/l);d=Math.min(d,o+100663296);var f=Math.min(u,W0(Math.max(o,d),65536)),h=vw(f);if(h)return!0}return!1}var xu={};function ww(){return m||"./this.program"}function _s(){if(!_s.strings){var o=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:o,_:ww()};for(var u in xu)xu[u]===void 0?delete a[u]:a[u]=xu[u];var l=[];for(var u in a)l.push(u+"="+a[u]);_s.strings=l}return _s.strings}function Bw(o,a){var u=0;return _s().forEach(function(l,d){var f=a+u;H[o+d*4>>2]=f,z0(l,f),u+=l.length+1}),0}function Iw(o,a){var u=_s();H[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),H[a>>2]=l,0}function Sw(o){return 0}function Tw(o,a){var u=o==1||o==2?2:Bt();return ti[a>>0]=u,0}function Aw(o,a,u,l,d,f){var h=tt.getStreamFromFD(o),y=tt.doReadv(h,a,u,l);return H[f>>2]=y,0}function Fw(o,a,u,l,d,f){var h=tt.getStreamFromFD(o),y=tt.doWritev(h,a,u,l);return H[f>>2]=y,0}function Dw(o,a,u,l){var d=tt.getStreamFromFD(o),f=tt.doReadv(d,a,u);return H[l>>2]=f,0}function Ow(o,a,u,l,d){}function Mw(o){var a=tt.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function Cw(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=H[a+f*8>>2],y=H[a+(f*8+4)>>2],_=0;_<y;_++)tt.printChar(o,zi[h+_]);d+=y}return H[l>>2]=d,0}function Uw(){return P0()}function Ew(o,a,u,l){var d=0,f=0,h=0,y=0,_=0,b=0,g;function w(A,M,x,Z,fe,Ee){var U,J,ve,me;return J=A===10?28:16,fe=A===10?Rf(fe):Eu(fe),U=bs(J),me=ku(U,A,fe,Ee),fo(!me),ve=bs(32),H[ve+4>>2]=A,H[ve+8>>2]=M,H[ve+12>>2]=x,H[ve+24>>2]=Z,H[ve+20>>2]=U,A===10?H[ve+16>>2]=28:H[ve+16>>2]=16,H[ve+28>>2]=0,ve}if(u&&(h=H[u>>2],y=H[u+4>>2],_=H[u+8>>2],b=H[u+12>>2]),_&&!b&&(b=_===2?17:6),!_&&b&&(_=b===17?2:1),b===0&&(b=6),_===0&&(_=1),!o&&!a)return-2;if(h&~(1|2|4|1024|8|16|32)||u!==0&&H[u>>2]&2&&!o)return-1;if(h&32)return-2;if(_!==0&&_!==1&&_!==2)return-7;if(y!==0&&y!==2&&y!==10)return-6;if(a&&(a=un(a),f=parseInt(a,10),isNaN(f)))return h&1024?-2:-8;if(!o)return y===0&&(y=2),(h&1)===0&&(y===2?d=Bo(2130706433):d=[0,0,0,1]),g=w(y,_,b,null,d,f),H[l>>2]=g,0;if(o=un(o),d=_o(o),d!==null)if(y===0||y===2)y=2;else if(y===10&&h&8)d=[0,0,Bo(65535),d],y=10;else return-2;else if(d=Ru(o),d!==null)if(y===0||y===10)y=10;else return-2;return d!=null?(g=w(y,_,b,o,d,f),H[l>>2]=g,0):h&4?-2:(o=St.lookup_name(o),d=_o(o),y===0?y=2:y===10&&(d=[0,0,Bo(65535),d]),g=w(y,_,b,null,d,f),H[l>>2]=g,0)}function Rw(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(L)try{var a=cA("crypto");return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){Bt("randomDevice")}}function bo(o,a){bo.randomDevice||(bo.randomDevice=Rw());for(var u=0;u<a;u++)ti[o+u>>0]=bo.randomDevice();return 0}function kw(o,a,u,l,d,f,h){var y=kf(o,a);if(y.errno)return-6;var _=y.port,b=y.addr,g=!1;if(u&&l){var w;if(h&1||!(w=St.lookup_addr(b))){if(h&8)return-2}else b=w;var A=Mu(b,u,l);A+1>=l&&(g=!0)}if(d&&f){_=""+_;var A=Mu(_,d,f);A+1>=f&&(g=!0)}return g?-12:0}function Vw(o){return o}function xw(o){st(o)}function go(o){return o%4===0&&(o%100!==0||o%400===0)}function Pu(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var vo=[31,29,31,30,31,30,31,31,30,31,30,31],jo=[31,28,31,30,31,30,31,31,30,31,30,31];function wo(o,a){for(var u=new Date(o.getTime());a>0;){var l=go(u.getFullYear()),d=u.getMonth(),f=(l?vo:jo)[d];if(a>f-u.getDate())a-=f-u.getDate()+1,u.setDate(1),d<11?u.setMonth(d+1):(u.setMonth(0),u.setFullYear(u.getFullYear()+1));else return u.setDate(u.getDate()+a),u}return u}function Pw(o,a,u,l){var d=H[l+40>>2],f={tm_sec:H[l>>2],tm_min:H[l+4>>2],tm_hour:H[l+8>>2],tm_mday:H[l+12>>2],tm_mon:H[l+16>>2],tm_year:H[l+20>>2],tm_wday:H[l+24>>2],tm_yday:H[l+28>>2],tm_isdst:H[l+32>>2],tm_gmtoff:H[l+36>>2],tm_zone:d?un(d):""},h=un(u),y={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var _ in y)h=h.replace(new RegExp(_,"g"),y[_]);var b=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"];function w(U,J,ve){for(var me=typeof U=="number"?U.toString():U||"";me.length<J;)me=ve[0]+me;return me}function A(U,J){return w(U,J,"0")}function M(U,J){function ve(ht){return ht<0?-1:ht>0?1:0}var me;return(me=ve(U.getFullYear()-J.getFullYear()))===0&&(me=ve(U.getMonth()-J.getMonth()))===0&&(me=ve(U.getDate()-J.getDate())),me}function x(U){switch(U.getDay()){case 0:return new Date(U.getFullYear()-1,11,29);case 1:return U;case 2:return new Date(U.getFullYear(),0,3);case 3:return new Date(U.getFullYear(),0,2);case 4:return new Date(U.getFullYear(),0,1);case 5:return new Date(U.getFullYear()-1,11,31);case 6:return new Date(U.getFullYear()-1,11,30)}}function Z(U){var J=wo(new Date(U.tm_year+1900,0,1),U.tm_yday),ve=new Date(J.getFullYear(),0,4),me=new Date(J.getFullYear()+1,0,4),ht=x(ve),Wi=x(me);return M(ht,J)<=0?M(Wi,J)<=0?J.getFullYear()+1:J.getFullYear():J.getFullYear()-1}var fe={"%a":function(U){return b[U.tm_wday].substring(0,3)},"%A":function(U){return b[U.tm_wday]},"%b":function(U){return g[U.tm_mon].substring(0,3)},"%B":function(U){return g[U.tm_mon]},"%C":function(U){var J=U.tm_year+1900;return A(J/100|0,2)},"%d":function(U){return A(U.tm_mday,2)},"%e":function(U){return w(U.tm_mday,2," ")},"%g":function(U){return Z(U).toString().substring(2)},"%G":function(U){return Z(U)},"%H":function(U){return A(U.tm_hour,2)},"%I":function(U){var J=U.tm_hour;return J==0?J=12:J>12&&(J-=12),A(J,2)},"%j":function(U){return A(U.tm_mday+Pu(go(U.tm_year+1900)?vo:jo,U.tm_mon-1),3)},"%m":function(U){return A(U.tm_mon+1,2)},"%M":function(U){return A(U.tm_min,2)},"%n":function(){return`
|
|
18
|
+
`},"%p":function(U){return U.tm_hour>=0&&U.tm_hour<12?"AM":"PM"},"%S":function(U){return A(U.tm_sec,2)},"%t":function(){return" "},"%u":function(U){return U.tm_wday||7},"%U":function(U){var J=new Date(U.tm_year+1900,0,1),ve=J.getDay()===0?J:wo(J,7-J.getDay()),me=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(M(ve,me)<0){var ht=Pu(go(me.getFullYear())?vo:jo,me.getMonth()-1)-31,Wi=31-ve.getDate(),Rr=Wi+ht+me.getDate();return A(Math.ceil(Rr/7),2)}return M(ve,J)===0?"01":"00"},"%V":function(U){var J=new Date(U.tm_year+1900,0,4),ve=new Date(U.tm_year+1901,0,4),me=x(J),ht=x(ve),Wi=wo(new Date(U.tm_year+1900,0,1),U.tm_yday);if(M(Wi,me)<0)return"53";if(M(ht,Wi)<=0)return"01";var Rr;return me.getFullYear()<U.tm_year+1900?Rr=U.tm_yday+32-me.getDate():Rr=U.tm_yday+1-me.getDate(),A(Math.ceil(Rr/7),2)},"%w":function(U){return U.tm_wday},"%W":function(U){var J=new Date(U.tm_year,0,1),ve=J.getDay()===1?J:wo(J,J.getDay()===0?1:7-J.getDay()+1),me=new Date(U.tm_year+1900,U.tm_mon,U.tm_mday);if(M(ve,me)<0){var ht=Pu(go(me.getFullYear())?vo:jo,me.getMonth()-1)-31,Wi=31-ve.getDate(),Rr=Wi+ht+me.getDate();return A(Math.ceil(Rr/7),2)}return M(ve,J)===0?"01":"00"},"%y":function(U){return(U.tm_year+1900).toString().substring(2)},"%Y":function(U){return U.tm_year+1900},"%z":function(U){var J=U.tm_gmtoff,ve=J>=0;return J=Math.abs(J)/60,J=J/60*100+J%60,(ve?"+":"-")+String("0000"+J).slice(-4)},"%Z":function(U){return U.tm_zone},"%%":function(){return"%"}};for(var _ in fe)h.includes(_)&&(h=h.replace(new RegExp(_,"g"),fe[_](f)));var Ee=Lw(h,!1);return Ee.length>a?0:(If(Ee,o),Ee.length-1)}function Nw(o,a,u,l){return Pw(o,a,u,l)}function Lw(o,a,u){var l=u>0?u:H0(o)+1,d=new Array(l),f=Bf(o,d,0,d.length);return a&&(d.length=f),d}var qw={j:hj,A:yj,F:mj,b:gj,n:vj,H:jj,V:wj,i:Uf,da:Bj,u:Ij,E:Sj,e:bj,Ga:Tj,xa:Aj,Ia:Oj,Ha:Mj,N:Cj,za:Uj,ya:Ej,Re:Rj,Ca:kj,ua:Vj,Fa:xj,Sa:Pj,Ne:Nj,Se:Lj,oa:qj,Da:Hj,Pe:zj,va:Wj,Ea:Yj,Ja:Gj,La:$j,ia:Kj,fa:Jj,wa:Xj,Na:Zj,Ma:Qj,ca:ew,ma:iw,Ge:rw,He:nw,Ee:sw,Fe:ow,sa:aw,Ce:uw,Je:cw,De:lw,Ke:dw,ea:fw,Ie:hw,ta:pw,Be:yw,ra:_w,Le:mw,Ta:bw,kb:gw,gd:jw,Va:Bw,Wa:Iw,T:Sw,Ra:Tw,ob:Aw,nb:Fw,na:Dw,Ud:Ow,Qe:Mw,ba:Cw,a:Uw,Ka:Ew,Aa:bo,Ba:kw,ja:b1,L:o1,Qa:p1,S:xB,zc:TS,ka:m1,W:u1,qa:VB,Ac:SS,s:KB,Oa:v1,Pb:HB,Y:t1,Pa:g1,_b:qB,d:OB,_:B1,C:i1,Gb:mT,c:MB,X:a1,ga:S1,h:UB,Eb:gT,l:kB,pa:l1,o:EB,v:GB,z:$B,R:YB,x:JB,w:ZB,p:h1,M:w1,J:j1,bc:JS,ec:GS,hc:zS,oc:VS,cc:KS,Fb:bT,yc:AS,fc:YS,pc:kS,Mb:dT,xe:M1,Sd:cI,Ld:_I,ke:z1,Sb:oT,jd:zI,Jb:pT,Ib:yT,ae:eI,Rd:lI,wb:AT,Yc:iS,$d:tI,Fc:jS,Tb:sT,Hb:_T,se:k1,Yd:nI,Bc:IS,Md:yI,wd:MI,Jd:bI,ib:xT,Zd:rI,mc:PS,Wd:oI,id:WI,db:HT,Lb:fT,ld:qI,de:X1,be:Q1,$a:GT,ub:DT,Nd:pI,eb:qT,Db:vT,Xd:sI,Fd:wI,Id:gI,Hd:vI,Gd:jI,Cd:SI,lc:NS,Zb:QS,qe:x1,ie:Y1,qc:RS,he:G1,Td:uI,tc:CS,sc:US,oe:N1,je:W1,Qd:dI,Ae:F1,rd:kI,rc:ES,dc:$S,Gc:vS,vc:OS,Vc:sS,tb:OT,Cc:BS,xc:FS,td:EI,nd:NI,Nc:hS,wc:DS,xb:TT,$b:ZS,pd:xI,dd:KI,Qc:lS,Pc:dS,Mc:pS,Oc:fS,ud:UI,ad:ZI,Kb:hT,jc:qS,lb:kT,_c:eS,uc:MS,Ab:BT,Wb:iT,Bb:wT,Ub:nT,t:FB,k:CB,B:s1,$:f1,qb:UT,D:n1,aa:d1,rb:CT,f:DB,U:NB,Q:r1,Dc:PB,g:LB,m:RB,Oe:T1,q:WB,r:zB,ha:I1,y:XB,O:c1,P:_1,K:QB,Me:A1,la:y1,Z:e1,Ed:BI,pb:ET,kd:HI,ac:XS,Ec:wS,nc:xS,Nb:lT,gb:NT,ve:U1,_d:iI,vb:FT,bb:WT,Ad:AI,Bd:TI,Xb:tT,xd:OI,Qb:uT,Ob:cT,Rc:cS,ue:E1,yd:DI,Dd:II,Xc:rS,Jc:mS,yb:ST,zb:IT,fb:LT,ne:L1,vd:CI,Rb:aT,Hc:gS,Uc:oS,te:R1,cb:zT,ye:O1,fe:K1,ge:$1,Kd:mI,ab:YT,cd:JI,Lc:yS,Kc:_S,bd:XI,Zc:tS,od:PI,hb:PT,hd:YI,_a:$T,Ic:bS,jb:VT,ze:D1,Vd:aI,ed:$I,Sc:uS,le:H1,gc:WS,we:C1,pe:P1,fd:GI,Pd:fI,Od:hI,$c:QI,sb:MT,md:LI,kc:LS,re:V1,Za:KT,Tc:aS,mb:RT,ee:J1,Wc:nS,Xa:XT,Ya:JT,ic:HS,me:q1,sd:RI,ce:Z1,Vb:rT,Yb:eT,Cb:jT,zd:FI,qd:VI,I:Vw,G:xw,Ua:Nw},uE=dj(),Hw=t.___wasm_call_ctors=function(){return(Hw=t.___wasm_call_ctors=t.asm.Ue).apply(null,arguments)},zw=t._main=function(){return(zw=t._main=t.asm.Ve).apply(null,arguments)},Ww=t._duckdb_web_fs_glob_add_path=function(){return(Ww=t._duckdb_web_fs_glob_add_path=t.asm.Xe).apply(null,arguments)},Yw=t._duckdb_web_clear_response=function(){return(Yw=t._duckdb_web_clear_response=t.asm.Ye).apply(null,arguments)},Gw=t._duckdb_web_fail_with=function(){return(Gw=t._duckdb_web_fail_with=t.asm.Ze).apply(null,arguments)},$w=t._duckdb_web_reset=function(){return($w=t._duckdb_web_reset=t.asm._e).apply(null,arguments)},Kw=t._duckdb_web_connect=function(){return(Kw=t._duckdb_web_connect=t.asm.$e).apply(null,arguments)},Jw=t._duckdb_web_disconnect=function(){return(Jw=t._duckdb_web_disconnect=t.asm.af).apply(null,arguments)},Xw=t._duckdb_web_flush_files=function(){return(Xw=t._duckdb_web_flush_files=t.asm.bf).apply(null,arguments)},Zw=t._duckdb_web_flush_file=function(){return(Zw=t._duckdb_web_flush_file=t.asm.cf).apply(null,arguments)},Qw=t._duckdb_web_open=function(){return(Qw=t._duckdb_web_open=t.asm.df).apply(null,arguments)},eB=t._duckdb_web_get_global_file_info=function(){return(eB=t._duckdb_web_get_global_file_info=t.asm.ef).apply(null,arguments)},tB=t._duckdb_web_collect_file_stats=function(){return(tB=t._duckdb_web_collect_file_stats=t.asm.ff).apply(null,arguments)},iB=t._duckdb_web_export_file_stats=function(){return(iB=t._duckdb_web_export_file_stats=t.asm.gf).apply(null,arguments)},rB=t._duckdb_web_fs_drop_file=function(){return(rB=t._duckdb_web_fs_drop_file=t.asm.hf).apply(null,arguments)},nB=t._duckdb_web_fs_drop_files=function(){return(nB=t._duckdb_web_fs_drop_files=t.asm.jf).apply(null,arguments)},sB=t._duckdb_web_fs_glob_file_infos=function(){return(sB=t._duckdb_web_fs_glob_file_infos=t.asm.kf).apply(null,arguments)},oB=t._duckdb_web_fs_get_file_info_by_id=function(){return(oB=t._duckdb_web_fs_get_file_info_by_id=t.asm.lf).apply(null,arguments)},aB=t._duckdb_web_fs_get_file_info_by_name=function(){return(aB=t._duckdb_web_fs_get_file_info_by_name=t.asm.mf).apply(null,arguments)},uB=t._duckdb_web_fs_set_file_descriptor=function(){return(uB=t._duckdb_web_fs_set_file_descriptor=t.asm.nf).apply(null,arguments)},cB=t._duckdb_web_fs_register_file_url=function(){return(cB=t._duckdb_web_fs_register_file_url=t.asm.of).apply(null,arguments)},lB=t._duckdb_web_fs_register_file_buffer=function(){return(lB=t._duckdb_web_fs_register_file_buffer=t.asm.pf).apply(null,arguments)},dB=t._duckdb_web_copy_file_to_buffer=function(){return(dB=t._duckdb_web_copy_file_to_buffer=t.asm.qf).apply(null,arguments)},fB=t._duckdb_web_copy_file_to_path=function(){return(fB=t._duckdb_web_copy_file_to_path=t.asm.rf).apply(null,arguments)},hB=t._duckdb_web_get_version=function(){return(hB=t._duckdb_web_get_version=t.asm.sf).apply(null,arguments)},pB=t._duckdb_web_get_feature_flags=function(){return(pB=t._duckdb_web_get_feature_flags=t.asm.tf).apply(null,arguments)},yB=t._duckdb_web_tokenize=function(){return(yB=t._duckdb_web_tokenize=t.asm.uf).apply(null,arguments)},_B=t._duckdb_web_udf_scalar_create=function(){return(_B=t._duckdb_web_udf_scalar_create=t.asm.vf).apply(null,arguments)},mB=t._duckdb_web_prepared_create=function(){return(mB=t._duckdb_web_prepared_create=t.asm.wf).apply(null,arguments)},bB=t._duckdb_web_prepared_close=function(){return(bB=t._duckdb_web_prepared_close=t.asm.xf).apply(null,arguments)},gB=t._duckdb_web_prepared_run=function(){return(gB=t._duckdb_web_prepared_run=t.asm.yf).apply(null,arguments)},vB=t._duckdb_web_prepared_send=function(){return(vB=t._duckdb_web_prepared_send=t.asm.zf).apply(null,arguments)},jB=t._duckdb_web_query_run=function(){return(jB=t._duckdb_web_query_run=t.asm.Af).apply(null,arguments)},wB=t._duckdb_web_query_send=function(){return(wB=t._duckdb_web_query_send=t.asm.Bf).apply(null,arguments)},BB=t._duckdb_web_query_fetch_results=function(){return(BB=t._duckdb_web_query_fetch_results=t.asm.Cf).apply(null,arguments)},IB=t._duckdb_web_get_tablenames=function(){return(IB=t._duckdb_web_get_tablenames=t.asm.Df).apply(null,arguments)},SB=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(SB=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.Ef).apply(null,arguments)},TB=t._duckdb_web_insert_csv_from_path=function(){return(TB=t._duckdb_web_insert_csv_from_path=t.asm.Ff).apply(null,arguments)},AB=t._duckdb_web_insert_json_from_path=function(){return(AB=t._duckdb_web_insert_json_from_path=t.asm.Gf).apply(null,arguments)},Pf=t.___errno_location=function(){return(Pf=t.___errno_location=t.asm.Hf).apply(null,arguments)},Bo=t._htonl=function(){return(Bo=t._htonl=t.asm.If).apply(null,arguments)},Nu=t._ntohs=function(){return(Nu=t._ntohs=t.asm.Jf).apply(null,arguments)},Io=t._htons=function(){return(Io=t._htons=t.asm.Kf).apply(null,arguments)},B=t.stackSave=function(){return(B=t.stackSave=t.asm.Lf).apply(null,arguments)},I=t.stackRestore=function(){return(I=t.stackRestore=t.asm.Mf).apply(null,arguments)},Lu=t.stackAlloc=function(){return(Lu=t.stackAlloc=t.asm.Nf).apply(null,arguments)},S=t._setThrew=function(){return(S=t._setThrew=t.asm.Of).apply(null,arguments)},ms=t.___cxa_can_catch=function(){return(ms=t.___cxa_can_catch=t.asm.Pf).apply(null,arguments)},Nf=t.___cxa_is_pointer_type=function(){return(Nf=t.___cxa_is_pointer_type=t.asm.Qf).apply(null,arguments)},bs=t._malloc=function(){return(bs=t._malloc=t.asm.Rf).apply(null,arguments)},qu=t._free=function(){return(qu=t._free=t.asm.Sf).apply(null,arguments)},Lf=t.dynCall_viiij=function(){return(Lf=t.dynCall_viiij=t.asm.Tf).apply(null,arguments)},qf=t.dynCall_viiijjj=function(){return(qf=t.dynCall_viiijjj=t.asm.Uf).apply(null,arguments)},Hf=t.dynCall_iiij=function(){return(Hf=t.dynCall_iiij=t.asm.Vf).apply(null,arguments)},zf=t.dynCall_vijijj=function(){return(zf=t.dynCall_vijijj=t.asm.Wf).apply(null,arguments)},Wf=t.dynCall_iji=function(){return(Wf=t.dynCall_iji=t.asm.Xf).apply(null,arguments)},Yf=t.dynCall_viji=function(){return(Yf=t.dynCall_viji=t.asm.Yf).apply(null,arguments)},Gf=t.dynCall_vij=function(){return(Gf=t.dynCall_vij=t.asm.Zf).apply(null,arguments)},$f=t.dynCall_viijj=function(){return($f=t.dynCall_viijj=t.asm._f).apply(null,arguments)},Kf=t.dynCall_ji=function(){return(Kf=t.dynCall_ji=t.asm.$f).apply(null,arguments)},Jf=t.dynCall_viiijj=function(){return(Jf=t.dynCall_viiijj=t.asm.ag).apply(null,arguments)},Xf=t.dynCall_vijjj=function(){return(Xf=t.dynCall_vijjj=t.asm.bg).apply(null,arguments)},Zf=t.dynCall_viiiij=function(){return(Zf=t.dynCall_viiiij=t.asm.cg).apply(null,arguments)},Qf=t.dynCall_jii=function(){return(Qf=t.dynCall_jii=t.asm.dg).apply(null,arguments)},eh=t.dynCall_jiiii=function(){return(eh=t.dynCall_jiiii=t.asm.eg).apply(null,arguments)},th=t.dynCall_iiiiij=function(){return(th=t.dynCall_iiiiij=t.asm.fg).apply(null,arguments)},ih=t.dynCall_iiiiijj=function(){return(ih=t.dynCall_iiiiijj=t.asm.gg).apply(null,arguments)},rh=t.dynCall_iij=function(){return(rh=t.dynCall_iij=t.asm.hg).apply(null,arguments)},nh=t.dynCall_viijii=function(){return(nh=t.dynCall_viijii=t.asm.ig).apply(null,arguments)},sh=t.dynCall_viiji=function(){return(sh=t.dynCall_viiji=t.asm.jg).apply(null,arguments)},oh=t.dynCall_vijj=function(){return(oh=t.dynCall_vijj=t.asm.kg).apply(null,arguments)},ah=t.dynCall_viij=function(){return(ah=t.dynCall_viij=t.asm.lg).apply(null,arguments)},uh=t.dynCall_vj=function(){return(uh=t.dynCall_vj=t.asm.mg).apply(null,arguments)},ch=t.dynCall_iiji=function(){return(ch=t.dynCall_iiji=t.asm.ng).apply(null,arguments)},lh=t.dynCall_iiiij=function(){return(lh=t.dynCall_iiiij=t.asm.og).apply(null,arguments)},dh=t.dynCall_iiiiiji=function(){return(dh=t.dynCall_iiiiiji=t.asm.pg).apply(null,arguments)},fh=t.dynCall_iiiji=function(){return(fh=t.dynCall_iiiji=t.asm.qg).apply(null,arguments)},hh=t.dynCall_iiiiji=function(){return(hh=t.dynCall_iiiiji=t.asm.rg).apply(null,arguments)},ph=t.dynCall_jiii=function(){return(ph=t.dynCall_jiii=t.asm.sg).apply(null,arguments)},yh=t.dynCall_jij=function(){return(yh=t.dynCall_jij=t.asm.tg).apply(null,arguments)},_h=t.dynCall_j=function(){return(_h=t.dynCall_j=t.asm.ug).apply(null,arguments)},mh=t.dynCall_viijij=function(){return(mh=t.dynCall_viijij=t.asm.vg).apply(null,arguments)},bh=t.dynCall_iijjijj=function(){return(bh=t.dynCall_iijjijj=t.asm.wg).apply(null,arguments)},gh=t.dynCall_viiiijiiiii=function(){return(gh=t.dynCall_viiiijiiiii=t.asm.xg).apply(null,arguments)},vh=t.dynCall_viiiijiiii=function(){return(vh=t.dynCall_viiiijiiii=t.asm.yg).apply(null,arguments)},jh=t.dynCall_viiijii=function(){return(jh=t.dynCall_viiijii=t.asm.zg).apply(null,arguments)},wh=t.dynCall_viiiiiij=function(){return(wh=t.dynCall_viiiiiij=t.asm.Ag).apply(null,arguments)},Bh=t.dynCall_iiijiii=function(){return(Bh=t.dynCall_iiijiii=t.asm.Bg).apply(null,arguments)},Ih=t.dynCall_iiiiijii=function(){return(Ih=t.dynCall_iiiiijii=t.asm.Cg).apply(null,arguments)},Sh=t.dynCall_viijiii=function(){return(Sh=t.dynCall_viijiii=t.asm.Dg).apply(null,arguments)},Th=t.dynCall_iiijiij=function(){return(Th=t.dynCall_iiijiij=t.asm.Eg).apply(null,arguments)},Ah=t.dynCall_vijiii=function(){return(Ah=t.dynCall_vijiii=t.asm.Fg).apply(null,arguments)},Fh=t.dynCall_iijjii=function(){return(Fh=t.dynCall_iijjii=t.asm.Gg).apply(null,arguments)},Dh=t.dynCall_iijjiii=function(){return(Dh=t.dynCall_iijjiii=t.asm.Hg).apply(null,arguments)},Oh=t.dynCall_iijjiiii=function(){return(Oh=t.dynCall_iijjiiii=t.asm.Ig).apply(null,arguments)},Mh=t.dynCall_iijji=function(){return(Mh=t.dynCall_iijji=t.asm.Jg).apply(null,arguments)},Ch=t.dynCall_vijiiii=function(){return(Ch=t.dynCall_vijiiii=t.asm.Kg).apply(null,arguments)},Uh=t.dynCall_iijiiii=function(){return(Uh=t.dynCall_iijiiii=t.asm.Lg).apply(null,arguments)},Eh=t.dynCall_vijij=function(){return(Eh=t.dynCall_vijij=t.asm.Mg).apply(null,arguments)},Rh=t.dynCall_iiijjjj=function(){return(Rh=t.dynCall_iiijjjj=t.asm.Ng).apply(null,arguments)},kh=t.dynCall_iiijiiii=function(){return(kh=t.dynCall_iiijiiii=t.asm.Og).apply(null,arguments)},Vh=t.dynCall_jiiij=function(){return(Vh=t.dynCall_jiiij=t.asm.Pg).apply(null,arguments)},xh=t.dynCall_jiiiii=function(){return(xh=t.dynCall_jiiiii=t.asm.Qg).apply(null,arguments)},Ph=t.dynCall_iiiiijjiijj=function(){return(Ph=t.dynCall_iiiiijjiijj=t.asm.Rg).apply(null,arguments)},Nh=t.dynCall_viijiiji=function(){return(Nh=t.dynCall_viijiiji=t.asm.Sg).apply(null,arguments)},Lh=t.dynCall_vjjijij=function(){return(Lh=t.dynCall_vjjijij=t.asm.Tg).apply(null,arguments)},qh=t.dynCall_vijjji=function(){return(qh=t.dynCall_vijjji=t.asm.Ug).apply(null,arguments)},Hh=t.dynCall_vjjii=function(){return(Hh=t.dynCall_vjjii=t.asm.Vg).apply(null,arguments)},zh=t.dynCall_viiiiiji=function(){return(zh=t.dynCall_viiiiiji=t.asm.Wg).apply(null,arguments)},Wh=t.dynCall_jiiiji=function(){return(Wh=t.dynCall_jiiiji=t.asm.Xg).apply(null,arguments)},Yh=t.dynCall_iijj=function(){return(Yh=t.dynCall_iijj=t.asm.Yg).apply(null,arguments)},Gh=t.dynCall_iiijjii=function(){return(Gh=t.dynCall_iiijjii=t.asm.Zg).apply(null,arguments)},$h=t.dynCall_vijii=function(){return($h=t.dynCall_vijii=t.asm._g).apply(null,arguments)},Kh=t.dynCall_viijjii=function(){return(Kh=t.dynCall_viijjii=t.asm.$g).apply(null,arguments)},Jh=t.dynCall_viiiijj=function(){return(Jh=t.dynCall_viiiijj=t.asm.ah).apply(null,arguments)},Xh=t.dynCall_jijjij=function(){return(Xh=t.dynCall_jijjij=t.asm.bh).apply(null,arguments)},Zh=t.dynCall_jiijii=function(){return(Zh=t.dynCall_jiijii=t.asm.ch).apply(null,arguments)},Qh=t.dynCall_jijiii=function(){return(Qh=t.dynCall_jijiii=t.asm.dh).apply(null,arguments)},ep=t.dynCall_viijiiiii=function(){return(ep=t.dynCall_viijiiiii=t.asm.eh).apply(null,arguments)},tp=t.dynCall_viijiiij=function(){return(tp=t.dynCall_viijiiij=t.asm.fh).apply(null,arguments)},ip=t.dynCall_vijiiiji=function(){return(ip=t.dynCall_vijiiiji=t.asm.gh).apply(null,arguments)},rp=t.dynCall_jiiji=function(){return(rp=t.dynCall_jiiji=t.asm.hh).apply(null,arguments)},np=t.dynCall_viiijij=function(){return(np=t.dynCall_viiijij=t.asm.ih).apply(null,arguments)},sp=t.dynCall_viijiij=function(){return(sp=t.dynCall_viijiij=t.asm.jh).apply(null,arguments)},op=t.dynCall_viiiiijj=function(){return(op=t.dynCall_viiiiijj=t.asm.kh).apply(null,arguments)},ap=t.dynCall_viiijji=function(){return(ap=t.dynCall_viiijji=t.asm.lh).apply(null,arguments)},up=t.dynCall_viiiji=function(){return(up=t.dynCall_viiiji=t.asm.mh).apply(null,arguments)},cp=t.dynCall_iiiijiii=function(){return(cp=t.dynCall_iiiijiii=t.asm.nh).apply(null,arguments)},lp=t.dynCall_iiijij=function(){return(lp=t.dynCall_iiijij=t.asm.oh).apply(null,arguments)},dp=t.dynCall_iiijji=function(){return(dp=t.dynCall_iiijji=t.asm.ph).apply(null,arguments)},fp=t.dynCall_viijji=function(){return(fp=t.dynCall_viijji=t.asm.qh).apply(null,arguments)},hp=t.dynCall_iiiijj=function(){return(hp=t.dynCall_iiiijj=t.asm.rh).apply(null,arguments)},pp=t.dynCall_viiijiii=function(){return(pp=t.dynCall_viiijiii=t.asm.sh).apply(null,arguments)},yp=t.dynCall_vijji=function(){return(yp=t.dynCall_vijji=t.asm.th).apply(null,arguments)},_p=t.dynCall_jiiiij=function(){return(_p=t.dynCall_jiiiij=t.asm.uh).apply(null,arguments)},mp=t.dynCall_jiijiiiii=function(){return(mp=t.dynCall_jiijiiiii=t.asm.vh).apply(null,arguments)},bp=t.dynCall_jiijiijiii=function(){return(bp=t.dynCall_jiijiijiii=t.asm.wh).apply(null,arguments)},gp=t.dynCall_jiijjiii=function(){return(gp=t.dynCall_jiijjiii=t.asm.xh).apply(null,arguments)},vp=t.dynCall_jiiijii=function(){return(vp=t.dynCall_jiiijii=t.asm.yh).apply(null,arguments)},jp=t.dynCall_jiijijii=function(){return(jp=t.dynCall_jiijijii=t.asm.zh).apply(null,arguments)},wp=t.dynCall_viiijjij=function(){return(wp=t.dynCall_viiijjij=t.asm.Ah).apply(null,arguments)},Bp=t.dynCall_vijijjiij=function(){return(Bp=t.dynCall_vijijjiij=t.asm.Bh).apply(null,arguments)},Ip=t.dynCall_viijjij=function(){return(Ip=t.dynCall_viijjij=t.asm.Ch).apply(null,arguments)},Sp=t.dynCall_viiijjiij=function(){return(Sp=t.dynCall_viiijjiij=t.asm.Dh).apply(null,arguments)},Tp=t.dynCall_viiiijjjj=function(){return(Tp=t.dynCall_viiiijjjj=t.asm.Eh).apply(null,arguments)},Ap=t.dynCall_viijiiiiij=function(){return(Ap=t.dynCall_viijiiiiij=t.asm.Fh).apply(null,arguments)},Fp=t.dynCall_viijiiiijj=function(){return(Fp=t.dynCall_viijiiiijj=t.asm.Gh).apply(null,arguments)},Dp=t.dynCall_viiijiiiijjj=function(){return(Dp=t.dynCall_viiijiiiijjj=t.asm.Hh).apply(null,arguments)},Op=t.dynCall_viijijiiiijjj=function(){return(Op=t.dynCall_viijijiiiijjj=t.asm.Ih).apply(null,arguments)},Mp=t.dynCall_viiiiijiiii=function(){return(Mp=t.dynCall_viiiiijiiii=t.asm.Jh).apply(null,arguments)},Cp=t.dynCall_iiijii=function(){return(Cp=t.dynCall_iiijii=t.asm.Kh).apply(null,arguments)},Up=t.dynCall_fiijii=function(){return(Up=t.dynCall_fiijii=t.asm.Lh).apply(null,arguments)},Ep=t.dynCall_diijii=function(){return(Ep=t.dynCall_diijii=t.asm.Mh).apply(null,arguments)},Rp=t.dynCall_iiiiiiijii=function(){return(Rp=t.dynCall_iiiiiiijii=t.asm.Nh).apply(null,arguments)},kp=t.dynCall_viiiiji=function(){return(kp=t.dynCall_viiiiji=t.asm.Oh).apply(null,arguments)},Vp=t.dynCall_jiiiijii=function(){return(Vp=t.dynCall_jiiiijii=t.asm.Ph).apply(null,arguments)},xp=t.dynCall_jiiiijiiiiiiii=function(){return(xp=t.dynCall_jiiiijiiiiiiii=t.asm.Qh).apply(null,arguments)},Pp=t.dynCall_jiiijiii=function(){return(Pp=t.dynCall_jiiijiii=t.asm.Rh).apply(null,arguments)},Np=t.dynCall_jiiiiijiiii=function(){return(Np=t.dynCall_jiiiiijiiii=t.asm.Sh).apply(null,arguments)},Lp=t.dynCall_jj=function(){return(Lp=t.dynCall_jj=t.asm.Th).apply(null,arguments)},qp=t.dynCall_jd=function(){return(qp=t.dynCall_jd=t.asm.Uh).apply(null,arguments)},Hp=t.dynCall_jf=function(){return(Hp=t.dynCall_jf=t.asm.Vh).apply(null,arguments)},zp=t.dynCall_iijjj=function(){return(zp=t.dynCall_iijjj=t.asm.Wh).apply(null,arguments)},Wp=t.dynCall_iiijj=function(){return(Wp=t.dynCall_iiijj=t.asm.Xh).apply(null,arguments)},Yp=t.dynCall_vijijiiiijjj=function(){return(Yp=t.dynCall_vijijiiiijjj=t.asm.Yh).apply(null,arguments)},Gp=t.dynCall_iiiiiiji=function(){return(Gp=t.dynCall_iiiiiiji=t.asm.Zh).apply(null,arguments)},$p=t.dynCall_iiiiiiiiji=function(){return($p=t.dynCall_iiiiiiiiji=t.asm._h).apply(null,arguments)},Kp=t.dynCall_jijijjij=function(){return(Kp=t.dynCall_jijijjij=t.asm.$h).apply(null,arguments)},Jp=t.dynCall_viijjj=function(){return(Jp=t.dynCall_viijjj=t.asm.ai).apply(null,arguments)},Xp=t.dynCall_vijjij=function(){return(Xp=t.dynCall_vijjij=t.asm.bi).apply(null,arguments)},Zp=t.dynCall_viijjji=function(){return(Zp=t.dynCall_viijjji=t.asm.ci).apply(null,arguments)},Qp=t.dynCall_iiiiiij=function(){return(Qp=t.dynCall_iiiiiij=t.asm.di).apply(null,arguments)},ey=t.dynCall_iiiiiiiiiiji=function(){return(ey=t.dynCall_iiiiiiiiiiji=t.asm.ei).apply(null,arguments)},ty=t.dynCall_jiiiiiii=function(){return(ty=t.dynCall_jiiiiiii=t.asm.fi).apply(null,arguments)},iy=t.dynCall_jijj=function(){return(iy=t.dynCall_jijj=t.asm.gi).apply(null,arguments)},ry=t.dynCall_viiiijiiiiiiii=function(){return(ry=t.dynCall_viiiijiiiiiiii=t.asm.hi).apply(null,arguments)},ny=t.dynCall_ij=function(){return(ny=t.dynCall_ij=t.asm.ii).apply(null,arguments)},sy=t.dynCall_jjj=function(){return(sy=t.dynCall_jjj=t.asm.ji).apply(null,arguments)},oy=t.dynCall_vjii=function(){return(oy=t.dynCall_vjii=t.asm.ki).apply(null,arguments)},ay=t.dynCall_jjjjjjd=function(){return(ay=t.dynCall_jjjjjjd=t.asm.li).apply(null,arguments)},uy=t.dynCall_vjiiii=function(){return(uy=t.dynCall_vjiiii=t.asm.mi).apply(null,arguments)},cy=t.dynCall_viiiiijiii=function(){return(cy=t.dynCall_viiiiijiii=t.asm.ni).apply(null,arguments)},ly=t.dynCall_jiij=function(){return(ly=t.dynCall_jiij=t.asm.oi).apply(null,arguments)},dy=t.dynCall_iiiijjii=function(){return(dy=t.dynCall_iiiijjii=t.asm.pi).apply(null,arguments)},fy=t.dynCall_iiiiijji=function(){return(fy=t.dynCall_iiiiijji=t.asm.qi).apply(null,arguments)},hy=t.dynCall_viiijjii=function(){return(hy=t.dynCall_viiijjii=t.asm.ri).apply(null,arguments)},py=t.dynCall_viiiijji=function(){return(py=t.dynCall_viiiijji=t.asm.si).apply(null,arguments)},yy=t.dynCall_viiiijjii=function(){return(yy=t.dynCall_viiiijjii=t.asm.ti).apply(null,arguments)},_y=t.dynCall_viiiiijji=function(){return(_y=t.dynCall_viiiiijji=t.asm.ui).apply(null,arguments)},my=t.dynCall_iiiiiijji=function(){return(my=t.dynCall_iiiiiijji=t.asm.vi).apply(null,arguments)},by=t.dynCall_iiiiijjj=function(){return(by=t.dynCall_iiiiijjj=t.asm.wi).apply(null,arguments)},gy=t.dynCall_jijiiii=function(){return(gy=t.dynCall_jijiiii=t.asm.xi).apply(null,arguments)},vy=t.dynCall_iiijjjii=function(){return(vy=t.dynCall_iiijjjii=t.asm.yi).apply(null,arguments)},jy=t.dynCall_iiiiijjji=function(){return(jy=t.dynCall_iiiiijjji=t.asm.zi).apply(null,arguments)},wy=t.dynCall_iiiijjj=function(){return(wy=t.dynCall_iiiijjj=t.asm.Ai).apply(null,arguments)},By=t.dynCall_iidj=function(){return(By=t.dynCall_iidj=t.asm.Bi).apply(null,arguments)},Iy=t.dynCall_ijji=function(){return(Iy=t.dynCall_ijji=t.asm.Ci).apply(null,arguments)},Sy=t.dynCall_iiiiiiiij=function(){return(Sy=t.dynCall_iiiiiiiij=t.asm.Di).apply(null,arguments)},Ty=t.dynCall_iiiiiiij=function(){return(Ty=t.dynCall_iiiiiiij=t.asm.Ei).apply(null,arguments)},Ay=t.dynCall_iiiiiiiiiiiij=function(){return(Ay=t.dynCall_iiiiiiiiiiiij=t.asm.Fi).apply(null,arguments)},Fy=t.dynCall_iiiiiiiji=function(){return(Fy=t.dynCall_iiiiiiiji=t.asm.Gi).apply(null,arguments)},Dy=t.dynCall_iiiidjj=function(){return(Dy=t.dynCall_iiiidjj=t.asm.Hi).apply(null,arguments)},Oy=t.dynCall_jiiiiiijii=function(){return(Oy=t.dynCall_jiiiiiijii=t.asm.Ii).apply(null,arguments)},My=t.dynCall_iiiijji=function(){return(My=t.dynCall_iiiijji=t.asm.Ji).apply(null,arguments)},Cy=t.dynCall_jiiiiii=function(){return(Cy=t.dynCall_jiiiiii=t.asm.Ki).apply(null,arguments)},Uy=t.dynCall_iijiji=function(){return(Uy=t.dynCall_iijiji=t.asm.Li).apply(null,arguments)},Ey=t.dynCall_vjiiiji=function(){return(Ey=t.dynCall_vjiiiji=t.asm.Mi).apply(null,arguments)},Ry=t.dynCall_jjjii=function(){return(Ry=t.dynCall_jjjii=t.asm.Ni).apply(null,arguments)},ky=t.dynCall_jji=function(){return(ky=t.dynCall_jji=t.asm.Oi).apply(null,arguments)},Vy=t.dynCall_viiijijiji=function(){return(Vy=t.dynCall_viiijijiji=t.asm.Pi).apply(null,arguments)},xy=t.dynCall_jiiijj=function(){return(xy=t.dynCall_jiiijj=t.asm.Qi).apply(null,arguments)},Py=t.dynCall_iiiijii=function(){return(Py=t.dynCall_iiiijii=t.asm.Ri).apply(null,arguments)},Ny=t.dynCall_viiiijii=function(){return(Ny=t.dynCall_viiiijii=t.asm.Si).apply(null,arguments)},Ly=t.dynCall_iijiii=function(){return(Ly=t.dynCall_iijiii=t.asm.Ti).apply(null,arguments)},qy=t.dynCall_jiiiiji=function(){return(qy=t.dynCall_jiiiiji=t.asm.Ui).apply(null,arguments)},Hy=t.dynCall_vijiijj=function(){return(Hy=t.dynCall_vijiijj=t.asm.Vi).apply(null,arguments)},zy=t.dynCall_vifiijj=function(){return(zy=t.dynCall_vifiijj=t.asm.Wi).apply(null,arguments)},Wy=t.dynCall_vidiijj=function(){return(Wy=t.dynCall_vidiijj=t.asm.Xi).apply(null,arguments)},Yy=t.dynCall_viiiiij=function(){return(Yy=t.dynCall_viiiiij=t.asm.Yi).apply(null,arguments)},Gy=t.dynCall_ijj=function(){return(Gy=t.dynCall_ijj=t.asm.Zi).apply(null,arguments)},$y=t.dynCall_ijjiii=function(){return($y=t.dynCall_ijjiii=t.asm._i).apply(null,arguments)},Ky=t.dynCall_vijijjji=function(){return(Ky=t.dynCall_vijijjji=t.asm.$i).apply(null,arguments)},Jy=t.dynCall_viijiijj=function(){return(Jy=t.dynCall_viijiijj=t.asm.aj).apply(null,arguments)},Xy=t.dynCall_viijijj=function(){return(Xy=t.dynCall_viijijj=t.asm.bj).apply(null,arguments)},Zy=t.dynCall_viiiiijjji=function(){return(Zy=t.dynCall_viiiiijjji=t.asm.cj).apply(null,arguments)},Qy=t.dynCall_iiijiijj=function(){return(Qy=t.dynCall_iiijiijj=t.asm.dj).apply(null,arguments)},e_=t.dynCall_viiijijjj=function(){return(e_=t.dynCall_viiijijjj=t.asm.ej).apply(null,arguments)},t_=t.dynCall_iijiijj=function(){return(t_=t.dynCall_iijiijj=t.asm.fj).apply(null,arguments)},i_=t.dynCall_viiijjjji=function(){return(i_=t.dynCall_viiijjjji=t.asm.gj).apply(null,arguments)},r_=t.dynCall_viiiijiii=function(){return(r_=t.dynCall_viiiijiii=t.asm.hj).apply(null,arguments)},n_=t.dynCall_viijiiii=function(){return(n_=t.dynCall_viijiiii=t.asm.ij).apply(null,arguments)},s_=t.dynCall_iijii=function(){return(s_=t.dynCall_iijii=t.asm.jj).apply(null,arguments)},o_=t.dynCall_vijjiiii=function(){return(o_=t.dynCall_vijjiiii=t.asm.kj).apply(null,arguments)},a_=t.dynCall_vijijjiiiii=function(){return(a_=t.dynCall_vijijjiiiii=t.asm.lj).apply(null,arguments)},u_=t.dynCall_vijjiiiii=function(){return(u_=t.dynCall_vijjiiiii=t.asm.mj).apply(null,arguments)},c_=t.dynCall_iiijjji=function(){return(c_=t.dynCall_iiijjji=t.asm.nj).apply(null,arguments)},l_=t.dynCall_viijiji=function(){return(l_=t.dynCall_viijiji=t.asm.oj).apply(null,arguments)};function FB(o){var a=B();try{$.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;S(1,0)}}function DB(o,a,u){var l=B();try{$.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function OB(o,a){var u=B();try{return $.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function MB(o,a,u){var l=B();try{return $.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function CB(o,a){var u=B();try{$.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function UB(o,a,u,l){var d=B();try{return $.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function EB(o,a,u,l,d,f){var h=B();try{return $.get(o)(a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function RB(o,a,u,l,d){var f=B();try{$.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function kB(o,a,u,l,d){var f=B();try{return $.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function VB(o,a,u,l){var d=B();try{return $.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function xB(o,a,u,l){var d=B();try{return $.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function PB(o,a,u,l){var d=B();try{$.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function NB(o,a,u,l){var d=B();try{$.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function LB(o,a,u,l){var d=B();try{$.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function qB(o,a,u){var l=B();try{return $.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function HB(o,a,u){var l=B();try{return $.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function zB(o,a,u,l,d,f,h){var y=B();try{$.get(o)(a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function WB(o,a,u,l,d,f){var h=B();try{$.get(o)(a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function YB(o,a,u,l,d,f,h,y,_){var b=B();try{return $.get(o)(a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function GB(o,a,u,l,d,f,h){var y=B();try{return $.get(o)(a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function $B(o,a,u,l,d,f,h,y){var _=B();try{return $.get(o)(a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function KB(o){var a=B();try{return $.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;S(1,0)}}function JB(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return $.get(o)(a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function XB(o,a,u,l,d,f,h,y){var _=B();try{$.get(o)(a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function ZB(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{return $.get(o)(a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function QB(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{$.get(o)(a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function e1(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z){var fe=B();try{$.get(o)(a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z)}catch(Ee){if(I(fe),Ee!==Ee+0&&Ee!=="longjmp")throw Ee;S(1,0)}}function t1(o,a,u,l,d){var f=B();try{return $.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function i1(o,a,u,l,d){var f=B();try{return $.get(o)(a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function r1(o,a,u,l,d,f){var h=B();try{$.get(o)(a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function n1(o,a,u){var l=B();try{$.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function s1(o,a,u){var l=B();try{$.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function o1(o,a){var u=B();try{return $.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function a1(o,a,u,l){var d=B();try{return $.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function u1(o,a){var u=B();try{return $.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function c1(o,a,u,l,d,f,h,y,_){var b=B();try{$.get(o)(a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function l1(o,a,u,l,d,f){var h=B();try{return $.get(o)(a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function d1(o,a,u,l){var d=B();try{$.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function f1(o,a,u,l){var d=B();try{$.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function h1(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x){var Z=B();try{return $.get(o)(a,u,l,d,f,h,y,_,b,g,w,A,M,x)}catch(fe){if(I(Z),fe!==fe+0&&fe!=="longjmp")throw fe;S(1,0)}}function p1(o,a,u){var l=B();try{return $.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function y1(o,a,u,l,d,f,h,y,_,b,g,w,A,M){var x=B();try{$.get(o)(a,u,l,d,f,h,y,_,b,g,w,A,M)}catch(Z){if(I(x),Z!==Z+0&&Z!=="longjmp")throw Z;S(1,0)}}function _1(o,a,u,l,d,f,h,y,_,b){var g=B();try{$.get(o)(a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function m1(o){var a=B();try{return $.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;S(1,0)}}function b1(o){var a=B();try{return $.get(o)()}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;S(1,0)}}function g1(o,a){var u=B();try{return $.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function v1(o,a){var u=B();try{return $.get(o)(a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function j1(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe,Ee,U,J,ve){var me=B();try{return $.get(o)(a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe,Ee,U,J,ve)}catch(ht){if(I(me),ht!==ht+0&&ht!=="longjmp")throw ht;S(1,0)}}function w1(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe,Ee,U,J){var ve=B();try{return $.get(o)(a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe,Ee,U,J)}catch(me){if(I(ve),me!==me+0&&me!=="longjmp")throw me;S(1,0)}}function B1(o,a,u){var l=B();try{return $.get(o)(a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function I1(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{$.get(o)(a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function S1(o,a,u,l){var d=B();try{return $.get(o)(a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function T1(o,a,u,l,d,f,h,y,_,b){var g=B();try{$.get(o)(a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function A1(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{$.get(o)(a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function F1(o,a,u,l,d){var f=B();try{return eh(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function D1(o,a,u,l,d,f,h){var y=B();try{$f(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function O1(o,a,u,l,d){var f=B();try{ah(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function M1(o,a,u,l,d,f,h){var y=B();try{return th(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function C1(o,a,u,l){var d=B();try{Gf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function U1(o,a,u,l,d,f,h){var y=B();try{Zf(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function E1(o,a,u,l,d,f){var h=B();try{Lf(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function R1(o,a,u,l,d,f,h,y,_,b){var g=B();try{qf(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function k1(o,a,u,l,d){var f=B();try{return Hf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function V1(o,a,u,l,d,f,h,y,_){var b=B();try{zf(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function x1(o,a,u,l){var d=B();try{return Wf(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function P1(o,a,u,l,d){var f=B();try{Yf(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function N1(o,a){var u=B();try{return Kf(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function L1(o,a,u,l,d,f,h,y){var _=B();try{Jf(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function q1(o,a,u,l,d,f,h,y){var _=B();try{Xf(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function H1(o,a,u,l,d,f,h,y,_){var b=B();try{Jp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function z1(o,a,u,l,d,f,h,y,_){var b=B();try{return ih(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function W1(o,a,u){var l=B();try{return Qf(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function Y1(o,a,u,l,d){var f=B();try{return Gy(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function G1(o,a,u,l,d,f,h,y){var _=B();try{return $y(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function $1(o,a,u,l,d,f,h){var y=B();try{nh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function K1(o,a,u,l,d,f){var h=B();try{sh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function J1(o,a,u,l,d,f){var h=B();try{oh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function X1(o,a,u,l){var d=B();try{return rh(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function Z1(o,a,u){var l=B();try{uh(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function Q1(o,a,u,l,d){var f=B();try{return ch(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function eI(o,a,u,l,d,f){var h=B();try{return lh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function tI(o,a,u,l,d,f,h,y){var _=B();try{return hp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function iI(o,a,u,l,d,f,h,y){var _=B();try{kp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function rI(o,a,u,l,d,f,h,y){var _=B();try{return lp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function nI(o,a,u,l,d,f){var h=B();try{return fh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function sI(o,a,u,l,d,f){var h=B();try{return Yh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function oI(o,a,u,l,d,f,h,y){var _=B();try{return dp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function aI(o,a,u,l,d,f,h,y){var _=B();try{fp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function uI(o){var a=B();try{return _h(o)}catch(u){if(I(a),u!==u+0&&u!=="longjmp")throw u;S(1,0)}}function cI(o,a,u,l,d,f,h,y){var _=B();try{return dh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function lI(o,a,u,l,d,f,h){var y=B();try{return hh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function dI(o,a,u,l){var d=B();try{return ph(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function fI(o,a,u,l,d,f,h){var y=B();try{Ah(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function hI(o,a,u,l,d,f,h,y){var _=B();try{Ch(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function pI(o,a,u,l,d,f,h,y){var _=B();try{return Uh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function yI(o,a,u,l,d,f,h,y){var _=B();try{return Bh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function _I(o,a,u,l,d,f,h,y,_){var b=B();try{return Ih(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function mI(o,a,u,l,d,f,h,y){var _=B();try{Sh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function bI(o,a,u,l,d,f,h,y,_){var b=B();try{return Th(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function gI(o,a,u,l,d,f,h,y){var _=B();try{return Fh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function vI(o,a,u,l,d,f,h,y,_){var b=B();try{return Dh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function jI(o,a,u,l,d,f,h,y,_,b){var g=B();try{return Oh(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function wI(o,a,u,l,d,f,h){var y=B();try{return Mh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function BI(o,a,u,l,d,f,h,y,_){var b=B();try{wh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function II(o,a,u,l,d,f,h,y){var _=B();try{jh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function SI(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return bh(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function TI(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{gh(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function AI(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{vh(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function FI(o,a,u,l,d,f,h){var y=B();try{Hh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function DI(o,a,u,l,d,f,h){var y=B();try{up(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function OI(o,a,u,l,d,f,h,y,_){var b=B();try{Jh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function MI(o,a,u,l,d,f,h,y,_){var b=B();try{return kh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function CI(o,a,u,l,d,f,h,y,_){var b=B();try{ap(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function UI(o,a,u,l){var d=B();try{return yh(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function EI(o,a,u,l,d,f){var h=B();try{return Vh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function RI(o,a,u,l,d,f,h,y,_){var b=B();try{qh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function kI(o,a,u,l,d,f){var h=B();try{return xh(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function VI(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{Lh(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function xI(o,a,u,l,d,f){var h=B();try{return rp(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function PI(o,a,u,l,d,f,h,y,_,b){var g=B();try{Nh(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function NI(o,a,u,l,d,f,h){var y=B();try{return Wh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function LI(o,a,u,l,d,f,h){var y=B();try{Eh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function qI(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return Rh(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function HI(o,a,u,l,d,f,h,y,_){var b=B();try{zh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function zI(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x){var Z=B();try{return Ph(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x)}catch(fe){if(I(Z),fe!==fe+0&&fe!=="longjmp")throw fe;S(1,0)}}function WI(o,a,u,l,d,f,h,y,_){var b=B();try{return Gh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function YI(o,a,u,l,d,f,h,y){var _=B();try{mh(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function GI(o,a,u,l,d,f){var h=B();try{$h(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function $I(o,a,u,l,d,f,h,y,_){var b=B();try{Kh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function KI(o,a,u,l,d,f,h){var y=B();try{return Zh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function JI(o,a,u,l,d,f,h,y,_,b){var g=B();try{ep(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function XI(o,a,u,l,d,f,h,y,_,b){var g=B();try{tp(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function ZI(o,a,u,l,d,f,h){var y=B();try{return Qh(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function QI(o,a,u,l,d,f,h,y,_,b){var g=B();try{ip(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function eS(o,a,u,l,d,f,h,y,_){var b=B();try{return Xh(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function tS(o,a,u,l,d,f,h,y,_){var b=B();try{sp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function iS(o,a,u,l,d,f,h,y,_){var b=B();try{return cp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function rS(o,a,u,l,d,f,h,y,_){var b=B();try{pp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function nS(o,a,u,l,d,f,h){var y=B();try{yp(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function sS(o,a,u,l,d,f,h){var y=B();try{return _p(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function oS(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{wp(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function aS(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{Bp(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function uS(o,a,u,l,d,f,h,y,_,b){var g=B();try{Ip(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function cS(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{Tp(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function lS(o,a,u,l,d,f,h,y,_,b){var g=B();try{return mp(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function dS(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{return bp(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function fS(o,a,u,l,d,f,h,y,_,b){var g=B();try{return gp(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function hS(o,a,u,l,d,f,h,y){var _=B();try{return vp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function pS(o,a,u,l,d,f,h,y,_,b){var g=B();try{return jp(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function yS(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{Ap(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function _S(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{Fp(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function mS(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z){var fe=B();try{Dp(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z)}catch(Ee){if(I(fe),Ee!==Ee+0&&Ee!=="longjmp")throw Ee;S(1,0)}}function bS(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe,Ee){var U=B();try{Op(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe,Ee)}catch(J){if(I(U),J!==J+0&&J!=="longjmp")throw J;S(1,0)}}function gS(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{Sp(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function vS(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return Oy(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function jS(o,a,u,l,d,f,h,y,_){var b=B();try{return My(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function wS(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{Mp(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function BS(o,a,u,l,d,f,h,y,_){var b=B();try{return Vp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function IS(o,a,u,l,d,f,h){var y=B();try{return Cp(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function SS(o,a,u,l,d,f,h){var y=B();try{return Up(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function TS(o,a,u,l,d,f,h){var y=B();try{return Ep(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function AS(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return Rp(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function FS(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x){var Z=B();try{return xp(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x)}catch(fe){if(I(Z),fe!==fe+0&&fe!=="longjmp")throw fe;S(1,0)}}function DS(o,a,u,l,d,f,h,y,_){var b=B();try{return Pp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function OS(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{return Np(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function MS(o,a,u){var l=B();try{return Lp(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function CS(o,a){var u=B();try{return qp(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function US(o,a){var u=B();try{return Hp(o,a)}catch(l){if(I(u),l!==l+0&&l!=="longjmp")throw l;S(1,0)}}function ES(o,a,u,l,d,f,h){var y=B();try{return Cy(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function RS(o,a,u,l,d,f){var h=B();try{return Iy(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function kS(o,a,u,l,d,f,h,y,_){var b=B();try{return Gp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function VS(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return $p(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function xS(o,a,u,l,d,f,h,y,_,b){var g=B();try{op(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function PS(o,a,u,l,d,f,h){var y=B();try{return Wp(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function NS(o,a,u,l,d,f,h,y){var _=B();try{return zp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function LS(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe){var Ee=B();try{Yp(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x,Z,fe)}catch(U){if(I(Ee),U!==U+0&&U!=="longjmp")throw U;S(1,0)}}function qS(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{return Kp(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function HS(o,a,u,l,d,f,h,y,_){var b=B();try{Xp(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function zS(o,a,u,l,d,f,h,y,_,b){var g=B();try{return Sy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function WS(o,a,u,l,d,f,h,y,_,b){var g=B();try{Zp(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function YS(o,a,u,l,d,f,h,y){var _=B();try{return Qp(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function GS(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{return ey(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function $S(o,a,u,l,d,f,h,y){var _=B();try{return ty(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function KS(o,a,u,l,d,f,h,y,_){var b=B();try{return Ty(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function JS(o,a,u,l,d,f,h,y,_,b,g,w,A,M){var x=B();try{return Ay(o,a,u,l,d,f,h,y,_,b,g,w,A,M)}catch(Z){if(I(x),Z!==Z+0&&Z!=="longjmp")throw Z;S(1,0)}}function XS(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{cy(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function ZS(o,a,u,l,d){var f=B();try{return ly(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function QS(o,a,u){var l=B();try{return ny(o,a,u)}catch(d){if(I(l),d!==d+0&&d!=="longjmp")throw d;S(1,0)}}function eT(o,a,u,l,d,f,h){var y=B();try{uy(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function tT(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x){var Z=B();try{ry(o,a,u,l,d,f,h,y,_,b,g,w,A,M,x)}catch(fe){if(I(Z),fe!==fe+0&&fe!=="longjmp")throw fe;S(1,0)}}function iT(o,a,u,l,d){var f=B();try{return sy(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function rT(o,a,u,l,d){var f=B();try{oy(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function nT(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{return ay(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function sT(o,a,u,l,d,f,h,y,_,b){var g=B();try{return dy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function oT(o,a,u,l,d,f,h,y,_,b){var g=B();try{return fy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function aT(o,a,u,l,d,f,h,y,_,b){var g=B();try{hy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function uT(o,a,u,l,d,f,h,y,_,b){var g=B();try{py(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function cT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{yy(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function lT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{_y(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function dT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return my(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function fT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return vy(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function hT(o,a,u,l,d,f,h,y){var _=B();try{return gy(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function pT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return by(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function yT(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{return jy(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function _T(o,a,u,l,d,f,h,y,_,b){var g=B();try{return wy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function mT(o,a,u,l,d){var f=B();try{return By(o,a,u,l,d)}catch(h){if(I(f),h!==h+0&&h!=="longjmp")throw h;S(1,0)}}function bT(o,a,u,l,d,f,h,y,_,b){var g=B();try{return Fy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function gT(o,a,u,l,d,f,h,y,_){var b=B();try{return Dy(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function vT(o,a,u,l,d,f,h,y){var _=B();try{return Uy(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function jT(o,a,u,l,d,f,h,y,_){var b=B();try{Ey(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function wT(o,a,u,l,d,f,h){var y=B();try{return Ry(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function BT(o,a,u,l){var d=B();try{return ky(o,a,u,l)}catch(f){if(I(d),f!==f+0&&f!=="longjmp")throw f;S(1,0)}}function IT(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{Vy(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function ST(o,a,u,l,d,f,h,y,_){var b=B();try{np(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function TT(o,a,u,l,d,f,h,y){var _=B();try{return xy(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function AT(o,a,u,l,d,f,h,y){var _=B();try{return Py(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function FT(o,a,u,l,d,f,h,y,_){var b=B();try{Ny(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function DT(o,a,u,l,d,f,h){var y=B();try{return Ly(o,a,u,l,d,f,h)}catch(_){if(I(y),_!==_+0&&_!=="longjmp")throw _;S(1,0)}}function OT(o,a,u,l,d,f,h,y){var _=B();try{return qy(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function MT(o,a,u,l,d,f,h,y,_,b){var g=B();try{Hy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function CT(o,a,u,l,d,f,h,y,_){var b=B();try{zy(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function UT(o,a,u,l,d,f,h,y,_){var b=B();try{Wy(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function ET(o,a,u,l,d,f,h,y){var _=B();try{Yy(o,a,u,l,d,f,h,y)}catch(b){if(I(_),b!==b+0&&b!=="longjmp")throw b;S(1,0)}}function RT(o,a,u,l,d,f,h,y,_,b,g,w){var A=B();try{Ky(o,a,u,l,d,f,h,y,_,b,g,w)}catch(M){if(I(A),M!==M+0&&M!=="longjmp")throw M;S(1,0)}}function kT(o,a,u,l,d,f){var h=B();try{return iy(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function VT(o,a,u,l,d,f,h,y,_,b){var g=B();try{Xy(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function xT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{return Qy(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function PT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{Jy(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function NT(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{Zy(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function LT(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{e_(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function qT(o,a,u,l,d,f,h,y,_,b){var g=B();try{return t_(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function HT(o,a,u,l,d,f,h,y,_,b){var g=B();try{return c_(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function zT(o,a,u,l,d,f,h,y,_,b,g,w,A){var M=B();try{i_(o,a,u,l,d,f,h,y,_,b,g,w,A)}catch(x){if(I(M),x!==x+0&&x!=="longjmp")throw x;S(1,0)}}function WT(o,a,u,l,d,f,h,y,_,b){var g=B();try{r_(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}function YT(o,a,u,l,d,f,h,y,_){var b=B();try{n_(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function GT(o,a,u,l,d,f){var h=B();try{return s_(o,a,u,l,d,f)}catch(y){if(I(h),y!==y+0&&y!=="longjmp")throw y;S(1,0)}}function $T(o,a,u,l,d,f,h,y,_){var b=B();try{l_(o,a,u,l,d,f,h,y,_)}catch(g){if(I(b),g!==g+0&&g!=="longjmp")throw g;S(1,0)}}function KT(o,a,u,l,d,f,h,y,_,b,g,w,A,M){var x=B();try{a_(o,a,u,l,d,f,h,y,_,b,g,w,A,M)}catch(Z){if(I(x),Z!==Z+0&&Z!=="longjmp")throw Z;S(1,0)}}function JT(o,a,u,l,d,f,h,y,_,b,g){var w=B();try{u_(o,a,u,l,d,f,h,y,_,b,g)}catch(A){if(I(w),A!==A+0&&A!=="longjmp")throw A;S(1,0)}}function XT(o,a,u,l,d,f,h,y,_,b){var g=B();try{o_(o,a,u,l,d,f,h,y,_,b)}catch(w){if(I(g),w!==w+0&&w!=="longjmp")throw w;S(1,0)}}t.ccall=q0;var So;function To(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var ZT=!1;ys=function o(){So||Hu(),So||(ys=o)};function QT(o){var a=t._main,u=0,l=0;try{var d=a(u,l);return eA(d,!0),d}catch(f){return fj(f)}finally{ZT=!0}}function Hu(o){if(o=o||p,Ur>0||(Q0(),Ur>0))return;function a(){So||(So=!0,t.calledRun=!0,!Ou&&(ej(),tj(),r(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),d_&&QT(o),rj()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=Hu;function eA(o,a){lo=o,Cu()||ij(),tA(o)}function tA(o){lo=o,Cu()||(t.onExit&&t.onExit(o),Ou=!0),j(o,new To(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var d_=!0;return t.noInitialRun&&(d_=!1),Hu(),e.ready}}(),M0=J2;var hf=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=T.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),T.Table.from(r)}send(e){let t=this._bindings.sendQuery(this._conn,e),r=new pf(this._bindings,this._conn,t),n=T.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}getTableNames(e){return this._bindings.getTableNames(this._conn,e)}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new U0(this._bindings,this._conn,t)}createScalarFunction(e,t,r){this._bindings.createScalarFunction(this._conn,e,t,r)}insertArrowTable(e,t){let r=e.serialize("binary",!0);this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},pf=class{constructor(e,t,r){this.bindings=e;this.conn=t;this.header=r;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 e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},U0=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=T.RecordBatchReader.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),T.Table.from(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new pf(this.bindings,this.connectionId,t),n=T.RecordBatchReader.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}};var X2=new TextEncoder;function yf(i,e,t){let r=X2.encode(t),n=i._malloc(r.byteLength),s=i.HEAPU8.subarray(n,n+r.byteLength);s.set(r),i.HEAPF64[(e>>3)+0]=1,i.HEAPF64[(e>>3)+1]=n,i.HEAPF64[(e>>3)+2]=s.byteLength}function E0(i,e,t,r,n,s){try{let c=i._udfFunctions.get(r);if(!c){yf(e,t,"unknown udf with id: "+r);return}let p=e.HEAPU8.subarray(n,n+s),m=T.RecordBatchFileReader.from(p);m.open();let j=m.next();if(j.done)return;let F=j.value,R;switch(c.returnType.typeId){case T.Type.Int:case T.Type.Int32:R=new T.Int32Builder({type:new T.Int32});break;default:yf(e,t,"unsupported result type: "+c.returnType.toString());return}let L=[],P=[];for(let _t=0;_t<F.numCols;++_t)L.push(F.getChildAt(_t)),P.push(null);for(let _t=0;_t<F.length;++_t){for(let an=0;an<F.numCols;++an)P[an]=L[an].get(_t)||null;let Hi=c.func(...P);R.append(Hi)}let ae=new T.Schema([new T.Field("0",new T.Int32,!0)]),he=new T.RecordBatch(ae,R.length,[R.toVector()]),je=new T.RecordBatchStreamWriter;je.write(he),je.finish();let Se=je.toUint8Array(!0),gt=e._malloc(Se.byteLength),Si=e.HEAPU8.subarray(gt,gt+Se.byteLength);Si.set(Se),e.HEAPF64[(t>>3)+0]=0,e.HEAPF64[(t>>3)+1]=gt,e.HEAPF64[(t>>3)+2]=Si.byteLength}catch(c){yf(e,t,c.toString())}}function Q2(){let i=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),i.decode(e))}var eE=Q2();function Ii(i,e){i.ccall("duckdb_web_fail_with",null,["string"],[e])}function fs(i,e,t){let r=i.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(r.byteLength));return n.set(r),n}function ye(i,e,t){return eE(i.HEAPU8.subarray(e,e+t))}function Ie(i,e,t,r){let n=i.stackSave(),s=i.stackAlloc(3*8);t.unshift("number"),r.unshift(s),i.ccall(e,null,t,r);let c=i.HEAPF64[(s>>3)+0],p=i.HEAPF64[(s>>3)+1],m=i.HEAPF64[(s>>3)+2];return i.stackRestore(n),[c,p,m]}function Me(i){i.ccall("duckdb_web_clear_response",null,[],[])}var _f=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}};var tE=new TextEncoder;var mf=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this.onInstantiationProgress=[];this._logger=e,this._runtime=t,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(e=t=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(e),await this._initPromise),this._initPromise=new Promise(t=>{this._initPromiseResolver=t}),this.onInstantiationProgress=[e],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(t=>t!=e),this)}open(e){let[t,r,n]=Ie(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(ye(this.mod,r,n));Me(this.mod)}reset(){let[e,t,r]=Ie(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(ye(this.mod,t,r));Me(this.mod)}getVersion(){let[e,t,r]=Ie(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(ye(this.mod,t,r));let n=ye(this.mod,t,r);return Me(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=Ie(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(ye(this.mod,r,n));let s=ye(this.mod,r,n);return Me(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new hf(this,e)}disconnect(e){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[e]),this.pthread)for(let t of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])t.postMessage({cmd:"dropUDFFunctions",connectionId:e})}runQuery(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s));let c=fs(this.mod,n,s);return Me(this.mod),c}sendQuery(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s));let c=fs(this.mod,n,s);return Me(this.mod),c}fetchQueryResults(e){let[t,r,n]=Ie(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(ye(this.mod,r,n));let s=fs(this.mod,r,n);return Me(this.mod),s}getTableNames(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s));let c=ye(this.mod,n,s);return Me(this.mod),JSON.parse(c)}createScalarFunction(e,t,r,n){let s={functionId:this._nextUDFId,name:t,returnType:lf(r)},c={functionId:s.functionId,connectionId:e,name:t,returnType:r,func:n};this._nextUDFId+=1;let[p,m,j]=Ie(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[e,JSON.stringify(s)]);if(p!==0)throw new Error(ye(this.mod,m,j));if(Me(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(c.functionId,c),this.pthread)for(let F of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])F.postMessage({cmd:"registerUDFFunction",udf:c})}createPrepared(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s));return Me(this.mod),n}closePrepared(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s));Me(this.mod)}runPrepared(e,t,r){let[n,s,c]=Ie(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(ye(this.mod,s,c));let p=fs(this.mod,s,c);return Me(this.mod),p}sendPrepared(e,t,r){let[n,s,c]=Ie(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(ye(this.mod,s,c));let p=fs(this.mod,s,c);return Me(this.mod),p}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=r?JSON.stringify(r):"",[p,m,j]=Ie(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(p!==0)throw new Error(ye(this.mod,m,j))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let j in r.columns)r.columnsFlat.push(uo(j,r.columns[j]))}let n=Yi({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,p,m]=Ie(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==0)throw new Error(ye(this.mod,p,m))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let j in r.columns)r.columnsFlat.push(uo(j,r.columns[j]))}let n=Yi({},r);n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,p,m]=Ie(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==0)throw new Error(ye(this.mod,p,m))}globFiles(e){let[t,r,n]=Ie(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(ye(this.mod,r,n));let s=ye(this.mod,r,n);Me(this.mod);let c=JSON.parse(s);return c==null?[]:c}registerFileURL(e,t){t===void 0&&(t=e);let[r,n,s]=Ie(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[e,t,-1]);if(r!==0)throw new Error(ye(this.mod,n,s));Me(this.mod)}registerFileText(e,t){let r=tE.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[s,c,p]=Ie(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(s!==0)throw new Error(ye(this.mod,c,p));Me(this.mod)}registerFileHandle(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_fs_register_file_url",["string","string","number"],[e,e,-1]);if(r!==0)throw new Error(ye(this.mod,n,s));if(Me(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let c of this.pthread.runningWorkers)c.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let c of this.pthread.unusedWorkers)c.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){let[t,r,n]=Ie(this.mod,"duckdb_web_fs_drop_file",["string"],[e]);if(t!==0)throw new Error(ye(this.mod,r,n));Me(this.mod)}dropFiles(){let[e,t,r]=Ie(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(ye(this.mod,t,r));Me(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s));Me(this.mod)}copyFileToBuffer(e){let[t,r,n]=Ie(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(ye(this.mod,r,n));let s=this.mod.HEAPU8.subarray(r,r+n),c=new Uint8Array(s.length);return c.set(s),Me(this.mod),c}collectFileStatistics(e,t){let[r,n,s]=Ie(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==0)throw new Error(ye(this.mod,n,s))}exportFileStatistics(e){let[t,r,n]=Ie(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(ye(this.mod,r,n));return new _f(this.mod.HEAPU8.subarray(r,r+n))}};var bf=class extends mf{constructor(e,t,r,n){super(e,t);this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.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=${t} path=${e}`)}instantiateWasm(e,t){globalThis.DUCKDB_RUNTIME=this._runtime;let r=this.onInstantiationProgress,n={lastEvent:new Date};if(typeof TransformStream=="function"&&ReadableStream.prototype.pipeThrough){let c=(async()=>{var P;let p=new Request(this.mainModuleURL),m=await fetch(p),j=m.headers.get("Content-Length"),F;j?F=parseInt(j,10)||0:F=await new Promise((ae,he)=>{let je=new XMLHttpRequest;je.open("HEAD",this.mainModuleURL,!0),je.onreadystatechange=()=>{if(je.readyState==je.DONE){let Se=je.getResponseHeader("Content-Length");return ae(Se?parseInt(Se):null)}},je.onerror=Se=>ae(null),je.send()});let R={startedAt:new Date,bytesTotal:F||0,bytesLoaded:0},L=new TransformStream({transform(ae,he){R.bytesLoaded+=ae.byteLength;let je=new Date;if(je.getTime()-n.lastEvent.getTime()<100){n.lastEvent=je,he.enqueue(ae);return}for(let Se of r)Se(R);he.enqueue(ae)}});return new Response((P=m.body)==null?void 0:P.pipeThrough(L),m)})();WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(c,e).then(p=>{t(p.instance,p.module)}):c.then(p=>p.arrayBuffer()).then(p=>WebAssembly.instantiate(p,e).then(m=>{t(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)})).catch(p=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+p}),new Error(p)})}else{let s=new XMLHttpRequest,c=this.mainModuleURL,p={startedAt:new Date,bytesTotal:0,bytesLoaded:0};s.open("GET",c),s.responseType="arraybuffer",s.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())},s.onprogress=m=>{p.bytesTotal=m.total,p.bytesLoaded=m.loaded;for(let j of r)j(p)},s.onload=()=>{WebAssembly.instantiate(s.response,e).then(m=>{t(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)})},s.send()}return[]}};var gf=class extends bf{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return M0(vs(Yi({},e),{instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)}))}};var Or=ii(R0()),iE=function(i,e,t){var n,s,c,p;let r=k0(e);return{url:r.path,query:"",host:`${r.bucket}.s3.amazonaws.com`,region:(n=i==null?void 0:i.region)!=null?n:"",service:"s3",method:t,accessKeyId:(s=i==null?void 0:i.accessKeyId)!=null?s:"",secretAccessKey:(c=i==null?void 0:i.secretAccessKey)!=null?c:"",sessionToken:(p=i==null?void 0:i.sessionToken)!=null?p:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}};function rE(i,e=!1){let t="0123456789ABCDEF",r="";for(let n=0;n<i.length;n++){let s=i[n];s>="A"&&s<="Z"||s>="a"&&s<="z"||s>="0"&&s<="9"||s=="_"||s=="-"||s=="~"||s=="."?r+=s:s=="/"?e?r+="%2F":r+=s:(r+="%",r+=t[s.charCodeAt(0)>>4],r+=t[s.charCodeAt(0)&15])}return r}function nE(i,e=null){var ae;let t=(ae=e==null?void 0:e.contentHash)!=null?ae:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",r=new Map;r.set("x-amz-date",i.datetimeNow),r.set("x-amz-content-sha256",t),i.sessionToken&&r.set("x-amz-security-token",i.sessionToken);let n="";(e==null?void 0:e.contentType)&&(n+="content-type;"),n+="host;x-amz-content-sha256;x-amz-date",i.sessionToken&&(n+=";x-amz-security-token");let s=i.method+`
|
|
19
|
+
`+rE(i.url)+`
|
|
20
|
+
`+i.query;(e==null?void 0:e.contentType)&&(s+=`
|
|
21
|
+
content-type:`+(e==null?void 0:e.contentType)),s+=`
|
|
22
|
+
host:`+i.host+`
|
|
23
|
+
x-amz-content-sha256:`+t+`
|
|
24
|
+
x-amz-date:`+i.datetimeNow,i.sessionToken&&i.sessionToken.length>0&&(s+=`
|
|
25
|
+
x-amz-security-token:`+i.sessionToken),s+=`
|
|
26
|
+
|
|
27
|
+
`+n+`
|
|
28
|
+
`+t;let c=(0,Or.sha256)(s),p=`AWS4-HMAC-SHA256
|
|
29
|
+
`+i.datetimeNow+`
|
|
30
|
+
`+i.dateNow+"/"+i.region+"/"+i.service+`/aws4_request
|
|
31
|
+
`+c,m="AWS4"+i.secretAccessKey,j=Or.sha256.hmac.arrayBuffer(m,i.dateNow),F=Or.sha256.hmac.arrayBuffer(j,i.region),R=Or.sha256.hmac.arrayBuffer(F,i.service),L=Or.sha256.hmac.arrayBuffer(R,"aws4_request"),P=Or.sha256.hmac(L,p);return r.set("Authorization","AWS4-HMAC-SHA256 Credential="+i.accessKeyId+"/"+i.dateNow+"/"+i.region+"/"+i.service+"/aws4_request, SignedHeaders="+n+", Signature="+P),r}var sE=function(i,e,t,r=null,n=null){let s=iE(i,e,t),c={contentType:r,contentHash:n?Or.sha256.hex(n):null};return nE(s,c)};function Mr(i,e,t,r,n=null,s=null){((e==null?void 0:e.accessKeyId)||(e==null?void 0:e.sessionToken))&&(sE(e,t,r,n,s).forEach((p,m)=>{i.setRequestHeader(m,p)}),n&&i.setRequestHeader("content-type",n))}function k0(i){if(i.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let e=i.indexOf("/",5);if(e==-1)throw new Error("URL needs to contain a '/' after the host");let t=i.substring(5,e);if(!t)throw new Error("URL needs to contain a bucket name");let r=i.substring(e);if(!r)throw new Error("URL needs to contain key");return{bucket:t,path:r}}function Cr(i,e){var n;let t=k0(e),r;return((n=i==null?void 0:i.endpoint)==null?void 0:n.startsWith("http"))?r=`${i==null?void 0:i.endpoint}/${t.bucket}`:(i==null?void 0:i.endpoint)?r=`https://${t.bucket}.${i==null?void 0:i.endpoint}`:r=`https://${t.bucket}.s3.amazonaws.com`,r+t.path}var qe={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,getFileInfo(i,e){try{let t=qe._fileInfoCache.get(e),[r,n,s]=Ie(i,"duckdb_web_fs_get_file_info_by_id",["number","number"],[e,(t==null?void 0:t.cacheEpoch)||0]);if(r!==0)return null;if(s===0)return t;let c=ye(i,n,s);Me(i);let p=JSON.parse(c);if(p==null)return null;let m=vs(Yi({},p),{blob:null});return qe._fileInfoCache.set(e,m),m}catch(t){return null}},getGlobalFileInfo(i){var e;try{let[t,r,n]=Ie(i,"duckdb_web_get_global_file_info",["number"],[((e=qe._globalFileInfo)==null?void 0:e.cacheEpoch)||0]);if(t!==0)return null;if(n===0)return qe._globalFileInfo;let s=ye(i,r,n);Me(i);let c=JSON.parse(s);return c==null?null:(qe._globalFileInfo=vs(Yi({},c),{blob:null}),qe._globalFileInfo)}catch(t){return null}},testPlatformFeature:(i,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(i,e,t)=>{var r;try{qe._fileInfoCache.delete(e);let n=qe.getFileInfo(i,e);switch(n==null?void 0:n.dataProtocol){case 3:case 4:{if(t&1&&t&2)throw new Error(`Opening file ${n.fileName} failed: cannot open file with both read and write flags set`);if(t&32)throw new Error(`Opening file ${n.fileName} failed: appending to HTTP/S3 files is not supported`);if(t&2){let c=new XMLHttpRequest;if(n.dataProtocol==4?(c.open("HEAD",Cr(n.s3Config,n.dataUrl),!1),Mr(c,n.s3Config,n.dataUrl,"HEAD")):c.open("HEAD",n.dataUrl,!1),c.send(null),c.status!=200&&c.status!=404)throw new Error(`Opening file ${n.fileName} failed: Unexpected return status from server (${c.status})`);if(c.status==404&&!(t&8||t&16))throw new Error(`Opening file ${n.fileName} failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag.`);let p=i._malloc(1),m=new Uint8Array;i.HEAPU8.set(m,p);let j=i._malloc(2*8);return i.HEAPF64[(j>>3)+0]=1,i.HEAPF64[(j>>3)+1]=p,j}else if(t!=1)throw new Error(`Opening file ${n.fileName} failed: unsupported file flags: ${t}`);let s=null;try{let c=new XMLHttpRequest;n.dataProtocol==4?(c.open("HEAD",Cr(n.s3Config,n.dataUrl),!1),Mr(c,n.s3Config,n.dataUrl,"HEAD")):c.open("HEAD",n.dataUrl,!1),c.setRequestHeader("Range","bytes=0-"),c.send(null);let p=c.getResponseHeader("Content-Length");if(c.status==206&&p!==null){let m=i._malloc(2*8);return i.HEAPF64[(m>>3)+0]=+p,i.HEAPF64[(m>>3)+1]=0,m}}catch(c){s=c,console.warn(`HEAD request with range header failed: ${c}`)}if(n.allowFullHttpReads){console.warn(`falling back to full HTTP read for: ${n.dataUrl}`);let c=new XMLHttpRequest;if(n.dataProtocol==4?(c.open("GET",Cr(n.s3Config,n.dataUrl),!1),Mr(c,n.s3Config,n.dataUrl,"GET")):c.open("GET",n.dataUrl,!1),c.responseType="arraybuffer",c.send(null),c.status==200){let p=i._malloc(c.response.byteLength),m=new Uint8Array(c.response,0,c.response.byteLength);i.HEAPU8.set(m,p);let j=i._malloc(2*8);return i.HEAPF64[(j>>3)+0]=c.response.byteLength,i.HEAPF64[(j>>3)+1]=p,j}}if(s!=null)throw new Error(`Reading file ${n.fileName} failed with error: ${s}`);return 0}case 1:{let s=(r=qe._files)==null?void 0:r.get(n.fileName);if(s){let m=i._malloc(2*8);return i.HEAPF64[(m>>3)+0]=s.size,i.HEAPF64[(m>>3)+1]=0,m}console.warn(`Buffering missing file: ${n.fileName}`);let c=i._malloc(2*8),p=i._malloc(1);return i.HEAPF64[(c>>3)+0]=1,i.HEAPF64[(c>>3)+1]=p,c}}}catch(n){console.error(n.toString()),Ii(i,n.toString())}return 0},glob:(i,e,t)=>{try{let r=ye(i,e,t);if(r.startsWith("http")||r.startsWith("s3://")){let n=new XMLHttpRequest;if(r.startsWith("s3://")){let s=qe.getGlobalFileInfo(i);n.open("HEAD",Cr(s==null?void 0:s.s3Config,r),!1),Mr(n,s==null?void 0:s.s3Config,r,"HEAD")}else n.open("HEAD",r,!1);if(n.send(null),n.status!=200&&n.status!==206){Ii(i,`HEAD request failed: ${r}`);return}i.ccall("duckdb_web_fs_glob_add_path",null,["string"],[r])}}catch(r){return Ii(i,r.toString()),0}},checkFile:(i,e,t)=>{try{let r=ye(i,e,t);if(r.startsWith("http")||r.startsWith("s3://")){let n=new XMLHttpRequest;if(r.startsWith("s3://")){let c=qe.getGlobalFileInfo(i);n.open("HEAD",Cr(c==null?void 0:c.s3Config,r),!1),Mr(n,c==null?void 0:c.s3Config,r,"HEAD")}else n.open("HEAD",r,!1);n.setRequestHeader("Range","bytes=0-"),n.send(null);let s=!1;if(n.status==206)s=!0;else if(n.status==200)s=n.getResponseHeader("Accept-Ranges")==="bytes";else return!1;return!!s}}catch(r){return!1}return!1},syncFile:(i,e)=>{},closeFile:(i,e)=>{let t=qe.getFileInfo(i,e);switch(qe._fileInfoCache.delete(e),t==null?void 0:t.dataProtocol){case 3:case 4:break;case 1:return}},truncateFile:(i,e,t)=>{let r=qe.getFileInfo(i,e);switch(r==null?void 0:r.dataProtocol){case 3:Ii(i,"Cannot truncate a http file");return;case 4:Ii(i,"Cannot truncate an s3 file");return;case 1:Ii(i,"truncateFile not implemented");return}return 0},readFile(i,e,t,r,n){var s;try{let c=qe.getFileInfo(i,e);switch(c==null?void 0:c.dataProtocol){case 3:case 4:{if(!c.dataUrl)throw new Error(`Missing data URL for file ${e}`);try{let p=new XMLHttpRequest;if(c.dataProtocol==4?(p.open("GET",Cr(c==null?void 0:c.s3Config,c.dataUrl),!1),Mr(p,c==null?void 0:c.s3Config,c.dataUrl,"GET")):p.open("GET",c.dataUrl,!1),p.responseType="arraybuffer",p.setRequestHeader("Range",`bytes=${n}-${n+r-1}`),p.send(null),p.status==206||p.status==200&&r==p.response.byteLength&&n==0){let m=new Uint8Array(p.response,0,Math.min(p.response.byteLength,r));return i.HEAPU8.set(m,t),m.byteLength}else throw p.status==200?new Error(`Range request for ${c.dataUrl} did not return a partial response: ${p.status} "${p.statusText}"`):new Error(`Range request for ${c.dataUrl} did returned non-success status: ${p.status} "${p.statusText}"`)}catch(p){throw new Error(`Range request for ${c.dataUrl} failed with error: ${p}"`)}}case 1:{let p=(s=qe._files)==null?void 0:s.get(c.fileName);if(!p)throw new Error(`No handle available for file: ${c.fileName}`);let m=p.slice(n,n+r),j=new Uint8Array(new FileReaderSync().readAsArrayBuffer(m));return i.HEAPU8.set(j,t),j.byteLength}}return 0}catch(c){return Ii(i,c.toString()),0}},writeFile:(i,e,t,r,n)=>{let s=qe.getFileInfo(i,e);switch(s==null?void 0:s.dataProtocol){case 3:return Ii(i,"Cannot write to HTTP file"),0;case 4:{let c=i.HEAPU8.subarray(t,t+r),p=new XMLHttpRequest;return p.open("PUT",Cr(s==null?void 0:s.s3Config,s.dataUrl),!1),Mr(p,s==null?void 0:s.s3Config,s.dataUrl,"PUT","",c),p.send(c),r}case 1:return Ii(i,"writefile not implemented"),0}return 0},getLastFileModificationTime:(i,e)=>{var r;let t=qe.getFileInfo(i,e);switch(t==null?void 0:t.dataProtocol){case 1:{if(!((r=qe._files)==null?void 0:r.get(t.fileName)))throw Error(`No handle available for file: ${t.fileName}`);return 0}case 3:case 4:return new Date().getTime()}return 0},checkDirectory:(i,e,t)=>{let r=ye(i,e,t);return console.log(`checkDirectory: ${r}`),!1},createDirectory:(i,e,t)=>{let r=ye(i,e,t);console.log(`createDirectory: ${r}`)},removeDirectory:(i,e,t)=>{let r=ye(i,e,t);console.log(`removeDirectory: ${r}`)},listDirectoryEntries:(i,e,t)=>{let r=ye(i,e,t);return console.log(`listDirectoryEntries: ${r}`),!1},moveFile:(i,e,t,r,n)=>{},removeFile:(i,e,t)=>{},callScalarUDF:(i,e,t,r,n)=>{E0(qe,i,e,t,r,n)}};var V0=class extends df{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t,r){return await new gf(this,qe,e,t).instantiate(r)}};function x0(){let i=new V0;globalThis.onmessage=async e=>{await i.onMessage(e.data)}}x0();return dA(oE);})();
|
|
32
|
+
/*! *****************************************************************************
|
|
33
|
+
Copyright (c) Microsoft Corporation.
|
|
34
|
+
|
|
35
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
36
|
+
purpose with or without fee is hereby granted.
|
|
37
|
+
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
39
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
40
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
41
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
42
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
+
***************************************************************************** */
|
|
46
|
+
/**
|
|
47
|
+
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
|
48
|
+
*
|
|
49
|
+
* @version 0.9.0
|
|
50
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
51
|
+
* @copyright Chen, Yi-Cyuan 2014-2017
|
|
52
|
+
* @license MIT
|
|
53
|
+
*/
|
|
54
|
+
//# sourceMappingURL=duckdb-browser-mvp.worker.js.map
|