@duckdb/duckdb-wasm 0.0.41-dev174.0 → 0.0.41-dev190.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/dist/duckdb-browser-async-next-coi.pthread.worker.js +3 -3
- package/dist/duckdb-browser-async-next-coi.pthread.worker.js.map +2 -2
- package/dist/duckdb-browser-async-next-coi.worker.js +2 -2
- package/dist/duckdb-browser-async-next-coi.worker.js.map +2 -2
- package/dist/duckdb-browser-async-next.worker.js +6 -6
- package/dist/duckdb-browser-async-next.worker.js.map +2 -2
- package/dist/duckdb-browser-async.js +1 -1
- package/dist/duckdb-browser-async.js.map +2 -2
- package/dist/duckdb-browser-async.worker.js +8 -8
- package/dist/duckdb-browser-async.worker.js.map +2 -2
- package/dist/duckdb-browser-sync-next.js +2 -2
- package/dist/duckdb-browser-sync-next.js.map +2 -2
- package/dist/duckdb-browser-sync.js +8 -8
- package/dist/duckdb-browser-sync.js.map +2 -2
- package/dist/duckdb-esm.js +1 -1
- package/dist/duckdb-esm.js.map +2 -2
- package/dist/duckdb-next-coi.wasm +0 -0
- package/dist/duckdb-next.wasm +0 -0
- package/dist/duckdb-node-async-next.worker.js +3 -3
- package/dist/duckdb-node-async-next.worker.js.map +2 -2
- package/dist/duckdb-node-async.js +1 -1
- package/dist/duckdb-node-async.js.map +2 -2
- package/dist/duckdb-node-async.worker.js +2 -2
- package/dist/duckdb-node-async.worker.js.map +2 -2
- package/dist/duckdb-node-sync-next.js +3 -3
- package/dist/duckdb-node-sync-next.js.map +2 -2
- package/dist/duckdb-node-sync.js +2 -2
- package/dist/duckdb-node-sync.js.map +2 -2
- package/dist/duckdb.wasm +0 -0
- package/dist/tests-browser.js +258 -232
- package/dist/tests-browser.js.map +2 -2
- package/dist/tests-node.js +69 -69
- package/dist/tests-node.js.map +2 -2
- package/dist/types/src/bindings/connection.d.ts +2 -0
- package/dist/types/src/parallel/async_connection.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var duckdb=(()=>{var gS=Object.create;var io=Object.defineProperty;var vS=Object.getOwnPropertyDescriptor;var jS=Object.getOwnPropertyNames;var wS=Object.getPrototypeOf,BS=Object.prototype.hasOwnProperty;var Iy=r=>io(r,"__esModule",{value:!0});var V=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),TS=(r,e)=>{Iy(r);for(var t in e)io(r,t,{get:e[t],enumerable:!0})},IS=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of jS(e))!BS.call(r,i)&&i!=="default"&&io(r,i,{get:()=>e[i],enumerable:!(t=vS(e,i))||t.enumerable});return r},Sy=r=>IS(Iy(io(r!=null?gS(wS(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var gr=V(Ay=>{var A={};A.Offset;A.Table;A.SIZEOF_SHORT=2;A.SIZEOF_INT=4;A.FILE_IDENTIFIER_LENGTH=4;A.SIZE_PREFIX_LENGTH=4;A.Encoding={UTF8_BYTES:1,UTF16_STRING:2};A.int32=new Int32Array(2);A.float32=new Float32Array(A.int32.buffer);A.float64=new Float64Array(A.int32.buffer);A.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;A.Long=function(r,e){this.low=r|0,this.high=e|0};A.Long.create=function(r,e){return r==0&&e==0?A.Long.ZERO:new A.Long(r,e)};A.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};A.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};A.Long.ZERO=new A.Long(0,0);A.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=A.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};A.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};A.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};A.Builder.prototype.dataBuffer=function(){return this.bb};A.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};A.Builder.prototype.prep=function(r,e){r>this.minalign&&(this.minalign=r);for(var t=~(this.bb.capacity()-this.space+e)+1&r-1;this.space<t+r+e;){var i=this.bb.capacity();this.bb=A.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};A.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};A.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};A.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};A.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};A.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};A.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};A.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};A.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};A.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};A.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};A.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};A.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};A.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};A.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};A.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};A.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};A.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};A.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};A.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};A.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};A.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};A.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};A.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};A.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};A.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};A.Builder.growByteBuffer=function(r){var e=r.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,i=A.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};A.Builder.prototype.addOffset=function(r){this.prep(A.SIZEOF_INT,0),this.writeInt32(this.offset()-r+A.SIZEOF_INT)};A.Builder.prototype.startObject=function(r){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=r;for(var e=0;e<r;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};A.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var r=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?r-this.vtable[e]:0);var i=2;this.addInt16(r-this.object_start);var n=(t+i)*A.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var v=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(v)){for(var w=A.SIZEOF_SHORT;w<n;w+=A.SIZEOF_SHORT)if(this.bb.readInt16(c+w)!=this.bb.readInt16(v+w))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,s-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};A.Builder.prototype.finish=function(r,e,t){var i=t?A.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH+i),n.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var s=A.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,A.SIZEOF_INT+i),this.addOffset(r),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};A.Builder.prototype.finishSizePrefixed=function(r,e){this.finish(r,e,!0)};A.Builder.prototype.requiredField=function(r,e){var t=this.bb.capacity()-r,i=t-this.bb.readInt32(t),n=this.bb.readInt16(i+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};A.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(A.SIZEOF_INT,r*e),this.prep(t,r*e)};A.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};A.Builder.prototype.createString=function(r){if(r instanceof Uint8Array)var e=r;else for(var e=[],t=0;t<r.length;){var i,n=r.charCodeAt(t++);if(n<55296||n>=56320)i=n;else{var s=r.charCodeAt(t++);i=(n<<10)+s+(65536-(55296<<10)-56320)}i<128?e.push(i):(i<2048?e.push(i>>6&31|192):(i<65536?e.push(i>>12&15|224):e.push(i>>18&7|240,i>>12&63|128),e.push(i>>6&63|128)),e.push(i&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,v=this.bb.bytes();t<e.length;t++)v[c++]=e[t];return this.endVector()};A.Builder.prototype.createLong=function(r,e){return A.Long.create(r,e)};A.ByteBuffer=function(r){this.bytes_=r,this.position_=0};A.ByteBuffer.allocate=function(r){return new A.ByteBuffer(new Uint8Array(r))};A.ByteBuffer.prototype.clear=function(){this.position_=0};A.ByteBuffer.prototype.bytes=function(){return this.bytes_};A.ByteBuffer.prototype.position=function(){return this.position_};A.ByteBuffer.prototype.setPosition=function(r){this.position_=r};A.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};A.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};A.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};A.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};A.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};A.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};A.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};A.ByteBuffer.prototype.readInt64=function(r){return new A.Long(this.readInt32(r),this.readInt32(r+4))};A.ByteBuffer.prototype.readUint64=function(r){return new A.Long(this.readUint32(r),this.readUint32(r+4))};A.ByteBuffer.prototype.readFloat32=function(r){return A.int32[0]=this.readInt32(r),A.float32[0]};A.ByteBuffer.prototype.readFloat64=function(r){return A.int32[A.isLittleEndian?0:1]=this.readInt32(r),A.int32[A.isLittleEndian?1:0]=this.readInt32(r+4),A.float64[0]};A.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.ByteBuffer.prototype.writeInt32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};A.ByteBuffer.prototype.writeUint32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};A.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};A.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};A.ByteBuffer.prototype.writeFloat32=function(r,e){A.float32[0]=e,this.writeInt32(r,A.int32[0])};A.ByteBuffer.prototype.writeFloat64=function(r,e){A.float64[0]=e,this.writeInt32(r,A.int32[A.isLittleEndian?0:1]),this.writeInt32(r+4,A.int32[A.isLittleEndian?1:0])};A.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+A.SIZEOF_INT+e));return r};A.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};A.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};A.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=A.SIZEOF_INT,e===A.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var s,c=this.readUint8(r+n++);if(c<192)s=c;else{var v=this.readUint8(r+n++);if(c<224)s=(c&31)<<6|v&63;else{var w=this.readUint8(r+n++);if(c<240)s=(c&15)<<12|(v&63)<<6|w&63;else{var S=this.readUint8(r+n++);s=(c&7)<<18|(v&63)<<12|(w&63)<<6|S&63}}}s<65536?i+=String.fromCharCode(s):(s-=65536,i+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return i};A.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};A.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+A.SIZEOF_INT};A.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};A.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+A.SIZEOF_INT+e))return!1;return!0};A.ByteBuffer.prototype.createLong=function(r,e){return A.Long.create(r,e)};Ay.flatbuffers=A});var Fy=V(vu=>{"use strict";function vr(r,e,t){return e<=r&&r<=t}function no(r){if(r===void 0)return{};if(r===Object(r))return r;throw TypeError("Could not convert argument to dictionary")}function FS(r){for(var e=String(r),t=e.length,i=0,n=[];i<t;){var s=e.charCodeAt(i);if(s<55296||s>57343)n.push(s);else if(56320<=s&&s<=57343)n.push(65533);else if(55296<=s&&s<=56319)if(i===t-1)n.push(65533);else{var c=r.charCodeAt(i+1);if(56320<=c&&c<=57343){var v=s&1023,w=c&1023;n.push(65536+(v<<10)+w),i+=1}else n.push(65533)}i+=1}return n}function MS(r){for(var e="",t=0;t<r.length;++t){var i=r[t];i<=65535?e+=String.fromCharCode(i):(i-=65536,e+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return e}var so=-1;function bu(r){this.tokens=[].slice.call(r)}bu.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():so},prepend:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(r)},push:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.push(e.shift());else this.tokens.push(r)}};var en=-1;function gu(r,e){if(r)throw TypeError("Decoder error");return e||65533}var oo="utf-8";function ao(r,e){if(!(this instanceof ao))return new ao(r,e);if(r=r!==void 0?String(r).toLowerCase():oo,r!==oo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(e.fatal),this._ignoreBOM=Boolean(e.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}ao.prototype={decode:function(e,t){var i;typeof e=="object"&&e instanceof ArrayBuffer?i=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):i=new Uint8Array(0),t=no(t),this._streaming||(this._decoder=new VS({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n=new bu(i),s=[],c;!n.endOfStream()&&(c=this._decoder.handler(n,n.read()),c!==en);)c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c));if(!this._streaming){do{if(c=this._decoder.handler(n,n.read()),c===en)break;c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c))}while(!n.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),MS(s)}};function uo(r,e){if(!(this instanceof uo))return new uo(r,e);if(r=r!==void 0?String(r).toLowerCase():oo,r!==oo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}uo.prototype={encode:function(e,t){e=e?String(e):"",t=no(t),this._streaming||(this._encoder=new US(this._options)),this._streaming=Boolean(t.stream);for(var i=[],n=new bu(FS(e)),s;!n.endOfStream()&&(s=this._encoder.handler(n,n.read()),s!==en);)Array.isArray(s)?i.push.apply(i,s):i.push(s);if(!this._streaming){for(;s=this._encoder.handler(n,n.read()),s!==en;)Array.isArray(s)?i.push.apply(i,s):i.push(s);this._encoder=null}return new Uint8Array(i)}};function VS(r){var e=r.fatal,t=0,i=0,n=0,s=128,c=191;this.handler=function(v,w){if(w===so&&n!==0)return n=0,gu(e);if(w===so)return en;if(n===0){if(vr(w,0,127))return w;if(vr(w,194,223))n=1,t=w-192;else if(vr(w,224,239))w===224&&(s=160),w===237&&(c=159),n=2,t=w-224;else if(vr(w,240,244))w===240&&(s=144),w===244&&(c=143),n=3,t=w-240;else return gu(e);return t=t<<6*n,null}if(!vr(w,s,c))return t=n=i=0,s=128,c=191,v.prepend(w),gu(e);if(s=128,c=191,i+=1,t+=w-128<<6*(n-i),i!==n)return null;var S=t;return t=n=i=0,S}}function US(r){var e=r.fatal;this.handler=function(t,i){if(i===so)return en;if(vr(i,0,127))return i;var n,s;vr(i,128,2047)?(n=1,s=192):vr(i,2048,65535)?(n=2,s=224):vr(i,65536,1114111)&&(n=3,s=240);for(var c=[(i>>6*n)+s];n>0;){var v=i>>6*(n-1);c.push(128|v&63),n-=1}return c}}vu.TextEncoder=uo;vu.TextDecoder=ao});var Ti=V(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.encodeUtf8=tn.decodeUtf8=void 0;var My=Fy(),CS=new(typeof TextDecoder!="undefined"?TextDecoder:My.TextDecoder)("utf-8");tn.decodeUtf8=r=>CS.decode(r);var PS=new(typeof TextEncoder!="undefined"?TextEncoder:My.TextEncoder);tn.encodeUtf8=r=>PS.encode(r)});var rn=V(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.AsyncQueue=lt.ReadableInterop=lt.ArrowJSON=lt.ITERATOR_DONE=void 0;var Vy=ns();lt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var Uy=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};lt.ArrowJSON=Uy;var ju=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())}};lt.ReadableInterop=ju;var Cy=class extends ju{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}async cancel(e){await 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(lt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Vy.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Vy.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),lt.ITERATOR_DONE}async return(e){return await this.close(),lt.ITERATOR_DONE}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await 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,i)=>{this.resolvers.push({resolve:t,reject:i})}):Promise.resolve(lt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(`${this} is closed`)}};lt.AsyncQueue=Cy});var st=V(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.isReadableNodeStream=q.isWritableNodeStream=q.isReadableDOMStream=q.isWritableDOMStream=q.isFetchResponse=q.isFSReadStream=q.isFileHandle=q.isUnderlyingSink=q.isIteratorResult=q.isArrayLike=q.isArrowJSON=q.isAsyncIterable=q.isIterable=q.isObservable=q.isPromise=q.isObject=q.BigUint64ArrayAvailable=q.BigUint64Array=q.BigInt64ArrayAvailable=q.BigInt64Array=q.BigIntAvailable=q.BigInt=void 0;var co=rn(),[kS,RS]=(()=>{let r=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw r()}return e.asIntN=()=>{throw r()},e.asUintN=()=>{throw r()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();q.BigInt=kS;q.BigIntAvailable=RS;var[NS,xS]=(()=>{let r=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();q.BigInt64Array=NS;q.BigInt64ArrayAvailable=xS;var[ES,LS]=(()=>{let r=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();q.BigUint64Array=ES;q.BigUint64ArrayAvailable=LS;var wu=r=>typeof r=="number",Py=r=>typeof r=="boolean",et=r=>typeof r=="function";q.isObject=r=>r!=null&&Object(r)===r;q.isPromise=r=>q.isObject(r)&&et(r.then);q.isObservable=r=>q.isObject(r)&&et(r.subscribe);q.isIterable=r=>q.isObject(r)&&et(r[Symbol.iterator]);q.isAsyncIterable=r=>q.isObject(r)&&et(r[Symbol.asyncIterator]);q.isArrowJSON=r=>q.isObject(r)&&q.isObject(r.schema);q.isArrayLike=r=>q.isObject(r)&&wu(r.length);q.isIteratorResult=r=>q.isObject(r)&&"done"in r&&"value"in r;q.isUnderlyingSink=r=>q.isObject(r)&&et(r.abort)&&et(r.close)&&et(r.start)&&et(r.write);q.isFileHandle=r=>q.isObject(r)&&et(r.stat)&&wu(r.fd);q.isFSReadStream=r=>q.isReadableNodeStream(r)&&wu(r.bytesRead);q.isFetchResponse=r=>q.isObject(r)&&q.isReadableDOMStream(r.body);q.isWritableDOMStream=r=>q.isObject(r)&&et(r.abort)&&et(r.getWriter)&&!(r instanceof co.ReadableInterop);q.isReadableDOMStream=r=>q.isObject(r)&&et(r.cancel)&&et(r.getReader)&&!(r instanceof co.ReadableInterop);q.isWritableNodeStream=r=>q.isObject(r)&&et(r.end)&&et(r.write)&&Py(r.writable)&&!(r instanceof co.ReadableInterop);q.isReadableNodeStream=r=>q.isObject(r)&&et(r.read)&&et(r.pipe)&&Py(r.readable)&&!(r instanceof co.ReadableInterop)});var Ye=V(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.compareArrayLike=E.rebaseValueOffsets=E.toUint8ClampedArrayAsyncIterator=E.toFloat64ArrayAsyncIterator=E.toFloat32ArrayAsyncIterator=E.toUint32ArrayAsyncIterator=E.toUint16ArrayAsyncIterator=E.toUint8ArrayAsyncIterator=E.toInt32ArrayAsyncIterator=E.toInt16ArrayAsyncIterator=E.toInt8ArrayAsyncIterator=E.toArrayBufferViewAsyncIterator=E.toUint8ClampedArrayIterator=E.toFloat64ArrayIterator=E.toFloat32ArrayIterator=E.toUint32ArrayIterator=E.toUint16ArrayIterator=E.toUint8ArrayIterator=E.toInt32ArrayIterator=E.toInt16ArrayIterator=E.toInt8ArrayIterator=E.toArrayBufferViewIterator=E.toUint8ClampedArray=E.toFloat64Array=E.toFloat32Array=E.toBigUint64Array=E.toUint32Array=E.toUint16Array=E.toUint8Array=E.toBigInt64Array=E.toInt32Array=E.toInt16Array=E.toInt8Array=E.toArrayBufferView=E.joinUint8Arrays=E.memcpy=void 0;var qS=gr(),zS=Ti(),WS=qS.flatbuffers.ByteBuffer,Ii=st(),Bu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function HS(r){let e=r[0]?[r[0]]:[],t,i,n,s;for(let c,v,w=0,S=0,U=r.length;++w<U;){if(c=e[S],v=r[w],!c||!v||c.buffer!==v.buffer||v.byteOffset<c.byteOffset){v&&(e[++S]=v);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:i,byteLength:s}=v,t+n<i||i+s<t){v&&(e[++S]=v);continue}e[S]=new Uint8Array(c.buffer,t,i-t+s)}return e}function Tu(r,e,t=0,i=e.byteLength){let n=r.byteLength,s=new Uint8Array(r.buffer,r.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return s.set(c,t),r}E.memcpy=Tu;function YS(r,e){let t=HS(r),i=t.reduce((U,G)=>U+G.byteLength,0),n,s,c,v=0,w=-1,S=Math.min(e||1/0,i);for(let U=t.length;++w<U;){if(n=t[w],s=n.subarray(0,Math.min(n.length,S-v)),S<=v+s.length){s.length<n.length?t[w]=n.subarray(s.length):s.length===n.length&&w++,c?Tu(c,s,v):c=s;break}Tu(c||(c=new Uint8Array(S)),s,v),v+=s.length}return[c||new Uint8Array(0),t.slice(w),i-(c?c.byteLength:0)]}E.joinUint8Arrays=YS;function ut(r,e){let t=Ii.isIteratorResult(e)?e.value:e;return t instanceof r?r===Uint8Array?new r(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=zS.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof Bu?new r(t):t instanceof WS?ut(r,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new r(0):new r(t.buffer,t.byteOffset,t.byteLength/r.BYTES_PER_ELEMENT):r.from(t)):new r(0)}E.toArrayBufferView=ut;E.toInt8Array=r=>ut(Int8Array,r);E.toInt16Array=r=>ut(Int16Array,r);E.toInt32Array=r=>ut(Int32Array,r);E.toBigInt64Array=r=>ut(Ii.BigInt64Array,r);E.toUint8Array=r=>ut(Uint8Array,r);E.toUint16Array=r=>ut(Uint16Array,r);E.toUint32Array=r=>ut(Uint32Array,r);E.toBigUint64Array=r=>ut(Ii.BigUint64Array,r);E.toFloat32Array=r=>ut(Float32Array,r);E.toFloat64Array=r=>ut(Float64Array,r);E.toUint8ClampedArray=r=>ut(Uint8ClampedArray,r);var Iu=r=>(r.next(),r);function*Kt(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Bu?t(e):Ii.isIterable(e)?e:t(e);return yield*Iu(function*(n){let s=null;do s=n.next(yield ut(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}E.toArrayBufferViewIterator=Kt;E.toInt8ArrayIterator=r=>Kt(Int8Array,r);E.toInt16ArrayIterator=r=>Kt(Int16Array,r);E.toInt32ArrayIterator=r=>Kt(Int32Array,r);E.toUint8ArrayIterator=r=>Kt(Uint8Array,r);E.toUint16ArrayIterator=r=>Kt(Uint16Array,r);E.toUint32ArrayIterator=r=>Kt(Uint32Array,r);E.toFloat32ArrayIterator=r=>Kt(Float32Array,r);E.toFloat64ArrayIterator=r=>Kt(Float64Array,r);E.toUint8ClampedArrayIterator=r=>Kt(Uint8ClampedArray,r);async function*xt(r,e){if(Ii.isPromise(e))return yield*xt(r,await e);let t=async function*(s){yield await s},i=async function*(s){yield*Iu(function*(c){let v=null;do v=c.next(yield v&&v.value);while(!v.done)}(s[Symbol.iterator]()))},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Bu?t(e):Ii.isIterable(e)?i(e):Ii.isAsyncIterable(e)?e:t(e);return yield*Iu(async function*(s){let c=null;do c=await s.next(yield ut(r,c));while(!c.done)}(n[Symbol.asyncIterator]())),new r}E.toArrayBufferViewAsyncIterator=xt;E.toInt8ArrayAsyncIterator=r=>xt(Int8Array,r);E.toInt16ArrayAsyncIterator=r=>xt(Int16Array,r);E.toInt32ArrayAsyncIterator=r=>xt(Int32Array,r);E.toUint8ArrayAsyncIterator=r=>xt(Uint8Array,r);E.toUint16ArrayAsyncIterator=r=>xt(Uint16Array,r);E.toUint32ArrayAsyncIterator=r=>xt(Uint32Array,r);E.toFloat32ArrayAsyncIterator=r=>xt(Float32Array,r);E.toFloat64ArrayAsyncIterator=r=>xt(Float64Array,r);E.toUint8ClampedArrayAsyncIterator=r=>xt(Uint8ClampedArray,r);function $S(r,e,t){if(r!==0){t=t.slice(0,e+1);for(let i=-1;++i<=e;)t[i]+=r}return t}E.rebaseValueOffsets=$S;function GS(r,e){let t=0,i=r.length;if(i!==e.length)return!1;if(i>0)do if(r[t]!==e[t])return!1;while(++t<i);return!0}E.compareArrayLike=GS});var ns=V(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var ct=Ye();Du.default={fromIterable(r){return lo(JS(r))},fromAsyncIterable(r){return lo(KS(r))},fromDOMStream(r){return lo(ZS(r))},fromNodeStream(r){return lo(XS(r))},toDOMStream(r,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(r,e){throw new Error('"toNodeStream" not available in this environment')}};var lo=r=>(r.next(),r);function*JS(r){let e,t=!1,i=[],n,s,c,v=0;function w(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-v)?S.next(void 0):S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield w());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&S.throw(U)}finally{t===!1&&typeof S.return=="function"&&S.return(null)}return null}async function*KS(r){let e,t=!1,i=[],n,s,c,v=0;function w(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:e,value:n}=isNaN(c-v)?await S.next(void 0):await S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield w());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&await S.throw(U)}finally{t===!1&&typeof S.return=="function"&&await S.return(new Uint8Array(0))}return null}async function*ZS(r){let e=!1,t=!1,i=[],n,s,c,v=0;function w(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=new ky(r);try{do if({done:e,value:n}=isNaN(c-v)?await S.read(void 0):await S.read(c-v),!e&&n.byteLength>0&&(i.push(ct.toUint8Array(n)),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield w());while(c<v);while(!e)}catch(U){(t=!0)&&await S.cancel(U)}finally{t===!1?await S.cancel():r.locked&&S.releaseLock()}return null}var ky=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}async cancel(e){let{reader:t,source:i}=this;t&&await t.cancel(e).catch(()=>{}),i&&i.locked&&this.releaseLock()}async read(e){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?await this.getDefaultReader().read():await this.readFromBYOBReader(e);return!t.done&&(t.value=ct.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}async readFromBYOBReader(e){return await Ry(this.getBYOBReader(),new ArrayBuffer(e),0,e)}};async function Ry(r,e,t,i){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:s}=await r.read(new Uint8Array(e,t,i-t));return(t+=s.byteLength)<i&&!n?await Ry(r,s.buffer,t,i):{done:n,value:new Uint8Array(s.buffer,0,t)}}var Su=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};async function*XS(r){let e=[],t="error",i=!1,n=null,s,c,v=0,w=[],S;function U(){return s==="peek"?ct.joinUint8Arrays(w,c)[0]:([S,w,v]=ct.joinUint8Arrays(w,c),S)}if({cmd:s,size:c}=yield null,r.isTTY)return yield new Uint8Array(0),null;try{e[0]=Su(r,"end"),e[1]=Su(r,"error");do{if(e[2]=Su(r,"readable"),[t,n]=await Promise.race(e.map(me=>me[2])),t==="error")break;if((i=t==="end")||(isFinite(c-v)?(S=ct.toUint8Array(r.read(c-v)),S.byteLength<c-v&&(S=ct.toUint8Array(r.read(void 0)))):S=ct.toUint8Array(r.read(void 0)),S.byteLength>0&&(w.push(S),v+=S.byteLength)),i||c<=v)do({cmd:s,size:c}=yield U());while(c<v)}while(!i)}finally{await G(e,t==="error"?n:null)}return null;function G(me,fe){return S=w=null,new Promise((Gt,Cr)=>{for(let[_r,Ji]of me)r.off(_r,Ji);try{let _r=r.destroy;_r&&_r.call(r,fe),fe=void 0}catch(_r){fe=_r||fe}finally{fe!=null?Cr(fe):Gt()}})}}});var Re=V(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.Vector=nn.AbstractVector=void 0;var fo=class{};nn.AbstractVector=fo;nn.Vector=fo;fo.prototype.data=null});var $r=V(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 Ie=gr(),QS;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(QS=N.MetadataVersion||(N.MetadataVersion={}));var e1;(function(r){r[r.UNUSED=0]="UNUSED",r[r.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",r[r.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(e1=N.Feature||(N.Feature={}));var Ou;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(Ou=N.UnionMode||(N.UnionMode={}));var Au;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Au=N.Precision||(N.Precision={}));var Fu;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Fu=N.DateUnit||(N.DateUnit={}));var Si;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Si=N.TimeUnit||(N.TimeUnit={}));var Mu;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME"})(Mu=N.IntervalUnit||(N.IntervalUnit={}));var Vu;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList"})(Vu=N.Type||(N.Type={}));var Uu;(function(r){r[r.DenseArray=0]="DenseArray"})(Uu=N.DictionaryKind||(N.DictionaryKind={}));var Cu;(function(r){r[r.Little=0]="Little",r[r.Big=1]="Big"})(Cu=N.Endianness||(N.Endianness={}));var Di=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 Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Di.startNull(e),Di.endNull(e)}};N.Null=Di;var Oi=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 Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Oi.startStruct_(e),Oi.endStruct_(e)}};N.Struct_=Oi;var Ai=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 Ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Ai.startList(e),Ai.endList(e)}};N.List=Ai;var Fi=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 Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Fi.startLargeList(e),Fi.endLargeList(e)}};N.LargeList=Fi;var Er=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 Er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Er).__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 Er.startFixedSizeList(e),Er.addListSize(e,t),Er.endFixedSizeList(e)}};N.FixedSizeList=Er;var Lr=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 Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__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 Lr.startMap(e),Lr.addKeysSorted(e,t),Lr.endMap(e)}};N.Map=Lr;var jr=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 jr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new jr).__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):Ou.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,Ou.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addInt32(t[i]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,i){return jr.startUnion(e),jr.addMode(e,t),jr.addTypeIds(e,i),jr.endUnion(e)}};N.Union=jr;var Zt=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 Zt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Zt).__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,i){return Zt.startInt(e),Zt.addBitWidth(e,t),Zt.addIsSigned(e,i),Zt.endInt(e)}};N.Int=Zt;var qr=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 qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__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):Au.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Au.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return qr.startFloatingPoint(e),qr.addPrecision(e,t),qr.endFloatingPoint(e)}};N.FloatingPoint=qr;var Mi=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 Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Mi.startUtf8(e),Mi.endUtf8(e)}};N.Utf8=Mi;var Vi=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 Vi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Vi.startBinary(e),Vi.endBinary(e)}};N.Binary=Vi;var Ui=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 Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Ui.startLargeUtf8(e),Ui.endLargeUtf8(e)}};N.LargeUtf8=Ui;var Ci=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 Ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Ci.startLargeBinary(e),Ci.endLargeBinary(e)}};N.LargeBinary=Ci;var zr=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 zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zr).__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 zr.startFixedSizeBinary(e),zr.addByteWidth(e,t),zr.endFixedSizeBinary(e)}};N.FixedSizeBinary=zr;var Pi=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 Pi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Pi.startBool(e),Pi.endBool(e)}};N.Bool=Pi;var Xt=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 Xt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Xt).__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,i,n){return Xt.startDecimal(e),Xt.addPrecision(e,t),Xt.addScale(e,i),Xt.addBitWidth(e,n),Xt.endDecimal(e)}};N.Decimal=Xt;var Wr=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 Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__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):Fu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Fu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Wr.startDate(e),Wr.addUnit(e,t),Wr.endDate(e)}};N.Date=Wr;var wr=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 wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new wr).__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):Si.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,Si.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,i){return wr.startTime(e),wr.addUnit(e,t),wr.addBitWidth(e,i),wr.endTime(e)}};N.Time=wr;var Br=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 Br).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Br).__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):Si.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,Si.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,i){return Br.startTimestamp(e),Br.addUnit(e,t),Br.addTimezone(e,i),Br.endTimestamp(e)}};N.Timestamp=Br;var Hr=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 Hr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hr).__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):Mu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Mu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Hr.startInterval(e),Hr.addUnit(e,t),Hr.endInterval(e)}};N.Interval=Hr;var Yr=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 Yr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yr).__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):Si.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Si.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Yr.startDuration(e),Yr.addUnit(e,t),Yr.endDuration(e)}};N.Duration=Yr;var Et=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 Et).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Et).__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,i){return Et.startKeyValue(e),Et.addKey(e,t),Et.addValue(e,i),Et.endKeyValue(e)}};N.KeyValue=Et;var bt=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 bt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new bt).__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 Zt).__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):Uu.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,Uu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,i,n,s){return bt.startDictionaryEncoding(e),bt.addId(e,t),bt.addIndexType(e,i),bt.addIsOrdered(e,n),bt.addDictionaryKind(e,s),bt.endDictionaryEncoding(e)}};N.DictionaryEncoding=bt;var ot=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 ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ot).__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):Vu.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 bt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let i=this.bb.__offset(this.bb_pos,14);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,16);return i?(t||new Et).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,Vu.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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,i,n,s,c,v,w){return ot.startField(e),ot.addName(e,t),ot.addNullable(e,i),ot.addTypeType(e,n),ot.addType(e,s),ot.addDictionary(e,c),ot.addChildren(e,v),ot.addCustomMetadata(e,w),ot.endField(e)}};N.Field=ot;var Ny=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,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};N.Buffer=Ny;var Lt=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 Lt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lt).__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):Cu.Little}fields(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,8);return i?(t||new Et).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,Cu.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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 i=t.length-1;i>=0;i--)e.addInt64(t[i]);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,i,n,s){return Lt.startSchema(e),Lt.addEndianness(e,t),Lt.addFields(e,i),Lt.addCustomMetadata(e,n),Lt.addFeatures(e,s),Lt.endSchema(e)}};N.Schema=Lt});var yo=V(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.Message=Ne.DictionaryBatch=Ne.RecordBatch=Ne.BodyCompression=Ne.FieldNode=Ne.MessageHeader=Ne.BodyCompressionMethod=Ne.CompressionType=void 0;var ho=gr(),po=$r(),Pu;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(Pu=Ne.CompressionType||(Ne.CompressionType={}));var ku;(function(r){r[r.BUFFER=0]="BUFFER"})(ku=Ne.BodyCompressionMethod||(Ne.BodyCompressionMethod={}));var Ru;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(Ru=Ne.MessageHeader||(Ne.MessageHeader={}));var Nu=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,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};Ne.FieldNode=Nu;var Qt=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 Qt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qt).__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):Pu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):ku.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Pu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,ku.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,i){return Qt.startBodyCompression(e),Qt.addCodec(e,t),Qt.addMethod(e,i),Qt.endBodyCompression(e)}};Ne.BodyCompression=Qt;var gt=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 gt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new gt).__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 i=this.bb.__offset(this.bb_pos,6);return i?(t||new Nu).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,8);return i?(t||new po.Buffer).__init(this.bb.__vector(this.bb_pos+i)+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 Qt).__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,i,n,s){return gt.startRecordBatch(e),gt.addLength(e,t),gt.addNodes(e,i),gt.addBuffers(e,n),gt.addCompression(e,s),gt.endRecordBatch(e)}};Ne.RecordBatch=gt;var er=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 er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new er).__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 gt).__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,i,n){return er.startDictionaryBatch(e),er.addId(e,t),er.addData(e,i),er.addIsDelta(e,n),er.endDictionaryBatch(e)}};Ne.DictionaryBatch=er;var vt=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 vt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new vt).__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):po.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Ru.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 i=this.bb.__offset(this.bb_pos,12);return i?(t||new po.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,po.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Ru.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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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,i,n,s,c){return vt.startMessage(e),vt.addVersion(e,t),vt.addHeaderType(e,i),vt.addHeader(e,n),vt.addBodyLength(e,s),vt.addCustomMetadata(e,c),vt.endMessage(e)}};Ne.Message=vt});var Te=V(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.BufferType=Me.Type=Me.MessageHeader=Me.MetadataVersion=Me.IntervalUnit=Me.UnionMode=Me.Precision=Me.TimeUnit=Me.DateUnit=void 0;var sn=$r();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return sn.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return sn.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return sn.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return sn.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return sn.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return sn.MetadataVersion}});var t1=yo();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return t1.MessageHeader}});var r1;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(r1=Me.Type||(Me.Type={}));var i1;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(i1=Me.BufferType||(Me.BufferType={}))});var tr=V(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.popcnt_uint32=Ee.popcnt_array=Ee.popcnt_bit_range=Ee.BitIterator=Ee.packBools=Ee.truncateBitmap=Ee.setBool=Ee.getBit=Ee.getBool=void 0;function xy(r,e,t,i){return(t&1<<i)!=0}Ee.getBool=xy;function Ey(r,e,t,i){return(t&1<<i)>>i}Ee.getBit=Ey;function n1(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}Ee.setBool=n1;function s1(r,e,t){let i=t.byteLength+7&~7;if(r>0||t.byteLength<i){let n=new Uint8Array(i);return n.set(r%8==0?t.subarray(r>>3):Ly(new mo(t,r,e,null,xy)).subarray(0,i)),n}return t}Ee.truncateBitmap=s1;function Ly(r){let e=[],t=0,i=0,n=0;for(let c of r)c&&(n|=1<<i),++i==8&&(e[t++]=n,n=i=0);(t===0||i>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ee.packBools=Ly;var mo=class{constructor(e,t,i,n,s){this.bytes=e,this.length=i,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}};Ee.BitIterator=mo;function xu(r,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new mo(r,e,t-e,r,Ey))s+=c;return s}let i=t>>3<<3,n=e+(e%8==0?0:8-e%8);return xu(r,e,n)+xu(r,i,t)+qy(r,n>>3,i-n>>3)}Ee.popcnt_bit_range=xu;function qy(r,e,t){let i=0,n=e|0,s=new DataView(r.buffer,r.byteOffset,r.byteLength),c=t===void 0?r.byteLength:n+t;for(;c-n>=4;)i+=_o(s.getUint32(n)),n+=4;for(;c-n>=2;)i+=_o(s.getUint16(n)),n+=2;for(;c-n>=1;)i+=_o(s.getUint8(n)),n+=1;return i}Ee.popcnt_array=qy;function _o(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ee.popcnt_uint32=_o});var be=V(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 L=Te(),Ve=class{static isNull(e){return e&&e.typeId===L.Type.Null}static isInt(e){return e&&e.typeId===L.Type.Int}static isFloat(e){return e&&e.typeId===L.Type.Float}static isBinary(e){return e&&e.typeId===L.Type.Binary}static isUtf8(e){return e&&e.typeId===L.Type.Utf8}static isBool(e){return e&&e.typeId===L.Type.Bool}static isDecimal(e){return e&&e.typeId===L.Type.Decimal}static isDate(e){return e&&e.typeId===L.Type.Date}static isTime(e){return e&&e.typeId===L.Type.Time}static isTimestamp(e){return e&&e.typeId===L.Type.Timestamp}static isInterval(e){return e&&e.typeId===L.Type.Interval}static isList(e){return e&&e.typeId===L.Type.List}static isStruct(e){return e&&e.typeId===L.Type.Struct}static isUnion(e){return e&&e.typeId===L.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===L.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===L.Type.FixedSizeList}static isMap(e){return e&&e.typeId===L.Type.Map}static isDictionary(e){return e&&e.typeId===L.Type.Dictionary}get typeId(){return L.Type.NONE}};k.DataType=Ve;Ve[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Ve.prototype);var bo=class extends Ve{toString(){return"Null"}get typeId(){return L.Type.Null}};k.Null=bo;bo[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(bo.prototype);var jt=class extends Ve{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return L.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=jt;jt[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(jt.prototype);var Eu=class extends jt{constructor(){super(!0,8)}};k.Int8=Eu;var Lu=class extends jt{constructor(){super(!0,16)}};k.Int16=Lu;var qu=class extends jt{constructor(){super(!0,32)}};k.Int32=qu;var zu=class extends jt{constructor(){super(!0,64)}};k.Int64=zu;var Wu=class extends jt{constructor(){super(!1,8)}};k.Uint8=Wu;var Hu=class extends jt{constructor(){super(!1,16)}};k.Uint16=Hu;var Yu=class extends jt{constructor(){super(!1,32)}};k.Uint32=Yu;var $u=class extends jt{constructor(){super(!1,64)}};k.Uint64=$u;Object.defineProperty(Eu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Lu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(qu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(zu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Wu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Hu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Yu.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty($u.prototype,"ArrayType",{value:Uint32Array});var ki=class extends Ve{constructor(e){super();this.precision=e}get typeId(){return L.Type.Float}get ArrayType(){switch(this.precision){case L.Precision.HALF:return Uint16Array;case L.Precision.SINGLE:return Float32Array;case L.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=ki;ki[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(ki.prototype);var Gu=class extends ki{constructor(){super(L.Precision.HALF)}};k.Float16=Gu;var Ju=class extends ki{constructor(){super(L.Precision.SINGLE)}};k.Float32=Ju;var Ku=class extends ki{constructor(){super(L.Precision.DOUBLE)}};k.Float64=Ku;Object.defineProperty(Gu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Ju.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Ku.prototype,"ArrayType",{value:Float64Array});var go=class extends Ve{constructor(){super()}get typeId(){return L.Type.Binary}toString(){return"Binary"}};k.Binary=go;go[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(go.prototype);var vo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Utf8}toString(){return"Utf8"}};k.Utf8=vo;vo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(vo.prototype);var jo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Bool}toString(){return"Bool"}};k.Bool=jo;jo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(jo.prototype);var wo=class extends Ve{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return L.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=wo;wo[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(wo.prototype);var on=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Date}toString(){return`Date${(this.unit+1)*32}<${L.DateUnit[this.unit]}>`}};k.Date_=on;on[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(on.prototype);var zy=class extends on{constructor(){super(L.DateUnit.DAY)}};k.DateDay=zy;var Wy=class extends on{constructor(){super(L.DateUnit.MILLISECOND)}};k.DateMillisecond=Wy;var Gr=class extends Ve{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return L.Type.Time}toString(){return`Time${this.bitWidth}<${L.TimeUnit[this.unit]}>`}};k.Time=Gr;Gr[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))(Gr.prototype);var Hy=class extends Gr{constructor(){super(L.TimeUnit.SECOND,32)}};k.TimeSecond=Hy;var Yy=class extends Gr{constructor(){super(L.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=Yy;var $y=class extends Gr{constructor(){super(L.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=$y;var Gy=class extends Gr{constructor(){super(L.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=Gy;var Jr=class extends Ve{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return L.Type.Timestamp}toString(){return`Timestamp<${L.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=Jr;Jr[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Jr.prototype);var Jy=class extends Jr{constructor(e){super(L.TimeUnit.SECOND,e)}};k.TimestampSecond=Jy;var Ky=class extends Jr{constructor(e){super(L.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=Ky;var Zy=class extends Jr{constructor(e){super(L.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=Zy;var Xy=class extends Jr{constructor(e){super(L.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=Xy;var an=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Interval}toString(){return`Interval<${L.IntervalUnit[this.unit]}>`}};k.Interval=an;an[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(an.prototype);var Qy=class extends an{constructor(){super(L.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=Qy;var em=class extends an{constructor(){super(L.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=em;var Bo=class extends Ve{constructor(e){super();this.children=[e]}get typeId(){return L.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=Bo;Bo[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Bo.prototype);var To=class extends Ve{constructor(e){super();this.children=e}get typeId(){return L.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=To;To[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(To.prototype);var un=class extends Ve{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return L.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=un;un[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(un.prototype);var tm=class extends un{constructor(e,t){super(L.UnionMode.Dense,e,t)}};k.DenseUnion=tm;var rm=class extends un{constructor(e,t){super(L.UnionMode.Sparse,e,t)}};k.SparseUnion=rm;var Io=class extends Ve{constructor(e){super();this.byteWidth=e}get typeId(){return L.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Io;Io[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Io.prototype);var So=class extends Ve{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return L.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=So;So[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(So.prototype);var Do=class extends Ve{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return L.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_=Do;Do[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Do.prototype);var o1=(r=>()=>++r)(-1),Oo=class extends Ve{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?o1():typeof i=="number"?i:i.low}get typeId(){return L.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=Oo;Oo[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Oo.prototype);function a1(r){let e=r;switch(r.typeId){case L.Type.Decimal:return 4;case L.Type.Timestamp:return 2;case L.Type.Date:return 1+e.unit;case L.Type.Interval:return 1+e.unit;case L.Type.Int:return 1+ +(e.bitWidth>32);case L.Type.Time:return 1+ +(e.bitWidth>32);case L.Type.FixedSizeList:return e.listSize;case L.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=a1});var qt=V(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Data=Ri.kUnknownNullCount=void 0;var u1=tr(),c1=tr(),z=Te(),l1=be(),he=Ye();Ri.kUnknownNullCount=-1;var te=class{constructor(e,t,i,n,s,c,v){this.type=e,this.dictionary=v,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(S=>S instanceof te?S:S.data);let w;s instanceof te?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=l1.strideForType(e),s&&((w=s[0])&&(this.valueOffsets=w),(w=s[1])&&(this.values=w),(w=s[2])&&(this.nullBitmap=w),(w=s[3])&&(this.typeIds=w)))}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:i,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,v)=>c+v.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Ri.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-c1.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,s=this,c=this.childData){return new te(e,t,i,n,s,c,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,v=n===16?i:1,w=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,c,w,!s.length||this.valueOffsets?s:this._sliceChildren(s,v*e,v*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===z.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:i}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,i>0&&n.set(u1.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[z.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),s)}_sliceBuffers(e,t,i,n){let s,{buffers:c}=this;return(s=c[z.BufferType.TYPE])&&(c[z.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[z.BufferType.OFFSET])&&(c[z.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[z.BufferType.DATA])&&(c[z.BufferType.DATA]=n===6?s:s.subarray(i*e,i*(e+t))),c}_sliceChildren(e,t,i){return e.map(n=>n.slice(t,i))}static new(e,t,i,n,s,c,v){switch(s instanceof te?s=s.buffers:s||(s=[]),e.typeId){case z.Type.Null:return te.Null(e,t,i);case z.Type.Int:return te.Int(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Dictionary:return te.Dictionary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[],v);case z.Type.Float:return te.Float(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Bool:return te.Bool(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Decimal:return te.Decimal(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Date:return te.Date(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Time:return te.Time(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Timestamp:return te.Timestamp(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Interval:return te.Interval(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.FixedSizeBinary:return te.FixedSizeBinary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Binary:return te.Binary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.Utf8:return te.Utf8(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.List:return te.List(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.FixedSizeList:return te.FixedSizeList(e,t,i,n||0,s[z.BufferType.VALIDITY],(c||[])[0]);case z.Type.Struct:return te.Struct(e,t,i,n||0,s[z.BufferType.VALIDITY],c||[]);case z.Type.Map:return te.Map(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.Union:return te.Union(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.TYPE]||[],s[z.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new te(e,t,i,0)}static Int(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Dictionary(e,t,i,n,s,c,v){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.indices.ArrayType,c),he.toUint8Array(s)],[],v)}static Float(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Bool(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Decimal(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Date(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Time(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Timestamp(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Interval(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static FixedSizeBinary(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Binary(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static Utf8(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static List(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static FixedSizeList(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c?[c]:[])}static Struct(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c)}static Map(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static Union(e,t,i,n,s,c,v,w){let S=[void 0,void 0,he.toUint8Array(s),he.toArrayBufferView(e.ArrayType,c)];return e.mode===z.UnionMode.Sparse?new te(e,t,i,n,S,v):(S[z.BufferType.OFFSET]=he.toInt32Array(v),new te(e,t,i,n,S,w))}};Ri.Data=te;te.prototype.childData=Object.freeze([])});var Zu=V(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.valueToString=void 0;var d1=void 0;function f1(r){if(r===null)return"null";if(r===d1)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r)}Ao.valueToString=f1});var im=V(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.createIsValidFunction=void 0;var Xu=Zu(),h1=st();function p1(r){if(!r||r.length<=0)return function(n){return!0};let e="",t=r.filter(i=>i===i);return t.length>0&&(e=`
|
|
1
|
+
var duckdb=(()=>{var jS=Object.create;var io=Object.defineProperty;var wS=Object.getOwnPropertyDescriptor;var BS=Object.getOwnPropertyNames;var TS=Object.getPrototypeOf,IS=Object.prototype.hasOwnProperty;var Sy=r=>io(r,"__esModule",{value:!0});var V=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),SS=(r,e)=>{Sy(r);for(var t in e)io(r,t,{get:e[t],enumerable:!0})},DS=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of BS(e))!IS.call(r,i)&&i!=="default"&&io(r,i,{get:()=>e[i],enumerable:!(t=wS(e,i))||t.enumerable});return r},Dy=r=>DS(Sy(io(r!=null?jS(TS(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var gr=V(Fy=>{var A={};A.Offset;A.Table;A.SIZEOF_SHORT=2;A.SIZEOF_INT=4;A.FILE_IDENTIFIER_LENGTH=4;A.SIZE_PREFIX_LENGTH=4;A.Encoding={UTF8_BYTES:1,UTF16_STRING:2};A.int32=new Int32Array(2);A.float32=new Float32Array(A.int32.buffer);A.float64=new Float64Array(A.int32.buffer);A.isLittleEndian=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;A.Long=function(r,e){this.low=r|0,this.high=e|0};A.Long.create=function(r,e){return r==0&&e==0?A.Long.ZERO:new A.Long(r,e)};A.Long.prototype.toFloat64=function(){return(this.low>>>0)+this.high*4294967296};A.Long.prototype.equals=function(r){return this.low==r.low&&this.high==r.high};A.Long.ZERO=new A.Long(0,0);A.Builder=function(r){if(r)var e=r;else var e=1024;this.bb=A.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};A.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};A.Builder.prototype.forceDefaults=function(r){this.force_defaults=r};A.Builder.prototype.dataBuffer=function(){return this.bb};A.Builder.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())};A.Builder.prototype.prep=function(r,e){r>this.minalign&&(this.minalign=r);for(var t=~(this.bb.capacity()-this.space+e)+1&r-1;this.space<t+r+e;){var i=this.bb.capacity();this.bb=A.Builder.growByteBuffer(this.bb),this.space+=this.bb.capacity()-i}this.pad(t)};A.Builder.prototype.pad=function(r){for(var e=0;e<r;e++)this.bb.writeInt8(--this.space,0)};A.Builder.prototype.writeInt8=function(r){this.bb.writeInt8(this.space-=1,r)};A.Builder.prototype.writeInt16=function(r){this.bb.writeInt16(this.space-=2,r)};A.Builder.prototype.writeInt32=function(r){this.bb.writeInt32(this.space-=4,r)};A.Builder.prototype.writeInt64=function(r){this.bb.writeInt64(this.space-=8,r)};A.Builder.prototype.writeFloat32=function(r){this.bb.writeFloat32(this.space-=4,r)};A.Builder.prototype.writeFloat64=function(r){this.bb.writeFloat64(this.space-=8,r)};A.Builder.prototype.addInt8=function(r){this.prep(1,0),this.writeInt8(r)};A.Builder.prototype.addInt16=function(r){this.prep(2,0),this.writeInt16(r)};A.Builder.prototype.addInt32=function(r){this.prep(4,0),this.writeInt32(r)};A.Builder.prototype.addInt64=function(r){this.prep(8,0),this.writeInt64(r)};A.Builder.prototype.addFloat32=function(r){this.prep(4,0),this.writeFloat32(r)};A.Builder.prototype.addFloat64=function(r){this.prep(8,0),this.writeFloat64(r)};A.Builder.prototype.addFieldInt8=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt8(e),this.slot(r))};A.Builder.prototype.addFieldInt16=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt16(e),this.slot(r))};A.Builder.prototype.addFieldInt32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addInt32(e),this.slot(r))};A.Builder.prototype.addFieldInt64=function(r,e,t){(this.force_defaults||!e.equals(t))&&(this.addInt64(e),this.slot(r))};A.Builder.prototype.addFieldFloat32=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat32(e),this.slot(r))};A.Builder.prototype.addFieldFloat64=function(r,e,t){(this.force_defaults||e!=t)&&(this.addFloat64(e),this.slot(r))};A.Builder.prototype.addFieldOffset=function(r,e,t){(this.force_defaults||e!=t)&&(this.addOffset(e),this.slot(r))};A.Builder.prototype.addFieldStruct=function(r,e,t){e!=t&&(this.nested(e),this.slot(r))};A.Builder.prototype.nested=function(r){if(r!=this.offset())throw new Error("FlatBuffers: struct must be serialized inline.")};A.Builder.prototype.notNested=function(){if(this.isNested)throw new Error("FlatBuffers: object serialization must not be nested.")};A.Builder.prototype.slot=function(r){this.vtable[r]=this.offset()};A.Builder.prototype.offset=function(){return this.bb.capacity()-this.space};A.Builder.growByteBuffer=function(r){var e=r.capacity();if(e&3221225472)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.");var t=e<<1,i=A.ByteBuffer.allocate(t);return i.setPosition(t-e),i.bytes().set(r.bytes(),t-e),i};A.Builder.prototype.addOffset=function(r){this.prep(A.SIZEOF_INT,0),this.writeInt32(this.offset()-r+A.SIZEOF_INT)};A.Builder.prototype.startObject=function(r){this.notNested(),this.vtable==null&&(this.vtable=[]),this.vtable_in_use=r;for(var e=0;e<r;e++)this.vtable[e]=0;this.isNested=!0,this.object_start=this.offset()};A.Builder.prototype.endObject=function(){if(this.vtable==null||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject");this.addInt32(0);for(var r=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?r-this.vtable[e]:0);var i=2;this.addInt16(r-this.object_start);var n=(t+i)*A.SIZEOF_SHORT;this.addInt16(n);var s=0,c=this.space;e:for(e=0;e<this.vtables.length;e++){var v=this.bb.capacity()-this.vtables[e];if(n==this.bb.readInt16(v)){for(var I=A.SIZEOF_SHORT;I<n;I+=A.SIZEOF_SHORT)if(this.bb.readInt16(c+I)!=this.bb.readInt16(v+I))continue e;s=this.vtables[e];break}}return s?(this.space=this.bb.capacity()-r,this.bb.writeInt32(this.space,s-r)):(this.vtables.push(this.offset()),this.bb.writeInt32(this.bb.capacity()-r,this.offset()-r)),this.isNested=!1,r};A.Builder.prototype.finish=function(r,e,t){var i=t?A.SIZE_PREFIX_LENGTH:0;if(e){var n=e;if(this.prep(this.minalign,A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH+i),n.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var s=A.FILE_IDENTIFIER_LENGTH-1;s>=0;s--)this.writeInt8(n.charCodeAt(s))}this.prep(this.minalign,A.SIZEOF_INT+i),this.addOffset(r),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)};A.Builder.prototype.finishSizePrefixed=function(r,e){this.finish(r,e,!0)};A.Builder.prototype.requiredField=function(r,e){var t=this.bb.capacity()-r,i=t-this.bb.readInt32(t),n=this.bb.readInt16(i+e)!=0;if(!n)throw new Error("FlatBuffers: field "+e+" must be set")};A.Builder.prototype.startVector=function(r,e,t){this.notNested(),this.vector_num_elems=e,this.prep(A.SIZEOF_INT,r*e),this.prep(t,r*e)};A.Builder.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()};A.Builder.prototype.createString=function(r){if(r instanceof Uint8Array)var e=r;else for(var e=[],t=0;t<r.length;){var i,n=r.charCodeAt(t++);if(n<55296||n>=56320)i=n;else{var s=r.charCodeAt(t++);i=(n<<10)+s+(65536-(55296<<10)-56320)}i<128?e.push(i):(i<2048?e.push(i>>6&31|192):(i<65536?e.push(i>>12&15|224):e.push(i>>18&7|240,i>>12&63|128),e.push(i>>6&63|128)),e.push(i&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,v=this.bb.bytes();t<e.length;t++)v[c++]=e[t];return this.endVector()};A.Builder.prototype.createLong=function(r,e){return A.Long.create(r,e)};A.ByteBuffer=function(r){this.bytes_=r,this.position_=0};A.ByteBuffer.allocate=function(r){return new A.ByteBuffer(new Uint8Array(r))};A.ByteBuffer.prototype.clear=function(){this.position_=0};A.ByteBuffer.prototype.bytes=function(){return this.bytes_};A.ByteBuffer.prototype.position=function(){return this.position_};A.ByteBuffer.prototype.setPosition=function(r){this.position_=r};A.ByteBuffer.prototype.capacity=function(){return this.bytes_.length};A.ByteBuffer.prototype.readInt8=function(r){return this.readUint8(r)<<24>>24};A.ByteBuffer.prototype.readUint8=function(r){return this.bytes_[r]};A.ByteBuffer.prototype.readInt16=function(r){return this.readUint16(r)<<16>>16};A.ByteBuffer.prototype.readUint16=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8};A.ByteBuffer.prototype.readInt32=function(r){return this.bytes_[r]|this.bytes_[r+1]<<8|this.bytes_[r+2]<<16|this.bytes_[r+3]<<24};A.ByteBuffer.prototype.readUint32=function(r){return this.readInt32(r)>>>0};A.ByteBuffer.prototype.readInt64=function(r){return new A.Long(this.readInt32(r),this.readInt32(r+4))};A.ByteBuffer.prototype.readUint64=function(r){return new A.Long(this.readUint32(r),this.readUint32(r+4))};A.ByteBuffer.prototype.readFloat32=function(r){return A.int32[0]=this.readInt32(r),A.float32[0]};A.ByteBuffer.prototype.readFloat64=function(r){return A.int32[A.isLittleEndian?0:1]=this.readInt32(r),A.int32[A.isLittleEndian?1:0]=this.readInt32(r+4),A.float64[0]};A.ByteBuffer.prototype.writeInt8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeUint8=function(r,e){this.bytes_[r]=e};A.ByteBuffer.prototype.writeInt16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.ByteBuffer.prototype.writeUint16=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8};A.ByteBuffer.prototype.writeInt32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};A.ByteBuffer.prototype.writeUint32=function(r,e){this.bytes_[r]=e,this.bytes_[r+1]=e>>8,this.bytes_[r+2]=e>>16,this.bytes_[r+3]=e>>24};A.ByteBuffer.prototype.writeInt64=function(r,e){this.writeInt32(r,e.low),this.writeInt32(r+4,e.high)};A.ByteBuffer.prototype.writeUint64=function(r,e){this.writeUint32(r,e.low),this.writeUint32(r+4,e.high)};A.ByteBuffer.prototype.writeFloat32=function(r,e){A.float32[0]=e,this.writeInt32(r,A.int32[0])};A.ByteBuffer.prototype.writeFloat64=function(r,e){A.float64[0]=e,this.writeInt32(r,A.int32[A.isLittleEndian?0:1]),this.writeInt32(r+4,A.int32[A.isLittleEndian?1:0])};A.ByteBuffer.prototype.getBufferIdentifier=function(){if(this.bytes_.length<this.position_+A.SIZEOF_INT+A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.");for(var r="",e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)r+=String.fromCharCode(this.readInt8(this.position_+A.SIZEOF_INT+e));return r};A.ByteBuffer.prototype.__offset=function(r,e){var t=r-this.readInt32(r);return e<this.readInt16(t)?this.readInt16(t+e):0};A.ByteBuffer.prototype.__union=function(r,e){return r.bb_pos=e+this.readInt32(e),r.bb=this,r};A.ByteBuffer.prototype.__string=function(r,e){r+=this.readInt32(r);var t=this.readInt32(r),i="",n=0;if(r+=A.SIZEOF_INT,e===A.Encoding.UTF8_BYTES)return this.bytes_.subarray(r,r+t);for(;n<t;){var s,c=this.readUint8(r+n++);if(c<192)s=c;else{var v=this.readUint8(r+n++);if(c<224)s=(c&31)<<6|v&63;else{var I=this.readUint8(r+n++);if(c<240)s=(c&15)<<12|(v&63)<<6|I&63;else{var S=this.readUint8(r+n++);s=(c&7)<<18|(v&63)<<12|(I&63)<<6|S&63}}}s<65536?i+=String.fromCharCode(s):(s-=65536,i+=String.fromCharCode((s>>10)+55296,(s&(1<<10)-1)+56320))}return i};A.ByteBuffer.prototype.__indirect=function(r){return r+this.readInt32(r)};A.ByteBuffer.prototype.__vector=function(r){return r+this.readInt32(r)+A.SIZEOF_INT};A.ByteBuffer.prototype.__vector_len=function(r){return this.readInt32(r+this.readInt32(r))};A.ByteBuffer.prototype.__has_identifier=function(r){if(r.length!=A.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+A.FILE_IDENTIFIER_LENGTH);for(var e=0;e<A.FILE_IDENTIFIER_LENGTH;e++)if(r.charCodeAt(e)!=this.readInt8(this.position_+A.SIZEOF_INT+e))return!1;return!0};A.ByteBuffer.prototype.createLong=function(r,e){return A.Long.create(r,e)};Fy.flatbuffers=A});var My=V(vu=>{"use strict";function vr(r,e,t){return e<=r&&r<=t}function no(r){if(r===void 0)return{};if(r===Object(r))return r;throw TypeError("Could not convert argument to dictionary")}function VS(r){for(var e=String(r),t=e.length,i=0,n=[];i<t;){var s=e.charCodeAt(i);if(s<55296||s>57343)n.push(s);else if(56320<=s&&s<=57343)n.push(65533);else if(55296<=s&&s<=56319)if(i===t-1)n.push(65533);else{var c=r.charCodeAt(i+1);if(56320<=c&&c<=57343){var v=s&1023,I=c&1023;n.push(65536+(v<<10)+I),i+=1}else n.push(65533)}i+=1}return n}function US(r){for(var e="",t=0;t<r.length;++t){var i=r[t];i<=65535?e+=String.fromCharCode(i):(i-=65536,e+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return e}var so=-1;function bu(r){this.tokens=[].slice.call(r)}bu.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():so},prepend:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(r)},push:function(r){if(Array.isArray(r))for(var e=r;e.length;)this.tokens.push(e.shift());else this.tokens.push(r)}};var en=-1;function gu(r,e){if(r)throw TypeError("Decoder error");return e||65533}var oo="utf-8";function ao(r,e){if(!(this instanceof ao))return new ao(r,e);if(r=r!==void 0?String(r).toLowerCase():oo,r!==oo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(e.fatal),this._ignoreBOM=Boolean(e.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}ao.prototype={decode:function(e,t){var i;typeof e=="object"&&e instanceof ArrayBuffer?i=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):i=new Uint8Array(0),t=no(t),this._streaming||(this._decoder=new CS({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var n=new bu(i),s=[],c;!n.endOfStream()&&(c=this._decoder.handler(n,n.read()),c!==en);)c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c));if(!this._streaming){do{if(c=this._decoder.handler(n,n.read()),c===en)break;c!==null&&(Array.isArray(c)?s.push.apply(s,c):s.push(c))}while(!n.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),US(s)}};function uo(r,e){if(!(this instanceof uo))return new uo(r,e);if(r=r!==void 0?String(r).toLowerCase():oo,r!==oo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(e.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}uo.prototype={encode:function(e,t){e=e?String(e):"",t=no(t),this._streaming||(this._encoder=new PS(this._options)),this._streaming=Boolean(t.stream);for(var i=[],n=new bu(VS(e)),s;!n.endOfStream()&&(s=this._encoder.handler(n,n.read()),s!==en);)Array.isArray(s)?i.push.apply(i,s):i.push(s);if(!this._streaming){for(;s=this._encoder.handler(n,n.read()),s!==en;)Array.isArray(s)?i.push.apply(i,s):i.push(s);this._encoder=null}return new Uint8Array(i)}};function CS(r){var e=r.fatal,t=0,i=0,n=0,s=128,c=191;this.handler=function(v,I){if(I===so&&n!==0)return n=0,gu(e);if(I===so)return en;if(n===0){if(vr(I,0,127))return I;if(vr(I,194,223))n=1,t=I-192;else if(vr(I,224,239))I===224&&(s=160),I===237&&(c=159),n=2,t=I-224;else if(vr(I,240,244))I===240&&(s=144),I===244&&(c=143),n=3,t=I-240;else return gu(e);return t=t<<6*n,null}if(!vr(I,s,c))return t=n=i=0,s=128,c=191,v.prepend(I),gu(e);if(s=128,c=191,i+=1,t+=I-128<<6*(n-i),i!==n)return null;var S=t;return t=n=i=0,S}}function PS(r){var e=r.fatal;this.handler=function(t,i){if(i===so)return en;if(vr(i,0,127))return i;var n,s;vr(i,128,2047)?(n=1,s=192):vr(i,2048,65535)?(n=2,s=224):vr(i,65536,1114111)&&(n=3,s=240);for(var c=[(i>>6*n)+s];n>0;){var v=i>>6*(n-1);c.push(128|v&63),n-=1}return c}}vu.TextEncoder=uo;vu.TextDecoder=ao});var Ti=V(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.encodeUtf8=tn.decodeUtf8=void 0;var Vy=My(),kS=new(typeof TextDecoder!="undefined"?TextDecoder:Vy.TextDecoder)("utf-8");tn.decodeUtf8=r=>kS.decode(r);var RS=new(typeof TextEncoder!="undefined"?TextEncoder:Vy.TextEncoder);tn.encodeUtf8=r=>RS.encode(r)});var rn=V(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.AsyncQueue=lt.ReadableInterop=lt.ArrowJSON=lt.ITERATOR_DONE=void 0;var Uy=ns();lt.ITERATOR_DONE=Object.freeze({done:!0,value:void 0});var Cy=class{constructor(e){this._json=e}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}};lt.ArrowJSON=Cy;var ju=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())}};lt.ReadableInterop=ju;var Py=class extends ju{constructor(){super();this._values=[],this.resolvers=[],this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}get closed(){return this._closedPromise}async cancel(e){await 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(lt.ITERATOR_DONE);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Uy.default.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Uy.default.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}async throw(e){return await this.abort(e),lt.ITERATOR_DONE}async return(e){return await this.close(),lt.ITERATOR_DONE}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await 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,i)=>{this.resolvers.push({resolve:t,reject:i})}):Promise.resolve(lt.ITERATOR_DONE)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error(`${this} is closed`)}};lt.AsyncQueue=Py});var st=V(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.isReadableNodeStream=q.isWritableNodeStream=q.isReadableDOMStream=q.isWritableDOMStream=q.isFetchResponse=q.isFSReadStream=q.isFileHandle=q.isUnderlyingSink=q.isIteratorResult=q.isArrayLike=q.isArrowJSON=q.isAsyncIterable=q.isIterable=q.isObservable=q.isPromise=q.isObject=q.BigUint64ArrayAvailable=q.BigUint64Array=q.BigInt64ArrayAvailable=q.BigInt64Array=q.BigIntAvailable=q.BigInt=void 0;var co=rn(),[NS,xS]=(()=>{let r=()=>{throw new Error("BigInt is not available in this environment")};function e(){throw r()}return e.asIntN=()=>{throw r()},e.asUintN=()=>{throw r()},typeof BigInt!="undefined"?[BigInt,!0]:[e,!1]})();q.BigInt=NS;q.BigIntAvailable=xS;var[ES,LS]=(()=>{let r=()=>{throw new Error("BigInt64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigInt64Array!="undefined"?[BigInt64Array,!0]:[e,!1]})();q.BigInt64Array=ES;q.BigInt64ArrayAvailable=LS;var[qS,zS]=(()=>{let r=()=>{throw new Error("BigUint64Array is not available in this environment")};class e{static get BYTES_PER_ELEMENT(){return 8}static of(){throw r()}static from(){throw r()}constructor(){throw r()}}return typeof BigUint64Array!="undefined"?[BigUint64Array,!0]:[e,!1]})();q.BigUint64Array=qS;q.BigUint64ArrayAvailable=zS;var wu=r=>typeof r=="number",ky=r=>typeof r=="boolean",et=r=>typeof r=="function";q.isObject=r=>r!=null&&Object(r)===r;q.isPromise=r=>q.isObject(r)&&et(r.then);q.isObservable=r=>q.isObject(r)&&et(r.subscribe);q.isIterable=r=>q.isObject(r)&&et(r[Symbol.iterator]);q.isAsyncIterable=r=>q.isObject(r)&&et(r[Symbol.asyncIterator]);q.isArrowJSON=r=>q.isObject(r)&&q.isObject(r.schema);q.isArrayLike=r=>q.isObject(r)&&wu(r.length);q.isIteratorResult=r=>q.isObject(r)&&"done"in r&&"value"in r;q.isUnderlyingSink=r=>q.isObject(r)&&et(r.abort)&&et(r.close)&&et(r.start)&&et(r.write);q.isFileHandle=r=>q.isObject(r)&&et(r.stat)&&wu(r.fd);q.isFSReadStream=r=>q.isReadableNodeStream(r)&&wu(r.bytesRead);q.isFetchResponse=r=>q.isObject(r)&&q.isReadableDOMStream(r.body);q.isWritableDOMStream=r=>q.isObject(r)&&et(r.abort)&&et(r.getWriter)&&!(r instanceof co.ReadableInterop);q.isReadableDOMStream=r=>q.isObject(r)&&et(r.cancel)&&et(r.getReader)&&!(r instanceof co.ReadableInterop);q.isWritableNodeStream=r=>q.isObject(r)&&et(r.end)&&et(r.write)&&ky(r.writable)&&!(r instanceof co.ReadableInterop);q.isReadableNodeStream=r=>q.isObject(r)&&et(r.read)&&et(r.pipe)&&ky(r.readable)&&!(r instanceof co.ReadableInterop)});var Ye=V(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.compareArrayLike=E.rebaseValueOffsets=E.toUint8ClampedArrayAsyncIterator=E.toFloat64ArrayAsyncIterator=E.toFloat32ArrayAsyncIterator=E.toUint32ArrayAsyncIterator=E.toUint16ArrayAsyncIterator=E.toUint8ArrayAsyncIterator=E.toInt32ArrayAsyncIterator=E.toInt16ArrayAsyncIterator=E.toInt8ArrayAsyncIterator=E.toArrayBufferViewAsyncIterator=E.toUint8ClampedArrayIterator=E.toFloat64ArrayIterator=E.toFloat32ArrayIterator=E.toUint32ArrayIterator=E.toUint16ArrayIterator=E.toUint8ArrayIterator=E.toInt32ArrayIterator=E.toInt16ArrayIterator=E.toInt8ArrayIterator=E.toArrayBufferViewIterator=E.toUint8ClampedArray=E.toFloat64Array=E.toFloat32Array=E.toBigUint64Array=E.toUint32Array=E.toUint16Array=E.toUint8Array=E.toBigInt64Array=E.toInt32Array=E.toInt16Array=E.toInt8Array=E.toArrayBufferView=E.joinUint8Arrays=E.memcpy=void 0;var WS=gr(),HS=Ti(),YS=WS.flatbuffers.ByteBuffer,Ii=st(),Bu=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:ArrayBuffer;function $S(r){let e=r[0]?[r[0]]:[],t,i,n,s;for(let c,v,I=0,S=0,U=r.length;++I<U;){if(c=e[S],v=r[I],!c||!v||c.buffer!==v.buffer||v.byteOffset<c.byteOffset){v&&(e[++S]=v);continue}if({byteOffset:t,byteLength:n}=c,{byteOffset:i,byteLength:s}=v,t+n<i||i+s<t){v&&(e[++S]=v);continue}e[S]=new Uint8Array(c.buffer,t,i-t+s)}return e}function Tu(r,e,t=0,i=e.byteLength){let n=r.byteLength,s=new Uint8Array(r.buffer,r.byteOffset,n),c=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,n));return s.set(c,t),r}E.memcpy=Tu;function GS(r,e){let t=$S(r),i=t.reduce((U,G)=>U+G.byteLength,0),n,s,c,v=0,I=-1,S=Math.min(e||1/0,i);for(let U=t.length;++I<U;){if(n=t[I],s=n.subarray(0,Math.min(n.length,S-v)),S<=v+s.length){s.length<n.length?t[I]=n.subarray(s.length):s.length===n.length&&I++,c?Tu(c,s,v):c=s;break}Tu(c||(c=new Uint8Array(S)),s,v),v+=s.length}return[c||new Uint8Array(0),t.slice(I),i-(c?c.byteLength:0)]}E.joinUint8Arrays=GS;function ut(r,e){let t=Ii.isIteratorResult(e)?e.value:e;return t instanceof r?r===Uint8Array?new r(t.buffer,t.byteOffset,t.byteLength):t:t?(typeof t=="string"&&(t=HS.encodeUtf8(t)),t instanceof ArrayBuffer?new r(t):t instanceof Bu?new r(t):t instanceof YS?ut(r,t.bytes()):ArrayBuffer.isView(t)?t.byteLength<=0?new r(0):new r(t.buffer,t.byteOffset,t.byteLength/r.BYTES_PER_ELEMENT):r.from(t)):new r(0)}E.toArrayBufferView=ut;E.toInt8Array=r=>ut(Int8Array,r);E.toInt16Array=r=>ut(Int16Array,r);E.toInt32Array=r=>ut(Int32Array,r);E.toBigInt64Array=r=>ut(Ii.BigInt64Array,r);E.toUint8Array=r=>ut(Uint8Array,r);E.toUint16Array=r=>ut(Uint16Array,r);E.toUint32Array=r=>ut(Uint32Array,r);E.toBigUint64Array=r=>ut(Ii.BigUint64Array,r);E.toFloat32Array=r=>ut(Float32Array,r);E.toFloat64Array=r=>ut(Float64Array,r);E.toUint8ClampedArray=r=>ut(Uint8ClampedArray,r);var Iu=r=>(r.next(),r);function*Kt(r,e){let t=function*(n){yield n},i=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Bu?t(e):Ii.isIterable(e)?e:t(e);return yield*Iu(function*(n){let s=null;do s=n.next(yield ut(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}E.toArrayBufferViewIterator=Kt;E.toInt8ArrayIterator=r=>Kt(Int8Array,r);E.toInt16ArrayIterator=r=>Kt(Int16Array,r);E.toInt32ArrayIterator=r=>Kt(Int32Array,r);E.toUint8ArrayIterator=r=>Kt(Uint8Array,r);E.toUint16ArrayIterator=r=>Kt(Uint16Array,r);E.toUint32ArrayIterator=r=>Kt(Uint32Array,r);E.toFloat32ArrayIterator=r=>Kt(Float32Array,r);E.toFloat64ArrayIterator=r=>Kt(Float64Array,r);E.toUint8ClampedArrayIterator=r=>Kt(Uint8ClampedArray,r);async function*xt(r,e){if(Ii.isPromise(e))return yield*xt(r,await e);let t=async function*(s){yield await s},i=async function*(s){yield*Iu(function*(c){let v=null;do v=c.next(yield v&&v.value);while(!v.done)}(s[Symbol.iterator]()))},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof Bu?t(e):Ii.isIterable(e)?i(e):Ii.isAsyncIterable(e)?e:t(e);return yield*Iu(async function*(s){let c=null;do c=await s.next(yield ut(r,c));while(!c.done)}(n[Symbol.asyncIterator]())),new r}E.toArrayBufferViewAsyncIterator=xt;E.toInt8ArrayAsyncIterator=r=>xt(Int8Array,r);E.toInt16ArrayAsyncIterator=r=>xt(Int16Array,r);E.toInt32ArrayAsyncIterator=r=>xt(Int32Array,r);E.toUint8ArrayAsyncIterator=r=>xt(Uint8Array,r);E.toUint16ArrayAsyncIterator=r=>xt(Uint16Array,r);E.toUint32ArrayAsyncIterator=r=>xt(Uint32Array,r);E.toFloat32ArrayAsyncIterator=r=>xt(Float32Array,r);E.toFloat64ArrayAsyncIterator=r=>xt(Float64Array,r);E.toUint8ClampedArrayAsyncIterator=r=>xt(Uint8ClampedArray,r);function JS(r,e,t){if(r!==0){t=t.slice(0,e+1);for(let i=-1;++i<=e;)t[i]+=r}return t}E.rebaseValueOffsets=JS;function KS(r,e){let t=0,i=r.length;if(i!==e.length)return!1;if(i>0)do if(r[t]!==e[t])return!1;while(++t<i);return!0}E.compareArrayLike=KS});var ns=V(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});var ct=Ye();Du.default={fromIterable(r){return lo(ZS(r))},fromAsyncIterable(r){return lo(XS(r))},fromDOMStream(r){return lo(QS(r))},fromNodeStream(r){return lo(e1(r))},toDOMStream(r,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(r,e){throw new Error('"toNodeStream" not available in this environment')}};var lo=r=>(r.next(),r);function*ZS(r){let e,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayIterator(r)[Symbol.iterator]();try{do if({done:e,value:n}=isNaN(c-v)?S.next(void 0):S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&S.throw(U)}finally{t===!1&&typeof S.return=="function"&&S.return(null)}return null}async function*XS(r){let e,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=ct.toUint8ArrayAsyncIterator(r)[Symbol.asyncIterator]();try{do if({done:e,value:n}=isNaN(c-v)?await S.next(void 0):await S.next(c-v),!e&&n.byteLength>0&&(i.push(n),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&typeof S.throw=="function"&&await S.throw(U)}finally{t===!1&&typeof S.return=="function"&&await S.return(new Uint8Array(0))}return null}async function*QS(r){let e=!1,t=!1,i=[],n,s,c,v=0;function I(){return s==="peek"?ct.joinUint8Arrays(i,c)[0]:([n,i,v]=ct.joinUint8Arrays(i,c),n)}({cmd:s,size:c}=yield null);let S=new Ry(r);try{do if({done:e,value:n}=isNaN(c-v)?await S.read(void 0):await S.read(c-v),!e&&n.byteLength>0&&(i.push(ct.toUint8Array(n)),v+=n.byteLength),e||c<=v)do({cmd:s,size:c}=yield I());while(c<v);while(!e)}catch(U){(t=!0)&&await S.cancel(U)}finally{t===!1?await S.cancel():r.locked&&S.releaseLock()}return null}var Ry=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}async cancel(e){let{reader:t,source:i}=this;t&&await t.cancel(e).catch(()=>{}),i&&i.locked&&this.releaseLock()}async read(e){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=!this.supportsBYOB||typeof e!="number"?await this.getDefaultReader().read():await this.readFromBYOBReader(e);return!t.done&&(t.value=ct.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}async readFromBYOBReader(e){return await Ny(this.getBYOBReader(),new ArrayBuffer(e),0,e)}};async function Ny(r,e,t,i){if(t>=i)return{done:!1,value:new Uint8Array(e,0,i)};let{done:n,value:s}=await r.read(new Uint8Array(e,t,i-t));return(t+=s.byteLength)<i&&!n?await Ny(r,s.buffer,t,i):{done:n,value:new Uint8Array(s.buffer,0,t)}}var Su=(r,e)=>{let t=n=>i([e,n]),i;return[e,t,new Promise(n=>(i=n)&&r.once(e,t))]};async function*e1(r){let e=[],t="error",i=!1,n=null,s,c,v=0,I=[],S;function U(){return s==="peek"?ct.joinUint8Arrays(I,c)[0]:([S,I,v]=ct.joinUint8Arrays(I,c),S)}if({cmd:s,size:c}=yield null,r.isTTY)return yield new Uint8Array(0),null;try{e[0]=Su(r,"end"),e[1]=Su(r,"error");do{if(e[2]=Su(r,"readable"),[t,n]=await Promise.race(e.map(me=>me[2])),t==="error")break;if((i=t==="end")||(isFinite(c-v)?(S=ct.toUint8Array(r.read(c-v)),S.byteLength<c-v&&(S=ct.toUint8Array(r.read(void 0)))):S=ct.toUint8Array(r.read(void 0)),S.byteLength>0&&(I.push(S),v+=S.byteLength)),i||c<=v)do({cmd:s,size:c}=yield U());while(c<v)}while(!i)}finally{await G(e,t==="error"?n:null)}return null;function G(me,fe){return S=I=null,new Promise((Gt,Cr)=>{for(let[_r,Ji]of me)r.off(_r,Ji);try{let _r=r.destroy;_r&&_r.call(r,fe),fe=void 0}catch(_r){fe=_r||fe}finally{fe!=null?Cr(fe):Gt()}})}}});var Re=V(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.Vector=nn.AbstractVector=void 0;var fo=class{};nn.AbstractVector=fo;nn.Vector=fo;fo.prototype.data=null});var $r=V(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 Ie=gr(),t1;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(t1=N.MetadataVersion||(N.MetadataVersion={}));var r1;(function(r){r[r.UNUSED=0]="UNUSED",r[r.DICTIONARY_REPLACEMENT=1]="DICTIONARY_REPLACEMENT",r[r.COMPRESSED_BODY=2]="COMPRESSED_BODY"})(r1=N.Feature||(N.Feature={}));var Ou;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(Ou=N.UnionMode||(N.UnionMode={}));var Au;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(Au=N.Precision||(N.Precision={}));var Fu;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Fu=N.DateUnit||(N.DateUnit={}));var Si;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Si=N.TimeUnit||(N.TimeUnit={}));var Mu;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME"})(Mu=N.IntervalUnit||(N.IntervalUnit={}));var Vu;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList"})(Vu=N.Type||(N.Type={}));var Uu;(function(r){r[r.DenseArray=0]="DenseArray"})(Uu=N.DictionaryKind||(N.DictionaryKind={}));var Cu;(function(r){r[r.Little=0]="Little",r[r.Big=1]="Big"})(Cu=N.Endianness||(N.Endianness={}));var Di=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 Di).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Di).__init(e.readInt32(e.position())+e.position(),e)}static startNull(e){e.startObject(0)}static endNull(e){return e.endObject()}static createNull(e){return Di.startNull(e),Di.endNull(e)}};N.Null=Di;var Oi=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 Oi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsStruct_(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Oi).__init(e.readInt32(e.position())+e.position(),e)}static startStruct_(e){e.startObject(0)}static endStruct_(e){return e.endObject()}static createStruct_(e){return Oi.startStruct_(e),Oi.endStruct_(e)}};N.Struct_=Oi;var Ai=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 Ai).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ai).__init(e.readInt32(e.position())+e.position(),e)}static startList(e){e.startObject(0)}static endList(e){return e.endObject()}static createList(e){return Ai.startList(e),Ai.endList(e)}};N.List=Ai;var Fi=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 Fi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Fi).__init(e.readInt32(e.position())+e.position(),e)}static startLargeList(e){e.startObject(0)}static endLargeList(e){return e.endObject()}static createLargeList(e){return Fi.startLargeList(e),Fi.endLargeList(e)}};N.LargeList=Fi;var Er=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 Er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Er).__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 Er.startFixedSizeList(e),Er.addListSize(e,t),Er.endFixedSizeList(e)}};N.FixedSizeList=Er;var Lr=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 Lr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lr).__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 Lr.startMap(e),Lr.addKeysSorted(e,t),Lr.endMap(e)}};N.Map=Lr;var jr=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 jr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUnion(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new jr).__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):Ou.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,Ou.Sparse)}static addTypeIds(e,t){e.addFieldOffset(1,t,0)}static createTypeIdsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addInt32(t[i]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,i){return jr.startUnion(e),jr.addMode(e,t),jr.addTypeIds(e,i),jr.endUnion(e)}};N.Union=jr;var Zt=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 Zt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInt(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Zt).__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,i){return Zt.startInt(e),Zt.addBitWidth(e,t),Zt.addIsSigned(e,i),Zt.endInt(e)}};N.Int=Zt;var qr=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 qr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFloatingPoint(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new qr).__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):Au.HALF}static startFloatingPoint(e){e.startObject(1)}static addPrecision(e,t){e.addFieldInt16(0,t,Au.HALF)}static endFloatingPoint(e){return e.endObject()}static createFloatingPoint(e,t){return qr.startFloatingPoint(e),qr.addPrecision(e,t),qr.endFloatingPoint(e)}};N.FloatingPoint=qr;var Mi=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 Mi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Mi).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return Mi.startUtf8(e),Mi.endUtf8(e)}};N.Utf8=Mi;var Vi=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 Vi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Vi).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(e){e.startObject(0)}static endBinary(e){return e.endObject()}static createBinary(e){return Vi.startBinary(e),Vi.endBinary(e)}};N.Binary=Vi;var Ui=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 Ui).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ui).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(e){e.startObject(0)}static endLargeUtf8(e){return e.endObject()}static createLargeUtf8(e){return Ui.startLargeUtf8(e),Ui.endLargeUtf8(e)}};N.LargeUtf8=Ui;var Ci=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 Ci).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ci).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(e){e.startObject(0)}static endLargeBinary(e){return e.endObject()}static createLargeBinary(e){return Ci.startLargeBinary(e),Ci.endLargeBinary(e)}};N.LargeBinary=Ci;var zr=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 zr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new zr).__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 zr.startFixedSizeBinary(e),zr.addByteWidth(e,t),zr.endFixedSizeBinary(e)}};N.FixedSizeBinary=zr;var Pi=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 Pi).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Pi).__init(e.readInt32(e.position())+e.position(),e)}static startBool(e){e.startObject(0)}static endBool(e){return e.endObject()}static createBool(e){return Pi.startBool(e),Pi.endBool(e)}};N.Bool=Pi;var Xt=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 Xt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Xt).__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,i,n){return Xt.startDecimal(e),Xt.addPrecision(e,t),Xt.addScale(e,i),Xt.addBitWidth(e,n),Xt.endDecimal(e)}};N.Decimal=Xt;var Wr=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 Wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Wr).__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):Fu.MILLISECOND}static startDate(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Fu.MILLISECOND)}static endDate(e){return e.endObject()}static createDate(e,t){return Wr.startDate(e),Wr.addUnit(e,t),Wr.endDate(e)}};N.Date=Wr;var wr=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 wr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTime(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new wr).__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):Si.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,Si.MILLISECOND)}static addBitWidth(e,t){e.addFieldInt32(1,t,32)}static endTime(e){return e.endObject()}static createTime(e,t,i){return wr.startTime(e),wr.addUnit(e,t),wr.addBitWidth(e,i),wr.endTime(e)}};N.Time=wr;var Br=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 Br).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsTimestamp(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Br).__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):Si.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,Si.SECOND)}static addTimezone(e,t){e.addFieldOffset(1,t,0)}static endTimestamp(e){return e.endObject()}static createTimestamp(e,t,i){return Br.startTimestamp(e),Br.addUnit(e,t),Br.addTimezone(e,i),Br.endTimestamp(e)}};N.Timestamp=Br;var Hr=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 Hr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsInterval(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Hr).__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):Mu.YEAR_MONTH}static startInterval(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Mu.YEAR_MONTH)}static endInterval(e){return e.endObject()}static createInterval(e,t){return Hr.startInterval(e),Hr.addUnit(e,t),Hr.endInterval(e)}};N.Interval=Hr;var Yr=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 Yr).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Yr).__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):Si.MILLISECOND}static startDuration(e){e.startObject(1)}static addUnit(e,t){e.addFieldInt16(0,t,Si.MILLISECOND)}static endDuration(e){return e.endObject()}static createDuration(e,t){return Yr.startDuration(e),Yr.addUnit(e,t),Yr.endDuration(e)}};N.Duration=Yr;var Et=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 Et).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsKeyValue(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Et).__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,i){return Et.startKeyValue(e),Et.addKey(e,t),Et.addValue(e,i),Et.endKeyValue(e)}};N.KeyValue=Et;var bt=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 bt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryEncoding(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new bt).__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 Zt).__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):Uu.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,Uu.DenseArray)}static endDictionaryEncoding(e){return e.endObject()}static createDictionaryEncoding(e,t,i,n,s){return bt.startDictionaryEncoding(e),bt.addId(e,t),bt.addIndexType(e,i),bt.addIsOrdered(e,n),bt.addDictionaryKind(e,s),bt.endDictionaryEncoding(e)}};N.DictionaryEncoding=bt;var ot=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 ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new ot).__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):Vu.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 bt).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){let i=this.bb.__offset(this.bb_pos,14);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,16);return i?(t||new Et).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,Vu.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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}static createField(e,t,i,n,s,c,v,I){return ot.startField(e),ot.addName(e,t),ot.addNullable(e,i),ot.addTypeType(e,n),ot.addType(e,s),ot.addDictionary(e,c),ot.addChildren(e,v),ot.addCustomMetadata(e,I),ot.endField(e)}};N.Field=ot;var xy=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,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};N.Buffer=xy;var Lt=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 Lt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+Ie.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Lt).__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):Cu.Little}fields(e,t){let i=this.bb.__offset(this.bb_pos,6);return i?(t||new ot).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,8);return i?(t||new Et).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,Cu.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let i=t.length-1;i>=0;i--)e.addOffset(t[i]);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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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 i=t.length-1;i>=0;i--)e.addInt64(t[i]);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,i,n,s){return Lt.startSchema(e),Lt.addEndianness(e,t),Lt.addFields(e,i),Lt.addCustomMetadata(e,n),Lt.addFeatures(e,s),Lt.endSchema(e)}};N.Schema=Lt});var yo=V(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.Message=Ne.DictionaryBatch=Ne.RecordBatch=Ne.BodyCompression=Ne.FieldNode=Ne.MessageHeader=Ne.BodyCompressionMethod=Ne.CompressionType=void 0;var ho=gr(),po=$r(),Pu;(function(r){r[r.LZ4_FRAME=0]="LZ4_FRAME",r[r.ZSTD=1]="ZSTD"})(Pu=Ne.CompressionType||(Ne.CompressionType={}));var ku;(function(r){r[r.BUFFER=0]="BUFFER"})(ku=Ne.BodyCompressionMethod||(Ne.BodyCompressionMethod={}));var Ru;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(Ru=Ne.MessageHeader||(Ne.MessageHeader={}));var Nu=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,i){return e.prep(8,16),e.writeInt64(i),e.writeInt64(t),e.offset()}};Ne.FieldNode=Nu;var Qt=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 Qt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBodyCompression(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Qt).__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):Pu.LZ4_FRAME}method(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readInt8(this.bb_pos+e):ku.BUFFER}static startBodyCompression(e){e.startObject(2)}static addCodec(e,t){e.addFieldInt8(0,t,Pu.LZ4_FRAME)}static addMethod(e,t){e.addFieldInt8(1,t,ku.BUFFER)}static endBodyCompression(e){return e.endObject()}static createBodyCompression(e,t,i){return Qt.startBodyCompression(e),Qt.addCodec(e,t),Qt.addMethod(e,i),Qt.endBodyCompression(e)}};Ne.BodyCompression=Qt;var gt=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 gt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new gt).__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 i=this.bb.__offset(this.bb_pos,6);return i?(t||new Nu).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,8);return i?(t||new po.Buffer).__init(this.bb.__vector(this.bb_pos+i)+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 Qt).__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,i,n,s){return gt.startRecordBatch(e),gt.addLength(e,t),gt.addNodes(e,i),gt.addBuffers(e,n),gt.addCompression(e,s),gt.endRecordBatch(e)}};Ne.RecordBatch=gt;var er=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 er).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new er).__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 gt).__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,i,n){return er.startDictionaryBatch(e),er.addId(e,t),er.addData(e,i),er.addIsDelta(e,n),er.endDictionaryBatch(e)}};Ne.DictionaryBatch=er;var vt=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 vt).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+ho.flatbuffers.SIZE_PREFIX_LENGTH),(t||new vt).__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):po.MetadataVersion.V1}headerType(){let e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):Ru.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 i=this.bb.__offset(this.bb_pos,12);return i?(t||new po.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,po.MetadataVersion.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,Ru.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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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,i,n,s,c){return vt.startMessage(e),vt.addVersion(e,t),vt.addHeaderType(e,i),vt.addHeader(e,n),vt.addBodyLength(e,s),vt.addCustomMetadata(e,c),vt.endMessage(e)}};Ne.Message=vt});var Te=V(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.BufferType=Me.Type=Me.MessageHeader=Me.MetadataVersion=Me.IntervalUnit=Me.UnionMode=Me.Precision=Me.TimeUnit=Me.DateUnit=void 0;var sn=$r();Object.defineProperty(Me,"DateUnit",{enumerable:!0,get:function(){return sn.DateUnit}});Object.defineProperty(Me,"TimeUnit",{enumerable:!0,get:function(){return sn.TimeUnit}});Object.defineProperty(Me,"Precision",{enumerable:!0,get:function(){return sn.Precision}});Object.defineProperty(Me,"UnionMode",{enumerable:!0,get:function(){return sn.UnionMode}});Object.defineProperty(Me,"IntervalUnit",{enumerable:!0,get:function(){return sn.IntervalUnit}});Object.defineProperty(Me,"MetadataVersion",{enumerable:!0,get:function(){return sn.MetadataVersion}});var i1=yo();Object.defineProperty(Me,"MessageHeader",{enumerable:!0,get:function(){return i1.MessageHeader}});var n1;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth"})(n1=Me.Type||(Me.Type={}));var s1;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(s1=Me.BufferType||(Me.BufferType={}))});var tr=V(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.popcnt_uint32=Ee.popcnt_array=Ee.popcnt_bit_range=Ee.BitIterator=Ee.packBools=Ee.truncateBitmap=Ee.setBool=Ee.getBit=Ee.getBool=void 0;function Ey(r,e,t,i){return(t&1<<i)!=0}Ee.getBool=Ey;function Ly(r,e,t,i){return(t&1<<i)>>i}Ee.getBit=Ly;function o1(r,e,t){return t?!!(r[e>>3]|=1<<e%8)||!0:!(r[e>>3]&=~(1<<e%8))&&!1}Ee.setBool=o1;function a1(r,e,t){let i=t.byteLength+7&~7;if(r>0||t.byteLength<i){let n=new Uint8Array(i);return n.set(r%8==0?t.subarray(r>>3):qy(new mo(t,r,e,null,Ey)).subarray(0,i)),n}return t}Ee.truncateBitmap=a1;function qy(r){let e=[],t=0,i=0,n=0;for(let c of r)c&&(n|=1<<i),++i==8&&(e[t++]=n,n=i=0);(t===0||i>0)&&(e[t++]=n);let s=new Uint8Array(e.length+7&~7);return s.set(e),s}Ee.packBools=qy;var mo=class{constructor(e,t,i,n,s){this.bytes=e,this.length=i,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}};Ee.BitIterator=mo;function xu(r,e,t){if(t-e<=0)return 0;if(t-e<8){let s=0;for(let c of new mo(r,e,t-e,r,Ly))s+=c;return s}let i=t>>3<<3,n=e+(e%8==0?0:8-e%8);return xu(r,e,n)+xu(r,i,t)+zy(r,n>>3,i-n>>3)}Ee.popcnt_bit_range=xu;function zy(r,e,t){let i=0,n=e|0,s=new DataView(r.buffer,r.byteOffset,r.byteLength),c=t===void 0?r.byteLength:n+t;for(;c-n>=4;)i+=_o(s.getUint32(n)),n+=4;for(;c-n>=2;)i+=_o(s.getUint16(n)),n+=2;for(;c-n>=1;)i+=_o(s.getUint8(n)),n+=1;return i}Ee.popcnt_array=zy;function _o(r){let e=r|0;return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}Ee.popcnt_uint32=_o});var be=V(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 L=Te(),Ve=class{static isNull(e){return e&&e.typeId===L.Type.Null}static isInt(e){return e&&e.typeId===L.Type.Int}static isFloat(e){return e&&e.typeId===L.Type.Float}static isBinary(e){return e&&e.typeId===L.Type.Binary}static isUtf8(e){return e&&e.typeId===L.Type.Utf8}static isBool(e){return e&&e.typeId===L.Type.Bool}static isDecimal(e){return e&&e.typeId===L.Type.Decimal}static isDate(e){return e&&e.typeId===L.Type.Date}static isTime(e){return e&&e.typeId===L.Type.Time}static isTimestamp(e){return e&&e.typeId===L.Type.Timestamp}static isInterval(e){return e&&e.typeId===L.Type.Interval}static isList(e){return e&&e.typeId===L.Type.List}static isStruct(e){return e&&e.typeId===L.Type.Struct}static isUnion(e){return e&&e.typeId===L.Type.Union}static isFixedSizeBinary(e){return e&&e.typeId===L.Type.FixedSizeBinary}static isFixedSizeList(e){return e&&e.typeId===L.Type.FixedSizeList}static isMap(e){return e&&e.typeId===L.Type.Map}static isDictionary(e){return e&&e.typeId===L.Type.Dictionary}get typeId(){return L.Type.NONE}};k.DataType=Ve;Ve[Symbol.toStringTag]=(r=>(r.children=null,r.ArrayType=Array,r[Symbol.toStringTag]="DataType"))(Ve.prototype);var bo=class extends Ve{toString(){return"Null"}get typeId(){return L.Type.Null}};k.Null=bo;bo[Symbol.toStringTag]=(r=>r[Symbol.toStringTag]="Null")(bo.prototype);var jt=class extends Ve{constructor(e,t){super();this.isSigned=e,this.bitWidth=t}get typeId(){return L.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=jt;jt[Symbol.toStringTag]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(jt.prototype);var Eu=class extends jt{constructor(){super(!0,8)}};k.Int8=Eu;var Lu=class extends jt{constructor(){super(!0,16)}};k.Int16=Lu;var qu=class extends jt{constructor(){super(!0,32)}};k.Int32=qu;var zu=class extends jt{constructor(){super(!0,64)}};k.Int64=zu;var Wu=class extends jt{constructor(){super(!1,8)}};k.Uint8=Wu;var Hu=class extends jt{constructor(){super(!1,16)}};k.Uint16=Hu;var Yu=class extends jt{constructor(){super(!1,32)}};k.Uint32=Yu;var $u=class extends jt{constructor(){super(!1,64)}};k.Uint64=$u;Object.defineProperty(Eu.prototype,"ArrayType",{value:Int8Array});Object.defineProperty(Lu.prototype,"ArrayType",{value:Int16Array});Object.defineProperty(qu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(zu.prototype,"ArrayType",{value:Int32Array});Object.defineProperty(Wu.prototype,"ArrayType",{value:Uint8Array});Object.defineProperty(Hu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Yu.prototype,"ArrayType",{value:Uint32Array});Object.defineProperty($u.prototype,"ArrayType",{value:Uint32Array});var ki=class extends Ve{constructor(e){super();this.precision=e}get typeId(){return L.Type.Float}get ArrayType(){switch(this.precision){case L.Precision.HALF:return Uint16Array;case L.Precision.SINGLE:return Float32Array;case L.Precision.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};k.Float=ki;ki[Symbol.toStringTag]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(ki.prototype);var Gu=class extends ki{constructor(){super(L.Precision.HALF)}};k.Float16=Gu;var Ju=class extends ki{constructor(){super(L.Precision.SINGLE)}};k.Float32=Ju;var Ku=class extends ki{constructor(){super(L.Precision.DOUBLE)}};k.Float64=Ku;Object.defineProperty(Gu.prototype,"ArrayType",{value:Uint16Array});Object.defineProperty(Ju.prototype,"ArrayType",{value:Float32Array});Object.defineProperty(Ku.prototype,"ArrayType",{value:Float64Array});var go=class extends Ve{constructor(){super()}get typeId(){return L.Type.Binary}toString(){return"Binary"}};k.Binary=go;go[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(go.prototype);var vo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Utf8}toString(){return"Utf8"}};k.Utf8=vo;vo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(vo.prototype);var jo=class extends Ve{constructor(){super()}get typeId(){return L.Type.Bool}toString(){return"Bool"}};k.Bool=jo;jo[Symbol.toStringTag]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(jo.prototype);var wo=class extends Ve{constructor(e,t){super();this.scale=e,this.precision=t}get typeId(){return L.Type.Decimal}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};k.Decimal=wo;wo[Symbol.toStringTag]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(wo.prototype);var on=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Date}toString(){return`Date${(this.unit+1)*32}<${L.DateUnit[this.unit]}>`}};k.Date_=on;on[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Date"))(on.prototype);var Wy=class extends on{constructor(){super(L.DateUnit.DAY)}};k.DateDay=Wy;var Hy=class extends on{constructor(){super(L.DateUnit.MILLISECOND)}};k.DateMillisecond=Hy;var Gr=class extends Ve{constructor(e,t){super();this.unit=e,this.bitWidth=t}get typeId(){return L.Type.Time}toString(){return`Time${this.bitWidth}<${L.TimeUnit[this.unit]}>`}};k.Time=Gr;Gr[Symbol.toStringTag]=(r=>(r.unit=null,r.bitWidth=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Time"))(Gr.prototype);var Yy=class extends Gr{constructor(){super(L.TimeUnit.SECOND,32)}};k.TimeSecond=Yy;var $y=class extends Gr{constructor(){super(L.TimeUnit.MILLISECOND,32)}};k.TimeMillisecond=$y;var Gy=class extends Gr{constructor(){super(L.TimeUnit.MICROSECOND,64)}};k.TimeMicrosecond=Gy;var Jy=class extends Gr{constructor(){super(L.TimeUnit.NANOSECOND,64)}};k.TimeNanosecond=Jy;var Jr=class extends Ve{constructor(e,t){super();this.unit=e,this.timezone=t}get typeId(){return L.Type.Timestamp}toString(){return`Timestamp<${L.TimeUnit[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};k.Timestamp=Jr;Jr[Symbol.toStringTag]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Timestamp"))(Jr.prototype);var Ky=class extends Jr{constructor(e){super(L.TimeUnit.SECOND,e)}};k.TimestampSecond=Ky;var Zy=class extends Jr{constructor(e){super(L.TimeUnit.MILLISECOND,e)}};k.TimestampMillisecond=Zy;var Xy=class extends Jr{constructor(e){super(L.TimeUnit.MICROSECOND,e)}};k.TimestampMicrosecond=Xy;var Qy=class extends Jr{constructor(e){super(L.TimeUnit.NANOSECOND,e)}};k.TimestampNanosecond=Qy;var an=class extends Ve{constructor(e){super();this.unit=e}get typeId(){return L.Type.Interval}toString(){return`Interval<${L.IntervalUnit[this.unit]}>`}};k.Interval=an;an[Symbol.toStringTag]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(an.prototype);var em=class extends an{constructor(){super(L.IntervalUnit.DAY_TIME)}};k.IntervalDayTime=em;var tm=class extends an{constructor(){super(L.IntervalUnit.YEAR_MONTH)}};k.IntervalYearMonth=tm;var Bo=class extends Ve{constructor(e){super();this.children=[e]}get typeId(){return L.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=Bo;Bo[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Bo.prototype);var To=class extends Ve{constructor(e){super();this.children=e}get typeId(){return L.Type.Struct}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}};k.Struct=To;To[Symbol.toStringTag]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(To.prototype);var un=class extends Ve{constructor(e,t,i){super();this.mode=e,this.children=i,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,s,c)=>(n[s]=c)&&n||n,Object.create(null))}get typeId(){return L.Type.Union}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}};k.Union=un;un[Symbol.toStringTag]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(un.prototype);var rm=class extends un{constructor(e,t){super(L.UnionMode.Dense,e,t)}};k.DenseUnion=rm;var im=class extends un{constructor(e,t){super(L.UnionMode.Sparse,e,t)}};k.SparseUnion=im;var Io=class extends Ve{constructor(e){super();this.byteWidth=e}get typeId(){return L.Type.FixedSizeBinary}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};k.FixedSizeBinary=Io;Io[Symbol.toStringTag]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Io.prototype);var So=class extends Ve{constructor(e,t){super();this.listSize=e,this.children=[t]}get typeId(){return L.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=So;So[Symbol.toStringTag]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(So.prototype);var Do=class extends Ve{constructor(e,t=!1){super();this.children=[e],this.keysSorted=t}get typeId(){return L.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_=Do;Do[Symbol.toStringTag]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Do.prototype);var u1=(r=>()=>++r)(-1),Oo=class extends Ve{constructor(e,t,i,n){super();this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=i==null?u1():typeof i=="number"?i:i.low}get typeId(){return L.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=Oo;Oo[Symbol.toStringTag]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Oo.prototype);function c1(r){let e=r;switch(r.typeId){case L.Type.Decimal:return 4;case L.Type.Timestamp:return 2;case L.Type.Date:return 1+e.unit;case L.Type.Interval:return 1+e.unit;case L.Type.Int:return 1+ +(e.bitWidth>32);case L.Type.Time:return 1+ +(e.bitWidth>32);case L.Type.FixedSizeList:return e.listSize;case L.Type.FixedSizeBinary:return e.byteWidth;default:return 1}}k.strideForType=c1});var qt=V(Ri=>{"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});Ri.Data=Ri.kUnknownNullCount=void 0;var l1=tr(),d1=tr(),z=Te(),f1=be(),he=Ye();Ri.kUnknownNullCount=-1;var te=class{constructor(e,t,i,n,s,c,v){this.type=e,this.dictionary=v,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1)),this.childData=(c||[]).map(S=>S instanceof te?S:S.data);let I;s instanceof te?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=f1.strideForType(e),s&&((I=s[0])&&(this.valueOffsets=I),(I=s[1])&&(this.values=I),(I=s[2])&&(this.nullBitmap=I),(I=s[3])&&(this.typeIds=I)))}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:i,nullBitmap:n,typeIds:s}=this;return t&&(e+=t.byteLength),i&&(e+=i.byteLength),n&&(e+=n.byteLength),s&&(e+=s.byteLength),this.childData.reduce((c,v)=>c+v.byteLength,e)}get nullCount(){let e=this._nullCount,t;return e<=Ri.kUnknownNullCount&&(t=this.nullBitmap)&&(this._nullCount=e=this.length-d1.popcnt_bit_range(t,this.offset,this.offset+this.length)),e}clone(e,t=this.offset,i=this.length,n=this._nullCount,s=this,c=this.childData){return new te(e,t,i,n,s,c,this.dictionary)}slice(e,t){let{stride:i,typeId:n,childData:s}=this,c=+(this._nullCount===0)-1,v=n===16?i:1,I=this._sliceBuffers(e,t,i,n);return this.clone(this.type,this.offset+e,t,c,I,!s.length||this.valueOffsets?s:this._sliceChildren(s,v*e,v*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===z.Type.Null)return this.clone(this.type,0,e,0);let{length:t,nullCount:i}=this,n=new Uint8Array((e+63&~63)>>3).fill(255,0,t>>3);n[t>>3]=(1<<t-(t&~7))-1,i>0&&n.set(l1.truncateBitmap(this.offset,t,this.nullBitmap),0);let s=this.buffers;return s[z.BufferType.VALIDITY]=n,this.clone(this.type,0,e,i+(e-t),s)}_sliceBuffers(e,t,i,n){let s,{buffers:c}=this;return(s=c[z.BufferType.TYPE])&&(c[z.BufferType.TYPE]=s.subarray(e,e+t)),(s=c[z.BufferType.OFFSET])&&(c[z.BufferType.OFFSET]=s.subarray(e,e+t+1))||(s=c[z.BufferType.DATA])&&(c[z.BufferType.DATA]=n===6?s:s.subarray(i*e,i*(e+t))),c}_sliceChildren(e,t,i){return e.map(n=>n.slice(t,i))}static new(e,t,i,n,s,c,v){switch(s instanceof te?s=s.buffers:s||(s=[]),e.typeId){case z.Type.Null:return te.Null(e,t,i);case z.Type.Int:return te.Int(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Dictionary:return te.Dictionary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[],v);case z.Type.Float:return te.Float(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Bool:return te.Bool(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Decimal:return te.Decimal(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Date:return te.Date(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Time:return te.Time(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Timestamp:return te.Timestamp(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Interval:return te.Interval(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.FixedSizeBinary:return te.FixedSizeBinary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.DATA]||[]);case z.Type.Binary:return te.Binary(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.Utf8:return te.Utf8(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],s[z.BufferType.DATA]||[]);case z.Type.List:return te.List(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.FixedSizeList:return te.FixedSizeList(e,t,i,n||0,s[z.BufferType.VALIDITY],(c||[])[0]);case z.Type.Struct:return te.Struct(e,t,i,n||0,s[z.BufferType.VALIDITY],c||[]);case z.Type.Map:return te.Map(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.OFFSET]||[],(c||[])[0]);case z.Type.Union:return te.Union(e,t,i,n||0,s[z.BufferType.VALIDITY],s[z.BufferType.TYPE]||[],s[z.BufferType.OFFSET]||c,c)}throw new Error(`Unrecognized typeId ${e.typeId}`)}static Null(e,t,i){return new te(e,t,i,0)}static Int(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Dictionary(e,t,i,n,s,c,v){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.indices.ArrayType,c),he.toUint8Array(s)],[],v)}static Float(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Bool(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Decimal(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Date(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Time(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Timestamp(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Interval(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static FixedSizeBinary(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,he.toArrayBufferView(e.ArrayType,c),he.toUint8Array(s)])}static Binary(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static Utf8(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),he.toUint8Array(v),he.toUint8Array(s)])}static List(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static FixedSizeList(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c?[c]:[])}static Struct(e,t,i,n,s,c){return new te(e,t,i,n,[void 0,void 0,he.toUint8Array(s)],c)}static Map(e,t,i,n,s,c,v){return new te(e,t,i,n,[he.toInt32Array(c),void 0,he.toUint8Array(s)],v?[v]:[])}static Union(e,t,i,n,s,c,v,I){let S=[void 0,void 0,he.toUint8Array(s),he.toArrayBufferView(e.ArrayType,c)];return e.mode===z.UnionMode.Sparse?new te(e,t,i,n,S,v):(S[z.BufferType.OFFSET]=he.toInt32Array(v),new te(e,t,i,n,S,I))}};Ri.Data=te;te.prototype.childData=Object.freeze([])});var Zu=V(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.valueToString=void 0;var h1=void 0;function p1(r){if(r===null)return"null";if(r===h1)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r)}Ao.valueToString=p1});var nm=V(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.createIsValidFunction=void 0;var Xu=Zu(),y1=st();function m1(r){if(!r||r.length<=0)return function(n){return!0};let e="",t=r.filter(i=>i===i);return t.length>0&&(e=`
|
|
2
2
|
switch (x) {${t.map(i=>`
|
|
3
|
-
case ${
|
|
3
|
+
case ${_1(i)}:`).join("")}
|
|
4
4
|
return false;
|
|
5
5
|
}`),r.length!==t.length&&(e=`if (x !== x) return false;
|
|
6
6
|
${e}`),new Function("x",`${e}
|
|
7
|
-
return true;`)}Fo.createIsValidFunction=p1;function y1(r){return typeof r!="bigint"?Xu.valueToString(r):h1.BigIntAvailable?`${Xu.valueToString(r)}n`:`"${Xu.valueToString(r)}"`}});var Kr=V(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.WideBufferBuilder=wt.OffsetsBufferBuilder=wt.BitmapBufferBuilder=wt.DataBufferBuilder=wt.BufferBuilder=void 0;var nm=Ye(),Qu=st(),ec=(r,e)=>(r*e+63&~63||64)/e,m1=(r,e=0)=>r.length>=e?r.subarray(0,e):nm.memcpy(new r.constructor(e),r,0),ss=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,i=this.length*t,n=this.buffer.length;i>=n&&this._resize(n===0?ec(i*1,this.BYTES_PER_ELEMENT):ec(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=ec(e*this.stride,this.BYTES_PER_ELEMENT);let t=m1(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=nm.memcpy(new this.ArrayType(e),this.buffer)}};wt.BufferBuilder=ss;ss.prototype.offset=0;var Mo=class extends ss{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}};wt.DataBufferBuilder=Mo;var sm=class extends Mo{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:i}=this.reserve(e-this.length+1),n=e>>3,s=e%8,c=i[n]>>s&1;return t?c===0&&(i[n]|=1<<s,++this.numValid):c===1&&(i[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};wt.BitmapBufferBuilder=sm;var om=class extends Mo{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let i=this.length-1,n=this.reserve(e-i+1).buffer;return i<e++&&n.fill(n[i],i,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)}};wt.OffsetsBufferBuilder=om;var am=class extends ss{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Qu.BigInt64Array:Qu.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),i=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return Qu.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};wt.WideBufferBuilder=am});var Ue=V(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.VariableWidthBuilder=Zr.FixedWidthBuilder=Zr.Builder=void 0;var _1=Re(),cn=Te(),b1=qt(),g1=im(),tc=Kr(),v1=be(),Bt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=v1.strideForType(e),this._nulls=new tc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=g1.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 j1(e)}static throughAsyncIterable(e){return w1(e)}toVector(){return _1.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,i)=>t+i.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,i)=>t+i.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,i=this._offsets,n=this._typeIds,{length:s,nullCount:c}=this;n?(e[cn.BufferType.TYPE]=n.flush(s),i&&(e[cn.BufferType.OFFSET]=i.flush(s))):i?(t&&(e[cn.BufferType.DATA]=t.flush(i.last())),e[cn.BufferType.OFFSET]=i.flush(s)):t&&(e[cn.BufferType.DATA]=t.flush(s)),c>0&&(e[cn.BufferType.VALIDITY]=this._nulls.flush(s));let v=b1.Data.new(this.type,0,s,c,e,this.children.map(w=>w.flush()));return this.clear(),v}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}};Zr.Builder=Bt;Bt.prototype.length=1;Bt.prototype.stride=1;Bt.prototype.children=null;Bt.prototype.finished=!1;Bt.prototype.nullValues=null;Bt.prototype._isValid=()=>!0;var um=class extends Bt{constructor(e){super(e);this._values=new tc.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,t)}};Zr.FixedWidthBuilder=um;var cm=class extends Bt{constructor(e){super(e);this._pendingLength=0,this._offsets=new tc.OffsetsBufferBuilder}setValue(e,t){let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,i.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}};Zr.VariableWidthBuilder=cm;function j1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Bt.new(r);for(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function w1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return async function*(n){let s=0,c=Bt.new(r);for await(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}});var rc=V(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.BoolBuilder=void 0;var B1=Kr(),T1=Ue(),lm=class extends T1.Builder{constructor(e){super(e);this._values=new B1.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Vo.BoolBuilder=lm});var ic=V(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.NullBuilder=void 0;var I1=Ue(),dm=class extends I1.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Uo.NullBuilder=dm});var nc=V(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.DateMillisecondBuilder=Xr.DateDayBuilder=Xr.DateBuilder=void 0;var S1=Ue(),Co=class extends S1.FixedWidthBuilder{};Xr.DateBuilder=Co;var fm=class extends Co{};Xr.DateDayBuilder=fm;var hm=class extends Co{};Xr.DateMillisecondBuilder=hm});var sc=V(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.DecimalBuilder=void 0;var D1=Ue(),pm=class extends D1.FixedWidthBuilder{};Po.DecimalBuilder=pm});var ac=V(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.DictionaryBuilder=void 0;var O1=be(),oc=Ue(),ym=class extends oc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new O1.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 i=="function"&&(this.valueToKey=i)}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 i=this.indices;return t=i.setValid(e,t),this.length=i.length,t}setValue(e,t){let i=this._keysToIndices,n=this.valueToKey(t),s=i[n];return s===void 0&&(i[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,i=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(i):i,this.finished||(this._dictionaryOffset+=i.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}`}};ko.DictionaryBuilder=ym});var uc=V(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.FixedSizeBinaryBuilder=void 0;var A1=Ue(),mm=class extends A1.FixedWidthBuilder{};Ro.FixedSizeBinaryBuilder=mm});var os=V(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.float64ToUint16=dn.uint16ToFloat64=void 0;var _m=new Float64Array(1),ln=new Uint32Array(_m.buffer);function F1(r){let e=(r&31744)>>10,t=(r&1023)/1024,i=(-1)**((r&32768)>>15);switch(e){case 31:return i*(t?NaN:1/0);case 0:return i*(t?6103515625e-14*t:0)}return i*2**(e-15)*(1+t)}dn.uint16ToFloat64=F1;function M1(r){if(r!==r)return 32256;_m[0]=r;let e=(ln[1]&2147483648)>>16&65535,t=ln[1]&2146435072,i=0;return t>=1089470464?ln[0]>0?t=31744:(t=(t&2080374784)>>16,i=(ln[1]&1048575)>>10):t<=1056964608?(i=1048576+(ln[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(ln[1]&1048575)+512>>10),e|t|i&65535}dn.float64ToUint16=M1});var cc=V(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.Float64Builder=rr.Float32Builder=rr.Float16Builder=rr.FloatBuilder=void 0;var V1=os(),U1=Ue(),as=class extends U1.FixedWidthBuilder{};rr.FloatBuilder=as;var bm=class extends as{setValue(e,t){this._values.set(e,V1.float64ToUint16(t))}};rr.Float16Builder=bm;var gm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float32Builder=gm;var vm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float64Builder=vm});var ls=V($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.BN=$e.bignumToBigInt=$e.bignumToString=$e.isArrowBigNumSymbol=void 0;var C1=Ye(),us=st();$e.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function zt(r,...e){return e.length===0?Object.setPrototypeOf(C1.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}zt.prototype[$e.isArrowBigNumSymbol]=!0;zt.prototype.toJSON=function(){return`"${$e.bignumToString(this)}"`};zt.prototype.valueOf=function(){return jm(this)};zt.prototype.toString=function(){return $e.bignumToString(this)};zt.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return jm(this);case"string":return $e.bignumToString(this);case"default":return $e.bignumToBigInt(this)}return $e.bignumToString(this)};function fn(...r){return zt.apply(this,r)}function hn(...r){return zt.apply(this,r)}function cs(...r){return zt.apply(this,r)}Object.setPrototypeOf(fn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(hn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(cs.prototype,Object.create(Uint32Array.prototype));Object.assign(fn.prototype,zt.prototype,{constructor:fn,signed:!0,TypedArray:Int32Array,BigIntArray:us.BigInt64Array});Object.assign(hn.prototype,zt.prototype,{constructor:hn,signed:!1,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});Object.assign(cs.prototype,zt.prototype,{constructor:cs,signed:!0,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});function jm(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,s=new Int32Array(e,t,i),c=0,v=0,w=s.length,S,U;for(;v<w;)U=s[v++],S=s[v++],n||(S=S>>>0),c+=(U>>>0)+S*v**32;return c}us.BigIntAvailable?($e.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:lc(r),$e.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:lc(r)):($e.bignumToString=lc,$e.bignumToBigInt=$e.bignumToString);function lc(r){let e="",t=new Uint32Array(2),i=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),n=new Uint32Array((i=new Uint16Array(i).reverse()).buffer),s=-1,c=i.length-1;do{for(t[0]=i[s=0];s<c;)i[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[s];i[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 No=class{static new(e,t){switch(t){case!0:return new fn(e);case!1:return new hn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case us.BigInt64Array:return new fn(e)}return e.byteLength===16?new cs(e):new hn(e)}static signed(e){return new fn(e)}static unsigned(e){return new hn(e)}static decimal(e){return new cs(e)}constructor(e,t){return No.new(e,t)}};$e.BN=No});var dc=V(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.Uint64Builder=Le.Uint32Builder=Le.Uint16Builder=Le.Uint8Builder=Le.Int64Builder=Le.Int32Builder=Le.Int16Builder=Le.Int8Builder=Le.IntBuilder=void 0;var P1=ls(),wm=Kr(),k1=st(),R1=Ue(),ir=class extends R1.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};Le.IntBuilder=ir;var Bm=class extends ir{};Le.Int8Builder=Bm;var Tm=class extends ir{};Le.Int16Builder=Tm;var Im=class extends ir{};Le.Int32Builder=Im;var Sm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(xo));super(e);this._values=new wm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(xo(e))}};Le.Int64Builder=Sm;var Dm=class extends ir{};Le.Uint8Builder=Dm;var Om=class extends ir{};Le.Uint16Builder=Om;var Am=class extends ir{};Le.Uint32Builder=Am;var Fm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(xo));super(e);this._values=new wm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(xo(e))}};Le.Uint64Builder=Fm;var xo=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=P1.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:k1.BigInt64Array})});var fc=V(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TimeNanosecondBuilder=Tt.TimeMicrosecondBuilder=Tt.TimeMillisecondBuilder=Tt.TimeSecondBuilder=Tt.TimeBuilder=void 0;var N1=Ue(),pn=class extends N1.FixedWidthBuilder{};Tt.TimeBuilder=pn;var Mm=class extends pn{};Tt.TimeSecondBuilder=Mm;var Vm=class extends pn{};Tt.TimeMillisecondBuilder=Vm;var Um=class extends pn{};Tt.TimeMicrosecondBuilder=Um;var Cm=class extends pn{};Tt.TimeNanosecondBuilder=Cm});var hc=V(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.TimestampNanosecondBuilder=It.TimestampMicrosecondBuilder=It.TimestampMillisecondBuilder=It.TimestampSecondBuilder=It.TimestampBuilder=void 0;var x1=Ue(),yn=class extends x1.FixedWidthBuilder{};It.TimestampBuilder=yn;var Pm=class extends yn{};It.TimestampSecondBuilder=Pm;var km=class extends yn{};It.TimestampMillisecondBuilder=km;var Rm=class extends yn{};It.TimestampMicrosecondBuilder=Rm;var Nm=class extends yn{};It.TimestampNanosecondBuilder=Nm});var pc=V(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.IntervalYearMonthBuilder=Qr.IntervalDayTimeBuilder=Qr.IntervalBuilder=void 0;var E1=Ue(),Eo=class extends E1.FixedWidthBuilder{};Qr.IntervalBuilder=Eo;var xm=class extends Eo{};Qr.IntervalDayTimeBuilder=xm;var Em=class extends Eo{};Qr.IntervalYearMonthBuilder=Em});var qo=V(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.BinaryBuilder=void 0;var L1=Ye(),q1=Kr(),z1=Ue(),Lm=class extends z1.VariableWidthBuilder{constructor(e){super(e);this._values=new q1.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,L1.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,v=0,w;for([s,w]of e)w===void 0?i.set(s,0):(c=w.length,n.set(w,v),i.set(s,c),v+=c)}};Lo.BinaryBuilder=Lm});var Wo=V(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.Utf8Builder=void 0;var W1=Ti(),H1=qo(),Y1=Kr(),$1=Ue(),yc=class extends $1.VariableWidthBuilder{constructor(e){super(e);this._values=new Y1.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,W1.encodeUtf8(t))}_flushPending(e,t){}};zo.Utf8Builder=yc;yc.prototype._flushPending=H1.BinaryBuilder.prototype._flushPending});var mc=V(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.Run=void 0;var G1=Re(),qm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof G1.Vector?e:(this._values=e,this)}};Ho.Run=qm});var Ke=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.Field=mn.Schema=void 0;var J1=be(),St=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=_c(e)),this.dictionaries=i}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new St(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new St(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof St?e[0]:Array.isArray(e[0])?new St(e[0]):new St(e),i=[...this.fields],n=Yo(Yo(new Map,this.metadata),t.metadata),s=t.fields.filter(v=>{let w=i.findIndex(S=>S.name===v.name);return~w?(i[w]=v.clone({metadata:Yo(Yo(new Map,i[w].metadata),v.metadata)}))&&!1:!0}),c=_c(s,new Map);return new St([...i,...s],n,new Map([...this.dictionaries,...c]))}};mn.Schema=St;var Tr=class{constructor(e,t,i=!1,n){this.name=e,this.type=t,this.nullable=i,this.metadata=n||new Map}static new(...e){let[t,i,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],i===void 0&&(i=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new Tr(`${t}`,i,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,i,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Tr.new(t,i,n,s)}};mn.Field=Tr;function Yo(r,e){return new Map([...r||new Map,...e||new Map])}function _c(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let s=r[t].type;if(J1.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&&_c(s.children,e)}return e}St.prototype.fields=null;St.prototype.metadata=null;St.prototype.dictionaries=null;Tr.prototype.type=null;Tr.prototype.name=null;Tr.prototype.nullable=null;Tr.prototype.metadata=null});var bc=V($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.ListBuilder=void 0;var K1=mc(),Z1=Ke(),X1=be(),Q1=Kr(),eD=Ue(),zm=class extends eD.VariableWidthBuilder{constructor(e){super(e);this._run=new K1.Run,this._offsets=new Q1.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 X1.List(new Z1.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,i=this._offsets,n=this._setValue,s=0,c;for([s,c]of e)c===void 0?i.set(s,0):(i.set(s,c.length),n(this,s,t.bind(c)))}};$o.ListBuilder=zm});var gc=V(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.FixedSizeListBuilder=void 0;var tD=mc(),rD=Ke(),iD=Ue(),nD=be(),Wm=class extends iD.Builder{constructor(){super(...arguments);this._run=new tD.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 i=this.children.push(e);return this.type=new nD.FixedSizeList(this.type.listSize,new rD.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};Go.FixedSizeListBuilder=Wm});var vc=V(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.MapBuilder=void 0;var sD=Ke(),oD=be(),aD=Ue(),Hm=class extends aD.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,i.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 oD.Map_(new sD.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),i(this,s,n))})}};Jo.MapBuilder=Hm});var jc=V(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.StructBuilder=void 0;var uD=Ke(),cD=Ue(),lD=be(),Ym=class extends cD.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new lD.Struct([...this.type.children,new uD.Field(t,e.type,!0)]),i}};Ko.StructBuilder=Ym});var wc=V(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.DenseUnionBuilder=ei.SparseUnionBuilder=ei.UnionBuilder=void 0;var dD=Ke(),$m=Kr(),fD=Ue(),hD=be(),Zo=class extends fD.Builder{constructor(e){super(e);this._typeIds=new $m.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,i){return i===void 0&&(i=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,i),this}setValue(e,t,i){this._typeIds.set(e,i),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let i=this.children.push(e),{type:{children:n,mode:s,typeIds:c}}=this,v=[...n,new dD.Field(t,e.type)];return this.type=new hD.Union(s,[...c,i],v),i}_valueToChildTypeId(e,t,i){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.")}};ei.UnionBuilder=Zo;var Gm=class extends Zo{};ei.SparseUnionBuilder=Gm;var Jm=class extends Zo{constructor(e){super(e);this._offsets=new $m.DataBufferBuilder(new Int32Array(0))}setValue(e,t,i){let n=this.type.typeIdToChildIndex[i];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,i)}};ei.DenseUnionBuilder=Jm});var tt=V(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Visitor=void 0;var pD=qt(),yD=Re(),F=Te(),mD=be(),we=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return _D(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}};Xo.Visitor=we;function _D(r,e,t=!0){let i=null,n=F.Type.NONE;switch(e instanceof pD.Data||e instanceof yD.Vector?n=Bc(e.type):e instanceof mD.DataType?n=Bc(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:i=r.visitNull;break;case F.Type.Bool:i=r.visitBool;break;case F.Type.Int:i=r.visitInt;break;case F.Type.Int8:i=r.visitInt8||r.visitInt;break;case F.Type.Int16:i=r.visitInt16||r.visitInt;break;case F.Type.Int32:i=r.visitInt32||r.visitInt;break;case F.Type.Int64:i=r.visitInt64||r.visitInt;break;case F.Type.Uint8:i=r.visitUint8||r.visitInt;break;case F.Type.Uint16:i=r.visitUint16||r.visitInt;break;case F.Type.Uint32:i=r.visitUint32||r.visitInt;break;case F.Type.Uint64:i=r.visitUint64||r.visitInt;break;case F.Type.Float:i=r.visitFloat;break;case F.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case F.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case F.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case F.Type.Utf8:i=r.visitUtf8;break;case F.Type.Binary:i=r.visitBinary;break;case F.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case F.Type.Date:i=r.visitDate;break;case F.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case F.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case F.Type.Timestamp:i=r.visitTimestamp;break;case F.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case F.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case F.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case F.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case F.Type.Time:i=r.visitTime;break;case F.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case F.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case F.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case F.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case F.Type.Decimal:i=r.visitDecimal;break;case F.Type.List:i=r.visitList;break;case F.Type.Struct:i=r.visitStruct;break;case F.Type.Union:i=r.visitUnion;break;case F.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case F.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case F.Type.Dictionary:i=r.visitDictionary;break;case F.Type.Interval:i=r.visitInterval;break;case F.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case F.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case F.Type.FixedSizeList:i=r.visitFixedSizeList;break;case F.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Bc(r){switch(r.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?F.Type.Int8:F.Type.Uint8;case 16:return t?F.Type.Int16:F.Type.Uint16;case 32:return t?F.Type.Int32:F.Type.Uint32;case 64:return t?F.Type.Int64:F.Type.Uint64}return F.Type.Int}case F.Type.Float:switch(r.precision){case F.Precision.HALF:return F.Type.Float16;case F.Precision.SINGLE:return F.Type.Float32;case F.Precision.DOUBLE:return F.Type.Float64}return F.Type.Float;case F.Type.Binary:return F.Type.Binary;case F.Type.Utf8:return F.Type.Utf8;case F.Type.Bool:return F.Type.Bool;case F.Type.Decimal:return F.Type.Decimal;case F.Type.Time:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimeSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimeMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimeMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimeNanosecond}return F.Type.Time;case F.Type.Timestamp:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimestampSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimestampMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimestampMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimestampNanosecond}return F.Type.Timestamp;case F.Type.Date:switch(r.unit){case F.DateUnit.DAY:return F.Type.DateDay;case F.DateUnit.MILLISECOND:return F.Type.DateMillisecond}return F.Type.Date;case F.Type.Interval:switch(r.unit){case F.IntervalUnit.DAY_TIME:return F.Type.IntervalDayTime;case F.IntervalUnit.YEAR_MONTH:return F.Type.IntervalYearMonth}return F.Type.Interval;case F.Type.Map:return F.Type.Map;case F.Type.List:return F.Type.List;case F.Type.Struct:return F.Type.Struct;case F.Type.Union:switch(r.mode){case F.UnionMode.Dense:return F.Type.DenseUnion;case F.UnionMode.Sparse:return F.Type.SparseUnion}return F.Type.Union;case F.Type.FixedSizeBinary:return F.Type.FixedSizeBinary;case F.Type.FixedSizeList:return F.Type.FixedSizeList;case F.Type.Dictionary:return F.Type.Dictionary}throw new Error(`Unrecognized type '${F.Type[r.typeId]}'`)}we.prototype.visitInt8=null;we.prototype.visitInt16=null;we.prototype.visitInt32=null;we.prototype.visitInt64=null;we.prototype.visitUint8=null;we.prototype.visitUint16=null;we.prototype.visitUint32=null;we.prototype.visitUint64=null;we.prototype.visitFloat16=null;we.prototype.visitFloat32=null;we.prototype.visitFloat64=null;we.prototype.visitDateDay=null;we.prototype.visitDateMillisecond=null;we.prototype.visitTimestampSecond=null;we.prototype.visitTimestampMillisecond=null;we.prototype.visitTimestampMicrosecond=null;we.prototype.visitTimestampNanosecond=null;we.prototype.visitTimeSecond=null;we.prototype.visitTimeMillisecond=null;we.prototype.visitTimeMicrosecond=null;we.prototype.visitTimeNanosecond=null;we.prototype.visitDenseUnion=null;we.prototype.visitSparseUnion=null;we.prototype.visitIntervalDayTime=null;we.prototype.visitIntervalYearMonth=null});var Sc=V(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.instance=_n.SetVisitor=void 0;var bD=Re(),gD=tt(),vD=Ti(),jD=os(),wD=Ye(),Dt=Te(),re=class extends gD.Visitor{};_n.SetVisitor=re;var BD=(r,e,t)=>{r[e]=t/864e5|0},Tc=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},TD=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},ID=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},Km=(r,e,t,i)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&r.set(i.subarray(0,s-n),n)},SD=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Zm=({values:r},e,t)=>{BD(r,e,t.valueOf())},Xm=({values:r},e,t)=>{Tc(r,e*2,t.valueOf())},nr=({stride:r,values:e},t,i)=>{e[r*t]=i},Qm=({stride:r,values:e},t,i)=>{e[r*t]=jD.float64ToUint16(i)},Ic=(r,e,t)=>{switch(typeof t){case"bigint":r.values64[e]=t;break;case"number":r.values[e*r.stride]=t;break;default:{let i=t,{stride:n,ArrayType:s}=r,c=wD.toArrayBufferView(s,i);r.values.set(c.subarray(0,n),n*e)}}},DD=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},OD=({values:r,valueOffsets:e},t,i)=>Km(r,e,t,i),AD=({values:r,valueOffsets:e},t,i)=>{Km(r,e,t,vD.encodeUtf8(i))},FD=(r,e,t)=>{r.type.bitWidth<64?nr(r,e,t):Ic(r,e,t)},MD=(r,e,t)=>{r.type.precision!==Dt.Precision.HALF?nr(r,e,t):Qm(r,e,t)},VD=(r,e,t)=>{r.type.unit===Dt.DateUnit.DAY?Zm(r,e,t):Xm(r,e,t)},e_=({values:r},e,t)=>Tc(r,e*2,t/1e3),t_=({values:r},e,t)=>Tc(r,e*2,t),r_=({values:r},e,t)=>TD(r,e*2,t),i_=({values:r},e,t)=>ID(r,e*2,t),UD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return e_(r,e,t);case Dt.TimeUnit.MILLISECOND:return t_(r,e,t);case Dt.TimeUnit.MICROSECOND:return r_(r,e,t);case Dt.TimeUnit.NANOSECOND:return i_(r,e,t)}},n_=({values:r,stride:e},t,i)=>{r[e*t]=i},s_=({values:r,stride:e},t,i)=>{r[e*t]=i},o_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},a_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},CD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return n_(r,e,t);case Dt.TimeUnit.MILLISECOND:return s_(r,e,t);case Dt.TimeUnit.MICROSECOND:return o_(r,e,t);case Dt.TimeUnit.NANOSECOND:return a_(r,e,t)}},PD=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},kD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let s=-1,c=n[e],v=n[e+1];c<v;)i.set(c++,t.get(++s))},RD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,v=n[e],w=n[e+1];v<w;)i.set(v++,s[++c])},ND=(r,e)=>(t,i,n)=>t&&t.set(r,e[n]),xD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(n)),ED=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(i.name)),LD=(r,e)=>(t,i,n)=>t&&t.set(r,e[i.name]),qD=(r,e,t)=>{let i=t instanceof Map?ED(e,t):t instanceof bD.Vector?xD(e,t):Array.isArray(t)?ND(e,t):LD(e,t);r.type.children.forEach((n,s)=>i(r.getChildAt(s),n,s))},zD=(r,e,t)=>{r.type.mode===Dt.UnionMode.Dense?u_(r,e,t):c_(r,e,t)},u_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},c_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},WD=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},HD=(r,e,t)=>{r.type.unit===Dt.IntervalUnit.DAY_TIME?l_(r,e,t):d_(r,e,t)},l_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},d_=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},YD=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let s=-1,c=e*n;++s<n;)i.set(c+s,t.get(s))};re.prototype.visitBool=SD;re.prototype.visitInt=FD;re.prototype.visitInt8=nr;re.prototype.visitInt16=nr;re.prototype.visitInt32=nr;re.prototype.visitInt64=Ic;re.prototype.visitUint8=nr;re.prototype.visitUint16=nr;re.prototype.visitUint32=nr;re.prototype.visitUint64=Ic;re.prototype.visitFloat=MD;re.prototype.visitFloat16=Qm;re.prototype.visitFloat32=nr;re.prototype.visitFloat64=nr;re.prototype.visitUtf8=AD;re.prototype.visitBinary=OD;re.prototype.visitFixedSizeBinary=DD;re.prototype.visitDate=VD;re.prototype.visitDateDay=Zm;re.prototype.visitDateMillisecond=Xm;re.prototype.visitTimestamp=UD;re.prototype.visitTimestampSecond=e_;re.prototype.visitTimestampMillisecond=t_;re.prototype.visitTimestampMicrosecond=r_;re.prototype.visitTimestampNanosecond=i_;re.prototype.visitTime=CD;re.prototype.visitTimeSecond=n_;re.prototype.visitTimeMillisecond=s_;re.prototype.visitTimeMicrosecond=o_;re.prototype.visitTimeNanosecond=a_;re.prototype.visitDecimal=PD;re.prototype.visitList=kD;re.prototype.visitStruct=qD;re.prototype.visitUnion=zD;re.prototype.visitDenseUnion=u_;re.prototype.visitSparseUnion=c_;re.prototype.visitDictionary=WD;re.prototype.visitInterval=HD;re.prototype.visitIntervalDayTime=l_;re.prototype.visitIntervalYearMonth=d_;re.prototype.visitFixedSizeList=YD;re.prototype.visitMap=RD;_n.instance=new re});var f_=V(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.instance=bn.GetBuilderCtor=void 0;var $D=tt(),GD=qo(),JD=rc(),Dc=nc(),KD=sc(),ZD=ac(),XD=uc(),QD=gc(),Qo=cc(),Oc=pc(),Ir=dc(),eO=bc(),tO=vc(),rO=ic(),iO=jc(),ds=hc(),fs=fc(),Ac=wc(),nO=Wo(),Fc=class extends $D.Visitor{visitNull(){return rO.NullBuilder}visitBool(){return JD.BoolBuilder}visitInt(){return Ir.IntBuilder}visitInt8(){return Ir.Int8Builder}visitInt16(){return Ir.Int16Builder}visitInt32(){return Ir.Int32Builder}visitInt64(){return Ir.Int64Builder}visitUint8(){return Ir.Uint8Builder}visitUint16(){return Ir.Uint16Builder}visitUint32(){return Ir.Uint32Builder}visitUint64(){return Ir.Uint64Builder}visitFloat(){return Qo.FloatBuilder}visitFloat16(){return Qo.Float16Builder}visitFloat32(){return Qo.Float32Builder}visitFloat64(){return Qo.Float64Builder}visitUtf8(){return nO.Utf8Builder}visitBinary(){return GD.BinaryBuilder}visitFixedSizeBinary(){return XD.FixedSizeBinaryBuilder}visitDate(){return Dc.DateBuilder}visitDateDay(){return Dc.DateDayBuilder}visitDateMillisecond(){return Dc.DateMillisecondBuilder}visitTimestamp(){return ds.TimestampBuilder}visitTimestampSecond(){return ds.TimestampSecondBuilder}visitTimestampMillisecond(){return ds.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ds.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ds.TimestampNanosecondBuilder}visitTime(){return fs.TimeBuilder}visitTimeSecond(){return fs.TimeSecondBuilder}visitTimeMillisecond(){return fs.TimeMillisecondBuilder}visitTimeMicrosecond(){return fs.TimeMicrosecondBuilder}visitTimeNanosecond(){return fs.TimeNanosecondBuilder}visitDecimal(){return KD.DecimalBuilder}visitList(){return eO.ListBuilder}visitStruct(){return iO.StructBuilder}visitUnion(){return Ac.UnionBuilder}visitDenseUnion(){return Ac.DenseUnionBuilder}visitSparseUnion(){return Ac.SparseUnionBuilder}visitDictionary(){return ZD.DictionaryBuilder}visitInterval(){return Oc.IntervalBuilder}visitIntervalDayTime(){return Oc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Oc.IntervalYearMonthBuilder}visitFixedSizeList(){return QD.FixedSizeListBuilder}visitMap(){return tO.MapBuilder}};bn.GetBuilderCtor=Fc;bn.instance=new Fc});var ta=V(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.DenseUnionBuilder=R.SparseUnionBuilder=R.UnionBuilder=R.StructBuilder=R.MapBuilder=R.FixedSizeListBuilder=R.ListBuilder=R.BinaryBuilder=R.Utf8Builder=R.IntervalYearMonthBuilder=R.IntervalDayTimeBuilder=R.IntervalBuilder=R.TimestampNanosecondBuilder=R.TimestampMicrosecondBuilder=R.TimestampMillisecondBuilder=R.TimestampSecondBuilder=R.TimestampBuilder=R.TimeNanosecondBuilder=R.TimeMicrosecondBuilder=R.TimeMillisecondBuilder=R.TimeSecondBuilder=R.TimeBuilder=R.Uint64Builder=R.Uint32Builder=R.Uint16Builder=R.Uint8Builder=R.Int64Builder=R.Int32Builder=R.Int16Builder=R.Int8Builder=R.IntBuilder=R.Float64Builder=R.Float32Builder=R.Float16Builder=R.FloatBuilder=R.FixedSizeBinaryBuilder=R.DictionaryBuilder=R.DecimalBuilder=R.DateMillisecondBuilder=R.DateDayBuilder=R.DateBuilder=R.NullBuilder=R.BoolBuilder=R.Builder=void 0;var sO=Ue();Object.defineProperty(R,"Builder",{enumerable:!0,get:function(){return sO.Builder}});var oO=rc();Object.defineProperty(R,"BoolBuilder",{enumerable:!0,get:function(){return oO.BoolBuilder}});var aO=ic();Object.defineProperty(R,"NullBuilder",{enumerable:!0,get:function(){return aO.NullBuilder}});var Mc=nc();Object.defineProperty(R,"DateBuilder",{enumerable:!0,get:function(){return Mc.DateBuilder}});Object.defineProperty(R,"DateDayBuilder",{enumerable:!0,get:function(){return Mc.DateDayBuilder}});Object.defineProperty(R,"DateMillisecondBuilder",{enumerable:!0,get:function(){return Mc.DateMillisecondBuilder}});var uO=sc();Object.defineProperty(R,"DecimalBuilder",{enumerable:!0,get:function(){return uO.DecimalBuilder}});var cO=ac();Object.defineProperty(R,"DictionaryBuilder",{enumerable:!0,get:function(){return cO.DictionaryBuilder}});var lO=uc();Object.defineProperty(R,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return lO.FixedSizeBinaryBuilder}});var ea=cc();Object.defineProperty(R,"FloatBuilder",{enumerable:!0,get:function(){return ea.FloatBuilder}});Object.defineProperty(R,"Float16Builder",{enumerable:!0,get:function(){return ea.Float16Builder}});Object.defineProperty(R,"Float32Builder",{enumerable:!0,get:function(){return ea.Float32Builder}});Object.defineProperty(R,"Float64Builder",{enumerable:!0,get:function(){return ea.Float64Builder}});var Sr=dc();Object.defineProperty(R,"IntBuilder",{enumerable:!0,get:function(){return Sr.IntBuilder}});Object.defineProperty(R,"Int8Builder",{enumerable:!0,get:function(){return Sr.Int8Builder}});Object.defineProperty(R,"Int16Builder",{enumerable:!0,get:function(){return Sr.Int16Builder}});Object.defineProperty(R,"Int32Builder",{enumerable:!0,get:function(){return Sr.Int32Builder}});Object.defineProperty(R,"Int64Builder",{enumerable:!0,get:function(){return Sr.Int64Builder}});Object.defineProperty(R,"Uint8Builder",{enumerable:!0,get:function(){return Sr.Uint8Builder}});Object.defineProperty(R,"Uint16Builder",{enumerable:!0,get:function(){return Sr.Uint16Builder}});Object.defineProperty(R,"Uint32Builder",{enumerable:!0,get:function(){return Sr.Uint32Builder}});Object.defineProperty(R,"Uint64Builder",{enumerable:!0,get:function(){return Sr.Uint64Builder}});var hs=fc();Object.defineProperty(R,"TimeBuilder",{enumerable:!0,get:function(){return hs.TimeBuilder}});Object.defineProperty(R,"TimeSecondBuilder",{enumerable:!0,get:function(){return hs.TimeSecondBuilder}});Object.defineProperty(R,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return hs.TimeMillisecondBuilder}});Object.defineProperty(R,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return hs.TimeMicrosecondBuilder}});Object.defineProperty(R,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return hs.TimeNanosecondBuilder}});var ps=hc();Object.defineProperty(R,"TimestampBuilder",{enumerable:!0,get:function(){return ps.TimestampBuilder}});Object.defineProperty(R,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ps.TimestampSecondBuilder}});Object.defineProperty(R,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMillisecondBuilder}});Object.defineProperty(R,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMicrosecondBuilder}});Object.defineProperty(R,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampNanosecondBuilder}});var Vc=pc();Object.defineProperty(R,"IntervalBuilder",{enumerable:!0,get:function(){return Vc.IntervalBuilder}});Object.defineProperty(R,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return Vc.IntervalDayTimeBuilder}});Object.defineProperty(R,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return Vc.IntervalYearMonthBuilder}});var dO=Wo();Object.defineProperty(R,"Utf8Builder",{enumerable:!0,get:function(){return dO.Utf8Builder}});var fO=qo();Object.defineProperty(R,"BinaryBuilder",{enumerable:!0,get:function(){return fO.BinaryBuilder}});var hO=bc();Object.defineProperty(R,"ListBuilder",{enumerable:!0,get:function(){return hO.ListBuilder}});var pO=gc();Object.defineProperty(R,"FixedSizeListBuilder",{enumerable:!0,get:function(){return pO.FixedSizeListBuilder}});var yO=vc();Object.defineProperty(R,"MapBuilder",{enumerable:!0,get:function(){return yO.MapBuilder}});var mO=jc();Object.defineProperty(R,"StructBuilder",{enumerable:!0,get:function(){return mO.StructBuilder}});var Uc=wc();Object.defineProperty(R,"UnionBuilder",{enumerable:!0,get:function(){return Uc.UnionBuilder}});Object.defineProperty(R,"SparseUnionBuilder",{enumerable:!0,get:function(){return Uc.SparseUnionBuilder}});Object.defineProperty(R,"DenseUnionBuilder",{enumerable:!0,get:function(){return Uc.DenseUnionBuilder}});var Cc=Te(),_O=Wo(),bO=Ue(),h_=Sc(),p_=f_();bO.Builder.new=y_;function y_(r){let e=r.type,t=new(p_.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},s=Array.isArray(i)?(c,v)=>i[v]||n:({name:c})=>i[c]||n;e.children.forEach((c,v)=>{let{type:w}=c,S=s(c,v);t.children.push(y_({...S,type:w}))})}return t}Object.keys(Cc.Type).map(r=>Cc.Type[r]).filter(r=>typeof r=="number"&&r!==Cc.Type.NONE).forEach(r=>{let e=p_.instance.visit(r);e.prototype._setValue=h_.instance.getVisitFn(r)});_O.Utf8Builder.prototype._setValue=h_.instance.visitBinary});var m_=V(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.Block=gn.Footer=void 0;var gO=gr(),ra=$r(),Ot=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 Ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+gO.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ot).__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):ra.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new ra.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new ia).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,10);return i?(t||new ia).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,12);return i?(t||new ra.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,ra.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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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,i,n,s,c){return Ot.startFooter(e),Ot.addVersion(e,t),Ot.addSchema(e,i),Ot.addDictionaries(e,n),Ot.addRecordBatches(e,s),Ot.addCustomMetadata(e,c),Ot.endFooter(e)}};gn.Footer=Ot;var ia=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,i,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(i),e.writeInt64(t),e.offset()}};gn.Block=ia});var Rc=V(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.FileBlock=vn.Footer=void 0;var Wt=m_(),Pc=gr(),__=Pc.flatbuffers.Long,vO=Pc.flatbuffers.Builder,jO=Pc.flatbuffers.ByteBuffer,b_=Ke(),g_=Te(),wO=Ye(),kc=class{constructor(e,t=g_.MetadataVersion.V4,i,n){this.schema=e,this.version=t,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}static decode(e){e=new jO(wO.toUint8Array(e));let t=Wt.Footer.getRootAsFooter(e),i=b_.Schema.decode(t.schema());return new v_(i,t)}static encode(e){let t=new vO,i=b_.Schema.encode(t,e.schema);Wt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>ti.encode(t,c));let n=t.endVector();Wt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>ti.encode(t,c));let s=t.endVector();return Wt.Footer.startFooter(t),Wt.Footer.addSchema(t,i),Wt.Footer.addVersion(t,g_.MetadataVersion.V4),Wt.Footer.addRecordBatches(t,n),Wt.Footer.addDictionaries(t,s),Wt.Footer.finishFooterBuffer(t,Wt.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,i=this.numRecordBatches;++t<i;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,i=this.numDictionaries;++t<i;)(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}};vn.Footer=kc;var v_=class extends kc{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 ti.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return ti.decode(t)}return null}},ti=class{constructor(e,t,i){this.metaDataLength=e,this.offset=typeof i=="number"?i:i.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new ti(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new __(t.offset,0),s=new __(t.bodyLength,0);return Wt.Block.createBlock(e,n,i,s)}};vn.FileBlock=ti});var si=V(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.AsyncByteStream=ni.ByteStream=ni.AsyncByteQueue=void 0;var ri=ns(),j_=Ti(),ys=rn(),Nc=Ye(),jn=st(),xc=class extends ys.AsyncQueue{write(e){if((e=Nc.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?j_.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(j_.decodeUtf8)}toUint8Array(e=!1){return e?Nc.joinUint8Arrays(this._values)[0]:(async()=>{let t=[],i=0;for await(let n of this)t.push(n),i+=n.byteLength;return Nc.joinUint8Arrays(t,i)[0]})()}};ni.AsyncByteQueue=xc;var w_=class{constructor(e){e&&(this.source=new B_(ri.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)}};ni.ByteStream=w_;var na=class{constructor(e){e instanceof na?this.source=e.source:e instanceof xc?this.source=new ii(ri.default.fromAsyncIterable(e)):jn.isReadableNodeStream(e)?this.source=new ii(ri.default.fromNodeStream(e)):jn.isReadableDOMStream(e)?this.source=new ii(ri.default.fromDOMStream(e)):jn.isFetchResponse(e)?this.source=new ii(ri.default.fromDOMStream(e.body)):jn.isIterable(e)?this.source=new ii(ri.default.fromIterable(e)):jn.isPromise(e)?this.source=new ii(ri.default.fromAsyncIterable(e)):jn.isAsyncIterable(e)&&(this.source=new ii(ri.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)}};ni.AsyncByteStream=na;var B_=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)||ys.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||ys.ITERATOR_DONE)}},ii=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}async cancel(e){await this.return(e)}get closed(){return this._closedPromise}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}async next(e,t="read"){return await this.source.next({cmd:t,size:e})}async throw(e){let t=this.source.throw&&await this.source.throw(e)||ys.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}async return(e){let t=this.source.return&&await this.source.return(e)||ys.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}});var Ec=V(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.AsyncRandomAccessFile=wn.RandomAccessFile=void 0;var T_=si(),BO=Ye(),I_=class extends T_.ByteStream{constructor(e,t){super();this.position=0,this.buffer=BO.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:i}=this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:i,position:n}=this;return t&&n<i?(typeof e!="number"&&(e=1/0),this.position=Math.min(i,n+Math.min(i-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let i=this.buffer,n=Math.min(this.size,e+t);return i?i.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}}};wn.RandomAccessFile=I_;var S_=class extends T_.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(async()=>{this.size=(await e.stat()).size,delete this._pending})()}async readInt32(e){let{buffer:t,byteOffset:i}=await this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}async seek(e){return this._pending&&await this._pending,this.position=Math.min(e,this.size),e<this.size}async read(e){this._pending&&await this._pending;let{_handle:t,size:i,position:n}=this;if(t&&n<i){typeof e!="number"&&(e=1/0);let s=n,c=0,v=0,w=Math.min(i,s+Math.min(i-s,e)),S=new Uint8Array(Math.max(0,(this.position=w)-s));for(;(s+=v)<w&&(c+=v)<S.byteLength;)({bytesRead:v}=await t.read(S,c,S.byteLength-c,s));return S}return null}async readAt(e,t){this._pending&&await this._pending;let{_handle:i,size:n}=this;if(i&&e+t<n){let s=Math.min(n,e+t),c=new Uint8Array(s-e);return(await i.read(c,0,t,e)).buffer}return new Uint8Array(t)}async close(){let e=this._handle;this._handle=null,e&&await e.close()}async throw(e){return await this.close(),{done:!0,value:e}}async return(e){return await this.close(),{done:!0,value:e}}};wn.AsyncRandomAccessFile=S_});var qc=V(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.Int128=sr.Int64=sr.Uint64=sr.BaseInt64=void 0;var TO=1<<16;function Bn(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var Tn=8,Lc=[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]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*i[3],s+=n,n=t[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?TO:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*i[3]+t[2]*i[2]+t[3]*i[1],this.buffer[1]+=t[0]*i[3]+t[1]*i[2]+t[2]*i[1]+t[3]*i[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`${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}};sr.BaseInt64=sa;var ge=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 ge.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return ge.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new ge(t);for(let s=0;s<i;){let c=Tn<i-s?Tn:i-s,v=new ge(new Uint32Array([parseInt(e.substr(s,c),10),0])),w=new ge(new Uint32Array([Lc[c],0]));n.times(w),n.plus(v),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)ge.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new ge(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new ge(new Uint32Array(e.buffer)).plus(t)}};sr.Uint64=ge;var pt=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,i=e.buffer[1]<<0;return t<i||t===i&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return pt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return pt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,s=new pt(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,w=new pt(new Uint32Array([parseInt(e.substr(c,v),10),0])),S=new pt(new Uint32Array([Lc[v],0]));s.times(S),s.plus(w),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)pt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new pt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new pt(new Uint32Array(e.buffer)).plus(t)}};sr.Int64=pt;var Ht=class{constructor(e){this.buffer=e}high(){return new pt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new pt(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 ge(new Uint32Array([this.buffer[3],0])),i=new ge(new Uint32Array([this.buffer[2],0])),n=new ge(new Uint32Array([this.buffer[1],0])),s=new ge(new Uint32Array([this.buffer[0],0])),c=new ge(new Uint32Array([e.buffer[3],0])),v=new ge(new Uint32Array([e.buffer[2],0])),w=new ge(new Uint32Array([e.buffer[1],0])),S=new ge(new Uint32Array([e.buffer[0],0])),U=ge.multiply(s,S);this.buffer[0]=U.low();let G=new ge(new Uint32Array([U.high(),0]));return U=ge.multiply(n,S),G.plus(U),U=ge.multiply(s,w),G.plus(U),this.buffer[1]=G.low(),this.buffer[3]=G.lessThan(U)?1:0,this.buffer[2]=G.high(),new ge(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(ge.multiply(i,S)).plus(ge.multiply(n,w)).plus(ge.multiply(s,v)),this.buffer[3]+=ge.multiply(t,S).plus(ge.multiply(i,w)).plus(ge.multiply(n,v)).plus(ge.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`${Bn(this.buffer[3])} ${Bn(this.buffer[2])} ${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}static multiply(e,t){return new Ht(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Ht(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Ht.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Ht.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,s=new Ht(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,w=new Ht(new Uint32Array([parseInt(e.substr(c,v),10),0,0,0])),S=new Ht(new Uint32Array([Lc[v],0,0,0]));s.times(S),s.plus(w),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)Ht.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};sr.Int128=Ht});var F_=V(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.JSONVectorLoader=In.VectorLoader=void 0;var Ge=qt(),IO=Ke(),Dr=be(),SO=tt(),D_=tr(),DO=Ti(),oa=qc(),O_=Te(),or=Ye(),zc=class extends SO.Visitor{constructor(e,t,i,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=i,this.dictionaries=n}visit(e){return super.visit(e instanceof IO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Ge.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Utf8(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Binary(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.List(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Struct(e,0,t,i,this.readNullBitmap(e,i),this.visitMany(e.children))}visitUnion(e){return e.mode===O_.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Dictionary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Map(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,i=this.nextBufferRange()){return t>0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+t)}readDictionary(e){return this.dictionaries.get(e.id)}};In.VectorLoader=zc;var A_=class extends zc{constructor(e,t,i,n){super(new Uint8Array(0),t,i,n);this.sources=e}readNullBitmap(e,t,{offset:i}=this.nextBufferRange()){return t<=0?new Uint8Array(0):D_.packBools(this.sources[i])}readOffsets(e,{offset:t}=this.nextBufferRange()){return or.toArrayBufferView(Uint8Array,or.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return Dr.DataType.isTimestamp(e)||(Dr.DataType.isInt(e)||Dr.DataType.isTime(e))&&e.bitWidth===64||Dr.DataType.isDate(e)&&e.unit===O_.DateUnit.MILLISECOND?or.toArrayBufferView(Uint8Array,oa.Int64.convertArray(i[t])):Dr.DataType.isDecimal(e)?or.toArrayBufferView(Uint8Array,oa.Int128.convertArray(i[t])):Dr.DataType.isBinary(e)||Dr.DataType.isFixedSizeBinary(e)?OO(i[t]):Dr.DataType.isBool(e)?D_.packBools(i[t]):Dr.DataType.isUtf8(e)?DO.encodeUtf8(i[t].join("")):or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};In.JSONVectorLoader=A_;function OO(r){let e=r.join(""),t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=parseInt(e.substr(i,2),16);return t}});var ms=V(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.StructRow=Dn.MapRow=void 0;var M_=Zu(),rt=Symbol.for("parent"),Sn=Symbol.for("rowIndex"),yt=Symbol.for("keyToIdx"),mt=Symbol.for("idxToVal"),Wc=Symbol.for("nodejs.util.inspect.custom"),ar=class{constructor(e,t){this[rt]=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 i=this[yt]||(this[yt]=new Map),n=i.get(e);if(n!==void 0){let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[yt]||(this[yt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let s=this[mt]||(this[mt]=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(),i=this[yt]||(this[yt]=new Map),n=this[mt]||(this[mt]=new Array(this.size));for(let s,c,v=0,w,S;!((w=e.next()).done||(S=t.next()).done);++v)s=w.value,c=S.value,n[v]=c,i.has(s)||i.set(s,v),yield[s,c]}forEach(e,t){let i=this.keys(),n=this.values(),s=t===void 0?e:(w,S,U)=>e.call(t,w,S,U),c=this[yt]||(this[yt]=new Map),v=this[mt]||(this[mt]=new Array(this.size));for(let w,S,U=0,G,me;!((G=i.next()).done||(me=n.next()).done);++U)w=G.value,S=me.value,v[U]=S,c.has(w)||c.set(w,U),s(S,w,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Wc](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=M_.valueToString(i),t=M_.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};ar[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[rt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Sn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(ar.prototype);var V_=class extends ar{constructor(e){super(e,e.length);return AO(this)}keys(){return this[rt].getChildAt(0)[Symbol.iterator]()}values(){return this[rt].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[rt].getChildAt(0).get(e)}getIndex(e){return this[rt].getChildAt(0).indexOf(e)}getValue(e){return this[rt].getChildAt(1).get(e)}setValue(e,t){this[rt].getChildAt(1).set(e,t)}};Dn.MapRow=V_;var U_=class extends ar{constructor(e){super(e,e.type.children.length);return C_(this)}*keys(){for(let e of this[rt].type.children)yield e.name}*values(){for(let e of this[rt].type.children)yield this[e.name]}getKey(e){return this[rt].type.children[e].name}getIndex(e){return this[rt].type.children.findIndex(t=>t.name===e)}getValue(e){return this[rt].getChildAt(e).get(this[Sn])}setValue(e,t){return this[rt].getChildAt(e).set(this[Sn],t)}};Dn.StructRow=U_;Object.setPrototypeOf(ar.prototype,Map.prototype);var C_=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[yt]||(e[yt]=new Map),n=c=>function(){return this.get(c)},s=c=>function(v){return this.set(c,v)};for(let c of e.keys())i.set(c,++t),r.get=n(c),r.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(r.enumerable=!0,Object.defineProperty(e,c,r)),Object.prototype.hasOwnProperty.call(e,t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),AO=(()=>{if(typeof Proxy=="undefined")return C_;let r=ar.prototype.has,e=ar.prototype.get,t=ar.prototype.set,i=ar.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 rt:case Sn:case mt:case yt:case Wc:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(s,c,v){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 rt:case Sn:case mt:case yt:case Wc:return Reflect.get(s,c,v)}return typeof c=="number"&&!r.call(v,c)&&(c=i.call(v,c)),e.call(v,c)},set(s,c,v,w){switch(c){case rt:case Sn:case mt:case yt:return Reflect.set(s,c,v,w);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"&&!r.call(w,c)&&(c=i.call(w,c)),r.call(w,c)?!!t.call(w,c,v):!1}};return s=>new Proxy(s,n)})()});var bs=V(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.createElementComparator=oi.clampRange=oi.clampIndex=void 0;var P_=Re(),k_=ms(),FO=Ye(),R_=st();function MO(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}oi.clampIndex=MO;var N_;function VO(r,e,t,i){let{length:n=0}=r,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&&(N_=s,s=c,c=N_),c>n&&(c=n),i?i(r,s,c):[s,c]}oi.clampRange=VO;var UO=R_.BigIntAvailable?R_.BigInt(0):0,x_=r=>r!==r;function _s(r){let e=typeof r;if(e!=="object"||r===null)return x_(r)?x_:e!=="bigint"?t=>t===r:t=>UO+t===r;if(r instanceof Date){let t=r.valueOf();return i=>i instanceof Date?i.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?FO.compareArrayLike(r,t):!1:r instanceof Map?PO(r):Array.isArray(r)?CO(r):r instanceof P_.Vector?kO(r):RO(r)}oi.createElementComparator=_s;function CO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r[t]);return aa(e)}function PO(r){let e=-1,t=[];return r.forEach(i=>t[++e]=_s(i)),aa(t)}function kO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r.get(t));return aa(e)}function RO(r){let e=Object.keys(r);if(e.length===0)return()=>!1;let t=[];for(let i=-1,n=e.length;++i<n;)t[i]=_s(r[e[i]]);return aa(t,e)}function aa(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return NO(r,t);case Map:case k_.MapRow:case k_.StructRow:return E_(r,t,t.keys());case Object:case void 0:return E_(r,t,e||Object.keys(t))}return t instanceof P_.Vector?xO(r,t):!1}}function NO(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e[i]))return!1;return!0}function xO(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e.get(i)))return!1;return!0}function E_(r,e,t){let i=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,v=r.length,w=s.next(),S=i.next(),U=n.next();for(;c<v&&!S.done&&!U.done&&!w.done&&!(S.value!==U.value||!r[c](w.value));++c,S=i.next(),U=n.next(),w=s.next());return c===v&&S.done&&U.done&&w.done?!0:(i.return&&i.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var On=V(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.selectColumnChildrenArgs=dt.selectVectorChildrenArgs=dt.selectChunkArgs=dt.selectFieldArgs=dt.selectColumnArgs=dt.selectArgs=void 0;var L_=qt(),q_=Ke(),ai=An(),gs=Re(),z_=be(),EO=ci(),ui=Array.isArray;dt.selectArgs=(r,e)=>ua(r,e,[],0);dt.selectColumnArgs=r=>{let[e,t]=Yc(r,[[],[]]);return t.map((i,n)=>i instanceof ai.Column?ai.Column.new(i.field.clone(e[n]),i):i instanceof gs.Vector?ai.Column.new(e[n],i):ai.Column.new(e[n],[]))};dt.selectFieldArgs=r=>Yc(r,[[],[]]);dt.selectChunkArgs=(r,e)=>Hc(r,e,[],0);dt.selectVectorChildrenArgs=(r,e)=>W_(r,e,[],0);dt.selectColumnChildrenArgs=(r,e)=>H_(r,e,[],0);function ua(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=ua(r,n,t,s).length:n instanceof r&&(t[s++]=n);return t}function Hc(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=Hc(r,n,t,s).length:n instanceof EO.Chunked?s=Hc(r,n.chunks,t,s).length:n instanceof r&&(t[s++]=n);return t}function W_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=W_(r,n,t,s).length:n instanceof r?s=ua(gs.Vector,n.schema.fields.map((w,S)=>n.getChildAt(S)),t,s).length:n instanceof gs.Vector&&(t[s++]=n);return t}function H_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=H_(r,n,t,s).length:n instanceof r?s=ua(ai.Column,n.schema.fields.map((w,S)=>ai.Column.new(w,n.getChildAt(S))),t,s).length:n instanceof ai.Column&&(t[s++]=n);return t}var LO=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function Yc(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(ui(r[0]))return Yc(r[0],e);r[0]instanceof L_.Data||r[0]instanceof gs.Vector||r[0]instanceof z_.DataType||([t,r]=Object.entries(r[0]).reduce(LO,e));break;default:ui(t=r[i-1])?r=ui(r[0])?r[0]:r.slice(0,i-1):(r=ui(r[0])?r[0]:r,t=[])}let n=-1,s=-1,c=-1,v=r.length,w,S,[U,G]=e;for(;++c<v;)S=r[c],S instanceof ai.Column&&(G[++s]=S)?U[++n]=S.field.clone(t[c],S.type,!0):({[c]:w=c}=t,S instanceof z_.DataType&&(G[++s]=S)?U[++n]=q_.Field.new(w,S,!0):S&&S.type&&(G[++s]=S)&&(S instanceof L_.Data&&(G[s]=S=gs.Vector.new(S)),U[++n]=q_.Field.new(w,S.type,!0)));return e}});var ci=V(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.Chunked=void 0;var qO=bs(),Y_=be(),zO=On(),$_=Re(),G_=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}},Or=class extends $_.AbstractVector{constructor(e,t=[],i=WO(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=i,this._length=i[i.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return zO.selectChunkArgs($_.Vector,e)}static concat(...e){let t=Or.flatten(...e);return new Or(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:i})=>t+i,0)),e}get indices(){if(Y_.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Or.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return Y_.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new G_(this._chunks)}clone(e=this._chunks){return new Or(this._type,e)}concat(...e){return this.clone(Or.flatten(this,...e))}slice(e,t){return qO.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Or(n.type,s):null}search(e,t){let i=e,n=this._chunkOffsets,s=n.length-1;if(i<0||i>=n[s])return null;if(s<=1)return t?t(this,0,i):[0,i];let c=0,v=0,w=0;do{if(c+1===s)return t?t(this,c,i-v):[c,i-v];w=c+(s-c)/2|0,i>=n[w]?c=w:s=w}while(i<n[s]&&i>=(v=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:i},n,s)=>i[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,s)=>this.indexOfInternal(i,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,i=this._type.ArrayType;if(t<=0)return new i(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let w=-1;++w<t;)n+=(s[w]=e[w].toArray()).length;i!==s[0].constructor&&(i=s[0].constructor);let c=new i(n),v=i===Array?YO:HO;for(let w=-1,S=0;++w<t;)S=v(s[w],c,S);return c}getInternal({_chunks:e},t,i){return e[t].get(i)}isValidInternal({_chunks:e},t,i){return e[t].isValid(i)}indexOfInternal({_chunks:e},t,i,n){let s=t-1,c=e.length,v=i,w=0,S=-1;for(;++s<c;){if(~(S=e[s].indexOf(n,v)))return w+S;v=0,w+=e[s].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let v=-1,w=s.length;++v<w;){let S=s[v],U=S.length,G=c[v];if(G>=i)break;if(t>=G+U)continue;if(G>=t&&G+U<=i){n.push(S);continue}let me=Math.max(0,t-G),fe=Math.min(i-G,U);n.push(S.slice(me,fe))}return e.clone(n)}};ca.Chunked=Or;function WO(r){let e=new Uint32Array((r||[]).length+1),t=e[0]=0,i=e.length;for(let n=0;++n<i;)e[n]=t+=r[n-1].length;return e}var HO=(r,e,t)=>(e.set(r,t),t+r.length),YO=(r,e,t)=>{let i=t;for(let n=-1,s=r.length;++n<s;)e[i++]=r[n];return i}});var An=V(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.Column=void 0;var J_=Ke(),K_=Re(),$c=ci(),Ni=class extends $c.Chunked{constructor(e,t=[],i){t=$c.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Gc))return new Gc(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof J_.Field)&&(i=t,t="");let s=$c.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof K_.Vector?[i,...n]:[K_.Vector.new(i,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new J_.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Ni(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 Ni(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Ni(n,s):null}};la.Column=Ni;var Gc=class extends Ni{constructor(e,t,i){super(e,[t],i);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 Z_=V(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.instance=Fn.TypeAssembler=void 0;var $O=gr(),GO=$O.flatbuffers.Long,JO=tt(),Y=$r(),Jc=class extends JO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Y.Null.startNull(t),Y.Null.endNull(t)}visitInt(e,t){return Y.Int.startInt(t),Y.Int.addBitWidth(t,e.bitWidth),Y.Int.addIsSigned(t,e.isSigned),Y.Int.endInt(t)}visitFloat(e,t){return Y.FloatingPoint.startFloatingPoint(t),Y.FloatingPoint.addPrecision(t,e.precision),Y.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return Y.Binary.startBinary(t),Y.Binary.endBinary(t)}visitBool(e,t){return Y.Bool.startBool(t),Y.Bool.endBool(t)}visitUtf8(e,t){return Y.Utf8.startUtf8(t),Y.Utf8.endUtf8(t)}visitDecimal(e,t){return Y.Decimal.startDecimal(t),Y.Decimal.addScale(t,e.scale),Y.Decimal.addPrecision(t,e.precision),Y.Decimal.endDecimal(t)}visitDate(e,t){return Y.Date.startDate(t),Y.Date.addUnit(t,e.unit),Y.Date.endDate(t)}visitTime(e,t){return Y.Time.startTime(t),Y.Time.addUnit(t,e.unit),Y.Time.addBitWidth(t,e.bitWidth),Y.Time.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return Y.Timestamp.startTimestamp(t),Y.Timestamp.addUnit(t,e.unit),i!==void 0&&Y.Timestamp.addTimezone(t,i),Y.Timestamp.endTimestamp(t)}visitInterval(e,t){return Y.Interval.startInterval(t),Y.Interval.addUnit(t,e.unit),Y.Interval.endInterval(t)}visitList(e,t){return Y.List.startList(t),Y.List.endList(t)}visitStruct(e,t){return Y.Struct_.startStruct_(t),Y.Struct_.endStruct_(t)}visitUnion(e,t){Y.Union.startTypeIdsVector(t,e.typeIds.length);let i=Y.Union.createTypeIdsVector(t,e.typeIds);return Y.Union.startUnion(t),Y.Union.addMode(t,e.mode),Y.Union.addTypeIds(t,i),Y.Union.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return Y.DictionaryEncoding.startDictionaryEncoding(t),Y.DictionaryEncoding.addId(t,new GO(e.id,0)),Y.DictionaryEncoding.addIsOrdered(t,e.isOrdered),i!==void 0&&Y.DictionaryEncoding.addIndexType(t,i),Y.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Y.FixedSizeBinary.startFixedSizeBinary(t),Y.FixedSizeBinary.addByteWidth(t,e.byteWidth),Y.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Y.FixedSizeList.startFixedSizeList(t),Y.FixedSizeList.addListSize(t,e.listSize),Y.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return Y.Map.startMap(t),Y.Map.addKeysSorted(t,e.keysSorted),Y.Map.endMap(t)}};Fn.TypeAssembler=Jc;Fn.instance=new Jc});var nb=V(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.fieldFromJSON=ur.dictionaryBatchFromJSON=ur.recordBatchFromJSON=ur.schemaFromJSON=void 0;var Mn=Ke(),De=be(),xi=Ei(),Vn=Te();function KO(r,e=new Map){return new Mn.Schema(XO(r,e),da(r.customMetadata),e)}ur.schemaFromJSON=KO;function X_(r){return new xi.RecordBatch(r.count,eb(r.columns),tb(r.columns))}ur.recordBatchFromJSON=X_;function ZO(r){return new xi.DictionaryBatch(X_(r.data),r.id,r.isDelta)}ur.dictionaryBatchFromJSON=ZO;function XO(r,e){return(r.fields||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function Q_(r,e){return(r.children||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function eb(r){return(r||[]).reduce((e,t)=>[...e,new xi.FieldNode(t.count,QO(t.VALIDITY)),...eb(t.children)],[])}function tb(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new xi.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new xi.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new xi.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new xi.BufferRegion(e.length,n.DATA.length)),e=tb(n.children,e)}return e}function QO(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function eA(r,e){let t,i,n,s,c,v;return!e||!(s=r.dictionary)?(c=ib(r,Q_(r,e)),n=new Mn.Field(r.name,c,r.nullable,da(r.customMetadata))):e.has(t=s.id)?(i=(i=s.indexType)?rb(i):new De.Int32,v=new De.Dictionary(e.get(t),i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,da(r.customMetadata))):(i=(i=s.indexType)?rb(i):new De.Int32,e.set(t,c=ib(r,Q_(r,e))),v=new De.Dictionary(c,i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,da(r.customMetadata))),n||null}ur.fieldFromJSON=eA;function da(r){return new Map(Object.entries(r||{}))}function rb(r){return new De.Int(r.isSigned,r.bitWidth)}function ib(r,e){let t=r.type.name;switch(t){case"NONE":return new De.Null;case"null":return new De.Null;case"binary":return new De.Binary;case"utf8":return new De.Utf8;case"bool":return new De.Bool;case"list":return new De.List((e||[])[0]);case"struct":return new De.Struct(e||[]);case"struct_":return new De.Struct(e||[])}switch(t){case"int":{let i=r.type;return new De.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new De.Float(Vn.Precision[i.precision])}case"decimal":{let i=r.type;return new De.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new De.Date_(Vn.DateUnit[i.unit])}case"time":{let i=r.type;return new De.Time(Vn.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new De.Timestamp(Vn.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new De.Interval(Vn.IntervalUnit[i.unit])}case"union":{let i=r.type;return new De.Union(Vn.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new De.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new De.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new De.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Ei=V(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.FieldNode=Ft.BufferRegion=Ft.DictionaryBatch=Ft.RecordBatch=Ft.Message=void 0;var Kc=gr(),W=$r(),Fe=yo(),Ze=Ke(),tA=Ye(),Ce=Te(),Zc=Z_(),fa=nb(),Li=Kc.flatbuffers.Long,rA=Kc.flatbuffers.Builder,iA=Kc.flatbuffers.ByteBuffer,Oe=be(),li=class{constructor(e,t,i,n){this._version=t,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let i=new li(0,Ce.MetadataVersion.V4,t);return i._createHeader=nA(e,t),i}static decode(e){e=new iA(tA.toUint8Array(e));let t=Fe.Message.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),s=t.headerType(),c=new li(i,n,s);return c._createHeader=sA(t,s),c}static encode(e){let t=new rA,i=-1;return e.isSchema()?i=Ze.Schema.encode(t,e.header()):e.isRecordBatch()?i=At.encode(t,e.header()):e.isDictionaryBatch()&&(i=cr.encode(t,e.header())),Fe.Message.startMessage(t),Fe.Message.addVersion(t,Ce.MetadataVersion.V4),Fe.Message.addHeader(t,i),Fe.Message.addHeaderType(t,e.headerType),Fe.Message.addBodyLength(t,new Li(e.bodyLength,0)),Fe.Message.finishMessageBuffer(t,Fe.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Ze.Schema)return new li(0,Ce.MetadataVersion.V4,Ce.MessageHeader.Schema,e);if(e instanceof At)return new li(t,Ce.MetadataVersion.V4,Ce.MessageHeader.RecordBatch,e);if(e instanceof cr)return new li(t,Ce.MetadataVersion.V4,Ce.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===Ce.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ce.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ce.MessageHeader.DictionaryBatch}};Ft.Message=li;var At=class{constructor(e,t,i){this._nodes=t,this._buffers=i,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};Ft.RecordBatch=At;var cr=class{constructor(e,t,i=!1){this._data=e,this._isDelta=i,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}};Ft.DictionaryBatch=cr;var qi=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Ft.BufferRegion=qi;var zi=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Ft.FieldNode=zi;function nA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.fromJSON(r);case Ce.MessageHeader.RecordBatch:return At.fromJSON(r);case Ce.MessageHeader.DictionaryBatch:return cr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}function sA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.decode(r.header(new W.Schema));case Ce.MessageHeader.RecordBatch:return At.decode(r.header(new Fe.RecordBatch),r.version());case Ce.MessageHeader.DictionaryBatch:return cr.decode(r.header(new Fe.DictionaryBatch),r.version())}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}Ze.Field.encode=mA;Ze.Field.decode=pA;Ze.Field.fromJSON=fa.fieldFromJSON;Ze.Schema.encode=yA;Ze.Schema.decode=oA;Ze.Schema.fromJSON=fa.schemaFromJSON;At.encode=_A;At.decode=aA;At.fromJSON=fa.recordBatchFromJSON;cr.encode=bA;cr.decode=uA;cr.fromJSON=fa.dictionaryBatchFromJSON;zi.encode=gA;zi.decode=lA;qi.encode=vA;qi.decode=cA;function oA(r,e=new Map){let t=hA(r,e);return new Ze.Schema(t,ha(r),e)}function aA(r,e=Ce.MetadataVersion.V4){return new At(r.length(),dA(r),fA(r,e))}function uA(r,e=Ce.MetadataVersion.V4){return new cr(At.decode(r.data(),e),r.id(),r.isDelta())}function cA(r){return new qi(r.offset(),r.length())}function lA(r){return new zi(r.length(),r.nullCount())}function dA(r){let e=[];for(let t,i=-1,n=-1,s=r.nodesLength();++i<s;)(t=r.nodes(i))&&(e[++n]=zi.decode(t));return e}function fA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.buffersLength();++n<c;)(i=r.buffers(n))&&(e<Ce.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++s]=qi.decode(i));return t}function hA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.fieldsLength();++n<c;)(i=r.fields(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function sb(r,e){let t=[];for(let i,n=-1,s=-1,c=r.childrenLength();++n<c;)(i=r.children(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function pA(r,e){let t,i,n,s,c,v;return!e||!(v=r.dictionary())?(n=ab(r,sb(r,e)),i=new Ze.Field(r.name(),n,r.nullable(),ha(r))):e.has(t=v.id().low)?(s=(s=v.indexType())?ob(s):new Oe.Int32,c=new Oe.Dictionary(e.get(t),s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ha(r))):(s=(s=v.indexType())?ob(s):new Oe.Int32,e.set(t,n=ab(r,sb(r,e))),c=new Oe.Dictionary(n,s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ha(r))),i||null}function ha(r){let e=new Map;if(r)for(let t,i,n=-1,s=r.customMetadataLength()|0;++n<s;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function ob(r){return new Oe.Int(r.isSigned(),r.bitWidth())}function ab(r,e){let t=r.typeType();switch(t){case W.Type.NONE:return new Oe.Null;case W.Type.Null:return new Oe.Null;case W.Type.Binary:return new Oe.Binary;case W.Type.Utf8:return new Oe.Utf8;case W.Type.Bool:return new Oe.Bool;case W.Type.List:return new Oe.List((e||[])[0]);case W.Type.Struct_:return new Oe.Struct(e||[])}switch(t){case W.Type.Int:{let i=r.type(new W.Int);return new Oe.Int(i.isSigned(),i.bitWidth())}case W.Type.FloatingPoint:{let i=r.type(new W.FloatingPoint);return new Oe.Float(i.precision())}case W.Type.Decimal:{let i=r.type(new W.Decimal);return new Oe.Decimal(i.scale(),i.precision())}case W.Type.Date:{let i=r.type(new W.Date);return new Oe.Date_(i.unit())}case W.Type.Time:{let i=r.type(new W.Time);return new Oe.Time(i.unit(),i.bitWidth())}case W.Type.Timestamp:{let i=r.type(new W.Timestamp);return new Oe.Timestamp(i.unit(),i.timezone())}case W.Type.Interval:{let i=r.type(new W.Interval);return new Oe.Interval(i.unit())}case W.Type.Union:{let i=r.type(new W.Union);return new Oe.Union(i.mode(),i.typeIdsArray()||[],e||[])}case W.Type.FixedSizeBinary:{let i=r.type(new W.FixedSizeBinary);return new Oe.FixedSizeBinary(i.byteWidth())}case W.Type.FixedSizeList:{let i=r.type(new W.FixedSizeList);return new Oe.FixedSizeList(i.listSize(),(e||[])[0])}case W.Type.Map:{let i=r.type(new W.Map);return new Oe.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${W.Type[t]}" (${t})`)}function yA(r,e){let t=e.fields.map(s=>Ze.Field.encode(r,s));W.Schema.startFieldsVector(r,t.length);let i=W.Schema.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?W.Schema.createCustomMetadataVector(r,[...e.metadata].map(([s,c])=>{let v=r.createString(`${s}`),w=r.createString(`${c}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,v),W.KeyValue.addValue(r,w),W.KeyValue.endKeyValue(r)})):-1;return W.Schema.startSchema(r),W.Schema.addFields(r,i),W.Schema.addEndianness(r,jA?W.Endianness.Little:W.Endianness.Big),n!==-1&&W.Schema.addCustomMetadata(r,n),W.Schema.endSchema(r)}function mA(r,e){let t=-1,i=-1,n=-1,s=e.type,c=e.typeId;Oe.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=Zc.instance.visit(s,r),i=Zc.instance.visit(s.dictionary,r)):i=Zc.instance.visit(s,r);let v=(s.children||[]).map(U=>Ze.Field.encode(r,U)),w=W.Field.createChildrenVector(r,v),S=e.metadata&&e.metadata.size>0?W.Field.createCustomMetadataVector(r,[...e.metadata].map(([U,G])=>{let me=r.createString(`${U}`),fe=r.createString(`${G}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,me),W.KeyValue.addValue(r,fe),W.KeyValue.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),W.Field.startField(r),W.Field.addType(r,i),W.Field.addTypeType(r,c),W.Field.addChildren(r,w),W.Field.addNullable(r,!!e.nullable),t!==-1&&W.Field.addName(r,t),n!==-1&&W.Field.addDictionary(r,n),S!==-1&&W.Field.addCustomMetadata(r,S),W.Field.endField(r)}function _A(r,e){let t=e.nodes||[],i=e.buffers||[];Fe.RecordBatch.startNodesVector(r,t.length),t.slice().reverse().forEach(c=>zi.encode(r,c));let n=r.endVector();Fe.RecordBatch.startBuffersVector(r,i.length),i.slice().reverse().forEach(c=>qi.encode(r,c));let s=r.endVector();return Fe.RecordBatch.startRecordBatch(r),Fe.RecordBatch.addLength(r,new Li(e.length,0)),Fe.RecordBatch.addNodes(r,n),Fe.RecordBatch.addBuffers(r,s),Fe.RecordBatch.endRecordBatch(r)}function bA(r,e){let t=At.encode(r,e.data);return Fe.DictionaryBatch.startDictionaryBatch(r),Fe.DictionaryBatch.addId(r,new Li(e.id,0)),Fe.DictionaryBatch.addIsDelta(r,e.isDelta),Fe.DictionaryBatch.addData(r,t),Fe.DictionaryBatch.endDictionaryBatch(r)}function gA(r,e){return Fe.FieldNode.createFieldNode(r,new Li(e.length,0),new Li(e.nullCount,0))}function vA(r,e){return W.Buffer.createBuffer(r,new Li(e.offset,0),new Li(e.length,0))}var jA=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var ya=V(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.magicX2AndPadding=pe.magicAndPadding=pe.magicLength=pe.checkForMagicArrowString=pe.MAGIC=pe.MAGIC_STR=pe.PADDING=pe.JSONMessageReader=pe.AsyncMessageReader=pe.MessageReader=void 0;var di=Te(),wA=gr(),ub=wA.flatbuffers.ByteBuffer,vs=Ei(),BA=st(),TA=Ec(),cb=Ye(),pa=si(),Yt=rn(),Xc=r=>`Expected ${di.MessageHeader[r]} Message in stream, but was null or length 0.`,Qc=r=>`Header pointer of flatbuffer-encoded ${di.MessageHeader[r]} Message is null or length 0.`,lb=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,db=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,el=class{constructor(e){this.source=e instanceof pa.ByteStream?e:new pa.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?Yt.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(Xc(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=cb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(db(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=di.MessageHeader.Schema,i=this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Qc(t));return n}readMetadataLength(){let e=this.source.read(pe.PADDING),t=e&&new ub(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return Yt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(lb(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.MessageReader=el;var fb=class{constructor(e,t){this.source=e instanceof pa.AsyncByteStream?e:BA.isFileHandle(e)?new TA.AsyncRandomAccessFile(e,t):new pa.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}async next(){let e;return(e=await this.readMetadataLength()).done||e.value===-1&&(e=await this.readMetadataLength()).done||(e=await this.readMetadata(e.value)).done?Yt.ITERATOR_DONE:e}async throw(e){return await this.source.throw(e)}async return(e){return await this.source.return(e)}async readMessage(e){let t;if((t=await this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Xc(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=cb.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(db(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){let t=di.MessageHeader.Schema,i=await this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Qc(t));return n}async readMetadataLength(){let e=await this.source.read(pe.PADDING),t=e&&new ub(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}async readMetadata(e){let t=await this.source.read(e);if(!t)return Yt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(lb(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.AsyncMessageReader=fb;var hb=class extends el{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Yt.ArrowJSON?e:new Yt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=vs.Message.fromJSON(e.schema,di.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 i=vs.Message.fromJSON(t,di.MessageHeader.DictionaryBatch);return{done:!1,value:i}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let i=vs.Message.fromJSON(t,di.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],Yt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).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(Xc(e));return t.value}readSchema(){let e=di.MessageHeader.Schema,t=this.readMessage(e),i=t&&t.header();if(!t||!i)throw new Error(Qc(e));return i}};pe.JSONMessageReader=hb;pe.PADDING=4;pe.MAGIC_STR="ARROW1";pe.MAGIC=new Uint8Array(pe.MAGIC_STR.length);for(let r=0;r<pe.MAGIC_STR.length;r+=1|0)pe.MAGIC[r]=pe.MAGIC_STR.charCodeAt(r);function IA(r,e=0){for(let t=-1,i=pe.MAGIC.length;++t<i;)if(pe.MAGIC[t]!==r[e+t])return!1;return!0}pe.checkForMagicArrowString=IA;pe.magicLength=pe.MAGIC.length;pe.magicAndPadding=pe.magicLength+pe.PADDING;pe.magicX2AndPadding=pe.magicLength*2+pe.PADDING});var nl=V(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.compareTypes=Pe.compareFields=Pe.compareSchemas=Pe.instance=Pe.TypeComparator=void 0;var SA=tt(),J=class extends SA.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((i,n)=>this.compareFields(i,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)}};Pe.TypeComparator=J;function ft(r,e){return e instanceof r.constructor}function js(r,e){return r===e||ft(r,e)}function Ar(r,e){return r===e||ft(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function ma(r,e){return r===e||ft(r,e)&&r.precision===e.precision}function DA(r,e){return r===e||ft(r,e)&&r.byteWidth===e.byteWidth}function tl(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function ws(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function Bs(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function OA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function AA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function rl(r,e){return r===e||ft(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&Pe.instance.compareManyFields(r.children,e.children)}function FA(r,e){return r===e||ft(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&Pe.instance.visit(r.indices,e.indices)&&Pe.instance.visit(r.dictionary,e.dictionary)}function il(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function MA(r,e){return r===e||ft(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function VA(r,e){return r===e||ft(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}J.prototype.visitNull=js;J.prototype.visitBool=js;J.prototype.visitInt=Ar;J.prototype.visitInt8=Ar;J.prototype.visitInt16=Ar;J.prototype.visitInt32=Ar;J.prototype.visitInt64=Ar;J.prototype.visitUint8=Ar;J.prototype.visitUint16=Ar;J.prototype.visitUint32=Ar;J.prototype.visitUint64=Ar;J.prototype.visitFloat=ma;J.prototype.visitFloat16=ma;J.prototype.visitFloat32=ma;J.prototype.visitFloat64=ma;J.prototype.visitUtf8=js;J.prototype.visitBinary=js;J.prototype.visitFixedSizeBinary=DA;J.prototype.visitDate=tl;J.prototype.visitDateDay=tl;J.prototype.visitDateMillisecond=tl;J.prototype.visitTimestamp=ws;J.prototype.visitTimestampSecond=ws;J.prototype.visitTimestampMillisecond=ws;J.prototype.visitTimestampMicrosecond=ws;J.prototype.visitTimestampNanosecond=ws;J.prototype.visitTime=Bs;J.prototype.visitTimeSecond=Bs;J.prototype.visitTimeMillisecond=Bs;J.prototype.visitTimeMicrosecond=Bs;J.prototype.visitTimeNanosecond=Bs;J.prototype.visitDecimal=js;J.prototype.visitList=OA;J.prototype.visitStruct=AA;J.prototype.visitUnion=rl;J.prototype.visitDenseUnion=rl;J.prototype.visitSparseUnion=rl;J.prototype.visitDictionary=FA;J.prototype.visitInterval=il;J.prototype.visitIntervalDayTime=il;J.prototype.visitIntervalYearMonth=il;J.prototype.visitFixedSizeList=MA;J.prototype.visitMap=VA;Pe.instance=new J;function UA(r,e){return Pe.instance.compareSchemas(r,e)}Pe.compareSchemas=UA;function CA(r,e){return Pe.instance.compareFields(r,e)}Pe.compareFields=CA;function PA(r,e){return Pe.instance.visit(r,e)}Pe.compareTypes=PA});var bb=V(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.VectorAssembler=void 0;var kA=tt(),pb=Te(),RA=Fr(),sl=Ye(),ol=tr(),NA=On(),yb=Ei(),mb=be(),qe=class extends kA.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new qe,i=NA.selectVectorChildrenArgs(RA.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!mb.DataType.isDictionary(e.type)){let{data:t,length:i,nullCount:n}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");mb.DataType.isNull(e.type)||$t.call(this,n<=0?new Uint8Array(0):ol.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new yb.FieldNode(i,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}};_a.VectorAssembler=qe;function $t(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new yb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function xA(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if($t.call(this,i),e.mode===pb.UnionMode.Sparse)return ul.call(this,r);if(e.mode===pb.UnionMode.Dense){if(r.offset<=0)return $t.call(this,n),ul.call(this,r);{let s=i.reduce((U,G)=>Math.max(U,G),i[0]),c=new Int32Array(s+1),v=new Int32Array(s+1).fill(-1),w=new Int32Array(t),S=sl.rebaseValueOffsets(-n[0],t,n);for(let U,G,me=-1;++me<t;)(G=v[U=i[me]])===-1&&(G=v[U]=S[U]),w[me]=S[me]-G,++c[U];$t.call(this,w);for(let U,G=-1,me=e.children.length;++G<me;)if(U=r.getChildAt(G)){let fe=e.typeIds[G],Gt=Math.min(t,c[fe]);this.visit(U.slice(v[fe],Gt))}}}return this}function EA(r){let e;return r.nullCount>=r.length?$t.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?$t.call(this,ol.truncateBitmap(r.offset,r.length,e)):$t.call(this,ol.packBools(r))}function fi(r){return $t.call(this,r.values.subarray(0,r.length*r.stride))}function _b(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],s=i[e],c=Math.min(s-n,t.byteLength-n);return $t.call(this,sl.rebaseValueOffsets(-i[0],e,i)),$t.call(this,t.subarray(n,n+c)),this}function al(r){let{length:e,valueOffsets:t}=r;return t&&$t.call(this,sl.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function ul(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}qe.prototype.visitBool=EA;qe.prototype.visitInt=fi;qe.prototype.visitFloat=fi;qe.prototype.visitUtf8=_b;qe.prototype.visitBinary=_b;qe.prototype.visitFixedSizeBinary=fi;qe.prototype.visitDate=fi;qe.prototype.visitTimestamp=fi;qe.prototype.visitTime=fi;qe.prototype.visitDecimal=fi;qe.prototype.visitList=al;qe.prototype.visitStruct=ul;qe.prototype.visitUnion=xA;qe.prototype.visitInterval=fi;qe.prototype.visitFixedSizeList=al;qe.prototype.visitMap=al});var vb=V(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.JSONTypeAssembler=void 0;var LA=tt(),it=$r(),Un=Te(),gb=class extends LA.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:it.Type[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:it.Type[e].toLowerCase(),precision:Un.Precision[t]}}visitBinary({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:it.Type[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.IntervalUnit[t]}}visitList({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:it.Type[e].toLowerCase(),mode:Un.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:it.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:it.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:it.Type[e].toLowerCase(),keysSorted:t}}};ba.JSONTypeAssembler=gb});var Bb=V(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.JSONVectorAssembler=void 0;var qA=ls(),Ts=An(),zA=Re(),WA=tt(),HA=Te(),YA=Fr(),cl=Te(),ga=tr(),$A=On(),jb=be(),va=class extends WA.Visitor{static assemble(...e){return new va().visitMany($A.selectColumnChildrenArgs(YA.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:s,nullCount:c,nullBitmap:v}=t,w=jb.DataType.isDictionary(e.type)?e.type.indices:e.type,S=Object.assign([],t.buffers,{[HA.BufferType.VALIDITY]:void 0});return{name:i,count:n,VALIDITY:jb.DataType.isNull(w)?void 0:c<=0?Array.from({length:n},()=>1):[...new ga.BitIterator(v,s,n,null,ga.getBit)],...super.visit(zA.Vector.new(t.clone(w,s,n,0,S)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...new ga.BitIterator(e,t,i,null,ga.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Is(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...wb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...wb(e)]}}visitDate(e){return{DATA:e.type.unit===cl.DateUnit.DAY?[...e.values]:[...Is(e.values,2)]}}visitTimestamp(e){return{DATA:[...Is(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<cl.TimeUnit.MICROSECOND?[...e.values]:[...Is(e.values,2)]}}visitDecimal(e){return{DATA:[...Is(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===cl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}};ja.JSONVectorAssembler=va;function*wb(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Is(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${qA.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var Sa=V(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.RecordBatchJSONWriter=dr.RecordBatchFileWriter=dr.RecordBatchStreamWriter=dr.RecordBatchWriter=void 0;var ll=Ds(),GA=ya(),JA=An(),KA=be(),ZA=Ke(),wa=Ei(),dl=Ei(),Cn=Rc(),fl=Te(),Tb=nl(),hl=si(),Ib=bb(),XA=vb(),Sb=Bb(),QA=Ye(),pl=Fr(),eF=rn(),lr=st(),Ss=class extends eF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new hl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,lr.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 lr.isPromise(e)?e.then(t=>this.writeAll(t)):lr.isAsyncIterable(e)?ml(this,e):yl(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 hl.AsyncByteQueue?this._sink=e:(this._sink=new hl.AsyncByteQueue,e&&lr.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&lr.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||!Tb.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 ll.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof pl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!Tb.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof pl.RecordBatch?e instanceof pl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof ll.Table?this.writeAll(e.chunks):lr.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=wa.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,v=s+c+i&~i,w=v-s-c;return e.headerType===fl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)):e.headerType===fl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(v-c)),s>0&&this._write(n),this._writePadding(w)}_write(e){if(this._started){let t=QA.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(wa.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(GA.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:s}=Ib.VectorAssembler.assemble(e),c=new dl.RecordBatch(e.length,i,n),v=wa.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(v)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:v}=Ib.VectorAssembler.assemble(e),w=new dl.RecordBatch(e.length,s,c),S=new dl.DictionaryBatch(w,t,i),U=wa.Message.from(S,n);return this._writeMessage(U)._writeBodyBuffers(v)}_writeBodyBuffers(e){let t,i,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(i=t.byteLength)>0&&(this._write(t),(n=(i+7&~7)-i)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,i]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(i=i.slice(n)).length>0){let s="chunks"in i?i.chunks:[i];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};dr.RecordBatchWriter=Ss;var Ba=class extends Ss{static writeAll(e,t){let i=new Ba(t);return lr.isPromise(e)?e.then(n=>i.writeAll(n)):lr.isAsyncIterable(e)?ml(i,e):yl(i,e)}};dr.RecordBatchStreamWriter=Ba;var Ta=class extends Ss{static writeAll(e){let t=new Ta;return lr.isPromise(e)?e.then(i=>t.writeAll(i)):lr.isAsyncIterable(e)?ml(t,e):yl(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Cn.Footer.encode(new Cn.Footer(e,fl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};dr.RecordBatchFileWriter=Ta;var Ia=class extends Ss{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ia().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
-
"schema": ${JSON.stringify({fields:e.fields.map(
|
|
9
|
-
`),this._write(`${
|
|
7
|
+
return true;`)}Fo.createIsValidFunction=m1;function _1(r){return typeof r!="bigint"?Xu.valueToString(r):y1.BigIntAvailable?`${Xu.valueToString(r)}n`:`"${Xu.valueToString(r)}"`}});var Kr=V(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.WideBufferBuilder=wt.OffsetsBufferBuilder=wt.BitmapBufferBuilder=wt.DataBufferBuilder=wt.BufferBuilder=void 0;var sm=Ye(),Qu=st(),ec=(r,e)=>(r*e+63&~63||64)/e,b1=(r,e=0)=>r.length>=e?r.subarray(0,e):sm.memcpy(new r.constructor(e),r,0),ss=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,i=this.length*t,n=this.buffer.length;i>=n&&this._resize(n===0?ec(i*1,this.BYTES_PER_ELEMENT):ec(i*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=ec(e*this.stride,this.BYTES_PER_ELEMENT);let t=b1(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this._resize(0),this}_resize(e){return this.buffer=sm.memcpy(new this.ArrayType(e),this.buffer)}};wt.BufferBuilder=ss;ss.prototype.offset=0;var Mo=class extends ss{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}};wt.DataBufferBuilder=Mo;var om=class extends Mo{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:i}=this.reserve(e-this.length+1),n=e>>3,s=e%8,c=i[n]>>s&1;return t?c===0&&(i[n]|=1<<s,++this.numValid):c===1&&(i[n]&=~(1<<s),--this.numValid),this}clear(){return this.numValid=0,super.clear()}};wt.BitmapBufferBuilder=om;var am=class extends Mo{constructor(e=new Int32Array(1)){super(e,1)}append(e){return this.set(this.length-1,e)}set(e,t){let i=this.length-1,n=this.reserve(e-i+1).buffer;return i<e++&&n.fill(n[i],i,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)}};wt.OffsetsBufferBuilder=am;var um=class extends ss{get ArrayType64(){return this._ArrayType64||(this._ArrayType64=this.buffer instanceof Int32Array?Qu.BigInt64Array:Qu.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),i=t.byteLength/(this.BYTES_PER_ELEMENT*this.stride);return Qu.BigIntAvailable&&(this.buffer64=new this.ArrayType64(t.buffer,t.byteOffset,i)),t}};wt.WideBufferBuilder=um});var Ue=V(Zr=>{"use strict";Object.defineProperty(Zr,"__esModule",{value:!0});Zr.VariableWidthBuilder=Zr.FixedWidthBuilder=Zr.Builder=void 0;var g1=Re(),cn=Te(),v1=qt(),j1=nm(),tc=Kr(),w1=be(),Bt=class{constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=w1.strideForType(e),this._nulls=new tc.BitmapBufferBuilder,t&&t.length>0&&(this._isValid=j1.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 B1(e)}static throughAsyncIterable(e){return T1(e)}toVector(){return g1.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,i)=>t+i.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,i)=>t+i.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,i=this._offsets,n=this._typeIds,{length:s,nullCount:c}=this;n?(e[cn.BufferType.TYPE]=n.flush(s),i&&(e[cn.BufferType.OFFSET]=i.flush(s))):i?(t&&(e[cn.BufferType.DATA]=t.flush(i.last())),e[cn.BufferType.OFFSET]=i.flush(s)):t&&(e[cn.BufferType.DATA]=t.flush(s)),c>0&&(e[cn.BufferType.VALIDITY]=this._nulls.flush(s));let v=v1.Data.new(this.type,0,s,c,e,this.children.map(I=>I.flush()));return this.clear(),v}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}};Zr.Builder=Bt;Bt.prototype.length=1;Bt.prototype.stride=1;Bt.prototype.children=null;Bt.prototype.finished=!1;Bt.prototype.nullValues=null;Bt.prototype._isValid=()=>!0;var cm=class extends Bt{constructor(e){super(e);this._values=new tc.DataBufferBuilder(new this.ArrayType(0),this.stride)}setValue(e,t){let i=this._values;return i.reserve(e-i.length+1),super.setValue(e,t)}};Zr.FixedWidthBuilder=cm;var lm=class extends Bt{constructor(e){super(e);this._pendingLength=0,this._offsets=new tc.OffsetsBufferBuilder}setValue(e,t){let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t.length,i.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}};Zr.VariableWidthBuilder=lm;function B1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return function*(n){let s=0,c=Bt.new(r);for(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}function T1(r){let{["queueingStrategy"]:e="count"}=r,{["highWaterMark"]:t=e!=="bytes"?1e3:2**14}=r,i=e!=="bytes"?"length":"byteLength";return async function*(n){let s=0,c=Bt.new(r);for await(let v of n)c.append(v)[i]>=t&&++s&&(yield c.toVector());(c.finish().length>0||s===0)&&(yield c.toVector())}}});var rc=V(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.BoolBuilder=void 0;var I1=Kr(),S1=Ue(),dm=class extends S1.Builder{constructor(e){super(e);this._values=new I1.BitmapBufferBuilder}setValue(e,t){this._values.set(e,+t)}};Vo.BoolBuilder=dm});var ic=V(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.NullBuilder=void 0;var D1=Ue(),fm=class extends D1.Builder{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}};Uo.NullBuilder=fm});var nc=V(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.DateMillisecondBuilder=Xr.DateDayBuilder=Xr.DateBuilder=void 0;var O1=Ue(),Co=class extends O1.FixedWidthBuilder{};Xr.DateBuilder=Co;var hm=class extends Co{};Xr.DateDayBuilder=hm;var pm=class extends Co{};Xr.DateMillisecondBuilder=pm});var sc=V(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.DecimalBuilder=void 0;var A1=Ue(),ym=class extends A1.FixedWidthBuilder{};Po.DecimalBuilder=ym});var ac=V(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.DictionaryBuilder=void 0;var F1=be(),oc=Ue(),mm=class extends oc.Builder{constructor({type:e,nullValues:t,dictionaryHashFunction:i}){super({type:new F1.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 i=="function"&&(this.valueToKey=i)}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 i=this.indices;return t=i.setValid(e,t),this.length=i.length,t}setValue(e,t){let i=this._keysToIndices,n=this.valueToKey(t),s=i[n];return s===void 0&&(i[n]=s=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,s)}flush(){let e=this.type,t=this._dictionary,i=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(i):i,this.finished||(this._dictionaryOffset+=i.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}`}};ko.DictionaryBuilder=mm});var uc=V(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.FixedSizeBinaryBuilder=void 0;var M1=Ue(),_m=class extends M1.FixedWidthBuilder{};Ro.FixedSizeBinaryBuilder=_m});var os=V(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.float64ToUint16=dn.uint16ToFloat64=void 0;var bm=new Float64Array(1),ln=new Uint32Array(bm.buffer);function V1(r){let e=(r&31744)>>10,t=(r&1023)/1024,i=(-1)**((r&32768)>>15);switch(e){case 31:return i*(t?NaN:1/0);case 0:return i*(t?6103515625e-14*t:0)}return i*2**(e-15)*(1+t)}dn.uint16ToFloat64=V1;function U1(r){if(r!==r)return 32256;bm[0]=r;let e=(ln[1]&2147483648)>>16&65535,t=ln[1]&2146435072,i=0;return t>=1089470464?ln[0]>0?t=31744:(t=(t&2080374784)>>16,i=(ln[1]&1048575)>>10):t<=1056964608?(i=1048576+(ln[1]&1048575),i=1048576+(i<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,i=(ln[1]&1048575)+512>>10),e|t|i&65535}dn.float64ToUint16=U1});var cc=V(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.Float64Builder=rr.Float32Builder=rr.Float16Builder=rr.FloatBuilder=void 0;var C1=os(),P1=Ue(),as=class extends P1.FixedWidthBuilder{};rr.FloatBuilder=as;var gm=class extends as{setValue(e,t){this._values.set(e,C1.float64ToUint16(t))}};rr.Float16Builder=gm;var vm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float32Builder=vm;var jm=class extends as{setValue(e,t){this._values.set(e,t)}};rr.Float64Builder=jm});var ls=V($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.BN=$e.bignumToBigInt=$e.bignumToString=$e.isArrowBigNumSymbol=void 0;var k1=Ye(),us=st();$e.isArrowBigNumSymbol=Symbol.for("isArrowBigNum");function zt(r,...e){return e.length===0?Object.setPrototypeOf(k1.toArrayBufferView(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}zt.prototype[$e.isArrowBigNumSymbol]=!0;zt.prototype.toJSON=function(){return`"${$e.bignumToString(this)}"`};zt.prototype.valueOf=function(){return wm(this)};zt.prototype.toString=function(){return $e.bignumToString(this)};zt.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return wm(this);case"string":return $e.bignumToString(this);case"default":return $e.bignumToBigInt(this)}return $e.bignumToString(this)};function fn(...r){return zt.apply(this,r)}function hn(...r){return zt.apply(this,r)}function cs(...r){return zt.apply(this,r)}Object.setPrototypeOf(fn.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(hn.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(cs.prototype,Object.create(Uint32Array.prototype));Object.assign(fn.prototype,zt.prototype,{constructor:fn,signed:!0,TypedArray:Int32Array,BigIntArray:us.BigInt64Array});Object.assign(hn.prototype,zt.prototype,{constructor:hn,signed:!1,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});Object.assign(cs.prototype,zt.prototype,{constructor:cs,signed:!0,TypedArray:Uint32Array,BigIntArray:us.BigUint64Array});function wm(r){let{buffer:e,byteOffset:t,length:i,signed:n}=r,s=new Int32Array(e,t,i),c=0,v=0,I=s.length,S,U;for(;v<I;)U=s[v++],S=s[v++],n||(S=S>>>0),c+=(U>>>0)+S*v**32;return c}us.BigIntAvailable?($e.bignumToBigInt=r=>r.byteLength===8?new r.BigIntArray(r.buffer,r.byteOffset,1)[0]:lc(r),$e.bignumToString=r=>r.byteLength===8?`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`:lc(r)):($e.bignumToString=lc,$e.bignumToBigInt=$e.bignumToString);function lc(r){let e="",t=new Uint32Array(2),i=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),n=new Uint32Array((i=new Uint16Array(i).reverse()).buffer),s=-1,c=i.length-1;do{for(t[0]=i[s=0];s<c;)i[s++]=t[1]=t[0]/10,t[0]=(t[0]-t[1]*10<<16)+i[s];i[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 No=class{static new(e,t){switch(t){case!0:return new fn(e);case!1:return new hn(e)}switch(e.constructor){case Int8Array:case Int16Array:case Int32Array:case us.BigInt64Array:return new fn(e)}return e.byteLength===16?new cs(e):new hn(e)}static signed(e){return new fn(e)}static unsigned(e){return new hn(e)}static decimal(e){return new cs(e)}constructor(e,t){return No.new(e,t)}};$e.BN=No});var dc=V(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.Uint64Builder=Le.Uint32Builder=Le.Uint16Builder=Le.Uint8Builder=Le.Int64Builder=Le.Int32Builder=Le.Int16Builder=Le.Int8Builder=Le.IntBuilder=void 0;var R1=ls(),Bm=Kr(),N1=st(),x1=Ue(),ir=class extends x1.FixedWidthBuilder{setValue(e,t){this._values.set(e,t)}};Le.IntBuilder=ir;var Tm=class extends ir{};Le.Int8Builder=Tm;var Im=class extends ir{};Le.Int16Builder=Im;var Sm=class extends ir{};Le.Int32Builder=Sm;var Dm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(xo));super(e);this._values=new Bm.WideBufferBuilder(new Int32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(xo(e))}};Le.Int64Builder=Dm;var Om=class extends ir{};Le.Uint8Builder=Om;var Am=class extends ir{};Le.Uint16Builder=Am;var Fm=class extends ir{};Le.Uint32Builder=Fm;var Mm=class extends ir{constructor(e){e.nullValues&&(e.nullValues=e.nullValues.map(xo));super(e);this._values=new Bm.WideBufferBuilder(new Uint32Array(0),2)}get values64(){return this._values.buffer64}isValid(e){return super.isValid(xo(e))}};Le.Uint64Builder=Mm;var xo=(r=>e=>(ArrayBuffer.isView(e)&&(r.buffer=e.buffer,r.byteOffset=e.byteOffset,r.byteLength=e.byteLength,e=R1.bignumToBigInt(r),r.buffer=null),e))({BigIntArray:N1.BigInt64Array})});var fc=V(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.TimeNanosecondBuilder=Tt.TimeMicrosecondBuilder=Tt.TimeMillisecondBuilder=Tt.TimeSecondBuilder=Tt.TimeBuilder=void 0;var E1=Ue(),pn=class extends E1.FixedWidthBuilder{};Tt.TimeBuilder=pn;var Vm=class extends pn{};Tt.TimeSecondBuilder=Vm;var Um=class extends pn{};Tt.TimeMillisecondBuilder=Um;var Cm=class extends pn{};Tt.TimeMicrosecondBuilder=Cm;var Pm=class extends pn{};Tt.TimeNanosecondBuilder=Pm});var hc=V(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.TimestampNanosecondBuilder=It.TimestampMicrosecondBuilder=It.TimestampMillisecondBuilder=It.TimestampSecondBuilder=It.TimestampBuilder=void 0;var L1=Ue(),yn=class extends L1.FixedWidthBuilder{};It.TimestampBuilder=yn;var km=class extends yn{};It.TimestampSecondBuilder=km;var Rm=class extends yn{};It.TimestampMillisecondBuilder=Rm;var Nm=class extends yn{};It.TimestampMicrosecondBuilder=Nm;var xm=class extends yn{};It.TimestampNanosecondBuilder=xm});var pc=V(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.IntervalYearMonthBuilder=Qr.IntervalDayTimeBuilder=Qr.IntervalBuilder=void 0;var q1=Ue(),Eo=class extends q1.FixedWidthBuilder{};Qr.IntervalBuilder=Eo;var Em=class extends Eo{};Qr.IntervalDayTimeBuilder=Em;var Lm=class extends Eo{};Qr.IntervalYearMonthBuilder=Lm});var qo=V(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.BinaryBuilder=void 0;var z1=Ye(),W1=Kr(),H1=Ue(),qm=class extends H1.VariableWidthBuilder{constructor(e){super(e);this._values=new W1.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,z1.toUint8Array(t))}_flushPending(e,t){let i=this._offsets,n=this._values.reserve(t).buffer,s=0,c=0,v=0,I;for([s,I]of e)I===void 0?i.set(s,0):(c=I.length,n.set(I,v),i.set(s,c),v+=c)}};Lo.BinaryBuilder=qm});var Wo=V(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.Utf8Builder=void 0;var Y1=Ti(),$1=qo(),G1=Kr(),J1=Ue(),yc=class extends J1.VariableWidthBuilder{constructor(e){super(e);this._values=new G1.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,Y1.encodeUtf8(t))}_flushPending(e,t){}};zo.Utf8Builder=yc;yc.prototype._flushPending=$1.BinaryBuilder.prototype._flushPending});var mc=V(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});Ho.Run=void 0;var K1=Re(),zm=class{get length(){return this._values.length}get(e){return this._values[e]}clear(){return this._values=null,this}bind(e){return e instanceof K1.Vector?e:(this._values=e,this)}};Ho.Run=zm});var Ke=V(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.Field=mn.Schema=void 0;var Z1=be(),St=class{constructor(e=[],t,i){this.fields=e||[],this.metadata=t||new Map,i||(i=_c(e)),this.dictionaries=i}get[Symbol.toStringTag](){return"Schema"}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(...e){let t=e.reduce((i,n)=>(i[n]=!0)&&i,Object.create(null));return new St(this.fields.filter(i=>t[i.name]),this.metadata)}selectAt(...e){return new St(e.map(t=>this.fields[t]).filter(Boolean),this.metadata)}assign(...e){let t=e[0]instanceof St?e[0]:Array.isArray(e[0])?new St(e[0]):new St(e),i=[...this.fields],n=Yo(Yo(new Map,this.metadata),t.metadata),s=t.fields.filter(v=>{let I=i.findIndex(S=>S.name===v.name);return~I?(i[I]=v.clone({metadata:Yo(Yo(new Map,i[I].metadata),v.metadata)}))&&!1:!0}),c=_c(s,new Map);return new St([...i,...s],n,new Map([...this.dictionaries,...c]))}};mn.Schema=St;var Tr=class{constructor(e,t,i=!1,n){this.name=e,this.type=t,this.nullable=i,this.metadata=n||new Map}static new(...e){let[t,i,n,s]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],i===void 0&&(i=e[0].type),n===void 0&&(n=e[0].nullable),s===void 0&&(s=e[0].metadata)),new Tr(`${t}`,i,n,s)}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,i,n,s]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,i=this.type,n=this.nullable,s=this.metadata]=e:{name:t=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=e[0],Tr.new(t,i,n,s)}};mn.Field=Tr;function Yo(r,e){return new Map([...r||new Map,...e||new Map])}function _c(r,e=new Map){for(let t=-1,i=r.length;++t<i;){let s=r[t].type;if(Z1.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&&_c(s.children,e)}return e}St.prototype.fields=null;St.prototype.metadata=null;St.prototype.dictionaries=null;Tr.prototype.type=null;Tr.prototype.name=null;Tr.prototype.nullable=null;Tr.prototype.metadata=null});var bc=V($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.ListBuilder=void 0;var X1=mc(),Q1=Ke(),eD=be(),tD=Kr(),rD=Ue(),Wm=class extends rD.VariableWidthBuilder{constructor(e){super(e);this._run=new X1.Run,this._offsets=new tD.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 eD.List(new Q1.Field(t,e.type,!0)),this.numChildren-1}clear(){return this._run.clear(),super.clear()}_flushPending(e){let t=this._run,i=this._offsets,n=this._setValue,s=0,c;for([s,c]of e)c===void 0?i.set(s,0):(i.set(s,c.length),n(this,s,t.bind(c)))}};$o.ListBuilder=Wm});var gc=V(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.FixedSizeListBuilder=void 0;var iD=mc(),nD=Ke(),sD=Ue(),oD=be(),Hm=class extends sD.Builder{constructor(){super(...arguments);this._run=new iD.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 i=this.children.push(e);return this.type=new oD.FixedSizeList(this.type.listSize,new nD.Field(t,e.type,!0)),i}clear(){return this._run.clear(),super.clear()}};Go.FixedSizeListBuilder=Hm});var vc=V(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});Jo.MapBuilder=void 0;var aD=Ke(),uD=be(),cD=Ue(),Ym=class extends cD.VariableWidthBuilder{set(e,t){return super.set(e,t)}setValue(e,t){t=t instanceof Map?t:new Map(Object.entries(t));let i=this._pending||(this._pending=new Map),n=i.get(e);n&&(this._pendingLength-=n.size),this._pendingLength+=t.size,i.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 uD.Map_(new aD.Field(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,i=this._setValue;e.forEach((n,s)=>{n===void 0?t.set(s,0):(t.set(s,n.size),i(this,s,n))})}};Jo.MapBuilder=Ym});var jc=V(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});Ko.StructBuilder=void 0;var lD=Ke(),dD=Ue(),fD=be(),$m=class extends dD.Builder{addChild(e,t=`${this.numChildren}`){let i=this.children.push(e);return this.type=new fD.Struct([...this.type.children,new lD.Field(t,e.type,!0)]),i}};Ko.StructBuilder=$m});var wc=V(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.DenseUnionBuilder=ei.SparseUnionBuilder=ei.UnionBuilder=void 0;var hD=Ke(),Gm=Kr(),pD=Ue(),yD=be(),Zo=class extends pD.Builder{constructor(e){super(e);this._typeIds=new Gm.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,i){return i===void 0&&(i=this._valueToChildTypeId(this,t,e)),this.setValid(e,this.isValid(t))&&this.setValue(e,t,i),this}setValue(e,t,i){this._typeIds.set(e,i),super.setValue(e,t)}addChild(e,t=`${this.children.length}`){let i=this.children.push(e),{type:{children:n,mode:s,typeIds:c}}=this,v=[...n,new hD.Field(t,e.type)];return this.type=new yD.Union(s,[...c,i],v),i}_valueToChildTypeId(e,t,i){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.")}};ei.UnionBuilder=Zo;var Jm=class extends Zo{};ei.SparseUnionBuilder=Jm;var Km=class extends Zo{constructor(e){super(e);this._offsets=new Gm.DataBufferBuilder(new Int32Array(0))}setValue(e,t,i){let n=this.type.typeIdToChildIndex[i];return this._offsets.set(e,this.getChildAt(n).length),super.setValue(e,t,i)}};ei.DenseUnionBuilder=Km});var tt=V(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.Visitor=void 0;var mD=qt(),_D=Re(),F=Te(),bD=be(),we=class{visitMany(e,...t){return e.map((i,n)=>this.visit(i,...t.map(s=>s[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return gD(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}};Xo.Visitor=we;function gD(r,e,t=!0){let i=null,n=F.Type.NONE;switch(e instanceof mD.Data||e instanceof _D.Vector?n=Bc(e.type):e instanceof bD.DataType?n=Bc(e):typeof(n=e)!="number"&&(n=F.Type[e]),n){case F.Type.Null:i=r.visitNull;break;case F.Type.Bool:i=r.visitBool;break;case F.Type.Int:i=r.visitInt;break;case F.Type.Int8:i=r.visitInt8||r.visitInt;break;case F.Type.Int16:i=r.visitInt16||r.visitInt;break;case F.Type.Int32:i=r.visitInt32||r.visitInt;break;case F.Type.Int64:i=r.visitInt64||r.visitInt;break;case F.Type.Uint8:i=r.visitUint8||r.visitInt;break;case F.Type.Uint16:i=r.visitUint16||r.visitInt;break;case F.Type.Uint32:i=r.visitUint32||r.visitInt;break;case F.Type.Uint64:i=r.visitUint64||r.visitInt;break;case F.Type.Float:i=r.visitFloat;break;case F.Type.Float16:i=r.visitFloat16||r.visitFloat;break;case F.Type.Float32:i=r.visitFloat32||r.visitFloat;break;case F.Type.Float64:i=r.visitFloat64||r.visitFloat;break;case F.Type.Utf8:i=r.visitUtf8;break;case F.Type.Binary:i=r.visitBinary;break;case F.Type.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case F.Type.Date:i=r.visitDate;break;case F.Type.DateDay:i=r.visitDateDay||r.visitDate;break;case F.Type.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case F.Type.Timestamp:i=r.visitTimestamp;break;case F.Type.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case F.Type.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case F.Type.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case F.Type.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case F.Type.Time:i=r.visitTime;break;case F.Type.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case F.Type.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case F.Type.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case F.Type.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case F.Type.Decimal:i=r.visitDecimal;break;case F.Type.List:i=r.visitList;break;case F.Type.Struct:i=r.visitStruct;break;case F.Type.Union:i=r.visitUnion;break;case F.Type.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case F.Type.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case F.Type.Dictionary:i=r.visitDictionary;break;case F.Type.Interval:i=r.visitInterval;break;case F.Type.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case F.Type.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case F.Type.FixedSizeList:i=r.visitFixedSizeList;break;case F.Type.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!t)return()=>null;throw new Error(`Unrecognized type '${F.Type[n]}'`)}function Bc(r){switch(r.typeId){case F.Type.Null:return F.Type.Null;case F.Type.Int:{let{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?F.Type.Int8:F.Type.Uint8;case 16:return t?F.Type.Int16:F.Type.Uint16;case 32:return t?F.Type.Int32:F.Type.Uint32;case 64:return t?F.Type.Int64:F.Type.Uint64}return F.Type.Int}case F.Type.Float:switch(r.precision){case F.Precision.HALF:return F.Type.Float16;case F.Precision.SINGLE:return F.Type.Float32;case F.Precision.DOUBLE:return F.Type.Float64}return F.Type.Float;case F.Type.Binary:return F.Type.Binary;case F.Type.Utf8:return F.Type.Utf8;case F.Type.Bool:return F.Type.Bool;case F.Type.Decimal:return F.Type.Decimal;case F.Type.Time:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimeSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimeMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimeMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimeNanosecond}return F.Type.Time;case F.Type.Timestamp:switch(r.unit){case F.TimeUnit.SECOND:return F.Type.TimestampSecond;case F.TimeUnit.MILLISECOND:return F.Type.TimestampMillisecond;case F.TimeUnit.MICROSECOND:return F.Type.TimestampMicrosecond;case F.TimeUnit.NANOSECOND:return F.Type.TimestampNanosecond}return F.Type.Timestamp;case F.Type.Date:switch(r.unit){case F.DateUnit.DAY:return F.Type.DateDay;case F.DateUnit.MILLISECOND:return F.Type.DateMillisecond}return F.Type.Date;case F.Type.Interval:switch(r.unit){case F.IntervalUnit.DAY_TIME:return F.Type.IntervalDayTime;case F.IntervalUnit.YEAR_MONTH:return F.Type.IntervalYearMonth}return F.Type.Interval;case F.Type.Map:return F.Type.Map;case F.Type.List:return F.Type.List;case F.Type.Struct:return F.Type.Struct;case F.Type.Union:switch(r.mode){case F.UnionMode.Dense:return F.Type.DenseUnion;case F.UnionMode.Sparse:return F.Type.SparseUnion}return F.Type.Union;case F.Type.FixedSizeBinary:return F.Type.FixedSizeBinary;case F.Type.FixedSizeList:return F.Type.FixedSizeList;case F.Type.Dictionary:return F.Type.Dictionary}throw new Error(`Unrecognized type '${F.Type[r.typeId]}'`)}we.prototype.visitInt8=null;we.prototype.visitInt16=null;we.prototype.visitInt32=null;we.prototype.visitInt64=null;we.prototype.visitUint8=null;we.prototype.visitUint16=null;we.prototype.visitUint32=null;we.prototype.visitUint64=null;we.prototype.visitFloat16=null;we.prototype.visitFloat32=null;we.prototype.visitFloat64=null;we.prototype.visitDateDay=null;we.prototype.visitDateMillisecond=null;we.prototype.visitTimestampSecond=null;we.prototype.visitTimestampMillisecond=null;we.prototype.visitTimestampMicrosecond=null;we.prototype.visitTimestampNanosecond=null;we.prototype.visitTimeSecond=null;we.prototype.visitTimeMillisecond=null;we.prototype.visitTimeMicrosecond=null;we.prototype.visitTimeNanosecond=null;we.prototype.visitDenseUnion=null;we.prototype.visitSparseUnion=null;we.prototype.visitIntervalDayTime=null;we.prototype.visitIntervalYearMonth=null});var Sc=V(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.instance=_n.SetVisitor=void 0;var vD=Re(),jD=tt(),wD=Ti(),BD=os(),TD=Ye(),Dt=Te(),re=class extends jD.Visitor{};_n.SetVisitor=re;var ID=(r,e,t)=>{r[e]=t/864e5|0},Tc=(r,e,t)=>{r[e]=t%4294967296|0,r[e+1]=t/4294967296|0},SD=(r,e,t)=>{r[e]=t*1e3%4294967296|0,r[e+1]=t*1e3/4294967296|0},DD=(r,e,t)=>{r[e]=t*1e6%4294967296|0,r[e+1]=t*1e6/4294967296|0},Zm=(r,e,t,i)=>{let{[t]:n,[t+1]:s}=e;n!=null&&s!=null&&r.set(i.subarray(0,s-n),n)},OD=({offset:r,values:e},t,i)=>{let n=r+t;i?e[n>>3]|=1<<n%8:e[n>>3]&=~(1<<n%8)},Xm=({values:r},e,t)=>{ID(r,e,t.valueOf())},Qm=({values:r},e,t)=>{Tc(r,e*2,t.valueOf())},nr=({stride:r,values:e},t,i)=>{e[r*t]=i},e_=({stride:r,values:e},t,i)=>{e[r*t]=BD.float64ToUint16(i)},Ic=(r,e,t)=>{switch(typeof t){case"bigint":r.values64[e]=t;break;case"number":r.values[e*r.stride]=t;break;default:{let i=t,{stride:n,ArrayType:s}=r,c=TD.toArrayBufferView(s,i);r.values.set(c.subarray(0,n),n*e)}}},AD=({stride:r,values:e},t,i)=>{e.set(i.subarray(0,r),r*t)},FD=({values:r,valueOffsets:e},t,i)=>Zm(r,e,t,i),MD=({values:r,valueOffsets:e},t,i)=>{Zm(r,e,t,wD.encodeUtf8(i))},VD=(r,e,t)=>{r.type.bitWidth<64?nr(r,e,t):Ic(r,e,t)},UD=(r,e,t)=>{r.type.precision!==Dt.Precision.HALF?nr(r,e,t):e_(r,e,t)},CD=(r,e,t)=>{r.type.unit===Dt.DateUnit.DAY?Xm(r,e,t):Qm(r,e,t)},t_=({values:r},e,t)=>Tc(r,e*2,t/1e3),r_=({values:r},e,t)=>Tc(r,e*2,t),i_=({values:r},e,t)=>SD(r,e*2,t),n_=({values:r},e,t)=>DD(r,e*2,t),PD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return t_(r,e,t);case Dt.TimeUnit.MILLISECOND:return r_(r,e,t);case Dt.TimeUnit.MICROSECOND:return i_(r,e,t);case Dt.TimeUnit.NANOSECOND:return n_(r,e,t)}},s_=({values:r,stride:e},t,i)=>{r[e*t]=i},o_=({values:r,stride:e},t,i)=>{r[e*t]=i},a_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},u_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},kD=(r,e,t)=>{switch(r.type.unit){case Dt.TimeUnit.SECOND:return s_(r,e,t);case Dt.TimeUnit.MILLISECOND:return o_(r,e,t);case Dt.TimeUnit.MICROSECOND:return a_(r,e,t);case Dt.TimeUnit.NANOSECOND:return u_(r,e,t)}},RD=({values:r},e,t)=>{r.set(t.subarray(0,4),4*e)},ND=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets;for(let s=-1,c=n[e],v=n[e+1];c<v;)i.set(c++,t.get(++s))},xD=(r,e,t)=>{let i=r.getChildAt(0),n=r.valueOffsets,s=t instanceof Map?[...t]:Object.entries(t);for(let c=-1,v=n[e],I=n[e+1];v<I;)i.set(v++,s[++c])},ED=(r,e)=>(t,i,n)=>t&&t.set(r,e[n]),LD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(n)),qD=(r,e)=>(t,i,n)=>t&&t.set(r,e.get(i.name)),zD=(r,e)=>(t,i,n)=>t&&t.set(r,e[i.name]),WD=(r,e,t)=>{let i=t instanceof Map?qD(e,t):t instanceof vD.Vector?LD(e,t):Array.isArray(t)?ED(e,t):zD(e,t);r.type.children.forEach((n,s)=>i(r.getChildAt(s),n,s))},HD=(r,e,t)=>{r.type.mode===Dt.UnionMode.Dense?c_(r,e,t):l_(r,e,t)},c_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(r.valueOffsets[e],t)},l_=(r,e,t)=>{let i=r.typeIdToChildIndex[r.typeIds[e]],n=r.getChildAt(i);n&&n.set(e,t)},YD=(r,e,t)=>{let i=r.getKey(e);i!==null&&r.setValue(i,t)},$D=(r,e,t)=>{r.type.unit===Dt.IntervalUnit.DAY_TIME?d_(r,e,t):f_(r,e,t)},d_=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},f_=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},GD=(r,e,t)=>{let i=r.getChildAt(0),{stride:n}=r;for(let s=-1,c=e*n;++s<n;)i.set(c+s,t.get(s))};re.prototype.visitBool=OD;re.prototype.visitInt=VD;re.prototype.visitInt8=nr;re.prototype.visitInt16=nr;re.prototype.visitInt32=nr;re.prototype.visitInt64=Ic;re.prototype.visitUint8=nr;re.prototype.visitUint16=nr;re.prototype.visitUint32=nr;re.prototype.visitUint64=Ic;re.prototype.visitFloat=UD;re.prototype.visitFloat16=e_;re.prototype.visitFloat32=nr;re.prototype.visitFloat64=nr;re.prototype.visitUtf8=MD;re.prototype.visitBinary=FD;re.prototype.visitFixedSizeBinary=AD;re.prototype.visitDate=CD;re.prototype.visitDateDay=Xm;re.prototype.visitDateMillisecond=Qm;re.prototype.visitTimestamp=PD;re.prototype.visitTimestampSecond=t_;re.prototype.visitTimestampMillisecond=r_;re.prototype.visitTimestampMicrosecond=i_;re.prototype.visitTimestampNanosecond=n_;re.prototype.visitTime=kD;re.prototype.visitTimeSecond=s_;re.prototype.visitTimeMillisecond=o_;re.prototype.visitTimeMicrosecond=a_;re.prototype.visitTimeNanosecond=u_;re.prototype.visitDecimal=RD;re.prototype.visitList=ND;re.prototype.visitStruct=WD;re.prototype.visitUnion=HD;re.prototype.visitDenseUnion=c_;re.prototype.visitSparseUnion=l_;re.prototype.visitDictionary=YD;re.prototype.visitInterval=$D;re.prototype.visitIntervalDayTime=d_;re.prototype.visitIntervalYearMonth=f_;re.prototype.visitFixedSizeList=GD;re.prototype.visitMap=xD;_n.instance=new re});var h_=V(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.instance=bn.GetBuilderCtor=void 0;var JD=tt(),KD=qo(),ZD=rc(),Dc=nc(),XD=sc(),QD=ac(),eO=uc(),tO=gc(),Qo=cc(),Oc=pc(),Ir=dc(),rO=bc(),iO=vc(),nO=ic(),sO=jc(),ds=hc(),fs=fc(),Ac=wc(),oO=Wo(),Fc=class extends JD.Visitor{visitNull(){return nO.NullBuilder}visitBool(){return ZD.BoolBuilder}visitInt(){return Ir.IntBuilder}visitInt8(){return Ir.Int8Builder}visitInt16(){return Ir.Int16Builder}visitInt32(){return Ir.Int32Builder}visitInt64(){return Ir.Int64Builder}visitUint8(){return Ir.Uint8Builder}visitUint16(){return Ir.Uint16Builder}visitUint32(){return Ir.Uint32Builder}visitUint64(){return Ir.Uint64Builder}visitFloat(){return Qo.FloatBuilder}visitFloat16(){return Qo.Float16Builder}visitFloat32(){return Qo.Float32Builder}visitFloat64(){return Qo.Float64Builder}visitUtf8(){return oO.Utf8Builder}visitBinary(){return KD.BinaryBuilder}visitFixedSizeBinary(){return eO.FixedSizeBinaryBuilder}visitDate(){return Dc.DateBuilder}visitDateDay(){return Dc.DateDayBuilder}visitDateMillisecond(){return Dc.DateMillisecondBuilder}visitTimestamp(){return ds.TimestampBuilder}visitTimestampSecond(){return ds.TimestampSecondBuilder}visitTimestampMillisecond(){return ds.TimestampMillisecondBuilder}visitTimestampMicrosecond(){return ds.TimestampMicrosecondBuilder}visitTimestampNanosecond(){return ds.TimestampNanosecondBuilder}visitTime(){return fs.TimeBuilder}visitTimeSecond(){return fs.TimeSecondBuilder}visitTimeMillisecond(){return fs.TimeMillisecondBuilder}visitTimeMicrosecond(){return fs.TimeMicrosecondBuilder}visitTimeNanosecond(){return fs.TimeNanosecondBuilder}visitDecimal(){return XD.DecimalBuilder}visitList(){return rO.ListBuilder}visitStruct(){return sO.StructBuilder}visitUnion(){return Ac.UnionBuilder}visitDenseUnion(){return Ac.DenseUnionBuilder}visitSparseUnion(){return Ac.SparseUnionBuilder}visitDictionary(){return QD.DictionaryBuilder}visitInterval(){return Oc.IntervalBuilder}visitIntervalDayTime(){return Oc.IntervalDayTimeBuilder}visitIntervalYearMonth(){return Oc.IntervalYearMonthBuilder}visitFixedSizeList(){return tO.FixedSizeListBuilder}visitMap(){return iO.MapBuilder}};bn.GetBuilderCtor=Fc;bn.instance=new Fc});var ta=V(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.DenseUnionBuilder=R.SparseUnionBuilder=R.UnionBuilder=R.StructBuilder=R.MapBuilder=R.FixedSizeListBuilder=R.ListBuilder=R.BinaryBuilder=R.Utf8Builder=R.IntervalYearMonthBuilder=R.IntervalDayTimeBuilder=R.IntervalBuilder=R.TimestampNanosecondBuilder=R.TimestampMicrosecondBuilder=R.TimestampMillisecondBuilder=R.TimestampSecondBuilder=R.TimestampBuilder=R.TimeNanosecondBuilder=R.TimeMicrosecondBuilder=R.TimeMillisecondBuilder=R.TimeSecondBuilder=R.TimeBuilder=R.Uint64Builder=R.Uint32Builder=R.Uint16Builder=R.Uint8Builder=R.Int64Builder=R.Int32Builder=R.Int16Builder=R.Int8Builder=R.IntBuilder=R.Float64Builder=R.Float32Builder=R.Float16Builder=R.FloatBuilder=R.FixedSizeBinaryBuilder=R.DictionaryBuilder=R.DecimalBuilder=R.DateMillisecondBuilder=R.DateDayBuilder=R.DateBuilder=R.NullBuilder=R.BoolBuilder=R.Builder=void 0;var aO=Ue();Object.defineProperty(R,"Builder",{enumerable:!0,get:function(){return aO.Builder}});var uO=rc();Object.defineProperty(R,"BoolBuilder",{enumerable:!0,get:function(){return uO.BoolBuilder}});var cO=ic();Object.defineProperty(R,"NullBuilder",{enumerable:!0,get:function(){return cO.NullBuilder}});var Mc=nc();Object.defineProperty(R,"DateBuilder",{enumerable:!0,get:function(){return Mc.DateBuilder}});Object.defineProperty(R,"DateDayBuilder",{enumerable:!0,get:function(){return Mc.DateDayBuilder}});Object.defineProperty(R,"DateMillisecondBuilder",{enumerable:!0,get:function(){return Mc.DateMillisecondBuilder}});var lO=sc();Object.defineProperty(R,"DecimalBuilder",{enumerable:!0,get:function(){return lO.DecimalBuilder}});var dO=ac();Object.defineProperty(R,"DictionaryBuilder",{enumerable:!0,get:function(){return dO.DictionaryBuilder}});var fO=uc();Object.defineProperty(R,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return fO.FixedSizeBinaryBuilder}});var ea=cc();Object.defineProperty(R,"FloatBuilder",{enumerable:!0,get:function(){return ea.FloatBuilder}});Object.defineProperty(R,"Float16Builder",{enumerable:!0,get:function(){return ea.Float16Builder}});Object.defineProperty(R,"Float32Builder",{enumerable:!0,get:function(){return ea.Float32Builder}});Object.defineProperty(R,"Float64Builder",{enumerable:!0,get:function(){return ea.Float64Builder}});var Sr=dc();Object.defineProperty(R,"IntBuilder",{enumerable:!0,get:function(){return Sr.IntBuilder}});Object.defineProperty(R,"Int8Builder",{enumerable:!0,get:function(){return Sr.Int8Builder}});Object.defineProperty(R,"Int16Builder",{enumerable:!0,get:function(){return Sr.Int16Builder}});Object.defineProperty(R,"Int32Builder",{enumerable:!0,get:function(){return Sr.Int32Builder}});Object.defineProperty(R,"Int64Builder",{enumerable:!0,get:function(){return Sr.Int64Builder}});Object.defineProperty(R,"Uint8Builder",{enumerable:!0,get:function(){return Sr.Uint8Builder}});Object.defineProperty(R,"Uint16Builder",{enumerable:!0,get:function(){return Sr.Uint16Builder}});Object.defineProperty(R,"Uint32Builder",{enumerable:!0,get:function(){return Sr.Uint32Builder}});Object.defineProperty(R,"Uint64Builder",{enumerable:!0,get:function(){return Sr.Uint64Builder}});var hs=fc();Object.defineProperty(R,"TimeBuilder",{enumerable:!0,get:function(){return hs.TimeBuilder}});Object.defineProperty(R,"TimeSecondBuilder",{enumerable:!0,get:function(){return hs.TimeSecondBuilder}});Object.defineProperty(R,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return hs.TimeMillisecondBuilder}});Object.defineProperty(R,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return hs.TimeMicrosecondBuilder}});Object.defineProperty(R,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return hs.TimeNanosecondBuilder}});var ps=hc();Object.defineProperty(R,"TimestampBuilder",{enumerable:!0,get:function(){return ps.TimestampBuilder}});Object.defineProperty(R,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ps.TimestampSecondBuilder}});Object.defineProperty(R,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMillisecondBuilder}});Object.defineProperty(R,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampMicrosecondBuilder}});Object.defineProperty(R,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ps.TimestampNanosecondBuilder}});var Vc=pc();Object.defineProperty(R,"IntervalBuilder",{enumerable:!0,get:function(){return Vc.IntervalBuilder}});Object.defineProperty(R,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return Vc.IntervalDayTimeBuilder}});Object.defineProperty(R,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return Vc.IntervalYearMonthBuilder}});var hO=Wo();Object.defineProperty(R,"Utf8Builder",{enumerable:!0,get:function(){return hO.Utf8Builder}});var pO=qo();Object.defineProperty(R,"BinaryBuilder",{enumerable:!0,get:function(){return pO.BinaryBuilder}});var yO=bc();Object.defineProperty(R,"ListBuilder",{enumerable:!0,get:function(){return yO.ListBuilder}});var mO=gc();Object.defineProperty(R,"FixedSizeListBuilder",{enumerable:!0,get:function(){return mO.FixedSizeListBuilder}});var _O=vc();Object.defineProperty(R,"MapBuilder",{enumerable:!0,get:function(){return _O.MapBuilder}});var bO=jc();Object.defineProperty(R,"StructBuilder",{enumerable:!0,get:function(){return bO.StructBuilder}});var Uc=wc();Object.defineProperty(R,"UnionBuilder",{enumerable:!0,get:function(){return Uc.UnionBuilder}});Object.defineProperty(R,"SparseUnionBuilder",{enumerable:!0,get:function(){return Uc.SparseUnionBuilder}});Object.defineProperty(R,"DenseUnionBuilder",{enumerable:!0,get:function(){return Uc.DenseUnionBuilder}});var Cc=Te(),gO=Wo(),vO=Ue(),p_=Sc(),y_=h_();vO.Builder.new=m_;function m_(r){let e=r.type,t=new(y_.instance.getVisitFn(e)())(r);if(e.children&&e.children.length>0){let i=r.children||[],n={nullValues:r.nullValues},s=Array.isArray(i)?(c,v)=>i[v]||n:({name:c})=>i[c]||n;e.children.forEach((c,v)=>{let{type:I}=c,S=s(c,v);t.children.push(m_({...S,type:I}))})}return t}Object.keys(Cc.Type).map(r=>Cc.Type[r]).filter(r=>typeof r=="number"&&r!==Cc.Type.NONE).forEach(r=>{let e=y_.instance.visit(r);e.prototype._setValue=p_.instance.getVisitFn(r)});gO.Utf8Builder.prototype._setValue=p_.instance.visitBinary});var __=V(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.Block=gn.Footer=void 0;var jO=gr(),ra=$r(),Ot=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 Ot).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+jO.flatbuffers.SIZE_PREFIX_LENGTH),(t||new Ot).__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):ra.MetadataVersion.V1}schema(e){let t=this.bb.__offset(this.bb_pos,6);return t?(e||new ra.Schema).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){let i=this.bb.__offset(this.bb_pos,8);return i?(t||new ia).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,10);return i?(t||new ia).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,12);return i?(t||new ra.KeyValue).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,ra.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 i=t.length-1;i>=0;i--)e.addOffset(t[i]);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,i,n,s,c){return Ot.startFooter(e),Ot.addVersion(e,t),Ot.addSchema(e,i),Ot.addDictionaries(e,n),Ot.addRecordBatches(e,s),Ot.addCustomMetadata(e,c),Ot.endFooter(e)}};gn.Footer=Ot;var ia=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,i,n){return e.prep(8,24),e.writeInt64(n),e.pad(4),e.writeInt32(i),e.writeInt64(t),e.offset()}};gn.Block=ia});var Rc=V(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.FileBlock=vn.Footer=void 0;var Wt=__(),Pc=gr(),b_=Pc.flatbuffers.Long,wO=Pc.flatbuffers.Builder,BO=Pc.flatbuffers.ByteBuffer,g_=Ke(),v_=Te(),TO=Ye(),kc=class{constructor(e,t=v_.MetadataVersion.V4,i,n){this.schema=e,this.version=t,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}static decode(e){e=new BO(TO.toUint8Array(e));let t=Wt.Footer.getRootAsFooter(e),i=g_.Schema.decode(t.schema());return new j_(i,t)}static encode(e){let t=new wO,i=g_.Schema.encode(t,e.schema);Wt.Footer.startRecordBatchesVector(t,e.numRecordBatches),[...e.recordBatches()].slice().reverse().forEach(c=>ti.encode(t,c));let n=t.endVector();Wt.Footer.startDictionariesVector(t,e.numDictionaries),[...e.dictionaryBatches()].slice().reverse().forEach(c=>ti.encode(t,c));let s=t.endVector();return Wt.Footer.startFooter(t),Wt.Footer.addSchema(t,i),Wt.Footer.addVersion(t,v_.MetadataVersion.V4),Wt.Footer.addRecordBatches(t,n),Wt.Footer.addDictionaries(t,s),Wt.Footer.finishFooterBuffer(t,Wt.Footer.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}*recordBatches(){for(let e,t=-1,i=this.numRecordBatches;++t<i;)(e=this.getRecordBatch(t))&&(yield e)}*dictionaryBatches(){for(let e,t=-1,i=this.numDictionaries;++t<i;)(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}};vn.Footer=kc;var j_=class extends kc{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 ti.decode(t)}return null}getDictionaryBatch(e){if(e>=0&&e<this.numDictionaries){let t=this._footer.dictionaries(e);if(t)return ti.decode(t)}return null}},ti=class{constructor(e,t,i){this.metaDataLength=e,this.offset=typeof i=="number"?i:i.low,this.bodyLength=typeof t=="number"?t:t.low}static decode(e){return new ti(e.metaDataLength(),e.bodyLength(),e.offset())}static encode(e,t){let{metaDataLength:i}=t,n=new b_(t.offset,0),s=new b_(t.bodyLength,0);return Wt.Block.createBlock(e,n,i,s)}};vn.FileBlock=ti});var si=V(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.AsyncByteStream=ni.ByteStream=ni.AsyncByteQueue=void 0;var ri=ns(),w_=Ti(),ys=rn(),Nc=Ye(),jn=st(),xc=class extends ys.AsyncQueue{write(e){if((e=Nc.toUint8Array(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?w_.decodeUtf8(this.toUint8Array(!0)):this.toUint8Array(!1).then(w_.decodeUtf8)}toUint8Array(e=!1){return e?Nc.joinUint8Arrays(this._values)[0]:(async()=>{let t=[],i=0;for await(let n of this)t.push(n),i+=n.byteLength;return Nc.joinUint8Arrays(t,i)[0]})()}};ni.AsyncByteQueue=xc;var B_=class{constructor(e){e&&(this.source=new T_(ri.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)}};ni.ByteStream=B_;var na=class{constructor(e){e instanceof na?this.source=e.source:e instanceof xc?this.source=new ii(ri.default.fromAsyncIterable(e)):jn.isReadableNodeStream(e)?this.source=new ii(ri.default.fromNodeStream(e)):jn.isReadableDOMStream(e)?this.source=new ii(ri.default.fromDOMStream(e)):jn.isFetchResponse(e)?this.source=new ii(ri.default.fromDOMStream(e.body)):jn.isIterable(e)?this.source=new ii(ri.default.fromIterable(e)):jn.isPromise(e)?this.source=new ii(ri.default.fromAsyncIterable(e)):jn.isAsyncIterable(e)&&(this.source=new ii(ri.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)}};ni.AsyncByteStream=na;var T_=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)||ys.ITERATOR_DONE)}return(e){return Object.create(this.source.return&&this.source.return(e)||ys.ITERATOR_DONE)}},ii=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}async cancel(e){await this.return(e)}get closed(){return this._closedPromise}async read(e){return(await this.next(e,"read")).value}async peek(e){return(await this.next(e,"peek")).value}async next(e,t="read"){return await this.source.next({cmd:t,size:e})}async throw(e){let t=this.source.throw&&await this.source.throw(e)||ys.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}async return(e){let t=this.source.return&&await this.source.return(e)||ys.ITERATOR_DONE;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)}}});var Ec=V(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.AsyncRandomAccessFile=wn.RandomAccessFile=void 0;var I_=si(),IO=Ye(),S_=class extends I_.ByteStream{constructor(e,t){super();this.position=0,this.buffer=IO.toUint8Array(e),this.size=typeof t=="undefined"?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:i}=this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e<this.size}read(e){let{buffer:t,size:i,position:n}=this;return t&&n<i?(typeof e!="number"&&(e=1/0),this.position=Math.min(i,n+Math.min(i-n,e)),t.subarray(n,this.position)):null}readAt(e,t){let i=this.buffer,n=Math.min(this.size,e+t);return i?i.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}}};wn.RandomAccessFile=S_;var D_=class extends I_.AsyncByteStream{constructor(e,t){super();this.position=0,this._handle=e,typeof t=="number"?this.size=t:this._pending=(async()=>{this.size=(await e.stat()).size,delete this._pending})()}async readInt32(e){let{buffer:t,byteOffset:i}=await this.readAt(e,4);return new DataView(t,i).getInt32(0,!0)}async seek(e){return this._pending&&await this._pending,this.position=Math.min(e,this.size),e<this.size}async read(e){this._pending&&await this._pending;let{_handle:t,size:i,position:n}=this;if(t&&n<i){typeof e!="number"&&(e=1/0);let s=n,c=0,v=0,I=Math.min(i,s+Math.min(i-s,e)),S=new Uint8Array(Math.max(0,(this.position=I)-s));for(;(s+=v)<I&&(c+=v)<S.byteLength;)({bytesRead:v}=await t.read(S,c,S.byteLength-c,s));return S}return null}async readAt(e,t){this._pending&&await this._pending;let{_handle:i,size:n}=this;if(i&&e+t<n){let s=Math.min(n,e+t),c=new Uint8Array(s-e);return(await i.read(c,0,t,e)).buffer}return new Uint8Array(t)}async close(){let e=this._handle;this._handle=null,e&&await e.close()}async throw(e){return await this.close(),{done:!0,value:e}}async return(e){return await this.close(),{done:!0,value:e}}};wn.AsyncRandomAccessFile=D_});var qc=V(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.Int128=sr.Int64=sr.Uint64=sr.BaseInt64=void 0;var SO=1<<16;function Bn(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}var Tn=8,Lc=[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]),i=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=t[2]*i[3],s+=n,n=t[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<n?SO:0,this.buffer[1]+=s>>>16,this.buffer[1]+=t[1]*i[3]+t[2]*i[2]+t[3]*i[1],this.buffer[1]+=t[0]*i[3]+t[1]*i[2]+t[2]*i[1]+t[3]*i[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`${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}};sr.BaseInt64=sa;var ge=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 ge.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return ge.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.length,n=new ge(t);for(let s=0;s<i;){let c=Tn<i-s?Tn:i-s,v=new ge(new Uint32Array([parseInt(e.substr(s,c),10),0])),I=new ge(new Uint32Array([Lc[c],0]));n.times(I),n.plus(v),s+=c}return n}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)ge.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new ge(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new ge(new Uint32Array(e.buffer)).plus(t)}};sr.Uint64=ge;var pt=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,i=e.buffer[1]<<0;return t<i||t===i&&this.buffer[0]<e.buffer[0]}static from(e,t=new Uint32Array(2)){return pt.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(2)){return pt.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(2)){let i=e.startsWith("-"),n=e.length,s=new pt(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,I=new pt(new Uint32Array([parseInt(e.substr(c,v),10),0])),S=new pt(new Uint32Array([Lc[v],0]));s.times(S),s.plus(I),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*2);for(let i=-1,n=e.length;++i<n;)pt.from(e[i],new Uint32Array(t.buffer,t.byteOffset+2*i*4,2));return t}static multiply(e,t){return new pt(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new pt(new Uint32Array(e.buffer)).plus(t)}};sr.Int64=pt;var Ht=class{constructor(e){this.buffer=e}high(){return new pt(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new pt(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 ge(new Uint32Array([this.buffer[3],0])),i=new ge(new Uint32Array([this.buffer[2],0])),n=new ge(new Uint32Array([this.buffer[1],0])),s=new ge(new Uint32Array([this.buffer[0],0])),c=new ge(new Uint32Array([e.buffer[3],0])),v=new ge(new Uint32Array([e.buffer[2],0])),I=new ge(new Uint32Array([e.buffer[1],0])),S=new ge(new Uint32Array([e.buffer[0],0])),U=ge.multiply(s,S);this.buffer[0]=U.low();let G=new ge(new Uint32Array([U.high(),0]));return U=ge.multiply(n,S),G.plus(U),U=ge.multiply(s,I),G.plus(U),this.buffer[1]=G.low(),this.buffer[3]=G.lessThan(U)?1:0,this.buffer[2]=G.high(),new ge(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus(ge.multiply(i,S)).plus(ge.multiply(n,I)).plus(ge.multiply(s,v)),this.buffer[3]+=ge.multiply(t,S).plus(ge.multiply(i,I)).plus(ge.multiply(n,v)).plus(ge.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`${Bn(this.buffer[3])} ${Bn(this.buffer[2])} ${Bn(this.buffer[1])} ${Bn(this.buffer[0])}`}static multiply(e,t){return new Ht(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new Ht(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return Ht.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return Ht.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){let i=e.startsWith("-"),n=e.length,s=new Ht(t);for(let c=i?1:0;c<n;){let v=Tn<n-c?Tn:n-c,I=new Ht(new Uint32Array([parseInt(e.substr(c,v),10),0,0,0])),S=new Ht(new Uint32Array([Lc[v],0,0,0]));s.times(S),s.plus(I),c+=v}return i?s.negate():s}static convertArray(e){let t=new Uint32Array(e.length*4);for(let i=-1,n=e.length;++i<n;)Ht.from(e[i],new Uint32Array(t.buffer,t.byteOffset+4*4*i,4));return t}};sr.Int128=Ht});var M_=V(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.JSONVectorLoader=In.VectorLoader=void 0;var Ge=qt(),DO=Ke(),Dr=be(),OO=tt(),O_=tr(),AO=Ti(),oa=qc(),A_=Te(),or=Ye(),zc=class extends OO.Visitor{constructor(e,t,i,n){super();this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=e,this.nodes=t,this.buffers=i,this.dictionaries=n}visit(e){return super.visit(e instanceof DO.Field?e.type:e)}visitNull(e,{length:t}=this.nextFieldNode()){return Ge.Data.Null(e,0,t)}visitBool(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Bool(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitInt(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Int(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFloat(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Float(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitUtf8(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Utf8(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Binary(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.readData(e))}visitFixedSizeBinary(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.FixedSizeBinary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDate(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Date(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTimestamp(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Timestamp(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitTime(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Time(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitDecimal(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Decimal(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.List(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}visitStruct(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Struct(e,0,t,i,this.readNullBitmap(e,i),this.visitMany(e.children))}visitUnion(e){return e.mode===A_.UnionMode.Sparse?this.visitSparseUnion(e):this.visitDenseUnion(e)}visitDenseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.readOffsets(e),this.visitMany(e.children))}visitSparseUnion(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Union(e,0,t,i,this.readNullBitmap(e,i),this.readTypeIds(e),this.visitMany(e.children))}visitDictionary(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Dictionary(e,0,t,i,this.readNullBitmap(e,i),this.readData(e.indices),this.readDictionary(e))}visitInterval(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Interval(e,0,t,i,this.readNullBitmap(e,i),this.readData(e))}visitFixedSizeList(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.FixedSizeList(e,0,t,i,this.readNullBitmap(e,i),this.visit(e.children[0]))}visitMap(e,{length:t,nullCount:i}=this.nextFieldNode()){return Ge.Data.Map(e,0,t,i,this.readNullBitmap(e,i),this.readOffsets(e),this.visit(e.children[0]))}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(e,t,i=this.nextBufferRange()){return t>0&&this.readData(e,i)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+t)}readDictionary(e){return this.dictionaries.get(e.id)}};In.VectorLoader=zc;var F_=class extends zc{constructor(e,t,i,n){super(new Uint8Array(0),t,i,n);this.sources=e}readNullBitmap(e,t,{offset:i}=this.nextBufferRange()){return t<=0?new Uint8Array(0):O_.packBools(this.sources[i])}readOffsets(e,{offset:t}=this.nextBufferRange()){return or.toArrayBufferView(Uint8Array,or.toArrayBufferView(Int32Array,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:i}=this;return Dr.DataType.isTimestamp(e)||(Dr.DataType.isInt(e)||Dr.DataType.isTime(e))&&e.bitWidth===64||Dr.DataType.isDate(e)&&e.unit===A_.DateUnit.MILLISECOND?or.toArrayBufferView(Uint8Array,oa.Int64.convertArray(i[t])):Dr.DataType.isDecimal(e)?or.toArrayBufferView(Uint8Array,oa.Int128.convertArray(i[t])):Dr.DataType.isBinary(e)||Dr.DataType.isFixedSizeBinary(e)?FO(i[t]):Dr.DataType.isBool(e)?O_.packBools(i[t]):Dr.DataType.isUtf8(e)?AO.encodeUtf8(i[t].join("")):or.toArrayBufferView(Uint8Array,or.toArrayBufferView(e.ArrayType,i[t].map(n=>+n)))}};In.JSONVectorLoader=F_;function FO(r){let e=r.join(""),t=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=parseInt(e.substr(i,2),16);return t}});var ms=V(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.StructRow=Dn.MapRow=void 0;var V_=Zu(),rt=Symbol.for("parent"),Sn=Symbol.for("rowIndex"),yt=Symbol.for("keyToIdx"),mt=Symbol.for("idxToVal"),Wc=Symbol.for("nodejs.util.inspect.custom"),ar=class{constructor(e,t){this[rt]=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 i=this[yt]||(this[yt]=new Map),n=i.get(e);if(n!==void 0){let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}else if((n=this.getIndex(e))>-1){i.set(e,n);let s=this[mt]||(this[mt]=new Array(this.size));(t=s[n])!==void 0||(s[n]=t=this.getValue(n))}}return t}set(e,t){if(e!=null){let i=this[yt]||(this[yt]=new Map),n=i.get(e);if(n===void 0&&i.set(e,n=this.getIndex(e)),n>-1){let s=this[mt]||(this[mt]=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(),i=this[yt]||(this[yt]=new Map),n=this[mt]||(this[mt]=new Array(this.size));for(let s,c,v=0,I,S;!((I=e.next()).done||(S=t.next()).done);++v)s=I.value,c=S.value,n[v]=c,i.has(s)||i.set(s,v),yield[s,c]}forEach(e,t){let i=this.keys(),n=this.values(),s=t===void 0?e:(I,S,U)=>e.call(t,I,S,U),c=this[yt]||(this[yt]=new Map),v=this[mt]||(this[mt]=new Array(this.size));for(let I,S,U=0,G,me;!((G=i.next()).done||(me=n.next()).done);++U)I=G.value,S=me.value,v[U]=S,c.has(I)||c.set(I,U),s(S,I,this)}toArray(){return[...this.values()]}toJSON(){let e={};return this.forEach((t,i)=>e[i]=t),e}inspect(){return this.toString()}[Wc](){return this.toString()}toString(){let e=[];return this.forEach((t,i)=>{i=V_.valueToString(i),t=V_.valueToString(t),e.push(`${i}: ${t}`)}),`{ ${e.join(", ")} }`}};ar[Symbol.toStringTag]=(r=>(Object.defineProperties(r,{size:{writable:!0,enumerable:!1,configurable:!1,value:0},[rt]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Sn]:{writable:!0,enumerable:!1,configurable:!1,value:-1}}),r[Symbol.toStringTag]="Row"))(ar.prototype);var U_=class extends ar{constructor(e){super(e,e.length);return MO(this)}keys(){return this[rt].getChildAt(0)[Symbol.iterator]()}values(){return this[rt].getChildAt(1)[Symbol.iterator]()}getKey(e){return this[rt].getChildAt(0).get(e)}getIndex(e){return this[rt].getChildAt(0).indexOf(e)}getValue(e){return this[rt].getChildAt(1).get(e)}setValue(e,t){this[rt].getChildAt(1).set(e,t)}};Dn.MapRow=U_;var C_=class extends ar{constructor(e){super(e,e.type.children.length);return P_(this)}*keys(){for(let e of this[rt].type.children)yield e.name}*values(){for(let e of this[rt].type.children)yield this[e.name]}getKey(e){return this[rt].type.children[e].name}getIndex(e){return this[rt].type.children.findIndex(t=>t.name===e)}getValue(e){return this[rt].getChildAt(e).get(this[Sn])}setValue(e,t){return this[rt].getChildAt(e).set(this[Sn],t)}};Dn.StructRow=C_;Object.setPrototypeOf(ar.prototype,Map.prototype);var P_=(()=>{let r={enumerable:!0,configurable:!1,get:null,set:null};return e=>{let t=-1,i=e[yt]||(e[yt]=new Map),n=c=>function(){return this.get(c)},s=c=>function(v){return this.set(c,v)};for(let c of e.keys())i.set(c,++t),r.get=n(c),r.set=s(c),Object.prototype.hasOwnProperty.call(e,c)||(r.enumerable=!0,Object.defineProperty(e,c,r)),Object.prototype.hasOwnProperty.call(e,t)||(r.enumerable=!1,Object.defineProperty(e,t,r));return r.get=r.set=null,e}})(),MO=(()=>{if(typeof Proxy=="undefined")return P_;let r=ar.prototype.has,e=ar.prototype.get,t=ar.prototype.set,i=ar.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 rt:case Sn:case mt:case yt:case Wc:return!0}return typeof c=="number"&&!s.has(c)&&(c=s.getKey(c)),s.has(c)},get(s,c,v){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 rt:case Sn:case mt:case yt:case Wc:return Reflect.get(s,c,v)}return typeof c=="number"&&!r.call(v,c)&&(c=i.call(v,c)),e.call(v,c)},set(s,c,v,I){switch(c){case rt:case Sn:case mt:case yt:return Reflect.set(s,c,v,I);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"&&!r.call(I,c)&&(c=i.call(I,c)),r.call(I,c)?!!t.call(I,c,v):!1}};return s=>new Proxy(s,n)})()});var bs=V(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.createElementComparator=oi.clampRange=oi.clampIndex=void 0;var k_=Re(),R_=ms(),VO=Ye(),N_=st();function UO(r,e,t){let i=r.length,n=e>-1?e:i+e%i;return t?t(r,n):n}oi.clampIndex=UO;var x_;function CO(r,e,t,i){let{length:n=0}=r,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&&(x_=s,s=c,c=x_),c>n&&(c=n),i?i(r,s,c):[s,c]}oi.clampRange=CO;var PO=N_.BigIntAvailable?N_.BigInt(0):0,E_=r=>r!==r;function _s(r){let e=typeof r;if(e!=="object"||r===null)return E_(r)?E_:e!=="bigint"?t=>t===r:t=>PO+t===r;if(r instanceof Date){let t=r.valueOf();return i=>i instanceof Date?i.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?VO.compareArrayLike(r,t):!1:r instanceof Map?RO(r):Array.isArray(r)?kO(r):r instanceof k_.Vector?NO(r):xO(r)}oi.createElementComparator=_s;function kO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r[t]);return aa(e)}function RO(r){let e=-1,t=[];return r.forEach(i=>t[++e]=_s(i)),aa(t)}function NO(r){let e=[];for(let t=-1,i=r.length;++t<i;)e[t]=_s(r.get(t));return aa(e)}function xO(r){let e=Object.keys(r);if(e.length===0)return()=>!1;let t=[];for(let i=-1,n=e.length;++i<n;)t[i]=_s(r[e[i]]);return aa(t,e)}function aa(r,e){return t=>{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return EO(r,t);case Map:case R_.MapRow:case R_.StructRow:return L_(r,t,t.keys());case Object:case void 0:return L_(r,t,e||Object.keys(t))}return t instanceof k_.Vector?LO(r,t):!1}}function EO(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e[i]))return!1;return!0}function LO(r,e){let t=r.length;if(e.length!==t)return!1;for(let i=-1;++i<t;)if(!r[i](e.get(i)))return!1;return!0}function L_(r,e,t){let i=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,v=r.length,I=s.next(),S=i.next(),U=n.next();for(;c<v&&!S.done&&!U.done&&!I.done&&!(S.value!==U.value||!r[c](I.value));++c,S=i.next(),U=n.next(),I=s.next());return c===v&&S.done&&U.done&&I.done?!0:(i.return&&i.return(),n.return&&n.return(),s.return&&s.return(),!1)}});var On=V(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.selectColumnChildrenArgs=dt.selectVectorChildrenArgs=dt.selectChunkArgs=dt.selectFieldArgs=dt.selectColumnArgs=dt.selectArgs=void 0;var q_=qt(),z_=Ke(),ai=An(),gs=Re(),W_=be(),qO=ci(),ui=Array.isArray;dt.selectArgs=(r,e)=>ua(r,e,[],0);dt.selectColumnArgs=r=>{let[e,t]=Yc(r,[[],[]]);return t.map((i,n)=>i instanceof ai.Column?ai.Column.new(i.field.clone(e[n]),i):i instanceof gs.Vector?ai.Column.new(e[n],i):ai.Column.new(e[n],[]))};dt.selectFieldArgs=r=>Yc(r,[[],[]]);dt.selectChunkArgs=(r,e)=>Hc(r,e,[],0);dt.selectVectorChildrenArgs=(r,e)=>H_(r,e,[],0);dt.selectColumnChildrenArgs=(r,e)=>Y_(r,e,[],0);function ua(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=ua(r,n,t,s).length:n instanceof r&&(t[s++]=n);return t}function Hc(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=Hc(r,n,t,s).length:n instanceof qO.Chunked?s=Hc(r,n.chunks,t,s).length:n instanceof r&&(t[s++]=n);return t}function H_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=H_(r,n,t,s).length:n instanceof r?s=ua(gs.Vector,n.schema.fields.map((I,S)=>n.getChildAt(S)),t,s).length:n instanceof gs.Vector&&(t[s++]=n);return t}function Y_(r,e,t,i){let n,s=i,c=-1,v=e.length;for(;++c<v;)ui(n=e[c])?s=Y_(r,n,t,s).length:n instanceof r?s=ua(ai.Column,n.schema.fields.map((I,S)=>ai.Column.new(I,n.getChildAt(S))),t,s).length:n instanceof ai.Column&&(t[s++]=n);return t}var zO=(r,[e,t],i)=>(r[0][i]=e,r[1][i]=t,r);function Yc(r,e){let t,i;switch(i=r.length){case 0:return e;case 1:if(t=e[0],!r[0])return e;if(ui(r[0]))return Yc(r[0],e);r[0]instanceof q_.Data||r[0]instanceof gs.Vector||r[0]instanceof W_.DataType||([t,r]=Object.entries(r[0]).reduce(zO,e));break;default:ui(t=r[i-1])?r=ui(r[0])?r[0]:r.slice(0,i-1):(r=ui(r[0])?r[0]:r,t=[])}let n=-1,s=-1,c=-1,v=r.length,I,S,[U,G]=e;for(;++c<v;)S=r[c],S instanceof ai.Column&&(G[++s]=S)?U[++n]=S.field.clone(t[c],S.type,!0):({[c]:I=c}=t,S instanceof W_.DataType&&(G[++s]=S)?U[++n]=z_.Field.new(I,S,!0):S&&S.type&&(G[++s]=S)&&(S instanceof q_.Data&&(G[s]=S=gs.Vector.new(S)),U[++n]=z_.Field.new(I,S.type,!0)));return e}});var ci=V(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.Chunked=void 0;var WO=bs(),$_=be(),HO=On(),G_=Re(),J_=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}},Or=class extends G_.AbstractVector{constructor(e,t=[],i=YO(t)){super();this._nullCount=-1,this._type=e,this._chunks=t,this._chunkOffsets=i,this._length=i[i.length-1],this._numChildren=(this._type.children||[]).length}static flatten(...e){return HO.selectChunkArgs(G_.Vector,e)}static concat(...e){let t=Or.flatten(...e);return new Or(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:i})=>t+i,0)),e}get indices(){if($_.DataType.isDictionary(this._type)){if(!this._indices){let e=this._chunks;this._indices=e.length===1?e[0].indices:Or.concat(...e.map(t=>t.indices))}return this._indices}return null}get dictionary(){return $_.DataType.isDictionary(this._type)?this._chunks[this._chunks.length-1].data.dictionary:null}[Symbol.iterator](){return new J_(this._chunks)}clone(e=this._chunks){return new Or(this._type,e)}concat(...e){return this.clone(Or.flatten(this,...e))}slice(e,t){return WO.clampRange(this,e,t,this._sliceInternal)}getChildAt(e){if(e<0||e>=this._numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this._type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Or(n.type,s):null}search(e,t){let i=e,n=this._chunkOffsets,s=n.length-1;if(i<0||i>=n[s])return null;if(s<=1)return t?t(this,0,i):[0,i];let c=0,v=0,I=0;do{if(c+1===s)return t?t(this,c,i-v):[c,i-v];I=c+(s-c)/2|0,i>=n[I]?c=I:s=I}while(i<n[s]&&i>=(v=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:i},n,s)=>i[n].set(s,t))}indexOf(e,t){return t&&typeof t=="number"?this.search(t,(i,n,s)=>this.indexOfInternal(i,n,s,e)):this.indexOfInternal(this,0,Math.max(0,t||0),e)}toArray(){let{chunks:e}=this,t=e.length,i=this._type.ArrayType;if(t<=0)return new i(0);if(t<=1)return e[0].toArray();let n=0,s=new Array(t);for(let I=-1;++I<t;)n+=(s[I]=e[I].toArray()).length;i!==s[0].constructor&&(i=s[0].constructor);let c=new i(n),v=i===Array?GO:$O;for(let I=-1,S=0;++I<t;)S=v(s[I],c,S);return c}getInternal({_chunks:e},t,i){return e[t].get(i)}isValidInternal({_chunks:e},t,i){return e[t].isValid(i)}indexOfInternal({_chunks:e},t,i,n){let s=t-1,c=e.length,v=i,I=0,S=-1;for(;++s<c;){if(~(S=e[s].indexOf(n,v)))return I+S;v=0,I+=e[s].length}return-1}_sliceInternal(e,t,i){let n=[],{chunks:s,_chunkOffsets:c}=e;for(let v=-1,I=s.length;++v<I;){let S=s[v],U=S.length,G=c[v];if(G>=i)break;if(t>=G+U)continue;if(G>=t&&G+U<=i){n.push(S);continue}let me=Math.max(0,t-G),fe=Math.min(i-G,U);n.push(S.slice(me,fe))}return e.clone(n)}};ca.Chunked=Or;function YO(r){let e=new Uint32Array((r||[]).length+1),t=e[0]=0,i=e.length;for(let n=0;++n<i;)e[n]=t+=r[n-1].length;return e}var $O=(r,e,t)=>(e.set(r,t),t+r.length),GO=(r,e,t)=>{let i=t;for(let n=-1,s=r.length;++n<s;)e[i++]=r[n];return i}});var An=V(la=>{"use strict";Object.defineProperty(la,"__esModule",{value:!0});la.Column=void 0;var K_=Ke(),Z_=Re(),$c=ci(),Ni=class extends $c.Chunked{constructor(e,t=[],i){t=$c.Chunked.flatten(...t);super(e.type,t,i);if(this._field=e,t.length===1&&!(this instanceof Gc))return new Gc(e,t[0],this._chunkOffsets)}static new(...e){let[t,i,...n]=e;typeof t!="string"&&!(t instanceof K_.Field)&&(i=t,t="");let s=$c.Chunked.flatten(Array.isArray(i)?[...i,...n]:i instanceof Z_.Vector?[i,...n]:[Z_.Vector.new(i,...n)]);if(typeof t=="string"){let c=s[0].data.type;t=new K_.Field(t,c,!0)}else!t.nullable&&s.some(({nullCount:c})=>c>0)&&(t=t.clone({nullable:!0}));return new Ni(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 Ni(this._field,e)}getChildAt(e){if(e<0||e>=this.numChildren)return null;let t=this._children||(this._children=[]),i,n,s;return(i=t[e])?i:(n=(this.type.children||[])[e])&&(s=this._chunks.map(c=>c.getChildAt(e)).filter(c=>c!=null),s.length>0)?t[e]=new Ni(n,s):null}};la.Column=Ni;var Gc=class extends Ni{constructor(e,t,i){super(e,[t],i);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 X_=V(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.instance=Fn.TypeAssembler=void 0;var JO=gr(),KO=JO.flatbuffers.Long,ZO=tt(),Y=$r(),Jc=class extends ZO.Visitor{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Y.Null.startNull(t),Y.Null.endNull(t)}visitInt(e,t){return Y.Int.startInt(t),Y.Int.addBitWidth(t,e.bitWidth),Y.Int.addIsSigned(t,e.isSigned),Y.Int.endInt(t)}visitFloat(e,t){return Y.FloatingPoint.startFloatingPoint(t),Y.FloatingPoint.addPrecision(t,e.precision),Y.FloatingPoint.endFloatingPoint(t)}visitBinary(e,t){return Y.Binary.startBinary(t),Y.Binary.endBinary(t)}visitBool(e,t){return Y.Bool.startBool(t),Y.Bool.endBool(t)}visitUtf8(e,t){return Y.Utf8.startUtf8(t),Y.Utf8.endUtf8(t)}visitDecimal(e,t){return Y.Decimal.startDecimal(t),Y.Decimal.addScale(t,e.scale),Y.Decimal.addPrecision(t,e.precision),Y.Decimal.endDecimal(t)}visitDate(e,t){return Y.Date.startDate(t),Y.Date.addUnit(t,e.unit),Y.Date.endDate(t)}visitTime(e,t){return Y.Time.startTime(t),Y.Time.addUnit(t,e.unit),Y.Time.addBitWidth(t,e.bitWidth),Y.Time.endTime(t)}visitTimestamp(e,t){let i=e.timezone&&t.createString(e.timezone)||void 0;return Y.Timestamp.startTimestamp(t),Y.Timestamp.addUnit(t,e.unit),i!==void 0&&Y.Timestamp.addTimezone(t,i),Y.Timestamp.endTimestamp(t)}visitInterval(e,t){return Y.Interval.startInterval(t),Y.Interval.addUnit(t,e.unit),Y.Interval.endInterval(t)}visitList(e,t){return Y.List.startList(t),Y.List.endList(t)}visitStruct(e,t){return Y.Struct_.startStruct_(t),Y.Struct_.endStruct_(t)}visitUnion(e,t){Y.Union.startTypeIdsVector(t,e.typeIds.length);let i=Y.Union.createTypeIdsVector(t,e.typeIds);return Y.Union.startUnion(t),Y.Union.addMode(t,e.mode),Y.Union.addTypeIds(t,i),Y.Union.endUnion(t)}visitDictionary(e,t){let i=this.visit(e.indices,t);return Y.DictionaryEncoding.startDictionaryEncoding(t),Y.DictionaryEncoding.addId(t,new KO(e.id,0)),Y.DictionaryEncoding.addIsOrdered(t,e.isOrdered),i!==void 0&&Y.DictionaryEncoding.addIndexType(t,i),Y.DictionaryEncoding.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return Y.FixedSizeBinary.startFixedSizeBinary(t),Y.FixedSizeBinary.addByteWidth(t,e.byteWidth),Y.FixedSizeBinary.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return Y.FixedSizeList.startFixedSizeList(t),Y.FixedSizeList.addListSize(t,e.listSize),Y.FixedSizeList.endFixedSizeList(t)}visitMap(e,t){return Y.Map.startMap(t),Y.Map.addKeysSorted(t,e.keysSorted),Y.Map.endMap(t)}};Fn.TypeAssembler=Jc;Fn.instance=new Jc});var sb=V(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.fieldFromJSON=ur.dictionaryBatchFromJSON=ur.recordBatchFromJSON=ur.schemaFromJSON=void 0;var Mn=Ke(),De=be(),xi=Ei(),Vn=Te();function XO(r,e=new Map){return new Mn.Schema(eA(r,e),da(r.customMetadata),e)}ur.schemaFromJSON=XO;function Q_(r){return new xi.RecordBatch(r.count,tb(r.columns),rb(r.columns))}ur.recordBatchFromJSON=Q_;function QO(r){return new xi.DictionaryBatch(Q_(r.data),r.id,r.isDelta)}ur.dictionaryBatchFromJSON=QO;function eA(r,e){return(r.fields||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function eb(r,e){return(r.children||[]).filter(Boolean).map(t=>Mn.Field.fromJSON(t,e))}function tb(r){return(r||[]).reduce((e,t)=>[...e,new xi.FieldNode(t.count,tA(t.VALIDITY)),...tb(t.children)],[])}function rb(r,e=[]){for(let t=-1,i=(r||[]).length;++t<i;){let n=r[t];n.VALIDITY&&e.push(new xi.BufferRegion(e.length,n.VALIDITY.length)),n.TYPE&&e.push(new xi.BufferRegion(e.length,n.TYPE.length)),n.OFFSET&&e.push(new xi.BufferRegion(e.length,n.OFFSET.length)),n.DATA&&e.push(new xi.BufferRegion(e.length,n.DATA.length)),e=rb(n.children,e)}return e}function tA(r){return(r||[]).reduce((e,t)=>e+ +(t===0),0)}function rA(r,e){let t,i,n,s,c,v;return!e||!(s=r.dictionary)?(c=nb(r,eb(r,e)),n=new Mn.Field(r.name,c,r.nullable,da(r.customMetadata))):e.has(t=s.id)?(i=(i=s.indexType)?ib(i):new De.Int32,v=new De.Dictionary(e.get(t),i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,da(r.customMetadata))):(i=(i=s.indexType)?ib(i):new De.Int32,e.set(t,c=nb(r,eb(r,e))),v=new De.Dictionary(c,i,t,s.isOrdered),n=new Mn.Field(r.name,v,r.nullable,da(r.customMetadata))),n||null}ur.fieldFromJSON=rA;function da(r){return new Map(Object.entries(r||{}))}function ib(r){return new De.Int(r.isSigned,r.bitWidth)}function nb(r,e){let t=r.type.name;switch(t){case"NONE":return new De.Null;case"null":return new De.Null;case"binary":return new De.Binary;case"utf8":return new De.Utf8;case"bool":return new De.Bool;case"list":return new De.List((e||[])[0]);case"struct":return new De.Struct(e||[]);case"struct_":return new De.Struct(e||[])}switch(t){case"int":{let i=r.type;return new De.Int(i.isSigned,i.bitWidth)}case"floatingpoint":{let i=r.type;return new De.Float(Vn.Precision[i.precision])}case"decimal":{let i=r.type;return new De.Decimal(i.scale,i.precision)}case"date":{let i=r.type;return new De.Date_(Vn.DateUnit[i.unit])}case"time":{let i=r.type;return new De.Time(Vn.TimeUnit[i.unit],i.bitWidth)}case"timestamp":{let i=r.type;return new De.Timestamp(Vn.TimeUnit[i.unit],i.timezone)}case"interval":{let i=r.type;return new De.Interval(Vn.IntervalUnit[i.unit])}case"union":{let i=r.type;return new De.Union(Vn.UnionMode[i.mode],i.typeIds||[],e||[])}case"fixedsizebinary":{let i=r.type;return new De.FixedSizeBinary(i.byteWidth)}case"fixedsizelist":{let i=r.type;return new De.FixedSizeList(i.listSize,(e||[])[0])}case"map":{let i=r.type;return new De.Map_((e||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}});var Ei=V(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.FieldNode=Ft.BufferRegion=Ft.DictionaryBatch=Ft.RecordBatch=Ft.Message=void 0;var Kc=gr(),W=$r(),Fe=yo(),Ze=Ke(),iA=Ye(),Ce=Te(),Zc=X_(),fa=sb(),Li=Kc.flatbuffers.Long,nA=Kc.flatbuffers.Builder,sA=Kc.flatbuffers.ByteBuffer,Oe=be(),li=class{constructor(e,t,i,n){this._version=t,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=typeof e=="number"?e:e.low}static fromJSON(e,t){let i=new li(0,Ce.MetadataVersion.V4,t);return i._createHeader=oA(e,t),i}static decode(e){e=new sA(iA.toUint8Array(e));let t=Fe.Message.getRootAsMessage(e),i=t.bodyLength(),n=t.version(),s=t.headerType(),c=new li(i,n,s);return c._createHeader=aA(t,s),c}static encode(e){let t=new nA,i=-1;return e.isSchema()?i=Ze.Schema.encode(t,e.header()):e.isRecordBatch()?i=At.encode(t,e.header()):e.isDictionaryBatch()&&(i=cr.encode(t,e.header())),Fe.Message.startMessage(t),Fe.Message.addVersion(t,Ce.MetadataVersion.V4),Fe.Message.addHeader(t,i),Fe.Message.addHeaderType(t,e.headerType),Fe.Message.addBodyLength(t,new Li(e.bodyLength,0)),Fe.Message.finishMessageBuffer(t,Fe.Message.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof Ze.Schema)return new li(0,Ce.MetadataVersion.V4,Ce.MessageHeader.Schema,e);if(e instanceof At)return new li(t,Ce.MetadataVersion.V4,Ce.MessageHeader.RecordBatch,e);if(e instanceof cr)return new li(t,Ce.MetadataVersion.V4,Ce.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===Ce.MessageHeader.Schema}isRecordBatch(){return this.headerType===Ce.MessageHeader.RecordBatch}isDictionaryBatch(){return this.headerType===Ce.MessageHeader.DictionaryBatch}};Ft.Message=li;var At=class{constructor(e,t,i){this._nodes=t,this._buffers=i,this._length=typeof e=="number"?e:e.low}get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}};Ft.RecordBatch=At;var cr=class{constructor(e,t,i=!1){this._data=e,this._isDelta=i,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}};Ft.DictionaryBatch=cr;var qi=class{constructor(e,t){this.offset=typeof e=="number"?e:e.low,this.length=typeof t=="number"?t:t.low}};Ft.BufferRegion=qi;var zi=class{constructor(e,t){this.length=typeof e=="number"?e:e.low,this.nullCount=typeof t=="number"?t:t.low}};Ft.FieldNode=zi;function oA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.fromJSON(r);case Ce.MessageHeader.RecordBatch:return At.fromJSON(r);case Ce.MessageHeader.DictionaryBatch:return cr.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}function aA(r,e){return()=>{switch(e){case Ce.MessageHeader.Schema:return Ze.Schema.decode(r.header(new W.Schema));case Ce.MessageHeader.RecordBatch:return At.decode(r.header(new Fe.RecordBatch),r.version());case Ce.MessageHeader.DictionaryBatch:return cr.decode(r.header(new Fe.DictionaryBatch),r.version())}throw new Error(`Unrecognized Message type: { name: ${Ce.MessageHeader[e]}, type: ${e} }`)}}Ze.Field.encode=bA;Ze.Field.decode=mA;Ze.Field.fromJSON=fa.fieldFromJSON;Ze.Schema.encode=_A;Ze.Schema.decode=uA;Ze.Schema.fromJSON=fa.schemaFromJSON;At.encode=gA;At.decode=cA;At.fromJSON=fa.recordBatchFromJSON;cr.encode=vA;cr.decode=lA;cr.fromJSON=fa.dictionaryBatchFromJSON;zi.encode=jA;zi.decode=fA;qi.encode=wA;qi.decode=dA;function uA(r,e=new Map){let t=yA(r,e);return new Ze.Schema(t,ha(r),e)}function cA(r,e=Ce.MetadataVersion.V4){return new At(r.length(),hA(r),pA(r,e))}function lA(r,e=Ce.MetadataVersion.V4){return new cr(At.decode(r.data(),e),r.id(),r.isDelta())}function dA(r){return new qi(r.offset(),r.length())}function fA(r){return new zi(r.length(),r.nullCount())}function hA(r){let e=[];for(let t,i=-1,n=-1,s=r.nodesLength();++i<s;)(t=r.nodes(i))&&(e[++n]=zi.decode(t));return e}function pA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.buffersLength();++n<c;)(i=r.buffers(n))&&(e<Ce.MetadataVersion.V4&&(i.bb_pos+=8*(n+1)),t[++s]=qi.decode(i));return t}function yA(r,e){let t=[];for(let i,n=-1,s=-1,c=r.fieldsLength();++n<c;)(i=r.fields(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function ob(r,e){let t=[];for(let i,n=-1,s=-1,c=r.childrenLength();++n<c;)(i=r.children(n))&&(t[++s]=Ze.Field.decode(i,e));return t}function mA(r,e){let t,i,n,s,c,v;return!e||!(v=r.dictionary())?(n=ub(r,ob(r,e)),i=new Ze.Field(r.name(),n,r.nullable(),ha(r))):e.has(t=v.id().low)?(s=(s=v.indexType())?ab(s):new Oe.Int32,c=new Oe.Dictionary(e.get(t),s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ha(r))):(s=(s=v.indexType())?ab(s):new Oe.Int32,e.set(t,n=ub(r,ob(r,e))),c=new Oe.Dictionary(n,s,t,v.isOrdered()),i=new Ze.Field(r.name(),c,r.nullable(),ha(r))),i||null}function ha(r){let e=new Map;if(r)for(let t,i,n=-1,s=r.customMetadataLength()|0;++n<s;)(t=r.customMetadata(n))&&(i=t.key())!=null&&e.set(i,t.value());return e}function ab(r){return new Oe.Int(r.isSigned(),r.bitWidth())}function ub(r,e){let t=r.typeType();switch(t){case W.Type.NONE:return new Oe.Null;case W.Type.Null:return new Oe.Null;case W.Type.Binary:return new Oe.Binary;case W.Type.Utf8:return new Oe.Utf8;case W.Type.Bool:return new Oe.Bool;case W.Type.List:return new Oe.List((e||[])[0]);case W.Type.Struct_:return new Oe.Struct(e||[])}switch(t){case W.Type.Int:{let i=r.type(new W.Int);return new Oe.Int(i.isSigned(),i.bitWidth())}case W.Type.FloatingPoint:{let i=r.type(new W.FloatingPoint);return new Oe.Float(i.precision())}case W.Type.Decimal:{let i=r.type(new W.Decimal);return new Oe.Decimal(i.scale(),i.precision())}case W.Type.Date:{let i=r.type(new W.Date);return new Oe.Date_(i.unit())}case W.Type.Time:{let i=r.type(new W.Time);return new Oe.Time(i.unit(),i.bitWidth())}case W.Type.Timestamp:{let i=r.type(new W.Timestamp);return new Oe.Timestamp(i.unit(),i.timezone())}case W.Type.Interval:{let i=r.type(new W.Interval);return new Oe.Interval(i.unit())}case W.Type.Union:{let i=r.type(new W.Union);return new Oe.Union(i.mode(),i.typeIdsArray()||[],e||[])}case W.Type.FixedSizeBinary:{let i=r.type(new W.FixedSizeBinary);return new Oe.FixedSizeBinary(i.byteWidth())}case W.Type.FixedSizeList:{let i=r.type(new W.FixedSizeList);return new Oe.FixedSizeList(i.listSize(),(e||[])[0])}case W.Type.Map:{let i=r.type(new W.Map);return new Oe.Map_((e||[])[0],i.keysSorted())}}throw new Error(`Unrecognized type: "${W.Type[t]}" (${t})`)}function _A(r,e){let t=e.fields.map(s=>Ze.Field.encode(r,s));W.Schema.startFieldsVector(r,t.length);let i=W.Schema.createFieldsVector(r,t),n=e.metadata&&e.metadata.size>0?W.Schema.createCustomMetadataVector(r,[...e.metadata].map(([s,c])=>{let v=r.createString(`${s}`),I=r.createString(`${c}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,v),W.KeyValue.addValue(r,I),W.KeyValue.endKeyValue(r)})):-1;return W.Schema.startSchema(r),W.Schema.addFields(r,i),W.Schema.addEndianness(r,BA?W.Endianness.Little:W.Endianness.Big),n!==-1&&W.Schema.addCustomMetadata(r,n),W.Schema.endSchema(r)}function bA(r,e){let t=-1,i=-1,n=-1,s=e.type,c=e.typeId;Oe.DataType.isDictionary(s)?(c=s.dictionary.typeId,n=Zc.instance.visit(s,r),i=Zc.instance.visit(s.dictionary,r)):i=Zc.instance.visit(s,r);let v=(s.children||[]).map(U=>Ze.Field.encode(r,U)),I=W.Field.createChildrenVector(r,v),S=e.metadata&&e.metadata.size>0?W.Field.createCustomMetadataVector(r,[...e.metadata].map(([U,G])=>{let me=r.createString(`${U}`),fe=r.createString(`${G}`);return W.KeyValue.startKeyValue(r),W.KeyValue.addKey(r,me),W.KeyValue.addValue(r,fe),W.KeyValue.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),W.Field.startField(r),W.Field.addType(r,i),W.Field.addTypeType(r,c),W.Field.addChildren(r,I),W.Field.addNullable(r,!!e.nullable),t!==-1&&W.Field.addName(r,t),n!==-1&&W.Field.addDictionary(r,n),S!==-1&&W.Field.addCustomMetadata(r,S),W.Field.endField(r)}function gA(r,e){let t=e.nodes||[],i=e.buffers||[];Fe.RecordBatch.startNodesVector(r,t.length),t.slice().reverse().forEach(c=>zi.encode(r,c));let n=r.endVector();Fe.RecordBatch.startBuffersVector(r,i.length),i.slice().reverse().forEach(c=>qi.encode(r,c));let s=r.endVector();return Fe.RecordBatch.startRecordBatch(r),Fe.RecordBatch.addLength(r,new Li(e.length,0)),Fe.RecordBatch.addNodes(r,n),Fe.RecordBatch.addBuffers(r,s),Fe.RecordBatch.endRecordBatch(r)}function vA(r,e){let t=At.encode(r,e.data);return Fe.DictionaryBatch.startDictionaryBatch(r),Fe.DictionaryBatch.addId(r,new Li(e.id,0)),Fe.DictionaryBatch.addIsDelta(r,e.isDelta),Fe.DictionaryBatch.addData(r,t),Fe.DictionaryBatch.endDictionaryBatch(r)}function jA(r,e){return Fe.FieldNode.createFieldNode(r,new Li(e.length,0),new Li(e.nullCount,0))}function wA(r,e){return W.Buffer.createBuffer(r,new Li(e.offset,0),new Li(e.length,0))}var BA=function(){let r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256}()});var ya=V(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.magicX2AndPadding=pe.magicAndPadding=pe.magicLength=pe.checkForMagicArrowString=pe.MAGIC=pe.MAGIC_STR=pe.PADDING=pe.JSONMessageReader=pe.AsyncMessageReader=pe.MessageReader=void 0;var di=Te(),TA=gr(),cb=TA.flatbuffers.ByteBuffer,vs=Ei(),IA=st(),SA=Ec(),lb=Ye(),pa=si(),Yt=rn(),Xc=r=>`Expected ${di.MessageHeader[r]} Message in stream, but was null or length 0.`,Qc=r=>`Header pointer of flatbuffer-encoded ${di.MessageHeader[r]} Message is null or length 0.`,db=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,fb=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`,el=class{constructor(e){this.source=e instanceof pa.ByteStream?e:new pa.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?Yt.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(Xc(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=lb.toUint8Array(this.source.read(e));if(t.byteLength<e)throw new Error(fb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}readSchema(e=!1){let t=di.MessageHeader.Schema,i=this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Qc(t));return n}readMetadataLength(){let e=this.source.read(pe.PADDING),t=e&&new cb(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}readMetadata(e){let t=this.source.read(e);if(!t)return Yt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(db(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.MessageReader=el;var hb=class{constructor(e,t){this.source=e instanceof pa.AsyncByteStream?e:IA.isFileHandle(e)?new SA.AsyncRandomAccessFile(e,t):new pa.AsyncByteStream(e)}[Symbol.asyncIterator](){return this}async next(){let e;return(e=await this.readMetadataLength()).done||e.value===-1&&(e=await this.readMetadataLength()).done||(e=await this.readMetadata(e.value)).done?Yt.ITERATOR_DONE:e}async throw(e){return await this.source.throw(e)}async return(e){return await this.source.return(e)}async readMessage(e){let t;if((t=await this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(Xc(e));return t.value}async readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=lb.toUint8Array(await this.source.read(e));if(t.byteLength<e)throw new Error(fb(e,t.byteLength));return t.byteOffset%8==0&&t.byteOffset+t.byteLength<=t.buffer.byteLength?t:t.slice()}async readSchema(e=!1){let t=di.MessageHeader.Schema,i=await this.readMessage(t),n=i&&i.header();if(e&&!n)throw new Error(Qc(t));return n}async readMetadataLength(){let e=await this.source.read(pe.PADDING),t=e&&new cb(e),i=t&&t.readInt32(0)||0;return{done:i===0,value:i}}async readMetadata(e){let t=await this.source.read(e);if(!t)return Yt.ITERATOR_DONE;if(t.byteLength<e)throw new Error(db(e,t.byteLength));return{done:!1,value:vs.Message.decode(t)}}};pe.AsyncMessageReader=hb;var pb=class extends el{constructor(e){super(new Uint8Array(0));this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=e instanceof Yt.ArrowJSON?e:new Yt.ArrowJSON(e)}next(){let{_json:e}=this;if(!this._schema){this._schema=!0;let t=vs.Message.fromJSON(e.schema,di.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 i=vs.Message.fromJSON(t,di.MessageHeader.DictionaryBatch);return{done:!1,value:i}}if(this._batchIndex<e.batches.length){let t=e.batches[this._batchIndex++];this._body=t.columns;let i=vs.Message.fromJSON(t,di.MessageHeader.RecordBatch);return{done:!1,value:i}}return this._body=[],Yt.ITERATOR_DONE}readMessageBody(e){return t(this._body);function t(i){return(i||[]).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(Xc(e));return t.value}readSchema(){let e=di.MessageHeader.Schema,t=this.readMessage(e),i=t&&t.header();if(!t||!i)throw new Error(Qc(e));return i}};pe.JSONMessageReader=pb;pe.PADDING=4;pe.MAGIC_STR="ARROW1";pe.MAGIC=new Uint8Array(pe.MAGIC_STR.length);for(let r=0;r<pe.MAGIC_STR.length;r+=1|0)pe.MAGIC[r]=pe.MAGIC_STR.charCodeAt(r);function DA(r,e=0){for(let t=-1,i=pe.MAGIC.length;++t<i;)if(pe.MAGIC[t]!==r[e+t])return!1;return!0}pe.checkForMagicArrowString=DA;pe.magicLength=pe.MAGIC.length;pe.magicAndPadding=pe.magicLength+pe.PADDING;pe.magicX2AndPadding=pe.magicLength*2+pe.PADDING});var nl=V(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.compareTypes=Pe.compareFields=Pe.compareSchemas=Pe.instance=Pe.TypeComparator=void 0;var OA=tt(),J=class extends OA.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((i,n)=>this.compareFields(i,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)}};Pe.TypeComparator=J;function ft(r,e){return e instanceof r.constructor}function js(r,e){return r===e||ft(r,e)}function Ar(r,e){return r===e||ft(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function ma(r,e){return r===e||ft(r,e)&&r.precision===e.precision}function AA(r,e){return r===e||ft(r,e)&&r.byteWidth===e.byteWidth}function tl(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function ws(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function Bs(r,e){return r===e||ft(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function FA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function MA(r,e){return r===e||ft(r,e)&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function rl(r,e){return r===e||ft(r,e)&&r.mode===e.mode&&r.typeIds.every((t,i)=>t===e.typeIds[i])&&Pe.instance.compareManyFields(r.children,e.children)}function VA(r,e){return r===e||ft(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&Pe.instance.visit(r.indices,e.indices)&&Pe.instance.visit(r.dictionary,e.dictionary)}function il(r,e){return r===e||ft(r,e)&&r.unit===e.unit}function UA(r,e){return r===e||ft(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}function CA(r,e){return r===e||ft(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&Pe.instance.compareManyFields(r.children,e.children)}J.prototype.visitNull=js;J.prototype.visitBool=js;J.prototype.visitInt=Ar;J.prototype.visitInt8=Ar;J.prototype.visitInt16=Ar;J.prototype.visitInt32=Ar;J.prototype.visitInt64=Ar;J.prototype.visitUint8=Ar;J.prototype.visitUint16=Ar;J.prototype.visitUint32=Ar;J.prototype.visitUint64=Ar;J.prototype.visitFloat=ma;J.prototype.visitFloat16=ma;J.prototype.visitFloat32=ma;J.prototype.visitFloat64=ma;J.prototype.visitUtf8=js;J.prototype.visitBinary=js;J.prototype.visitFixedSizeBinary=AA;J.prototype.visitDate=tl;J.prototype.visitDateDay=tl;J.prototype.visitDateMillisecond=tl;J.prototype.visitTimestamp=ws;J.prototype.visitTimestampSecond=ws;J.prototype.visitTimestampMillisecond=ws;J.prototype.visitTimestampMicrosecond=ws;J.prototype.visitTimestampNanosecond=ws;J.prototype.visitTime=Bs;J.prototype.visitTimeSecond=Bs;J.prototype.visitTimeMillisecond=Bs;J.prototype.visitTimeMicrosecond=Bs;J.prototype.visitTimeNanosecond=Bs;J.prototype.visitDecimal=js;J.prototype.visitList=FA;J.prototype.visitStruct=MA;J.prototype.visitUnion=rl;J.prototype.visitDenseUnion=rl;J.prototype.visitSparseUnion=rl;J.prototype.visitDictionary=VA;J.prototype.visitInterval=il;J.prototype.visitIntervalDayTime=il;J.prototype.visitIntervalYearMonth=il;J.prototype.visitFixedSizeList=UA;J.prototype.visitMap=CA;Pe.instance=new J;function PA(r,e){return Pe.instance.compareSchemas(r,e)}Pe.compareSchemas=PA;function kA(r,e){return Pe.instance.compareFields(r,e)}Pe.compareFields=kA;function RA(r,e){return Pe.instance.visit(r,e)}Pe.compareTypes=RA});var gb=V(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});_a.VectorAssembler=void 0;var NA=tt(),yb=Te(),xA=Fr(),sl=Ye(),ol=tr(),EA=On(),mb=Ei(),_b=be(),qe=class extends NA.Visitor{constructor(){super();this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}static assemble(...e){let t=new qe,i=EA.selectVectorChildrenArgs(xA.RecordBatch,e),[n=t]=t.visitMany(i);return n}visit(e){if(!_b.DataType.isDictionary(e.type)){let{data:t,length:i,nullCount:n}=e;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");_b.DataType.isNull(e.type)||$t.call(this,n<=0?new Uint8Array(0):ol.truncateBitmap(t.offset,i,t.nullBitmap)),this.nodes.push(new mb.FieldNode(i,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}};_a.VectorAssembler=qe;function $t(r){let e=r.byteLength+7&~7;return this.buffers.push(r),this.bufferRegions.push(new mb.BufferRegion(this._byteLength,e)),this._byteLength+=e,this}function LA(r){let{type:e,length:t,typeIds:i,valueOffsets:n}=r;if($t.call(this,i),e.mode===yb.UnionMode.Sparse)return ul.call(this,r);if(e.mode===yb.UnionMode.Dense){if(r.offset<=0)return $t.call(this,n),ul.call(this,r);{let s=i.reduce((U,G)=>Math.max(U,G),i[0]),c=new Int32Array(s+1),v=new Int32Array(s+1).fill(-1),I=new Int32Array(t),S=sl.rebaseValueOffsets(-n[0],t,n);for(let U,G,me=-1;++me<t;)(G=v[U=i[me]])===-1&&(G=v[U]=S[U]),I[me]=S[me]-G,++c[U];$t.call(this,I);for(let U,G=-1,me=e.children.length;++G<me;)if(U=r.getChildAt(G)){let fe=e.typeIds[G],Gt=Math.min(t,c[fe]);this.visit(U.slice(v[fe],Gt))}}}return this}function qA(r){let e;return r.nullCount>=r.length?$t.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?$t.call(this,ol.truncateBitmap(r.offset,r.length,e)):$t.call(this,ol.packBools(r))}function fi(r){return $t.call(this,r.values.subarray(0,r.length*r.stride))}function bb(r){let{length:e,values:t,valueOffsets:i}=r,n=i[0],s=i[e],c=Math.min(s-n,t.byteLength-n);return $t.call(this,sl.rebaseValueOffsets(-i[0],e,i)),$t.call(this,t.subarray(n,n+c)),this}function al(r){let{length:e,valueOffsets:t}=r;return t&&$t.call(this,sl.rebaseValueOffsets(t[0],e,t)),this.visit(r.getChildAt(0))}function ul(r){return this.visitMany(r.type.children.map((e,t)=>r.getChildAt(t)).filter(Boolean))[0]}qe.prototype.visitBool=qA;qe.prototype.visitInt=fi;qe.prototype.visitFloat=fi;qe.prototype.visitUtf8=bb;qe.prototype.visitBinary=bb;qe.prototype.visitFixedSizeBinary=fi;qe.prototype.visitDate=fi;qe.prototype.visitTimestamp=fi;qe.prototype.visitTime=fi;qe.prototype.visitDecimal=fi;qe.prototype.visitList=al;qe.prototype.visitStruct=ul;qe.prototype.visitUnion=LA;qe.prototype.visitInterval=fi;qe.prototype.visitFixedSizeList=al;qe.prototype.visitMap=al});var jb=V(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.JSONTypeAssembler=void 0;var zA=tt(),it=$r(),Un=Te(),vb=class extends zA.Visitor{visit(e){return e==null?void 0:super.visit(e)}visitNull({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitInt({typeId:e,bitWidth:t,isSigned:i}){return{name:it.Type[e].toLowerCase(),bitWidth:t,isSigned:i}}visitFloat({typeId:e,precision:t}){return{name:it.Type[e].toLowerCase(),precision:Un.Precision[t]}}visitBinary({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitBool({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUtf8({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitDecimal({typeId:e,scale:t,precision:i}){return{name:it.Type[e].toLowerCase(),scale:t,precision:i}}visitDate({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.DateUnit[t]}}visitTime({typeId:e,unit:t,bitWidth:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[t],bitWidth:i}}visitTimestamp({typeId:e,timezone:t,unit:i}){return{name:it.Type[e].toLowerCase(),unit:Un.TimeUnit[i],timezone:t}}visitInterval({typeId:e,unit:t}){return{name:it.Type[e].toLowerCase(),unit:Un.IntervalUnit[t]}}visitList({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitStruct({typeId:e}){return{name:it.Type[e].toLowerCase()}}visitUnion({typeId:e,mode:t,typeIds:i}){return{name:it.Type[e].toLowerCase(),mode:Un.UnionMode[t],typeIds:[...i]}}visitDictionary(e){return this.visit(e.dictionary)}visitFixedSizeBinary({typeId:e,byteWidth:t}){return{name:it.Type[e].toLowerCase(),byteWidth:t}}visitFixedSizeList({typeId:e,listSize:t}){return{name:it.Type[e].toLowerCase(),listSize:t}}visitMap({typeId:e,keysSorted:t}){return{name:it.Type[e].toLowerCase(),keysSorted:t}}};ba.JSONTypeAssembler=vb});var Tb=V(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.JSONVectorAssembler=void 0;var WA=ls(),Ts=An(),HA=Re(),YA=tt(),$A=Te(),GA=Fr(),cl=Te(),ga=tr(),JA=On(),wb=be(),va=class extends YA.Visitor{static assemble(...e){return new va().visitMany(JA.selectColumnChildrenArgs(GA.RecordBatch,e))}visit(e){let{data:t,name:i,length:n}=e,{offset:s,nullCount:c,nullBitmap:v}=t,I=wb.DataType.isDictionary(e.type)?e.type.indices:e.type,S=Object.assign([],t.buffers,{[$A.BufferType.VALIDITY]:void 0});return{name:i,count:n,VALIDITY:wb.DataType.isNull(I)?void 0:c<=0?Array.from({length:n},()=>1):[...new ga.BitIterator(v,s,n,null,ga.getBit)],...super.visit(HA.Vector.new(t.clone(I,s,n,0,S)))}}visitNull(){return{}}visitBool({values:e,offset:t,length:i}){return{DATA:[...new ga.BitIterator(e,t,i,null,ga.getBool)]}}visitInt(e){return{DATA:e.type.bitWidth<64?[...e.values]:[...Is(e.values,2)]}}visitFloat(e){return{DATA:[...e.values]}}visitUtf8(e){return{DATA:[...e],OFFSET:[...e.valueOffsets]}}visitBinary(e){return{DATA:[...Bb(e)],OFFSET:[...e.valueOffsets]}}visitFixedSizeBinary(e){return{DATA:[...Bb(e)]}}visitDate(e){return{DATA:e.type.unit===cl.DateUnit.DAY?[...e.values]:[...Is(e.values,2)]}}visitTimestamp(e){return{DATA:[...Is(e.values,2)]}}visitTime(e){return{DATA:e.type.unit<cl.TimeUnit.MICROSECOND?[...e.values]:[...Is(e.values,2)]}}visitDecimal(e){return{DATA:[...Is(e.values,4)]}}visitList(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitStruct(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitUnion(e){return{TYPE:[...e.typeIds],OFFSET:e.type.mode===cl.UnionMode.Dense?[...e.valueOffsets]:void 0,children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitInterval(e){return{DATA:[...e.values]}}visitFixedSizeList(e){return{children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}visitMap(e){return{OFFSET:[...e.valueOffsets],children:e.type.children.map((t,i)=>this.visit(new Ts.Column(t,[e.getChildAt(i)])))}}};ja.JSONVectorAssembler=va;function*Bb(r){for(let e of r)yield e.reduce((t,i)=>`${t}${("0"+(i&255).toString(16)).slice(-2)}`,"").toUpperCase()}function*Is(r,e){for(let t=-1,i=r.length/e;++t<i;)yield`${WA.BN.new(r.subarray((t+0)*e,(t+1)*e),!1)}`}});var Sa=V(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.RecordBatchJSONWriter=dr.RecordBatchFileWriter=dr.RecordBatchStreamWriter=dr.RecordBatchWriter=void 0;var ll=Ds(),KA=ya(),ZA=An(),XA=be(),QA=Ke(),wa=Ei(),dl=Ei(),Cn=Rc(),fl=Te(),Ib=nl(),hl=si(),Sb=gb(),eF=jb(),Db=Tb(),tF=Ye(),pl=Fr(),rF=rn(),lr=st(),Ss=class extends rF.ReadableInterop{constructor(e){super();this._position=0,this._started=!1,this._sink=new hl.AsyncByteQueue,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._dictionaryDeltaOffsets=new Map,lr.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 lr.isPromise(e)?e.then(t=>this.writeAll(t)):lr.isAsyncIterable(e)?ml(this,e):yl(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 hl.AsyncByteQueue?this._sink=e:(this._sink=new hl.AsyncByteQueue,e&&lr.isWritableDOMStream(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&lr.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||!Ib.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 ll.Table&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof pl.RecordBatch&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!Ib.compareSchemas(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof pl.RecordBatch?e instanceof pl._InternalEmptyPlaceholderRecordBatch||this._writeRecordBatch(e):e instanceof ll.Table?this.writeAll(e.chunks):lr.isIterable(e)&&this.writeAll(e)}_writeMessage(e,t=8){let i=t-1,n=wa.Message.encode(e),s=n.byteLength,c=this._writeLegacyIpcFormat?4:8,v=s+c+i&~i,I=v-s-c;return e.headerType===fl.MessageHeader.RecordBatch?this._recordBatchBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)):e.headerType===fl.MessageHeader.DictionaryBatch&&this._dictionaryBlocks.push(new Cn.FileBlock(v,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(v-c)),s>0&&this._write(n),this._writePadding(I)}_write(e){if(this._started){let t=tF.toUint8Array(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(wa.Message.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(KA.MAGIC)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:i,bufferRegions:n,buffers:s}=Sb.VectorAssembler.assemble(e),c=new dl.RecordBatch(e.length,i,n),v=wa.Message.from(c,t);return this._writeDictionaries(e)._writeMessage(v)._writeBodyBuffers(s)}_writeDictionaryBatch(e,t,i=!1){this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0));let{byteLength:n,nodes:s,bufferRegions:c,buffers:v}=Sb.VectorAssembler.assemble(e),I=new dl.RecordBatch(e.length,s,c),S=new dl.DictionaryBatch(I,t,i),U=wa.Message.from(S,n);return this._writeMessage(U)._writeBodyBuffers(v)}_writeBodyBuffers(e){let t,i,n;for(let s=-1,c=e.length;++s<c;)(t=e[s])&&(i=t.byteLength)>0&&(this._write(t),(n=(i+7&~7)-i)>0&&this._writePadding(n));return this}_writeDictionaries(e){for(let[t,i]of e.dictionaries){let n=this._dictionaryDeltaOffsets.get(t)||0;if(n===0||(i=i.slice(n)).length>0){let s="chunks"in i?i.chunks:[i];for(let c of s)this._writeDictionaryBatch(c,t,n>0),n+=c.length}}return this}};dr.RecordBatchWriter=Ss;var Ba=class extends Ss{static writeAll(e,t){let i=new Ba(t);return lr.isPromise(e)?e.then(n=>i.writeAll(n)):lr.isAsyncIterable(e)?ml(i,e):yl(i,e)}};dr.RecordBatchStreamWriter=Ba;var Ta=class extends Ss{static writeAll(e){let t=new Ta;return lr.isPromise(e)?e.then(i=>t.writeAll(i)):lr.isAsyncIterable(e)?ml(t,e):yl(t,e)}constructor(){super();this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeFooter(e){let t=Cn.Footer.encode(new Cn.Footer(e,fl.MetadataVersion.V4,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}};dr.RecordBatchFileWriter=Ta;var Ia=class extends Ss{constructor(){super();this._autoDestroy=!0,this._recordBatches=[],this._dictionaries=[]}static writeAll(e){return new Ia().writeAll(e)}_writeMessage(){return this}_writeFooter(e){return this}_writeSchema(e){return this._write(`{
|
|
8
|
+
"schema": ${JSON.stringify({fields:e.fields.map(Ob)},null,2)}`)}_writeDictionaries(e){return e.dictionaries.size>0&&this._dictionaries.push(e),this}_writeDictionaryBatch(e,t,i=!1){return this._dictionaryDeltaOffsets.set(t,e.length+(this._dictionaryDeltaOffsets.get(t)||0)),this._write(this._dictionaryBlocks.length===0?" ":`,
|
|
9
|
+
`),this._write(`${iF(e,t,i)}`),this._dictionaryBlocks.push(new Cn.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
10
|
"dictionaries": [
|
|
11
11
|
`);for(let e of this._dictionaries)super._writeDictionaries(e);this._write(`
|
|
12
12
|
]`)}if(this._recordBatches.length>0){for(let e=-1,t=this._recordBatches.length;++e<t;)this._write(e===0?`,
|
|
13
13
|
"batches": [
|
|
14
14
|
`:`,
|
|
15
|
-
`),this._write(`${
|
|
15
|
+
`),this._write(`${nF(this._recordBatches[e])}`),this._recordBatchBlocks.push(new Cn.FileBlock(0,0,0));this._write(`
|
|
16
16
|
]`)}return this._schema&&this._write(`
|
|
17
|
-
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};dr.RecordBatchJSONWriter=Ia;function yl(r,e){let t=e;e instanceof ll.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}async function ml(r,e){for await(let t of e)r.write(t);return r.finish()}function Db({name:r,type:e,nullable:t}){let i=new XA.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(Db),dictionary:KA.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function tF(r,e,t=!1){let i=new ZA.Field(`${e}`,r.type,r.nullCount>0),n=Sb.JSONVectorAssembler.assemble(new JA.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function rF(r){return JSON.stringify({count:r.length,columns:Sb.JSONVectorAssembler.assemble(r)},null,2)}});var gl=V(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.distributeVectorsIntoRecordBatches=hi.distributeColumnsIntoRecordBatches=hi.ensureSameLengthData=void 0;var Ob=qt(),_l=Ke(),iF=ci(),nF=Fr(),bl=new Uint8Array(0),Ab=r=>[bl,bl,new Uint8Array(r),bl];function sF(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,c=e.length,v=[...r.fields],w=[],S=(t+63&~63)>>3;for(;++s<c;)(i=e[s])&&i.length===t?w[s]=i:((n=v[s]).nullable||(v[s]=v[s].clone({nullable:!0})),w[s]=i?i._changeLengthAndBackfillNullBitmap(t):Ob.Data.new(n.type,0,t,t,Ab(S)));return[new _l.Schema(v),t,w]}hi.ensureSameLengthData=sF;function oF(r){return Fb(new _l.Schema(r.map(({field:e})=>e)),r)}hi.distributeColumnsIntoRecordBatches=oF;function Fb(r,e){return aF(r,e.map(t=>t instanceof iF.Chunked?t.chunks.map(i=>i.data):[t.data]))}hi.distributeVectorsIntoRecordBatches=Fb;function aF(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((G,me)=>Math.max(G,me.length),0)},s=0,c=0,v=-1,w=e.length,S,U=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,v=-1;++v<w;)U[v]=S=e[v].shift(),c=Math.min(c,S?S.length:c);isFinite(c)&&(U=uF(t,c,U,e,n),c>0&&(i[s++]=[c,U.slice()]))}return[r=new _l.Schema(t,r.metadata),i.map(G=>new nF.RecordBatch(r,...G))]}function uF(r,e,t,i,n){let s,c,v=0,w=-1,S=i.length,U=(e+63&~63)>>3;for(;++w<S;)(s=t[w])&&(v=s.length)>=e?v===e?t[w]=s:(t[w]=s.slice(0,e),s=s.slice(e,v-e),n.numBatches=Math.max(n.numBatches,i[w].unshift(s))):((c=r[w]).nullable||(r[w]=c.clone({nullable:!0})),t[w]=s?s._changeLengthAndBackfillNullBitmap(e):Ob.Data.new(c.type,0,e,e,Ab(U)));return t}});var xe=V(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.BaseVector=void 0;var cF=Te(),lF=ci(),dF=bs(),vl=Re(),jl=class extends vl.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`${cF.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 vl.Vector.new(e,t)}concat(...e){return lF.Chunked.concat(this,...e)}slice(e,t){return dF.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]=vl.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};Da.BaseVector=jl;jl.prototype[Symbol.isConcatSpreadable]=!0});var wl=V(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.BinaryVector=void 0;var fF=Re(),hF=xe(),pF=be(),Mb=class extends hF.BaseVector{asUtf8(){return fF.Vector.new(this.data.clone(new pF.Utf8))}};Oa.BinaryVector=Mb});var Bl=V(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.BoolVector=void 0;var yF=be(),mF=xe(),_F=fr(),Vb=class extends mF.BaseVector{static from(e){return _F.vectorFromValuesWithType(()=>new yF.Bool,e)}};Aa.BoolVector=Vb});var Il=V(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.DateMillisecondVector=pi.DateDayVector=pi.DateVector=void 0;var bF=Te(),gF=xe(),Ub=fr(),Tl=be(),Fa=class extends gF.BaseVector{static from(...e){return e.length===2?Ub.vectorFromValuesWithType(()=>e[1]===bF.DateUnit.DAY?new Tl.DateDay:new Tl.DateMillisecond,e[0]):Ub.vectorFromValuesWithType(()=>new Tl.DateMillisecond,e[0])}};pi.DateVector=Fa;var Cb=class extends Fa{};pi.DateDayVector=Cb;var Pb=class extends Fa{};pi.DateMillisecondVector=Pb});var Sl=V(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DecimalVector=void 0;var vF=xe(),kb=class extends vF.BaseVector{};Ma.DecimalVector=kb});var Ua=V(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.DictionaryVector=void 0;var jF=qt(),Rb=Re(),wF=xe(),BF=fr(),TF=be(),Dl=class extends wF.BaseVector{constructor(e){super(e);this.indices=Rb.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new TF.Dictionary(t.type,i,null,null);return Rb.Vector.new(jF.Data.Dictionary(s,0,n.length,0,null,n,t))}return BF.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)}};Va.DictionaryVector=Dl;Dl.prototype.indices=null});var Ol=V(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.FixedSizeBinaryVector=void 0;var IF=xe(),Nb=class extends IF.BaseVector{};Ca.FixedSizeBinaryVector=Nb});var Al=V(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.FixedSizeListVector=void 0;var SF=xe(),xb=class extends SF.BaseVector{};Pa.FixedSizeListVector=xb});var Ul=V(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.Float64Vector=hr.Float32Vector=hr.Float16Vector=hr.FloatVector=void 0;var DF=qt(),OF=Re(),AF=xe(),FF=fr(),Wi=be(),Os=class extends AF.BaseVector{static from(e){let t=UF(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=VF(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!MF(t,e.constructor))return OF.Vector.new(DF.Data.Float(n,0,s,0,null,e))}}if(t)return FF.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")}};hr.FloatVector=Os;var Fl=class extends Os{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};hr.Float16Vector=Fl;var Ml=class extends Os{};hr.Float32Vector=Ml;var Vl=class extends Os{};hr.Float64Vector=Vl;var MF=(r,e)=>r===Wi.Float16&&e!==Uint16Array,VF=r=>{switch(r){case Uint16Array:return Wi.Float16;case Float32Array:return Wi.Float32;case Float64Array:return Wi.Float64;default:return null}},UF=r=>{switch(r){case Fl:return Wi.Float16;case Ml:return Wi.Float32;case Vl:return Wi.Float64;default:return null}}});var Cl=V(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.IntervalYearMonthVector=yi.IntervalDayTimeVector=yi.IntervalVector=void 0;var CF=xe(),ka=class extends CF.BaseVector{};yi.IntervalVector=ka;var Eb=class extends ka{};yi.IntervalDayTimeVector=Eb;var Lb=class extends ka{};yi.IntervalYearMonthVector=Lb});var Ra=V(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.Uint64Vector=ze.Uint32Vector=ze.Uint16Vector=ze.Uint8Vector=ze.Int64Vector=ze.Int32Vector=ze.Int16Vector=ze.Int8Vector=ze.IntVector=void 0;var PF=qt(),kF=Re(),RF=xe(),NF=fr(),qb=st(),zb=Ye(),ke=be(),pr=class extends RF.BaseVector{static from(...e){let[t,i=!1]=e,n=LF(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=EF(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let c=new n,v=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return xF(n,t.constructor)&&(v*=.5),kF.Vector.new(PF.Data.Int(c,0,v,0,null,t))}}if(n)return NF.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")}};ze.IntVector=pr;var Pl=class extends pr{};ze.Int8Vector=Pl;var kl=class extends pr{};ze.Int16Vector=kl;var Rl=class extends pr{};ze.Int32Vector=Rl;var Nl=class extends pr{toBigInt64Array(){return zb.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};ze.Int64Vector=Nl;var xl=class extends pr{};ze.Uint8Vector=xl;var El=class extends pr{};ze.Uint16Vector=El;var Ll=class extends pr{};ze.Uint32Vector=Ll;var ql=class extends pr{toBigUint64Array(){return zb.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};ze.Uint64Vector=ql;var xF=(r,e)=>(r===ke.Int64||r===ke.Uint64)&&(e===Int32Array||e===Uint32Array),EF=(r,e)=>{switch(r){case Int8Array:return ke.Int8;case Int16Array:return ke.Int16;case Int32Array:return e?ke.Int64:ke.Int32;case qb.BigInt64Array:return ke.Int64;case Uint8Array:return ke.Uint8;case Uint16Array:return ke.Uint16;case Uint32Array:return e?ke.Uint64:ke.Uint32;case qb.BigUint64Array:return ke.Uint64;default:return null}},LF=(r,e)=>{switch(r){case Pl:return ke.Int8;case kl:return ke.Int16;case Rl:return e?ke.Int64:ke.Int32;case Nl:return ke.Int64;case xl:return ke.Uint8;case El:return ke.Uint16;case Ll:return e?ke.Uint64:ke.Uint32;case ql:return ke.Uint64;default:return null}}});var zl=V(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.ListVector=void 0;var qF=xe(),Wb=class extends qF.BaseVector{};Na.ListVector=Wb});var Wl=V(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.MapVector=void 0;var zF=ms(),WF=Re(),HF=xe(),YF=be(),Hb=class extends HF.BaseVector{asList(){let e=this.type.children[0];return WF.Vector.new(this.data.clone(new YF.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new zF.MapRow(t.slice(i,n))}};xa.MapVector=Hb});var Hl=V(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.NullVector=void 0;var $F=xe(),Yb=class extends $F.BaseVector{};Ea.NullVector=Yb});var Yl=V(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.StructVector=void 0;var GF=ms(),JF=xe(),KF=Symbol.for("rowIndex"),$b=class extends JF.BaseVector{bind(e){let t=this._row||(this._row=new GF.StructRow(this)),i=Object.create(t);return i[KF]=e,i}};La.StructVector=$b});var $l=V(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TimestampNanosecondVector=Mt.TimestampMicrosecondVector=Mt.TimestampMillisecondVector=Mt.TimestampSecondVector=Mt.TimestampVector=void 0;var ZF=xe(),Pn=class extends ZF.BaseVector{};Mt.TimestampVector=Pn;var Gb=class extends Pn{};Mt.TimestampSecondVector=Gb;var Jb=class extends Pn{};Mt.TimestampMillisecondVector=Jb;var Kb=class extends Pn{};Mt.TimestampMicrosecondVector=Kb;var Zb=class extends Pn{};Mt.TimestampNanosecondVector=Zb});var Gl=V(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.TimeNanosecondVector=Vt.TimeMicrosecondVector=Vt.TimeMillisecondVector=Vt.TimeSecondVector=Vt.TimeVector=void 0;var XF=xe(),kn=class extends XF.BaseVector{};Vt.TimeVector=kn;var Xb=class extends kn{};Vt.TimeSecondVector=Xb;var Qb=class extends kn{};Vt.TimeMillisecondVector=Qb;var eg=class extends kn{};Vt.TimeMicrosecondVector=eg;var tg=class extends kn{};Vt.TimeNanosecondVector=tg});var Jl=V(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.SparseUnionVector=mi.DenseUnionVector=mi.UnionVector=void 0;var QF=xe(),qa=class extends QF.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};mi.UnionVector=qa;var rg=class extends qa{get valueOffsets(){return this.data.valueOffsets}};mi.DenseUnionVector=rg;var ig=class extends qa{};mi.SparseUnionVector=ig});var Kl=V(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.Utf8Vector=void 0;var eM=Re(),tM=xe(),ng=be(),rM=fr(),sg=class extends tM.BaseVector{static from(e){return rM.vectorFromValuesWithType(()=>new ng.Utf8,e)}asBinary(){return eM.Vector.new(this.data.clone(new ng.Binary))}};za.Utf8Vector=sg});var og=V(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.partial2=_i.partial1=_i.partial0=void 0;function iM(r){return function(){return r(this)}}_i.partial0=iM;function nM(r){return function(e){return r(this,e)}}_i.partial1=nM;function sM(r){return function(e,t){return r(this,e,t)}}_i.partial2=sM});var Ql=V(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.instance=Rn.GetVisitor=void 0;var Wa=ls(),oM=tt(),aM=Ti(),uM=os(),Ut=Te(),K=class extends oM.Visitor{};Rn.GetVisitor=K;var cM=(r,e)=>864e5*r[e],Zl=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),lM=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,dM=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,ag=r=>new Date(r),fM=(r,e)=>ag(cM(r,e)),hM=(r,e)=>ag(Zl(r,e)),pM=(r,e)=>null,ug=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},yM=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!=0},cg=({values:r},e)=>fM(r,e),lg=({values:r},e)=>hM(r,e*2),yr=({stride:r,values:e},t)=>e[r*t],dg=({stride:r,values:e},t)=>uM.uint16ToFloat64(e[r*t]),Xl=({stride:r,values:e,type:t},i)=>Wa.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),mM=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),_M=({values:r,valueOffsets:e},t)=>ug(r,e,t),bM=({values:r,valueOffsets:e},t)=>{let i=ug(r,e,t);return i!==null?aM.decodeUtf8(i):null},gM=(r,e)=>r.type.bitWidth<64?yr(r,e):Xl(r,e),vM=(r,e)=>r.type.precision!==Ut.Precision.HALF?yr(r,e):dg(r,e),jM=(r,e)=>r.type.unit===Ut.DateUnit.DAY?cg(r,e):lg(r,e),fg=({values:r},e)=>1e3*Zl(r,e*2),hg=({values:r},e)=>Zl(r,e*2),pg=({values:r},e)=>lM(r,e*2),yg=({values:r},e)=>dM(r,e*2),wM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return fg(r,e);case Ut.TimeUnit.MILLISECOND:return hg(r,e);case Ut.TimeUnit.MICROSECOND:return pg(r,e);case Ut.TimeUnit.NANOSECOND:return yg(r,e)}},mg=({values:r,stride:e},t)=>r[e*t],_g=({values:r,stride:e},t)=>r[e*t],bg=({values:r},e)=>Wa.BN.signed(r.subarray(2*e,2*(e+1))),gg=({values:r},e)=>Wa.BN.signed(r.subarray(2*e,2*(e+1))),BM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return mg(r,e);case Ut.TimeUnit.MILLISECOND:return _g(r,e);case Ut.TimeUnit.MICROSECOND:return bg(r,e);case Ut.TimeUnit.NANOSECOND:return gg(r,e)}},TM=({values:r},e)=>Wa.BN.decimal(r.subarray(4*e,4*(e+1))),IM=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},SM=(r,e)=>r.bind(e),DM=(r,e)=>r.bind(e),OM=(r,e)=>r.type.mode===Ut.UnionMode.Dense?vg(r,e):jg(r,e),vg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},jg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},AM=(r,e)=>r.getValue(r.getKey(e)),FM=(r,e)=>r.type.unit===Ut.IntervalUnit.DAY_TIME?wg(r,e):Bg(r,e),wg=({values:r},e)=>r.subarray(2*e,2*(e+1)),Bg=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},MM=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};K.prototype.visitNull=pM;K.prototype.visitBool=yM;K.prototype.visitInt=gM;K.prototype.visitInt8=yr;K.prototype.visitInt16=yr;K.prototype.visitInt32=yr;K.prototype.visitInt64=Xl;K.prototype.visitUint8=yr;K.prototype.visitUint16=yr;K.prototype.visitUint32=yr;K.prototype.visitUint64=Xl;K.prototype.visitFloat=vM;K.prototype.visitFloat16=dg;K.prototype.visitFloat32=yr;K.prototype.visitFloat64=yr;K.prototype.visitUtf8=bM;K.prototype.visitBinary=_M;K.prototype.visitFixedSizeBinary=mM;K.prototype.visitDate=jM;K.prototype.visitDateDay=cg;K.prototype.visitDateMillisecond=lg;K.prototype.visitTimestamp=wM;K.prototype.visitTimestampSecond=fg;K.prototype.visitTimestampMillisecond=hg;K.prototype.visitTimestampMicrosecond=pg;K.prototype.visitTimestampNanosecond=yg;K.prototype.visitTime=BM;K.prototype.visitTimeSecond=mg;K.prototype.visitTimeMillisecond=_g;K.prototype.visitTimeMicrosecond=bg;K.prototype.visitTimeNanosecond=gg;K.prototype.visitDecimal=TM;K.prototype.visitList=IM;K.prototype.visitStruct=DM;K.prototype.visitUnion=OM;K.prototype.visitDenseUnion=vg;K.prototype.visitSparseUnion=jg;K.prototype.visitDictionary=AM;K.prototype.visitInterval=FM;K.prototype.visitIntervalDayTime=wg;K.prototype.visitIntervalYearMonth=Bg;K.prototype.visitFixedSizeList=MM;K.prototype.visitMap=SM;Rn.instance=new K});var Dg=V(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.instance=Nn.IndexOfVisitor=void 0;var VM=tt(),Tg=tr(),Ig=bs(),Z=class extends VM.Visitor{};Nn.IndexOfVisitor=Z;function UM(r,e){return e===null&&r.length>0?0:-1}function CM(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new Tg.BitIterator(t,r.data.offset+(e||0),r.length,t,Tg.getBool)){if(!n)return i;++i}return-1}function ce(r,e,t){if(e===void 0)return-1;if(e===null)return CM(r,t);let i=Ig.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function Sg(r,e,t){let i=Ig.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}Z.prototype.visitNull=UM;Z.prototype.visitBool=ce;Z.prototype.visitInt=ce;Z.prototype.visitInt8=ce;Z.prototype.visitInt16=ce;Z.prototype.visitInt32=ce;Z.prototype.visitInt64=ce;Z.prototype.visitUint8=ce;Z.prototype.visitUint16=ce;Z.prototype.visitUint32=ce;Z.prototype.visitUint64=ce;Z.prototype.visitFloat=ce;Z.prototype.visitFloat16=ce;Z.prototype.visitFloat32=ce;Z.prototype.visitFloat64=ce;Z.prototype.visitUtf8=ce;Z.prototype.visitBinary=ce;Z.prototype.visitFixedSizeBinary=ce;Z.prototype.visitDate=ce;Z.prototype.visitDateDay=ce;Z.prototype.visitDateMillisecond=ce;Z.prototype.visitTimestamp=ce;Z.prototype.visitTimestampSecond=ce;Z.prototype.visitTimestampMillisecond=ce;Z.prototype.visitTimestampMicrosecond=ce;Z.prototype.visitTimestampNanosecond=ce;Z.prototype.visitTime=ce;Z.prototype.visitTimeSecond=ce;Z.prototype.visitTimeMillisecond=ce;Z.prototype.visitTimeMicrosecond=ce;Z.prototype.visitTimeNanosecond=ce;Z.prototype.visitDecimal=ce;Z.prototype.visitList=ce;Z.prototype.visitStruct=ce;Z.prototype.visitUnion=ce;Z.prototype.visitDenseUnion=Sg;Z.prototype.visitSparseUnion=Sg;Z.prototype.visitDictionary=ce;Z.prototype.visitInterval=ce;Z.prototype.visitIntervalDayTime=ce;Z.prototype.visitIntervalYearMonth=ce;Z.prototype.visitFixedSizeList=ce;Z.prototype.visitMap=ce;Nn.instance=new Z});var ed=V(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.instance=xn.IteratorVisitor=void 0;var Ha=Te(),PM=tt(),kM=tr(),Og=Ql(),X=class extends PM.Visitor{};xn.IteratorVisitor=X;function RM(r){let e=Og.instance.getVisitFn(r);return new kM.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!=0?e(t,i):null)}var Ag=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 se(r){if(r.nullCount>0)return RM(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===Ha.Type.Timestamp||t===Ha.Type.Int&&e.bitWidth!==64||t===Ha.Type.Time&&e.bitWidth!==64||t===Ha.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new Ag(r,Og.instance.getVisitFn(r))}X.prototype.visitNull=se;X.prototype.visitBool=se;X.prototype.visitInt=se;X.prototype.visitInt8=se;X.prototype.visitInt16=se;X.prototype.visitInt32=se;X.prototype.visitInt64=se;X.prototype.visitUint8=se;X.prototype.visitUint16=se;X.prototype.visitUint32=se;X.prototype.visitUint64=se;X.prototype.visitFloat=se;X.prototype.visitFloat16=se;X.prototype.visitFloat32=se;X.prototype.visitFloat64=se;X.prototype.visitUtf8=se;X.prototype.visitBinary=se;X.prototype.visitFixedSizeBinary=se;X.prototype.visitDate=se;X.prototype.visitDateDay=se;X.prototype.visitDateMillisecond=se;X.prototype.visitTimestamp=se;X.prototype.visitTimestampSecond=se;X.prototype.visitTimestampMillisecond=se;X.prototype.visitTimestampMicrosecond=se;X.prototype.visitTimestampNanosecond=se;X.prototype.visitTime=se;X.prototype.visitTimeSecond=se;X.prototype.visitTimeMillisecond=se;X.prototype.visitTimeMicrosecond=se;X.prototype.visitTimeNanosecond=se;X.prototype.visitDecimal=se;X.prototype.visitList=se;X.prototype.visitStruct=se;X.prototype.visitUnion=se;X.prototype.visitDenseUnion=se;X.prototype.visitSparseUnion=se;X.prototype.visitDictionary=se;X.prototype.visitInterval=se;X.prototype.visitIntervalDayTime=se;X.prototype.visitIntervalYearMonth=se;X.prototype.visitFixedSizeList=se;X.prototype.visitMap=se;xn.instance=new X});var Fg=V(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.instance=En.ToArrayVisitor=void 0;var As=Te(),NM=tt(),xM=ed(),Q=class extends NM.Visitor{};En.ToArrayVisitor=Q;function oe(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case As.Type.Int:case As.Type.Float:case As.Type.Decimal:case As.Type.Time:case As.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...xM.instance.visit(r)]}Q.prototype.visitNull=oe;Q.prototype.visitBool=oe;Q.prototype.visitInt=oe;Q.prototype.visitInt8=oe;Q.prototype.visitInt16=oe;Q.prototype.visitInt32=oe;Q.prototype.visitInt64=oe;Q.prototype.visitUint8=oe;Q.prototype.visitUint16=oe;Q.prototype.visitUint32=oe;Q.prototype.visitUint64=oe;Q.prototype.visitFloat=oe;Q.prototype.visitFloat16=oe;Q.prototype.visitFloat32=oe;Q.prototype.visitFloat64=oe;Q.prototype.visitUtf8=oe;Q.prototype.visitBinary=oe;Q.prototype.visitFixedSizeBinary=oe;Q.prototype.visitDate=oe;Q.prototype.visitDateDay=oe;Q.prototype.visitDateMillisecond=oe;Q.prototype.visitTimestamp=oe;Q.prototype.visitTimestampSecond=oe;Q.prototype.visitTimestampMillisecond=oe;Q.prototype.visitTimestampMicrosecond=oe;Q.prototype.visitTimestampNanosecond=oe;Q.prototype.visitTime=oe;Q.prototype.visitTimeSecond=oe;Q.prototype.visitTimeMillisecond=oe;Q.prototype.visitTimeMicrosecond=oe;Q.prototype.visitTimeNanosecond=oe;Q.prototype.visitDecimal=oe;Q.prototype.visitList=oe;Q.prototype.visitStruct=oe;Q.prototype.visitUnion=oe;Q.prototype.visitDenseUnion=oe;Q.prototype.visitSparseUnion=oe;Q.prototype.visitDictionary=oe;Q.prototype.visitInterval=oe;Q.prototype.visitIntervalDayTime=oe;Q.prototype.visitIntervalYearMonth=oe;Q.prototype.visitFixedSizeList=oe;Q.prototype.visitMap=oe;En.instance=new Q});var Mg=V(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.instance=Ln.ByteWidthVisitor=void 0;var EM=tt(),LM=Te(),Fs=(r,e)=>r+e,td=r=>`Cannot compute the byte width of variable-width column ${r}`,rd=class extends EM.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(td(e))}visitUtf8(e){throw new Error(td(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===LM.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(td(e))}visitStruct(e){return this.visitFields(e.children).reduce(Fs,0)}visitUnion(e){return this.visitFields(e.children).reduce(Fs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Fs,0)}visitMap(e){return this.visitFields(e.children).reduce(Fs,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(Fs,0)}};Ln.ByteWidthVisitor=rd;Ln.instance=new rd});var Vg=V(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.instance=qn.GetVectorConstructor=void 0;var qM=tt(),zM=wl(),WM=Bl(),id=Il(),HM=Sl(),YM=Ua(),$M=Ol(),GM=Al(),Ya=Ul(),nd=Cl(),Mr=Ra(),JM=zl(),KM=Wl(),ZM=Hl(),XM=Yl(),Ms=$l(),Vs=Gl(),sd=Jl(),QM=Kl(),od=class extends qM.Visitor{visitNull(){return ZM.NullVector}visitBool(){return WM.BoolVector}visitInt(){return Mr.IntVector}visitInt8(){return Mr.Int8Vector}visitInt16(){return Mr.Int16Vector}visitInt32(){return Mr.Int32Vector}visitInt64(){return Mr.Int64Vector}visitUint8(){return Mr.Uint8Vector}visitUint16(){return Mr.Uint16Vector}visitUint32(){return Mr.Uint32Vector}visitUint64(){return Mr.Uint64Vector}visitFloat(){return Ya.FloatVector}visitFloat16(){return Ya.Float16Vector}visitFloat32(){return Ya.Float32Vector}visitFloat64(){return Ya.Float64Vector}visitUtf8(){return QM.Utf8Vector}visitBinary(){return zM.BinaryVector}visitFixedSizeBinary(){return $M.FixedSizeBinaryVector}visitDate(){return id.DateVector}visitDateDay(){return id.DateDayVector}visitDateMillisecond(){return id.DateMillisecondVector}visitTimestamp(){return Ms.TimestampVector}visitTimestampSecond(){return Ms.TimestampSecondVector}visitTimestampMillisecond(){return Ms.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ms.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ms.TimestampNanosecondVector}visitTime(){return Vs.TimeVector}visitTimeSecond(){return Vs.TimeSecondVector}visitTimeMillisecond(){return Vs.TimeMillisecondVector}visitTimeMicrosecond(){return Vs.TimeMicrosecondVector}visitTimeNanosecond(){return Vs.TimeNanosecondVector}visitDecimal(){return HM.DecimalVector}visitList(){return JM.ListVector}visitStruct(){return XM.StructVector}visitUnion(){return sd.UnionVector}visitDenseUnion(){return sd.DenseUnionVector}visitSparseUnion(){return sd.SparseUnionVector}visitDictionary(){return YM.DictionaryVector}visitInterval(){return nd.IntervalVector}visitIntervalDayTime(){return nd.IntervalDayTimeVector}visitIntervalYearMonth(){return nd.IntervalYearMonthVector}visitFixedSizeList(){return GM.FixedSizeListVector}visitMap(){return KM.MapVector}};qn.GetVectorConstructor=od;qn.instance=new od});var fr=V(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.vectorFromValuesWithType=C.StructRow=C.MapRow=C.Utf8Vector=C.SparseUnionVector=C.DenseUnionVector=C.UnionVector=C.TimeNanosecondVector=C.TimeMicrosecondVector=C.TimeMillisecondVector=C.TimeSecondVector=C.TimeVector=C.TimestampNanosecondVector=C.TimestampMicrosecondVector=C.TimestampMillisecondVector=C.TimestampSecondVector=C.TimestampVector=C.StructVector=C.NullVector=C.MapVector=C.ListVector=C.Uint64Vector=C.Uint32Vector=C.Uint16Vector=C.Uint8Vector=C.Int64Vector=C.Int32Vector=C.Int16Vector=C.Int8Vector=C.IntVector=C.IntervalYearMonthVector=C.IntervalDayTimeVector=C.IntervalVector=C.Float64Vector=C.Float32Vector=C.Float16Vector=C.FloatVector=C.FixedSizeListVector=C.FixedSizeBinaryVector=C.DictionaryVector=C.DecimalVector=C.DateMillisecondVector=C.DateDayVector=C.DateVector=C.Chunked=C.BoolVector=C.BinaryVector=C.BaseVector=C.Vector=void 0;var eV=Re();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return eV.Vector}});var tV=xe();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return tV.BaseVector}});var rV=wl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return rV.BinaryVector}});var iV=Bl();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return iV.BoolVector}});var nV=ci();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return nV.Chunked}});var ad=Il();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return ad.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return ad.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return ad.DateMillisecondVector}});var sV=Sl();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return sV.DecimalVector}});var oV=Ua();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return oV.DictionaryVector}});var aV=Ol();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return aV.FixedSizeBinaryVector}});var uV=Al();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return uV.FixedSizeListVector}});var $a=Ul();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return $a.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return $a.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return $a.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return $a.Float64Vector}});var ud=Cl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return ud.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ud.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ud.IntervalYearMonthVector}});var Vr=Ra();Object.defineProperty(C,"IntVector",{enumerable:!0,get:function(){return Vr.IntVector}});Object.defineProperty(C,"Int8Vector",{enumerable:!0,get:function(){return Vr.Int8Vector}});Object.defineProperty(C,"Int16Vector",{enumerable:!0,get:function(){return Vr.Int16Vector}});Object.defineProperty(C,"Int32Vector",{enumerable:!0,get:function(){return Vr.Int32Vector}});Object.defineProperty(C,"Int64Vector",{enumerable:!0,get:function(){return Vr.Int64Vector}});Object.defineProperty(C,"Uint8Vector",{enumerable:!0,get:function(){return Vr.Uint8Vector}});Object.defineProperty(C,"Uint16Vector",{enumerable:!0,get:function(){return Vr.Uint16Vector}});Object.defineProperty(C,"Uint32Vector",{enumerable:!0,get:function(){return Vr.Uint32Vector}});Object.defineProperty(C,"Uint64Vector",{enumerable:!0,get:function(){return Vr.Uint64Vector}});var cV=zl();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return cV.ListVector}});var lV=Wl();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return lV.MapVector}});var dV=Hl();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return dV.NullVector}});var fV=Yl();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return fV.StructVector}});var Us=$l();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return Us.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return Us.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Us.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Us.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Us.TimestampNanosecondVector}});var Cs=Gl();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Cs.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Cs.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Cs.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Cs.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Cs.TimeNanosecondVector}});var cd=Jl();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return cd.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return cd.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return cd.SparseUnionVector}});var hV=Kl();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return hV.Utf8Vector}});var Ug=ms();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return Ug.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return Ug.StructRow}});var Ps=og(),ld=Te(),zn=Re(),Cg=ci(),Hi=xe(),pV=tr(),Ga=st(),Pg=Ue(),kg=Ql(),Rg=Sc(),Ng=Dg(),xg=Fg(),Eg=ed(),Lg=Mg(),qg=Vg();zn.Vector.new=yV;zn.Vector.from=_V;function yV(r,...e){return new(qg.instance.getVisitFn(r)())(r,...e)}function mV(r,e){if(Ga.isIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(Ga.isAsyncIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}={...e};return Ga.isIterable(t)?zn.Vector.from({nullValues:n,...e,type:i}):zn.Vector.from({nullValues:n,...e,type:i})}C.vectorFromValuesWithType=mV;function _V(r){let{values:e=[],...t}={nullValues:[null,void 0],...r};if(Ga.isIterable(e)){let i=[...Pg.Builder.throughIterable(t)(e)];return i.length===1?i[0]:Cg.Chunked.concat(i)}return(async i=>{let n=Pg.Builder.throughAsyncIterable(t);for await(let s of n(e))i.push(s);return i.length===1?i[0]:Cg.Chunked.concat(i)})([])}Hi.BaseVector.prototype.get=function(e){return kg.instance.visit(this,e)};Hi.BaseVector.prototype.set=function(e,t){return Rg.instance.visit(this,e,t)};Hi.BaseVector.prototype.indexOf=function(e,t){return Ng.instance.visit(this,e,t)};Hi.BaseVector.prototype.toArray=function(){return xg.instance.visit(this)};Hi.BaseVector.prototype.getByteWidth=function(){return Lg.instance.visit(this.type)};Hi.BaseVector.prototype[Symbol.iterator]=function(){return Eg.instance.visit(this)};Hi.BaseVector.prototype._bindDataAccessors=jV;Object.keys(ld.Type).map(r=>ld.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==ld.Type.NONE).forEach(r=>{let e=qg.instance.visit(r);e.prototype.get=Ps.partial1(kg.instance.getVisitFn(r)),e.prototype.set=Ps.partial2(Rg.instance.getVisitFn(r)),e.prototype.indexOf=Ps.partial2(Ng.instance.getVisitFn(r)),e.prototype.toArray=Ps.partial0(xg.instance.getVisitFn(r)),e.prototype.getByteWidth=bV(Lg.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Ps.partial0(Eg.instance.getVisitFn(r))});function bV(r){return function(){return r(this.type)}}function gV(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function vV(r){return function(e,t){pV.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function jV(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=gV(this.get),this.set=vV(this.set))}});var Ds=V(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.Table=void 0;var wV=An(),zg=Ke(),dd=Fr(),BV=ks(),fd=be(),Wg=On(),hd=st(),Hg=Sa(),Yg=gl(),pd=fr(),Xe=class extends pd.Chunked{constructor(...e){let t=null;e[0]instanceof zg.Schema&&(t=e.shift());let i=Wg.selectArgs(dd.RecordBatch,e);if(!t&&!(t=i[0]&&i[0].schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");i[0]||(i[0]=new dd._InternalEmptyPlaceholderRecordBatch(t));super(new fd.Struct(t.fields),i);this._schema=t,this._chunks=i}static empty(e=new zg.Schema([])){return new Xe(e,[])}static from(e){if(!e)return Xe.empty();if(typeof e=="object"){let i=hd.isIterable(e.values)?TV(e):hd.isAsyncIterable(e.values)?IV(e):null;if(i!==null)return i}let t=BV.RecordBatchReader.from(e);return hd.isPromise(t)?(async()=>await Xe.from(await t))():t.isSync()&&(t=t.open())?t.schema?new Xe(t.schema,[...t]):Xe.empty():(async i=>{let n=await i,s=n.schema,c=[];if(s){for await(let v of n)c.push(v);return new Xe(s,c)}return Xe.empty()})(t.open())}static async fromAsync(e){return await Xe.from(e)}static fromStruct(e){return Xe.new(e.data.childData,e.type.children)}static new(...e){return new Xe(...Yg.distributeColumnsIntoRecordBatches(Wg.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 Xe(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,i,n=this._schema.fields,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let c=this._chunks.map(v=>v.getChildAt(e)).filter(v=>v!=null);if(c.length>0)return s[e]=new wV.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Hg.RecordBatchStreamWriter:Hg.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new Xe(t,this._chunks.map(({length:i,data:{childData:n}})=>new dd.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((v,w,S)=>{let[U,G]=v,me=t.findIndex(fe=>fe.name===w.name);return~me?G[me]=S:U.push(S),v},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((v,w,S,U=n[w])=>U===void 0?this.getColumnAt(w):e.getColumnAt(U)),...i.map(v=>e.getColumnAt(v))].filter(Boolean);return new Xe(...Yg.distributeVectorsIntoRecordBatches(s,c))}};Ja.Table=Xe;function TV(r){let{type:e}=r;return e instanceof fd.Struct?Xe.fromStruct(pd.StructVector.from(r)):null}function IV(r){let{type:e}=r;return e instanceof fd.Struct?pd.StructVector.from(r).then(t=>Xe.fromStruct(t)):null}});var Fr=V(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn._InternalEmptyPlaceholderRecordBatch=Wn.RecordBatch=void 0;var yd=qt(),md=Ds(),SV=Re(),DV=tt(),OV=Ke(),AV=st(),FV=ci(),MV=On(),_d=be(),VV=gl(),UV=fr(),bi=class extends UV.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof yd.Data)[,t,n]=e;else{let s=i.fields,[,c,v]=e;t=yd.Data.Struct(new _d.Struct(s),0,c,0,null,v)}super(t,n);this._schema=i}static from(e){return AV.isIterable(e.values),md.Table.from(e)}static new(...e){let[t,i]=MV.selectFieldArgs(e),n=i.filter(s=>s instanceof SV.Vector);return new bi(...VV.ensureSameLengthData(new OV.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new bi(this._schema,e,t)}concat(...e){let t=this._schema,i=FV.Chunked.flatten(this,...e);return new md.Table(t,i.map(({data:n})=>new bi(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Ka.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new bi(t,this.length,i)}};Wn.RecordBatch=bi;var $g=class extends bi{constructor(e){super(e,0,e.fields.map(t=>yd.Data.new(t.type,0,0,0)))}};Wn._InternalEmptyPlaceholderRecordBatch=$g;var Ka=class extends DV.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Ka().visit(e.data,new _d.Struct(e.schema.fields)).dictionaries}visit(e,t){return _d.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var ks=V(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.AsyncRecordBatchFileReader=kt.RecordBatchFileReader=kt.AsyncRecordBatchStreamReader=kt.RecordBatchStreamReader=kt.RecordBatchReader=void 0;var Gg=Re(),Za=Te(),Jg=Rc(),Kg=ns(),Zg=si(),Rs=Ec(),Xg=F_(),bd=Fr(),Yi=rn(),Ct=ya(),Pt=st(),mr=class extends Yi.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 Pt.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 Kg.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Kg.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 mr?e:Pt.isArrowJSON(e)?CV(e):Pt.isFileHandle(e)?RV(e):Pt.isPromise(e)?(async()=>await mr.from(await e))():Pt.isFetchResponse(e)||Pt.isReadableDOMStream(e)||Pt.isReadableNodeStream(e)||Pt.isAsyncIterable(e)?kV(new Zg.AsyncByteStream(e)):PV(new Zg.ByteStream(e))}static readAll(e){return e instanceof mr?e.isSync()?rv(e):iv(e):Pt.isArrowJSON(e)||ArrayBuffer.isView(e)||Pt.isIterable(e)||Pt.isIteratorResult(e)?rv(e):iv(e)}};kt.RecordBatchReader=mr;var Hn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}};kt.RecordBatchStreamReader=Hn;var Yn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};kt.AsyncRecordBatchStreamReader=Yn;var Xa=class extends Hn{constructor(e){super(e);this._impl=e}};kt.RecordBatchFileReader=Xa;var gd=class extends Yn{constructor(e){super(e);this._impl=e}};kt.AsyncRecordBatchFileReader=gd;var vd=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 bd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:c,schema:v}=this,w=c.get(i);if(n||!w){let S=v.dictionaries.get(i);return w&&n?w.concat(Gg.Vector.new(this._loadVectors(s,t,[S])[0])):Gg.Vector.new(this._loadVectors(s,t,[S])[0])}return w}_loadVectors(e,t,i){return new Xg.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},Ns=class extends vd{constructor(e,t){super(t);this._reader=Pt.isArrowJSON(e)?new Ct.JSONMessageReader(this._handle=e):new Ct.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=tv(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):Yi.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Yi.ITERATOR_DONE}next(){if(this.closed)return Yi.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 i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new bd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},xs=class extends vd{constructor(e,t){super(t);this._reader=new Ct.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}async cancel(){!this.closed&&(this.closed=!0)&&(await this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}async open(e){return this.closed||(this.autoDestroy=tv(this,e),this.schema||(this.schema=await this._reader.readSchema())||await this.cancel()),this}async throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.throw(e):Yi.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):Yi.ITERATOR_DONE}async next(){if(this.closed)return Yi.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=await this._readNextMessageAndValidate();)if(e.isSchema())await this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new bd._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}},jd=class extends Ns{constructor(e,t){super(e instanceof Rs.RandomAccessFile?e:new Rs.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 i=this._reader.readMessage(Za.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.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 i=this._reader.readMessage(Za.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ct.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return Jg.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}},Qg=class extends xs{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof Rs.AsyncRandomAccessFile?e:new Rs.AsyncRandomAccessFile(e,i),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}async open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=await this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&await this._readDictionaryBatch(this._dictionaryIndex++)}return await super.open(e)}async readRecordBatch(e){if(this.closed)return null;this._footer||await this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Za.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}async _readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Za.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}async _readFooter(){let{_handle:e}=this;e._pending&&await e._pending;let t=e.size-Ct.magicAndPadding,i=await e.readInt32(t),n=await e.readAt(t-i,i);return Jg.Footer.decode(n)}async _readNextMessageAndValidate(e){if(this._footer||await this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&await this._handle.seek(t.offset))return await this._reader.readMessage(e)}return null}},ev=class extends Ns{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new Xg.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function tv(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*rv(r){let e=mr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}async function*iv(r){let e=await mr.from(r);try{if(!(await e.open({autoDestroy:!1})).closed)do yield e;while(!(await e.reset().open()).closed)}finally{await e.cancel()}}function CV(r){return new Hn(new ev(r))}function PV(r){let e=r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new Xa(new jd(r.read())):new Hn(new Ns(r)):new Hn(new Ns(function*(){}()))}async function kV(r){let e=await r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new Xa(new jd(await r.read())):new Yn(new xs(r)):new Yn(new xs(async function*(){}()))}async function RV(r){let{size:e}=await r.stat(),t=new Rs.AsyncRandomAccessFile(r,e);return e>=Ct.magicX2AndPadding&&Ct.checkForMagicArrowString(await t.readAt(0,Ct.magicLength+7&~7))?new gd(new Qg(t)):new Yn(new xs(t))}});var ov=V(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.toDOMStream=void 0;var nv=Ye(),sv=st();function NV(r,e){if(sv.isAsyncIterable(r))return EV(r,e);if(sv.isIterable(r))return xV(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}Qa.toDOMStream=NV;function xV(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,start(c){s(c,t||(t=r[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){(t&&t.return&&t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});function s(c,v){let w,S=null,U=c.desiredSize||null;for(;!(S=v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(w=nv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-w.byteLength+1),S.value=w),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}function EV(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,async start(c){await s(c,t||(t=r[Symbol.asyncIterator]()))},async pull(c){t?await s(c,t):c.close()},async cancel(){(t&&t.return&&await t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});async function s(c,v){let w,S=null,U=c.desiredSize||null;for(;!(S=await v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(w=nv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-w.byteLength+1),S.value=w),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}});var cv=V($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.BuilderTransform=$n.builderThroughDOMStream=void 0;var LV=ta();function qV(r){return new wd(r)}$n.builderThroughDOMStream=qV;var wd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count",...s}=e;this._controller=null,this._builder=LV.Builder.new(s),this._getSize=n!=="bytes"?av:uv;let{["highWaterMark"]:c=n==="bytes"?2**14:1e3}={...t},{["highWaterMark"]:v=n==="bytes"?2**14:1e3}={...i};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:w=>{this._maybeFlush(this._builder,this._controller=w)},start:w=>{this._maybeFlush(this._builder,this._controller=w)}},{highWaterMark:c,size:n!=="bytes"?av:uv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:v,size:w=>this._writeValueAndReturnChunkSize(w)})}_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)}};$n.BuilderTransform=wd;var av=r=>r.length,uv=r=>r.byteLength});var lv=V(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.recordBatchReaderThroughDOMStream=void 0;var zV=si(),WV=ks();function HV(r,e){let t=new zV.AsyncByteQueue,i=null,n=new ReadableStream({async cancel(){await t.close()},async start(v){await c(v,i||(i=await s()))},async pull(v){i?await c(v,i):v.close()}});return{writable:new WritableStream(t,{highWaterMark:2**14,...r}),readable:n};async function s(){return await(await WV.RecordBatchReader.from(t)).open(e)}async function c(v,w){let S=v.desiredSize,U=null;for(;!(U=await w.next()).done;)if(v.enqueue(U.value),S!=null&&--S<=0)return;v.close()}}eu.recordBatchReaderThroughDOMStream=HV});var dv=V(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.recordBatchWriterThroughDOMStream=void 0;var YV=si();function $V(r,e){let t=new this(r),i=new YV.AsyncByteStream(t),n=new ReadableStream({type:"bytes",async cancel(){await i.cancel()},async pull(c){await s(c)},async start(c){await s(c)}},{highWaterMark:2**14,...e});return{writable:new WritableStream(t,r),readable:n};async function s(c){let v=null,w=c.desiredSize;for(;v=await i.read(w||null);)if(c.enqueue(v),w!=null&&(w-=v.byteLength)<=0)return;c.close()}}tu.recordBatchWriterThroughDOMStream=$V});var Od=V(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.custom=le.or=le.and=le.col=le.lit=le.CustomPredicate=le.Not=le.GTeq=le.LTeq=le.Equals=le.Or=le.And=le.CombinationPredicate=le.ComparisonPredicate=le.Predicate=le.Col=le.Literal=le.Value=void 0;var GV=Ua(),gi=class{eq(e){return e instanceof gi||(e=new Ur(e)),new Td(this,e)}le(e){return e instanceof gi||(e=new Ur(e)),new Id(this,e)}ge(e){return e instanceof gi||(e=new Ur(e)),new Sd(this,e)}lt(e){return new Zn(this.ge(e))}gt(e){return new Zn(this.le(e))}ne(e){return new Zn(this.eq(e))}};le.Value=gi;var Ur=class extends gi{constructor(e){super();this.v=e}};le.Literal=Ur;var Bd=class extends gi{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[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 i=>t.get(i)}};le.Col=Bd;var Gn=class{and(...e){return new Jn(this,...e)}or(...e){return new Kn(this,...e)}not(){return new Zn(this)}};le.Predicate=Gn;var Es=class extends Gn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ur?this.right instanceof Ur?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ur?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};le.ComparisonPredicate=Es;var Ls=class extends Gn{constructor(...e){super();this.children=e}};le.CombinationPredicate=Ls;Ls.prototype.children=Object.freeze([]);var Jn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Jn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};le.And=Jn;var Kn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Kn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};le.Or=Kn;var Td=class extends Es{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)==s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof GV.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(i.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:v=>c.getKey(v)===s}else return(s,c)=>n(s,c)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};le.Equals=Td;var Id=class extends Es{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)<=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v<=n(s,c)}};le.LTeq=Id;var Sd=class extends Es{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)>=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v>=n(s,c)}};le.GTeq=Sd;var Zn=class extends Gn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};le.Not=Zn;var Dd=class extends Gn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};le.CustomPredicate=Dd;function JV(r){return new Ur(r)}le.lit=JV;function KV(r){return new Bd(r)}le.col=KV;function ZV(...r){return new Jn(...r)}le.and=ZV;function XV(...r){return new Kn(...r)}le.or=XV;function QV(r,e){return new Dd(r,e)}le.custom=QV});var mv=V(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.FilteredDataFrame=vi.CountByResult=vi.DataFrame=void 0;var Xn=Ds(),fv=Ra(),Ad=Ke(),hv=Od(),eU=Fr(),pv=be();Xn.Table.prototype.countBy=function(r){return new $i(this.chunks).countBy(r)};Xn.Table.prototype.scan=function(r,e){return new $i(this.chunks).scan(r,e)};Xn.Table.prototype.scanReverse=function(r,e){return new $i(this.chunks).scanReverse(r,e)};Xn.Table.prototype.filter=function(r){return new $i(this.chunks).filter(r)};var $i=class extends Xn.Table{filter(e){return new qs(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s];t&&t(c);for(let v=-1,w=c.length;++v<w;)e(v,c)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s];t&&t(c);for(let v=c.length;--v>=0;)e(v,c)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new hv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!pv.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)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,w=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S];n.bind(U);let G=n.vector.indices;for(let me=-1,fe=U.length;++me<fe;){let Gt=G.get(me);Gt!==null&&w[Gt]++}}return new ru(s.dictionary,fv.IntVector.from(w))}};vi.DataFrame=$i;var ru=class extends Xn.Table{constructor(e,t){let i=new Ad.Schema([new Ad.Field("values",e.type),new Ad.Field("counts",t.type)]);super(new eU.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};vi.CountByResult=ru;var yv=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}},qs=class extends $i{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s],v=this._predicate.bind(c),w=!1;for(let S=-1,U=c.length;++S<U;)v(S,c)&&(t&&!w&&(t(c),w=!0),e(S,c))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s],v=this._predicate.bind(c),w=!1;for(let S=c.length;--S>=0;)v(S,c)&&(t&&!w&&(t(c),w=!0),e(S,c))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],c=this._predicate.bind(s);for(let v=-1,w=s.length;++v<w;)c(v,s)&&++e}return e}[Symbol.iterator](){return new yv(this._chunks,this._predicate)}filter(e){return new qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new hv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!pv.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)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,w=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S],G=this._predicate.bind(U);n.bind(U);let me=n.vector.indices;for(let fe=-1,Gt=U.length;++fe<Gt;){let Cr=me.get(fe);Cr!==null&&G(fe,U)&&w[Cr]++}}return new ru(s.dictionary,fv.IntVector.from(w))}};vi.FilteredDataFrame=qs});var gv=V(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.util=_.predicate=_.CountByResult=_.FilteredDataFrame=_.DataFrame=_.RecordBatch=_.Message=_.JSONMessageReader=_.AsyncMessageReader=_.MessageReader=_.RecordBatchJSONWriter=_.RecordBatchStreamWriter=_.RecordBatchFileWriter=_.RecordBatchWriter=_.AsyncRecordBatchStreamReader=_.AsyncRecordBatchFileReader=_.RecordBatchStreamReader=_.RecordBatchFileReader=_.RecordBatchReader=_.AsyncByteQueue=_.AsyncByteStream=_.ByteStream=_.Utf8Builder=_.SparseUnionBuilder=_.DenseUnionBuilder=_.UnionBuilder=_.TimeNanosecondBuilder=_.TimeMicrosecondBuilder=_.TimeMillisecondBuilder=_.TimeSecondBuilder=_.TimeBuilder=_.TimestampNanosecondBuilder=_.TimestampMicrosecondBuilder=_.TimestampMillisecondBuilder=_.TimestampSecondBuilder=_.TimestampBuilder=_.StructBuilder=_.NullBuilder=_.MapBuilder=_.ListBuilder=_.Uint64Builder=_.Uint32Builder=_.Uint16Builder=_.Uint8Builder=_.Int64Builder=_.Int32Builder=_.Int16Builder=_.Int8Builder=_.IntBuilder=_.IntervalYearMonthBuilder=_.IntervalDayTimeBuilder=_.IntervalBuilder=_.Float64Builder=_.Float32Builder=_.Float16Builder=_.FloatBuilder=_.FixedSizeListBuilder=_.FixedSizeBinaryBuilder=_.DictionaryBuilder=_.DecimalBuilder=_.DateMillisecondBuilder=_.DateDayBuilder=_.DateBuilder=_.BoolBuilder=_.BinaryBuilder=_.Builder=_.Utf8Vector=_.SparseUnionVector=_.DenseUnionVector=_.UnionVector=_.TimeNanosecondVector=_.TimeMicrosecondVector=_.TimeMillisecondVector=_.TimeSecondVector=_.TimeVector=_.TimestampNanosecondVector=_.TimestampMicrosecondVector=_.TimestampMillisecondVector=_.TimestampSecondVector=_.TimestampVector=_.StructVector=_.NullVector=_.MapVector=_.ListVector=_.Uint64Vector=_.Uint32Vector=_.Uint16Vector=_.Uint8Vector=_.Int64Vector=_.Int32Vector=_.Int16Vector=_.Int8Vector=_.IntVector=_.IntervalYearMonthVector=_.IntervalDayTimeVector=_.IntervalVector=_.Float64Vector=_.Float32Vector=_.Float16Vector=_.FloatVector=_.FixedSizeListVector=_.FixedSizeBinaryVector=_.DictionaryVector=_.DecimalVector=_.DateMillisecondVector=_.DateDayVector=_.DateVector=_.Chunked=_.BoolVector=_.BinaryVector=_.BaseVector=_.Vector=_.Field=_.Schema=_.Visitor=_.Column=_.Table=_.Map_=_.FixedSizeList=_.IntervalYearMonth=_.IntervalDayTime=_.Interval=_.Dictionary=_.SparseUnion=_.DenseUnion=_.Union=_.Struct=_.List=_.Decimal=_.TimeNanosecond=_.TimeMicrosecond=_.TimeMillisecond=_.TimeSecond=_.Time=_.TimestampNanosecond=_.TimestampMicrosecond=_.TimestampMillisecond=_.TimestampSecond=_.Timestamp=_.DateMillisecond=_.DateDay=_.Date_=_.FixedSizeBinary=_.Binary=_.Utf8=_.Float64=_.Float32=_.Float16=_.Float=_.Uint64=_.Uint32=_.Uint16=_.Uint8=_.Int64=_.Int32=_.Int16=_.Int8=_.Int=_.Bool=_.Null=_.DataType=_.Data=_.BufferType=_.Type=_.MessageHeader=_.MetadataVersion=_.IntervalUnit=_.UnionMode=_.Precision=_.TimeUnit=_.DateUnit=void 0;var Qn=$r();Object.defineProperty(_,"DateUnit",{enumerable:!0,get:function(){return Qn.DateUnit}});Object.defineProperty(_,"TimeUnit",{enumerable:!0,get:function(){return Qn.TimeUnit}});Object.defineProperty(_,"Precision",{enumerable:!0,get:function(){return Qn.Precision}});Object.defineProperty(_,"UnionMode",{enumerable:!0,get:function(){return Qn.UnionMode}});Object.defineProperty(_,"IntervalUnit",{enumerable:!0,get:function(){return Qn.IntervalUnit}});Object.defineProperty(_,"MetadataVersion",{enumerable:!0,get:function(){return Qn.MetadataVersion}});var tU=yo();Object.defineProperty(_,"MessageHeader",{enumerable:!0,get:function(){return tU.MessageHeader}});var _v=Te();Object.defineProperty(_,"Type",{enumerable:!0,get:function(){return _v.Type}});Object.defineProperty(_,"BufferType",{enumerable:!0,get:function(){return _v.BufferType}});var rU=qt();Object.defineProperty(_,"Data",{enumerable:!0,get:function(){return rU.Data}});var ie=be();Object.defineProperty(_,"DataType",{enumerable:!0,get:function(){return ie.DataType}});Object.defineProperty(_,"Null",{enumerable:!0,get:function(){return ie.Null}});Object.defineProperty(_,"Bool",{enumerable:!0,get:function(){return ie.Bool}});Object.defineProperty(_,"Int",{enumerable:!0,get:function(){return ie.Int}});Object.defineProperty(_,"Int8",{enumerable:!0,get:function(){return ie.Int8}});Object.defineProperty(_,"Int16",{enumerable:!0,get:function(){return ie.Int16}});Object.defineProperty(_,"Int32",{enumerable:!0,get:function(){return ie.Int32}});Object.defineProperty(_,"Int64",{enumerable:!0,get:function(){return ie.Int64}});Object.defineProperty(_,"Uint8",{enumerable:!0,get:function(){return ie.Uint8}});Object.defineProperty(_,"Uint16",{enumerable:!0,get:function(){return ie.Uint16}});Object.defineProperty(_,"Uint32",{enumerable:!0,get:function(){return ie.Uint32}});Object.defineProperty(_,"Uint64",{enumerable:!0,get:function(){return ie.Uint64}});Object.defineProperty(_,"Float",{enumerable:!0,get:function(){return ie.Float}});Object.defineProperty(_,"Float16",{enumerable:!0,get:function(){return ie.Float16}});Object.defineProperty(_,"Float32",{enumerable:!0,get:function(){return ie.Float32}});Object.defineProperty(_,"Float64",{enumerable:!0,get:function(){return ie.Float64}});Object.defineProperty(_,"Utf8",{enumerable:!0,get:function(){return ie.Utf8}});Object.defineProperty(_,"Binary",{enumerable:!0,get:function(){return ie.Binary}});Object.defineProperty(_,"FixedSizeBinary",{enumerable:!0,get:function(){return ie.FixedSizeBinary}});Object.defineProperty(_,"Date_",{enumerable:!0,get:function(){return ie.Date_}});Object.defineProperty(_,"DateDay",{enumerable:!0,get:function(){return ie.DateDay}});Object.defineProperty(_,"DateMillisecond",{enumerable:!0,get:function(){return ie.DateMillisecond}});Object.defineProperty(_,"Timestamp",{enumerable:!0,get:function(){return ie.Timestamp}});Object.defineProperty(_,"TimestampSecond",{enumerable:!0,get:function(){return ie.TimestampSecond}});Object.defineProperty(_,"TimestampMillisecond",{enumerable:!0,get:function(){return ie.TimestampMillisecond}});Object.defineProperty(_,"TimestampMicrosecond",{enumerable:!0,get:function(){return ie.TimestampMicrosecond}});Object.defineProperty(_,"TimestampNanosecond",{enumerable:!0,get:function(){return ie.TimestampNanosecond}});Object.defineProperty(_,"Time",{enumerable:!0,get:function(){return ie.Time}});Object.defineProperty(_,"TimeSecond",{enumerable:!0,get:function(){return ie.TimeSecond}});Object.defineProperty(_,"TimeMillisecond",{enumerable:!0,get:function(){return ie.TimeMillisecond}});Object.defineProperty(_,"TimeMicrosecond",{enumerable:!0,get:function(){return ie.TimeMicrosecond}});Object.defineProperty(_,"TimeNanosecond",{enumerable:!0,get:function(){return ie.TimeNanosecond}});Object.defineProperty(_,"Decimal",{enumerable:!0,get:function(){return ie.Decimal}});Object.defineProperty(_,"List",{enumerable:!0,get:function(){return ie.List}});Object.defineProperty(_,"Struct",{enumerable:!0,get:function(){return ie.Struct}});Object.defineProperty(_,"Union",{enumerable:!0,get:function(){return ie.Union}});Object.defineProperty(_,"DenseUnion",{enumerable:!0,get:function(){return ie.DenseUnion}});Object.defineProperty(_,"SparseUnion",{enumerable:!0,get:function(){return ie.SparseUnion}});Object.defineProperty(_,"Dictionary",{enumerable:!0,get:function(){return ie.Dictionary}});Object.defineProperty(_,"Interval",{enumerable:!0,get:function(){return ie.Interval}});Object.defineProperty(_,"IntervalDayTime",{enumerable:!0,get:function(){return ie.IntervalDayTime}});Object.defineProperty(_,"IntervalYearMonth",{enumerable:!0,get:function(){return ie.IntervalYearMonth}});Object.defineProperty(_,"FixedSizeList",{enumerable:!0,get:function(){return ie.FixedSizeList}});Object.defineProperty(_,"Map_",{enumerable:!0,get:function(){return ie.Map_}});var iU=Ds();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return iU.Table}});var nU=An();Object.defineProperty(_,"Column",{enumerable:!0,get:function(){return nU.Column}});var sU=tt();Object.defineProperty(_,"Visitor",{enumerable:!0,get:function(){return sU.Visitor}});var bv=Ke();Object.defineProperty(_,"Schema",{enumerable:!0,get:function(){return bv.Schema}});Object.defineProperty(_,"Field",{enumerable:!0,get:function(){return bv.Field}});var ee=fr();Object.defineProperty(_,"Vector",{enumerable:!0,get:function(){return ee.Vector}});Object.defineProperty(_,"BaseVector",{enumerable:!0,get:function(){return ee.BaseVector}});Object.defineProperty(_,"BinaryVector",{enumerable:!0,get:function(){return ee.BinaryVector}});Object.defineProperty(_,"BoolVector",{enumerable:!0,get:function(){return ee.BoolVector}});Object.defineProperty(_,"Chunked",{enumerable:!0,get:function(){return ee.Chunked}});Object.defineProperty(_,"DateVector",{enumerable:!0,get:function(){return ee.DateVector}});Object.defineProperty(_,"DateDayVector",{enumerable:!0,get:function(){return ee.DateDayVector}});Object.defineProperty(_,"DateMillisecondVector",{enumerable:!0,get:function(){return ee.DateMillisecondVector}});Object.defineProperty(_,"DecimalVector",{enumerable:!0,get:function(){return ee.DecimalVector}});Object.defineProperty(_,"DictionaryVector",{enumerable:!0,get:function(){return ee.DictionaryVector}});Object.defineProperty(_,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ee.FixedSizeBinaryVector}});Object.defineProperty(_,"FixedSizeListVector",{enumerable:!0,get:function(){return ee.FixedSizeListVector}});Object.defineProperty(_,"FloatVector",{enumerable:!0,get:function(){return ee.FloatVector}});Object.defineProperty(_,"Float16Vector",{enumerable:!0,get:function(){return ee.Float16Vector}});Object.defineProperty(_,"Float32Vector",{enumerable:!0,get:function(){return ee.Float32Vector}});Object.defineProperty(_,"Float64Vector",{enumerable:!0,get:function(){return ee.Float64Vector}});Object.defineProperty(_,"IntervalVector",{enumerable:!0,get:function(){return ee.IntervalVector}});Object.defineProperty(_,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ee.IntervalDayTimeVector}});Object.defineProperty(_,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ee.IntervalYearMonthVector}});Object.defineProperty(_,"IntVector",{enumerable:!0,get:function(){return ee.IntVector}});Object.defineProperty(_,"Int8Vector",{enumerable:!0,get:function(){return ee.Int8Vector}});Object.defineProperty(_,"Int16Vector",{enumerable:!0,get:function(){return ee.Int16Vector}});Object.defineProperty(_,"Int32Vector",{enumerable:!0,get:function(){return ee.Int32Vector}});Object.defineProperty(_,"Int64Vector",{enumerable:!0,get:function(){return ee.Int64Vector}});Object.defineProperty(_,"Uint8Vector",{enumerable:!0,get:function(){return ee.Uint8Vector}});Object.defineProperty(_,"Uint16Vector",{enumerable:!0,get:function(){return ee.Uint16Vector}});Object.defineProperty(_,"Uint32Vector",{enumerable:!0,get:function(){return ee.Uint32Vector}});Object.defineProperty(_,"Uint64Vector",{enumerable:!0,get:function(){return ee.Uint64Vector}});Object.defineProperty(_,"ListVector",{enumerable:!0,get:function(){return ee.ListVector}});Object.defineProperty(_,"MapVector",{enumerable:!0,get:function(){return ee.MapVector}});Object.defineProperty(_,"NullVector",{enumerable:!0,get:function(){return ee.NullVector}});Object.defineProperty(_,"StructVector",{enumerable:!0,get:function(){return ee.StructVector}});Object.defineProperty(_,"TimestampVector",{enumerable:!0,get:function(){return ee.TimestampVector}});Object.defineProperty(_,"TimestampSecondVector",{enumerable:!0,get:function(){return ee.TimestampSecondVector}});Object.defineProperty(_,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ee.TimestampMillisecondVector}});Object.defineProperty(_,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ee.TimestampMicrosecondVector}});Object.defineProperty(_,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ee.TimestampNanosecondVector}});Object.defineProperty(_,"TimeVector",{enumerable:!0,get:function(){return ee.TimeVector}});Object.defineProperty(_,"TimeSecondVector",{enumerable:!0,get:function(){return ee.TimeSecondVector}});Object.defineProperty(_,"TimeMillisecondVector",{enumerable:!0,get:function(){return ee.TimeMillisecondVector}});Object.defineProperty(_,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ee.TimeMicrosecondVector}});Object.defineProperty(_,"TimeNanosecondVector",{enumerable:!0,get:function(){return ee.TimeNanosecondVector}});Object.defineProperty(_,"UnionVector",{enumerable:!0,get:function(){return ee.UnionVector}});Object.defineProperty(_,"DenseUnionVector",{enumerable:!0,get:function(){return ee.DenseUnionVector}});Object.defineProperty(_,"SparseUnionVector",{enumerable:!0,get:function(){return ee.SparseUnionVector}});Object.defineProperty(_,"Utf8Vector",{enumerable:!0,get:function(){return ee.Utf8Vector}});var ne=ta();Object.defineProperty(_,"Builder",{enumerable:!0,get:function(){return ne.Builder}});Object.defineProperty(_,"BinaryBuilder",{enumerable:!0,get:function(){return ne.BinaryBuilder}});Object.defineProperty(_,"BoolBuilder",{enumerable:!0,get:function(){return ne.BoolBuilder}});Object.defineProperty(_,"DateBuilder",{enumerable:!0,get:function(){return ne.DateBuilder}});Object.defineProperty(_,"DateDayBuilder",{enumerable:!0,get:function(){return ne.DateDayBuilder}});Object.defineProperty(_,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ne.DateMillisecondBuilder}});Object.defineProperty(_,"DecimalBuilder",{enumerable:!0,get:function(){return ne.DecimalBuilder}});Object.defineProperty(_,"DictionaryBuilder",{enumerable:!0,get:function(){return ne.DictionaryBuilder}});Object.defineProperty(_,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ne.FixedSizeBinaryBuilder}});Object.defineProperty(_,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ne.FixedSizeListBuilder}});Object.defineProperty(_,"FloatBuilder",{enumerable:!0,get:function(){return ne.FloatBuilder}});Object.defineProperty(_,"Float16Builder",{enumerable:!0,get:function(){return ne.Float16Builder}});Object.defineProperty(_,"Float32Builder",{enumerable:!0,get:function(){return ne.Float32Builder}});Object.defineProperty(_,"Float64Builder",{enumerable:!0,get:function(){return ne.Float64Builder}});Object.defineProperty(_,"IntervalBuilder",{enumerable:!0,get:function(){return ne.IntervalBuilder}});Object.defineProperty(_,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ne.IntervalDayTimeBuilder}});Object.defineProperty(_,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ne.IntervalYearMonthBuilder}});Object.defineProperty(_,"IntBuilder",{enumerable:!0,get:function(){return ne.IntBuilder}});Object.defineProperty(_,"Int8Builder",{enumerable:!0,get:function(){return ne.Int8Builder}});Object.defineProperty(_,"Int16Builder",{enumerable:!0,get:function(){return ne.Int16Builder}});Object.defineProperty(_,"Int32Builder",{enumerable:!0,get:function(){return ne.Int32Builder}});Object.defineProperty(_,"Int64Builder",{enumerable:!0,get:function(){return ne.Int64Builder}});Object.defineProperty(_,"Uint8Builder",{enumerable:!0,get:function(){return ne.Uint8Builder}});Object.defineProperty(_,"Uint16Builder",{enumerable:!0,get:function(){return ne.Uint16Builder}});Object.defineProperty(_,"Uint32Builder",{enumerable:!0,get:function(){return ne.Uint32Builder}});Object.defineProperty(_,"Uint64Builder",{enumerable:!0,get:function(){return ne.Uint64Builder}});Object.defineProperty(_,"ListBuilder",{enumerable:!0,get:function(){return ne.ListBuilder}});Object.defineProperty(_,"MapBuilder",{enumerable:!0,get:function(){return ne.MapBuilder}});Object.defineProperty(_,"NullBuilder",{enumerable:!0,get:function(){return ne.NullBuilder}});Object.defineProperty(_,"StructBuilder",{enumerable:!0,get:function(){return ne.StructBuilder}});Object.defineProperty(_,"TimestampBuilder",{enumerable:!0,get:function(){return ne.TimestampBuilder}});Object.defineProperty(_,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ne.TimestampSecondBuilder}});Object.defineProperty(_,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMillisecondBuilder}});Object.defineProperty(_,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMicrosecondBuilder}});Object.defineProperty(_,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampNanosecondBuilder}});Object.defineProperty(_,"TimeBuilder",{enumerable:!0,get:function(){return ne.TimeBuilder}});Object.defineProperty(_,"TimeSecondBuilder",{enumerable:!0,get:function(){return ne.TimeSecondBuilder}});Object.defineProperty(_,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimeMillisecondBuilder}});Object.defineProperty(_,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimeMicrosecondBuilder}});Object.defineProperty(_,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimeNanosecondBuilder}});Object.defineProperty(_,"UnionBuilder",{enumerable:!0,get:function(){return ne.UnionBuilder}});Object.defineProperty(_,"DenseUnionBuilder",{enumerable:!0,get:function(){return ne.DenseUnionBuilder}});Object.defineProperty(_,"SparseUnionBuilder",{enumerable:!0,get:function(){return ne.SparseUnionBuilder}});Object.defineProperty(_,"Utf8Builder",{enumerable:!0,get:function(){return ne.Utf8Builder}});var Fd=si();Object.defineProperty(_,"ByteStream",{enumerable:!0,get:function(){return Fd.ByteStream}});Object.defineProperty(_,"AsyncByteStream",{enumerable:!0,get:function(){return Fd.AsyncByteStream}});Object.defineProperty(_,"AsyncByteQueue",{enumerable:!0,get:function(){return Fd.AsyncByteQueue}});var zs=ks();Object.defineProperty(_,"RecordBatchReader",{enumerable:!0,get:function(){return zs.RecordBatchReader}});Object.defineProperty(_,"RecordBatchFileReader",{enumerable:!0,get:function(){return zs.RecordBatchFileReader}});Object.defineProperty(_,"RecordBatchStreamReader",{enumerable:!0,get:function(){return zs.RecordBatchStreamReader}});Object.defineProperty(_,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchFileReader}});Object.defineProperty(_,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchStreamReader}});var iu=Sa();Object.defineProperty(_,"RecordBatchWriter",{enumerable:!0,get:function(){return iu.RecordBatchWriter}});Object.defineProperty(_,"RecordBatchFileWriter",{enumerable:!0,get:function(){return iu.RecordBatchFileWriter}});Object.defineProperty(_,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return iu.RecordBatchStreamWriter}});Object.defineProperty(_,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return iu.RecordBatchJSONWriter}});var Md=ya();Object.defineProperty(_,"MessageReader",{enumerable:!0,get:function(){return Md.MessageReader}});Object.defineProperty(_,"AsyncMessageReader",{enumerable:!0,get:function(){return Md.AsyncMessageReader}});Object.defineProperty(_,"JSONMessageReader",{enumerable:!0,get:function(){return Md.JSONMessageReader}});var oU=Ei();Object.defineProperty(_,"Message",{enumerable:!0,get:function(){return oU.Message}});var aU=Fr();Object.defineProperty(_,"RecordBatch",{enumerable:!0,get:function(){return aU.RecordBatch}});var Vd=mv();Object.defineProperty(_,"DataFrame",{enumerable:!0,get:function(){return Vd.DataFrame}});Object.defineProperty(_,"FilteredDataFrame",{enumerable:!0,get:function(){return Vd.FilteredDataFrame}});Object.defineProperty(_,"CountByResult",{enumerable:!0,get:function(){return Vd.CountByResult}});var uU=ls(),cU=qc(),lU=tr(),dU=os(),fU=Ye(),hU=bs(),pU=Od();_.predicate=pU;var Ud=nl();_.util={...uU,...cU,...lU,...dU,...fU,...hU,compareSchemas:Ud.compareSchemas,compareFields:Ud.compareFields,compareTypes:Ud.compareTypes}});var Nd=V(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.Utf8Builder=b.SparseUnionBuilder=b.DenseUnionBuilder=b.UnionBuilder=b.TimeNanosecondBuilder=b.TimeMicrosecondBuilder=b.TimeMillisecondBuilder=b.TimeSecondBuilder=b.TimeBuilder=b.TimestampNanosecondBuilder=b.TimestampMicrosecondBuilder=b.TimestampMillisecondBuilder=b.TimestampSecondBuilder=b.TimestampBuilder=b.StructBuilder=b.NullBuilder=b.MapBuilder=b.ListBuilder=b.Uint64Builder=b.Uint32Builder=b.Uint16Builder=b.Uint8Builder=b.Int64Builder=b.Int32Builder=b.Int16Builder=b.Int8Builder=b.IntBuilder=b.IntervalYearMonthBuilder=b.IntervalDayTimeBuilder=b.IntervalBuilder=b.Float64Builder=b.Float32Builder=b.Float16Builder=b.FloatBuilder=b.FixedSizeListBuilder=b.FixedSizeBinaryBuilder=b.DictionaryBuilder=b.DecimalBuilder=b.DateMillisecondBuilder=b.DateDayBuilder=b.DateBuilder=b.BoolBuilder=b.BinaryBuilder=b.Builder=b.util=b.predicate=b.CountByResult=b.FilteredDataFrame=b.DataFrame=b.RecordBatch=b.Message=b.JSONMessageReader=b.AsyncMessageReader=b.MessageReader=b.RecordBatchJSONWriter=b.RecordBatchStreamWriter=b.RecordBatchFileWriter=b.RecordBatchWriter=b.AsyncRecordBatchStreamReader=b.AsyncRecordBatchFileReader=b.RecordBatchStreamReader=b.RecordBatchFileReader=b.RecordBatchReader=b.AsyncByteQueue=b.AsyncByteStream=b.ByteStream=b.Utf8Vector=b.SparseUnionVector=b.DenseUnionVector=b.UnionVector=b.TimeNanosecondVector=b.TimeMicrosecondVector=b.TimeMillisecondVector=b.TimeSecondVector=b.TimeVector=b.TimestampNanosecondVector=b.TimestampMicrosecondVector=b.TimestampMillisecondVector=b.TimestampSecondVector=b.TimestampVector=b.StructVector=b.NullVector=b.MapVector=b.ListVector=b.Uint64Vector=b.Uint32Vector=b.Uint16Vector=b.Uint8Vector=b.Int64Vector=b.Int32Vector=b.Int16Vector=b.Int8Vector=b.IntVector=b.IntervalYearMonthVector=b.IntervalDayTimeVector=b.IntervalVector=b.Float64Vector=b.Float32Vector=b.Float16Vector=b.FloatVector=b.FixedSizeListVector=b.FixedSizeBinaryVector=b.DictionaryVector=b.DecimalVector=b.DateMillisecondVector=b.DateDayVector=b.DateVector=b.Chunked=b.BoolVector=b.BinaryVector=b.BaseVector=b.Vector=b.Visitor=b.Field=b.Schema=b.Column=b.Table=b.Map_=b.FixedSizeList=b.IntervalYearMonth=b.IntervalDayTime=b.Interval=b.Dictionary=b.SparseUnion=b.DenseUnion=b.Union=b.Struct=b.List=b.Decimal=b.TimeNanosecond=b.TimeMicrosecond=b.TimeMillisecond=b.TimeSecond=b.Time=b.TimestampNanosecond=b.TimestampMicrosecond=b.TimestampMillisecond=b.TimestampSecond=b.Timestamp=b.DateMillisecond=b.DateDay=b.Date_=b.FixedSizeBinary=b.Binary=b.Utf8=b.Float64=b.Float32=b.Float16=b.Float=b.Uint64=b.Uint32=b.Uint16=b.Uint8=b.Int64=b.Int32=b.Int16=b.Int8=b.Int=b.Bool=b.Null=b.DataType=b.Data=b.BufferType=b.UnionMode=b.Type=b.TimeUnit=b.Precision=b.MetadataVersion=b.MessageHeader=b.IntervalUnit=b.DateUnit=void 0;var yU=ns(),mU=ta(),Cd=ks(),Pd=Sa(),_U=ov(),bU=cv(),kd=lv(),Rd=dv();yU.default.toDOMStream=_U.toDOMStream;mU.Builder.throughDOM=bU.builderThroughDOMStream;Cd.RecordBatchReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Cd.RecordBatchFileReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Cd.RecordBatchStreamReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Pd.RecordBatchWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;Pd.RecordBatchFileWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;Pd.RecordBatchStreamWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;var D=gv();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return D.DateUnit}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return D.IntervalUnit}});Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return D.MessageHeader}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return D.MetadataVersion}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return D.Precision}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return D.TimeUnit}});Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return D.Type}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return D.UnionMode}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return D.BufferType}});Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return D.Data}});Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return D.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return D.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return D.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return D.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return D.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return D.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return D.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return D.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return D.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return D.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return D.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return D.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return D.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return D.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return D.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return D.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return D.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return D.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return D.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return D.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return D.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return D.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return D.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return D.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return D.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return D.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return D.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return D.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return D.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return D.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return D.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return D.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return D.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return D.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return D.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return D.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return D.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return D.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return D.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return D.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return D.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return D.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return D.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return D.Map_}});Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return D.Table}});Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return D.Column}});Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return D.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return D.Field}});Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return D.Visitor}});Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return D.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return D.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return D.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return D.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return D.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return D.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return D.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return D.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return D.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return D.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return D.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return D.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return D.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return D.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return D.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return D.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return D.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return D.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return D.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return D.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return D.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return D.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return D.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return D.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return D.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return D.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return D.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return D.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return D.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return D.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return D.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return D.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return D.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return D.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return D.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return D.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return D.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return D.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return D.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return D.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return D.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return D.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return D.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return D.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return D.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return D.Utf8Vector}});Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return D.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return D.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return D.AsyncByteQueue}});Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return D.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return D.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return D.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchStreamReader}});Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return D.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return D.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return D.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return D.RecordBatchJSONWriter}});Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return D.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return D.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return D.JSONMessageReader}});Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return D.Message}});Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return D.RecordBatch}});Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return D.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return D.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return D.CountByResult}});Object.defineProperty(b,"predicate",{enumerable:!0,get:function(){return D.predicate}});Object.defineProperty(b,"util",{enumerable:!0,get:function(){return D.util}});Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return D.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return D.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return D.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return D.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return D.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return D.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return D.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return D.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return D.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return D.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return D.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return D.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return D.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return D.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return D.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return D.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return D.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return D.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return D.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return D.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return D.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return D.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return D.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return D.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return D.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return D.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return D.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return D.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return D.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return D.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return D.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return D.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return D.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return D.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return D.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return D.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return D.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return D.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return D.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return D.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return D.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return D.Utf8Builder}})});var au=V(()=>{});var zd=V(()=>{});var wv=V(()=>{});var jU={};TS(jU,{BROWSER_RUNTIME:()=>nt,ConsoleLogger:()=>Oy,DEFAULT_RUNTIME:()=>jv,DuckDB:()=>Iv,DuckDBBindings:()=>ou,DuckDBConnection:()=>nu,DuckDBDataProtocol:()=>Qe,DuckDBFeature:()=>Ed,FileStatistics:()=>su,InsertMode:()=>qd,JSONTableShape:()=>Ld,LogEvent:()=>br,LogLevel:()=>Nr,LogOrigin:()=>xr,LogTopic:()=>Bi,StatusCode:()=>je,VoidLogger:()=>Dy,callSRet:()=>Se,copyBuffer:()=>Gi,decodeText:()=>vv,dropResponseBuffers:()=>He,failWith:()=>We,getLogEventLabel:()=>DS,getLogLevelLabel:()=>SS,getLogOriginLabel:()=>AS,getLogTopicLabel:()=>OS,readString:()=>ve});var Nr;(function(s){s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR"})(Nr||(Nr={}));var Bi;(function(s){s[s.NONE=0]="NONE",s[s.CONNECT=1]="CONNECT",s[s.DISCONNECT=2]="DISCONNECT",s[s.OPEN=3]="OPEN",s[s.QUERY=4]="QUERY"})(Bi||(Bi={}));var br;(function(c){c[c.NONE=0]="NONE",c[c.OK=1]="OK",c[c.ERROR=2]="ERROR",c[c.START=3]="START",c[c.RUN=4]="RUN",c[c.CAPTURE=5]="CAPTURE"})(br||(br={}));var xr;(function(s){s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB"})(xr||(xr={}));var Dy=class{log(e){}},Oy=class{log(e){console.log(e)}};function SS(r){switch(r){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function DS(r){switch(r){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function OS(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function AS(r){switch(r){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var je;(function(e){e[e.SUCCESS=0]="SUCCESS"})(je||(je={}));var Rt=Sy(Nd()),xd=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;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}},nu=class{constructor(e,t){this._bindings=e,this._conn=t}get handle(){return this._conn}close(){this._bindings.disconnect(this._conn)}runQuery(e){let t=this._bindings.runQuery(this._conn,e),i=Rt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Rt.Table.from(i)}sendQuery(e){let t=this._bindings.sendQuery(this._conn,e),i=new xd(this._bindings,this._conn,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}createPreparedStatement(e){return this._bindings.createPreparedStatement(this._conn,e)}closePreparedStatement(e){this._bindings.closePreparedStatement(this._conn,e)}runPreparedStatement(e,t){let i=this._bindings.runPreparedStatement(this._conn,e,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isFile()),Rt.Table.from(n)}sendPreparedStatement(e,t){let i=this._bindings.sendPreparedStatement(this._conn,e,t),n=new xd(this._bindings,this._conn,i),s=Rt.RecordBatchReader.from(n);return console.assert(s.isSync()),console.assert(s.isStream()),s}insertArrowBatches(e,t,i){e.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually");let n=new Rt.AsyncByteQueue,s=new Rt.RecordBatchStreamWriter().reset(n,e);s.writeAll(t),s.close();let c=s.toUint8Array(!0);this._bindings.insertArrowFromIPCStream(this._conn,c,i)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}};function gU(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var vv=gU();function We(r,e){console.error(e),r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Gi(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function ve(r,e,t){return vv(r.HEAPU8.subarray(e,e+t))}var Qe;(function(i){i[i.BUFFER=0]="BUFFER",i[i.NATIVE=1]="NATIVE",i[i.HTTP=3]="HTTP"})(Qe||(Qe={}));function Se(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let c=r.HEAPF64[(s>>3)+0],v=r.HEAPF64[(s>>3)+1],w=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[c,v,w]}function He(r){r.ccall("duckdb_web_clear_response",null,[],[])}var jv={testPlatformFeature:(r,e)=>!1,openFile:(r,e)=>{},syncFile:(r,e)=>{},closeFile:(r,e)=>{},getLastFileModificationTime:(r,e)=>0,getFileSize:(r,e)=>0,truncateFile:(r,e,t)=>{},readFile:(r,e,t,i,n)=>0,writeFile:(r,e,t,i,n)=>0,removeDirectory:(r,e,t)=>{},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,glob:(r,e,t)=>{},moveFile:(r,e,t,i,n)=>{},checkFile:(r,e,t)=>!1,removeFile:(r,e,t)=>{}};var su=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.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=i}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 de=Sy(Nd());function Ws(r,e){switch(e.typeId){case de.Type.Binary:return{name:r,type:"binary"};case de.Type.Bool:return{name:r,type:"bool"};case de.Type.Date:return{name:r,type:"date"};case de.Type.DateDay:return{name:r,type:"date32[d]"};case de.Type.DateMillisecond:return{name:r,type:"date64[ms]"};case de.Type.Decimal:{let t=e;return{name:r,type:"decimal",precision:t.precision,scale:t.scale}}case de.Type.Float:return{name:r,type:"float"};case de.Type.Float16:return{name:r,type:"float16"};case de.Type.Float32:return{name:r,type:"float32"};case de.Type.Float64:return{name:r,type:"float64"};case de.Type.Int:return{name:r,type:"int32"};case de.Type.Int16:return{name:r,type:"int16"};case de.Type.Int32:return{name:r,type:"int32"};case de.Type.Int64:return{name:r,type:"int64"};case de.Type.Uint16:return{name:r,type:"uint16"};case de.Type.Uint32:return{name:r,type:"uint32"};case de.Type.Uint64:return{name:r,type:"uint64"};case de.Type.Uint8:return{name:r,type:"uint8"};case de.Type.IntervalDayTime:return{name:r,type:"interval[dt]"};case de.Type.IntervalYearMonth:return{name:r,type:"interval[m]"};case de.Type.List:{let t=e;return{name:r,type:"list",children:[Ws(t.valueField.name,t.valueField.type)]}}case de.Type.FixedSizeBinary:return{name:r,type:"fixedsizebinary",byteWidth:e.byteWidth};case de.Type.Null:return{name:r,type:"null"};case de.Type.Utf8:return{name:r,type:"utf8"};case de.Type.Struct:return{name:r,type:"struct",children:e.children.map(i=>Ws(i.name,i.type))};case de.Type.Time:return{name:r,type:"time[s]"};case de.Type.TimeMicrosecond:return{name:r,type:"time[us]"};case de.Type.TimeMillisecond:return{name:r,type:"time[ms]"};case de.Type.TimeNanosecond:return{name:r,type:"time[ns]"};case de.Type.TimeSecond:return{name:r,type:"time[s]"};case de.Type.Timestamp:return{name:r,type:"timestamp",timezone:e.timezone||void 0};case de.Type.TimestampSecond:return{name:r,type:"timestamp[s]",timezone:e.timezone||void 0};case de.Type.TimestampMicrosecond:return{name:r,type:"timestamp[us]",timezone:e.timezone||void 0};case de.Type.TimestampNanosecond:return{name:r,type:"timestamp[ns]",timezone:e.timezone||void 0};case de.Type.TimestampMillisecond:return{name:r,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var Ed;(function(s){s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT"})(Ed||(Ed={}));var ou=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=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)}open(e){let[t,i,n]=Se(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));He(this.mod)}reset(){let[e,t,i]=Se(this.mod,"duckdb_web_reset",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));He(this.mod)}getVersion(){let[e,t,i]=Se(this.mod,"duckdb_web_get_version",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));let n=ve(this.mod,t,i);return He(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Se(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=ve(this.mod,i,n);return He(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new nu(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}sendQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}fetchQueryResults(e){let[t,i,n]=Se(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=Gi(this.mod,i,n);return He(this.mod),s}createPreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_create",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));return He(this.mod),n}closePreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_close",["number","number"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}runPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}sendPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}insertArrowFromIPCStream(e,t,i){let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=i?JSON.stringify(i):"",[v,w,S]=Se(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(v!==je.SUCCESS)throw new Error(ve(this.mod,w,S))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,w]=Se(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,w))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,w]=Se(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,w))}finishInsert(e,t){}registerFileURL(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,c,v]=Se(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==je.SUCCESS)throw new Error(ve(this.mod,c,v));He(this.mod)}registerFileHandle(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));if(He(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){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){this.mod.ccall("duckdb_web_fs_drop_files",null,[],[])}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}copyFileToBuffer(e){let[t,i,n]=Se(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),c=new Uint8Array(s.length);return c.set(s),He(this.mod),c}collectFileStatistics(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=Se(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));return new su(this.mod.HEAPU8.subarray(i,i+n))}};var Ld;(function(t){t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object"})(Ld||(Ld={}));var qd;(function(t){t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT"})(qd||(qd={}));var Tv={},vU=function(){var r=Tv.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,a){i=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var v=[],w="./this.program",S=function(o,a){throw a},U=typeof window=="object",G=typeof importScripts=="function",me=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",fe="";function Gt(o){return t.locateFile?t.locateFile(o,fe):fe+o}var Cr,_r,Ji,Sv,Ki,Zi;me?(G?fe=au().dirname(fe)+"/":fe=__dirname+"/",Cr=function(a,u){return Ki||(Ki=zd()),Zi||(Zi=au()),a=Zi.normalize(a),Ki.readFileSync(a,u?null:"utf8")},Ji=function(a){var u=Cr(a,!0);return u.buffer||(u=new Uint8Array(u)),$d(u.buffer),u},_r=function(a,u,l){Ki||(Ki=zd()),Zi||(Zi=au()),a=Zi.normalize(a),Ki.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(w=process.argv[1].replace(/\\/g,"/")),v=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof mu))throw o}),process.on("unhandledRejection",Nt),S=function(o,a){if(nf())throw process.exitCode=o,a;process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(U||G)&&(G?fe=self.location.href:typeof document!="undefined"&&document.currentScript&&(fe=document.currentScript.src),r&&(fe=r),fe.indexOf("blob:")!==0?fe=fe.substr(0,fe.lastIndexOf("/")+1):fe="",Cr=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},G&&(Ji=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),_r=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)},Sv=function(o){document.title=o});var Dv=t.print||console.log.bind(console),Pr=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(v=t.arguments),t.thisProgram&&(w=t.thisProgram),t.quit&&(S=t.quit);var Hd=0,ht=function(o){Hd=o},Ov=function(){return Hd},es;t.wasmBinary&&(es=t.wasmBinary);var Av=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Nt("no native wasm support detected");var Hs,uu=!1,Yd;function $d(o,a){o||Nt("Assertion failed: "+a)}function Fv(o){var a=t["_"+o];return $d(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function Mv(o,a,u,l,d){var f={string:function(M){var x=0;if(M!=null&&M!==0){var ue=(M.length<<2)+1;x=hu(ue),Vv(M,x,ue)}return x},array:function(M){var x=hu(M.length);return Zd(M,x),x}};function h(M){return a==="string"?Ys(M):a==="boolean"?Boolean(M):M}var p=Fv(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var j=f[u[g]];j?(m===0&&(m=B()),y[g]=j(l[g])):y[g]=l[g]}var O=p.apply(null,y);return O=h(O),m!==0&&T(m),O}var Gd=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Jd(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&Gd)return Gd.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var y=o[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|y:h=(h&7)<<18|p<<12|y<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function Ys(o,a){return o?Jd(Xi,o,a):""}function Kd(o,a,u,l){if(!(l>0))return 0;for(var d=u,f=u+l-1,h=0;h<o.length;++h){var p=o.charCodeAt(h);if(p>=55296&&p<=57343){var y=o.charCodeAt(++h);p=65536+((p&1023)<<10)|y&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Vv(o,a,u){return Kd(o,Xi,a,u)}function Uv(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 Zd(o,a){Jt.set(o,a)}function Cv(o,a,u){for(var l=0;l<o.length;++l)Jt[a++>>0]=o.charCodeAt(l);u||(Jt[a>>0]=0)}function Pv(o,a){return o%a>0&&(o+=a-o%a),o}var Xd,Jt,Xi,kv,Rv,ae,Nv,xv,Ev;function Qd(o){Xd=o,t.HEAP8=Jt=new Int8Array(o),t.HEAP16=kv=new Int16Array(o),t.HEAP32=ae=new Int32Array(o),t.HEAPU8=Xi=new Uint8Array(o),t.HEAPU16=Rv=new Uint16Array(o),t.HEAPU32=Nv=new Uint32Array(o),t.HEAPF32=xv=new Float32Array(o),t.HEAPF64=Ev=new Float64Array(o)}var wU=t.INITIAL_MEMORY||16777216,H,ef=[],tf=[],Lv=[],rf=[],qv=!1,zv=!1,Wv=0;function nf(){return Av||Wv>0}function Hv(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Kv(t.preRun.shift());$s(ef)}function Yv(){qv=!0,$s(tf)}function $v(){$s(Lv)}function Gv(){zv=!0}function Jv(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Xv(t.postRun.shift());$s(rf)}function Kv(o){ef.unshift(o)}function Zv(o){tf.unshift(o)}function Xv(o){rf.unshift(o)}var ji=0,cu=null,ts=null;function Qv(o){ji++,t.monitorRunDependencies&&t.monitorRunDependencies(ji)}function ej(o){if(ji--,t.monitorRunDependencies&&t.monitorRunDependencies(ji),ji==0&&(cu!==null&&(clearInterval(cu),cu=null),ts)){var a=ts;ts=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Nt(o){t.onAbort&&t.onAbort(o),o+="",Pr(o),uu=!0,Yd=1,o="abort("+o+"). Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var tj="data:application/octet-stream;base64,";function sf(o){return o.startsWith(tj)}var _t;t.locateFile?(_t="duckdb_wasm.wasm",sf(_t)||(_t=Gt(_t))):_t=new URL("duckdb_wasm.wasm",Tv.url).toString();function of(o){try{if(o==_t&&es)return new Uint8Array(es);if(Ji)return Ji(o);throw"both async and sync fetching of the wasm failed"}catch(a){Nt(a)}}function rj(){return!es&&(U||G)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+_t+"'";return o.arrayBuffer()}).catch(function(){return of(_t)}):Promise.resolve().then(function(){return of(_t)})}function ij(){var o={a:w0};function a(h,p){var y=h.exports;t.asm=y,Hs=t.asm.we,Qd(Hs.buffer),H=t.asm.ze,Zv(t.asm.xe),ej("wasm-instantiate")}Qv("wasm-instantiate");function u(h){a(h.instance)}function l(h){return rj().then(function(p){var y=WebAssembly.instantiate(p,o);return y}).then(h,function(p){Pr("failed to asynchronously prepare wasm: "+p),Nt(p)})}function d(){return!es&&typeof WebAssembly.instantiateStreaming=="function"&&!sf(_t)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return Pr("wasm streaming compile failed: "+y),Pr("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Pr("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function $s(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?H.get(u)():H.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function nj(o){return pu(o+16)+16}function Qi(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){ae[this.ptr+4>>2]=a},this.get_type=function(){return ae[this.ptr+4>>2]},this.set_destructor=function(a){ae[this.ptr+8>>2]=a},this.get_destructor=function(){return ae[this.ptr+8>>2]},this.set_refcount=function(a){ae[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Jt[this.ptr+12>>0]=a},this.get_caught=function(){return Jt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Jt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Jt[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=ae[this.ptr>>2];ae[this.ptr>>2]=a+1},this.release_ref=function(){var a=ae[this.ptr>>2];return ae[this.ptr>>2]=a-1,a===1}}function rs(o){this.free=function(){yu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){ae[this.ptr>>2]=a},this.get_base_ptr=function(){return ae[this.ptr>>2]},this.set_adjusted_ptr=function(a){ae[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return ae[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=cf(this.get_exception_info().get_type());if(a)return ae[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 Qi(this.get_base_ptr())},o===void 0?(this.ptr=pu(8),this.set_adjusted_ptr(0)):this.ptr=o}var Gs=[];function sj(o){o.add_ref()}var Js=0;function oj(o){var a=new rs(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),Js--),u.set_rethrown(!1),Gs.push(a),sj(u),a.get_exception_ptr()}var kr=0;function af(o){return yu(new Qi(o).ptr)}function aj(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&H.get(a)(o.excPtr),af(o.excPtr)}}function uj(){I(0);var o=Gs.pop();aj(o.get_exception_info()),o.free(),kr=0}function cj(o){var a=new rs(o),u=a.get_base_ptr();throw kr||(kr=u),a.free(),u}function lj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(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(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function dj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(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(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function fj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(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(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function hj(){var o=Gs.pop();o||Nt("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(Gs.push(o),a.set_rethrown(!0),a.set_caught(!1),Js++),kr=u,u}function pj(o,a,u){var l=new Qi(o);throw l.init(a,u),kr=o,Js++,o}function yj(){return Js}var Je={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=Je.buffers[o];a===0||a===10?((o===1?Dv:Pr)(Jd(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Je.varargs+=4;var o=ae[Je.varargs-4>>2];return o},getStr:function(o){var a=Ys(o);return a},get64:function(o,a){return o}};function mj(o,a){return o=Je.getStr(o),Je.doAccess(o,a)}function _j(o){return ae[uf()>>2]=o,o}function bj(o,a,u){return Je.varargs=u,0}function gj(o,a){}function vj(o,a,u,l){}function jj(o,a,u){}function wj(){return 42}function Bj(o,a,u){return Je.varargs=u,0}var Tj=function(o,a,u){return Pr("warning: unsupported syscall: __sys_madvise1"),0};function Ij(o,a){return o=Je.getStr(o),Je.doMkdir(o,a)}function Sj(o,a,u){Je.varargs=u}function Dj(o,a){}function Oj(o){}function Aj(o,a){}function Fj(o){}function Mj(){Nt()}var lu;me?lu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:lu=function(){return performance.now()};var Vj=!0;function Uj(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&Vj)u=lu();else return _j(28),-1;return ae[a>>2]=u/1e3|0,ae[a+4>>2]=u%1e3*1e3*1e3|0,0}function Cj(o,a){Nt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Pj(o,a){Nt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function kj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function Rj(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function Nj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function xj(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function Ej(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function Lj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function qj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function zj(o){return globalThis.DUCKDB_RUNTIME.getFileSize(t,o)}function Wj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function Hj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function Yj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function $j(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function Gj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function Jj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function Kj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Zj(){return 2147483648}function Xj(o,a,u){Xi.copyWithin(o,a,a+u)}function Qj(o){try{return Hs.grow(o-Xd.byteLength+65535>>>16),Qd(Hs.buffer),1}catch(a){}}function e0(o){var a=Xi.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,Pv(Math.max(o,d),65536)),h=Qj(f);if(h)return!0}return!1}var du={};function t0(){return w||"./this.program"}function is(){if(!is.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,_:t0()};for(var u in du)du[u]===void 0?delete a[u]:a[u]=du[u];var l=[];for(var u in a)l.push(u+"="+a[u]);is.strings=l}return is.strings}function r0(o,a){var u=0;return is().forEach(function(l,d){var f=a+u;ae[o+d*4>>2]=f,Cv(l,f),u+=l.length+1}),0}function i0(o,a){var u=is();ae[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),ae[a>>2]=l,0}function n0(o){return 0}function s0(o,a){var u=o==1||o==2?2:Nt();return Jt[a>>0]=u,0}function o0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doReadv(h,a,u,l);return ae[f>>2]=p,0}function a0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doWritev(h,a,u,l);return ae[f>>2]=p,0}function u0(o,a,u,l){var d=Je.getStreamFromFD(o),f=Je.doReadv(d,a,u);return ae[l>>2]=f,0}function c0(o,a,u,l,d){}function l0(o){var a=Je.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function d0(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=ae[a+f*8>>2],p=ae[a+(f*8+4)>>2],y=0;y<p;y++)Je.printChar(o,Xi[h+y]);d+=p}return ae[l>>2]=d,0}function f0(){return Ov()}function h0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(me)try{var a=wv();return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){Nt("randomDevice")}}function Ks(o,a){Ks.randomDevice||(Ks.randomDevice=h0());for(var u=0;u<a;u++)Jt[o+u>>0]=Ks.randomDevice();return 0}function p0(o){return o}function y0(o){ht(o)}var m0=0;function _0(o,a,u){return o==14&&(m0=ae[a>>2]),0}function b0(o,a,u){return _0(o,a,u)}function Zs(o){return o%4==0&&(o%100!=0||o%400==0)}function fu(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var Xs=[31,29,31,30,31,30,31,31,30,31,30,31],Qs=[31,28,31,30,31,30,31,31,30,31,30,31];function eo(o,a){for(var u=new Date(o.getTime());a>0;){var l=Zs(u.getFullYear()),d=u.getMonth(),f=(l?Xs:Qs)[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 g0(o,a,u,l){var d=ae[l+40>>2],f={tm_sec:ae[l>>2],tm_min:ae[l+4>>2],tm_hour:ae[l+8>>2],tm_mday:ae[l+12>>2],tm_mon:ae[l+16>>2],tm_year:ae[l+20>>2],tm_wday:ae[l+24>>2],tm_yday:ae[l+28>>2],tm_isdst:ae[l+32>>2],tm_gmtoff:ae[l+36>>2],tm_zone:d?Ys(d):""},h=Ys(u),p={"%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 y in p)h=h.replace(new RegExp(y,"g"),p[y]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"];function j(P,$,Ae){for(var ye=typeof P=="number"?P.toString():P||"";ye.length<$;)ye=Ae[0]+ye;return ye}function O(P,$){return j(P,$,"0")}function M(P,$){function Ae(at){return at<0?-1:at>0?1:0}var ye;return(ye=Ae(P.getFullYear()-$.getFullYear()))===0&&(ye=Ae(P.getMonth()-$.getMonth()))===0&&(ye=Ae(P.getDate()-$.getDate())),ye}function x(P){switch(P.getDay()){case 0:return new Date(P.getFullYear()-1,11,29);case 1:return P;case 2:return new Date(P.getFullYear(),0,3);case 3:return new Date(P.getFullYear(),0,2);case 4:return new Date(P.getFullYear(),0,1);case 5:return new Date(P.getFullYear()-1,11,31);case 6:return new Date(P.getFullYear()-1,11,30)}}function ue(P){var $=eo(new Date(P.tm_year+1900,0,1),P.tm_yday),Ae=new Date($.getFullYear(),0,4),ye=new Date($.getFullYear()+1,0,4),at=x(Ae),Rr=x(ye);return M(at,$)<=0?M(Rr,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var _e={"%a":function(P){return m[P.tm_wday].substring(0,3)},"%A":function(P){return m[P.tm_wday]},"%b":function(P){return g[P.tm_mon].substring(0,3)},"%B":function(P){return g[P.tm_mon]},"%C":function(P){var $=P.tm_year+1900;return O($/100|0,2)},"%d":function(P){return O(P.tm_mday,2)},"%e":function(P){return j(P.tm_mday,2," ")},"%g":function(P){return ue(P).toString().substring(2)},"%G":function(P){return ue(P)},"%H":function(P){return O(P.tm_hour,2)},"%I":function(P){var $=P.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":function(P){return O(P.tm_mday+fu(Zs(P.tm_year+1900)?Xs:Qs,P.tm_mon-1),3)},"%m":function(P){return O(P.tm_mon+1,2)},"%M":function(P){return O(P.tm_min,2)},"%n":function(){return`
|
|
18
|
-
`},"%p":function(P){return P.tm_hour>=0&&P.tm_hour<12?"AM":"PM"},"%S":function(P){return O(P.tm_sec,2)},"%t":function(){return" "},"%u":function(P){return P.tm_wday||7},"%U":function(P){var $=new Date(P.tm_year+1900,0,1),Ae=$.getDay()===0?$:eo($,7-$.getDay()),ye=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,ye)<0){var at=fu(Zs(ye.getFullYear())?Xs:Qs,ye.getMonth()-1)-31,Rr=31-Ae.getDate(),wi=Rr+at+ye.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===0?"01":"00"},"%V":function(P){var $=new Date(P.tm_year+1900,0,4),Ae=new Date(P.tm_year+1901,0,4),ye=x($),at=x(Ae),Rr=eo(new Date(P.tm_year+1900,0,1),P.tm_yday);if(M(Rr,ye)<0)return"53";if(M(at,Rr)<=0)return"01";var wi;return ye.getFullYear()<P.tm_year+1900?wi=P.tm_yday+32-ye.getDate():wi=P.tm_yday+1-ye.getDate(),O(Math.ceil(wi/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var $=new Date(P.tm_year,0,1),Ae=$.getDay()===1?$:eo($,$.getDay()===0?1:7-$.getDay()+1),ye=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,ye)<0){var at=fu(Zs(ye.getFullYear())?Xs:Qs,ye.getMonth()-1)-31,Rr=31-Ae.getDate(),wi=Rr+at+ye.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===0?"01":"00"},"%y":function(P){return(P.tm_year+1900).toString().substring(2)},"%Y":function(P){return P.tm_year+1900},"%z":function(P){var $=P.tm_gmtoff,Ae=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(Ae?"+":"-")+String("0000"+$).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var y in _e)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),_e[y](f)));var Be=j0(h,!1);return Be.length>a?0:(Zd(Be,o),Be.length-1)}function v0(o,a,u,l){return g0(o,a,u,l)}function j0(o,a,u){var l=u>0?u:Uv(o)+1,d=new Array(l),f=Kd(o,d,0,d.length);return a&&(d.length=f),d}var w0={i:nj,A:oj,F:uj,b:lj,n:dj,H:fj,j:af,qa:hj,u:pj,eb:yj,c:cj,re:mj,da:bj,Ka:gj,Ja:vj,La:jj,ka:wj,Na:Bj,Ia:Tj,Ma:Ij,na:Sj,pe:Dj,ja:Oj,la:Aj,ma:Fj,ea:Mj,ia:Uj,ta:Cj,ve:Pj,za:kj,Aa:Rj,xa:Nj,ya:xj,Sa:Ej,va:Lj,Ca:qj,Ea:zj,wa:Wj,Fa:Hj,ca:Yj,Ba:$j,Da:Gj,ua:Jj,ne:Kj,pb:Zj,Ta:Xj,Hc:e0,Pa:r0,Qa:i0,Z:n0,Ra:s0,be:o0,nb:a0,pa:u0,ie:c0,qe:l0,fa:d0,a:f0,Ga:Ks,V:$w,J:Ow,Q:hw,vb:zI,W:Yw,L:zw,ra:fw,wb:qI,t:_w,T:tB,te:Kw,X:xw,U:eB,ue:Jw,e:sw,$:Ew,B:kw,Kb:OI,d:ow,_:Gw,sa:Zw,h:uw,Hb:MI,l:dw,oa:Sw,o:cw,z:jw,w:bw,P:qw,x:gw,v:ww,p:Pw,K:Fw,I:Mw,Lb:DI,Ob:TI,Qb:wI,Mb:SI,Ib:FI,Pb:BI,pc:KT,ge:aB,id:nT,bd:dT,fe:uB,zc:ET,wd:WB,Wa:hS,Va:pS,Vd:gB,hd:sT,Pc:IT,Pd:IB,Ub:bI,Ac:xT,Ua:yS,Wd:bB,Td:jB,Cc:RT,cd:lT,Hd:UB,$c:hT,kb:XI,Ud:vB,_d:pB,Rd:BB,vd:HB,fb:iS,Xa:fS,jd:iT,ee:cB,Xc:_T,bb:oS,ub:WI,dd:cT,jb:QI,sc:$T,Sd:wB,Yc:mT,ud:YB,_c:pT,Zc:yT,Tc:jT,nc:XT,Lc:AT,Oc:ST,Nc:DT,Sb:vI,Mc:OT,ce:dB,Ab:NI,Bb:RI,ke:nB,je:sB,gd:oT,me:rB,Wb:mI,Tb:gI,Nb:II,Vb:_I,Eb:CI,vc:WT,tb:HI,Gb:VI,Fb:UI,Ed:kB,Jb:AI,Db:PI,Zb:hI,yd:qB,Jc:MT,Ad:EB,pd:ZB,zb:xI,yb:EI,ic:iI,xb:LI,Fd:PB,qc:JT,nd:QB,Ya:dS,ac:lI,mb:KI,ld:tT,Kc:FT,Fc:CT,s:iw,k:aw,C:Vw,aa:Cw,qb:GI,D:Rw,ba:Uw,rb:$I,f:nw,S:yw,N:Ww,cc:pw,g:mw,m:lw,se:Xw,q:Aw,r:Iw,ha:Lw,y:vw,O:Dw,M:Nw,R:Bw,oe:Qw,ga:Hw,Y:Tw,Wc:bT,ob:JI,xd:zB,Dc:kT,Md:OB,oc:ZT,tc:YT,ib:eS,Cd:NB,yc:LT,cb:sS,Rc:BT,Sc:wT,Gc:UT,Nd:DB,wc:zT,uc:HT,jc:rI,Qd:TB,Qc:TT,Vc:gT,Xb:yI,fc:oI,Id:VB,Jd:MB,gb:rS,Od:SB,Kd:FB,xc:qT,dc:uI,mc:QT,Uc:vT,db:nS,ae:fB,de:lB,he:oB,ad:fT,Yb:pI,Ld:AB,hc:nI,gc:sI,od:XB,hb:tS,zd:LB,td:$B,Za:lS,ec:aI,lb:ZI,le:iB,Zd:yB,rd:JB,kc:tI,_b:fI,Rb:jI,Yd:mB,Xd:_B,sd:GB,fd:aT,ed:uT,md:eT,sb:YI,kd:rT,bc:cI,Cb:kI,ab:aS,lc:eI,qd:KB,Bc:NT,_a:cS,$a:uS,$b:dI,$d:hB,Dd:RB,Ec:PT,Ic:VT,rc:GT,Gd:CB,Bd:xB,G:p0,E:y0,Ha:b0,Oa:v0},BU=ij(),B0=t.___wasm_call_ctors=function(){return(B0=t.___wasm_call_ctors=t.asm.xe).apply(null,arguments)},T0=t._main=function(){return(T0=t._main=t.asm.ye).apply(null,arguments)},I0=t._duckdb_web_fs_glob_add_path=function(){return(I0=t._duckdb_web_fs_glob_add_path=t.asm.Ae).apply(null,arguments)},S0=t._duckdb_web_clear_response=function(){return(S0=t._duckdb_web_clear_response=t.asm.Be).apply(null,arguments)},D0=t._duckdb_web_fail_with=function(){return(D0=t._duckdb_web_fail_with=t.asm.Ce).apply(null,arguments)},O0=t._duckdb_web_reset=function(){return(O0=t._duckdb_web_reset=t.asm.De).apply(null,arguments)},A0=t._duckdb_web_connect=function(){return(A0=t._duckdb_web_connect=t.asm.Ee).apply(null,arguments)},F0=t._duckdb_web_disconnect=function(){return(F0=t._duckdb_web_disconnect=t.asm.Fe).apply(null,arguments)},M0=t._duckdb_web_flush_files=function(){return(M0=t._duckdb_web_flush_files=t.asm.Ge).apply(null,arguments)},V0=t._duckdb_web_flush_file=function(){return(V0=t._duckdb_web_flush_file=t.asm.He).apply(null,arguments)},U0=t._duckdb_web_open=function(){return(U0=t._duckdb_web_open=t.asm.Ie).apply(null,arguments)},C0=t._duckdb_web_collect_file_stats=function(){return(C0=t._duckdb_web_collect_file_stats=t.asm.Je).apply(null,arguments)},P0=t._duckdb_web_export_file_stats=function(){return(P0=t._duckdb_web_export_file_stats=t.asm.Ke).apply(null,arguments)},k0=t._duckdb_web_fs_drop_file=function(){return(k0=t._duckdb_web_fs_drop_file=t.asm.Le).apply(null,arguments)},R0=t._duckdb_web_fs_drop_files=function(){return(R0=t._duckdb_web_fs_drop_files=t.asm.Me).apply(null,arguments)},N0=t._duckdb_web_fs_get_file_info=function(){return(N0=t._duckdb_web_fs_get_file_info=t.asm.Ne).apply(null,arguments)},x0=t._duckdb_web_fs_set_file_descriptor=function(){return(x0=t._duckdb_web_fs_set_file_descriptor=t.asm.Oe).apply(null,arguments)},E0=t._duckdb_web_fs_register_file_url=function(){return(E0=t._duckdb_web_fs_register_file_url=t.asm.Pe).apply(null,arguments)},L0=t._duckdb_web_fs_register_file_buffer=function(){return(L0=t._duckdb_web_fs_register_file_buffer=t.asm.Qe).apply(null,arguments)},q0=t._duckdb_web_copy_file_to_buffer=function(){return(q0=t._duckdb_web_copy_file_to_buffer=t.asm.Re).apply(null,arguments)},z0=t._duckdb_web_copy_file_to_path=function(){return(z0=t._duckdb_web_copy_file_to_path=t.asm.Se).apply(null,arguments)},W0=t._duckdb_web_get_version=function(){return(W0=t._duckdb_web_get_version=t.asm.Te).apply(null,arguments)},H0=t._duckdb_web_get_feature_flags=function(){return(H0=t._duckdb_web_get_feature_flags=t.asm.Ue).apply(null,arguments)},Y0=t._duckdb_web_tokenize=function(){return(Y0=t._duckdb_web_tokenize=t.asm.Ve).apply(null,arguments)},$0=t._duckdb_web_prepared_statement_create=function(){return($0=t._duckdb_web_prepared_statement_create=t.asm.We).apply(null,arguments)},G0=t._duckdb_web_prepared_statement_close=function(){return(G0=t._duckdb_web_prepared_statement_close=t.asm.Xe).apply(null,arguments)},J0=t._duckdb_web_prepared_statement_run=function(){return(J0=t._duckdb_web_prepared_statement_run=t.asm.Ye).apply(null,arguments)},K0=t._duckdb_web_prepared_statement_send=function(){return(K0=t._duckdb_web_prepared_statement_send=t.asm.Ze).apply(null,arguments)},Z0=t._duckdb_web_query_run=function(){return(Z0=t._duckdb_web_query_run=t.asm._e).apply(null,arguments)},X0=t._duckdb_web_query_send=function(){return(X0=t._duckdb_web_query_send=t.asm.$e).apply(null,arguments)},Q0=t._duckdb_web_query_fetch_results=function(){return(Q0=t._duckdb_web_query_fetch_results=t.asm.af).apply(null,arguments)},ew=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(ew=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.bf).apply(null,arguments)},tw=t._duckdb_web_insert_csv_from_path=function(){return(tw=t._duckdb_web_insert_csv_from_path=t.asm.cf).apply(null,arguments)},rw=t._duckdb_web_insert_json_from_path=function(){return(rw=t._duckdb_web_insert_json_from_path=t.asm.df).apply(null,arguments)},uf=t.___errno_location=function(){return(uf=t.___errno_location=t.asm.ef).apply(null,arguments)},B=t.stackSave=function(){return(B=t.stackSave=t.asm.ff).apply(null,arguments)},T=t.stackRestore=function(){return(T=t.stackRestore=t.asm.gf).apply(null,arguments)},hu=t.stackAlloc=function(){return(hu=t.stackAlloc=t.asm.hf).apply(null,arguments)},I=t._setThrew=function(){return(I=t._setThrew=t.asm.jf).apply(null,arguments)},to=t.___cxa_can_catch=function(){return(to=t.___cxa_can_catch=t.asm.kf).apply(null,arguments)},cf=t.___cxa_is_pointer_type=function(){return(cf=t.___cxa_is_pointer_type=t.asm.lf).apply(null,arguments)},pu=t._malloc=function(){return(pu=t._malloc=t.asm.mf).apply(null,arguments)},yu=t._free=function(){return(yu=t._free=t.asm.nf).apply(null,arguments)},lf=t.dynCall_jiji=function(){return(lf=t.dynCall_jiji=t.asm.of).apply(null,arguments)},df=t.dynCall_jiiii=function(){return(df=t.dynCall_jiiii=t.asm.pf).apply(null,arguments)},ff=t.dynCall_iiiiij=function(){return(ff=t.dynCall_iiiiij=t.asm.qf).apply(null,arguments)},hf=t.dynCall_iiiiijj=function(){return(hf=t.dynCall_iiiiijj=t.asm.rf).apply(null,arguments)},pf=t.dynCall_viijii=function(){return(pf=t.dynCall_viijii=t.asm.sf).apply(null,arguments)},yf=t.dynCall_j=function(){return(yf=t.dynCall_j=t.asm.tf).apply(null,arguments)},mf=t.dynCall_ji=function(){return(mf=t.dynCall_ji=t.asm.uf).apply(null,arguments)},_f=t.dynCall_iij=function(){return(_f=t.dynCall_iij=t.asm.vf).apply(null,arguments)},bf=t.dynCall_viij=function(){return(bf=t.dynCall_viij=t.asm.wf).apply(null,arguments)},gf=t.dynCall_viijji=function(){return(gf=t.dynCall_viijji=t.asm.xf).apply(null,arguments)},vf=t.dynCall_viijj=function(){return(vf=t.dynCall_viijj=t.asm.yf).apply(null,arguments)},jf=t.dynCall_viiijj=function(){return(jf=t.dynCall_viiijj=t.asm.zf).apply(null,arguments)},wf=t.dynCall_viiji=function(){return(wf=t.dynCall_viiji=t.asm.Af).apply(null,arguments)},Bf=t.dynCall_vijjj=function(){return(Bf=t.dynCall_vijjj=t.asm.Bf).apply(null,arguments)},Tf=t.dynCall_iiijj=function(){return(Tf=t.dynCall_iiijj=t.asm.Cf).apply(null,arguments)},If=t.dynCall_viiij=function(){return(If=t.dynCall_viiij=t.asm.Df).apply(null,arguments)},Sf=t.dynCall_viijij=function(){return(Sf=t.dynCall_viijij=t.asm.Ef).apply(null,arguments)},Df=t.dynCall_viji=function(){return(Df=t.dynCall_viji=t.asm.Ff).apply(null,arguments)},Of=t.dynCall_iiiijj=function(){return(Of=t.dynCall_iiiijj=t.asm.Gf).apply(null,arguments)},Af=t.dynCall_viijiiiii=function(){return(Af=t.dynCall_viijiiiii=t.asm.Hf).apply(null,arguments)},Ff=t.dynCall_viiiiijiiii=function(){return(Ff=t.dynCall_viiiiijiiii=t.asm.If).apply(null,arguments)},Mf=t.dynCall_viiiijj=function(){return(Mf=t.dynCall_viiiijj=t.asm.Jf).apply(null,arguments)},Vf=t.dynCall_iiijiiii=function(){return(Vf=t.dynCall_iiijiiii=t.asm.Kf).apply(null,arguments)},Uf=t.dynCall_vij=function(){return(Uf=t.dynCall_vij=t.asm.Lf).apply(null,arguments)},Cf=t.dynCall_jij=function(){return(Cf=t.dynCall_jij=t.asm.Mf).apply(null,arguments)},Pf=t.dynCall_jiiij=function(){return(Pf=t.dynCall_jiiij=t.asm.Nf).apply(null,arguments)},kf=t.dynCall_iiij=function(){return(kf=t.dynCall_iiij=t.asm.Of).apply(null,arguments)},Rf=t.dynCall_iiiiijjiijj=function(){return(Rf=t.dynCall_iiiiijjiijj=t.asm.Pf).apply(null,arguments)},Nf=t.dynCall_viijiijji=function(){return(Nf=t.dynCall_viijiijji=t.asm.Qf).apply(null,arguments)},xf=t.dynCall_vjjijij=function(){return(xf=t.dynCall_vjjijij=t.asm.Rf).apply(null,arguments)},Ef=t.dynCall_vijjji=function(){return(Ef=t.dynCall_vijjji=t.asm.Sf).apply(null,arguments)},Lf=t.dynCall_vjjii=function(){return(Lf=t.dynCall_vjjii=t.asm.Tf).apply(null,arguments)},qf=t.dynCall_viiiiiji=function(){return(qf=t.dynCall_viiiiiji=t.asm.Uf).apply(null,arguments)},zf=t.dynCall_jiiijji=function(){return(zf=t.dynCall_jiiijji=t.asm.Vf).apply(null,arguments)},Wf=t.dynCall_iijj=function(){return(Wf=t.dynCall_iijj=t.asm.Wf).apply(null,arguments)},Hf=t.dynCall_iiijjii=function(){return(Hf=t.dynCall_iiijjii=t.asm.Xf).apply(null,arguments)},Yf=t.dynCall_iijjii=function(){return(Yf=t.dynCall_iijjii=t.asm.Yf).apply(null,arguments)},$f=t.dynCall_viiiij=function(){return($f=t.dynCall_viiiij=t.asm.Zf).apply(null,arguments)},Gf=t.dynCall_vijii=function(){return(Gf=t.dynCall_vijii=t.asm._f).apply(null,arguments)},Jf=t.dynCall_viijjii=function(){return(Jf=t.dynCall_viijjii=t.asm.$f).apply(null,arguments)},Kf=t.dynCall_vijj=function(){return(Kf=t.dynCall_vijj=t.asm.ag).apply(null,arguments)},Zf=t.dynCall_jijjij=function(){return(Zf=t.dynCall_jijjij=t.asm.bg).apply(null,arguments)},Xf=t.dynCall_jiijii=function(){return(Xf=t.dynCall_jiijii=t.asm.cg).apply(null,arguments)},Qf=t.dynCall_jijiii=function(){return(Qf=t.dynCall_jijiii=t.asm.dg).apply(null,arguments)},eh=t.dynCall_viijiiij=function(){return(eh=t.dynCall_viijiiij=t.asm.eg).apply(null,arguments)},th=t.dynCall_vijiiiji=function(){return(th=t.dynCall_vijiiiji=t.asm.fg).apply(null,arguments)},rh=t.dynCall_jiiji=function(){return(rh=t.dynCall_jiiji=t.asm.gg).apply(null,arguments)},ih=t.dynCall_viiijij=function(){return(ih=t.dynCall_viiijij=t.asm.hg).apply(null,arguments)},nh=t.dynCall_viijiijj=function(){return(nh=t.dynCall_viijiijj=t.asm.ig).apply(null,arguments)},sh=t.dynCall_viiiiijj=function(){return(sh=t.dynCall_viiiiijj=t.asm.jg).apply(null,arguments)},oh=t.dynCall_viiijji=function(){return(oh=t.dynCall_viiijji=t.asm.kg).apply(null,arguments)},ah=t.dynCall_iiiij=function(){return(ah=t.dynCall_iiiij=t.asm.lg).apply(null,arguments)},uh=t.dynCall_iiiiiji=function(){return(uh=t.dynCall_iiiiiji=t.asm.mg).apply(null,arguments)},ch=t.dynCall_iiiji=function(){return(ch=t.dynCall_iiiji=t.asm.ng).apply(null,arguments)},lh=t.dynCall_iiiiji=function(){return(lh=t.dynCall_iiiiji=t.asm.og).apply(null,arguments)},dh=t.dynCall_jii=function(){return(dh=t.dynCall_jii=t.asm.pg).apply(null,arguments)},fh=t.dynCall_jiii=function(){return(fh=t.dynCall_jiii=t.asm.qg).apply(null,arguments)},hh=t.dynCall_iijjijj=function(){return(hh=t.dynCall_iijjijj=t.asm.rg).apply(null,arguments)},ph=t.dynCall_viiiijiiiii=function(){return(ph=t.dynCall_viiiijiiiii=t.asm.sg).apply(null,arguments)},yh=t.dynCall_viiiijiiii=function(){return(yh=t.dynCall_viiiijiiii=t.asm.tg).apply(null,arguments)},mh=t.dynCall_viiijii=function(){return(mh=t.dynCall_viiijii=t.asm.ug).apply(null,arguments)},_h=t.dynCall_viiiiiij=function(){return(_h=t.dynCall_viiiiiij=t.asm.vg).apply(null,arguments)},bh=t.dynCall_viiijjj=function(){return(bh=t.dynCall_viiijjj=t.asm.wg).apply(null,arguments)},gh=t.dynCall_iiijiii=function(){return(gh=t.dynCall_iiijiii=t.asm.xg).apply(null,arguments)},vh=t.dynCall_iiiiijii=function(){return(vh=t.dynCall_iiiiijii=t.asm.yg).apply(null,arguments)},jh=t.dynCall_viijiii=function(){return(jh=t.dynCall_viijiii=t.asm.zg).apply(null,arguments)},wh=t.dynCall_iiijiij=function(){return(wh=t.dynCall_iiijiij=t.asm.Ag).apply(null,arguments)},Bh=t.dynCall_vijiii=function(){return(Bh=t.dynCall_vijiii=t.asm.Bg).apply(null,arguments)},Th=t.dynCall_iijjiii=function(){return(Th=t.dynCall_iijjiii=t.asm.Cg).apply(null,arguments)},Ih=t.dynCall_iijjiiii=function(){return(Ih=t.dynCall_iijjiiii=t.asm.Dg).apply(null,arguments)},Sh=t.dynCall_iiji=function(){return(Sh=t.dynCall_iiji=t.asm.Eg).apply(null,arguments)},Dh=t.dynCall_iijji=function(){return(Dh=t.dynCall_iijji=t.asm.Fg).apply(null,arguments)},Oh=t.dynCall_vijiiii=function(){return(Oh=t.dynCall_vijiiii=t.asm.Gg).apply(null,arguments)},Ah=t.dynCall_iijiiii=function(){return(Ah=t.dynCall_iijiiii=t.asm.Hg).apply(null,arguments)},Fh=t.dynCall_viiiji=function(){return(Fh=t.dynCall_viiiji=t.asm.Ig).apply(null,arguments)},Mh=t.dynCall_iiiijiii=function(){return(Mh=t.dynCall_iiiijiii=t.asm.Jg).apply(null,arguments)},Vh=t.dynCall_vijij=function(){return(Vh=t.dynCall_vijij=t.asm.Kg).apply(null,arguments)},Uh=t.dynCall_iiijjjj=function(){return(Uh=t.dynCall_iiijjjj=t.asm.Lg).apply(null,arguments)},Ch=t.dynCall_jijj=function(){return(Ch=t.dynCall_jijj=t.asm.Mg).apply(null,arguments)},Ph=t.dynCall_viiiijiiiiiiii=function(){return(Ph=t.dynCall_viiiijiiiiiiii=t.asm.Ng).apply(null,arguments)},kh=t.dynCall_ij=function(){return(kh=t.dynCall_ij=t.asm.Og).apply(null,arguments)},Rh=t.dynCall_jj=function(){return(Rh=t.dynCall_jj=t.asm.Pg).apply(null,arguments)},Nh=t.dynCall_jjj=function(){return(Nh=t.dynCall_jjj=t.asm.Qg).apply(null,arguments)},xh=t.dynCall_iji=function(){return(xh=t.dynCall_iji=t.asm.Rg).apply(null,arguments)},Eh=t.dynCall_vjii=function(){return(Eh=t.dynCall_vjii=t.asm.Sg).apply(null,arguments)},Lh=t.dynCall_vjiiii=function(){return(Lh=t.dynCall_vjiiii=t.asm.Tg).apply(null,arguments)},qh=t.dynCall_viiiiijiii=function(){return(qh=t.dynCall_viiiiijiii=t.asm.Ug).apply(null,arguments)},zh=t.dynCall_vijji=function(){return(zh=t.dynCall_vijji=t.asm.Vg).apply(null,arguments)},Wh=t.dynCall_iiijii=function(){return(Wh=t.dynCall_iiijii=t.asm.Wg).apply(null,arguments)},Hh=t.dynCall_jiij=function(){return(Hh=t.dynCall_jiij=t.asm.Xg).apply(null,arguments)},Yh=t.dynCall_iiiijjii=function(){return(Yh=t.dynCall_iiiijjii=t.asm.Yg).apply(null,arguments)},$h=t.dynCall_iiiiijji=function(){return($h=t.dynCall_iiiiijji=t.asm.Zg).apply(null,arguments)},Gh=t.dynCall_viiiiji=function(){return(Gh=t.dynCall_viiiiji=t.asm._g).apply(null,arguments)},Jh=t.dynCall_viiijjii=function(){return(Jh=t.dynCall_viiijjii=t.asm.$g).apply(null,arguments)},Kh=t.dynCall_viiiijji=function(){return(Kh=t.dynCall_viiiijji=t.asm.ah).apply(null,arguments)},Zh=t.dynCall_viiiijjii=function(){return(Zh=t.dynCall_viiiijjii=t.asm.bh).apply(null,arguments)},Xh=t.dynCall_viiiiijji=function(){return(Xh=t.dynCall_viiiiijji=t.asm.ch).apply(null,arguments)},Qh=t.dynCall_jiiiij=function(){return(Qh=t.dynCall_jiiiij=t.asm.dh).apply(null,arguments)},ep=t.dynCall_iijiji=function(){return(ep=t.dynCall_iijiji=t.asm.eh).apply(null,arguments)},tp=t.dynCall_viiijijiji=function(){return(tp=t.dynCall_viiijijiji=t.asm.fh).apply(null,arguments)},rp=t.dynCall_vjiiiji=function(){return(rp=t.dynCall_vjiiiji=t.asm.gh).apply(null,arguments)},ip=t.dynCall_viiijjij=function(){return(ip=t.dynCall_viiijjij=t.asm.hh).apply(null,arguments)},np=t.dynCall_vijijjiij=function(){return(np=t.dynCall_vijijjiij=t.asm.ih).apply(null,arguments)},sp=t.dynCall_viijjij=function(){return(sp=t.dynCall_viijjij=t.asm.jh).apply(null,arguments)},op=t.dynCall_viiijjiij=function(){return(op=t.dynCall_viiijjiij=t.asm.kh).apply(null,arguments)},ap=t.dynCall_viiiijjjj=function(){return(ap=t.dynCall_viiiijjjj=t.asm.lh).apply(null,arguments)},up=t.dynCall_jiijijii=function(){return(up=t.dynCall_jiijijii=t.asm.mh).apply(null,arguments)},cp=t.dynCall_viijiiiiij=function(){return(cp=t.dynCall_viijiiiiij=t.asm.nh).apply(null,arguments)},lp=t.dynCall_viijiiiijj=function(){return(lp=t.dynCall_viijiiiijj=t.asm.oh).apply(null,arguments)},dp=t.dynCall_viiijiiiijjj=function(){return(dp=t.dynCall_viiijiiiijjj=t.asm.ph).apply(null,arguments)},fp=t.dynCall_viijijiiiijjj=function(){return(fp=t.dynCall_viijijiiiijjj=t.asm.qh).apply(null,arguments)},hp=t.dynCall_iijjjj=function(){return(hp=t.dynCall_iijjjj=t.asm.rh).apply(null,arguments)},pp=t.dynCall_iiijji=function(){return(pp=t.dynCall_iiijji=t.asm.sh).apply(null,arguments)},yp=t.dynCall_vijijiiiijjj=function(){return(yp=t.dynCall_vijijiiiijjj=t.asm.th).apply(null,arguments)},mp=t.dynCall_iiiiiiji=function(){return(mp=t.dynCall_iiiiiiji=t.asm.uh).apply(null,arguments)},_p=t.dynCall_jijijjij=function(){return(_p=t.dynCall_jijijjij=t.asm.vh).apply(null,arguments)},bp=t.dynCall_vijjij=function(){return(bp=t.dynCall_vijjij=t.asm.wh).apply(null,arguments)},gp=t.dynCall_viijjj=function(){return(gp=t.dynCall_viijjj=t.asm.xh).apply(null,arguments)},vp=t.dynCall_jiiijj=function(){return(vp=t.dynCall_jiiijj=t.asm.yh).apply(null,arguments)},jp=t.dynCall_viijiiii=function(){return(jp=t.dynCall_viijiiii=t.asm.zh).apply(null,arguments)},wp=t.dynCall_iiijij=function(){return(wp=t.dynCall_iiijij=t.asm.Ah).apply(null,arguments)},Bp=t.dynCall_viiijiii=function(){return(Bp=t.dynCall_viiijiii=t.asm.Bh).apply(null,arguments)},Tp=t.dynCall_viijjji=function(){return(Tp=t.dynCall_viijjji=t.asm.Ch).apply(null,arguments)},Ip=t.dynCall_iiiiiij=function(){return(Ip=t.dynCall_iiiiiij=t.asm.Dh).apply(null,arguments)},Sp=t.dynCall_iiiiiiiiiiji=function(){return(Sp=t.dynCall_iiiiiiiiiiji=t.asm.Eh).apply(null,arguments)},Dp=t.dynCall_jiiiiiii=function(){return(Dp=t.dynCall_jiiiiiii=t.asm.Fh).apply(null,arguments)},Op=t.dynCall_iidj=function(){return(Op=t.dynCall_iidj=t.asm.Gh).apply(null,arguments)},Ap=t.dynCall_jiiijii=function(){return(Ap=t.dynCall_jiiijii=t.asm.Hh).apply(null,arguments)},Fp=t.dynCall_ijji=function(){return(Fp=t.dynCall_ijji=t.asm.Ih).apply(null,arguments)},Mp=t.dynCall_iiiiiiiij=function(){return(Mp=t.dynCall_iiiiiiiij=t.asm.Jh).apply(null,arguments)},Vp=t.dynCall_iiiiiiij=function(){return(Vp=t.dynCall_iiiiiiij=t.asm.Kh).apply(null,arguments)},Up=t.dynCall_iiiiiiiiiiiij=function(){return(Up=t.dynCall_iiiiiiiiiiiij=t.asm.Lh).apply(null,arguments)},Cp=t.dynCall_iiiiiiiji=function(){return(Cp=t.dynCall_iiiiiiiji=t.asm.Mh).apply(null,arguments)},Pp=t.dynCall_iiiidjj=function(){return(Pp=t.dynCall_iiiidjj=t.asm.Nh).apply(null,arguments)},kp=t.dynCall_jiiiii=function(){return(kp=t.dynCall_jiiiii=t.asm.Oh).apply(null,arguments)},Rp=t.dynCall_jiiiiiijii=function(){return(Rp=t.dynCall_jiiiiiijii=t.asm.Ph).apply(null,arguments)},Np=t.dynCall_iiiijji=function(){return(Np=t.dynCall_iiiijji=t.asm.Qh).apply(null,arguments)},xp=t.dynCall_jiiiiii=function(){return(xp=t.dynCall_jiiiiii=t.asm.Rh).apply(null,arguments)},Ep=t.dynCall_jiiiijii=function(){return(Ep=t.dynCall_jiiiijii=t.asm.Sh).apply(null,arguments)},Lp=t.dynCall_jiiiijiiiiiiii=function(){return(Lp=t.dynCall_jiiiijiiiiiiii=t.asm.Th).apply(null,arguments)},qp=t.dynCall_jiiiiijiiii=function(){return(qp=t.dynCall_jiiiiijiiii=t.asm.Uh).apply(null,arguments)},zp=t.dynCall_jiiijiii=function(){return(zp=t.dynCall_jiiijiii=t.asm.Vh).apply(null,arguments)},Wp=t.dynCall_fiijii=function(){return(Wp=t.dynCall_fiijii=t.asm.Wh).apply(null,arguments)},Hp=t.dynCall_diijii=function(){return(Hp=t.dynCall_diijii=t.asm.Xh).apply(null,arguments)},Yp=t.dynCall_vijijj=function(){return(Yp=t.dynCall_vijijj=t.asm.Yh).apply(null,arguments)},$p=t.dynCall_jf=function(){return($p=t.dynCall_jf=t.asm.Zh).apply(null,arguments)},Gp=t.dynCall_jd=function(){return(Gp=t.dynCall_jd=t.asm._h).apply(null,arguments)},Jp=t.dynCall_jiijiiiii=function(){return(Jp=t.dynCall_jiijiiiii=t.asm.$h).apply(null,arguments)},Kp=t.dynCall_jiijiijiii=function(){return(Kp=t.dynCall_jiijiijiii=t.asm.ai).apply(null,arguments)},Zp=t.dynCall_jiijjiii=function(){return(Zp=t.dynCall_jiijjiii=t.asm.bi).apply(null,arguments)},Xp=t.dynCall_iijiii=function(){return(Xp=t.dynCall_iijiii=t.asm.ci).apply(null,arguments)},Qp=t.dynCall_jiiiiji=function(){return(Qp=t.dynCall_jiiiiji=t.asm.di).apply(null,arguments)},ey=t.dynCall_vijiijj=function(){return(ey=t.dynCall_vijiijj=t.asm.ei).apply(null,arguments)},ty=t.dynCall_vifiijj=function(){return(ty=t.dynCall_vifiijj=t.asm.fi).apply(null,arguments)},ry=t.dynCall_vidiijj=function(){return(ry=t.dynCall_vidiijj=t.asm.gi).apply(null,arguments)},iy=t.dynCall_viiiiij=function(){return(iy=t.dynCall_viiiiij=t.asm.hi).apply(null,arguments)},ny=t.dynCall_ijj=function(){return(ny=t.dynCall_ijj=t.asm.ii).apply(null,arguments)},sy=t.dynCall_ijjiii=function(){return(sy=t.dynCall_ijjiii=t.asm.ji).apply(null,arguments)},oy=t.dynCall_viiiiijjji=function(){return(oy=t.dynCall_viiiiijjji=t.asm.ki).apply(null,arguments)},ay=t.dynCall_viijijj=function(){return(ay=t.dynCall_viijijj=t.asm.li).apply(null,arguments)},uy=t.dynCall_iiijiijj=function(){return(uy=t.dynCall_iiijiijj=t.asm.mi).apply(null,arguments)},cy=t.dynCall_viiijijjj=function(){return(cy=t.dynCall_viiijijjj=t.asm.ni).apply(null,arguments)},ly=t.dynCall_iijiijj=function(){return(ly=t.dynCall_iijiijj=t.asm.oi).apply(null,arguments)},dy=t.dynCall_viiijjjji=function(){return(dy=t.dynCall_viiijjjji=t.asm.pi).apply(null,arguments)},fy=t.dynCall_viiiijiii=function(){return(fy=t.dynCall_viiiijiii=t.asm.qi).apply(null,arguments)},hy=t.dynCall_iijii=function(){return(hy=t.dynCall_iijii=t.asm.ri).apply(null,arguments)},py=t.dynCall_vijjiiii=function(){return(py=t.dynCall_vijjiiii=t.asm.si).apply(null,arguments)},yy=t.dynCall_vijijjiiiii=function(){return(yy=t.dynCall_vijijjiiiii=t.asm.ti).apply(null,arguments)},my=t.dynCall_vijjiiiii=function(){return(my=t.dynCall_vijjiiiii=t.asm.ui).apply(null,arguments)},_y=t.dynCall_iiijjji=function(){return(_y=t.dynCall_iiijjji=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_viijiji=function(){return(By=t.dynCall_viijiji=t.asm.Bi).apply(null,arguments)};function iw(o){var a=B();try{H.get(o)()}catch(u){if(T(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function nw(o,a,u){var l=B();try{H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function sw(o,a){var u=B();try{return H.get(o)(a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function ow(o,a,u){var l=B();try{return H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function aw(o,a){var u=B();try{H.get(o)(a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function uw(o,a,u,l){var d=B();try{return H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function cw(o,a,u,l,d,f){var h=B();try{return H.get(o)(a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function lw(o,a,u,l,d){var f=B();try{H.get(o)(a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function dw(o,a,u,l,d){var f=B();try{return H.get(o)(a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function fw(o,a,u,l){var d=B();try{return H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function hw(o,a,u,l){var d=B();try{return H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function pw(o,a,u,l){var d=B();try{H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function yw(o,a,u,l){var d=B();try{H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function mw(o,a,u,l){var d=B();try{H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function _w(o){var a=B();try{return H.get(o)()}catch(u){if(T(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function bw(o,a,u,l,d,f,h,p){var y=B();try{return H.get(o)(a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function gw(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function vw(o,a,u,l,d,f,h,p){var y=B();try{H.get(o)(a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function jw(o,a,u,l,d,f,h){var p=B();try{return H.get(o)(a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function ww(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function Bw(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function Tw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=B();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(T(_e),Be!==Be+0&&Be!=="longjmp")throw Be;I(1,0)}}function Iw(o,a,u,l,d,f,h){var p=B();try{H.get(o)(a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function Sw(o,a,u,l,d,f){var h=B();try{return H.get(o)(a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function Dw(o,a,u,l,d,f,h,p,y){var m=B();try{H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function Ow(o,a){var u=B();try{return H.get(o)(a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function Aw(o,a,u,l,d,f){var h=B();try{H.get(o)(a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function Fw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$){var Ae=B();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$)}catch(ye){if(T(Ae),ye!==ye+0&&ye!=="longjmp")throw ye;I(1,0)}}function Mw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$,Ae){var ye=B();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$,Ae)}catch(at){if(T(ye),at!==at+0&&at!=="longjmp")throw at;I(1,0)}}function Vw(o,a,u){var l=B();try{H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Uw(o,a,u,l){var d=B();try{H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Cw(o,a,u,l){var d=B();try{H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Pw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=B();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(T(_e),Be!==Be+0&&Be!=="longjmp")throw Be;I(1,0)}}function kw(o,a,u,l,d){var f=B();try{return H.get(o)(a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function Rw(o,a,u){var l=B();try{H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Nw(o,a,u,l,d,f,h,p,y,m){var g=B();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function xw(o,a,u,l,d){var f=B();try{return H.get(o)(a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function Ew(o,a,u){var l=B();try{return H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Lw(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function qw(o,a,u,l,d,f,h,p,y){var m=B();try{return H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function zw(o,a){var u=B();try{return H.get(o)(a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function Ww(o,a,u,l,d,f){var h=B();try{H.get(o)(a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function Hw(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=B();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(T(x),ue!==ue+0&&ue!=="longjmp")throw ue;I(1,0)}}function Yw(o,a,u){var l=B();try{return H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function $w(o,a,u){var l=B();try{return H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Gw(o,a,u,l){var d=B();try{return H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Jw(o,a,u){var l=B();try{return H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Kw(o,a,u){var l=B();try{return H.get(o)(a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function Zw(o,a,u,l){var d=B();try{return H.get(o)(a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function Xw(o,a,u,l,d,f,h,p,y,m){var g=B();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function Qw(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function eB(o,a){var u=B();try{return H.get(o)(a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function tB(o,a){var u=B();try{return H.get(o)(a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function rB(o,a,u,l,d){var f=B();try{return df(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function iB(o,a,u,l,d,f,h){var p=B();try{vf(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function nB(o,a){var u=B();try{return mf(o,a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function sB(o,a,u){var l=B();try{return dh(o,a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function oB(o,a,u,l,d,f,h){var p=B();try{pf(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function aB(o,a,u,l,d,f,h){var p=B();try{return ff(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function uB(o,a,u,l,d,f,h,p,y){var m=B();try{return hf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function cB(o,a,u,l){var d=B();try{return _f(o,a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function lB(o,a,u,l,d,f){var h=B();try{wf(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function dB(o){var a=B();try{return yf(o)}catch(u){if(T(a),u!==u+0&&u!=="longjmp")throw u;I(1,0)}}function fB(o,a,u,l,d){var f=B();try{bf(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function hB(o,a,u,l,d,f,h,p){var y=B();try{Bf(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function pB(o,a,u,l,d,f,h){var p=B();try{return Tf(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function yB(o,a,u,l,d,f,h,p){var y=B();try{gf(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function mB(o,a,u,l){var d=B();try{Uf(o,a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function _B(o,a,u,l,d){var f=B();try{Df(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function bB(o,a,u,l,d){var f=B();try{return kf(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function gB(o,a,u,l,d,f){var h=B();try{return ah(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function vB(o,a,u,l,d,f,h,p){var y=B();try{return wp(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function jB(o,a,u,l,d,f){var h=B();try{return ch(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function wB(o,a,u,l,d,f){var h=B();try{return Wf(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function BB(o,a,u,l,d,f,h,p){var y=B();try{return pp(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function TB(o,a,u,l,d,f){var h=B();try{If(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function IB(o,a,u,l,d,f,h,p){var y=B();try{return Of(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function SB(o,a,u,l,d,f,h,p){var y=B();try{jf(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function DB(o,a,u,l,d,f,h,p,y){var m=B();try{Mf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function OB(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{Ff(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function AB(o,a,u,l,d,f,h,p,y,m){var g=B();try{Af(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function FB(o,a,u,l,d,f,h,p,y){var m=B();try{oh(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function MB(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{tp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function VB(o,a,u,l,d,f,h,p,y){var m=B();try{ih(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function UB(o,a,u,l,d,f,h,p,y){var m=B();try{return Vf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function CB(o,a,u,l,d,f,h){var p=B();try{Lf(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function PB(o,a,u,l){var d=B();try{return Cf(o,a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function kB(o,a,u,l,d,f){var h=B();try{return Pf(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function RB(o,a,u,l,d,f,h,p,y){var m=B();try{Ef(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function NB(o,a,u,l,d,f,h){var p=B();try{$f(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function xB(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{xf(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function EB(o,a,u,l,d,f){var h=B();try{return rh(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function LB(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{Nf(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function qB(o,a,u,l,d,f,h,p,y){var m=B();try{return zf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function zB(o,a,u,l,d,f,h,p,y){var m=B();try{qf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function WB(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=B();try{return Rf(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(T(ue),_e!==_e+0&&_e!=="longjmp")throw _e;I(1,0)}}function HB(o,a,u,l,d,f,h,p,y){var m=B();try{return Hf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function YB(o,a,u,l,d,f,h,p){var y=B();try{return Yf(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function $B(o,a,u,l,d,f,h,p){var y=B();try{Sf(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function GB(o,a,u,l,d,f){var h=B();try{Gf(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function JB(o,a,u,l,d,f,h,p,y){var m=B();try{Jf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function KB(o,a,u,l,d,f){var h=B();try{Kf(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function ZB(o,a,u,l,d,f,h){var p=B();try{return Xf(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function XB(o,a,u,l,d,f,h,p,y,m){var g=B();try{eh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function QB(o,a,u,l,d,f,h){var p=B();try{return Qf(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function eT(o,a,u,l,d,f,h,p,y,m){var g=B();try{th(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function tT(o,a,u,l,d,f,h,p,y){var m=B();try{return Zf(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function rT(o,a,u,l,d,f,h){var p=B();try{Vh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function iT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return Uh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function nT(o,a,u,l,d,f,h,p){var y=B();try{return uh(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function sT(o,a,u,l,d,f,h){var p=B();try{return lh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function oT(o,a,u,l){var d=B();try{return fh(o,a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function aT(o,a,u,l,d,f,h){var p=B();try{Bh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function uT(o,a,u,l,d,f,h,p){var y=B();try{Oh(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function cT(o,a,u,l,d,f,h,p){var y=B();try{return Ah(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function lT(o,a,u,l,d,f,h,p){var y=B();try{return gh(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function dT(o,a,u,l,d,f,h,p,y){var m=B();try{return vh(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function fT(o,a,u,l,d,f,h,p){var y=B();try{jh(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function hT(o,a,u,l,d,f,h,p,y){var m=B();try{return wh(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function pT(o,a,u,l,d,f,h,p,y){var m=B();try{return Th(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function yT(o,a,u,l,d,f,h,p,y,m){var g=B();try{return Ih(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function mT(o,a,u,l,d,f,h){var p=B();try{return Dh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function _T(o,a,u,l,d){var f=B();try{return Sh(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function bT(o,a,u,l,d,f,h,p,y){var m=B();try{_h(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function gT(o,a,u,l,d,f,h,p){var y=B();try{mh(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function vT(o,a,u,l,d,f,h,p,y,m){var g=B();try{bh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function jT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return hh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function wT(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{ph(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function BT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{yh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function TT(o,a,u,l,d,f,h){var p=B();try{Fh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function IT(o,a,u,l,d,f,h,p,y){var m=B();try{return Mh(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function ST(o,a,u,l){var d=B();try{return xh(o,a,u,l)}catch(f){if(T(d),f!==f+0&&f!=="longjmp")throw f;I(1,0)}}function DT(o,a,u,l,d){var f=B();try{return ny(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function OT(o,a,u,l,d,f,h,p){var y=B();try{return sy(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function AT(o,a,u){var l=B();try{return kh(o,a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function FT(o,a,u){var l=B();try{return Rh(o,a,u)}catch(d){if(T(l),d!==d+0&&d!=="longjmp")throw d;I(1,0)}}function MT(o,a,u,l,d){var f=B();try{return Hh(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function VT(o,a,u,l,d,f,h){var p=B();try{Lh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function UT(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=B();try{Ph(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(T(ue),_e!==_e+0&&_e!=="longjmp")throw _e;I(1,0)}}function CT(o,a,u,l,d){var f=B();try{return Nh(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function PT(o,a,u,l,d){var f=B();try{Eh(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function kT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{qh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function RT(o,a,u,l,d,f,h){var p=B();try{return Wh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function NT(o,a,u,l,d,f,h){var p=B();try{zh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function xT(o,a,u,l,d,f,h,p,y,m){var g=B();try{return Yh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function ET(o,a,u,l,d,f,h,p,y,m){var g=B();try{return $h(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function LT(o,a,u,l,d,f,h,p){var y=B();try{Gh(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function qT(o,a,u,l,d,f,h,p,y,m){var g=B();try{Jh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function zT(o,a,u,l,d,f,h,p,y,m){var g=B();try{Kh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function WT(o,a,u,l,d,f,h){var p=B();try{return Qh(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function HT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{Zh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function YT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{Xh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function $T(o,a,u,l,d,f,h,p){var y=B();try{return ep(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function GT(o,a,u,l,d,f,h,p,y){var m=B();try{rp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function JT(o,a,u,l,d){var f=B();try{return lf(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function KT(o,a,u,l,d,f,h,p,y){var m=B();try{return mp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function ZT(o,a,u,l,d,f,h,p,y,m){var g=B();try{sh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function XT(o,a,u,l,d,f,h,p,y,m){var g=B();try{return hp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function QT(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{ip(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function eI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{np(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function tI(o,a,u,l,d,f,h,p,y,m){var g=B();try{sp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function rI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{ap(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function iI(o,a,u,l,d,f,h,p,y,m){var g=B();try{return up(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function nI(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{cp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function sI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{lp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function oI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=B();try{dp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(T(_e),Be!==Be+0&&Be!=="longjmp")throw Be;I(1,0)}}function aI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be){var P=B();try{fp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be)}catch($){if(T(P),$!==$+0&&$!=="longjmp")throw $;I(1,0)}}function uI(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{op(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function cI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e){var Be=B();try{yp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e)}catch(P){if(T(Be),P!==P+0&&P!=="longjmp")throw P;I(1,0)}}function lI(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{return _p(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function dI(o,a,u,l,d,f,h,p,y){var m=B();try{bp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function fI(o,a,u,l,d,f,h,p,y){var m=B();try{gp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function hI(o,a,u,l,d,f,h,p){var y=B();try{return vp(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function pI(o,a,u,l,d,f,h,p,y){var m=B();try{jp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function yI(o,a,u,l,d,f,h,p,y){var m=B();try{Bp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function mI(o,a,u,l,d,f){var h=B();try{return kp(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function _I(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return Rp(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function bI(o,a,u,l,d,f,h,p,y){var m=B();try{return Np(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function gI(o,a,u,l,d,f,h){var p=B();try{return xp(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function vI(o,a,u,l,d,f){var h=B();try{return Fp(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function jI(o,a,u,l,d,f,h,p,y,m){var g=B();try{Tp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function wI(o,a,u,l,d,f,h,p,y,m){var g=B();try{return Mp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function BI(o,a,u,l,d,f,h,p){var y=B();try{return Ip(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function TI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{return Sp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function II(o,a,u,l,d,f,h,p){var y=B();try{return Dp(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function SI(o,a,u,l,d,f,h,p,y){var m=B();try{return Vp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function DI(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=B();try{return Up(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(T(x),ue!==ue+0&&ue!=="longjmp")throw ue;I(1,0)}}function OI(o,a,u,l,d){var f=B();try{return Op(o,a,u,l,d)}catch(h){if(T(f),h!==h+0&&h!=="longjmp")throw h;I(1,0)}}function AI(o,a,u,l,d,f,h,p){var y=B();try{return Ap(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function FI(o,a,u,l,d,f,h,p,y,m){var g=B();try{return Cp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function MI(o,a,u,l,d,f,h,p,y){var m=B();try{return Pp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function VI(o,a,u,l,d,f,h,p,y){var m=B();try{return Ep(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function UI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=B();try{return Lp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(T(ue),_e!==_e+0&&_e!=="longjmp")throw _e;I(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{return qp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function PI(o,a,u,l,d,f,h,p,y){var m=B();try{return zp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function kI(o,a,u,l,d,f,h,p,y){var m=B();try{Yp(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function RI(o,a){var u=B();try{return $p(o,a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function NI(o,a){var u=B();try{return Gp(o,a)}catch(l){if(T(u),l!==l+0&&l!=="longjmp")throw l;I(1,0)}}function xI(o,a,u,l,d,f,h,p,y,m){var g=B();try{return Jp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function EI(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{return Kp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function LI(o,a,u,l,d,f,h,p,y,m){var g=B();try{return Zp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function qI(o,a,u,l,d,f,h){var p=B();try{return Wp(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function zI(o,a,u,l,d,f,h){var p=B();try{return Hp(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function WI(o,a,u,l,d,f,h){var p=B();try{return Xp(o,a,u,l,d,f,h)}catch(y){if(T(p),y!==y+0&&y!=="longjmp")throw y;I(1,0)}}function HI(o,a,u,l,d,f,h,p){var y=B();try{return Qp(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function YI(o,a,u,l,d,f,h,p,y,m){var g=B();try{ey(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function $I(o,a,u,l,d,f,h,p,y){var m=B();try{ty(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function GI(o,a,u,l,d,f,h,p,y){var m=B();try{ry(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function JI(o,a,u,l,d,f,h,p){var y=B();try{iy(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function KI(o,a,u,l,d,f){var h=B();try{return Ch(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function ZI(o,a,u,l,d,f,h,p,y,m){var g=B();try{ay(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function XI(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return uy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function QI(o,a,u,l,d,f,h,p,y,m){var g=B();try{return ly(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{oy(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function tS(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{nh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function rS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{cy(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function iS(o,a,u,l,d,f,h,p,y,m){var g=B();try{return _y(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function nS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=B();try{dy(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(T(M),x!==x+0&&x!=="longjmp")throw x;I(1,0)}}function sS(o,a,u,l,d,f,h,p,y,m){var g=B();try{fy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function oS(o,a,u,l,d,f){var h=B();try{return hy(o,a,u,l,d,f)}catch(p){if(T(h),p!==p+0&&p!=="longjmp")throw p;I(1,0)}}function aS(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=B();try{yy(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(T(x),ue!==ue+0&&ue!=="longjmp")throw ue;I(1,0)}}function uS(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{my(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function cS(o,a,u,l,d,f,h,p,y,m){var g=B();try{py(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}function lS(o,a,u,l,d,f,h,p,y){var m=B();try{By(o,a,u,l,d,f,h,p,y)}catch(g){if(T(m),g!==g+0&&g!=="longjmp")throw g;I(1,0)}}function dS(o,a,u,l,d,f,h,p){var y=B();try{return gy(o,a,u,l,d,f,h,p)}catch(m){if(T(y),m!==m+0&&m!=="longjmp")throw m;I(1,0)}}function fS(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return vy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function hS(o,a,u,l,d,f,h,p,y,m,g){var j=B();try{return by(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(T(j),O!==O+0&&O!=="longjmp")throw O;I(1,0)}}function pS(o,a,u,l,d,f,h,p,y,m,g,j){var O=B();try{return jy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(T(O),M!==M+0&&M!=="longjmp")throw M;I(1,0)}}function yS(o,a,u,l,d,f,h,p,y,m){var g=B();try{return wy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(T(g),j!==j+0&&j!=="longjmp")throw j;I(1,0)}}t.ccall=Mv;var ro;function mu(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var mS=!1;ts=function o(){ro||_u(),ro||(ts=o)};function _S(o){var a=t._main,u=0,l=0;try{var d=a(u,l);bS(d,!0)}catch(h){if(h instanceof mu||h=="unwind")return;var f=h;h&&typeof h=="object"&&h.stack&&(f=[h,h.stack]),Pr("exception thrown: "+f),S(1,h)}finally{mS=!0}}function _u(o){if(o=o||v,ji>0||(Hv(),ji>0))return;function a(){ro||(ro=!0,t.calledRun=!0,!uu&&(Yv(),$v(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Ty&&_S(o),Jv()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=_u;function bS(o,a){Yd=o,nf()||(Gv(),t.onExit&&t.onExit(o),uu=!0),S(o,new mu(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var Ty=!0;return t.noInitialRun&&(Ty=!1),_u(),e.ready}}(),Bv=vU;var Wd=class extends ou{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,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){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL),e).then(i=>{t(i.instance,i.module)}):fetch(this.mainModuleURL).then(i=>i.arrayBuffer()).then(i=>WebAssembly.instantiate(i,e).then(n=>{t(n.instance,n.module)})).catch(i=>{console.error("Failed to instantiate WASM:",i)}),[]}};var Iv=class extends Wd{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return Bv({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var nt={fileInfoCache:new Map,getFileInfo(r,e){try{let t=nt.fileInfoCache.get(e);if(t)return t;let[i,n,s]=Se(r,"duckdb_web_fs_get_file_info",["number"],[e]);if(i!==je.SUCCESS)throw new Error(ve(r,n,s));let c=ve(r,n,s);He(r);let v=JSON.parse(c);if(v==null)return null;let w={...v,blob:null};return nt.fileInfoCache.set(e,w),w}catch(t){return We(r,t.toString()),null}},testPlatformFeature:(r,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(r,e)=>{try{nt.fileInfoCache.delete(e);let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.HTTP:{let i=new XMLHttpRequest;i.open("HEAD",t.data_url,!1),i.setRequestHeader("Range","bytes=0-"),i.send(null);let n=!1;if(i.status==206?n=!0:i.status==200&&(n=i.getResponseHeader("Accept-Ranges")==="bytes"),!n)return We(r,`File does not support range requests: ${t.file_name}`),0;break}case Qe.NATIVE:{if(!nt._files?.get(t.file_name))return We(r,`No handle available for file: ${t.file_name}`),0;break}}}catch(t){We(r,t.toString())}return 0},glob:(r,e,t)=>{try{let i=ve(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!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{We(r,`HEAD request failed: ${i}`);return}if(!s){We(r,`File does not support range requests: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return We(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=ve(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!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(i){return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=nt.getFileInfo(r,e);switch(nt.fileInfoCache.delete(e),t?.data_protocol){case Qe.HTTP:break;case Qe.NATIVE:return}},truncateFile:(r,e,t)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:We(r,"Cannot truncate a http file");return;case Qe.NATIVE:We(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){try{let s=nt.getFileInfo(r,e);switch(s?.data_protocol){case Qe.HTTP:{if(!s.data_url)return We(r,`Missing data URL for file ${e}`),0;let c=new XMLHttpRequest;if(c.open("GET",s.data_url,!1),c.responseType="arraybuffer",c.setRequestHeader("Range",`bytes=${n}-${n+i-1}`),c.send(null),c.status==206||c.status==200&&i==c.response.byteLength&&n==0){let v=new Uint8Array(c.response,0,Math.min(c.response.byteLength,i));return r.HEAPU8.set(v,t),v.byteLength}else return c.status==200?(We(r,`Range request for ${s.data_url} did not return a partial response: ${c.status} "${c.statusText}"`),0):(We(r,`Range request for ${s.data_url} did returned non-success status: ${c.status} "${c.statusText}"`),0)}case Qe.NATIVE:{let c=nt._files?.get(s.file_name);if(!c)return We(r,`No handle available for file: ${s.file_name}`),0;let v=c.slice(n,n+i),w=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return r.HEAPU8.set(w,t),w.byteLength}}return 0}catch(s){return We(r,s.toString()),0}},writeFile:(r,e,t,i,n)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:return We(r,"Cannot write to HTTP file"),0;case Qe.NATIVE:return We(r,"writefile not implemented"),0}return 0},getFileSize:(r,e)=>{try{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{let i=nt._files?.get(t.file_name);return i?i.size:(We(r,`No handle available for file: ${t.file_name}`),0)}case Qe.HTTP:{if(!t.data_url)throw new Error(`Missing data URL for file ${e}`);let i=new XMLHttpRequest;if(i.open("HEAD",t.data_url,!1),i.send(null),i.status==200){let n=i.getResponseHeader("Content-Length");if(n)return parseInt(n);throw Error(`HEAD ${t.data_url} does not contain the HTTP header: Content-Length`)}else throw Error(`HEAD ${t.data_url} returned non-success status: ${i.status} "${i.statusText}"`)}}return 0}catch(t){return We(r,t.toString()),0}},getLastFileModificationTime:(r,e)=>{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{if(!nt._files?.get(t.file_name))throw Error(`No handle available for file: ${t.file_name}`);return 0}case Qe.HTTP:return new Date().getTime()}return 0},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},removeDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,moveFile:(r,e,t,i,n)=>{},removeFile:(r,e,t)=>{}};return jU;})();
|
|
17
|
+
}`),this._dictionaries=[],this._recordBatches=[],super.close()}};dr.RecordBatchJSONWriter=Ia;function yl(r,e){let t=e;e instanceof ll.Table&&(t=e.chunks,r.reset(void 0,e.schema));for(let i of t)r.write(i);return r.finish()}async function ml(r,e){for await(let t of e)r.write(t);return r.finish()}function Ob({name:r,type:e,nullable:t}){let i=new eF.JSONTypeAssembler;return{name:r,nullable:t,type:i.visit(e),children:(e.children||[]).map(Ob),dictionary:XA.DataType.isDictionary(e)?{id:e.id,isOrdered:e.isOrdered,indexType:i.visit(e.indices)}:void 0}}function iF(r,e,t=!1){let i=new QA.Field(`${e}`,r.type,r.nullCount>0),n=Db.JSONVectorAssembler.assemble(new ZA.Column(i,[r]));return JSON.stringify({id:e,isDelta:t,data:{count:r.length,columns:n}},null,2)}function nF(r){return JSON.stringify({count:r.length,columns:Db.JSONVectorAssembler.assemble(r)},null,2)}});var gl=V(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.distributeVectorsIntoRecordBatches=hi.distributeColumnsIntoRecordBatches=hi.ensureSameLengthData=void 0;var Ab=qt(),_l=Ke(),sF=ci(),oF=Fr(),bl=new Uint8Array(0),Fb=r=>[bl,bl,new Uint8Array(r),bl];function aF(r,e,t=e.reduce((i,n)=>Math.max(i,n.length),0)){let i,n,s=-1,c=e.length,v=[...r.fields],I=[],S=(t+63&~63)>>3;for(;++s<c;)(i=e[s])&&i.length===t?I[s]=i:((n=v[s]).nullable||(v[s]=v[s].clone({nullable:!0})),I[s]=i?i._changeLengthAndBackfillNullBitmap(t):Ab.Data.new(n.type,0,t,t,Fb(S)));return[new _l.Schema(v),t,I]}hi.ensureSameLengthData=aF;function uF(r){return Mb(new _l.Schema(r.map(({field:e})=>e)),r)}hi.distributeColumnsIntoRecordBatches=uF;function Mb(r,e){return cF(r,e.map(t=>t instanceof sF.Chunked?t.chunks.map(i=>i.data):[t.data]))}hi.distributeVectorsIntoRecordBatches=Mb;function cF(r,e){let t=[...r.fields],i=[],n={numBatches:e.reduce((G,me)=>Math.max(G,me.length),0)},s=0,c=0,v=-1,I=e.length,S,U=[];for(;n.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,v=-1;++v<I;)U[v]=S=e[v].shift(),c=Math.min(c,S?S.length:c);isFinite(c)&&(U=lF(t,c,U,e,n),c>0&&(i[s++]=[c,U.slice()]))}return[r=new _l.Schema(t,r.metadata),i.map(G=>new oF.RecordBatch(r,...G))]}function lF(r,e,t,i,n){let s,c,v=0,I=-1,S=i.length,U=(e+63&~63)>>3;for(;++I<S;)(s=t[I])&&(v=s.length)>=e?v===e?t[I]=s:(t[I]=s.slice(0,e),s=s.slice(e,v-e),n.numBatches=Math.max(n.numBatches,i[I].unshift(s))):((c=r[I]).nullable||(r[I]=c.clone({nullable:!0})),t[I]=s?s._changeLengthAndBackfillNullBitmap(e):Ab.Data.new(c.type,0,e,e,Fb(U)));return t}});var xe=V(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.BaseVector=void 0;var dF=Te(),fF=ci(),hF=bs(),vl=Re(),jl=class extends vl.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`${dF.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 vl.Vector.new(e,t)}concat(...e){return fF.Chunked.concat(this,...e)}slice(e,t){return hF.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]=vl.Vector.new(this.data.childData[e]))}toJSON(){return[...this]}_sliceInternal(e,t,i){return e.clone(e.data.slice(t,i-t),null)}_bindDataAccessors(e){}};Da.BaseVector=jl;jl.prototype[Symbol.isConcatSpreadable]=!0});var wl=V(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.BinaryVector=void 0;var pF=Re(),yF=xe(),mF=be(),Vb=class extends yF.BaseVector{asUtf8(){return pF.Vector.new(this.data.clone(new mF.Utf8))}};Oa.BinaryVector=Vb});var Bl=V(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.BoolVector=void 0;var _F=be(),bF=xe(),gF=fr(),Ub=class extends bF.BaseVector{static from(e){return gF.vectorFromValuesWithType(()=>new _F.Bool,e)}};Aa.BoolVector=Ub});var Il=V(pi=>{"use strict";Object.defineProperty(pi,"__esModule",{value:!0});pi.DateMillisecondVector=pi.DateDayVector=pi.DateVector=void 0;var vF=Te(),jF=xe(),Cb=fr(),Tl=be(),Fa=class extends jF.BaseVector{static from(...e){return e.length===2?Cb.vectorFromValuesWithType(()=>e[1]===vF.DateUnit.DAY?new Tl.DateDay:new Tl.DateMillisecond,e[0]):Cb.vectorFromValuesWithType(()=>new Tl.DateMillisecond,e[0])}};pi.DateVector=Fa;var Pb=class extends Fa{};pi.DateDayVector=Pb;var kb=class extends Fa{};pi.DateMillisecondVector=kb});var Sl=V(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DecimalVector=void 0;var wF=xe(),Rb=class extends wF.BaseVector{};Ma.DecimalVector=Rb});var Ua=V(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.DictionaryVector=void 0;var BF=qt(),Nb=Re(),TF=xe(),IF=fr(),SF=be(),Dl=class extends TF.BaseVector{constructor(e){super(e);this.indices=Nb.Vector.new(e.clone(this.type.indices))}static from(...e){if(e.length===3){let[t,i,n]=e,s=new SF.Dictionary(t.type,i,null,null);return Nb.Vector.new(BF.Data.Dictionary(s,0,n.length,0,null,n,t))}return IF.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)}};Va.DictionaryVector=Dl;Dl.prototype.indices=null});var Ol=V(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.FixedSizeBinaryVector=void 0;var DF=xe(),xb=class extends DF.BaseVector{};Ca.FixedSizeBinaryVector=xb});var Al=V(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.FixedSizeListVector=void 0;var OF=xe(),Eb=class extends OF.BaseVector{};Pa.FixedSizeListVector=Eb});var Ul=V(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.Float64Vector=hr.Float32Vector=hr.Float16Vector=hr.FloatVector=void 0;var AF=qt(),FF=Re(),MF=xe(),VF=fr(),Wi=be(),Os=class extends MF.BaseVector{static from(e){let t=PF(this);if(e instanceof ArrayBuffer||ArrayBuffer.isView(e)){let i=CF(e.constructor)||t;if(t===null&&(t=i),t&&t===i){let n=new t,s=e.byteLength/n.ArrayType.BYTES_PER_ELEMENT;if(!UF(t,e.constructor))return FF.Vector.new(AF.Data.Float(n,0,s,0,null,e))}}if(t)return VF.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")}};hr.FloatVector=Os;var Fl=class extends Os{toFloat32Array(){return new Float32Array(this)}toFloat64Array(){return new Float64Array(this)}};hr.Float16Vector=Fl;var Ml=class extends Os{};hr.Float32Vector=Ml;var Vl=class extends Os{};hr.Float64Vector=Vl;var UF=(r,e)=>r===Wi.Float16&&e!==Uint16Array,CF=r=>{switch(r){case Uint16Array:return Wi.Float16;case Float32Array:return Wi.Float32;case Float64Array:return Wi.Float64;default:return null}},PF=r=>{switch(r){case Fl:return Wi.Float16;case Ml:return Wi.Float32;case Vl:return Wi.Float64;default:return null}}});var Cl=V(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.IntervalYearMonthVector=yi.IntervalDayTimeVector=yi.IntervalVector=void 0;var kF=xe(),ka=class extends kF.BaseVector{};yi.IntervalVector=ka;var Lb=class extends ka{};yi.IntervalDayTimeVector=Lb;var qb=class extends ka{};yi.IntervalYearMonthVector=qb});var Ra=V(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.Uint64Vector=ze.Uint32Vector=ze.Uint16Vector=ze.Uint8Vector=ze.Int64Vector=ze.Int32Vector=ze.Int16Vector=ze.Int8Vector=ze.IntVector=void 0;var RF=qt(),NF=Re(),xF=xe(),EF=fr(),zb=st(),Wb=Ye(),ke=be(),pr=class extends xF.BaseVector{static from(...e){let[t,i=!1]=e,n=zF(this,i);if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let s=qF(t.constructor,i)||n;if(n===null&&(n=s),n&&n===s){let c=new n,v=t.byteLength/c.ArrayType.BYTES_PER_ELEMENT;return LF(n,t.constructor)&&(v*=.5),NF.Vector.new(RF.Data.Int(c,0,v,0,null,t))}}if(n)return EF.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")}};ze.IntVector=pr;var Pl=class extends pr{};ze.Int8Vector=Pl;var kl=class extends pr{};ze.Int16Vector=kl;var Rl=class extends pr{};ze.Int32Vector=Rl;var Nl=class extends pr{toBigInt64Array(){return Wb.toBigInt64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigInt64Array())}};ze.Int64Vector=Nl;var xl=class extends pr{};ze.Uint8Vector=xl;var El=class extends pr{};ze.Uint16Vector=El;var Ll=class extends pr{};ze.Uint32Vector=Ll;var ql=class extends pr{toBigUint64Array(){return Wb.toBigUint64Array(this.values)}get values64(){return this._values64||(this._values64=this.toBigUint64Array())}};ze.Uint64Vector=ql;var LF=(r,e)=>(r===ke.Int64||r===ke.Uint64)&&(e===Int32Array||e===Uint32Array),qF=(r,e)=>{switch(r){case Int8Array:return ke.Int8;case Int16Array:return ke.Int16;case Int32Array:return e?ke.Int64:ke.Int32;case zb.BigInt64Array:return ke.Int64;case Uint8Array:return ke.Uint8;case Uint16Array:return ke.Uint16;case Uint32Array:return e?ke.Uint64:ke.Uint32;case zb.BigUint64Array:return ke.Uint64;default:return null}},zF=(r,e)=>{switch(r){case Pl:return ke.Int8;case kl:return ke.Int16;case Rl:return e?ke.Int64:ke.Int32;case Nl:return ke.Int64;case xl:return ke.Uint8;case El:return ke.Uint16;case Ll:return e?ke.Uint64:ke.Uint32;case ql:return ke.Uint64;default:return null}}});var zl=V(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.ListVector=void 0;var WF=xe(),Hb=class extends WF.BaseVector{};Na.ListVector=Hb});var Wl=V(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.MapVector=void 0;var HF=ms(),YF=Re(),$F=xe(),GF=be(),Yb=class extends $F.BaseVector{asList(){let e=this.type.children[0];return YF.Vector.new(this.data.clone(new GF.List(e)))}bind(e){let t=this.getChildAt(0),{[e]:i,[e+1]:n}=this.valueOffsets;return new HF.MapRow(t.slice(i,n))}};xa.MapVector=Yb});var Hl=V(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.NullVector=void 0;var JF=xe(),$b=class extends JF.BaseVector{};Ea.NullVector=$b});var Yl=V(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.StructVector=void 0;var KF=ms(),ZF=xe(),XF=Symbol.for("rowIndex"),Gb=class extends ZF.BaseVector{bind(e){let t=this._row||(this._row=new KF.StructRow(this)),i=Object.create(t);return i[XF]=e,i}};La.StructVector=Gb});var $l=V(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.TimestampNanosecondVector=Mt.TimestampMicrosecondVector=Mt.TimestampMillisecondVector=Mt.TimestampSecondVector=Mt.TimestampVector=void 0;var QF=xe(),Pn=class extends QF.BaseVector{};Mt.TimestampVector=Pn;var Jb=class extends Pn{};Mt.TimestampSecondVector=Jb;var Kb=class extends Pn{};Mt.TimestampMillisecondVector=Kb;var Zb=class extends Pn{};Mt.TimestampMicrosecondVector=Zb;var Xb=class extends Pn{};Mt.TimestampNanosecondVector=Xb});var Gl=V(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.TimeNanosecondVector=Vt.TimeMicrosecondVector=Vt.TimeMillisecondVector=Vt.TimeSecondVector=Vt.TimeVector=void 0;var eM=xe(),kn=class extends eM.BaseVector{};Vt.TimeVector=kn;var Qb=class extends kn{};Vt.TimeSecondVector=Qb;var eg=class extends kn{};Vt.TimeMillisecondVector=eg;var tg=class extends kn{};Vt.TimeMicrosecondVector=tg;var rg=class extends kn{};Vt.TimeNanosecondVector=rg});var Jl=V(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.SparseUnionVector=mi.DenseUnionVector=mi.UnionVector=void 0;var tM=xe(),qa=class extends tM.BaseVector{get typeIdToChildIndex(){return this.data.type.typeIdToChildIndex}};mi.UnionVector=qa;var ig=class extends qa{get valueOffsets(){return this.data.valueOffsets}};mi.DenseUnionVector=ig;var ng=class extends qa{};mi.SparseUnionVector=ng});var Kl=V(za=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});za.Utf8Vector=void 0;var rM=Re(),iM=xe(),sg=be(),nM=fr(),og=class extends iM.BaseVector{static from(e){return nM.vectorFromValuesWithType(()=>new sg.Utf8,e)}asBinary(){return rM.Vector.new(this.data.clone(new sg.Binary))}};za.Utf8Vector=og});var ag=V(_i=>{"use strict";Object.defineProperty(_i,"__esModule",{value:!0});_i.partial2=_i.partial1=_i.partial0=void 0;function sM(r){return function(){return r(this)}}_i.partial0=sM;function oM(r){return function(e){return r(this,e)}}_i.partial1=oM;function aM(r){return function(e,t){return r(this,e,t)}}_i.partial2=aM});var Ql=V(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.instance=Rn.GetVisitor=void 0;var Wa=ls(),uM=tt(),cM=Ti(),lM=os(),Ut=Te(),K=class extends uM.Visitor{};Rn.GetVisitor=K;var dM=(r,e)=>864e5*r[e],Zl=(r,e)=>4294967296*r[e+1]+(r[e]>>>0),fM=(r,e)=>4294967296*(r[e+1]/1e3)+(r[e]>>>0)/1e3,hM=(r,e)=>4294967296*(r[e+1]/1e6)+(r[e]>>>0)/1e6,ug=r=>new Date(r),pM=(r,e)=>ug(dM(r,e)),yM=(r,e)=>ug(Zl(r,e)),mM=(r,e)=>null,cg=(r,e,t)=>{let{[t]:i,[t+1]:n}=e;return i!=null&&n!=null?r.subarray(i,n):null},_M=({offset:r,values:e},t)=>{let i=r+t;return(e[i>>3]&1<<i%8)!=0},lg=({values:r},e)=>pM(r,e),dg=({values:r},e)=>yM(r,e*2),yr=({stride:r,values:e},t)=>e[r*t],fg=({stride:r,values:e},t)=>lM.uint16ToFloat64(e[r*t]),Xl=({stride:r,values:e,type:t},i)=>Wa.BN.new(e.subarray(r*i,r*(i+1)),t.isSigned),bM=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),gM=({values:r,valueOffsets:e},t)=>cg(r,e,t),vM=({values:r,valueOffsets:e},t)=>{let i=cg(r,e,t);return i!==null?cM.decodeUtf8(i):null},jM=(r,e)=>r.type.bitWidth<64?yr(r,e):Xl(r,e),wM=(r,e)=>r.type.precision!==Ut.Precision.HALF?yr(r,e):fg(r,e),BM=(r,e)=>r.type.unit===Ut.DateUnit.DAY?lg(r,e):dg(r,e),hg=({values:r},e)=>1e3*Zl(r,e*2),pg=({values:r},e)=>Zl(r,e*2),yg=({values:r},e)=>fM(r,e*2),mg=({values:r},e)=>hM(r,e*2),TM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return hg(r,e);case Ut.TimeUnit.MILLISECOND:return pg(r,e);case Ut.TimeUnit.MICROSECOND:return yg(r,e);case Ut.TimeUnit.NANOSECOND:return mg(r,e)}},_g=({values:r,stride:e},t)=>r[e*t],bg=({values:r,stride:e},t)=>r[e*t],gg=({values:r},e)=>Wa.BN.signed(r.subarray(2*e,2*(e+1))),vg=({values:r},e)=>Wa.BN.signed(r.subarray(2*e,2*(e+1))),IM=(r,e)=>{switch(r.type.unit){case Ut.TimeUnit.SECOND:return _g(r,e);case Ut.TimeUnit.MILLISECOND:return bg(r,e);case Ut.TimeUnit.MICROSECOND:return gg(r,e);case Ut.TimeUnit.NANOSECOND:return vg(r,e)}},SM=({values:r},e)=>Wa.BN.decimal(r.subarray(4*e,4*(e+1))),DM=(r,e)=>{let t=r.getChildAt(0),{valueOffsets:i,stride:n}=r;return t.slice(i[e*n],i[e*n+1])},OM=(r,e)=>r.bind(e),AM=(r,e)=>r.bind(e),FM=(r,e)=>r.type.mode===Ut.UnionMode.Dense?jg(r,e):wg(r,e),jg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(r.valueOffsets[e]):null},wg=(r,e)=>{let t=r.typeIdToChildIndex[r.typeIds[e]],i=r.getChildAt(t);return i?i.get(e):null},MM=(r,e)=>r.getValue(r.getKey(e)),VM=(r,e)=>r.type.unit===Ut.IntervalUnit.DAY_TIME?Bg(r,e):Tg(r,e),Bg=({values:r},e)=>r.subarray(2*e,2*(e+1)),Tg=({values:r},e)=>{let t=r[e],i=new Int32Array(2);return i[0]=t/12|0,i[1]=t%12|0,i},UM=(r,e)=>{let t=r.getChildAt(0),{stride:i}=r;return t.slice(e*i,(e+1)*i)};K.prototype.visitNull=mM;K.prototype.visitBool=_M;K.prototype.visitInt=jM;K.prototype.visitInt8=yr;K.prototype.visitInt16=yr;K.prototype.visitInt32=yr;K.prototype.visitInt64=Xl;K.prototype.visitUint8=yr;K.prototype.visitUint16=yr;K.prototype.visitUint32=yr;K.prototype.visitUint64=Xl;K.prototype.visitFloat=wM;K.prototype.visitFloat16=fg;K.prototype.visitFloat32=yr;K.prototype.visitFloat64=yr;K.prototype.visitUtf8=vM;K.prototype.visitBinary=gM;K.prototype.visitFixedSizeBinary=bM;K.prototype.visitDate=BM;K.prototype.visitDateDay=lg;K.prototype.visitDateMillisecond=dg;K.prototype.visitTimestamp=TM;K.prototype.visitTimestampSecond=hg;K.prototype.visitTimestampMillisecond=pg;K.prototype.visitTimestampMicrosecond=yg;K.prototype.visitTimestampNanosecond=mg;K.prototype.visitTime=IM;K.prototype.visitTimeSecond=_g;K.prototype.visitTimeMillisecond=bg;K.prototype.visitTimeMicrosecond=gg;K.prototype.visitTimeNanosecond=vg;K.prototype.visitDecimal=SM;K.prototype.visitList=DM;K.prototype.visitStruct=AM;K.prototype.visitUnion=FM;K.prototype.visitDenseUnion=jg;K.prototype.visitSparseUnion=wg;K.prototype.visitDictionary=MM;K.prototype.visitInterval=VM;K.prototype.visitIntervalDayTime=Bg;K.prototype.visitIntervalYearMonth=Tg;K.prototype.visitFixedSizeList=UM;K.prototype.visitMap=OM;Rn.instance=new K});var Og=V(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.instance=Nn.IndexOfVisitor=void 0;var CM=tt(),Ig=tr(),Sg=bs(),Z=class extends CM.Visitor{};Nn.IndexOfVisitor=Z;function PM(r,e){return e===null&&r.length>0?0:-1}function kM(r,e){let{nullBitmap:t}=r.data;if(!t||r.nullCount<=0)return-1;let i=0;for(let n of new Ig.BitIterator(t,r.data.offset+(e||0),r.length,t,Ig.getBool)){if(!n)return i;++i}return-1}function ce(r,e,t){if(e===void 0)return-1;if(e===null)return kM(r,t);let i=Sg.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}function Dg(r,e,t){let i=Sg.createElementComparator(e);for(let n=(t||0)-1,s=r.length;++n<s;)if(i(r.get(n)))return n;return-1}Z.prototype.visitNull=PM;Z.prototype.visitBool=ce;Z.prototype.visitInt=ce;Z.prototype.visitInt8=ce;Z.prototype.visitInt16=ce;Z.prototype.visitInt32=ce;Z.prototype.visitInt64=ce;Z.prototype.visitUint8=ce;Z.prototype.visitUint16=ce;Z.prototype.visitUint32=ce;Z.prototype.visitUint64=ce;Z.prototype.visitFloat=ce;Z.prototype.visitFloat16=ce;Z.prototype.visitFloat32=ce;Z.prototype.visitFloat64=ce;Z.prototype.visitUtf8=ce;Z.prototype.visitBinary=ce;Z.prototype.visitFixedSizeBinary=ce;Z.prototype.visitDate=ce;Z.prototype.visitDateDay=ce;Z.prototype.visitDateMillisecond=ce;Z.prototype.visitTimestamp=ce;Z.prototype.visitTimestampSecond=ce;Z.prototype.visitTimestampMillisecond=ce;Z.prototype.visitTimestampMicrosecond=ce;Z.prototype.visitTimestampNanosecond=ce;Z.prototype.visitTime=ce;Z.prototype.visitTimeSecond=ce;Z.prototype.visitTimeMillisecond=ce;Z.prototype.visitTimeMicrosecond=ce;Z.prototype.visitTimeNanosecond=ce;Z.prototype.visitDecimal=ce;Z.prototype.visitList=ce;Z.prototype.visitStruct=ce;Z.prototype.visitUnion=ce;Z.prototype.visitDenseUnion=Dg;Z.prototype.visitSparseUnion=Dg;Z.prototype.visitDictionary=ce;Z.prototype.visitInterval=ce;Z.prototype.visitIntervalDayTime=ce;Z.prototype.visitIntervalYearMonth=ce;Z.prototype.visitFixedSizeList=ce;Z.prototype.visitMap=ce;Nn.instance=new Z});var ed=V(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.instance=xn.IteratorVisitor=void 0;var Ha=Te(),RM=tt(),NM=tr(),Ag=Ql(),X=class extends RM.Visitor{};xn.IteratorVisitor=X;function xM(r){let e=Ag.instance.getVisitFn(r);return new NM.BitIterator(r.data.nullBitmap,r.data.offset,r.length,r,(t,i,n,s)=>(n&1<<s)!=0?e(t,i):null)}var Fg=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 se(r){if(r.nullCount>0)return xM(r);let{type:e,typeId:t,length:i}=r;return r.stride===1&&(t===Ha.Type.Timestamp||t===Ha.Type.Int&&e.bitWidth!==64||t===Ha.Type.Time&&e.bitWidth!==64||t===Ha.Type.Float&&e.precision>0)?r.data.values.subarray(0,i)[Symbol.iterator]():new Fg(r,Ag.instance.getVisitFn(r))}X.prototype.visitNull=se;X.prototype.visitBool=se;X.prototype.visitInt=se;X.prototype.visitInt8=se;X.prototype.visitInt16=se;X.prototype.visitInt32=se;X.prototype.visitInt64=se;X.prototype.visitUint8=se;X.prototype.visitUint16=se;X.prototype.visitUint32=se;X.prototype.visitUint64=se;X.prototype.visitFloat=se;X.prototype.visitFloat16=se;X.prototype.visitFloat32=se;X.prototype.visitFloat64=se;X.prototype.visitUtf8=se;X.prototype.visitBinary=se;X.prototype.visitFixedSizeBinary=se;X.prototype.visitDate=se;X.prototype.visitDateDay=se;X.prototype.visitDateMillisecond=se;X.prototype.visitTimestamp=se;X.prototype.visitTimestampSecond=se;X.prototype.visitTimestampMillisecond=se;X.prototype.visitTimestampMicrosecond=se;X.prototype.visitTimestampNanosecond=se;X.prototype.visitTime=se;X.prototype.visitTimeSecond=se;X.prototype.visitTimeMillisecond=se;X.prototype.visitTimeMicrosecond=se;X.prototype.visitTimeNanosecond=se;X.prototype.visitDecimal=se;X.prototype.visitList=se;X.prototype.visitStruct=se;X.prototype.visitUnion=se;X.prototype.visitDenseUnion=se;X.prototype.visitSparseUnion=se;X.prototype.visitDictionary=se;X.prototype.visitInterval=se;X.prototype.visitIntervalDayTime=se;X.prototype.visitIntervalYearMonth=se;X.prototype.visitFixedSizeList=se;X.prototype.visitMap=se;xn.instance=new X});var Mg=V(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.instance=En.ToArrayVisitor=void 0;var As=Te(),EM=tt(),LM=ed(),Q=class extends EM.Visitor{};En.ToArrayVisitor=Q;function oe(r){let{type:e,length:t,stride:i}=r;switch(e.typeId){case As.Type.Int:case As.Type.Float:case As.Type.Decimal:case As.Type.Time:case As.Type.Timestamp:return r.data.values.subarray(0,t*i)}return[...LM.instance.visit(r)]}Q.prototype.visitNull=oe;Q.prototype.visitBool=oe;Q.prototype.visitInt=oe;Q.prototype.visitInt8=oe;Q.prototype.visitInt16=oe;Q.prototype.visitInt32=oe;Q.prototype.visitInt64=oe;Q.prototype.visitUint8=oe;Q.prototype.visitUint16=oe;Q.prototype.visitUint32=oe;Q.prototype.visitUint64=oe;Q.prototype.visitFloat=oe;Q.prototype.visitFloat16=oe;Q.prototype.visitFloat32=oe;Q.prototype.visitFloat64=oe;Q.prototype.visitUtf8=oe;Q.prototype.visitBinary=oe;Q.prototype.visitFixedSizeBinary=oe;Q.prototype.visitDate=oe;Q.prototype.visitDateDay=oe;Q.prototype.visitDateMillisecond=oe;Q.prototype.visitTimestamp=oe;Q.prototype.visitTimestampSecond=oe;Q.prototype.visitTimestampMillisecond=oe;Q.prototype.visitTimestampMicrosecond=oe;Q.prototype.visitTimestampNanosecond=oe;Q.prototype.visitTime=oe;Q.prototype.visitTimeSecond=oe;Q.prototype.visitTimeMillisecond=oe;Q.prototype.visitTimeMicrosecond=oe;Q.prototype.visitTimeNanosecond=oe;Q.prototype.visitDecimal=oe;Q.prototype.visitList=oe;Q.prototype.visitStruct=oe;Q.prototype.visitUnion=oe;Q.prototype.visitDenseUnion=oe;Q.prototype.visitSparseUnion=oe;Q.prototype.visitDictionary=oe;Q.prototype.visitInterval=oe;Q.prototype.visitIntervalDayTime=oe;Q.prototype.visitIntervalYearMonth=oe;Q.prototype.visitFixedSizeList=oe;Q.prototype.visitMap=oe;En.instance=new Q});var Vg=V(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.instance=Ln.ByteWidthVisitor=void 0;var qM=tt(),zM=Te(),Fs=(r,e)=>r+e,td=r=>`Cannot compute the byte width of variable-width column ${r}`,rd=class extends qM.Visitor{visitNull(e){return 0}visitInt(e){return e.bitWidth/8}visitFloat(e){return e.ArrayType.BYTES_PER_ELEMENT}visitBinary(e){throw new Error(td(e))}visitUtf8(e){throw new Error(td(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===zM.TimeUnit.SECOND?4:8}visitInterval(e){return(e.unit+1)*4}visitList(e){throw new Error(td(e))}visitStruct(e){return this.visitFields(e.children).reduce(Fs,0)}visitUnion(e){return this.visitFields(e.children).reduce(Fs,0)}visitFixedSizeBinary(e){return e.byteWidth}visitFixedSizeList(e){return e.listSize*this.visitFields(e.children).reduce(Fs,0)}visitMap(e){return this.visitFields(e.children).reduce(Fs,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(Fs,0)}};Ln.ByteWidthVisitor=rd;Ln.instance=new rd});var Ug=V(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.instance=qn.GetVectorConstructor=void 0;var WM=tt(),HM=wl(),YM=Bl(),id=Il(),$M=Sl(),GM=Ua(),JM=Ol(),KM=Al(),Ya=Ul(),nd=Cl(),Mr=Ra(),ZM=zl(),XM=Wl(),QM=Hl(),eV=Yl(),Ms=$l(),Vs=Gl(),sd=Jl(),tV=Kl(),od=class extends WM.Visitor{visitNull(){return QM.NullVector}visitBool(){return YM.BoolVector}visitInt(){return Mr.IntVector}visitInt8(){return Mr.Int8Vector}visitInt16(){return Mr.Int16Vector}visitInt32(){return Mr.Int32Vector}visitInt64(){return Mr.Int64Vector}visitUint8(){return Mr.Uint8Vector}visitUint16(){return Mr.Uint16Vector}visitUint32(){return Mr.Uint32Vector}visitUint64(){return Mr.Uint64Vector}visitFloat(){return Ya.FloatVector}visitFloat16(){return Ya.Float16Vector}visitFloat32(){return Ya.Float32Vector}visitFloat64(){return Ya.Float64Vector}visitUtf8(){return tV.Utf8Vector}visitBinary(){return HM.BinaryVector}visitFixedSizeBinary(){return JM.FixedSizeBinaryVector}visitDate(){return id.DateVector}visitDateDay(){return id.DateDayVector}visitDateMillisecond(){return id.DateMillisecondVector}visitTimestamp(){return Ms.TimestampVector}visitTimestampSecond(){return Ms.TimestampSecondVector}visitTimestampMillisecond(){return Ms.TimestampMillisecondVector}visitTimestampMicrosecond(){return Ms.TimestampMicrosecondVector}visitTimestampNanosecond(){return Ms.TimestampNanosecondVector}visitTime(){return Vs.TimeVector}visitTimeSecond(){return Vs.TimeSecondVector}visitTimeMillisecond(){return Vs.TimeMillisecondVector}visitTimeMicrosecond(){return Vs.TimeMicrosecondVector}visitTimeNanosecond(){return Vs.TimeNanosecondVector}visitDecimal(){return $M.DecimalVector}visitList(){return ZM.ListVector}visitStruct(){return eV.StructVector}visitUnion(){return sd.UnionVector}visitDenseUnion(){return sd.DenseUnionVector}visitSparseUnion(){return sd.SparseUnionVector}visitDictionary(){return GM.DictionaryVector}visitInterval(){return nd.IntervalVector}visitIntervalDayTime(){return nd.IntervalDayTimeVector}visitIntervalYearMonth(){return nd.IntervalYearMonthVector}visitFixedSizeList(){return KM.FixedSizeListVector}visitMap(){return XM.MapVector}};qn.GetVectorConstructor=od;qn.instance=new od});var fr=V(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.vectorFromValuesWithType=C.StructRow=C.MapRow=C.Utf8Vector=C.SparseUnionVector=C.DenseUnionVector=C.UnionVector=C.TimeNanosecondVector=C.TimeMicrosecondVector=C.TimeMillisecondVector=C.TimeSecondVector=C.TimeVector=C.TimestampNanosecondVector=C.TimestampMicrosecondVector=C.TimestampMillisecondVector=C.TimestampSecondVector=C.TimestampVector=C.StructVector=C.NullVector=C.MapVector=C.ListVector=C.Uint64Vector=C.Uint32Vector=C.Uint16Vector=C.Uint8Vector=C.Int64Vector=C.Int32Vector=C.Int16Vector=C.Int8Vector=C.IntVector=C.IntervalYearMonthVector=C.IntervalDayTimeVector=C.IntervalVector=C.Float64Vector=C.Float32Vector=C.Float16Vector=C.FloatVector=C.FixedSizeListVector=C.FixedSizeBinaryVector=C.DictionaryVector=C.DecimalVector=C.DateMillisecondVector=C.DateDayVector=C.DateVector=C.Chunked=C.BoolVector=C.BinaryVector=C.BaseVector=C.Vector=void 0;var rV=Re();Object.defineProperty(C,"Vector",{enumerable:!0,get:function(){return rV.Vector}});var iV=xe();Object.defineProperty(C,"BaseVector",{enumerable:!0,get:function(){return iV.BaseVector}});var nV=wl();Object.defineProperty(C,"BinaryVector",{enumerable:!0,get:function(){return nV.BinaryVector}});var sV=Bl();Object.defineProperty(C,"BoolVector",{enumerable:!0,get:function(){return sV.BoolVector}});var oV=ci();Object.defineProperty(C,"Chunked",{enumerable:!0,get:function(){return oV.Chunked}});var ad=Il();Object.defineProperty(C,"DateVector",{enumerable:!0,get:function(){return ad.DateVector}});Object.defineProperty(C,"DateDayVector",{enumerable:!0,get:function(){return ad.DateDayVector}});Object.defineProperty(C,"DateMillisecondVector",{enumerable:!0,get:function(){return ad.DateMillisecondVector}});var aV=Sl();Object.defineProperty(C,"DecimalVector",{enumerable:!0,get:function(){return aV.DecimalVector}});var uV=Ua();Object.defineProperty(C,"DictionaryVector",{enumerable:!0,get:function(){return uV.DictionaryVector}});var cV=Ol();Object.defineProperty(C,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return cV.FixedSizeBinaryVector}});var lV=Al();Object.defineProperty(C,"FixedSizeListVector",{enumerable:!0,get:function(){return lV.FixedSizeListVector}});var $a=Ul();Object.defineProperty(C,"FloatVector",{enumerable:!0,get:function(){return $a.FloatVector}});Object.defineProperty(C,"Float16Vector",{enumerable:!0,get:function(){return $a.Float16Vector}});Object.defineProperty(C,"Float32Vector",{enumerable:!0,get:function(){return $a.Float32Vector}});Object.defineProperty(C,"Float64Vector",{enumerable:!0,get:function(){return $a.Float64Vector}});var ud=Cl();Object.defineProperty(C,"IntervalVector",{enumerable:!0,get:function(){return ud.IntervalVector}});Object.defineProperty(C,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ud.IntervalDayTimeVector}});Object.defineProperty(C,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ud.IntervalYearMonthVector}});var Vr=Ra();Object.defineProperty(C,"IntVector",{enumerable:!0,get:function(){return Vr.IntVector}});Object.defineProperty(C,"Int8Vector",{enumerable:!0,get:function(){return Vr.Int8Vector}});Object.defineProperty(C,"Int16Vector",{enumerable:!0,get:function(){return Vr.Int16Vector}});Object.defineProperty(C,"Int32Vector",{enumerable:!0,get:function(){return Vr.Int32Vector}});Object.defineProperty(C,"Int64Vector",{enumerable:!0,get:function(){return Vr.Int64Vector}});Object.defineProperty(C,"Uint8Vector",{enumerable:!0,get:function(){return Vr.Uint8Vector}});Object.defineProperty(C,"Uint16Vector",{enumerable:!0,get:function(){return Vr.Uint16Vector}});Object.defineProperty(C,"Uint32Vector",{enumerable:!0,get:function(){return Vr.Uint32Vector}});Object.defineProperty(C,"Uint64Vector",{enumerable:!0,get:function(){return Vr.Uint64Vector}});var dV=zl();Object.defineProperty(C,"ListVector",{enumerable:!0,get:function(){return dV.ListVector}});var fV=Wl();Object.defineProperty(C,"MapVector",{enumerable:!0,get:function(){return fV.MapVector}});var hV=Hl();Object.defineProperty(C,"NullVector",{enumerable:!0,get:function(){return hV.NullVector}});var pV=Yl();Object.defineProperty(C,"StructVector",{enumerable:!0,get:function(){return pV.StructVector}});var Us=$l();Object.defineProperty(C,"TimestampVector",{enumerable:!0,get:function(){return Us.TimestampVector}});Object.defineProperty(C,"TimestampSecondVector",{enumerable:!0,get:function(){return Us.TimestampSecondVector}});Object.defineProperty(C,"TimestampMillisecondVector",{enumerable:!0,get:function(){return Us.TimestampMillisecondVector}});Object.defineProperty(C,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return Us.TimestampMicrosecondVector}});Object.defineProperty(C,"TimestampNanosecondVector",{enumerable:!0,get:function(){return Us.TimestampNanosecondVector}});var Cs=Gl();Object.defineProperty(C,"TimeVector",{enumerable:!0,get:function(){return Cs.TimeVector}});Object.defineProperty(C,"TimeSecondVector",{enumerable:!0,get:function(){return Cs.TimeSecondVector}});Object.defineProperty(C,"TimeMillisecondVector",{enumerable:!0,get:function(){return Cs.TimeMillisecondVector}});Object.defineProperty(C,"TimeMicrosecondVector",{enumerable:!0,get:function(){return Cs.TimeMicrosecondVector}});Object.defineProperty(C,"TimeNanosecondVector",{enumerable:!0,get:function(){return Cs.TimeNanosecondVector}});var cd=Jl();Object.defineProperty(C,"UnionVector",{enumerable:!0,get:function(){return cd.UnionVector}});Object.defineProperty(C,"DenseUnionVector",{enumerable:!0,get:function(){return cd.DenseUnionVector}});Object.defineProperty(C,"SparseUnionVector",{enumerable:!0,get:function(){return cd.SparseUnionVector}});var yV=Kl();Object.defineProperty(C,"Utf8Vector",{enumerable:!0,get:function(){return yV.Utf8Vector}});var Cg=ms();Object.defineProperty(C,"MapRow",{enumerable:!0,get:function(){return Cg.MapRow}});Object.defineProperty(C,"StructRow",{enumerable:!0,get:function(){return Cg.StructRow}});var Ps=ag(),ld=Te(),zn=Re(),Pg=ci(),Hi=xe(),mV=tr(),Ga=st(),kg=Ue(),Rg=Ql(),Ng=Sc(),xg=Og(),Eg=Mg(),Lg=ed(),qg=Vg(),zg=Ug();zn.Vector.new=_V;zn.Vector.from=gV;function _V(r,...e){return new(zg.instance.getVisitFn(r)())(r,...e)}function bV(r,e){if(Ga.isIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});if(Ga.isAsyncIterable(e))return zn.Vector.from({nullValues:[null,void 0],type:r(),values:e});let{values:t=[],type:i=r(),nullValues:n=[null,void 0]}={...e};return Ga.isIterable(t)?zn.Vector.from({nullValues:n,...e,type:i}):zn.Vector.from({nullValues:n,...e,type:i})}C.vectorFromValuesWithType=bV;function gV(r){let{values:e=[],...t}={nullValues:[null,void 0],...r};if(Ga.isIterable(e)){let i=[...kg.Builder.throughIterable(t)(e)];return i.length===1?i[0]:Pg.Chunked.concat(i)}return(async i=>{let n=kg.Builder.throughAsyncIterable(t);for await(let s of n(e))i.push(s);return i.length===1?i[0]:Pg.Chunked.concat(i)})([])}Hi.BaseVector.prototype.get=function(e){return Rg.instance.visit(this,e)};Hi.BaseVector.prototype.set=function(e,t){return Ng.instance.visit(this,e,t)};Hi.BaseVector.prototype.indexOf=function(e,t){return xg.instance.visit(this,e,t)};Hi.BaseVector.prototype.toArray=function(){return Eg.instance.visit(this)};Hi.BaseVector.prototype.getByteWidth=function(){return qg.instance.visit(this.type)};Hi.BaseVector.prototype[Symbol.iterator]=function(){return Lg.instance.visit(this)};Hi.BaseVector.prototype._bindDataAccessors=BV;Object.keys(ld.Type).map(r=>ld.Type[r]).filter(r=>typeof r=="number").filter(r=>r!==ld.Type.NONE).forEach(r=>{let e=zg.instance.visit(r);e.prototype.get=Ps.partial1(Rg.instance.getVisitFn(r)),e.prototype.set=Ps.partial2(Ng.instance.getVisitFn(r)),e.prototype.indexOf=Ps.partial2(xg.instance.getVisitFn(r)),e.prototype.toArray=Ps.partial0(Eg.instance.getVisitFn(r)),e.prototype.getByteWidth=vV(qg.instance.getVisitFn(r)),e.prototype[Symbol.iterator]=Ps.partial0(Lg.instance.getVisitFn(r))});function vV(r){return function(){return r(this.type)}}function jV(r){return function(e){return this.isValid(e)?r.call(this,e):null}}function wV(r){return function(e,t){mV.setBool(this.nullBitmap,this.offset+e,t!=null)&&r.call(this,e,t)}}function BV(){let r=this.nullBitmap;r&&r.byteLength>0&&(this.get=jV(this.get),this.set=wV(this.set))}});var Ds=V(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.Table=void 0;var TV=An(),Wg=Ke(),dd=Fr(),IV=ks(),fd=be(),Hg=On(),hd=st(),Yg=Sa(),$g=gl(),pd=fr(),Xe=class extends pd.Chunked{constructor(...e){let t=null;e[0]instanceof Wg.Schema&&(t=e.shift());let i=Hg.selectArgs(dd.RecordBatch,e);if(!t&&!(t=i[0]&&i[0].schema))throw new TypeError("Table must be initialized with a Schema or at least one RecordBatch");i[0]||(i[0]=new dd._InternalEmptyPlaceholderRecordBatch(t));super(new fd.Struct(t.fields),i);this._schema=t,this._chunks=i}static empty(e=new Wg.Schema([])){return new Xe(e,[])}static from(e){if(!e)return Xe.empty();if(typeof e=="object"){let i=hd.isIterable(e.values)?SV(e):hd.isAsyncIterable(e.values)?DV(e):null;if(i!==null)return i}let t=IV.RecordBatchReader.from(e);return hd.isPromise(t)?(async()=>await Xe.from(await t))():t.isSync()&&(t=t.open())?t.schema?new Xe(t.schema,[...t]):Xe.empty():(async i=>{let n=await i,s=n.schema,c=[];if(s){for await(let v of n)c.push(v);return new Xe(s,c)}return Xe.empty()})(t.open())}static async fromAsync(e){return await Xe.from(e)}static fromStruct(e){return Xe.new(e.data.childData,e.type.children)}static new(...e){return new Xe(...$g.distributeColumnsIntoRecordBatches(Hg.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 Xe(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,i,n=this._schema.fields,s=this._children||(this._children=[]);if(i=s[e])return i;if(t=n[e]){let c=this._chunks.map(v=>v.getChildAt(e)).filter(v=>v!=null);if(c.length>0)return s[e]=new TV.Column(t,c)}return null}serialize(e="binary",t=!0){return(t?Yg.RecordBatchStreamWriter:Yg.RecordBatchFileWriter).writeAll(this).toUint8Array(!0)}count(){return this._length}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e);return new Xe(t,this._chunks.map(({length:i,data:{childData:n}})=>new dd.RecordBatch(t,i,e.map(s=>n[s]).filter(Boolean))))}assign(e){let t=this._schema.fields,[i,n]=e.schema.fields.reduce((v,I,S)=>{let[U,G]=v,me=t.findIndex(fe=>fe.name===I.name);return~me?G[me]=S:U.push(S),v},[[],[]]),s=this._schema.assign(e.schema),c=[...t.map((v,I,S,U=n[I])=>U===void 0?this.getColumnAt(I):e.getColumnAt(U)),...i.map(v=>e.getColumnAt(v))].filter(Boolean);return new Xe(...$g.distributeVectorsIntoRecordBatches(s,c))}};Ja.Table=Xe;function SV(r){let{type:e}=r;return e instanceof fd.Struct?Xe.fromStruct(pd.StructVector.from(r)):null}function DV(r){let{type:e}=r;return e instanceof fd.Struct?pd.StructVector.from(r).then(t=>Xe.fromStruct(t)):null}});var Fr=V(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn._InternalEmptyPlaceholderRecordBatch=Wn.RecordBatch=void 0;var yd=qt(),md=Ds(),OV=Re(),AV=tt(),FV=Ke(),MV=st(),VV=ci(),UV=On(),_d=be(),CV=gl(),PV=fr(),bi=class extends PV.StructVector{constructor(...e){let t,i=e[0],n;if(e[1]instanceof yd.Data)[,t,n]=e;else{let s=i.fields,[,c,v]=e;t=yd.Data.Struct(new _d.Struct(s),0,c,0,null,v)}super(t,n);this._schema=i}static from(e){return MV.isIterable(e.values),md.Table.from(e)}static new(...e){let[t,i]=UV.selectFieldArgs(e),n=i.filter(s=>s instanceof OV.Vector);return new bi(...CV.ensureSameLengthData(new FV.Schema(t),n.map(s=>s.data)))}clone(e,t=this._children){return new bi(this._schema,e,t)}concat(...e){let t=this._schema,i=VV.Chunked.flatten(this,...e);return new md.Table(t,i.map(({data:n})=>new bi(t,n)))}get schema(){return this._schema}get numCols(){return this._schema.fields.length}get dictionaries(){return this._dictionaries||(this._dictionaries=Ka.collect(this))}select(...e){let t=this._schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(...e.map(i=>t.get(i)).filter(i=>i>-1))}selectAt(...e){let t=this._schema.selectAt(...e),i=e.map(n=>this.data.childData[n]).filter(Boolean);return new bi(t,this.length,i)}};Wn.RecordBatch=bi;var Gg=class extends bi{constructor(e){super(e,0,e.fields.map(t=>yd.Data.new(t.type,0,0,0)))}};Wn._InternalEmptyPlaceholderRecordBatch=Gg;var Ka=class extends AV.Visitor{constructor(){super(...arguments);this.dictionaries=new Map}static collect(e){return new Ka().visit(e.data,new _d.Struct(e.schema.fields)).dictionaries}visit(e,t){return _d.DataType.isDictionary(t)?this.visitDictionary(e,t):(e.childData.forEach((i,n)=>this.visit(i,t.children[n].type)),this)}visitDictionary(e,t){let i=e.dictionary;return i&&i.length>0&&this.dictionaries.set(t.id,i),this}}});var ks=V(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.AsyncRecordBatchFileReader=kt.RecordBatchFileReader=kt.AsyncRecordBatchStreamReader=kt.RecordBatchStreamReader=kt.RecordBatchReader=void 0;var Jg=Re(),Za=Te(),Kg=Rc(),Zg=ns(),Xg=si(),Rs=Ec(),Qg=M_(),bd=Fr(),Yi=rn(),Ct=ya(),Pt=st(),mr=class extends Yi.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 Pt.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 Zg.default.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Zg.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 mr?e:Pt.isArrowJSON(e)?kV(e):Pt.isFileHandle(e)?xV(e):Pt.isPromise(e)?(async()=>await mr.from(await e))():Pt.isFetchResponse(e)||Pt.isReadableDOMStream(e)||Pt.isReadableNodeStream(e)||Pt.isAsyncIterable(e)?NV(new Xg.AsyncByteStream(e)):RV(new Xg.ByteStream(e))}static readAll(e){return e instanceof mr?e.isSync()?iv(e):nv(e):Pt.isArrowJSON(e)||ArrayBuffer.isView(e)||Pt.isIterable(e)||Pt.isIteratorResult(e)?iv(e):nv(e)}};kt.RecordBatchReader=mr;var Hn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){return this._impl[Symbol.iterator]()}async*[Symbol.asyncIterator](){yield*this[Symbol.iterator]()}};kt.RecordBatchStreamReader=Hn;var Yn=class extends mr{constructor(e){super(e);this._impl=e}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}};kt.AsyncRecordBatchStreamReader=Yn;var Xa=class extends Hn{constructor(e){super(e);this._impl=e}};kt.RecordBatchFileReader=Xa;var gd=class extends Yn{constructor(e){super(e);this._impl=e}};kt.AsyncRecordBatchFileReader=gd;var vd=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 bd.RecordBatch(this.schema,e.length,this._loadVectors(e,t,this.schema.fields))}_loadDictionaryBatch(e,t){let{id:i,isDelta:n,data:s}=e,{dictionaries:c,schema:v}=this,I=c.get(i);if(n||!I){let S=v.dictionaries.get(i);return I&&n?I.concat(Jg.Vector.new(this._loadVectors(s,t,[S])[0])):Jg.Vector.new(this._loadVectors(s,t,[S])[0])}return I}_loadVectors(e,t,i){return new Qg.VectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}},Ns=class extends vd{constructor(e,t){super(t);this._reader=Pt.isArrowJSON(e)?new Ct.JSONMessageReader(this._handle=e):new Ct.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=rv(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):Yi.ITERATOR_DONE}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Yi.ITERATOR_DONE}next(){if(this.closed)return Yi.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 i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new bd._InternalEmptyPlaceholderRecordBatch(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},xs=class extends vd{constructor(e,t){super(t);this._reader=new Ct.AsyncMessageReader(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}async cancel(){!this.closed&&(this.closed=!0)&&(await this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}async open(e){return this.closed||(this.autoDestroy=rv(this,e),this.schema||(this.schema=await this._reader.readSchema())||await this.cancel()),this}async throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.throw(e):Yi.ITERATOR_DONE}async return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?await this.reset()._reader.return(e):Yi.ITERATOR_DONE}async next(){if(this.closed)return Yi.ITERATOR_DONE;let e,{_reader:t}=this;for(;e=await this._readNextMessageAndValidate();)if(e.isSchema())await this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),s=this._loadRecordBatch(i,n);return{done:!1,value:s}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let i=e.header(),n=await t.readMessageBody(e.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new bd._InternalEmptyPlaceholderRecordBatch(this.schema)}):await this.return()}async _readNextMessageAndValidate(e){return await this._reader.readMessage(e)}},jd=class extends Ns{constructor(e,t){super(e instanceof Rs.RandomAccessFile?e:new Rs.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 i=this._reader.readMessage(Za.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=this._reader.readMessageBody(i.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 i=this._reader.readMessage(Za.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-Ct.magicAndPadding,i=e.readInt32(t),n=e.readAt(t-i,i);return Kg.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}},ev=class extends xs{constructor(e,...t){let i=typeof t[0]!="number"?t.shift():void 0,n=t[0]instanceof Map?t.shift():void 0;super(e instanceof Rs.AsyncRandomAccessFile?e:new Rs.AsyncRandomAccessFile(e,i),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}async open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=await this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&await this._readDictionaryBatch(this._dictionaryIndex++)}return await super.open(e)}async readRecordBatch(e){if(this.closed)return null;this._footer||await this.open();let t=this._footer&&this._footer.getRecordBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Za.MessageHeader.RecordBatch);if(i&&i.isRecordBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(n,s)}}return null}async _readDictionaryBatch(e){let t=this._footer&&this._footer.getDictionaryBatch(e);if(t&&await this._handle.seek(t.offset)){let i=await this._reader.readMessage(Za.MessageHeader.DictionaryBatch);if(i&&i.isDictionaryBatch()){let n=i.header(),s=await this._reader.readMessageBody(i.bodyLength),c=this._loadDictionaryBatch(n,s);this.dictionaries.set(n.id,c)}}}async _readFooter(){let{_handle:e}=this;e._pending&&await e._pending;let t=e.size-Ct.magicAndPadding,i=await e.readInt32(t),n=await e.readAt(t-i,i);return Kg.Footer.decode(n)}async _readNextMessageAndValidate(e){if(this._footer||await this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){let t=this._footer.getRecordBatch(this._recordBatchIndex);if(t&&await this._handle.seek(t.offset))return await this._reader.readMessage(e)}return null}},tv=class extends Ns{constructor(e,t){super(e,t)}_loadVectors(e,t,i){return new Qg.JSONVectorLoader(t,e.nodes,e.buffers,this.dictionaries).visitMany(i)}};function rv(r,e){return e&&typeof e.autoDestroy=="boolean"?e.autoDestroy:r.autoDestroy}function*iv(r){let e=mr.from(r);try{if(!e.open({autoDestroy:!1}).closed)do yield e;while(!e.reset().open().closed)}finally{e.cancel()}}async function*nv(r){let e=await mr.from(r);try{if(!(await e.open({autoDestroy:!1})).closed)do yield e;while(!(await e.reset().open()).closed)}finally{await e.cancel()}}function kV(r){return new Hn(new tv(r))}function RV(r){let e=r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new Xa(new jd(r.read())):new Hn(new Ns(r)):new Hn(new Ns(function*(){}()))}async function NV(r){let e=await r.peek(Ct.magicLength+7&~7);return e&&e.byteLength>=4?Ct.checkForMagicArrowString(e)?new Xa(new jd(await r.read())):new Yn(new xs(r)):new Yn(new xs(async function*(){}()))}async function xV(r){let{size:e}=await r.stat(),t=new Rs.AsyncRandomAccessFile(r,e);return e>=Ct.magicX2AndPadding&&Ct.checkForMagicArrowString(await t.readAt(0,Ct.magicLength+7&~7))?new gd(new ev(t)):new Yn(new xs(t))}});var av=V(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.toDOMStream=void 0;var sv=Ye(),ov=st();function EV(r,e){if(ov.isAsyncIterable(r))return qV(r,e);if(ov.isIterable(r))return LV(r,e);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}Qa.toDOMStream=EV;function LV(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,start(c){s(c,t||(t=r[Symbol.iterator]()))},pull(c){t?s(c,t):c.close()},cancel(){(t&&t.return&&t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});function s(c,v){let I,S=null,U=c.desiredSize||null;for(;!(S=v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(I=sv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-I.byteLength+1),S.value=I),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}function qV(r,e){let t=null,i=e&&e.type==="bytes"||!1,n=e&&e.highWaterMark||2**24;return new ReadableStream({...e,async start(c){await s(c,t||(t=r[Symbol.asyncIterator]()))},async pull(c){t?await s(c,t):c.close()},async cancel(){(t&&t.return&&await t.return()||!0)&&(t=null)}},{highWaterMark:i?n:void 0,...e});async function s(c,v){let I,S=null,U=c.desiredSize||null;for(;!(S=await v.next(i?U:null)).done;)if(ArrayBuffer.isView(S.value)&&(I=sv.toUint8Array(S.value))&&(U!=null&&i&&(U=U-I.byteLength+1),S.value=I),c.enqueue(S.value),U!=null&&--U<=0)return;c.close()}}});var lv=V($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.BuilderTransform=$n.builderThroughDOMStream=void 0;var zV=ta();function WV(r){return new wd(r)}$n.builderThroughDOMStream=WV;var wd=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:i,["queueingStrategy"]:n="count",...s}=e;this._controller=null,this._builder=zV.Builder.new(s),this._getSize=n!=="bytes"?uv:cv;let{["highWaterMark"]:c=n==="bytes"?2**14:1e3}={...t},{["highWaterMark"]:v=n==="bytes"?2**14:1e3}={...i};this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:I=>{this._maybeFlush(this._builder,this._controller=I)},start:I=>{this._maybeFlush(this._builder,this._controller=I)}},{highWaterMark:c,size:n!=="bytes"?uv:cv}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:v,size:I=>this._writeValueAndReturnChunkSize(I)})}_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)}};$n.BuilderTransform=wd;var uv=r=>r.length,cv=r=>r.byteLength});var dv=V(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.recordBatchReaderThroughDOMStream=void 0;var HV=si(),YV=ks();function $V(r,e){let t=new HV.AsyncByteQueue,i=null,n=new ReadableStream({async cancel(){await t.close()},async start(v){await c(v,i||(i=await s()))},async pull(v){i?await c(v,i):v.close()}});return{writable:new WritableStream(t,{highWaterMark:2**14,...r}),readable:n};async function s(){return await(await YV.RecordBatchReader.from(t)).open(e)}async function c(v,I){let S=v.desiredSize,U=null;for(;!(U=await I.next()).done;)if(v.enqueue(U.value),S!=null&&--S<=0)return;v.close()}}eu.recordBatchReaderThroughDOMStream=$V});var fv=V(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.recordBatchWriterThroughDOMStream=void 0;var GV=si();function JV(r,e){let t=new this(r),i=new GV.AsyncByteStream(t),n=new ReadableStream({type:"bytes",async cancel(){await i.cancel()},async pull(c){await s(c)},async start(c){await s(c)}},{highWaterMark:2**14,...e});return{writable:new WritableStream(t,r),readable:n};async function s(c){let v=null,I=c.desiredSize;for(;v=await i.read(I||null);)if(c.enqueue(v),I!=null&&(I-=v.byteLength)<=0)return;c.close()}}tu.recordBatchWriterThroughDOMStream=JV});var Od=V(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.custom=le.or=le.and=le.col=le.lit=le.CustomPredicate=le.Not=le.GTeq=le.LTeq=le.Equals=le.Or=le.And=le.CombinationPredicate=le.ComparisonPredicate=le.Predicate=le.Col=le.Literal=le.Value=void 0;var KV=Ua(),gi=class{eq(e){return e instanceof gi||(e=new Ur(e)),new Td(this,e)}le(e){return e instanceof gi||(e=new Ur(e)),new Id(this,e)}ge(e){return e instanceof gi||(e=new Ur(e)),new Sd(this,e)}lt(e){return new Zn(this.ge(e))}gt(e){return new Zn(this.le(e))}ne(e){return new Zn(this.eq(e))}};le.Value=gi;var Ur=class extends gi{constructor(e){super();this.v=e}};le.Literal=Ur;var Bd=class extends gi{constructor(e){super();this.name=e}bind(e){if(!this.colidx){this.colidx=-1;let i=e.schema.fields;for(let n=-1;++n<i.length;)if(i[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 i=>t.get(i)}};le.Col=Bd;var Gn=class{and(...e){return new Jn(this,...e)}or(...e){return new Kn(this,...e)}not(){return new Zn(this)}};le.Predicate=Gn;var Es=class extends Gn{constructor(e,t){super();this.left=e,this.right=t}bind(e){return this.left instanceof Ur?this.right instanceof Ur?this._bindLitLit(e,this.left,this.right):this._bindLitCol(e,this.left,this.right):this.right instanceof Ur?this._bindColLit(e,this.left,this.right):this._bindColCol(e,this.left,this.right)}};le.ComparisonPredicate=Es;var Ls=class extends Gn{constructor(...e){super();this.children=e}};le.CombinationPredicate=Ls;Ls.prototype.children=Object.freeze([]);var Jn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Jn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.every(s=>s(i,n))}};le.And=Jn;var Kn=class extends Ls{constructor(...e){e=e.reduce((t,i)=>t.concat(i instanceof Kn?i.children:i),[]);super(...e)}bind(e){let t=this.children.map(i=>i.bind(e));return(i,n)=>t.some(s=>s(i,n))}};le.Or=Kn;var Td=class extends Es{_bindLitLit(e,t,i){let n=t.v==i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)==s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);if(t.vector instanceof KV.DictionaryVector){let s,c=t.vector;return c.dictionary!==this.lastDictionary?(s=c.reverseLookup(i.v),this.lastDictionary=c.dictionary,this.lastKey=s):s=this.lastKey,s===-1?()=>!1:v=>c.getKey(v)===s}else return(s,c)=>n(s,c)==i.v}_bindLitCol(e,t,i){return this._bindColLit(e,i,t)}};le.Equals=Td;var Id=class extends Es{_bindLitLit(e,t,i){let n=t.v<=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)<=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)<=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v<=n(s,c)}};le.LTeq=Id;var Sd=class extends Es{_bindLitLit(e,t,i){let n=t.v>=i.v;return()=>n}_bindColCol(e,t,i){let n=t.bind(e),s=i.bind(e);return(c,v)=>n(c,v)>=s(c,v)}_bindColLit(e,t,i){let n=t.bind(e);return(s,c)=>n(s,c)>=i.v}_bindLitCol(e,t,i){let n=i.bind(e);return(s,c)=>t.v>=n(s,c)}};le.GTeq=Sd;var Zn=class extends Gn{constructor(e){super();this.child=e}bind(e){let t=this.child.bind(e);return(i,n)=>!t(i,n)}};le.Not=Zn;var Dd=class extends Gn{constructor(e,t){super();this.next=e,this.bind_=t}bind(e){return this.bind_(e),this.next}};le.CustomPredicate=Dd;function ZV(r){return new Ur(r)}le.lit=ZV;function XV(r){return new Bd(r)}le.col=XV;function QV(...r){return new Jn(...r)}le.and=QV;function eU(...r){return new Kn(...r)}le.or=eU;function tU(r,e){return new Dd(r,e)}le.custom=tU});var _v=V(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.FilteredDataFrame=vi.CountByResult=vi.DataFrame=void 0;var Xn=Ds(),hv=Ra(),Ad=Ke(),pv=Od(),rU=Fr(),yv=be();Xn.Table.prototype.countBy=function(r){return new $i(this.chunks).countBy(r)};Xn.Table.prototype.scan=function(r,e){return new $i(this.chunks).scan(r,e)};Xn.Table.prototype.scanReverse=function(r,e){return new $i(this.chunks).scanReverse(r,e)};Xn.Table.prototype.filter=function(r){return new $i(this.chunks).filter(r)};var $i=class extends Xn.Table{filter(e){return new qs(this.chunks,e)}scan(e,t){let i=this.chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s];t&&t(c);for(let v=-1,I=c.length;++v<I;)e(v,c)}}scanReverse(e,t){let i=this.chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s];t&&t(c);for(let v=c.length;--v>=0;)e(v,c)}}countBy(e){let t=this.chunks,i=t.length,n=typeof e=="string"?new pv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!yv.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)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,I=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S];n.bind(U);let G=n.vector.indices;for(let me=-1,fe=U.length;++me<fe;){let Gt=G.get(me);Gt!==null&&I[Gt]++}}return new ru(s.dictionary,hv.IntVector.from(I))}};vi.DataFrame=$i;var ru=class extends Xn.Table{constructor(e,t){let i=new Ad.Schema([new Ad.Field("values",e.type),new Ad.Field("counts",t.type)]);super(new rU.RecordBatch(i,t.length,[e,t]))}toJSON(){let e=this.getColumnAt(0),t=this.getColumnAt(1),i={};for(let n=-1;++n<this.length;)i[e.get(n)]=t.get(n);return i}};vi.CountByResult=ru;var mv=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}},qs=class extends $i{constructor(e,t){super(e);this._predicate=t}scan(e,t){let i=this._chunks,n=i.length;for(let s=-1;++s<n;){let c=i[s],v=this._predicate.bind(c),I=!1;for(let S=-1,U=c.length;++S<U;)v(S,c)&&(t&&!I&&(t(c),I=!0),e(S,c))}}scanReverse(e,t){let i=this._chunks,n=i.length;for(let s=n;--s>=0;){let c=i[s],v=this._predicate.bind(c),I=!1;for(let S=c.length;--S>=0;)v(S,c)&&(t&&!I&&(t(c),I=!0),e(S,c))}}count(){let e=0,t=this._chunks,i=t.length;for(let n=-1;++n<i;){let s=t[n],c=this._predicate.bind(s);for(let v=-1,I=s.length;++v<I;)c(v,s)&&++e}return e}[Symbol.iterator](){return new mv(this._chunks,this._predicate)}filter(e){return new qs(this._chunks,this._predicate.and(e))}countBy(e){let t=this._chunks,i=t.length,n=typeof e=="string"?new pv.Col(e):e;n.bind(t[i-1]);let s=n.vector;if(!yv.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)),v=c==4?Uint32Array:c>=2?Uint16Array:Uint8Array,I=new v(s.dictionary.length);for(let S=-1;++S<i;){let U=t[S],G=this._predicate.bind(U);n.bind(U);let me=n.vector.indices;for(let fe=-1,Gt=U.length;++fe<Gt;){let Cr=me.get(fe);Cr!==null&&G(fe,U)&&I[Cr]++}}return new ru(s.dictionary,hv.IntVector.from(I))}};vi.FilteredDataFrame=qs});var vv=V(_=>{"use strict";Object.defineProperty(_,"__esModule",{value:!0});_.util=_.predicate=_.CountByResult=_.FilteredDataFrame=_.DataFrame=_.RecordBatch=_.Message=_.JSONMessageReader=_.AsyncMessageReader=_.MessageReader=_.RecordBatchJSONWriter=_.RecordBatchStreamWriter=_.RecordBatchFileWriter=_.RecordBatchWriter=_.AsyncRecordBatchStreamReader=_.AsyncRecordBatchFileReader=_.RecordBatchStreamReader=_.RecordBatchFileReader=_.RecordBatchReader=_.AsyncByteQueue=_.AsyncByteStream=_.ByteStream=_.Utf8Builder=_.SparseUnionBuilder=_.DenseUnionBuilder=_.UnionBuilder=_.TimeNanosecondBuilder=_.TimeMicrosecondBuilder=_.TimeMillisecondBuilder=_.TimeSecondBuilder=_.TimeBuilder=_.TimestampNanosecondBuilder=_.TimestampMicrosecondBuilder=_.TimestampMillisecondBuilder=_.TimestampSecondBuilder=_.TimestampBuilder=_.StructBuilder=_.NullBuilder=_.MapBuilder=_.ListBuilder=_.Uint64Builder=_.Uint32Builder=_.Uint16Builder=_.Uint8Builder=_.Int64Builder=_.Int32Builder=_.Int16Builder=_.Int8Builder=_.IntBuilder=_.IntervalYearMonthBuilder=_.IntervalDayTimeBuilder=_.IntervalBuilder=_.Float64Builder=_.Float32Builder=_.Float16Builder=_.FloatBuilder=_.FixedSizeListBuilder=_.FixedSizeBinaryBuilder=_.DictionaryBuilder=_.DecimalBuilder=_.DateMillisecondBuilder=_.DateDayBuilder=_.DateBuilder=_.BoolBuilder=_.BinaryBuilder=_.Builder=_.Utf8Vector=_.SparseUnionVector=_.DenseUnionVector=_.UnionVector=_.TimeNanosecondVector=_.TimeMicrosecondVector=_.TimeMillisecondVector=_.TimeSecondVector=_.TimeVector=_.TimestampNanosecondVector=_.TimestampMicrosecondVector=_.TimestampMillisecondVector=_.TimestampSecondVector=_.TimestampVector=_.StructVector=_.NullVector=_.MapVector=_.ListVector=_.Uint64Vector=_.Uint32Vector=_.Uint16Vector=_.Uint8Vector=_.Int64Vector=_.Int32Vector=_.Int16Vector=_.Int8Vector=_.IntVector=_.IntervalYearMonthVector=_.IntervalDayTimeVector=_.IntervalVector=_.Float64Vector=_.Float32Vector=_.Float16Vector=_.FloatVector=_.FixedSizeListVector=_.FixedSizeBinaryVector=_.DictionaryVector=_.DecimalVector=_.DateMillisecondVector=_.DateDayVector=_.DateVector=_.Chunked=_.BoolVector=_.BinaryVector=_.BaseVector=_.Vector=_.Field=_.Schema=_.Visitor=_.Column=_.Table=_.Map_=_.FixedSizeList=_.IntervalYearMonth=_.IntervalDayTime=_.Interval=_.Dictionary=_.SparseUnion=_.DenseUnion=_.Union=_.Struct=_.List=_.Decimal=_.TimeNanosecond=_.TimeMicrosecond=_.TimeMillisecond=_.TimeSecond=_.Time=_.TimestampNanosecond=_.TimestampMicrosecond=_.TimestampMillisecond=_.TimestampSecond=_.Timestamp=_.DateMillisecond=_.DateDay=_.Date_=_.FixedSizeBinary=_.Binary=_.Utf8=_.Float64=_.Float32=_.Float16=_.Float=_.Uint64=_.Uint32=_.Uint16=_.Uint8=_.Int64=_.Int32=_.Int16=_.Int8=_.Int=_.Bool=_.Null=_.DataType=_.Data=_.BufferType=_.Type=_.MessageHeader=_.MetadataVersion=_.IntervalUnit=_.UnionMode=_.Precision=_.TimeUnit=_.DateUnit=void 0;var Qn=$r();Object.defineProperty(_,"DateUnit",{enumerable:!0,get:function(){return Qn.DateUnit}});Object.defineProperty(_,"TimeUnit",{enumerable:!0,get:function(){return Qn.TimeUnit}});Object.defineProperty(_,"Precision",{enumerable:!0,get:function(){return Qn.Precision}});Object.defineProperty(_,"UnionMode",{enumerable:!0,get:function(){return Qn.UnionMode}});Object.defineProperty(_,"IntervalUnit",{enumerable:!0,get:function(){return Qn.IntervalUnit}});Object.defineProperty(_,"MetadataVersion",{enumerable:!0,get:function(){return Qn.MetadataVersion}});var iU=yo();Object.defineProperty(_,"MessageHeader",{enumerable:!0,get:function(){return iU.MessageHeader}});var bv=Te();Object.defineProperty(_,"Type",{enumerable:!0,get:function(){return bv.Type}});Object.defineProperty(_,"BufferType",{enumerable:!0,get:function(){return bv.BufferType}});var nU=qt();Object.defineProperty(_,"Data",{enumerable:!0,get:function(){return nU.Data}});var ie=be();Object.defineProperty(_,"DataType",{enumerable:!0,get:function(){return ie.DataType}});Object.defineProperty(_,"Null",{enumerable:!0,get:function(){return ie.Null}});Object.defineProperty(_,"Bool",{enumerable:!0,get:function(){return ie.Bool}});Object.defineProperty(_,"Int",{enumerable:!0,get:function(){return ie.Int}});Object.defineProperty(_,"Int8",{enumerable:!0,get:function(){return ie.Int8}});Object.defineProperty(_,"Int16",{enumerable:!0,get:function(){return ie.Int16}});Object.defineProperty(_,"Int32",{enumerable:!0,get:function(){return ie.Int32}});Object.defineProperty(_,"Int64",{enumerable:!0,get:function(){return ie.Int64}});Object.defineProperty(_,"Uint8",{enumerable:!0,get:function(){return ie.Uint8}});Object.defineProperty(_,"Uint16",{enumerable:!0,get:function(){return ie.Uint16}});Object.defineProperty(_,"Uint32",{enumerable:!0,get:function(){return ie.Uint32}});Object.defineProperty(_,"Uint64",{enumerable:!0,get:function(){return ie.Uint64}});Object.defineProperty(_,"Float",{enumerable:!0,get:function(){return ie.Float}});Object.defineProperty(_,"Float16",{enumerable:!0,get:function(){return ie.Float16}});Object.defineProperty(_,"Float32",{enumerable:!0,get:function(){return ie.Float32}});Object.defineProperty(_,"Float64",{enumerable:!0,get:function(){return ie.Float64}});Object.defineProperty(_,"Utf8",{enumerable:!0,get:function(){return ie.Utf8}});Object.defineProperty(_,"Binary",{enumerable:!0,get:function(){return ie.Binary}});Object.defineProperty(_,"FixedSizeBinary",{enumerable:!0,get:function(){return ie.FixedSizeBinary}});Object.defineProperty(_,"Date_",{enumerable:!0,get:function(){return ie.Date_}});Object.defineProperty(_,"DateDay",{enumerable:!0,get:function(){return ie.DateDay}});Object.defineProperty(_,"DateMillisecond",{enumerable:!0,get:function(){return ie.DateMillisecond}});Object.defineProperty(_,"Timestamp",{enumerable:!0,get:function(){return ie.Timestamp}});Object.defineProperty(_,"TimestampSecond",{enumerable:!0,get:function(){return ie.TimestampSecond}});Object.defineProperty(_,"TimestampMillisecond",{enumerable:!0,get:function(){return ie.TimestampMillisecond}});Object.defineProperty(_,"TimestampMicrosecond",{enumerable:!0,get:function(){return ie.TimestampMicrosecond}});Object.defineProperty(_,"TimestampNanosecond",{enumerable:!0,get:function(){return ie.TimestampNanosecond}});Object.defineProperty(_,"Time",{enumerable:!0,get:function(){return ie.Time}});Object.defineProperty(_,"TimeSecond",{enumerable:!0,get:function(){return ie.TimeSecond}});Object.defineProperty(_,"TimeMillisecond",{enumerable:!0,get:function(){return ie.TimeMillisecond}});Object.defineProperty(_,"TimeMicrosecond",{enumerable:!0,get:function(){return ie.TimeMicrosecond}});Object.defineProperty(_,"TimeNanosecond",{enumerable:!0,get:function(){return ie.TimeNanosecond}});Object.defineProperty(_,"Decimal",{enumerable:!0,get:function(){return ie.Decimal}});Object.defineProperty(_,"List",{enumerable:!0,get:function(){return ie.List}});Object.defineProperty(_,"Struct",{enumerable:!0,get:function(){return ie.Struct}});Object.defineProperty(_,"Union",{enumerable:!0,get:function(){return ie.Union}});Object.defineProperty(_,"DenseUnion",{enumerable:!0,get:function(){return ie.DenseUnion}});Object.defineProperty(_,"SparseUnion",{enumerable:!0,get:function(){return ie.SparseUnion}});Object.defineProperty(_,"Dictionary",{enumerable:!0,get:function(){return ie.Dictionary}});Object.defineProperty(_,"Interval",{enumerable:!0,get:function(){return ie.Interval}});Object.defineProperty(_,"IntervalDayTime",{enumerable:!0,get:function(){return ie.IntervalDayTime}});Object.defineProperty(_,"IntervalYearMonth",{enumerable:!0,get:function(){return ie.IntervalYearMonth}});Object.defineProperty(_,"FixedSizeList",{enumerable:!0,get:function(){return ie.FixedSizeList}});Object.defineProperty(_,"Map_",{enumerable:!0,get:function(){return ie.Map_}});var sU=Ds();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return sU.Table}});var oU=An();Object.defineProperty(_,"Column",{enumerable:!0,get:function(){return oU.Column}});var aU=tt();Object.defineProperty(_,"Visitor",{enumerable:!0,get:function(){return aU.Visitor}});var gv=Ke();Object.defineProperty(_,"Schema",{enumerable:!0,get:function(){return gv.Schema}});Object.defineProperty(_,"Field",{enumerable:!0,get:function(){return gv.Field}});var ee=fr();Object.defineProperty(_,"Vector",{enumerable:!0,get:function(){return ee.Vector}});Object.defineProperty(_,"BaseVector",{enumerable:!0,get:function(){return ee.BaseVector}});Object.defineProperty(_,"BinaryVector",{enumerable:!0,get:function(){return ee.BinaryVector}});Object.defineProperty(_,"BoolVector",{enumerable:!0,get:function(){return ee.BoolVector}});Object.defineProperty(_,"Chunked",{enumerable:!0,get:function(){return ee.Chunked}});Object.defineProperty(_,"DateVector",{enumerable:!0,get:function(){return ee.DateVector}});Object.defineProperty(_,"DateDayVector",{enumerable:!0,get:function(){return ee.DateDayVector}});Object.defineProperty(_,"DateMillisecondVector",{enumerable:!0,get:function(){return ee.DateMillisecondVector}});Object.defineProperty(_,"DecimalVector",{enumerable:!0,get:function(){return ee.DecimalVector}});Object.defineProperty(_,"DictionaryVector",{enumerable:!0,get:function(){return ee.DictionaryVector}});Object.defineProperty(_,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return ee.FixedSizeBinaryVector}});Object.defineProperty(_,"FixedSizeListVector",{enumerable:!0,get:function(){return ee.FixedSizeListVector}});Object.defineProperty(_,"FloatVector",{enumerable:!0,get:function(){return ee.FloatVector}});Object.defineProperty(_,"Float16Vector",{enumerable:!0,get:function(){return ee.Float16Vector}});Object.defineProperty(_,"Float32Vector",{enumerable:!0,get:function(){return ee.Float32Vector}});Object.defineProperty(_,"Float64Vector",{enumerable:!0,get:function(){return ee.Float64Vector}});Object.defineProperty(_,"IntervalVector",{enumerable:!0,get:function(){return ee.IntervalVector}});Object.defineProperty(_,"IntervalDayTimeVector",{enumerable:!0,get:function(){return ee.IntervalDayTimeVector}});Object.defineProperty(_,"IntervalYearMonthVector",{enumerable:!0,get:function(){return ee.IntervalYearMonthVector}});Object.defineProperty(_,"IntVector",{enumerable:!0,get:function(){return ee.IntVector}});Object.defineProperty(_,"Int8Vector",{enumerable:!0,get:function(){return ee.Int8Vector}});Object.defineProperty(_,"Int16Vector",{enumerable:!0,get:function(){return ee.Int16Vector}});Object.defineProperty(_,"Int32Vector",{enumerable:!0,get:function(){return ee.Int32Vector}});Object.defineProperty(_,"Int64Vector",{enumerable:!0,get:function(){return ee.Int64Vector}});Object.defineProperty(_,"Uint8Vector",{enumerable:!0,get:function(){return ee.Uint8Vector}});Object.defineProperty(_,"Uint16Vector",{enumerable:!0,get:function(){return ee.Uint16Vector}});Object.defineProperty(_,"Uint32Vector",{enumerable:!0,get:function(){return ee.Uint32Vector}});Object.defineProperty(_,"Uint64Vector",{enumerable:!0,get:function(){return ee.Uint64Vector}});Object.defineProperty(_,"ListVector",{enumerable:!0,get:function(){return ee.ListVector}});Object.defineProperty(_,"MapVector",{enumerable:!0,get:function(){return ee.MapVector}});Object.defineProperty(_,"NullVector",{enumerable:!0,get:function(){return ee.NullVector}});Object.defineProperty(_,"StructVector",{enumerable:!0,get:function(){return ee.StructVector}});Object.defineProperty(_,"TimestampVector",{enumerable:!0,get:function(){return ee.TimestampVector}});Object.defineProperty(_,"TimestampSecondVector",{enumerable:!0,get:function(){return ee.TimestampSecondVector}});Object.defineProperty(_,"TimestampMillisecondVector",{enumerable:!0,get:function(){return ee.TimestampMillisecondVector}});Object.defineProperty(_,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return ee.TimestampMicrosecondVector}});Object.defineProperty(_,"TimestampNanosecondVector",{enumerable:!0,get:function(){return ee.TimestampNanosecondVector}});Object.defineProperty(_,"TimeVector",{enumerable:!0,get:function(){return ee.TimeVector}});Object.defineProperty(_,"TimeSecondVector",{enumerable:!0,get:function(){return ee.TimeSecondVector}});Object.defineProperty(_,"TimeMillisecondVector",{enumerable:!0,get:function(){return ee.TimeMillisecondVector}});Object.defineProperty(_,"TimeMicrosecondVector",{enumerable:!0,get:function(){return ee.TimeMicrosecondVector}});Object.defineProperty(_,"TimeNanosecondVector",{enumerable:!0,get:function(){return ee.TimeNanosecondVector}});Object.defineProperty(_,"UnionVector",{enumerable:!0,get:function(){return ee.UnionVector}});Object.defineProperty(_,"DenseUnionVector",{enumerable:!0,get:function(){return ee.DenseUnionVector}});Object.defineProperty(_,"SparseUnionVector",{enumerable:!0,get:function(){return ee.SparseUnionVector}});Object.defineProperty(_,"Utf8Vector",{enumerable:!0,get:function(){return ee.Utf8Vector}});var ne=ta();Object.defineProperty(_,"Builder",{enumerable:!0,get:function(){return ne.Builder}});Object.defineProperty(_,"BinaryBuilder",{enumerable:!0,get:function(){return ne.BinaryBuilder}});Object.defineProperty(_,"BoolBuilder",{enumerable:!0,get:function(){return ne.BoolBuilder}});Object.defineProperty(_,"DateBuilder",{enumerable:!0,get:function(){return ne.DateBuilder}});Object.defineProperty(_,"DateDayBuilder",{enumerable:!0,get:function(){return ne.DateDayBuilder}});Object.defineProperty(_,"DateMillisecondBuilder",{enumerable:!0,get:function(){return ne.DateMillisecondBuilder}});Object.defineProperty(_,"DecimalBuilder",{enumerable:!0,get:function(){return ne.DecimalBuilder}});Object.defineProperty(_,"DictionaryBuilder",{enumerable:!0,get:function(){return ne.DictionaryBuilder}});Object.defineProperty(_,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return ne.FixedSizeBinaryBuilder}});Object.defineProperty(_,"FixedSizeListBuilder",{enumerable:!0,get:function(){return ne.FixedSizeListBuilder}});Object.defineProperty(_,"FloatBuilder",{enumerable:!0,get:function(){return ne.FloatBuilder}});Object.defineProperty(_,"Float16Builder",{enumerable:!0,get:function(){return ne.Float16Builder}});Object.defineProperty(_,"Float32Builder",{enumerable:!0,get:function(){return ne.Float32Builder}});Object.defineProperty(_,"Float64Builder",{enumerable:!0,get:function(){return ne.Float64Builder}});Object.defineProperty(_,"IntervalBuilder",{enumerable:!0,get:function(){return ne.IntervalBuilder}});Object.defineProperty(_,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return ne.IntervalDayTimeBuilder}});Object.defineProperty(_,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return ne.IntervalYearMonthBuilder}});Object.defineProperty(_,"IntBuilder",{enumerable:!0,get:function(){return ne.IntBuilder}});Object.defineProperty(_,"Int8Builder",{enumerable:!0,get:function(){return ne.Int8Builder}});Object.defineProperty(_,"Int16Builder",{enumerable:!0,get:function(){return ne.Int16Builder}});Object.defineProperty(_,"Int32Builder",{enumerable:!0,get:function(){return ne.Int32Builder}});Object.defineProperty(_,"Int64Builder",{enumerable:!0,get:function(){return ne.Int64Builder}});Object.defineProperty(_,"Uint8Builder",{enumerable:!0,get:function(){return ne.Uint8Builder}});Object.defineProperty(_,"Uint16Builder",{enumerable:!0,get:function(){return ne.Uint16Builder}});Object.defineProperty(_,"Uint32Builder",{enumerable:!0,get:function(){return ne.Uint32Builder}});Object.defineProperty(_,"Uint64Builder",{enumerable:!0,get:function(){return ne.Uint64Builder}});Object.defineProperty(_,"ListBuilder",{enumerable:!0,get:function(){return ne.ListBuilder}});Object.defineProperty(_,"MapBuilder",{enumerable:!0,get:function(){return ne.MapBuilder}});Object.defineProperty(_,"NullBuilder",{enumerable:!0,get:function(){return ne.NullBuilder}});Object.defineProperty(_,"StructBuilder",{enumerable:!0,get:function(){return ne.StructBuilder}});Object.defineProperty(_,"TimestampBuilder",{enumerable:!0,get:function(){return ne.TimestampBuilder}});Object.defineProperty(_,"TimestampSecondBuilder",{enumerable:!0,get:function(){return ne.TimestampSecondBuilder}});Object.defineProperty(_,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMillisecondBuilder}});Object.defineProperty(_,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampMicrosecondBuilder}});Object.defineProperty(_,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimestampNanosecondBuilder}});Object.defineProperty(_,"TimeBuilder",{enumerable:!0,get:function(){return ne.TimeBuilder}});Object.defineProperty(_,"TimeSecondBuilder",{enumerable:!0,get:function(){return ne.TimeSecondBuilder}});Object.defineProperty(_,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return ne.TimeMillisecondBuilder}});Object.defineProperty(_,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return ne.TimeMicrosecondBuilder}});Object.defineProperty(_,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return ne.TimeNanosecondBuilder}});Object.defineProperty(_,"UnionBuilder",{enumerable:!0,get:function(){return ne.UnionBuilder}});Object.defineProperty(_,"DenseUnionBuilder",{enumerable:!0,get:function(){return ne.DenseUnionBuilder}});Object.defineProperty(_,"SparseUnionBuilder",{enumerable:!0,get:function(){return ne.SparseUnionBuilder}});Object.defineProperty(_,"Utf8Builder",{enumerable:!0,get:function(){return ne.Utf8Builder}});var Fd=si();Object.defineProperty(_,"ByteStream",{enumerable:!0,get:function(){return Fd.ByteStream}});Object.defineProperty(_,"AsyncByteStream",{enumerable:!0,get:function(){return Fd.AsyncByteStream}});Object.defineProperty(_,"AsyncByteQueue",{enumerable:!0,get:function(){return Fd.AsyncByteQueue}});var zs=ks();Object.defineProperty(_,"RecordBatchReader",{enumerable:!0,get:function(){return zs.RecordBatchReader}});Object.defineProperty(_,"RecordBatchFileReader",{enumerable:!0,get:function(){return zs.RecordBatchFileReader}});Object.defineProperty(_,"RecordBatchStreamReader",{enumerable:!0,get:function(){return zs.RecordBatchStreamReader}});Object.defineProperty(_,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchFileReader}});Object.defineProperty(_,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return zs.AsyncRecordBatchStreamReader}});var iu=Sa();Object.defineProperty(_,"RecordBatchWriter",{enumerable:!0,get:function(){return iu.RecordBatchWriter}});Object.defineProperty(_,"RecordBatchFileWriter",{enumerable:!0,get:function(){return iu.RecordBatchFileWriter}});Object.defineProperty(_,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return iu.RecordBatchStreamWriter}});Object.defineProperty(_,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return iu.RecordBatchJSONWriter}});var Md=ya();Object.defineProperty(_,"MessageReader",{enumerable:!0,get:function(){return Md.MessageReader}});Object.defineProperty(_,"AsyncMessageReader",{enumerable:!0,get:function(){return Md.AsyncMessageReader}});Object.defineProperty(_,"JSONMessageReader",{enumerable:!0,get:function(){return Md.JSONMessageReader}});var uU=Ei();Object.defineProperty(_,"Message",{enumerable:!0,get:function(){return uU.Message}});var cU=Fr();Object.defineProperty(_,"RecordBatch",{enumerable:!0,get:function(){return cU.RecordBatch}});var Vd=_v();Object.defineProperty(_,"DataFrame",{enumerable:!0,get:function(){return Vd.DataFrame}});Object.defineProperty(_,"FilteredDataFrame",{enumerable:!0,get:function(){return Vd.FilteredDataFrame}});Object.defineProperty(_,"CountByResult",{enumerable:!0,get:function(){return Vd.CountByResult}});var lU=ls(),dU=qc(),fU=tr(),hU=os(),pU=Ye(),yU=bs(),mU=Od();_.predicate=mU;var Ud=nl();_.util={...lU,...dU,...fU,...hU,...pU,...yU,compareSchemas:Ud.compareSchemas,compareFields:Ud.compareFields,compareTypes:Ud.compareTypes}});var Nd=V(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.Utf8Builder=b.SparseUnionBuilder=b.DenseUnionBuilder=b.UnionBuilder=b.TimeNanosecondBuilder=b.TimeMicrosecondBuilder=b.TimeMillisecondBuilder=b.TimeSecondBuilder=b.TimeBuilder=b.TimestampNanosecondBuilder=b.TimestampMicrosecondBuilder=b.TimestampMillisecondBuilder=b.TimestampSecondBuilder=b.TimestampBuilder=b.StructBuilder=b.NullBuilder=b.MapBuilder=b.ListBuilder=b.Uint64Builder=b.Uint32Builder=b.Uint16Builder=b.Uint8Builder=b.Int64Builder=b.Int32Builder=b.Int16Builder=b.Int8Builder=b.IntBuilder=b.IntervalYearMonthBuilder=b.IntervalDayTimeBuilder=b.IntervalBuilder=b.Float64Builder=b.Float32Builder=b.Float16Builder=b.FloatBuilder=b.FixedSizeListBuilder=b.FixedSizeBinaryBuilder=b.DictionaryBuilder=b.DecimalBuilder=b.DateMillisecondBuilder=b.DateDayBuilder=b.DateBuilder=b.BoolBuilder=b.BinaryBuilder=b.Builder=b.util=b.predicate=b.CountByResult=b.FilteredDataFrame=b.DataFrame=b.RecordBatch=b.Message=b.JSONMessageReader=b.AsyncMessageReader=b.MessageReader=b.RecordBatchJSONWriter=b.RecordBatchStreamWriter=b.RecordBatchFileWriter=b.RecordBatchWriter=b.AsyncRecordBatchStreamReader=b.AsyncRecordBatchFileReader=b.RecordBatchStreamReader=b.RecordBatchFileReader=b.RecordBatchReader=b.AsyncByteQueue=b.AsyncByteStream=b.ByteStream=b.Utf8Vector=b.SparseUnionVector=b.DenseUnionVector=b.UnionVector=b.TimeNanosecondVector=b.TimeMicrosecondVector=b.TimeMillisecondVector=b.TimeSecondVector=b.TimeVector=b.TimestampNanosecondVector=b.TimestampMicrosecondVector=b.TimestampMillisecondVector=b.TimestampSecondVector=b.TimestampVector=b.StructVector=b.NullVector=b.MapVector=b.ListVector=b.Uint64Vector=b.Uint32Vector=b.Uint16Vector=b.Uint8Vector=b.Int64Vector=b.Int32Vector=b.Int16Vector=b.Int8Vector=b.IntVector=b.IntervalYearMonthVector=b.IntervalDayTimeVector=b.IntervalVector=b.Float64Vector=b.Float32Vector=b.Float16Vector=b.FloatVector=b.FixedSizeListVector=b.FixedSizeBinaryVector=b.DictionaryVector=b.DecimalVector=b.DateMillisecondVector=b.DateDayVector=b.DateVector=b.Chunked=b.BoolVector=b.BinaryVector=b.BaseVector=b.Vector=b.Visitor=b.Field=b.Schema=b.Column=b.Table=b.Map_=b.FixedSizeList=b.IntervalYearMonth=b.IntervalDayTime=b.Interval=b.Dictionary=b.SparseUnion=b.DenseUnion=b.Union=b.Struct=b.List=b.Decimal=b.TimeNanosecond=b.TimeMicrosecond=b.TimeMillisecond=b.TimeSecond=b.Time=b.TimestampNanosecond=b.TimestampMicrosecond=b.TimestampMillisecond=b.TimestampSecond=b.Timestamp=b.DateMillisecond=b.DateDay=b.Date_=b.FixedSizeBinary=b.Binary=b.Utf8=b.Float64=b.Float32=b.Float16=b.Float=b.Uint64=b.Uint32=b.Uint16=b.Uint8=b.Int64=b.Int32=b.Int16=b.Int8=b.Int=b.Bool=b.Null=b.DataType=b.Data=b.BufferType=b.UnionMode=b.Type=b.TimeUnit=b.Precision=b.MetadataVersion=b.MessageHeader=b.IntervalUnit=b.DateUnit=void 0;var _U=ns(),bU=ta(),Cd=ks(),Pd=Sa(),gU=av(),vU=lv(),kd=dv(),Rd=fv();_U.default.toDOMStream=gU.toDOMStream;bU.Builder.throughDOM=vU.builderThroughDOMStream;Cd.RecordBatchReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Cd.RecordBatchFileReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Cd.RecordBatchStreamReader.throughDOM=kd.recordBatchReaderThroughDOMStream;Pd.RecordBatchWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;Pd.RecordBatchFileWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;Pd.RecordBatchStreamWriter.throughDOM=Rd.recordBatchWriterThroughDOMStream;var D=vv();Object.defineProperty(b,"DateUnit",{enumerable:!0,get:function(){return D.DateUnit}});Object.defineProperty(b,"IntervalUnit",{enumerable:!0,get:function(){return D.IntervalUnit}});Object.defineProperty(b,"MessageHeader",{enumerable:!0,get:function(){return D.MessageHeader}});Object.defineProperty(b,"MetadataVersion",{enumerable:!0,get:function(){return D.MetadataVersion}});Object.defineProperty(b,"Precision",{enumerable:!0,get:function(){return D.Precision}});Object.defineProperty(b,"TimeUnit",{enumerable:!0,get:function(){return D.TimeUnit}});Object.defineProperty(b,"Type",{enumerable:!0,get:function(){return D.Type}});Object.defineProperty(b,"UnionMode",{enumerable:!0,get:function(){return D.UnionMode}});Object.defineProperty(b,"BufferType",{enumerable:!0,get:function(){return D.BufferType}});Object.defineProperty(b,"Data",{enumerable:!0,get:function(){return D.Data}});Object.defineProperty(b,"DataType",{enumerable:!0,get:function(){return D.DataType}});Object.defineProperty(b,"Null",{enumerable:!0,get:function(){return D.Null}});Object.defineProperty(b,"Bool",{enumerable:!0,get:function(){return D.Bool}});Object.defineProperty(b,"Int",{enumerable:!0,get:function(){return D.Int}});Object.defineProperty(b,"Int8",{enumerable:!0,get:function(){return D.Int8}});Object.defineProperty(b,"Int16",{enumerable:!0,get:function(){return D.Int16}});Object.defineProperty(b,"Int32",{enumerable:!0,get:function(){return D.Int32}});Object.defineProperty(b,"Int64",{enumerable:!0,get:function(){return D.Int64}});Object.defineProperty(b,"Uint8",{enumerable:!0,get:function(){return D.Uint8}});Object.defineProperty(b,"Uint16",{enumerable:!0,get:function(){return D.Uint16}});Object.defineProperty(b,"Uint32",{enumerable:!0,get:function(){return D.Uint32}});Object.defineProperty(b,"Uint64",{enumerable:!0,get:function(){return D.Uint64}});Object.defineProperty(b,"Float",{enumerable:!0,get:function(){return D.Float}});Object.defineProperty(b,"Float16",{enumerable:!0,get:function(){return D.Float16}});Object.defineProperty(b,"Float32",{enumerable:!0,get:function(){return D.Float32}});Object.defineProperty(b,"Float64",{enumerable:!0,get:function(){return D.Float64}});Object.defineProperty(b,"Utf8",{enumerable:!0,get:function(){return D.Utf8}});Object.defineProperty(b,"Binary",{enumerable:!0,get:function(){return D.Binary}});Object.defineProperty(b,"FixedSizeBinary",{enumerable:!0,get:function(){return D.FixedSizeBinary}});Object.defineProperty(b,"Date_",{enumerable:!0,get:function(){return D.Date_}});Object.defineProperty(b,"DateDay",{enumerable:!0,get:function(){return D.DateDay}});Object.defineProperty(b,"DateMillisecond",{enumerable:!0,get:function(){return D.DateMillisecond}});Object.defineProperty(b,"Timestamp",{enumerable:!0,get:function(){return D.Timestamp}});Object.defineProperty(b,"TimestampSecond",{enumerable:!0,get:function(){return D.TimestampSecond}});Object.defineProperty(b,"TimestampMillisecond",{enumerable:!0,get:function(){return D.TimestampMillisecond}});Object.defineProperty(b,"TimestampMicrosecond",{enumerable:!0,get:function(){return D.TimestampMicrosecond}});Object.defineProperty(b,"TimestampNanosecond",{enumerable:!0,get:function(){return D.TimestampNanosecond}});Object.defineProperty(b,"Time",{enumerable:!0,get:function(){return D.Time}});Object.defineProperty(b,"TimeSecond",{enumerable:!0,get:function(){return D.TimeSecond}});Object.defineProperty(b,"TimeMillisecond",{enumerable:!0,get:function(){return D.TimeMillisecond}});Object.defineProperty(b,"TimeMicrosecond",{enumerable:!0,get:function(){return D.TimeMicrosecond}});Object.defineProperty(b,"TimeNanosecond",{enumerable:!0,get:function(){return D.TimeNanosecond}});Object.defineProperty(b,"Decimal",{enumerable:!0,get:function(){return D.Decimal}});Object.defineProperty(b,"List",{enumerable:!0,get:function(){return D.List}});Object.defineProperty(b,"Struct",{enumerable:!0,get:function(){return D.Struct}});Object.defineProperty(b,"Union",{enumerable:!0,get:function(){return D.Union}});Object.defineProperty(b,"DenseUnion",{enumerable:!0,get:function(){return D.DenseUnion}});Object.defineProperty(b,"SparseUnion",{enumerable:!0,get:function(){return D.SparseUnion}});Object.defineProperty(b,"Dictionary",{enumerable:!0,get:function(){return D.Dictionary}});Object.defineProperty(b,"Interval",{enumerable:!0,get:function(){return D.Interval}});Object.defineProperty(b,"IntervalDayTime",{enumerable:!0,get:function(){return D.IntervalDayTime}});Object.defineProperty(b,"IntervalYearMonth",{enumerable:!0,get:function(){return D.IntervalYearMonth}});Object.defineProperty(b,"FixedSizeList",{enumerable:!0,get:function(){return D.FixedSizeList}});Object.defineProperty(b,"Map_",{enumerable:!0,get:function(){return D.Map_}});Object.defineProperty(b,"Table",{enumerable:!0,get:function(){return D.Table}});Object.defineProperty(b,"Column",{enumerable:!0,get:function(){return D.Column}});Object.defineProperty(b,"Schema",{enumerable:!0,get:function(){return D.Schema}});Object.defineProperty(b,"Field",{enumerable:!0,get:function(){return D.Field}});Object.defineProperty(b,"Visitor",{enumerable:!0,get:function(){return D.Visitor}});Object.defineProperty(b,"Vector",{enumerable:!0,get:function(){return D.Vector}});Object.defineProperty(b,"BaseVector",{enumerable:!0,get:function(){return D.BaseVector}});Object.defineProperty(b,"BinaryVector",{enumerable:!0,get:function(){return D.BinaryVector}});Object.defineProperty(b,"BoolVector",{enumerable:!0,get:function(){return D.BoolVector}});Object.defineProperty(b,"Chunked",{enumerable:!0,get:function(){return D.Chunked}});Object.defineProperty(b,"DateVector",{enumerable:!0,get:function(){return D.DateVector}});Object.defineProperty(b,"DateDayVector",{enumerable:!0,get:function(){return D.DateDayVector}});Object.defineProperty(b,"DateMillisecondVector",{enumerable:!0,get:function(){return D.DateMillisecondVector}});Object.defineProperty(b,"DecimalVector",{enumerable:!0,get:function(){return D.DecimalVector}});Object.defineProperty(b,"DictionaryVector",{enumerable:!0,get:function(){return D.DictionaryVector}});Object.defineProperty(b,"FixedSizeBinaryVector",{enumerable:!0,get:function(){return D.FixedSizeBinaryVector}});Object.defineProperty(b,"FixedSizeListVector",{enumerable:!0,get:function(){return D.FixedSizeListVector}});Object.defineProperty(b,"FloatVector",{enumerable:!0,get:function(){return D.FloatVector}});Object.defineProperty(b,"Float16Vector",{enumerable:!0,get:function(){return D.Float16Vector}});Object.defineProperty(b,"Float32Vector",{enumerable:!0,get:function(){return D.Float32Vector}});Object.defineProperty(b,"Float64Vector",{enumerable:!0,get:function(){return D.Float64Vector}});Object.defineProperty(b,"IntervalVector",{enumerable:!0,get:function(){return D.IntervalVector}});Object.defineProperty(b,"IntervalDayTimeVector",{enumerable:!0,get:function(){return D.IntervalDayTimeVector}});Object.defineProperty(b,"IntervalYearMonthVector",{enumerable:!0,get:function(){return D.IntervalYearMonthVector}});Object.defineProperty(b,"IntVector",{enumerable:!0,get:function(){return D.IntVector}});Object.defineProperty(b,"Int8Vector",{enumerable:!0,get:function(){return D.Int8Vector}});Object.defineProperty(b,"Int16Vector",{enumerable:!0,get:function(){return D.Int16Vector}});Object.defineProperty(b,"Int32Vector",{enumerable:!0,get:function(){return D.Int32Vector}});Object.defineProperty(b,"Int64Vector",{enumerable:!0,get:function(){return D.Int64Vector}});Object.defineProperty(b,"Uint8Vector",{enumerable:!0,get:function(){return D.Uint8Vector}});Object.defineProperty(b,"Uint16Vector",{enumerable:!0,get:function(){return D.Uint16Vector}});Object.defineProperty(b,"Uint32Vector",{enumerable:!0,get:function(){return D.Uint32Vector}});Object.defineProperty(b,"Uint64Vector",{enumerable:!0,get:function(){return D.Uint64Vector}});Object.defineProperty(b,"ListVector",{enumerable:!0,get:function(){return D.ListVector}});Object.defineProperty(b,"MapVector",{enumerable:!0,get:function(){return D.MapVector}});Object.defineProperty(b,"NullVector",{enumerable:!0,get:function(){return D.NullVector}});Object.defineProperty(b,"StructVector",{enumerable:!0,get:function(){return D.StructVector}});Object.defineProperty(b,"TimestampVector",{enumerable:!0,get:function(){return D.TimestampVector}});Object.defineProperty(b,"TimestampSecondVector",{enumerable:!0,get:function(){return D.TimestampSecondVector}});Object.defineProperty(b,"TimestampMillisecondVector",{enumerable:!0,get:function(){return D.TimestampMillisecondVector}});Object.defineProperty(b,"TimestampMicrosecondVector",{enumerable:!0,get:function(){return D.TimestampMicrosecondVector}});Object.defineProperty(b,"TimestampNanosecondVector",{enumerable:!0,get:function(){return D.TimestampNanosecondVector}});Object.defineProperty(b,"TimeVector",{enumerable:!0,get:function(){return D.TimeVector}});Object.defineProperty(b,"TimeSecondVector",{enumerable:!0,get:function(){return D.TimeSecondVector}});Object.defineProperty(b,"TimeMillisecondVector",{enumerable:!0,get:function(){return D.TimeMillisecondVector}});Object.defineProperty(b,"TimeMicrosecondVector",{enumerable:!0,get:function(){return D.TimeMicrosecondVector}});Object.defineProperty(b,"TimeNanosecondVector",{enumerable:!0,get:function(){return D.TimeNanosecondVector}});Object.defineProperty(b,"UnionVector",{enumerable:!0,get:function(){return D.UnionVector}});Object.defineProperty(b,"DenseUnionVector",{enumerable:!0,get:function(){return D.DenseUnionVector}});Object.defineProperty(b,"SparseUnionVector",{enumerable:!0,get:function(){return D.SparseUnionVector}});Object.defineProperty(b,"Utf8Vector",{enumerable:!0,get:function(){return D.Utf8Vector}});Object.defineProperty(b,"ByteStream",{enumerable:!0,get:function(){return D.ByteStream}});Object.defineProperty(b,"AsyncByteStream",{enumerable:!0,get:function(){return D.AsyncByteStream}});Object.defineProperty(b,"AsyncByteQueue",{enumerable:!0,get:function(){return D.AsyncByteQueue}});Object.defineProperty(b,"RecordBatchReader",{enumerable:!0,get:function(){return D.RecordBatchReader}});Object.defineProperty(b,"RecordBatchFileReader",{enumerable:!0,get:function(){return D.RecordBatchFileReader}});Object.defineProperty(b,"RecordBatchStreamReader",{enumerable:!0,get:function(){return D.RecordBatchStreamReader}});Object.defineProperty(b,"AsyncRecordBatchFileReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchFileReader}});Object.defineProperty(b,"AsyncRecordBatchStreamReader",{enumerable:!0,get:function(){return D.AsyncRecordBatchStreamReader}});Object.defineProperty(b,"RecordBatchWriter",{enumerable:!0,get:function(){return D.RecordBatchWriter}});Object.defineProperty(b,"RecordBatchFileWriter",{enumerable:!0,get:function(){return D.RecordBatchFileWriter}});Object.defineProperty(b,"RecordBatchStreamWriter",{enumerable:!0,get:function(){return D.RecordBatchStreamWriter}});Object.defineProperty(b,"RecordBatchJSONWriter",{enumerable:!0,get:function(){return D.RecordBatchJSONWriter}});Object.defineProperty(b,"MessageReader",{enumerable:!0,get:function(){return D.MessageReader}});Object.defineProperty(b,"AsyncMessageReader",{enumerable:!0,get:function(){return D.AsyncMessageReader}});Object.defineProperty(b,"JSONMessageReader",{enumerable:!0,get:function(){return D.JSONMessageReader}});Object.defineProperty(b,"Message",{enumerable:!0,get:function(){return D.Message}});Object.defineProperty(b,"RecordBatch",{enumerable:!0,get:function(){return D.RecordBatch}});Object.defineProperty(b,"DataFrame",{enumerable:!0,get:function(){return D.DataFrame}});Object.defineProperty(b,"FilteredDataFrame",{enumerable:!0,get:function(){return D.FilteredDataFrame}});Object.defineProperty(b,"CountByResult",{enumerable:!0,get:function(){return D.CountByResult}});Object.defineProperty(b,"predicate",{enumerable:!0,get:function(){return D.predicate}});Object.defineProperty(b,"util",{enumerable:!0,get:function(){return D.util}});Object.defineProperty(b,"Builder",{enumerable:!0,get:function(){return D.Builder}});Object.defineProperty(b,"BinaryBuilder",{enumerable:!0,get:function(){return D.BinaryBuilder}});Object.defineProperty(b,"BoolBuilder",{enumerable:!0,get:function(){return D.BoolBuilder}});Object.defineProperty(b,"DateBuilder",{enumerable:!0,get:function(){return D.DateBuilder}});Object.defineProperty(b,"DateDayBuilder",{enumerable:!0,get:function(){return D.DateDayBuilder}});Object.defineProperty(b,"DateMillisecondBuilder",{enumerable:!0,get:function(){return D.DateMillisecondBuilder}});Object.defineProperty(b,"DecimalBuilder",{enumerable:!0,get:function(){return D.DecimalBuilder}});Object.defineProperty(b,"DictionaryBuilder",{enumerable:!0,get:function(){return D.DictionaryBuilder}});Object.defineProperty(b,"FixedSizeBinaryBuilder",{enumerable:!0,get:function(){return D.FixedSizeBinaryBuilder}});Object.defineProperty(b,"FixedSizeListBuilder",{enumerable:!0,get:function(){return D.FixedSizeListBuilder}});Object.defineProperty(b,"FloatBuilder",{enumerable:!0,get:function(){return D.FloatBuilder}});Object.defineProperty(b,"Float16Builder",{enumerable:!0,get:function(){return D.Float16Builder}});Object.defineProperty(b,"Float32Builder",{enumerable:!0,get:function(){return D.Float32Builder}});Object.defineProperty(b,"Float64Builder",{enumerable:!0,get:function(){return D.Float64Builder}});Object.defineProperty(b,"IntervalBuilder",{enumerable:!0,get:function(){return D.IntervalBuilder}});Object.defineProperty(b,"IntervalDayTimeBuilder",{enumerable:!0,get:function(){return D.IntervalDayTimeBuilder}});Object.defineProperty(b,"IntervalYearMonthBuilder",{enumerable:!0,get:function(){return D.IntervalYearMonthBuilder}});Object.defineProperty(b,"IntBuilder",{enumerable:!0,get:function(){return D.IntBuilder}});Object.defineProperty(b,"Int8Builder",{enumerable:!0,get:function(){return D.Int8Builder}});Object.defineProperty(b,"Int16Builder",{enumerable:!0,get:function(){return D.Int16Builder}});Object.defineProperty(b,"Int32Builder",{enumerable:!0,get:function(){return D.Int32Builder}});Object.defineProperty(b,"Int64Builder",{enumerable:!0,get:function(){return D.Int64Builder}});Object.defineProperty(b,"Uint8Builder",{enumerable:!0,get:function(){return D.Uint8Builder}});Object.defineProperty(b,"Uint16Builder",{enumerable:!0,get:function(){return D.Uint16Builder}});Object.defineProperty(b,"Uint32Builder",{enumerable:!0,get:function(){return D.Uint32Builder}});Object.defineProperty(b,"Uint64Builder",{enumerable:!0,get:function(){return D.Uint64Builder}});Object.defineProperty(b,"ListBuilder",{enumerable:!0,get:function(){return D.ListBuilder}});Object.defineProperty(b,"MapBuilder",{enumerable:!0,get:function(){return D.MapBuilder}});Object.defineProperty(b,"NullBuilder",{enumerable:!0,get:function(){return D.NullBuilder}});Object.defineProperty(b,"StructBuilder",{enumerable:!0,get:function(){return D.StructBuilder}});Object.defineProperty(b,"TimestampBuilder",{enumerable:!0,get:function(){return D.TimestampBuilder}});Object.defineProperty(b,"TimestampSecondBuilder",{enumerable:!0,get:function(){return D.TimestampSecondBuilder}});Object.defineProperty(b,"TimestampMillisecondBuilder",{enumerable:!0,get:function(){return D.TimestampMillisecondBuilder}});Object.defineProperty(b,"TimestampMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimestampMicrosecondBuilder}});Object.defineProperty(b,"TimestampNanosecondBuilder",{enumerable:!0,get:function(){return D.TimestampNanosecondBuilder}});Object.defineProperty(b,"TimeBuilder",{enumerable:!0,get:function(){return D.TimeBuilder}});Object.defineProperty(b,"TimeSecondBuilder",{enumerable:!0,get:function(){return D.TimeSecondBuilder}});Object.defineProperty(b,"TimeMillisecondBuilder",{enumerable:!0,get:function(){return D.TimeMillisecondBuilder}});Object.defineProperty(b,"TimeMicrosecondBuilder",{enumerable:!0,get:function(){return D.TimeMicrosecondBuilder}});Object.defineProperty(b,"TimeNanosecondBuilder",{enumerable:!0,get:function(){return D.TimeNanosecondBuilder}});Object.defineProperty(b,"UnionBuilder",{enumerable:!0,get:function(){return D.UnionBuilder}});Object.defineProperty(b,"DenseUnionBuilder",{enumerable:!0,get:function(){return D.DenseUnionBuilder}});Object.defineProperty(b,"SparseUnionBuilder",{enumerable:!0,get:function(){return D.SparseUnionBuilder}});Object.defineProperty(b,"Utf8Builder",{enumerable:!0,get:function(){return D.Utf8Builder}})});var au=V(()=>{});var zd=V(()=>{});var Bv=V(()=>{});var BU={};SS(BU,{BROWSER_RUNTIME:()=>nt,ConsoleLogger:()=>Ay,DEFAULT_RUNTIME:()=>wv,DuckDB:()=>Sv,DuckDBBindings:()=>ou,DuckDBConnection:()=>nu,DuckDBDataProtocol:()=>Qe,DuckDBFeature:()=>Ed,FileStatistics:()=>su,InsertMode:()=>qd,JSONTableShape:()=>Ld,LogEvent:()=>br,LogLevel:()=>Nr,LogOrigin:()=>xr,LogTopic:()=>Bi,StatusCode:()=>je,VoidLogger:()=>Oy,callSRet:()=>Se,copyBuffer:()=>Gi,decodeText:()=>jv,dropResponseBuffers:()=>He,failWith:()=>We,getLogEventLabel:()=>AS,getLogLevelLabel:()=>OS,getLogOriginLabel:()=>MS,getLogTopicLabel:()=>FS,readString:()=>ve});var Nr;(function(s){s[s.NONE=0]="NONE",s[s.DEBUG=1]="DEBUG",s[s.INFO=2]="INFO",s[s.WARNING=3]="WARNING",s[s.ERROR=4]="ERROR"})(Nr||(Nr={}));var Bi;(function(s){s[s.NONE=0]="NONE",s[s.CONNECT=1]="CONNECT",s[s.DISCONNECT=2]="DISCONNECT",s[s.OPEN=3]="OPEN",s[s.QUERY=4]="QUERY"})(Bi||(Bi={}));var br;(function(c){c[c.NONE=0]="NONE",c[c.OK=1]="OK",c[c.ERROR=2]="ERROR",c[c.START=3]="START",c[c.RUN=4]="RUN",c[c.CAPTURE=5]="CAPTURE"})(br||(br={}));var xr;(function(s){s[s.NONE=0]="NONE",s[s.WEB_WORKER=1]="WEB_WORKER",s[s.NODE_WORKER=2]="NODE_WORKER",s[s.BINDINGS=3]="BINDINGS",s[s.ASYNC_DUCKDB=4]="ASYNC_DUCKDB"})(xr||(xr={}));var Oy=class{log(e){}},Ay=class{log(e){console.log(e)}};function OS(r){switch(r){case 0:return"NONE";case 1:return"DEBUG";case 2:return"INFO";case 3:return"WARNING";case 4:return"ERROR";default:return"?"}}function AS(r){switch(r){case 0:return"NONE";case 1:return"OK";case 2:return"ERROR";case 3:return"START";case 4:return"RUN";case 5:return"CAPTURE";default:return"?"}}function FS(r){switch(r){case 1:return"CONNECT";case 2:return"DISCONNECT";case 3:return"OPEN";case 4:return"QUERY";default:return"?"}}function MS(r){switch(r){case 0:return"NONE";case 1:return"WEB WORKER";case 2:return"NODE WORKER";case 3:return"DUCKDB BINDINGS";case 4:return"DUCKDB";default:return"?"}}var je;(function(e){e[e.SUCCESS=0]="SUCCESS"})(je||(je={}));var Rt=Dy(Nd()),xd=class{constructor(e,t,i){this.bindings=e;this.conn=t;this.header=i;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}},nu=class{constructor(e,t){this._bindings=e,this._conn=t}get handle(){return this._conn}close(){this._bindings.disconnect(this._conn)}runQuery(e){let t=this._bindings.runQuery(this._conn,e),i=Rt.RecordBatchReader.from(t);return console.assert(i.isSync()),console.assert(i.isFile()),Rt.Table.from(i)}sendQuery(e){let t=this._bindings.sendQuery(this._conn,e),i=new xd(this._bindings,this._conn,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isStream()),n}createPreparedStatement(e){return this._bindings.createPreparedStatement(this._conn,e)}closePreparedStatement(e){this._bindings.closePreparedStatement(this._conn,e)}runPreparedStatement(e,t){let i=this._bindings.runPreparedStatement(this._conn,e,t),n=Rt.RecordBatchReader.from(i);return console.assert(n.isSync()),console.assert(n.isFile()),Rt.Table.from(n)}sendPreparedStatement(e,t){let i=this._bindings.sendPreparedStatement(this._conn,e,t),n=new xd(this._bindings,this._conn,i),s=Rt.RecordBatchReader.from(n);return console.assert(s.isSync()),console.assert(s.isStream()),s}insertArrowTable(e,t){e.schema.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually"),this.insertArrowBatches(e.schema,e.chunks,t)}insertArrowBatches(e,t,i){e.fields.length==0&&console.warn("The schema is empty! If you used arrow.Table.from, consider constructing schema and batches manually");let n=new Rt.AsyncByteQueue,s=new Rt.RecordBatchStreamWriter().reset(n,e);s.writeAll(t),s.close();let c=s.toUint8Array(!0);this._bindings.insertArrowFromIPCStream(this._conn,c,i)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}};function jU(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer!="undefined"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}var jv=jU();function We(r,e){console.error(e),r.ccall("duckdb_web_fail_with",null,["string"],[e])}function Gi(r,e,t){let i=r.HEAPU8.subarray(e,e+t),n=new Uint8Array(new ArrayBuffer(i.byteLength));return n.set(i),n}function ve(r,e,t){return jv(r.HEAPU8.subarray(e,e+t))}var Qe;(function(i){i[i.BUFFER=0]="BUFFER",i[i.NATIVE=1]="NATIVE",i[i.HTTP=3]="HTTP"})(Qe||(Qe={}));function Se(r,e,t,i){let n=r.stackSave(),s=r.stackAlloc(3*8);t.unshift("number"),i.unshift(s),r.ccall(e,null,t,i);let c=r.HEAPF64[(s>>3)+0],v=r.HEAPF64[(s>>3)+1],I=r.HEAPF64[(s>>3)+2];return r.stackRestore(n),[c,v,I]}function He(r){r.ccall("duckdb_web_clear_response",null,[],[])}var wv={testPlatformFeature:(r,e)=>!1,openFile:(r,e)=>{},syncFile:(r,e)=>{},closeFile:(r,e)=>{},getLastFileModificationTime:(r,e)=>0,getFileSize:(r,e)=>0,truncateFile:(r,e,t)=>{},readFile:(r,e,t,i,n)=>0,writeFile:(r,e,t,i,n)=>0,removeDirectory:(r,e,t)=>{},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,glob:(r,e,t)=>{},moveFile:(r,e,t,i,n)=>{},checkFile:(r,e,t)=>!1,removeFile:(r,e,t)=>{}};var su=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),i=new Uint8Array(new ArrayBuffer(e.byteLength));i.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=i}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 de=Dy(Nd());function Ws(r,e){switch(e.typeId){case de.Type.Binary:return{name:r,type:"binary"};case de.Type.Bool:return{name:r,type:"bool"};case de.Type.Date:return{name:r,type:"date"};case de.Type.DateDay:return{name:r,type:"date32[d]"};case de.Type.DateMillisecond:return{name:r,type:"date64[ms]"};case de.Type.Decimal:{let t=e;return{name:r,type:"decimal",precision:t.precision,scale:t.scale}}case de.Type.Float:return{name:r,type:"float"};case de.Type.Float16:return{name:r,type:"float16"};case de.Type.Float32:return{name:r,type:"float32"};case de.Type.Float64:return{name:r,type:"float64"};case de.Type.Int:return{name:r,type:"int32"};case de.Type.Int16:return{name:r,type:"int16"};case de.Type.Int32:return{name:r,type:"int32"};case de.Type.Int64:return{name:r,type:"int64"};case de.Type.Uint16:return{name:r,type:"uint16"};case de.Type.Uint32:return{name:r,type:"uint32"};case de.Type.Uint64:return{name:r,type:"uint64"};case de.Type.Uint8:return{name:r,type:"uint8"};case de.Type.IntervalDayTime:return{name:r,type:"interval[dt]"};case de.Type.IntervalYearMonth:return{name:r,type:"interval[m]"};case de.Type.List:{let t=e;return{name:r,type:"list",children:[Ws(t.valueField.name,t.valueField.type)]}}case de.Type.FixedSizeBinary:return{name:r,type:"fixedsizebinary",byteWidth:e.byteWidth};case de.Type.Null:return{name:r,type:"null"};case de.Type.Utf8:return{name:r,type:"utf8"};case de.Type.Struct:return{name:r,type:"struct",children:e.children.map(i=>Ws(i.name,i.type))};case de.Type.Time:return{name:r,type:"time[s]"};case de.Type.TimeMicrosecond:return{name:r,type:"time[us]"};case de.Type.TimeMillisecond:return{name:r,type:"time[ms]"};case de.Type.TimeNanosecond:return{name:r,type:"time[ns]"};case de.Type.TimeSecond:return{name:r,type:"time[s]"};case de.Type.Timestamp:return{name:r,type:"timestamp",timezone:e.timezone||void 0};case de.Type.TimestampSecond:return{name:r,type:"timestamp[s]",timezone:e.timezone||void 0};case de.Type.TimestampMicrosecond:return{name:r,type:"timestamp[us]",timezone:e.timezone||void 0};case de.Type.TimestampNanosecond:return{name:r,type:"timestamp[ns]",timezone:e.timezone||void 0};case de.Type.TimestampMillisecond:return{name:r,type:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error(`unsupported arrow type: ${e.toString()}`)}var Ed;(function(s){s[s.WASM_EXCEPTIONS=1]="WASM_EXCEPTIONS",s[s.WASM_THREADS=2]="WASM_THREADS",s[s.WASM_SIMD=4]="WASM_SIMD",s[s.WASM_BULK_MEMORY=8]="WASM_BULK_MEMORY",s[s.EMIT_BIGINT=16]="EMIT_BIGINT"})(Ed||(Ed={}));var ou=class{constructor(e,t){this._instance=null;this._initPromise=null;this._initPromiseResolver=()=>{};this._logger=e,this._runtime=t}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(){return this._instance!=null?this:(this._initPromise!=null&&await this._initPromise,this._initPromise=new Promise(e=>{this._initPromiseResolver=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)}open(e){let[t,i,n]=Se(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));He(this.mod)}reset(){let[e,t,i]=Se(this.mod,"duckdb_web_reset",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));He(this.mod)}getVersion(){let[e,t,i]=Se(this.mod,"duckdb_web_get_version",[],[]);if(e!==je.SUCCESS)throw new Error(ve(this.mod,t,i));let n=ve(this.mod,t,i);return He(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,i,n]=Se(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=ve(this.mod,i,n);return He(this.mod),JSON.parse(s)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new nu(this,e)}disconnect(e){this.mod.ccall("duckdb_web_disconnect",null,["number"],[e])}runQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_run",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}sendQuery(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_query_send",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));let c=Gi(this.mod,n,s);return He(this.mod),c}fetchQueryResults(e){let[t,i,n]=Se(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=Gi(this.mod,i,n);return He(this.mod),s}createPreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_create",["number","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));return He(this.mod),n}closePreparedStatement(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_prepared_statement_close",["number","number"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}runPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_run",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}sendPreparedStatement(e,t,i){let[n,s,c]=Se(this.mod,"duckdb_web_prepared_statement_send",["number","number","string"],[e,t,JSON.stringify(i)]);if(n!==je.SUCCESS)throw new Error(ve(this.mod,s,c));let v=Gi(this.mod,s,c);return He(this.mod),v}insertArrowFromIPCStream(e,t,i){let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let c=i?JSON.stringify(i):"",[v,I,S]=Se(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,c]);if(v!==je.SUCCESS)throw new Error(ve(this.mod,I,S))}insertCSVFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,I]=Se(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,I))}insertJSONFromPath(e,t,i){if(i.columns!==void 0){i.columnsFlat=[];for(let S in i.columns)i.columnsFlat.push(Ws(S,i.columns[S]))}let n={...i};n.columns=n.columnsFlat,delete n.columnsFlat;let s=JSON.stringify(n),[c,v,I]=Se(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,s]);if(c!==je.SUCCESS)throw new Error(ve(this.mod,v,I))}finishInsert(e,t){}registerFileURL(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}registerFileBuffer(e,t){let i=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(i,i+t.length).set(t);let[s,c,v]=Se(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,i,t.length]);if(s!==je.SUCCESS)throw new Error(ve(this.mod,c,v));He(this.mod)}registerFileHandle(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,e]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));if(He(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){return this.mod.ccall("duckdb_web_fs_drop_file","boolean",["string"],[e])}dropFiles(){this.mod.ccall("duckdb_web_fs_drop_files",null,[],[])}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s));He(this.mod)}copyFileToBuffer(e){let[t,i,n]=Se(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));let s=this.mod.HEAPU8.subarray(i,i+n),c=new Uint8Array(s.length);return c.set(s),He(this.mod),c}collectFileStatistics(e,t){let[i,n,s]=Se(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(i!==je.SUCCESS)throw new Error(ve(this.mod,n,s))}exportFileStatistics(e){let[t,i,n]=Se(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==je.SUCCESS)throw new Error(ve(this.mod,i,n));return new su(this.mod.HEAPU8.subarray(i,i+n))}};var Ld;(function(t){t.ROW_ARRAY="row-array",t.COLUMN_OBJECT="column-object"})(Ld||(Ld={}));var qd;(function(t){t[t.APPEND=0]="APPEND",t[t.IMPORT=1]="IMPORT"})(qd||(qd={}));var Iv={},wU=function(){var r=Iv.url;return function(e){e=e||{};var t=typeof e!="undefined"?e:{},i,n;t.ready=new Promise(function(o,a){i=o,n=a});var s={},c;for(c in t)t.hasOwnProperty(c)&&(s[c]=t[c]);var v=[],I="./this.program",S=function(o,a){throw a},U=typeof window=="object",G=typeof importScripts=="function",me=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",fe="";function Gt(o){return t.locateFile?t.locateFile(o,fe):fe+o}var Cr,_r,Ji,Dv,Ki,Zi;me?(G?fe=au().dirname(fe)+"/":fe=__dirname+"/",Cr=function(a,u){return Ki||(Ki=zd()),Zi||(Zi=au()),a=Zi.normalize(a),Ki.readFileSync(a,u?null:"utf8")},Ji=function(a){var u=Cr(a,!0);return u.buffer||(u=new Uint8Array(u)),$d(u.buffer),u},_r=function(a,u,l){Ki||(Ki=zd()),Zi||(Zi=au()),a=Zi.normalize(a),Ki.readFile(a,function(d,f){d?l(d):u(f.buffer)})},process.argv.length>1&&(I=process.argv[1].replace(/\\/g,"/")),v=process.argv.slice(2),process.on("uncaughtException",function(o){if(!(o instanceof mu))throw o}),process.on("unhandledRejection",Nt),S=function(o,a){if(nf())throw process.exitCode=o,a;process.exit(o)},t.inspect=function(){return"[Emscripten Module object]"}):(U||G)&&(G?fe=self.location.href:typeof document!="undefined"&&document.currentScript&&(fe=document.currentScript.src),r&&(fe=r),fe.indexOf("blob:")!==0?fe=fe.substr(0,fe.lastIndexOf("/")+1):fe="",Cr=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},G&&(Ji=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),_r=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)},Dv=function(o){document.title=o});var Ov=t.print||console.log.bind(console),Pr=t.printErr||console.warn.bind(console);for(c in s)s.hasOwnProperty(c)&&(t[c]=s[c]);s=null,t.arguments&&(v=t.arguments),t.thisProgram&&(I=t.thisProgram),t.quit&&(S=t.quit);var Hd=0,ht=function(o){Hd=o},Av=function(){return Hd},es;t.wasmBinary&&(es=t.wasmBinary);var Fv=t.noExitRuntime||!0;typeof WebAssembly!="object"&&Nt("no native wasm support detected");var Hs,uu=!1,Yd;function $d(o,a){o||Nt("Assertion failed: "+a)}function Mv(o){var a=t["_"+o];return $d(a,"Cannot call unknown function "+o+", make sure it is exported"),a}function Vv(o,a,u,l,d){var f={string:function(M){var x=0;if(M!=null&&M!==0){var ue=(M.length<<2)+1;x=hu(ue),Uv(M,x,ue)}return x},array:function(M){var x=hu(M.length);return Zd(M,x),x}};function h(M){return a==="string"?Ys(M):a==="boolean"?Boolean(M):M}var p=Mv(o),y=[],m=0;if(l)for(var g=0;g<l.length;g++){var j=f[u[g]];j?(m===0&&(m=w()),y[g]=j(l[g])):y[g]=l[g]}var O=p.apply(null,y);return O=h(O),m!==0&&B(m),O}var Gd=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Jd(o,a,u){for(var l=a+u,d=a;o[d]&&!(d>=l);)++d;if(d-a>16&&o.subarray&&Gd)return Gd.decode(o.subarray(a,d));for(var f="";a<d;){var h=o[a++];if(!(h&128)){f+=String.fromCharCode(h);continue}var p=o[a++]&63;if((h&224)==192){f+=String.fromCharCode((h&31)<<6|p);continue}var y=o[a++]&63;if((h&240)==224?h=(h&15)<<12|p<<6|y:h=(h&7)<<18|p<<12|y<<6|o[a++]&63,h<65536)f+=String.fromCharCode(h);else{var m=h-65536;f+=String.fromCharCode(55296|m>>10,56320|m&1023)}}return f}function Ys(o,a){return o?Jd(Xi,o,a):""}function Kd(o,a,u,l){if(!(l>0))return 0;for(var d=u,f=u+l-1,h=0;h<o.length;++h){var p=o.charCodeAt(h);if(p>=55296&&p<=57343){var y=o.charCodeAt(++h);p=65536+((p&1023)<<10)|y&1023}if(p<=127){if(u>=f)break;a[u++]=p}else if(p<=2047){if(u+1>=f)break;a[u++]=192|p>>6,a[u++]=128|p&63}else if(p<=65535){if(u+2>=f)break;a[u++]=224|p>>12,a[u++]=128|p>>6&63,a[u++]=128|p&63}else{if(u+3>=f)break;a[u++]=240|p>>18,a[u++]=128|p>>12&63,a[u++]=128|p>>6&63,a[u++]=128|p&63}}return a[u]=0,u-d}function Uv(o,a,u){return Kd(o,Xi,a,u)}function Cv(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 Zd(o,a){Jt.set(o,a)}function Pv(o,a,u){for(var l=0;l<o.length;++l)Jt[a++>>0]=o.charCodeAt(l);u||(Jt[a>>0]=0)}function kv(o,a){return o%a>0&&(o+=a-o%a),o}var Xd,Jt,Xi,Rv,Nv,ae,xv,Ev,Lv;function Qd(o){Xd=o,t.HEAP8=Jt=new Int8Array(o),t.HEAP16=Rv=new Int16Array(o),t.HEAP32=ae=new Int32Array(o),t.HEAPU8=Xi=new Uint8Array(o),t.HEAPU16=Nv=new Uint16Array(o),t.HEAPU32=xv=new Uint32Array(o),t.HEAPF32=Ev=new Float32Array(o),t.HEAPF64=Lv=new Float64Array(o)}var TU=t.INITIAL_MEMORY||16777216,H,ef=[],tf=[],qv=[],rf=[],zv=!1,Wv=!1,Hv=0;function nf(){return Fv||Hv>0}function Yv(){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Zv(t.preRun.shift());$s(ef)}function $v(){zv=!0,$s(tf)}function Gv(){$s(qv)}function Jv(){Wv=!0}function Kv(){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Qv(t.postRun.shift());$s(rf)}function Zv(o){ef.unshift(o)}function Xv(o){tf.unshift(o)}function Qv(o){rf.unshift(o)}var ji=0,cu=null,ts=null;function ej(o){ji++,t.monitorRunDependencies&&t.monitorRunDependencies(ji)}function tj(o){if(ji--,t.monitorRunDependencies&&t.monitorRunDependencies(ji),ji==0&&(cu!==null&&(clearInterval(cu),cu=null),ts)){var a=ts;ts=null,a()}}t.preloadedImages={},t.preloadedAudios={};function Nt(o){t.onAbort&&t.onAbort(o),o+="",Pr(o),uu=!0,Yd=1,o="abort("+o+"). Build with -s ASSERTIONS=1 for more info.";var a=new WebAssembly.RuntimeError(o);throw n(a),a}var rj="data:application/octet-stream;base64,";function sf(o){return o.startsWith(rj)}var _t;t.locateFile?(_t="duckdb_wasm.wasm",sf(_t)||(_t=Gt(_t))):_t=new URL("duckdb_wasm.wasm",Iv.url).toString();function of(o){try{if(o==_t&&es)return new Uint8Array(es);if(Ji)return Ji(o);throw"both async and sync fetching of the wasm failed"}catch(a){Nt(a)}}function ij(){return!es&&(U||G)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(o){if(!o.ok)throw"failed to load wasm binary file at '"+_t+"'";return o.arrayBuffer()}).catch(function(){return of(_t)}):Promise.resolve().then(function(){return of(_t)})}function nj(){var o={a:B0};function a(h,p){var y=h.exports;t.asm=y,Hs=t.asm.xe,Qd(Hs.buffer),H=t.asm.Ae,Xv(t.asm.ye),tj("wasm-instantiate")}ej("wasm-instantiate");function u(h){a(h.instance)}function l(h){return ij().then(function(p){var y=WebAssembly.instantiate(p,o);return y}).then(h,function(p){Pr("failed to asynchronously prepare wasm: "+p),Nt(p)})}function d(){return!es&&typeof WebAssembly.instantiateStreaming=="function"&&!sf(_t)&&typeof fetch=="function"?fetch(_t,{credentials:"same-origin"}).then(function(h){var p=WebAssembly.instantiateStreaming(h,o);return p.then(u,function(y){return Pr("wasm streaming compile failed: "+y),Pr("falling back to ArrayBuffer instantiation"),l(u)})}):l(u)}if(t.instantiateWasm)try{var f=t.instantiateWasm(o,a);return f}catch(h){return Pr("Module.instantiateWasm callback failed with error: "+h),!1}return d().catch(n),{}}function $s(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?H.get(u)():H.get(u)(a.arg):u(a.arg===void 0?null:a.arg)}}function sj(o){return pu(o+16)+16}function Qi(o){this.excPtr=o,this.ptr=o-16,this.set_type=function(a){ae[this.ptr+4>>2]=a},this.get_type=function(){return ae[this.ptr+4>>2]},this.set_destructor=function(a){ae[this.ptr+8>>2]=a},this.get_destructor=function(){return ae[this.ptr+8>>2]},this.set_refcount=function(a){ae[this.ptr>>2]=a},this.set_caught=function(a){a=a?1:0,Jt[this.ptr+12>>0]=a},this.get_caught=function(){return Jt[this.ptr+12>>0]!=0},this.set_rethrown=function(a){a=a?1:0,Jt[this.ptr+13>>0]=a},this.get_rethrown=function(){return Jt[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=ae[this.ptr>>2];ae[this.ptr>>2]=a+1},this.release_ref=function(){var a=ae[this.ptr>>2];return ae[this.ptr>>2]=a-1,a===1}}function rs(o){this.free=function(){yu(this.ptr),this.ptr=0},this.set_base_ptr=function(a){ae[this.ptr>>2]=a},this.get_base_ptr=function(){return ae[this.ptr>>2]},this.set_adjusted_ptr=function(a){ae[this.ptr+4>>2]=a},this.get_adjusted_ptr_addr=function(){return this.ptr+4},this.get_adjusted_ptr=function(){return ae[this.ptr+4>>2]},this.get_exception_ptr=function(){var a=cf(this.get_exception_info().get_type());if(a)return ae[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 Qi(this.get_base_ptr())},o===void 0?(this.ptr=pu(8),this.set_adjusted_ptr(0)):this.ptr=o}var Gs=[];function oj(o){o.add_ref()}var Js=0;function aj(o){var a=new rs(o),u=a.get_exception_info();return u.get_caught()||(u.set_caught(!0),Js--),u.set_rethrown(!1),Gs.push(a),oj(u),a.get_exception_ptr()}var kr=0;function af(o){return yu(new Qi(o).ptr)}function uj(o){if(o.release_ref()&&!o.get_rethrown()){var a=o.get_destructor();a&&H.get(a)(o.excPtr),af(o.excPtr)}}function cj(){T(0);var o=Gs.pop();uj(o.get_exception_info()),o.free(),kr=0}function lj(o){var a=new rs(o),u=a.get_base_ptr();throw kr||(kr=u),a.free(),u}function dj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(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(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function fj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(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(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function hj(){var o=kr;if(!o)return ht(0),0|0;var a=new Qi(o),u=a.get_type(),l=new rs;if(l.set_base_ptr(o),l.set_adjusted_ptr(o),!u)return ht(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(to(h,u,l.get_adjusted_ptr_addr()))return ht(h),l.ptr|0}return ht(u),l.ptr|0}function pj(){var o=Gs.pop();o||Nt("no exception to throw");var a=o.get_exception_info(),u=o.get_base_ptr();throw a.get_rethrown()?o.free():(Gs.push(o),a.set_rethrown(!0),a.set_caught(!1),Js++),kr=u,u}function yj(o,a,u){var l=new Qi(o);throw l.init(a,u),kr=o,Js++,o}function mj(){return Js}var Je={mappings:{},buffers:[null,[],[]],printChar:function(o,a){var u=Je.buffers[o];a===0||a===10?((o===1?Ov:Pr)(Jd(u,0)),u.length=0):u.push(a)},varargs:void 0,get:function(){Je.varargs+=4;var o=ae[Je.varargs-4>>2];return o},getStr:function(o){var a=Ys(o);return a},get64:function(o,a){return o}};function _j(o,a){return o=Je.getStr(o),Je.doAccess(o,a)}function bj(o){return ae[uf()>>2]=o,o}function gj(o,a,u){return Je.varargs=u,0}function vj(o,a){}function jj(o,a,u,l){}function wj(o,a,u){}function Bj(){return 42}function Tj(o,a,u){return Je.varargs=u,0}var Ij=function(o,a,u){return Pr("warning: unsupported syscall: __sys_madvise1"),0};function Sj(o,a){return o=Je.getStr(o),Je.doMkdir(o,a)}function Dj(o,a,u){Je.varargs=u}function Oj(o,a){}function Aj(o){}function Fj(o,a){}function Mj(o){}function Vj(){Nt()}var lu;me?lu=function(){var o=process.hrtime();return o[0]*1e3+o[1]/1e6}:lu=function(){return performance.now()};var Uj=!0;function Cj(o,a){var u;if(o===0)u=Date.now();else if((o===1||o===4)&&Uj)u=lu();else return bj(28),-1;return ae[a>>2]=u/1e3|0,ae[a+4>>2]=u%1e3*1e3*1e3|0,0}function Pj(o,a){Nt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function kj(o,a){Nt("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Rj(o,a){return globalThis.DUCKDB_RUNTIME.createDirectory(t,o,a)}function Nj(o,a){return globalThis.DUCKDB_RUNTIME.checkDirectory(t,o,a)}function xj(o,a){return globalThis.DUCKDB_RUNTIME.listDirectoryEntries(t,o,a)}function Ej(o,a){return globalThis.DUCKDB_RUNTIME.removeDirectory(t,o,a)}function Lj(o){return globalThis.DUCKDB_RUNTIME.closeFile(t,o)}function qj(o,a){return globalThis.DUCKDB_RUNTIME.checkFile(t,o,a)}function zj(o){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(t,o)}function Wj(o){return globalThis.DUCKDB_RUNTIME.getFileSize(t,o)}function Hj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.moveFile(t,o,a,u,l)}function Yj(o){return globalThis.DUCKDB_RUNTIME.openFile(t,o)}function $j(o,a,u,l){return globalThis.DUCKDB_RUNTIME.readFile(t,o,a,u,l)}function Gj(o,a){return globalThis.DUCKDB_RUNTIME.truncateFile(t,o,a)}function Jj(o,a,u,l){return globalThis.DUCKDB_RUNTIME.writeFile(t,o,a,u,l)}function Kj(o,a){return globalThis.DUCKDB_RUNTIME.glob(t,o,a)}function Zj(o){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(t,o)}function Xj(){return 2147483648}function Qj(o,a,u){Xi.copyWithin(o,a,a+u)}function e0(o){try{return Hs.grow(o-Xd.byteLength+65535>>>16),Qd(Hs.buffer),1}catch(a){}}function t0(o){var a=Xi.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,kv(Math.max(o,d),65536)),h=e0(f);if(h)return!0}return!1}var du={};function r0(){return I||"./this.program"}function is(){if(!is.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,_:r0()};for(var u in du)du[u]===void 0?delete a[u]:a[u]=du[u];var l=[];for(var u in a)l.push(u+"="+a[u]);is.strings=l}return is.strings}function i0(o,a){var u=0;return is().forEach(function(l,d){var f=a+u;ae[o+d*4>>2]=f,Pv(l,f),u+=l.length+1}),0}function n0(o,a){var u=is();ae[o>>2]=u.length;var l=0;return u.forEach(function(d){l+=d.length+1}),ae[a>>2]=l,0}function s0(o){return 0}function o0(o,a){var u=o==1||o==2?2:Nt();return Jt[a>>0]=u,0}function a0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doReadv(h,a,u,l);return ae[f>>2]=p,0}function u0(o,a,u,l,d,f){var h=Je.getStreamFromFD(o),p=Je.doWritev(h,a,u,l);return ae[f>>2]=p,0}function c0(o,a,u,l){var d=Je.getStreamFromFD(o),f=Je.doReadv(d,a,u);return ae[l>>2]=f,0}function l0(o,a,u,l,d){}function d0(o){var a=Je.getStreamFromFD(o);return a.stream_ops&&a.stream_ops.fsync?-a.stream_ops.fsync(a):0}function f0(o,a,u,l){for(var d=0,f=0;f<u;f++){for(var h=ae[a+f*8>>2],p=ae[a+(f*8+4)>>2],y=0;y<p;y++)Je.printChar(o,Xi[h+y]);d+=p}return ae[l>>2]=d,0}function h0(){return Av()}function p0(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var o=new Uint8Array(1);return function(){return crypto.getRandomValues(o),o[0]}}else if(me)try{var a=Bv();return function(){return a.randomBytes(1)[0]}}catch(u){}return function(){Nt("randomDevice")}}function Ks(o,a){Ks.randomDevice||(Ks.randomDevice=p0());for(var u=0;u<a;u++)Jt[o+u>>0]=Ks.randomDevice();return 0}function y0(o){return o}function m0(o){ht(o)}var _0=0;function b0(o,a,u){return o==14&&(_0=ae[a>>2]),0}function g0(o,a,u){return b0(o,a,u)}function Zs(o){return o%4==0&&(o%100!=0||o%400==0)}function fu(o,a){for(var u=0,l=0;l<=a;u+=o[l++]);return u}var Xs=[31,29,31,30,31,30,31,31,30,31,30,31],Qs=[31,28,31,30,31,30,31,31,30,31,30,31];function eo(o,a){for(var u=new Date(o.getTime());a>0;){var l=Zs(u.getFullYear()),d=u.getMonth(),f=(l?Xs:Qs)[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 v0(o,a,u,l){var d=ae[l+40>>2],f={tm_sec:ae[l>>2],tm_min:ae[l+4>>2],tm_hour:ae[l+8>>2],tm_mday:ae[l+12>>2],tm_mon:ae[l+16>>2],tm_year:ae[l+20>>2],tm_wday:ae[l+24>>2],tm_yday:ae[l+28>>2],tm_isdst:ae[l+32>>2],tm_gmtoff:ae[l+36>>2],tm_zone:d?Ys(d):""},h=Ys(u),p={"%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 y in p)h=h.replace(new RegExp(y,"g"),p[y]);var m=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g=["January","February","March","April","May","June","July","August","September","October","November","December"];function j(P,$,Ae){for(var ye=typeof P=="number"?P.toString():P||"";ye.length<$;)ye=Ae[0]+ye;return ye}function O(P,$){return j(P,$,"0")}function M(P,$){function Ae(at){return at<0?-1:at>0?1:0}var ye;return(ye=Ae(P.getFullYear()-$.getFullYear()))===0&&(ye=Ae(P.getMonth()-$.getMonth()))===0&&(ye=Ae(P.getDate()-$.getDate())),ye}function x(P){switch(P.getDay()){case 0:return new Date(P.getFullYear()-1,11,29);case 1:return P;case 2:return new Date(P.getFullYear(),0,3);case 3:return new Date(P.getFullYear(),0,2);case 4:return new Date(P.getFullYear(),0,1);case 5:return new Date(P.getFullYear()-1,11,31);case 6:return new Date(P.getFullYear()-1,11,30)}}function ue(P){var $=eo(new Date(P.tm_year+1900,0,1),P.tm_yday),Ae=new Date($.getFullYear(),0,4),ye=new Date($.getFullYear()+1,0,4),at=x(Ae),Rr=x(ye);return M(at,$)<=0?M(Rr,$)<=0?$.getFullYear()+1:$.getFullYear():$.getFullYear()-1}var _e={"%a":function(P){return m[P.tm_wday].substring(0,3)},"%A":function(P){return m[P.tm_wday]},"%b":function(P){return g[P.tm_mon].substring(0,3)},"%B":function(P){return g[P.tm_mon]},"%C":function(P){var $=P.tm_year+1900;return O($/100|0,2)},"%d":function(P){return O(P.tm_mday,2)},"%e":function(P){return j(P.tm_mday,2," ")},"%g":function(P){return ue(P).toString().substring(2)},"%G":function(P){return ue(P)},"%H":function(P){return O(P.tm_hour,2)},"%I":function(P){var $=P.tm_hour;return $==0?$=12:$>12&&($-=12),O($,2)},"%j":function(P){return O(P.tm_mday+fu(Zs(P.tm_year+1900)?Xs:Qs,P.tm_mon-1),3)},"%m":function(P){return O(P.tm_mon+1,2)},"%M":function(P){return O(P.tm_min,2)},"%n":function(){return`
|
|
18
|
+
`},"%p":function(P){return P.tm_hour>=0&&P.tm_hour<12?"AM":"PM"},"%S":function(P){return O(P.tm_sec,2)},"%t":function(){return" "},"%u":function(P){return P.tm_wday||7},"%U":function(P){var $=new Date(P.tm_year+1900,0,1),Ae=$.getDay()===0?$:eo($,7-$.getDay()),ye=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,ye)<0){var at=fu(Zs(ye.getFullYear())?Xs:Qs,ye.getMonth()-1)-31,Rr=31-Ae.getDate(),wi=Rr+at+ye.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===0?"01":"00"},"%V":function(P){var $=new Date(P.tm_year+1900,0,4),Ae=new Date(P.tm_year+1901,0,4),ye=x($),at=x(Ae),Rr=eo(new Date(P.tm_year+1900,0,1),P.tm_yday);if(M(Rr,ye)<0)return"53";if(M(at,Rr)<=0)return"01";var wi;return ye.getFullYear()<P.tm_year+1900?wi=P.tm_yday+32-ye.getDate():wi=P.tm_yday+1-ye.getDate(),O(Math.ceil(wi/7),2)},"%w":function(P){return P.tm_wday},"%W":function(P){var $=new Date(P.tm_year,0,1),Ae=$.getDay()===1?$:eo($,$.getDay()===0?1:7-$.getDay()+1),ye=new Date(P.tm_year+1900,P.tm_mon,P.tm_mday);if(M(Ae,ye)<0){var at=fu(Zs(ye.getFullYear())?Xs:Qs,ye.getMonth()-1)-31,Rr=31-Ae.getDate(),wi=Rr+at+ye.getDate();return O(Math.ceil(wi/7),2)}return M(Ae,$)===0?"01":"00"},"%y":function(P){return(P.tm_year+1900).toString().substring(2)},"%Y":function(P){return P.tm_year+1900},"%z":function(P){var $=P.tm_gmtoff,Ae=$>=0;return $=Math.abs($)/60,$=$/60*100+$%60,(Ae?"+":"-")+String("0000"+$).slice(-4)},"%Z":function(P){return P.tm_zone},"%%":function(){return"%"}};for(var y in _e)h.includes(y)&&(h=h.replace(new RegExp(y,"g"),_e[y](f)));var Be=w0(h,!1);return Be.length>a?0:(Zd(Be,o),Be.length-1)}function j0(o,a,u,l){return v0(o,a,u,l)}function w0(o,a,u){var l=u>0?u:Cv(o)+1,d=new Array(l),f=Kd(o,d,0,d.length);return a&&(d.length=f),d}var B0={i:sj,A:aj,G:cj,b:dj,n:fj,I:hj,j:af,ra:pj,t:yj,E:mj,c:lj,se:_j,ea:gj,La:vj,Ka:jj,Ma:wj,la:Bj,Oa:Tj,Ja:Ij,Na:Sj,oa:Dj,qe:Oj,ka:Aj,na:Fj,ma:Mj,fa:Vj,ja:Cj,ua:Pj,we:kj,Aa:Rj,Ba:Nj,ya:xj,za:Ej,Ta:Lj,wa:qj,Da:zj,Fa:Wj,xa:Hj,Ga:Yj,da:$j,Ca:Gj,Ea:Jj,va:Kj,oe:Zj,qb:Xj,Ua:Qj,Ic:t0,Qa:i0,Ra:n0,_:s0,Sa:o0,ce:a0,ob:u0,qa:c0,je:l0,re:d0,ga:f0,a:h0,Ha:Ks,W:Gw,K:Aw,R:pw,wb:WI,X:$w,M:Ww,sa:hw,xb:zI,u:bw,U:rB,ue:Zw,Y:Ew,V:tB,ve:Kw,e:ow,aa:Lw,B:Rw,Lb:AI,d:aw,$:Jw,ta:Xw,h:cw,Ib:VI,l:fw,pa:Dw,o:lw,z:ww,w:gw,Q:zw,x:vw,v:Bw,p:kw,L:Mw,J:Vw,Mb:OI,Pb:II,Rb:BI,Nb:DI,Jb:MI,Qb:TI,qc:ZT,he:uB,jd:sT,cd:fT,ge:cB,Ac:LT,xd:HB,Xa:yS,Wa:mS,Wd:vB,id:oT,Qc:ST,Qd:SB,Vb:gI,Bc:ET,Va:_S,Xd:gB,Ud:wB,Dc:NT,dd:dT,Id:CB,ad:pT,kb:eS,Vd:jB,$d:yB,Sd:TB,wd:YB,fb:sS,Ya:pS,kd:nT,fe:lB,Yc:bT,cb:uS,vb:HI,ed:lT,gb:nS,tc:GT,Td:BB,Zc:_T,vd:$B,$c:yT,_c:mT,Uc:wT,oc:QT,Mc:FT,Pc:DT,Oc:OT,Tb:jI,Nc:AT,de:fB,Bb:xI,Cb:NI,le:sB,ke:oB,hd:aT,ne:iB,Xb:_I,Ub:vI,Ob:SI,Wb:bI,Fb:PI,wc:HT,ub:YI,Hb:UI,Gb:CI,Fd:RB,Kb:FI,Eb:kI,_b:pI,zd:zB,Kc:VT,Bd:LB,qd:XB,Ab:EI,zb:LI,jc:nI,yb:qI,Gd:kB,rc:KT,od:eT,Za:hS,bc:dI,mb:XI,md:rT,Lc:MT,Gc:PT,s:nw,k:uw,C:Uw,ba:Pw,rb:JI,D:Nw,ca:Cw,sb:GI,f:sw,T:mw,O:Hw,dc:yw,g:_w,m:dw,te:Qw,q:Fw,r:Sw,ia:qw,y:jw,P:Ow,N:xw,S:Tw,pe:eB,ha:Yw,Z:Iw,Xc:gT,pb:KI,yd:WB,Ec:RT,Nd:AB,pc:XT,uc:$T,jb:tS,Dd:xB,zc:qT,db:aS,Sc:TT,Tc:BT,Hc:CT,Od:OB,xc:WT,vc:YT,kc:iI,Rd:IB,Rc:IT,Wc:vT,Yb:mI,gc:aI,Jd:UB,Kd:VB,hb:iS,Pd:DB,Ld:MB,yc:zT,ec:cI,nc:eI,Vc:jT,eb:oS,be:hB,ee:dB,ie:aB,bd:hT,Zb:yI,Md:FB,ic:sI,hc:oI,pd:QB,ib:rS,Ad:qB,ud:GB,_a:fS,fc:uI,lb:QI,me:nB,_d:mB,sd:KB,lc:rI,$b:hI,Sb:wI,Zd:_B,Yd:bB,td:JB,gd:uT,fd:cT,nd:tT,tb:$I,ld:iT,cc:lI,Db:RI,bb:cS,mc:tI,nb:ZI,rd:ZB,Cc:xT,$a:dS,ab:lS,ac:fI,ae:pB,Ed:NB,Fc:kT,Jc:UT,sc:JT,Hd:PB,Cd:EB,H:y0,F:m0,Ia:g0,Pa:j0},IU=nj(),T0=t.___wasm_call_ctors=function(){return(T0=t.___wasm_call_ctors=t.asm.ye).apply(null,arguments)},I0=t._main=function(){return(I0=t._main=t.asm.ze).apply(null,arguments)},S0=t._duckdb_web_fs_glob_add_path=function(){return(S0=t._duckdb_web_fs_glob_add_path=t.asm.Be).apply(null,arguments)},D0=t._duckdb_web_clear_response=function(){return(D0=t._duckdb_web_clear_response=t.asm.Ce).apply(null,arguments)},O0=t._duckdb_web_fail_with=function(){return(O0=t._duckdb_web_fail_with=t.asm.De).apply(null,arguments)},A0=t._duckdb_web_reset=function(){return(A0=t._duckdb_web_reset=t.asm.Ee).apply(null,arguments)},F0=t._duckdb_web_connect=function(){return(F0=t._duckdb_web_connect=t.asm.Fe).apply(null,arguments)},M0=t._duckdb_web_disconnect=function(){return(M0=t._duckdb_web_disconnect=t.asm.Ge).apply(null,arguments)},V0=t._duckdb_web_flush_files=function(){return(V0=t._duckdb_web_flush_files=t.asm.He).apply(null,arguments)},U0=t._duckdb_web_flush_file=function(){return(U0=t._duckdb_web_flush_file=t.asm.Ie).apply(null,arguments)},C0=t._duckdb_web_open=function(){return(C0=t._duckdb_web_open=t.asm.Je).apply(null,arguments)},P0=t._duckdb_web_collect_file_stats=function(){return(P0=t._duckdb_web_collect_file_stats=t.asm.Ke).apply(null,arguments)},k0=t._duckdb_web_export_file_stats=function(){return(k0=t._duckdb_web_export_file_stats=t.asm.Le).apply(null,arguments)},R0=t._duckdb_web_fs_drop_file=function(){return(R0=t._duckdb_web_fs_drop_file=t.asm.Me).apply(null,arguments)},N0=t._duckdb_web_fs_drop_files=function(){return(N0=t._duckdb_web_fs_drop_files=t.asm.Ne).apply(null,arguments)},x0=t._duckdb_web_fs_get_file_info=function(){return(x0=t._duckdb_web_fs_get_file_info=t.asm.Oe).apply(null,arguments)},E0=t._duckdb_web_fs_set_file_descriptor=function(){return(E0=t._duckdb_web_fs_set_file_descriptor=t.asm.Pe).apply(null,arguments)},L0=t._duckdb_web_fs_register_file_url=function(){return(L0=t._duckdb_web_fs_register_file_url=t.asm.Qe).apply(null,arguments)},q0=t._duckdb_web_fs_register_file_buffer=function(){return(q0=t._duckdb_web_fs_register_file_buffer=t.asm.Re).apply(null,arguments)},z0=t._duckdb_web_copy_file_to_buffer=function(){return(z0=t._duckdb_web_copy_file_to_buffer=t.asm.Se).apply(null,arguments)},W0=t._duckdb_web_copy_file_to_path=function(){return(W0=t._duckdb_web_copy_file_to_path=t.asm.Te).apply(null,arguments)},H0=t._duckdb_web_get_version=function(){return(H0=t._duckdb_web_get_version=t.asm.Ue).apply(null,arguments)},Y0=t._duckdb_web_get_feature_flags=function(){return(Y0=t._duckdb_web_get_feature_flags=t.asm.Ve).apply(null,arguments)},$0=t._duckdb_web_tokenize=function(){return($0=t._duckdb_web_tokenize=t.asm.We).apply(null,arguments)},G0=t._duckdb_web_prepared_statement_create=function(){return(G0=t._duckdb_web_prepared_statement_create=t.asm.Xe).apply(null,arguments)},J0=t._duckdb_web_prepared_statement_close=function(){return(J0=t._duckdb_web_prepared_statement_close=t.asm.Ye).apply(null,arguments)},K0=t._duckdb_web_prepared_statement_run=function(){return(K0=t._duckdb_web_prepared_statement_run=t.asm.Ze).apply(null,arguments)},Z0=t._duckdb_web_prepared_statement_send=function(){return(Z0=t._duckdb_web_prepared_statement_send=t.asm._e).apply(null,arguments)},X0=t._duckdb_web_query_run=function(){return(X0=t._duckdb_web_query_run=t.asm.$e).apply(null,arguments)},Q0=t._duckdb_web_query_send=function(){return(Q0=t._duckdb_web_query_send=t.asm.af).apply(null,arguments)},ew=t._duckdb_web_query_fetch_results=function(){return(ew=t._duckdb_web_query_fetch_results=t.asm.bf).apply(null,arguments)},tw=t._duckdb_web_insert_arrow_from_ipc_stream=function(){return(tw=t._duckdb_web_insert_arrow_from_ipc_stream=t.asm.cf).apply(null,arguments)},rw=t._duckdb_web_insert_csv_from_path=function(){return(rw=t._duckdb_web_insert_csv_from_path=t.asm.df).apply(null,arguments)},iw=t._duckdb_web_insert_json_from_path=function(){return(iw=t._duckdb_web_insert_json_from_path=t.asm.ef).apply(null,arguments)},uf=t.___errno_location=function(){return(uf=t.___errno_location=t.asm.ff).apply(null,arguments)},w=t.stackSave=function(){return(w=t.stackSave=t.asm.gf).apply(null,arguments)},B=t.stackRestore=function(){return(B=t.stackRestore=t.asm.hf).apply(null,arguments)},hu=t.stackAlloc=function(){return(hu=t.stackAlloc=t.asm.jf).apply(null,arguments)},T=t._setThrew=function(){return(T=t._setThrew=t.asm.kf).apply(null,arguments)},to=t.___cxa_can_catch=function(){return(to=t.___cxa_can_catch=t.asm.lf).apply(null,arguments)},cf=t.___cxa_is_pointer_type=function(){return(cf=t.___cxa_is_pointer_type=t.asm.mf).apply(null,arguments)},pu=t._malloc=function(){return(pu=t._malloc=t.asm.nf).apply(null,arguments)},yu=t._free=function(){return(yu=t._free=t.asm.of).apply(null,arguments)},lf=t.dynCall_jiji=function(){return(lf=t.dynCall_jiji=t.asm.pf).apply(null,arguments)},df=t.dynCall_jiiii=function(){return(df=t.dynCall_jiiii=t.asm.qf).apply(null,arguments)},ff=t.dynCall_iiiiij=function(){return(ff=t.dynCall_iiiiij=t.asm.rf).apply(null,arguments)},hf=t.dynCall_iiiiijj=function(){return(hf=t.dynCall_iiiiijj=t.asm.sf).apply(null,arguments)},pf=t.dynCall_viijii=function(){return(pf=t.dynCall_viijii=t.asm.tf).apply(null,arguments)},yf=t.dynCall_j=function(){return(yf=t.dynCall_j=t.asm.uf).apply(null,arguments)},mf=t.dynCall_ji=function(){return(mf=t.dynCall_ji=t.asm.vf).apply(null,arguments)},_f=t.dynCall_iij=function(){return(_f=t.dynCall_iij=t.asm.wf).apply(null,arguments)},bf=t.dynCall_viij=function(){return(bf=t.dynCall_viij=t.asm.xf).apply(null,arguments)},gf=t.dynCall_viijji=function(){return(gf=t.dynCall_viijji=t.asm.yf).apply(null,arguments)},vf=t.dynCall_viijj=function(){return(vf=t.dynCall_viijj=t.asm.zf).apply(null,arguments)},jf=t.dynCall_viiijj=function(){return(jf=t.dynCall_viiijj=t.asm.Af).apply(null,arguments)},wf=t.dynCall_viiji=function(){return(wf=t.dynCall_viiji=t.asm.Bf).apply(null,arguments)},Bf=t.dynCall_vijjj=function(){return(Bf=t.dynCall_vijjj=t.asm.Cf).apply(null,arguments)},Tf=t.dynCall_iiijj=function(){return(Tf=t.dynCall_iiijj=t.asm.Df).apply(null,arguments)},If=t.dynCall_viiij=function(){return(If=t.dynCall_viiij=t.asm.Ef).apply(null,arguments)},Sf=t.dynCall_viijij=function(){return(Sf=t.dynCall_viijij=t.asm.Ff).apply(null,arguments)},Df=t.dynCall_viji=function(){return(Df=t.dynCall_viji=t.asm.Gf).apply(null,arguments)},Of=t.dynCall_iiiijj=function(){return(Of=t.dynCall_iiiijj=t.asm.Hf).apply(null,arguments)},Af=t.dynCall_viijiiiii=function(){return(Af=t.dynCall_viijiiiii=t.asm.If).apply(null,arguments)},Ff=t.dynCall_viiiiijiiii=function(){return(Ff=t.dynCall_viiiiijiiii=t.asm.Jf).apply(null,arguments)},Mf=t.dynCall_viiiijj=function(){return(Mf=t.dynCall_viiiijj=t.asm.Kf).apply(null,arguments)},Vf=t.dynCall_iiijiiii=function(){return(Vf=t.dynCall_iiijiiii=t.asm.Lf).apply(null,arguments)},Uf=t.dynCall_vij=function(){return(Uf=t.dynCall_vij=t.asm.Mf).apply(null,arguments)},Cf=t.dynCall_jij=function(){return(Cf=t.dynCall_jij=t.asm.Nf).apply(null,arguments)},Pf=t.dynCall_jiiij=function(){return(Pf=t.dynCall_jiiij=t.asm.Of).apply(null,arguments)},kf=t.dynCall_iiij=function(){return(kf=t.dynCall_iiij=t.asm.Pf).apply(null,arguments)},Rf=t.dynCall_iiiiijjiijj=function(){return(Rf=t.dynCall_iiiiijjiijj=t.asm.Qf).apply(null,arguments)},Nf=t.dynCall_viijiijji=function(){return(Nf=t.dynCall_viijiijji=t.asm.Rf).apply(null,arguments)},xf=t.dynCall_vjjijij=function(){return(xf=t.dynCall_vjjijij=t.asm.Sf).apply(null,arguments)},Ef=t.dynCall_vijjji=function(){return(Ef=t.dynCall_vijjji=t.asm.Tf).apply(null,arguments)},Lf=t.dynCall_vjjii=function(){return(Lf=t.dynCall_vjjii=t.asm.Uf).apply(null,arguments)},qf=t.dynCall_viiiiiji=function(){return(qf=t.dynCall_viiiiiji=t.asm.Vf).apply(null,arguments)},zf=t.dynCall_jiiijji=function(){return(zf=t.dynCall_jiiijji=t.asm.Wf).apply(null,arguments)},Wf=t.dynCall_iijj=function(){return(Wf=t.dynCall_iijj=t.asm.Xf).apply(null,arguments)},Hf=t.dynCall_iiijjii=function(){return(Hf=t.dynCall_iiijjii=t.asm.Yf).apply(null,arguments)},Yf=t.dynCall_iijjii=function(){return(Yf=t.dynCall_iijjii=t.asm.Zf).apply(null,arguments)},$f=t.dynCall_viiiij=function(){return($f=t.dynCall_viiiij=t.asm._f).apply(null,arguments)},Gf=t.dynCall_vijii=function(){return(Gf=t.dynCall_vijii=t.asm.$f).apply(null,arguments)},Jf=t.dynCall_viijjii=function(){return(Jf=t.dynCall_viijjii=t.asm.ag).apply(null,arguments)},Kf=t.dynCall_vijj=function(){return(Kf=t.dynCall_vijj=t.asm.bg).apply(null,arguments)},Zf=t.dynCall_jijjij=function(){return(Zf=t.dynCall_jijjij=t.asm.cg).apply(null,arguments)},Xf=t.dynCall_jiijii=function(){return(Xf=t.dynCall_jiijii=t.asm.dg).apply(null,arguments)},Qf=t.dynCall_jijiii=function(){return(Qf=t.dynCall_jijiii=t.asm.eg).apply(null,arguments)},eh=t.dynCall_viijiiij=function(){return(eh=t.dynCall_viijiiij=t.asm.fg).apply(null,arguments)},th=t.dynCall_vijiiiji=function(){return(th=t.dynCall_vijiiiji=t.asm.gg).apply(null,arguments)},rh=t.dynCall_jiiji=function(){return(rh=t.dynCall_jiiji=t.asm.hg).apply(null,arguments)},ih=t.dynCall_viiijij=function(){return(ih=t.dynCall_viiijij=t.asm.ig).apply(null,arguments)},nh=t.dynCall_viijiijj=function(){return(nh=t.dynCall_viijiijj=t.asm.jg).apply(null,arguments)},sh=t.dynCall_viiiiijj=function(){return(sh=t.dynCall_viiiiijj=t.asm.kg).apply(null,arguments)},oh=t.dynCall_viiijji=function(){return(oh=t.dynCall_viiijji=t.asm.lg).apply(null,arguments)},ah=t.dynCall_iiiij=function(){return(ah=t.dynCall_iiiij=t.asm.mg).apply(null,arguments)},uh=t.dynCall_iiiiiji=function(){return(uh=t.dynCall_iiiiiji=t.asm.ng).apply(null,arguments)},ch=t.dynCall_iiiji=function(){return(ch=t.dynCall_iiiji=t.asm.og).apply(null,arguments)},lh=t.dynCall_iiiiji=function(){return(lh=t.dynCall_iiiiji=t.asm.pg).apply(null,arguments)},dh=t.dynCall_jii=function(){return(dh=t.dynCall_jii=t.asm.qg).apply(null,arguments)},fh=t.dynCall_jiii=function(){return(fh=t.dynCall_jiii=t.asm.rg).apply(null,arguments)},hh=t.dynCall_iijjijj=function(){return(hh=t.dynCall_iijjijj=t.asm.sg).apply(null,arguments)},ph=t.dynCall_viiiijiiiii=function(){return(ph=t.dynCall_viiiijiiiii=t.asm.tg).apply(null,arguments)},yh=t.dynCall_viiiijiiii=function(){return(yh=t.dynCall_viiiijiiii=t.asm.ug).apply(null,arguments)},mh=t.dynCall_viiijii=function(){return(mh=t.dynCall_viiijii=t.asm.vg).apply(null,arguments)},_h=t.dynCall_viiiiiij=function(){return(_h=t.dynCall_viiiiiij=t.asm.wg).apply(null,arguments)},bh=t.dynCall_viiijjj=function(){return(bh=t.dynCall_viiijjj=t.asm.xg).apply(null,arguments)},gh=t.dynCall_iiijiii=function(){return(gh=t.dynCall_iiijiii=t.asm.yg).apply(null,arguments)},vh=t.dynCall_iiiiijii=function(){return(vh=t.dynCall_iiiiijii=t.asm.zg).apply(null,arguments)},jh=t.dynCall_viijiii=function(){return(jh=t.dynCall_viijiii=t.asm.Ag).apply(null,arguments)},wh=t.dynCall_iiijiij=function(){return(wh=t.dynCall_iiijiij=t.asm.Bg).apply(null,arguments)},Bh=t.dynCall_vijiii=function(){return(Bh=t.dynCall_vijiii=t.asm.Cg).apply(null,arguments)},Th=t.dynCall_iijjiii=function(){return(Th=t.dynCall_iijjiii=t.asm.Dg).apply(null,arguments)},Ih=t.dynCall_iijjiiii=function(){return(Ih=t.dynCall_iijjiiii=t.asm.Eg).apply(null,arguments)},Sh=t.dynCall_iiji=function(){return(Sh=t.dynCall_iiji=t.asm.Fg).apply(null,arguments)},Dh=t.dynCall_iijji=function(){return(Dh=t.dynCall_iijji=t.asm.Gg).apply(null,arguments)},Oh=t.dynCall_vijiiii=function(){return(Oh=t.dynCall_vijiiii=t.asm.Hg).apply(null,arguments)},Ah=t.dynCall_iijiiii=function(){return(Ah=t.dynCall_iijiiii=t.asm.Ig).apply(null,arguments)},Fh=t.dynCall_viiiji=function(){return(Fh=t.dynCall_viiiji=t.asm.Jg).apply(null,arguments)},Mh=t.dynCall_iiiijiii=function(){return(Mh=t.dynCall_iiiijiii=t.asm.Kg).apply(null,arguments)},Vh=t.dynCall_vijij=function(){return(Vh=t.dynCall_vijij=t.asm.Lg).apply(null,arguments)},Uh=t.dynCall_iiijjjj=function(){return(Uh=t.dynCall_iiijjjj=t.asm.Mg).apply(null,arguments)},Ch=t.dynCall_jijj=function(){return(Ch=t.dynCall_jijj=t.asm.Ng).apply(null,arguments)},Ph=t.dynCall_viiiijiiiiiiii=function(){return(Ph=t.dynCall_viiiijiiiiiiii=t.asm.Og).apply(null,arguments)},kh=t.dynCall_ij=function(){return(kh=t.dynCall_ij=t.asm.Pg).apply(null,arguments)},Rh=t.dynCall_jj=function(){return(Rh=t.dynCall_jj=t.asm.Qg).apply(null,arguments)},Nh=t.dynCall_jjj=function(){return(Nh=t.dynCall_jjj=t.asm.Rg).apply(null,arguments)},xh=t.dynCall_iji=function(){return(xh=t.dynCall_iji=t.asm.Sg).apply(null,arguments)},Eh=t.dynCall_vjii=function(){return(Eh=t.dynCall_vjii=t.asm.Tg).apply(null,arguments)},Lh=t.dynCall_vjiiii=function(){return(Lh=t.dynCall_vjiiii=t.asm.Ug).apply(null,arguments)},qh=t.dynCall_viiiiijiii=function(){return(qh=t.dynCall_viiiiijiii=t.asm.Vg).apply(null,arguments)},zh=t.dynCall_vijji=function(){return(zh=t.dynCall_vijji=t.asm.Wg).apply(null,arguments)},Wh=t.dynCall_iiijii=function(){return(Wh=t.dynCall_iiijii=t.asm.Xg).apply(null,arguments)},Hh=t.dynCall_jiij=function(){return(Hh=t.dynCall_jiij=t.asm.Yg).apply(null,arguments)},Yh=t.dynCall_iiiijjii=function(){return(Yh=t.dynCall_iiiijjii=t.asm.Zg).apply(null,arguments)},$h=t.dynCall_iiiiijji=function(){return($h=t.dynCall_iiiiijji=t.asm._g).apply(null,arguments)},Gh=t.dynCall_viiiiji=function(){return(Gh=t.dynCall_viiiiji=t.asm.$g).apply(null,arguments)},Jh=t.dynCall_viiijjii=function(){return(Jh=t.dynCall_viiijjii=t.asm.ah).apply(null,arguments)},Kh=t.dynCall_viiiijji=function(){return(Kh=t.dynCall_viiiijji=t.asm.bh).apply(null,arguments)},Zh=t.dynCall_viiiijjii=function(){return(Zh=t.dynCall_viiiijjii=t.asm.ch).apply(null,arguments)},Xh=t.dynCall_viiiiijji=function(){return(Xh=t.dynCall_viiiiijji=t.asm.dh).apply(null,arguments)},Qh=t.dynCall_jiiiij=function(){return(Qh=t.dynCall_jiiiij=t.asm.eh).apply(null,arguments)},ep=t.dynCall_iijiji=function(){return(ep=t.dynCall_iijiji=t.asm.fh).apply(null,arguments)},tp=t.dynCall_viiijijiji=function(){return(tp=t.dynCall_viiijijiji=t.asm.gh).apply(null,arguments)},rp=t.dynCall_vjiiiji=function(){return(rp=t.dynCall_vjiiiji=t.asm.hh).apply(null,arguments)},ip=t.dynCall_viiijjij=function(){return(ip=t.dynCall_viiijjij=t.asm.ih).apply(null,arguments)},np=t.dynCall_vijijjiij=function(){return(np=t.dynCall_vijijjiij=t.asm.jh).apply(null,arguments)},sp=t.dynCall_viijjij=function(){return(sp=t.dynCall_viijjij=t.asm.kh).apply(null,arguments)},op=t.dynCall_viiijjiij=function(){return(op=t.dynCall_viiijjiij=t.asm.lh).apply(null,arguments)},ap=t.dynCall_viiiijjjj=function(){return(ap=t.dynCall_viiiijjjj=t.asm.mh).apply(null,arguments)},up=t.dynCall_jiijijii=function(){return(up=t.dynCall_jiijijii=t.asm.nh).apply(null,arguments)},cp=t.dynCall_viijiiiiij=function(){return(cp=t.dynCall_viijiiiiij=t.asm.oh).apply(null,arguments)},lp=t.dynCall_viijiiiijj=function(){return(lp=t.dynCall_viijiiiijj=t.asm.ph).apply(null,arguments)},dp=t.dynCall_viiijiiiijjj=function(){return(dp=t.dynCall_viiijiiiijjj=t.asm.qh).apply(null,arguments)},fp=t.dynCall_viijijiiiijjj=function(){return(fp=t.dynCall_viijijiiiijjj=t.asm.rh).apply(null,arguments)},hp=t.dynCall_iijjjj=function(){return(hp=t.dynCall_iijjjj=t.asm.sh).apply(null,arguments)},pp=t.dynCall_iiijji=function(){return(pp=t.dynCall_iiijji=t.asm.th).apply(null,arguments)},yp=t.dynCall_vijijiiiijjj=function(){return(yp=t.dynCall_vijijiiiijjj=t.asm.uh).apply(null,arguments)},mp=t.dynCall_iiiiiiji=function(){return(mp=t.dynCall_iiiiiiji=t.asm.vh).apply(null,arguments)},_p=t.dynCall_jijijjij=function(){return(_p=t.dynCall_jijijjij=t.asm.wh).apply(null,arguments)},bp=t.dynCall_vijjij=function(){return(bp=t.dynCall_vijjij=t.asm.xh).apply(null,arguments)},gp=t.dynCall_viijjj=function(){return(gp=t.dynCall_viijjj=t.asm.yh).apply(null,arguments)},vp=t.dynCall_jiiijj=function(){return(vp=t.dynCall_jiiijj=t.asm.zh).apply(null,arguments)},jp=t.dynCall_viijiiii=function(){return(jp=t.dynCall_viijiiii=t.asm.Ah).apply(null,arguments)},wp=t.dynCall_iiijij=function(){return(wp=t.dynCall_iiijij=t.asm.Bh).apply(null,arguments)},Bp=t.dynCall_viiijiii=function(){return(Bp=t.dynCall_viiijiii=t.asm.Ch).apply(null,arguments)},Tp=t.dynCall_viijjji=function(){return(Tp=t.dynCall_viijjji=t.asm.Dh).apply(null,arguments)},Ip=t.dynCall_iiiiiij=function(){return(Ip=t.dynCall_iiiiiij=t.asm.Eh).apply(null,arguments)},Sp=t.dynCall_iiiiiiiiiiji=function(){return(Sp=t.dynCall_iiiiiiiiiiji=t.asm.Fh).apply(null,arguments)},Dp=t.dynCall_jiiiiiii=function(){return(Dp=t.dynCall_jiiiiiii=t.asm.Gh).apply(null,arguments)},Op=t.dynCall_iidj=function(){return(Op=t.dynCall_iidj=t.asm.Hh).apply(null,arguments)},Ap=t.dynCall_jiiijii=function(){return(Ap=t.dynCall_jiiijii=t.asm.Ih).apply(null,arguments)},Fp=t.dynCall_ijji=function(){return(Fp=t.dynCall_ijji=t.asm.Jh).apply(null,arguments)},Mp=t.dynCall_iiiiiiiij=function(){return(Mp=t.dynCall_iiiiiiiij=t.asm.Kh).apply(null,arguments)},Vp=t.dynCall_iiiiiiij=function(){return(Vp=t.dynCall_iiiiiiij=t.asm.Lh).apply(null,arguments)},Up=t.dynCall_iiiiiiiiiiiij=function(){return(Up=t.dynCall_iiiiiiiiiiiij=t.asm.Mh).apply(null,arguments)},Cp=t.dynCall_iiiiiiiji=function(){return(Cp=t.dynCall_iiiiiiiji=t.asm.Nh).apply(null,arguments)},Pp=t.dynCall_iiiidjj=function(){return(Pp=t.dynCall_iiiidjj=t.asm.Oh).apply(null,arguments)},kp=t.dynCall_jiiiii=function(){return(kp=t.dynCall_jiiiii=t.asm.Ph).apply(null,arguments)},Rp=t.dynCall_jiiiiiijii=function(){return(Rp=t.dynCall_jiiiiiijii=t.asm.Qh).apply(null,arguments)},Np=t.dynCall_iiiijji=function(){return(Np=t.dynCall_iiiijji=t.asm.Rh).apply(null,arguments)},xp=t.dynCall_jiiiiii=function(){return(xp=t.dynCall_jiiiiii=t.asm.Sh).apply(null,arguments)},Ep=t.dynCall_jiiiijii=function(){return(Ep=t.dynCall_jiiiijii=t.asm.Th).apply(null,arguments)},Lp=t.dynCall_jiiiijiiiiiiii=function(){return(Lp=t.dynCall_jiiiijiiiiiiii=t.asm.Uh).apply(null,arguments)},qp=t.dynCall_jiiiiijiiii=function(){return(qp=t.dynCall_jiiiiijiiii=t.asm.Vh).apply(null,arguments)},zp=t.dynCall_jiiijiii=function(){return(zp=t.dynCall_jiiijiii=t.asm.Wh).apply(null,arguments)},Wp=t.dynCall_fiijii=function(){return(Wp=t.dynCall_fiijii=t.asm.Xh).apply(null,arguments)},Hp=t.dynCall_diijii=function(){return(Hp=t.dynCall_diijii=t.asm.Yh).apply(null,arguments)},Yp=t.dynCall_vijijj=function(){return(Yp=t.dynCall_vijijj=t.asm.Zh).apply(null,arguments)},$p=t.dynCall_jf=function(){return($p=t.dynCall_jf=t.asm._h).apply(null,arguments)},Gp=t.dynCall_jd=function(){return(Gp=t.dynCall_jd=t.asm.$h).apply(null,arguments)},Jp=t.dynCall_jiijiiiii=function(){return(Jp=t.dynCall_jiijiiiii=t.asm.ai).apply(null,arguments)},Kp=t.dynCall_jiijiijiii=function(){return(Kp=t.dynCall_jiijiijiii=t.asm.bi).apply(null,arguments)},Zp=t.dynCall_jiijjiii=function(){return(Zp=t.dynCall_jiijjiii=t.asm.ci).apply(null,arguments)},Xp=t.dynCall_iijiii=function(){return(Xp=t.dynCall_iijiii=t.asm.di).apply(null,arguments)},Qp=t.dynCall_jiiiiji=function(){return(Qp=t.dynCall_jiiiiji=t.asm.ei).apply(null,arguments)},ey=t.dynCall_vijiijj=function(){return(ey=t.dynCall_vijiijj=t.asm.fi).apply(null,arguments)},ty=t.dynCall_vifiijj=function(){return(ty=t.dynCall_vifiijj=t.asm.gi).apply(null,arguments)},ry=t.dynCall_vidiijj=function(){return(ry=t.dynCall_vidiijj=t.asm.hi).apply(null,arguments)},iy=t.dynCall_viiiiij=function(){return(iy=t.dynCall_viiiiij=t.asm.ii).apply(null,arguments)},ny=t.dynCall_ijj=function(){return(ny=t.dynCall_ijj=t.asm.ji).apply(null,arguments)},sy=t.dynCall_ijjiii=function(){return(sy=t.dynCall_ijjiii=t.asm.ki).apply(null,arguments)},oy=t.dynCall_vijijjji=function(){return(oy=t.dynCall_vijijjji=t.asm.li).apply(null,arguments)},ay=t.dynCall_viiiiijjji=function(){return(ay=t.dynCall_viiiiijjji=t.asm.mi).apply(null,arguments)},uy=t.dynCall_viijijj=function(){return(uy=t.dynCall_viijijj=t.asm.ni).apply(null,arguments)},cy=t.dynCall_iiijiijj=function(){return(cy=t.dynCall_iiijiijj=t.asm.oi).apply(null,arguments)},ly=t.dynCall_viiijijjj=function(){return(ly=t.dynCall_viiijijjj=t.asm.pi).apply(null,arguments)},dy=t.dynCall_iijiijj=function(){return(dy=t.dynCall_iijiijj=t.asm.qi).apply(null,arguments)},fy=t.dynCall_viiijjjji=function(){return(fy=t.dynCall_viiijjjji=t.asm.ri).apply(null,arguments)},hy=t.dynCall_viiiijiii=function(){return(hy=t.dynCall_viiiijiii=t.asm.si).apply(null,arguments)},py=t.dynCall_iijii=function(){return(py=t.dynCall_iijii=t.asm.ti).apply(null,arguments)},yy=t.dynCall_vijjiiii=function(){return(yy=t.dynCall_vijjiiii=t.asm.ui).apply(null,arguments)},my=t.dynCall_vijijjiiiii=function(){return(my=t.dynCall_vijijjiiiii=t.asm.vi).apply(null,arguments)},_y=t.dynCall_vijjiiiii=function(){return(_y=t.dynCall_vijjiiiii=t.asm.wi).apply(null,arguments)},by=t.dynCall_iiijjji=function(){return(by=t.dynCall_iiijjji=t.asm.xi).apply(null,arguments)},gy=t.dynCall_iiiiijjj=function(){return(gy=t.dynCall_iiiiijjj=t.asm.yi).apply(null,arguments)},vy=t.dynCall_jijiiii=function(){return(vy=t.dynCall_jijiiii=t.asm.zi).apply(null,arguments)},jy=t.dynCall_iiijjjii=function(){return(jy=t.dynCall_iiijjjii=t.asm.Ai).apply(null,arguments)},wy=t.dynCall_iiiiijjji=function(){return(wy=t.dynCall_iiiiijjji=t.asm.Bi).apply(null,arguments)},By=t.dynCall_iiiijjj=function(){return(By=t.dynCall_iiiijjj=t.asm.Ci).apply(null,arguments)},Ty=t.dynCall_viijiji=function(){return(Ty=t.dynCall_viijiji=t.asm.Di).apply(null,arguments)};function nw(o){var a=w();try{H.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function sw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function ow(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function aw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function uw(o,a){var u=w();try{H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function cw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function lw(o,a,u,l,d,f){var h=w();try{return H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function dw(o,a,u,l,d){var f=w();try{H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function fw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function hw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function pw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function yw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function mw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function _w(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function bw(o){var a=w();try{return H.get(o)()}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function gw(o,a,u,l,d,f,h,p){var y=w();try{return H.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function vw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function jw(o,a,u,l,d,f,h,p){var y=w();try{H.get(o)(a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ww(o,a,u,l,d,f,h){var p=w();try{return H.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function Bw(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function Tw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function Iw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(B(_e),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function Sw(o,a,u,l,d,f,h){var p=w();try{H.get(o)(a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function Dw(o,a,u,l,d,f){var h=w();try{return H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Ow(o,a,u,l,d,f,h,p,y){var m=w();try{H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function Aw(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Fw(o,a,u,l,d,f){var h=w();try{H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Mw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$){var Ae=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$)}catch(ye){if(B(Ae),ye!==ye+0&&ye!=="longjmp")throw ye;T(1,0)}}function Vw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$,Ae){var ye=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be,P,$,Ae)}catch(at){if(B(ye),at!==at+0&&at!=="longjmp")throw at;T(1,0)}}function Uw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Cw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Pw(o,a,u,l){var d=w();try{H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function kw(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=w();try{return H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(B(_e),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function Rw(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Nw(o,a,u){var l=w();try{H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function xw(o,a,u,l,d,f,h,p,y,m){var g=w();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function Ew(o,a,u,l,d){var f=w();try{return H.get(o)(a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function Lw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function qw(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function zw(o,a,u,l,d,f,h,p,y){var m=w();try{return H.get(o)(a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function Ww(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function Hw(o,a,u,l,d,f){var h=w();try{H.get(o)(a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function Yw(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(B(x),ue!==ue+0&&ue!=="longjmp")throw ue;T(1,0)}}function $w(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Gw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Jw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Kw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Zw(o,a,u){var l=w();try{return H.get(o)(a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function Xw(o,a,u,l){var d=w();try{return H.get(o)(a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function Qw(o,a,u,l,d,f,h,p,y,m){var g=w();try{H.get(o)(a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{H.get(o)(a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function tB(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function rB(o,a){var u=w();try{return H.get(o)(a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function iB(o,a,u,l,d){var f=w();try{return df(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function nB(o,a,u,l,d,f,h){var p=w();try{vf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function sB(o,a){var u=w();try{return mf(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function oB(o,a,u){var l=w();try{return dh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function aB(o,a,u,l,d,f,h){var p=w();try{pf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function uB(o,a,u,l,d,f,h){var p=w();try{return ff(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cB(o,a,u,l,d,f,h,p,y){var m=w();try{return hf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function lB(o,a,u,l){var d=w();try{return _f(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function dB(o,a,u,l,d,f){var h=w();try{wf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function fB(o){var a=w();try{return yf(o)}catch(u){if(B(a),u!==u+0&&u!=="longjmp")throw u;T(1,0)}}function hB(o,a,u,l,d){var f=w();try{bf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function pB(o,a,u,l,d,f,h,p){var y=w();try{Bf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function yB(o,a,u,l,d,f,h){var p=w();try{return Tf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function mB(o,a,u,l,d,f,h,p){var y=w();try{gf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function _B(o,a,u,l){var d=w();try{Uf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function bB(o,a,u,l,d){var f=w();try{Df(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gB(o,a,u,l,d){var f=w();try{return kf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function vB(o,a,u,l,d,f){var h=w();try{return ah(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function jB(o,a,u,l,d,f,h,p){var y=w();try{return wp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function wB(o,a,u,l,d,f){var h=w();try{return ch(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function BB(o,a,u,l,d,f){var h=w();try{return Wf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function TB(o,a,u,l,d,f,h,p){var y=w();try{return pp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function IB(o,a,u,l,d,f){var h=w();try{If(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function SB(o,a,u,l,d,f,h,p){var y=w();try{return Of(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function DB(o,a,u,l,d,f,h,p){var y=w();try{jf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function OB(o,a,u,l,d,f,h,p,y){var m=w();try{Mf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function AB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{Ff(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function FB(o,a,u,l,d,f,h,p,y,m){var g=w();try{Af(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function MB(o,a,u,l,d,f,h,p,y){var m=w();try{oh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function VB(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{tp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function UB(o,a,u,l,d,f,h,p,y){var m=w();try{ih(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CB(o,a,u,l,d,f,h,p,y){var m=w();try{return Vf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function PB(o,a,u,l,d,f,h){var p=w();try{Lf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function kB(o,a,u,l){var d=w();try{return Cf(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function RB(o,a,u,l,d,f){var h=w();try{return Pf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function NB(o,a,u,l,d,f,h,p,y){var m=w();try{Ef(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function xB(o,a,u,l,d,f,h){var p=w();try{$f(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function EB(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{xf(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function LB(o,a,u,l,d,f){var h=w();try{return rh(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function qB(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{Nf(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function zB(o,a,u,l,d,f,h,p,y){var m=w();try{return zf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function WB(o,a,u,l,d,f,h,p,y){var m=w();try{qf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function HB(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=w();try{return Rf(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(B(ue),_e!==_e+0&&_e!=="longjmp")throw _e;T(1,0)}}function YB(o,a,u,l,d,f,h,p,y){var m=w();try{return Hf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function $B(o,a,u,l,d,f,h,p){var y=w();try{return Yf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function GB(o,a,u,l,d,f,h,p){var y=w();try{Sf(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function JB(o,a,u,l,d,f){var h=w();try{Gf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function KB(o,a,u,l,d,f,h,p,y){var m=w();try{Jf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function ZB(o,a,u,l,d,f){var h=w();try{Kf(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function XB(o,a,u,l,d,f,h){var p=w();try{return Xf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function QB(o,a,u,l,d,f,h,p,y,m){var g=w();try{eh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eT(o,a,u,l,d,f,h){var p=w();try{return Qf(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function tT(o,a,u,l,d,f,h,p,y,m){var g=w();try{th(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function rT(o,a,u,l,d,f,h,p,y){var m=w();try{return Zf(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function iT(o,a,u,l,d,f,h){var p=w();try{Vh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function nT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Uh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function sT(o,a,u,l,d,f,h,p){var y=w();try{return uh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function oT(o,a,u,l,d,f,h){var p=w();try{return lh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function aT(o,a,u,l){var d=w();try{return fh(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function uT(o,a,u,l,d,f,h){var p=w();try{Bh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function cT(o,a,u,l,d,f,h,p){var y=w();try{Oh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function lT(o,a,u,l,d,f,h,p){var y=w();try{return Ah(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function dT(o,a,u,l,d,f,h,p){var y=w();try{return gh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function fT(o,a,u,l,d,f,h,p,y){var m=w();try{return vh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hT(o,a,u,l,d,f,h,p){var y=w();try{jh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pT(o,a,u,l,d,f,h,p,y){var m=w();try{return wh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function yT(o,a,u,l,d,f,h,p,y){var m=w();try{return Th(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function mT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Ih(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function _T(o,a,u,l,d,f,h){var p=w();try{return Dh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function bT(o,a,u,l,d){var f=w();try{return Sh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function gT(o,a,u,l,d,f,h,p,y){var m=w();try{_h(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vT(o,a,u,l,d,f,h,p){var y=w();try{mh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function jT(o,a,u,l,d,f,h,p,y,m){var g=w();try{bh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function wT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return hh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function BT(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{ph(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function TT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{yh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function IT(o,a,u,l,d,f,h){var p=w();try{Fh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ST(o,a,u,l,d,f,h,p,y){var m=w();try{return Mh(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function DT(o,a,u,l){var d=w();try{return xh(o,a,u,l)}catch(f){if(B(d),f!==f+0&&f!=="longjmp")throw f;T(1,0)}}function OT(o,a,u,l,d){var f=w();try{return ny(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function AT(o,a,u,l,d,f,h,p){var y=w();try{return sy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function FT(o,a,u){var l=w();try{return kh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function MT(o,a,u){var l=w();try{return Rh(o,a,u)}catch(d){if(B(l),d!==d+0&&d!=="longjmp")throw d;T(1,0)}}function VT(o,a,u,l,d){var f=w();try{return Hh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function UT(o,a,u,l,d,f,h){var p=w();try{Lh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function CT(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=w();try{Ph(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(B(ue),_e!==_e+0&&_e!=="longjmp")throw _e;T(1,0)}}function PT(o,a,u,l,d){var f=w();try{return Nh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function kT(o,a,u,l,d){var f=w();try{Eh(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function RT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{qh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function NT(o,a,u,l,d,f,h){var p=w();try{return Wh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function xT(o,a,u,l,d,f,h){var p=w();try{zh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function ET(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Yh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function LT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return $h(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function qT(o,a,u,l,d,f,h,p){var y=w();try{Gh(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function zT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Jh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function WT(o,a,u,l,d,f,h,p,y,m){var g=w();try{Kh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function HT(o,a,u,l,d,f,h){var p=w();try{return Qh(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YT(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Zh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function $T(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{Xh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function GT(o,a,u,l,d,f,h,p){var y=w();try{return ep(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function JT(o,a,u,l,d,f,h,p,y){var m=w();try{rp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KT(o,a,u,l,d){var f=w();try{return lf(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function ZT(o,a,u,l,d,f,h,p,y){var m=w();try{return mp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function XT(o,a,u,l,d,f,h,p,y,m){var g=w();try{sh(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function QT(o,a,u,l,d,f,h,p,y,m){var g=w();try{return hp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{ip(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function tI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{np(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function rI(o,a,u,l,d,f,h,p,y,m){var g=w();try{sp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function iI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ap(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function nI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return up(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function sI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{cp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function oI(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{lp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function aI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue){var _e=w();try{dp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue)}catch(Be){if(B(_e),Be!==Be+0&&Be!=="longjmp")throw Be;T(1,0)}}function uI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be){var P=w();try{fp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e,Be)}catch($){if(B(P),$!==$+0&&$!=="longjmp")throw $;T(1,0)}}function cI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{op(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function lI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e){var Be=w();try{yp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x,ue,_e)}catch(P){if(B(Be),P!==P+0&&P!=="longjmp")throw P;T(1,0)}}function dI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return _p(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function fI(o,a,u,l,d,f,h,p,y){var m=w();try{bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hI(o,a,u,l,d,f,h,p,y){var m=w();try{gp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function pI(o,a,u,l,d,f,h,p){var y=w();try{return vp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function yI(o,a,u,l,d,f,h,p,y){var m=w();try{jp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function mI(o,a,u,l,d,f,h,p,y){var m=w();try{Bp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function _I(o,a,u,l,d,f){var h=w();try{return kp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function bI(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return Rp(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function gI(o,a,u,l,d,f,h,p,y){var m=w();try{return Np(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function vI(o,a,u,l,d,f,h){var p=w();try{return xp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function jI(o,a,u,l,d,f){var h=w();try{return Fp(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function wI(o,a,u,l,d,f,h,p,y,m){var g=w();try{Tp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function BI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Mp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function TI(o,a,u,l,d,f,h,p){var y=w();try{return Ip(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function II(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{return Sp(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function SI(o,a,u,l,d,f,h,p){var y=w();try{return Dp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function DI(o,a,u,l,d,f,h,p,y){var m=w();try{return Vp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function OI(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{return Up(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(B(x),ue!==ue+0&&ue!=="longjmp")throw ue;T(1,0)}}function AI(o,a,u,l,d){var f=w();try{return Op(o,a,u,l,d)}catch(h){if(B(f),h!==h+0&&h!=="longjmp")throw h;T(1,0)}}function FI(o,a,u,l,d,f,h,p){var y=w();try{return Ap(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function MI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Cp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function VI(o,a,u,l,d,f,h,p,y){var m=w();try{return Pp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function UI(o,a,u,l,d,f,h,p,y){var m=w();try{return Ep(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function CI(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x){var ue=w();try{return Lp(o,a,u,l,d,f,h,p,y,m,g,j,O,M,x)}catch(_e){if(B(ue),_e!==_e+0&&_e!=="longjmp")throw _e;T(1,0)}}function PI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return qp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function kI(o,a,u,l,d,f,h,p,y){var m=w();try{return zp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function RI(o,a,u,l,d,f,h,p,y){var m=w();try{Yp(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function NI(o,a){var u=w();try{return $p(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function xI(o,a){var u=w();try{return Gp(o,a)}catch(l){if(B(u),l!==l+0&&l!=="longjmp")throw l;T(1,0)}}function EI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Jp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function LI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return Kp(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function qI(o,a,u,l,d,f,h,p,y,m){var g=w();try{return Zp(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function zI(o,a,u,l,d,f,h){var p=w();try{return Wp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function WI(o,a,u,l,d,f,h){var p=w();try{return Hp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function HI(o,a,u,l,d,f,h){var p=w();try{return Xp(o,a,u,l,d,f,h)}catch(y){if(B(p),y!==y+0&&y!=="longjmp")throw y;T(1,0)}}function YI(o,a,u,l,d,f,h,p){var y=w();try{return Qp(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function $I(o,a,u,l,d,f,h,p,y,m){var g=w();try{ey(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function GI(o,a,u,l,d,f,h,p,y){var m=w();try{ty(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function JI(o,a,u,l,d,f,h,p,y){var m=w();try{ry(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function KI(o,a,u,l,d,f,h,p){var y=w();try{iy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function ZI(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{oy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function XI(o,a,u,l,d,f){var h=w();try{return Ch(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function QI(o,a,u,l,d,f,h,p,y,m){var g=w();try{uy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function eS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return cy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function tS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ay(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function rS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{nh(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function iS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{ly(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function nS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return dy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function sS(o,a,u,l,d,f,h,p,y,m){var g=w();try{return by(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function oS(o,a,u,l,d,f,h,p,y,m,g,j,O){var M=w();try{fy(o,a,u,l,d,f,h,p,y,m,g,j,O)}catch(x){if(B(M),x!==x+0&&x!=="longjmp")throw x;T(1,0)}}function aS(o,a,u,l,d,f,h,p,y,m){var g=w();try{hy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function uS(o,a,u,l,d,f){var h=w();try{return py(o,a,u,l,d,f)}catch(p){if(B(h),p!==p+0&&p!=="longjmp")throw p;T(1,0)}}function cS(o,a,u,l,d,f,h,p,y,m,g,j,O,M){var x=w();try{my(o,a,u,l,d,f,h,p,y,m,g,j,O,M)}catch(ue){if(B(x),ue!==ue+0&&ue!=="longjmp")throw ue;T(1,0)}}function lS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{_y(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function dS(o,a,u,l,d,f,h,p,y,m){var g=w();try{yy(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}function fS(o,a,u,l,d,f,h,p,y){var m=w();try{Ty(o,a,u,l,d,f,h,p,y)}catch(g){if(B(m),g!==g+0&&g!=="longjmp")throw g;T(1,0)}}function hS(o,a,u,l,d,f,h,p){var y=w();try{return vy(o,a,u,l,d,f,h,p)}catch(m){if(B(y),m!==m+0&&m!=="longjmp")throw m;T(1,0)}}function pS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return jy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function yS(o,a,u,l,d,f,h,p,y,m,g){var j=w();try{return gy(o,a,u,l,d,f,h,p,y,m,g)}catch(O){if(B(j),O!==O+0&&O!=="longjmp")throw O;T(1,0)}}function mS(o,a,u,l,d,f,h,p,y,m,g,j){var O=w();try{return wy(o,a,u,l,d,f,h,p,y,m,g,j)}catch(M){if(B(O),M!==M+0&&M!=="longjmp")throw M;T(1,0)}}function _S(o,a,u,l,d,f,h,p,y,m){var g=w();try{return By(o,a,u,l,d,f,h,p,y,m)}catch(j){if(B(g),j!==j+0&&j!=="longjmp")throw j;T(1,0)}}t.ccall=Vv;var ro;function mu(o){this.name="ExitStatus",this.message="Program terminated with exit("+o+")",this.status=o}var bS=!1;ts=function o(){ro||_u(),ro||(ts=o)};function gS(o){var a=t._main,u=0,l=0;try{var d=a(u,l);vS(d,!0)}catch(h){if(h instanceof mu||h=="unwind")return;var f=h;h&&typeof h=="object"&&h.stack&&(f=[h,h.stack]),Pr("exception thrown: "+f),S(1,h)}finally{bS=!0}}function _u(o){if(o=o||v,ji>0||(Yv(),ji>0))return;function a(){ro||(ro=!0,t.calledRun=!0,!uu&&($v(),Gv(),i(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),Iy&&gS(o),Kv()))}t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),a()},1)):a()}t.run=_u;function vS(o,a){Yd=o,nf()||(Jv(),t.onExit&&t.onExit(o),uu=!0),S(o,new mu(o))}if(t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();var Iy=!0;return t.noInitialRun&&(Iy=!1),_u(),e.ready}}(),Tv=wU;var Wd=class extends ou{constructor(e,t,i,n){super(e,t);this.mainModuleURL=i,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){return globalThis.DUCKDB_RUNTIME=this._runtime,WebAssembly.instantiateStreaming?WebAssembly.instantiateStreaming(fetch(this.mainModuleURL),e).then(i=>{t(i.instance,i.module)}):fetch(this.mainModuleURL).then(i=>i.arrayBuffer()).then(i=>WebAssembly.instantiate(i,e).then(n=>{t(n.instance,n.module)})).catch(i=>{console.error("Failed to instantiate WASM:",i)}),[]}};var Sv=class extends Wd{constructor(e,t,i,n=null){super(e,t,i,n)}instantiateImpl(e){return Tv({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}};var nt={fileInfoCache:new Map,getFileInfo(r,e){try{let t=nt.fileInfoCache.get(e);if(t)return t;let[i,n,s]=Se(r,"duckdb_web_fs_get_file_info",["number"],[e]);if(i!==je.SUCCESS)throw new Error(ve(r,n,s));let c=ve(r,n,s);He(r);let v=JSON.parse(c);if(v==null)return null;let I={...v,blob:null};return nt.fileInfoCache.set(e,I),I}catch(t){return We(r,t.toString()),null}},testPlatformFeature:(r,e)=>{switch(e){case 1:return typeof BigInt64Array!="undefined";default:return console.warn(`test for unknown feature: ${e}`),!1}},openFile:(r,e)=>{try{nt.fileInfoCache.delete(e);let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.HTTP:{let i=new XMLHttpRequest;i.open("HEAD",t.data_url,!1),i.setRequestHeader("Range","bytes=0-"),i.send(null);let n=!1;if(i.status==206?n=!0:i.status==200&&(n=i.getResponseHeader("Accept-Ranges")==="bytes"),!n)return We(r,`File does not support range requests: ${t.file_name}`),0;break}case Qe.NATIVE:{if(!nt._files?.get(t.file_name))return We(r,`No handle available for file: ${t.file_name}`),0;break}}}catch(t){We(r,t.toString())}return 0},glob:(r,e,t)=>{try{let i=ve(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!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{We(r,`HEAD request failed: ${i}`);return}if(!s){We(r,`File does not support range requests: ${i}`);return}r.ccall("duckdb_web_fs_glob_add_path",null,["string"],[i])}}catch(i){return We(r,i.toString()),0}},checkFile:(r,e,t)=>{try{let i=ve(r,e,t);if(i.startsWith("http")){let n=new XMLHttpRequest;n.open("HEAD",i,!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(i){return!1}return!1},syncFile:(r,e)=>{},closeFile:(r,e)=>{let t=nt.getFileInfo(r,e);switch(nt.fileInfoCache.delete(e),t?.data_protocol){case Qe.HTTP:break;case Qe.NATIVE:return}},truncateFile:(r,e,t)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:We(r,"Cannot truncate a http file");return;case Qe.NATIVE:We(r,"truncateFile not implemented");return}return 0},readFile(r,e,t,i,n){try{let s=nt.getFileInfo(r,e);switch(s?.data_protocol){case Qe.HTTP:{if(!s.data_url)return We(r,`Missing data URL for file ${e}`),0;let c=new XMLHttpRequest;if(c.open("GET",s.data_url,!1),c.responseType="arraybuffer",c.setRequestHeader("Range",`bytes=${n}-${n+i-1}`),c.send(null),c.status==206||c.status==200&&i==c.response.byteLength&&n==0){let v=new Uint8Array(c.response,0,Math.min(c.response.byteLength,i));return r.HEAPU8.set(v,t),v.byteLength}else return c.status==200?(We(r,`Range request for ${s.data_url} did not return a partial response: ${c.status} "${c.statusText}"`),0):(We(r,`Range request for ${s.data_url} did returned non-success status: ${c.status} "${c.statusText}"`),0)}case Qe.NATIVE:{let c=nt._files?.get(s.file_name);if(!c)return We(r,`No handle available for file: ${s.file_name}`),0;let v=c.slice(n,n+i),I=new Uint8Array(new FileReaderSync().readAsArrayBuffer(v));return r.HEAPU8.set(I,t),I.byteLength}}return 0}catch(s){return We(r,s.toString()),0}},writeFile:(r,e,t,i,n)=>{switch(nt.getFileInfo(r,e)?.data_protocol){case Qe.HTTP:return We(r,"Cannot write to HTTP file"),0;case Qe.NATIVE:return We(r,"writefile not implemented"),0}return 0},getFileSize:(r,e)=>{try{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{let i=nt._files?.get(t.file_name);return i?i.size:(We(r,`No handle available for file: ${t.file_name}`),0)}case Qe.HTTP:{if(!t.data_url)throw new Error(`Missing data URL for file ${e}`);let i=new XMLHttpRequest;if(i.open("HEAD",t.data_url,!1),i.send(null),i.status==200){let n=i.getResponseHeader("Content-Length");if(n)return parseInt(n);throw Error(`HEAD ${t.data_url} does not contain the HTTP header: Content-Length`)}else throw Error(`HEAD ${t.data_url} returned non-success status: ${i.status} "${i.statusText}"`)}}return 0}catch(t){return We(r,t.toString()),0}},getLastFileModificationTime:(r,e)=>{let t=nt.getFileInfo(r,e);switch(t?.data_protocol){case Qe.NATIVE:{if(!nt._files?.get(t.file_name))throw Error(`No handle available for file: ${t.file_name}`);return 0}case Qe.HTTP:return new Date().getTime()}return 0},checkDirectory:(r,e,t)=>!1,createDirectory:(r,e,t)=>{},removeDirectory:(r,e,t)=>{},listDirectoryEntries:(r,e,t)=>!1,moveFile:(r,e,t,i,n)=>{},removeFile:(r,e,t)=>{}};return BU;})();
|
|
19
19
|
//# sourceMappingURL=duckdb-browser-sync.js.map
|